From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] Various icedtea6 patches Date: Tue, 17 Mar 2015 14:18:50 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXrOi-0003nH-V1 for guix-devel@gnu.org; Tue, 17 Mar 2015 09:19:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXrOd-0005AX-Pw for guix-devel@gnu.org; Tue, 17 Mar 2015 09:19:04 -0400 Received: from sinope.bbbm.mdc-berlin.de ([141.80.25.23]:53479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXrOd-0005AN-8S for guix-devel@gnu.org; Tue, 17 Mar 2015 09:18:59 -0400 Received: from localhost (localhost [127.0.0.1]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP id 6A3CB28044F for ; Tue, 17 Mar 2015 14:18:57 +0100 (CET) Received: from sinope.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (sinope.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3U7c5QF72Jnb for ; Tue, 17 Mar 2015 14:18:51 +0100 (CET) Received: from HTCATWO.mdc-berlin.net (puck.citx.mdc-berlin.de [141.80.36.101]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Tue, 17 Mar 2015 14:18:50 +0100 (CET) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel --=-=-= Content-Type: text/plain Hi Guix, attached are a couple of patches to the icedtea6 package that make it a little easier to reuse build phases for a future icedtea7 package. They also fix a problem in the original package where a standard build phase is overridden. I must admit to being rather clueless when it comes to coming up with appropriate commit messages for these changes, so I'd appreciate suggestions to improve them. ~~ Ricardo --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-gnu-icedtea6-patch-ant-shebang-in-unpack-phase.patch" >From 3bc3dd46ebec97acf424bbc8b3026ee23fdafa19 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 10 Mar 2015 13:56:55 +0100 Subject: [PATCH 1/5] gnu: icedtea6: patch ant shebang in unpack phase * gnu/packages/java.scm (icedtea6)[arguments]: patch bootstrap ant in the `unpack' phase instead of `patch-paths'. --- gnu/packages/java.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 70a1830..38eee0e 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -267,6 +267,7 @@ build process and its dependencies, whereas Make uses Makefile format.") (zero? (system* "tar" "xvjf" (assoc-ref inputs "ant-bootstrap"))) (begin + (patch-shebang "apache-ant-1.9.4/bin/ant") (chdir (string-append ,name "-" ,version)) (mkdir "openjdk") (with-directory-excursion "openjdk" @@ -276,8 +277,6 @@ build process and its dependencies, whereas Make uses Makefile format.") (alist-cons-after 'unpack 'patch-paths (lambda _ - (patch-shebang "../apache-ant-1.9.4/bin/ant") - ;; shebang in patches so that they apply cleanly (substitute* '("patches/jtreg-jrunscript.patch" "patches/hotspot/hs23/drop_unlicensed_test.patch") -- 2.1.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0002-gnu-icedtea6-patch-hardcoded-objcopy-path.patch" >From 0d8261286f0d4a14b65359c7f23276f9d166c49e Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 10 Mar 2015 14:00:55 +0100 Subject: [PATCH 2/5] gnu: icedtea6: patch hardcoded objcopy path. * gnu/packages/java.scm (icedtea6)[arguments]: patch Makefile to override DEF_OBJCOPY variable definition. --- gnu/packages/java.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 38eee0e..a2a7819 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -310,7 +310,9 @@ build process and its dependencies, whereas Make uses Makefile format.") (string-append "DEVTOOLS_PATH = " corebin)) (("COMPILER_PATH *= */usr/bin/") (string-append "COMPILER_PATH = " - (assoc-ref %build-inputs "gcc") "/bin/"))) + (assoc-ref %build-inputs "gcc") "/bin/")) + (("DEF_OBJCOPY *=.*objcopy") + (string-append "DEF_OBJCOPY = " (which "objcopy")))) ;; fix hard-coded utility paths (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk" -- 2.1.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0003-gnu-icedtea6-patch-patches-in-separate-build-phase.patch" >From 9c9ef4fde4003a3bc9af73462552edde5d46c909 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 10 Mar 2015 14:05:48 +0100 Subject: [PATCH 3/5] gnu: icedtea6: patch patches in separate build phase. * gnu/packages/java.scm (icedtea6)[arguments]: patch patches in a separate build phase `patch-patches' instead of `patch-paths'. --- gnu/packages/java.scm | 168 +++++++++++++++++++++++++------------------------- 1 file changed, 85 insertions(+), 83 deletions(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index a2a7819..19be969 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -275,7 +275,7 @@ build process and its dependencies, whereas Make uses Makefile format.") "openjdk6-src.tar.xz") (zero? (system* "tar" "xvf" "openjdk6-src.tar.xz")))))) (alist-cons-after - 'unpack 'patch-paths + 'unpack 'patch-patches (lambda _ ;; shebang in patches so that they apply cleanly (substitute* '("patches/jtreg-jrunscript.patch" @@ -287,85 +287,87 @@ build process and its dependencies, whereas Make uses Makefile format.") (("ALSA_INCLUDE=/usr/include/alsa/version.h") (string-append "ALSA_INCLUDE=" (assoc-ref %build-inputs "alsa-lib") - "/include/alsa/version.h"))) + "/include/alsa/version.h")))) + (alist-cons-after + 'unpack 'patch-paths + (lambda _ + ;; buildtree.make generates shell scripts, so we need to replace + ;; the generated shebang + (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make") + (("/bin/sh") (which "bash"))) - ;; buildtree.make generates shell scripts, so we need to replace - ;; the generated shebang - (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make") - (("/bin/sh") (which "bash"))) + (let ((corebin (string-append + (assoc-ref %build-inputs "coreutils") "/bin/")) + (binbin (string-append + (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") + (("UNIXCOMMAND_PATH = /bin/") + (string-append "UNIXCOMMAND_PATH = " corebin)) + (("USRBIN_PATH = /usr/bin/") + (string-append "USRBIN_PATH = " corebin)) + (("DEVTOOLS_PATH *= */usr/bin/") + (string-append "DEVTOOLS_PATH = " corebin)) + (("COMPILER_PATH *= */usr/bin/") + (string-append "COMPILER_PATH = " + (assoc-ref %build-inputs "gcc") "/bin/")) + (("DEF_OBJCOPY *=.*objcopy") + (string-append "DEF_OBJCOPY = " (which "objcopy")))) - (let ((corebin (string-append - (assoc-ref %build-inputs "coreutils") "/bin/")) - (binbin (string-append - (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") - (("UNIXCOMMAND_PATH = /bin/") - (string-append "UNIXCOMMAND_PATH = " corebin)) - (("USRBIN_PATH = /usr/bin/") - (string-append "USRBIN_PATH = " corebin)) - (("DEVTOOLS_PATH *= */usr/bin/") - (string-append "DEVTOOLS_PATH = " corebin)) - (("COMPILER_PATH *= */usr/bin/") - (string-append "COMPILER_PATH = " - (assoc-ref %build-inputs "gcc") "/bin/")) - (("DEF_OBJCOPY *=.*objcopy") - (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") + (("ECHO *=.*echo") + (string-append "ECHO = " (which "echo"))) + (("^GREP *=.*grep") + (string-append "GREP = " (which "grep"))) + (("EGREP *=.*egrep") + (string-append "EGREP = " (which "egrep"))) + (("CPIO *=.*cpio") + (string-append "CPIO = " (which "cpio"))) + (("READELF *=.*readelf") + (string-append "READELF = " (which "readelf"))) + (("^ *AR *=.*ar") + (string-append "AR = " (which "ar"))) + (("^ *TAR *=.*tar") + (string-append "TAR = " (which "tar"))) + (("AS *=.*as") + (string-append "AS = " (which "as"))) + (("LD *=.*ld") + (string-append "LD = " (which "ld"))) + (("STRIP *=.*strip") + (string-append "STRIP = " (which "strip"))) + (("NM *=.*nm") + (string-append "NM = " (which "nm"))) + (("^SH *=.*sh") + (string-append "SH = " (which "bash"))) + (("^FIND *=.*find") + (string-append "FIND = " (which "find"))) + (("LDD *=.*ldd") + (string-append "LDD = " (which "ldd"))) + (("NAWK *=.*(n|g)awk") + (string-append "NAWK = " (which "gawk"))) + ;; (("NAWK *=.*gawk") + ;; (string-append "NAWK = " (which "gawk"))) + (("XARGS *=.*xargs") + (string-append "XARGS = " (which "xargs"))) + (("UNZIP *=.*unzip") + (string-append "UNZIP = " (which "unzip"))) + (("ZIPEXE *=.*zip") + (string-append "ZIPEXE = " (which "zip"))) + (("SED *=.*sed") + (string-append "SED = " (which "sed")))) - ;; fix hard-coded utility paths - (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk" - "openjdk/corba/make/common/shared/Defs-utils.gmk") - (("ECHO *=.*echo") - (string-append "ECHO = " (which "echo"))) - (("^GREP *=.*grep") - (string-append "GREP = " (which "grep"))) - (("EGREP *=.*egrep") - (string-append "EGREP = " (which "egrep"))) - (("CPIO *=.*cpio") - (string-append "CPIO = " (which "cpio"))) - (("READELF *=.*readelf") - (string-append "READELF = " (which "readelf"))) - (("^ *AR *=.*ar") - (string-append "AR = " (which "ar"))) - (("^ *TAR *=.*tar") - (string-append "TAR = " (which "tar"))) - (("AS *=.*as") - (string-append "AS = " (which "as"))) - (("LD *=.*ld") - (string-append "LD = " (which "ld"))) - (("STRIP *=.*strip") - (string-append "STRIP = " (which "strip"))) - (("NM *=.*nm") - (string-append "NM = " (which "nm"))) - (("^SH *=.*sh") - (string-append "SH = " (which "bash"))) - (("^FIND *=.*find") - (string-append "FIND = " (which "find"))) - (("LDD *=.*ldd") - (string-append "LDD = " (which "ldd"))) - (("NAWK *=.*(n|g)awk") - (string-append "NAWK = " (which "gawk"))) - ;; (("NAWK *=.*gawk") - ;; (string-append "NAWK = " (which "gawk"))) - (("XARGS *=.*xargs") - (string-append "XARGS = " (which "xargs"))) - (("UNZIP *=.*unzip") - (string-append "UNZIP = " (which "unzip"))) - (("ZIPEXE *=.*zip") - (string-append "ZIPEXE = " (which "zip"))) - (("SED *=.*sed") - (string-append "SED = " (which "sed")))) - - ;; 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" - (("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")))) + ;; 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" + (("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-paths (lambda* (#:key inputs #:allow-other-keys) @@ -482,11 +484,11 @@ build process and its dependencies, whereas Make uses Makefile format.") (let* ((error-pattern (make-regexp "^(Error|FAILED):.*")) (checker (lambda (port) (let loop () - (let ((line (read-line port))) - (cond - ((eof-object? line) #t) - ((regexp-exec error-pattern line) #f) - (else (loop))))))) + (let ((line (read-line port))) + (cond + ((eof-object? line) #t) + ((regexp-exec error-pattern line) #f) + (else (loop))))))) (run-test (lambda (test) (system* "make" test) (call-with-input-file @@ -505,7 +507,7 @@ build process and its dependencies, whereas Make uses Makefile format.") (copy-recursively "openjdk.build/docs" doc) (copy-recursively "openjdk.build/j2re-image" jre) (copy-recursively "openjdk.build/j2sdk-image" jdk))) - %standard-phases)))))))) + %standard-phases))))))))) (native-inputs `(("ant-bootstrap" ,(origin -- 2.1.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0004-gnu-icedtea6-rename-build-phase-set-paths.patch" >From 7b4a5b8861de9f8f940d8bf60e225fcafbbb2b1c Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 10 Mar 2015 17:03:44 +0100 Subject: [PATCH 4/5] gnu: icedtea6: rename build phase `set-paths' * gnu/packages/java.scm (icedtea6)[arguments]: Avoid overriding standard `set-paths' phase by renaming new phase to `set-additional-paths'. --- gnu/packages/java.scm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 19be969..f0e9e51 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -369,12 +369,11 @@ build process and its dependencies, whereas Make uses Makefile format.") (("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-paths + 'configure 'set-additional-paths (lambda* (#:key inputs #:allow-other-keys) (let* ((gcjdir (assoc-ref %build-inputs "gcj")) (gcjlib (string-append gcjdir "/lib")) (antpath (string-append (getcwd) "/../apache-ant-1.9.4"))) - (setenv "CC" (which "gcc")) (setenv "CPATH" (string-append (assoc-ref %build-inputs "libxrender") "/include/X11/extensions" ":" @@ -392,8 +391,6 @@ build process and its dependencies, whereas Make uses Makefile format.") (setenv "ALT_FREETYPE_LIB_PATH" (string-append (assoc-ref %build-inputs "freetype") "/lib")) - (setenv "LD_LIBRARY_PATH" - (string-append antpath "/lib" ":" gcjlib)) (setenv "PATH" (string-append antpath "/bin:" (getenv "PATH"))))) (alist-cons-before -- 2.1.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0005-gnu-icedtea6-remove-commented-substitution.patch" >From 0c2f26564987721c7ec112cfa0d8d714ef4fda01 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 17 Mar 2015 14:12:14 +0100 Subject: [PATCH 5/5] gnu: icedtea6: remove commented substitution. * gnu/packages/java.scm (icedtea6): Remove commented substitution. --- gnu/packages/java.scm | 2 -- 1 file changed, 2 deletions(-) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index f0e9e51..3e7e4d5 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -349,8 +349,6 @@ build process and its dependencies, whereas Make uses Makefile format.") (string-append "LDD = " (which "ldd"))) (("NAWK *=.*(n|g)awk") (string-append "NAWK = " (which "gawk"))) - ;; (("NAWK *=.*gawk") - ;; (string-append "NAWK = " (which "gawk"))) (("XARGS *=.*xargs") (string-append "XARGS = " (which "xargs"))) (("UNZIP *=.*unzip") -- 2.1.0 --=-=-=--