From 6a1540c6bb4e859d5ce56d9967f627eda4aaf8f6 Mon Sep 17 00:00:00 2001 From: NHOrus Date: Mon, 24 Feb 2025 23:08:56 +0400 Subject: [PATCH] x11-plugins/wmcms: update EAPI 7 -> 8, port to C99 Closes: https://bugs.gentoo.org/874483 Closes: https://bugs.gentoo.org/919218 Signed-off-by: NHOrus Closes: https://github.com/gentoo/gentoo/pull/40735 Signed-off-by: Sam James --- x11-plugins/wmcms/files/wmcms-0.3.5-c99.patch | 51 +++++++++++++++++++ ...-0.3.5-r4.ebuild => wmcms-0.3.5-r5.ebuild} | 17 ++----- 2 files changed, 56 insertions(+), 12 deletions(-) create mode 100644 x11-plugins/wmcms/files/wmcms-0.3.5-c99.patch rename x11-plugins/wmcms/{wmcms-0.3.5-r4.ebuild => wmcms-0.3.5-r5.ebuild} (64%) diff --git a/x11-plugins/wmcms/files/wmcms-0.3.5-c99.patch b/x11-plugins/wmcms/files/wmcms-0.3.5-c99.patch new file mode 100644 index 0000000000000..6df3bb9dd1cf6 --- /dev/null +++ b/x11-plugins/wmcms/files/wmcms-0.3.5-c99.patch @@ -0,0 +1,51 @@ +Fix C099 bugs - correct types of static values, +inclyde correct headers. +Fold seds from old ebuild. +Remove CC and CFLAGS from Makefile - toolchain provides +https://bugs.gentoo.org/874483 +https://bugs.gentoo.org/919218 +--- a/Makefile 2025-02-24 22:58:37.620418861 +0400 ++++ b/Makefile 2025-02-24 22:59:58.108959699 +0400 +@@ -1,7 +1,5 @@ +-CC = gcc + LIBS = -lXext -lX11 -L/usr/X11R6/lib -lXpm -ldockapp + SRCS = wmcms.c +-CFLAGS = -g -O2 + + all: wmcms + +@@ -9,7 +7,7 @@ + rm -f wmcms + + wmcms : $(SRCS) wmcms.xpm +- $(CC) $(CFLAGS) $(SRCS) $(INC) -o wmcms $(LIBS) ++ $(CC) $(CFLAGS) $(SRCS) $(INC) ${LDFLAGS} -o wmcms $(LIBS) + + install : all + install -c -s wmcms /usr/local/bin +diff '--color=auto' -ru wmcms-0.3.5.old/wmcms.c wmcms-0.3.5/wmcms.c +--- wmcms-0.3.5.old/wmcms.c 2025-02-24 22:58:37.620418861 +0400 ++++ wmcms-0.3.5/wmcms.c 2025-02-24 22:59:37.916610009 +0400 +@@ -18,9 +18,10 @@ + + #include + #include +-#include ++#include ++#include + #include "state_linux_2.6.h" + #include "state_linux_2.4.h" + #include "wmcms.xpm" + + char *displayName = ""; +@@ -133,8 +144,8 @@ + } + int main (int argc, char **argv) + { +- static unsigned b_width = 64; +- static unsigned b_height = 137; ++ static unsigned short b_width = 64; ++ static unsigned short b_height = 137; + + int cpu_total; + int old_cpu_user; diff --git a/x11-plugins/wmcms/wmcms-0.3.5-r4.ebuild b/x11-plugins/wmcms/wmcms-0.3.5-r5.ebuild similarity index 64% rename from x11-plugins/wmcms/wmcms-0.3.5-r4.ebuild rename to x11-plugins/wmcms/wmcms-0.3.5-r5.ebuild index af360d3fe27e0..9cbd9d6ad2091 100644 --- a/x11-plugins/wmcms/wmcms-0.3.5-r4.ebuild +++ b/x11-plugins/wmcms/wmcms-0.3.5-r5.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit toolchain-funcs @@ -17,19 +17,12 @@ DEPEND=">=x11-libs/libdockapp-0.7:=" PATCHES=( "${FILESDIR}"/${P}-s4t4n.patch + "${FILESDIR}"/${P}-c99.patch ) -src_prepare() { - default - - # Respect LDFLAGS, see bug #335031 - sed -e 's/ -o wmcms/ ${LDFLAGS} -o wmcms/' -i Makefile || die - - sed -e 's###' -i *.c || die -} - src_compile() { - emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)" + tc-export CC + default } src_install() {