diff --git a/pkgs/applications/version-management/subversion-1.4.x/builder.sh b/pkgs/applications/version-management/subversion-1.4.x/builder.sh index e91f9f9113d2..9a503a926010 100644 --- a/pkgs/applications/version-management/subversion-1.4.x/builder.sh +++ b/pkgs/applications/version-management/subversion-1.4.x/builder.sh @@ -7,8 +7,16 @@ fi postInstall() { if test "$pythonBindings"; then - make swig-py - make install-swig-py + make swig-py swig_pydir=$(toPythonPath $out) + make install-swig-py swig_pydir=$(toPythonPath $out) + fi + 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 if test "$javahlBindings"; then mkdir -p subversion/bindings/java/javahl/classes # bug fix diff --git a/pkgs/applications/version-management/subversion-1.4.x/default.nix b/pkgs/applications/version-management/subversion-1.4.x/default.nix index 68d270a8196d..d09176302b8b 100644 --- a/pkgs/applications/version-management/subversion-1.4.x/default.nix +++ b/pkgs/applications/version-management/subversion-1.4.x/default.nix @@ -3,6 +3,7 @@ , sslSupport ? false , compressionSupport ? false , pythonBindings ? false +, perlBindings ? false , javahlBindings ? false , stdenv, fetchurl, apr, aprutil, neon, zlib , httpd ? null, expat, swig ? null, jdk ? null @@ -26,7 +27,9 @@ stdenv.mkDerivation { buildInputs = [expat zlib] - ++ (if pythonBindings then [swig.python] else []); + ++ (if pythonBindings then [swig.python] else []) + ++ (if perlBindings then [swig.perl] else []) + ; configureFlags = " --without-gdbm --disable-static @@ -37,15 +40,17 @@ stdenv.mkDerivation { "--with-apxs=${httpd}/bin/apxs --with-apr=${httpd} --with-apr-util=${httpd}" else "--without-apxs"} - ${if pythonBindings then "--with-swig=${swig}" else "--without-swig"} + ${if (pythonBindings || perlBindings) then "--with-swig=${swig}" else "--without-swig"} ${if javahlBindings then "--enable-javahl --with-jdk=${jdk}" else ""} --disable-neon-version-check "; - inherit httpServer pythonBindings javahlBindings; + inherit httpServer pythonBindings javahlBindings perlBindings; + patches = [ ./subversion-respect_CPPFLAGS_in_perl_bindings.patch ]; meta = { description = "A version control system intended to be a compelling replacement for CVS in the open source community"; homepage = http://subversion.tigris.org/; }; } + diff --git a/pkgs/applications/version-management/subversion-1.4.x/subversion-respect_CPPFLAGS_in_perl_bindings.patch b/pkgs/applications/version-management/subversion-1.4.x/subversion-respect_CPPFLAGS_in_perl_bindings.patch new file mode 100644 index 000000000000..86c18145c2e7 --- /dev/null +++ b/pkgs/applications/version-management/subversion-1.4.x/subversion-respect_CPPFLAGS_in_perl_bindings.patch @@ -0,0 +1,22 @@ +Index: subversion/bindings/swig/perl/native/Makefile.PL.in +=================================================================== +--- subversion-1.4.5/subversion/bindings/swig/perl/native/Makefile.PL.in (revision 27184) ++++ subversion-1.4.5/subversion/bindings/swig/perl/native/Makefile.PL.in (working copy) +@@ -26,6 +26,7 @@ + my @ldmodules = map {"-lsvn_$_-1"} (@modules, qw/diff subr/); + + my $apr_shlib_path_var = '@SVN_APR_SHLIB_PATH_VAR@'; ++my $cppflags = '@CPPFLAGS@'; + my $apr_cflags = '@SVN_APR_INCLUDES@'; + my $apu_cflags = '@SVN_APRUTIL_INCLUDES@'; + +@@ -38,7 +39,7 @@ + + my %config = ( + ABSTRACT => 'Perl bindings for Subversion', +- INC => join(' ',$apr_cflags, $apu_cflags, ++ INC => join(' ', $cppflags, $apr_cflags, $apu_cflags, + " -I$swig_srcdir/perl/libsvn_swig_perl", + " -I$svnlib_srcdir/include", + " -I$svnlib_builddir", +