source: trunk/dports/databases/postgis2/Portfile

Last change on this file was 154239, checked in by vince@…, 14 months ago

postgis2: add postgresql96 option and remove obsolete PGsql versions

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.6 KB
RevLine 
[92462]1# -*- 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
[92833]2# $Id: Portfile 154239 2016-10-25 08:43:42Z ryandesign@macports.org $
[92462]3
4PortSystem          1.0
5
6name                postgis2
7categories          databases gis
8license             GPL
[154176]9version             2.3.0
[114183]10epoch               1
[92462]11platforms           darwin
12maintainers         vince openmaintainer
13
14description         PostGIS is the spatial extension to the\
15                    PostGreSQL database.
16
17long_description    PostGIS 2 adds geometrical, geographical and topological\
18                    types, and functions operating thereon, to the PostGreSQL\
19                    database. The 2.0 release also provides raster handling\
20                    and basic 3D geometry capacities (TIN and polyhedra).
21
22homepage            http://postgis.refractions.net/
23
[106285]24master_sites        http://download.osgeo.org/postgis/source
[100922]25distname            postgis-${version}
[92462]26
[154176]27checksums           rmd160  b93c77e9f1c8d999e2f548ba79553a8d1f09d824 \
28                    sha256  0dbff06f4a196d49e5ac06ae6cc21bd5253aaa646af624c9bbf19df582d6cf55
[92462]29
[92581]30depends_build       port:autoconf \
31                    port:automake \
[100922]32                    port:libtool \
33                    port:libxslt
[92581]34
[92462]35depends_lib         port:geos\
36                    port:proj\
37                    port:libiconv\
38                    port:libxml2
39
40# PostGIS 2.0 is not compatible with PostGIS 1.5
41
42conflicts           postgis
43
44# Neither is PostGIS 2.0 compatible with PostGreSQL 8
45
[144946]46variant postgresql95        description {Builds with postgresql 9.5} \
[154239]47                            conflicts postgresql96 {
[144946]48    depends_lib-append      port:postgresql95
49    configure.args-append   --libdir=${prefix}/lib/postgresql95\
50                            --with-pgconfig=${prefix}/lib/postgresql95/bin/pg_config
51    build.args-append       PGSQL_DOCDIR=${destroot}${prefix}/share/doc/postgresql95\
52                            PGSQL_MANDIR=${destroot}${prefix}/share/man
53}
54
[154239]55variant postgresql96        description {Builds with postgresql 9.6} \
56                            conflicts postgresql95 {
57    depends_lib-append      port:postgresql96
58    configure.args-append   --libdir=${prefix}/lib/postgresql96\
59                            --with-pgconfig=${prefix}/lib/postgresql96/bin/pg_config
60    build.args-append       PGSQL_DOCDIR=${destroot}${prefix}/share/doc/postgresql96\
61                            PGSQL_MANDIR=${destroot}${prefix}/share/man
62}
63
[92462]64variant raster              description {Build raster support} {
65
66    depends_lib-append      port:gdal
67    configure.args-append   --with-raster
68}
69
70variant topology            description {Build topology support} {
71
72    configure.args-append   --with-topology
73}
74
[112007]75variant sfcgal              description {Uses SFCGAL for 3D queries} {
76    depends_lib-append      port:sfcgal
77    configure.args-append   --with-sfcgal=${prefix}/bin/sfcgal-config
78}
79
[92462]80variant gui                 description {Build the GUI import tool} {
81
82    depends_lib-append      port:gtk2
83    configure.args-append   --with-gui
84}
85
86variant comments            description {Build comments -- ! broken } {
87
[92579]88    ui_warn "The comments variant is currently broken. Use at your own risk."
[92462]89   
[92579]90    depends_build-append    port:docbook-xsl \
[92462]91                            port:libxslt \
92                            port:ImageMagick
93   
[92579]94    configure.args-append   --datadir=${prefix}/share/${name} \
[92462]95                            --with-projdir=${prefix} \
96                            --with-xsldir=${prefix}/share/xsl/docbook-xsl
97
98    build.target-append     comments
99    destroot.target-append  docs-install comments-install
100}
101
102default_variants            +raster +topology
103
[154239]104if {![variant_isset postgresql95] && ![variant_isset postgresql96]} {
[150779]105    default_variants        +postgresql95
[92462]106}
107
108# Port phases
109
110configure.cflags-append \
[142740]111    -Diconv=libiconv -Diconv_open=libiconv_open -Diconv_close=libiconv_close
[92462]112
[121330]113# JSON-C new version is incompatible with this version of PostGIS
114configure.args-append   -without-json
115
[92462]116post-configure {
117    if {[variant_isset universal]} {
118        # We must add universal flags to compile liblwgeom properly
119        file copy ${filespath}/ed_command ${worksrcpath}/ed_command
120        reinplace -E "s#XXX#${configure.universal_cflags}#" \
121                    ${worksrcpath}/ed_command
[92581]122        system -W ${worksrcpath}/liblwgeom \
123                "ed Makefile < ${worksrcpath}/ed_command"
[92462]124    }
125}
126
127build.args                  ICONV_LDFLAGS='-L${prefix}/lib -liconv'
[100922]128use_parallel_build          no
[92462]129
130
131livecheck.type              regex
132livecheck.url               ${master_sites}
[113699]133livecheck.regex             {postgis2?-(\d+(?:\.\d+)*)\.[tz]}
Note: See TracBrowser for help on using the repository browser.