public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: x11-plugins/gkrellsun/files/, x11-plugins/gkrellsun/
@ 2024-05-09  0:22 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2024-05-09  0:22 UTC (permalink / raw
  To: gentoo-commits

commit:     a152cde44054df6ec7792c37a8c91c6ac340277d
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Mon Apr  1 09:57:26 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May  9 00:18:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a152cde4

x11-plugins/gkrellsun: Make errors fatal, fix build

There is a way to correctly call make in subdirectory. New revision
uses it.

Also, uses proper include in main C file, like it does in other files
for glib dependency. This fixes compilation error.

[sam: Update SRC_URI/HOMEPAGE.]

Closes: https://bugs.gentoo.org/901369
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/36036
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/gkrellsun-1.0.0-r6-include.patch         | 16 +++++
 .../files/gkrellsun-1.0.0-r6-makefile-fixes.patch  | 83 ++++++++++++++++++++++
 x11-plugins/gkrellsun/gkrellsun-1.0.0-r5.ebuild    |  2 +-
 ...n-1.0.0-r5.ebuild => gkrellsun-1.0.0-r6.ebuild} |  7 +-
 4 files changed, 104 insertions(+), 4 deletions(-)

diff --git a/x11-plugins/gkrellsun/files/gkrellsun-1.0.0-r6-include.patch b/x11-plugins/gkrellsun/files/gkrellsun-1.0.0-r6-include.patch
new file mode 100644
index 000000000000..d37fa73e6472
--- /dev/null
+++ b/x11-plugins/gkrellsun/files/gkrellsun-1.0.0-r6-include.patch
@@ -0,0 +1,16 @@
+includes exist for a reason. No reason to use badly written extern declarations
+diff -ru gkrellsun-1.0.0.orig/src20/gkrellsun.c gkrellsun-1.0.0/src20/gkrellsun.c
+--- a/src20/gkrellsun.c	2024-04-01 09:51:43.815461580 +0000
++++ b/src20/gkrellsun.c	2024-04-01 09:53:30.245006285 +0000
+@@ -15,10 +15,9 @@
+ #endif
+ 
+ #include <math.h>
++#include <glib.h>
+ 
+ /* splint */
+-extern gchar* g_string_free (/*@only@*/ GString *, gboolean);
+-extern void pango_font_description_free (/*@owned@*/PangoFontDescription *);
+ 
+ #define PLUGIN_HEIGHT 54
+ #define SUN_WIDTH 54

diff --git a/x11-plugins/gkrellsun/files/gkrellsun-1.0.0-r6-makefile-fixes.patch b/x11-plugins/gkrellsun/files/gkrellsun-1.0.0-r6-makefile-fixes.patch
new file mode 100644
index 000000000000..4ea9935533a2
--- /dev/null
+++ b/x11-plugins/gkrellsun/files/gkrellsun-1.0.0-r6-makefile-fixes.patch
@@ -0,0 +1,83 @@
+Call inner make in sane way, with error propagation. So build will fail on errors
+--- a/Makefile	2024-04-01 09:38:48.800355255 +0000
++++ b/Makefile	2024-04-01 09:40:12.944908086 +0000
+@@ -2,7 +2,7 @@
+ TMP=.
+ 
+ all: comment
+-	cd src20; make; cd ..
++	$(MAKE) -C src20
+ 
+ comment:
+ 	@echo
+@@ -12,12 +12,12 @@
+ 	@echo 
+ 
+ install: comment
+-	cd src20; make install; cd ..
++	$(MAKE) -C src20 install
+ 
+ distclean: clean
+ 
+ clean:
+-	cd src20; make clean; cd ..
++	$(MAKE) -C src20 clean
+ 	rm -f gkrellsun*.zip gkrellsun*.tar.gz
+ 
+ dist:
+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
index 09e8cfac5ae7..c5c9713d2d80 100644
--- a/x11-plugins/gkrellsun/gkrellsun-1.0.0-r5.ebuild
+++ b/x11-plugins/gkrellsun/gkrellsun-1.0.0-r5.ebuild
@@ -6,7 +6,7 @@ EAPI=8
 inherit gkrellm-plugin multilib toolchain-funcs
 
 DESCRIPTION="A GKrellM plugin that shows sunrise and sunset times"
-HOMEPAGE="http://gkrellsun.sourceforge.net/"
+HOMEPAGE="https://gkrellsun.sourceforge.net/"
 SRC_URI="https://downloads.sourceforge.net/gkrellsun/${P}.tar.gz"
 
 LICENSE="GPL-2"

diff --git a/x11-plugins/gkrellsun/gkrellsun-1.0.0-r5.ebuild b/x11-plugins/gkrellsun/gkrellsun-1.0.0-r6.ebuild
similarity index 80%
copy from x11-plugins/gkrellsun/gkrellsun-1.0.0-r5.ebuild
copy to x11-plugins/gkrellsun/gkrellsun-1.0.0-r6.ebuild
index 09e8cfac5ae7..ad28bee612ec 100644
--- a/x11-plugins/gkrellsun/gkrellsun-1.0.0-r5.ebuild
+++ b/x11-plugins/gkrellsun/gkrellsun-1.0.0-r6.ebuild
@@ -6,12 +6,12 @@ EAPI=8
 inherit gkrellm-plugin multilib toolchain-funcs
 
 DESCRIPTION="A GKrellM plugin that shows sunrise and sunset times"
-HOMEPAGE="http://gkrellsun.sourceforge.net/"
+HOMEPAGE="https://gkrellsun.sourceforge.net/"
 SRC_URI="https://downloads.sourceforge.net/gkrellsun/${P}.tar.gz"
 
 LICENSE="GPL-2"
 SLOT="1"
-KEYWORDS="~alpha amd64 ~hppa ~ia64 ~ppc sparc x86"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc sparc x86"
 IUSE="nls"
 
 RDEPEND="app-admin/gkrellm:2[X]"
@@ -22,7 +22,8 @@ BDEPEND="virtual/pkgconfig"
 PATCHES=(
 	"${FILESDIR}"/${P}-reenable.patch
 	"${FILESDIR}"/${P}-Respect-LDFLAGS.patch
-	"${FILESDIR}"/${P}-r5-makefile-fixes.patch
+	"${FILESDIR}"/${P}-r6-makefile-fixes.patch
+	"${FILESDIR}"/${P}-r6-include.patch
 )
 
 src_configure() {


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-09  0:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-09  0:22 [gentoo-commits] repo/gentoo:master commit in: x11-plugins/gkrellsun/files/, x11-plugins/gkrellsun/ Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox