summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-03-19 09:49:13 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-03-19 12:03:22 -0700
commit6c3cd24ef883d7c84af5c801a4a11df4fc0bb963 (patch)
tree2bf93d56126a1792095d6ea2ff2b03ae623de2f6
parent01e4ec47bec37a47a39f4c439aeb41583d4ba219 (diff)
downloadsubsurface-6c3cd24ef883d7c84af5c801a4a11df4fc0bb963.tar.gz
Android/iOS build: get libxml2 and libxslt from GitHub
The xmlsoft.org links sometimes time out. Sadly, GitHub API gives us an oddly named top level directory in the tar file, so lets strip that and replace it with the "usual" name. Also, for the "raw" tar files from GitHub we need to run autoreconf ourselves. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rwxr-xr-xpackaging/android/build.sh18
-rw-r--r--packaging/ios/build.sh10
2 files changed, 19 insertions, 9 deletions
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index 66642d91b..64e0ceb7e 100755
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -204,10 +204,14 @@ if [ ! -e "$PKG_CONFIG_LIBDIR/sqlite3.pc" ] ; then
fi
if [ ! -e libxml2-${LIBXML2_VERSION}.tar.gz ] ; then
- wget ftp://xmlsoft.org/libxml2/libxml2-${LIBXML2_VERSION}.tar.gz
+ wget http://api.github.com/repos/GNOME/libxml2/tarball/v${LIBXML2_VERSION} -O libxml2-${LIBXML2_VERSION}.tar.gz
fi
if [ ! -e libxml2-${LIBXML2_VERSION} ] ; then
- tar -zxf libxml2-${LIBXML2_VERSION}.tar.gz
+ mkdir -p libxml2-${LIBXML2_VERSION}
+ tar -xzf libxml2-${LIBXML2_VERSION}.tar.gz --strip 1 -C libxml2-${LIBXML2_VERSION}
+ pushd libxml2-${LIBXML2_VERSION}
+ autoreconf --install
+ popd
fi
if [ ! -e "$PKG_CONFIG_LIBDIR/libxml-2.0.pc" ] ; then
mkdir -p libxml2-build-"$ARCH"
@@ -221,12 +225,14 @@ if [ ! -e "$PKG_CONFIG_LIBDIR/libxml-2.0.pc" ] ; then
fi
if [ ! -e libxslt-${LIBXSLT_VERSION}.tar.gz ] ; then
- wget ftp://xmlsoft.org/libxml2/libxslt-${LIBXSLT_VERSION}.tar.gz
+ wget http://api.github.com/repos/GNOME/libxslt/tarball/v${LIBXSLT_VERSION} -O libxslt-${LIBXSLT_VERSION}.tar.gz
fi
if [ ! -e libxslt-${LIBXSLT_VERSION} ] ; then
- tar -zxf libxslt-${LIBXSLT_VERSION}.tar.gz
- # libxslt have too old config.sub for android
- cp libxml2-${LIBXML2_VERSION}/config.sub libxslt-${LIBXSLT_VERSION}
+ mkdir -p libxslt-${LIBXSLT_VERSION}
+ tar -zxf libxslt-${LIBXSLT_VERSION}.tar.gz --strip 1 -C libxslt-${LIBXSLT_VERSION}
+ pushd libxslt-${LIBXSLT_VERSION}
+ autoreconf --install
+ popd
fi
if [ ! -e "$PKG_CONFIG_LIBDIR/libxslt.pc" ] ; then
mkdir -p libxslt-build-"$ARCH"
diff --git a/packaging/ios/build.sh b/packaging/ios/build.sh
index e186f4077..39a74a58e 100644
--- a/packaging/ios/build.sh
+++ b/packaging/ios/build.sh
@@ -130,9 +130,11 @@ echo next building for $ARCH
fi
if [ ! -e libxml2-${LIBXML2_VERSION}.tar.gz ] ; then
- wget ftp://xmlsoft.org/libxml2/libxml2-${LIBXML2_VERSION}.tar.gz
+ # wget ftp://xmlsoft.org/libxml2/libxml2-${LIBXML2_VERSION}.tar.gz
+ wget http://api.github.com/repos/GNOME/libxml2/tarball/v${LIBXML2_VERSION} -O libxml2-${LIBXML2_VERSION}.tar.gz
fi
if [ ! -e libxml2-${LIBXML2_VERSION} ] ; then
+ tar -zxf libxml2-${LIBXML2_VERSION}.tar.gz --strip 1 -C libxml2-${LIBXML2_VERSION}
tar -zxf libxml2-${LIBXML2_VERSION}.tar.gz
fi
if [ ! -e $PKG_CONFIG_LIBDIR/libxml-2.0.pc ] ; then
@@ -151,10 +153,12 @@ echo next building for $ARCH
fi
if [ ! -e libxslt-${LIBXSLT_VERSION}.tar.gz ] ; then
- wget ftp://xmlsoft.org/libxml2/libxslt-${LIBXSLT_VERSION}.tar.gz
+ # wget ftp://xmlsoft.org/libxml2/libxslt-${LIBXSLT_VERSION}.tar.gz
+ wget http://api.github.com/repos/GNOME/libxslt/tarball/v${LIBXSLT_VERSION} -O libxslt-${LIBXSLT_VERSION}.tar.gz
fi
if [ ! -e libxslt-${LIBXSLT_VERSION} ] ; then
- tar -zxf libxslt-${LIBXSLT_VERSION}.tar.gz
+ mkdir -p libxslt-${LIBXSLT_VERSION}
+ tar -zxf libxslt-${LIBXSLT_VERSION}.tar.gz --strip 1 -C libxslt-${LIBXSLT_VERSION}
# libxslt have too old config.sub
cp libxml2-${LIBXML2_VERSION}/config.sub libxslt-${LIBXSLT_VERSION}
fi