[142757] trunk/dports/gis

vince at macports.org vince at macports.org
Sat Dec 12 07:06:27 PST 2015


Revision: 142757
          https://trac.macports.org/changeset/142757
Author:   vince at macports.org
Date:     2015-11-22 05:18:36 -0800 (Sun, 22 Nov 2015)
Log Message:
-----------
grass7: initial commit. Not complete, not functional as standalone but works with QGIS +grass

Added Paths:
-----------
    trunk/dports/gis/grass7/
    trunk/dports/gis/grass7/Portfile
    trunk/dports/gis/grass7/files/
    trunk/dports/gis/grass7/files/patch-Install_make.diff
    trunk/dports/gis/grass7/files/patch-Platform_make_in.diff
    trunk/dports/gis/grass7/files/patch-configure.diff

Added: trunk/dports/gis/grass7/Portfile
===================================================================
--- trunk/dports/gis/grass7/Portfile	                        (rev 0)
+++ trunk/dports/gis/grass7/Portfile	2015-11-22 13:18:36 UTC (rev 142757)
@@ -0,0 +1,136 @@
+# $Id: Portfile 125520 2014-09-19 17:54:27Z devans at macports.org $
+
+PortSystem        1.0
+PortGroup         wxWidgets 1.0
+PortGroup         active_variants 1.1
+
+name              grass7
+version           7.0.2
+distname          grass-${version}
+maintainers       nomaintainer
+categories        gis
+license           GPL-2+
+platforms         darwin
+
+description       GRASS
+long_description  GRASS is a Geographic Information System (GIS) used for \
+                  geospatial data management and analysis.
+
+homepage          http://grass.osgeo.org/
+master_sites      ${homepage}grass[join [lrange [split ${version} .] 0 1] {}]/source/
+
+checksums           rmd160  8a13e89add8c0dd2160344717310111d564d42c7 \
+                    sha256  2eabd84c5426c675b7f3046213bbacb0cee9d0225df15e1530b93f43ec6b190b
+
+wxWidgets.use     wxPython-3.0
+
+depends_build     port:pkgconfig
+depends_lib       port:freetype \
+                  port:fftw-3 \
+                  port:gdal \
+                  port:geos \
+                  port:tiff \
+                  port:libpng \
+                  port:proj\
+                  path:lib/pkgconfig/cairo.pc:cairo \
+                  port:readline \
+                  port:python27 \
+                  port:py27-pillow \
+                  port:${wxWidgets.port} \
+                  port:py27-${wxWidgets.port}
+
+patchfiles        patch-configure.diff \
+                  patch-Install_make.diff
+
+post-patch {
+    set python_bin ${prefix}/bin/python2.7
+    set python_scripts [exec find ${worksrcpath} -name *.py]
+    puts $python_scripts
+    foreach f $python_scripts {
+        reinplace "s|/usr/bin/env python|${python_bin}|" ${f}
+    }
+    reinplace "s|PYVER.*|PYVER = 2.7|" ${worksrcpath}/macosx/Makefile
+    reinplace "s|^PYTHON.*|PYTHON = ${python_bin}|" ${worksrcpath}/include/Make/Platform.make.in
+
+    ui_warn "WARNING! This port does not provide a functional standalone Grass 7 package (yet)."
+    ui_warn "However the set of functions is usable with QGIS +grass."
+}
+
+configure.ldflags-append -framework OpenCL
+
+configure.args \
+    --prefix=${prefix}/share \
+    --exec-prefix=${prefix} \
+    --with-fftw-includes=${prefix}/include \
+    --with-fftw-libs=${prefix}/lib \
+    --with-freetype \
+    --with-freetype-includes=${prefix}/include/freetype2 \
+    --with-freetype-libs=${prefix}/lib \
+    --with-gdal=${prefix}/bin/gdal-config \
+    --with-tiff-includes=${prefix}/include \
+    --with-tiff-libs=${prefix}/lib \
+    --with-png-includes=${prefix}/include \
+    --with-png-libs=${prefix}/lib \
+    --with-proj-includes=${prefix}/include \
+    --with-proj-libs=${prefix}/lib \
+    --with-proj-share=${prefix}/share/proj \
+    --with-geos \
+    --with-geos-includes=${prefix}/include \
+    --with-geos-libs=${prefix}/lib \
+    --without-postgres \
+    --with-pthread \
+    --with-cairo \
+    --with-cairo-includes=${prefix}/include/cairo \
+    --with-cairo-libs=${prefix}/lib \
+    --with-opengl=osx \
+    --with-opencl=yes \
+    --with-blas \
+    --with-lapack \
+    --with-readline \
+    --with-readline-includes=${prefix}/include/readline \
+    --with-readline-libs=${prefix}/lib \
+    --with-wxwidgets=${wxWidgets.wxconfig} \
+
+build.target        default
+
+variant mysql5 description {Add MySQL 5 support} {
+    depends_lib-append    path:bin/mysql_config5:mysql5
+    configure.args-append --with-mysql
+    configure.args-append --with-mysql-includes=${prefix}/include/mysql5/mysql
+    configure.args-append --with-mysql-libs=${prefix}/lib/mysql5/mysql
+    configure.env-append  MYSQLD_CONFIG=${prefix}/lib/mysql5/bin/mysql_config
+}
+
+variant postgresql94 description {Add PostgreSQL 9.4 support} {
+    depends_lib-append    port:postgresql94
+    configure.args-delete --without-postgres
+    configure.args-append --with-postgres
+    configure.args-append --with-postgres-includes=${prefix}/include/postgresql94
+    configure.args-append --with-postgres-libs=${prefix}/lib/postgresql94
+}
+
+variant sqlite description {Add SQLite 3 support} {
+    depends_lib-append    port:sqlite3
+    configure.args-append --with-sqlite
+    configure.args-append --with-sqlite-includes=${prefix}/include
+    configure.args-append --with-sqlite-libs=${prefix}/lib
+}
+
+variant ffmpeg description {Add ffmpeg support} {
+    depends_lib-append    path:lib/libavcodec.dylib:ffmpeg
+    configure.args-append --with-ffmpeg \
+                          --with-ffmpeg-includes=\"${prefix}/include/libavcodec  \
+                                                   ${prefix}/include/libavformat \
+                                                   ${prefix}/include/libswscale\" \
+                          --with-ffmpeglibs=${prefix}/lib
+}
+
+variant atlas description {Use Atlas for BLAS/LAPACK} {
+    depends_lib-append      port:atlas
+    configure.args-append   --with-libblas=${prefix}/lib/libtatlas.dylib
+    configure.args-append   --with-liblapack=${prefix}/lib/libtatlas.dylib
+}
+
+livecheck.type      regex
+livecheck.url       http://grass.osgeo.org/download/software/sources/
+livecheck.regex     grass-(\[0-9.\]+)${extract.suffix}

