Skip to content

Commit 276773f

Browse files
committed
Restore udev and libhid on linux
new pkg-config is needed to compile on debian7 (requires glib-2.0 > 2.16)
1 parent 6e42af8 commit 276773f

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

libhidapi.build.bash

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,9 @@ fi
2626

2727
if [[ $TARGET_OS == "GNU/Linux" ]] ; then
2828

29-
git clone https://github.com/gentoo/eudev.git --depth 1 -b v3.0
29+
git clone https://github.com/gentoo/eudev.git --depth 1
3030
cd eudev
31-
#./autogen.sh
32-
libtoolize --force
33-
aclocal
34-
autoheader
35-
automake --force-missing --add-missing
36-
autoconf
31+
./autogen.sh
3732
./configure --enable-static --disable-gudev --disable-introspection --disable-shared --disable-blkid --disable-kmod --disable-manpages --prefix=$PREFIX $CONFARGS
3833
make clean
3934
make -j4
@@ -45,14 +40,13 @@ fi
4540

4641
git clone https://github.com/signal11/hidapi.git --depth 1
4742

48-
CFLAGS="-I$PREFIX/include/ -L$PREFIX/lib/"
43+
export CFLAGS="-I$PREFIX/include -I$PREFIX/include/hidapi -I$PREFIX/include/libelf -I$PREFIX/include/ncurses -I$PREFIX/include/ncursesw -I$PREFIX/include/readline -I$PREFIX/include/libusb-1.0 $CFLAGS"
44+
export LDFLAGS="-L$PREFIX/lib $LDFLAGS"
4945

5046
cd hidapi
51-
CONFARGS="--prefix=$PREFIX --enable-static --disable-shared "
47+
CONFARGS="--prefix=$PREFIX --enable-static --disable-shared"
5248

53-
export PKG_CONFIG_DIR=
54-
export PKG_CONFIG_LIBDIR=$PREFIX/lib/pkgconfig:$STAGING/share/pkgconfig
55-
export PKG_CONFIG_SYSROOT_DIR=$PREFIX
49+
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
5650

5751
if [[ $CROSS_COMPILE != "" ]] ; then
5852
CONFARGS="$CONFARGS --host=$CROSS_COMPILE_HOST"

0 commit comments

Comments
 (0)