unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Brett Gilio <brettg@posteo.net>
To: Julien Lepiller <julien@lepiller.eu>
Cc: 33008@debbugs.gnu.org
Subject: [bug#33008] [WIP] openjdk 9 and 10
Date: Wed, 10 Oct 2018 18:23:52 -0500	[thread overview]
Message-ID: <87o9c1crnb.fsf@posteo.net> (raw)
In-Reply-To: <20181010234059.337d3496@lepiller.eu>


Julien Lepiller writes:

> Hi, here are two patches that add openjdk9 and openjdk10. The 
> patches
> must be applied on top of core-updates (or master once 
> core-updates is
> merged) because of an issue with gcc on master. I haven't tested 
> them
> too much, and they were probably too easy to build, so I 
> wouldn't be
> surprised if we found something bad in them.
> From 4d83922aa5e02b17e6af860aa827f24131476c81 Mon Sep 17 
> 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Wed, 10 Oct 2018 22:26:39 +0200
> Subject: [PATCH 1/2] gnu: Add openjdk9.
>
> * gnu/packages/java.scm (openjdk9): New variable.
> ---
>  gnu/packages/java.scm | 123 
>  ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 123 insertions(+)
>
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index 93f5bb6af..e53168713 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -46,6 +46,7 @@
>    #:use-module (gnu packages cpio)
>    #:use-module (gnu packages cups)
>    #:use-module (gnu packages compression)
> +  #:use-module (gnu packages elf)
>    #:use-module (gnu packages fontutils)
>    #:use-module (gnu packages gawk)
>    #:use-module (gnu packages gettext)
> @@ -1672,6 +1673,128 @@ new Date();"))
>                   '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" 
>                   "jaxws-drop"
>                     "jdk-drop" "langtools-drop" 
>                     "hotspot-drop")))))))
>  
> +(define-public openjdk9
> +  (package
> +    (name "openjdk")
> +    (version "9+181")
> +    (source (origin
> +              (method url-fetch)
> +              (uri 
> "http://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
> +              (file-name (string-append name "-" version 
> ".tar.bz2"))
> +              (sha256
> +               (base32
> + 
> "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))))
> +    (build-system gnu-build-system)
> +    (outputs '("out" "jdk" "doc"))
> +    (arguments
> +     `(#:tests? #f; require jtreg
> +       #:imported-modules
> +       ((guix build syscalls)
> +        ,@%gnu-build-system-modules)
> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'patch-source-shebangs)
> +         (replace 'configure
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             ;; TODO: unbundle libpng and lcms
> +             (invoke "bash" "./configure"
> +                     (string-append "--with-freetype=" 
> (assoc-ref inputs "freetype"))
> +                     "--disable-freetype-bundling"
> +                     "--disable-warnings-as-errors"
> +                     "--disable-hotspot-gtest"
> +                     "--with-giflib=system"
> +                     "--with-libjpeg=system"
> +                     (string-append "--prefix=" (assoc-ref 
> outputs "out")))
> +             #t))
> +         (replace 'build
> +           (lambda _
> +             (with-output-to-file ".src-rev"
> +               (lambda _
> +                 (display ,version)))
> +             (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
> +             (invoke "make" "all")
> +             #t))
> +         ;; Some of the libraries in the lib/ folder link to 
> libjvm.so.
> +         ;; But that shared object is located in the server/ 
> folder, so it
> +         ;; cannot be found.  This phase creates a symbolic 
> link in the
> +         ;; lib/ folder so that the other libraries can find 
> it.
> +         ;;
> +         ;; See:
> +         ;; 
> https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
> +         ;;
> +         ;; FIXME: Find the bug in the build system, so that 
> this symlink is
> +         ;; not needed.
> +         (add-after 'install 'install-libjvm
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let* ((lib-out (string-append (assoc-ref outputs 
> "out")
> +                                             "/lib"))
> +                    (lib-jdk (string-append (assoc-ref outputs 
> "jdk")
> +                                             "/lib")))
> +               (symlink (string-append lib-jdk 
> "/server/libjvm.so")
> +                        (string-append lib-jdk "/libjvm.so"))
> +               (symlink (string-append lib-out 
> "/server/libjvm.so")
> +                        (string-append lib-out "/libjvm.so")))
> +             #t))
> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out"))
> +                   (jdk (assoc-ref outputs "jdk"))
> +                   (doc (assoc-ref outputs "doc"))
> +                   (images (car (find-files "build" 
> ".*-server-release"
> +                                            #:directories? 
> #t))))
> +               (copy-recursively (string-append images 
> "/images/jdk") jdk)
> +               (copy-recursively (string-append images 
> "/images/jre") out)
> +               (copy-recursively (string-append images 
> "/images/docs") doc))
> +             #t))
> +         (add-after 'install 'strip-zip-timestamps
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (use-modules (guix build syscalls))
> +             (for-each (lambda (zip)
> +                         (let ((dir (mkdtemp! 
> "zip-contents.XXXXXX")))
> +                           (with-directory-excursion dir
> +                             (invoke "unzip" zip))
> +                           (delete-file zip)
> +                           (for-each (lambda (file)
> +                                       (let ((s (lstat file)))
> +                                         (unless (eq? 
> (stat:type s) 'symlink)
> +                                           (format #t "reset 
> ~a~%" file)
> +                                           (utime file 0 0 0 
> 0))))
> +                             (find-files dir #:directories? 
> #t))
> +                           (with-directory-excursion dir
> +                             (let ((files (find-files "." ".*" 
> #:directories? #t)))
> +                               (apply invoke "zip" "-0" "-X" 
> zip files)))))
> +               (find-files (assoc-ref outputs "doc") 
> ".*.zip$"))
> +             #t)))))
> +    (inputs
> +     `(("alsa-lib" ,alsa-lib)
> +       ("cups" ,cups)
> +       ("fontconfig" ,fontconfig)
> +       ("freetype" ,freetype)
> +       ("giflib" ,giflib)
> +       ("lcms" ,lcms)
> +       ("libelf" ,libelf)
> +       ("libjpeg" ,libjpeg)
> +       ("libice" ,libice)
> +       ("libpng" ,libpng)
> +       ("libx11" ,libx11)
> +       ("libxcomposite" ,libxcomposite)
> +       ("libxi" ,libxi)
> +       ("libxinerama" ,libxinerama)
> +       ("libxrender" ,libxrender)
> +       ("libxt" ,libxt)
> +       ("libxtst" ,libxtst)))
> +    (native-inputs
> +     `(("icedtea-8" ,icedtea-8)
> +       ("icedtea-8:jdk" ,icedtea-8 "jdk")
> +       ("unzip" ,unzip)
> +       ("which" ,which)
> +       ("zip" ,zip)))
> +    (home-page "http://openjdk.java.net/projects/jdk9/")
> +    (synopsis "Java development kit")
> +    (description
> +     "This package provides the Java development kit OpenJDK.")
> +    (license license:gpl2+)))
> +
>  (define-public icedtea icedtea-8)
>  
>  \f
> -- 
> 2.18.0
>
> From b91996c2c84581253f113e5fc81ab0e32b3ad4ce Mon Sep 17 
> 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Wed, 10 Oct 2018 22:29:50 +0200
> Subject: [PATCH 2/2] gnu: Add openjdk10.
>
> * gnu/packages/java.scm (openjdk10): New variable.
> ---
>  gnu/packages/java.scm | 35 +++++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
>
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index e53168713..36d7fcb2c 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -1795,6 +1795,41 @@ new Date();"))
>       "This package provides the Java development kit OpenJDK.")
>      (license license:gpl2+)))
>  
> +(define-public openjdk10
> +  (package
> +    (inherit openjdk9)
> +    (name "openjdk")
> +    (version "10+46")
> +    (source (origin
> +              (method url-fetch)
> +              (uri 
> "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
> +              (file-name (string-append name "-" version 
> ".tar.bz2"))
> +              (sha256
> +               (base32
> + 
> "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))))
> +    (arguments
> +      (substitute-keyword-arguments (package-arguments 
> openjdk9)
> +        ((#:phases phases)
> +         `(modify-phases ,phases
> +            (replace 'configure
> +              (lambda* (#:key inputs outputs 
> #:allow-other-keys)
> +                (invoke "bash" "./configure"
> +                        (string-append "--with-freetype=" 
> (assoc-ref inputs "freetype"))
> +                        "--disable-freetype-bundling"
> +                        "--disable-warnings-as-errors"
> +                        "--disable-hotspot-gtest"
> +                        "--with-giflib=system"
> +                        "--with-libjpeg=system"
> +                        "--with-native-debug-symbols=zipped"
> +                        (string-append "--prefix=" (assoc-ref 
> outputs "out")))
> +                #t))))))
> +    (native-inputs
> +     `(("openjdk9" ,openjdk9)
> +       ("openjdk9:jdk" ,openjdk9 "jdk")
> +       ("unzip" ,unzip)
> +       ("which" ,which)
> +       ("zip" ,zip)))))
> +
>  (define-public icedtea icedtea-8)
>  
>  \f

Hi Julien,

Could you, or somebody, perhaps explain to me what the difference
between the IcedTea distribution and OpenJDK is?


-- 
Brett M. Gilio
Free Software Foundation, Member
https://gnu.org/s/guix/ | https://emacs.org

  reply	other threads:[~2018-10-10 23:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 21:40 [bug#33008] [WIP] openjdk 9 and 10 Julien Lepiller
2018-10-10 23:23 ` Brett Gilio [this message]
2018-10-11  8:23   ` Julien Lepiller
2018-10-11  8:48     ` Danny Milosavljevic
2018-10-11  9:27       ` Julien Lepiller
2018-10-18 11:57 ` Björn Höfling
2018-10-18 14:06   ` Julien Lepiller
2018-11-01 20:43 ` bug#33008: " Julien Lepiller

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9c1crnb.fsf@posteo.net \
    --to=brettg@posteo.net \
    --cc=33008@debbugs.gnu.org \
    --cc=julien@lepiller.eu \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).