diff options
author | Anton Lundin <glance@acc.umu.se> | 2015-08-21 00:19:37 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-08-20 22:52:21 -0700 |
commit | 676c1b319f3ba17eda49b7d4cfc454cd64f77818 (patch) | |
tree | 37eeffc41da9cb00604fc2dd32cce6d4e801f3a2 /packaging/android/build.sh | |
parent | 55353bda405b5c9ccdb100dabcaef0e49b36c52e (diff) | |
download | subsurface-676c1b319f3ba17eda49b7d4cfc454cd64f77818.tar.gz |
Patch libusb for android custom open function
This idea was inspired by:
https://github.com/PointCloudLibrary/mobile/blob/master/3rdparty/android/patches/libusb.patch
The whole thing is re-written from scratch but the idea came from there,
and its a way simpler way of getting a system-opened fd to the right
place than patching every call in the stack to pass a fd down.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging/android/build.sh')
-rw-r--r-- | packaging/android/build.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packaging/android/build.sh b/packaging/android/build.sh index c0d1031ac..9dee8c1a5 100644 --- a/packaging/android/build.sh +++ b/packaging/android/build.sh @@ -203,6 +203,12 @@ fi if [ ! -e libusb-${LIBUSB_VERSION} ] ; then tar -zxf libusb-${LIBUSB_VERSION}.tar.gz fi +if ! grep -q libusb_set_android_open_callback libusb-${LIBUSB_VERSION}/libusb/libusb.h ; then + # Patch in our libusb callback + pushd libusb-${LIBUSB_VERSION} + patch -p1 < $SUBSURFACE_SOURCE/packaging/android/patches/libusb-android.patch + popd +fi if [ ! -e libusb-${LIBUSB_VERSION}/configure ] ; then pushd libusb-${LIBUSB_VERSION} mkdir m4 |