blob: 2f9b4e630c2c1bf068a9db5a92bcd094e50df15a (
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
|
# Created by: Randall Hopper
# $FreeBSD$
PORTNAME= gdal
PORTVERSION= 2.0.2
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
LICENSE_FILE= ${WRKSRC}/LICENSE.TXT
LIB_DEPENDS= libgeotiff.so:${PORTSDIR}/graphics/libgeotiff \
libgif.so:${PORTSDIR}/graphics/giflib \
libjson-c.so:${PORTSDIR}/devel/json-c \
libpng.so:${PORTSDIR}/graphics/png \
libtiff.so:${PORTSDIR}/graphics/tiff
OPTIONS_DEFINE= ARMADILLO CFITSIO CURL ECW EXPAT FREEXL GEOS GTA HDF5 JASPER \
KML LIBXML2 MYSQL NETCDF ODBC OPENJPEG PCRE PGSQL PROJ \
SPATIALITE SQLITE WEBP XERCES
OPTIONS_DEFAULT=JASPER
OPTIONS_RADIO= PDF
OPTIONS_RADIO_PDF= PODOFO POPPLER
PCRE_DESC= Regular expression support for SQLite
CFLAGS+= -fPIC
CONFIGURE_ARGS= --datadir=${DATADIR} \
--enable-static=yes \
--with-geotiff=yes \
--with-gif=yes \
--with-jpeg=yes \
--with-libjson-c=yes \
--with-liblzma=yes \
--with-libtiff=yes \
--with-libz=/usr \
--with-png=yes \
--with-threads=yes \
--without-libtool \
${ICONV_CONFIGURE_ARG}
GNU_CONFIGURE= yes
LDFLAGS+= ${ICONV_LIB}
MAKE_JOBS_UNSAFE= yes
MAKEFILE= GNUmakefile
USE_LDCONFIG= yes
USES= gmake iconv jpeg localbase tar:xz
PLIST_SUB= MAJOR_VER=${PORTVERSION:R:R} PORTVERSION=${PORTVERSION}
PORTDATA= *
SLAVEDIRS= graphics/p5-Geo-GDAL graphics/php-gdal graphics/py-gdal graphics/ruby-gdal
ARMADILLO_CONFIGURE_WITH= armadillo
ARMADILLO_LIB_DEPENDS= libarmadillo.so:${PORTSDIR}/math/armadillo
CFITSIO_CONFIGURE_WITH= cfitsio
CFITSIO_LIB_DEPENDS= libcfitsio.so:${PORTSDIR}/astro/cfitsio
CURL_CONFIGURE_OFF= --with-curl=no
CURL_CONFIGURE_ON= --with-curl=${LOCALBASE}/bin/curl-config
CURL_LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl
ECW_CONFIGURE_WITH= ecw
ECW_LIB_DEPENDS= libNCSEcw.so:${PORTSDIR}/graphics/libecwj2
EXPAT_CONFIGURE_WITH= expat
EXPAT_LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2
FREEXL_CONFIGURE_WITH= freexl
FREEXL_LIB_DEPENDS= libfreexl.so:${PORTSDIR}/textproc/freexl
GEOS_CONFIGURE_OFF= --with-geos=no
GEOS_CONFIGURE_ON= --with-geos=${LOCALBASE}/bin/geos-config
GEOS_LIB_DEPENDS= libgeos.so:${PORTSDIR}/graphics/geos
GTA_CONFIGURE_WITH= gta
GTA_LIB_DEPENDS= libgta.so:${PORTSDIR}/devel/libgta
HDF5_CONFIGURE_WITH= hdf5
HDF5_LIB_DEPENDS= libhdf5.so:${PORTSDIR}/science/hdf5
JASPER_CONFIGURE_WITH= jasper
JASPER_LIB_DEPENDS= libjasper.so:${PORTSDIR}/graphics/jasper
KML_CONFIGURE_WITH= libkml
KML_LIB_DEPENDS= libkmlbase.so:${PORTSDIR}/science/libkml
LIBXML2_CONFIGURE_OFF= --with-xml2=no
LIBXML2_CONFIGURE_ON= --with-xml2=${LOCALBASE}/bin/xml2-config
LIBXML2_LIB_DEPENDS= libxml2.so:${PORTSDIR}/textproc/libxml2
MYSQL_CONFIGURE_OFF= --with-mysql=no
MYSQL_CONFIGURE_ON= --with-mysql=${LOCALBASE}/bin/mysql_config
MYSQL_USE= MYSQL=yes
NETCDF_CONFIGURE_WITH= netcdf
NETCDF_LIB_DEPENDS= libnetcdf.so:${PORTSDIR}/science/netcdf
ODBC_CONFIGURE_WITH= odbc
ODBC_LIB_DEPENDS= libodbc.so:${PORTSDIR}/databases/unixODBC
OPENJPEG_CONFIGURE_WITH=openjpeg
OPENJPEG_LIB_DEPENDS= libopenjp2.so:${PORTSDIR}/graphics/openjpeg
PCRE_CONFIGURE_WITH= pcre
PCRE_LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre
PGSQL_CONFIGURE_OFF= --with-pg=no
PGSQL_CONFIGURE_ON= --with-pg=${LOCALBASE}/bin/pg_config
PGSQL_USES= pgsql
PODOFO_CONFIGURE_WITH= podofo
PODOFO_LIB_DEPENDS= libpodofo.so:${PORTSDIR}/graphics/podofo
POPPLER_CONFIGURE_WITH= poppler
POPPLER_LIB_DEPENDS= libpoppler.so:${PORTSDIR}/graphics/poppler
PROJ_CONFIGURE_WITH= static-proj4
PROJ_LIB_DEPENDS= libproj.so:${PORTSDIR}/graphics/proj
SPATIALITE_CONFIGURE_WITH= spatialite
SPATIALITE_LIB_DEPENDS= libspatialite.so:${PORTSDIR}/databases/spatialite
SQLITE_CONFIGURE_WITH= sqlite3
SQLITE_USE= SQLITE=yes
WEBP_CONFIGURE_WITH= webp
WEBP_LIB_DEPENDS= libwebp.so:${PORTSDIR}/graphics/webp
XERCES_CONFIGURE_WITH= xerces
XERCES_LIB_DEPENDS= libxerces-c.so:${PORTSDIR}/textproc/xerces-c3
post-patch:
@${REINPLACE_CMD} -e 's|$$(INST_LIB)/pkgconfig|${PREFIX}/libdata/pkgconfig|' ${WRKSRC}/GNUmakefile
# Cleanup bundled libraries
@${RM} -fr ${WRKSRC}/frmts/gif/giflib/
@${RM} -fr ${WRKSRC}/frmts/gtiff/libgeotiff/
@${RM} -fr ${WRKSRC}/frmts/gtiff/libtiff/
@${RM} -fr ${WRKSRC}/frmts/jpeg/libjpeg/
@${RM} -fr ${WRKSRC}/frmts/jpeg/libjpeg12/
@${RM} -fr ${WRKSRC}/frmts/png/libpng/
@${RM} -fr ${WRKSRC}/frmts/zlib/
@${RM} -fr ${WRKSRC}/ogr/ogrsf_frmts/geojson/libjson/
post-install:
${INSTALL_DATA} ${WRKSRC}/libgdal.a ${STAGEDIR}${PREFIX}/lib/
${TOUCH} ${STAGEDIR}${PREFIX}/lib/gdalplugins/.keepme
${INSTALL_DATA} ${WRKSRC}/GDALmake.opt ${STAGEDIR}${DATADIR}/
-${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/* ${STAGEDIR}${PREFIX}/lib/libgdal.so.${PORTVERSION}
.include <bsd.port.pre.mk>
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000
CFLAGS+= -flax-vector-conversions
.endif
.include <bsd.port.post.mk>
|