Skip to content

Commit 9bc98b0

Browse files
committed
Update scripts
1 parent 604718e commit 9bc98b0

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

android/builder.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Build Android toolchain including Foundation
44
#
55

6-
ANDROID_ICU_UC=~/libiconv-libicu-android
6+
ANDROID_ICU_UC="${ANDROID_ICU_UC:-~/libiconv-libicu-android}"
77

88
cd "$(dirname $0)" &&
99
#./prepare.sh &&

android/install.sh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,6 @@
33
# Simple script to move Android Foundation into toolchain
44
# To build it again after this, use install.sh -u to reset
55
#
6-
# libxml2.so built from the android platform port:
7-
# https://github.com/android/platform_external_libxml2
8-
#
9-
# This is the most useful page found but it's not complete
10-
# http://stackoverflow.com/questions/12052089/using-libxml-for-android
11-
# Don't set CFLAGS or LDFLAGS and use ./autogen.sh instead of "configure"
12-
# Remove HTMLparser.lo and HTMLtree.lo from the Makefile and make sure
13-
# LIBXML_HTML_ENABLED and LIBXML_ICONV_ENABLED were not enabled in file
14-
# "include/libxml/xmlversion.h". Add the following to CFLAGS in Makefile:
15-
# -nostdlib --target=armv7-none-linux-androideabi
16-
# --sysroot=$ANDROID_NDK/platforms/android-21/arch-arm
17-
#
186

197
cd "$(dirname $0)"
208

android/updater.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,31 @@
33
# Move freshly built dependencies for Foundation into
44
# build directory to be available for it's compilation.
55
#
6+
# libxml2.so built from the android platform port:
7+
# https://github.com/android/platform_external_libxml2
8+
#
9+
# This is the most useful page found but it's not complete
10+
# http://stackoverflow.com/questions/12052089/using-libxml-for-android
11+
# Don't set CFLAGS or LDFLAGS and use ./autogen.sh instead of "configure"
12+
# Remove HTMLparser.lo and HTMLtree.lo from the Makefile and make sure
13+
# LIBXML_HTML_ENABLED and LIBXML_ICONV_ENABLED were not enabled in file
14+
# "include/libxml/xmlversion.h". Add the following to CFLAGS in Makefile:
15+
# -nostdlib --target=armv7-none-linux-androideabi
16+
# --sysroot=$ANDROID_NDK/platforms/android-21/arch-arm
17+
#
18+
# libcurl.so is built similarly from https://github.com/curl/curl
19+
#
20+
# libdispatch.so is a difficult build soon to be automated by another PR.
21+
#
22+
23+
ANDROID_ICU_UC="${ANDROID_ICU_UC:-~/libiconv-libicu-android}"
624

725
cd "$(dirname $0)" &&
826

927
SWIFT_ROOT="$(dirname $(dirname $(which swiftc)))" &&
1028
BUILD_DIR="$(dirname $SWIFT_ROOT)" &&
1129

12-
\cp -v ../../platform_external_libxml2/libxml2.so ../../curl/libcurl.so ../../swift-corelibs-libdispatch/libdispatch.so "$ANDROID_ICU"/armeabi-v7a/libicu*.so "${SWIFT_ROOT}/lib/swift/android" &&
30+
\cp -v ../../platform_external_libxml2/libxml2.so ../../curl/libcurl.so ../../swift-corelibs-libdispatch/libdispatch.so "$ANDROID_ICU_UC"/armeabi-v7a/libicu*.so "${SWIFT_ROOT}/lib/swift/android" &&
1331

1432
rpl -R -e libicu libscu "${SWIFT_ROOT}/lib/swift/android"/lib{icu,swift,Foundation,xml2}*.so &&
1533

0 commit comments

Comments
 (0)