summaryrefslogtreecommitdiff
path: root/get-deps.sh
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-03-18 13:33:26 +0000
committer <>2015-07-08 14:41:01 +0000
commitbb0ef45f7c46b0ae221b26265ef98a768c33f820 (patch)
tree98bae10dde41c746c51ae97ec4f879e330415aa7 /get-deps.sh
parent239dfafe71711b2f4c43d7b90a1228d7bdc5195e (diff)
downloadsubversion-tarball-bb0ef45f7c46b0ae221b26265ef98a768c33f820.tar.gz
Imported from /home/lorry/working-area/delta_subversion-tarball/subversion-1.8.13.tar.gz.subversion-1.8.13
Diffstat (limited to 'get-deps.sh')
-rwxr-xr-xget-deps.sh103
1 files changed, 66 insertions, 37 deletions
diff --git a/get-deps.sh b/get-deps.sh
index 439e1b7..16ce5f6 100755
--- a/get-deps.sh
+++ b/get-deps.sh
@@ -23,24 +23,42 @@
# get-deps.sh -- download the dependencies useful for building Subversion
#
-APR=apr-1.4.5
-APR_UTIL=apr-util-1.3.12
-NEON=neon-0.29.6
-SERF=serf-0.7.2
-ZLIB=zlib-1.2.5
-SQLITE_VERSION=3.7.6.3
-SQLITE=sqlite-amalgamation-$(printf %u%02u%02u%02u $(echo $SQLITE_VERSION | sed -e "s/\./ /g"))
-
-HTTPD=httpd-2.2.19
-APR_ICONV=apr-iconv-1.2.1
+# If changing this file please take care to try to make your changes as
+# portable as possible. That means at a minimum only use POSIX supported
+# features and functions. However, it may be desirable to use an even
+# more narrow set of features than POSIX, e.g. Solaris /bin/sh only has
+# a subset of the POSIX shell features. If in doubt, limit yourself to
+# features already used in the file. Reviewing the history of changes
+# may be useful as well.
+
+APR_VERSION=${APR_VERSION:-"1.4.6"}
+APU_VERSION=${APU_VERSION:-"1.5.1"}
+SERF_VERSION=${SERF_VERSION:-"1.3.8"}
+ZLIB_VERSION=${ZLIB_VERSION:-"1.2.8"}
+SQLITE_VERSION=${SQLITE_VERSION:-"3.7.15.1"}
+GTEST_VERSION=${GTEST_VERSION:-"1.6.0"}
+HTTPD_VERSION=${HTTPD_VERSION:-"2.4.10"}
+APR_ICONV_VERSION=${APR_ICONV_VERSION:-"1.2.1"}
+
+APR=apr-${APR_VERSION}
+APR_UTIL=apr-util-${APU_VERSION}
+SERF=serf-${SERF_VERSION}
+ZLIB=zlib-${ZLIB_VERSION}
+SQLITE_VERSION_LIST=`echo $SQLITE_VERSION | sed -e 's/\./ /g'`
+SQLITE=sqlite-amalgamation-`printf %d%02d%02d%02d $SQLITE_VERSION_LIST`
+GTEST=gtest-${GTEST_VERSION}
+GTEST_URL=http://googletest.googlecode.com/files/
+
+HTTPD=httpd-${HTTPD_VERSION}
+APR_ICONV=apr-iconv-${APR_ICONV_VERSION}
BASEDIR=`pwd`
TEMPDIR=$BASEDIR/temp
HTTP_FETCH=
-[ -z "$HTTP_FETCH" ] && type wget >/dev/null 2>&1 && HTTP_FETCH="wget -nc"
-[ -z "$HTTP_FETCH" ] && type curl >/dev/null 2>&1 && HTTP_FETCH="curl -O"
-[ -z "$HTTP_FETCH" ] && type fetch >/dev/null 2>&1 && HTTP_FETCH="fetch"
+[ -z "$HTTP_FETCH" ] && type wget >/dev/null 2>&1 && HTTP_FETCH="wget -q -nc"
+[ -z "$HTTP_FETCH" ] && type curl >/dev/null 2>&1 && HTTP_FETCH="curl -sOL"
+[ -z "$HTTP_FETCH" ] && type fetch >/dev/null 2>&1 && HTTP_FETCH="fetch -q"
# Need this uncommented if any of the specific versions of the ASF tarballs to
# be downloaded are no longer available on the general mirrors.
@@ -49,37 +67,29 @@ APACHE_MIRROR=http://archive.apache.org/dist
# helpers
usage() {
echo "Usage: $0"
- echo "Usage: $0 [ apr | neon | serf | zlib | sqlite ] ..."
+ echo "Usage: $0 [ apr | serf | zlib | sqlite | gtest ] ..."
exit $1
}
# getters
get_apr() {
cd $TEMPDIR
- $HTTP_FETCH $APACHE_MIRROR/apr/$APR.tar.bz2
- $HTTP_FETCH $APACHE_MIRROR/apr/$APR_UTIL.tar.bz2
+ test -d $BASEDIR/apr || $HTTP_FETCH $APACHE_MIRROR/apr/$APR.tar.bz2
+ test -d $BASEDIR/apr-util || $HTTP_FETCH $APACHE_MIRROR/apr/$APR_UTIL.tar.bz2
cd $BASEDIR
- bzip2 -dc $TEMPDIR/$APR.tar.bz2 | tar -xf -
- bzip2 -dc $TEMPDIR/$APR_UTIL.tar.bz2 | tar -xf -
+ test -d $BASEDIR/apr || bzip2 -dc $TEMPDIR/$APR.tar.bz2 | tar -xf -
+ test -d $BASEDIR/apr-util || bzip2 -dc $TEMPDIR/$APR_UTIL.tar.bz2 | tar -xf -
- mv $APR apr
- mv $APR_UTIL apr-util
-}
-
-get_neon() {
- cd $TEMPDIR
- $HTTP_FETCH http://webdav.org/neon/$NEON.tar.gz
- cd $BASEDIR
-
- gzip -dc $TEMPDIR/$NEON.tar.gz | tar -xf -
-
- mv $NEON neon
+ test -d $BASEDIR/apr || mv $APR apr
+ test -d $BASEDIR/apr-util || mv $APR_UTIL apr-util
}
get_serf() {
+ test -d $BASEDIR/serf && return
+
cd $TEMPDIR
- $HTTP_FETCH http://serf.googlecode.com/files/$SERF.tar.bz2
+ $HTTP_FETCH http://serf.googlecode.com/svn/src_releases/$SERF.tar.bz2
cd $BASEDIR
bzip2 -dc $TEMPDIR/$SERF.tar.bz2 | tar -xf -
@@ -88,16 +98,20 @@ get_serf() {
}
get_zlib() {
+ test -d $BASEDIR/zlib && return
+
cd $TEMPDIR
- $HTTP_FETCH http://www.zlib.net/$ZLIB.tar.bz2
+ $HTTP_FETCH http://sourceforge.net/projects/libpng/files/zlib/$ZLIB_VERSION/$ZLIB.tar.gz
cd $BASEDIR
- bzip2 -dc $TEMPDIR/$ZLIB.tar.bz2 | tar -xf -
+ gzip -dc $TEMPDIR/$ZLIB.tar.gz | tar -xf -
mv $ZLIB zlib
}
get_sqlite() {
+ test -d $BASEDIR/sqlite-amalgamation && return
+
cd $TEMPDIR
$HTTP_FETCH http://www.sqlite.org/$SQLITE.zip
cd $BASEDIR
@@ -108,23 +122,38 @@ get_sqlite() {
}
+get_gtest() {
+ test -d $BASEDIR/gtest && return
+
+ cd $TEMPDIR
+ $HTTP_FETCH ${GTEST_URL}/${GTEST}.zip
+ cd $BASEDIR
+
+ unzip -q $TEMPDIR/$GTEST.zip
+
+ mv $GTEST gtest
+}
+
# main()
get_deps() {
mkdir -p $TEMPDIR
- for i in neon zlib serf sqlite-amalgamation apr apr-util; do
+ for i in zlib serf sqlite-amalgamation apr apr-util gtest; do
if [ -d $i ]; then
echo "Local directory '$i' already exists; the downloaded copy won't be used" >&2
fi
done
if [ $# -gt 0 ]; then
- for target; do
- get_$target || usage
+ for target in "$@"; do
+ if [ "$target" != "deps" ]; then
+ get_$target || usage
+ else
+ usage
+ fi
done
else
get_apr
- get_neon
get_serf
get_zlib
get_sqlite