commit:     f30fdf662713ff215ddacbcf617471cf4a55f503
Author:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 13 08:48:43 2020 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Sat Jun 13 09:04:23 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f30fdf66

x11-plugins/wmapm: fix build with -fno-common

Closes: https://bugs.gentoo.org/708254
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 x11-plugins/wmapm/files/wmapm-3.1-fno-common.patch | 23 ++++++++++++++++++++++
 x11-plugins/wmapm/wmapm-3.1-r2.ebuild              |  5 ++++-
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/x11-plugins/wmapm/files/wmapm-3.1-fno-common.patch 
b/x11-plugins/wmapm/files/wmapm-3.1-fno-common.patch
new file mode 100644
index 00000000000..74b8cb1c9c9
--- /dev/null
+++ b/x11-plugins/wmapm/files/wmapm-3.1-fno-common.patch
@@ -0,0 +1,23 @@
+diff -Naur wmapm-3.1.orig/wmgeneral/wmgeneral.c wmapm-3.1/wmgeneral/wmgeneral.c
+--- wmapm-3.1.orig/wmgeneral/wmgeneral.c       1998-08-04 03:49:00.000000000 
+0200
++++ wmapm-3.1/wmgeneral/wmgeneral.c    2020-06-13 10:46:38.921354685 +0200
+@@ -50,6 +50,7 @@
+ GC                    NormalGC;
+ XpmIcon               wmgen;
+ Pixmap                pixmask;
++Display               *display;
+ 
+   /*****************/
+  /* Mouse Regions */
+diff -Naur wmapm-3.1.orig/wmgeneral/wmgeneral.h wmapm-3.1/wmgeneral/wmgeneral.h
+--- wmapm-3.1.orig/wmgeneral/wmgeneral.h       1998-08-04 03:49:00.000000000 
+0200
++++ wmapm-3.1/wmgeneral/wmgeneral.h    2020-06-13 10:46:31.276348472 +0200
+@@ -28,7 +28,7 @@
+  /* Global variable */
+ /*******************/
+ 
+-Display               *display;
++extern Display                *display;
+ 
+   /***********************/
+  /* Function Prototypes */

diff --git a/x11-plugins/wmapm/wmapm-3.1-r2.ebuild 
b/x11-plugins/wmapm/wmapm-3.1-r2.ebuild
index 870dfd26f77..90652b1aee0 100644
--- a/x11-plugins/wmapm/wmapm-3.1-r2.ebuild
+++ b/x11-plugins/wmapm/wmapm-3.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -26,6 +26,9 @@ src_prepare() {
        #Respect LDFLAGS, see bug #334747
        sed -i 's/ -o wmapm/ ${LDFLAGS} -o wmapm/' "Makefile"
        default
+
+       pushd "${WORKDIR}"/${P} || die
+       eapply "${FILESDIR}"/${P}-fno-common.patch
 }
 
 src_compile() {

Reply via email to