guix-patches
[Top][All Lists]
Advanced

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

bug#26966: [PATCH 07/22] gnu: Add classpath.


From: Ricardo Wurmus
Subject: bug#26966: [PATCH 07/22] gnu: Add classpath.
Date: Mon, 22 May 2017 19:00:30 +0200
User-agent: mu4e 0.9.18; emacs 25.2.1

Roel Janssen <address@hidden> writes:

> Ricardo Wurmus writes:
>
>> * gnu/packages/java.scm (classpath): New variable.
>> ---
>>  gnu/packages/java.scm | 58 
>> +++++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 58 insertions(+)
>>
>> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
>> index 912825a92..e37fd7057 100644
>> --- a/gnu/packages/java.scm
>> +++ b/gnu/packages/java.scm
>> @@ -410,6 +410,64 @@ requirement for all GNU Classpath releases after 
>> version 0.93.")
>>  compiler for Java} (ecj) with a command line interface that is compatible 
>> with
>>  the standard javac executable.")))
>>
>> +;; Note: All the tool wrappers (e.g. for javah, javac, etc) fail with
>> +;; java.lang.UnsupportedClassVersionError.  They simply won't run on the old
>> +;; sablevm.  We use Classpath 0.99 to build JamVM, on which the Classpath
>> +;; tools do run.  Using these Classpath tools on JamVM we can then build the
>> +;; development version of GNU Classpath.
>> +(define classpath-on-sablevm
>> +  (package
>> +    (name "classpath")
>> +    (version "0.99")
>> +    (source (origin
>> +              (method url-fetch)
>> +              (uri (string-append "mirror://gnu/classpath/classpath-"
>> +                                  version ".tar.gz"))
>> +              (sha256
>> +               (base32
>> +                "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))))
>> +    (build-system gnu-build-system)
>> +    (arguments
>> +     `(#:configure-flags
>> +       (list (string-append "--with-ecj-jar="
>> +                            (assoc-ref %build-inputs "ecj-bootstrap")
>> +                            "/share/java/ecj-bootstrap.jar")
>> +             (string-append "JAVAC="
>> +                            (assoc-ref %build-inputs "ecj-javac-wrapper")
>> +                            "/bin/javac")
>> +             (string-append "JAVA="
>> +                            (assoc-ref %build-inputs "sablevm")
>> +                            "/bin/java-sablevm")
>> +             "GCJ_JAVAC_TRUE=no"
>> +             "ac_cv_prog_java_works=yes"  ; trust me
>> +             "--disable-Werror"
>> +             "--disable-gmp"
>> +             "--disable-gtk-peer"
>> +             "--disable-gconf-peer"
>> +             "--disable-plugin"
>> +             "--disable-dssi"
>> +             "--disable-alsa"
>> +             "--disable-gjdoc")
>> +       #:phases
>> +       (modify-phases %standard-phases
>> +         (add-after 'install 'install-data
>> +           (lambda _ (zero? (system* "make" "install-data")))))))
>> +    (native-inputs
>> +     `(("ecj-bootstrap" ,ecj-bootstrap)
>> +       ("ecj-javac-wrapper" ,ecj-javac-wrapper)
>> +       ("fastjar" ,fastjar)
>> +       ("sablevm" ,sablevm)
>> +       ("sablevm-classpath" ,sablevm-classpath)
>> +       ("libltdl" ,libltdl)
>> +       ("pkg-config" ,pkg-config)))
>> +    (home-page "https://www.gnu.org/software/classpath/";)
>> +    (synopsis "Essential libraries for Java")
>> +    (description "GNU Classpath is a project to create core class libraries
>> +for use with runtimes, compilers and tools for the Java programming
>> +language.")
>> +    ;; GPLv2 or later, with special linking exception.
>> +    (license license:gpl2+)))
>> +
>>  (define-public java-swt
>>    (package
>>      (name "java-swt")
>
> So, this version is only used for allowing to build the development
> version later, which in turn provides a properly working version for
> reasonably new Java packages?
>
> I'm just trying to understand this properly.

GNU Classpath 0.98 or higher is needed to build JamVM.  0.99 is the
latest release.  We build this to get JamVM, but since 0.99 is very
limited in terms of Java 1.6 support our JamVM package will be rather
limited as well.  We use the jamvm-bootstrap package then to build a
more fully featured GNU Classpath and thus a fully featured JamVM.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net






reply via email to

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