[99886] trunk/dports/gis/qgis/Portfile

vince at macports.org vince at macports.org
Tue Nov 20 11:36:52 PST 2012


Revision: 99886
          https://trac.macports.org/changeset/99886
Author:   vince at macports.org
Date:     2012-11-20 11:36:52 -0800 (Tue, 20 Nov 2012)
Log Message:
-----------
Corrects checks for postgresql 9.2 and convert to standard spaces.

Modified Paths:
--------------
    trunk/dports/gis/qgis/Portfile

Modified: trunk/dports/gis/qgis/Portfile
===================================================================
--- trunk/dports/gis/qgis/Portfile	2012-11-20 19:15:08 UTC (rev 99885)
+++ trunk/dports/gis/qgis/Portfile	2012-11-20 19:36:52 UTC (rev 99886)
@@ -1,242 +1,244 @@
 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
 # $Id$
 
-PortSystem			1.0
-PortGroup			cmake	1.0
+PortSystem          1.0
+PortGroup           cmake   1.0
 PortGroup           qt4     1.0
 
-name				qgis
-version				1.8.0
-categories			gis
-maintainers			vince
-description			QGIS is a user-friendly GIS based on Qt 4
-long_description	QGIS is a GIS. It can visualize, inject data into \
-					PostGres/PostGIS, or serve as a Qt front-end to Grass. \
-					Extended with Python plugins, it can become a quite \
-					powerful GIS on its own.
+name                qgis
+version             1.8.0
+categories          gis
+maintainers         vince
+description         QGIS is a user-friendly GIS based on Qt 4
+long_description    QGIS is a GIS. It can visualize, inject data into \
+                    PostGres/PostGIS, or serve as a Qt front-end to \
+                    Grass. Extended with Python plugins, it can become \
+                    a quite powerful GIS on its own.
 
-platforms			darwin
-license				GPL
+platforms           darwin
+license             GPL
 
-use_parallel_build	no
-homepage			http://www.qgis.org/
+use_parallel_build  no
+homepage            http://www.qgis.org/
 
-distname			${name}-${version}
-master_sites		http://qgis.org/downloads/
-use_bzip2			yes
+distname            ${name}-${version}
+master_sites        http://qgis.org/downloads/
+use_bzip2           yes
 
 checksums           md5     1d60520f81d7763c026d0af887ac9a05 \
                     sha1    99c0d716acbe0dd70ad0774242d01e9251c5a130 \
                     rmd160  93138574da56fee232ba006d8d8943e16a2a9959
 
-worksrcdir			${name}-${version}
+worksrcdir          ${name}-${version}
 
-patchfiles			patch-conversions_sip.diff \
-					patch-CMakeLists_txt.diff
+patchfiles          patch-conversions_sip.diff \
+                    patch-CMakeLists_txt.diff
 
-depends_lib-append 	port:libiconv \
-					port:expat \
-					port:openssl \
-					port:proj \
-					port:geos \
-					port:gdal \
-					port:sqlite3 \
-					port:gsl \
-					port:qwt52 \
-					port:fcgi \
-					port:spatialindex
+depends_lib-append  port:libiconv \
+                    port:expat \
+                    port:openssl \
+                    port:proj \
+                    port:geos \
+                    port:gdal \
+                    port:sqlite3 \
+                    port:gsl \
+                    port:qwt52 \
+                    port:fcgi \
+                    port:spatialindex
 
-depends_build-append	port:bison \
-						port:ld64
+depends_build-append    port:bison \
+                        port:ld64
 
 post-extract {
-	system "cd ${worksrcpath} && mkdir build && mkdir Python.framework"
+    system "cd ${worksrcpath} && mkdir build && mkdir Python.framework"
 }
 
 # Overrides default
 
 if {![variant_isset postgis] && ![variant_isset postgis2]} {
-	default_variants		+postgis2
+    default_variants    +postgis2
 }
 
 if {![variant_isset python25] && ![variant_isset python26] &&
-	![variant_isset python27]} {
-	
-	default_variants		+python27
+    ![variant_isset python27]} {
+    
+    default_variants    +python27
 }
 
 if {![variant_isset postgresql90] && ![variant_isset postgresql91] && \
     ![variant_isset postgresql92]} {
-	
-	default_variants		+postgresql91
+
+    default_variants    +postgresql91
 }
 
