From 0a8a76983fb6f818d9b22cb270634b191984f215 Mon Sep 17 00:00:00 2001 From: GRRedWings Date: Wed, 6 Jan 2016 15:51:01 -0500 Subject: [PATCH 01/26] Update build.sh Add the new patch file to patch the setup.py file. This is needed by us to pull in the requests package. --- mk/python/3.4.3/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/mk/python/3.4.3/build.sh b/mk/python/3.4.3/build.sh index d54fe998..7d857fcb 100644 --- a/mk/python/3.4.3/build.sh +++ b/mk/python/3.4.3/build.sh @@ -19,6 +19,7 @@ patch -p1 < "${FILESDIR}/${PACKAGE}-cross-compile.patch" || exit 1 patch -p1 < "${FILESDIR}/${PACKAGE}-python-misc.patch" || exit 1 patch -p1 < "${FILESDIR}/${PACKAGE}-android-locale.patch" || exit 1 patch -Ep1 < "${FILESDIR}/${PACKAGE}-android-libmpdec.patch" || exit 1 +patch -Ep1 < "${FILESDIR}/${PACKAGE}-setup.patch" || exit 1 [[ "${NDK_REV}" != 10* ]] && (patch -p1 < "${FILESDIR}/${PACKAGE}-android-missing-getdents64-definition.patch" || exit 1) patch -p1 < "${FILESDIR}/${PACKAGE}-android-misc.patch" || exit 1 From 38c531044c6d62f111ff9bc76d9cdee47205d9ef Mon Sep 17 00:00:00 2001 From: GRRedWings Date: Wed, 6 Jan 2016 15:53:47 -0500 Subject: [PATCH 02/26] python-3.4.3-setup.patch This is the patch file to allow the proper libraries to be loaded for audioop.c and selectmodule.c --- mk/python/3.4.3/python-3.4.3-setup.patch | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 mk/python/3.4.3/python-3.4.3-setup.patch diff --git a/mk/python/3.4.3/python-3.4.3-setup.patch b/mk/python/3.4.3/python-3.4.3-setup.patch new file mode 100644 index 00000000..26fd0467 --- /dev/null +++ b/mk/python/3.4.3/python-3.4.3-setup.patch @@ -0,0 +1,28 @@ +diff -Nru Python-3.4.3/setup.py Python-3.4.3-android/setup.py > Python-3.4.3-setup.patch +--- Python-3.4.3/setup.py 2016-01-06 09:22:17.000000000 -0500 ++++ Python-3.4.3-android/setup.py 2016-01-06 09:30:58.000000000 -0500 +@@ -631,7 +631,9 @@ + missing.append('spwd') + + # select(2); not on ancient System V +- exts.append( Extension('select', ['selectmodule.c']) ) ++ # pyepoll_poll needs math_libs for ceil() ++ exts.append( Extension('select', ['selectmodule.c'], ++ libraries=math_libs) ) + + # Fred Drake's interface to the Python parser + exts.append( Extension('parser', ['parsermodule.c']) ) +@@ -655,8 +657,11 @@ + # Operations on audio samples + # According to #993173, this one should actually work fine on + # 64-bit platforms. ++ ++ ++ # audioop needs math_libs for floor() in multiple functions. + exts.append( Extension('audioop', ['audioop.c'], +- libraries=['m']) ) ++ libraries=math_libs) ) + + # readline + do_readline = self.compiler.find_library_file(lib_dirs, 'readline') + From d69ec9933dc0305f719034d93c42e5b701741f6d Mon Sep 17 00:00:00 2001 From: GRRedWings Date: Thu, 7 Jan 2016 08:11:32 -0500 Subject: [PATCH 03/26] Update sources.txt Switched to a mirror as this is no longer the latest open ssl, and should be updated. --- mk/openssl/1.0.2d/sources.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/openssl/1.0.2d/sources.txt b/mk/openssl/1.0.2d/sources.txt index 62a2e775..21eb2cd5 100644 --- a/mk/openssl/1.0.2d/sources.txt +++ b/mk/openssl/1.0.2d/sources.txt @@ -1 +1 @@ -https://openssl.org/source/openssl-1.0.2d.tar.gz +http://artfiles.org/openssl.org/source//openssl-1.0.2e.tar.gz From 515268283edae1a91a204bea64e19a87487517a4 Mon Sep 17 00:00:00 2001 From: GRRedWings Date: Thu, 7 Jan 2016 08:43:39 -0500 Subject: [PATCH 04/26] Update env Update the NDK to 10e from 10d --- env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/env b/env index 45243595..0cc6cd51 100644 --- a/env +++ b/env @@ -6,9 +6,9 @@ export ANDROID_TOOL_PREFIX="${BASE}/build-tools" export ANDROID_TEST_PREFIX="${BASE}/build-vm" # SDKs and target platforms. -export NDK_REL=android-ndk-r10d +export NDK_REL=android-ndk-r10e export SDK_REL=android-sdk-r24.0.2 -export NDK_REV=10d +export NDK_REV=10e export SDK_REV=24.0.2 export ANDROID_API_LEVEL=21 export ANDROID_PLATFORM=arm From e84c9fd6d9a1fd08ed7fca82158eea20678ffe29 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 7 Jan 2016 10:54:42 -0500 Subject: [PATCH 05/26] Update the make file to use the 1.0.2e SSL library. Renamed the folders to use this. Also updated the evn to use the latest NDK and SDK. added 64bit handling --- Makefile | 2 +- env | 14 +++++++++++--- mk/openssl/1.0.2e/build.sh | 17 +++++++++++++++++ .../openssl-1.0.2e-android-ndk-target.patch | 12 ++++++++++++ mk/openssl/1.0.2e/sources.txt | 1 + 5 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 mk/openssl/1.0.2e/build.sh create mode 100644 mk/openssl/1.0.2e/openssl-1.0.2e-android-ndk-target.patch create mode 100644 mk/openssl/1.0.2e/sources.txt diff --git a/Makefile b/Makefile index 564d0a43..224011f6 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ $(eval $(call formula,readline,6.3)) python_readline: readline # Python SSL support. -$(eval $(call formula,openssl,1.0.2d)) +$(eval $(call formula,openssl,1.0.2e)) python_ssl: openssl # Python curses support. diff --git a/env b/env index 0cc6cd51..9f9ae767 100644 --- a/env +++ b/env @@ -7,12 +7,15 @@ export ANDROID_TEST_PREFIX="${BASE}/build-vm" # SDKs and target platforms. export NDK_REL=android-ndk-r10e -export SDK_REL=android-sdk-r24.0.2 +export SDK_REL=android-sdk-r24.4.1 export NDK_REV=10e -export SDK_REV=24.0.2 +export SDK_REV=24.4.1 export ANDROID_API_LEVEL=21 -export ANDROID_PLATFORM=arm +#export ANDROID_PLATFORM=arm +export ANDROID_PLATFORM=arm64 +#export ANDROID_PLATFORM=x86 export ANDROID_COMPILER=4.9 +export ANDROID_COMPILER64=clang3.6 export ANDROID_HOST=x86_64-pc-linux-gnu export ANDROID_AGREE_LICENSE_TERMS=n @@ -46,6 +49,10 @@ case "${ANDROID_PLATFORM}" in export ANDROID_TARGET=arm-linux-androideabi export ANDROID_TOOLCHAIN="arm-linux-androideabi-${ANDROID_COMPILER}" ;; + arm64) + export ANDROID_TARGET=aarch64-linux-android + export ANDROID_TOOLCHAIN="aarch64-linux-android-${ANDROID_COMPILER64}" + ;; mips) export ANDROID_TARGET=mipsel-linux-android export ANDROID_TOOLCHAIN="mipsel-linu-android-${ANDROID_COMPILER}" @@ -61,3 +68,4 @@ case "${ANDROID_PLATFORM}" in esac export BUILD_IDENTIFIER="${NDK_REV}-${ANDROID_API_LEVEL}-${ANDROID_TOOLCHAIN}" export TEST_IDENTIFIER="${SDK_REV}-${ANDROID_API_LEVEL}-${ANDROID_PLATFORM}" + diff --git a/mk/openssl/1.0.2e/build.sh b/mk/openssl/1.0.2e/build.sh new file mode 100644 index 00000000..e90ec05e --- /dev/null +++ b/mk/openssl/1.0.2e/build.sh @@ -0,0 +1,17 @@ +pushd src >/dev/null + +rm -rf "${PACKAGE}" +tar -xf "${PACKAGE}.tar.gz" || exit 1 +pushd "${PACKAGE}" >/dev/null + +[[ ! -d "${PREFIX}/share" ]] && (mkdir "${PREFIX}/share" || exit 1) +patch -p1 < "${FILESDIR}/${PACKAGE}-android-ndk-target.patch" || exit 1 +./Configure android-ndk --prefix="${PREFIX}" --openssldir="${PREFIX}/share" || exit 1 +make || exit 1 +make install_sw || exit 1 + +# Remove binaries from premises. +rm -f "${PREFIX}/bin/"{openssl,c_rehash} || exit 1 + +popd >/dev/null +popd >/dev/null diff --git a/mk/openssl/1.0.2e/openssl-1.0.2e-android-ndk-target.patch b/mk/openssl/1.0.2e/openssl-1.0.2e-android-ndk-target.patch new file mode 100644 index 00000000..1e9ddc1d --- /dev/null +++ b/mk/openssl/1.0.2e/openssl-1.0.2e-android-ndk-target.patch @@ -0,0 +1,12 @@ +diff -ru openssl-1.0.2/Configure openssl-1.0.2-android/Configure +--- openssl-1.0.2/Configure 2015-01-22 15:58:32.000000000 +0100 ++++ openssl-1.0.2-android/Configure 2015-03-02 11:23:58.000000000 +0100 +@@ -445,6 +445,7 @@ + + # Android: linux-* but without -DTERMIO and pointers to headers and libs. + "android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", ++"android-ndk","gcc:-O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so", + "android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + "android-armv7","gcc:-march=armv7-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + "android-mips","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + diff --git a/mk/openssl/1.0.2e/sources.txt b/mk/openssl/1.0.2e/sources.txt new file mode 100644 index 00000000..4d2673c2 --- /dev/null +++ b/mk/openssl/1.0.2e/sources.txt @@ -0,0 +1 @@ +http://artfiles.org/openssl.org/source/openssl-1.0.2e.tar.gz From 86f893542ed9434192bbfc8b2719e28644872f1e Mon Sep 17 00:00:00 2001 From: GRRedWings Date: Thu, 7 Jan 2016 14:09:06 -0500 Subject: [PATCH 06/26] Update env Default the build back to building 32 bit. --- env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/env b/env index 9f9ae767..4b9f7323 100644 --- a/env +++ b/env @@ -11,8 +11,8 @@ export SDK_REL=android-sdk-r24.4.1 export NDK_REV=10e export SDK_REV=24.4.1 export ANDROID_API_LEVEL=21 -#export ANDROID_PLATFORM=arm -export ANDROID_PLATFORM=arm64 +export ANDROID_PLATFORM=arm +#export ANDROID_PLATFORM=arm64 #export ANDROID_PLATFORM=x86 export ANDROID_COMPILER=4.9 export ANDROID_COMPILER64=clang3.6 From b9e4057e285f84f43fb82b293ca3f13b8771efa5 Mon Sep 17 00:00:00 2001 From: GRRedWings Date: Fri, 15 Jan 2016 14:43:28 -0500 Subject: [PATCH 07/26] Updated from Python 3.4.3 to Python 3.5.1 --- mk/python/3.4.3/sources.txt | 1 - mk/python/{3.4.3 => 3.5.1}/build.sh | 2 - .../python-3.5.1-android-libmpdec.patch} | 0 .../python-3.5.1-android-locale.patch} | 52 ++++----- .../python-3.5.1-android-misc.patch} | 109 +++++++++++------- ...droid-missing-getdents64-definition.patch} | 0 .../python-3.5.1-cross-compile.patch} | 14 +-- .../python-3.5.1-python-misc.patch} | 21 +++- .../python-3.5.1-setup.patch} | 4 +- mk/python/3.5.1/sources.txt | 1 + 10 files changed, 110 insertions(+), 94 deletions(-) delete mode 100644 mk/python/3.4.3/sources.txt rename mk/python/{3.4.3 => 3.5.1}/build.sh (88%) rename mk/python/{3.4.3/python-3.4.3-android-libmpdec.patch => 3.5.1/python-3.5.1-android-libmpdec.patch} (100%) rename mk/python/{3.4.3/python-3.4.3-android-locale.patch => 3.5.1/python-3.5.1-android-locale.patch} (88%) rename mk/python/{3.4.3/python-3.4.3-android-misc.patch => 3.5.1/python-3.5.1-android-misc.patch} (80%) rename mk/python/{3.4.3/python-3.4.3-android-missing-getdents64-definition.patch => 3.5.1/python-3.5.1-android-missing-getdents64-definition.patch} (100%) rename mk/python/{3.4.3/python-3.4.3-cross-compile.patch => 3.5.1/python-3.5.1-cross-compile.patch} (93%) rename mk/python/{3.4.3/python-3.4.3-python-misc.patch => 3.5.1/python-3.5.1-python-misc.patch} (81%) rename mk/python/{3.4.3/python-3.4.3-setup.patch => 3.5.1/python-3.5.1-setup.patch} (96%) create mode 100644 mk/python/3.5.1/sources.txt diff --git a/mk/python/3.4.3/sources.txt b/mk/python/3.4.3/sources.txt deleted file mode 100644 index 2529ed0a..00000000 --- a/mk/python/3.4.3/sources.txt +++ /dev/null @@ -1 +0,0 @@ -https://python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz diff --git a/mk/python/3.4.3/build.sh b/mk/python/3.5.1/build.sh similarity index 88% rename from mk/python/3.4.3/build.sh rename to mk/python/3.5.1/build.sh index 7d857fcb..01ed1deb 100644 --- a/mk/python/3.4.3/build.sh +++ b/mk/python/3.5.1/build.sh @@ -19,8 +19,6 @@ patch -p1 < "${FILESDIR}/${PACKAGE}-cross-compile.patch" || exit 1 patch -p1 < "${FILESDIR}/${PACKAGE}-python-misc.patch" || exit 1 patch -p1 < "${FILESDIR}/${PACKAGE}-android-locale.patch" || exit 1 patch -Ep1 < "${FILESDIR}/${PACKAGE}-android-libmpdec.patch" || exit 1 -patch -Ep1 < "${FILESDIR}/${PACKAGE}-setup.patch" || exit 1 -[[ "${NDK_REV}" != 10* ]] && (patch -p1 < "${FILESDIR}/${PACKAGE}-android-missing-getdents64-definition.patch" || exit 1) patch -p1 < "${FILESDIR}/${PACKAGE}-android-misc.patch" || exit 1 ./configure CROSS_COMPILE_TARGET=yes HOSTPYTHON="$(pwd)/hostpython" CONFIG_SITE=config.site --prefix="${PREFIX}" --host="${TARGET}" --build="${HOST}" --disable-ipv6 --enable-shared --without-ensurepip || exit 1 diff --git a/mk/python/3.4.3/python-3.4.3-android-libmpdec.patch b/mk/python/3.5.1/python-3.5.1-android-libmpdec.patch similarity index 100% rename from mk/python/3.4.3/python-3.4.3-android-libmpdec.patch rename to mk/python/3.5.1/python-3.5.1-android-libmpdec.patch diff --git a/mk/python/3.4.3/python-3.4.3-android-locale.patch b/mk/python/3.5.1/python-3.5.1-android-locale.patch similarity index 88% rename from mk/python/3.4.3/python-3.4.3-android-locale.patch rename to mk/python/3.5.1/python-3.5.1-android-locale.patch index 27ddcbbd..e535a71c 100644 --- a/mk/python/3.4.3/python-3.4.3-android-locale.patch +++ b/mk/python/3.5.1/python-3.5.1-android-locale.patch @@ -1,8 +1,8 @@ diff -ru Python-3.3.5/Modules/Setup.dist Python-3.3.5-android/Modules/Setup.dist --- Python-3.3.5/Modules/Setup.dist 2014-03-09 09:40:23.000000000 +0100 +++ Python-3.3.5-android/Modules/Setup.dist 2014-08-04 22:16:29.000000000 +0200 -@@ -118,7 +118,7 @@ - itertools itertoolsmodule.c # Functions creating iterators for efficient looping +@@ -121,7 +121,7 @@ + time timemodule.c # -lm # time operations and variables # access to ISO C locale support -_locale _localemodule.c # -lintl @@ -60,7 +60,7 @@ diff -ru Python-3.3.5/Modules/_localemodule.c Python-3.3.5-android/Modules/_loca /* if LC_NUMERIC is different in the C library, use saved value */ l = localeconv(); -@@ -189,6 +201,7 @@ +@@ -195,6 +207,7 @@ RESULT_INT(p_sign_posn); RESULT_INT(n_sign_posn); return result; @@ -71,8 +71,8 @@ diff -ru Python-3.3.5/Modules/_localemodule.c Python-3.3.5-android/Modules/_loca diff -ru Python-3.3.5/Modules/main.c Python-3.3.5-android/Modules/main.c --- Python-3.3.5/Modules/main.c 2014-03-09 09:40:27.000000000 +0100 +++ Python-3.3.5-android/Modules/main.c 2014-08-04 22:16:29.000000000 +0200 -@@ -522,7 +522,7 @@ - oldloc = strdup(setlocale(LC_ALL, NULL)); +@@ -549,7 +549,7 @@ + oldloc = _PyMem_RawStrdup(setlocale(LC_ALL, NULL)); setlocale(LC_ALL, ""); for (p = strtok(buf, ","); p != NULL; p = strtok(NULL, ",")) { -#ifdef __APPLE__ @@ -83,7 +83,7 @@ diff -ru Python-3.3.5/Modules/main.c Python-3.3.5-android/Modules/main.c diff -ru Python-3.3.5/Objects/unicodeobject.c Python-3.3.5-android/Objects/unicodeobject.c --- Python-3.3.5/Objects/unicodeobject.c 2014-03-09 09:40:30.000000000 +0100 +++ Python-3.3.5-android/Objects/unicodeobject.c 2014-08-04 22:16:29.000000000 +0200 -@@ -3295,13 +3295,22 @@ +@@ -3167,13 +3167,22 @@ static int locale_error_handler(const char *errors, int *surrogateescape) { @@ -106,7 +106,7 @@ diff -ru Python-3.3.5/Objects/unicodeobject.c Python-3.3.5-android/Objects/unico return 0; } if (strcmp(errors, "surrogateescape") == 0) { -@@ -3429,7 +3438,7 @@ +@@ -3302,7 +3311,7 @@ { #ifdef HAVE_MBCS return PyUnicode_EncodeCodePage(CP_ACP, unicode, NULL); @@ -115,7 +115,7 @@ diff -ru Python-3.3.5/Objects/unicodeobject.c Python-3.3.5-android/Objects/unico return _PyUnicode_AsUTF8String(unicode, "surrogateescape"); #else PyInterpreterState *interp = PyThreadState_GET()->interp; -@@ -3709,7 +3718,7 @@ +@@ -3586,7 +3595,7 @@ { #ifdef HAVE_MBCS return PyUnicode_DecodeMBCS(s, size, NULL); @@ -124,7 +124,7 @@ diff -ru Python-3.3.5/Objects/unicodeobject.c Python-3.3.5-android/Objects/unico return PyUnicode_DecodeUTF8Stateful(s, size, "surrogateescape", NULL); #else PyInterpreterState *interp = PyThreadState_GET()->interp; -@@ -4835,7 +4844,7 @@ +@@ -4777,7 +4786,7 @@ return NULL; } @@ -148,16 +148,16 @@ diff -ru Python-3.3.5/Python/bltinmodule.c Python-3.3.5-android/Python/bltinmodu diff -ru Python-3.3.5/Python/fileutils.c Python-3.3.5-android/Python/fileutils.c --- Python-3.3.5/Python/fileutils.c 2014-03-09 09:40:32.000000000 +0100 +++ Python-3.3.5-android/Python/fileutils.c 2014-08-04 22:16:29.000000000 +0200 -@@ -10,7 +10,7 @@ - #include - #endif +@@ -20,7 +20,7 @@ + #include + #endif /* HAVE_FCNTL_H */ -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__ANDROID__) extern wchar_t* _Py_DecodeUTF8_surrogateescape(const char *s, Py_ssize_t size); #endif -@@ -44,7 +44,7 @@ +@@ -70,7 +70,7 @@ Py_RETURN_NONE; } @@ -166,7 +166,7 @@ diff -ru Python-3.3.5/Python/fileutils.c Python-3.3.5-android/Python/fileutils.c extern int _Py_normalize_encoding(const char *, char *, size_t); /* Workaround FreeBSD and OpenIndiana locale encoding issue with the C locale. -@@ -194,7 +194,7 @@ +@@ -220,7 +220,7 @@ } #endif /* !defined(__APPLE__) && !defined(MS_WINDOWS) */ @@ -175,18 +175,18 @@ diff -ru Python-3.3.5/Python/fileutils.c Python-3.3.5-android/Python/fileutils.c static wchar_t* decode_ascii_surrogateescape(const char *arg, size_t *size) { -@@ -241,7 +241,7 @@ +@@ -272,7 +272,7 @@ wchar_t* - _Py_char2wchar(const char* arg, size_t *size) + Py_DecodeLocale(const char* arg, size_t *size) { -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__ANDROID__) wchar_t *wstr; wstr = _Py_DecodeUTF8_surrogateescape(arg, strlen(arg)); if (size != NULL) { -@@ -384,7 +384,7 @@ +@@ -423,7 +423,7 @@ char* - _Py_wchar2char(const wchar_t *text, size_t *error_pos) + Py_EncodeLocale(const wchar_t *text, size_t *error_pos) { -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__ANDROID__) @@ -196,7 +196,7 @@ diff -ru Python-3.3.5/Python/fileutils.c Python-3.3.5-android/Python/fileutils.c diff -ru Python-3.3.5/Python/formatter_unicode.c Python-3.3.5-android/Python/formatter_unicode.c --- Python-3.3.5/Python/formatter_unicode.c 2014-03-09 09:40:32.000000000 +0100 +++ Python-3.3.5-android/Python/formatter_unicode.c 2014-08-04 22:16:29.000000000 +0200 -@@ -665,6 +665,7 @@ +@@ -667,6 +667,7 @@ { switch (type) { case LT_CURRENT_LOCALE: { @@ -204,7 +204,7 @@ diff -ru Python-3.3.5/Python/formatter_unicode.c Python-3.3.5-android/Python/for struct lconv *locale_data = localeconv(); locale_info->decimal_point = PyUnicode_DecodeLocale( locale_data->decimal_point, -@@ -680,6 +681,7 @@ +@@ -682,6 +683,7 @@ } locale_info->grouping = locale_data->grouping; break; @@ -241,15 +241,3 @@ diff -ru Python-3.3.5/Python/pystrtod.c Python-3.3.5-android/Python/pystrtod.c if (decimal_point[0] != '.' || decimal_point[1] != 0) { size_t decimal_point_len = strlen(decimal_point); -diff -ru Python-3.3.5/Python/pythonrun.c Python-3.3.5-android/Python/pythonrun.c ---- Python-3.3.5/Python/pythonrun.c 2014-03-09 09:40:33.000000000 +0100 -+++ Python-3.3.5-android/Python/pythonrun.c 2014-08-04 22:16:29.000000000 +0200 -@@ -188,6 +188,8 @@ - return NULL; - } - return get_codec_name(codeset); -+#elif __ANDROID__ -+ return get_codec_name("UTF-8"); - #else - PyErr_SetNone(PyExc_NotImplementedError); - return NULL; diff --git a/mk/python/3.4.3/python-3.4.3-android-misc.patch b/mk/python/3.5.1/python-3.5.1-android-misc.patch similarity index 80% rename from mk/python/3.4.3/python-3.4.3-android-misc.patch rename to mk/python/3.5.1/python-3.5.1-android-misc.patch index 48bb11f4..303b60bf 100644 --- a/mk/python/3.4.3/python-3.4.3-android-misc.patch +++ b/mk/python/3.5.1/python-3.5.1-android-misc.patch @@ -1,7 +1,7 @@ diff -ru Python-3.3.5/Lib/platform.py Python-3.3.5-android/Lib/platform.py --- Python-3.3.5/Lib/platform.py 2014-03-09 09:40:13.000000000 +0100 +++ Python-3.3.5-android/Lib/platform.py 2014-08-04 22:19:36.000000000 +0200 -@@ -368,6 +368,63 @@ +@@ -367,6 +367,63 @@ supported_dists=supported_dists, full_distribution_name=0) @@ -68,7 +68,7 @@ diff -ru Python-3.3.5/Lib/platform.py Python-3.3.5-android/Lib/platform.py diff -ru Python-3.3.5/Lib/subprocess.py Python-3.3.5-android/Lib/subprocess.py --- Python-3.3.5/Lib/subprocess.py 2014-03-09 09:40:13.000000000 +0100 +++ Python-3.3.5-android/Lib/subprocess.py 2014-08-04 22:19:36.000000000 +0200 -@@ -1343,9 +1343,18 @@ +@@ -1433,9 +1433,18 @@ args = list(args) if shell: @@ -92,16 +92,16 @@ diff -ru Python-3.3.5/Lib/subprocess.py Python-3.3.5-android/Lib/subprocess.py diff -ru Python-3.3.5/Lib/test/test_subprocess.py Python-3.3.5-android/Lib/test/test_subprocess.py --- Python-3.3.5/Lib/test/test_subprocess.py 2014-03-09 09:40:19.000000000 +0100 +++ Python-3.3.5-android/Lib/test/test_subprocess.py 2014-08-04 22:19:36.000000000 +0200 -@@ -17,6 +17,7 @@ +@@ -18,6 +18,7 @@ import shutil import gc import textwrap +import platform try: - import resource -@@ -1356,7 +1357,10 @@ - fd, fname = mkstemp() + import threading +@@ -1517,7 +1518,10 @@ + fd, fname = tempfile.mkstemp() # reopen in text mode with open(fd, "w", errors="surrogateescape") as fobj: - fobj.write("#!/bin/sh\n") @@ -112,8 +112,8 @@ diff -ru Python-3.3.5/Lib/test/test_subprocess.py Python-3.3.5-android/Lib/test/ fobj.write("exec '%s' -c 'import sys; sys.exit(47)'\n" % sys.executable) os.chmod(fname, 0o700) -@@ -1401,7 +1405,10 @@ - fd, fname = mkstemp() +@@ -1562,7 +1566,10 @@ + fd, fname = tempfile.mkstemp() # reopen in text mode with open(fd, "w", errors="surrogateescape") as fobj: - fobj.write("#!/bin/sh\n") @@ -127,7 +127,7 @@ diff -ru Python-3.3.5/Lib/test/test_subprocess.py Python-3.3.5-android/Lib/test/ diff -ru Python-3.4.2/Modules/pwdmodule.c Python-3.4.2-android/Modules/pwdmodule.c --- Python-3.4.2/Modules/pwdmodule.c 2015-02-24 23:06:31.000000000 +0100 +++ Python-3.4.2-android/Modules/pwdmodule.c 2015-02-24 23:09:14.000000000 +0100 -@@ -72,7 +72,11 @@ +@@ -78,7 +78,11 @@ SETS(setIndex++, p->pw_passwd); PyStructSequence_SET_ITEM(v, setIndex++, _PyLong_FromUid(p->pw_uid)); PyStructSequence_SET_ITEM(v, setIndex++, _PyLong_FromGid(p->pw_gid)); @@ -142,7 +142,7 @@ diff -ru Python-3.4.2/Modules/pwdmodule.c Python-3.4.2-android/Modules/pwdmodule diff -ru Python-3.3.5/Modules/socketmodule.c Python-3.3.5-android/Modules/socketmodule.c --- Python-3.3.5/Modules/socketmodule.c 2014-03-09 09:40:28.000000000 +0100 +++ Python-3.3.5-android/Modules/socketmodule.c 2014-08-04 22:19:36.000000000 +0200 -@@ -150,7 +150,7 @@ +@@ -148,7 +148,7 @@ On the other hand, not all Linux versions agree, so there the settings computed by the configure script are needed! */ @@ -151,7 +151,7 @@ diff -ru Python-3.3.5/Modules/socketmodule.c Python-3.3.5-android/Modules/socket # undef HAVE_GETHOSTBYNAME_R_3_ARG # undef HAVE_GETHOSTBYNAME_R_5_ARG # undef HAVE_GETHOSTBYNAME_R_6_ARG -@@ -169,7 +169,7 @@ +@@ -167,7 +167,7 @@ # define HAVE_GETHOSTBYNAME_R_3_ARG # elif defined(__sun) || defined(__sgi) # define HAVE_GETHOSTBYNAME_R_5_ARG @@ -163,35 +163,23 @@ diff -ru Python-3.3.5/Modules/socketmodule.c Python-3.3.5-android/Modules/socket diff -ru Python-3.3.5/Modules/posixmodule.c Python-3.3.5-android/Modules/posixmodule.c --- Python-3.3.5/Modules/posixmodule.c 2014-03-09 08:40:28.000000000 +0000 +++ Python-3.3.5-android/Modules/posixmodule.c 2015-02-24 19:57:05.368843433 +0000 -@@ -403,6 +403,11 @@ - #endif +@@ -372,6 +372,11 @@ #endif + #define DWORD_MAX 4294967295U + +/* Android doesn't expose AT_EACCESS - manually define it. */ +#if !defined(AT_EACCESS) && defined(__ANDROID__) +#define AT_EACCESS 0x200 +#endif + - #ifdef MS_WINDOWS - static int -diff -ru Python-3.3.5/Python/pytime.c Python-3.3.5-android/Python/pytime.c ---- Python-3.3.5/Python/pytime.c 2015-02-23 11:54:25.000000000 -0500 -+++ Python-3.3.5-android/Python/pytime.c 2015-02-23 11:55:19.000000000 -0500 -@@ -3,7 +3,7 @@ - #include - #endif - --#if defined(__APPLE__) && defined(HAVE_GETTIMEOFDAY) && defined(HAVE_FTIME) -+#if (defined(__APPLE__) || defined(__ANDROID__)) && defined(HAVE_GETTIMEOFDAY) && defined(HAVE_FTIME) - /* - * _PyTime_gettimeofday falls back to ftime when getttimeofday fails because the latter - * might fail on some platforms. This fallback is unwanted on MacOSX because + #define INITFUNC PyInit_nt diff -ru Python-3.4.2/configure Python-3.4.2-android/configure --- Python-3.4.2/configure 2015-02-24 23:18:31.000000000 +0100 +++ Python-3.4.2-android/configure 2015-03-01 20:15:02.000000000 +0100 -@@ -5406,6 +5406,34 @@ - MULTIARCH=$($CC --print-multiarch 2>/dev/null) +@@ -5593,4 +5072,32 @@ + esac +# Test if we're running on Android. @@ -222,13 +210,11 @@ diff -ru Python-3.4.2/configure Python-3.4.2-android/configure +fi +rm -f conftest* + - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5 -@@ -5650,7 +5678,14 @@ - SOVERSION=`echo $SOVERSION|cut -d "." -f 1` - ;; - esac +@@ -5797,7 +5825,14 @@ + LDLIBRARY='libpython$(LDVERSION).so' + BLDLIBRARY='-L. -lpython$(LDVERSION)' + RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} - INSTSONAME="$LDLIBRARY".$SOVERSION + + if test "$with_android" != yes @@ -244,7 +230,7 @@ diff -ru Python-3.4.2/configure Python-3.4.2-android/configure diff -ru Python-3.4.2/configure.ac Python-3.4.2-android/configure.ac --- Python-3.4.2/configure.ac 2015-02-24 23:18:31.000000000 +0100 +++ Python-3.4.2-android/configure.ac 2015-03-01 20:14:54.000000000 +0100 -@@ -796,6 +796,21 @@ +@@ -726,6 +726,21 @@ MULTIARCH=$($CC --print-multiarch 2>/dev/null) AC_SUBST(MULTIARCH) @@ -264,12 +250,12 @@ diff -ru Python-3.4.2/configure.ac Python-3.4.2-android/configure.ac + ] +) - AC_SUBST(LIBRARY) - AC_MSG_CHECKING(LIBRARY) -@@ -970,7 +985,14 @@ - SOVERSION=`echo $SOVERSION|cut -d "." -f 1` - ;; - esac + AC_MSG_CHECKING([for the platform triplet based on compiler characteristics]) + cat >> conftest.c <&5 $as_echo_n "checking for python interpreter for cross build... " >&6; } if test -z "$PYTHON_FOR_BUILD"; then @@ -50,7 +48,7 @@ diff -ru Python-3.3.5/configure Python-3.3.5-android/configure diff -ru Python-3.3.5/configure.ac Python-3.3.5-android/configure.ac --- Python-3.3.5/configure.ac 2014-03-09 09:40:34.000000000 +0100 +++ Python-3.3.5-android/configure.ac 2014-08-04 22:13:00.000000000 +0200 -@@ -56,13 +56,18 @@ +@@ -59,13 +59,18 @@ if test "$cross_compiling" = yes; then AC_MSG_CHECKING([for python interpreter for cross build]) if test -z "$PYTHON_FOR_BUILD"; then diff --git a/mk/python/3.4.3/python-3.4.3-python-misc.patch b/mk/python/3.5.1/python-3.5.1-python-misc.patch similarity index 81% rename from mk/python/3.4.3/python-3.4.3-python-misc.patch rename to mk/python/3.5.1/python-3.5.1-python-misc.patch index 57450625..37e8f5d2 100644 --- a/mk/python/3.4.3/python-3.4.3-python-misc.patch +++ b/mk/python/3.5.1/python-3.5.1-python-misc.patch @@ -18,8 +18,8 @@ diff -ru Python-3.3.5/Lib/test/test_pwd.py Python-3.3.5-android/Lib/test/test_pw self.assertRaises(TypeError, pwd.getpwuid) self.assertRaises(TypeError, pwd.getpwuid, 3.14) diff -ru Python-3.4.2/Modules/python.c Python-3.4.2-android/Modules/python.c ---- Python-3.4.2/Modules/python.c 2015-02-24 22:42:37.000000000 +0100 -+++ Python-3.4.2-android/Modules/python.c 2015-02-24 23:04:27.000000000 +0100 +--- Python-3.4.2/Programs/python.c 2015-02-24 22:42:37.000000000 +0100 ++++ Python-3.4.2-android/Programs/python.c 2015-02-24 23:04:27.000000000 +0100 @@ -44,10 +44,13 @@ fpsetmask(m & ~FP_X_OFL); #endif @@ -55,7 +55,7 @@ diff -ru Python-3.4.2/Modules/python.c Python-3.4.2-android/Modules/python.c diff -ru Python-3.3.5/setup.py Python-3.3.5-android/setup.py --- Python-3.3.5/setup.py 2014-03-09 09:40:35.000000000 +0100 +++ Python-3.3.5-android/setup.py 2014-08-04 22:14:36.000000000 +0200 -@@ -562,7 +562,7 @@ +@@ -592,7 +592,7 @@ libraries=math_libs) ) # time libraries: librt may be needed for clock_gettime() @@ -64,7 +64,18 @@ diff -ru Python-3.3.5/setup.py Python-3.3.5-android/setup.py lib = sysconfig.get_config_var('TIMEMODULE_LIB') if lib: time_libs.append(lib) -@@ -639,7 +639,8 @@ +@@ -651,7 +651,9 @@ + missing.append('spwd') + + # select(2); not on ancient System V +- exts.append( Extension('select', ['selectmodule.c']) ) ++ # pyepoll_poll needs math_libs for ceil() ++ exts.append( Extension('select', ['selectmodule.c'], ++ libraries=math_libs) ) + + # Fred Drake's interface to the Python parser + exts.append( Extension('parser', ['parsermodule.c']) ) +@@ -675,7 +677,8 @@ # Operations on audio samples # According to #993173, this one should actually work fine on # 64-bit platforms. @@ -74,7 +85,7 @@ diff -ru Python-3.3.5/setup.py Python-3.3.5-android/setup.py # readline do_readline = self.compiler.find_library_file(lib_dirs, 'readline') -@@ -1904,7 +1905,8 @@ +@@ -1948,7 +1951,8 @@ sources=sources, depends=depends) ext_test = Extension('_ctypes_test', diff --git a/mk/python/3.4.3/python-3.4.3-setup.patch b/mk/python/3.5.1/python-3.5.1-setup.patch similarity index 96% rename from mk/python/3.4.3/python-3.4.3-setup.patch rename to mk/python/3.5.1/python-3.5.1-setup.patch index 26fd0467..f153f6ba 100644 --- a/mk/python/3.4.3/python-3.4.3-setup.patch +++ b/mk/python/3.5.1/python-3.5.1-setup.patch @@ -1,7 +1,7 @@ diff -Nru Python-3.4.3/setup.py Python-3.4.3-android/setup.py > Python-3.4.3-setup.patch --- Python-3.4.3/setup.py 2016-01-06 09:22:17.000000000 -0500 +++ Python-3.4.3-android/setup.py 2016-01-06 09:30:58.000000000 -0500 -@@ -631,7 +631,9 @@ +@@ -651,7 +651,9 @@ missing.append('spwd') # select(2); not on ancient System V @@ -12,7 +12,7 @@ diff -Nru Python-3.4.3/setup.py Python-3.4.3-android/setup.py > Python-3.4.3-set # Fred Drake's interface to the Python parser exts.append( Extension('parser', ['parsermodule.c']) ) -@@ -655,8 +657,11 @@ +@@ -675,8 +677,11 @@ # Operations on audio samples # According to #993173, this one should actually work fine on # 64-bit platforms. diff --git a/mk/python/3.5.1/sources.txt b/mk/python/3.5.1/sources.txt new file mode 100644 index 00000000..ba94f12b --- /dev/null +++ b/mk/python/3.5.1/sources.txt @@ -0,0 +1 @@ +https://python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz From 2aeddd4ff4e491a4277139c43a8144c26d6f1001 Mon Sep 17 00:00:00 2001 From: GRRedWings Date: Sun, 17 Jan 2016 09:35:04 -0500 Subject: [PATCH 08/26] Update the Python version. this was missed in the checkin. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 224011f6..d09b65e3 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ endef build: python_modules python # Main Python. -$(eval $(call formula,python,3.4.3)) +$(eval $(call formula,python,3.5.1)) # Optional Python modules. python_modules: $(foreach mod,$(subst ',,$(PYTHON_OPTIONAL_MODULES)),python_$(mod)) From 902e28f2aba37546c6587e06c1db71e7def9076e Mon Sep 17 00:00:00 2001 From: GRRedWings Date: Sat, 30 Jan 2016 14:18:51 -0500 Subject: [PATCH 09/26] Update sources.txt Move to the old folder of the mirror, as they have released the 'f' version --- mk/openssl/1.0.2e/sources.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/openssl/1.0.2e/sources.txt b/mk/openssl/1.0.2e/sources.txt index 4d2673c2..db619930 100644 --- a/mk/openssl/1.0.2e/sources.txt +++ b/mk/openssl/1.0.2e/sources.txt @@ -1 +1 @@ -http://artfiles.org/openssl.org/source/openssl-1.0.2e.tar.gz +http://artfiles.org/openssl.org/source/old/1.0.2/openssl-1.0.2f.tar.gz From 775903c2ef492c4b56f9255c485d9af2cbceb265 Mon Sep 17 00:00:00 2001 From: GRRedWings Date: Sat, 30 Jan 2016 14:20:12 -0500 Subject: [PATCH 10/26] Update sources.txt I had bumped the file name to test, sorry, back to e --- mk/openssl/1.0.2e/sources.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk/openssl/1.0.2e/sources.txt b/mk/openssl/1.0.2e/sources.txt index db619930..ac30ccd5 100644 --- a/mk/openssl/1.0.2e/sources.txt +++ b/mk/openssl/1.0.2e/sources.txt @@ -1 +1 @@ -http://artfiles.org/openssl.org/source/old/1.0.2/openssl-1.0.2f.tar.gz +http://artfiles.org/openssl.org/source/old/1.0.2/openssl-1.0.2e.tar.gz From 981d3249119740458655df6e2c2aca7a73608c44 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 1 Feb 2016 09:01:28 -0500 Subject: [PATCH 11/26] Remove the old 1.0.2d folder. We are using version e of SSL now --- mk/openssl/1.0.2d/build.sh | 17 ----------------- .../openssl-1.0.2d-android-ndk-target.patch | 12 ------------ mk/openssl/1.0.2d/sources.txt | 1 - 3 files changed, 30 deletions(-) delete mode 100644 mk/openssl/1.0.2d/build.sh delete mode 100644 mk/openssl/1.0.2d/openssl-1.0.2d-android-ndk-target.patch delete mode 100644 mk/openssl/1.0.2d/sources.txt diff --git a/mk/openssl/1.0.2d/build.sh b/mk/openssl/1.0.2d/build.sh deleted file mode 100644 index e90ec05e..00000000 --- a/mk/openssl/1.0.2d/build.sh +++ /dev/null @@ -1,17 +0,0 @@ -pushd src >/dev/null - -rm -rf "${PACKAGE}" -tar -xf "${PACKAGE}.tar.gz" || exit 1 -pushd "${PACKAGE}" >/dev/null - -[[ ! -d "${PREFIX}/share" ]] && (mkdir "${PREFIX}/share" || exit 1) -patch -p1 < "${FILESDIR}/${PACKAGE}-android-ndk-target.patch" || exit 1 -./Configure android-ndk --prefix="${PREFIX}" --openssldir="${PREFIX}/share" || exit 1 -make || exit 1 -make install_sw || exit 1 - -# Remove binaries from premises. -rm -f "${PREFIX}/bin/"{openssl,c_rehash} || exit 1 - -popd >/dev/null -popd >/dev/null diff --git a/mk/openssl/1.0.2d/openssl-1.0.2d-android-ndk-target.patch b/mk/openssl/1.0.2d/openssl-1.0.2d-android-ndk-target.patch deleted file mode 100644 index 1e9ddc1d..00000000 --- a/mk/openssl/1.0.2d/openssl-1.0.2d-android-ndk-target.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru openssl-1.0.2/Configure openssl-1.0.2-android/Configure ---- openssl-1.0.2/Configure 2015-01-22 15:58:32.000000000 +0100 -+++ openssl-1.0.2-android/Configure 2015-03-02 11:23:58.000000000 +0100 -@@ -445,6 +445,7 @@ - - # Android: linux-* but without -DTERMIO and pointers to headers and libs. - "android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -+"android-ndk","gcc:-O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so", - "android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - "android-armv7","gcc:-march=armv7-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - "android-mips","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - diff --git a/mk/openssl/1.0.2d/sources.txt b/mk/openssl/1.0.2d/sources.txt deleted file mode 100644 index 21eb2cd5..00000000 --- a/mk/openssl/1.0.2d/sources.txt +++ /dev/null @@ -1 +0,0 @@ -http://artfiles.org/openssl.org/source//openssl-1.0.2e.tar.gz From 3766afbe86bf6325e5089c291bb33f24c2d29342 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 1 Feb 2016 09:07:18 -0500 Subject: [PATCH 12/26] Removed the 1.0.2d folder, as we are now building agist the e version of the sll lib --- mk/openssl/1.0.2d/build.sh | 17 ----------------- .../openssl-1.0.2d-android-ndk-target.patch | 12 ------------ mk/openssl/1.0.2d/sources.txt | 1 - 3 files changed, 30 deletions(-) delete mode 100644 mk/openssl/1.0.2d/build.sh delete mode 100644 mk/openssl/1.0.2d/openssl-1.0.2d-android-ndk-target.patch delete mode 100644 mk/openssl/1.0.2d/sources.txt diff --git a/mk/openssl/1.0.2d/build.sh b/mk/openssl/1.0.2d/build.sh deleted file mode 100644 index e90ec05e..00000000 --- a/mk/openssl/1.0.2d/build.sh +++ /dev/null @@ -1,17 +0,0 @@ -pushd src >/dev/null - -rm -rf "${PACKAGE}" -tar -xf "${PACKAGE}.tar.gz" || exit 1 -pushd "${PACKAGE}" >/dev/null - -[[ ! -d "${PREFIX}/share" ]] && (mkdir "${PREFIX}/share" || exit 1) -patch -p1 < "${FILESDIR}/${PACKAGE}-android-ndk-target.patch" || exit 1 -./Configure android-ndk --prefix="${PREFIX}" --openssldir="${PREFIX}/share" || exit 1 -make || exit 1 -make install_sw || exit 1 - -# Remove binaries from premises. -rm -f "${PREFIX}/bin/"{openssl,c_rehash} || exit 1 - -popd >/dev/null -popd >/dev/null diff --git a/mk/openssl/1.0.2d/openssl-1.0.2d-android-ndk-target.patch b/mk/openssl/1.0.2d/openssl-1.0.2d-android-ndk-target.patch deleted file mode 100644 index 1e9ddc1d..00000000 --- a/mk/openssl/1.0.2d/openssl-1.0.2d-android-ndk-target.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru openssl-1.0.2/Configure openssl-1.0.2-android/Configure ---- openssl-1.0.2/Configure 2015-01-22 15:58:32.000000000 +0100 -+++ openssl-1.0.2-android/Configure 2015-03-02 11:23:58.000000000 +0100 -@@ -445,6 +445,7 @@ - - # Android: linux-* but without -DTERMIO and pointers to headers and libs. - "android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -+"android-ndk","gcc:-O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so", - "android-x86","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:".eval{my $asm=${x86_elf_asm};$asm=~s/:elf/:android/;$asm}.":dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - "android-armv7","gcc:-march=armv7-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - "android-mips","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", - diff --git a/mk/openssl/1.0.2d/sources.txt b/mk/openssl/1.0.2d/sources.txt deleted file mode 100644 index 21eb2cd5..00000000 --- a/mk/openssl/1.0.2d/sources.txt +++ /dev/null @@ -1 +0,0 @@ -http://artfiles.org/openssl.org/source//openssl-1.0.2e.tar.gz From 56e8cf1654bbc7090263e4199dc5c69cca0547ab Mon Sep 17 00:00:00 2001 From: Nathan Ver Beek Date: Tue, 2 Feb 2016 12:04:11 -0500 Subject: [PATCH 13/26] Added local source file functionality for external artifacts Allows switching between local download links and internet-hosted (default). --- Makefile | 6 +++++- env | 1 + mk/bzip2/1.0.6/sources-local.txt | 1 + mk/gdbm/1.11/sources-local.txt | 1 + mk/ncurses/5.9/sources-local.txt | 1 + mk/ndk_source.sh | 7 ++++++- mk/openssl/1.0.2e/sources-local.txt | 1 + mk/python/3.5.1/sources-local.txt | 1 + mk/readline/6.3/sources-local.txt | 1 + mk/sqlite/3.8.10.2/sources-local.txt | 1 + mk/xz/5.2.1/sources-local.txt | 1 + 11 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 mk/bzip2/1.0.6/sources-local.txt create mode 100644 mk/gdbm/1.11/sources-local.txt create mode 100644 mk/ncurses/5.9/sources-local.txt create mode 100644 mk/openssl/1.0.2e/sources-local.txt create mode 100644 mk/python/3.5.1/sources-local.txt create mode 100644 mk/readline/6.3/sources-local.txt create mode 100644 mk/sqlite/3.8.10.2/sources-local.txt create mode 100644 mk/xz/5.2.1/sources-local.txt diff --git a/Makefile b/Makefile index d09b65e3..aadd5e3d 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ all: build # Get configuration. mk/env.mk: env - @bash --noprofile --norc -c 'source ./env; set -o posix; set' | egrep '^(ANDROID|SDK|NDK|BUILD|TEST|PYTHON)_' > $@ + @bash --noprofile --norc -c 'source ./env; set -o posix; set' | egrep '^(ANDROID|SDK|NDK|BUILD|TEST|PYTHON|SOURCES)_' > $@ -include mk/env.mk # A formula. @@ -13,7 +13,11 @@ $1: $1-$2 $1-$2: ndk $3 $$(info Checking $1 $2 sources...) +ifeq ($(SOURCES_LOCAL),1) + @wget -N -P "src/" -i "mk/$1/$2/sources-local.txt" +else @wget -N -P "src/" -i "mk/$1/$2/sources.txt" +endif ifeq ("$$(wildcard build/.built-$(BUILD_IDENTIFIER)/$1-$2)","") $$(info Building $1 $2...) @bash --noprofile --norc mk/build_single.sh $1 $2 diff --git a/env b/env index 4b9f7323..837998cf 100644 --- a/env +++ b/env @@ -18,6 +18,7 @@ export ANDROID_COMPILER=4.9 export ANDROID_COMPILER64=clang3.6 export ANDROID_HOST=x86_64-pc-linux-gnu export ANDROID_AGREE_LICENSE_TERMS=n +export SOURCES_LOCAL=1 # Testing. export ANDROID_VM_NAME=PythonTesting diff --git a/mk/bzip2/1.0.6/sources-local.txt b/mk/bzip2/1.0.6/sources-local.txt new file mode 100644 index 00000000..d7d248bf --- /dev/null +++ b/mk/bzip2/1.0.6/sources-local.txt @@ -0,0 +1 @@ +http://artifactory.ops.cld/artifactory/ThirdParty/COTS/bzip/bzip2/1.0.6/bzip2-1.0.6.tar.gz diff --git a/mk/gdbm/1.11/sources-local.txt b/mk/gdbm/1.11/sources-local.txt new file mode 100644 index 00000000..fdb68f3e --- /dev/null +++ b/mk/gdbm/1.11/sources-local.txt @@ -0,0 +1 @@ +http://artifactory.ops.cld/artifactory/ThirdParty/COTS/gdbm/1.11/gdbm-1.11.tar.gz diff --git a/mk/ncurses/5.9/sources-local.txt b/mk/ncurses/5.9/sources-local.txt new file mode 100644 index 00000000..c577005b --- /dev/null +++ b/mk/ncurses/5.9/sources-local.txt @@ -0,0 +1 @@ +http://artifactory.ops.cld/artifactory/ThirdParty/COTS/ncurses/5.9/ncurses-5.9.tar.gz diff --git a/mk/ndk_source.sh b/mk/ndk_source.sh index 9728d983..a0faf601 100644 --- a/mk/ndk_source.sh +++ b/mk/ndk_source.sh @@ -24,4 +24,9 @@ case "${NDK_REV}" in ;; esac -echo http://dl.google.com/android/ndk/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} +if [ $SOURCES_LOCAL = 1 ] +then + echo http://artifactory.ops.cld/artifactory/ThirdParty/COTS/android/android-ndk/r10e/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} +else + echo http://dl.google.com/android/ndk/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} +fi \ No newline at end of file diff --git a/mk/openssl/1.0.2e/sources-local.txt b/mk/openssl/1.0.2e/sources-local.txt new file mode 100644 index 00000000..8d64755d --- /dev/null +++ b/mk/openssl/1.0.2e/sources-local.txt @@ -0,0 +1 @@ +http://artifactory.ops.cld/artifactory/ThirdParty/COTS/openssl/1.0.2e/openssl-1.0.2e.tar.gz diff --git a/mk/python/3.5.1/sources-local.txt b/mk/python/3.5.1/sources-local.txt new file mode 100644 index 00000000..d04cbbec --- /dev/null +++ b/mk/python/3.5.1/sources-local.txt @@ -0,0 +1 @@ +http://artifactory.ops.cld/artifactory/ThirdParty/COTS/Python/3.5.1/Python-3.5.1.tar.xz diff --git a/mk/readline/6.3/sources-local.txt b/mk/readline/6.3/sources-local.txt new file mode 100644 index 00000000..f6ad4778 --- /dev/null +++ b/mk/readline/6.3/sources-local.txt @@ -0,0 +1 @@ +http://artifactory.ops.cld/artifactory/ThirdParty/COTS/readline/6.3/readline-6.3.tar.gz diff --git a/mk/sqlite/3.8.10.2/sources-local.txt b/mk/sqlite/3.8.10.2/sources-local.txt new file mode 100644 index 00000000..a040062f --- /dev/null +++ b/mk/sqlite/3.8.10.2/sources-local.txt @@ -0,0 +1 @@ +http://artifactory.ops.cld/artifactory/ThirdParty/COTS/sqlite-autoconf/3081001/sqlite-autoconf-3081001.tar.gz diff --git a/mk/xz/5.2.1/sources-local.txt b/mk/xz/5.2.1/sources-local.txt new file mode 100644 index 00000000..a5d5b134 --- /dev/null +++ b/mk/xz/5.2.1/sources-local.txt @@ -0,0 +1 @@ +http://artifactory.ops.cld/artifactory/ThirdParty/COTS/xz/5.2.1/xz-5.2.1.tar.xz From 4be5a8da9b71b6293a9f897bd30016a5938b2820 Mon Sep 17 00:00:00 2001 From: Nathan Ver Beek Date: Tue, 2 Feb 2016 12:06:02 -0500 Subject: [PATCH 14/26] Changed build to default to internet-hosted rather than local for artifacts --- env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env b/env index 837998cf..45b587db 100644 --- a/env +++ b/env @@ -18,7 +18,7 @@ export ANDROID_COMPILER=4.9 export ANDROID_COMPILER64=clang3.6 export ANDROID_HOST=x86_64-pc-linux-gnu export ANDROID_AGREE_LICENSE_TERMS=n -export SOURCES_LOCAL=1 +export SOURCES_LOCAL=0 # Testing. export ANDROID_VM_NAME=PythonTesting From 5846e8485341c62dd7bce588da22d4a86c50093f Mon Sep 17 00:00:00 2001 From: GRRedWings Date: Thu, 4 Feb 2016 09:53:04 -0500 Subject: [PATCH 15/26] Update License I love the original one, but felt this one was a little more globally acceptable. --- LICENSE | 206 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 197 insertions(+), 9 deletions(-) diff --git a/LICENSE b/LICENSE index 5a8e3325..d6456956 100644 --- a/LICENSE +++ b/LICENSE @@ -1,14 +1,202 @@ - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - Copyright (C) 2004 Sam Hocevar + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + 1. Definitions. - 0. You just DO WHAT THE FUCK YOU WANT TO. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From fcd82d36641749638301be1828734131e9169bc8 Mon Sep 17 00:00:00 2001 From: Nathan Ver Beek Date: Sat, 19 Mar 2016 11:03:51 -0400 Subject: [PATCH 16/26] Updated build scripts to handle Android NDK 11b --- env | 4 ++-- mk/build_ndk.sh | 7 +++++++ mk/ndk_source.sh | 14 ++++++++++++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/env b/env index 45b587db..ceea3144 100644 --- a/env +++ b/env @@ -6,9 +6,9 @@ export ANDROID_TOOL_PREFIX="${BASE}/build-tools" export ANDROID_TEST_PREFIX="${BASE}/build-vm" # SDKs and target platforms. -export NDK_REL=android-ndk-r10e +export NDK_REL=android-ndk-r11b export SDK_REL=android-sdk-r24.4.1 -export NDK_REV=10e +export NDK_REV=11b export SDK_REV=24.4.1 export ANDROID_API_LEVEL=21 export ANDROID_PLATFORM=arm diff --git a/mk/build_ndk.sh b/mk/build_ndk.sh index cbc953c3..eb899006 100755 --- a/mk/build_ndk.sh +++ b/mk/build_ndk.sh @@ -30,6 +30,13 @@ case "${NDK_REV}" in popd fi ;; + 11*) + NDK_ARCHIVE="${BASE}/sdk/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z]')-${NDK_ARCH}" + if [[ ! -d "${BASE}/sdk/${NDK_REL}" ]]; then + # Zip archive + unzip "${NDK_ARCHIVE}" -d "${BASE}/sdk" || exit 1 + fi + ;; *) NDK_ARCHIVE="$BASE/sdk/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z]')-${NDK_ARCH}.tar.bz2" if [[ ! -d "${BASE}/sdk/${NDK_REL}" ]]; then diff --git a/mk/ndk_source.sh b/mk/ndk_source.sh index a0faf601..9f9ced5d 100644 --- a/mk/ndk_source.sh +++ b/mk/ndk_source.sh @@ -19,6 +19,9 @@ case "${NDK_REV}" in 10*) NDK_EXT=bin ;; + 11*) + NDK_EXT=zip + ;; *) NDK_EXT=tar.bz2 ;; @@ -26,7 +29,14 @@ esac if [ $SOURCES_LOCAL = 1 ] then - echo http://artifactory.ops.cld/artifactory/ThirdParty/COTS/android/android-ndk/r10e/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} + echo http://artifactory.ops.cld/artifactory/ThirdParty/COTS/android/android-ndk/r${NDK_REV}/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} else - echo http://dl.google.com/android/ndk/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} + case "${NDK_REV}" in + 11*) + echo http://dl.google.com/android/repository/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} + ;; + *) + echo http://dl.google.com/android/ndk/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} + ;; + esac fi \ No newline at end of file From 55078e4c26bd1f5fa9ccf996ceb7b1efaab86974 Mon Sep 17 00:00:00 2001 From: Brian Spratke Date: Sat, 19 Mar 2016 15:37:05 -0400 Subject: [PATCH 17/26] Google changed the toolchain. So I had to update for x64 --- env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env b/env index ceea3144..a458a5f3 100644 --- a/env +++ b/env @@ -15,7 +15,7 @@ export ANDROID_PLATFORM=arm #export ANDROID_PLATFORM=arm64 #export ANDROID_PLATFORM=x86 export ANDROID_COMPILER=4.9 -export ANDROID_COMPILER64=clang3.6 +export ANDROID_COMPILER64=4.9 export ANDROID_HOST=x86_64-pc-linux-gnu export ANDROID_AGREE_LICENSE_TERMS=n export SOURCES_LOCAL=0 From 6460672be5f133406f597fa053d8a52c5faa907f Mon Sep 17 00:00:00 2001 From: Brian Spratke Date: Sat, 19 Mar 2016 16:50:46 -0400 Subject: [PATCH 18/26] Update the script to require less configuration. Now NDK_REL and SDK_REL are based on the rev. Also fixed the 64 bit compiler to work with 10e as well as 11b. --- env | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/env b/env index a458a5f3..694970d2 100644 --- a/env +++ b/env @@ -6,16 +6,25 @@ export ANDROID_TOOL_PREFIX="${BASE}/build-tools" export ANDROID_TEST_PREFIX="${BASE}/build-vm" # SDKs and target platforms. -export NDK_REL=android-ndk-r11b -export SDK_REL=android-sdk-r24.4.1 export NDK_REV=11b export SDK_REV=24.4.1 +export NDK_REL=android-ndk-r${NDK_REV} +export SDK_REL=android-sdk-r${SDK_REV} export ANDROID_API_LEVEL=21 export ANDROID_PLATFORM=arm #export ANDROID_PLATFORM=arm64 #export ANDROID_PLATFORM=x86 export ANDROID_COMPILER=4.9 -export ANDROID_COMPILER64=4.9 + +case "${NDK_REV}" in + 10*) + export ANDROID_COMPILER64=clang3.6 + ;; + *) + export ANDROID_COMPILER64=4.9 + ;; +esac + export ANDROID_HOST=x86_64-pc-linux-gnu export ANDROID_AGREE_LICENSE_TERMS=n export SOURCES_LOCAL=0 From b4dd617aa39127eeda9ca084ad91304a46981fc0 Mon Sep 17 00:00:00 2001 From: Brian Spratke Date: Mon, 20 Jun 2016 16:06:29 -0400 Subject: [PATCH 19/26] Update the NDK to be able to download 12. Default it to 12, it's the latest. --- env | 2 +- mk/build_ndk.sh | 2 +- mk/ndk_source.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/env b/env index 694970d2..c21743c7 100644 --- a/env +++ b/env @@ -6,7 +6,7 @@ export ANDROID_TOOL_PREFIX="${BASE}/build-tools" export ANDROID_TEST_PREFIX="${BASE}/build-vm" # SDKs and target platforms. -export NDK_REV=11b +export NDK_REV=12 export SDK_REV=24.4.1 export NDK_REL=android-ndk-r${NDK_REV} export SDK_REL=android-sdk-r${SDK_REV} diff --git a/mk/build_ndk.sh b/mk/build_ndk.sh index eb899006..3a82e51c 100755 --- a/mk/build_ndk.sh +++ b/mk/build_ndk.sh @@ -30,7 +30,7 @@ case "${NDK_REV}" in popd fi ;; - 11*) + 11*|12*) NDK_ARCHIVE="${BASE}/sdk/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z]')-${NDK_ARCH}" if [[ ! -d "${BASE}/sdk/${NDK_REL}" ]]; then # Zip archive diff --git a/mk/ndk_source.sh b/mk/ndk_source.sh index 9f9ced5d..d4b36c1c 100644 --- a/mk/ndk_source.sh +++ b/mk/ndk_source.sh @@ -19,7 +19,7 @@ case "${NDK_REV}" in 10*) NDK_EXT=bin ;; - 11*) + 11*|12*) NDK_EXT=zip ;; *) @@ -32,7 +32,7 @@ then echo http://artifactory.ops.cld/artifactory/ThirdParty/COTS/android/android-ndk/r${NDK_REV}/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} else case "${NDK_REV}" in - 11*) + 11*|12*) echo http://dl.google.com/android/repository/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} ;; *) From 23544f1b1c5f9e777ad283035eb27481b85fcaca Mon Sep 17 00:00:00 2001 From: Brian Spratke Date: Wed, 19 Oct 2016 16:27:50 -0400 Subject: [PATCH 20/26] Update to the latest version of the NDK. Also bump the API level, not sure it really means much though, just like the SDK version. --- env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/env b/env index c21743c7..8a7e0d37 100644 --- a/env +++ b/env @@ -6,11 +6,11 @@ export ANDROID_TOOL_PREFIX="${BASE}/build-tools" export ANDROID_TEST_PREFIX="${BASE}/build-vm" # SDKs and target platforms. -export NDK_REV=12 +export NDK_REV=12b export SDK_REV=24.4.1 export NDK_REL=android-ndk-r${NDK_REV} export SDK_REL=android-sdk-r${SDK_REV} -export ANDROID_API_LEVEL=21 +export ANDROID_API_LEVEL=23 export ANDROID_PLATFORM=arm #export ANDROID_PLATFORM=arm64 #export ANDROID_PLATFORM=x86 From 6cd444f9afb8d8701057a93b20ae729351e15cf9 Mon Sep 17 00:00:00 2001 From: "Verbeek, Nathan S" Date: Thu, 20 Oct 2016 15:31:01 -0400 Subject: [PATCH 21/26] Added new patch file which disables the "accept4" functionality in C. Android 4.4 doesn't have accept4 and later versions work fine without it. --- mk/python/3.5.1/build.sh | 1 + mk/python/3.5.1/python-3.5.1-accept4.patch | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 mk/python/3.5.1/python-3.5.1-accept4.patch diff --git a/mk/python/3.5.1/build.sh b/mk/python/3.5.1/build.sh index 01ed1deb..1f38379d 100644 --- a/mk/python/3.5.1/build.sh +++ b/mk/python/3.5.1/build.sh @@ -20,6 +20,7 @@ patch -p1 < "${FILESDIR}/${PACKAGE}-python-misc.patch" || exit 1 patch -p1 < "${FILESDIR}/${PACKAGE}-android-locale.patch" || exit 1 patch -Ep1 < "${FILESDIR}/${PACKAGE}-android-libmpdec.patch" || exit 1 patch -p1 < "${FILESDIR}/${PACKAGE}-android-misc.patch" || exit 1 +patch -p1 < "${FILESDIR}/${PACKAGE}-accept4.patch" || exit 1 ./configure CROSS_COMPILE_TARGET=yes HOSTPYTHON="$(pwd)/hostpython" CONFIG_SITE=config.site --prefix="${PREFIX}" --host="${TARGET}" --build="${HOST}" --disable-ipv6 --enable-shared --without-ensurepip || exit 1 make CROSS_COMPILE_TARGET=yes HOSTPYTHON="$(pwd)/hostpython" HOSTPGEN="$(pwd)/Parser/hostpgen" || exit 1 diff --git a/mk/python/3.5.1/python-3.5.1-accept4.patch b/mk/python/3.5.1/python-3.5.1-accept4.patch new file mode 100644 index 00000000..ffe4b558 --- /dev/null +++ b/mk/python/3.5.1/python-3.5.1-accept4.patch @@ -0,0 +1,11 @@ +--- Python-3.5.1/Modules/socketmodule.c 2016-10-20 11:06:38.170393614 -0400 ++++ Python-3.5.1-android/Modules/socketmodule.c 2016-10-20 11:47:06.018345261 -0400 +@@ -421,6 +421,8 @@ + #define INADDR_NONE (-1) + #endif + ++#undef HAVE_ACCEPT4 ++ + /* XXX There's a problem here: *static* functions are not supposed to have + a Py prefix (or use CapitalizedWords). Later... */ + From e9e6212956cbef6726f0c3621e19dec93882fbe0 Mon Sep 17 00:00:00 2001 From: Brian Spratke Date: Tue, 14 Mar 2017 08:28:36 -0400 Subject: [PATCH 22/26] Updates for Glass. We no longer need the accept4 patch, but I added some android_extras. --- mk/python/3.5.1/build.sh | 3 ++- mk/python/3.5.1/python-3.5.1-android-extras.patch | 7 +++++++ mk/python/3.5.1/python-3.5.1-android-misc.patch | 3 ++- mk/python/3.5.1/python-3.5.1-android_extras.patch | 6 ++++++ 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 mk/python/3.5.1/python-3.5.1-android-extras.patch create mode 100644 mk/python/3.5.1/python-3.5.1-android_extras.patch diff --git a/mk/python/3.5.1/build.sh b/mk/python/3.5.1/build.sh index 1f38379d..8872523c 100644 --- a/mk/python/3.5.1/build.sh +++ b/mk/python/3.5.1/build.sh @@ -20,7 +20,8 @@ patch -p1 < "${FILESDIR}/${PACKAGE}-python-misc.patch" || exit 1 patch -p1 < "${FILESDIR}/${PACKAGE}-android-locale.patch" || exit 1 patch -Ep1 < "${FILESDIR}/${PACKAGE}-android-libmpdec.patch" || exit 1 patch -p1 < "${FILESDIR}/${PACKAGE}-android-misc.patch" || exit 1 -patch -p1 < "${FILESDIR}/${PACKAGE}-accept4.patch" || exit 1 +patch -p1 < "${FILESDIR}/${PACKAGE}-android-extras.patch" || exit 1 +#patch -p1 < "${FILESDIR}/${PACKAGE}-accept4.patch" || exit 1 ./configure CROSS_COMPILE_TARGET=yes HOSTPYTHON="$(pwd)/hostpython" CONFIG_SITE=config.site --prefix="${PREFIX}" --host="${TARGET}" --build="${HOST}" --disable-ipv6 --enable-shared --without-ensurepip || exit 1 make CROSS_COMPILE_TARGET=yes HOSTPYTHON="$(pwd)/hostpython" HOSTPGEN="$(pwd)/Parser/hostpgen" || exit 1 diff --git a/mk/python/3.5.1/python-3.5.1-android-extras.patch b/mk/python/3.5.1/python-3.5.1-android-extras.patch new file mode 100644 index 00000000..3aa312f7 --- /dev/null +++ b/mk/python/3.5.1/python-3.5.1-android-extras.patch @@ -0,0 +1,7 @@ +--- ./config.site 2017-01-16 13:05:00.374771609 -0500 ++++ ./config.new.site 2017-01-16 13:03:16.482767000 -0500 +@@ -1,2 +1,3 @@ + ac_cv_file__dev_ptmx=no + ac_cv_file__dev_ptc=no ++ac_cv_func_wcsftime=no + diff --git a/mk/python/3.5.1/python-3.5.1-android-misc.patch b/mk/python/3.5.1/python-3.5.1-android-misc.patch index 303b60bf..69613fd6 100644 --- a/mk/python/3.5.1/python-3.5.1-android-misc.patch +++ b/mk/python/3.5.1/python-3.5.1-android-misc.patch @@ -1,7 +1,7 @@ diff -ru Python-3.3.5/Lib/platform.py Python-3.3.5-android/Lib/platform.py --- Python-3.3.5/Lib/platform.py 2014-03-09 09:40:13.000000000 +0100 +++ Python-3.3.5-android/Lib/platform.py 2014-08-04 22:19:36.000000000 +0200 -@@ -367,6 +367,63 @@ +@@ -367,6 +367,64 @@ supported_dists=supported_dists, full_distribution_name=0) @@ -53,6 +53,7 @@ diff -ru Python-3.3.5/Lib/platform.py Python-3.3.5-android/Lib/platform.py + if '=' not in line: + continue + key, val = line.split('=') ++ key, val = line.split('=')[0:2] + key = key.strip() + + if not version_obtained and key == _android_version_property: diff --git a/mk/python/3.5.1/python-3.5.1-android_extras.patch b/mk/python/3.5.1/python-3.5.1-android_extras.patch new file mode 100644 index 00000000..b7e681b1 --- /dev/null +++ b/mk/python/3.5.1/python-3.5.1-android_extras.patch @@ -0,0 +1,6 @@ +--- ./config.site 2017-01-16 13:05:00.374771609 -0500 ++++ ./config.new.site 2017-01-16 13:03:16.482767000 -0500 +@@ -1,2 +1,3 @@ + ac_cv_file__dev_ptmx=no + ac_cv_file__dev_ptc=no ++ac_cv_func_wcsftime=no From 46f6063c51c5ddc6ab5c42f611fa1cf604e96575 Mon Sep 17 00:00:00 2001 From: Brian Spratke Date: Thu, 6 Apr 2017 10:51:06 -0400 Subject: [PATCH 23/26] Update to handle NDK 14b. I had to add a --force to the make-standalone-toolchain.sh calll. Not positive why Removed support for Pre-10 NDK. They had a different download & file format, and at this point you can target an older API Level, so I can't justify the complication of keeping this around. Even through 14b supports API 25, this script targets 23 as that is the highest level one of my supported devices allows. Thanks Honeywell. --- env | 3 ++- mk/build_ndk.sh | 11 ++--------- mk/ndk_source.sh | 11 ++++------- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/env b/env index 8a7e0d37..f84495b6 100644 --- a/env +++ b/env @@ -6,10 +6,11 @@ export ANDROID_TOOL_PREFIX="${BASE}/build-tools" export ANDROID_TEST_PREFIX="${BASE}/build-vm" # SDKs and target platforms. -export NDK_REV=12b +export NDK_REV=14b export SDK_REV=24.4.1 export NDK_REL=android-ndk-r${NDK_REV} export SDK_REL=android-sdk-r${SDK_REV} +# For Honeywell, we can not go above 23 export ANDROID_API_LEVEL=23 export ANDROID_PLATFORM=arm #export ANDROID_PLATFORM=arm64 diff --git a/mk/build_ndk.sh b/mk/build_ndk.sh index 3a82e51c..38424565 100755 --- a/mk/build_ndk.sh +++ b/mk/build_ndk.sh @@ -30,23 +30,16 @@ case "${NDK_REV}" in popd fi ;; - 11*|12*) + *) NDK_ARCHIVE="${BASE}/sdk/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z]')-${NDK_ARCH}" if [[ ! -d "${BASE}/sdk/${NDK_REL}" ]]; then # Zip archive unzip "${NDK_ARCHIVE}" -d "${BASE}/sdk" || exit 1 fi ;; - *) - NDK_ARCHIVE="$BASE/sdk/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z]')-${NDK_ARCH}.tar.bz2" - if [[ ! -d "${BASE}/sdk/${NDK_REL}" ]]; then - # Tar archive. - tar -xf "${NDK_ARCHIVE}" -C "${BASE}/sdk" || exit 1 - fi - ;; esac if [[ ! -f "${ANDROID_PREFIX}/.built-ndk-${BUILD_IDENTIFIER}" ]]; then - ("${BASE}/sdk/${NDK_REL}/build/tools/make-standalone-toolchain.sh" --platform="android-${ANDROID_API_LEVEL}" --install-dir="${ANDROID_TOOL_PREFIX}/${BUILD_IDENTIFIER}" --toolchain="${ANDROID_TOOLCHAIN}" &&\ + ("${BASE}/sdk/${NDK_REL}/build/tools/make-standalone-toolchain.sh" --force --platform="android-${ANDROID_API_LEVEL}" --install-dir="${ANDROID_TOOL_PREFIX}/${BUILD_IDENTIFIER}" --toolchain="${ANDROID_TOOLCHAIN}" &&\ touch "${ANDROID_PREFIX}/.built-ndk-${BUILD_IDENTIFIER}") || exit 1 fi diff --git a/mk/ndk_source.sh b/mk/ndk_source.sh index d4b36c1c..3e0cd9fe 100644 --- a/mk/ndk_source.sh +++ b/mk/ndk_source.sh @@ -19,11 +19,8 @@ case "${NDK_REV}" in 10*) NDK_EXT=bin ;; - 11*|12*) - NDK_EXT=zip - ;; *) - NDK_EXT=tar.bz2 + NDK_EXT=zip ;; esac @@ -32,11 +29,11 @@ then echo http://artifactory.ops.cld/artifactory/ThirdParty/COTS/android/android-ndk/r${NDK_REV}/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} else case "${NDK_REV}" in - 11*|12*) - echo http://dl.google.com/android/repository/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} + 10*) + echo http://dl.google.com/android/ndk/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} ;; *) - echo http://dl.google.com/android/ndk/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} + echo http://dl.google.com/android/repository/android-ndk-r${NDK_REV}-$(uname -s | tr '[A-Z]' '[a-z'])-${NDK_ARCH}.${NDK_EXT} ;; esac fi \ No newline at end of file From f25c77e6d3c821b98b144d129e042f73d0b25fbf Mon Sep 17 00:00:00 2001 From: Brian Spratke Date: Thu, 6 Apr 2017 15:12:13 -0400 Subject: [PATCH 24/26] Put in the hooks for the Print patch, but needs more testing before I say it's good to go. --- mk/python/3.5.1/build.sh | 1 + .../3.5.1/python-3.5.1-android-print.patch | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 mk/python/3.5.1/python-3.5.1-android-print.patch diff --git a/mk/python/3.5.1/build.sh b/mk/python/3.5.1/build.sh index 8872523c..20826212 100644 --- a/mk/python/3.5.1/build.sh +++ b/mk/python/3.5.1/build.sh @@ -20,6 +20,7 @@ patch -p1 < "${FILESDIR}/${PACKAGE}-python-misc.patch" || exit 1 patch -p1 < "${FILESDIR}/${PACKAGE}-android-locale.patch" || exit 1 patch -Ep1 < "${FILESDIR}/${PACKAGE}-android-libmpdec.patch" || exit 1 patch -p1 < "${FILESDIR}/${PACKAGE}-android-misc.patch" || exit 1 +#patch -p1 < "${FILESDIR}/${PACKAGE}-android-print.patch" || exit 1 patch -p1 < "${FILESDIR}/${PACKAGE}-android-extras.patch" || exit 1 #patch -p1 < "${FILESDIR}/${PACKAGE}-accept4.patch" || exit 1 diff --git a/mk/python/3.5.1/python-3.5.1-android-print.patch b/mk/python/3.5.1/python-3.5.1-android-print.patch new file mode 100644 index 00000000..055893bc --- /dev/null +++ b/mk/python/3.5.1/python-3.5.1-android-print.patch @@ -0,0 +1,21 @@ +--- Python-3.5.1/Python/mysnprintf.c 2015-12-07 02:39:11.000000000 +0100 ++++ Python-3.5-android/Python/mysnprintf.c 2017-01-21 14:47:33.095093000 +0100 +@@ -1,5 +1,7 @@ + #include "Python.h" + ++#include ++ + /* snprintf() wrappers. If the platform has vsnprintf, we use it, else we + emulate it in a half-hearted way. Even if the platform has it, we wrap + it because platforms differ in what vsnprintf does in case the buffer +@@ -93,6 +95,9 @@ + assert(to_copy < size); + memcpy(str, buffer, to_copy); + str[to_copy] = '\0'; ++ ++ __android_log_print(ANDROID_LOG_DEBUG, "Python3", str); ++ + } + PyMem_FREE(buffer); + #endif + From 412740c42a5d8055b49834d1fb42f14a443474d2 Mon Sep 17 00:00:00 2001 From: Brian Spratke Date: Thu, 6 Apr 2017 15:13:50 -0400 Subject: [PATCH 25/26] Update the SDK to something more recent. The NDK I had to dial back to 22 for the Zebra WT6000 device. --- env | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/env b/env index f84495b6..76633931 100644 --- a/env +++ b/env @@ -7,13 +7,14 @@ export ANDROID_TEST_PREFIX="${BASE}/build-vm" # SDKs and target platforms. export NDK_REV=14b -export SDK_REV=24.4.1 +export SDK_REV=25.2.4 export NDK_REL=android-ndk-r${NDK_REV} export SDK_REL=android-sdk-r${SDK_REV} # For Honeywell, we can not go above 23 -export ANDROID_API_LEVEL=23 export ANDROID_PLATFORM=arm #export ANDROID_PLATFORM=arm64 +# For Zebra we can not go above 22 +export ANDROID_API_LEVEL=22 #export ANDROID_PLATFORM=x86 export ANDROID_COMPILER=4.9 From fc66636a55f9de3c9641f74f88b8764057e64d86 Mon Sep 17 00:00:00 2001 From: Brian Spratke Date: Thu, 6 Apr 2017 15:20:34 -0400 Subject: [PATCH 26/26] Default to ARM not arm64 --- env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/env b/env index 76633931..2d14bfdf 100644 --- a/env +++ b/env @@ -11,10 +11,10 @@ export SDK_REV=25.2.4 export NDK_REL=android-ndk-r${NDK_REV} export SDK_REL=android-sdk-r${SDK_REV} # For Honeywell, we can not go above 23 -export ANDROID_PLATFORM=arm -#export ANDROID_PLATFORM=arm64 # For Zebra we can not go above 22 export ANDROID_API_LEVEL=22 +export ANDROID_PLATFORM=arm +#export ANDROID_PLATFORM=arm64 #export ANDROID_PLATFORM=x86 export ANDROID_COMPILER=4.9