Update josm

Julien LepillerThu May 11 23:13:08+0200 2017

7d40143

Update josm

more/packages/java.scm

2222
  #:use-module (guix packages)
2323
  #:use-module (guix download)
2424
  #:use-module (guix git-download)
25+
  #:use-module (guix svn-download)
2526
  #:use-module (guix utils)
2627
  #:use-module (guix build-system ant)
2728
  #:use-module (guix build-system gnu)

3435
(define-public josm
3536
  (package
3637
    (name "josm")
37-
    (version "d977155fb5b1f54ab76140345633356475f7beee")
38+
    (version "12039")
3839
    (source (origin
39-
              (method git-fetch)
40-
              (uri (git-reference
41-
                    (url "https://github.com/openstreetmap/josm.git")
42-
                    (commit version)))
40+
              (method svn-fetch)
41+
              ;;(uri (git-reference
42+
              ;;      (url "https://github.com/openstreetmap/josm.git")
43+
              ;;      (commit version)))
44+
              (uri (svn-reference
45+
                    (url "https://svn.openstreetmap.org/applications/editors/josm")
46+
                    (revision 12039)))
4347
              (sha256
4448
               (base32
45-
                "17ih97kf6g6ly8gz6dbc3jzh22gamra4anbwcsxivhq7dw5z3a6n"))
49+
                ;;"17ih97kf6g6ly8gz6dbc3jzh22gamra4anbwcsxivhq7dw5z3a6n"))
50+
                "1sq35askhvg85ghj7q34adxny7dwacz7xx6sbc1l5g0khcck7vql"))
4651
              (file-name (string-append name "-" version))))
4752
    (build-system ant-build-system)
4853
    (arguments

5661
             (with-output-to-file "REVISION.XML"
5762
               (lambda _
5863
                 (display
59-
                   (string-append "<info><entry><commit revision=\"11885\">"
64+
                   (string-append "<info><entry><commit revision=\"" ,version "\">"
6065
                                  "<date>1970-01-01 00:00:00 +0000</date>"
6166
                                  "</commit></entry></info>"))))
6267
             (substitute* "build.xml"
63-
               (("UNKNOWN") "11885")
64-
               (("<touch.*epsg.output.*") "<mkdir dir="${epsg.output}/.." /><touch file="${epsg.output}"/>\n")
68+
               (("UNKNOWN") ,version)
69+
               (("<touch.*epsg.output.*") "<mkdir dir=\"${epsg.output}/..\" /><touch file=\"${epsg.output}\"/>\n")
6570
               ((".*com.google.errorprone.ErrorProneAntCompilerAdapter.*") "")
6671
               (("compiler=\"[^\"]*\" ") ""))))
6772
         (replace 'install
68-
           (lambda* (#:key outputs #:allow-other-keys)
73+
           (lambda* (#:key outputs inputs #:allow-other-keys)
6974
             (let* ((out (assoc-ref outputs "out"))
7075
                    (bin (string-append out "/bin"))
7176
                    (lib (string-append out "/lib/josm")))

7782
                 (lambda _
7883
                   (display
7984
                     (string-append "#!/bin/sh\n"
80-
                                    "java -jar " lib "/josm.jar"))))
85+
                                    (assoc-ref inputs "jdk") "/bin/java"
86+
                                    " -jar " lib "/josm.jar"))))
8187
               (chmod (string-append bin "/josm") #o755)))))))
8288
    (home-page "https://josm.openstreetmap.de")
8389
    (synopsis "OSM editor")