mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
community/gdal to 3.5.0-4
This commit is contained in:
parent
ced6cdcfa1
commit
116de4342a
2 changed files with 91 additions and 84 deletions
|
@ -1,90 +1,115 @@
|
|||
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
|
||||
# Maintainer: Bruno Pagani <archange@archlinux.org>
|
||||
# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
|
||||
# Contributor: William Rea <sillywilly@gmail.com>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - set -std=c++17 for poppler
|
||||
# - set -D_OFF_T for 32-bit since the macros aren't working right
|
||||
# - remove makedepend, optdepend on arrow
|
||||
# - set -DGDAL_USE_ARROW=OFF, -DGDAL_USE_PARQUET=OFF
|
||||
# - disable LTO: -DENABLE_IPO=OFF
|
||||
|
||||
pkgbase=gdal
|
||||
pkgname=('gdal' 'python-gdal')
|
||||
pkgver=3.4.3
|
||||
pkgrel=3
|
||||
pkgdesc="A translator library for raster geospatial data formats"
|
||||
arch=('x86_64')
|
||||
pkgname=(gdal python-gdal)
|
||||
pkgver=3.5.0
|
||||
pkgrel=4
|
||||
pkgdesc="A translator library for raster and vector geospatial data formats"
|
||||
arch=(x86_64)
|
||||
url="https://gdal.org/"
|
||||
license=('custom')
|
||||
depends=('curl' 'geos' 'giflib' 'hdf5' 'libgeotiff' 'libjpeg-turbo' 'libpng' 'libspatialite' 'libtiff' 'netcdf'
|
||||
'openjpeg2' 'poppler' 'cfitsio' 'sqlite' 'mariadb-libs' 'postgresql-libs' 'xerces-c' 'json-c')
|
||||
makedepends=('perl' 'swig' 'chrpath' 'doxygen' 'python-breathe' 'python-numpy' 'python-sphinx' 'boost')
|
||||
optdepends=('postgresql: postgresql database support'
|
||||
'mariadb: mariadb database support'
|
||||
'perl: perl binding support')
|
||||
options=('!emptydirs')
|
||||
license=(custom)
|
||||
makedepends=(cmake opencl-headers python-setuptools python-numpy
|
||||
proj blosc cfitsio curl crypto++ libdeflate expat libfreexl
|
||||
libgeotiff geos giflib libheif hdf5 libjpeg-turbo json-c xz
|
||||
libxml2 lz4 mariadb-libs netcdf unixodbc ocl-icd openexr openjpeg2
|
||||
openssl pcre2 libpng podofo poppler postgresql-libs qhull
|
||||
libspatialite sqlite swig libtiff libwebp xerces-c zlib zstd)
|
||||
# armadillo brunsli lerc libkml rasterlite2 sfcgal tiledb
|
||||
# ogdi
|
||||
changelog=$pkgbase.changelog
|
||||
source=(https://download.osgeo.org/${pkgbase}/${pkgver}/${pkgbase}-${pkgver}.tar.xz
|
||||
gdal-perl-vendor.patch)
|
||||
sha256sums=('02a27b35899e1c4c3bcb6007da900128ddd7e8ab7cd6ccfecf338a301eadad5a'
|
||||
'2103b98f2f15954f042d5620658b30d703125927bde2e5eb671c5facb6c2f5ed')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"/$pkgbase-$pkgver
|
||||
|
||||
# Fix mandir
|
||||
sed -i "s|^mandir=.*|mandir='\${prefix}/share/man'|" configure
|
||||
|
||||
# Fix Perl bindings installation path
|
||||
patch -Np0 -i "${srcdir}"/gdal-perl-vendor.patch
|
||||
}
|
||||
source=(https://download.osgeo.org/${pkgbase}/${pkgver}/${pkgbase}-${pkgver}.tar.xz)
|
||||
sha256sums=('d49121e5348a51659807be4fb866aa840f8dbec4d1acba6d17fdefa72125bfc9')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}"/$pkgbase-$pkgver
|
||||
|
||||
CXXFLAGS+=" -std=c++17"
|
||||
[[ $CARCH != "aarch64" ]] && CPPFLAGS+=" -D_OFF_T"
|
||||
|
||||
./configure --prefix=/usr --with-netcdf --with-libtiff --with-sqlite3 --with-geotiff \
|
||||
--with-mysql --with-curl --with-hdf5 --with-perl --with-geos \
|
||||
--with-png --with-poppler --with-spatialite --with-openjpeg
|
||||
|
||||
# workaround for bug #13646
|
||||
# sed -i 's/PY_HAVE_SETUPTOOLS=1/PY_HAVE_SETUPTOOLS=/g' ./GDALmake.opt
|
||||
# sed -i 's/EXE_DEP_LIBS/KILL_EXE_DEP_LIBS/' apps/GNUmakefile
|
||||
|
||||
make
|
||||
make man
|
||||
|
||||
cd "${srcdir}"/$pkgbase-$pkgver/swig/python
|
||||
python setup.py build
|
||||
cmake -B build -S $pkgbase-$pkgver \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DENABLE_IPO=OFF \
|
||||
-DBUILD_PYTHON_BINDINGS=ON \
|
||||
-DGDAL_ENABLE_PLUGINS=ON \
|
||||
-DGDAL_USE_ARROW=OFF \
|
||||
-DGDAL_USE_BLOSC=ON \
|
||||
-DGDAL_USE_CFITSIO=ON \
|
||||
-DGDAL_USE_CURL=ON \
|
||||
-DGDAL_USE_CRYPTOPP=ON \
|
||||
-DGDAL_USE_DEFLATE=ON \
|
||||
-DGDAL_USE_EXPAT=ON \
|
||||
-DGDAL_USE_FREEXL=ON \
|
||||
-DGDAL_USE_GEOTIFF=ON \
|
||||
-DGDAL_USE_GEOS=ON \
|
||||
-DGDAL_USE_GIF=ON \
|
||||
-DGDAL_USE_HEIF=ON \
|
||||
-DGDAL_USE_HDF5=ON \
|
||||
-DGDAL_USE_ICONV=ON \
|
||||
-DGDAL_USE_JPEG=ON \
|
||||
-DGDAL_USE_JSONC=ON \
|
||||
-DGDAL_USE_LIBLZMA=ON \
|
||||
-DGDAL_USE_LIBXML2=ON \
|
||||
-DGDAL_USE_LZ4=ON \
|
||||
-DGDAL_USE_MYSQL=ON \
|
||||
-DGDAL_USE_NETCDF=ON \
|
||||
-DGDAL_USE_ODBC=ON \
|
||||
-DGDAL_USE_OPENCL=ON \
|
||||
-DGDAL_USE_OPENEXR=ON \
|
||||
-DGDAL_USE_OPENJPEG=ON \
|
||||
-DGDAL_USE_OPENSSL=ON \
|
||||
-DGDAL_USE_PARQUET=OFF \
|
||||
-DGDAL_USE_PCRE2=ON \
|
||||
-DGDAL_USE_PNG=ON \
|
||||
-DGDAL_USE_POPPLER=ON \
|
||||
-DGDAL_USE_POSTGRESQL=ON \
|
||||
-DGDAL_USE_QHULL=ON \
|
||||
-DGDAL_USE_SPATIALITE=ON \
|
||||
-DGDAL_USE_SQLITE3=ON \
|
||||
-DGDAL_USE_TIFF=ON \
|
||||
-DGDAL_USE_WEBP=ON \
|
||||
-DGDAL_USE_XERCESC=ON \
|
||||
-DGDAL_USE_ZLIB=ON \
|
||||
-DGDAL_USE_ZSTD=ON
|
||||
make -C build
|
||||
}
|
||||
|
||||
package_gdal () {
|
||||
cd "${srcdir}"/$pkgbase-$pkgver
|
||||
depends=(proj blosc crypto++ curl libdeflate expat libfreexl geos libgeotiff
|
||||
giflib libjpeg-turbo json-c xz libxml2 lz4 unixodbc ocl-icd openssl
|
||||
pcre2 libpng qhull libspatialite sqlite libtiff xerces-c zlib zstd)
|
||||
optdepends=('cfitsio: FITS support'
|
||||
'hdf5: HDF5 support'
|
||||
'libheif: HEIF support'
|
||||
'mariadb-libs: MySQL support'
|
||||
'netcdf: netCDF support'
|
||||
'openexr: EXR support'
|
||||
'openjpeg2: JP2 support'
|
||||
'podofo: PDF support'
|
||||
'poppler: PDF support'
|
||||
'postgresql-libs: PostgreSQL support'
|
||||
'libwebp: WebP support')
|
||||
|
||||
make DESTDIR="${pkgdir}" install
|
||||
make DESTDIR="${pkgdir}" install-man
|
||||
|
||||
# install license
|
||||
install -Dm644 LICENSE.TXT "${pkgdir}"/usr/share/licenses/$pkgbase/LICENSE
|
||||
|
||||
# Remove RPATH
|
||||
eval local $(perl -V:vendorarch)
|
||||
chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/OSR/OSR.so
|
||||
chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/OGR/OGR.so
|
||||
chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/GDAL/GDAL.so
|
||||
chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/GDAL/Const/Const.so
|
||||
chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/GNM/GNM.so
|
||||
make -C build DESTDIR="${pkgdir}" install
|
||||
install -Dm644 ${pkgname}-${pkgver}/LICENSE.TXT -t "${pkgdir}"/usr/share/licenses/$pkgbase/
|
||||
# Move python stuff
|
||||
mkdir {bin,lib}
|
||||
mv "${pkgdir}"/usr/bin/*py bin
|
||||
mv "${pkgdir}"/usr/lib/python* lib
|
||||
}
|
||||
|
||||
package_python-gdal () {
|
||||
pkgdesc="Python bindings for GDAL"
|
||||
depends=("gdal=$pkgver" 'python-numpy')
|
||||
optdepends=()
|
||||
|
||||
cd "${srcdir}"/$pkgbase-$pkgver/swig/python
|
||||
python setup.py install --root="$pkgdir" --optimize=1 --skip-build
|
||||
# install -Dm755 -t "${pkgdir}"/usr/bin scripts/*.py
|
||||
|
||||
install -d "${pkgdir}"/usr/{bin,lib}
|
||||
mv bin/* "${pkgdir}"/usr/bin
|
||||
mv lib/* "${pkgdir}"/usr/lib
|
||||
install -dm755 "${pkgdir}"/usr/share/licenses
|
||||
ln -s $pkgbase "${pkgdir}"/usr/share/licenses/$pkgname
|
||||
# byte-compile python modules since the CMake build does not do it.
|
||||
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
||||
python -m compileall -o 0 -o 1 -o 2 --hardlink-dupes -s "${pkgdir}" "${pkgdir}"${site_packages}
|
||||
}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
Description: pass INSTALLDIRS=vendor to Makefile.PL to get stuff into the right place
|
||||
Origin: vendor
|
||||
Forwarded: not-needed
|
||||
Author: gregor herrmann <gregoa@debian.org>
|
||||
|
||||
--- swig/perl/Makefile.orig 2018-12-14 22:34:20.000000000 +0100
|
||||
+++ swig/perl/Makefile 2018-12-25 17:52:06.053358428 +0100
|
||||
@@ -10 +10 @@
|
||||
- perl Makefile.PL INSTALL_BASE=$(INST_PREFIX)
|
||||
+ perl Makefile.PL INSTALLDIRS=vendor
|
||||
|
||||
test: build
|
||||
$(MAKE) -f Makefile_Geo__GDAL test
|
||||
--- swig/perl/GNUmakefile.orig 2018-12-14 22:34:20.000000000 +0100
|
||||
+++ swig/perl/GNUmakefile 2018-12-25 17:52:28.636748048 +0100
|
||||
@@ -31 +31 @@
|
||||
- perl Makefile.PL INSTALL_BASE=$(INST_PREFIX)
|
||||
+ perl Makefile.PL INSTALLDIRS=vendor
|
Loading…
Reference in a new issue