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 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup archcheck 1.0 |
---|
6 | |
---|
7 | name postgis2 |
---|
8 | categories databases gis |
---|
9 | license GPL |
---|
10 | epoch 1 |
---|
11 | version 2.0.3 |
---|
12 | platforms darwin |
---|
13 | maintainers vince openmaintainer |
---|
14 | |
---|
15 | description PostGIS is the spatial extension to the\ |
---|
16 | PostGreSQL database. |
---|
17 | |
---|
18 | long_description PostGIS 2 adds geometrical, geographical and topological\ |
---|
19 | types, and functions operating thereon, to the PostGreSQL\ |
---|
20 | database. The 2.0 release also provides raster handling\ |
---|
21 | and basic 3D geometry capacities (TIN and polyhedra). |
---|
22 | |
---|
23 | homepage http://postgis.refractions.net/ |
---|
24 | |
---|
25 | master_sites http://download.osgeo.org/postgis/source |
---|
26 | distname postgis-${version} |
---|
27 | |
---|
28 | checksums rmd160 15bf8952c458fd323288028d5062006817cbcccb \ |
---|
29 | sha256 7f865a6fdf19afed7d2f3e7178cd504f7254a9e96f2ce6a07d0ea19edc1668a0 |
---|
30 | |
---|
31 | depends_build port:autoconf \ |
---|
32 | port:automake \ |
---|
33 | port:libtool \ |
---|
34 | port:libxslt |
---|
35 | |
---|
36 | depends_lib port:geos\ |
---|
37 | port:proj\ |
---|
38 | port:libiconv\ |
---|
39 | port:libxml2 |
---|
40 | |
---|
41 | archcheck.files lib/libgeos_c.dylib\ |
---|
42 | lib/libiconv.dylib\ |
---|
43 | lib/libproj.dylib\ |
---|
44 | lib/libxml2.dylib |
---|
45 | |
---|
46 | # PostGIS 2.0 is not compatible with PostGIS 1.5 |
---|
47 | |
---|
48 | conflicts postgis |
---|
49 | |
---|
50 | # Neither is PostGIS 2.0 compatible with PostGreSQL 8 |
---|
51 | |
---|
52 | variant postgresql90 description {Builds with postgresql 9.0} \ |
---|
53 | conflicts postgresql91 postgresql92 { |
---|
54 | depends_lib-append port:postgresql90 |
---|
55 | archcheck.files-append lib/postgresql90/libpq.dylib |
---|
56 | configure.args-append --libdir=${prefix}/lib/postgresql90\ |
---|
57 | --with-pgconfig=${prefix}/lib/postgresql90/bin/pg_config |
---|
58 | build.args-append PGSQL_DOCDIR=${destroot}${prefix}/share/doc/postgresql90\ |
---|
59 | PGSQL_MANDIR=${destroot}${prefix}/share/man |
---|
60 | } |
---|
61 | |
---|
62 | variant postgresql91 description {Builds with postgresql 9.1} \ |
---|
63 | conflicts postgresql90 postgresql92 { |
---|
64 | depends_lib-append port:postgresql91 |
---|
65 | archcheck.files-append lib/postgresql91/libpq.dylib |
---|
66 | configure.args-append --libdir=${prefix}/lib/postgresql91\ |
---|
67 | --with-pgconfig=${prefix}/lib/postgresql91/bin/pg_config |
---|
68 | build.args-append PGSQL_DOCDIR=${destroot}${prefix}/share/doc/postgresql91\ |
---|
69 | PGSQL_MANDIR=${destroot}${prefix}/share/man |
---|
70 | } |
---|
71 | |
---|
72 | variant postgresql92 description {Builds with postgresql 9.2} \ |
---|
73 | conflicts postgresql90 postgresql91 { |
---|
74 | depends_lib-append port:postgresql92 |
---|
75 | archcheck.files-append lib/postgresql92/libpq.dylib |
---|
76 | configure.args-append --libdir=${prefix}/lib/postgresql92\ |
---|
77 | --with-pgconfig=${prefix}/lib/postgresql92/bin/pg_config |
---|
78 | build.args-append PGSQL_DOCDIR=${destroot}${prefix}/share/doc/postgresql91\ |
---|
79 | PGSQL_MANDIR=${destroot}${prefix}/share/man |
---|
80 | } |
---|
81 | |
---|
82 | variant raster description {Build raster support} { |
---|
83 | |
---|
84 | depends_lib-append port:gdal |
---|
85 | configure.args-append --with-raster |
---|
86 | } |
---|
87 | |
---|
88 | variant topology description {Build topology support} { |
---|
89 | |
---|
90 | configure.args-append --with-topology |
---|
91 | } |
---|
92 | |
---|
93 | variant gui description {Build the GUI import tool} { |
---|
94 | |
---|
95 | depends_lib-append port:gtk2 |
---|
96 | configure.args-append --with-gui |
---|
97 | } |
---|
98 | |
---|
99 | variant comments description {Build comments -- ! broken } { |
---|
100 | |
---|
101 | ui_warn "The comments variant is currently broken. Use at your own risk." |
---|
102 | |
---|
103 | depends_build-append port:docbook-xsl \ |
---|
104 | port:libxslt \ |
---|
105 | port:ImageMagick |
---|
106 | |
---|
107 | configure.args-append --datadir=${prefix}/share/${name} \ |
---|
108 | --with-projdir=${prefix} \ |
---|
109 | --with-xsldir=${prefix}/share/xsl/docbook-xsl |
---|
110 | |
---|
111 | build.target-append comments |
---|
112 | destroot.target-append docs-install comments-install |
---|
113 | } |
---|
114 | |
---|
115 | default_variants +raster +topology |
---|
116 | |
---|
117 | if {![variant_isset postgresql90] && ![variant_isset postgresql91] && ![variant_isset postgresql92]} { |
---|
118 | default_variants +postgresql92 |
---|
119 | } |
---|
120 | |
---|
121 | # Port phases |
---|
122 | |
---|
123 | pre-configure { |
---|
124 | if {[variant_isset postgresql90]} { |
---|
125 | set PGVERSION postgresql90 |
---|
126 | } elseif {[variant_isset postgresql91]} { |
---|
127 | set PGVERSION postgresql91 |
---|
128 | } |
---|
129 | |
---|
130 | system -W ${worksrcpath} "./autogen.sh" |
---|
131 | } |
---|
132 | |
---|
133 | configure.cflags-append \ |
---|
134 | -Diconv=libiconv -Diconv_open=libiconv_open -Diconv_close=libiconv_close \ |
---|
135 | -I${prefix}/include |
---|
136 | |
---|
137 | post-configure { |
---|
138 | if {[variant_isset universal]} { |
---|
139 | # We must add universal flags to compile liblwgeom properly |
---|
140 | file copy ${filespath}/ed_command ${worksrcpath}/ed_command |
---|
141 | reinplace -E "s#XXX#${configure.universal_cflags}#" \ |
---|
142 | ${worksrcpath}/ed_command |
---|
143 | system -W ${worksrcpath}/liblwgeom \ |
---|
144 | "ed Makefile < ${worksrcpath}/ed_command" |
---|
145 | } |
---|
146 | } |
---|
147 | |
---|
148 | build.args ICONV_LDFLAGS='-L${prefix}/lib -liconv' |
---|
149 | use_parallel_build no |
---|
150 | |
---|
151 | |
---|
152 | livecheck.type regex |
---|
153 | livecheck.url ${master_sites} |
---|
154 | livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)\\.tar |
---|