Browse Source

Android: disabled ssl sasl, unused in pEp

pull/2/merge
pepdev 6 years ago
parent
commit
9d734adad0
3 changed files with 31 additions and 29 deletions
  1. +18
    -17
      build-android/build.sh
  2. +3
    -3
      build-android/include/config.h
  3. +10
    -9
      build-android/jni/Android.mk

+ 18
- 17
build-android/build.sh View File

@ -2,8 +2,8 @@
build_version=1
ANDROID_PLATFORM=android-21
openssl_build_version=1
cyrus_sasl_build_version=1
# openssl_build_version=1
# cyrus_sasl_build_version=1
archs="armeabi armeabi-v7a x86 x86_64"
package_name=libetpan-android
@ -14,25 +14,26 @@ if test "x$ANDROID_NDK" = x ; then
exit 1
fi
if test ! -f "$current_dir/dependencies/openssl/openssl-android-$openssl_build_version.zip" ; then
echo Building OpenSSL first
cd "$current_dir/dependencies/openssl"
./build.sh
fi
# if test ! -f "$current_dir/dependencies/openssl/openssl-android-$openssl_build_version.zip" ; then
# echo Building OpenSSL first
# cd "$current_dir/dependencies/openssl"
# ./build.sh
# fi
if test ! -f "$current_dir/dependencies/cyrus-sasl/cyrus-sasl-android-$cyrus_sasl_build_version.zip" ; then
echo Building Cyrus SASL first
cd "$current_dir/dependencies/cyrus-sasl"
./build.sh
fi
# if test ! -f "$current_dir/dependencies/cyrus-sasl/cyrus-sasl-android-$cyrus_sasl_build_version.zip" ; then
# echo Building Cyrus SASL first
# cd "$current_dir/dependencies/cyrus-sasl"
# ./build.sh
# fi
function build {
rm -rf "$current_dir/obj"
cd "$current_dir/jni"
$ANDROID_NDK/ndk-build TARGET_PLATFORM=$ANDROID_PLATFORM TARGET_ARCH_ABI=$TARGET_ARCH_ABI \
OPENSSL_PATH="$current_dir/third-party/openssl-android-$openssl_build_version" \
CYRUS_SASL_PATH="$current_dir/third-party/cyrus-sasl-android-$cyrus_sasl_build_version"
$ANDROID_NDK/ndk-build TARGET_PLATFORM=$ANDROID_PLATFORM TARGET_ARCH_ABI=$TARGET_ARCH_ABI
# \
# OPENSSL_PATH="$current_dir/third-party/openssl-android-$openssl_build_version" \
# CYRUS_SASL_PATH="$current_dir/third-party/cyrus-sasl-android-$cyrus_sasl_build_version"
mkdir -p "$current_dir/$package_name-$build_version/libs/$TARGET_ARCH_ABI"
cp "$current_dir/obj/local/$TARGET_ARCH_ABI/libetpan.a" "$current_dir/$package_name-$build_version/libs/$TARGET_ARCH_ABI"
@ -41,8 +42,8 @@ function build {
mkdir -p "$current_dir/third-party"
cd "$current_dir/third-party"
unzip -qo "$current_dir/dependencies/openssl/openssl-android-$openssl_build_version.zip"
unzip -qo "$current_dir/dependencies/cyrus-sasl/cyrus-sasl-android-$cyrus_sasl_build_version.zip"
# unzip -qo "$current_dir/dependencies/openssl/openssl-android-$openssl_build_version.zip"
# unzip -qo "$current_dir/dependencies/cyrus-sasl/cyrus-sasl-android-$cyrus_sasl_build_version.zip"
cd "$current_dir/.."
tar xzf "$current_dir/../build-mac/autogen-result.tar.gz"


+ 3
- 3
build-android/include/config.h View File

@ -35,7 +35,7 @@
#define HAVE_GETPAGESIZE 1
/* Define if you have the iconv() function. */
/* #undef HAVE_ICONV */
// #define HAVE_ICONV
/* prototype of iconv() has const parameters */
/* #undef HAVE_ICONV_PROTO_CONST */
@ -165,10 +165,10 @@
/* #undef USE_GNUTLS */
/* Define to use SASL */
#define USE_SASL 1
// #define USE_SASL 1
/* Define to use OpenSSL */
#define USE_SSL 1
// #define USE_SSL 1
/* Version number of package */
#define VERSION "1.2"


+ 10
- 9
build-android/jni/Android.mk View File

@ -1,13 +1,13 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
ifeq ($(OPENSSL_PATH),)
$(error OPENSSL_PATH must be set)
endif
ifeq ($(CYRUS_SASL_PATH),)
$(error CYRUS_SASL_PATH must be set)
endif
# ifeq ($(OPENSSL_PATH),)
# $(error OPENSSL_PATH must be set)
# endif
#
# ifeq ($(CYRUS_SASL_PATH),)
# $(error CYRUS_SASL_PATH must be set)
# endif
src_files = \
./src/data-types/base64.c \
@ -140,7 +140,8 @@ 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
$(LOCAL_PATH)/../include $(LOCAL_PATH)/../include/libetpan
# \
# $(OPENSSL_PATH)/include $(CYRUS_SASL_PATH)/include
include $(BUILD_STATIC_LIBRARY)

Loading…
Cancel
Save