[macports-ports] branch master updated: qgis3: bunch of improvements to the Portfile

Frank Schima mf2k at macports.org
Sat Dec 2 22:34:47 UTC 2017


Hi Vince,



> On Dec 2, 2017, at 9:56 AM, Vincent <vince at macports.org> wrote:
> 
> Vincent (Veence) pushed a commit to branch master
> in repository macports-ports.
> 
> https://github.com/macports/macports-ports/commit/b44d65244a43759c525b34dfb31a8fe2174c1ac6 <https://github.com/macports/macports-ports/commit/b44d65244a43759c525b34dfb31a8fe2174c1ac6>
> The following commit(s) were added to refs/heads/master by this push:
>      new b44d652  qgis3: bunch of improvements to the Portfile
> b44d652 is described below
> 
> commit b44d65244a43759c525b34dfb31a8fe2174c1ac6
> Author: Veence <vince at macports.org>
> AuthorDate: Sat Dec 2 17:56:20 2017 +0100
> 
>     qgis3: bunch of improvements to the Portfile
> ---
>  gis/qgis3/Portfile | 163 ++++++++++++++++++++++++++++++-----------------------
>  1 file changed, 94 insertions(+), 69 deletions(-)
> 
> diff --git a/gis/qgis3/Portfile b/gis/qgis3/Portfile
> index ec992d6..e72535d 100644
> --- a/gis/qgis3/Portfile
> +++ b/gis/qgis3/Portfile
> @@ -3,7 +3,6 @@
>  PortSystem          1.0
>  PortGroup           cmake   1.0
>  PortGroup           github  1.0
> -PortGroup           active_variants 1.1
>  PortGroup           qt5     1.0
>  
>  name                qgis3
> @@ -13,20 +12,19 @@ version             2.99.20171201
>  categories          gis
>  maintainers         vince
>  description         QGIS 3 is a user-friendly GIS based on Qt 5
> -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 of its own.
> +long_description    QGIS is an open-source alternative to ArcGIS or other commercial GIS.\
> +                    It can be used as a standalone GIS, or also as frontend to other,\
> +                    less user-friendly GIS such as Grass or Saga. Also, it can be used with\
> +                    OrfeoToolBox. 
>  
>  platforms           darwin
> -license             GPL
> +license             GPL-2+
>  
>  use_parallel_build  no
>  homepage            http://www.qgis.org/
>  
> -patchfiles          patch-app_info_plist_in.diff
> -
> -#                    patch-PyQtMacros.diff
> +patchfiles          patch-app_info_plist_in.diff \
> +                    patch-CMakelists_txt.diff
>  
>  checksums           rmd160  a3d9d07479c61da4ce96e6e645eaf9a23c294c65 \
>                      sha256  61d69356a7c53b201d733c1eb6e366c13f181bc022a7429fc17e38418e07bec0
> @@ -45,109 +43,135 @@ depends_lib-append  port:libiconv \
>                      port:fcgi \
>                      port:spatialindex \
>                      port:postgis2 \
> -                    port:qtkeychain
> +                    port:qt5-qtwebkit \
> +                    port:qt5-qtscript \
> +                    port:qt5-sqlite-plugin \
> +                    port:qca-qt5 \
> +                    port:qca-qt5-ossl \
> +                    port:qtkeychain-qt5 \
> +                    port:qwt-qt5 \
> +                    port:qjson-qt5
>  
>  depends_build-append \
>                      port:bison \
> -                    port:ld64
> +                    port:ld64 \
Please remove this trailing slash

