commit:     ad47238933f3b59c61e78097dcebfcc92ac90096
Author:     Thomas Bracht Laumann Jespersen <t <AT> laumann <DOT> xyz>
AuthorDate: Fri Apr  8 07:32:46 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 21 19:54:43 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad472389

x11-plugins/i8krellm: update EAPI 6 -> 8

Also removes support in the Makefile for gkrellm1. Both the package
description and dependencies indicate a hard requirement for gkrellm2,
and the gkrellm1 support unconditionally calls 'gtk-config' and
'imlib-config', neither of which are declared as dependencies and thus
might not exist.

Closes: https://bugs.gentoo.org/742953
Signed-off-by: Thomas Bracht Laumann Jespersen <t <AT> laumann.xyz>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/i8krellm-2.5-r3-makefile-fixes.patch     | 42 ++++++++++++++++++
 .../i8krellm-2.5-r3-rm-gkrellm1-support.patch      | 50 ++++++++++++++++++++++
 x11-plugins/i8krellm/i8krellm-2.5-r3.ebuild        | 31 ++++++++++++++
 3 files changed, 123 insertions(+)

diff --git a/x11-plugins/i8krellm/files/i8krellm-2.5-r3-makefile-fixes.patch 
b/x11-plugins/i8krellm/files/i8krellm-2.5-r3-makefile-fixes.patch
new file mode 100644
index 000000000000..154c4f293179
--- /dev/null
+++ b/x11-plugins/i8krellm/files/i8krellm-2.5-r3-makefile-fixes.patch
@@ -0,0 +1,42 @@
+Respect user's pkg-config, don't call gcc directly, respect CFLAGS
+--- a/Makefile
++++ b/Makefile
+@@ -8,14 +8,14 @@ LFLAGS += $(LDFLAGS)
+ 
+ ## Support for GKrellM 2.0
+ #
+-GTK2_INCLUDE = `pkg-config gtk+-2.0 --cflags`
+-GTK2_LIB = `pkg-config gtk+-2.0 --libs`
++PKG_CONFIG ?= pkg-config
++GTK2_INCLUDE = $(shell ${PKG_CONFIG} gtk+-2.0 --cflags)
++GTK2_LIB = $(shell ${PKG_CONFIG} gtk+-2.0 --libs)
+ SINSTALLDIR2 = /usr/share/gkrellm2/plugins
+ UINSTALLDIR2 = $(HOME)/.gkrellm2/plugins
+-FLAGS2 = -O2 -Wall -fPIC -I. $(GTK2_INCLUDE)
++FLAGS2 = -fPIC -I. $(GTK2_INCLUDE)
+ LIBS2 = $(GTK2_LIB)
+-CC2 = gcc $(FLAGS2) -DGKRELLM2
+-CC2F = gcc $(FLAGS2) -DFAKE -DGKRELLM2
++CC = $(CC)
+ OBJS2 = i8krellm.o
+ 
+ # seems to barf without the @echo....
+@@ -23,14 +23,14 @@ i8krellm: i8krellm.so
+       @echo ""
+ 
+ i8krellm.so: $(OBJS2)
+-      $(CC2) $(OBJS2) -o i8krellm.so $(LFLAGS) $(LIBS2)
++      $(CC) $(CFLAGS) $(CFLAGS) $(FLAGS2) -DGKRELLM2 $(OBJS2) -o i8krellm.so 
$(LFLAGS) $(LIBS2)
+ 
+ fake: i8krellm.c prop-anim.xpm
+-      $(CC2F) -c -o i8krellm.o i8krellm.c
+-      $(CC2F) $(OBJS2) -o i8krellm.so $(LFLAGS) $(LIBS2)
++      $(CC) $(CFLAGS) $(FLAGS2) -DFAKE -DGKRELLM2 -c -o i8krellm.o i8krellm.c
++      $(CC) $(CFLAGS) $(FLAGS2) -DFAKE -DGKRELLM2 $(OBJS2) -o i8krellm.so 
$(LFLAGS) $(LIBS2)
+ 
+ i8krellm.o: i8krellm.c prop-anim.xpm
+-      $(CC2) -c -o i8krellm.o i8krellm.c
++      $(CC) $(CFLAGS) $(FLAGS2) -DGKRELLM2 -c -o i8krellm.o i8krellm.c
+ 
+ site_install: i8krellm.so
+       install -c -s -m 644 i8krellm.so $(SINSTALLDIR2)

