public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: x11-plugins/gkrellfire/, x11-plugins/gkrellfire/files/
@ 2016-08-26 12:59 Michael Orlitzky
  0 siblings, 0 replies; only message in thread
From: Michael Orlitzky @ 2016-08-26 12:59 UTC (permalink / raw
  To: gentoo-commits

commit:     aaa3c4fb5ccab0619199d091a8bbf6b323a443ad
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 26 12:56:23 2016 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Aug 26 12:56:23 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aaa3c4fb

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

 .../files/fix-CC-CFLAGS-LDFLAGS-handling.patch     | 69 ++++++++++++++++++++++
 x11-plugins/gkrellfire/gkrellfire-0.4.2-r1.ebuild  | 25 ++++++++
 2 files changed, 94 insertions(+)

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 00000000..120f459
--- /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
+

diff --git a/x11-plugins/gkrellfire/gkrellfire-0.4.2-r1.ebuild b/x11-plugins/gkrellfire/gkrellfire-0.4.2-r1.ebuild
new file mode 100644
index 00000000..a05889e
--- /dev/null
+++ b/x11-plugins/gkrellfire/gkrellfire-0.4.2-r1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit gkrellm-plugin toolchain-funcs
+
+DESCRIPTION="CPU load flames for GKrellM 2"
+HOMEPAGE="http://people.freenet.de/thomas-steinke"
+SRC_URI="ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="app-admin/gkrellm[X]"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}/fix-CC-CFLAGS-LDFLAGS-handling.patch" )
+
+src_compile() {
+	emake CC="$(tc-getCC)"
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-26 12:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-26 12:59 [gentoo-commits] repo/gentoo:master commit in: x11-plugins/gkrellfire/, x11-plugins/gkrellfire/files/ Michael Orlitzky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox