From af78f4c44bcce2057e8f1006c58bb8ef814b34bc Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 18 Oct 2004 08:56:09 +0000 Subject: [PATCH] * SWIG updated to 1.3.22. * Build Java/SWIG bindings in addition to the Java HL bindings in Subversion. Hm, I thought I had committed this. svn path=/nixpkgs/trunk/; revision=1570 --- .../subversion-1.1.x/builder.sh | 25 ++++++++++++++----- .../subversion-1.1.x/default.nix | 17 +++++++------ pkgs/development/tools/misc/swig/default.nix | 6 ++--- pkgs/system/all-packages-generic.nix | 4 ++- 4 files changed, 35 insertions(+), 17 deletions(-) diff --git a/pkgs/applications/version-management/subversion-1.1.x/builder.sh b/pkgs/applications/version-management/subversion-1.1.x/builder.sh index 99e799b85e5a..d0fc5a45ec01 100644 --- a/pkgs/applications/version-management/subversion-1.1.x/builder.sh +++ b/pkgs/applications/version-management/subversion-1.1.x/builder.sh @@ -16,11 +16,11 @@ if test "$httpServer"; then makeFlags="APACHE_LIBEXECDIR=$out/modules $makeFlags" fi -if test "$pythonBindings"; then +if test -n "$pythonBindings" -o -n "$javaSwigBindings"; then configureFlags="--with-swig=$swig $configureFlags" fi -if test "$javaBindings"; then +if test "$javahlBindings"; then configureFlags="--enable-javahl --with-jdk=$j2sdk $configureFlags" fi @@ -32,13 +32,26 @@ postInstall() { make swig-py make install-swig-py fi - if test "$javaBindings"; then - mkdir subversion/bindings/java/javahl/classes # bug fix + if test "$javaSwigBindings"; then + # Hack to get Java-Swig bindings to build if Python is not in + # scope (this fails because Subversion's configure script does + # something silly like `SWIG_JAVA_COMPILE="$SWIG_PY_COMPILE"'). + FL1='SWIG_JAVA_COMPILE=gcc' + FL2='SWIG_JAVA_LINK=gcc -L$(SWIG_BUILD_DIR)/.libs' + make swig-java "$FL1" "$FL2" + make swig-java-api "$FL1" "$FL2" + make swig-java-java "$FL1" "$FL2" + make install-swig-java "$FL1" "$FL2" + fi + if test "$javahlBindings"; then + mkdir -p subversion/bindings/java/javahl/classes # bug fix make javahl make install-javahl mkdir -p $out/share/doc/$name - $j2sdk/bin/javadoc -d $out/share/doc/$name -windowtitle "JavaHL Subversion Bindings" -link http://java.sun.com/j2se/1.4.2/docs/api/ \ - subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/*.java + $j2sdk/bin/javadoc -d $out/share/doc/$name \ + -windowtitle "JavaHL Subversion Bindings" \ + -link http://java.sun.com/j2se/1.4.2/docs/api/ \ + subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/*.java fi } postInstall=postInstall diff --git a/pkgs/applications/version-management/subversion-1.1.x/default.nix b/pkgs/applications/version-management/subversion-1.1.x/default.nix index 0c01370395c7..b9ca15bd5797 100644 --- a/pkgs/applications/version-management/subversion-1.1.x/default.nix +++ b/pkgs/applications/version-management/subversion-1.1.x/default.nix @@ -2,9 +2,10 @@ , httpServer ? false , sslSupport ? false , pythonBindings ? false -, javaBindings ? false +, javaSwigBindings ? false +, javahlBindings ? false , stdenv, fetchurl -, openssl ? null, httpd ? null, db4 ? null, expat, swig ? null +, openssl ? null, httpd ? null, db4 ? null, expat, swig ? null, j2sdk ? null }: assert expat != null; @@ -12,7 +13,8 @@ assert localServer -> db4 != null; assert httpServer -> httpd != null && httpd.expat == expat; assert sslSupport -> openssl != null && (httpServer -> httpd.openssl == openssl); assert pythonBindings -> swig != null && swig.pythonSupport; -assert javaBindings -> swig != null && swig.javaSupport; +assert javaSwigBindings -> swig != null && swig.javaSupport; +assert javahlBindings -> j2sdk != null; stdenv.mkDerivation { name = "subversion-1.1.0"; @@ -26,15 +28,16 @@ stdenv.mkDerivation { # This is a hopefully temporary fix for the problem that # libsvnjavahl.so isn't linked against libstdc++, which causes # loading the library into the JVM to fail. - patches = if javaBindings then [./javahl.patch] else []; + patches = if javahlBindings then [./javahl.patch] else []; openssl = if sslSupport then openssl else null; httpd = if httpServer then httpd else null; db4 = if localServer then db4 else null; - swig = if pythonBindings || javaBindings then swig else null; + swig = if pythonBindings || javaSwigBindings then swig else null; python = if pythonBindings then swig.python else null; - j2sdk = if javaBindings then swig.j2sdk else null; + j2sdk = if javaSwigBindings then swig.j2sdk else + if javahlBindings then j2sdk else null; inherit expat localServer httpServer sslSupport - pythonBindings javaBindings; + pythonBindings javaSwigBindings javahlBindings; } diff --git a/pkgs/development/tools/misc/swig/default.nix b/pkgs/development/tools/misc/swig/default.nix index e8ba2d23f987..0bd3f618e864 100644 --- a/pkgs/development/tools/misc/swig/default.nix +++ b/pkgs/development/tools/misc/swig/default.nix @@ -6,12 +6,12 @@ assert pythonSupport -> python != null; assert javaSupport -> j2sdk != null; stdenv.mkDerivation { - name = "swig-1.3.19"; + name = "swig-1.3.22"; builder = ./builder.sh; src = fetchurl { - url = http://heanet.dl.sourceforge.net/sourceforge/swig/swig-1.3.19.tar.gz; - md5 = "a733455544426b31868dd87fc162e750"; + url = http://heanet.dl.sourceforge.net/sourceforge/swig/swig-1.3.22.tar.gz; + md5 = "501121a2ddb61155348dfbc7c87286ba"; }; inherit perlSupport pythonSupport javaSupport; diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index 1222e1612fcd..f5a8abef2685 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -773,7 +773,9 @@ rec { httpServer = false; sslSupport = true; httpd = apacheHttpd; - javaBindings = true; + javaSwigBindings = true; + javahlBindings = true; + j2sdk = blackdown; }; pan = (import ../applications/networking/newsreaders/pan) {