aboutsummaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2015-08-21 00:19:45 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-20 22:59:54 -0700
commit8d73e4f81c384c36e5ed3b8848253fd1e0b70692 (patch)
treee1860dd7367b1281211665f01dcfaacc397c6f54 /packaging
parente2c98def2699c6ed4b98633f780ef3faaf903335 (diff)
downloadsubsurface-8d73e4f81c384c36e5ed3b8848253fd1e0b70692.tar.gz
Connect up serial_ftdi custom serial
This connects the serial_ftdi implementation to subsurface, and builds libftdi1 for the android builds. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/android/build.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index fef8ecb55..1c72ab1b9 100644
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -28,6 +28,7 @@ LIBGIT2_VERSION=0.23.0
LIBSSH2_VERSION=1.6.0
LIBUSB_VERSION=1.0.19
OPENSSL_VERSION=1.0.1p
+LIBFTDI_VERSION=1.2
# arm or x86
export ARCH=${1-arm}
@@ -228,6 +229,25 @@ if [ ! -e $PKG_CONFIG_LIBDIR/libusb-1.0.pc ] ; then
sed -ie 's/Libs.private: -c/Libs.private: /' $PKG_CONFIG_LIBDIR/libusb-1.0.pc
fi
+if [ ! -e libftdi1-${LIBFTDI_VERSION}.tar.bz2 ] ; then
+ wget -O libftdi1-${LIBFTDI_VERSION}.tar.bz2 http://www.intra2net.com/en/developer/libftdi/download/libftdi1-${LIBFTDI_VERSION}.tar.bz2
+fi
+if [ ! -e libftdi1-${LIBFTDI_VERSION} ] ; then
+ tar -jxf libftdi1-${LIBFTDI_VERSION}.tar.bz2
+fi
+if [ ! -e $PKG_CONFIG_LIBDIR/libftdi1.pc ] ; then
+ mkdir -p libftdi1-build-$ARCH
+ pushd libftdi1-build-$ARCH
+ cmake ../libftdi1-${LIBFTDI_VERSION} -DCMAKE_C_COMPILER=${CC} -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_PREFIX_PATH=${PREFIX} -DSTATICLIBS=ON -DPYTHON_BINDINGS=OFF -DDOCUMENTATION=OFF -DFTDIPP=OFF -DBUILD_TESTS=OFF -DEXAMPLES=OFF
+ make
+ make install
+ popd
+fi
+# Blast away the shared version to force static linking
+if [ -e $PREFIX/lib/libftdi1.so ] ; then
+ rm $PREFIX/lib/libftdi1.so*
+fi
+
if [ ! -e $PKG_CONFIG_LIBDIR/libdivecomputer.pc ] ; then
mkdir -p libdivecomputer-build-$ARCH
pushd libdivecomputer-build-$ARCH
@@ -278,6 +298,7 @@ cmake $MOBILE_CMAKE \
-DNO_USERMANUAL=ON \
-DCMAKE_PREFIX_PATH:UNINITIALIZED=${QT5_ANDROID}/android_${QT_ARCH}/lib/cmake \
-DCMAKE_BUILD_TYPE=Debug \
+ -DFTDISUPPORT=ON \
$SUBSURFACE_SOURCE
make
#make install INSTALL_ROOT=android_build