X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=cross-compile%2Fandroid%2Fsigrok-cross-android;h=8dd674a67cb07aa843264efff75c1e59b8d05632;hb=6afe728b63beb176c013969aa902482436efebed;hp=4a79770d580ec8e9b3cacd2118327ee2e613e95b;hpb=8a189c87c0612e2d106b7c784f806d897d077b44;p=sigrok-util.git
diff --git a/cross-compile/android/sigrok-cross-android b/cross-compile/android/sigrok-cross-android
index 4a79770..8dd674a 100755
--- a/cross-compile/android/sigrok-cross-android
+++ b/cross-compile/android/sigrok-cross-android
@@ -16,8 +16,7 @@
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+## along with this program; if not, see .
##
set -e
@@ -32,10 +31,10 @@ ANDROID_NDK=$ANDROID_PATH/android-ndk-r10e
ANDROID_SDK=$ANDROID_PATH/android-sdk-linux
# The path where your Android toolchain directory is located.
-TOOLCHAIN=$ANDROID_PATH/android-arm-toolchain
+# TOOLCHAIN=$ANDROID_PATH/android-arm-toolchain
# TOOLCHAIN=$ANDROID_PATH/android-mipsel-toolchain
# TOOLCHAIN=$ANDROID_PATH/android-i686-toolchain
-# TOOLCHAIN=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86
+TOOLCHAIN=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86
# TOOLCHAIN=$ANDROID_NDK/toolchains/x86-4.9/prebuilt/linux-x86
# TOOLCHAIN=$ANDROID_NDK/toolchains/mipsel-linux-android-4.9/prebuilt/linux-x86
@@ -62,26 +61,27 @@ PARALLEL="-j 2"
# -----------------------------------------------------------------------------
VER_LIBICONV=1.14
-VER_GETTEXT=0.19.5.1
-VER_ZLIB=1.2.8
-VER_PCRE=8.37
+VER_GETTEXT=0.19.7
+VER_ZLIB=1.2.11
+VER_PCRE=8.38
VER_LIBFFI=3.2.1
-VER_GLIB=2.45.4
-VER_GLIB_SHORT=2.45
-VER_GLIBMM=2.45.41
-VER_GLIBMM_SHORT=2.45
-VER_LIBSIGCXX=2.5.1
-VER_LIBSIGCXX_SHORT=2.5
-VER_LIBZIP=0.11.2
+VER_GLIB=2.48.1
+VER_GLIB_SHORT=2.48
+VER_GLIBMM=2.48.1
+VER_GLIBMM_SHORT=2.48
+VER_LIBSIGCXX=2.9.2
+VER_LIBSIGCXX_SHORT=2.9
+VER_LIBZIP=1.1
VER_LIBFTDI1=1.2
VER_LIBUSB=1.0.19
VER_PYTHON=3.3.3
VER_BOOST=1.58.0
-VER_QT=5.4.1
-VER_SIGROK_FIRMWARE_FX2LAFW=0.1.2
+VER_QT=5.6.0
+VER_QT_SHORT=5.6
+VER_SIGROK_FIRMWARE_FX2LAFW=0.1.3
VER_NDK=10e
-VER_SDK=24.3.3
-VER_AND_BT=22.0.1 # Android build tools version
+VER_SDK=24.4.1
+VER_AND_BT=23.0.2 # Android build tools version
VER_AND_API=16 # Target Android API version
SF_MIRROR=download.sourceforge.net
@@ -207,10 +207,10 @@ fi
# -----------------------------------------------------------------------------
# Get the latest versions of config.guess/config.sub that know about Android.
-$GIT_CLONE git://git.savannah.gnu.org/config.git
+$GIT_CLONE http://git.savannah.gnu.org/r/config.git
# Get a toolchain for cmake that knows about Android.
-$WGET https://android-cmake.googlecode.com/hg/toolchain/android.toolchain.cmake
+$WGET https://raw.githubusercontent.com/arithran/android-cmake/master/toolchain/android.toolchain.cmake
patch < ../android.toolchain.cmake.patch android.toolchain.cmake
# -----------------------------------------------------------------------------
@@ -270,10 +270,10 @@ make install $V
cd ..
# pcre (needed for glib)
-$WGET ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$VER_PCRE.tar.gz
+$WGET https://ftp.pcre.org/pub/pcre/pcre-$VER_PCRE.tar.gz
tar xfz pcre-$VER_PCRE.tar.gz
cd pcre-$VER_PCRE
-./configure $C --disable-cpp
+./configure $C --disable-cpp --enable-utf --enable-unicode-properties
make $PARALLEL $V
make install $V
cd ..
@@ -371,7 +371,7 @@ cd libsigrok
./autogen.sh
mkdir build
cd build
-CPPFLAGS="$CPPFLAGS_STL" LDFLAGS="$LDFLAGS_STL" ../configure $C $BINDINGS_CONFIG --datadir=/sdcard
+CPPFLAGS="$CPPFLAGS_STL" LDFLAGS="$LDFLAGS_STL" JAVAC="javac -source 1.6 -target 1.6" ../configure $C $BINDINGS_CONFIG --datadir=/sdcard
make $PARALLEL $V
make datadir='$(datarootdir)' install $V
cd ../..
@@ -439,14 +439,15 @@ NDK_HOST=`"$ANDROID_NDK/ndk-build" -p 2>/dev/null | awk '$1 == "HOST_TAG" { prin
$WGET http://$SF_MIRROR/project/boost/boost/$VER_BOOST/boost_${VER_BOOST//./_}.tar.bz2
tar xfj boost_${VER_BOOST//./_}.tar.bz2
cd boost_${VER_BOOST//./_}
-CC= ./bootstrap.sh --with-toolset=gcc --with-libraries=filesystem,system,thread,test --without-icu
+patch -p0 < ../../boost_wchar.patch
+CC= ./bootstrap.sh --with-toolset=gcc --with-libraries=filesystem,system,thread,serialization,test --without-icu
echo "using gcc : $NDK_TOOLCHAIN_VERSION : \"${TOOLCHAIN_TRIPLET}-g++\" : \"$SYSROOT -I$PREFIX/include $CPPFLAGS_STL\" \"$SYSROOT -L$PREFIX/lib $LDFLAGS_STL -lgnustl_shared\" ;" > user-config.jam
./b2 -q -d+2 --ignore-site-config --user-config=user-config.jam toolset=gcc variant=release link=shared threading=multi runtime-link=shared target-os=android --prefix=$PREFIX --layout=system install $PARALLEL
cd ..
# Qt (needed for PulseView)
-$WGET http://download.qt-project.org/official_releases/qt/${VER_QT%.*}/${VER_QT}/single/qt-everywhere-opensource-src-${VER_QT}.tar.gz
-tar xfz qt-everywhere-opensource-src-${VER_QT}.tar.gz
+$WGET http://download.qt.io/official_releases/qt/${VER_QT_SHORT}/${VER_QT}/single/qt-everywhere-opensource-src-${VER_QT}.tar.xz
+tar xfi qt-everywhere-opensource-src-${VER_QT}.tar.xz
cd qt-everywhere-opensource-src-${VER_QT}
patch -p1 < ../../android-qt.patch
CC= CXX= ./configure \
@@ -460,12 +461,18 @@ CC= CXX= ./configure \
-android-ndk-host "$NDK_HOST" \
-android-arch "$TARGET_ARCH" \
-android-toolchain-version "$NDK_TOOLCHAIN_VERSION" \
- -skip qttranslations \
- -skip qtwebkit \
- -skip qtserialport \
- -skip qtwebkit-examples \
- -skip qtlocation \
-skip qtconnectivity \
+ -skip qtdeclarative \
+ -skip qtlocation \
+ -skip qtmultimedia \
+ -skip qtscript \
+ -skip qtsensors \
+ -skip qtserialport \
+ -skip qttools \
+ -skip qttranslations \
+ -skip qtwebchannel \
+ -skip qtwebsockets \
+ -skip qtxmlpatterns \
-opensource -confirm-license -silent
export ANDROID_API_VERSION=android-$VER_AND_API
export ANDROID_BUILD_TOOLS_REVISION=$VER_AND_BT
@@ -488,9 +495,10 @@ find $PREFIX -iname "*.so" -exec ${TOOLCHAIN_TRIPLET}-strip -S {} \;
# PulseView
$GIT_CLONE git://sigrok.org/pulseview
cd pulseview
+patch -p1 < ../../pv_cmake_pkgconfig_fix.patch
+sed -i -e "s,\t\tandroid:versionName=.*$,\t\tandroid:versionName=\"`date -Iseconds`\"," android/AndroidManifest.xml
cmake $CM -DENABLE_TESTS=y .
make $PARALLEL $V
-make install $V
${TOOLCHAIN_TRIPLET}-strip -S libs/$TARGET_ARCH/libpulseview.so
cd android
"${ANDROID_SDK}/tools/android" update project -p . -t android-$VER_AND_API -n PulseView