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 |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name postgis2 |
---|
6 | categories databases gis |
---|
7 | license GPL |
---|
8 | version 2.3.2 |
---|
9 | epoch 1 |
---|
10 | platforms darwin |
---|
11 | maintainers vince openmaintainer |
---|
12 | |
---|
13 | description PostGIS is the spatial extension to the\ |
---|
14 | PostGreSQL database. |
---|
15 | |
---|
16 | long_description PostGIS 2 adds geometrical, geographical and topological\ |
---|
17 | types, and functions operating thereon, to the PostGreSQL\ |
---|
18 | database. The 2.0 release also provides raster handling\ |
---|
19 | and basic 3D geometry capacities (TIN and polyhedra). |
---|
20 | |
---|
21 | homepage http://postgis.refractions.net/ |
---|
22 | |
---|
23 | master_sites http://download.osgeo.org/postgis/source |
---|
24 | distname postgis-${version} |
---|
25 | |
---|
26 | checksums rmd160 b8cd15fd7556dd06355f0a507fa4aef1aad69333 \ |
---|
27 | sha256 e92e34c18f078a3d1a2503cd870efdc4fa9e134f0bcedbbbdb8b46b0e6af09e4 |
---|
28 | |
---|
29 | depends_build port:autoconf \ |
---|
30 | port:automake \ |
---|
31 | port:libtool \ |
---|
32 | port:libxslt |
---|
33 | |
---|
34 | depends_lib port:geos\ |
---|
35 | port:proj\ |
---|
36 | port:libiconv\ |
---|
37 | port:libxml2 \ |
---|
38 | port:json-c |
---|
39 | |
---|
40 | # PostGIS 2.0 is not compatible with PostGIS 1.5 |
---|
41 | |
---|
42 | conflicts postgis |
---|
43 | |
---|
44 | # Neither is PostGIS 2.0 compatible with PostGreSQL 8 |
---|
45 | |
---|
46 | variant postgresql95 description {Builds with postgresql 9.5} \ |
---|
47 | conflicts postgresql96 { |
---|
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 | |
---|
55 | variant 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 | |
---|
64 | variant raster description {Build raster support} { |
---|
65 | |
---|
66 | depends_lib-append port:gdal |
---|
67 | configure.args-append --with-raster |
---|
68 | } |
---|
69 | |
---|
70 | variant topology description {Build topology support} { |
---|
71 | |
---|
72 | configure.args-append --with-topology |
---|
73 | } |
---|
74 | |
---|
75 | variant 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 | |
---|
80 | variant gui description {Build the GUI import tool} { |
---|
81 | |
---|
82 | depends_lib-append port:gtk2 |
---|
83 | configure.args-append --with-gui |
---|
84 | } |
---|
85 | |
---|
86 | variant comments description {Build comments -- ! broken } { |
---|
87 | |
---|
88 | ui_warn "The comments variant is currently broken. Use at your own risk." |
---|
89 | |
---|
90 | depends_build-append port:docbook-xsl \ |
---|
91 | port:libxslt \ |
---|
92 | port:ImageMagick |
---|
93 | |
---|
94 | configure.args-append --datadir=${prefix}/share/${name} \ |
---|
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 | |
---|
102 | default_variants +raster +topology |
---|
103 | |
---|
104 | if {![variant_isset postgresql95] && ![variant_isset postgresql96]} { |
---|
105 | default_variants +postgresql96 |
---|
106 | } |
---|
107 | |
---|
108 | # Port phases |
---|
109 | |
---|
110 | configure.cflags-append \ |
---|
111 | -Diconv=libiconv -Diconv_open=libiconv_open -Diconv_close=libiconv_close |
---|
112 | |
---|
113 | |
---|
114 | # see https://trac.macports.org/wiki/UsingTheRightCompiler |
---|
115 | configure.env-append CPPBIN=${configure.cpp} |
---|
116 | |
---|
117 | post-configure { |
---|
118 | if {[variant_isset universal]} { |
---|
119 | # We must add universal flags to compile liblwgeom properly |
---|
120 | file copy ${filespath}/ed_command ${worksrcpath}/ed_command |
---|
121 | reinplace -E "s#XXX#${configure.universal_cflags}#" \ |
---|
122 | ${worksrcpath}/ed_command |
---|
123 | system -W ${worksrcpath}/liblwgeom \ |
---|
124 | "ed Makefile < ${worksrcpath}/ed_command" |
---|
125 | } |
---|
126 | } |
---|
127 | |
---|
128 | build.args ICONV_LDFLAGS='-L${prefix}/lib -liconv' |
---|
129 | use_parallel_build no |
---|
130 | |
---|
131 | |
---|
132 | livecheck.type regex |
---|
133 | livecheck.url ${master_sites} |
---|
134 | livecheck.regex {postgis2?-(\d+(?:\.\d+)*)\.[tz]} |
---|