summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJames Spencer2019-12-11 22:17:39 +0000
committerJames Spencer2019-12-11 22:17:39 +0000
commite061cab29e0f04e40dcedd2b358030ae84578cd8 (patch)
tree250a10d4ad806edf80513168c0ef51129f8aa884 /PKGBUILD
parent5f262ed5278bbe57632657f72494a3f29543cf78 (diff)
downloadaur-libxc.tar.gz
Swap to building with cmake to support downstream packages (e.g. psi4).
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD25
1 files changed, 16 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 39b4818116b..e8452d3c282 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,26 +2,33 @@
pkgname=libxc
pkgver=4.3.4
-pkgrel=3
-pkgdesc="library of exchange-correlation functionals for density-functional theory"
+pkgrel=4
+pkgdesc="A library of exchange-correlation functionals for density-functional theory"
arch=('i686' 'x86_64')
-url="http://www.tddft.org/programs/octopus/wiki/index.php/Libxc"
+url="https://www.tddft.org/programs/libxc"
license=('MPL2')
makedepends=('gcc' 'gcc-fortran')
-optdepends=()
source=(http://www.tddft.org/programs/$pkgname/down.php?file=$pkgver/$pkgname-$pkgver.tar.gz)
sha1sums=('8c8a8fe01ee1d2ff9868657a17f751c80534829d')
options=(staticlibs)
+prepare() {
+ # Add missing file. Fixed upstream (see https://gitlab.com/libxc/libxc/commit/3f4bad352779a803020de89e271a175a72b03f85).
+ sed -i "/func_info.c/ a func_reference.c" $srcdir/$pkgname-$pkgver/CMakeLists.txt
+}
+
build() {
- cd "$srcdir/$pkgname-$pkgver"
- FCCPP='/usr/bin/cpp -P -ansi' ./configure --prefix=/usr --enable-shared
+ mkdir "$srcdir/build"
+ cd "$srcdir/build"
+ cmake $srcdir/$pkgname-$pkgver \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_SHARED_LIBS=ON \
+ -DENABLE_FORTRAN=ON \
+ -DENABLE_FORTRAN03=ON
make
}
package() {
-
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$srcdir/build"
make DESTDIR="$pkgdir/" install
-
}