public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-sound/scmpc/files/, media-sound/scmpc/
@ 2020-08-19 10:10 Jeroen Roovers
  0 siblings, 0 replies; only message in thread
From: Jeroen Roovers @ 2020-08-19 10:10 UTC (permalink / raw
  To: gentoo-commits

commit:     c9f42ac8feb314f3f2f6ec7cfd8c535ff33fe735
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 19 09:55:35 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Wed Aug 19 10:10:46 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9f42ac8

media-sound/scmpc: Fix building with CFLAGS=-fno-common

Package-Manager: Portage-3.0.3, Repoman-3.0.0
Closes: https://bugs.gentoo.org/707614
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 .../scmpc/files/scmpc-0.4.1-fno-common.patch       | 103 +++++++++++++++++++++
 media-sound/scmpc/scmpc-0.4.1.ebuild               |   5 +-
 2 files changed, 107 insertions(+), 1 deletion(-)

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
new file mode 100644
index 00000000000..22cd4621e74
--- /dev/null
+++ b/media-sound/scmpc/files/scmpc-0.4.1-fno-common.patch
@@ -0,0 +1,103 @@
+--- a/src/audioscrobbler.c
++++ b/src/audioscrobbler.c
+@@ -50,6 +50,9 @@
+ #define API_KEY "3ec5638071c41a864bf0c8d451566476"
+ #define API_SECRET "365e18391ccdee3bf820cb3d2ba466f6"
+ 
++static struct as_conn_t as_conn;
++gchar *buffer;
++
+ gboolean as_connection_init(void)
+ {
+ 	as_conn.handle = curl_easy_init();
+--- a/src/audioscrobbler.h
++++ b/src/audioscrobbler.h
+@@ -37,19 +37,19 @@
+ /**
+  * Last.fm connection data
+  */
+-struct {
++struct as_conn_t {
+ 	gchar *session_id;
+ 	gint64 last_auth;
+ 	gint64 last_fail;
+ 	connection_status status;
+ 	CURL *handle;
+ 	struct curl_slist *headers;
+-} as_conn;
++};
+ 
+ /**
+  * cURL data buffer
+  */
+-gchar *buffer;
++extern gchar *buffer;
+ 
+ /**
+  * Initialize cURL
+--- a/src/mpd.c
++++ b/src/mpd.c
+@@ -37,6 +37,8 @@
+ static gboolean mpd_parse(GIOChannel *source, GIOCondition condition,
+ 		gpointer data);
+ 
++struct mpd_t mpd;
++
+ gboolean mpd_connect(void)
+ {
+ 	mpd.conn = mpd_connection_new(prefs.mpd_hostname, prefs.mpd_port,
+--- a/src/mpd.h
++++ b/src/mpd.h
+@@ -32,7 +32,7 @@
+ /**
+  * MPD connection data
+  */
+-struct {
++struct mpd_t {
+ 	struct mpd_connection *conn;
+ 	struct mpd_status *status;
+ 	struct mpd_song *song;
+@@ -42,7 +42,9 @@
+ 	guint idle_source;
+ 	guint check_source;
+ 	guint reconnect_source;
+-} mpd;
++};
++
++extern struct mpd_t mpd;
+ 
+ /**
+  * Connect to MPD
+--- a/src/preferences.c
++++ b/src/preferences.c
+@@ -36,6 +36,8 @@
+ #include "scmpc.h"
+ #include "preferences.h"
+ 
++struct prefs_t prefs;
++
+ static gint cf_log_level(cfg_t *cfg, cfg_opt_t *opt, const gchar *value,
+ 		void *result);
+ static gint cf_validate_num(cfg_t *cfg, cfg_opt_t *opt);
+--- a/src/preferences.h
++++ b/src/preferences.h
+@@ -32,7 +32,7 @@
+ /**
+  * scmpc settings
+  */
+-struct {
++struct prefs_t {
+ 	gchar *mpd_hostname;
+ 	gushort mpd_port;
+ 	gushort mpd_timeout;
+@@ -48,7 +48,9 @@
+ 	gchar *cache_file;
+ 	guint queue_length;
+ 	guint cache_interval;
+-} prefs;
++};
++
++extern struct prefs_t prefs;
+ 
+ /**
+  * Initialize preferences

diff --git a/media-sound/scmpc/scmpc-0.4.1.ebuild b/media-sound/scmpc/scmpc-0.4.1.ebuild
index 7eee1b1aa5b..2b76d415553 100644
--- a/media-sound/scmpc/scmpc-0.4.1.ebuild
+++ b/media-sound/scmpc/scmpc-0.4.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -18,6 +18,9 @@ RDEPEND="
 	net-misc/curl:="
 DEPEND="${RDEPEND}"
 BDEPEND="virtual/pkgconfig"
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.4.1-fno-common.patch
+)
 
 src_install() {
 	default


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-19 10:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-19 10:10 [gentoo-commits] repo/gentoo:master commit in: media-sound/scmpc/files/, media-sound/scmpc/ Jeroen Roovers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox