about summary refs log tree commit diff
path: root/pkgs/subversion/subversion-build.sh
blob: d12d2786b7d9fc13ef000cc8b6a51565b82a1dc0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#! /bin/sh

export NIX_LDFLAGS="-Wl,-s -pthread"

. $stdenv/setup || exit 1

envpkgs="$ssl $db4 $httpd $swig $libxml"
. $setenv || exit 1

if test $localServer; then
    extraflags="--with-berkeley-db=$db4 $extraflags"
fi

if test $httpsClient; then
    extraflags="--with-ssl --with-libs=$ssl $extraflags"
fi

if test $httpServer; then
    extraflags="--with-apxs=$httpd/bin/apxs --with-apr=$httpd --with-apr-util=$httpd $extraflags"
    extramakeflags="APACHE_LIBEXECDIR=$out/modules $extramakeflags"
fi

if test $pythonBindings; then
    export PYTHON=$python/bin/python
    extraflags="--with-swig=$swig $extraflags"
fi

echo "extra flags: $extraflags"

tar xvfz $src || exit 1
cd subversion-* || exit 1
./configure --prefix=$out $extraflags \
 --without-gdbm --disable-static || exit 1
make $extramakeflags || exit 1
make install $extramakeflags || exit 1

if test $pythonBindings; then
    make swig-py || exit 1
    make install-swig-py || exit 1
fi

echo $envpkgs > $out/envpkgs || exit 1