x11-plugins/wmcube: fix build with -fno-common
authorBernard Cafarelli <voyageur@gentoo.org>
Thu, 30 Jan 2020 08:54:48 +0000 (09:54 +0100)
committerBernard Cafarelli <voyageur@gentoo.org>
Thu, 30 Jan 2020 08:54:48 +0000 (09:54 +0100)
Closes: https://bugs.gentoo.org/706892
Package-Manager: Portage-2.3.86, Repoman-2.3.20
Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
x11-plugins/wmcube/files/wmcube-1.0.2-gcc-10.patch [new file with mode: 0644]
x11-plugins/wmcube/wmcube-1.0.2.ebuild

diff --git a/x11-plugins/wmcube/files/wmcube-1.0.2-gcc-10.patch b/x11-plugins/wmcube/files/wmcube-1.0.2-gcc-10.patch
new file mode 100644 (file)
index 0000000..5beb415
--- /dev/null
@@ -0,0 +1,21 @@
+--- a/wmgeneral/wmgeneral.c
++++ b/wmgeneral/wmgeneral.c
+@@ -45,6 +45,7 @@ Window               iconwin, win;
+ GC                    NormalGC;
+ XpmIcon               wmgen;
+ Pixmap                pixmask;
++Display               *display;
+   /*****************/
+  /* Mouse Regions */
+--- a/wmgeneral/wmgeneral.h
++++ b/wmgeneral/wmgeneral.h
+@@ -21,7 +21,7 @@ typedef struct {
+  /* Global variable */
+ /*******************/
+-Display               *display;
++extern Display                *display;
+   /***********************/
+  /* Function Prototypes */
index cca916b659af0515d778220b9916591cdb89e910..1a9633dc99cce1410637b8133c2e8b479b48704d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -26,6 +26,13 @@ DOCS=(
        )
 S="${WORKDIR}/${P}/wmcube"
 
+src_prepare() {
+       default
+
+       pushd "${WORKDIR}"/${P} || die
+       eapply "${FILESDIR}"/${P}-gcc-10.patch
+}
+
 src_compile() {
        emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
 }