summaryrefslogtreecommitdiff
path: root/desktop/vwm/patches/paths.diff
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/vwm/patches/paths.diff')
-rw-r--r--desktop/vwm/patches/paths.diff90
1 files changed, 90 insertions, 0 deletions
diff --git a/desktop/vwm/patches/paths.diff b/desktop/vwm/patches/paths.diff
new file mode 100644
index 0000000000..486135ebff
--- /dev/null
+++ b/desktop/vwm/patches/paths.diff
@@ -0,0 +1,90 @@
+diff -Naur vwm.orig/Makefile vwm/Makefile
+--- vwm.orig/Makefile 2009-10-20 15:57:55.000000000 -0400
++++ vwm/Makefile 2017-08-25 17:11:58.787940216 -0400
+@@ -8,8 +8,8 @@
+ headerdir = ${prefix}/include
+ includedir = -I${headerdir} -I./
+ bindir = ${prefix}/bin
+-moddir = /usr/lib/vwm/modules
+-moddir_wide = /usr/lib/vwm/modules_wide
++moddir = ${libdir}/vwm/modules
++moddir_wide = ${libdir}/vwm/modules_wide
+
+ makefile: all
+
+@@ -24,7 +24,7 @@
+ gcc $(CFLAGS) $(DEFS) $(WLIBS) $(PKG_CFG) $(includedir) -D_VIPER_WIDE *.c -o vwm_wide
+
+ vwm:
+- gcc $(CFLAGS) $(DEFS) $(LIBS) $(PKG_CFG) $(includdir) *.c -o vwm
++ gcc $(CFLAGS) $(DEFS) $(LIBS) $(PKG_CFG) $(includedir) *.c -o vwm
+
+ vwmterm:
+ cd modules/vwmterm3 && $(MAKE)
+@@ -45,9 +45,10 @@
+ rm -f vwm_wide.h
+
+ install:
+- mkdir -p $(moddir)
++ mkdir -p $(moddir) $(bindir) $(headerdir) $(libdir)
+ chmod 644 vwm.h
+ cp -f vwm.h $(headerdir)
++ strip vwm
+ chmod 755 vwm
+ cp -f vwm $(bindir)
+ cd modules/vwmterm3 && $(MAKE) install
+diff -Naur vwm.orig/modules/sysmon/Makefile vwm/modules/sysmon/Makefile
+--- vwm.orig/modules/sysmon/Makefile 2009-06-23 14:41:32.000000000 -0400
++++ vwm/modules/sysmon/Makefile 2017-08-25 17:12:41.742937932 -0400
+@@ -4,8 +4,8 @@
+ libdir = ${prefix}/lib
+ includedir = ${prefix}/include -I../..
+ bindir = ${prefix}/bin
+-moddir = /usr/lib/vwm/modules
+-moddir_wide = /usr/lib/vwm/modules_wide
++moddir = ${libdir}/vwm/modules
++moddir_wide = ${libdir}/vwm/modules_wide
+
+ makefile: all
+
+diff -Naur vwm.orig/modules/vwmterm3/Makefile vwm/modules/vwmterm3/Makefile
+--- vwm.orig/modules/vwmterm3/Makefile 2009-10-20 16:02:05.000000000 -0400
++++ vwm/modules/vwmterm3/Makefile 2017-08-25 17:11:25.953941962 -0400
+@@ -2,11 +2,11 @@
+ PKG_CFG = `pkg-config --cflags glib-2.0 gmodule-2.0`
+ DEFS = -D_REENTRANT -D_GNU_SOURCE
+ prefix = /usr/local
+-libdir = ${prefix}/lib
++libdir = ${prefix}/lib${arch}
+ includedir = -I${prefix}/include -I../..
+ bindir = ${prefix}/bin
+-moddir = /usr/lib/vwm/modules
+-moddir_wide = /usr/lib/vwm/modules_wide
++moddir = ${libdir}/vwm/modules
++moddir_wide = ${libdir}/vwm/modules_wide
+
+ makefile: all
+
+diff -Naur vwm.orig/vwm.h vwm/vwm.h
+--- vwm.orig/vwm.h 2009-11-04 17:10:01.000000000 -0500
++++ vwm/vwm.h 2017-08-25 17:16:32.528925658 -0400
+@@ -22,11 +22,17 @@
+ #define _VWM_SCREENSAVER_TIMEOUT 5
+ #endif
+
++#ifdef __amd64__
++#define LIBDIRSUFFIX "64"
++#else
++#define LIBDIRSUFFIX ""
++#endif
++
+ #ifndef _VWM_SHARED_MODULES
+ #ifdef _VIPER_WIDE
+-#define _VWM_SHARED_MODULES "/usr/lib/vwm/modules_wide/"
++#define _VWM_SHARED_MODULES "/usr/lib" LIBDIRSUFFIX "/vwm/modules_wide/"
+ #else
+-#define _VWM_SHARED_MODULES "/usr/lib/vwm/modules/"
++#define _VWM_SHARED_MODULES "/usr/lib" LIBDIRSUFFIX "/vwm/modules/"
+ #endif
+ #endif
+