summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2016-08-26 08:56:23 -0400
committerMichael Orlitzky <mjo@gentoo.org>2016-08-26 08:56:23 -0400
commitaaa3c4fb5ccab0619199d091a8bbf6b323a443ad (patch)
tree602090db8a0d4ee1f91531333040452e09d5e47a /x11-plugins/gkrellfire/files
parentwww-apache/mod_perl: x86 stable, bug #548932 (diff)
downloadgentoo-aaa3c4fb5ccab0619199d091a8bbf6b323a443ad.tar.gz
gentoo-aaa3c4fb5ccab0619199d091a8bbf6b323a443ad.tar.bz2
gentoo-aaa3c4fb5ccab0619199d091a8bbf6b323a443ad.zip
x11-plugins/gkrellfire: new revision fixing CC and *FLAGS handling.
This new revision updates the ebuild to EAPI=6, and adds a patch that rewrites the Makefile. The inspiration for the patch, and the new ebuild itself were submitted by user Michael Mair-Keimberger. In addition to fixing the CC, CFLAGS, and LDFLAGS handling, the new ebuild adds a USE dependency on app-admin/gkrellm[X], which, in the old EAPI, had to crash the eclass. Gentoo-Bug: 335033 Package-Manager: portage-2.2.28
Diffstat (limited to 'x11-plugins/gkrellfire/files')
-rw-r--r--x11-plugins/gkrellfire/files/fix-CC-CFLAGS-LDFLAGS-handling.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/x11-plugins/gkrellfire/files/fix-CC-CFLAGS-LDFLAGS-handling.patch b/x11-plugins/gkrellfire/files/fix-CC-CFLAGS-LDFLAGS-handling.patch
new file mode 100644
index 000000000000..120f459587ba
--- /dev/null
+++ b/x11-plugins/gkrellfire/files/fix-CC-CFLAGS-LDFLAGS-handling.patch
@@ -0,0 +1,69 @@
+From 822bb45acf93b63e59071903aad842a3dd92a915 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 26 Aug 2016 08:43:12 -0400
+Subject: [PATCH 1/1] Rewrite the Makefile to fix CC, CFLAGS, and LDFLAGS
+ support.
+
+The existing Makefile did not allow the user to set CC, CFLAGS, or
+LDFLAGS (or at least, they were ignored). This was fixed somewhat
+easily by deleting most of the Makefile, and by appending the
+necessary flags to CFLAGS and LDFLAGS. The installation target didn't
+do the right thing anyway, so it has been removed.
+
+The resulting Makefile is probably only useful on Gentoo, but upstream
+is long gone so maybe that's not a problem.
+
+Gentoo-Bug: 335033
+---
+ Makefile | 34 +++++-----------------------------
+ 1 file changed, 5 insertions(+), 29 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 7916cab..43a0527 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,36 +1,12 @@
+ GTK_INCLUDE = `pkg-config gtk+-2.0 --cflags`
+ GTK_LIB = `pkg-config gtk+-2.0 --libs`
+
+-INSTALLDIR = /usr/lib/gkrellm2/plugins
+-
+-FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE)
++CFLAGS += -fPIC $(GTK_INCLUDE)
+ LIBS = $(GTK_LIB)
+-LFLAGS = -shared
+-
+-CC = gcc
+-
+-OBJS = gkrellfire.o
+-
+-all: gkrellfire.so
+-
+-%.o: %.c
+- $(CC) $(CFLAGS) $(FLAGS) -c -o $@ $<
++LDFLAGS += -shared
+
+-
+-gkrellfire.so: $(OBJS)
+- $(CC) $(CFLAGS) $(OBJS) -o gkrellfire.so $(LFLAGS) $(LIBS)
++gkrellfire.so: gkrellfire.o
++ $(CC) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS) $(LIBS)
+
+ clean:
+- rm -f *.o core *.so* *.bak *~
+-
+-gkrellfire.o: gkrellfire.c
+-
+-install:
+- if [ -d $(INSTALLDIR) ] ; then \
+- install -c -s -m 644 gkrellfire.so $(INSTALLDIR) ; \
+- else \
+- install -D -c -s -m 644 gkrellfire.so $(INSTALLDIR)/gkrellfire.so ; \
+- fi
+-
+-uninstall:
+- rm -f $(INSTALLDIR)/gkrellfire.so
++ rm -f gkrellfire.*o
+--
+2.7.3
+