-set Py_own_FRM	${worksrcpath}/Python.framework
+set Py_own_FRM  ${worksrcpath}/Python.framework
 
 # Python related stuff
 
-variant python25	conflicts universal python26 python27 \
-					description use Python 2.5 {	
+variant python25    conflicts universal python26 python27 \
+                    description use Python 2.5 {    
 
-	depends_lib-append		port:py25-pyqt4
-	depends_build-append	port:py25-sip
-	depends_run-append		port:py25-psycopg2 \
-							port:py25-spatialite
+    depends_lib-append      port:py25-pyqt4
+    depends_build-append    port:py25-sip
+    depends_run-append      port:py25-psycopg2 \
+                            port:py25-spatialite
 
-	
-	configure.args-append "-DPYTHON_EXECUTABLE=${prefix}/bin/python2.5"
-	configure.args-append "-DPYUIC4_PROGRAM=${prefix}/bin/pyuic4-2.5"
-	configure.args-append "-DPYRCC4_PROGRAM=${prefix}/bin/pyrcc4-2.5"
-	configure.args-append \
-				"-DSIP_BINARY_PATH=${Py_own_FRM}/Versions/2.5/bin/sip"
+    
+    configure.args-append  "-DPYTHON_EXECUTABLE=${prefix}/bin/python2.5"
+    configure.args-append  "-DPYUIC4_PROGRAM=${prefix}/bin/pyuic4-2.5"
+    configure.args-append  "-DPYRCC4_PROGRAM=${prefix}/bin/pyrcc4-2.5"
+    configure.args-append  \
+                "-DSIP_BINARY_PATH=${Py_own_FRM}/Versions/2.5/bin/sip"
 }
 
-variant python26	conflicts python25 python27 \
-					description use Python 2.6 {
-	
-	depends_lib-append		port:py26-pyqt4
-	depends_build-append	port:py26-sip
-	depends_run-append		port:py26-psycopg2 \
-							port:py26-spatialite
+variant python26    conflicts python25 python27 \
+                    description use Python 2.6 {
 
-	
-	configure.args-append "-DPYTHON_EXECUTABLE=${prefix}/bin/python2.6"
-	configure.args-append "-DPYUIC4_PROGRAM=${prefix}/bin/pyuic4-2.6"
-	configure.args-append "-DPYRCC4_PROGRAM=${prefix}/bin/pyrcc4-2.6"
-	configure.args-append \
-				"-DSIP_BINARY_PATH=${Py_own_FRM}/Versions/2.6/bin/sip"
+    depends_lib-append      port:py26-pyqt4
+    depends_build-append    port:py26-sip
+    depends_run-append      port:py26-psycopg2 \
+                            port:py26-spatialite
 
+    
+    configure.args-append  "-DPYTHON_EXECUTABLE=${prefix}/bin/python2.6"
+    configure.args-append  "-DPYUIC4_PROGRAM=${prefix}/bin/pyuic4-2.6"
+    configure.args-append  "-DPYRCC4_PROGRAM=${prefix}/bin/pyrcc4-2.6"
+    configure.args-append  \
+                "-DSIP_BINARY_PATH=${Py_own_FRM}/Versions/2.6/bin/sip"
 }
 
-variant python27 	conflicts python25 python26 \
-					description use Python 2.7 {
-					
-	depends_lib-append		port:py27-pyqt4
-	depends_build-append	port:py27-sip
-	depends_run-append		port:py27-psycopg2 \
-							port:py27-spatialite
+variant python27    conflicts python25 python26 \
+                    description use Python 2.7 {
 
-	
-	configure.args-append "-DPYTHON_EXECUTABLE=${prefix}/bin/python2.7"
-	configure.args-append "-DPYUIC4_PROGRAM=${prefix}/bin/pyuic4-2.7"
-	configure.args-append "-DPYRCC4_PROGRAM=${prefix}/bin/pyrcc4-2.7"
-	configure.args-append \
-				"-DSIP_BINARY_PATH=${Py_own_FRM}/Versions/2.7/bin/sip"
+    depends_lib-append      port:py27-pyqt4
+    depends_build-append    port:py27-sip
+    depends_run-append      port:py27-psycopg2 \
+                            port:py27-spatialite
 
+    configure.args-append  "-DPYTHON_EXECUTABLE=${prefix}/bin/python2.7"
+    configure.args-append  "-DPYUIC4_PROGRAM=${prefix}/bin/pyuic4-2.7"
+    configure.args-append  "-DPYRCC4_PROGRAM=${prefix}/bin/pyrcc4-2.7"
+    configure.args-append  \
+                "-DSIP_BINARY_PATH=${Py_own_FRM}/Versions/2.7/bin/sip"
+
 }
 
-variant postgresql90	conflicts postgresql91 postgresql92 \
-						description "Use postgresql 9.0" {
-						
-	depends_lib-append		port:postgresql90
-	set PGSQL_DIR			${prefix}/lib/postgresql90
-	configure.args-append	"-DPOSTGRES_CONFIG=${PGSQL_DIR}/bin/pg_config"
+variant postgresql90    conflicts postgresql91 postgresql92 \
+                        description "Use postgresql 9.0" {
+
+    depends_lib-append      port:postgresql90
+    set PGSQL_DIR           ${prefix}/lib/postgresql90
+    configure.args-append   \
+                "-DPOSTGRES_CONFIG=${PGSQL_DIR}/bin/pg_config"
 }
 
-variant postgresql91	conflicts postgresql90 postgresql92 \
-						description "Use postgresql 9.1" {
-						
-	depends_lib-append		port:postgresql91
-	set PGSQL_DIR			${prefix}/lib/postgresql91
-	configure.args-append	"-DPOSTGRES_CONFIG=${PGSQL_DIR}/bin/pg_config"
+variant postgresql91    conflicts postgresql90 postgresql92 \
+                        description "Use postgresql 9.1" {
+
+    depends_lib-append      port:postgresql91
+    set PGSQL_DIR           ${prefix}/lib/postgresql91
+    configure.args-append   \
+                "-DPOSTGRES_CONFIG=${PGSQL_DIR}/bin/pg_config"
 }
 
-variant postgresql92	conflicts postgresql90 postgresql91 \
-						description "Use postgresql 9.1" {
-						
-	depends_lib-append		port:postgresql92
-	set PGSQL_DIR			${prefix}/lib/postgresql92
-	configure.args-append	"-DPOSTGRES_CONFIG=${PGSQL_DIR}/bin/pg_config"
+variant postgresql92    conflicts postgresql90 postgresql91 \
+                        description "Use postgresql 9.1" {
+
+    depends_lib-append      port:postgresql92
+    set PGSQL_DIR           ${prefix}/lib/postgresql92
+    configure.args-append   \
+                "-DPOSTGRES_CONFIG=${PGSQL_DIR}/bin/pg_config"
 }
 
-variant postgis			description "Build postgis 1.x support" \
+variant postgis            description "Build postgis 1.x support" \
                         conflicts postgis2 {
-	
-	depends_lib-append		port:postgis
-	
-	if {![variant_isset postgresql90] &&
-		![variant_isset postgresql91] } {
-		return -code error "Please also select a postgresql variant"
-	}
+
+    depends_lib-append      port:postgis
+
+    if {![variant_isset postgresql90] &&
+        ![variant_isset postgresql91] && 
+        ![variant_isset postgresql92]} {
+        return -code error "Please also select a postgresql variant"
+    }
 }
 
-variant postgis2			description "Build postgis 2.x support" \
+variant postgis2            description "Build postgis 2.x support" \
                             conflicts postgis {
-	
-	depends_lib-append		port:postgis2
-	
-	if {![variant_isset postgresql90] &&
-		![variant_isset postgresql91] } {
-		return -code error "Please also select a postgresql variant"
-	}
+    
+    depends_lib-append      port:postgis2
+
+    if {![variant_isset postgresql90] &&
+        ![variant_isset postgresql91] && 
+        ![variant_isset postgresql92]} {
+        return -code error "Please also select a postgresql variant"
+    }
 }
 
-variant	grass				description "Build the grass (6.4) plugin" {
+variant grass               description "Build Grass (6.42) plugin" {
 
-	depends_lib-append		port:grass
-	configure.args-append	"-DGRASS_PREFIX=${prefix}/share/grass-6.4.2"
+    depends_lib-append      port:grass
+    configure.args-append   \
+                "-DGRASS_PREFIX=${prefix}/share/grass-6.4.2"
 }
 
-configure.dir				${worksrcpath}/build									
-configure.cmd				cmake ..
+configure.dir               ${worksrcpath}/build                                    
+configure.cmd               cmake ..
 
-configure.args-append		"-DCMAKE_CXX_COMPILER=${configure.cxx}"
-configure.args-append		"-DCMAKE_C_COMPILER=${configure.cc}"
-configure.args-append		"-DEXPAT_INCLUDE_DIR=${prefix}/include"
-configure.args-append		"-DEXPAT_LIBRARY=${prefix}/lib/libexpat.dylib"
-configure.args-append		"-DCMAKE_INSTALL_PREFIX=${applications_dir}"
-configure.args-append		"-DGDAL_CONFIG=${prefix}/bin/gdal-config"
-configure.args-append		"-DGDAL_INCLUDE_DIR=${prefix}/include"
-configure.args-append		"-DGDAL_LIBRARY=${prefix}/lib/libgdal.dylib"
-configure.args-append		"-DGEOS_CONFIG=${prefix}/bin/geos-config"
-configure.args-append		"-DGEOS_INCLUDE_DIR=${prefix}/include/geos"
-configure.args-append		"-DGEOS_LIBRARY=${prefix}/lib/libgeos_c.dylib"
-configure.args-append		"-DGSL_CONFIG=${prefix}/bin/gsl-config"
-configure.args-append		"-DPROJ_INCLUDE_DIR=${prefix}/include"
-configure.args-append		"-DPROJ_LIBRARY=${prefix}/lib/libproj.dylib"
-configure.args-append		"-DWITH_SPATIALITE:BOOL=NO"
-#configure.args-append       "-DSPATIALINDEX_INCLUDE=${prefix}/include"
-configure.args-append       "-DSPATIALINDEX_LIBRARY=${prefix}/lib/libspatialindex.dylib"
-configure.args-append		"-DPYTHON_INCLUDE_PATH=${Py_own_FRM}/Headers"
-configure.args-append       "'-DPYTHON_LIBRARY=-F${Py_own_FRM} -framework Python'"
-configure.args-append		"-DSIP_INCLUDE_DIR=${Py_own_FRM}/Headers"
-configure.args-append		"-DCMAKE_BUILD_TYPE=Release"
-configure.args-append       "-DQGIS_MACAPP_DEV_PREFIX=${frameworks_dir}"
-	
-# This is a fake but don't ask me why it is needed
-#configure.args-append		"-DSVN_MARKER=/usr/bin/svnversion"
-
+configure.args-append  "-DCMAKE_CXX_COMPILER=${configure.cxx}"
+configure.args-append  "-DCMAKE_C_COMPILER=${configure.cc}"
+configure.args-append  "-DEXPAT_INCLUDE_DIR=${prefix}/include"
+configure.args-append  "-DEXPAT_LIBRARY=${prefix}/lib/libexpat.dylib"
+configure.args-append  "-DCMAKE_INSTALL_PREFIX=${applications_dir}"
+configure.args-append  "-DGDAL_CONFIG=${prefix}/bin/gdal-config"
+configure.args-append  "-DGDAL_INCLUDE_DIR=${prefix}/include"
+configure.args-append  "-DGDAL_LIBRARY=${prefix}/lib/libgdal.dylib"
+configure.args-append  "-DGEOS_CONFIG=${prefix}/bin/geos-config"
+configure.args-append  "-DGEOS_INCLUDE_DIR=${prefix}/include/geos"
+configure.args-append  "-DGEOS_LIBRARY=${prefix}/lib/libgeos_c.dylib"
+configure.args-append  "-DGSL_CONFIG=${prefix}/bin/gsl-config"
+configure.args-append  "-DPROJ_INCLUDE_DIR=${prefix}/include"
+configure.args-append  "-DPROJ_LIBRARY=${prefix}/lib/libproj.dylib"
+configure.args-append  "-DWITH_SPATIALITE:BOOL=NO"
+configure.args-append  \
+        "-DSPATIALINDEX_LIBRARY=${prefix}/lib/libspatialindex.dylib"
+configure.args-append  "-DPYTHON_INCLUDE_PATH=${Py_own_FRM}/Headers"
+configure.args-append  \
+        "'-DPYTHON_LIBRARY=-F${Py_own_FRM} -framework Python'"
+configure.args-append  "-DSIP_INCLUDE_DIR=${Py_own_FRM}/Headers"
+configure.args-append  "-DCMAKE_BUILD_TYPE=Release"
+configure.args-append  "-DQGIS_MACAPP_DEV_PREFIX=${frameworks_dir}"
+    
 # Patch for proper linking of our own Python framework
 post-configure {
-	reinplace -E "s|(^\[^ \]*)|\\1 -F${worksrcpath}|" \
-		${worksrcpath}/build/src/python/CMakeFiles/qgispython.dir/link.txt
+    reinplace -E "s|(^\[^ \]*)|\\1 -F${worksrcpath}|" \
+      ${worksrcpath}/build/src/python/CMakeFiles/qgispython.dir/link.txt
 
+    # Setup Python stuff in order to gracefully link 
+    # against -framework Python
 
-	# Setup Python stuff in order to gracefully link 
-	# against -framework Python
+    set variantlist [split ${portvariants} "+"]
+    set Pyversion   [string replace [lindex ${variantlist} \
+                        [lsearch $variantlist "python*"]] 0 5]
+    set Pyverpath   [join [split ${Pyversion} ""] .]
 
-	set variantlist [split ${portvariants} "+"]
-	set Pyversion	[string replace [lindex ${variantlist} \
-						[lsearch $variantlist "python*"]] 0 5]
-	set Pyverpath	[join [split ${Pyversion} ""] .]
+    # Set up a fake framework in ${worksrcpath}/Python.framework
+    set Py_sys_FRM  \
+        "${frameworks_dir}/Python.framework/Versions/${Pyverpath}"
 
-	# Set up a fake framework in ${worksrcpath}/Python.framework
-	set Py_sys_FRM	"${frameworks_dir}/Python.framework/Versions/${Pyverpath}"
-
-	system \
-		"cd ${Py_own_FRM} ; \
-		 rm -f Headers Python Resources ; \
-		 ln -s ${Py_sys_FRM}/include/python${Pyverpath} Headers ; \
-		 ln -s ${Py_sys_FRM}/Python . ; \
-		 ln -s ${Py_sys_FRM}/Resources . ;"
-		 
-	# Workaround a bug in some clang version
     system \
+        "cd ${Py_own_FRM} ; \
+         rm -f Headers Python Resources ; \
+         ln -s ${Py_sys_FRM}/include/python${Pyverpath} Headers ; \
+         ln -s ${Py_sys_FRM}/Python . ; \
+         ln -s ${Py_sys_FRM}/Resources . ;"
+         
+    # Workaround a bug in some clang version
+    system \
         "cd ${worksrcpath}/build/src/crssync/CMakeFiles/crssync.dir ; \
          cat link.txt ${filespath}/patch_link_txt > link.txt.tmp ; \
          mv link.txt.tmp link.txt ;"
 }
 
-use_parallel_build			yes
-build.dir					${worksrcpath}/build
-destroot.target				install
+use_parallel_build          yes
+build.dir                   ${worksrcpath}/build
+destroot.target             install
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121120/70effe3e/attachment.html>


More information about the macports-changes mailing list