diff options
author | David Wells | 2017-04-05 23:31:24 -0400 |
---|---|---|
committer | David Wells | 2017-04-05 23:48:01 -0400 |
commit | 03b035291ebb4d9a4de402ae162815ee86cd2540 (patch) | |
tree | 9f948d336d497e14c72b45e3d5cf08799538e4d3 | |
download | aur-03b035291ebb4d9a4de402ae162815ee86cd2540.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 95 |
2 files changed, 113 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..dc5d10a31afa --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = p4est-deal-ii + pkgdesc = The parallel forest (p4est) library, built to work with deal.II (i.e., the deal-ii package) + pkgver = 2.0 + pkgrel = 1 + url = http://www.p4est.org/ + arch = i686 + arch = x86_64 + license = GPL2 + license = MIT + depends = openmpi + depends = zlib + depends = lua + options = libtool + source = https://p4est.github.io/release/p4est-2.0.tar.gz + sha1sums = f8148c503969a65230c90844f7a33bbda0f2e1c1 + +pkgname = p4est-deal-ii + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..deffabba0e0e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,95 @@ +# Maintainer: David Wells <dr wells at vt dot e d u> + +pkgname=p4est-deal-ii +_realname=p4est +pkgver=2.0 +pkgrel=1 +pkgdesc="The parallel forest (p4est) library, built to work with deal.II (i.e., the deal-ii package)" +arch=("i686" "x86_64") +url="http://www.p4est.org/" +# formally p4est is GPL2, but some bundled components are MIT +license=('GPL2' 'MIT') +options=('libtool') +# There is no way to disable building with lua if it is detected, so, for the +# sake of reproducibility, require it. +depends=('openmpi' 'zlib' 'lua') +makedepends=() +source=(https://p4est.github.io/release/p4est-2.0.tar.gz) + +sha1sums=('f8148c503969a65230c90844f7a33bbda0f2e1c1') + +install_dir=/opt/$pkgname/ + +build() { + build_dir="$srcdir/$_realname-$pkgver" + build_fast_dir="$build_dir/FAST" + build_debug_dir="$build_dir/DEBUG" + + cd $build_dir + + mkdir -p $build_fast_dir + mkdir -p $build_debug_dir + + CFLAGS_FAST="$CFLAGS" + CFLAGS_DEBUG="$DEBUG_CFLAGS" + # the standard optimized and debug flags are '-O2' and '-O0 -g' for + # p4est. This PKGBUILD defaults to the system settings instead: uncomment + # the next two lines to restore the defaults found in the original p4est + # build script packaged with deal.II. + # CFLAGS_FAST="-O2" + # CFLAGS_DEBUG="-O0 -g" + + disabled_packages=" --without-petsc --without-metis --without-blas" + disabled_packages+=" --without-lint" + options=" --enable-mpi --enable-shared --disable-vtk-binary" + options+=" --disable-mpithread --with-gnu-ld --enable-static=no" + cpp_flags=" -DSC_LOG_PRIORITY=SC_LP_ESSENTIAL -DP4EST_BACKWARD_DEALII" + + # build the optimized version + cd $build_fast_dir + "${build_dir}/configure" \ + $disabled_packages $options --prefix=$install_dir/FAST \ + CFLAGS="$CFLAGS_FAST" CPPFLAGS="$cpp_flags" + + make -C sc $MAKEFLAGS + make $MAKEFLAGS + + # build the debug version + cd $build_debug_dir + "${build_dir}/configure" \ + $disabled_packages $options --prefix=$install_dir/DEBUG \ + CFLAGS="$CFLAGS_DEBUG" CPPFLAGS="$cpp_flags" + + make -C sc $MAKEFLAGS + make $MAKEFLAGS +} + +check() { + build_dir="$srcdir/$_realname-$pkgver" + build_fast_dir="$build_dir/FAST" + build_debug_dir="$build_dir/DEBUG" + + cd $build_debug_dir + make check + + cd $build_fast_dir + make check +} + +package() { + build_dir="$srcdir/$_realname-$pkgver" + build_fast_dir="$build_dir/FAST" + build_debug_dir="$build_dir/DEBUG" + + cd $build_fast_dir + make DESTDIR="$pkgdir/" install + cd $build_debug_dir + make DESTDIR="$pkgdir/" install + + install -D -m644 "${srcdir}/${_realname}-$pkgver/sc/iniparser/LICENSE" \ + "${pkgdir}/usr/share/licenses/${_realname}-$pkgver/sc/iniparser/LICENSE" + install -D -m644 "${srcdir}/${_realname}-$pkgver/sc/libb64/LICENSE" \ + "${pkgdir}/usr/share/licenses/${_realname}-$pkgver/sc/libb64/LICENSE" + install -D -m644 "${srcdir}/${_realname}-$pkgver/README" \ + "${pkgdir}/usr/share/licenses/${_realname}-$pkgver/license.txt" +} |