about summary refs log tree commit diff
path: root/pkgs/aszlig
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2020-10-22 15:45:57 +0200
committeraszlig <aszlig@nix.build>2020-10-22 15:45:57 +0200
commit42cd47e471c39af187243eec4890be5c1204feaf (patch)
treea8859c67cc85f30d85910b00c13cdc01a8e5145e /pkgs/aszlig
parentd766a20c260c7d02a94c792b09e2bd9090ee3edf (diff)
pkgs/librxtx-java: Fix build with newer JDK
This is actually needed to build the axbo program, which I have rarely
used during the past years. However, I'm not absolutely sure that I
won't be using this again so I decided to fix it, since all that needed
to be done is take an additional patch from Debian that fixes
compatibility with newer JDK versions.

Since the patch changes configure.in and Makefile.am, we need to
regenerate all the files for autotools as well and since there were old
m4 files laying around I deleted them in preAutoreconf.

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/aszlig')
-rw-r--r--pkgs/aszlig/librxtx-java/default.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgs/aszlig/librxtx-java/default.nix b/pkgs/aszlig/librxtx-java/default.nix
index 1553a146..8677fc6a 100644
--- a/pkgs/aszlig/librxtx-java/default.nix
+++ b/pkgs/aszlig/librxtx-java/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, unzip, jdk, lockdev }:
+{ stdenv, fetchurl, fetchpatch, unzip, autoreconfHook, jdk, lockdev }:
 
 stdenv.mkDerivation rec {
   name = "rxtx-${version}";
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
 
   patches = let
     baseurl = "https://sources.debian.net/data/main/"
-            + "r/rxtx/2.2pre2-13/debian/patches";
+            + "r/rxtx/2.2pre2+dfsg1-2/debian/patches";
   in [
     (fetchpatch {
       url = "${baseurl}/fhs_lock_buffer_overflow_fix.patch";
@@ -28,8 +28,14 @@ stdenv.mkDerivation rec {
       url = "${baseurl}/format_security.patch";
       sha256 = "0adg7y9ak4xvgyswdhx6fsxq8jlb8y55xl3s6l0p8w0mfrhw7ysk";
     })
+    (fetchpatch {
+      url = "${baseurl}/java10-compatibility.patch";
+      sha256 = "05yzgjiyfb98q8444vx1qv1h81rr9d310q54dnnq18miciz4za7y";
+    })
   ];
 
+  preAutoreconf = "rm *.m4";
+  nativeBuildInputs = [ autoreconfHook ];
   buildInputs = [ unzip jdk lockdev ];
 
   NIX_CFLAGS_COMPILE = "-DUTS_RELEASE=\"3.8.0\"";