Package: cataclysm-dda / 0.C+git20190228.faafa3a-2

datadir_path.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Author: Reiner Herrmann <reiner@reiner-h.de>
Description: Change data dir to /usr/share/games

--- a/src/path_info.cpp
+++ b/src/path_info.cpp
@@ -124,7 +124,7 @@
     // Special: data_dir lua_dir and gfx_dir
     if( !FILENAMES["base_path"].empty() ) {
 #ifdef DATA_DIR_PREFIX
-        update_pathname( "datadir", FILENAMES["base_path"] + "share/cataclysm-dda/" );
+        update_pathname( "datadir", FILENAMES["base_path"] + "share/games/cataclysm-dda/" );
         update_pathname( "gfxdir", FILENAMES["datadir"] + "gfx/" );
         update_pathname( "luadir", FILENAMES["datadir"] + "lua/" );
 #else
--- a/Makefile
+++ b/Makefile
@@ -853,8 +853,8 @@
 bindist: $(BINDIST)
 
 ifeq ($(TARGETSYSTEM), LINUX)
-DATA_PREFIX=$(DESTDIR)$(PREFIX)/share/cataclysm-dda/
-BIN_PREFIX=$(DESTDIR)$(PREFIX)/bin
+DATA_PREFIX=$(DESTDIR)$(PREFIX)/share/games/cataclysm-dda/
+BIN_PREFIX=$(DESTDIR)$(PREFIX)/games
 LOCALE_DIR=$(DESTDIR)$(PREFIX)/share/locale
 install: version $(TARGET)
 	mkdir -p $(DATA_PREFIX)
--- a/lua/autoexec.lua
+++ b/lua/autoexec.lua
@@ -1,7 +1,7 @@
 --dofile("./class_definitions.lua")
 
 package.path = package.path .. ";./lua/?.lua" --Windows/Linux
-package.path = package.path .. ";/usr/share/cataclysm-dda/lua/?.lua" --Linux(via make install)
+package.path = package.path .. ";/usr/share/games/cataclysm-dda/lua/?.lua" --Linux(via make install)
 package.path = package.path .. ";/storage/emulated/0/Android/data/com.cleverraven.cataclysmdda/files/lua/?.lua" --Android
 package.path = package.path .. ";/storage/sdcard/Android/data/com.cleverraven.cataclysmdda/files/lua/?.lua" --Android (SD Card)
 package.path = package.path .. ";/storage/sdcard0/Android/data/com.cleverraven.cataclysmdda/files/lua/?.lua" --Android (SD Card 0)