summaryrefslogtreecommitdiff
path: root/user/eigen/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'user/eigen/APKBUILD')
-rw-r--r--user/eigen/APKBUILD26
1 files changed, 21 insertions, 5 deletions
diff --git a/user/eigen/APKBUILD b/user/eigen/APKBUILD
index c44ed3011..da5ad32d2 100644
--- a/user/eigen/APKBUILD
+++ b/user/eigen/APKBUILD
@@ -2,23 +2,39 @@
# Maintainer:
pkgname=eigen
pkgver=3.3.8
-pkgrel=0
+pkgrel=1
pkgdesc="Eigen is a C++ template library for linear algebra"
url="http://eigen.tuxfamily.org/index.php?title=Main_Page"
arch="noarch"
options="!check" # Headers-only: no tests are possible.
license="MPL-2.0"
depends=""
-makedepends=""
+makedepends="cmake"
subpackages="$pkgname-dev"
source="https://gitlab.com/libeigen/eigen/-/archive/$pkgver/eigen-$pkgver.tar.gz
assert-compile-error.patch
"
+build() {
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ ${CMAKE_CROSSOPTS} \
+ -Bbuild
+ # Header-only library, so there is no 'build'.
+}
+
package() {
- mkdir -p "$pkgdir"/usr/include/eigen3
- cp -r "$builddir"/Eigen "$pkgdir"/usr/include/eigen3
- cp -r "$builddir"/unsupported "$pkgdir"/usr/include/eigen3
+ make -C build DESTDIR="$pkgdir" install
+ mkdir -p "$pkgdir"/usr/lib/cmake
+ mv "$pkgdir"/usr/share/eigen3/cmake "$pkgdir"/usr/lib/cmake/Eigen3
}
sha512sums="5b4b5985b0294e07b3ed1155720cbbfea322fe9ccad0fc8b0a10060b136a9169a15d5b9cb7a434470cadd45dff0a43049edc20d2e1070005481a120212edc355 eigen-3.3.8.tar.gz