2022-01-09 01:37:03 +00:00
|
|
|
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
|
2022-07-23 00:19:46 +00:00
|
|
|
# Maintainer: Bruno Pagani <archange@archlinux.org>
|
2022-01-09 01:37:03 +00:00
|
|
|
# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
|
|
|
|
# Contributor: William Rea <sillywilly@gmail.com>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
2022-07-23 00:19:46 +00:00
|
|
|
# - remove makedepend, optdepend on arrow
|
|
|
|
# - set -DGDAL_USE_ARROW=OFF, -DGDAL_USE_PARQUET=OFF
|
|
|
|
# - disable LTO: -DENABLE_IPO=OFF
|
2022-01-09 01:37:03 +00:00
|
|
|
|
|
|
|
pkgbase=gdal
|
2022-07-23 00:19:46 +00:00
|
|
|
pkgname=(gdal python-gdal)
|
2024-09-06 23:40:05 +00:00
|
|
|
pkgver=3.9.2
|
2024-11-13 00:21:41 +00:00
|
|
|
pkgrel=5
|
2022-07-23 00:19:46 +00:00
|
|
|
pkgdesc="A translator library for raster and vector geospatial data formats"
|
|
|
|
arch=(x86_64)
|
2022-01-09 01:37:03 +00:00
|
|
|
url="https://gdal.org/"
|
2022-07-23 00:19:46 +00:00
|
|
|
license=(custom)
|
|
|
|
makedepends=(cmake opencl-headers python-setuptools python-numpy
|
|
|
|
proj blosc cfitsio curl crypto++ libdeflate expat libfreexl
|
2022-12-21 15:32:06 +00:00
|
|
|
libgeotiff geos giflib libheif hdf5 libjpeg-turbo json-c libjxl xz
|
2022-07-23 00:19:46 +00:00
|
|
|
libxml2 lz4 mariadb-libs netcdf unixodbc ocl-icd openexr openjpeg2
|
2023-11-29 21:53:04 +00:00
|
|
|
openssl pcre2 libpng podofo poppler postgresql-libs qhull
|
|
|
|
libspatialite sqlite swig libtiff libwebp xerces-c zlib zstd libaec)
|
2022-12-21 15:32:06 +00:00
|
|
|
# armadillo basisu brunsli lerc libkml qb3 rasterlite2 sfcgal tiledb
|
2022-07-23 00:19:46 +00:00
|
|
|
# ogdi
|
2022-01-09 01:37:03 +00:00
|
|
|
changelog=$pkgbase.changelog
|
2024-07-24 17:41:38 +00:00
|
|
|
source=(https://download.osgeo.org/${pkgbase}/${pkgver}/${pkgbase}-${pkgver}.tar.xz)
|
2024-09-06 23:40:05 +00:00
|
|
|
b2sums=('131543da5c93f5234b0314d60a67a8f032a81c18d2289051a2b939d843d46156d24be713e3ae9470af962d151570385d46be39adcb2b559b61e6e0a1aecd5ec0')
|
2023-06-06 12:35:27 +00:00
|
|
|
|
2022-01-09 01:37:03 +00:00
|
|
|
build() {
|
2022-07-23 00:19:46 +00:00
|
|
|
cmake -B build -S $pkgbase-$pkgver \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
2024-05-09 12:50:44 +00:00
|
|
|
-DCMAKE_CXX_STANDARD=20 \
|
2022-07-23 00:19:46 +00:00
|
|
|
-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 \
|
2022-12-21 15:32:06 +00:00
|
|
|
-DGDAL_USE_JXL=ON \
|
2022-07-23 00:19:46 +00:00
|
|
|
-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 \
|
2023-11-29 21:53:04 +00:00
|
|
|
-DGDAL_USE_ZSTD=ON
|
2022-07-23 00:19:46 +00:00
|
|
|
make -C build
|
2022-01-09 01:37:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package_gdal () {
|
2022-07-23 00:19:46 +00:00
|
|
|
depends=(proj blosc crypto++ curl libdeflate expat libfreexl geos libgeotiff
|
|
|
|
giflib libjpeg-turbo json-c xz libxml2 lz4 unixodbc ocl-icd openssl
|
2023-11-29 21:53:04 +00:00
|
|
|
pcre2 libpng qhull libspatialite sqlite libtiff xerces-c zlib zstd libaec)
|
2022-11-25 03:29:29 +00:00
|
|
|
optdepends=('cfitsio: FITS support'
|
|
|
|
'hdf5: HDF5 support'
|
|
|
|
'libheif: HEIF support'
|
2022-12-21 15:32:06 +00:00
|
|
|
'libjxl: JPEG XL support'
|
2022-11-25 03:29:29 +00:00
|
|
|
'mariadb-libs: MySQL support'
|
|
|
|
'netcdf: netCDF support'
|
|
|
|
'openexr: EXR support'
|
|
|
|
'openjpeg2: JP2 support'
|
2023-12-01 01:43:27 +00:00
|
|
|
'podofo: PDF support'
|
2022-11-25 03:29:29 +00:00
|
|
|
'poppler: PDF support'
|
|
|
|
'postgresql-libs: PostgreSQL support'
|
|
|
|
'libwebp: WebP support')
|
2022-07-23 00:19:46 +00:00
|
|
|
|
|
|
|
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
|
2022-01-09 01:37:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package_python-gdal () {
|
|
|
|
pkgdesc="Python bindings for GDAL"
|
|
|
|
depends=("gdal=$pkgver" 'python-numpy')
|
|
|
|
|
2022-07-23 00:19:46 +00:00
|
|
|
install -d "${pkgdir}"/usr/{bin,lib}
|
|
|
|
mv bin/* "${pkgdir}"/usr/bin
|
|
|
|
mv lib/* "${pkgdir}"/usr/lib
|
2022-01-09 01:37:03 +00:00
|
|
|
install -dm755 "${pkgdir}"/usr/share/licenses
|
|
|
|
ln -s $pkgbase "${pkgdir}"/usr/share/licenses/$pkgname
|
2022-07-23 00:19:46 +00:00
|
|
|
# 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}
|
2022-01-09 01:37:03 +00:00
|
|
|
}
|