[67606] trunk/dports/gis/qgis
vince at macports.org
vince at macports.org
Fri May 14 03:02:56 PDT 2010
Revision: 67606
http://trac.macports.org/changeset/67606
Author: vince at macports.org
Date: 2010-05-14 03:02:53 -0700 (Fri, 14 May 2010)
Log Message:
-----------
Correction of some bugs, it works fine now
Modified Paths:
--------------
trunk/dports/gis/qgis/Portfile
Added Paths:
-----------
trunk/dports/gis/qgis/files/patch-cmake_Python_cmake.diff
trunk/dports/gis/qgis/files/patch-python_configure_py_in.diff
Modified: trunk/dports/gis/qgis/Portfile
===================================================================
--- trunk/dports/gis/qgis/Portfile 2010-05-14 08:47:53 UTC (rev 67605)
+++ trunk/dports/gis/qgis/Portfile 2010-05-14 10:02:53 UTC (rev 67606)
@@ -1,86 +1,85 @@
-# -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2
+# -*- 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
+PortSystem 1.0
+PortGroup cmake 1.0
+name qgis
+version 1.4.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.3.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/
-homepage http://www.qgis.org/
+distname ${name}_${version}
+master_sites http://download.osgeo.org/qgis/src/
-distname ${name}_${version}
-master_sites http://download.osgeo.org/qgis/src/
+checksums md5 47710e7aa14c2a672c7f28457b0c956f \
+ sha1 105f353f36e9625d1eb15f1a315882f214dbe026 \
+ rmd160 47486732c8fe37aa6864d09c7420be22de5ea802
-checksums md5 c75d0912011fe41a4e4a316ea323f73a \
- sha1 6c2f4cf5db8d5b513306465bfd160bdfa9a727af \
- rmd160 c2ffd90468b7f9cd49d2ba878a6572e8f19e137a
+worksrcdir ${name}-${version}
-worksrcdir ${name}-${version}
-
-post-extract {
- system "cd ${worksrcpath} && mkdir build"
+post-extract {
+ system "cd ${worksrcpath} && mkdir build"
}
-patchfiles patch-spatialite_c.diff
+patchfiles patch-spatialite_c.diff \
+ patch-cmake_Python_cmake.diff \
+ patch-python_configure_py_in.diff
-depends_build port:cmake
+depends_build port:cmake
-depends_lib port:libiconv \
- port:expat \
- port:openssl \
- port:proj \
- port:geos \
- port:gdal \
- port:sqlite3 \
- port:gsl
+depends_lib port:libiconv \
+ port:expat \
+ port:openssl \
+ port:proj \
+ port:geos \
+ port:gdal \
+ port:sqlite3 \
+ port:gsl
# Python related stuff
# Checks if Python framework is not buggy
-set Python_FRM "${frameworks_dir}/Python.framework"
- if {! [file exists ${Python_FRM}]} {
- ui_error "Qgis requires python"
- }
+set Python_FRM "${frameworks_dir}/Python.framework"
+if {![file exists ${Python_FRM}]} {
+ ui_error "Qgis requires python"
+}
-set Pyver [exec python -V |& awk "{print \$2}"]
+set Pyver [exec python -V |& awk "{print \$2}"]
+
# Eliminates minor (could also be done with strsed)
-set Pyversion [join [lrange [split ${Pyver} "."] 0 1] ""]
-set Pyverpath [join [lrange [split ${Pyver} "."] 0 1] "."]
+set Pyversion [join [lrange [split ${Pyver} "."] 0 1] ""]
+set Pyverpath [join [lrange [split ${Pyver} "."] 0 1] "."]
-depends_lib-append port:py${Pyversion}-pyqt4
+depends_lib-append port:py${Pyversion}-pyqt4
+# Overrides default
+configure.dir ${worksrcpath}/build
+configure.cmd cmake ..
-configure.dir ${worksrcpath}/build
-configure.cmd cmake ..
-
-# Start with no configure arguments: override defaults
-configure.pre_args
-configure.args
-configure.universal_args
-
-
-variant postgis description "Build postgis support" {
+variant postgis description "Build postgis support" {
+
depends_lib-append port:postgis
# Always choose latest installed postgresql version
- set PGSQL_DIR \
- [lindex [lsort -dec [glob -d ${prefix}/lib postgresql*]] 0]
- configure.args-append "-DPOSTGRESQL_PREFIX=${PGSQL_DIR}"
+ set PGSQL_DIR \
+ [lindex [lsort -dec [glob -d ${prefix}/lib postgresql*]] 0]
+ configure.args-append "-DPOSTGRESQL_PREFIX=${PGSQL_DIR}"
configure.args-append "-DPOSTGRES_CONFIG=${PGSQL_DIR}/bin/pg_config"
}
-variant grass63 description "Build the grass (6.3) plugin" {
+variant grass63 description "Build the grass (6.3) plugin" {
depends_lib-append port:grass
@@ -93,7 +92,7 @@
}
-variant grass64 description "Build the grass (6.4) plugin" {
+variant grass64 description "Build the grass (6.4) plugin" {
depends_lib-append port:grass64
@@ -105,27 +104,15 @@
}
}
-
-variant universal description "Builds universal app" {
- set archs "-DCMAKE_OSX_ARCHITECTURES=\""
-
- foreach arch ${configure.universal_archs} {
- append archs ${arch} ";"
- }
- configure.args-append "${archs}\""
- set sysroot [lindex [exec ls /Developer/SDKs] end]
- configure.args-append "-DCMAKE_OSX_SYSROOT=/Developer/SDKs/${sysroot}"
-}
-
# LLVM cannot be used (Seg. faults in spatialite.c)
-if {[string first llvm ${configure.cc}] != -1 || \
- [string first llvm ${configure.cxx}] != -1} {
+#if {[string first llvm ${configure.cc}] != -1 || \
+# [string first llvm ${configure.cxx}] != -1} {
- ui_msg "Warning: Qgis cannot be compiled with LLVM, switching to GCC\n"
- set configure.cc gcc
- set configure.cxx g++
-}
+# ui_msg "Warning: Qgis cannot be compiled with LLVM, switching to GCC\n"
+# set configure.cc gcc
+# set configure.cxx g++
+#}
configure.args-append "-DCMAKE_CXX_COMPILER=${configure.cxx}"
configure.args-append "-DCMAKE_C_COMPILER=${configure.cc}"
@@ -150,7 +137,7 @@
configure.args-append "-DPYUIC4_PROGRAM=${prefix}/bin/pyuic4-${Pyverpath}"
configure.args-append "-DPYRCC4_PROGRAM=${prefix}/bin/pyrcc4-${Pyverpath}"
configure.args-append \
- "-DSIP_BINARY_PATH=${Python_FRM}/Versions/${Pyverpath}/bin/sip"
+ "-DSIP_BINARY_PATH=${Python_FRM}/Versions/${Pyverpath}/bin/sip"
configure.args-append "-DSIP_INCLUDE_DIR=${Python_FRM}/Headers"
configure.args-append "-DQT_QMAKE_EXECUTABLE=${prefix}/bin/qmake-mac"
configure.args-append "-DCMAKE_BUILD_TYPE=Release"
@@ -160,53 +147,46 @@
# Patch for proper linking of our own Python framework
post-configure {
- reinplace -E "s|g\\+\\+|g\\+\\+ -F${frameworks_dir}|" \
+ reinplace -E "s|(g\\+\\+\[^ ]+)|\\1 -F${frameworks_dir}|" \
${worksrcpath}/build/src/python/CMakeFiles/qgispython.dir/link.txt
-
-# Adapts for new Sip 4.6
- reinplace -E \
- "s|sipClass(_\[^,\]+)|(sipWrapperType *) sipTypeAsPyTypeObject\
- (sipType\\1)|" \
- ${worksrcpath}/python/core/conversions.sip
}
# Setup Python stuff in order to gracefully link against -framework Python
pre-build {
if {! [file exists ${Python_FRM}/Headers]} {
- ui_msg "Patching (temporarily) the Python framework\
- (See http://trac.macports.org/ticket/21614)"
+ ui_msg "Patching (temporarily) the Python framework\
+ (See http://trac.macports.org/ticket/21614)"
if {[variant_isset universal] && ${Pyversion} < 26} {
- ui_error "Universal build requires Python > 2.5"
+ ui_error "Universal build requires Python > 2.5"
}
- system "cd ${Python_FRM} ; \
- ln -s Versions/${Pyverpath}/include/python${Pyverpath} Headers ; \
- ln -s Versions/${Pyverpath}/Python . ; \
- ln -s Versions/${Pyverpath}/Resources . ; \
- touch /private/tmp/qgis_pypatch"
+ system "cd ${Python_FRM} ; \
+ ln -s Versions/${Pyverpath}/include/python${Pyverpath} Headers ; \
+ ln -s Versions/${Pyverpath}/Python . ; \
+ ln -s Versions/${Pyverpath}/Resources . ; \
+ touch /private/tmp/qgis_pypatch"
} else {
# Checks for inconsistencies and set dependencies accordingly
- if {${Pyver} != [exec cat ${Python_FRM}/Headers/patchlevel.h | \
- grep "PY_VERSION " | awk "{print \$3}" | \
- sed "s/\\\"//g"]} {
- ui_error "Inconsistent Python framework installation."
+ if {${Pyver} != [exec cat ${Python_FRM}/Headers/patchlevel.h | \
+ grep "PY_VERSION " | awk "{print \$3}" | \
+ sed "s/\\\"//g"]} {
+ ui_error "Inconsistent Python framework installation."
}
}
-
}
use_parallel_build yes
-build.dir ${worksrcpath}/build
+build.dir ${worksrcpath}/build
post-destroot {
if {[file exists /private/tmp/qgis_pypatch]} {
- ui_msg "Removing patched Framework"
- system "cd ${Python_FRM} ; \
- rm -f Headers Python Resources ; \
- rm -f /private/tmp/qgis_pypatch"
+ ui_msg "Removing patched Framework"
+ system "cd ${Python_FRM} ; \
+ rm -f Headers Python Resources ; \
+ rm -f /private/tmp/qgis_pypatch"
}
}
-destroot.target install
+destroot.target install
Added: trunk/dports/gis/qgis/files/patch-cmake_Python_cmake.diff
===================================================================
--- trunk/dports/gis/qgis/files/patch-cmake_Python_cmake.diff (rev 0)
+++ trunk/dports/gis/qgis/files/patch-cmake_Python_cmake.diff 2010-05-14 10:02:53 UTC (rev 67606)
@@ -0,0 +1,11 @@
+--- cmake/Python.cmake.orig 2010-05-13 21:47:51.000000000 +0200
++++ cmake/Python.cmake 2010-05-13 21:48:13.000000000 +0200
+@@ -148,7 +148,7 @@
+ IF (HAVE_SIP_MODULE AND SIP_BINARY_PATH AND SIP_INCLUDE_DIR)
+ # check for SIP version
+ # minimal version is 4.7 (to support universal builds)
+- SET (SIP_MIN_VERSION 040700)
++ SET (SIP_MIN_VERSION 040A00)
+ TRY_RUN_PYTHON (RES "import sip\nprint '%x' % sip.SIP_VERSION" SIP_VERSION)
+ IF (SIP_VERSION EQUAL "${SIP_MIN_VERSION}" OR SIP_VERSION GREATER "${SIP_MIN_VERSION}")
+ SET (SIP_IS_GOOD TRUE)
Added: trunk/dports/gis/qgis/files/patch-python_configure_py_in.diff
===================================================================
--- trunk/dports/gis/qgis/files/patch-python_configure_py_in.diff (rev 0)
+++ trunk/dports/gis/qgis/files/patch-python_configure_py_in.diff 2010-05-14 10:02:53 UTC (rev 67606)
@@ -0,0 +1,11 @@
+--- python/configure.py.in.orig 2010-05-14 09:46:39.000000000 +0200
++++ python/configure.py.in 2010-05-14 09:47:13.000000000 +0200
+@@ -146,7 +146,7 @@
+
+ # common settings for core, gui and analysis libs
+ for mk in [ makefile_core, makefile_gui, makefile_analysis ]:
+- mk.extra_lflags.extend( "@CMAKE_MODULE_LINKER_FLAGS@".strip(' ').split(' ') )
++# mk.extra_lflags.extend( "@CMAKE_MODULE_LINKER_FLAGS@".strip(' ').split(' ') )
+ mk.extra_libs = ["qgis_core"]
+ mk.extra_lib_dirs = [build_path+"/src/core"+intdir]
+ mk.extra_include_dirs = [src_path+"/src/core", src_path+"/src/core/composer",
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100514/b402265d/attachment-0001.html>
More information about the macports-changes
mailing list