Skip to content

Commit

Permalink
Revert hidapi version
Browse files Browse the repository at this point in the history
- Revert hidapi to 0.9.0 because of failed on windows cross compile
- Change build-wrapper.sh customization rule to the same as build.sh
  • Loading branch information
SPRESENSE committed Apr 4, 2023
1 parent 0e7e9b3 commit 387586e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build-wrapper.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

OPENOCDDIR=$(realpath ${1:-spresense-openocd})
OPENOCDDIR=$(realpath ${OPENOCDDIR:-spresense-openocd})

# This script uses docker container named as 'build-openocd'.
# Please run 'docker build -t build-openocd .' in this directory
Expand All @@ -9,4 +9,4 @@ OPENOCDDIR=$(realpath ${1:-spresense-openocd})
docker run -it --rm -u $(id -u):$(id -g) \
-v $(pwd):/work \
-v ${OPENOCDDIR}:/tmp/openocd build-openocd \
./build.sh $TARGET
./build.sh $1
8 changes: 7 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LIBUSB_VERSION=1.0.23
LIBUSB_ARCHIVE=libusb-${LIBUSB_VERSION}.tar.bz2

HIDAPI_REPOS=https://github.com/libusb/hidapi
HIDAPI_VERSION=0.11.0
HIDAPI_VERSION=0.9.0
HIDAPI_ARCHIVE=hidapi-${HIDAPI_VERSION}.tar.gz

# OpenOCD version would be replaced with actual version
Expand Down Expand Up @@ -134,7 +134,13 @@ install_hidapi()
mkdir ${SRCDIR}
tar zxf archives/${HIDAPI_ARCHIVE} --strip-components=1 -C ${SRCDIR}

# Do not use realpath, it can not used on macOS.
# This patch file is for macOS only.
PATCHFILE=$(pwd)/hidapi-00-configure.patch
cd ${SRCDIR}
if [ "${PLATFORM}" = "Darwin" ]; then
patch -p1 < $PATCHFILE
fi
./bootstrap || exit 1
PKG_CONFIG_PATH=${DISTDIR}/lib/pkgconfig \
./configure --prefix=${DISTDIR} ${CROSS_COMPILE} || exit 1
Expand Down

0 comments on commit 387586e

Please sign in to comment.