unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: 30666@debbugs.gnu.org
Cc: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Subject: [bug#30666] [PATCH 08/17] gnu: Add java-forester-1.005.
Date: Thu, 1 Mar 2018 19:41:40 +0100	[thread overview]
Message-ID: <20180301184149.27239-8-ricardo.wurmus@mdc-berlin.de> (raw)
In-Reply-To: <20180301184149.27239-1-ricardo.wurmus@mdc-berlin.de>

* gnu/packages/bioinformatics.scm (java-forester-1.005): New variable.
---
 gnu/packages/bioinformatics.scm | 95 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 95 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index a41efc054..12ee8061f 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -11963,6 +11963,101 @@ phylogenomics and evolutionary biology research.  It includes support for
 reading, writing, and exporting phylogenetic trees.")
       (license license:lgpl2.1+))))
 
+(define-public java-forester-1.005
+  (package
+    (name "java-forester")
+    (version "1.005")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://search.maven.org/remotecontent?"
+                                  "filepath=org/biojava/thirdparty/forester/"
+                                  version "/forester-" version "-sources.jar"))
+              (file-name (string-append name "-" version ".jar"))
+              (sha256
+               (base32
+                "04r8qv4rk3p71z4ajrvp11py1z46qrx0047j3zzs79s6lnsm3lcv"))))
+    (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 'fix-dependencies
+           (lambda* (#:key inputs #:allow-other-keys)
+             (call-with-output-file "build.xml"
+               (lambda (port)
+                 (sxml->xml
+                  (pre-post-order
+                   (with-input-from-file "src/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)))
+             (copy-file (assoc-ref inputs "synth_look_and_feel_1.xml")
+                        "synth_look_and_feel_1.xml")
+             (copy-file (assoc-ref inputs "phyloxml.xsd")
+                        "phyloxml.xsd")
+             (substitute* "build.xml"
+               (("../resources/synth_laf/synth_look_and_feel_1.xml")
+                "synth_look_and_feel_1.xml")
+               (("../resources/phyloxml_schema/1.10/phyloxml.xsd")
+                "phyloxml.xsd"))
+             #t))
+         ;; FIXME: itext is difficult to package as it depends on a few
+         ;; unpackaged libraries.
+         (add-after 'unpack 'remove-dependency-on-unpackaged-itext
+           (lambda _
+             (delete-file "src/org/forester/archaeopteryx/PdfExporter.java")
+             (substitute* '("src/org/forester/archaeopteryx/MainFrame.java"
+                            "src/org/forester/archaeopteryx/MainFrameApplication.java")
+               (("pdf_written_to = PdfExporter.*")
+                "throw new IOException(\"PDF export is not available.\"); /*")
+               ((".getPrintSizeX\\(\\), getOptions\\(\\).getPrintSizeY\\(\\) \\);") "*/")
+               (("getCurrentTreePanel\\(\\).getHeight\\(\\) \\);") "*/"))
+             #t))
+         (add-after 'unpack 'delete-pre-built-classes
+           (lambda _ (delete-file-recursively "src/classes") #t))
+         ;; There is no install target
+         (replace 'install (install-jars ".")))))
+    (propagated-inputs
+     `(("java-commons-codec" ,java-commons-codec)
+       ("java-openchart2" ,java-openchart2)))
+    ;; The source archive does not contain the resources.
+    (native-inputs
+     `(("phyloxml.xsd"
+        ,(origin
+           (method url-fetch)
+           (uri (string-append "https://raw.githubusercontent.com/cmzmasek/forester/"
+                               "b61cc2dcede0bede317db362472333115756b8c6/"
+                               "forester/resources/phyloxml_schema/1.10/phyloxml.xsd"))
+           (file-name (string-append name "-phyloxml-" version ".xsd"))
+           (sha256
+            (base32
+             "1zxc4m8sn4n389nqdnpxa8d0k17qnr3pm2y5y6g6vh4k0zm52npv"))))
+       ("synth_look_and_feel_1.xml"
+        ,(origin
+           (method url-fetch)
+           (uri (string-append "https://raw.githubusercontent.com/cmzmasek/forester/"
+                               "29e04321615da6b35c1e15c60e52caf3f21d8e6a/"
+                               "forester/java/classes/resources/synth_look_and_feel_1.xml"))
+           (file-name (string-append name "-synth-look-and-feel-" version ".xml"))
+           (sha256
+            (base32
+             "1gv5602gv4k7y7713y75a4jvj7i9s7nildsbdl7n9q10sc2ikg8h"))))))
+    (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

  parent reply	other threads:[~2018-03-01 18:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01 17:44 [bug#30666] [PATCH 00/17] Add dropseq-tools Ricardo Wurmus
2018-03-01 18:41 ` [bug#30666] [PATCH 01/17] gnu: Add java-la4j Ricardo Wurmus
2018-03-01 18:41   ` [bug#30666] [PATCH 02/17] gnu: Add java-jlargearrays Ricardo Wurmus
2018-03-01 18:41   ` [bug#30666] [PATCH 03/17] gnu: Add java-jtransforms Ricardo Wurmus
2018-03-01 18:41   ` [bug#30666] [PATCH 04/17] gnu: Add java-jdistlib Ricardo Wurmus
2018-03-01 18:41   ` [bug#30666] [PATCH 05/17] gnu: Add java-biojava-core Ricardo Wurmus
2018-03-01 18:41   ` [bug#30666] [PATCH 06/17] gnu: Add java-openchart2 Ricardo Wurmus
2018-03-01 18:41   ` [bug#30666] [PATCH 07/17] gnu: Add java-forester Ricardo Wurmus
2018-03-01 18:41   ` Ricardo Wurmus [this message]
2018-03-01 18:41   ` [bug#30666] [PATCH 09/17] gnu: Add java-biojava-phylo Ricardo Wurmus
2018-03-01 18:41   ` [bug#30666] [PATCH 10/17] gnu: Add java-biojava-alignment Ricardo Wurmus
2018-03-01 18:41   ` [bug#30666] [PATCH 11/17] gnu: Add java-biojava-core-4.0 Ricardo Wurmus
2018-03-01 18:41   ` [bug#30666] [PATCH 12/17] gnu: Add java-biojava-phylo-4.0 Ricardo Wurmus
2018-03-01 18:41   ` [bug#30666] [PATCH 13/17] gnu: Add java-biojava-alignment-4.0 Ricardo Wurmus
2018-03-01 18:41   ` [bug#30666] [PATCH 14/17] gnu: Add java-htsjdk-latest Ricardo Wurmus
2018-03-01 18:41   ` [bug#30666] [PATCH 15/17] gnu: Add java-htsjdk-2.10.1 Ricardo Wurmus
2018-03-01 18:41   ` [bug#30666] [PATCH 16/17] gnu: Add java-picard-2.10.3 Ricardo Wurmus
2018-03-01 18:41   ` [bug#30666] [PATCH 17/17] gnu: Add dropseq-tools Ricardo Wurmus
     [not found] ` <handler.30666.B.151992663330127.ack@debbugs.gnu.org>
2018-03-03 20:29   ` bug#30666: [PATCH 00/17] " Ricardo Wurmus

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=20180301184149.27239-8-ricardo.wurmus@mdc-berlin.de \
    --to=ricardo.wurmus@mdc-berlin.de \
    --cc=30666@debbugs.gnu.org \
    /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).