From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erTIH-0001HL-3u for guix-patches@gnu.org; Thu, 01 Mar 2018 13:51:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erTIE-0007eR-Cg for guix-patches@gnu.org; Thu, 01 Mar 2018 13:51:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:59997) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1erTIE-0007eI-9S for guix-patches@gnu.org; Thu, 01 Mar 2018 13:51:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1erTIE-0002qY-29 for guix-patches@gnu.org; Thu, 01 Mar 2018 13:51:02 -0500 Subject: [bug#30666] [PATCH 07/17] gnu: Add java-forester. Resent-Message-ID: From: Ricardo Wurmus Date: Thu, 1 Mar 2018 19:41:39 +0100 Message-ID: <20180301184149.27239-7-ricardo.wurmus@mdc-berlin.de> In-Reply-To: <20180301184149.27239-1-ricardo.wurmus@mdc-berlin.de> References: <20180301184149.27239-1-ricardo.wurmus@mdc-berlin.de> 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: 30666@debbugs.gnu.org Cc: Ricardo Wurmus * gnu/packages/bioinformatics.scm (java-forester): New variable. --- gnu/packages/bioinformatics.scm | 76 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 60dbc956a..a41efc054 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -11887,6 +11887,82 @@ graphs. This library makes it easy to work with @file{.loom} files for single-cell RNA-seq data.") (license license:bsd-3))) +;; We cannot use the latest commit because it requires Java 9. +(define-public java-forester + (let ((commit "86b07efe302d5094b42deed9260f719a4c4ac2e6") + (revision "1")) + (package + (name "java-forester") + (version (string-append "0-" revision "." (string-take commit 7))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cmzmasek/forester.git") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "0vxavc1yrf84yrnf20dq26hi0lglidk8d382xrxsy4qmlbjd276z")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Delete bundled jars and pre-built classes + (delete-file-recursively "forester/java/resources") + (delete-file-recursively "forester/java/classes") + (for-each delete-file (find-files "forester/java/" "\\.jar$")) + ;; Delete bundled applications + (delete-file-recursively "forester_applications") + #t)))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; there are none + #:jdk ,icedtea-8 + #:modules ((guix build ant-build-system) + (guix build utils) + (guix build java-utils) + (sxml simple) + (sxml transform)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ (chdir "forester/java") #t)) + (add-after 'chdir 'fix-dependencies + (lambda _ + (chmod "build.xml" #o664) + (call-with-output-file "build.xml.new" + (lambda (port) + (sxml->xml + (pre-post-order + (with-input-from-file "build.xml" + (lambda _ (xml->sxml #:trim-whitespace? #t))) + `(;; Remove all unjar tags to avoid repacking classes. + (unjar . ,(lambda _ '())) + (*default* . ,(lambda (tag . kids) `(,tag ,@kids))) + (*text* . ,(lambda (_ txt) txt)))) + port))) + (rename-file "build.xml.new" "build.xml") + #t)) + ;; FIXME: itext is difficult to package as it depends on a few + ;; unpackaged libraries. + (add-after 'chdir 'remove-dependency-on-unpackaged-itext + (lambda _ + (delete-file "src/org/forester/archaeopteryx/PdfExporter.java") + (substitute* "src/org/forester/archaeopteryx/MainFrame.java" + (("pdf_written_to = PdfExporter.*") + "throw new IOException(\"PDF export is not available.\");")) + #t)) + ;; There is no install target + (replace 'install (install-jars "."))))) + (propagated-inputs + `(("java-commons-codec" ,java-commons-codec) + ("java-openchart2" ,java-openchart2))) + (home-page "https://sites.google.com/site/cmzmasek/home/software/forester") + (synopsis "Phylogenomics libraries for Java") + (description "Forester is a collection of Java libraries for +phylogenomics and evolutionary biology research. It includes support for +reading, writing, and exporting phylogenetic trees.") + (license license:lgpl2.1+)))) + (define-public java-biojava-core (package (name "java-biojava-core") -- 2.15.1