diff mbox series

[bug#35545,11/17] gnu: Add java-jmapviewer.

Message ID 20190503130134.24788-11-julien@lepiller.eu
State Accepted
Headers show
Series [bug#35545,01/17] gnu: Add java-signpost-core. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied

Commit Message

Julien Lepiller May 3, 2019, 1:01 p.m. UTC
* gnu/packages/geo.scm (java-jmapviewer): New variable.
---
 gnu/packages/geo.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

Comments

Björn Höfling May 5, 2019, 10:06 p.m. UTC | #1
On Fri,  3 May 2019 15:01:28 +0200
Julien Lepiller <julien@lepiller.eu> wrote:

> * gnu/packages/geo.scm (java-jmapviewer): New variable.

Add a "2019" to your copyright header.

Otherwise, LGTM.

Björn
diff mbox series

Patch

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 0b95fbe613..de9e228a25 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -24,6 +24,7 @@ 
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages geo)
+  #:use-module (guix build-system ant)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
@@ -851,3 +852,38 @@  map, geocoding with Nominatim, or general analysis.")
 the texture and density of features is visible at every zoom level, instead of
 dropping features at lower levels.")
     (license license:bsd-2)))
+
+(define-public java-jmapviewer
+  (package
+    (name "java-jmapviewer")
+    (version "2.9")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://svn.openstreetmap.org/applications/"
+                                  "viewer/jmapviewer/releases/" version
+                                  "/JMapViewer-" version "-Source.zip"))
+              (sha256
+               (base32
+                "06jilhvsx662raix58g8ccl56d1pmirwlys9px0mdg7j46wixk6l"))))
+    (build-system ant-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (arguments
+     `(#:build-target "pack"
+       #:tests? #f; No tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'clean
+           (lambda* _
+             (invoke "ant" "clean")))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((dir (string-append (assoc-ref outputs "out") "/share/java/")))
+               (mkdir-p dir)
+               (copy-file "JMapViewer.jar" (string-append dir "JMapViewer.jar"))))))))
+    (home-page "https://wiki.openstreetmap.org/wiki/JMapViewer")
+    (synopsis "OSM map integration in Java")
+    (description "JMapViewer is a Java component which allows to easily
+integrate an OSM map view into your Java application.  It is maintained as
+an independent project by the JOSM team.")
+    (license license:gpl2)))