From 143b8eafa0b3a1351daf0a0a2b6cc3959a66f579 Mon Sep 17 00:00:00 2001 From: Hussein Kasem Date: Fri, 27 May 2022 02:34:33 +0200 Subject: [PATCH] JNI-177 Update libetpan to use autoconf and build for current arch This saves time and space but also requires to drop support for Android <21 (5.0), its fine as now a days android 22 is like 98% of market. --- android/build.gradle | 2 +- android/external/Makefile.conf | 7 ++++++- android/external/arm64-v8a/Makefile | 7 +++---- android/external/armeabi-v7a/Makefile | 7 +++---- android/external/x86/Makefile | 7 +++---- android/external/x86_64/Makefile | 7 +++---- 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 8a573f8..c2dda5e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -30,7 +30,7 @@ android { compileSdkVersion 30 defaultConfig { - minSdkVersion 19 + minSdkVersion 21 targetSdkVersion 30 versionCode 7 versionName "2.1.29" diff --git a/android/external/Makefile.conf b/android/external/Makefile.conf index 37ff815..45aae11 100644 --- a/android/external/Makefile.conf +++ b/android/external/Makefile.conf @@ -2,6 +2,7 @@ ### Android NDK Common conf NDK_TOOLCHAIN_COMPILER ?= clang +ANDROID_API ?= 21 ### Select GNU SED on MacOS. @@ -21,7 +22,7 @@ GMP_VERSION=6.2.1 NETTLE_VERSION=3.7.3 ### Git deps repos -EXTERNAL_GIT_REPOS += libetpan|https://gitea.pep.foundation/pEp.foundation/libetpan.git?0123f34ec4ef7711b3670b744b3ae7e97178afe1 +EXTERNAL_GIT_REPOS += libetpan|https://gitea.pep.foundation/pEp.foundation/libetpan.git?507ab94fc9609432ef2d4c62770139482f1b5084 EXTERNAL_GIT_REPOS += sequoia|https://gitlab.com/sequoia-pgp/sequoia.git?openpgp/v1.3.1 ### Common variables @@ -40,3 +41,7 @@ EXTERNAL_SRCS_CLEAN += gmp-clean EXTERNAL_SRCS_CLEAN += nettle-clean EXTERNAL_SRCS_CLEAN += sequoia-ffi-clean +### Other variables +ANDROID_ETPAN_BUILD_VERSION=2 + + diff --git a/android/external/arm64-v8a/Makefile b/android/external/arm64-v8a/Makefile index 4c72753..ee0000f 100644 --- a/android/external/arm64-v8a/Makefile +++ b/android/external/arm64-v8a/Makefile @@ -14,7 +14,6 @@ include ../Makefile.conf # Build parameters APP_ABI ?= arm64-v8a -ANDROID_API ?= 21 all: build @@ -123,9 +122,9 @@ libetpan.src.stamp: ../downloads/libetpan.tar.gz touch $@ libetpan/Makefile: libetpan.src.stamp | libiconv-install - cd libetpan/build-android; ICONV_PREFIX=$(LOCAL) bash ./build.sh - cp -r libetpan/build-android/libetpan-android-1/$(APP_ABI)/lib/* $(LOCAL)/lib/ - cp -r libetpan/build-android/libetpan-android-1/include/* $(LOCAL)/include/ + cd libetpan/build-android; ICONV_PREFIX=$(LOCAL) bash ./build.sh $(APP_ABI) + cp -r libetpan/build-android/libetpan-android-$(ANDROID_ETPAN_BUILD_VERSION)/$(APP_ABI)/lib/* $(LOCAL)/lib/ + cp -r libetpan/build-android/libetpan-android-$(ANDROID_ETPAN_BUILD_VERSION)/include/* $(LOCAL)/include/ touch $@ libetpan-build: libetpan/Makefile diff --git a/android/external/armeabi-v7a/Makefile b/android/external/armeabi-v7a/Makefile index b5681e7..a55fc6b 100644 --- a/android/external/armeabi-v7a/Makefile +++ b/android/external/armeabi-v7a/Makefile @@ -14,7 +14,6 @@ include ../Makefile.conf # Build parameters APP_ABI ?= armeabi-v7a -ANDROID_API ?= 18 all: build #assets @@ -126,9 +125,9 @@ libetpan.src.stamp: ../downloads/libetpan.tar.gz touch $@ libetpan/Makefile: libetpan.src.stamp | libiconv-install - cd libetpan/build-android; ICONV_PREFIX=$(LOCAL) bash ./build.sh - cp -r libetpan/build-android/libetpan-android-1/$(APP_ABI)/lib/* $(LOCAL)/lib/ - cp -r libetpan/build-android/libetpan-android-1/include/* $(LOCAL)/include/ + cd libetpan/build-android; ICONV_PREFIX=$(LOCAL) bash ./build.sh $(APP_ABI) + cp -r libetpan/build-android/libetpan-android-$(ANDROID_ETPAN_BUILD_VERSION)/$(APP_ABI)/lib/* $(LOCAL)/lib/ + cp -r libetpan/build-android/libetpan-android-$(ANDROID_ETPAN_BUILD_VERSION)/include/* $(LOCAL)/include/ touch $@ libetpan-build: libetpan/Makefile diff --git a/android/external/x86/Makefile b/android/external/x86/Makefile index ea2e0ab..eccc611 100644 --- a/android/external/x86/Makefile +++ b/android/external/x86/Makefile @@ -14,7 +14,6 @@ include ../Makefile.conf # Build parameters APP_ABI ?= x86 -ANDROID_API ?= 18 all: build @@ -123,9 +122,9 @@ libetpan.src.stamp: ../downloads/libetpan.tar.gz touch $@ libetpan/Makefile: libetpan.src.stamp | libiconv-install - cd libetpan/build-android; ICONV_PREFIX=$(LOCAL) bash ./build.sh - cp -r libetpan/build-android/libetpan-android-1/$(APP_ABI)/lib/* $(LOCAL)/lib/ - cp -r libetpan/build-android/libetpan-android-1/include/* $(LOCAL)/include/ + cd libetpan/build-android; ICONV_PREFIX=$(LOCAL) bash ./build.sh $(APP_ABI) + cp -r libetpan/build-android/libetpan-android-$(ANDROID_ETPAN_BUILD_VERSION)/$(APP_ABI)/lib/* $(LOCAL)/lib/ + cp -r libetpan/build-android/libetpan-android-$(ANDROID_ETPAN_BUILD_VERSION)/include/* $(LOCAL)/include/ touch $@ libetpan-build: libetpan/Makefile diff --git a/android/external/x86_64/Makefile b/android/external/x86_64/Makefile index 0d2b33e..ae96e2b 100644 --- a/android/external/x86_64/Makefile +++ b/android/external/x86_64/Makefile @@ -14,7 +14,6 @@ include ../Makefile.conf # Build parameters APP_ABI ?= x86_64 -ANDROID_API ?= 21 all: build @@ -123,9 +122,9 @@ libetpan.src.stamp: ../downloads/libetpan.tar.gz touch $@ libetpan/Makefile: libetpan.src.stamp | libiconv-install - cd libetpan/build-android; ICONV_PREFIX=$(LOCAL) bash ./build.sh - cp -r libetpan/build-android/libetpan-android-1/$(APP_ABI)/lib/* $(LOCAL)/lib/ - cp -r libetpan/build-android/libetpan-android-1/include/* $(LOCAL)/include/ + cd libetpan/build-android; ICONV_PREFIX=$(LOCAL) bash ./build.sh $(APP_ABI) + cp -r libetpan/build-android/libetpan-android-$(ANDROID_ETPAN_BUILD_VERSION)/$(APP_ABI)/lib/* $(LOCAL)/lib/ + cp -r libetpan/build-android/libetpan-android-$(ANDROID_ETPAN_BUILD_VERSION)/include/* $(LOCAL)/include/ touch $@ libetpan-build: libetpan/Makefile