2008-06-19 17:29:25 +02:00
|
|
|
{ bdbSupport ? false # build support for Berkeley DB repositories
|
|
|
|
, httpServer ? false # build Apache DAV module
|
|
|
|
, httpSupport ? false # client must support http
|
|
|
|
, sslSupport ? false # client must support https
|
|
|
|
, compressionSupport ? false # client must support http compression
|
|
|
|
, pythonBindings ? false
|
|
|
|
, perlBindings ? false
|
|
|
|
, javahlBindings ? false
|
2009-03-24 11:31:39 +01:00
|
|
|
, stdenv, fetchurl, apr, aprutil, neon, zlib, sqlite
|
2008-06-19 17:29:25 +02:00
|
|
|
, httpd ? null, expat, swig ? null, jdk ? null
|
2008-10-16 14:42:20 +02:00
|
|
|
, static ? false
|
2008-06-19 17:29:25 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert bdbSupport -> aprutil.bdbSupport;
|
2008-10-06 15:38:45 +02:00
|
|
|
assert httpServer -> httpd != null && httpd.apr == apr && httpd.aprutil == aprutil;
|
2008-06-19 17:29:25 +02:00
|
|
|
assert pythonBindings -> swig != null && swig.pythonSupport;
|
|
|
|
assert javahlBindings -> jdk != null;
|
|
|
|
assert sslSupport -> neon.sslSupport;
|
|
|
|
assert compressionSupport -> neon.compressionSupport;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
2009-04-16 23:59:55 +02:00
|
|
|
version = "1.6.1";
|
2008-06-19 17:29:25 +02:00
|
|
|
|
|
|
|
name = "subversion-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2009-03-24 11:31:39 +01:00
|
|
|
url = "http://subversion.tigris.org/downloads/${name}.tar.bz2";
|
2009-04-16 23:59:55 +02:00
|
|
|
sha256 = "1jp6i7vmz0vd1zf4y896f7jzabwv81x8brwzp5kpkrn6wajagm6d";
|
2008-06-19 17:29:25 +02:00
|
|
|
};
|
|
|
|
|
2009-03-24 11:31:39 +01:00
|
|
|
buildInputs = [zlib apr aprutil sqlite]
|
2008-10-07 01:01:54 +02:00
|
|
|
++ stdenv.lib.optional httpSupport neon
|
|
|
|
++ stdenv.lib.optional pythonBindings swig.python
|
|
|
|
++ stdenv.lib.optional perlBindings swig.perl
|
|
|
|
;
|
2008-08-03 14:23:27 +02:00
|
|
|
|
2008-06-19 17:29:25 +02:00
|
|
|
configureFlags = ''
|
|
|
|
--disable-keychain
|
2009-04-22 01:18:09 +02:00
|
|
|
${if static then "--disable-shared --enable-all-static" else ""}
|
2008-06-19 17:29:25 +02:00
|
|
|
${if bdbSupport then "--with-berkeley-db" else "--without-berkeley-db"}
|
2008-10-06 15:38:45 +02:00
|
|
|
${if httpServer then "--with-apxs=${httpd}/bin/apxs" else "--without-apxs"}
|
2008-06-19 17:29:25 +02:00
|
|
|
${if pythonBindings || perlBindings then "--with-swig=${swig}" else "--without-swig"}
|
|
|
|
${if javahlBindings then "--enable-javahl --with-jdk=${jdk}" else ""}
|
|
|
|
--disable-neon-version-check
|
|
|
|
'';
|
|
|
|
|
2008-10-07 01:01:54 +02:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(APACHE_LIBEXECDIR=$out/modules)
|
|
|
|
'';
|
|
|
|
|
2008-07-07 13:46:50 +02:00
|
|
|
postInstall = ''
|
|
|
|
ensureDir $out/share/emacs/site-lisp
|
|
|
|
cp contrib/client-side/emacs/*.el $out/share/emacs/site-lisp/
|
2008-10-07 01:01:54 +02:00
|
|
|
|
|
|
|
if test "$pythonBindings"; then
|
|
|
|
make swig-py swig_pydir=$(toPythonPath $out)/libsvn swig_pydir_extra=$(toPythonPath $out)/svn
|
|
|
|
make install-swig-py swig_pydir=$(toPythonPath $out)/libsvn swig_pydir_extra=$(toPythonPath $out)/svn
|
|
|
|
fi
|
2008-10-16 14:42:20 +02:00
|
|
|
|
2008-10-07 01:01:54 +02:00
|
|
|
if test "$perlBindings"; then
|
|
|
|
make swig-pl-lib
|
|
|
|
make install-swig-pl-lib
|
|
|
|
cd subversion/bindings/swig/perl/native
|
|
|
|
perl Makefile.PL PREFIX=$out
|
|
|
|
make install
|
|
|
|
cd -
|
|
|
|
fi
|
2008-07-28 10:14:55 +02:00
|
|
|
''; # */
|
2008-07-07 13:46:50 +02:00
|
|
|
|
2008-10-07 01:01:54 +02:00
|
|
|
inherit perlBindings pythonBindings;
|
2008-06-19 17:29:25 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A version control system intended to be a compelling replacement for CVS in the open source community";
|
|
|
|
homepage = http://subversion.tigris.org/;
|
|
|
|
};
|
|
|
|
}
|