void-packages/srcpkgs/libgdal/template

74 lines
2.1 KiB
Bash

# Template file for 'libgdal'
pkgname=libgdal
version=3.5.3
revision=12
build_style=cmake
build_helper=python3
configure_args="-DGDAL_USE_OPENCL=ON
-DPython_NumPy_INCLUDE_DIR=/${py3_sitelib}/numpy/core/include/numpy"
hostmakedepends="pkg-config bison swig python3-numpy python3-setuptools"
makedepends="python3-devel freexl-devel c-blosc-devel geos-devel expat-devel
jasper-devel giflib-devel json-c-devel libcurl-devel libopenexr-devel
libjpeg-turbo-devel libpng-devel tiff-devel libqhull-devel libwebp-devel
libxml2-devel liblzma-devel zlib-devel libzstd-devel libdeflate-devel
netcdf-devel OpenCL-Headers pcre2-devel proj-devel sqlite-devel
ocl-icd-devel libxerces-c-devel libspatialite-devel
postgresql-libs-devel"
checkdepends="python3-pytest"
short_desc="Geospatial Data Abstraction Library"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://www.gdal.org"
changelog="https://raw.githubusercontent.com/OSGeo/gdal/master/NEWS.md"
distfiles="https://download.osgeo.org/gdal/${version}/gdal-${version}.tar.xz"
checksum=d32223ddf145aafbbaec5ccfa5dbc164147fb3348a3413057f9b1600bb5b3890
python_version=3
if [ -z "$CROSS_BUILD" ]; then
makedepends+=" hdf5-devel"
case "$XBPS_TARGET_MACHINE" in
ppc|ppc-musl) ;;
*) makedepends+=" armadillo-devel";;
esac
fi
# "error: static assertion failed: OFF_T should be 64 bits !"
if [ "$XBPS_TARGET_WORDSIZE" = "64" ]; then
makedepends+=" cfitsio-devel"
fi
post_install() {
vlicense LICENSE.TXT
}
libgdal-tools_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - tools"
pkg_install() {
vmove usr/share/man/man1
vmove usr/share/bash-completion
vmove usr/bin
}
}
libgdal-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/bin/gdal-config
vmove usr/share/man/man1/gdal-config.1
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/lib/cmake
vmove "usr/lib/*.so"
}
}
libgdal-python3_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - Python 3 bindings"
pkg_install() {
vmove ${py3_sitelib}
}
}