Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-plugins/gkrellm-volume/files/, x11-plugins/gkrellm-volume/
Date: Thu, 25 Aug 2016 12:54:10
Message-Id: 1472129639.b1dcecd9b4e1f25bae9bd8483a8c476520dab10c.pacho@gentoo
1 commit: b1dcecd9b4e1f25bae9bd8483a8c476520dab10c
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 25 12:50:09 2016 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 25 12:53:59 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1dcecd9
7
8 x11-plugins/gkrellm-volume: Respect LDFLAGS, fix gcc calls and fix dependencies (#422543 by Michael Mair-Keimberger (iamnr3))
9
10 Package-Manager: portage-2.3.0
11
12 .../gkrellm-volume-2.1.13-Respect-LDFLAGS.patch | 13 -----
13 .../files/gkrellm-volume-2.1.13-makefile.patch | 57 ++++++++++++++++++++++
14 .../gkrellm-volume/gkrellm-volume-2.1.13-r2.ebuild | 25 +++++-----
15 3 files changed, 71 insertions(+), 24 deletions(-)
16
17 diff --git a/x11-plugins/gkrellm-volume/files/gkrellm-volume-2.1.13-Respect-LDFLAGS.patch b/x11-plugins/gkrellm-volume/files/gkrellm-volume-2.1.13-Respect-LDFLAGS.patch
18 deleted file mode 100644
19 index 1d711fb..00000000
20 --- a/x11-plugins/gkrellm-volume/files/gkrellm-volume-2.1.13-Respect-LDFLAGS.patch
21 +++ /dev/null
22 @@ -1,13 +0,0 @@
23 -diff --git a/Makefile b/Makefile
24 -index 7a9821d..db02cad 100644
25 ---- a/Makefile
26 -+++ b/Makefile
27 -@@ -18,6 +18,8 @@ FLAGS = -O2 -Wall -fPIC $(GTK_CFLAGS) $(GKRELLM_INCLUDE)
28 - LIBS = $(GTK_LIB)
29 - LFLAGS = -shared
30 -
31 -+LFLAGS += $(LDFLAGS)
32 -+
33 - OBJS = volume.o mixer.o oss_mixer.o
34 -
35 - ifeq ($(enable_alsa),1)
36
37 diff --git a/x11-plugins/gkrellm-volume/files/gkrellm-volume-2.1.13-makefile.patch b/x11-plugins/gkrellm-volume/files/gkrellm-volume-2.1.13-makefile.patch
38 new file mode 100644
39 index 00000000..23d822c
40 --- /dev/null
41 +++ b/x11-plugins/gkrellm-volume/files/gkrellm-volume-2.1.13-makefile.patch
42 @@ -0,0 +1,57 @@
43 +--- a/Makefile 2004-08-19 22:07:27.000000000 +0200
44 ++++ b/Makefile_new 2013-03-16 21:16:03.919755685 +0100
45 +@@ -3,7 +3,7 @@
46 + PACKAGE ?= gkrellm-volume
47 + LOCALEDIR ?= /usr/local/share/locale
48 +
49 +-FLAGS += -DPACKAGE="\"$(PACKAGE)\""
50 ++CFLAGS += -DPACKAGE="\"$(PACKAGE)\""
51 + export PACKAGE LOCALEDIR
52 +
53 + GTK_CONFIG = pkg-config gtk+-2.0
54 +@@ -14,31 +14,32 @@
55 + GTK_CFLAGS = `$(GTK_CONFIG) --cflags`
56 + GTK_LIB = `$(GTK_CONFIG) --libs`
57 +
58 +-FLAGS = -O2 -Wall -fPIC $(GTK_CFLAGS) $(GKRELLM_INCLUDE)
59 ++CFLAGS := $(CFLAGS) -fPIC $(GTK_CFLAGS) $(GKRELLM_INCLUDE)
60 + LIBS = $(GTK_LIB)
61 + LFLAGS = -shared
62 ++LFLAGS += $(LDFLAGS)
63 +
64 + OBJS = volume.o mixer.o oss_mixer.o
65 +
66 + ifeq ($(enable_alsa),1)
67 +- FLAGS += -DALSA
68 ++ CFLAGS += -DALSA
69 + LIBS += -lasound
70 + OBJS += alsa_mixer.o
71 + endif
72 +
73 + ifeq ($(enable_nls),1)
74 +- FLAGS += -DENABLE_NLS -DLOCALEDIR=\"$(LOCALEDIR)\"
75 ++ CFLAGS += -DENABLE_NLS -DLOCALEDIR=\"$(LOCALEDIR)\"
76 + export enable_nls
77 + endif
78 +
79 +-CC = gcc $(CFLAGS) $(FLAGS)
80 ++CC = $(CC)
81 +
82 + INSTALL = install -c
83 + INSTALL_PROGRAM = $(INSTALL) -s
84 +
85 + all: volume.so
86 + (cd po && ${MAKE} all )
87 +-
88 ++
89 + volume.so: $(OBJS)
90 + $(CC) $(OBJS) -o volume.so $(LIBS) $(LFLAGS)
91 +
92 +@@ -50,5 +51,4 @@
93 + (cd po && ${MAKE} install)
94 + $(INSTALL_PROGRAM) volume.so $(PLUGIN_DIR)
95 +
96 +-%.c.o: %.c
97 +-
98 ++%.c.o: %.c
99 +\ No newline at end of file
100
101 diff --git a/x11-plugins/gkrellm-volume/gkrellm-volume-2.1.13-r2.ebuild b/x11-plugins/gkrellm-volume/gkrellm-volume-2.1.13-r2.ebuild
102 index a13bd83..e9b82fd 100644
103 --- a/x11-plugins/gkrellm-volume/gkrellm-volume-2.1.13-r2.ebuild
104 +++ b/x11-plugins/gkrellm-volume/gkrellm-volume-2.1.13-r2.ebuild
105 @@ -1,11 +1,10 @@
106 -# Copyright 1999-2012 Gentoo Foundation
107 +# Copyright 1999-2016 Gentoo Foundation
108 # Distributed under the terms of the GNU General Public License v2
109 # $Id$
110
111 -EAPI="3"
112 -inherit gkrellm-plugin eutils
113 +EAPI=6
114 +inherit gkrellm-plugin toolchain-funcs
115
116 -IUSE="alsa"
117 DESCRIPTION="A mixer control plugin for gkrellm"
118 HOMEPAGE="http://gkrellm.luon.net/volume.php"
119 SRC_URI="http://gkrellm.luon.net/files/${P}.tar.gz"
120 @@ -13,20 +12,24 @@ SRC_URI="http://gkrellm.luon.net/files/${P}.tar.gz"
121 LICENSE="GPL-2"
122 SLOT="2"
123 KEYWORDS="~alpha amd64 ~ppc ~sparc x86"
124 +IUSE="alsa"
125
126 DEPEND="alsa? ( media-libs/alsa-lib )"
127 +RDEPEND="${DEPEND}
128 + app-admin/gkrellm[X]
129 +"
130
131 -S=${WORKDIR}/${PN}
132 +S="${WORKDIR}/${PN}"
133
134 -PLUGIN_SO=volume.so
135 +PLUGIN_SO="volume.so"
136
137 -src_prepare() {
138 - epatch "${FILESDIR}/${P}-reenable.patch"
139 - epatch "${FILESDIR}/${P}-Respect-LDFLAGS.patch"
140 -}
141 +PATCHES=(
142 + "${FILESDIR}/${P}-reenable.patch"
143 + "${FILESDIR}/${P}-makefile.patch"
144 +)
145
146 src_compile() {
147 local myconf=""
148 use alsa && myconf="${myconf} enable_alsa=1"
149 - make ${myconf} || die "make failed"
150 + emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" "${myconf}"
151 }