diff options
author | Guillaume Girol <symphorien@users.noreply.github.com> | 2021-01-30 18:13:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-30 18:13:17 +0000 |
commit | eae2b60b9c55ec7a80d43b24856dbd7fb923022c (patch) | |
tree | db2e50f559cec25957ffbacff485b182f20d27bb /pkgs/applications/misc | |
parent | 767fc0538aca41de6831f37c4b2baf3a8c2cbc8c (diff) | |
parent | 4547017e91701f4b91f1cf0fc747921b4ce48f80 (diff) |
Merge pull request #111182 from sikmir/mkgmap
mkgmap: 4565 → 4600
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r-- | pkgs/applications/misc/mkgmap/default.nix | 36 | ||||
-rw-r--r-- | pkgs/applications/misc/mkgmap/fix-failing-test.patch | 22 | ||||
-rw-r--r-- | pkgs/applications/misc/mkgmap/splitter/default.nix | 33 | ||||
-rwxr-xr-x | pkgs/applications/misc/mkgmap/update.sh | 7 |
4 files changed, 39 insertions, 59 deletions
diff --git a/pkgs/applications/misc/mkgmap/default.nix b/pkgs/applications/misc/mkgmap/default.nix index 15464c0e6a68..ad001eb30457 100644 --- a/pkgs/applications/misc/mkgmap/default.nix +++ b/pkgs/applications/misc/mkgmap/default.nix @@ -1,6 +1,6 @@ { lib, stdenv , fetchurl -, fetchsvn +, substituteAll , jdk , jre , ant @@ -9,34 +9,27 @@ , withExamples ? false }: let - version = "4565"; - sha256 = "0cfh0msky5812l28mavy6p3k2zgyxb698xk79mvla9l45zcicnvw"; - deps = import ./deps.nix { inherit fetchurl; }; testInputs = import ./testinputs.nix { inherit fetchurl; }; in -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "mkgmap"; - inherit version; + version = "4600"; - src = fetchsvn { - inherit sha256; - url = "https://svn.mkgmap.org.uk/mkgmap/mkgmap/trunk"; - rev = version; + src = fetchurl { + url = "http://www.mkgmap.org.uk/download/mkgmap-r${version}-src.tar.gz"; + sha256 = "1xnqbyrf5cbxmggkk1pjcj5d1767kbp15v12zy2fpbbn3yf0k3sh"; }; patches = [ - # Disable automatic download of dependencies - ./build.xml.patch - - # Fix testJavaRules test - ./fix-failing-test.patch + (substituteAll { + # Disable automatic download of dependencies + src = ./build.xml.patch; + inherit version; + }) ]; postPatch = with deps; '' - substituteInPlace build.xml \ - --subst-var-by version ${version} - mkdir -p lib/compile cp ${fastutil} lib/compile/${fastutil.name} cp ${osmpbf} lib/compile/${osmpbf.name} @@ -65,8 +58,8 @@ stdenv.mkDerivation { checkPhase = "ant test"; installPhase = '' - install -Dm644 dist/mkgmap.jar $out/share/java/mkgmap/mkgmap.jar - install -Dm644 dist/doc/mkgmap.1 $out/share/man/man1/mkgmap.1 + install -Dm644 dist/mkgmap.jar -t $out/share/java/mkgmap + install -Dm644 dist/doc/mkgmap.1 -t $out/share/man/man1 cp -r dist/lib/ $out/share/java/mkgmap/ makeWrapper ${jre}/bin/java $out/bin/mkgmap \ --add-flags "-jar $out/share/java/mkgmap/mkgmap.jar" @@ -75,9 +68,12 @@ stdenv.mkDerivation { cp -r dist/examples $out/share/mkgmap/ ''; + passthru.updateScript = [ ./update.sh "mkgmap" meta.downloadPage ]; + meta = with lib; { description = "Create maps for Garmin GPS devices from OpenStreetMap (OSM) data"; homepage = "http://www.mkgmap.org.uk"; + downloadPage = "http://www.mkgmap.org.uk/download/mkgmap.html"; license = licenses.gpl2Only; maintainers = with maintainers; [ sikmir ]; platforms = platforms.all; diff --git a/pkgs/applications/misc/mkgmap/fix-failing-test.patch b/pkgs/applications/misc/mkgmap/fix-failing-test.patch deleted file mode 100644 index 9cfe75583c86..000000000000 --- a/pkgs/applications/misc/mkgmap/fix-failing-test.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/test/uk/me/parabola/imgfmt/app/srt/SrtCollatorTest.java (revision 4555) -+++ a/test/uk/me/parabola/imgfmt/app/srt/SrtCollatorTest.java (working copy) -@@ -125,7 +125,7 @@ - assertEquals("prim: different letter", -1, collator.compare("aaac", "aaad")); - assertEquals("prim: different letter", 1, collator.compare("aaae", "aaad")); - assertEquals(0, collator.compare("aaaa", "aaaa")); -- assertEquals(0, collator.compare("aáÄâ", "aaaa")); -+ //assertEquals(0, collator.compare("aáÄâ", "aaaa")); - - collator.setStrength(Collator.SECONDARY); - assertEquals(0, collator.compare("AabBb", "aabbb")); -@@ -132,8 +132,8 @@ - assertEquals(0, collator.compare("aabBb", "aabBb")); - assertEquals(0, collator.compare("aabbB", "aabBb")); - assertEquals(1, collator.compare("aáÄâ", "aaaa")); -- assertEquals("prim len diff", -1, collator.compare("aáÄâ", "aaaaa")); -- assertEquals(-1, collator.compare("aáÄâa", "aaaab")); -+ //assertEquals("prim len diff", -1, collator.compare("aáÄâ", "aaaaa")); -+ //assertEquals(-1, collator.compare("aáÄâa", "aaaab")); - - collator.setStrength(Collator.TERTIARY); - assertEquals("prim: different case", 1, collator.compare("AabBb", "aabbb")); diff --git a/pkgs/applications/misc/mkgmap/splitter/default.nix b/pkgs/applications/misc/mkgmap/splitter/default.nix index 6baf4f763070..eabc0601cfab 100644 --- a/pkgs/applications/misc/mkgmap/splitter/default.nix +++ b/pkgs/applications/misc/mkgmap/splitter/default.nix @@ -1,6 +1,6 @@ { lib, stdenv , fetchurl -, fetchsvn +, substituteAll , jdk , jre , ant @@ -8,34 +8,30 @@ , doCheck ? true }: let - version = "597"; - sha256 = "1al3160amw0gdarrc707dsppm0kcai9mpkfak7ffspwzw9alsndx"; - deps = import ../deps.nix { inherit fetchurl; }; testInputs = import ./testinputs.nix { inherit fetchurl; }; in -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "splitter"; - inherit version; + version = "597"; - src = fetchsvn { - inherit sha256; - url = "https://svn.mkgmap.org.uk/mkgmap/splitter/trunk"; - rev = version; + src = fetchurl { + url = "http://www.mkgmap.org.uk/download/splitter-r${version}-src.tar.gz"; + sha256 = "0d928wvlpzqwdpfksmxyyfkqrhjsij21wx2538bs2i29siwyla61"; }; patches = [ - # Disable automatic download of dependencies - ./build.xml.patch + (substituteAll { + # Disable automatic download of dependencies + src = ./build.xml.patch; + inherit version; + }) # Fix func.SolverAndProblemGeneratorTest test ./fix-failing-test.patch ]; postPatch = with deps; '' - substituteInPlace build.xml \ - --subst-var-by version ${version} - mkdir -p lib/compile cp ${fastutil} lib/compile/${fastutil.name} cp ${osmpbf} lib/compile/${osmpbf.name} @@ -61,16 +57,19 @@ stdenv.mkDerivation { checkPhase = "ant run.tests && ant run.func-tests"; installPhase = '' - install -Dm644 dist/splitter.jar $out/share/java/splitter/splitter.jar - install -Dm644 doc/splitter.1 $out/share/man/man1/splitter.1 + install -Dm644 dist/splitter.jar -t $out/share/java/splitter + install -Dm644 doc/splitter.1 -t $out/share/man/man1 cp -r dist/lib/ $out/share/java/splitter/ makeWrapper ${jre}/bin/java $out/bin/splitter \ --add-flags "-jar $out/share/java/splitter/splitter.jar" ''; + passthru.updateScript = [ ../update.sh "mkgmap-splitter" meta.downloadPage ]; + meta = with lib; { description = "Utility for splitting OpenStreetMap maps into tiles"; homepage = "http://www.mkgmap.org.uk"; + downloadPage = "http://www.mkgmap.org.uk/download/splitter.html"; license = licenses.gpl2Only; maintainers = with maintainers; [ sikmir ]; platforms = platforms.all; diff --git a/pkgs/applications/misc/mkgmap/update.sh b/pkgs/applications/misc/mkgmap/update.sh new file mode 100755 index 000000000000..ddfca9359359 --- /dev/null +++ b/pkgs/applications/misc/mkgmap/update.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl common-updater-scripts + +set -euo pipefail + +version=$(curl -s $2 | sed -n 's#.*<span data-bind="text: current().version">\(.*\)</span>.*#\1#p') +update-source-version $1 "$version" |