commit
eae2b60b9c
@ -1,6 +1,6 @@
|
|||||||
{ lib, stdenv
|
{ lib, stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, fetchsvn
|
, substituteAll
|
||||||
, jdk
|
, jdk
|
||||||
, jre
|
, jre
|
||||||
, ant
|
, ant
|
||||||
@ -9,34 +9,27 @@
|
|||||||
, withExamples ? false
|
, withExamples ? false
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
version = "4565";
|
|
||||||
sha256 = "0cfh0msky5812l28mavy6p3k2zgyxb698xk79mvla9l45zcicnvw";
|
|
||||||
|
|
||||||
deps = import ./deps.nix { inherit fetchurl; };
|
deps = import ./deps.nix { inherit fetchurl; };
|
||||||
testInputs = import ./testinputs.nix { inherit fetchurl; };
|
testInputs = import ./testinputs.nix { inherit fetchurl; };
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
pname = "mkgmap";
|
pname = "mkgmap";
|
||||||
inherit version;
|
version = "4600";
|
||||||
|
|
||||||
src = fetchsvn {
|
src = fetchurl {
|
||||||
inherit sha256;
|
url = "http://www.mkgmap.org.uk/download/mkgmap-r${version}-src.tar.gz";
|
||||||
url = "https://svn.mkgmap.org.uk/mkgmap/mkgmap/trunk";
|
sha256 = "1xnqbyrf5cbxmggkk1pjcj5d1767kbp15v12zy2fpbbn3yf0k3sh";
|
||||||
rev = version;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# Disable automatic download of dependencies
|
(substituteAll {
|
||||||
./build.xml.patch
|
# Disable automatic download of dependencies
|
||||||
|
src = ./build.xml.patch;
|
||||||
# Fix testJavaRules test
|
inherit version;
|
||||||
./fix-failing-test.patch
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = with deps; ''
|
postPatch = with deps; ''
|
||||||
substituteInPlace build.xml \
|
|
||||||
--subst-var-by version ${version}
|
|
||||||
|
|
||||||
mkdir -p lib/compile
|
mkdir -p lib/compile
|
||||||
cp ${fastutil} lib/compile/${fastutil.name}
|
cp ${fastutil} lib/compile/${fastutil.name}
|
||||||
cp ${osmpbf} lib/compile/${osmpbf.name}
|
cp ${osmpbf} lib/compile/${osmpbf.name}
|
||||||
@ -65,8 +58,8 @@ stdenv.mkDerivation {
|
|||||||
checkPhase = "ant test";
|
checkPhase = "ant test";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -Dm644 dist/mkgmap.jar $out/share/java/mkgmap/mkgmap.jar
|
install -Dm644 dist/mkgmap.jar -t $out/share/java/mkgmap
|
||||||
install -Dm644 dist/doc/mkgmap.1 $out/share/man/man1/mkgmap.1
|
install -Dm644 dist/doc/mkgmap.1 -t $out/share/man/man1
|
||||||
cp -r dist/lib/ $out/share/java/mkgmap/
|
cp -r dist/lib/ $out/share/java/mkgmap/
|
||||||
makeWrapper ${jre}/bin/java $out/bin/mkgmap \
|
makeWrapper ${jre}/bin/java $out/bin/mkgmap \
|
||||||
--add-flags "-jar $out/share/java/mkgmap/mkgmap.jar"
|
--add-flags "-jar $out/share/java/mkgmap/mkgmap.jar"
|
||||||
@ -75,9 +68,12 @@ stdenv.mkDerivation {
|
|||||||
cp -r dist/examples $out/share/mkgmap/
|
cp -r dist/examples $out/share/mkgmap/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.updateScript = [ ./update.sh "mkgmap" meta.downloadPage ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Create maps for Garmin GPS devices from OpenStreetMap (OSM) data";
|
description = "Create maps for Garmin GPS devices from OpenStreetMap (OSM) data";
|
||||||
homepage = "http://www.mkgmap.org.uk";
|
homepage = "http://www.mkgmap.org.uk";
|
||||||
|
downloadPage = "http://www.mkgmap.org.uk/download/mkgmap.html";
|
||||||
license = licenses.gpl2Only;
|
license = licenses.gpl2Only;
|
||||||
maintainers = with maintainers; [ sikmir ];
|
maintainers = with maintainers; [ sikmir ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
|
@ -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"));
|
|
@ -1,6 +1,6 @@
|
|||||||
{ lib, stdenv
|
{ lib, stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, fetchsvn
|
, substituteAll
|
||||||
, jdk
|
, jdk
|
||||||
, jre
|
, jre
|
||||||
, ant
|
, ant
|
||||||
@ -8,34 +8,30 @@
|
|||||||
, doCheck ? true
|
, doCheck ? true
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
version = "597";
|
|
||||||
sha256 = "1al3160amw0gdarrc707dsppm0kcai9mpkfak7ffspwzw9alsndx";
|
|
||||||
|
|
||||||
deps = import ../deps.nix { inherit fetchurl; };
|
deps = import ../deps.nix { inherit fetchurl; };
|
||||||
testInputs = import ./testinputs.nix { inherit fetchurl; };
|
testInputs = import ./testinputs.nix { inherit fetchurl; };
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
pname = "splitter";
|
pname = "splitter";
|
||||||
inherit version;
|
version = "597";
|
||||||
|
|
||||||
src = fetchsvn {
|
src = fetchurl {
|
||||||
inherit sha256;
|
url = "http://www.mkgmap.org.uk/download/splitter-r${version}-src.tar.gz";
|
||||||
url = "https://svn.mkgmap.org.uk/mkgmap/splitter/trunk";
|
sha256 = "0d928wvlpzqwdpfksmxyyfkqrhjsij21wx2538bs2i29siwyla61";
|
||||||
rev = version;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# Disable automatic download of dependencies
|
(substituteAll {
|
||||||
./build.xml.patch
|
# Disable automatic download of dependencies
|
||||||
|
src = ./build.xml.patch;
|
||||||
|
inherit version;
|
||||||
|
})
|
||||||
|
|
||||||
# Fix func.SolverAndProblemGeneratorTest test
|
# Fix func.SolverAndProblemGeneratorTest test
|
||||||
./fix-failing-test.patch
|
./fix-failing-test.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = with deps; ''
|
postPatch = with deps; ''
|
||||||
substituteInPlace build.xml \
|
|
||||||
--subst-var-by version ${version}
|
|
||||||
|
|
||||||
mkdir -p lib/compile
|
mkdir -p lib/compile
|
||||||
cp ${fastutil} lib/compile/${fastutil.name}
|
cp ${fastutil} lib/compile/${fastutil.name}
|
||||||
cp ${osmpbf} lib/compile/${osmpbf.name}
|
cp ${osmpbf} lib/compile/${osmpbf.name}
|
||||||
@ -61,16 +57,19 @@ stdenv.mkDerivation {
|
|||||||
checkPhase = "ant run.tests && ant run.func-tests";
|
checkPhase = "ant run.tests && ant run.func-tests";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -Dm644 dist/splitter.jar $out/share/java/splitter/splitter.jar
|
install -Dm644 dist/splitter.jar -t $out/share/java/splitter
|
||||||
install -Dm644 doc/splitter.1 $out/share/man/man1/splitter.1
|
install -Dm644 doc/splitter.1 -t $out/share/man/man1
|
||||||
cp -r dist/lib/ $out/share/java/splitter/
|
cp -r dist/lib/ $out/share/java/splitter/
|
||||||
makeWrapper ${jre}/bin/java $out/bin/splitter \
|
makeWrapper ${jre}/bin/java $out/bin/splitter \
|
||||||
--add-flags "-jar $out/share/java/splitter/splitter.jar"
|
--add-flags "-jar $out/share/java/splitter/splitter.jar"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.updateScript = [ ../update.sh "mkgmap-splitter" meta.downloadPage ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Utility for splitting OpenStreetMap maps into tiles";
|
description = "Utility for splitting OpenStreetMap maps into tiles";
|
||||||
homepage = "http://www.mkgmap.org.uk";
|
homepage = "http://www.mkgmap.org.uk";
|
||||||
|
downloadPage = "http://www.mkgmap.org.uk/download/splitter.html";
|
||||||
license = licenses.gpl2Only;
|
license = licenses.gpl2Only;
|
||||||
maintainers = with maintainers; [ sikmir ];
|
maintainers = with maintainers; [ sikmir ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
|
7
pkgs/applications/misc/mkgmap/update.sh
Executable file
7
pkgs/applications/misc/mkgmap/update.sh
Executable file
@ -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"
|
Loading…
x
Reference in New Issue
Block a user