Added: trunk/dports/gis/grass7/files/patch-Install_make.diff
===================================================================
--- trunk/dports/gis/grass7/files/patch-Install_make.diff	                        (rev 0)
+++ trunk/dports/gis/grass7/files/patch-Install_make.diff	2015-11-22 13:18:36 UTC (rev 142757)
@@ -0,0 +1,99 @@
+--- include/Make/Install.make.orig	2015-11-22 10:40:39.000000000 +0100
++++ include/Make/Install.make	2015-11-22 10:40:44.000000000 +0100
+@@ -54,7 +54,7 @@
+ 	while [ ! -d "$$INST_PATH" ]; do \
+ 		INST_PATH=`dirname $$INST_PATH`; \
+ 	done; \
+-	if [ ! -d "$(INST_DIR)" -a ! -w "$$INST_PATH" ] ; then \
++	if [ ! -d "$(DESTDIR)$(INST_DIR)" -a ! -w "$(DESTDIR)$$INST_PATH" ] ; then \
+ 		echo "ERROR: Directory $$INST_PATH is a parent directory of your" >&2 ; \
+ 		echo "  install directory $(INST_DIR) and is not writable." >&2 ; \
+ 		echo "  Perhaps you need root access." >&2 ; \
+@@ -63,7 +63,7 @@
+ 	fi
+ 
+ install-check-writable:
+-	@ if [ -d "$(INST_DIR)" -a ! -w "$(INST_DIR)" ] ; then \
++	@ if [ -d "$(DESTDIR)$(INST_DIR)" -a ! -w "$(DESTDIR)$(INST_DIR)" ] ; then \
+ 		echo "ERROR: Your install directory $(INST_DIR) is not writable." >&2 ; \
+ 		echo "  Perhaps you need root access." >&2 ; \
+ 		echo "  Installation aborted, exiting Make." >&2 ; \
+@@ -71,7 +71,7 @@
+ 	fi
+ 
+ install-check-prefix:
+-	@ result=`echo "$(INST_DIR)" | awk '{ if ($$1 ~ /grass/) print $$1 }'`; \
++	@ result=`echo "$(DESTDIR)$(INST_DIR)" | awk '{ if ($$1 ~ /grass/) print $$1 }'`; \
+ 	if [ "$$result" = "" ] ; then \
+ 		echo "WARNING: Your install directory $(INST_DIR)" >&2 ; \
+ 		echo "  does not contain the word 'grass'." >&2 ; \
+@@ -96,53 +96,53 @@
+ PLATMAKE = include/Make/Platform.make
+ GRASSMAKE = include/Make/Grass.make
+ 
+-real-install: | $(INST_DIR) $(UNIX_BIN)
+-	-tar cBCf $(GISBASE) - . | tar xBCf $(INST_DIR) - 2>/dev/null
+-	-rm $(INST_DIR)/$(GRASS_NAME).tmp
++real-install: | $(DESTDIR) $(INST_DIR) $(UNIX_BIN)
++	-tar cBCf $(GISBASE) - . | tar xBCf $(DESTDIR)$(INST_DIR) - 2>/dev/null
++	-rm $(DESTDIR)$(INST_DIR)/$(GRASS_NAME).tmp
+ 	$(MAKE) $(STARTUP)
+ 
+-	-rm $(INST_DIR)/$(FONTCAP)
++	-rm $(DESTDIR)$(INST_DIR)/$(FONTCAP)
+ 	$(MAKE) $(INST_DIR)/$(FONTCAP)
+ 
+-	-rm $(INST_DIR)/$(TMPGISRC)
++	-rm $(DESTDIR)$(INST_DIR)/$(TMPGISRC)
+ 	$(MAKE) $(INST_DIR)/$(TMPGISRC)
+ 
+-	-rm $(INST_DIR)/$(PLATMAKE)
++	-rm $(DESTDIR)$(INST_DIR)/$(PLATMAKE)
+ 	$(MAKE) $(INST_DIR)/$(PLATMAKE)
+ 
+-	-rm $(INST_DIR)/$(GRASSMAKE)
++	-rm $(DESTDIR)$(INST_DIR)/$(GRASSMAKE)
+ 	$(MAKE) $(INST_DIR)/$(GRASSMAKE)
+ 
+-	-$(INSTALL) config.status $(INST_DIR)/config.status
+-	-$(CHMOD) -R a+rX $(INST_DIR) 2>/dev/null
++	-$(INSTALL) config.status $(DESTDIR)$(INST_DIR)/config.status
++	-$(CHMOD) -R a+rX $(DESTDIR)$(INST_DIR) 2>/dev/null
+ 
+ ifneq ($(findstring darwin,$(ARCH)),)
+ 	@# enable OSX Help Viewer
+-	@/bin/ln -sfh "$(INST_DIR)/docs/html" /Library/Documentation/Help/GRASS-$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR)
++	@#/bin/ln -sfh "$(INST_DIR)/docs/html" /Library/Documentation/Help/GRASS-$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR)
+ endif
+ 
+ $(INST_DIR) $(UNIX_BIN):
+-	$(MAKE_DIR_CMD) $@
++	$(MAKE_DIR_CMD) $(DESTDIR)$@
+ 
+ $(STARTUP): $(ARCH_DISTDIR)/$(GRASS_NAME).tmp
+ 	sed -e 's#'@GISBASE@'#'$(INST_DIR)'#g' \
+ 	    -e 's#'@LD_LIBRARY_PATH_VAR@'#'$(LD_LIBRARY_PATH_VAR)'#g' \
+ 	    -e 's#'@CONFIG_PROJSHARE@'#'$(PROJSHARE)'#g' \
+-	    $< > $@
+-	-$(CHMOD) a+x $@
++	    $< > $(DESTDIR)$@
++	-$(CHMOD) a+x $(DESTDIR)$@
+ 
+ define fix_gisbase
+-sed -e 's#$(GISBASE)#$(INST_DIR)#g' $< > $@
++sed -e 's#$(GISBASE)#$(INST_DIR)#g' $< > $(DESTDIR)$@
+ endef
+ 
+ define fix_grass_home
+ sed -e 's#^\(GRASS_HOME.[^=]*\).*#\1= $(INST_DIR)#g' \
+-    -e 's#$(GISBASE)#$(INST_DIR)#g' $< > $@
++    -e 's#$(GISBASE)#$(INST_DIR)#g' $< > $(DESTDIR)$@
+ endef
+ 
+ define fix_grass_arch
+ sed -e 's#^\(ARCH_DISTDIR.[^=]*\).*#\1= $(INST_DIR)#g' \
+-    -e 's#^\(ARCH_BINDIR.[^=]*\).*#\1= $(UNIX_BIN)#g' $< > $@
++    -e 's#^\(ARCH_BINDIR.[^=]*\).*#\1= $(UNIX_BIN)#g' $< > $(DESTDIR)$@
+ endef
+ 
+ $(INST_DIR)/$(FONTCAP): $(GISBASE)/$(FONTCAP)

