all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: 63783@debbugs.gnu.org
Subject: bug#63783: r-dismo bundles pre-built jars
Date: Thu, 01 Jun 2023 23:05:04 +0200	[thread overview]
Message-ID: <87sfbasxd0.fsf@elephly.net> (raw)
In-Reply-To: <87a5xnwcxf.fsf@elephly.net>


Ricardo Wurmus <rekado@elephly.net> writes:

> The files dismo.jar and maxent.jar in the r-dismo package don’t have any
> associated source code and are not built from source.

The source code for maxent.jar is here:

   https://github.com/mrmaxent/Maxent

Here’s a draft of a package definition:

--8<---------------cut here---------------start------------->8---
(define-public java-maxent
  (package
    (name "java-maxent")
    (version "3.4.4")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/mrmaxent/Maxent")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "12q7hhly76l77vm8w8v9icga2gn6xs0bw33a7wb7zikcmvizcyp0"))))
    (build-system ant-build-system)
    (arguments
     (list
      #:tests? #false                   ;there are none
      #:jdk icedtea-8
      #:phases
      #~(modify-phases %standard-phases
          (replace 'build
            (lambda _
              (with-directory-excursion "gnu/getopt/"
                (invoke "make"))
              ;; See https://github.com/mrmaxent/Maxent/pull/11
              (substitute* "density/Extractor.java"
                (("float") "double"))
              (apply invoke "javac" "-cp" (getcwd) "-g"
                     (find-files "density" "\\.java$"))
              (apply invoke "javac" "-cp" (getcwd) "-g"
                     (find-files "ptolemy/plot" "\\.java$"))
              (apply invoke "javac" "-cp" (getcwd) "-g"
                     (find-files "com" "\\.java$"))
              (apply invoke "javac" "-cp" (getcwd) "-g"
                     (find-files "gui" "\\.java$"))
              (apply invoke "jar" "cvfm" "maxent.jar"
                      (cons* "density/mc.mf"
                             "density/parameters.csv"
                             (append (find-files "density" "\\.class$")
                                     (find-files "density" "\\.html$")
                                     (find-files "gnu/getopt" ".*")
                                     (find-files "gui/layouts" "\\.class$*")
                                     (find-files "com/macfaq/io" "\\.class$*")
                                     (find-files "density/tools" "\\.class$*")
                                     (find-files "ptolemy/plot" "\\.class$*"))))))
          (replace 'install
            (lambda _
              (install-file "maxent.jar"
                            (string-append #$output "/share/java/maxent/")))))))
    (native-inputs
     (list gnu-make))
    (home-page "http://biodiversityinformatics.amnh.org/open_source/maxent")
    (synopsis "Model species geographic distributions")
    (description
     "Maxent is a stand-alone Java application for modelling species
geographic distributions.")
    (license license:expat)))
--8<---------------cut here---------------end--------------->8---

The sources in ptolemy/plot cannot be built yet, because we’re missing a
package for either https://ptolemy.berkeley.edu/ptolemyII/index.htm or
https://ptolemy.berkeley.edu/ptolemyclassic/pt0.7.1/index.htm.

We cannot use the Makefile to “make compile” or “make distribution”
because it starts by building ParamPre.java, which can only be built
when Parameters.java has been compiled.  So perhaps there’s a need for
bootstrapping.  In the above package definition we’re using some .java
files that have been generated through unknown means.

The very small sources for dismo.jar are actually included in the dismo
package itself, they just have unexpected names.

-- 
Ricardo




  reply	other threads:[~2023-06-01 21:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-29 12:14 bug#63783: r-dismo bundles pre-built jars Ricardo Wurmus
2023-06-01 21:05 ` Ricardo Wurmus [this message]
2023-06-02  9:42   ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sfbasxd0.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=63783@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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.