# Maintainer: Jan Kohnert # Contributor: Miguel de Val-Borro # Contributor: James Tappin # Contributor: Orlando Garcia Feal pkgname=gnudatalanguage pkgver=1.0.4 pkgrel=3 pkgdesc="An IDL (Interactive Data Language) compatible incremental compiler (ie. runs IDL programs)" arch=("i686" "x86_64") url="https://gnudatalanguage.github.io/" license=("GPL-2.0-or-later") depends=("eccodes" "expat" "fftw" "gcc-libs" "glibc" "glpk" "graphicsmagick" "gsl" "hdf4" "hdf5" "libgeotiff" "libpng" "libtiff" "libtirpc" "libx11" "openmpi" "plplot" "proj" "python" "readline" "shapelib" "udunits" "wxwidgets-common" "wxwidgets-gtk3" "zlib") makedepends=("cmake" "eigen" "python-numpy") checkdepends=("openssh") optdepends=("cuda") source=("$pkgname-$pkgver.tar.gz::https://github.com/gnudatalanguage/gdl/releases/download/v${pkgver}/gdl-v${pkgver}.tar.gz" "gdl.profile" "gdl-cmake.patch") sha512sums=("3206bdd88b0478493221c0552e62620f1c9acbfec6f1900d73d932caae12401bf825e8893c81f844965f79e332bedb6ea99e6ea6f2b21427022efa60d1326eb0" "b3a3589d2ce8eb5d49c902aa9bc43df0a0fcc369d17deb060026d34fa821881a212ce6aa02edc7ea6c0476b2faacc7455e467af7b5baf672e2653b71b162190f" "bcb0f55f7f5a203a3f976e7b258019f425aeb8bb1534a381e4b586ad35d62620d5e7d3f5fe7918e29a0634a6df99a5f86a2caa4f62ce4a1e8ef4c647ea860f65") prepare() { cd "${srcdir}/gdl-v1.0.4" patch -p1 -i ../gdl-cmake.patch } build() { cd "${srcdir}/gdl-v1.0.4" if [[ -d build ]]; then rm -r build fi mkdir build cd build cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/usr -DGDL_LIB_DIR="/lib/${pkgname}" \ -DEIGEN3=ON -DFFTW=ON -DGLPK=ON -DGRAPHICSMAGICK=ON -DGRIB=ON -DHDF5=ON \ -DHDF=ON -DHDFDIR=/opt/hdf4 -DLIBPROJ=ON -DMAGICK=OFF -DMPI=ON -DNETCDF=OFF \ -DPYTHON=ON -DPYTHONVERSION=3 -DPYTHON_MODULE=OFF -DQHULL=ON -DREADLINE=ON \ -DSHAPELIB=ON -DUDUNITS2=ON .. make } check() { cd "${srcdir}/gdl-v1.0.4/build" # we need *..driver_info files, those are installed but not in while IFS= read -r -d '' file do base=$(basename "${file}" .so) cp ../src/plplotdriver/"${base}".driver_info src/plplotdriver/"${base}".driver_info done < <(find src/plplotdriver -name \*.so -print0) PLPLOT_DRV_DIR="src/plplotdriver/" ctest --output-on-failure } package() { cd "${srcdir}/gdl-v1.0.4/build" make DESTDIR="${pkgdir}" install install -D -m755 ../../gdl.profile "${pkgdir}/etc/profile.d/gdl.sh" install -D -m644 -t "${pkgdir}/usr/share/doc/${pkgname}" ../{AUTHORS,HACKING,NEWS,README} install -D -m644 -t "${pkgdir}/usr/share/applications" ../doc/gdl.desktop }