1 |
commit: 079865b0cd09dc76add2cc8199ff98d3b10a2939 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 22 11:53:12 2021 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 22 11:53:12 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=079865b0 |
7 |
|
8 |
app-crypt/scute: Add upstream patch for -fno-common |
9 |
|
10 |
Closes: https://bugs.gentoo.org/782388 |
11 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
12 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
13 |
|
14 |
app-crypt/scute/files/scute-1.7.0-fno-common.patch | 52 ++++++++++++++++++++++ |
15 |
app-crypt/scute/scute-1.7.0.ebuild | 2 + |
16 |
2 files changed, 54 insertions(+) |
17 |
|
18 |
diff --git a/app-crypt/scute/files/scute-1.7.0-fno-common.patch b/app-crypt/scute/files/scute-1.7.0-fno-common.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..1554d8d0dfe |
21 |
--- /dev/null |
22 |
+++ b/app-crypt/scute/files/scute-1.7.0-fno-common.patch |
23 |
@@ -0,0 +1,52 @@ |
24 |
+From 49ad2b0e05e3fcb8c8c2e23bb1c6063b390dee02 Mon Sep 17 00:00:00 2001 |
25 |
+From: Damien Goutte-Gattat <dgouttegattat@××××××.org> |
26 |
+Date: Tue, 30 Mar 2021 22:31:40 +0100 |
27 |
+Subject: [PATCH] Do not declare global variable in header file. |
28 |
+ |
29 |
+* src/options.h (_scute_opt_t): New typedef. |
30 |
+(_scute_opt): Declare as extern and move definition to ... |
31 |
+* src/readconf.c (_scute_opt): here. |
32 |
+-- |
33 |
+ |
34 |
+This fixes build with gcc-10, which has -fno-common enabled by |
35 |
+default. |
36 |
+ |
37 |
+GnuPG-bug-id: 5360 |
38 |
+Signed-off-by: Damien Goutte-Gattat <dgouttegattat@××××××.org> |
39 |
+--- |
40 |
+ src/options.h | 6 ++++-- |
41 |
+ src/readconf.c | 2 ++ |
42 |
+ 2 files changed, 6 insertions(+), 2 deletions(-) |
43 |
+ |
44 |
+diff --git a/src/options.h b/src/options.h |
45 |
+index 10667db..d74071d 100644 |
46 |
+--- a/src/options.h |
47 |
++++ b/src/options.h |
48 |
+@@ -22,10 +22,12 @@ |
49 |
+ #define OPTIONS_H 1 |
50 |
+ |
51 |
+ /* Global options. */ |
52 |
+-struct { |
53 |
++typedef struct { |
54 |
+ char *user; |
55 |
+ int debug_flags; |
56 |
+-} _scute_opt; |
57 |
++} _scute_opt_t; |
58 |
++ |
59 |
++extern _scute_opt_t _scute_opt; |
60 |
+ |
61 |
+ |
62 |
+ /*-- readconf.c --*/ |
63 |
+diff --git a/src/readconf.c b/src/readconf.c |
64 |
+index 387a44f..5af2336 100644 |
65 |
+--- a/src/readconf.c |
66 |
++++ b/src/readconf.c |
67 |
+@@ -31,6 +31,8 @@ |
68 |
+ |
69 |
+ #include "options.h" |
70 |
+ |
71 |
++_scute_opt_t _scute_opt; |
72 |
++ |
73 |
+ static const char * |
74 |
+ my_strusage (int level) |
75 |
+ { |
76 |
|
77 |
diff --git a/app-crypt/scute/scute-1.7.0.ebuild b/app-crypt/scute/scute-1.7.0.ebuild |
78 |
index ef227673fab..6aee8c85a67 100644 |
79 |
--- a/app-crypt/scute/scute-1.7.0.ebuild |
80 |
+++ b/app-crypt/scute/scute-1.7.0.ebuild |
81 |
@@ -29,6 +29,8 @@ RDEPEND=" |
82 |
BDEPEND+=" |
83 |
sys-apps/texinfo" |
84 |
|
85 |
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch ) |
86 |
+ |
87 |
src_unpack() { |
88 |
default |