1 # Maintainer: Dražen Odobašić <dodobasic at gmail>
7 pkgdesc="A translator library for raster geospatial data formats with curl support"
9 url="http://www.gdal.org/"
11 depends=('curl' 'geos' 'giflib' 'hdf5' 'libgeotiff' 'libjpeg' 'libpng' 'libtiff' 'netcdf' 'python2' 'python2-numpy' 'cfitsio' 'sqlite3' 'libmysqlclient' 'postgresql-libs' 'podofo')
12 makedepends=('perl' 'swig')
13 optdepends=('postgresql: postgresql database support'
14 'mysql: mysql database support'
15 'swig: perl binding support'
16 'poppler: pdf conversion support')
17 options=('!libtool' '!makeflags')
18 source=(http://download.osgeo.org/${_pkgname}/${_pkgname}-${pkgver}.tar.gz \
19 gdal-1.5.1-python-install.patch \
22 md5sums=('1853f3d8eb5232ae030abe007840cade'
23 '81afc1c26d29cee84aadb6924fe33861'
24 'de4ff6d5d44d22aba64051ce4cc96a38')
30 export CFLAGS="$CFLAGS -fno-strict-aliasing"
31 export LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
33 cd ${srcdir}/$_pkgname-$pkgver
34 patch -Np0 -i ${srcdir}/gdal-1.5.1-python-install.patch
35 patch -Np0 -i ${srcdir}/configure.1.patch
38 sed -i 's_python python1.5_python2 python python1.5_' configure
39 for file in swig/python/{,osgeo/,samples/,scripts/}*.py; do
40 sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file
43 ./configure --prefix=/usr --with-netcdf --with-libtiff --with-sqlite3 \
44 --with-geotiff --with-mysql --with-python --without-libtool --with-curl \
45 --with-hdf5 --with-perl --with-geos --with-png --with-podofo
47 # workaround for bug #13646
48 sed -i 's/PY_HAVE_SETUPTOOLS=1/PY_HAVE_SETUPTOOLS=/g' ./GDALmake.opt
49 sed -i 's/EXE_DEP_LIBS/KILL_EXE_DEP_LIBS/' apps/GNUmakefile
50 install -d ${pkgdir}/usr/lib/python2.7/site-packages/
56 cd ${srcdir}/$_pkgname-$pkgver
58 make DESTDIR=${pkgdir} install
61 install -D -m644 LICENSE.TXT ${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE
63 #FS15477 clean up junks
64 rm -f ${pkgdir}/usr/bin/*.dox