aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-10-04 08:48:49 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-10-04 08:48:49 +0000
commit1296a3cb7e6a60473e54d3a69a910db7effb4acd (patch)
tree8418d7d6b1f7b71d37f47bffaf90f519bdd5023a
parent0771f8daf77be294e480ba9687f2211d0f660dc8 (diff)
downloadaports-1296a3cb7e6a60473e54d3a69a910db7effb4acd.tar.bz2
aports-1296a3cb7e6a60473e54d3a69a910db7effb4acd.tar.xz
main/libusb-compat: fix includes for public headers
-rw-r--r--main/libusb-compat/APKBUILD30
-rw-r--r--main/libusb-compat/fix-headers.patch10
2 files changed, 33 insertions, 7 deletions
diff --git a/main/libusb-compat/APKBUILD b/main/libusb-compat/APKBUILD
index b840016beb..88e26158f8 100644
--- a/main/libusb-compat/APKBUILD
+++ b/main/libusb-compat/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libusb-compat
pkgver=0.1.5
-pkgrel=1
+pkgrel=2
pkgdesc="Compatility for older libusb"
url="http://libusb.sourceforge.net/"
arch="all"
@@ -10,10 +10,23 @@ subpackages="$pkgname-dev"
depends=
depends_dev="libusbx-dev"
makedepends="$depends_dev"
-source="http://downloads.sourceforge.net/libusb/$pkgname-$pkgver.tar.bz2"
+source="http://downloads.sourceforge.net/libusb/$pkgname-$pkgver.tar.bz2
+ fix-headers.patch"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
build() {
- cd "$srcdir"/$pkgname-$pkgver
+ cd "$_builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -24,10 +37,13 @@ build() {
}
package() {
- cd "$srcdir"/$pkgname-$pkgver
+ cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
rm "$pkgdir"/usr/lib/*.la || return 1
}
-md5sums="2780b6a758a1e2c2943bdbf7faf740e4 libusb-compat-0.1.5.tar.bz2"
-sha256sums="404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea328bc55a libusb-compat-0.1.5.tar.bz2"
-sha512sums="fe63bd1c65e67588a83ebfdd329025ecf75f33f877fb80dd83eb528df057efb591e010416027f9054294504562299166e8e2811a7681fa1967a03baae9b88857 libusb-compat-0.1.5.tar.bz2"
+md5sums="2780b6a758a1e2c2943bdbf7faf740e4 libusb-compat-0.1.5.tar.bz2
+838bcaa34a4937f945069b79bc283a6f fix-headers.patch"
+sha256sums="404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea328bc55a libusb-compat-0.1.5.tar.bz2
+00844389cf8393a12c1f5a30659dbd7f14fa14da99d14217768cc9f14515ada2 fix-headers.patch"
+sha512sums="fe63bd1c65e67588a83ebfdd329025ecf75f33f877fb80dd83eb528df057efb591e010416027f9054294504562299166e8e2811a7681fa1967a03baae9b88857 libusb-compat-0.1.5.tar.bz2
+3abb7e90299f6cdb397b4fcf1b7af0bfc20cc3b0937e0787716109608313bc988ce3532ed88ba4d05e7d57bdaca3de4b5ce704e0a3d4bf871c48ac03103a18d7 fix-headers.patch"
diff --git a/main/libusb-compat/fix-headers.patch b/main/libusb-compat/fix-headers.patch
new file mode 100644
index 0000000000..ea9cbc3497
--- /dev/null
+++ b/main/libusb-compat/fix-headers.patch
@@ -0,0 +1,10 @@
+--- libusb-compat-0.1.5.orig/libusb/usb.h
++++ libusb-compat-0.1.5/libusb/usb.h
+@@ -25,6 +25,7 @@
+ #ifndef __USB_H__
+ #define __USB_H__
+
++#include <sys/types.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <limits.h>