blob: e8335c5e8a8a7814bf6f889a82832a4d78228bd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# Contributor: stef <l0ls0fo2i@ctrlc.hu>
# Contributor: Bradley J Chambers <brad.chambers@gmail.com>
# Maintainer: Bradley J Chambers <brad.chambers@gmail.com>
pkgname=eigen
pkgver=3.3.7
pkgrel=3
pkgdesc="Eigen is a C++ template library for linear algebra"
url="http://eigen.tuxfamily.org/index.php?title=Main_Page"
arch="noarch"
license="MPL-2.0"
options="!check" # checks take a long time, and tend to fail randomly
makedepends="cmake openblas-dev suitesparse-dev mpfr-dev fftw-dev boost-dev gmp-dev glu-dev freeglut-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::http://bitbucket.org/eigen/eigen/get/$pkgver.tar.gz
fftw-test-fix.patch
fix-build.patch
"
builddir="$srcdir/$pkgname-$pkgname"
prepare() {
mv "$builddir"-* "$builddir" # directory name contains hash
default_prepare
}
build() {
# needs -std so c11 tests are being built
CXXFLAGS="$CXXFLAGS -std=c++11" \
cmake -B build . \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=None
make -C build
}
check() {
make -C build check
}
package() {
make -C build DESTDIR="$pkgdir" install
mkdir -p "$pkgdir"/usr/share/doc/$pkgname
cp -r "$builddir"/doc/ "$pkgdir"/usr/share/doc/$pkgname
mkdir -p $pkgdir/usr/lib/pkgconfig
mv $pkgdir/usr/share/pkgconfig/eigen3.pc $pkgdir/usr/lib/pkgconfig
}
dev() {
default_dev
mkdir -p $subpkgdir/usr/share/cmake/Modules
mv $pkgdir/usr/share/eigen3/cmake/*.cmake $subpkgdir/usr/share/cmake/Modules
}
sha512sums="34cf600914cce719d61511577ef9cd26fbdcb7a6fad1d0ab8396f98b887fac6a5577d3967e84a8f56225cc50de38f3b91f34f447d14312028383e32b34ea1972 eigen-3.3.7.tar.gz
c1f9d7d8c9025b4b2b3a679f80519e494f206d7bee232cd10dd45df454b1ce6697858547bc0d956a5818481d344948704db8dbb39d04ac69ff7de99961492384 fftw-test-fix.patch
496e2b61a5fd319218338a6891dade420efa14aecd92fb9007ebf924a28e01298fa3ab5fb8c86ce02f1aa820e60ef47b18b5663d1ce316f9f1ac119b83387459 fix-build.patch"
|