0002-fix-build.patch (15453B)
1 diff --git i/docs/man/ms2render.htm w/docs/man/ms2render.htm 2 index 62972dc..0195402 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 @@ -559,7 +559,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 901374e..6dce51b 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 2b06fe4..2018bc6 100644 64 --- i/docs/man/ms2vmapdb.htm 65 +++ w/docs/man/ms2vmapdb.htm 66 @@ -238,7 +238,7 @@ ms2vmapdb fig_lib -- make fig library using typeinfo file</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 @@ -302,7 +302,7 @@ ms2vmapdb fig_lib -- make fig library using typeinfo file</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 @@ -436,7 +436,7 @@ ms2vmapdb fig_lib -- make fig library using typeinfo file</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 @@ -652,7 +652,7 @@ ms2vmapdb fig_lib -- make fig library using typeinfo file</code></pre> 94 <dt id="t---types-arg3"><b>-t, --types <arg></b></dt> 95 <dd> 96 97 -<p>File with type information. Default: /usr/share/mapsoft2/types.cfg</p> 98 +<p>File with type information. Default: @out@/share/mapsoft2/types.cfg</p> 99 100 </dd> 101 <dt id="D---define-arg3"><b>-D, --define <arg></b></dt> 102 Submodule modules contains modified content 103 diff --git i/modules/mapview/action_manager.cpp w/modules/mapview/action_manager.cpp 104 index ab16dae..272b454 100644 105 --- i/modules/mapview/action_manager.cpp 106 +++ w/modules/mapview/action_manager.cpp 107 @@ -75,7 +75,7 @@ ActionManager::ActionManager (Mapview * mapview_): 108 ADD_ACT(AMTrkDel, "Edit") 109 ADD_ACT(AMEditData, "Edit") 110 111 - AddMaps("Maps", std::string("/usr/share/") + DATADIR + "/" + MAPS_MENU_FILE); 112 + AddMaps("Maps", std::string("@out@/share/") + DATADIR + "/" + MAPS_MENU_FILE); 113 114 if (getenv("HOME")) { 115 AddSep("Maps"); 116 diff --git i/modules/mapview/mapview.cpp w/modules/mapview/mapview.cpp 117 index 997c127..43928bf 100644 118 --- i/modules/mapview/mapview.cpp 119 +++ w/modules/mapview/mapview.cpp 120 @@ -367,7 +367,7 @@ Mapview::load_css(){ 121 if (!style_context) throw Err() << "Mapview: can't get Gtk::StyleContext"; 122 123 try{ 124 - std::string css_glo = std::string("/usr/share/") + DATADIR + "/" + CSS_FILE; 125 + std::string css_glo = std::string("@out@/share/") + DATADIR + "/" + CSS_FILE; 126 if (file_exists(css_glo) && 127 css_provider->load_from_path(css_glo)){ 128 auto screen = get_screen(); 129 diff --git i/modules/vmap2/vmap2gobj.cpp w/modules/vmap2/vmap2gobj.cpp 130 index 4b48cf8..724e444 100644 131 --- i/modules/vmap2/vmap2gobj.cpp 132 +++ w/modules/vmap2/vmap2gobj.cpp 133 @@ -22,7 +22,7 @@ using namespace std; 134 void 135 ms2opt_add_vmap2_render(GetOptSet & opts){ 136 const char *g = "VMAP2_RENDER"; 137 - opts.add("config", 1,'c',g, "Configuration file for vector map rendering. Default: /usr/share/mapsoft2/render.cfg"); 138 + opts.add("config", 1,'c',g, "Configuration file for vector map rendering. Default: @out@/share/mapsoft2/render.cfg"); 139 opts.add("define", 1,0,g, "Definitions for vector map rendering (json object)"); 140 opts.add("obj_scale", 1,0,g, "Rescaling factor for all objects, default 1.0."); 141 opts.add("vmap_minsc", 1,0,g, "Minimum map scale (calculated from the 'natural' " 142 @@ -110,7 +110,7 @@ GObjVMap2::GObjVMap2(VMap2 & map, const Opt &o): GObjMulti(false), map(map) { 143 read_words_defs defs(o.get("define", Opt())); 144 145 int depth = 0; 146 - std::string cfg = opt.get<string>("config", "/usr/share/mapsoft2/render.cfg"); 147 + std::string cfg = opt.get<string>("config", "@out@/share/mapsoft2/render.cfg"); 148 load_conf(cfg, defs, depth); 149 } 150 151 diff --git i/modules/vmap2/vmap2types.cpp w/modules/vmap2/vmap2types.cpp 152 index 6688736..ec77637 100644 153 --- i/modules/vmap2/vmap2types.cpp 154 +++ w/modules/vmap2/vmap2types.cpp 155 @@ -7,12 +7,12 @@ 156 void 157 ms2opt_add_vmap2t(GetOptSet & opts){ 158 const char *g = "VMAP2"; 159 - opts.add("types", 1, 't', g, "File with type information. Default: /usr/share/mapsoft2/types.cfg"); 160 + opts.add("types", 1, 't', g, "File with type information. Default: @out@/share/mapsoft2/types.cfg"); 161 opts.add("define", 1, 'D', g, "Define variables for type information file."); 162 } 163 164 VMap2types::VMap2types(const Opt & o){ 165 - std::string file = o.get("types", "/usr/share/mapsoft2/types.cfg"); 166 + std::string file = o.get("types", "@out@/share/mapsoft2/types.cfg"); 167 if (file == "") return; 168 read_words_defs defs(o.get("define", Opt())); 169 load(file, defs); 170 diff --git i/vmap_data/scripts/vmaps.sh w/vmap_data/scripts/vmaps.sh 171 index 460533a..7591f33 100644 172 --- i/vmap_data/scripts/vmaps.sh 173 +++ w/vmap_data/scripts/vmaps.sh 174 @@ -16,8 +16,8 @@ MAP_ATTR="mapsoft" 175 VMAP_DIR=vmap; # Source folder 176 VMAP_EXT=vmap; # Extension/format of vector maps (could be vmap2, vmap, or even mp) 177 178 -REND_CFG=/usr/share/mapsoft2/render.cfg; # Render configuration 179 -TYPEINFO=/usr/share/mapsoft2/types.cfg # Type information 180 +REND_CFG=@out@/share/mapsoft2/render.cfg; # Render configuration 181 +TYPEINFO=@out@/share/mapsoft2/types.cfg # Type information 182 183 ############################################################ 184 ## Image rendering 185 @@ -46,7 +46,7 @@ TLIST=""; 186 ############################################################ 187 ## IMG rendering (see vmaps_img script) 188 IMG_DIR=OUT; # img files (if empty, img files are not rendered) 189 -TYPSRC=/usr/share/mapsoft2/typ.txt; # typ file source for garmin IMG 190 +TYPSRC=@out@/share/mapsoft2/typ.txt; # typ file source for garmin IMG 191 GMT=gmt; # gmt program 192 CGPSM=cgpsmapper-static # cgpsmapper program 193 IMGMAP=""; # combined img file 194 diff --git i/vmap_data/scripts/vmaps_diff w/vmap_data/scripts/vmaps_diff 195 index 136155e..0aa1ed0 100755 196 --- i/vmap_data/scripts/vmaps_diff 197 +++ w/vmap_data/scripts/vmaps_diff 198 @@ -4,7 +4,7 @@ 199 # Render difference between two git revitions of a file 200 201 # read global configuration and functions 202 -. vmaps.sh ||: 203 +. @out@/bin/vmaps.sh ||: 204 205 # read local configuration 206 . ./vmaps.conf ||: 207 diff --git i/vmap_data/scripts/vmaps_get_fig w/vmap_data/scripts/vmaps_get_fig 208 index 0ba7b7f..5048bcb 100755 209 --- i/vmap_data/scripts/vmaps_get_fig 210 +++ w/vmap_data/scripts/vmaps_get_fig 211 @@ -9,7 +9,7 @@ 212 ################################################## 213 214 # read global configuration and functions 215 -. vmaps.sh ||: 216 +. @out@/bin/vmaps.sh ||: 217 218 # read local configuration 219 . ./vmaps.conf ||: 220 diff --git i/vmap_data/scripts/vmaps_img w/vmap_data/scripts/vmaps_img 221 index 1e0599c..84413bb 100755 222 --- i/vmap_data/scripts/vmaps_img 223 +++ w/vmap_data/scripts/vmaps_img 224 @@ -9,7 +9,7 @@ 225 ################################################## 226 227 # read global configuration and functions 228 -. vmaps.sh ||: 229 +. @out@/bin/vmaps.sh ||: 230 231 # read local configuration 232 . ./vmaps.conf ||: 233 diff --git i/vmap_data/scripts/vmaps_in w/vmap_data/scripts/vmaps_in 234 index 4381dd7..cf9d9d9 100755 235 --- i/vmap_data/scripts/vmaps_in 236 +++ w/vmap_data/scripts/vmaps_in 237 @@ -9,7 +9,7 @@ 238 ################################################## 239 240 # read global configuration and functions 241 -. vmaps.sh ||: 242 +. @out@/bin/vmaps.sh ||: 243 244 # local configuration 245 . ./vmaps.conf ||: 246 diff --git i/vmap_data/scripts/vmaps_index w/vmap_data/scripts/vmaps_index 247 index ae225ec..e59c592 100755 248 --- i/vmap_data/scripts/vmaps_index 249 +++ w/vmap_data/scripts/vmaps_index 250 @@ -4,7 +4,7 @@ 251 ################################################## 252 253 # read global configuration and functions 254 -. vmaps.sh ||: 255 +. @out@/bin/vmaps.sh ||: 256 257 # read local configuration 258 . ./vmaps.conf ||: 259 diff --git i/vmap_data/scripts/vmaps_out w/vmap_data/scripts/vmaps_out 260 index d1d7903..d4d5318 100755 261 --- i/vmap_data/scripts/vmaps_out 262 +++ w/vmap_data/scripts/vmaps_out 263 @@ -18,7 +18,7 @@ 264 ################################################## 265 266 # read global configuration and functions 267 -. vmaps.sh ||: 268 +. @out@/bin/vmaps.sh ||: 269 270 # read local configuration 271 . ./vmaps.conf ||: 272 diff --git i/vmap_data/scripts/vmaps_pack_img w/vmap_data/scripts/vmaps_pack_img 273 index a91fc99..a692600 100755 274 --- i/vmap_data/scripts/vmaps_pack_img 275 +++ w/vmap_data/scripts/vmaps_pack_img 276 @@ -5,7 +5,7 @@ 277 ################################################## 278 279 # read global configuration and functions 280 -. vmaps.sh ||: 281 +. @out@/bin/vmaps.sh ||: 282 283 # read local configuration 284 . ./vmaps.conf ||: 285 diff --git i/vmap_data/scripts/vmaps_pack_mbtiles w/vmap_data/scripts/vmaps_pack_mbtiles 286 index b73121e..da52332 100755 287 --- i/vmap_data/scripts/vmaps_pack_mbtiles 288 +++ w/vmap_data/scripts/vmaps_pack_mbtiles 289 @@ -7,7 +7,7 @@ 290 # see https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md 291 292 # read global configuration and functions 293 -. vmaps.sh ||: 294 +. @out@/bin/vmaps.sh ||: 295 296 # read local configuration 297 . ./vmaps.conf ||: 298 diff --git i/vmap_data/scripts/vmaps_pack_sqlitedb w/vmap_data/scripts/vmaps_pack_sqlitedb 299 index 3dfd676..9b4887b 100755 300 --- i/vmap_data/scripts/vmaps_pack_sqlitedb 301 +++ w/vmap_data/scripts/vmaps_pack_sqlitedb 302 @@ -7,7 +7,7 @@ 303 # see: https://osmand.net/docs/technical/osmand-file-formats/osmand-sqlite/ 304 305 # read global configuration and functions 306 -. vmaps.sh ||: 307 +. @out@/bin/vmaps.sh ||: 308 309 # read local configuration 310 . ./vmaps.conf ||: 311 diff --git i/vmap_data/scripts/vmaps_png w/vmap_data/scripts/vmaps_png 312 index 5fbf71c..f726bdb 100755 313 --- i/vmap_data/scripts/vmaps_png 314 +++ w/vmap_data/scripts/vmaps_png 315 @@ -9,7 +9,7 @@ 316 ################################################## 317 318 # read global configuration and functions 319 -. vmaps.sh ||: 320 +. @out@/bin/vmaps.sh ||: 321 322 # read local configuration 323 . ./vmaps.conf ||: 324 diff --git i/vmap_data/scripts/vmaps_preview w/vmap_data/scripts/vmaps_preview 325 index 1ed94bc..be42a26 100755 326 --- i/vmap_data/scripts/vmaps_preview 327 +++ w/vmap_data/scripts/vmaps_preview 328 @@ -3,7 +3,7 @@ 329 ################################################## 330 331 # read global configuration and functions 332 -. vmaps.sh ||: 333 +. @out@/bin/vmaps.sh ||: 334 335 # read local configuration 336 . ./vmaps.conf ||: 337 diff --git i/vmap_data/scripts/vmaps_rend_mbtiles w/vmap_data/scripts/vmaps_rend_mbtiles 338 index a8ffee0..4809371 100755 339 --- i/vmap_data/scripts/vmaps_rend_mbtiles 340 +++ w/vmap_data/scripts/vmaps_rend_mbtiles 341 @@ -9,7 +9,7 @@ 342 ################################################## 343 344 # read global configuration and functions 345 -. vmaps.sh ||: 346 +. @out@/bin/vmaps.sh ||: 347 348 # read local configuration 349 . ./vmaps.conf ||: 350 diff --git i/vmap_data/scripts/vmaps_tiles w/vmap_data/scripts/vmaps_tiles 351 index fc45eab..3a06f66 100755 352 --- i/vmap_data/scripts/vmaps_tiles 353 +++ w/vmap_data/scripts/vmaps_tiles 354 @@ -9,7 +9,7 @@ 355 ################################################## 356 357 # read global configuration and functions 358 -. vmaps.sh ||: 359 +. @out@/bin/vmaps.sh ||: 360 361 # read local configuration 362 . ./vmaps.conf ||: 363 diff --git i/vmap_data/scripts/vmaps_tlist w/vmap_data/scripts/vmaps_tlist 364 index 6aff657..1b7df8c 100755 365 --- i/vmap_data/scripts/vmaps_tlist 366 +++ w/vmap_data/scripts/vmaps_tlist 367 @@ -3,7 +3,7 @@ 368 # Create list of tiles 369 370 # read global configuration and functions 371 -. vmaps.sh ||: 372 +. @out@/bin/vmaps.sh ||: 373 374 # read local configuration 375 . ./vmaps.conf ||: 376 diff --git i/vmap_data/scripts/vmaps_wp_update w/vmap_data/scripts/vmaps_wp_update 377 index 24df3c1..5252dd0 100755 378 --- i/vmap_data/scripts/vmaps_wp_update 379 +++ w/vmap_data/scripts/vmaps_wp_update 380 @@ -25,7 +25,7 @@ 381 ################################################## 382 383 # read global configuration and functions 384 -. vmaps.sh ||: 385 +. @out@/bin/vmaps.sh ||: 386 387 # read local configuration 388 . ./vmaps.conf ||: