[42393] trunk/dports/gis

macsforever2000 at macports.org macsforever2000 at macports.org
Thu Nov 20 09:04:08 PST 2008


Revision: 42393
          http://trac.macports.org/changeset/42393
Author:   macsforever2000 at macports.org
Date:     2008-11-20 09:04:07 -0800 (Thu, 20 Nov 2008)
Log Message:
-----------
Added new grass port. (#16238)

Added Paths:
-----------
    trunk/dports/gis/grass/
    trunk/dports/gis/grass/Portfile
    trunk/dports/gis/grass/files/
    trunk/dports/gis/grass/files/patch-Makefile.diff
    trunk/dports/gis/grass/files/patch-configure.diff
    trunk/dports/gis/grass/files/patch-macosx_Makefile.diff

Added: trunk/dports/gis/grass/Portfile
===================================================================
--- trunk/dports/gis/grass/Portfile	                        (rev 0)
+++ trunk/dports/gis/grass/Portfile	2008-11-20 17:04:07 UTC (rev 42393)
@@ -0,0 +1,116 @@
+# $Id$
+
+PortSystem 1.0
+
+name              grass
+version           6.3.0
+maintainers       nomaintainer
+categories        gis
+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      http://grass.osgeo.org/grass63/source/
+
+checksums         md5 7dce50a076e2481733148ba34cbebc07
+
+depends_lib       port:fftw \
+                  port:freetype \
+                  port:gdal \
+                  port:geos \
+                  port:jpeg \
+                  port:libpng \
+                  port:openmotif \
+                  port:proj \
+                  port:tk
+
+use_parallel_build yes
+
+# Can be removed once MacPorts 1.7 is released
+if {![info exists applications_dir]} {
+    set applications_dir /Applications/MacPorts
+}
+
+patchfiles \
+    patch-Makefile.diff \
+    patch-configure.diff \
+    patch-macosx_Makefile.diff
+
+post-patch {
+   reinplace "s|@@APPLICATIONS_DIR@@|${applications_dir}|" \
+      ${worksrcpath}/configure
+}
+
+configure.ldflags -framework OpenGL
+configure.args \
+    --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-jpeg-includes=${prefix}/include \
+    --with-jpeg-libs=${prefix}/lib \
+    --with-motif \
+    --with-motif-includes=${prefix}/include \
+    --with-motif-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-tcltk-includes=${prefix}/include \
+    --with-tcltk-libs=${prefix}/lib \
+    --with-cxx \
+    --with-x \
+    --without-postgres \
+    --enable-largefile
+#    --enable-macosx-app
+
+#--with-glw \
+#--with-glw-includes=/Developer/SDKs/MacOSX10.5.sdk/usr/X11/include \
+#--with-glw-libs=/Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib
+#-Wl,-dylib_file,/Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libGLw.dylib:\
+#                /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libGLw.dylib
+
+platform darwin 9 {
+configure.ldflags-append \
+    -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\
+    /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
+}
+build.target    default
+
+# Can be removed once MacPorts 1.7.0 is released
+if {![info exists applications_dir]} {
+    set applications_dir /Applications/MacPorts
+}
+
+# installs into /opt/local/grass-6.3.0
+#destroot.violate_mtree  yes
+
+variant mysql5 description "Install grass with mysql 5 support" {
+    depends_lib-append    port: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 postgresql83 description "Install grass with postgresql 8.3 support" {
+    depends_lib-append    port:postgresql83
+    configure.args-delete --without-postgres
+    configure.args-append --with-postgres
+    configure.args-append --with-postgres-includes=${prefix}/include/postgresql83
+    configure.args-append --with-postgres-libs=${prefix}/lib/postgresql83
+}
+
+variant sqlite3 description "Install grass with 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
+}
+


Property changes on: trunk/dports/gis/grass/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/gis/grass/files/patch-Makefile.diff
===================================================================
--- trunk/dports/gis/grass/files/patch-Makefile.diff	                        (rev 0)
+++ trunk/dports/gis/grass/files/patch-Makefile.diff	2008-11-20 17:04:07 UTC (rev 42393)
@@ -0,0 +1,40 @@
+--- Makefile.orig	2008-03-21 07:22:26.000000000 -0600
++++ Makefile	2008-11-17 00:38:11.000000000 -0700
+@@ -24,7 +24,7 @@
+ 
+ # Install directories
+ exec_prefix=            ${prefix}
+-BINDIR=			${UNIX_BIN}
++BINDIR=			${DESTDIR}${UNIX_BIN}
+ 
+ # Shell commands
+ MAKE_DIR_CMD=		mkdir -p -m 755
+@@ -32,7 +32,8 @@
+ # Extra commands
+ HTML2PDF=		htmldoc --footer d.1
+ GRASS_PDFDIR=		$(GISBASE)/docs/pdf
+-
++FINAL_GISBASE:=${INST_DIR}
++INST_DIR:=${DESTDIR}${INST_DIR}
+ 
+ DIRS = \
+ 	lib \
+@@ -250,7 +251,7 @@
+ 	test -d ${INST_DIR} || ${MAKE_DIR_CMD} ${INST_DIR}
+ 	@##### test -d ${INST_DIR}/dev || ${MAKE_DIR_CMD} ${INST_DIR}/dev
+ 	test -d ${BINDIR} || ${MAKE_DIR_CMD} ${BINDIR}
+-	-sed -e "s#^GISBASE.*#GISBASE=${INST_DIR}#" ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} > ${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
++	-sed -e "s#^GISBASE.*#GISBASE=${FINAL_GISBASE}#" ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} > ${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
+ 	-chmod a+x ${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
+ ifneq ($(strip $(MINGW)),)
+ 	-sed -e "s#WINGISBASE=.*#WINGISBASE=${INST_DIR}#" ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.bat > ${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.bat
+@@ -281,9 +282,6 @@
+ 	@#GEM installation
+ 	-tar cBf - gem/skeleton | (cd ${INST_DIR}/etc ; tar xBf - ) 2>/dev/null
+ 	-${INSTALL} gem/gem6 ${BINDIR} 2>/dev/null
+-	@# enable OSX Help Viewer
+-	@if [ "`cat include/Make/Platform.make | grep -i '^ARCH.*darwin'`" ] ; then /bin/ln -sfh "${INST_DIR}/docs/html" /Library/Documentation/Help/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR} ; fi
+-
+ 
+ install-strip: FORCE
+ 	${MAKE} strip

Added: trunk/dports/gis/grass/files/patch-configure.diff
===================================================================
--- trunk/dports/gis/grass/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/gis/grass/files/patch-configure.diff	2008-11-20 17:04:07 UTC (rev 42393)
@@ -0,0 +1,14 @@
+--- configure.orig	2008-03-26 09:04:27.000000000 -0600
++++ configure	2008-11-16 22:26:19.000000000 -0700
+@@ -1279,9 +1279,9 @@
+ # Set INST_DIR
+ 
+ if test -n "$MACOSX_APP" ; then
+-    INSTDIR='${prefix}'"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"
++    INSTDIR='@@APPLICATIONS_DIR@@'"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"
+ else
+-    INSTDIR='${prefix}'"/grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}"
++    INSTDIR='${prefix}'"/share/grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}"
+ fi
+ 
+ 

Added: trunk/dports/gis/grass/files/patch-macosx_Makefile.diff
===================================================================
--- trunk/dports/gis/grass/files/patch-macosx_Makefile.diff	                        (rev 0)
+++ trunk/dports/gis/grass/files/patch-macosx_Makefile.diff	2008-11-20 17:04:07 UTC (rev 42393)
@@ -0,0 +1,11 @@
+--- macosx/Makefile.orig	2008-03-26 09:04:27.000000000 -0600
++++ macosx/Makefile	2008-11-17 00:47:44.000000000 -0700
+@@ -32,6 +32,8 @@
+ 
+ include $(MODULE_TOPDIR)/include/Make/Dir.make
+ 
++INST_DIR:=${DESTDIR}${INST_DIR}
++
+ default: subdirs
+ 
+ install-macosx:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081120/f386b6d3/attachment.html>


More information about the macports-changes mailing list