x11-plugins/cputnik: fix build with -fno-common
authorBernard Cafarelli <voyageur@gentoo.org>
Fri, 8 May 2020 17:24:08 +0000 (19:24 +0200)
committerBernard Cafarelli <voyageur@gentoo.org>
Fri, 8 May 2020 22:54:17 +0000 (00:54 +0200)
Closes: https://bugs.gentoo.org/707716
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
x11-plugins/cputnik/cputnik-0.2.0-r1.ebuild
x11-plugins/cputnik/files/cputnik-0.2.0-fno-common.patch [new file with mode: 0644]

index ec561276c8a12f91ad6c59396352b872c6034db0..eb195d5a676bdf0cdb840c28ba48b3770c27dfbd 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -22,7 +22,9 @@ DEPEND="${RDEPEND}
 
 S=${WORKDIR}/${P}/src
 
-PATCHES=( "${FILESDIR}"/${P}-makefile.patch )
+PATCHES=( "${FILESDIR}"/${P}-makefile.patch
+       "${FILESDIR}"/${P}-fno-common.patch
+       )
 
 src_compile() {
        emake CC="$(tc-getCC)"
diff --git a/x11-plugins/cputnik/files/cputnik-0.2.0-fno-common.patch b/x11-plugins/cputnik/files/cputnik-0.2.0-fno-common.patch
new file mode 100644 (file)
index 0000000..d774b60
--- /dev/null
@@ -0,0 +1,67 @@
+diff -Naur src.orig/docklib.c src/docklib.c
+--- src.orig/docklib.c 2005-03-26 22:53:38.000000000 +0100
++++ src/docklib.c      2020-05-08 19:21:45.930313064 +0200
+@@ -40,6 +40,29 @@
+ char            *Geometry = "";
+ char            *fonts_xpm[], *leds_xpm[];
++enum {          /* don't change the order! */
++    GRAY = 0,
++    YELLOW,
++    GREEN,
++    CYAN,
++    SKYBLUE,
++    ORANGE,
++    RED,
++    MAGENTA,
++    BROWN,
++    WHITE   
++} led_colors;
++
++enum {
++    F_NOT_AVAILABLE = 0,
++    F_REGULAR,
++    F_DIRECTORY,
++    F_CHAR_DEVICE,
++    F_BLOCK_DEVICE,
++    F_LINK,
++    F_FIFO,
++    F_SOCK
++} file_types;
+ /******************************************************************************
+  *
+diff -Naur src.orig/docklib.h src/docklib.h
+--- src.orig/docklib.h 2005-03-26 22:53:50.000000000 +0100
++++ src/docklib.h      2020-05-08 19:21:22.600284802 +0200
+@@ -79,30 +79,6 @@
+ #define NUM_COLORS  10
+-enum {          /* don't change the order! */
+-    GRAY = 0,
+-    YELLOW,
+-    GREEN,
+-    CYAN,
+-    SKYBLUE,
+-    ORANGE,
+-    RED,
+-    MAGENTA,
+-    BROWN,
+-    WHITE   
+-} led_colors;
+-
+-enum {
+-    F_NOT_AVAILABLE = 0,
+-    F_REGULAR,
+-    F_DIRECTORY,
+-    F_CHAR_DEVICE,
+-    F_BLOCK_DEVICE,
+-    F_LINK,
+-    F_FIFO,
+-    F_SOCK
+-} file_types;
+-
+ /*-------------------------------------------------------------------------------*/
+ void    dcl_open_x_window       (int argc, char *argv[], char **, char *, int, int);