> +
>  
> -# QWT must be built with qt5 dependency
> -require_active_variants qwt61 qt5
>  
>  post-extract {
>      system -W ${worksrcpath} "mkdir build"
>  }
>  
> -
>  post-patch {
>      reinplace -E "s|@@@|${prefix}|g" \
>          ${worksrcpath}/mac/app.info.plist.in
> -#    reinplace -E "s|Clang|AppleClang|" ${worksrcpath}/CMakeLists.txt
> +
>      # Handle legacy OS/XCode
>      if {[vercmp $xcodeversion 4.6.3] <= 0} {
>          configure.compiler  llvm-gcc-4.2
>      }
>  }
>  
> -
> -# Python related stuff
> -
> +# Plug-ins
>  configure.args-append  "-DWITH_GRASS=OFF"
>  configure.args-append  "-DWITH_GRASS7=OFF"
> -configure.args-append  "-DWITH_QWTPOLAR=FALSE"
>  #configure.args-append  "--trace"
>  
>  
> -set py_ver              3.6
> -set Py_FRM              ${frameworks_dir}/Python.framework/Versions/${py_ver}
> -
>  configure.ldflags       "-Wl,-rpath,${prefix}/libexec/qt5/lib"
>  configure.args-append   "-DWITH_3D=ON"
>  configure.args-append   "-DWITH_GLOBE=OFF"
>  configure.args-append   "-DLIBZIP_CONF_INCLUDE_DIR=${prefix}/lib/pkgconfig"
> -configure.args-append   "-DPYTHON_EXECUTABLE=${prefix}/bin/python${py_ver}"
>  configure.args-append   "-DWITH_BINDINGS=FALSE"
>  configure.args-append   "-DQCA_INCLUDE_DIR=${prefix}/libexec/qt5/include/QtCrypto"
>  configure.args-append   "-DQCA_LIBRARY=${prefix}/libexec/qt5/lib/libqca-qt5.dylib"
>  configure.args-append   "-DQSCINTILLA_INCLUDE_DIR=${prefix}/libexec/qt5/include"
>  configure.args-append   "-DQSCINTILLA_LIBRARY=${prefix}/libexec/qt5/lib/libqscintilla2_qt5.dylib"
> -configure.args-append   "-DQWT_LIBRARY=${prefix}/libexec/qt5/lib/libqwt.dylib"
> -configure.args-append   "-DQWT_INCLUDE_DIR=${prefix}/libexec/qt5/lib/qwt.framework/Versions/6/Headers"
> +configure.args-append   "-DQWT_LIBRARY=${prefix}/libexec/qt5/lib/qwt.framework/Versions/Current/qwt"
> +configure.args-append   "-DQWT_INCLUDE_DIR=${prefix}/libexec/qt5/lib/qwt.framework/Versions/Current/Headers"
> +configure.args-append   "-DWITH_QWTPOLAR=ON"
>  configure.args-append   "-DQT_LRELEASE_EXECUTABLE=${prefix}/libexec/qt5/bin/lrelease"
> -# Server does not build
> +
> +# Server does not build so far
>  configure.args-append   "-DWITH_SERVER=FALSE"
>  
>      
> -depends_lib-append      port:python36 \
> -                        port:py36-pyqt5 \
> -                        port:py36-qscintilla-qt5 \
> -                        port:py36-six \
> -                        port:qt5-qtwebkit \
> -                        port:qt5-qtscript \
> -                        port:qt5-sqlite-plugin \
> -                        port:qca-qt5 \
> -                        port:qca-qt5-ossl \
> -                        port:py36-gdal \
> -                        port:qwt61 \
> -                        port:qjson-qt5
> +# Database variants (from the GDAL port)
> +set postgresql_suffixes {10 95 96}
>  
> -depends_build-append    port:py36-sip
> +set portsgresql_variants {}
> +foreach suffix ${postgresql_suffixes} {
> +    lappend portsgresql_variants postgresql${suffix}
> +}
>  
> +foreach suffix ${postgresql_suffixes} {
> +    set variant postgresql${suffix}
> +    set pgversion [string index ${suffix} 0].[string index ${suffix} 1]
> +    set index [lsearch -exact ${portsgresql_variants} ${variant}]
> +    set conflicts [lreplace ${portsgresql_variants} ${index} ${index}]
> +
> +    variant ${variant} description "Use PostgreSQL ${pgversion}" conflicts {*}${conflicts} "
> +        depends_lib-append      port:${variant}
> +        configure.args-append   \
> +            -DPOSTGRES_CONFIG=${prefix}/lib/${variant}/bin/pg_config
> +    "
> +}
>  
> -depends_run-append      port:py36-psycopg2 \
> -                        port:py36-requests
> +# postgresql default
> +set pgdefault "if {"
>  
> +foreach suffix ${postgresql_suffixes} {
> +    set pgdefault "${pgdefault}!\[variant_isset postgresql${suffix}\] && "
> +}
>  
> -# Database variants (from the GDAL port)
> -set postgresql_suffixes {95 96 10}
> +set pgdefault [string range ${pgdefault} 0 end-4]
> +set pgdefault "${pgdefault}} { default_variants +postgresql10 }"
>  
> -set portsgresql_variants {}
> -foreach s ${postgresql_suffixes} {
> -    lappend portsgresql_variants postgresql${s}
> +eval ${pgdefault}
> +
> +# Python variants
> +set python_suffixes {34 35 36}
> +set python_variants {}
> +
> +foreach pyver ${python_suffixes} {
> +    lappend python_variants python${pyver}
>  }
>  
> -foreach s ${postgresql_suffixes} {
> -    set p postgresql${s}
> -    set v [string index ${s} 0].[string index ${s} 1]
> -    set i [lsearch -exact ${portsgresql_variants} ${p}]
> -    set c [lreplace ${portsgresql_variants} ${i} ${i}]
> -    eval [subst {
> -        variant ${p} description "Enable PostgreSQL ${v} support" conflicts ${c} {
> -            depends_lib-append      port:${p}
> -            configure.args-append   \
> -                    "-DPOSTGRES_CONFIG=${prefix}/lib/${p}/bin/pg_config"
> -        }
> -    }]
> +foreach pyver ${python_suffixes} {
> +    set variant python${pyver}
> +    set pyversion [string index ${pyver} 0].[string index ${pyver} 1]
> +    set index [lsearch -exact ${python_variants} ${variant}]
> +    set conflicts [lreplace ${python_variants} ${index} ${index}]
> +
> +        variant ${variant} description "Use Python ${pyversion}" conflicts {*}${conflicts} "
> +            depends_lib-append      port:python${pyver} \
> +                                    port:py${pyver}-pyqt5 \
> +                                    port:py${pyver}-qscintilla-qt5 \
> +                                    port:py${pyver}-gdal \
> +                                    port:py${pyver}-six
> +
> +            depends_build-append    port:py${pyver}-sip
> +
> +            depends_run-append      port:py${pyver}-psycopg2 \
> +                                    port:py${pyver}-requests
> +
> +            configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python${pyversion}
> +        "
>  }
>  
> -# postgresql default
> -set pgd "if {"
> -foreach s ${postgresql_suffixes} {
> -    set pgd "${pgd}!\[variant_isset postgresql${s}\] && "
> +# Python default
> +set python_default "if {"
> +
> +foreach pyver ${python_suffixes} {
> +    set python_default "${python_default}!\[variant_isset python${pyver}\] && "
>  }
> -set pgd [string range ${pgd} 0 end-4]
> -set pgd "${pgd}} { default_variants +postgresql10 }"
> -eval ${pgd}
> +
> +set python_default [string range ${python_default} 0 end-4]
> +set python_default "${python_default}} { default_variants +python36 }"
> +
> +eval ${python_default}
> +
> +# Other variants
>  
>  variant grass               description "Build Grass 7 plugin" {
>  
> @@ -158,6 +182,8 @@ variant grass               description "Build Grass 7 plugin" {
>                  "-DGRASS_PREFIX7=${prefix}/share/grass-7.2.2"
>  }
>  
> +# Configure steps
> +
>  configure.dir               ${worksrcpath}/build
>  configure.cmd               cmake ..
>  
> @@ -176,17 +202,16 @@ 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  \
> -        "-DSPATIALINDEX_LIBRARY=${prefix}/lib/libspatialindex.dylib"
> +configure.args-append  "-DSPATIALINDEX_LIBRARY=${prefix}/lib/libspatialindex.dylib"
>  #configure.args-append  "-DCMAKE_BUILD_TYPE=DEBUG"
>  configure.args-append  "-DCMAKE_BUILD_TYPE=RELEASE"
>  
>  post-destroot {
>      # qgis_bench app doesn’t link properly. Who uses this anyway????
> -    system -W ${destroot}/Applications/MacPorts/QGIS.app/Contents/MacOS/bin "rm -rf qgis_bench.app"
> +    system -W ${destroot}/Applications/MacPorts/Qgis3.app/Contents/MacOS/bin "rm -rf qgis_bench.app"
> +    # system -W ${destroot}/Applications/MacPorts "mv QGIS.app QGIS3.app"
>  }
>  
> -
>  use_parallel_build          yes
>  build.dir                   ${worksrcpath}/build
>  destroot.target             install
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20171202/dab0b566/attachment-0001.html>


More information about the macports-dev mailing list