From 49c1dad1929054715a08394e199ddc34641cfb8a Mon Sep 17 00:00:00 2001 From: Amr Aboelela Date: Fri, 8 Sep 2017 16:46:16 -0700 Subject: [PATCH 1/2] Android: Fixed prepare.sh to download the toolchain instead from http://johnholdsworth.com/android_toolchain.tgz as the old link is not working anymore. --- .gitignore | 2 ++ android/prepare.sh | 15 ++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f050b65a5e..c961e949d2 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ Build *.swp *.orig .arcconfig + +*.tgz diff --git a/android/prepare.sh b/android/prepare.sh index 5e3ce2d7d2..266e428a3b 100755 --- a/android/prepare.sh +++ b/android/prepare.sh @@ -6,12 +6,17 @@ BUILD_DIR="build/Ninja-ReleaseAssert/swift-linux-x86_64/lib/swift" cd "$(dirname $0)" && -TAR_FILE="$(pwd)/android_dispatch.tgz" && +TAR_FILE="$(pwd)/android_toolchain.tgz" && if [[ ! -f "${TAR_FILE}" ]]; then - echo "Fetching binaries and headers for libxml2, libcurl and libdispatch" - curl "https://raw.githubusercontent.com/SwiftJava/SwiftJava/master/android_dispatch.tgz" > "${TAR_FILE}" +echo "Fetching binaries and headers for libxml2, libcurl and libdispatch" +curl http://johnholdsworth.com/android_toolchain.tgz > "${TAR_FILE}" fi -cd "../.." && mkdir -p "${BUILD_DIR}" && -cd "${BUILD_DIR}" && tar xfvz "${TAR_FILE}" +tar xfvz "${TAR_FILE}" + +mkdir -p "../../${BUILD_DIR}/android/armv7" && + +cp -r swift-install/usr/lib/swift/android/{libxml2.so,libcurl.so,libdispatch.so} ../../${BUILD_DIR}/android +cp -r swift-install/usr/lib/swift/android/armv7/Dispatch.swiftmodule ../../${BUILD_DIR}/android/armv7 +rm -rf swift-install From eaa0ee90ed981a938d7ff25f706f7aa9b89d3ebf Mon Sep 17 00:00:00 2001 From: Amr Aboelela Date: Fri, 8 Sep 2017 17:02:44 -0700 Subject: [PATCH 2/2] cp -r swift-install/usr/lib/swift/{curl,dispatch,libxml} ../../${BUILD_DIR} --- android/prepare.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/android/prepare.sh b/android/prepare.sh index 266e428a3b..4fa3d0b4ea 100755 --- a/android/prepare.sh +++ b/android/prepare.sh @@ -9,8 +9,8 @@ cd "$(dirname $0)" && TAR_FILE="$(pwd)/android_toolchain.tgz" && if [[ ! -f "${TAR_FILE}" ]]; then -echo "Fetching binaries and headers for libxml2, libcurl and libdispatch" -curl http://johnholdsworth.com/android_toolchain.tgz > "${TAR_FILE}" + echo "Fetching binaries and headers for libxml2, libcurl and libdispatch" + curl http://johnholdsworth.com/android_toolchain.tgz > "${TAR_FILE}" fi tar xfvz "${TAR_FILE}" @@ -19,4 +19,7 @@ mkdir -p "../../${BUILD_DIR}/android/armv7" && cp -r swift-install/usr/lib/swift/android/{libxml2.so,libcurl.so,libdispatch.so} ../../${BUILD_DIR}/android cp -r swift-install/usr/lib/swift/android/armv7/Dispatch.swiftmodule ../../${BUILD_DIR}/android/armv7 +cp -r swift-install/usr/lib/swift/{curl,dispatch,libxml} ../../${BUILD_DIR} + rm -rf swift-install +