1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 20:25:28 +03:00

community/fgt: upgrade to 0.4.9, modernize and enable tests

Also take over maintainership
This commit is contained in:
Bart Ribbers 2021-05-05 13:34:58 +02:00 committed by Ariadne Conill
parent 848b81f7be
commit cd67cb15cd
2 changed files with 70 additions and 18 deletions

View file

@ -0,0 +1,30 @@
From f622f8eb9c1562178065f3cd2f3fd6feaa4e3f69 Mon Sep 17 00:00:00 2001
From: Bart Ribbers <bribbers@disroot.org>
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

View file

@ -1,34 +1,56 @@
# Contributor: Bradley J Chambers <brad.chambers@gmail.com>
# Maintainer: Bradley J Chambers <brad.chambers@gmail.com>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
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
"