]> sigrok.org Git - sigrok-util.git/blobdiff - cross-compile/android/sigrok-cross-android
sigrok-cross-android: Set "android:versionName" to a timestamp.
[sigrok-util.git] / cross-compile / android / sigrok-cross-android
index ea67d6b7ae4de705b7404d5108d0ff95d304cc4c..8dd674a67cb07aa843264efff75c1e59b8d05632 100755 (executable)
@@ -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 <http://www.gnu.org/licenses/>.
 ##
 
 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
 
@@ -63,7 +62,7 @@ PARALLEL="-j 2"
 
 VER_LIBICONV=1.14
 VER_GETTEXT=0.19.7
-VER_ZLIB=1.2.8
+VER_ZLIB=1.2.11
 VER_PCRE=8.38
 VER_LIBFFI=3.2.1
 VER_GLIB=2.48.1
@@ -271,7 +270,7 @@ 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 --enable-utf --enable-unicode-properties
@@ -372,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 ../..
@@ -497,6 +496,7 @@ find $PREFIX -iname "*.so" -exec ${TOOLCHAIN_TRIPLET}-strip -S {} \;
 $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
 ${TOOLCHAIN_TRIPLET}-strip -S libs/$TARGET_ARCH/libpulseview.so