aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2020-09-16 11:54:35 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-09-16 10:02:47 +0000
commit8b7ecb6079b1f13660626dbbd893ec1fe9fb9ed1 (patch)
tree9667bef8883b11444a9cc9b530db84129bdbcb70
parent5ff1af780c232c125ac453ffeb330b85c42fde64 (diff)
downloadaports-8b7ecb6079b1f13660626dbbd893ec1fe9fb9ed1.tar.gz
aports-8b7ecb6079b1f13660626dbbd893ec1fe9fb9ed1.tar.bz2
aports-8b7ecb6079b1f13660626dbbd893ec1fe9fb9ed1.tar.xz
testing/openhmd: fix BAD signature on x86
Also modernize and enable tests while I'm touching it anyway
-rw-r--r--testing/openhmd/APKBUILD10
-rw-r--r--testing/openhmd/enable-tests.patch42
2 files changed, 48 insertions, 4 deletions
diff --git a/testing/openhmd/APKBUILD b/testing/openhmd/APKBUILD
index f12ec86e86..37598b5880 100644
--- a/testing/openhmd/APKBUILD
+++ b/testing/openhmd/APKBUILD
@@ -1,16 +1,17 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=openhmd
pkgver=0.3.0
-pkgrel=1
+pkgrel=2
pkgdesc="Free and Open Source API and drivers for immersive (VR) technology"
url="http://www.openhmd.net/"
arch="all"
license="BSL-1.0"
makedepends="meson hidapi-dev"
subpackages="$pkgname-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/OpenHMD/$pkgname/archive/$pkgver.tar.gz"
+source="https://github.com/OpenHMD/OpenHMD/archive/$pkgver/OpenHMD-$pkgver.tar.gz
+ enable-tests.patch
+ "
builddir="$srcdir/OpenHMD-$pkgver"
-options="!check" # https://github.com/OpenHMD/OpenHMD/issues/248
build() {
abuild-meson \
@@ -27,4 +28,5 @@ package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C build
}
-sha512sums="20e6490287295f3de08150f1b036a821b97443a303ee404c71981f57f4ef291b50b6b83acd2dbb5e86a827c40b3fd06d790dabe4de3b0075432111d67875e7d2 openhmd-0.3.0.tar.gz"
+sha512sums="20e6490287295f3de08150f1b036a821b97443a303ee404c71981f57f4ef291b50b6b83acd2dbb5e86a827c40b3fd06d790dabe4de3b0075432111d67875e7d2 OpenHMD-0.3.0.tar.gz
+ee0e6dc7ed9db6b75a94a4b7aa95b88588b1f75e5754eccaa8ac52a9652320ba27932e13795c1dd104ef089e7768066c50b856e46ce30dbad9427a9cf70ba470 enable-tests.patch"
diff --git a/testing/openhmd/enable-tests.patch b/testing/openhmd/enable-tests.patch
new file mode 100644
index 0000000000..64d9661ce9
--- /dev/null
+++ b/testing/openhmd/enable-tests.patch
@@ -0,0 +1,42 @@
+From b50b584a2703394be08a2ad245b813b268a8e1ed Mon Sep 17 00:00:00 2001
+From: Philipp Zabel <philipp.zabel@gmail.com>
+Date: Sun, 4 Aug 2019 22:28:37 +0200
+Subject: [PATCH] meson: hook up unit tests
+
+Build the unit tests and hook them up to the ninja test target.
+---
+ meson.build | 24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+diff --git a/meson.build b/meson.build
+index 24198a4b..1e02bc10 100644
+--- a/meson.build
++++ b/meson.build
+@@ -223,3 +223,27 @@ pkg.generate(
+ url: 'http://www.openhmd.net/',
+ )
+ install_headers('include/openhmd.h', subdir: 'openhmd')
++
++
++#
++# Unit tests
++#
++
++unittests_sources = [
++ 'src/omath.c',
++ 'tests/unittests/highlevel.c',
++ 'tests/unittests/main.c',
++ 'tests/unittests/quat.c',
++ 'tests/unittests/tests.h',
++ 'tests/unittests/vec.c'
++]
++
++unittests = executable(
++ 'openhmd_unittests',
++ unittests_sources,
++ include_directories: include_directories('./include', './src'),
++ link_with: [openhmd_lib],
++ dependencies: [dep_libm, dep_threads]
++)
++
++test('unittests', unittests)