From cd67cb15cd0aaf647e94263b2e1cd2c098d34e0f Mon Sep 17 00:00:00 2001 From: Bart Ribbers Date: Wed, 5 May 2021 13:34:58 +0200 Subject: [PATCH] community/fgt: upgrade to 0.4.9, modernize and enable tests Also take over maintainership --- .../fgt/0001-Stop-forcing-static-builds.patch | 30 ++++++++++ community/fgt/APKBUILD | 58 +++++++++++++------ 2 files changed, 70 insertions(+), 18 deletions(-) create mode 100644 community/fgt/0001-Stop-forcing-static-builds.patch diff --git a/community/fgt/0001-Stop-forcing-static-builds.patch b/community/fgt/0001-Stop-forcing-static-builds.patch new file mode 100644 index 00000000000..6752d546085 --- /dev/null +++ b/community/fgt/0001-Stop-forcing-static-builds.patch @@ -0,0 +1,30 @@ +From f622f8eb9c1562178065f3cd2f3fd6feaa4e3f69 Mon Sep 17 00:00:00 2001 +From: Bart Ribbers +Date: Wed, 5 May 2021 13:30:14 +0200 +Subject: [PATCH] Stop forcing static builds + +CMakeLists.txt actually has some checks to make sure some configuration +options are valid in case of static or shared builds, but that's +completely useless as it then builds statically no matter what the user +has specified. +When not hardcoding static, the library can be build with shared libs or +without, depending on what value the user passes to -DBUILD_SHARED_LIBS +--- + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c6262f6..09036cf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -52,7 +52,6 @@ if(WITH_OPENMP) + endif() + + add_library(Library-C++ +- STATIC + src/cluster.cpp + src/direct.cpp + src/direct_tree.cpp +-- +2.31.1 + diff --git a/community/fgt/APKBUILD b/community/fgt/APKBUILD index cb0e9650aac..f775575b927 100644 --- a/community/fgt/APKBUILD +++ b/community/fgt/APKBUILD @@ -1,34 +1,56 @@ # Contributor: Bradley J Chambers -# Maintainer: Bradley J Chambers +# Maintainer: Bart Ribbers pkgname=fgt -pkgver=0.4.6 -pkgrel=1 +pkgver=0.4.9 +pkgrel=0 pkgdesc="C++ library for fast Gauss transforms." url="https://github.com/gadomski/fgt" arch="all !mips !mips64" # blocked by eigen on mips license="LGPL-2.0-or-later" makedepends="cmake eigen-dev" -install="" subpackages="$pkgname-dev" -source="$pkgname-$pkgver.tar.gz::https://github.com/gadomski/$pkgname/archive/v$pkgver.tar.gz" -builddir="$srcdir/$pkgname-$pkgver" +source="https://github.com/gadomski/fgt/archive/v$pkgver/fgt-v$pkgver.tar.gz + 0001-Stop-forcing-static-builds.patch + " build() { - cd "$builddir" + cmake -B build \ + -DCMAKE_BUILD_TYPE=None \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DWITH_TESTS=ON \ + -DBUILD_SHARED_LIBS=ON \ + -DEIGEN3_INCLUDE_DIR=/usr/include/eigen3 + cmake --build build +} - mkdir build && cd build - cmake .. \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=None \ - -DWITH_TESTS=OFF \ - -DBUILD_SHARED_LIBS=ON \ - -DEIGEN3_INCLUDE_DIR=/usr/include/eigen3 - make +check() { + cd build + + case "$CARCH" in + s390x) tests="cluster" ;; + esac + + local skipped_tests="(" + + for test in $tests; do + skipped_tests="$skipped_tests|$test" + done + + skipped_tests="$skipped_tests)" + + # CMake seems to exclude _all_ tests if we only pass "()" for some reason + if [ "$skipped_tests" == "()" ]; then + CTEST_OUTPUT_ON_FAILURE=TRUE ctest + else + CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E "$skipped_tests" + fi } package() { - cd "$builddir"/build - make DESTDIR="$pkgdir" install + DESTDIR="$pkgdir" cmake --install build } -sha512sums="b4da61b7c11e2dc526c8cbd81a4ea8a40acc12a3858dfd9b6436fac576d5efc7487c4efe30e29f7ff9c2455a6d89a70da19171bf7ec4206f13e65b2a159061df fgt-0.4.6.tar.gz" +sha512sums=" +06d850aee0144be05741ff0977a7a194e467d3666015f835acdde9ecfdfdd2ef52974f7c95a034cc1c791a58e398664de47e42ca8bcbcc1dddd8f0aaa520cc80 fgt-v0.4.9.tar.gz +8c6c673339abe4bbfcb7c2609af7456c47e12c6e27681296fef2ddd465ac92dbf1155f447d34a3e592b6cfb01de72954351ad15b7b369376806831065bbb3dec 0001-Stop-forcing-static-builds.patch +"