opt/spectrwm/spectrwm-remove_libswmhack.patch

52 lines
1.7 KiB
Diff

diff -Nru spectrwm-3.0.2.orig/linux/Makefile spectrwm-3.0.2/linux/Makefile
--- spectrwm-3.0.2.orig/linux/Makefile 2016-05-24 11:53:05.831647479 +0200
+++ spectrwm-3.0.2/linux/Makefile 2016-05-24 11:57:34.912071921 +0200
@@ -10,14 +10,14 @@
LIBMAJORVERSION = $(shell . $(CURDIR)/../lib/shlib_version; echo $$major)
MAINT_CFLAGS = -std=c99 -Wmissing-prototypes -Wall -Wextra -Wshadow -Wno-uninitialized -g
-MAINT_CPPFLAGS = -D_GNU_SOURCE -I. -I/usr/include/freetype2 -DSWM_LIB=\"$(LIBDIR)/libswmhack.so.$(LIBVERSION)\"
+MAINT_CPPFLAGS = -D_GNU_SOURCE -I. -I/usr/include/freetype2
MAINT_LDLIBS = -lX11 -lX11-xcb -lxcb -lxcb-icccm -lxcb-randr -lxcb-keysyms -lxcb-util -lxcb-xtest -lXft -lXcursor
ifneq ("${BUILDVERSION}", "")
MAINT_CPPFLAGS += -DSPECTRWM_BUILDSTR=\"$(BUILDVERSION)\"
endif
-all: spectrwm libswmhack.so.$(LIBVERSION)
+all: spectrwm
spectrwm: spectrwm.o linux.o
$(CC) $(MAINT_LDFLAGS) $(LDFLAGS) -o $@ $+ $(MAINT_LDLIBS) $(LDLIBS)
diff -Nru spectrwm-3.0.2.orig/spectrwm.c spectrwm-3.0.2/spectrwm.c
--- spectrwm-3.0.2.orig/spectrwm.c 2016-05-24 11:53:05.831647479 +0200
+++ spectrwm-3.0.2/spectrwm.c 2016-05-24 11:57:03.713195913 +0200
@@ -273,9 +273,9 @@
#define SWM_CONF_DEFAULT (0)
#define SWM_CONF_KEYMAPPING (1)
-#ifndef SWM_LIB
+/* #ifndef SWM_LIB
#define SWM_LIB "/usr/local/lib/libswmhack.so"
-#endif
+#endif */
char **start_argv;
xcb_atom_t a_state;
@@ -3712,6 +3712,7 @@
close(xcb_get_file_descriptor(conn));
+ /*
if ((ret = getenv("LD_PRELOAD"))) {
if (asprintf(&ret, "%s:%s", SWM_LIB, ret) == -1) {
warn("spawn: asprintf LD_PRELOAD");
@@ -3722,6 +3723,7 @@
} else {
setenv("LD_PRELOAD", SWM_LIB, 1);
}
+ */
if (asprintf(&ret, "%d", ws_idx) == -1) {
warn("spawn: asprintf SWM_WS");