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/wmSMPmon/files/, x11-plugins/wmSMPmon/
Date: Sun, 29 Mar 2020 11:36:05
Message-Id: 1585481726.56952c803f8f37df9896b9016cf8ced7dc05f2b4.voyageur@gentoo
1 commit: 56952c803f8f37df9896b9016cf8ced7dc05f2b4
2 Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 29 11:35:13 2020 +0000
4 Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 29 11:35:26 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56952c80
7
8 x11-plugins/wmSMPmon: fix build with -fno-common
9
10 Closes: https://bugs.gentoo.org/707812
11 Package-Manager: Portage-2.3.96, Repoman-2.3.22
12 Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>
13
14 .../wmSMPmon/files/wmSMPmon-3.1-fno-common.patch | 36 ++++++++++++++++++++++
15 x11-plugins/wmSMPmon/wmSMPmon-3.1-r2.ebuild | 11 +++++--
16 2 files changed, 45 insertions(+), 2 deletions(-)
17
18 diff --git a/x11-plugins/wmSMPmon/files/wmSMPmon-3.1-fno-common.patch b/x11-plugins/wmSMPmon/files/wmSMPmon-3.1-fno-common.patch
19 new file mode 100644
20 index 00000000000..f1416fcc024
21 --- /dev/null
22 +++ b/x11-plugins/wmSMPmon/files/wmSMPmon-3.1-fno-common.patch
23 @@ -0,0 +1,36 @@
24 +diff -Naur wmSMPmon-3.1.orig/wmgeneral/wmgeneral.h wmSMPmon-3.1/wmgeneral/wmgeneral.h
25 +--- wmSMPmon-3.1.orig/wmgeneral/wmgeneral.h 1999-04-25 05:08:22.000000000 +0200
26 ++++ wmSMPmon-3.1/wmgeneral/wmgeneral.h 2020-03-29 13:32:55.253627166 +0200
27 +@@ -36,7 +36,7 @@
28 + /* Global variable */
29 + /*******************/
30 +
31 +-Display *display;
32 ++extern Display *display;
33 +
34 + /***********************/
35 + /* Function Prototypes */
36 +diff -Naur wmSMPmon-3.1.orig/wmSMPmon/standards.h wmSMPmon-3.1/wmSMPmon/standards.h
37 +--- wmSMPmon-3.1.orig/wmSMPmon/standards.h 2004-11-19 14:57:30.000000000 +0100
38 ++++ wmSMPmon-3.1/wmSMPmon/standards.h 2020-03-29 13:32:14.666639432 +0200
39 +@@ -37,7 +37,7 @@
40 + #define HAUTEUR 31 /* Max. height of CPU Load Bar+Graph */
41 +
42 + /* Program name used in error messages */
43 +-char *Myname;
44 ++extern char *Myname;
45 +
46 + /* NumCPUs_DoInit returns the number of CPUs present in the system and
47 + performs any initialization necessary for the sysinfo-XXX module */
48 +diff -Naur wmSMPmon-3.1.orig/wmSMPmon/wmSMPmon.c wmSMPmon-3.1/wmSMPmon/wmSMPmon.c
49 +--- wmSMPmon-3.1.orig/wmSMPmon/wmSMPmon.c 2005-11-07 01:24:32.000000000 +0100
50 ++++ wmSMPmon-3.1/wmSMPmon/wmSMPmon.c 2020-03-29 13:33:03.630624637 +0200
51 +@@ -35,6 +35,8 @@
52 + /*###### Funcition definitions ##########################################*/
53 + void usage(int cpus, const char *str);
54 +
55 ++char *Myname;
56 ++Display *display;
57 +
58 + /*###### MAIN PROGRAM ###################################################*/
59 + int main(int argc, char **argv)
60
61 diff --git a/x11-plugins/wmSMPmon/wmSMPmon-3.1-r2.ebuild b/x11-plugins/wmSMPmon/wmSMPmon-3.1-r2.ebuild
62 index 9619fe673e8..cc153566aa1 100644
63 --- a/x11-plugins/wmSMPmon/wmSMPmon-3.1-r2.ebuild
64 +++ b/x11-plugins/wmSMPmon/wmSMPmon-3.1-r2.ebuild
65 @@ -1,4 +1,4 @@
66 -# Copyright 1999-2018 Gentoo Authors
67 +# Copyright 1999-2020 Gentoo Authors
68 # Distributed under the terms of the GNU General Public License v2
69
70 EAPI=7
71 @@ -22,10 +22,17 @@ DEPEND="${RDEPEND}
72
73 DOCS=( ../Changelog )
74
75 -S="${WORKDIR}/${P}/${PN}"
76 +S=${WORKDIR}/${P}/${PN}
77
78 PATCHES=( "${FILESDIR}"/${P}-makefile.patch )
79
80 +src_prepare() {
81 + default
82 +
83 + pushd "${WORKDIR}"/${P} || die
84 + eapply "${FILESDIR}"/${P}-fno-common.patch
85 +}
86 +
87 src_compile() {
88 emake CC="$(tc-getCC)" LIBDIR="/usr/$(get_libdir)"
89 }