x11-plugins/gkrellmoon: Respect LDFLAGS (#338792 by Michael Mair-Keimberger (iamnr3))

Package-Manager: portage-2.3.0
This commit is contained in:
Pacho Ramos
2016-08-25 14:38:19 +02:00
parent 81b74aa034
commit 2f0afaa0a6
2 changed files with 47 additions and 5 deletions

View File

@@ -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)

View File

@@ -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}"
}