aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2021-05-05 13:40:11 +0200
committerAriadne Conill <ariadne@dereferenced.org>2021-05-05 18:42:32 +0000
commit277ba993d1c3dd0ce6a228a601ee27dfc0375e67 (patch)
tree20005d1a5314f783320cb1b7f1d7c88c3ca2317e
parent1cced0fa4fa11e39d8f771c55dffd3347ef98c7a (diff)
downloadaports-277ba993d1c3dd0ce6a228a601ee27dfc0375e67.tar.gz
aports-277ba993d1c3dd0ce6a228a601ee27dfc0375e67.tar.bz2
aports-277ba993d1c3dd0ce6a228a601ee27dfc0375e67.tar.xz
community/cpd: upgrade to 0.5.3, modernize and enable tests
Also take over maintainership
-rw-r--r--community/cpd/0001-Stop-forcing-static-builds.patch27
-rw-r--r--community/cpd/APKBUILD30
2 files changed, 46 insertions, 11 deletions
diff --git a/community/cpd/0001-Stop-forcing-static-builds.patch b/community/cpd/0001-Stop-forcing-static-builds.patch
new file mode 100644
index 0000000000..a87b653aa2
--- /dev/null
+++ b/community/cpd/0001-Stop-forcing-static-builds.patch
@@ -0,0 +1,27 @@
+From 01a66a7d14f3e0ba328d8e0dd2dd597762bc5698 Mon Sep 17 00:00:00 2001
+From: Bart Ribbers <bribbers@disroot.org>
+Date: Wed, 5 May 2021 13:38:00 +0200
+Subject: [PATCH] Stop forcing static builds
+
+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 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3da0c8d..cff4da2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -66,7 +66,7 @@ else()
+ list(APPEND library-src src/gauss_transform_make_default.cpp)
+ endif()
+
+-add_library(Library-C++ STATIC ${library-src})
++add_library(Library-C++ ${library-src})
+ set_target_properties(Library-C++ PROPERTIES
+ OUTPUT_NAME cpd
+ VERSION ${CPD_VERSION}
+--
+2.31.1
+
diff --git a/community/cpd/APKBUILD b/community/cpd/APKBUILD
index 8454f82bb8..abb6ff6a59 100644
--- a/community/cpd/APKBUILD
+++ b/community/cpd/APKBUILD
@@ -1,30 +1,38 @@
# Contributor: Bradley J Chambers <brad.chambers@gmail.com>
-# Maintainer: Bradley J Chambers <brad.chambers@gmail.com>
+# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=cpd
-pkgver=0.5.1
-pkgrel=1
+pkgver=0.5.3
+pkgrel=0
pkgdesc="C++ implementation of the Coherent Point Drift point set registration algorithm."
url="https://github.com/gadomski/cpd"
arch="all !armv7 !mips !mips64" # Fails to get checksum
license="GPL-2.0-or-later"
makedepends="cmake eigen-dev fgt-dev"
subpackages="$pkgname-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/gadomski/$pkgname/archive/v$pkgver.tar.gz"
+source="https://github.com/gadomski/cpd/archive/v$pkgver/cpd-v$pkgver.tar.gz
+ 0001-Stop-forcing-static-builds.patch
+ "
build() {
- mkdir build && cd build
- cmake .. \
+ cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=None \
- -DWITH_TESTS=OFF \
+ -DWITH_TESTS=ON \
-DBUILD_SHARED_LIBS=ON \
-DEIGEN3_INCLUDE_DIR=/usr/include/eigen3
- make
+ cmake --build build
+}
+
+check() {
+ cd build
+ CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}
package() {
- cd "$builddir"/build
- make DESTDIR="$pkgdir" install
+ DESTDIR="$pkgdir" cmake --install build
}
-sha512sums="19552ae103b4a0290f4c3af170ae602fee2d8a7ac73d83d05658086484f74bbe3b841b006c9013103cb4ff953462ce96607e87522b8bca9f7ff1c22857452ce4 cpd-0.5.1.tar.gz"
+sha512sums="
+d2331681978f6906f13dc66a8eda2834f93e9af72ad59c6635b9ec6b5bc8cf458e4945e952e3f6bf82bc9bc29af4636f3325f997d4a6ffc21f9f27e1cde3c3b1 cpd-v0.5.3.tar.gz
+c9fc897486d2db611946fa060d31ac7a010dd92ffd456ccc4161bad4f5225fdc1fea2410718448a88b98d65187069e22740d00501ed15b0e1798327d3b8b7e22 0001-Stop-forcing-static-builds.patch
+"