Skip to content

Commit

Permalink
- Enable libetpan to build for android 23 base on implementation from…
Browse files Browse the repository at this point in the history
… pr #345.

- remove libetpan_get_version_micro.
  • Loading branch information
haithngn committed Jan 27, 2021
1 parent 6920d99 commit fad79af
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 51 deletions.
19 changes: 11 additions & 8 deletions build-android/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ iconv_build_version=1
package_name=libetpan-android

current_dir="`pwd`"
# find ../src -name *.h | xargs -0 cp --target-directory=./include/libetpan
find ../src -name "*.h" -type file -exec cp {} ./include/libetpan \;


if test "x$ANDROID_NDK" = x ; then
echo should set ANDROID_NDK before running this script.
Expand Down Expand Up @@ -62,14 +65,14 @@ mkdir -p "$current_dir/$package_name-$build_version/include"
cp -r include/libetpan "$current_dir/$package_name-$build_version/include"

# Start building.
ANDROID_PLATFORM=android-16
archs="armeabi armeabi-v7a x86"
for arch in $archs ; do
TARGET_ARCH_ABI=$arch
build
done
ANDROID_PLATFORM=android-21
archs="arm64-v8a"
#ANDROID_PLATFORM=android-16
archs="armeabi armeabi-v7a x86" #archs="armeabi armeabi-v7a x86"
for arch in $archs ; do #for arch in $archs ; do
TARGET_ARCH_ABI=$arch #TARGET_ARCH_ABI=$arch
build #build
done #done
ANDROID_PLATFORM=android-21 ANDROID_PLATFORM=android-23
archs="arm64-v8a" archs="arm64-v8a armeabi-v7a x86 x86_64"
for arch in $archs ; do
TARGET_ARCH_ABI=$arch
build
Expand Down
16 changes: 8 additions & 8 deletions build-android/dependencies/cyrus-sasl/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ function build {
}

# Start building.
ANDROID_PLATFORM=android-16
archs="armeabi armeabi-v7a x86"
for arch in $archs ; do
TARGET_ARCH_ABI=$arch
build
done
ANDROID_PLATFORM=android-21
archs="arm64-v8a"
#ANDROID_PLATFORM=android-16
archs="armeabi armeabi-v7a x86" #archs="armeabi armeabi-v7a x86"
for arch in $archs ; do #for arch in $archs ; do
TARGET_ARCH_ABI=$arch # TARGET_ARCH_ABI=$arch
build # build
done #done
ANDROID_PLATFORM=android-21 ANDROID_PLATFORM=android-23
archs="arm64-v8a" archs="arm64-v8a armeabi-v7a x86 x86_64"
for arch in $archs ; do
TARGET_ARCH_ABI=$arch
build
Expand Down
11 changes: 2 additions & 9 deletions build-android/dependencies/iconv/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,8 @@ if test ! -f $current_dir/$package_name-$build_version.zip; then
mkdir -p "$current_dir/$package_name-$build_version"

# Start building.
ANDROID_PLATFORM=android-16
archs="armeabi armeabi-v7a x86"
for arch in $archs ; do
TARGET_ARCH_ABI=$arch
build
done

ANDROID_PLATFORM=android-21
archs="arm64-v8a"
ANDROID_PLATFORM=android-23
ANDROID_PLATFORM=android-16 archs="arm64-v8a armeabi-v7a x86 x86_64"
for arch in $archs ; do
TARGET_ARCH_ABI=$arch
build
Expand Down
3 changes: 2 additions & 1 deletion build-android/dependencies/openssl/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,10 @@ function build {

# start building.
current_dir="`pwd`"
build_armeabi
#build_armeabi
build_armeabi_v7a
build_x86
build_x86_64
build_arm64_v8a

cd "$current_dir"
Expand Down
6 changes: 4 additions & 2 deletions build-android/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ src/driver/implementation/data-message \
src/driver/interface

LOCAL_C_INCLUDES = $(addprefix ../../, $(c_includes)) \
$(LOCAL_PATH)/../include $(LOCAL_PATH)/../include/libetpan \
$(OPENSSL_PATH)/include $(CYRUS_SASL_PATH)/include $(ICONV_PATH)/include
libetpan-android-7/include \
$(OPENSSL_PATH)/include $(CYRUS_SASL_PATH)/include $(ICONV_PATH)/include libetpan-android-7/include/libetpan \
$(OPENSSL_PATH)/include \
$(LOCAL_PATH)/../include $(LOCAL_PATH)/../include/libetpan

include $(BUILD_STATIC_LIBRARY)
5 changes: 0 additions & 5 deletions src/main/libetpan_version.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,3 @@ int libetpan_get_version_minor(void)
{
return LIBETPAN_VERSION_MINOR;
}

int libetpan_get_version_micro(void)
{
return LIBETPAN_VERSION_MICRO;
}
18 changes: 0 additions & 18 deletions src/main/libetpan_version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,13 @@
#define LIBETPAN_VERSION_MINOR @VERSION_MINOR@
#endif

#ifndef LIBETPAN_VERSION_MICRO
#define LIBETPAN_VERSION_MICRO @VERSION_MICRO@
#endif

#ifndef LIBETPAN_REENTRANT
#if @REENTRANT@
#define LIBETPAN_REENTRANT 1
#endif

#ifndef LIBETPAN_API_CURRENT
#define LIBETPAN_API_CURRENT @API_CURRENT@
#endif

#ifndef LIBETPAN_API_REVISION
#define LIBETPAN_API_REVISION @API_REVISION@
#endif

#ifndef LIBETPAN_API_COMPATIBILITY
#define LIBETPAN_API_COMPATIBILITY @API_COMPATIBILITY@
#endif

#endif

int libetpan_get_version_major(void);
int libetpan_get_version_minor(void);
int libetpan_get_version_micro(void);

#endif

0 comments on commit fad79af

Please sign in to comment.