Gentoo Archives: gentoo-commits

From: Conrad Kostecki <conikost@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/lcdproc/files/, app-misc/lcdproc/
Date: Sun, 02 Feb 2020 21:38:48
Message-Id: 1580679065.55cee0ab612902bb1125bf68b7f2b21103539bf3.conikost@gentoo
1 commit: 55cee0ab612902bb1125bf68b7f2b21103539bf3
2 Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 2 21:31:05 2020 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 2 21:31:05 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55cee0ab
7
8 app-misc/lcdproc: fix -fno-common compilation
9
10 Closes: https://bugs.gentoo.org/707788
11 Package-Manager: Portage-2.3.84, Repoman-2.3.20
12 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
13
14 .../files/lcdproc-0.5.9-fix-fno-common-build.patch | 53 ++++++++++++++++++++++
15 app-misc/lcdproc/lcdproc-0.5.9.ebuild | 3 +-
16 2 files changed, 55 insertions(+), 1 deletion(-)
17
18 diff --git a/app-misc/lcdproc/files/lcdproc-0.5.9-fix-fno-common-build.patch b/app-misc/lcdproc/files/lcdproc-0.5.9-fix-fno-common-build.patch
19 new file mode 100644
20 index 00000000000..2dc472f5d22
21 --- /dev/null
22 +++ b/app-misc/lcdproc/files/lcdproc-0.5.9-fix-fno-common-build.patch
23 @@ -0,0 +1,53 @@
24 +From fda5302878692da933dc03cd011f8ddffefa07a4 Mon Sep 17 00:00:00 2001
25 +From: Conrad Kostecki <conrad@××××××××.com>
26 +Date: Sun, 2 Feb 2020 18:48:07 +0100
27 +Subject: [PATCH] Fix compilation with GCC >= 10.x
28 +
29 +Starting with GCC >= 10.x, -fno-common is used as default
30 +instead of -fcommon. This patch fixes the compilation.
31 +
32 +Signed-off-by: Conrad Kostecki <conrad@××××××××.com>
33 +---
34 + clients/lcdproc/iface.c | 1 +
35 + clients/lcdproc/iface.h | 2 --
36 + clients/lcdproc/main.c | 2 ++
37 + 3 files changed, 3 insertions(+), 2 deletions(-)
38 +
39 +diff --git a/clients/lcdproc/iface.c b/clients/lcdproc/iface.c
40 +index 40e50cb7..45be5b97 100644
41 +--- a/clients/lcdproc/iface.c
42 ++++ b/clients/lcdproc/iface.c
43 +@@ -32,6 +32,7 @@
44 + #define UNSET_INT -1
45 + #define UNSET_STR "\01"
46 +
47 ++IfaceInfo iface[MAX_INTERFACES]; /* interface info */
48 +
49 + static int iface_count = 0; /* number of interfaces */
50 + static char unit_label[10] = "B"; /* default unit label is Bytes */
51 +diff --git a/clients/lcdproc/iface.h b/clients/lcdproc/iface.h
52 +index cc6dbaaf..ee188f38 100644
53 +--- a/clients/lcdproc/iface.h
54 ++++ b/clients/lcdproc/iface.h
55 +@@ -18,8 +18,6 @@
56 + /** max number of interfaces in multi-interface mode */
57 + #define MAX_INTERFACES 3
58 +
59 +-IfaceInfo iface[MAX_INTERFACES]; /* interface info */
60 +-
61 + /** Update screen content */
62 + int iface_screen(int rep, int display, int *flags_ptr);
63 + /** read interface stats from /proc/net/dev */
64 +diff --git a/clients/lcdproc/main.c b/clients/lcdproc/main.c
65 +index 01b02baf..7c7a4215 100644
66 +--- a/clients/lcdproc/main.c
67 ++++ b/clients/lcdproc/main.c
68 +@@ -53,6 +53,8 @@
69 + # include "eyebox.h"
70 + #endif
71 +
72 ++extern IfaceInfo iface[MAX_INTERFACES]; /* interface info */
73 ++
74 + /* The following 8 variables are defined 'external' in main.h! */
75 + int Quit = 0;
76 + int sock = -1;
77
78 diff --git a/app-misc/lcdproc/lcdproc-0.5.9.ebuild b/app-misc/lcdproc/lcdproc-0.5.9.ebuild
79 index 592f9d1f576..2fc2ad8d6a8 100644
80 --- a/app-misc/lcdproc/lcdproc-0.5.9.ebuild
81 +++ b/app-misc/lcdproc/lcdproc-0.5.9.ebuild
82 @@ -1,4 +1,4 @@
83 -# Copyright 1999-2019 Gentoo Authors
84 +# Copyright 1999-2020 Gentoo Authors
85 # Distributed under the terms of the GNU General Public License v2
86
87 EAPI=6
88 @@ -88,6 +88,7 @@ DOCS=( "CREDITS.md" "TODO" )
89 PATCHES=(
90 "${FILESDIR}/${P}-fix-parallel-make.patch"
91 "${FILESDIR}/${P}-use-freetype2-pkg-config.patch"
92 + "${FILESDIR}/${P}-fix-fno-common-build.patch"
93 )
94
95 src_unpack() {