1 |
commit: 46dd8d7362507339b0c573d32a8026599a861a08 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 30 01:03:37 2016 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 30 01:05:26 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46dd8d73 |
7 |
|
8 |
x11-plugins/gkwebmon: new EAPI=6 revision that respects LDFLAGS. |
9 |
|
10 |
This new revision is based on the ebuild submitted by Michael |
11 |
Mair-Keimberger, updated for EAPI=6. The Makefile patch was rewritten; |
12 |
a lot was simplified by simply appending to the implicit variables |
13 |
CFLAGS, CPPFLAGS, LDFLAGS, and LDLIBS. The build system should now |
14 |
respect all of those. |
15 |
|
16 |
A missing dependency on dev-libs/openssl was added based on -lssl |
17 |
being present in LDLIBS. The ebuild was also keyworded ~amd64, since |
18 |
that's what I tested on. |
19 |
|
20 |
Gentoo-Bug: 334761 |
21 |
|
22 |
Package-Manager: portage-2.2.28 |
23 |
|
24 |
.../gkwebmon/files/respect-cc-cflags-ldflags.patch | 48 ++++++++++++++++++++++ |
25 |
x11-plugins/gkwebmon/gkwebmon-0.2-r1.ebuild | 28 +++++++++++++ |
26 |
2 files changed, 76 insertions(+) |
27 |
|
28 |
diff --git a/x11-plugins/gkwebmon/files/respect-cc-cflags-ldflags.patch b/x11-plugins/gkwebmon/files/respect-cc-cflags-ldflags.patch |
29 |
new file mode 100644 |
30 |
index 00000000..7b3ee50 |
31 |
--- /dev/null |
32 |
+++ b/x11-plugins/gkwebmon/files/respect-cc-cflags-ldflags.patch |
33 |
@@ -0,0 +1,48 @@ |
34 |
+From ef7dcbf8495d03c8cf96d4fb30adf38b15e1ca74 Mon Sep 17 00:00:00 2001 |
35 |
+From: Michael Orlitzky <michael@××××××××.com> |
36 |
+Date: Mon, 29 Aug 2016 20:44:45 -0400 |
37 |
+Subject: [PATCH 1/1] Clean up variable usage in Makefile to support LDFLAGS |
38 |
+ and friends. |
39 |
+ |
40 |
+--- |
41 |
+ Makefile | 18 +++++++----------- |
42 |
+ 1 file changed, 7 insertions(+), 11 deletions(-) |
43 |
+ |
44 |
+diff --git a/Makefile b/Makefile |
45 |
+index b422e79..d89977f 100644 |
46 |
+--- a/Makefile |
47 |
++++ b/Makefile |
48 |
+@@ -3,23 +3,19 @@ |
49 |
+ |
50 |
+ PLUGIN_DIR = /usr/local/lib/gkrellm2/plugins |
51 |
+ |
52 |
+-GTK_INCLUDE = `pkg-config gtk+-2.0 --cflags` |
53 |
+-GTK_LIB = `pkg-config gtk+-2.0 --libs` |
54 |
++GTK_INCLUDE = $(shell pkg-config gtk+-2.0 --cflags) |
55 |
++GTK_LIB = $(shell pkg-config gtk+-2.0 --libs) |
56 |
+ |
57 |
+ |
58 |
+-#FLAGS = -O2 -Wall -fPIC -std=c99 -pedantic $(GTK_INCLUDE) |
59 |
+-FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE) |
60 |
+-LIBS = $(GTK_LIB) |
61 |
+- |
62 |
+-LFLAGS = -shared -lssl -lpthread |
63 |
+- |
64 |
+-CC = gcc $(CFLAGS) $(FLAGS) |
65 |
+-#CC = gcc -DDEBUG $(CFLAGS) $(FLAGS) |
66 |
++CFLAGS += -Wall -fPIC |
67 |
++CPPFLAGS += $(GTK_INCLUDE) |
68 |
++LDLIBS += $(GTK_LIB) -lssl -lpthread |
69 |
++LDFLAGS += -shared |
70 |
+ |
71 |
+ OBJS = webmon.o gk.o |
72 |
+ |
73 |
+ gkwebmon.so: $(OBJS) |
74 |
+- $(CC) $(OBJS) -o gkwebmon.so $(LFLAGS) $(LIBS) |
75 |
++ $(CC) $(OBJS) -o $(@) $(LDFLAGS) $(LDLIBS) |
76 |
+ |
77 |
+ install: gkwebmon.so |
78 |
+ install gkwebmon.so $(PLUGIN_DIR) |
79 |
+-- |
80 |
+2.7.3 |
81 |
+ |
82 |
|
83 |
diff --git a/x11-plugins/gkwebmon/gkwebmon-0.2-r1.ebuild b/x11-plugins/gkwebmon/gkwebmon-0.2-r1.ebuild |
84 |
new file mode 100644 |
85 |
index 00000000..74b08ad |
86 |
--- /dev/null |
87 |
+++ b/x11-plugins/gkwebmon/gkwebmon-0.2-r1.ebuild |
88 |
@@ -0,0 +1,28 @@ |
89 |
+# Copyright 1999-2016 Gentoo Foundation |
90 |
+# Distributed under the terms of the GNU General Public License v2 |
91 |
+# $Id$ |
92 |
+ |
93 |
+EAPI=6 |
94 |
+ |
95 |
+inherit gkrellm-plugin toolchain-funcs |
96 |
+ |
97 |
+DESCRIPTION="A web monitor plugin for GKrellM2" |
98 |
+HOMEPAGE="http://${PN}.sourceforge.net/" |
99 |
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz" |
100 |
+ |
101 |
+LICENSE="GPL-2" |
102 |
+SLOT="0" |
103 |
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" |
104 |
+IUSE="" |
105 |
+ |
106 |
+# The Makefile links with -lssl. |
107 |
+COMMON_DEPEND="dev-libs/openssl:0" |
108 |
+ |
109 |
+DEPEND+=" ${COMMON_DEPEND}" |
110 |
+RDEPEND+=" ${COMMON_DEPEND}" |
111 |
+ |
112 |
+PATCHES=( "${FILESDIR}/respect-cc-cflags-ldflags.patch" ) |
113 |
+ |
114 |
+src_compile() { |
115 |
+ emake CC="$(tc-getCC)" |
116 |
+} |