aboutsummaryrefslogtreecommitdiffstats
path: root/community/eigen/APKBUILD
blob: 2675953795836600071db1c95be52dedb04018c2 (plain) (blame)
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
# 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.9
pkgrel=0
pkgdesc="Eigen is a C++ template library for linear algebra"
url="https://eigen.tuxfamily.org/"
arch="noarch !mips !mips64"
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="https://gitlab.com/libeigen/eigen/-/archive/$pkgver/eigen-$pkgver.tar.gz
	fftw-test-fix.patch
	fix-build.patch
	"

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="16244cc89f2e1879543232b965cbf653b3ccf10e967c8c437a41e27d8320392bdf584d8c24b8a97406ab7d1481d5154da74e0702ec1334ae6a46de83f4573a46  eigen-3.3.9.tar.gz
c1f9d7d8c9025b4b2b3a679f80519e494f206d7bee232cd10dd45df454b1ce6697858547bc0d956a5818481d344948704db8dbb39d04ac69ff7de99961492384  fftw-test-fix.patch
496e2b61a5fd319218338a6891dade420efa14aecd92fb9007ebf924a28e01298fa3ab5fb8c86ce02f1aa820e60ef47b18b5663d1ce316f9f1ac119b83387459  fix-build.patch"