# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 name postgis2 categories databases gis license GPL-2+ version 2.5.5 epoch 1 revision 11 platforms darwin maintainers {vince @Veence} openmaintainer description PostGIS is the spatial extension to the\ PostGreSQL database. long_description PostGIS 2 adds geometrical, geographical and topological\ types, and functions operating thereon, to the PostGreSQL\ database. The 2.0 release also provides raster handling\ and basic 3D geometry capacities (TIN and polyhedra). homepage http://postgis.refractions.net/ master_sites http://download.osgeo.org/postgis/source distname postgis-${version} checksums rmd160 958675896a106197f1434f3389644be0084df060 \ sha256 1217a0212aaa143e44831849d1845b198f248923d7e96634219d3369a6ec8714 \ size 15936193 depends_build port:autoconf \ port:automake \ port:libtool \ port:libxslt depends_lib port:geos\ port:proj6\ port:libiconv\ port:libxml2\ port:json-c # PostGIS 2.0 is not compatible with PostGIS 1.5 conflicts postgis # Neither is PostGIS 2.0 compatible with PostGreSQL 8 # Database variants (from the GDAL port) set postgresql_suffixes {12 11 10 93 94 95 96} set postgresql_variants {} foreach suffix ${postgresql_suffixes} { lappend postgresql_variants postgresql${suffix} } foreach suffix ${postgresql_suffixes} { set vrt postgresql${suffix} set pgversion [string index ${suffix} 0].[string index ${suffix} 1] set index [lsearch -exact ${postgresql_variants} ${vrt}] set conf [lreplace ${postgresql_variants} ${index} ${index}] variant ${vrt} \ conflicts ${conf} \ description "Use PostgreSQL ${pgversion}" \ " depends_lib-append port:${vrt} configure.args-append --libdir=${prefix}/lib/${vrt} \ --with-pgconfig=${prefix}/lib/${vrt}/bin/pg_config build.args-append \ PGSQL_DOCDIR=${destroot}${prefix}/share/doc/${vrt} \ PGSQL_MANDIR=${destroot}${prefix}/share/man " } # postgresql default set pgdefault "if {" foreach suffix ${postgresql_suffixes} { set pgdefault "${pgdefault}!\[variant_isset postgresql${suffix}\] && " } set pgdefault [string range ${pgdefault} 0 end-4] set pgdefault "${pgdefault}} { default_variants +postgresql12 }" eval ${pgdefault} variant raster description {Build raster support} { depends_lib-append port:gdal configure.args-append --with-raster } variant topology description {Build topology support} { configure.args-append --with-topology } variant sfcgal description {Uses SFCGAL for 3D queries} { depends_lib-append port:sfcgal configure.args-append --with-sfcgal=${prefix}/bin/sfcgal-config } variant gui description {Build the GUI import tool} { depends_lib-append path:lib/pkgconfig/gtk+-2.0.pc:gtk2 configure.args-append --with-gui } configure.args-append --with-projdir=${prefix}/lib/proj6 variant proj7 description {Builds with PROJ7 instead of PROJ6} { depends_lib-delete port:proj6 depends_lib-append port:proj7 configure.args-delete --with-projdir=${prefix}/lib/proj6 configure.args-append --with-projdir=${prefix}/lib/proj7 } variant comments description {Build comments -- ! broken } { ui_warn "The comments variant is currently broken. Use at your own risk." depends_build-append port:docbook-xsl-nons \ port:libxslt \ port:ImageMagick configure.args-append --datadir=${prefix}/share/${name} \ --with-xsldir=${prefix}/share/xsl/docbook-xsl-nons \ --with-json \ --with-jsondir=${prefix}/lib build.target-append comments destroot.target-append docs-install comments-install } default_variants +raster +topology # Port phases configure.cflags-append \ -Diconv=libiconv -Diconv_open=libiconv_open -Diconv_close=libiconv_close # see https://trac.macports.org/wiki/UsingTheRightCompiler configure.env-append CPPBIN=${configure.cpp} post-configure { if {[variant_exists universal] && [variant_isset universal]} { # We must add universal flags to compile liblwgeom properly file copy ${filespath}/ed_command ${worksrcpath}/ed_command reinplace -E "s#XXX#${configure.universal_cflags}#" \ ${worksrcpath}/ed_command system -W ${worksrcpath}/liblwgeom \ "ed Makefile < ${worksrcpath}/ed_command" } } build.args ICONV_LDFLAGS='-L${prefix}/lib -liconv' use_parallel_build no livecheck.type regex livecheck.url ${master_sites} livecheck.regex {postgis2?-(\d+(?:\.\d+)*)\.[tz]}