diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2022-06-12 17:50:12 -0500 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2022-06-12 23:51:56 +0000 |
commit | 390e7ad198709db44272cbcf513e08b412751342 (patch) | |
tree | 928a11c927868f1c9983ed111d943aed7e45cf23 | |
parent | 515083f71d5d7a2b48fa1b2d36bd3f1b25a978c1 (diff) | |
download | packages-390e7ad198709db44272cbcf513e08b412751342.tar.gz packages-390e7ad198709db44272cbcf513e08b412751342.tar.bz2 packages-390e7ad198709db44272cbcf513e08b412751342.tar.xz packages-390e7ad198709db44272cbcf513e08b412751342.zip |
user/eigen: Install CMake and pc files
-rw-r--r-- | user/eigen/APKBUILD | 26 |
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 |