commit:     89b10989e53a5e06c70b6deac0f60664d8d1addd
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Sat Jan  4 20:15:38 2025 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Sun Jan  5 10:56:22 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89b10989

x11-plugins/wmsystray: update EAPI 7 -> 8, port to C23

Bug: https://bugs.gentoo.org/876346
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/39978
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 .../files/wmsystray-0.1.1-implicit-function.patch  | 55 ++++++++++++++++++++++
 x11-plugins/wmsystray/wmsystray-0.1.1-r2.ebuild    | 47 ++++++++++++++++++
 2 files changed, 102 insertions(+)

diff --git 
a/x11-plugins/wmsystray/files/wmsystray-0.1.1-implicit-function.patch 
b/x11-plugins/wmsystray/files/wmsystray-0.1.1-implicit-function.patch
new file mode 100644
index 000000000000..4496bb47df67
--- /dev/null
+++ b/x11-plugins/wmsystray/files/wmsystray-0.1.1-implicit-function.patch
@@ -0,0 +1,55 @@
+bug https://bugs.gentoo.org/876346
+diff -ru a/wmsystray/systray.h b/wmsystray/systray.h
+--- a/wmsystray/systray.h      2025-01-04 23:45:21.765262521 +0400
++++ b/wmsystray/systray.h      2025-01-04 23:48:21.590340299 +0400
+@@ -36,5 +36,7 @@
+ int event_is_systray_event(XEvent *ev);
+ int handle_systray_event(XEvent *ev);
+ void repaint_systray();
++struct systray_item *find_systray_item (Window id);
++int systray_property_update (struct systray_item *item);
+ 
+ #endif
+diff -ru a/wmsystray/ui.c b/wmsystray/ui.c
+--- a/wmsystray/ui.c   2025-01-04 23:45:21.765262521 +0400
++++ b/wmsystray/ui.c   2025-01-04 23:49:04.894118218 +0400
+@@ -10,6 +10,7 @@
+ 
+ #include <stdlib.h>
+ #include <signal.h>
++#include <unistd.h>
+ 
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
+diff -ru a/wmsystray/ui.h b/wmsystray/ui.h
+--- a/wmsystray/ui.h   2025-01-04 23:45:21.766262516 +0400
++++ b/wmsystray/ui.h   2025-01-04 23:48:51.661186082 +0400
+@@ -24,5 +24,6 @@
+ extern Display *main_disp;
+ extern Window main_wind, icon_wind, sel_wind, draw_wind;
+ extern char * wmsystray_xpm[];
++void draw_ui_elements();
+ 
+ #endif
+--- a/xembed/xembed.c  2025-01-04 23:45:21.766262516 +0400
++++ b/xembed/xembed.c  2025-01-04 23:46:29.884913173 +0400
+@@ -2,6 +2,8 @@
+  xembed.c
+  ****************************************************************************/
+ 
++#include <string.h>
++
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
+ #include "xembed.h"
+diff -ru a/wmsystray/Makefile b/wmsystray/Makefile
+--- a/wmsystray/Makefile       2025-01-05 00:02:39.013943053 +0400
++++ b/wmsystray/Makefile       2025-01-05 00:07:41.053394062 +0400
+@@ -1,6 +1,6 @@
+ include ../Rules.make
+ 
+-CFLAGS = ${X11CFLAGS} -DTRACE_LEVEL=${TRACE_LEVEL} -I../xembed -g 
${EXTRACFLAGS}
++CFLAGS = ${X11CFLAGS} -DTRACE_LEVEL=${TRACE_LEVEL} -I../xembed -g 
-D_POSIX_C_SOURCE=199309L -D_XOPEN_SOURCE=500 ${EXTRACFLAGS}
+ LDFLAGS = ${X11LDFLAGS} -lXpm
+ 
+ OBJS = main.o ui.o systray.o xpms.o

diff --git a/x11-plugins/wmsystray/wmsystray-0.1.1-r2.ebuild 
b/x11-plugins/wmsystray/wmsystray-0.1.1-r2.ebuild
new file mode 100644
index 000000000000..d6047f1b921c
--- /dev/null
+++ b/x11-plugins/wmsystray/wmsystray-0.1.1-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop toolchain-funcs
+
+DESCRIPTION="Window Maker dock app that provides a system tray for GNOME/KDE 
applications"
+HOMEPAGE="https://github.com/bbidulock/wmsystray";
+SRC_URI="https://github.com/bbidulock/wmsystray/releases/download/${PV}/${P}.tar.bz2";
+
+RDEPEND="x11-libs/libX11
+       x11-libs/libXpm"
+DEPEND="${RDEPEND}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+
+PATCHES=(
+       "${FILESDIR}/${P}-Makefile.patch"
+       "${FILESDIR}/${P}-gcc-3.4.patch"
+       "${FILESDIR}/${P}-return-type.patch"
+       "${FILESDIR}/${P}-implicit-function.patch"
+)
+
+DOCS=( README HACKING AUTHORS )
+
+src_prepare() {
+       default
+       # Fix parallel compilation
+       sed -ie "s/make EXTRACFLAGS/make \${MAKEOPTS} EXTRACFLAGS/" Makefile || 
die
+
+       # Honour Gentoo LDFLAGS, see bug #336296
+       sed -ie "s/-o wmsystray/${LDFLAGS} -o wmsystray/" wmsystray/Makefile || 
die
+}
+
+src_compile() {
+       emake CC="$(tc-getCC)" EXTRACFLAGS="${CFLAGS}"
+}
+
+src_install() {
+       dobin ${PN}/${PN}
+       doman doc/${PN}.1
+       domenu "${FILESDIR}/${PN}.desktop"
+       einstalldocs
+}

Reply via email to