From 2fce3707fc6c8e365574d14fe8d262e935cb404c Mon Sep 17 00:00:00 2001 From: Luca Longinotti Date: Mon, 8 Jul 2013 17:05:35 +0200 Subject: [PATCH] Make libusbx-1.0.15 the only default stable provider for all systems. Add libusbx-1.0.16-rc3 as an option to test the new upcoming release. With 1.0.16 libusb and libusbx are merging back together, so the separation doesn't make sense anymore. The 1.0.16 RCs might give better results on MacOS X, lots of work has gone in the Darwin backend. Defaults to stable, but just set LIBUSB="beta" in build/common.sh to switch to 1.0.16 RCs. --- src/main/c/build/common.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/main/c/build/common.sh b/src/main/c/build/common.sh index 8b0f99a..b89d858 100644 --- a/src/main/c/build/common.sh +++ b/src/main/c/build/common.sh @@ -2,27 +2,28 @@ cd "$(dirname $0)" SRCDIR="$(pwd)/.." TMPDIR="$SRCDIR/tmp" DOWNLOADS="$SRCDIR/downloads" -LIBUSB="libusbx" -LIBUSB_VERSION="1.0.16" -LIBUSB_RC="-rc8" -LIBUSBX_VERSION="1.0.15" -LIBUSBX_RC="" + +LIBUSB="beta" +LIBUSB_STABLE_VERSION="1.0.15" +LIBUSB_STABLE_RC="" +LIBUSB_BETA_VERSION="1.0.16" +LIBUSB_BETA_RC="-rc3" build() { - if [ "$LIBUSB" = "libusbx" ] + if [ "$LIBUSB" = "stable" ] then - LIBUSB_NAME="libusbx-$LIBUSBX_VERSION$LIBUSBX_RC" + LIBUSB_NAME="libusbx-$LIBUSB_STABLE_VERSION$LIBUSB_STABLE_RC" LIBUSB_ARCHIVE="$LIBUSB_NAME.tar.bz2" - LIBUSB_URL="http://downloads.sf.net/project/libusbx/releases/$LIBUSBX_VERSION/source/$LIBUSB_ARCHIVE" + LIBUSB_URL="http://downloads.sf.net/project/libusbx/releases/$LIBUSB_STABLE_VERSION/source/$LIBUSB_ARCHIVE" else - LIBUSB_NAME="libusb-$LIBUSB_VERSION$LIBUSB_RC" + LIBUSB_NAME="libusbx-$LIBUSB_BETA_VERSION$LIBUSB_BETA_RC" LIBUSB_ARCHIVE="$LIBUSB_NAME.tar.bz2" - LIBUSB_URL="http://downloads.sf.net/project/libusb/libusb-1.0/libusb-$LIBUSB_VERSION$LIBUSB_RC/$LIBUSB_ARCHIVE" + LIBUSB_URL="http://downloads.sf.net/project/libusbx/releases/$LIBUSB_BETA_VERSION/source/$LIBUSB_ARCHIVE" fi DISTDIR="$SRCDIR/../resources/de/ailis/usb4java/libusb/$OS-$ARCH" - + # Clean up rm -rf "$TMPDIR" rm -rf "$DISTDIR" @@ -62,7 +63,7 @@ build() CFLAGS="$CFLAGS $USB4JAVA_CFLAGS" \ ./configure --prefix=/ --host="$HOST" $USB4JAVA_CONFIG make clean install-strip DESTDIR="$TMPDIR" - + # Copy dist files to java resources directory mkdir -p "$DISTDIR" cp -faL 2>/dev/null \