summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2016-08-25 14:50:09 +0200
committerPacho Ramos <pacho@gentoo.org>2016-08-25 14:53:59 +0200
commitb1dcecd9b4e1f25bae9bd8483a8c476520dab10c (patch)
tree67ece8185d36eb089fa03df7846a0624b6612645 /x11-plugins/gkrellm-volume
parentx11-plugins/gkrellm-volume: Drop old (diff)
downloadgentoo-b1dcecd9b4e1f25bae9bd8483a8c476520dab10c.tar.gz
gentoo-b1dcecd9b4e1f25bae9bd8483a8c476520dab10c.tar.bz2
gentoo-b1dcecd9b4e1f25bae9bd8483a8c476520dab10c.zip
x11-plugins/gkrellm-volume: Respect LDFLAGS, fix gcc calls and fix dependencies (#422543 by Michael Mair-Keimberger (iamnr3))
Package-Manager: portage-2.3.0
Diffstat (limited to 'x11-plugins/gkrellm-volume')
-rw-r--r--x11-plugins/gkrellm-volume/files/gkrellm-volume-2.1.13-Respect-LDFLAGS.patch13
-rw-r--r--x11-plugins/gkrellm-volume/files/gkrellm-volume-2.1.13-makefile.patch57
-rw-r--r--x11-plugins/gkrellm-volume/gkrellm-volume-2.1.13-r2.ebuild25
3 files changed, 71 insertions, 24 deletions
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
deleted file mode 100644
index 1d711fb74946..000000000000
--- a/x11-plugins/gkrellm-volume/files/gkrellm-volume-2.1.13-Respect-LDFLAGS.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 7a9821d..db02cad 100644
---- a/Makefile
-+++ b/Makefile
-@@ -18,6 +18,8 @@ FLAGS = -O2 -Wall -fPIC $(GTK_CFLAGS) $(GKRELLM_INCLUDE)
- LIBS = $(GTK_LIB)
- LFLAGS = -shared
-
-+LFLAGS += $(LDFLAGS)
-+
- OBJS = volume.o mixer.o oss_mixer.o
-
- ifeq ($(enable_alsa),1)
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
new file mode 100644
index 000000000000..23d822ca7fc8
--- /dev/null
+++ b/x11-plugins/gkrellm-volume/files/gkrellm-volume-2.1.13-makefile.patch
@@ -0,0 +1,57 @@
+--- a/Makefile 2004-08-19 22:07:27.000000000 +0200
++++ b/Makefile_new 2013-03-16 21:16:03.919755685 +0100
+@@ -3,7 +3,7 @@
+ PACKAGE ?= gkrellm-volume
+ LOCALEDIR ?= /usr/local/share/locale
+
+-FLAGS += -DPACKAGE="\"$(PACKAGE)\""
++CFLAGS += -DPACKAGE="\"$(PACKAGE)\""
+ export PACKAGE LOCALEDIR
+
+ GTK_CONFIG = pkg-config gtk+-2.0
+@@ -14,31 +14,32 @@
+ GTK_CFLAGS = `$(GTK_CONFIG) --cflags`
+ GTK_LIB = `$(GTK_CONFIG) --libs`
+
+-FLAGS = -O2 -Wall -fPIC $(GTK_CFLAGS) $(GKRELLM_INCLUDE)
++CFLAGS := $(CFLAGS) -fPIC $(GTK_CFLAGS) $(GKRELLM_INCLUDE)
+ LIBS = $(GTK_LIB)
+ LFLAGS = -shared
++LFLAGS += $(LDFLAGS)
+
+ OBJS = volume.o mixer.o oss_mixer.o
+
+ ifeq ($(enable_alsa),1)
+- FLAGS += -DALSA
++ CFLAGS += -DALSA
+ LIBS += -lasound
+ OBJS += alsa_mixer.o
+ endif
+
+ ifeq ($(enable_nls),1)
+- FLAGS += -DENABLE_NLS -DLOCALEDIR=\"$(LOCALEDIR)\"
++ CFLAGS += -DENABLE_NLS -DLOCALEDIR=\"$(LOCALEDIR)\"
+ export enable_nls
+ endif
+
+-CC = gcc $(CFLAGS) $(FLAGS)
++CC = $(CC)
+
+ INSTALL = install -c
+ INSTALL_PROGRAM = $(INSTALL) -s
+
+ all: volume.so
+ (cd po && ${MAKE} all )
+-
++
+ volume.so: $(OBJS)
+ $(CC) $(OBJS) -o volume.so $(LIBS) $(LFLAGS)
+
+@@ -50,5 +51,4 @@
+ (cd po && ${MAKE} install)
+ $(INSTALL_PROGRAM) volume.so $(PLUGIN_DIR)
+
+-%.c.o: %.c
+-
++%.c.o: %.c
+\ No newline at end of file
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
index a13bd83b9392..e9b82fd19019 100644
--- a/x11-plugins/gkrellm-volume/gkrellm-volume-2.1.13-r2.ebuild
+++ b/x11-plugins/gkrellm-volume/gkrellm-volume-2.1.13-r2.ebuild
@@ -1,11 +1,10 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI="3"
-inherit gkrellm-plugin eutils
+EAPI=6
+inherit gkrellm-plugin toolchain-funcs
-IUSE="alsa"
DESCRIPTION="A mixer control plugin for gkrellm"
HOMEPAGE="http://gkrellm.luon.net/volume.php"
SRC_URI="http://gkrellm.luon.net/files/${P}.tar.gz"
@@ -13,20 +12,24 @@ SRC_URI="http://gkrellm.luon.net/files/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="2"
KEYWORDS="~alpha amd64 ~ppc ~sparc x86"
+IUSE="alsa"
DEPEND="alsa? ( media-libs/alsa-lib )"
+RDEPEND="${DEPEND}
+ app-admin/gkrellm[X]
+"
-S=${WORKDIR}/${PN}
+S="${WORKDIR}/${PN}"
-PLUGIN_SO=volume.so
+PLUGIN_SO="volume.so"
-src_prepare() {
- epatch "${FILESDIR}/${P}-reenable.patch"
- epatch "${FILESDIR}/${P}-Respect-LDFLAGS.patch"
-}
+PATCHES=(
+ "${FILESDIR}/${P}-reenable.patch"
+ "${FILESDIR}/${P}-makefile.patch"
+)
src_compile() {
local myconf=""
use alsa && myconf="${myconf} enable_alsa=1"
- make ${myconf} || die "make failed"
+ emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" "${myconf}"
}