all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Roel Janssen <roel@gnu.org>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: 26966@debbugs.gnu.org
Subject: bug#26966: [PATCH 14/22] gnu: Add icedtea-6.
Date: Mon, 22 May 2017 11:43:07 +0200	[thread overview]
Message-ID: <rbu37bxrzv8.fsf@gnu.org> (raw)
In-Reply-To: <20170517171905.7840-14-rekado@elephly.net>


Ricardo Wurmus writes:

> * gnu/packages/java.scm (icedtea-6): New variable.
> ---
>  gnu/packages/java.scm | 340 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 340 insertions(+)
>
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index 779c84729..6104777c4 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -987,6 +987,346 @@ 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)))
>  
> +;; The bootstrap JDK consisting of jamvm, classpath-devel,
> +;; ecj-javac-on-jamvm-wrapper-final cannot build Icedtea 2.x directly, because
> +;; it's written in Java 7.  It can, however, build the unmaintained Icedtea
> +;; 1.x, which uses Java 6 only.
> +(define-public icedtea-6
> +  (package
> +    (name "icedtea")
> +    (version "1.13.13")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> +                    "http://icedtea.wildebeest.org/download/source/icedtea6-"
> +                    version ".tar.xz"))
> +              (sha256
> +               (base32
> +                "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
> +              (modules '((guix build utils)))
> +              (snippet
> +               '(substitute* "Makefile.in"
> +                  ;; do not leak information about the build host
> +                  (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
> +                   "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
> +    (build-system gnu-build-system)
> +    (outputs '("out"   ; Java Runtime Environment
> +               "jdk"   ; Java Development Kit
> +               "doc")) ; all documentation
> +    (arguments
> +     `(;; There are many failing tests and many are known to fail upstream.
> +       #:tests? #f
> +
> +       ;; The DSOs use $ORIGIN to refer to each other, but (guix build
> +       ;; gremlin) doesn't support it yet, so skip this phase.
> +       #:validate-runpath? #f
> +
> +       #:modules ((guix build utils)
> +                  (guix build gnu-build-system)
> +                  (srfi srfi-19))
> +
> +       #:configure-flags
> +       `("--enable-bootstrap"
> +         "--enable-nss"
> +         "--without-rhino"
> +         "--with-parallel-jobs"
> +         "--disable-downloading"
> +         "--disable-tests"
> +         ,(string-append "--with-ecj="
> +                         (assoc-ref %build-inputs "ecj")
> +                         "/share/java/ecj-bootstrap.jar")
> +         ,(string-append "--with-jar="
> +                         (assoc-ref %build-inputs "fastjar")
> +                         "/bin/fastjar")
> +         ,(string-append "--with-jdk-home="
> +                         (assoc-ref %build-inputs "classpath"))
> +         ,(string-append "--with-java="
> +                         (assoc-ref %build-inputs "jamvm")
> +                         "/bin/jamvm"))
> +       #:phases
> +       (modify-phases %standard-phases
> +         (replace 'unpack
> +           (lambda* (#:key source inputs #:allow-other-keys)
> +             (and (zero? (system* "tar" "xvf" source))
> +                  (begin
> +                    (chdir (string-append "icedtea6-" ,version))
> +                    (mkdir "openjdk")
> +                    (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
> +                    ;; The convenient OpenJDK source bundle is no longer
> +                    ;; available for download, so we have to take the sources
> +                    ;; from the Mercurial repositories and change the Makefile
> +                    ;; to avoid tests for the OpenJDK zip archive.

Haha, the plot thickens..

> +                    (with-directory-excursion "openjdk"
> +                      (for-each (lambda (part)
> +                                  (mkdir part)
> +                                  (copy-recursively
> +                                   (assoc-ref inputs
> +                                              (string-append part "-src"))
> +                                   part))
> +                                '("jdk" "hotspot" "corba"
> +                                  "langtools" "jaxp" "jaxws")))
> +                    (substitute* "Makefile.in"
> +                      (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
> +                       "echo \"trust me\";")
> +                      ;; The contents of the bootstrap directory must be
> +                      ;; writeable but when copying from the store they are
> +                      ;; not.
> +                      (("mkdir -p lib/rt" line)
> +                       (string-append line "; chmod -R u+w $(BOOT_DIR)")))
> +                    (zero? (system* "chmod" "-R" "u+w" "openjdk"))
> +                    #t))))
> +         (add-after 'unpack 'use-classpath
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (let ((jvmlib (assoc-ref inputs "classpath")))
> +               ;; Classpath does not provide rt.jar.
> +               (substitute* "Makefile.in"
> +                 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
> +                  (string-append jvmlib "/share/classpath/glibj.zip")))
> +               ;; Make sure we can find all classes.
> +               (setenv "CLASSPATH"
> +                       (string-append jvmlib "/share/classpath/glibj.zip:"
> +                                      jvmlib "/share/classpath/tools.zip"))
> +               (setenv "JAVACFLAGS"
> +                       (string-append "-cp "
> +                                      jvmlib "/share/classpath/glibj.zip:"
> +                                      jvmlib "/share/classpath/tools.zip")))
> +             #t))
> +         (add-after 'unpack 'patch-patches
> +           (lambda _
> +             ;; shebang in patches so that they apply cleanly
> +             (substitute* '("patches/jtreg-jrunscript.patch"
> +                            "patches/hotspot/hs23/drop_unlicensed_test.patch")
> +               (("#!/bin/sh") (string-append "#!" (which "sh"))))
> +             #t))
> +         (add-after 'unpack 'patch-paths
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             ;; 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 inputs "coreutils") "/bin/"))
> +                   (binbin  (string-append
> +                             (assoc-ref inputs "binutils") "/bin/"))
> +                   (grepbin (string-append
> +                             (assoc-ref 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 inputs "gcc") "/bin/"))
> +                 (("DEF_OBJCOPY *=.*objcopy")
> +                  (string-append "DEF_OBJCOPY = " (which "objcopy"))))
> +
> +               ;; fix path to alsa header
> +               (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")))
> +
> +               ;; 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")))
> +                 (("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"))
> +               #t)))
> +         (add-before 'configure 'set-additional-paths
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (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_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"))
> +             #t))
> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (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)
> +               (copy-recursively "openjdk.build/j2re-image" jre)
> +               (copy-recursively "openjdk.build/j2sdk-image" jdk))
> +             #t)))))
> +    (native-inputs
> +     `(("ant" ,ant-bootstrap)
> +       ("alsa-lib" ,alsa-lib)
> +       ("attr" ,attr)
> +       ("classpath" ,classpath-devel)
> +       ("coreutils" ,coreutils)
> +       ("cpio" ,cpio)
> +       ("cups" ,cups)
> +       ("ecj" ,ecj-bootstrap)
> +       ("ecj-javac" ,ecj-javac-on-jamvm-wrapper-final)
> +       ("fastjar" ,fastjar)
> +       ("fontconfig" ,fontconfig)
> +       ("freetype" ,freetype)
> +       ("gtk" ,gtk+-2)
> +       ("gawk" ,gawk)
> +       ("giflib" ,giflib)
> +       ("grep" ,grep)
> +       ("jamvm" ,jamvm)
> +       ("lcms" ,lcms)
> +       ("libjpeg" ,libjpeg)
> +       ("libpng" ,libpng)
> +       ("libtool" ,libtool)
> +       ("libx11" ,libx11)
> +       ("libxcomposite" ,libxcomposite)
> +       ("libxi" ,libxi)
> +       ("libxinerama" ,libxinerama)
> +       ("libxrender" ,libxrender)
> +       ("libxslt" ,libxslt) ;for xsltproc
> +       ("libxt" ,libxt)
> +       ("libxtst" ,libxtst)
> +       ("mit-krb5" ,mit-krb5)
> +       ("nss" ,nss)
> +       ("nss-certs" ,nss-certs)
> +       ("perl" ,perl)
> +       ("pkg-config" ,pkg-config)
> +       ("procps" ,procps) ;for "free", even though I'm not sure we should use it
> +       ("unzip" ,unzip)
> +       ("wget" ,wget)
> +       ("which" ,which)
> +       ("zip" ,zip)
> +       ("zlib" ,zlib)
> +       ("openjdk-src"
> +        ,(origin
> +           (method hg-fetch)
> +           (uri (hg-reference
> +                 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
> +                 (changeset "jdk6-b41")))
> +           (sha256
> +            (base32
> +             "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
> +       ("jdk-src"
> +        ,(origin
> +           (method hg-fetch)
> +           (uri (hg-reference
> +                 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
> +                 (changeset "jdk6-b41")))
> +           (sha256
> +            (base32
> +             "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
> +       ("hotspot-src"
> +        ,(origin
> +           (method hg-fetch)
> +           (uri (hg-reference
> +                 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
> +                 (changeset "jdk6-b41")))
> +           (sha256
> +            (base32
> +             "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
> +       ("corba-src"
> +        ,(origin
> +           (method hg-fetch)
> +           (uri (hg-reference
> +                 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
> +                 (changeset "jdk6-b41")))
> +           (sha256
> +            (base32
> +             "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
> +       ("langtools-src"
> +        ,(origin
> +           (method hg-fetch)
> +           (uri (hg-reference
> +                 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
> +                 (changeset "jdk6-b41")))
> +           (sha256
> +            (base32
> +             "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
> +       ("jaxp-src"
> +        ,(origin
> +           (method hg-fetch)
> +           (uri (hg-reference
> +                 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
> +                 (changeset "jdk6-b41")))
> +           (sha256
> +            (base32
> +             "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
> +       ("jaxws-src"
> +        ,(origin
> +           (method hg-fetch)
> +           (uri (hg-reference
> +                 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
> +                 (changeset "jdk6-b41")))
> +           (sha256
> +            (base32
> +             "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
> +    (home-page "http://icedtea.classpath.org")
> +    (synopsis "Java development kit")
> +    (description
> +     "This package provides the OpenJDK built with the IcedTea build harness.
> +This version of the OpenJDK is no longer maintained and is only used for
> +bootstrapping purposes.")
> +    ;; IcedTea is released under the GPL2 + Classpath exception, which is the
> +    ;; same license as both GNU Classpath and OpenJDK.
> +    (license license:gpl2+)))
> +
>  (define-public icedtea-7
>    (let* ((version "2.6.9")
>           (drop (lambda (name hash)

LGTM.  Are we supposed to get rid of IcedTea completely in the long run?

Kind regards,
Roel Janssen

  reply	other threads:[~2017-05-22  9:44 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17 17:06 bug#26966: New Java bootstrap Ricardo Wurmus
2017-05-17 17:18 ` bug#26966: [PATCH 01/22] gnu: Add jikes Ricardo Wurmus
2017-05-17 17:18   ` bug#26966: [PATCH 02/22] gnu: Add sablevm-classpath Ricardo Wurmus
2017-05-18 10:35     ` Roel Janssen
2017-05-17 17:18   ` bug#26966: [PATCH 03/22] gnu: Add sablevm Ricardo Wurmus
2017-05-18 10:34     ` Roel Janssen
2017-05-17 17:18   ` bug#26966: [PATCH 04/22] gnu: Add ant-bootstrap Ricardo Wurmus
2017-05-18 10:38     ` Roel Janssen
2017-05-17 17:18   ` bug#26966: [PATCH 05/22] gnu: Add ecj-bootstrap Ricardo Wurmus
2017-05-22  7:36     ` Roel Janssen
2017-05-17 17:18   ` bug#26966: [PATCH 06/22] gnu: Add ecj-javac-wrapper Ricardo Wurmus
2017-05-22  7:38     ` Roel Janssen
2017-05-22  8:55       ` Ludovic Courtès
2017-05-22 16:28         ` Ricardo Wurmus
2017-05-17 17:18   ` bug#26966: [PATCH 07/22] gnu: Add classpath Ricardo Wurmus
2017-05-22  7:58     ` Roel Janssen
2017-05-22 17:00       ` Ricardo Wurmus
2017-05-17 17:18   ` bug#26966: [PATCH 08/22] gnu: Add jamvm-bootstrap Ricardo Wurmus
2017-05-22  7:59     ` Roel Janssen
2017-05-17 17:18   ` bug#26966: [PATCH 09/22] gnu: Add classpath-jamvm-wrappers Ricardo Wurmus
2017-05-22  8:05     ` Roel Janssen
2017-05-17 17:18   ` bug#26966: [PATCH 10/22] gnu: Add ecj-javac-on-jamvm-wrapper Ricardo Wurmus
2017-05-22  9:38     ` Roel Janssen
2017-05-22 17:01       ` Ricardo Wurmus
2017-05-17 17:18   ` bug#26966: [PATCH 11/22] gnu: Add classpath-devel Ricardo Wurmus
2017-05-22  9:38     ` Roel Janssen
2017-05-17 17:18   ` bug#26966: [PATCH 12/22] gnu: Add jamvm Ricardo Wurmus
2017-05-22  9:39     ` Roel Janssen
2017-05-17 17:18   ` bug#26966: [PATCH 13/22] gnu: Add ecj-javac-on-jamvm-wrapper-final Ricardo Wurmus
2017-05-22  9:39     ` Roel Janssen
2017-05-17 17:18   ` bug#26966: [PATCH 14/22] gnu: Add icedtea-6 Ricardo Wurmus
2017-05-22  9:43     ` Roel Janssen [this message]
2017-05-22 14:33       ` Ricardo Wurmus
2017-05-17 17:18   ` bug#26966: [PATCH 15/22] gnu: icedtea-7: Use icedtea-6 for bootstrapping Ricardo Wurmus
2017-05-18 10:09     ` Ricardo Wurmus
2017-05-17 17:18   ` bug#26966: [PATCH 16/22] gnu: java-swt: Move below the bootstrap packages Ricardo Wurmus
2017-05-22 10:00     ` Roel Janssen
2017-05-17 17:19   ` bug#26966: [PATCH 17/22] gnu: clojure: Move below " Ricardo Wurmus
2017-05-22 10:01     ` Roel Janssen
2017-05-17 17:19   ` bug#26966: [PATCH 18/22] gnu: ant-bootstrap: Do not delete scripts Ricardo Wurmus
2017-05-18 10:54     ` Roel Janssen
2017-05-18 19:57       ` Ricardo Wurmus
2017-05-17 17:19   ` bug#26966: [PATCH 19/22] gnu: ant: Inherit from ant-bootstrap Ricardo Wurmus
2017-05-22 10:02     ` Roel Janssen
2017-05-17 17:19   ` bug#26966: [PATCH 20/22] gnu: ant: Delete bundled jars Ricardo Wurmus
2017-05-18 10:31     ` Roel Janssen
2017-05-17 17:19   ` bug#26966: [PATCH 21/22] gnu: ant: Update to 1.10.1 Ricardo Wurmus
2017-05-18  9:31     ` Roel Janssen
2017-05-18 20:00       ` Ricardo Wurmus
2017-05-18 21:23         ` Ricardo Wurmus
2017-05-17 17:19   ` bug#26966: [PATCH 22/22] gnu: Remove GCJ Ricardo Wurmus
2017-05-18  9:29     ` Roel Janssen
2017-05-18 10:03       ` Ricardo Wurmus
2017-05-18 10:28         ` Roel Janssen
2017-05-18 11:49         ` Ludovic Courtès
2017-05-18  9:25   ` bug#26966: [PATCH 01/22] gnu: Add jikes Roel Janssen
2017-05-18 11:54   ` Ludovic Courtès
2017-05-18  9:24 ` bug#26966: New Java bootstrap Roel Janssen
2017-05-18 11:47 ` Ludovic Courtès
2017-05-22 10:22 ` Roel Janssen
2017-05-22 17:03   ` Ricardo Wurmus

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=rbu37bxrzv8.fsf@gnu.org \
    --to=roel@gnu.org \
    --cc=26966@debbugs.gnu.org \
    --cc=rekado@elephly.net \
    /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.