0002-fix-build.patch (15499B)
1 diff --git i/docs/man/ms2render.htm w/docs/man/ms2render.htm 2 index 0664e9f..6cdbfa0 100644 3 --- i/docs/man/ms2render.htm 4 +++ w/docs/man/ms2render.htm 5 @@ -493,7 +493,7 @@ 6 <dt id="t---types-arg"><b>-t, --types <arg></b></dt> 7 <dd> 8 9 -<p>File with type information. Default: /usr/share/mapsoft2/types.cfg</p> 10 +<p>File with type information. Default: @out@/share/mapsoft2/types.cfg</p> 11 12 </dd> 13 <dt id="q---quite-arg"><b>-q, --quite <arg></b></dt> 14 @@ -553,7 +553,7 @@ 15 <dt id="c---config-arg"><b>-c, --config <arg></b></dt> 16 <dd> 17 18 -<p>Configuration file for vector map rendering. Default: /usr/share/mapsoft2/render.cfg</p> 19 +<p>Configuration file for vector map rendering. Default: @out@/share/mapsoft2/render.cfg</p> 20 21 </dd> 22 <dt id="obj_scale-arg"><b>--obj_scale <arg></b></dt> 23 diff --git i/docs/man/ms2view.htm w/docs/man/ms2view.htm 24 index 243de0a..7138440 100644 25 --- i/docs/man/ms2view.htm 26 +++ w/docs/man/ms2view.htm 27 @@ -475,7 +475,7 @@ 28 29 <h1 id="CUSTOMIZING-VIEWER-INTERFACE-WITH-CSS-STYLES">CUSTOMIZING VIEWER INTERFACE WITH CSS STYLES</h1> 30 31 -<p>Structure of <b>ms2view</b> 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: <b>/usr/share/mapsoft2/mapsoft2.css</b> -- 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. <b>$HOME/.mapsoft2/mapsoft2.css</b> -- user-specific file.</p> 32 +<p>Structure of <b>ms2view</b> 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: <b>@out@/share/mapsoft2/mapsoft2.css</b> -- 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. <b>$HOME/.mapsoft2/mapsoft2.css</b> -- user-specific file.</p> 33 34 <p>Additional information about writing css styles can be found in GTK3 documentation or GTK theme sources:</p> 35 36 diff --git i/docs/man/ms2view.txt w/docs/man/ms2view.txt 37 index 5469cac..c165c1a 100644 38 --- i/docs/man/ms2view.txt 39 +++ w/docs/man/ms2view.txt 40 @@ -4,7 +4,7 @@ Structure of B<ms2view> window is simple: a viewer, a main menu, a 41 statusbar, tables with waypoints, tracks, and maps, a few dialogs, etc. 42 Appearence of these elements is controlled by GTK3 theme. One can 43 customize it using CSS styles. Styles are read from two places: 44 -B</usr/share/mapsoft2/mapsoft2.css> -- system-wide file. By default it 45 +B<@out@/share/mapsoft2/mapsoft2.css> -- system-wide file. By default it 46 contains a few definitions, mostly for making interface elements smaller. 47 Some tips about viewer structure can be also find there. 48 B<$HOME/.mapsoft2/mapsoft2.css> -- user-specific file. 49 diff --git i/docs/man/ms2vmap.htm w/docs/man/ms2vmap.htm 50 index 69fbda3..1fdfd43 100644 51 --- i/docs/man/ms2vmap.htm 52 +++ w/docs/man/ms2vmap.htm 53 @@ -64,7 +64,7 @@ ms2vmap <file> ... -o <out file> [<options>]</code></pre> 54 <dt id="t---types-arg"><b>-t, --types <arg></b></dt> 55 <dd> 56 57 -<p>File with type information. Default: /usr/share/mapsoft2/types.cfg</p> 58 +<p>File with type information. Default: @out@/share/mapsoft2/types.cfg</p> 59 60 </dd> 61 <dt id="D---define-arg"><b>-D, --define <arg></b></dt> 62 diff --git i/docs/man/ms2vmapdb.htm w/docs/man/ms2vmapdb.htm 63 index 8bdb701..c05835a 100644 64 --- i/docs/man/ms2vmapdb.htm 65 +++ w/docs/man/ms2vmapdb.htm 66 @@ -230,7 +230,7 @@ ms2vmapdb export -- export vector map to a different format</code></pre> 67 <dt id="t---types-arg"><b>-t, --types <arg></b></dt> 68 <dd> 69 70 -<p>File with type information. Default: /usr/share/mapsoft2/types.cfg</p> 71 +<p>File with type information. Default: @out@/share/mapsoft2/types.cfg</p> 72 73 </dd> 74 <dt id="D---define-arg"><b>-D, --define <arg></b></dt> 75 @@ -294,7 +294,7 @@ ms2vmapdb export -- export vector map to a different format</code></pre> 76 <dt id="t---types-arg1"><b>-t, --types <arg></b></dt> 77 <dd> 78 79 -<p>File with type information. Default: /usr/share/mapsoft2/types.cfg</p> 80 +<p>File with type information. Default: @out@/share/mapsoft2/types.cfg</p> 81 82 </dd> 83 <dt id="D---define-arg1"><b>-D, --define <arg></b></dt> 84 @@ -418,7 +418,7 @@ ms2vmapdb export -- export vector map to a different format</code></pre> 85 <dt id="t---types-arg2"><b>-t, --types <arg></b></dt> 86 <dd> 87 88 -<p>File with type information. Default: /usr/share/mapsoft2/types.cfg</p> 89 +<p>File with type information. Default: @out@/share/mapsoft2/types.cfg</p> 90 91 </dd> 92 <dt id="D---define-arg2"><b>-D, --define <arg></b></dt> 93 Submodule modules contains modified content 94 diff --git i/modules/mapview/action_manager.cpp w/modules/mapview/action_manager.cpp 95 index ab16dae..272b454 100644 96 --- i/modules/mapview/action_manager.cpp 97 +++ w/modules/mapview/action_manager.cpp 98 @@ -75,7 +75,7 @@ ActionManager::ActionManager (Mapview * mapview_): 99 ADD_ACT(AMTrkDel, "Edit") 100 ADD_ACT(AMEditData, "Edit") 101 102 - AddMaps("Maps", std::string("/usr/share/") + DATADIR + "/" + MAPS_MENU_FILE); 103 + AddMaps("Maps", std::string("@out@/share/") + DATADIR + "/" + MAPS_MENU_FILE); 104 105 if (getenv("HOME")) { 106 AddSep("Maps"); 107 diff --git i/modules/mapview/mapview.cpp w/modules/mapview/mapview.cpp 108 index 997c127..43928bf 100644 109 --- i/modules/mapview/mapview.cpp 110 +++ w/modules/mapview/mapview.cpp 111 @@ -367,7 +367,7 @@ Mapview::load_css(){ 112 if (!style_context) throw Err() << "Mapview: can't get Gtk::StyleContext"; 113 114 try{ 115 - std::string css_glo = std::string("/usr/share/") + DATADIR + "/" + CSS_FILE; 116 + std::string css_glo = std::string("@out@/share/") + DATADIR + "/" + CSS_FILE; 117 if (file_exists(css_glo) && 118 css_provider->load_from_path(css_glo)){ 119 auto screen = get_screen(); 120 diff --git i/modules/vmap2/vmap2gobj.cpp w/modules/vmap2/vmap2gobj.cpp 121 index 6583699..5e6a6af 100644 122 --- i/modules/vmap2/vmap2gobj.cpp 123 +++ w/modules/vmap2/vmap2gobj.cpp 124 @@ -22,7 +22,7 @@ using namespace std; 125 void 126 ms2opt_add_vmap2_render(GetOptSet & opts){ 127 const char *g = "VMAP2_RENDER"; 128 - opts.add("config", 1,'c',g, "Configuration file for vector map rendering. Default: /usr/share/mapsoft2/render.cfg"); 129 + opts.add("config", 1,'c',g, "Configuration file for vector map rendering. Default: @out@/share/mapsoft2/render.cfg"); 130 opts.add("define", 1,0,g, "Definitions for vector map rendering (json object)"); 131 opts.add("obj_scale", 1,0,g, "Rescaling factor for all objects, default 1.0."); 132 opts.add("vmap_minsc", 1,0,g, "Minimum map scale (calculated from the 'natural' " 133 @@ -110,7 +110,7 @@ GObjVMap2::GObjVMap2(VMap2 & map, const Opt &o): GObjMulti(false), map(map) { 134 read_words_defs defs(o.get("define", Opt())); 135 136 int depth = 0; 137 - std::string cfg = opt.get<string>("config", "/usr/share/mapsoft2/render.cfg"); 138 + std::string cfg = opt.get<string>("config", "@out@/share/mapsoft2/render.cfg"); 139 load_conf(cfg, defs, depth); 140 } 141 142 diff --git i/modules/vmap2/vmap2types.cpp w/modules/vmap2/vmap2types.cpp 143 index 3a7ee9b..c904529 100644 144 --- i/modules/vmap2/vmap2types.cpp 145 +++ w/modules/vmap2/vmap2types.cpp 146 @@ -8,12 +8,12 @@ 147 void 148 ms2opt_add_vmap2t(GetOptSet & opts){ 149 const char *g = "VMAP2"; 150 - opts.add("types", 1, 't', g, "File with type information. Default: /usr/share/mapsoft2/types.cfg"); 151 + opts.add("types", 1, 't', g, "File with type information. Default: @out@/share/mapsoft2/types.cfg"); 152 opts.add("define", 1, 'D', g, "Define variables for type information file."); 153 } 154 155 VMap2types::VMap2types(const Opt & o){ 156 - std::string file = o.get("types", "/usr/share/mapsoft2/types.cfg"); 157 + std::string file = o.get("types", "@out@/share/mapsoft2/types.cfg"); 158 if (file == "") return; 159 read_words_defs defs(o.get("define", Opt())); 160 load(file, defs); 161 diff --git i/programs/Makefile w/programs/Makefile 162 index c81d62e..f7d5c7d 100644 163 --- i/programs/Makefile 164 +++ w/programs/Makefile 165 @@ -18,7 +18,7 @@ bindir ?= $(prefix)/bin 166 datadir ?= $(prefix)/share 167 168 all: 169 - sh -e -c 'for i in $(PROGRAMS); do make -C $$i; done' 170 + sh -e -c 'for i in $(PROGRAMS); do make -C $$i notests; done' 171 172 install: 173 sh -e -c 'for i in $(PROGRAMS); do install -D -m755 $$i/$$i $(bindir)/$$i; done' 174 diff --git i/vmap_data/scripts/vmaps.sh w/vmap_data/scripts/vmaps.sh 175 index 97ebf17..d0ca927 100644 176 --- i/vmap_data/scripts/vmaps.sh 177 +++ w/vmap_data/scripts/vmaps.sh 178 @@ -16,8 +16,8 @@ MAP_ATTR="mapsoft" 179 VMAP_DIR=vmap; # Source folder 180 VMAP_EXT=vmap; # Extension/format of vector maps (could be vmap2, vmap, or even mp) 181 182 -REND_CFG=/usr/share/mapsoft2/render.cfg; # Render configuration 183 -TYPEINFO=/usr/share/mapsoft2/types.cfg # Type information 184 +REND_CFG=@out@/share/mapsoft2/render.cfg; # Render configuration 185 +TYPEINFO=@out@/share/mapsoft2/types.cfg # Type information 186 187 ############################################################ 188 ## Image rendering 189 @@ -46,7 +46,7 @@ TLIST=""; 190 ############################################################ 191 ## IMG rendering (see vmaps_img script) 192 IMG_DIR=OUT; # img files (if empty, img files are not rendered) 193 -TYPSRC=/usr/share/mapsoft2/typ.txt; # typ file source for garmin IMG 194 +TYPSRC=@out@/share/mapsoft2/typ.txt; # typ file source for garmin IMG 195 GMT=gmt; # gmt program 196 CGPSM=cgpsmapper-static # cgpsmapper program 197 IMGMAP=""; # combined img file 198 diff --git i/vmap_data/scripts/vmaps_diff w/vmap_data/scripts/vmaps_diff 199 index 136155e..0aa1ed0 100755 200 --- i/vmap_data/scripts/vmaps_diff 201 +++ w/vmap_data/scripts/vmaps_diff 202 @@ -4,7 +4,7 @@ 203 # Render difference between two git revitions of a file 204 205 # read global configuration and functions 206 -. vmaps.sh ||: 207 +. @out@/bin/vmaps.sh ||: 208 209 # read local configuration 210 . ./vmaps.conf ||: 211 diff --git i/vmap_data/scripts/vmaps_get_fig w/vmap_data/scripts/vmaps_get_fig 212 index 0ba7b7f..5048bcb 100755 213 --- i/vmap_data/scripts/vmaps_get_fig 214 +++ w/vmap_data/scripts/vmaps_get_fig 215 @@ -9,7 +9,7 @@ 216 ################################################## 217 218 # read global configuration and functions 219 -. vmaps.sh ||: 220 +. @out@/bin/vmaps.sh ||: 221 222 # read local configuration 223 . ./vmaps.conf ||: 224 diff --git i/vmap_data/scripts/vmaps_img w/vmap_data/scripts/vmaps_img 225 index 1e0599c..84413bb 100755 226 --- i/vmap_data/scripts/vmaps_img 227 +++ w/vmap_data/scripts/vmaps_img 228 @@ -9,7 +9,7 @@ 229 ################################################## 230 231 # read global configuration and functions 232 -. vmaps.sh ||: 233 +. @out@/bin/vmaps.sh ||: 234 235 # read local configuration 236 . ./vmaps.conf ||: 237 diff --git i/vmap_data/scripts/vmaps_in w/vmap_data/scripts/vmaps_in 238 index 48da7ff..70203bc 100755 239 --- i/vmap_data/scripts/vmaps_in 240 +++ w/vmap_data/scripts/vmaps_in 241 @@ -9,7 +9,7 @@ 242 ################################################## 243 244 # read global configuration and functions 245 -. vmaps.sh ||: 246 +. @out@/bin/vmaps.sh ||: 247 248 # local configuration 249 . ./vmaps.conf ||: 250 diff --git i/vmap_data/scripts/vmaps_index w/vmap_data/scripts/vmaps_index 251 index ae225ec..e59c592 100755 252 --- i/vmap_data/scripts/vmaps_index 253 +++ w/vmap_data/scripts/vmaps_index 254 @@ -4,7 +4,7 @@ 255 ################################################## 256 257 # read global configuration and functions 258 -. vmaps.sh ||: 259 +. @out@/bin/vmaps.sh ||: 260 261 # read local configuration 262 . ./vmaps.conf ||: 263 diff --git i/vmap_data/scripts/vmaps_out w/vmap_data/scripts/vmaps_out 264 index 8996a29..914546b 100755 265 --- i/vmap_data/scripts/vmaps_out 266 +++ w/vmap_data/scripts/vmaps_out 267 @@ -18,7 +18,7 @@ 268 ################################################## 269 270 # read global configuration and functions 271 -. vmaps.sh ||: 272 +. @out@/bin/vmaps.sh ||: 273 274 # read local configuration 275 . ./vmaps.conf ||: 276 diff --git i/vmap_data/scripts/vmaps_pack_img w/vmap_data/scripts/vmaps_pack_img 277 index f8ebf4f..c101941 100755 278 --- i/vmap_data/scripts/vmaps_pack_img 279 +++ w/vmap_data/scripts/vmaps_pack_img 280 @@ -5,7 +5,7 @@ 281 ################################################## 282 283 # read global configuration and functions 284 -. vmaps.sh ||: 285 +. @out@/bin/vmaps.sh ||: 286 287 # read local configuration 288 . ./vmaps.conf ||: 289 diff --git i/vmap_data/scripts/vmaps_pack_mbtiles w/vmap_data/scripts/vmaps_pack_mbtiles 290 index b73121e..da52332 100755 291 --- i/vmap_data/scripts/vmaps_pack_mbtiles 292 +++ w/vmap_data/scripts/vmaps_pack_mbtiles 293 @@ -7,7 +7,7 @@ 294 # see https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md 295 296 # read global configuration and functions 297 -. vmaps.sh ||: 298 +. @out@/bin/vmaps.sh ||: 299 300 # read local configuration 301 . ./vmaps.conf ||: 302 diff --git i/vmap_data/scripts/vmaps_pack_sqlitedb w/vmap_data/scripts/vmaps_pack_sqlitedb 303 index 3dfd676..9b4887b 100755 304 --- i/vmap_data/scripts/vmaps_pack_sqlitedb 305 +++ w/vmap_data/scripts/vmaps_pack_sqlitedb 306 @@ -7,7 +7,7 @@ 307 # see: https://osmand.net/docs/technical/osmand-file-formats/osmand-sqlite/ 308 309 # read global configuration and functions 310 -. vmaps.sh ||: 311 +. @out@/bin/vmaps.sh ||: 312 313 # read local configuration 314 . ./vmaps.conf ||: 315 diff --git i/vmap_data/scripts/vmaps_png w/vmap_data/scripts/vmaps_png 316 index 5fbf71c..f726bdb 100755 317 --- i/vmap_data/scripts/vmaps_png 318 +++ w/vmap_data/scripts/vmaps_png 319 @@ -9,7 +9,7 @@ 320 ################################################## 321 322 # read global configuration and functions 323 -. vmaps.sh ||: 324 +. @out@/bin/vmaps.sh ||: 325 326 # read local configuration 327 . ./vmaps.conf ||: 328 diff --git i/vmap_data/scripts/vmaps_preview w/vmap_data/scripts/vmaps_preview 329 index 1ed94bc..be42a26 100755 330 --- i/vmap_data/scripts/vmaps_preview 331 +++ w/vmap_data/scripts/vmaps_preview 332 @@ -3,7 +3,7 @@ 333 ################################################## 334 335 # read global configuration and functions 336 -. vmaps.sh ||: 337 +. @out@/bin/vmaps.sh ||: 338 339 # read local configuration 340 . ./vmaps.conf ||: 341 diff --git i/vmap_data/scripts/vmaps_rend_mbtiles w/vmap_data/scripts/vmaps_rend_mbtiles 342 index a8ffee0..4809371 100755 343 --- i/vmap_data/scripts/vmaps_rend_mbtiles 344 +++ w/vmap_data/scripts/vmaps_rend_mbtiles 345 @@ -9,7 +9,7 @@ 346 ################################################## 347 348 # read global configuration and functions 349 -. vmaps.sh ||: 350 +. @out@/bin/vmaps.sh ||: 351 352 # read local configuration 353 . ./vmaps.conf ||: 354 diff --git i/vmap_data/scripts/vmaps_tiles w/vmap_data/scripts/vmaps_tiles 355 index fc45eab..3a06f66 100755 356 --- i/vmap_data/scripts/vmaps_tiles 357 +++ w/vmap_data/scripts/vmaps_tiles 358 @@ -9,7 +9,7 @@ 359 ################################################## 360 361 # read global configuration and functions 362 -. vmaps.sh ||: 363 +. @out@/bin/vmaps.sh ||: 364 365 # read local configuration 366 . ./vmaps.conf ||: 367 diff --git i/vmap_data/scripts/vmaps_tlist w/vmap_data/scripts/vmaps_tlist 368 index 6aff657..1b7df8c 100755 369 --- i/vmap_data/scripts/vmaps_tlist 370 +++ w/vmap_data/scripts/vmaps_tlist 371 @@ -3,7 +3,7 @@ 372 # Create list of tiles 373 374 # read global configuration and functions 375 -. vmaps.sh ||: 376 +. @out@/bin/vmaps.sh ||: 377 378 # read local configuration 379 . ./vmaps.conf ||: 380 diff --git i/vmap_data/scripts/vmaps_wp_update w/vmap_data/scripts/vmaps_wp_update 381 index 0c3ec89..e235642 100755 382 --- i/vmap_data/scripts/vmaps_wp_update 383 +++ w/vmap_data/scripts/vmaps_wp_update 384 @@ -26,7 +26,7 @@ 385 ################################################## 386 387 # read global configuration and functions 388 -. vmaps.sh ||: 389 +. @out@/bin/vmaps.sh ||: 390 391 # read local configuration 392 . ./vmaps.conf ||:
