mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
gnu: icedtea-6: Use modify-phases syntax.
* gnu/packages/java.scm (icedtea-6)[arguments]: Use modify-phases syntax.
This commit is contained in:
parent
745ad37a78
commit
9bc84dfea9
1 changed files with 211 additions and 220 deletions
|
@ -281,8 +281,8 @@ (define-public icedtea-6
|
|||
,(string-append "--with-jdk-home=" jdk)
|
||||
,(string-append "--with-java=" jdk "/bin/java")))
|
||||
#:phases
|
||||
(alist-replace
|
||||
'unpack
|
||||
(modify-phases %standard-phases
|
||||
(replace 'unpack
|
||||
(lambda* (#:key source inputs #:allow-other-keys)
|
||||
(and (zero? (system* "tar" "xvf" source))
|
||||
(begin
|
||||
|
@ -291,9 +291,8 @@ (define-public icedtea-6
|
|||
(with-directory-excursion "openjdk.src"
|
||||
(copy-file (assoc-ref inputs "openjdk6-src")
|
||||
"openjdk6-src.tar.xz")
|
||||
(zero? (system* "tar" "xvf" "openjdk6-src.tar.xz"))))))
|
||||
(alist-cons-after
|
||||
'unpack 'patch-patches
|
||||
(zero? (system* "tar" "xvf" "openjdk6-src.tar.xz")))))))
|
||||
(add-after 'unpack 'patch-patches
|
||||
(lambda _
|
||||
;; shebang in patches so that they apply cleanly
|
||||
(substitute* '("patches/jtreg-jrunscript.patch"
|
||||
|
@ -305,9 +304,8 @@ (define-public icedtea-6
|
|||
(("ALSA_INCLUDE=/usr/include/alsa/version.h")
|
||||
(string-append "ALSA_INCLUDE="
|
||||
(assoc-ref %build-inputs "alsa-lib")
|
||||
"/include/alsa/version.h"))))
|
||||
(alist-cons-after
|
||||
'unpack 'patch-paths
|
||||
"/include/alsa/version.h")))))
|
||||
(add-after 'unpack 'patch-paths
|
||||
(lambda _
|
||||
;; buildtree.make generates shell scripts, so we need to replace
|
||||
;; the generated shebang
|
||||
|
@ -383,9 +381,8 @@ (define-public icedtea-6
|
|||
(("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
|
||||
(("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
|
||||
(("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
|
||||
(("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))))
|
||||
(alist-cons-before
|
||||
'configure 'set-additional-paths
|
||||
(("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))))
|
||||
(add-before 'configure 'set-additional-paths
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(let* ((gcjdir (assoc-ref %build-inputs "gcj"))
|
||||
(gcjlib (string-append gcjdir "/lib"))
|
||||
|
@ -412,9 +409,8 @@ (define-public icedtea-6
|
|||
"/include"))
|
||||
(setenv "ALT_FREETYPE_LIB_PATH"
|
||||
(string-append (assoc-ref %build-inputs "freetype")
|
||||
"/lib"))))
|
||||
(alist-cons-before
|
||||
'check 'fix-test-framework
|
||||
"/lib")))))
|
||||
(add-before 'check 'fix-test-framework
|
||||
(lambda _
|
||||
;; Fix PATH in test environment
|
||||
(substitute* "src/jtreg/com/sun/javatest/regtest/Main.java"
|
||||
|
@ -422,9 +418,8 @@ (define-public icedtea-6
|
|||
(string-append "PATH=" (getenv "PATH"))))
|
||||
(substitute* "src/jtreg/com/sun/javatest/util/SysEnv.java"
|
||||
(("/usr/bin/env") (which "env")))
|
||||
#t)
|
||||
(alist-cons-before
|
||||
'check 'fix-hotspot-tests
|
||||
#t))
|
||||
(add-before 'check 'fix-hotspot-tests
|
||||
(lambda _
|
||||
(with-directory-excursion "openjdk.src/hotspot/test/"
|
||||
(substitute* "jprt.config"
|
||||
|
@ -437,9 +432,8 @@ (define-public icedtea-6
|
|||
(("/bin/rm") (which "rm"))
|
||||
(("/bin/cp") (which "cp"))
|
||||
(("/bin/mv") (which "mv"))))
|
||||
#t)
|
||||
(alist-cons-before
|
||||
'check 'fix-jdk-tests
|
||||
#t))
|
||||
(add-before 'check 'fix-jdk-tests
|
||||
(lambda _
|
||||
(with-directory-excursion "openjdk.src/jdk/test/"
|
||||
(substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
|
||||
|
@ -495,9 +489,8 @@ (define-public icedtea-6
|
|||
(("/bin/chmod") (which "chmod")))
|
||||
(substitute* "java/util/zip/ZipFile/Assortment.java"
|
||||
(("/bin/sh") (which "sh"))))
|
||||
#t)
|
||||
(alist-replace
|
||||
'check
|
||||
#t))
|
||||
(replace 'check
|
||||
(lambda _
|
||||
;; The "make check-*" targets always return zero, so we need to
|
||||
;; check for errors in the associated log files to determine
|
||||
|
@ -519,9 +512,8 @@ (define-public icedtea-6
|
|||
(or #t ; skip tests
|
||||
(and (run-test "check-hotspot")
|
||||
(run-test "check-langtools")
|
||||
(run-test "check-jdk")))))
|
||||
(alist-replace
|
||||
'install
|
||||
(run-test "check-jdk"))))))
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((doc (string-append (assoc-ref outputs "doc")
|
||||
"/share/doc/icedtea"))
|
||||
|
@ -529,8 +521,7 @@ (define-public icedtea-6
|
|||
(jdk (assoc-ref outputs "jdk")))
|
||||
(copy-recursively "openjdk.build/docs" doc)
|
||||
(copy-recursively "openjdk.build/j2re-image" jre)
|
||||
(copy-recursively "openjdk.build/j2sdk-image" jdk)))
|
||||
%standard-phases)))))))))))
|
||||
(copy-recursively "openjdk.build/j2sdk-image" jdk)))))))
|
||||
(native-inputs
|
||||
`(("ant" ,ant)
|
||||
("alsa-lib" ,alsa-lib)
|
||||
|
|
Loading…
Reference in a new issue