From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dB2cJ-0001od-Uk for guix-patches@gnu.org; Wed, 17 May 2017 13:20:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dB2cI-0007Of-3Z for guix-patches@gnu.org; Wed, 17 May 2017 13:20:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:48520) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dB2cI-0007Oa-0C for guix-patches@gnu.org; Wed, 17 May 2017 13:20:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dB2cH-0002PO-RG for guix-patches@gnu.org; Wed, 17 May 2017 13:20:05 -0400 Subject: bug#26966: [PATCH 07/22] gnu: Add classpath. Resent-Message-ID: From: Ricardo Wurmus Date: Wed, 17 May 2017 19:18:50 +0200 Message-Id: <20170517171905.7840-7-rekado@elephly.net> In-Reply-To: <20170517171905.7840-1-rekado@elephly.net> References: <20170517171905.7840-1-rekado@elephly.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26966@debbugs.gnu.org Cc: Ricardo Wurmus * 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") -- 2.12.2