]>
Commit | Line | Data |
---|---|---|
0832e7d6 UH |
1 | #!/bin/bash |
2 | ## | |
3 | ## This file is part of the sigrok-util project. | |
4 | ## | |
25b2b9f5 | 5 | ## Copyright (C) 2013-2014 Uwe Hermann <uwe@hermann-uwe.de> |
0832e7d6 UH |
6 | ## |
7 | ## This program is free software; you can redistribute it and/or modify | |
8 | ## it under the terms of the GNU General Public License as published by | |
9 | ## the Free Software Foundation; either version 2 of the License, or | |
10 | ## (at your option) any later version. | |
11 | ## | |
12 | ## This program is distributed in the hope that it will be useful, | |
13 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ## GNU General Public License for more details. | |
16 | ## | |
17 | ## You should have received a copy of the GNU General Public License | |
18 | ## along with this program; if not, write to the Free Software | |
19 | ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
20 | ## | |
21 | ||
c28fee03 MC |
22 | set -e |
23 | ||
3bdccc55 UH |
24 | # The path where the NDK, SDK, and toolchains are located. |
25 | ANDROID_PATH=$HOME/android | |
26 | ||
e25d7d5a | 27 | # The path where the Android NDK is located. |
3bdccc55 | 28 | ANDROID_NDK=$ANDROID_PATH/android-ndk-r10c |
11b9792e | 29 | |
e25d7d5a | 30 | # The path where the Android SDK is located. |
3bdccc55 | 31 | ANDROID_SDK=$ANDROID_PATH/android-sdk-linux |
11b9792e | 32 | |
0832e7d6 | 33 | # The path where your Android toolchain directory is located. |
3bdccc55 UH |
34 | TOOLCHAIN=$ANDROID_PATH/android-arm-toolchain |
35 | # TOOLCHAIN=$ANDROID_PATH/android-mipsel-toolchain | |
36 | # TOOLCHAIN=$ANDROID_PATH/android-i686-toolchain | |
e2bb3ab1 UH |
37 | |
38 | # Select which Android toolchain to use. | |
39 | # Don't forget to also adapt TOOLCHAIN above if you change TOOLCHAIN_TRIPLET! | |
40 | TOOLCHAIN_TRIPLET=arm-linux-androideabi | |
41 | # TOOLCHAIN_TRIPLET=mipsel-linux-android | |
42 | # TOOLCHAIN_TRIPLET=i686-linux-android | |
0832e7d6 UH |
43 | |
44 | # The path where the cross-compiled packages will be installed. | |
45 | PREFIX=$HOME/sr_android | |
46 | ||
47 | # The path where to download files to and where to build packages. | |
07947dda | 48 | BUILDDIR=./build |
0832e7d6 | 49 | |
819eb05b UH |
50 | # Edit this to enable/disable/modify parallel compiles. |
51 | PARALLEL="-j 2" | |
52 | ||
0832e7d6 UH |
53 | # You usually don't need to change anything below this line. |
54 | ||
55 | # ----------------------------------------------------------------------------- | |
56 | ||
57 | VER_LIBICONV=1.14 | |
d4069d6e | 58 | VER_GETTEXT=0.19.2 |
b118df5f | 59 | VER_ZLIB=1.2.8 |
d4069d6e UH |
60 | VER_PCRE=8.35 |
61 | VER_LIBFFI=3.1 | |
62 | VER_GLIB=2.41.3 | |
63 | VER_GLIB_SHORT=2.41 | |
64 | VER_LIBSIGCXX=2.3.2 | |
65 | VER_LIBSIGCXX_SHORT=2.3 | |
66 | VER_LIBZIP=0.11.2 | |
7966c37c | 67 | VER_LIBFTDI1=1.1 |
d4069d6e | 68 | VER_LIBUSB=1.0.19 |
5451bfe2 | 69 | VER_PYTHON=3.3.3 |
11b9792e | 70 | VER_BOOST=1.55.0 |
2256009e | 71 | VER_QT=5.3.1 |
3bdccc55 UH |
72 | VER_NDK=10c |
73 | VER_SDK=23.0.2 | |
0832e7d6 UH |
74 | |
75 | SF_MIRROR=switch.dl.sourceforge.net | |
76 | ||
ec49447e | 77 | WGET="wget --quiet" |
a51ca6bd | 78 | GIT_CLONE="git clone --depth=1" |
ec49447e | 79 | |
7966c37c MC |
80 | case "$TOOLCHAIN_TRIPLET" in |
81 | arm*) TARGET_ARCH=armeabi;; | |
82 | mips*) TARGET_ARCH=mips;; | |
83 | i686*) TARGET_ARCH=x86;; | |
e25d7d5a | 84 | *) echo >&2 "Unknown prefix for TOOLCHAIN_TRIPLET."; exit 1;; |
7966c37c MC |
85 | esac |
86 | ||
0832e7d6 | 87 | # ----------------------------------------------------------------------------- |
3bdccc55 UH |
88 | |
89 | # Get the Android NDK and SDK, install required packages and toolchains. | |
90 | if [ "x$1" = "xprepare" ]; then | |
91 | mkdir -p $ANDROID_PATH | |
92 | cd $ANDROID_PATH | |
93 | ||
94 | # NDK | |
95 | $WGET http://dl.google.com/android/ndk/android-ndk-r$VER_NDK-linux-x86.bin | |
96 | chmod 700 android-ndk-r$VER_NDK-linux-x86.bin | |
97 | ./android-ndk-r$VER_NDK-linux-x86.bin | |
98 | cd android-ndk-r$VER_NDK | |
99 | ./build/tools/make-standalone-toolchain.sh --platform=android-16 \ | |
100 | --toolchain=arm-linux-androideabi-4.9 \ | |
101 | --install-dir=$ANDROID_PATH/android-arm-toolchain | |
102 | cd .. | |
103 | ||
104 | # SDK | |
105 | $WGET http://dl.google.com/android/android-sdk_r$VER_SDK-linux.tgz | |
106 | tar xfz android-sdk_r$VER_SDK-linux.tgz | |
107 | cd android-sdk-linux | |
108 | ./tools/android update sdk --no-ui --filter platform-tools,build-tools-21.1.0,android-8,android-10,android-11,android-14,android-16 | |
109 | cd .. | |
110 | ||
111 | exit | |
112 | fi | |
113 | ||
114 | # ----------------------------------------------------------------------------- | |
0832e7d6 | 115 | |
2e353a08 ML |
116 | # Remove build directory contents (if any) and create a new build dir. |
117 | rm -rf $BUILDDIR | |
118 | mkdir $BUILDDIR | |
119 | cd $BUILDDIR | |
120 | ||
e25d7d5a UH |
121 | # ----------------------------------------------------------------------------- |
122 | ||
2e353a08 | 123 | # Build host Python before we start messing with the environment. |
510f5ccb | 124 | # Don't do parallel builds, this doesn't seem to work well. |
ec49447e | 125 | $WGET http://python.org/ftp/python/$VER_PYTHON/Python-$VER_PYTHON.tar.xz |
25b2b9f5 | 126 | tar xfJ Python-$VER_PYTHON.tar.xz |
5451bfe2 | 127 | cd Python-$VER_PYTHON |
2e353a08 | 128 | ./configure |
510f5ccb | 129 | make python |
2e353a08 | 130 | mv python hostpython |
2e353a08 ML |
131 | cd .. |
132 | ||
133 | # ----------------------------------------------------------------------------- | |
134 | ||
135 | # We need to find tools in the toolchain. | |
136 | export PATH=$TOOLCHAIN/bin:$PATH | |
0832e7d6 | 137 | |
02c87af2 | 138 | # Tell pkg-config to only look for our cross-built stuff. |
226830e4 MC |
139 | export PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" |
140 | export -n PKG_CONFIG_PATH | |
141 | ||
0832e7d6 | 142 | # Define some helper variables. |
e2bb3ab1 | 143 | C="--host=$TOOLCHAIN_TRIPLET --prefix=$PREFIX" |
7966c37c | 144 | CM="-Wno-dev -DCMAKE_TOOLCHAIN_FILE=../android.toolchain.cmake -DANDROID_ABI=${TARGET_ARCH} -DCMAKE_INSTALL_PREFIX=${PREFIX} -DANDROID_STANDALONE_TOOLCHAIN=${TOOLCHAIN}" |
0832e7d6 | 145 | |
2fddc139 MC |
146 | # Look for STL, needed to build bindings |
147 | NDK_TOOLCHAIN_VERSION=`${TOOLCHAIN_TRIPLET}-gcc --version | head -1 | sed -e 's/.* \([0-9]\+\.[0-9.]\+\)\( \|.*\)$/\1/'` | |
148 | STL_BASE="${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${NDK_TOOLCHAIN_VERSION}" | |
149 | if [ -d ${STL_BASE}/include ]; then | |
150 | CPPFLAGS_STL="-I${STL_BASE}/include -I${STL_BASE}/libs/${TARGET_ARCH}/include" | |
151 | LDFLAGS_STL="-L${STL_BASE}/libs/${TARGET_ARCH} -Wl,-rpath=${STL_BASE}/libs/${TARGET_ARCH}" | |
152 | BINDINGS_CONFIG="--enable-bindings" | |
153 | else | |
154 | echo "Warning: STL unavailable, libsigrok bindings will not be built." | |
155 | CPPFLAGS_STL= | |
156 | LDFLAGS_STL= | |
157 | BINDINGS_CONFIG="--disable-bindings" | |
158 | fi | |
159 | ||
e25d7d5a UH |
160 | # ----------------------------------------------------------------------------- |
161 | ||
0832e7d6 | 162 | # Get the latest versions of config.guess/config.sub that know about Android. |
a51ca6bd | 163 | $GIT_CLONE git://git.savannah.gnu.org/config.git |
0832e7d6 | 164 | |
e25d7d5a UH |
165 | # Get a toolchain for cmake that knows about Android. |
166 | $WGET https://android-cmake.googlecode.com/hg/toolchain/android.toolchain.cmake | |
7966c37c MC |
167 | patch < ../android.toolchain.cmake.patch android.toolchain.cmake |
168 | ||
0832e7d6 UH |
169 | # ----------------------------------------------------------------------------- |
170 | ||
f7b8aa73 | 171 | # Python (needed for libsigrokdecode) |
510f5ccb | 172 | # Don't do parallel Python builds, this doesn't seem to work well. |
f7b8aa73 UH |
173 | cd Python-$VER_PYTHON |
174 | make distclean | |
175 | autoreconf | |
176 | patch -p1 < ../../Python-$VER_PYTHON.patch | |
177 | ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no ac_cv_func_pipe2=no ac_cv_func_fdatasync=no ac_cv_func_killpg=no ac_cv_func_waitid=no ac_cv_func_sigaltstack=no ./configure $C --build=x86_64-linux-gnu --disable-ipv6 | |
9a98e0d1 | 178 | sed -i "s/^#zlib/zlib/g" Modules/Setup |
510f5ccb | 179 | make PYTHON_FOR_BUILD=./hostpython install |
f7b8aa73 UH |
180 | cd .. |
181 | ||
85b46172 | 182 | # libiconv (needed for glib) |
ec49447e | 183 | $WGET http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$VER_LIBICONV.tar.gz |
85b46172 MC |
184 | tar xfz libiconv-$VER_LIBICONV.tar.gz |
185 | cd libiconv-$VER_LIBICONV | |
186 | cp -f ../config/config.guess build-aux | |
187 | cp -f ../config/config.sub build-aux | |
188 | cp -f ../config/config.guess libcharset/build-aux | |
189 | cp -f ../config/config.sub libcharset/build-aux | |
190 | ./configure $C --enable-shared | |
191 | make lib/localcharset.h | |
192 | cd libcharset | |
819eb05b | 193 | make $PARALLEL |
85b46172 MC |
194 | make install |
195 | cd ../lib | |
819eb05b | 196 | make $PARALLEL |
85b46172 MC |
197 | make install |
198 | cd .. | |
199 | test -d $PREFIX/include || mkdir $PREFIX/include | |
200 | cp include/iconv.h.inst $PREFIX/include/iconv.h | |
201 | cd .. | |
0832e7d6 | 202 | |
87ea3974 | 203 | # gettext (needed for glib) |
ec49447e | 204 | $WGET http://ftp.gnu.org/pub/gnu/gettext/gettext-$VER_GETTEXT.tar.gz |
87ea3974 MC |
205 | tar xfz gettext-$VER_GETTEXT.tar.gz |
206 | cd gettext-$VER_GETTEXT | |
207 | ./configure $C --enable-shared --disable-libasprintf | |
208 | cd gettext-runtime | |
819eb05b | 209 | make $PARALLEL |
87ea3974 MC |
210 | make install |
211 | cd ../.. | |
0832e7d6 UH |
212 | |
213 | # zlib (needed for glib and libzip) | |
ec49447e | 214 | $WGET http://zlib.net/zlib-$VER_ZLIB.tar.gz |
25b2b9f5 | 215 | tar xfz zlib-$VER_ZLIB.tar.gz |
167cb16e UH |
216 | cd zlib-$VER_ZLIB |
217 | # Note: zlib's configure doesn't understand --host, we need to pass $CC. | |
e2bb3ab1 | 218 | CC=$TOOLCHAIN_TRIPLET-gcc ./configure --prefix=$PREFIX |
819eb05b | 219 | make $PARALLEL |
c28fee03 | 220 | make install |
167cb16e | 221 | cd .. |
0832e7d6 UH |
222 | |
223 | # pcre (needed for glib) | |
ec49447e | 224 | $WGET ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$VER_PCRE.tar.gz |
25b2b9f5 | 225 | tar xfz pcre-$VER_PCRE.tar.gz |
85c9910a | 226 | cd pcre-$VER_PCRE |
091ed535 | 227 | ./configure $C --disable-cpp |
819eb05b | 228 | make $PARALLEL |
c28fee03 | 229 | make install |
85c9910a | 230 | cd .. |
0832e7d6 UH |
231 | |
232 | # libffi (needed for glib) | |
ec49447e | 233 | $WGET ftp://sourceware.org/pub/libffi/libffi-$VER_LIBFFI.tar.gz |
0832e7d6 UH |
234 | tar xfz libffi-$VER_LIBFFI.tar.gz |
235 | cd libffi-$VER_LIBFFI | |
c28fee03 | 236 | ./configure $C |
819eb05b | 237 | make $PARALLEL |
c28fee03 | 238 | make install |
0832e7d6 UH |
239 | cd .. |
240 | ||
e25d7d5a | 241 | # glib (needed for libsigrok) |
ec49447e | 242 | $WGET http://ftp.gnome.org/pub/gnome/sources/glib/$VER_GLIB_SHORT/glib-$VER_GLIB.tar.xz |
25b2b9f5 | 243 | tar xfJ glib-$VER_GLIB.tar.xz |
f7b8aa73 | 244 | cd glib-$VER_GLIB |
f0e760bb | 245 | ./autogen.sh |
559be0ff | 246 | # Note: Manual LDFLAGS/CPPFLAGS needed for libiconv, rest uses pkg-config. |
e2bb3ab1 | 247 | LDFLAGS=-L$PREFIX/lib CPPFLAGS=-I$PREFIX/include glib_cv_stack_grows=no glib_cv_uscore=no ac_cv_func_posix_getpwuid_r=no ac_cv_func_posix_getgrgid_r=no ./configure --disable-compile-warnings $C |
819eb05b | 248 | make $PARALLEL |
f0e760bb MC |
249 | make install |
250 | cd .. | |
0832e7d6 | 251 | |
e25d7d5a | 252 | # libzip (needed for libsigrok) |
ec49447e | 253 | $WGET http://www.nih.at/libzip/libzip-$VER_LIBZIP.tar.gz |
0832e7d6 UH |
254 | tar xfz libzip-$VER_LIBZIP.tar.gz |
255 | cd libzip-$VER_LIBZIP | |
256 | cp -f ../config/config.guess . | |
257 | cp -f ../config/config.sub . | |
c28fee03 | 258 | ./configure $C |
819eb05b | 259 | make $PARALLEL |
c28fee03 | 260 | make install |
0832e7d6 UH |
261 | cd .. |
262 | ||
e25d7d5a | 263 | # libusb-1.0 (needed for libsigrok) |
d4069d6e UH |
264 | $WGET http://$SF_MIRROR/project/libusb/libusb-1.0/libusb-$VER_LIBUSB/libusb-$VER_LIBUSB.tar.bz2 |
265 | tar xfj libusb-$VER_LIBUSB.tar.bz2 | |
266 | cd libusb-$VER_LIBUSB | |
c09c85b3 | 267 | patch -p1 < ../../libusb-1.0.patch |
6907ee7e | 268 | ./configure $C --disable-udev |
819eb05b | 269 | make $PARALLEL |
13b2dfdc MC |
270 | make install |
271 | cd .. | |
272 | ||
e25d7d5a | 273 | # libftdi1 (needed for libsigrok) |
7966c37c MC |
274 | $WGET http://www.intra2net.com/en/developer/libftdi/download/libftdi1-$VER_LIBFTDI1.tar.bz2 |
275 | tar xfj libftdi1-$VER_LIBFTDI1.tar.bz2 | |
276 | cd libftdi1-$VER_LIBFTDI1 | |
9773a798 | 277 | cmake $CM -DFTDIPP=no -DDOCUMENTATION=no -DEXAMPLES=no -DFTDI_EEPROM=no -DPYTHON_BINDINGS=no . |
7966c37c MC |
278 | make $PARALLEL |
279 | make install | |
280 | cd .. | |
281 | ||
900a8684 | 282 | # libserialport |
a51ca6bd | 283 | $GIT_CLONE git://sigrok.org/libserialport |
900a8684 ML |
284 | cd libserialport |
285 | ./autogen.sh | |
67b2de8a UH |
286 | mkdir build |
287 | cd build | |
288 | ../configure $C | |
83b801db | 289 | make $PARALLEL V=1 |
900a8684 | 290 | make install |
67b2de8a | 291 | cd ../.. |
900a8684 | 292 | |
2fddc139 MC |
293 | # Build dependencies for libsigrok bindings if needed |
294 | ||
295 | if [ x"$CPPFLAGS_STL" != x ]; then | |
296 | ||
297 | # libsigc++ (needed for glibmm) | |
298 | $WGET http://ftp.gnome.org/pub/gnome/sources/libsigc++/$VER_LIBSIGCXX_SHORT/libsigc++-$VER_LIBSIGCXX.tar.xz | |
25b2b9f5 | 299 | tar xfJ libsigc++-$VER_LIBSIGCXX.tar.xz |
2fddc139 MC |
300 | cd libsigc++-$VER_LIBSIGCXX |
301 | cp -f ../config/config.guess build | |
302 | cp -f ../config/config.sub build | |
9773a798 | 303 | CPPFLAGS="$CPPFLAGS_STL" LDFLAGS="$LDFLAGS_STL -lgnustl_shared" ./configure --disable-documentation $C |
2fddc139 MC |
304 | make $PARALLEL |
305 | make install | |
306 | cd .. | |
307 | ||
308 | # glibmm (needed for libsigrok bindings) | |
309 | $WGET http://ftp.gnome.org/pub/gnome/sources/glibmm/$VER_GLIB_SHORT/glibmm-$VER_GLIB.tar.xz | |
25b2b9f5 | 310 | tar xfJ glibmm-$VER_GLIB.tar.xz |
2fddc139 | 311 | cd glibmm-$VER_GLIB |
9773a798 | 312 | CPPFLAGS="$CPPFLAGS_STL" LDFLAGS="$LDFLAGS_STL -lgnustl_shared" ./configure --disable-documentation $C |
2fddc139 MC |
313 | make $PARALLEL |
314 | make install | |
315 | cd .. | |
316 | ||
317 | fi | |
318 | ||
c062d1dc | 319 | # libsigrok |
a51ca6bd | 320 | $GIT_CLONE git://sigrok.org/libsigrok |
c062d1dc MC |
321 | cd libsigrok |
322 | ./autogen.sh | |
67b2de8a UH |
323 | mkdir build |
324 | cd build | |
325 | CPPFLAGS="$CPPFLAGS_STL" LDFLAGS="$LDFLAGS_STL" ../configure $C $BINDINGS_CONFIG --datadir=/sdcard | |
83b801db | 326 | make $PARALLEL V=1 |
2fddc139 | 327 | make datadir='$(datarootdir)' install |
67b2de8a | 328 | cd ../.. |
02c87af2 | 329 | |
2fbea156 | 330 | # libsigrokdecode |
a51ca6bd | 331 | $GIT_CLONE git://sigrok.org/libsigrokdecode |
2fbea156 ML |
332 | cd libsigrokdecode |
333 | ./autogen.sh | |
67b2de8a UH |
334 | mkdir build |
335 | cd build | |
336 | ../configure $C | |
83b801db | 337 | make $PARALLEL V=1 |
2fbea156 | 338 | make install |
67b2de8a | 339 | cd ../.. |
2fbea156 ML |
340 | |
341 | # sigrok-cli | |
a51ca6bd | 342 | $GIT_CLONE git://sigrok.org/sigrok-cli |
2fbea156 ML |
343 | cd sigrok-cli |
344 | ./autogen.sh | |
67b2de8a UH |
345 | mkdir build |
346 | cd build | |
347 | ../configure $C | |
83b801db | 348 | make $PARALLEL V=1 |
2fbea156 | 349 | make install |
67b2de8a | 350 | cd ../.. |
819eb05b | 351 | |
e25d7d5a | 352 | # Check if we have all requirements to build PulseView: |
11b9792e MC |
353 | |
354 | if [ -z "$ANDROID_NDK" -o ! -d "$ANDROID_NDK" ]; then | |
e25d7d5a | 355 | echo "Android NDK not available, not building PulseView." |
11b9792e MC |
356 | exit 0 |
357 | fi | |
358 | ||
e25d7d5a UH |
359 | if [ -z "$ANDROID_SDK" -o \ |
360 | ! -d "$ANDROID_SDK"/platforms/android-8 -o \ | |
7b888971 MC |
361 | ! -d "$ANDROID_SDK"/platforms/android-10 -o \ |
362 | ! -d "$ANDROID_SDK"/platforms/android-11 -o \ | |
363 | ! -d "$ANDROID_SDK"/platforms/android-14 -o \ | |
364 | ! -d "$ANDROID_SDK"/platforms/android-16 ]; then | |
e25d7d5a | 365 | echo "Android SDK with platforms 8 10 11 14 16 not available, not building PulseView." |
11b9792e MC |
366 | exit 0 |
367 | fi | |
368 | ||
e25d7d5a UH |
369 | if [ ! -e "${ANDROID_SDK}/tools/android" ]; then |
370 | echo "Essential Android build tools not available, not building PulseView." | |
11b9792e MC |
371 | exit 0 |
372 | fi | |
373 | ||
11b9792e MC |
374 | NDK_HOST=`"$ANDROID_NDK/ndk-build" -p 2>/dev/null | awk '$1 == "HOST_TAG" { print $3 }'` |
375 | ||
e25d7d5a | 376 | # Boost (needed for PulseView) |
11b9792e MC |
377 | $WGET http://$SF_MIRROR/project/boost/boost/$VER_BOOST/boost_${VER_BOOST//./_}.tar.bz2 |
378 | tar xfj boost_${VER_BOOST//./_}.tar.bz2 | |
379 | cd boost_${VER_BOOST//./_} | |
380 | patch -p1 < ../../boost.patch | |
7744cf5c | 381 | ./bootstrap.sh --with-toolset=gcc --with-libraries=filesystem,system --without-icu |
2fddc139 | 382 | echo "using gcc : $NDK_TOOLCHAIN_VERSION : \"${TOOLCHAIN_TRIPLET}-g++\" : <cxxflags>\"-I$PREFIX/include $CPPFLAGS_STL\" <linkflags>\"-L$PREFIX/lib $LDFLAGS_STL -lgnustl_shared\" ;" > user-config.jam |
ea9301bf | 383 | ./b2 -q -d+2 --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 |
11b9792e MC |
384 | cd .. |
385 | ||
e25d7d5a | 386 | # Qt (needed for PulseView) |
7b888971 MC |
387 | $WGET http://download.qt-project.org/official_releases/qt/${VER_QT%.*}/${VER_QT}/single/qt-everywhere-opensource-src-${VER_QT}.tar.gz |
388 | tar xfz qt-everywhere-opensource-src-${VER_QT}.tar.gz | |
389 | cd qt-everywhere-opensource-src-${VER_QT} | |
11b9792e | 390 | patch -p1 < ../../android-qt.patch |
2256009e | 391 | ./configure --prefix="$PREFIX" -developer-build -xplatform android-g++ -nomake tests -nomake examples -android-sdk "$ANDROID_SDK" -android-ndk "$ANDROID_NDK" -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 -opensource -confirm-license |
30adf6b9 | 392 | make module-qtbase module-qtandroidextras module-qtsvg module-qtimageformats $PARALLEL |
7b888971 | 393 | make install |
11b9792e | 394 | cd .. |
5d1a9a53 | 395 | |
7d3d2c0c | 396 | # sigrok-androidutils |
621e2e6e | 397 | $GIT_CLONE git://sigrok.org/sigrok-androidutils |
7d3d2c0c MC |
398 | cd sigrok-androidutils |
399 | ./autogen.sh | |
400 | ./configure $C --with-android-sdk="${ANDROID_SDK}" | |
bb260ef2 | 401 | make $PARALLEL V=1 |
7d3d2c0c MC |
402 | make install |
403 | cd .. | |
404 | ||
f6a6d164 UH |
405 | # Strip all shared libs to reduce size. |
406 | find $PREFIX -iname "*.so" -exec ${TOOLCHAIN_TRIPLET}-strip -S {} \; | |
407 | ||
5d1a9a53 | 408 | # PulseView |
621e2e6e | 409 | $GIT_CLONE git://sigrok.org/pulseview |
5d1a9a53 | 410 | cd pulseview |
0c5c3b89 | 411 | cmake $CM -DANDROID_STL_PATH=${ANDROID_NDK}/sources/cxx-stl . |
bb260ef2 | 412 | make $PARALLEL VERBOSE=1 |
f6a6d164 UH |
413 | make install |
414 | ${TOOLCHAIN_TRIPLET}-strip -S libs/$TARGET_ARCH/libpulseview.so | |
1238f785 | 415 | cd android |
e25d7d5a | 416 | "${ANDROID_SDK}/tools/android" update project -p . -t android-14 -n PulseView |
aef0361e MC |
417 | ant debug |
418 | cd ../.. | |
e25d7d5a | 419 |