diff --git 
a/x11-plugins/i8krellm/files/i8krellm-2.5-r3-rm-gkrellm1-support.patch 
b/x11-plugins/i8krellm/files/i8krellm-2.5-r3-rm-gkrellm1-support.patch
new file mode 100644
index 000000000000..e46e0d6ac21c
--- /dev/null
+++ b/x11-plugins/i8krellm/files/i8krellm-2.5-r3-rm-gkrellm1-support.patch
@@ -0,0 +1,50 @@
+Remove support for gkrellm1
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,4 @@
+ # To build for GKrellM v2, just type 'make' and 'make install'
+-# For GKrellM v1, type 'make i8krellm1' and 'make install1'
+ # 
+ 
+ LFLAGS = -shared
+@@ -43,40 +42,3 @@ install: i8krellm.so
+ 
+ clean:
+       rm -f *.o core *.so
+-
+-
+-## Support for GKrellM 1.2
+-#
+-GTK_INCLUDE = `gtk-config --cflags`
+-GTK_LIB = `gtk-config --libs` -lpthread
+-IMLIB_INCLUDE = `imlib-config --cflags-gdk`
+-IMLIB_LIB = `imlib-config --libs-gdk`
+-SINSTALLDIR = /usr/share/gkrellm/plugins
+-UINSTALLDIR = $(HOME)/.gkrellm/plugins
+-FLAGS = -O2 -Wall -fPIC -I. $(GTK_INCLUDE) $(IMLIB_INCLUDE)
+-LIBS = $(GTK_LIB) $(IMLIB_LIB)
+-CC = gcc $(FLAGS)
+-CCF = gcc $(FLAGS) -DFAKE
+-OBJS = i8krellm.o
+-
+-i8krellm1.so: $(OBJS)
+-#     @echo "========> i8krellm1.so"
+-      $(CC) $(OBJS) -o i8krellm1.so $(LFLAGS) $(LIBS)
+-
+-i8krellm1.o: i8krellm.c prop-anim.xpm
+-#     @echo "========> i8krellm1.o"
+-      $(CC) -c -o i8krellm1.o i8krellm.c
+-
+-fake1: i8krellm.c prop-anim.xpm
+-      $(CCF) -c -o i8krellm1.o i8krellm.c
+-      $(CCF) $(OBJS) -o i8krellm1.so $(LFLAGS) $(LIBS)
+-
+-site_install1: i8krellm1.so
+-      install -c -s -m 644 i8krellm1.so $(SINSTALLDIR)
+-
+-user_install1: i8krellm1.so
+-      install -c -s -m 644 i8krellm1.so $(UINSTALLDIR)
+-
+-install1: i8krellm1.so
+-      install -c -s -m 644 i8krellm1.so $(UINSTALLDIR)
+-

diff --git a/x11-plugins/i8krellm/i8krellm-2.5-r3.ebuild 
b/x11-plugins/i8krellm/i8krellm-2.5-r3.ebuild
new file mode 100644
index 000000000000..5bdff0ee4969
--- /dev/null
+++ b/x11-plugins/i8krellm/i8krellm-2.5-r3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit gkrellm-plugin toolchain-funcs
+
+DESCRIPTION="GKrellM2 Plugin for the Dell Inspiron and Latitude notebooks"
+SRC_URI="http://www.coding-zone.com/${P}.tar.gz";
+HOMEPAGE="http://www.coding-zone.com/?page=i8krellm";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+       app-admin/gkrellm:2[X]
+       >=app-laptop/i8kutils-1.5"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-Respect-LDFLAGS.patch
+       "${FILESDIR}"/${P}-r3-makefile-fixes.patch
+       "${FILESDIR}"/${P}-r3-rm-gkrellm1-support.patch
+)
+
+src_compile() {
+       tc-export PKG_CONFIG
+       emake CC="$(tc-getCC)"
+}

Reply via email to