From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d77Uj-0005LV-L9 for guix-patches@gnu.org; Sat, 06 May 2017 17:44:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d77Ug-0000gl-H3 for guix-patches@gnu.org; Sat, 06 May 2017 17:44:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:60499) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d77Ug-0000gh-E0 for guix-patches@gnu.org; Sat, 06 May 2017 17:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d77Ug-0004st-88 for guix-patches@gnu.org; Sat, 06 May 2017 17:44:02 -0400 Subject: bug#26803: [PATCH 12/36] gnu: Add java-commons-math3. Resent-Message-ID: References: <20170506153617.3074-1-rekado@elephly.net> <20170506153617.3074-12-rekado@elephly.net> From: Roel Janssen In-reply-to: <20170506153617.3074-12-rekado@elephly.net> Date: Sat, 06 May 2017 23:43:11 +0200 Message-ID: <87a86pk6fk.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain 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: Ricardo Wurmus Cc: 26803@debbugs.gnu.org Ricardo Wurmus writes: > * gnu/packages/java.scm (java-commons-math3): New variable. > --- > gnu/packages/java.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 44 insertions(+) > > diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm > index 57ef65336..5d131929c 100644 > --- a/gnu/packages/java.scm > +++ b/gnu/packages/java.scm > @@ -1474,3 +1474,47 @@ GNU @code{getopt_long}. It also aims to make option parser configuration and > retrieval of options and their arguments simple and expressive, without being > overly clever.") > (license license:expat))) > + > +(define-public java-commons-math3 > + (package > + (name "java-commons-math3") > + (version "3.6.1") > + (source (origin > + (method url-fetch) > + (uri (string-append "mirror://apache/commons/math/source/" > + "commons-math3-" version "-src.tar.gz")) > + (sha256 > + (base32 > + "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6")))) > + (build-system ant-build-system) > + (arguments > + `(#:build-target "jar" > + #:test-target "test" > + #:make-flags > + (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core")) > + (junit (assoc-ref %build-inputs "java-junit"))) > + (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar") > + (string-append "-Dhamcrest.jar=" hamcrest > + "/share/java/hamcrest-core.jar"))) > + #:phases > + (modify-phases %standard-phases > + ;; We want to build the jar in the build phase and run the tests > + ;; later in a separate phase. > + (add-after 'unpack 'untangle-targets > + (lambda _ > + (substitute* "build.xml" > + (("name=\"jar\" depends=\"test\"") > + "name=\"jar\" depends=\"compile\"")) > + #t)) Nice! > + ;; There is no install target. > + (replace 'install > + (install-jars "target"))))) That's odd, isn't it? Anyway, cool! > + (native-inputs > + `(("java-junit" ,java-junit) > + ("java-hamcrest-core" ,java-hamcrest-core))) > + (home-page "http://commons.apache.org/math/") > + (synopsis "Apache Commons mathematics library") > + (description "Commons Math is a library of lightweight, self-contained > +mathematics and statistics components addressing the most common problems not > +available in the Java programming language or Commons Lang.") > + (license license:asl2.0))) LGTM. Kind regards, Roel Janssen