blob: 5a8e07bfbf07e3d137661bf9c10925997416c3c8 (
plain) (
blame)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
diff -ru slim-1.3.6-orig/app.cpp slim-1.3.6/app.cpp
--- slim-1.3.6-orig/app.cpp 2013-10-02 00:38:05.000000000 +0200
+++ slim-1.3.6/app.cpp 2014-03-30 19:01:04.115414201 +0200
@@ -200,7 +200,9 @@
/* Read configuration and theme */
cfg = new Cfg;
- cfg->readConf(CFGFILE);
+ char *cfgfile = getenv("SLIM_CFGFILE");
+ if (!cfgfile) cfgfile = CFGFILE;
+ cfg->readConf(cfgfile);
string themebase = "";
string themefile = "";
string themedir = "";
@@ -208,7 +210,9 @@
if (testing) {
themeName = testtheme;
} else {
- themebase = string(THEMESDIR) + "/";
+ char *themesdir = getenv("SLIM_THEMESDIR");
+ if (!themesdir) themesdir = THEMESDIR;
+ themebase = string(themesdir) + "/";
themeName = cfg->getOption("current_theme");
string::size_type pos;
if ((pos = themeName.find(",")) != string::npos) {
diff -ru slim-1.3.6-orig/CMakeLists.txt slim-1.3.6/CMakeLists.txt
--- slim-1.3.6-orig/CMakeLists.txt 2013-10-02 00:38:05.000000000 +0200
+++ slim-1.3.6/CMakeLists.txt 2014-03-30 19:16:48.445069729 +0200
@@ -23,7 +23,7 @@
set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation Directory")
set(PKGDATADIR "${CMAKE_INSTALL_PREFIX}/share/slim")
-set(SYSCONFDIR "/etc")
+set(SYSCONFDIR "$ENV{out}/etc")
set(LIBDIR "/lib")
set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")
@@ -40,7 +40,7 @@
set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DPACKAGE=\"slim\"")
set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DVERSION=\"${SLIM_VERSION}\"")
set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DPKGDATADIR=\"${PKGDATADIR}\"")
-set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DSYSCONFDIR=\"${SYSCONFDIR}\"")
+set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DSYSCONFDIR=\"/etc\"")
# Flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -O2")
Only in slim-1.3.6: CMakeLists.txt~
diff -ru slim-1.3.6-orig/slimlock.cpp slim-1.3.6/slimlock.cpp
--- slim-1.3.6-orig/slimlock.cpp 2013-10-02 00:38:05.000000000 +0200
+++ slim-1.3.6/slimlock.cpp 2014-03-30 19:01:04.115414201 +0200
@@ -106,13 +106,17 @@
unsigned int cfg_passwd_timeout;
// Read user's current theme
cfg = new Cfg;
- cfg->readConf(CFGFILE);
+ char *cfgfile = getenv("SLIM_CFGFILE");
+ if (!cfgfile) cfgfile = CFGFILE;
+ cfg->readConf(cfgfile);
cfg->readConf(SLIMLOCKCFG);
string themebase = "";
string themefile = "";
string themedir = "";
themeName = "";
- themebase = string(THEMESDIR) + "/";
+ char *themesdir = getenv("SLIM_THEMESDIR");
+ if (!themesdir) themesdir = THEMESDIR;
+ themebase = string(themesdir) + "/";
themeName = cfg->getOption("current_theme");
string::size_type pos;
if ((pos = themeName.find(",")) != string::npos) {
|