From d91488908bd0a72ebfe6d843031e8001ca5ffc6b Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 30 Dec 2015 14:04:04 +0100 Subject: gnu: icedtea6, icedtea7: Unpack to "openjdk.src". * gnu/packages/java.scm (icedtea6)[arguments]: Unpack OpenJDK sources to "openjdk.src". (icedtea7)[arguments]: Inherit "--with-openjdk-src-dir" flag; refer to "openjdk.src" in build phases; simplify "unpack" phase. [native-inputs]: Rename "openjdk-drop" to "openjdk-src". --- gnu/packages/java.scm | 103 +++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 56 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 60439d153..4d0750c3d 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -265,7 +265,7 @@ build process and its dependencies, whereas Make uses Makefile format.") "--without-rhino" "--disable-downloading" "--disable-tests" ;they are run in the check phase instead - ,(string-append "--with-openjdk-src-dir=" "./openjdk") + "--with-openjdk-src-dir=./openjdk.src" ,(string-append "--with-javac=" jdk "/bin/javac") ,(string-append "--with-ecj-jar=" ecj) ,(string-append "--with-gcj=" gcj) @@ -278,8 +278,8 @@ build process and its dependencies, whereas Make uses Makefile format.") (and (zero? (system* "tar" "xvf" source)) (begin (chdir (string-append ,name "-" ,version)) - (mkdir "openjdk") - (with-directory-excursion "openjdk" + (mkdir "openjdk.src") + (with-directory-excursion "openjdk.src" (copy-file (assoc-ref inputs "openjdk6-src") "openjdk6-src.tar.xz") (zero? (system* "tar" "xvf" "openjdk6-src.tar.xz")))))) @@ -302,7 +302,7 @@ build process and its dependencies, whereas Make uses Makefile format.") (lambda _ ;; buildtree.make generates shell scripts, so we need to replace ;; the generated shebang - (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make") + (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make") (("/bin/sh") (which "bash"))) (let ((corebin (string-append @@ -311,8 +311,8 @@ build process and its dependencies, whereas Make uses Makefile format.") (assoc-ref %build-inputs "binutils") "/bin/")) (grepbin (string-append (assoc-ref %build-inputs "grep") "/bin/"))) - (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk" - "openjdk/corba/make/common/shared/Defs-linux.gmk") + (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk" + "openjdk.src/corba/make/common/shared/Defs-linux.gmk") (("UNIXCOMMAND_PATH = /bin/") (string-append "UNIXCOMMAND_PATH = " corebin)) (("USRBIN_PATH = /usr/bin/") @@ -326,8 +326,8 @@ build process and its dependencies, whereas Make uses Makefile format.") (string-append "DEF_OBJCOPY = " (which "objcopy")))) ;; fix hard-coded utility paths - (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk" - "openjdk/corba/make/common/shared/Defs-utils.gmk") + (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk" + "openjdk.src/corba/make/common/shared/Defs-utils.gmk") (("ECHO *=.*echo") (string-append "ECHO = " (which "echo"))) (("^GREP *=.*grep") @@ -370,7 +370,7 @@ build process and its dependencies, whereas Make uses Makefile format.") ;; Some of these timestamps cause problems as they are more than ;; 10 years ago, failing the build process. (substitute* - "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties" + "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties" (("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") @@ -417,7 +417,7 @@ build process and its dependencies, whereas Make uses Makefile format.") (alist-cons-before 'check 'fix-hotspot-tests (lambda _ - (with-directory-excursion "openjdk/hotspot/test/" + (with-directory-excursion "openjdk.src/hotspot/test/" (substitute* "jprt.config" (("PATH=\"\\$\\{path4sdk\\}\"") (string-append "PATH=" (getenv "PATH"))) @@ -432,7 +432,7 @@ build process and its dependencies, whereas Make uses Makefile format.") (alist-cons-before 'check 'fix-jdk-tests (lambda _ - (with-directory-excursion "openjdk/jdk/test/" + (with-directory-excursion "openjdk.src/jdk/test/" (substitute* "com/sun/jdi/JdbReadTwiceTest.sh" (("/bin/pwd") (which "pwd"))) (substitute* "com/sun/jdi/ShellScaffold.sh" @@ -617,50 +617,41 @@ build process and its dependencies, whereas Make uses Makefile format.") ;; Apparently, the C locale is needed for some of the tests. #:locale "C" ,@(substitute-keyword-arguments (package-arguments icedtea6) + ((#:modules modules) + `((ice-9 match) + (srfi srfi-26) + ,@modules)) ((#:configure-flags flags) - `(delete "--with-openjdk-src-dir=./openjdk" - ;; TODO: package pcsc and sctp, and add to inputs - (append '("--disable-system-pcsc" - "--disable-system-sctp") - ,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 (drop dir) - (mkdir dir) - (zero? (system* "tar" "xvjf" - (assoc-ref inputs drop) - "-C" dir - "--strip-components=1"))))) - (and (zero? (system* "tar" "xvf" source)) - (chdir target) - (unpack "openjdk-drop" "openjdk") - (unpack "corba-drop" "openjdk/corba") - (unpack "jdk-drop" "openjdk/jdk") - (unpack "hotspot-drop" "openjdk/hotspot") - - ;; The build framework checks the tarballs, so we - ;; need to keep them around even though we have - ;; already unpacked some of them for patching. - (begin - (copy-file (assoc-ref inputs "openjdk-drop") - "openjdk.tar.bz2") - (copy-file (assoc-ref inputs "corba-drop") - "corba.tar.bz2") - (copy-file (assoc-ref inputs "hotspot-drop") - "hotspot.tar.bz2") - (copy-file (assoc-ref inputs "jaxp-drop") - "jaxp.tar.bz2") - (copy-file (assoc-ref inputs "jaxws-drop") - "jaxws.tar.bz2") - (copy-file (assoc-ref inputs "jdk-drop") - "jdk.tar.bz2") - (copy-file (assoc-ref inputs "langtools-drop") - "langtools.tar.bz2") - #t))))) + (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) @@ -670,7 +661,7 @@ build process and its dependencies, whereas Make uses Makefile format.") (str (read-line port))) (close-pipe port) str))) - (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk" + (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") @@ -698,7 +689,7 @@ build process and its dependencies, whereas Make uses Makefile format.") (add-after 'unpack 'fix-x11-extension-include-path (lambda* (#:key inputs #:allow-other-keys) - (substitute* "openjdk/jdk/make/sun/awt/mawt.gmk" + (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk" (((string-append "\\$\\(firstword \\$\\(wildcard " "\\$\\(OPENWIN_HOME\\)" "/include/X11/extensions\\).*$")) @@ -719,14 +710,14 @@ build process and its dependencies, whereas Make uses Makefile format.") (string-append "PATH=" (getenv "PATH")))) (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java" (("/usr/bin/env") (which "env"))) - (substitute* "openjdk/hotspot/test/test_env.sh" + (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 - `(("openjdk-drop" + `(("openjdk-src" ,(drop "openjdk" "0vflz0hhq4arykvvmsv3yas4yk9i0jm57287iqvs3a4832xjcpcy")) ("corba-drop" -- cgit v1.3 From d2540f80c223b40faefd1ab528d4e98e3995211d Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 30 Dec 2015 14:25:09 +0100 Subject: gnu: Add and use default IcedTea. * gnu/packages/java.scm (icedtea): New variable. (swt)[native-inputs]: Replace "icedtea6" with "icedtea". * gnu/packages/bioinformatics.scm (htsjdk)[native-inputs]: Likewise. (ngs-java)[inputs]: Likewise. * gnu/packages/kodi.scm (kodi)[native-inputs]: Replace "icedtea7" with "icedtea". * gnu/packages/ruby.scm (ruby-rjb)[native-inputs]: Replace "icedtea7" with "icedtea". --- gnu/packages/bioinformatics.scm | 4 ++-- gnu/packages/java.scm | 6 ++++-- gnu/packages/kodi.scm | 2 +- gnu/packages/ruby.scm | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index f1f796890..6f04965fb 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -1644,7 +1644,7 @@ from high-throughput sequencing assays.") '(configure install check))))) (native-inputs `(("ant" ,ant) - ("jdk" ,icedtea6 "jdk"))) + ("jdk" ,icedtea "jdk"))) (home-page "http://samtools.github.io/htsjdk/") (synopsis "Java API for high-throughput sequencing data (HTS) formats") (description @@ -2539,7 +2539,7 @@ simultaneously.") `(modify-phases ,phases (replace 'enter-dir (lambda _ (chdir "ngs-java") #t))))))) (inputs - `(("jdk" ,icedtea6 "jdk") + `(("jdk" ,icedtea "jdk") ("ngs-sdk" ,ngs-sdk))) (synopsis "Java bindings for NGS SDK"))) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 4d0750c3d..c4ad45e86 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -81,7 +81,7 @@ 'build (lambda* (#:key inputs outputs #:allow-other-keys) (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) - (setenv "JAVA_HOME" (assoc-ref inputs "icedtea6")) + (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) ;; Build shared libraries. Users of SWT have to set the system ;; property swt.library.path to the "lib" directory of this @@ -115,7 +115,7 @@ (native-inputs `(("pkg-config" ,pkg-config) ("unzip" ,unzip) - ("icedtea6" ,icedtea6 "jdk"))) + ("jdk" ,icedtea "jdk"))) (home-page "https://www.eclipse.org/swt/") (synopsis "Widget toolkit for Java") (description @@ -740,3 +740,5 @@ build process and its dependencies, whereas Make uses Makefile format.") "03pggsrhkzpjnj939vhr3b7mcrhfp22b7yg3hkx52kcv8dqkg3yx")) ,@(fold alist-delete (package-native-inputs icedtea6) '("openjdk6-src"))))))) + +(define-public icedtea icedtea7) diff --git a/gnu/packages/kodi.scm b/gnu/packages/kodi.scm index f0c372bc2..4a9cebde0 100644 --- a/gnu/packages/kodi.scm +++ b/gnu/packages/kodi.scm @@ -149,7 +149,7 @@ ("doxygen" ,doxygen) ("gawk" ,gawk) ("gettext" ,gnu-gettext) - ("icedtea7" ,icedtea7) ; needed at build-time only, mandatory + ("icedtea" ,icedtea) ; needed at build-time only, mandatory ("libtool" ,libtool) ("pkg-config" ,pkg-config) ("swig" ,swig) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 47ac392aa..0dcdb33d7 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -466,7 +466,7 @@ supported: XML Markup and XML Events.") (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) #t))))) (native-inputs - `(("jdk" ,icedtea7 "jdk"))) + `(("jdk" ,icedtea "jdk"))) (synopsis "Ruby-to-Java bridge using the Java Native Interface") (description "RJB is a bridge program that connects Ruby and Java via the Java Native Interface.") -- cgit v1.3 From 5452588c1a662bdcee240342a9df87efa4b1c017 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 30 Dec 2015 14:31:16 +0100 Subject: gnu: icedtea6, icedtea7: Rename package to "icedtea". * gnu/packages/java.scm (icedtea6): Change package name to "icedtea". (icedtea7): Inherit package name. --- gnu/packages/java.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index c4ad45e86..b4c7bc31b 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -186,7 +186,7 @@ build process and its dependencies, whereas Make uses Makefile format.") (define-public icedtea6 (package - (name "icedtea6") + (name "icedtea") (version "1.13.9") (source (origin (method url-fetch) @@ -514,7 +514,8 @@ build process and its dependencies, whereas Make uses Makefile format.") (alist-replace 'install (lambda* (#:key outputs #:allow-other-keys) - (let ((doc (string-append (assoc-ref outputs "doc") "/share/doc/" ,name)) + (let ((doc (string-append (assoc-ref outputs "doc") + "/share/doc/icedtea")) (jre (assoc-ref outputs "out")) (jdk (assoc-ref outputs "jdk"))) (copy-recursively "openjdk.build/docs" doc) @@ -585,7 +586,6 @@ build process and its dependencies, whereas Make uses Makefile format.") "/icedtea7/" version "/" name ".tar.bz2")) (sha256 (base32 hash)))))) (package (inherit icedtea6) - (name "icedtea7") (version version) (source (origin (method url-fetch) -- cgit v1.3 From d028740622f2cc837d0fb161506b12e6c459505a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 30 Dec 2015 14:33:11 +0100 Subject: gnu: icedtea6: Rename to icedtea-6. * gnu/packages/java.scm (icedtea6): Rename variable to... (icedtea-6): ...this. --- gnu/packages/java.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index b4c7bc31b..60873aa74 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -184,7 +184,7 @@ and is best suited to building Java projects. Ant uses XML to describe the build process and its dependencies, whereas Make uses Makefile format.") (license license:asl2.0))) -(define-public icedtea6 +(define-public icedtea-6 (package (name "icedtea") (version "1.13.9") @@ -585,7 +585,7 @@ build process and its dependencies, whereas Make uses Makefile format.") "http://icedtea.classpath.org/download/drops/" "/icedtea7/" version "/" name ".tar.bz2")) (sha256 (base32 hash)))))) - (package (inherit icedtea6) + (package (inherit icedtea-6) (version version) (source (origin (method url-fetch) @@ -616,7 +616,7 @@ build process and its dependencies, whereas Make uses Makefile format.") #:tests? #f ;; Apparently, the C locale is needed for some of the tests. #:locale "C" - ,@(substitute-keyword-arguments (package-arguments icedtea6) + ,@(substitute-keyword-arguments (package-arguments icedtea-6) ((#:modules modules) `((ice-9 match) (srfi srfi-26) @@ -738,7 +738,7 @@ build process and its dependencies, whereas Make uses Makefile format.") ("hotspot-drop" ,(drop "hotspot" "03pggsrhkzpjnj939vhr3b7mcrhfp22b7yg3hkx52kcv8dqkg3yx")) - ,@(fold alist-delete (package-native-inputs icedtea6) + ,@(fold alist-delete (package-native-inputs icedtea-6) '("openjdk6-src"))))))) (define-public icedtea icedtea7) -- cgit v1.3 From a243e12aba1dccbe5e67be8feb2337bdf8bfba71 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 30 Dec 2015 14:34:25 +0100 Subject: gnu: icedtea7: Rename to icedtea-7. * gnu/packages/java.scm (icedtea7): Rename variable to... (icedtea-7): ...this. (icedtea): Refer to "icedtea-7". --- gnu/packages/java.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 60873aa74..aaf789d8b 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -576,7 +576,7 @@ build process and its dependencies, whereas Make uses Makefile format.") ;; same license as both GNU Classpath and OpenJDK. (license license:gpl2+))) -(define-public icedtea7 +(define-public icedtea-7 (let* ((version "2.6.3") (drop (lambda (name hash) (origin @@ -741,4 +741,4 @@ build process and its dependencies, whereas Make uses Makefile format.") ,@(fold alist-delete (package-native-inputs icedtea-6) '("openjdk6-src"))))))) -(define-public icedtea icedtea7) +(define-public icedtea icedtea-7) -- cgit v1.3 From 9f40b1171bab8bc4be8a0a1f78453ac7e7310fdb Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 12 Jan 2016 11:34:52 +0100 Subject: gnu: icedtea-6: Fix directory name in "unpack" phase. * gnu/packages/java.scm (icedtea-6)[arguments]: Change the directory prefix in the "unpack" phase to "icedtea6-". --- gnu/packages/java.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index aaf789d8b..3a5b1e1a4 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -277,7 +277,7 @@ build process and its dependencies, whereas Make uses Makefile format.") (lambda* (#:key source inputs #:allow-other-keys) (and (zero? (system* "tar" "xvf" source)) (begin - (chdir (string-append ,name "-" ,version)) + (chdir (string-append "icedtea6-" ,version)) (mkdir "openjdk.src") (with-directory-excursion "openjdk.src" (copy-file (assoc-ref inputs "openjdk6-src") -- cgit v1.3