blob: 0d9b73d6dc63c1a590584a6936a1f3968fe06edf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
|
# Created by: Randall Hopper
# $FreeBSD$
PORTNAME= gdal
PORTVERSION= 1.10.1
PORTREVISION= 1
CATEGORIES= graphics geography
MASTER_SITES= http://download.osgeo.org/gdal/${PORTVERSION}/ \
ftp://ftp.remotesensing.org/pub/gdal/${PORTVERSION}/ \
LOCAL/sunpoet
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Translator library for raster geospatial data formats
LICENSE= MIT
OPTIONS_DEFINE= CFITSIO CURL ECW EXPAT GEOS GEOTIFF GIF GTA HDF5 ICONV JASPER \
JPEG KML LIBXML2 MYSQL NETCDF ODBC PCRE PGSQL PNG POPPLER PROJ \
SQLITE TIFF WEBP XERCES
OPTIONS_DEFAULT=GEOTIFF GIF JASPER JPEG PNG TIFF
PCRE_DESC= Regular expression support for SQLite
CFLAGS+= -fPIC
CONFIGURE_ARGS= --datadir=${DATADIR} \
--with-libz=/usr --with-liblzma=yes --with-threads=yes
GNU_CONFIGURE= yes
LDFLAGS+= -L${LOCALBASE} -pthread
MAKE_JOBS_UNSAFE= yes
MAKEFILE= GNUmakefile
USE_AUTOTOOLS= libtool
USE_LDCONFIG= yes
USES= gmake
SLAVEDIRS= graphics/p5-Geo-GDAL graphics/php-gdal graphics/py-gdal graphics/ruby-gdal
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MCFITSIO}
LIB_DEPENDS+= cfitsio:${PORTSDIR}/astro/cfitsio
CONFIGURE_ARGS+=--with-cfitsio=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-cfitsio=no
.endif
.if ${PORT_OPTIONS:MCURL}
LIB_DEPENDS+= curl:${PORTSDIR}/ftp/curl
CONFIGURE_ARGS+=--with-curl=${LOCALBASE}/bin/curl-config
.else
CONFIGURE_ARGS+=--with-curl=no
.endif
.if ${PORT_OPTIONS:MECW}
LIB_DEPENDS+= NCSEcw:${PORTSDIR}/graphics/libecwj2
CONFIGURE_ARGS+=--with-ecw=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-ecw=no
.endif
.if ${PORT_OPTIONS:MEXPAT}
LIB_DEPENDS+= expat:${PORTSDIR}/textproc/expat2
CONFIGURE_ARGS+=--with-expat=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-expat=no
.endif
.if ${PORT_OPTIONS:MGEOS}
LIB_DEPENDS+= geos:${PORTSDIR}/graphics/geos
CONFIGURE_ARGS+=--with-geos=${LOCALBASE}/bin/geos-config
.else
CONFIGURE_ARGS+=--with-geos=no
.endif
.if ${PORT_OPTIONS:MGEOTIFF}
LIB_DEPENDS+= geotiff:${PORTSDIR}/graphics/libgeotiff
CONFIGURE_ARGS+=--with-geotiff=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-geotiff=internal
.endif
.if ${PORT_OPTIONS:MGIF}
LIB_DEPENDS+= gif:${PORTSDIR}/graphics/giflib
CONFIGURE_ARGS+=--with-gif=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-gif=internal
.endif
.if ${PORT_OPTIONS:MGTA}
LIB_DEPENDS+= gta:${PORTSDIR}/devel/libgta
CONFIGURE_ARGS+=--with-gta=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-gta=no
.endif
.if ${PORT_OPTIONS:MHDF5}
LIB_DEPENDS+= hdf5.7:${PORTSDIR}/science/hdf5-18
CONFIGURE_ARGS+=--with-hdf5=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-hdf5=no
.endif
.if ${PORT_OPTIONS:MICONV}
CONFIGURE_ARGS+=${ICONV_CONFIGURE_ARG}
USES+= iconv
.else
CONFIGURE_ARGS+=--with-libiconv-prefix=no
.endif
.if ${PORT_OPTIONS:MJASPER}
LIB_DEPENDS+= jasper:${PORTSDIR}/graphics/jasper
CONFIGURE_ARGS+=--with-jasper=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-jasper=no
.endif
.if ${PORT_OPTIONS:MJPEG}
LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg
CONFIGURE_ARGS+=--with-jpeg=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-jpeg=internal
.endif
.if ${PORT_OPTIONS:MKML}
LIB_DEPENDS+= kmlbase:${PORTSDIR}/science/libkml
CONFIGURE_ARGS+=--with-libkml=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-libkml=no
.endif
.if ${PORT_OPTIONS:MLIBXML2}
LIB_DEPENDS+= xml2:${PORTSDIR}/textproc/libxml2
CONFIGURE_ARGS+=--with-xml2=${LOCALBASE}/bin/xml2-config
.else
CONFIGURE_ARGS+=--with-xml2=no
.endif
.if ${PORT_OPTIONS:MMYSQL}
CONFIGURE_ARGS+=--with-mysql=${LOCALBASE}/bin/mysql_config
USE_MYSQL= yes
.else
CONFIGURE_ARGS+=--with-mysql=no
.endif
.if ${PORT_OPTIONS:MNETCDF}
LIB_DEPENDS+= netcdf.7:${PORTSDIR}/science/netcdf4
CONFIGURE_ARGS+=--with-netcdf=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-netcdf=no
.endif
.if ${PORT_OPTIONS:MODBC}
LIB_DEPENDS+= odbc:${PORTSDIR}/databases/unixODBC
CONFIGURE_ARGS+=--with-odbc=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-odbc=no
.endif
.if ${PORT_OPTIONS:MPCRE}
LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
CONFIGURE_ARGS+=--with-pcre=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-pcre=no
.endif
.if ${PORT_OPTIONS:MPGSQL}
CONFIGURE_ARGS+=--with-pg=${LOCALBASE}/bin/pg_config
USE_PGSQL= yes
.else
CONFIGURE_ARGS+=--with-pg=no
.endif
.if ${PORT_OPTIONS:MPNG}
LIB_DEPENDS+= png15:${PORTSDIR}/graphics/png
CONFIGURE_ARGS+=--with-png=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-png=internal
.endif
.if ${PORT_OPTIONS:MPOPPLER}
LIB_DEPENDS+= poppler:${PORTSDIR}/graphics/poppler
CONFIGURE_ARGS+=--with-poppler=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-poppler=no
.endif
.if ${PORT_OPTIONS:MPROJ}
LIB_DEPENDS+= proj:${PORTSDIR}/graphics/proj
CONFIGURE_ARGS+=--with-static-proj4=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-static-proj4=no
.endif
.if ${PORT_OPTIONS:MSQLITE}
CONFIGURE_ARGS+=--with-sqlite3=${LOCALBASE}
USE_SQLITE= yes
.else
CONFIGURE_ARGS+=--with-sqlite3=no
.endif
.if ${PORT_OPTIONS:MTIFF}
LIB_DEPENDS+= tiff:${PORTSDIR}/graphics/tiff
CONFIGURE_ARGS+=--with-libtiff=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-libtiff=internal
.endif
.if ${PORT_OPTIONS:MWEBP}
LIB_DEPENDS+= webp:${PORTSDIR}/graphics/webp
CONFIGURE_ARGS+=--with-webp=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-webp=no
.endif
.if ${PORT_OPTIONS:MXERCES}
LIB_DEPENDS+= xerces-c:${PORTSDIR}/textproc/xerces-c3
CONFIGURE_ARGS+=--with-xerces=${LOCALBASE}
.else
CONFIGURE_ARGS+=--with-xerces=no
.endif
post-patch:
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
post-install:
${TOUCH} ${PREFIX}/lib/gdalplugins/.keepme
${INSTALL_DATA} ${WRKSRC}/GDALmake.opt ${DATADIR}/
.include <bsd.port.mk>
|