mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-06 02:17:34 -08:00
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 <jy6x2b32pie9@yahoo.com> Closes: https://github.com/gentoo/gentoo/pull/40735 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
parent
cc8a349543
commit
6a1540c6bb
51
x11-plugins/wmcms/files/wmcms-0.3.5-c99.patch
Normal file
51
x11-plugins/wmcms/files/wmcms-0.3.5-c99.patch
Normal file
@ -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 <stdio.h>
|
||||
#include <unistd.h>
|
||||
-#include <dockapp.h>
|
||||
+#include <string.h>
|
||||
+#include <libdockapp/dockapp.h>
|
||||
#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;
|
||||
@ -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#<dockapp.h>#<libdockapp/dockapp.h>#' -i *.c || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)"
|
||||
tc-export CC
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
Loading…
x
Reference in New Issue
Block a user