x11-plugins/wmdots: fix build with -fno-common
authorBernard Cafarelli <voyageur@gentoo.org>
Sun, 1 Mar 2020 15:12:33 +0000 (16:12 +0100)
committerBernard Cafarelli <voyageur@gentoo.org>
Sun, 1 Mar 2020 15:12:43 +0000 (16:12 +0100)
Closes: https://bugs.gentoo.org/707532
Package-Manager: Portage-2.3.90, Repoman-2.3.20
Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
x11-plugins/wmdots/files/wmdots-0.2_beta-gcc-10.patch [new file with mode: 0644]
x11-plugins/wmdots/wmdots-0.2_beta-r1.ebuild

diff --git a/x11-plugins/wmdots/files/wmdots-0.2_beta-gcc-10.patch b/x11-plugins/wmdots/files/wmdots-0.2_beta-gcc-10.patch
new file mode 100644 (file)
index 0000000..f4e522f
--- /dev/null
@@ -0,0 +1,27 @@
+diff -Naur wmdots.orig/wmdots/wmdots.c wmdots/wmdots/wmdots.c
+--- wmdots.orig/wmdots/wmdots.c        1999-10-11 21:39:11.000000000 +0200
++++ wmdots/wmdots/wmdots.c     2020-03-01 16:08:39.492275206 +0100
+@@ -315,6 +315,9 @@
+ //   10,30,&y_off,-5,30,10
+ // };
++Display               *display;
++Window          Root, iconwin, win;
++
+ // -----------------------------------------------------------------------
+ // draw a point at x/y in specified colour
+diff -Naur wmdots.orig/wmgeneral/wmgeneral.h wmdots/wmgeneral/wmgeneral.h
+--- wmdots.orig/wmgeneral/wmgeneral.h  1998-10-16 02:16:59.000000000 +0200
++++ wmdots/wmgeneral/wmgeneral.h       2020-03-01 16:08:45.412276631 +0100
+@@ -36,8 +36,8 @@
+  /* Global variable */
+ /*******************/
+-Display               *display;
+-Window          Root, iconwin, win;
++extern Display                *display;
++extern Window          Root, iconwin, win;
+   /***********************/
index 5aaba6401e1ce5dcfe77d202c21a52970f1d3bb3..7c4b91c7072a0c6c7de1c1241faa6b1a12043035 100644 (file)
@@ -21,6 +21,10 @@ DEPEND="${RDEPEND}"
 S="${WORKDIR}/${PN}"
 
 src_prepare() {
+       pushd "${WORKDIR}" || die
+       eapply "${FILESDIR}"/${P}-gcc-10.patch
+       popd || die
+
        default
        eapply "${FILESDIR}"/${P}-stringh.patch
        sed -e "s|cc|$(tc-getCC)|g" \