at 18.03-beta 70 lines 2.6 kB view raw
1diff -ru slim-1.3.6-orig/app.cpp slim-1.3.6/app.cpp 2--- slim-1.3.6-orig/app.cpp 2013-10-02 00:38:05.000000000 +0200 3+++ slim-1.3.6/app.cpp 2014-03-30 19:01:04.115414201 +0200 4@@ -200,7 +200,9 @@ 5 6 /* Read configuration and theme */ 7 cfg = new Cfg; 8- cfg->readConf(CFGFILE); 9+ char *cfgfile = getenv("SLIM_CFGFILE"); 10+ if (!cfgfile) cfgfile = CFGFILE; 11+ cfg->readConf(cfgfile); 12 string themebase = ""; 13 string themefile = ""; 14 string themedir = ""; 15@@ -208,7 +210,9 @@ 16 if (testing) { 17 themeName = testtheme; 18 } else { 19- themebase = string(THEMESDIR) + "/"; 20+ char *themesdir = getenv("SLIM_THEMESDIR"); 21+ if (!themesdir) themesdir = THEMESDIR; 22+ themebase = string(themesdir) + "/"; 23 themeName = cfg->getOption("current_theme"); 24 string::size_type pos; 25 if ((pos = themeName.find(",")) != string::npos) { 26diff -ru slim-1.3.6-orig/CMakeLists.txt slim-1.3.6/CMakeLists.txt 27--- slim-1.3.6-orig/CMakeLists.txt 2013-10-02 00:38:05.000000000 +0200 28+++ slim-1.3.6/CMakeLists.txt 2014-03-30 19:16:48.445069729 +0200 29@@ -23,7 +23,7 @@ 30 31 set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation Directory") 32 set(PKGDATADIR "${CMAKE_INSTALL_PREFIX}/share/slim") 33-set(SYSCONFDIR "/etc") 34+set(SYSCONFDIR "$ENV{out}/etc") 35 set(LIBDIR "/lib") 36 set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man") 37 38@@ -40,7 +40,7 @@ 39 set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DPACKAGE=\"slim\"") 40 set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DVERSION=\"${SLIM_VERSION}\"") 41 set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DPKGDATADIR=\"${PKGDATADIR}\"") 42-set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DSYSCONFDIR=\"${SYSCONFDIR}\"") 43+set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DSYSCONFDIR=\"/etc\"") 44 45 # Flags 46 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -O2") 47Only in slim-1.3.6: CMakeLists.txt~ 48diff -ru slim-1.3.6-orig/slimlock.cpp slim-1.3.6/slimlock.cpp 49--- slim-1.3.6-orig/slimlock.cpp 2013-10-02 00:38:05.000000000 +0200 50+++ slim-1.3.6/slimlock.cpp 2014-03-30 19:01:04.115414201 +0200 51@@ -106,13 +106,17 @@ 52 unsigned int cfg_passwd_timeout; 53 // Read user's current theme 54 cfg = new Cfg; 55- cfg->readConf(CFGFILE); 56+ char *cfgfile = getenv("SLIM_CFGFILE"); 57+ if (!cfgfile) cfgfile = CFGFILE; 58+ cfg->readConf(cfgfile); 59 cfg->readConf(SLIMLOCKCFG); 60 string themebase = ""; 61 string themefile = ""; 62 string themedir = ""; 63 themeName = ""; 64- themebase = string(THEMESDIR) + "/"; 65+ char *themesdir = getenv("SLIM_THEMESDIR"); 66+ if (!themesdir) themesdir = THEMESDIR; 67+ themebase = string(themesdir) + "/"; 68 themeName = cfg->getOption("current_theme"); 69 string::size_type pos; 70 if ((pos = themeName.find(",")) != string::npos) {