]> sigrok.org Git - sigrok-util.git/commitdiff
sigrok-cross-linux: Add some workarounds for FreeBSD issues.
authorUwe Hermann <redacted>
Sun, 11 Sep 2016 15:57:11 +0000 (17:57 +0200)
committerUwe Hermann <redacted>
Sun, 11 Sep 2016 15:57:11 +0000 (17:57 +0200)
cross-compile/linux/sigrok-cross-linux

index c7ae22ef05e3ec8f0a2b92376f0a445bfd783237..2a4ff9da9137de1c872011e318fd061dcc8fe8e5 100755 (executable)
@@ -36,6 +36,11 @@ BUILDDIR=./build
 # The path where the libsigrok Python bindings will be installed.
 PYPATH=$PREFIX/lib/python2.7/site-packages
 
+# JDK include path. Usually found automatically, except on FreeBSD.
+if [ `uname` = "FreeBSD" ]; then
+       JDK="--with-jni-include-path=/usr/local/openjdk7/include"
+fi
+
 # Edit this to control verbose build output.
 # V="V=1 VERBOSE=1"
 
@@ -81,7 +86,7 @@ cd libsigrok
 ./autogen.sh
 mkdir build
 cd build
-PKG_CONFIG_PATH=$P ../configure $C
+PKG_CONFIG_PATH=$P ../configure $C $JDK
 $SB make $PARALLEL $V
 PYTHONPATH=$PYPATH $SB make install $V
 $SB make check $V
@@ -128,7 +133,12 @@ cd sigrok-cli
 ./autogen.sh
 mkdir build
 cd build
-PKG_CONFIG_PATH=$P ../configure $C
+if [ `uname` = "FreeBSD" ]; then
+       # Temporary fix for: http://sigrok.org/bugzilla/show_bug.cgi?id=552
+       PKG_CONFIG_PATH=$P ../configure $C LDFLAGS=-lusb
+else
+       PKG_CONFIG_PATH=$P ../configure $C
+fi
 $SB make $PARALLEL $V
 make install $V
 cd ../..