1 |
commit: c9f42ac8feb314f3f2f6ec7cfd8c535ff33fe735 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 19 09:55:35 2020 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 19 10:10:46 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9f42ac8 |
7 |
|
8 |
media-sound/scmpc: Fix building with CFLAGS=-fno-common |
9 |
|
10 |
Package-Manager: Portage-3.0.3, Repoman-3.0.0 |
11 |
Closes: https://bugs.gentoo.org/707614 |
12 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
13 |
|
14 |
.../scmpc/files/scmpc-0.4.1-fno-common.patch | 103 +++++++++++++++++++++ |
15 |
media-sound/scmpc/scmpc-0.4.1.ebuild | 5 +- |
16 |
2 files changed, 107 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/media-sound/scmpc/files/scmpc-0.4.1-fno-common.patch b/media-sound/scmpc/files/scmpc-0.4.1-fno-common.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..22cd4621e74 |
21 |
--- /dev/null |
22 |
+++ b/media-sound/scmpc/files/scmpc-0.4.1-fno-common.patch |
23 |
@@ -0,0 +1,103 @@ |
24 |
+--- a/src/audioscrobbler.c |
25 |
++++ b/src/audioscrobbler.c |
26 |
+@@ -50,6 +50,9 @@ |
27 |
+ #define API_KEY "3ec5638071c41a864bf0c8d451566476" |
28 |
+ #define API_SECRET "365e18391ccdee3bf820cb3d2ba466f6" |
29 |
+ |
30 |
++static struct as_conn_t as_conn; |
31 |
++gchar *buffer; |
32 |
++ |
33 |
+ gboolean as_connection_init(void) |
34 |
+ { |
35 |
+ as_conn.handle = curl_easy_init(); |
36 |
+--- a/src/audioscrobbler.h |
37 |
++++ b/src/audioscrobbler.h |
38 |
+@@ -37,19 +37,19 @@ |
39 |
+ /** |
40 |
+ * Last.fm connection data |
41 |
+ */ |
42 |
+-struct { |
43 |
++struct as_conn_t { |
44 |
+ gchar *session_id; |
45 |
+ gint64 last_auth; |
46 |
+ gint64 last_fail; |
47 |
+ connection_status status; |
48 |
+ CURL *handle; |
49 |
+ struct curl_slist *headers; |
50 |
+-} as_conn; |
51 |
++}; |
52 |
+ |
53 |
+ /** |
54 |
+ * cURL data buffer |
55 |
+ */ |
56 |
+-gchar *buffer; |
57 |
++extern gchar *buffer; |
58 |
+ |
59 |
+ /** |
60 |
+ * Initialize cURL |
61 |
+--- a/src/mpd.c |
62 |
++++ b/src/mpd.c |
63 |
+@@ -37,6 +37,8 @@ |
64 |
+ static gboolean mpd_parse(GIOChannel *source, GIOCondition condition, |
65 |
+ gpointer data); |
66 |
+ |
67 |
++struct mpd_t mpd; |
68 |
++ |
69 |
+ gboolean mpd_connect(void) |
70 |
+ { |
71 |
+ mpd.conn = mpd_connection_new(prefs.mpd_hostname, prefs.mpd_port, |
72 |
+--- a/src/mpd.h |
73 |
++++ b/src/mpd.h |
74 |
+@@ -32,7 +32,7 @@ |
75 |
+ /** |
76 |
+ * MPD connection data |
77 |
+ */ |
78 |
+-struct { |
79 |
++struct mpd_t { |
80 |
+ struct mpd_connection *conn; |
81 |
+ struct mpd_status *status; |
82 |
+ struct mpd_song *song; |
83 |
+@@ -42,7 +42,9 @@ |
84 |
+ guint idle_source; |
85 |
+ guint check_source; |
86 |
+ guint reconnect_source; |
87 |
+-} mpd; |
88 |
++}; |
89 |
++ |
90 |
++extern struct mpd_t mpd; |
91 |
+ |
92 |
+ /** |
93 |
+ * Connect to MPD |
94 |
+--- a/src/preferences.c |
95 |
++++ b/src/preferences.c |
96 |
+@@ -36,6 +36,8 @@ |
97 |
+ #include "scmpc.h" |
98 |
+ #include "preferences.h" |
99 |
+ |
100 |
++struct prefs_t prefs; |
101 |
++ |
102 |
+ static gint cf_log_level(cfg_t *cfg, cfg_opt_t *opt, const gchar *value, |
103 |
+ void *result); |
104 |
+ static gint cf_validate_num(cfg_t *cfg, cfg_opt_t *opt); |
105 |
+--- a/src/preferences.h |
106 |
++++ b/src/preferences.h |
107 |
+@@ -32,7 +32,7 @@ |
108 |
+ /** |
109 |
+ * scmpc settings |
110 |
+ */ |
111 |
+-struct { |
112 |
++struct prefs_t { |
113 |
+ gchar *mpd_hostname; |
114 |
+ gushort mpd_port; |
115 |
+ gushort mpd_timeout; |
116 |
+@@ -48,7 +48,9 @@ |
117 |
+ gchar *cache_file; |
118 |
+ guint queue_length; |
119 |
+ guint cache_interval; |
120 |
+-} prefs; |
121 |
++}; |
122 |
++ |
123 |
++extern struct prefs_t prefs; |
124 |
+ |
125 |
+ /** |
126 |
+ * Initialize preferences |
127 |
|
128 |
diff --git a/media-sound/scmpc/scmpc-0.4.1.ebuild b/media-sound/scmpc/scmpc-0.4.1.ebuild |
129 |
index 7eee1b1aa5b..2b76d415553 100644 |
130 |
--- a/media-sound/scmpc/scmpc-0.4.1.ebuild |
131 |
+++ b/media-sound/scmpc/scmpc-0.4.1.ebuild |
132 |
@@ -1,4 +1,4 @@ |
133 |
-# Copyright 1999-2019 Gentoo Authors |
134 |
+# Copyright 1999-2020 Gentoo Authors |
135 |
# Distributed under the terms of the GNU General Public License v2 |
136 |
|
137 |
EAPI=7 |
138 |
@@ -18,6 +18,9 @@ RDEPEND=" |
139 |
net-misc/curl:=" |
140 |
DEPEND="${RDEPEND}" |
141 |
BDEPEND="virtual/pkgconfig" |
142 |
+PATCHES=( |
143 |
+ "${FILESDIR}"/${PN}-0.4.1-fno-common.patch |
144 |
+) |
145 |
|
146 |
src_install() { |
147 |
default |