aboutsummaryrefslogtreecommitdiffstats
path: root/testing/hidapi
diff options
context:
space:
mode:
authorMarian Buschsieweke <marian.buschsieweke@ovgu.de>2019-01-28 14:43:23 +0100
committerHenrik Riomar <henrik.riomar@gmail.com>2019-02-01 20:31:15 +0100
commit7e33ed7daa00f7469d1bda10cc2b915c5aea6e6c (patch)
tree9649754dec5992c32ea9b57d212139fa684d8b7b /testing/hidapi
parent1428b7c93ed06fb5f1392202b2127a26f64467ce (diff)
downloadaports-7e33ed7daa00f7469d1bda10cc2b915c5aea6e6c.tar.bz2
aports-7e33ed7daa00f7469d1bda10cc2b915c5aea6e6c.tar.xz
testing/hidapi: Fixed build
Diffstat (limited to 'testing/hidapi')
-rw-r--r--testing/hidapi/APKBUILD10
-rw-r--r--testing/hidapi/libusb_include_path.patch12
2 files changed, 19 insertions, 3 deletions
diff --git a/testing/hidapi/APKBUILD b/testing/hidapi/APKBUILD
index 6397d367b7..370985f7bb 100644
--- a/testing/hidapi/APKBUILD
+++ b/testing/hidapi/APKBUILD
@@ -14,7 +14,8 @@ options="!check"
makedepends="libusb-dev libtool eudev-dev linux-headers autoconf automake"
install=""
subpackages="$pkgname-dev $pkgname-doc"
-source="$pkgname-$pkgver.tar.gz::https://github.com/signal11/$pkgname/archive/$pkgname-${_relver}.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/signal11/$pkgname/archive/$pkgname-${_relver}.tar.gz
+ libusb_include_path.patch"
builddir="$srcdir/$pkgname-$pkgname-$_relver"
prepare() {
@@ -25,7 +26,9 @@ prepare() {
build() {
cd "$builddir"
- ./configure \
+ # Linker flags generated by automake are broken. It is easier to work
+ # around by setting LDFLAGS env than messing with automake.
+ LDFLAGS="$LDFLAGS -lusb-1.0 -ludev" ./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
@@ -44,4 +47,5 @@ package() {
"$pkgdir"/usr/share/licenses/$pkgname
}
-sha512sums="4529d74e715c47d788b533d94bf0ef35fa773240c9a59558d30c5ecc78cf46961de368f9385f5d84d378eaf8d4e941d553341e839674e562ccfcf52726620a65 hidapi-0.8.0_rc1.tar.gz"
+sha512sums="4529d74e715c47d788b533d94bf0ef35fa773240c9a59558d30c5ecc78cf46961de368f9385f5d84d378eaf8d4e941d553341e839674e562ccfcf52726620a65 hidapi-0.8.0_rc1.tar.gz
+94eabf809049d82585599787768bcfab795e400593f130c98c4fdf0db53629f251e5aaa39a7a469b6ff3d240f5b1edb1b2f099bf6034a6dcfa182dc2dae851a0 libusb_include_path.patch"
diff --git a/testing/hidapi/libusb_include_path.patch b/testing/hidapi/libusb_include_path.patch
new file mode 100644
index 0000000000..2615d363a8
--- /dev/null
+++ b/testing/hidapi/libusb_include_path.patch
@@ -0,0 +1,12 @@
+diff -rupN hidapi-hidapi-0.8.0-rc1-old/libusb/hid.c hidapi-hidapi-0.8.0-rc1/libusb/hid.c
+--- hidapi-hidapi-0.8.0-rc1-old/libusb/hid.c 2019-01-23 10:46:10.388569561 +0100
++++ hidapi-hidapi-0.8.0-rc1/libusb/hid.c 2019-01-23 10:47:09.798295989 +0100
+@@ -44,7 +44,7 @@
+ #include <wchar.h>
+
+ /* GNU / LibUSB */
+-#include "libusb.h"
++#include "libusb-1.0/libusb.h"
+ #include "iconv.h"
+
+ #include "hidapi.h"