summaryrefslogtreecommitdiff
path: root/gnu/packages/java.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/java.scm')
-rw-r--r--gnu/packages/java.scm33
1 files changed, 32 insertions, 1 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 403c446a82..def2c8d92d 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -152,6 +152,17 @@ and binary format defined in The Java Virtual Machine Specification.")
"--disable-gjdoc")
#:phases
(modify-phases %standard-phases
+ ;; XXX: This introduces a memory leak as we remove a call to free up
+ ;; memory for the file name string. This was necessary because of a
+ ;; runtime error that would have prevented us from building
+ ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
+ ;; for the gnarly details.
+ (add-after 'unpack 'remove-call-to-free
+ (lambda _
+ (substitute* "native/jni/java-io/java_io_VMFile.c"
+ (("result = cpio_isFileExists.*" m)
+ (string-append m "\n//")))
+ #t))
(add-after 'install 'install-data
(lambda _ (invoke "make" "install-data"))))))
(native-inputs
@@ -191,6 +202,11 @@ language.")
`(("classpath" ,classpath-bootstrap)
("jikes" ,jikes)
("zlib" ,zlib)))
+ ;; When built with a recent GCC and glibc the configure step of icedtea-6
+ ;; fails with an invalid instruction error.
+ (native-inputs
+ `(("gcc" ,gcc-5)
+ ("libc" ,glibc-2.28)))
(home-page "http://jamvm.sourceforge.net/")
(synopsis "Small Java Virtual Machine")
(description "JamVM is a Java Virtual Machine conforming to the JVM
@@ -740,6 +756,9 @@ machine.")))
(with-directory-excursion "openjdk"
(invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
(rename-file "hg-checkout" "hotspot"))
+ (substitute* "patches/freetypeversion.patch"
+ (("REQUIRED_FREETYPE_VERSION = 2.2.1")
+ "REQUIRED_FREETYPE_VERSION = 2.10.1"))
(substitute* "Makefile.in"
(("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
"echo \"trust me\";")
@@ -907,7 +926,6 @@ machine.")))
("fastjar" ,fastjar)
("fontconfig" ,fontconfig)
("freetype" ,freetype)
- ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7
("gtk" ,gtk+-2)
("gawk" ,gawk)
("giflib" ,giflib)
@@ -1107,6 +1125,18 @@ bootstrapping purposes.")
((name . _) name))
inputs))))
#t)))
+ (add-after 'unpack 'patch-bitrot
+ (lambda _
+ (substitute* '("patches/boot/revert-6973616.patch"
+ "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
+ (("REQUIRED_FREETYPE_VERSION = 2.2.1")
+ "REQUIRED_FREETYPE_VERSION = 2.10.1"))
+ ;; As of attr 2.4.48 this header is no longer
+ ;; included. It is provided by the libc instead.
+ (substitute* '("configure"
+ "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
+ (("attr/xattr.h") "sys/xattr.h"))
+ #t))
(add-after 'unpack 'fix-x11-extension-include-path
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
@@ -1586,6 +1616,7 @@ IcedTea build harness.")
(delete 'patch-paths)
(delete 'set-additional-paths)
(delete 'patch-patches)
+ (delete 'patch-bitrot)
;; Prevent the keytool from recording the current time when
;; adding certificates at build time.
(add-after 'unpack 'patch-keystore