23
23
# get-deps.sh -- download the dependencies useful for building Subversion
27
APR_UTIL=apr-util-1.3.12
31
SQLITE_VERSION=3.7.6.3
26
# If changing this file please take care to try to make your changes as
27
# portable as possible. That means at a minimum only use POSIX supported
28
# features and functions. However, it may be desirable to use an even
29
# more narrow set of features than POSIX, e.g. Solaris /bin/sh only has
30
# a subset of the POSIX shell features. If in doubt, limit yourself to
31
# features already used in the file. Reviewing the history of changes
32
# may be useful as well.
34
APR_VERSION=${APR_VERSION:-"1.4.6"}
35
APU_VERSION=${APU_VERSION:-"1.5.1"}
36
SERF_VERSION=${SERF_VERSION:-"1.2.1"}
37
ZLIB_VERSION=${ZLIB_VERSION:-"1.2.8"}
38
SQLITE_VERSION=${SQLITE_VERSION:-"3.7.15.1"}
39
GTEST_VERSION=${GTEST_VERSION:-"1.6.0"}
40
HTTPD_VERSION=${HTTPD_VERSION:-"2.4.6"}
41
APR_ICONV_VERSION=${APR_ICONV_VERSION:-"1.2.1"}
43
APR=apr-${APR_VERSION}
44
APR_UTIL=apr-util-${APU_VERSION}
45
SERF=serf-${SERF_VERSION}
46
ZLIB=zlib-${ZLIB_VERSION}
32
47
SQLITE_VERSION_LIST=`echo $SQLITE_VERSION | sed -e 's/\./ /g'`
33
48
SQLITE=sqlite-amalgamation-`printf %d%02d%02d%02d $SQLITE_VERSION_LIST`
37
APR_ICONV=apr-iconv-1.2.1
49
GTEST=gtest-${GTEST_VERSION}
50
GTEST_URL=http://googletest.googlecode.com/files/
52
HTTPD=httpd-${HTTPD_VERSION}
53
APR_ICONV=apr-iconv-${APR_ICONV_VERSION}
40
56
TEMPDIR=$BASEDIR/temp
43
[ -z "$HTTP_FETCH" ] && type wget >/dev/null 2>&1 && HTTP_FETCH="wget -nc"
44
[ -z "$HTTP_FETCH" ] && type curl >/dev/null 2>&1 && HTTP_FETCH="curl -O"
45
[ -z "$HTTP_FETCH" ] && type fetch >/dev/null 2>&1 && HTTP_FETCH="fetch"
59
[ -z "$HTTP_FETCH" ] && type wget >/dev/null 2>&1 && HTTP_FETCH="wget -q -nc"
60
[ -z "$HTTP_FETCH" ] && type curl >/dev/null 2>&1 && HTTP_FETCH="curl -sO"
61
[ -z "$HTTP_FETCH" ] && type fetch >/dev/null 2>&1 && HTTP_FETCH="fetch -q"
47
63
# Need this uncommented if any of the specific versions of the ASF tarballs to
48
64
# be downloaded are no longer available on the general mirrors.
54
echo "Usage: $0 [ apr | neon | serf | zlib | sqlite ] ..."
70
echo "Usage: $0 [ apr | serf | zlib | sqlite | gtest ] ..."
61
$HTTP_FETCH $APACHE_MIRROR/apr/$APR.tar.bz2
62
$HTTP_FETCH $APACHE_MIRROR/apr/$APR_UTIL.tar.bz2
65
bzip2 -dc $TEMPDIR/$APR.tar.bz2 | tar -xf -
66
bzip2 -dc $TEMPDIR/$APR_UTIL.tar.bz2 | tar -xf -
74
$HTTP_FETCH http://webdav.org/neon/$NEON.tar.gz
77
gzip -dc $TEMPDIR/$NEON.tar.gz | tar -xf -
77
test -d $BASEDIR/apr || $HTTP_FETCH $APACHE_MIRROR/apr/$APR.tar.bz2
78
test -d $BASEDIR/apr-util || $HTTP_FETCH $APACHE_MIRROR/apr/$APR_UTIL.tar.bz2
81
test -d $BASEDIR/apr || bzip2 -dc $TEMPDIR/$APR.tar.bz2 | tar -xf -
82
test -d $BASEDIR/apr-util || bzip2 -dc $TEMPDIR/$APR_UTIL.tar.bz2 | tar -xf -
84
test -d $BASEDIR/apr || mv $APR apr
85
test -d $BASEDIR/apr-util || mv $APR_UTIL apr-util
89
test -d $BASEDIR/serf && return
84
92
$HTTP_FETCH http://serf.googlecode.com/files/$SERF.tar.bz2
126
test -d $BASEDIR/gtest && return
129
$HTTP_FETCH ${GTEST_URL}/${GTEST}.zip
132
unzip -q $TEMPDIR/$GTEST.zip
115
139
mkdir -p $TEMPDIR
117
for i in neon zlib serf sqlite-amalgamation apr apr-util; do
141
for i in zlib serf sqlite-amalgamation apr apr-util gtest; do
118
142
if [ -d $i ]; then
119
143
echo "Local directory '$i' already exists; the downloaded copy won't be used" >&2