* [gentoo-commits] repo/gentoo:master commit in: x11-plugins/gkrellsun/, x11-plugins/gkrellsun/files/
@ 2022-04-21 19:55 Sam James
0 siblings, 0 replies; only message in thread
From: Sam James @ 2022-04-21 19:55 UTC (permalink / raw
To: gentoo-commits
commit: ef22f7ce168f7ff7115dab8cf81af29bc4497a5a
Author: Thomas Bracht Laumann Jespersen <t <AT> laumann <DOT> xyz>
AuthorDate: Sat Apr 2 13:01:03 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 21 19:54:36 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef22f7ce
x11-plugins/gkrellsun: update EAPI 6 -> 8
Signed-off-by: Thomas Bracht Laumann Jespersen <t <AT> laumann.xyz>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/gkrellsun-1.0.0-r5-makefile-fixes.patch | 56 ++++++++++++++++++++++
x11-plugins/gkrellsun/gkrellsun-1.0.0-r5.ebuild | 37 ++++++++++++++
2 files changed, 93 insertions(+)
diff --git a/x11-plugins/gkrellsun/files/gkrellsun-1.0.0-r5-makefile-fixes.patch b/x11-plugins/gkrellsun/files/gkrellsun-1.0.0-r5-makefile-fixes.patch
new file mode 100644
index 000000000000..186933030860
--- /dev/null
+++ b/x11-plugins/gkrellsun/files/gkrellsun-1.0.0-r5-makefile-fixes.patch
@@ -0,0 +1,56 @@
+Don't call gcc directly, remove -O2 -Wall flags, respect user's pkg-config
+--- a/src20/Makefile
++++ b/src20/Makefile
+@@ -1,8 +1,8 @@
+ PACKAGE ?= gkrellsun
+
+-GTK_CONFIG ?=pkg-config gtk+-2.0
+-GTK_INCLUDE ?= `pkg-config gtk+-2.0 --cflags`
+-GTK_LIB ?= `pkg-config gtk+-2.0 --libs`
++PKG_CONFIG ?= pkg-config
++GTK_INCLUDE ?= $(shell ${PKG_CONFIG} gtk+-2.0 --cflags)
++GTK_LIB ?= $(shell ${PKG_CONFIG} gtk+-2.0 --libs)
+
+ INSTALL ?= install
+
+@@ -11,7 +11,7 @@ INSTALLDIR ?= $(DESTDIR)$(PREFIX)
+ PLUGINDIR ?= $(INSTALLDIR)/lib/gkrellm2/plugins
+ LOCALEDIR ?= $(INSTALLDIR)/share/locale
+
+-FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE)
++FLAGS = -fPIC $(GTK_INCLUDE)
+ #FLAGS = -g -Wall -fPIC $(GTK_INCLUDE)
+ LIBS = $(GTK_LIB)
+ LFLAGS = -shared
+@@ -25,7 +25,7 @@ endif
+ FLAGS += -DPACKAGE="\"$(PACKAGE)\""
+ export PACKAGE LOCALEDIR
+
+-CC = gcc $(CFLAGS) $(FLAGS)
++CC = $(CC)
+
+ OBJS = gkrellsun.o CalcEphem.o Moon.o MoonRise.o
+
+@@ -37,10 +37,10 @@ all: gkrellsun.so
+
+ gkrellsun.so: $(OBJS)
+ (cd po && ${MAKE})
+- $(CC) $(OBJS) -o gkrellsun.so $(LFLAGS) $(LIBS)
++ $(CC) $(CFLAGS) $(FLAGS) $(OBJS) -o gkrellsun.so $(LFLAGS) $(LIBS)
+
+ suninfo: suninfo.o CalcEphem.o Moon.o MoonRise.o
+- $(CC) $^ -o suninfo -lm $(LIBS)
++ $(CC) $(CFLAGS) $(FLAGS) $^ -o suninfo -lm $(LIBS)
+
+ clean:
+ rm -f *.o core *.so* *.bak *~
+@@ -49,7 +49,8 @@ gkrellsun.o: gkrellsun.c $(IMAGES)
+
+ $(OBJS): CalcEphem.h Moon.h MoonRise.h
+
+-#%.o: %.c
++%.o: %.c
++ $(CC) $(CFLAGS) $(FLAGS) -c -o $@ $<
+
+ install: gkrellsun.so
+ (cd po && ${MAKE} install )
diff --git a/x11-plugins/gkrellsun/gkrellsun-1.0.0-r5.ebuild b/x11-plugins/gkrellsun/gkrellsun-1.0.0-r5.ebuild
new file mode 100644
index 000000000000..4d5e865d0b77
--- /dev/null
+++ b/x11-plugins/gkrellsun/gkrellsun-1.0.0-r5.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit gkrellm-plugin toolchain-funcs
+
+DESCRIPTION="A GKrellM plugin that shows sunrise and sunset times"
+HOMEPAGE="http://gkrellsun.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gkrellsun/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="1"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~sparc ~x86"
+IUSE="nls"
+
+RDEPEND="app-admin/gkrellm:2[X]"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-reenable.patch
+ "${FILESDIR}"/${P}-Respect-LDFLAGS.patch
+ "${FILESDIR}"/${P}-r5-makefile-fixes.patch
+)
+
+src_configure() {
+ PLUGIN_SO=( src20/gkrellsun$(get_modname) )
+ default
+}
+
+src_compile() {
+ tc-export PKG_CONFIG
+ use nls && local myconf="enable_nls=1"
+ emake CC="$(tc-getCC)" ${myconf}
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-21 19:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-21 19:55 [gentoo-commits] repo/gentoo:master commit in: x11-plugins/gkrellsun/, x11-plugins/gkrellsun/files/ Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox