gnu: Remove icedtea-6.

* gnu/packages/java.scm (icedtea-6): Remove variable.
(icedtea-7): Do not inherit from icedtea-6.
This commit is contained in:
Ricardo Wurmus 2017-03-02 09:11:54 +01:00
parent a80488c204
commit 71053e1477
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -335,18 +335,26 @@ and is best suited to building Java projects. Ant uses XML to describe the
build process and its dependencies, whereas Make uses Makefile format.") build process and its dependencies, whereas Make uses Makefile format.")
(license license:asl2.0))) (license license:asl2.0)))
(define-public icedtea-6 (define-public icedtea-7
(let* ((version "2.6.9")
(drop (lambda (name hash)
(origin
(method url-fetch)
(uri (string-append
"http://icedtea.classpath.org/download/drops/"
"/icedtea7/" version "/" name ".tar.bz2"))
(sha256 (base32 hash))))))
(package (package
(name "icedtea") (name "icedtea")
(version "1.13.13") (version version)
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"http://icedtea.wildebeest.org/download/source/icedtea6-" "http://icedtea.wildebeest.org/download/source/icedtea-"
version ".tar.xz")) version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg")) "1slmajiakq7sk137vgqq9c93r5s620a46lw2jwbnzxhysjw3wkwf"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
'(substitute* "Makefile.in" '(substitute* "Makefile.in"
@ -361,58 +369,40 @@ build process and its dependencies, whereas Make uses Makefile format.")
"jdk" ; Java Development Kit "jdk" ; Java Development Kit
"doc")) ; all documentation "doc")) ; all documentation
(arguments (arguments
`(;; There are many failing tests and many are known to fail upstream. `(;; There are many test failures. Some are known to
;; ;; fail upstream, others relate to not having an X
;; * Hotspot VM tests: ;; server running at test time, yet others are a
;; FAILED: compiler/7082949/Test7082949.java ;; complete mystery to me.
;; FAILED: compiler/7088020/Test7088020.java
;; FAILED: runtime/6929067/Test6929067.sh ;; hotspot: passed: 241; failed: 45; error: 2
;; FAILED: serviceability/sa/jmap-hashcode/Test8028623.java ;; langtools: passed: 1,934; failed: 26
;; => Test results: passed: 161; failed: 4 ;; jdk: unknown
;;
;; * langtools tests:
;; FAILED: com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java
;; FAILED: tools/javac/6627362/T6627362.java
;; FAILED: tools/javac/7003595/T7003595.java
;; FAILED: tools/javac/7024568/T7024568.java
;; FAILED: tools/javap/4111861/T4111861.java
;; FAILED: tools/javap/ListTest.java
;; FAILED: tools/javap/OptionTest.java
;; FAILED: tools/javap/T4884240.java
;; FAILED: tools/javap/T4975569.java
;; --> fails because of insignificant whitespace differences
;; in output of javap
;; FAILED: tools/javap/T6868539.java
;; => Test results: passed: 1,445; failed: 10
;;
;; * JDK tests:
;; Tests are incomplete because of a segfault after this test:
;; javax/crypto/spec/RC5ParameterSpec/RC5ParameterSpecEquals.java
;; A bug report has already been filed upstream:
;; http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2188
;;
;; The tests require xvfb-run, a wrapper script around Xvfb, which
;; has not been packaged yet. Without it many AWT tests fail, so I
;; made no attempts to make a list of failing JDK tests. At least
;; 222 tests are failing of which at least 132 are AWT tests.
#:tests? #f #:tests? #f
;; The DSOs use $ORIGIN to refer to each other, but (guix build ;; The DSOs use $ORIGIN to refer to each other, but (guix build
;; gremlin) doesn't support it yet, so skip this phase. ;; gremlin) doesn't support it yet, so skip this phase.
#:validate-runpath? #f #:validate-runpath? #f
;; Apparently, the C locale is needed for some of the tests.
#:locale "C"
#:modules ((guix build utils) #:modules ((guix build utils)
(guix build gnu-build-system) (guix build gnu-build-system)
(ice-9 match)
(ice-9 popen) (ice-9 popen)
(ice-9 rdelim) (ice-9 rdelim)
(srfi srfi-19)) (srfi srfi-19)
(srfi srfi-26))
#:configure-flags #:configure-flags
(let* ((gcjdir (assoc-ref %build-inputs "gcj")) (let* ((gcjdir (assoc-ref %build-inputs "gcj"))
(ecj (string-append gcjdir "/share/java/ecj.jar")) (ecj (string-append gcjdir "/share/java/ecj.jar"))
(jdk (string-append gcjdir "/lib/jvm/")) (jdk (string-append gcjdir "/lib/jvm/"))
(gcj (string-append gcjdir "/bin/gcj"))) (gcj (string-append gcjdir "/bin/gcj")))
`("--enable-bootstrap" ;; TODO: package pcsc and sctp, and add to inputs
`("--disable-system-pcsc"
"--disable-system-sctp"
"--enable-bootstrap"
"--enable-nss" "--enable-nss"
"--without-rhino" "--without-rhino"
"--disable-downloading" "--disable-downloading"
@ -423,24 +413,46 @@ build process and its dependencies, whereas Make uses Makefile format.")
,(string-append "--with-gcj=" gcj) ,(string-append "--with-gcj=" gcj)
,(string-append "--with-jdk-home=" jdk) ,(string-append "--with-jdk-home=" jdk)
,(string-append "--with-java=" jdk "/bin/java"))) ,(string-append "--with-java=" jdk "/bin/java")))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(replace 'unpack (replace 'unpack
(lambda* (#:key source inputs #:allow-other-keys) (lambda* (#:key source inputs #:allow-other-keys)
(and (zero? (system* "tar" "xvf" source)) (let ((target (string-append "icedtea-" ,version))
(begin (unpack (lambda* (name #:optional dir)
(chdir (string-append "icedtea6-" ,version)) (let ((dir (or dir
(mkdir "openjdk.src") (string-drop-right name 5))))
(mkdir dir)
(zero? (system* "tar" "xvf"
(assoc-ref inputs name)
"-C" dir
"--strip-components=1"))))))
(mkdir target)
(and
(zero? (system* "tar" "xvf" source
"-C" target "--strip-components=1"))
(chdir target)
(unpack "openjdk-src" "openjdk.src")
(with-directory-excursion "openjdk.src" (with-directory-excursion "openjdk.src"
(copy-file (assoc-ref inputs "openjdk6-src") (for-each unpack
"openjdk6-src.tar.xz") (filter (cut string-suffix? "-drop" <>)
(zero? (system* "tar" "xvf" "openjdk6-src.tar.xz"))))))) (map (match-lambda
(add-after 'unpack 'patch-patches ((name . _) name))
(lambda _ inputs))))
;; shebang in patches so that they apply cleanly #t))))
(substitute* '("patches/jtreg-jrunscript.patch" (add-after 'unpack 'fix-x11-extension-include-path
"patches/hotspot/hs23/drop_unlicensed_test.patch") (lambda* (#:key inputs #:allow-other-keys)
(("#!/bin/sh") (string-append "#!" (which "sh")))) (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
(((string-append "\\$\\(firstword \\$\\(wildcard "
"\\$\\(OPENWIN_HOME\\)"
"/include/X11/extensions\\).*$"))
(string-append (assoc-ref inputs "libxrender")
"/include/X11/extensions"
" -I" (assoc-ref inputs "libxtst")
"/include/X11/extensions"
" -I" (assoc-ref inputs "libxinerama")
"/include/X11/extensions"))
(("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
#t)) #t))
(add-after 'unpack 'patch-paths (add-after 'unpack 'patch-paths
(lambda _ (lambda _
@ -525,43 +537,56 @@ build process and its dependencies, whereas Make uses Makefile format.")
(("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
(("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
(("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
(("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))))) (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
#t))
(add-before 'configure 'set-additional-paths (add-before 'configure 'set-additional-paths
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let* ((gcjdir (assoc-ref %build-inputs "gcj")) (let ( ;; Get target-specific include directory so that
(gcjlib (string-append gcjdir "/lib"))
;; Get target-specific include directory so that
;; libgcj-config.h is found when compiling hotspot. ;; libgcj-config.h is found when compiling hotspot.
(gcjinclude (let* ((port (open-input-pipe "gcj -print-file-name=include")) (gcjinclude (let* ((port (open-input-pipe "gcj -print-file-name=include"))
(str (read-line port))) (str (read-line port)))
(close-pipe port) (close-pipe port)
str))) str)))
(substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
(("ALSA_INCLUDE=/usr/include/alsa/version.h")
(string-append "ALSA_INCLUDE="
(assoc-ref inputs "alsa-lib")
"/include/alsa/version.h")))
(setenv "CC" "gcc")
(setenv "CPATH" (setenv "CPATH"
(string-append gcjinclude ":" (string-append gcjinclude ":"
(assoc-ref %build-inputs "libxrender") (assoc-ref inputs "libxcomposite")
"/include/X11/extensions" ":" "/include/X11/extensions" ":"
(assoc-ref %build-inputs "libxtst") (assoc-ref inputs "libxrender")
"/include/X11/extensions" ":" "/include/X11/extensions" ":"
(assoc-ref %build-inputs "libxinerama") (assoc-ref inputs "libxtst")
"/include/X11/extensions" ":"
(assoc-ref inputs "libxinerama")
"/include/X11/extensions" ":" "/include/X11/extensions" ":"
(or (getenv "CPATH") ""))) (or (getenv "CPATH") "")))
(setenv "ALT_OBJCOPY" (which "objcopy"))
(setenv "ALT_CUPS_HEADERS_PATH" (setenv "ALT_CUPS_HEADERS_PATH"
(string-append (assoc-ref %build-inputs "cups") (string-append (assoc-ref inputs "cups")
"/include")) "/include"))
(setenv "ALT_FREETYPE_HEADERS_PATH" (setenv "ALT_FREETYPE_HEADERS_PATH"
(string-append (assoc-ref %build-inputs "freetype") (string-append (assoc-ref inputs "freetype")
"/include")) "/include"))
(setenv "ALT_FREETYPE_LIB_PATH" (setenv "ALT_FREETYPE_LIB_PATH"
(string-append (assoc-ref %build-inputs "freetype") (string-append (assoc-ref inputs "freetype")
"/lib"))))) "/lib")))
#t))
(add-before 'check 'fix-test-framework (add-before 'check 'fix-test-framework
(lambda _ (lambda _
;; Fix PATH in test environment ;; Fix PATH in test environment
(substitute* "src/jtreg/com/sun/javatest/regtest/Main.java" (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
(("PATH=/bin:/usr/bin") (("PATH=/bin:/usr/bin")
(string-append "PATH=" (getenv "PATH")))) (string-append "PATH=" (getenv "PATH"))))
(substitute* "src/jtreg/com/sun/javatest/util/SysEnv.java" (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
(("/usr/bin/env") (which "env"))) (("/usr/bin/env") (which "env")))
(substitute* "openjdk.src/hotspot/test/test_env.sh"
(("/bin/rm") (which "rm"))
(("/bin/cp") (which "cp"))
(("/bin/mv") (which "mv")))
#t)) #t))
(add-before 'check 'fix-hotspot-tests (add-before 'check 'fix-hotspot-tests
(lambda _ (lambda _
@ -665,7 +690,8 @@ build process and its dependencies, whereas Make uses Makefile format.")
(jdk (assoc-ref outputs "jdk"))) (jdk (assoc-ref outputs "jdk")))
(copy-recursively "openjdk.build/docs" doc) (copy-recursively "openjdk.build/docs" doc)
(copy-recursively "openjdk.build/j2re-image" jre) (copy-recursively "openjdk.build/j2re-image" jre)
(copy-recursively "openjdk.build/j2sdk-image" jdk)))) (copy-recursively "openjdk.build/j2sdk-image" jdk))
#t))
;; By default IcedTea only generates an empty keystore. In order to ;; By default IcedTea only generates an empty keystore. In order to
;; be able to use certificates in Java programs we need to generate a ;; be able to use certificates in Java programs we need to generate a
;; keystore from a set of certificates. For convenience we use the ;; keystore from a set of certificates. For convenience we use the
@ -736,204 +762,6 @@ build process and its dependencies, whereas Make uses Makefile format.")
(string-append (assoc-ref outputs "jdk") (string-append (assoc-ref outputs "jdk")
"/jre/lib/security")) "/jre/lib/security"))
#t)))))) #t))))))
(native-inputs
`(("ant" ,ant)
("alsa-lib" ,alsa-lib)
("attr" ,attr)
("autoconf" ,autoconf)
("automake" ,automake)
("coreutils" ,coreutils)
("diffutils" ,diffutils) ;for tests
("gawk" ,gawk)
("grep" ,grep)
("libtool" ,libtool)
("pkg-config" ,pkg-config)
("cups" ,cups)
("wget" ,wget)
("which" ,which)
("cpio" ,cpio)
("zip" ,zip)
("unzip" ,unzip)
("fastjar" ,fastjar)
("libxslt" ,libxslt) ;for xsltproc
("mit-krb5" ,mit-krb5)
("nss" ,nss)
("nss-certs" ,nss-certs)
("libx11" ,libx11)
("libxcomposite" ,libxcomposite)
("libxt" ,libxt)
("libxtst" ,libxtst)
("libxi" ,libxi)
("libxinerama" ,libxinerama)
("libxrender" ,libxrender)
("libjpeg" ,libjpeg)
("libpng" ,libpng)
("giflib" ,giflib)
("perl" ,perl)
("procps" ,procps) ;for "free", even though I'm not sure we should use it
("openjdk6-src"
,(origin
(method url-fetch)
(uri "https://java.net/downloads/openjdk6/openjdk-6-src-b41-04_jan_2017.tar.xz")
(sha256
(base32
"058szix0j280g14jzajvsixx1j2dxmc10r848f5swpy6rr8x8d4f"))))
("lcms" ,lcms)
("zlib" ,zlib)
("gtk" ,gtk+-2)
("fontconfig" ,fontconfig)
("freetype" ,freetype)
("gcj" ,gcj)))
(home-page "http://icedtea.classpath.org")
(synopsis "Java development kit")
(description
"The OpenJDK built with the IcedTea build harness.")
;; IcedTea is released under the GPL2 + Classpath exception, which is the
;; same license as both GNU Classpath and OpenJDK.
(license license:gpl2+)))
(define-public icedtea-7
(let* ((version "2.6.9")
(drop (lambda (name hash)
(origin
(method url-fetch)
(uri (string-append
"http://icedtea.classpath.org/download/drops/"
"/icedtea7/" version "/" name ".tar.bz2"))
(sha256 (base32 hash))))))
(package (inherit icedtea-6)
(version version)
(source (origin
(method url-fetch)
(uri (string-append
"http://icedtea.wildebeest.org/download/source/icedtea-"
version ".tar.xz"))
(sha256
(base32
"1slmajiakq7sk137vgqq9c93r5s620a46lw2jwbnzxhysjw3wkwf"))
(modules '((guix build utils)))
(snippet
'(substitute* "Makefile.in"
;; link against libgcj to avoid linker error
(("-o native-ecj")
"-lgcj -o native-ecj")
;; do not leak information about the build host
(("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
"DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
(arguments
`(;; There are many test failures. Some are known to
;; fail upstream, others relate to not having an X
;; server running at test time, yet others are a
;; complete mystery to me.
;; hotspot: passed: 241; failed: 45; error: 2
;; langtools: passed: 1,934; failed: 26
;; jdk: unknown
#:tests? #f
;; Apparently, the C locale is needed for some of the tests.
#:locale "C"
,@(substitute-keyword-arguments (package-arguments icedtea-6)
((#:modules modules)
`((ice-9 match)
(srfi srfi-26)
,@modules))
((#:configure-flags flags)
;; TODO: package pcsc and sctp, and add to inputs
`(append '("--disable-system-pcsc"
"--disable-system-sctp")
,flags))
((#:phases phases)
`(modify-phases ,phases
(replace 'unpack
(lambda* (#:key source inputs #:allow-other-keys)
(let ((target (string-append "icedtea-" ,version))
(unpack (lambda* (name #:optional dir)
(let ((dir (or dir
(string-drop-right name 5))))
(mkdir dir)
(zero? (system* "tar" "xvf"
(assoc-ref inputs name)
"-C" dir
"--strip-components=1"))))))
(mkdir target)
(and
(zero? (system* "tar" "xvf" source
"-C" target "--strip-components=1"))
(chdir target)
(unpack "openjdk-src" "openjdk.src")
(with-directory-excursion "openjdk.src"
(for-each unpack
(filter (cut string-suffix? "-drop" <>)
(map (match-lambda
((name . _) name))
inputs))))
#t))))
(replace
'set-additional-paths
(lambda* (#:key inputs #:allow-other-keys)
(let (;; Get target-specific include directory so that
;; libgcj-config.h is found when compiling hotspot.
(gcjinclude (let* ((port (open-input-pipe "gcj -print-file-name=include"))
(str (read-line port)))
(close-pipe port)
str)))
(substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
(("ALSA_INCLUDE=/usr/include/alsa/version.h")
(string-append "ALSA_INCLUDE="
(assoc-ref inputs "alsa-lib")
"/include/alsa/version.h")))
(setenv "CC" "gcc")
(setenv "CPATH"
(string-append gcjinclude ":"
(assoc-ref inputs "libxcomposite")
"/include/X11/extensions" ":"
(assoc-ref inputs "libxrender")
"/include/X11/extensions" ":"
(assoc-ref inputs "libxtst")
"/include/X11/extensions" ":"
(assoc-ref inputs "libxinerama")
"/include/X11/extensions" ":"
(or (getenv "CPATH") "")))
(setenv "ALT_OBJCOPY" (which "objcopy"))
(setenv "ALT_CUPS_HEADERS_PATH"
(string-append (assoc-ref inputs "cups")
"/include"))
(setenv "ALT_FREETYPE_HEADERS_PATH"
(string-append (assoc-ref inputs "freetype")
"/include"))
(setenv "ALT_FREETYPE_LIB_PATH"
(string-append (assoc-ref inputs "freetype")
"/lib")))))
(add-after
'unpack 'fix-x11-extension-include-path
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
(((string-append "\\$\\(firstword \\$\\(wildcard "
"\\$\\(OPENWIN_HOME\\)"
"/include/X11/extensions\\).*$"))
(string-append (assoc-ref inputs "libxrender")
"/include/X11/extensions"
" -I" (assoc-ref inputs "libxtst")
"/include/X11/extensions"
" -I" (assoc-ref inputs "libxinerama")
"/include/X11/extensions"))
(("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
#t))
(replace
'fix-test-framework
(lambda _
;; Fix PATH in test environment
(substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
(("PATH=/bin:/usr/bin")
(string-append "PATH=" (getenv "PATH"))))
(substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
(("/usr/bin/env") (which "env")))
(substitute* "openjdk.src/hotspot/test/test_env.sh"
(("/bin/rm") (which "rm"))
(("/bin/cp") (which "cp"))
(("/bin/mv") (which "mv")))
#t))
(delete 'patch-patches))))))
(native-inputs (native-inputs
`(("openjdk-src" `(("openjdk-src"
,(drop "openjdk" ,(drop "openjdk"
@ -956,11 +784,55 @@ build process and its dependencies, whereas Make uses Makefile format.")
("hotspot-drop" ("hotspot-drop"
,(drop "hotspot" ,(drop "hotspot"
"16ijxy8br8dla339m4i90wr9xpf7s8z3nrhfyxm7jahr8injpzyl")) "16ijxy8br8dla339m4i90wr9xpf7s8z3nrhfyxm7jahr8injpzyl"))
,@(fold alist-delete (package-native-inputs icedtea-6) ("ant" ,ant)
'("openjdk6-src")))) ("attr" ,attr)
("autoconf" ,autoconf)
("automake" ,automake)
("coreutils" ,coreutils)
("diffutils" ,diffutils) ;for tests
("gawk" ,gawk)
("grep" ,grep)
("libtool" ,libtool)
("pkg-config" ,pkg-config)
("wget" ,wget)
("which" ,which)
("cpio" ,cpio)
("zip" ,zip)
("unzip" ,unzip)
("fastjar" ,fastjar)
("libxslt" ,libxslt) ;for xsltproc
("nss-certs" ,nss-certs)
("perl" ,perl)
("procps" ,procps) ;for "free", even though I'm not sure we should use it
("gcj" ,gcj)))
(inputs (inputs
`(("libxcomposite" ,libxcomposite) `(("alsa-lib" ,alsa-lib)
,@(package-inputs icedtea-6)))))) ("cups" ,cups)
("libx11" ,libx11)
("libxcomposite" ,libxcomposite)
("libxt" ,libxt)
("libxtst" ,libxtst)
("libxi" ,libxi)
("libxinerama" ,libxinerama)
("libxrender" ,libxrender)
("libjpeg" ,libjpeg)
("libpng" ,libpng)
("mit-krb5" ,mit-krb5)
("nss" ,nss)
("giflib" ,giflib)
("fontconfig" ,fontconfig)
("freetype" ,freetype)
("lcms" ,lcms)
("zlib" ,zlib)
("gtk" ,gtk+-2)))
(home-page "http://icedtea.classpath.org")
(synopsis "Java development kit")
(description
"This package provides the Java development kit OpenJDK built with the
IcedTea build harness.")
;; IcedTea is released under the GPL2 + Classpath exception, which is the
;; same license as both GNU Classpath and OpenJDK.
(license license:gpl2+))))
(define-public icedtea-8 (define-public icedtea-8
(let* ((version "3.3.0") (let* ((version "3.3.0")