summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2004-10-18 08:56:09 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2004-10-18 08:56:09 +0000
commitaf78f4c44bcce2057e8f1006c58bb8ef814b34bc (patch)
treec16615a9effa1b04d306d1d88d203f39de01f0cd
parent4fbb44e5987ce50f5e8a0bc2cbf13734d1b80452 (diff)
downloadnixpkgs-af78f4c44bcce2057e8f1006c58bb8ef814b34bc.tar
nixpkgs-af78f4c44bcce2057e8f1006c58bb8ef814b34bc.tar.gz
nixpkgs-af78f4c44bcce2057e8f1006c58bb8ef814b34bc.tar.bz2
nixpkgs-af78f4c44bcce2057e8f1006c58bb8ef814b34bc.tar.lz
nixpkgs-af78f4c44bcce2057e8f1006c58bb8ef814b34bc.tar.xz
nixpkgs-af78f4c44bcce2057e8f1006c58bb8ef814b34bc.tar.zst
nixpkgs-af78f4c44bcce2057e8f1006c58bb8ef814b34bc.zip
* 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
-rw-r--r--pkgs/applications/version-management/subversion-1.1.x/builder.sh25
-rw-r--r--pkgs/applications/version-management/subversion-1.1.x/default.nix17
-rw-r--r--pkgs/development/tools/misc/swig/default.nix6
-rw-r--r--pkgs/system/all-packages-generic.nix4
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 99e799b85e5..d0fc5a45ec0 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 0c01370395c..b9ca15bd579 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 e8ba2d23f98..0bd3f618e86 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 1222e1612fc..f5a8abef268 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) {