guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Various icedtea6 patches


From: Ricardo Wurmus
Subject: [PATCH] Various icedtea6 patches
Date: Tue, 17 Mar 2015 14:18:50 +0100

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

>From 3bc3dd46ebec97acf424bbc8b3026ee23fdafa19 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
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

>From 0d8261286f0d4a14b65359c7f23276f9d166c49e Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
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

>From 9c9ef4fde4003a3bc9af73462552edde5d46c909 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
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

>From 7b4a5b8861de9f8f940d8bf60e225fcafbbb2b1c Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
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

>From 0c2f26564987721c7ec112cfa0d8d714ef4fda01 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]