Subject: [PATCH] community/eigen: fix location of installed cmake files

From: Sascha Brawer <[email-masked]>
Date: Wed, 19 Feb 2020 10:14:27 +0000

Fixes https://gitlab.alpinelinux.org/alpine/aports/issues/11233
---
 community/eigen/APKBUILD | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/community/eigen/APKBUILD b/community/eigen/APKBUILD
index d0ecfd5504..54edf1902a 100644
--- a/community/eigen/APKBUILD
+++ b/community/eigen/APKBUILD
@@ -3,7 +3,7 @@
 # Maintainer: Bradley J Chambers <[email-masked]>
 pkgname=eigen
 pkgver=3.3.7
-pkgrel=2
+pkgrel=3
 pkgdesc="Eigen is a C++ template library for linear algebra"
 url="http://eigen.tuxfamily.org/index.php?title=Main_Page"
 arch="noarch"
@@ -36,19 +36,21 @@ check() {
 	make check
 }
 
-dev() {
-	default_dev
-	mkdir -p ${subpkgdir}/usr/share/cmake/Modules
-	mv $pkgdir/usr/share/eigen3/cmake/*.cmake ${subpkgdir}/usr/share/cmake/Modules
-}
-
 package() {
 	cd "$builddir/build"
 	make 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
+	mkdir -p "$pkgdir"/usr/lib/pkgconfig
+	mv "$pkgdir"/usr/share/pkgconfig/eigen3.pc "$pkgdir"/usr/lib/pkgconfig
+	rm -r "$pkgdir"/usr/share/pkgconfig
+
+	# https://gitlab.alpinelinux.org/alpine/aports/issues/11233
+	install -m755 -d "$pkgdir"/usr/lib/cmake/eigen3
+	for _f in `ls "$pkgdir"/usr/share/eigen3/cmake/*.cmake` ; do
+		install -m644 $_f "$pkgdir"/usr/lib/cmake/eigen3
+	done
+	rm -r "$pkgdir"/usr/share/eigen3/cmake
 }
 
 sha512sums="34cf600914cce719d61511577ef9cd26fbdcb7a6fad1d0ab8396f98b887fac6a5577d3967e84a8f56225cc50de38f3b91f34f447d14312028383e32b34ea1972  eigen-3.3.7.tar.gz
-- 
2.24.1