Added: trunk/dports/gis/grass7/files/patch-Platform_make_in.diff
===================================================================
--- trunk/dports/gis/grass7/files/patch-Platform_make_in.diff	                        (rev 0)
+++ trunk/dports/gis/grass7/files/patch-Platform_make_in.diff	2015-11-22 13:18:36 UTC (rev 142757)
@@ -0,0 +1,10 @@
+--- include/Make/Platform.make.in.orig	2015-11-22 09:41:28.000000000 +0100
++++ include/Make/Platform.make.in	2015-11-22 09:41:45.000000000 +0100
+@@ -38,6 +38,7 @@
+ ARCH                = @host@
+ UNIX_BIN            = @BINDIR@
+ INST_DIR            = @INSTDIR@
++DESTROOT
+ 
+ GRASS_HOME          = @GRASS_HOME@
+ RUN_GISBASE         = @GISBASE@

Added: trunk/dports/gis/grass7/files/patch-configure.diff
===================================================================
--- trunk/dports/gis/grass7/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/gis/grass7/files/patch-configure.diff	2015-11-22 13:18:36 UTC (rev 142757)
@@ -0,0 +1,31 @@
+--- configure.old	2015-11-21 22:18:40.000000000 +0100
++++ configure	2015-11-21 22:18:51.000000000 +0100
+@@ -12545,7 +12545,7 @@
+ fi
+ 
+ 
+-if test -n "$MACOSX_APP" ; then
++#if test -n "$MACOSX_APP" ; then
+     
+ ac_save_cppflags="$CPPFLAGS"
+ CPPFLAGS="$OCLINCPATH $CPPFLAGS"
+@@ -12645,15 +12645,15 @@
+     OCLLIB="$OCLLIB -framework OpenCL"
+ 
+ 
+-else
+-  echo "$ac_t""no" 1>&6
++#else
++#  echo "$ac_t""no" 1>&6
+ 
+ 
+-{ echo "configure: error: *** Unable to locate OpenCL library." 1>&2; exit 1; }
++#{ echo "configure: error: *** Unable to locate OpenCL library." 1>&2; exit 1; }
+ 
+ 
+ 
+-fi
++#fi
+ 
+ LIBS=${ac_save_libs}
+ LDFLAGS=${ac_save_ldflags}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/4748d002/attachment.html>


More information about the macports-changes mailing list