Gentoo Archives: gentoo-commits

From: Bernard Cafarelli <voyageur@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-plugins/wmgrabimage/, x11-plugins/wmgrabimage/files/
Date: Sun, 02 Feb 2020 11:29:49
Message-Id: 1580642978.feb96a00dc2f2e990b28203e459cb65d91c7a4b5.voyageur@gentoo
1 commit: feb96a00dc2f2e990b28203e459cb65d91c7a4b5
2 Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 2 11:27:33 2020 +0000
4 Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 2 11:29:38 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=feb96a00
7
8 x11-plugins/wmgrabimage: fix build with -fno-common
9
10 Closes: https://bugs.gentoo.org/706836
11 Package-Manager: Portage-2.3.86, Repoman-2.3.20
12 Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>
13
14 .../files/wmgrabimage-0.72-gcc-10.patch | 32 ++++++++++++++++++++++
15 x11-plugins/wmgrabimage/wmgrabimage-0.72-r2.ebuild | 9 ++++--
16 2 files changed, 38 insertions(+), 3 deletions(-)
17
18 diff --git a/x11-plugins/wmgrabimage/files/wmgrabimage-0.72-gcc-10.patch b/x11-plugins/wmgrabimage/files/wmgrabimage-0.72-gcc-10.patch
19 new file mode 100644
20 index 00000000000..f7b85c9d1bc
21 --- /dev/null
22 +++ b/x11-plugins/wmgrabimage/files/wmgrabimage-0.72-gcc-10.patch
23 @@ -0,0 +1,32 @@
24 +diff -Naur wmGrabImage-0.72.orig/wmgeneral/wmgeneral.c wmGrabImage-0.72/wmgeneral/wmgeneral.c
25 +--- wmGrabImage-0.72.orig/wmgeneral/wmgeneral.c 2001-05-27 21:02:18.000000000 +0200
26 ++++ wmGrabImage-0.72/wmgeneral/wmgeneral.c 2020-02-02 12:25:53.013879815 +0100
27 +@@ -47,6 +47,10 @@
28 + char *Geometry = "";
29 + Window iconwin, win;
30 + Pixmap pixmask;
31 ++Display *display;
32 ++Window Root;
33 ++GC NormalGC;
34 ++XpmIcon wmgen;
35 +
36 + /*****************/
37 + /* Mouse Regions */
38 +diff -Naur wmGrabImage-0.72.orig/wmgeneral/wmgeneral.h wmGrabImage-0.72/wmgeneral/wmgeneral.h
39 +--- wmGrabImage-0.72.orig/wmgeneral/wmgeneral.h 2001-05-27 21:02:18.000000000 +0200
40 ++++ wmGrabImage-0.72/wmgeneral/wmgeneral.h 2020-02-02 12:25:31.926869125 +0100
41 +@@ -28,10 +28,10 @@
42 + /* Global variable */
43 + /*******************/
44 +
45 +-Display *display;
46 +-Window Root;
47 +-GC NormalGC;
48 +-XpmIcon wmgen;
49 ++extern Display *display;
50 ++extern Window Root;
51 ++extern GC NormalGC;
52 ++extern XpmIcon wmgen;
53 +
54 +
55 + /***********************/
56
57 diff --git a/x11-plugins/wmgrabimage/wmgrabimage-0.72-r2.ebuild b/x11-plugins/wmgrabimage/wmgrabimage-0.72-r2.ebuild
58 index 131e0beaee7..b1d7ff43dab 100644
59 --- a/x11-plugins/wmgrabimage/wmgrabimage-0.72-r2.ebuild
60 +++ b/x11-plugins/wmgrabimage/wmgrabimage-0.72-r2.ebuild
61 @@ -1,4 +1,4 @@
62 -# Copyright 1999-2018 Gentoo Foundation
63 +# Copyright 1999-2020 Gentoo Authors
64 # Distributed under the terms of the GNU General Public License v2
65
66 EAPI=7
67 @@ -29,9 +29,12 @@ S=${WORKDIR}/${MY_PN}-${PV}/${MY_PN}
68 PATCHES=( "${FILESDIR}"/${PN}-noman.patch )
69
70 src_prepare() {
71 - sed -i -e 's/-geom /-geometry /' GrabImage || die "sed failed."
72 - sed -i -e 's/install -s -m /install -m /' Makefile || die "sed failed."
73 + sed -i -e 's/-geom /-geometry /' GrabImage || die
74 + sed -i -e 's/install -s -m /install -m /' Makefile || die
75 default
76 +
77 + pushd "${WORKDIR}"/${MY_PN}-${PV} || die
78 + eapply "${FILESDIR}"/${P}-gcc-10.patch
79 }
80
81 src_compile() {