[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/06: gnu: antlr3-3.1: Fix java8 issue.
From: |
Danny Milosavljevic |
Subject: |
01/06: gnu: antlr3-3.1: Fix java8 issue. |
Date: |
Sun, 4 Mar 2018 10:01:35 -0500 (EST) |
dannym pushed a commit to branch master
in repository guix.
commit 4c763b4d6792adb0a8d3f61a241e490385cc0683
Author: Gábor Boskovits <address@hidden>
Date: Sun Mar 4 14:13:47 2018 +0100
gnu: antlr3-3.1: Fix java8 issue.
* gnu/packages/java.scm (antlr3-3.1)[source]: Add patch.
* gnu/packages/patches/antlr3-3_1-fix-java8-compilation.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
Signed-off-by: Danny Milosavljevic <address@hidden>
---
gnu/local.mk | 1 +
gnu/packages/java.scm | 4 ++-
.../patches/antlr3-3_1-fix-java8-compilation.patch | 35 ++++++++++++++++++++++
3 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 9684d94..dffecfc 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -553,6 +553,7 @@ dist_patch_DATA =
\
%D%/packages/patches/agg-am_c_prototype.patch \
%D%/packages/patches/ansible-wrap-program-hack.patch \
%D%/packages/patches/antiword-CVE-2014-8123.patch \
+ %D%/packages/patches/antlr3-3_1-fix-java8-compilation.patch \
%D%/packages/patches/ao-cad-aarch64-support.patch \
%D%/packages/patches/apr-skip-getservbyname-test.patch \
%D%/packages/patches/aspell-default-dict-dir.patch \
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 1e671b9..cda7f0e 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -6113,7 +6113,9 @@ import org.antlr.grammar.v2.ANTLRTreePrinter;"))
version ".tar.gz"))
(sha256
(base32
- "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))))
+ "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
+ (patches
+ (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
(arguments
`(#:jar-name (string-append "antlr3-" ,version ".jar")
#:source-dir "src:runtime/Java/src"
diff --git a/gnu/packages/patches/antlr3-3_1-fix-java8-compilation.patch
b/gnu/packages/patches/antlr3-3_1-fix-java8-compilation.patch
new file mode 100644
index 0000000..0c4deb0
--- /dev/null
+++ b/gnu/packages/patches/antlr3-3_1-fix-java8-compilation.patch
@@ -0,0 +1,35 @@
+Based on the upstream fix for the java8 compilation issue.
+Simplified patch.
+Upstream version of patch does not work with this source tree.
+
+The issue is that in java8 it is an error to pass null to
+removeAll. Results in null pointer exception. java7
+behaviour was to return the list unmodified.
+
+From db2a350c6d90efaa8dde949fa76005c2c5af45c4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <address@hidden>
+Date: Fri, 5 Jan 2018 17:05:31 +0100
+Subject: [PATCH] Fix java8 compilation.
+
+---
+ src/org/antlr/tool/CompositeGrammar.java | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/org/antlr/tool/CompositeGrammar.java
b/src/org/antlr/tool/CompositeGrammar.java
+index f1408e7..7e02431 100644
+--- a/src/org/antlr/tool/CompositeGrammar.java
++++ b/src/org/antlr/tool/CompositeGrammar.java
+@@ -218,7 +218,9 @@ public class CompositeGrammar {
+ public List<Grammar> getIndirectDelegates(Grammar g) {
+ List<Grammar> direct = getDirectDelegates(g);
+ List<Grammar> delegates = getDelegates(g);
+- delegates.removeAll(direct);
++ if (direct != null) {
++ delegates.removeAll(direct);
++ }
+ return delegates;
+ }
+
+--
+2.15.1
+
- branch master updated (82f09c0 -> 81ed306), Danny Milosavljevic, 2018/03/04
- 04/06: gnu: python-funcy: Fix tests., Danny Milosavljevic, 2018/03/04
- 03/06: git-download: Fetch only the required commit, if possible., Danny Milosavljevic, 2018/03/04
- 05/06: gnu: abiword: Disable duplicate icon cache generation., Danny Milosavljevic, 2018/03/04
- 06/06: gnu: inkscape: Disable duplicate icon cache generation., Danny Milosavljevic, 2018/03/04
- 02/06: gnu: antlr3-3.3: Fix java8 issue., Danny Milosavljevic, 2018/03/04
- 01/06: gnu: antlr3-3.1: Fix java8 issue.,
Danny Milosavljevic <=