summaryrefslogtreecommitdiff
path: root/user/eigen
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2022-06-12 17:50:12 -0500
committerZach van Rijn <me@zv.io>2022-10-21 18:34:01 -0500
commit90cb89eb706f0b942bde579137fdcfbdaeca4bf6 (patch)
treed074eead00c4af9327eddfcc18798584ab2ce39e /user/eigen
parent174e05d0ae526325544f537b6280f2a77ea1b55b (diff)
downloadpackages-90cb89eb706f0b942bde579137fdcfbdaeca4bf6.tar.gz
packages-90cb89eb706f0b942bde579137fdcfbdaeca4bf6.tar.bz2
packages-90cb89eb706f0b942bde579137fdcfbdaeca4bf6.tar.xz
packages-90cb89eb706f0b942bde579137fdcfbdaeca4bf6.zip
user/eigen: Install CMake and pc files
Diffstat (limited to 'user/eigen')
-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