diff options
author | Carlos Aznarán Laos | 2021-09-29 08:23:50 -0500 |
---|---|---|
committer | Carlos Aznarán Laos | 2021-09-29 08:23:50 -0500 |
commit | da7eacfc6a70e4c975b7b44ab5a31a2f61629046 (patch) | |
tree | a1eff1b8ccd16224919bbaa7c16ed6f66920590c /PKGBUILD | |
parent | e3a2f8e5c7bb49b3910255cf2fa55ae6ba98f056 (diff) | |
download | aur-da7eacfc6a70e4c975b7b44ab5a31a2f61629046.tar.gz |
Version bump to 2.8.0, adding python bindings
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 71 |
1 files changed, 53 insertions, 18 deletions
@@ -1,25 +1,60 @@ # Maintainer: Josh Hoffer < hoffer dot joshua at gmail dot com > -pkgname=dune-functions -pkgver=2.6.0 +# Maintainer: Carlos Aznarán <caznaranl@uni.pe> +# Contributor: Lukas Böger <dev___AT___lboeger___DOT___de> +pkgbase=dune-functions +pkgname=(${pkgbase} python-${pkgbase}) +_tarver=2.8.0 +_tar="${_tarver}/${pkgbase}-${_tarver}.tar.gz" +pkgver=${_tarver} pkgrel=1 -pkgdesc='Abstractions for functions and discrete function space bases' -groups=('dune') -url='https://dune-project.org/modules/dune-functions/index.html' -arch=('any') -license=('custom') -source=("git+https://gitlab.dune-project.org/staging/${pkgname}.git#tag=v${pkgver}") -makedepends=('cmake' "dune-common=${pkgver}" "dune-typetree" "dune-localfunctions" "dune-grid" 'git') -md5sums=('SKIP') +pkgdesc="Abstractions for functions and discrete function space bases" +arch=('x86_64') +url="https://dune-project.org/modules/${pkgbase}" +license=('LGPL3' 'custom:GPL2 with runtime exception') +makedepends=('dune-localfunctions>=2.8.0' 'dune-grid>=2.8.0' 'dune-istl>=2.8.0' 'texlive-latexextra' 'texlive-pictures' 'biber' 'doxygen' 'graphviz' 'python-setuptools') +optdepends=('doxygen: Generate the class documentation from C++ sources' + 'graphviz: Graph visualization software') +source=(https://dune-project.org/download/${_tar}{,.asc}) +sha512sums=('67dbf0cb625dd2870e3e278bb2592e534c3d0c9aad6f0f350937c77b7a1f1e037077b51aad92232955a3697ecf664c7433ac7c21989b74e1544bf3714631f23f' 'SKIP') +validpgpkeys=('ABE52C516431013C5874107C3F71FE0770D47FFB') # Markus Blatt (applied mathematician and DUNE core developer) <markus@dr-blatt.de> -package() { - dunecontrol --only=${pkgname} make install DESTDIR="${pkgdir}" - install -m644 -D ${pkgname}/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - find "${pkgdir}" -type d -empty -delete +prepare() { + sed -i '7 a BUILD_ON_INSTALL' ${pkgbase}-${_tarver}/doc/manual/CMakeLists.txt + sed -i '3 a BUILD_ON_INSTALL' ${pkgbase}-${_tarver}/doc/manual/CMakeLists.txt } build() { - CMAKE_FLAGS='-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib -fPIC -DBUILD_SHARED_LIBS:BOOL=OFF' \ - dunecontrol configure --enabled-shared - dunecontrol make - } + cmake \ + -S ${pkgbase}-${_tarver} \ + -B build-cmake \ + -DCMAKE_BUILD_TYPE=None \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=TRUE \ + -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_C_COMPILER=gcc \ + -DCMAKE_CXX_COMPILER=g++ \ + -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ + -DENABLE_HEADERCHECK=ON \ + -DDUNE_ENABLE_PYTHONBINDINGS=ON \ + -DDUNE_PYTHON_INSTALL_LOCATION='none' \ + -Wno-dev + cmake --build build-cmake --target all + cd "build-cmake/python" + python setup.py build +} + +package_dune-functions() { + depends=('dune-istl>=2.8.0' 'dune-localfunctions>=2.8.0' 'dune-typetree>=2.8.0' 'dune-grid>=2.8.0') + DESTDIR="${pkgdir}" cmake --build build-cmake --target install + install -Dm644 ${pkgbase}-${_tarver}/COPYING "${pkgdir}/usr/share/licenses/${pkgbase}/LICENSE" + find "${pkgdir}" -type d -empty -delete +} +package_python-dune-functions() { + depends=('dune-functions>=2.8.0' 'python-dune-istl>=2.8.0' 'python-dune-localfunctions>=2.8.0' 'python-dune-grid>=2.8.0') + pkgdesc+=" (python bindings)" + cd "build-cmake/python" + export PYTHONHASHSEED=0 + python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build +} |