From 46dd8d7362507339b0c573d32a8026599a861a08 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 29 Aug 2016 21:03:37 -0400 Subject: x11-plugins/gkwebmon: new EAPI=6 revision that respects LDFLAGS. This new revision is based on the ebuild submitted by Michael Mair-Keimberger, updated for EAPI=6. The Makefile patch was rewritten; a lot was simplified by simply appending to the implicit variables CFLAGS, CPPFLAGS, LDFLAGS, and LDLIBS. The build system should now respect all of those. A missing dependency on dev-libs/openssl was added based on -lssl being present in LDLIBS. The ebuild was also keyworded ~amd64, since that's what I tested on. Gentoo-Bug: 334761 Package-Manager: portage-2.2.28 --- .../gkwebmon/files/respect-cc-cflags-ldflags.patch | 48 ++++++++++++++++++++++ x11-plugins/gkwebmon/gkwebmon-0.2-r1.ebuild | 28 +++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 x11-plugins/gkwebmon/files/respect-cc-cflags-ldflags.patch create mode 100644 x11-plugins/gkwebmon/gkwebmon-0.2-r1.ebuild (limited to 'x11-plugins') diff --git a/x11-plugins/gkwebmon/files/respect-cc-cflags-ldflags.patch b/x11-plugins/gkwebmon/files/respect-cc-cflags-ldflags.patch new file mode 100644 index 000000000000..7b3ee50f5321 --- /dev/null +++ b/x11-plugins/gkwebmon/files/respect-cc-cflags-ldflags.patch @@ -0,0 +1,48 @@ +From ef7dcbf8495d03c8cf96d4fb30adf38b15e1ca74 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky +Date: Mon, 29 Aug 2016 20:44:45 -0400 +Subject: [PATCH 1/1] Clean up variable usage in Makefile to support LDFLAGS + and friends. + +--- + Makefile | 18 +++++++----------- + 1 file changed, 7 insertions(+), 11 deletions(-) + +diff --git a/Makefile b/Makefile +index b422e79..d89977f 100644 +--- a/Makefile ++++ b/Makefile +@@ -3,23 +3,19 @@ + + PLUGIN_DIR = /usr/local/lib/gkrellm2/plugins + +-GTK_INCLUDE = `pkg-config gtk+-2.0 --cflags` +-GTK_LIB = `pkg-config gtk+-2.0 --libs` ++GTK_INCLUDE = $(shell pkg-config gtk+-2.0 --cflags) ++GTK_LIB = $(shell pkg-config gtk+-2.0 --libs) + + +-#FLAGS = -O2 -Wall -fPIC -std=c99 -pedantic $(GTK_INCLUDE) +-FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE) +-LIBS = $(GTK_LIB) +- +-LFLAGS = -shared -lssl -lpthread +- +-CC = gcc $(CFLAGS) $(FLAGS) +-#CC = gcc -DDEBUG $(CFLAGS) $(FLAGS) ++CFLAGS += -Wall -fPIC ++CPPFLAGS += $(GTK_INCLUDE) ++LDLIBS += $(GTK_LIB) -lssl -lpthread ++LDFLAGS += -shared + + OBJS = webmon.o gk.o + + gkwebmon.so: $(OBJS) +- $(CC) $(OBJS) -o gkwebmon.so $(LFLAGS) $(LIBS) ++ $(CC) $(OBJS) -o $(@) $(LDFLAGS) $(LDLIBS) + + install: gkwebmon.so + install gkwebmon.so $(PLUGIN_DIR) +-- +2.7.3 + diff --git a/x11-plugins/gkwebmon/gkwebmon-0.2-r1.ebuild b/x11-plugins/gkwebmon/gkwebmon-0.2-r1.ebuild new file mode 100644 index 000000000000..74b08adf9bef --- /dev/null +++ b/x11-plugins/gkwebmon/gkwebmon-0.2-r1.ebuild @@ -0,0 +1,28 @@ +# 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="A web monitor plugin for GKrellM2" +HOMEPAGE="http://${PN}.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" +IUSE="" + +# The Makefile links with -lssl. +COMMON_DEPEND="dev-libs/openssl:0" + +DEPEND+=" ${COMMON_DEPEND}" +RDEPEND+=" ${COMMON_DEPEND}" + +PATCHES=( "${FILESDIR}/respect-cc-cflags-ldflags.patch" ) + +src_compile() { + emake CC="$(tc-getCC)" +} -- cgit v1.2.3-65-gdbad