updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / gdal-curl / PKGBUILD
blob8b9de187baaa8ba5b413e2da3fd2c393497266c5
1 # Maintainer: Dražen Odobašić <dodobasic at gmail>
3 pkgname=gdal-curl
4 _pkgname=gdal
5 pkgver=1.9.0
6 pkgrel=1
7 pkgdesc="A translator library for raster geospatial data formats with curl support"
8 arch=('i686' 'x86_64')
9 url="http://www.gdal.org/"
10 license=('custom')
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 \
20         configure.1.patch) 
22 md5sums=('1853f3d8eb5232ae030abe007840cade'
23          '81afc1c26d29cee84aadb6924fe33861'
24          'de4ff6d5d44d22aba64051ce4cc96a38')
26 provides=('gdal')
27 conflicts=('gdal')
29 build() {
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
37 # python2 fixes
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
41   done
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/
52   make
55 package () {
56   cd ${srcdir}/$_pkgname-$pkgver
58   make DESTDIR=${pkgdir} install
60 # install license
61   install -D -m644 LICENSE.TXT ${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE
63 #FS15477 clean up junks
64   rm -f ${pkgdir}/usr/bin/*.dox