From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: Guix-devel <guix-devel@gnu.org>
Subject: [PATCH] gnu: icedtea7: Bootstrap with GCJ.
Date: Tue, 9 Jun 2015 12:56:46 +0200 [thread overview]
Message-ID: <idjk2vdrvyp.fsf@bimsb-sys02.mdc-berlin.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 107 bytes --]
The attached patch removes icedtea6 from the inputs of icedtea7.
IcedTea7 can now be built with just GCJ.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-icedtea7-Bootstrap-with-GCJ.patch --]
[-- Type: text/x-patch, Size: 6754 bytes --]
From d4c04d81e4c8b43636e5f9adb279e8ef6a0b8752 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Tue, 9 Jun 2015 12:53:23 +0200
Subject: [PATCH] gnu: icedtea7: Bootstrap with GCJ.
* gnu/packages/java.scm (icedtea7): Bootstrap with GCJ rather than compile
with IcedTea6.
---
gnu/packages/java.scm | 71 ++++++++++++++++++++++++++-------------------------
1 file changed, 36 insertions(+), 35 deletions(-)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index e741fca..2a1d087 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -693,6 +693,9 @@ build process and its dependencies, whereas Make uses Makefile format.")
(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\\\"\"")))))
@@ -710,15 +713,7 @@ build process and its dependencies, whereas Make uses Makefile format.")
#:locale "C"
,@(substitute-keyword-arguments (package-arguments icedtea6)
((#:configure-flags flags)
- `(let ((jdk (assoc-ref %build-inputs "icedtea6"))
- (ant (assoc-ref %build-inputs "ant")))
- `("--disable-bootstrap"
- "--without-rhino"
- "--enable-nss"
- "--enable-system-lcms"
- "--disable-downloading"
- ,(string-append "--with-ant-home=" ant)
- ,(string-append "--with-jdk-home=" jdk))))
+ `(delete "--with-openjdk-src-dir=./openjdk" ,flags))
((#:phases phases)
`(modify-phases ,phases
(replace
@@ -760,30 +755,37 @@ build process and its dependencies, whereas Make uses Makefile format.")
(replace
'set-additional-paths
(lambda* (#:key inputs #:allow-other-keys)
- (substitute* "openjdk/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 (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"))))
+ (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/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 "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)
@@ -816,7 +818,6 @@ build process and its dependencies, whereas Make uses Makefile format.")
(delete 'patch-patches))))))
(native-inputs
`(("ant" ,ant)
- ("icedtea6" ,icedtea6 "jdk")
("openjdk-drop"
,(drop "openjdk"
"03gxqn17cxwl1nspnwigacaqd28p02d45f396j5f4kkbzfnbl0ak"))
@@ -839,4 +840,4 @@ build process and its dependencies, whereas Make uses Makefile format.")
,(drop "hotspot"
"1yqxfd2jwbm5y41wscyfx8h0fr3h8ny2g2mda5iwd8sikxsaj96p"))
,@(fold alist-delete (package-native-inputs icedtea6)
- '("openjdk6-src" "ant-bootstrap" "gcj")))))))
+ '("openjdk6-src" "ant-bootstrap")))))))
--
2.1.0
next reply other threads:[~2015-06-09 10:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 10:56 Ricardo Wurmus [this message]
2015-06-12 8:03 ` [PATCH] gnu: icedtea7: Bootstrap with GCJ Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=idjk2vdrvyp.fsf@bimsb-sys02.mdc-berlin.net \
--to=ricardo.wurmus@mdc-berlin.de \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.