1 | # $Id: Portfile 64763 2010-03-15 16:31:33Z nox@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name gdal |
---|
5 | version 1.7.2 |
---|
6 | revision 3 |
---|
7 | maintainers gmail.com:seanasy |
---|
8 | platforms darwin |
---|
9 | description GDAL - Geospatial Data Abstraction Library |
---|
10 | long_description GDAL is a translator library for raster geospatial \ |
---|
11 | data formats that is released under an X/MIT style \ |
---|
12 | Open Source license. As a library, it presents a \ |
---|
13 | single abstract data model to the calling application \ |
---|
14 | for all supported formats. The related OGR library \ |
---|
15 | (which lives within the GDAL source tree) provides a \ |
---|
16 | similar capability for simple features vector data. |
---|
17 | homepage http://www.gdal.org/ |
---|
18 | master_sites http://www.gdal.org/dl/ \ |
---|
19 | http://download.osgeo.org/gdal/ |
---|
20 | categories gis |
---|
21 | checksums md5 05351f8cb61761ae579667e24a297fe6 \ |
---|
22 | sha1 a03127530708e3924aec7b505cc2ca4f8153f13c \ |
---|
23 | rmd160 a3f7950798448d8179f899dc095a83e23dcc269b |
---|
24 | |
---|
25 | depends_lib port:zlib port:libpng port:tiff port:libgeotiff port:jpeg \ |
---|
26 | path:include/gif_lib.h:giflib port:proj |
---|
27 | |
---|
28 | set PYINST "" |
---|
29 | |
---|
30 | configure.args-append \ |
---|
31 | --with-local=${prefix} --with-libz=${prefix}\ |
---|
32 | --with-png=${prefix}\ |
---|
33 | --with-libtiff=${prefix} --with-geotiff=${prefix}\ |
---|
34 | --with-jpeg=${prefix} --with-gif=${prefix}\ |
---|
35 | --with-static-proj4=${prefix}\ |
---|
36 | --without-pg --without-grass --without-libgrass\ |
---|
37 | --without-cfitsio --without-pcraster --without-netcdf\ |
---|
38 | --without-ogdi --without-fme --without-hdf4 --without-hdf5\ |
---|
39 | --without-jasper --without-ecw --without-kakadu\ |
---|
40 | --without-mrsid --without-jp2mrsid --without-msg\ |
---|
41 | --without-bsb --without-oci --without-spatialite\ |
---|
42 | --without-grib --without-mysql --without-ingres\ |
---|
43 | --without-xerces --without-expat --without-odbc\ |
---|
44 | --with-dods-support=no --without-curl --without-sqlite3\ |
---|
45 | --without-dwgdirect --without-idb --without-sde\ |
---|
46 | --without-geos --without-pam --without-macosx-framework\ |
---|
47 | --without-perl --without-php --without-ruby\ |
---|
48 | --without-python --without-ogpython\ |
---|
49 | --mandir=${prefix}/share/man --with-threads=-lpthread |
---|
50 | |
---|
51 | |
---|
52 | # Patch to ensure that the python installation respects DESTDIR |
---|
53 | patchfiles patch-swig_python_GNUmakefile |
---|
54 | |
---|
55 | # Patches for universal build |
---|
56 | |
---|
57 | post-configure { |
---|
58 | reinplace -E "s|XXX|${PYINST}|" ${worksrcpath}/swig/python/GNUmakefile |
---|
59 | if {[variant_isset universal]} { |
---|
60 | system "cd ${worksrcpath} && patch -p0 < ${portpath}/files/patch_cpl_config_h" |
---|
61 | } |
---|
62 | } |
---|
63 | |
---|
64 | # Set target to none |
---|
65 | build.target |
---|
66 | |
---|
67 | variant geos description {Enable GEOS geometry engine functionality} { |
---|
68 | depends_lib-append port:geos |
---|
69 | configure.args-delete --without-geos |
---|
70 | configure.args-append --with-geos=${prefix}/bin/geos-config |
---|
71 | } |
---|
72 | |
---|
73 | variant curl description {Enable curl support} { |
---|
74 | depends_lib-append port:curl |
---|
75 | configure.args-delete --without-curl |
---|
76 | configure.args-append --with-curl=${prefix}/bin/curl-config |
---|
77 | } |
---|
78 | |
---|
79 | variant mrsid description {Enable MrSID file format} { |
---|
80 | depends_lib-append port:geoexpress-sdk |
---|
81 | configure.args-delete --without-mrsid |
---|
82 | configure.args-append --with-mrsid=${prefix}/share/Geo_DSDK |
---|
83 | |
---|
84 | # Fixes for Geo_DSDK 7.x - http://trac.osgeo.org/gdal/ticket/2410 |
---|
85 | patchfiles-append patch-frmts_mrsid_mrsiddataset.cpp \ |
---|
86 | patch-mrsid-configure |
---|
87 | } |
---|
88 | |
---|
89 | variant hdf4 description {Enable HDF4 file format} { |
---|
90 | depends_lib-append port:hdf4 |
---|
91 | configure.args-delete --without-hdf4 |
---|
92 | configure.args-append --with-hdf4=${prefix} |
---|
93 | } |
---|
94 | |
---|
95 | variant hdf5 description {Enable HDF5 file format} { |
---|
96 | depends_lib-append port:hdf5-18 |
---|
97 | configure.args-delete --without-hdf5 |
---|
98 | configure.args-append --with-hdf5=${prefix} |
---|
99 | } |
---|
100 | |
---|
101 | variant netcdf description {Enable NetCDF file format} { |
---|
102 | depends_lib-append port:netcdf |
---|
103 | configure.args-delete --without-netcdf |
---|
104 | configure.args-append --with-netcdf=${prefix} |
---|
105 | } |
---|
106 | |
---|
107 | variant jasper description {Enable JasPer JPEG-2000 file format} { |
---|
108 | depends_lib-append port:jasper |
---|
109 | configure.args-delete --without-jasper |
---|
110 | configure.args-append --with-jasper=${prefix} |
---|
111 | } |
---|
112 | |
---|
113 | variant xerces description {Enable xerces XML support for GML file format} { |
---|
114 | depends_lib-append port:xercesc |
---|
115 | configure.args-delete --without-xerces |
---|
116 | configure.args-append --with-xerces=${prefix} |
---|
117 | } |
---|
118 | |
---|
119 | # Python variants |
---|
120 | variant python24 description {Enable Python 2.4 support} { |
---|
121 | depends_lib-append port:python24 \ |
---|
122 | port:py-numpy |
---|
123 | configure.args-delete --without-python |
---|
124 | configure.args-append --with-python |
---|
125 | set PYINST ${frameworks_dir}/Python.framework/Versions/2.4 |
---|
126 | build.args-append PYTHON=python2.4 |
---|
127 | } |
---|
128 | |
---|
129 | variant python25 description {Enable Python 2.5 support} { |
---|
130 | depends_lib-append port:python25 \ |
---|
131 | port:py25-numpy |
---|
132 | configure.args-delete --without-python |
---|
133 | configure.args-append --with-python |
---|
134 | set PYINST ${frameworks_dir}/Python.framework/Versions/2.5 |
---|
135 | build.args-append PYTHON=python2.5 |
---|
136 | } |
---|
137 | |
---|
138 | variant python26 description {Enable Python 2.6 support} { |
---|
139 | depends_lib-append port:python26 \ |
---|
140 | port:py26-numpy |
---|
141 | configure.args-delete --without-python |
---|
142 | configure.args-append --with-python |
---|
143 | set PYINST ${frameworks_dir}/Python.framework/Versions/2.6 |
---|
144 | build.args-append PYTHON=python2.6 |
---|
145 | use_parallel_build no |
---|
146 | } |
---|
147 | |
---|
148 | # Database variants |
---|
149 | variant postgresql81 description {Enable PostgreSQL 8.1 support} { |
---|
150 | depends_lib-append port:postgresql81 |
---|
151 | configure.args-delete --without-pg |
---|
152 | configure.args-append --with-pg=${prefix}/lib/postgresql81/bin/pg_config |
---|
153 | } |
---|
154 | |
---|
155 | variant postgresql82 description {Enable PostgreSQL 8.2 support} { |
---|
156 | depends_lib-append port:postgresql82 |
---|
157 | configure.args-delete --without-pg |
---|
158 | configure.args-append --with-pg=${prefix}/lib/postgresql82/bin/pg_config |
---|
159 | } |
---|
160 | |
---|
161 | variant postgresql83 description {Enable PostgreSQL 8.3 support} { |
---|
162 | depends_lib-append port:postgresql83 |
---|
163 | configure.args-delete --without-pg |
---|
164 | configure.args-append --with-pg=${prefix}/lib/postgresql83/bin/pg_config |
---|
165 | } |
---|
166 | |
---|
167 | variant postgresql84 description {Enable PostgreSQL 8.4 support} { |
---|
168 | depends_lib-append port:postgresql84 |
---|
169 | configure.args-delete --without-pg |
---|
170 | configure.args-append --with-pg=${prefix}/lib/postgresql84/bin/pg_config |
---|
171 | } |
---|
172 | |
---|
173 | variant mysql5 description {Enable MySQL 5 support} { |
---|
174 | depends_lib-append path:bin/mysql_config5:mysql5 |
---|
175 | configure.args-delete --without-mysql |
---|
176 | configure.args-append --with-mysql=${prefix}/lib/mysql5/bin/mysql_config |
---|
177 | } |
---|
178 | |
---|
179 | variant sqlite3 description {Enable SQLite3 support} { |
---|
180 | depends_lib-append port:sqlite3 |
---|
181 | configure.args-delete --without-sqlite3 |
---|
182 | configure.args-append --with-sqlite3=${prefix} |
---|
183 | } |
---|
184 | |
---|
185 | variant spatialite description {Uses spatialite database} { |
---|
186 | depends_lib-append port:spatialite |
---|
187 | configure.args-delete --without-spatialite |
---|
188 | configure.args-append --with-spatialite=${prefix} |
---|
189 | } |
---|
190 | |
---|
191 | variant odbc description {Enable ODBC support} { |
---|
192 | depends_lib-append port:unixODBC |
---|
193 | configure.args-delete --without-odbc |
---|
194 | configure.args-append --with-odbc=${prefix} |
---|
195 | } |
---|
196 | |
---|
197 | # OS X Framework |
---|
198 | variant framework description {Build as a Mac OS X framework} { |
---|
199 | configure.args-append --with-macosx-framework |
---|
200 | } |
---|
201 | |
---|
202 | post-destroot { |
---|
203 | xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} |
---|
204 | xinstall -m 644 -W ${worksrcpath} HOWTO-RELEASE NEWS VERSION \ |
---|
205 | ${destroot}${prefix}/share/doc/${name} |
---|
206 | } |
---|
207 | |
---|
208 | livecheck.type regex |
---|
209 | livecheck.url http://download.osgeo.org/gdal/ |
---|
210 | livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)\\.tar |
---|