diff --git a/pkgs/geospatial/mapsoft/0002-fix-build.patch b/pkgs/geospatial/mapsoft/0002-fix-build.patch
new file mode 100644
index 0000000000000000000000000000000000000000..4ca5e83365067f0060a918781f8873e73e18fd89
--- /dev/null
+++ b/pkgs/geospatial/mapsoft/0002-fix-build.patch
@@ -0,0 +1,281 @@
+diff --git i/docs/man/ms2render.htm w/docs/man/ms2render.htm
+index 652acc2..b5750c3 100644
+--- i/docs/man/ms2render.htm
++++ w/docs/man/ms2render.htm
+@@ -493,7 +493,7 @@
+-File with type information. Default: /usr/share/mapsoft2/types.cfg
++File with type information. Default: @out@/share/mapsoft2/types.cfg
+@@ -559,7 +559,7 @@
+-Configuration file for vector map rendering. Default: /usr/share/mapsoft2/render.cfg
++Configuration file for vector map rendering. Default: @out@/share/mapsoft2/render.cfg
+diff --git i/docs/man/ms2view.htm w/docs/man/ms2view.htm
+index f178b4a..1fed011 100644
+--- i/docs/man/ms2view.htm
++++ w/docs/man/ms2view.htm
+@@ -475,7 +475,7 @@
+-Structure of ms2view window is simple: a viewer, a main menu, a statusbar, tables with waypoints, tracks, and maps, a few dialogs, etc. Appearence of these elements is controlled by GTK3 theme. One can customize it using CSS styles. Styles are read from two places: /usr/share/mapsoft2/mapsoft2.css -- system-wide file. By default it contains a few definitions, mostly for making interface elements smaller. Some tips about viewer structure can be also find there. $HOME/.mapsoft2/mapsoft2.css -- user-specific file.
++Structure of ms2view window is simple: a viewer, a main menu, a statusbar, tables with waypoints, tracks, and maps, a few dialogs, etc. Appearence of these elements is controlled by GTK3 theme. One can customize it using CSS styles. Styles are read from two places: @out@/share/mapsoft2/mapsoft2.css -- system-wide file. By default it contains a few definitions, mostly for making interface elements smaller. Some tips about viewer structure can be also find there. $HOME/.mapsoft2/mapsoft2.css -- user-specific file.
+diff --git i/docs/man/ms2view.txt w/docs/man/ms2view.txt
+index 5469cac..c165c1a 100644
+--- i/docs/man/ms2view.txt
++++ w/docs/man/ms2view.txt
+@@ -4,7 +4,7 @@ Structure of B window is simple: a viewer, a main menu, a
+-B</usr/share/mapsoft2/mapsoft2.css> -- system-wide file. By default it
++B<@out@/share/mapsoft2/mapsoft2.css> -- system-wide file. By default it
+diff --git i/docs/man/ms2vmap.htm w/docs/man/ms2vmap.htm
+index 8bbeac9..f6ddd9a 100644
+--- i/docs/man/ms2vmap.htm
++++ w/docs/man/ms2vmap.htm
+@@ -64,7 +64,7 @@ ms2vmap <file> ... -o <out file> [<options>]
+-File with type information. Default: /usr/share/mapsoft2/types.cfg
++File with type information. Default: @out@/share/mapsoft2/types.cfg
+diff --git i/docs/man/ms2vmapdb.htm w/docs/man/ms2vmapdb.htm
+index 8bd5943..c990a0f 100644
+--- i/docs/man/ms2vmapdb.htm
++++ w/docs/man/ms2vmapdb.htm
+@@ -238,7 +238,7 @@ ms2vmapdb fig_lib -- make fig library using typeinfo file
+-File with type information. Default: /usr/share/mapsoft2/types.cfg
++File with type information. Default: @out@/share/mapsoft2/types.cfg
+@@ -302,7 +302,7 @@ ms2vmapdb fig_lib -- make fig library using typeinfo file
+-File with type information. Default: /usr/share/mapsoft2/types.cfg
++File with type information. Default: @out@/share/mapsoft2/types.cfg
+@@ -436,7 +436,7 @@ ms2vmapdb fig_lib -- make fig library using typeinfo file
+-File with type information. Default: /usr/share/mapsoft2/types.cfg
++File with type information. Default: @out@/share/mapsoft2/types.cfg
+@@ -646,7 +646,7 @@ ms2vmapdb fig_lib -- make fig library using typeinfo file
+-File with type information. Default: /usr/share/mapsoft2/types.cfg
++File with type information. Default: @out@/share/mapsoft2/types.cfg
+Submodule modules contains modified content
+diff --git i/modules/mapview/action_manager.cpp w/modules/mapview/action_manager.cpp
+index ab16dae..272b454 100644
+--- i/modules/mapview/action_manager.cpp
++++ w/modules/mapview/action_manager.cpp
+@@ -75,7 +75,7 @@ ActionManager::ActionManager (Mapview * mapview_):
ADD_ACT(AMTrkDel, "Edit")
ADD_ACT(AMEditData, "Edit")
+- AddMaps("Maps", std::string("/usr/share/") + DATADIR + "/" + MAPS_MENU_FILE);
++ AddMaps("Maps", std::string("@out@/share/") + DATADIR + "/" + MAPS_MENU_FILE);
if (getenv("HOME")) {
AddSep("Maps");
+diff --git i/modules/mapview/mapview.cpp w/modules/mapview/mapview.cpp
+index 6d461fb..5bd5367 100644
+--- i/modules/mapview/mapview.cpp
++++ w/modules/mapview/mapview.cpp
+@@ -367,7 +367,7 @@ Mapview::load_css(){
+- std::string css_glo = std::string("/usr/share/") + DATADIR + "/" + CSS_FILE;
++ std::string css_glo = std::string("@out@/share/") + DATADIR + "/" + CSS_FILE;
if (file_exists(css_glo) &&
css_provider->load_from_path(css_glo)){
auto screen = get_screen();
+diff --git i/modules/vmap2/vmap2gobj.cpp w/modules/vmap2/vmap2gobj.cpp
+index e11d3a7..bec01be 100644
+--- i/modules/vmap2/vmap2gobj.cpp
++++ w/modules/vmap2/vmap2gobj.cpp
+@@ -22,7 +22,7 @@ using namespace std;
+- opts.add("config", 1,'c',g, "Configuration file for vector map rendering. Default: /usr/share/mapsoft2/render.cfg");
++ opts.add("config", 1,'c',g, "Configuration file for vector map rendering. Default: @out/share/mapsoft2/render.cfg");
+@@ -92,7 +92,7 @@ GObjVMap2::GObjVMap2(VMap2 & map, const Opt &o): GObjMulti(false), map(map) {
+- std::string cfg = opt.get("config", "/usr/share/mapsoft2/render.cfg");
++ std::string cfg = opt.get("config", "@out@/share/mapsoft2/render.cfg");
+diff --git i/modules/vmap2/vmap2types.cpp w/modules/vmap2/vmap2types.cpp
+index 6688736..ec77637 100644
+--- i/modules/vmap2/vmap2types.cpp
++++ w/modules/vmap2/vmap2types.cpp
+@@ -7,12 +7,12 @@
+- opts.add("types", 1, 't', g, "File with type information. Default: /usr/share/mapsoft2/types.cfg");
++ opts.add("types", 1, 't', g, "File with type information. Default: @out@/share/mapsoft2/types.cfg");
+- std::string file = o.get("types", "/usr/share/mapsoft2/types.cfg");
++ std::string file = o.get("types", "@out@/share/mapsoft2/types.cfg");
+diff --git i/vmap_data/scripts/vmaps.sh w/vmap_data/scripts/vmaps.sh
+index aa7537e..b0decd1 100644
+--- i/vmap_data/scripts/vmaps.sh
++++ w/vmap_data/scripts/vmaps.sh
+@@ -19,12 +19,12 @@ GRID=0; # draw grid
+-REND_CFG=/usr/share/mapsoft2/render.cfg; # Render configuration
+-TYPEINFO=/usr/share/mapsoft2/types.cfg # Type information
+-HTM_TEMPL=/usr/share/mapsoft2/map_templ.htm; # template for htm page
++REND_CFG=@out@/share/mapsoft2/render.cfg; # Render configuration
++TYPEINFO=@out@/share/mapsoft2/types.cfg # Type information
++HTM_TEMPL=@out@/share/mapsoft2/map_templ.htm; # template for htm page
+-TYP=/usr/share/mapsoft2/slazav.typ
++TYP=@out@/share/mapsoft2/slazav.typ
+diff --git i/vmap_data/scripts/vmaps_get_fig w/vmap_data/scripts/vmaps_get_fig
+index fca52c1..e0bce0c 100755
+--- i/vmap_data/scripts/vmaps_get_fig
++++ w/vmap_data/scripts/vmaps_get_fig
+@@ -9,7 +9,7 @@
+-. vmaps.sh
++. @out@/bin/vmaps.sh
+diff --git i/vmap_data/scripts/vmaps_in w/vmap_data/scripts/vmaps_in
+index 0670772..4e6869c 100755
+--- i/vmap_data/scripts/vmaps_in
++++ w/vmap_data/scripts/vmaps_in
+@@ -9,7 +9,7 @@
+-. vmaps.sh
++. @out@/bin/vmaps.sh
+diff --git i/vmap_data/scripts/vmaps_mbtiles w/vmap_data/scripts/vmaps_mbtiles
+index d751d1c..2ab5945 100755
+--- i/vmap_data/scripts/vmaps_mbtiles
++++ w/vmap_data/scripts/vmaps_mbtiles
+@@ -8,7 +8,7 @@
+-. vmaps.sh
++. @out@/bin/vmaps.sh
+diff --git i/vmap_data/scripts/vmaps_out w/vmap_data/scripts/vmaps_out
+index 8372b7f..288e5e2 100755
+--- i/vmap_data/scripts/vmaps_out
++++ w/vmap_data/scripts/vmaps_out
+@@ -12,7 +12,7 @@
+-. vmaps.sh
++. @out@/bin/vmaps.sh
+diff --git i/vmap_data/scripts/vmaps_preview w/vmap_data/scripts/vmaps_preview
+index 757dacc..4a7612c 100755
+--- i/vmap_data/scripts/vmaps_preview
++++ w/vmap_data/scripts/vmaps_preview
+@@ -3,7 +3,7 @@
+-. vmaps.sh
++. @out@/bin/vmaps.sh
+diff --git i/vmap_data/scripts/vmaps_sqlitedb w/vmap_data/scripts/vmaps_sqlitedb
+index 70a3d6b..e683232 100755
+--- i/vmap_data/scripts/vmaps_sqlitedb
++++ w/vmap_data/scripts/vmaps_sqlitedb
+@@ -6,7 +6,7 @@
+-. vmaps.sh
++. @out@/bin/vmaps.sh
+diff --git i/vmap_data/scripts/vmaps_wp_update w/vmap_data/scripts/vmaps_wp_update
+index 667057e..5ac21d7 100755
+--- i/vmap_data/scripts/vmaps_wp_update
++++ w/vmap_data/scripts/vmaps_wp_update
+@@ -12,7 +12,7 @@
+-. vmaps.sh
++. @out@/bin/vmaps.sh
diff --git a/pkgs/geospatial/mapsoft/2.nix b/pkgs/geospatial/mapsoft/2.nix
index 99feb6d68f8685150d6c66f504e9bff02b1f4e07..187b8f0288e1185662436f6eda2a14c7d44438a8 100644
--- a/pkgs/geospatial/mapsoft/2.nix
+++ b/pkgs/geospatial/mapsoft/2.nix
@@ -40,25 +40,43 @@ hash = "sha256-8kCcz7EnCxtvQzxBUooKp3ozqhBSNYLMXuXMTdG74nQ=";
fetchSubmodules = true;
};
--replace-fail "SCRIPT_TESTS := getopt" ""
--replace-fail "SIMPLE_TESTS := opt" ""
--replace-fail "SCRIPT_TESTS := tmpdir" ""
--replace-fail "/usr/bin/perl" "${perlPackages.perl}/bin/perl"
--replace-fail "/usr/share" "$out/share"
srcFiles = [
"docs/man/ms2render.htm"
"docs/man/ms2view.htm"
"docs/man/ms2view.txt"
"docs/man/ms2vmap.htm"
"docs/man/ms2vmapdb.htm"
"modules/mapview/action_manager.cpp"
"modules/mapview/mapview.cpp"
"modules/vmap2/vmap2gobj.cpp"
"modules/vmap2/vmap2types.cpp"
"vmap_data/scripts/vmaps.sh"
"vmap_data/scripts/vmaps_get_fig"
"vmap_data/scripts/vmaps_in"
"vmap_data/scripts/vmaps_mbtiles"
"vmap_data/scripts/vmaps_out"
"vmap_data/scripts/vmaps_preview"
"vmap_data/scripts/vmaps_sqlitedb"
"vmap_data/scripts/vmaps_wp_update"
];
${lib.concatStringsSep "\n" (
map (
file: ''substituteInPlace ${file} --subst-var out''
) srcFiles
)}
substituteInPlace modules/getopt/Makefile --replace-fail "SCRIPT_TESTS := getopt" ""
substituteInPlace modules/opt/Makefile --replace-fail "SIMPLE_TESTS := opt" ""
substituteInPlace modules/tmpdir/Makefile --replace-fail "SCRIPT_TESTS := tmpdir" ""
substituteInPlace modules/get_deps --replace-fail "/usr/bin/perl" "${perlPackages.perl}/bin/perl"
patchShebangs .
desktopItems = [
(makeDesktopItem {
@@ -102,11 +120,12 @@ proj
shapelib
];
makeFlags = [ "prefix=$(out)" ];
dontWrapGApps = true;
application/octet-stream
This content has been proxied by September (3851b).