summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2016-08-25 14:38:19 +0200
committerPacho Ramos <pacho@gentoo.org>2016-08-25 14:53:52 +0200
commit2f0afaa0a69744ab30d51315e50ae0c4a3a4c4e1 (patch)
tree32d4546370bf1a9c6d3e3bbe5cf968fb3d43f844 /x11-plugins
parentx11-plugins/gkrellm-trayicons: Respect LDFLAGS (#338784 by Michael Mair-Keimb... (diff)
downloadgentoo-2f0afaa0a69744ab30d51315e50ae0c4a3a4c4e1.tar.gz
gentoo-2f0afaa0a69744ab30d51315e50ae0c4a3a4c4e1.tar.bz2
gentoo-2f0afaa0a69744ab30d51315e50ae0c4a3a4c4e1.zip
x11-plugins/gkrellmoon: Respect LDFLAGS (#338792 by Michael Mair-Keimberger (iamnr3))
Package-Manager: portage-2.3.0
Diffstat (limited to 'x11-plugins')
-rw-r--r--x11-plugins/gkrellmoon/files/gkrellmoon-0.6-makefile.patch34
-rw-r--r--x11-plugins/gkrellmoon/gkrellmoon-0.6-r1.ebuild18
2 files changed, 47 insertions, 5 deletions
diff --git a/x11-plugins/gkrellmoon/files/gkrellmoon-0.6-makefile.patch b/x11-plugins/gkrellmoon/files/gkrellmoon-0.6-makefile.patch
new file mode 100644
index 000000000000..4f4bd0e403f3
--- /dev/null
+++ b/x11-plugins/gkrellmoon/files/gkrellmoon-0.6-makefile.patch
@@ -0,0 +1,34 @@
+--- a/Makefile 2002-12-11 04:36:06.000000000 +0100
++++ b/Makefile_new 2013-03-16 13:04:00.963512605 +0100
+@@ -4,23 +4,26 @@
+ INSTALLDIR = ${DESTDIR}/usr/lib/gkrellm2/plugins
+
+
+-FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE)
++FLAGS = -fPIC $(GTK_INCLUDE)
+ LIBS = $(GTK_LIB)
+ LFLAGS = -shared
+
+-CC = gcc $(CFLAGS) $(FLAGS)
++CC = $(CC)
+
+ OBJS = gkrellmoon.o MoonRise.o CalcEphem.o Moon.o
+
++all: gkrellmoon.so
++
++%.o: %.c
++ $(CC) $(CFLAGS) $(LDFLAGS) $(FLAGS) -c -o $@ $<
++
+ gkrellmoon.so: $(OBJS)
+- $(CC) $(OBJS) -o gkrellmoon.so $(LFLAGS) $(LIBS)
++ $(CC) $(CFLAGS) $(FLAGS) $(LDFLAGS) $(OBJS) -o gkrellmoon.so $(LFLAGS) $(LIBS)
+
+ clean:
+ rm -f *.o core *.so* *.bak *~
+
+ gkrellmoon.o: gkrellmoon.c moon_60.xpm
+
+-# %.o: %.c
+-
+ install: gkrellmoon.so
+ install -c -s -m 644 gkrellmoon.so $(INSTALLDIR)
diff --git a/x11-plugins/gkrellmoon/gkrellmoon-0.6-r1.ebuild b/x11-plugins/gkrellmoon/gkrellmoon-0.6-r1.ebuild
index 19646d53e6f2..8333fd6c7846 100644
--- a/x11-plugins/gkrellmoon/gkrellmoon-0.6-r1.ebuild
+++ b/x11-plugins/gkrellmoon/gkrellmoon-0.6-r1.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-inherit gkrellm-plugin
+EAPI=6
+inherit gkrellm-plugin toolchain-funcs
IUSE=""
DESCRIPTION="A GKrellM2 plugin of the famous wmMoonClock dockapp"
@@ -10,13 +11,20 @@ SRC_URI="mirror://sourceforge/gkrellmoon/${P}.tar.gz"
HOMEPAGE="http://gkrellmoon.sourceforge.net/"
DEPEND="media-libs/imlib2"
+RDEPEND="${DEPEND}"
SLOT="2"
LICENSE="GPL-2"
+
KEYWORDS="alpha amd64 ppc sparc x86"
-src_unpack() {
- unpack ${A}
- cd "${S}"
+PATCHES=( "${FILESDIR}"/${P}-makefile.patch )
+
+src_prepare() {
+ default
sed -i -e '/^#include <stdio.h>/a#include <string.h>' CalcEphem.h
}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}"
+}