summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-plugins/i8krellm/files/i8krellm-2.5-r3-makefile-fixes.patch')
-rw-r--r--x11-plugins/i8krellm/files/i8krellm-2.5-r3-makefile-fixes.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/x11-plugins/i8krellm/files/i8krellm-2.5-r3-makefile-fixes.patch b/x11-plugins/i8krellm/files/i8krellm-2.5-r3-makefile-fixes.patch
new file mode 100644
index 000000000000..154c4f293179
--- /dev/null
+++ b/x11-plugins/i8krellm/files/i8krellm-2.5-r3-makefile-fixes.patch
@@ -0,0 +1,42 @@
+Respect user's pkg-config, don't call gcc directly, respect CFLAGS
+--- a/Makefile
++++ b/Makefile
+@@ -8,14 +8,14 @@ LFLAGS += $(LDFLAGS)
+
+ ## Support for GKrellM 2.0
+ #
+-GTK2_INCLUDE = `pkg-config gtk+-2.0 --cflags`
+-GTK2_LIB = `pkg-config gtk+-2.0 --libs`
++PKG_CONFIG ?= pkg-config
++GTK2_INCLUDE = $(shell ${PKG_CONFIG} gtk+-2.0 --cflags)
++GTK2_LIB = $(shell ${PKG_CONFIG} gtk+-2.0 --libs)
+ SINSTALLDIR2 = /usr/share/gkrellm2/plugins
+ UINSTALLDIR2 = $(HOME)/.gkrellm2/plugins
+-FLAGS2 = -O2 -Wall -fPIC -I. $(GTK2_INCLUDE)
++FLAGS2 = -fPIC -I. $(GTK2_INCLUDE)
+ LIBS2 = $(GTK2_LIB)
+-CC2 = gcc $(FLAGS2) -DGKRELLM2
+-CC2F = gcc $(FLAGS2) -DFAKE -DGKRELLM2
++CC = $(CC)
+ OBJS2 = i8krellm.o
+
+ # seems to barf without the @echo....
+@@ -23,14 +23,14 @@ i8krellm: i8krellm.so
+ @echo ""
+
+ i8krellm.so: $(OBJS2)
+- $(CC2) $(OBJS2) -o i8krellm.so $(LFLAGS) $(LIBS2)
++ $(CC) $(CFLAGS) $(CFLAGS) $(FLAGS2) -DGKRELLM2 $(OBJS2) -o i8krellm.so $(LFLAGS) $(LIBS2)
+
+ fake: i8krellm.c prop-anim.xpm
+- $(CC2F) -c -o i8krellm.o i8krellm.c
+- $(CC2F) $(OBJS2) -o i8krellm.so $(LFLAGS) $(LIBS2)
++ $(CC) $(CFLAGS) $(FLAGS2) -DFAKE -DGKRELLM2 -c -o i8krellm.o i8krellm.c
++ $(CC) $(CFLAGS) $(FLAGS2) -DFAKE -DGKRELLM2 $(OBJS2) -o i8krellm.so $(LFLAGS) $(LIBS2)
+
+ i8krellm.o: i8krellm.c prop-anim.xpm
+- $(CC2) -c -o i8krellm.o i8krellm.c
++ $(CC) $(CFLAGS) $(FLAGS2) -DGKRELLM2 -c -o i8krellm.o i8krellm.c
+
+ site_install: i8krellm.so
+ install -c -s -m 644 i8krellm.so $(SINSTALLDIR2)