summaryrefslogtreecommitdiff
path: root/media-plugins/gkrellmpc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-16 17:34:21 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-16 17:34:21 +0000
commit02e2208f46f4e2c00fb9743cbc47350bdd233bfa (patch)
tree132dd60828854db4f65f30f9230f43d9602507ff /media-plugins/gkrellmpc
parent8be70107efbb417f839292165ee39d07a062046f (diff)
gentoo resync : 16.01.2018
Diffstat (limited to 'media-plugins/gkrellmpc')
-rw-r--r--media-plugins/gkrellmpc/Manifest1
-rw-r--r--media-plugins/gkrellmpc/files/gkrellmpc-0.1_beta9-mt.patch152
2 files changed, 0 insertions, 153 deletions
diff --git a/media-plugins/gkrellmpc/Manifest b/media-plugins/gkrellmpc/Manifest
index 9d5d0b02187c..2c02679119a3 100644
--- a/media-plugins/gkrellmpc/Manifest
+++ b/media-plugins/gkrellmpc/Manifest
@@ -1,5 +1,4 @@
AUX gkrellmpc-0.1_beta10-mt.patch 4392 BLAKE2B 2a249c576091573c4f5c92f622b0d9ac1a8ffb1a38c0b4a6f8b1d475ea2db85c1358deaec8ac72570d09379167f63deb5a947711928ab86525a7eeb5980b7b9d SHA512 5928192cde4513470f9af952d6aa8a3b5044a6bdcc8aead26420a2cc7e9ed21dd3ac0043a5d481559c6eaad770de54c44b6d5395efb1baa2de80bc26d2536cdb
-AUX gkrellmpc-0.1_beta9-mt.patch 4427 BLAKE2B e3aea0f5a15cf589dd614a4080c38c04a39bf590cab23d1986fea74d05826582c97877d824f670e222e887257a2f4fe147c175d8aa9a505ede2e1aae3e181761 SHA512 0bf96cba88e6b2596b86318f72a87842d0641068a18bb3a07a9b5654296322bb12e58f281e8ab412e2f9a4c6fc5e0aef9714e91b97ec41d41c39cf5ec720b09b
DIST gkrellmpc-0.1_beta10.tar.gz 25388 BLAKE2B 2e3c97e7d5887e1c3ea6a693cde19470e476943658de607266aac9a3ecbc2a5215fcc266638909d2ad024f303adb19475504ea4f7b79b3e97f566d90899721d3 SHA512 f5d687264f08146bf1eb54aee6d42a200fb97008a355d26a68be91b04e4bd622fc222725bf498c0837eacb8b94d6aede5aa1a05ed504fe5f9b790a9cd08d3973
EBUILD gkrellmpc-0.1_beta10.ebuild 859 BLAKE2B 89421c770f6ced3a94022a4a3659b9a180644431c395145b4093e7b3177f40933c22bfb6bc6cee152a41c8841a9339507ffcda64f9976c3ab50c7941946c1471 SHA512 37bbf33f883dd373f490e947030c4dcf4d92fdbbf0d8d79cbe17795e085def544e05e3c8016e53eff7eb6e94276aebb59bb0b630a2eecb2afccc446b5a61bad4
MISC metadata.xml 346 BLAKE2B d69895932fc6b3694132354e64a117da6105daa64ba1cb40a41ea2597f96c3e548c02196b2fda8256ef7813ab71d2b668b0d83e89caef95d4ae444a884668fe6 SHA512 119190e5845f3d61be09d34f525870e139c566f3ec4838c23425b764dd1c53507286c55d437e620d4e9958e195dfd58bc778cca58afc97cb4b52c76ba05f56c0
diff --git a/media-plugins/gkrellmpc/files/gkrellmpc-0.1_beta9-mt.patch b/media-plugins/gkrellmpc/files/gkrellmpc-0.1_beta9-mt.patch
deleted file mode 100644
index 4de5688a2b5e..000000000000
--- a/media-plugins/gkrellmpc/files/gkrellmpc-0.1_beta9-mt.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-diff -uNr gkrellmpc-0.1_beta9/gkrellmpc.c gkrellmpc-0.1_beta9.mine/gkrellmpc.c
---- gkrellmpc-0.1_beta9/gkrellmpc.c 2005-01-05 22:33:16.000000000 +0300
-+++ gkrellmpc-0.1_beta9.mine/gkrellmpc.c 2009-04-05 19:51:12.000000000 +0400
-@@ -132,7 +132,7 @@
- /* Create the status decal */
- mpc_status_decal = gkrellm_create_decal_pixmap(mpc_panel, gkrellm_decal_misc_pixmap(), gkrellm_decal_misc_mask(), N_MISC_DECALS, style, 0, t);
- mpc_status_decal->x = w - mpc_status_decal->w;
-- gkrellm_draw_decal_pixmap(mpc_panel, mpc_status_decal, (mpc_mpd ? D_MISC_LED1 : D_MISC_LED0));
-+ gkrellm_draw_decal_pixmap(mpc_panel, mpc_status_decal, (mpc_mpd_connected() ? D_MISC_LED1 : D_MISC_LED0));
-
- /* Update t */
- t += mpc_label_decal->h > mpc_status_decal->h ? mpc_label_decal->h : mpc_status_decal->h;
-@@ -254,7 +254,7 @@
- static gint x_scroll;
-
- /* Try to connect to mpd */
-- if (!mpc_mpd && mpc_ticker->ten_second_tick) {
-+ if (!mpc_mpd_connected() && mpc_ticker->ten_second_tick) {
- mpc_mpd_connect();
- }
-
-@@ -428,7 +428,7 @@
- status = mpc_mpd_get("status\n");
- currentsong = mpc_mpd_get("currentsong\n");
-
-- if (!mpc_mpd) {
-+ if (!mpc_mpd_connected()) {
- mpc_update_label("NO MPD");
- mpc_update_songname("");
- }
-diff -uNr gkrellmpc-0.1_beta9/mpd.c gkrellmpc-0.1_beta9.mine/mpd.c
---- gkrellmpc-0.1_beta9/mpd.c 2005-01-05 22:33:16.000000000 +0300
-+++ gkrellmpc-0.1_beta9.mine/mpd.c 2009-04-05 20:30:38.000000000 +0400
-@@ -12,18 +12,32 @@
- #include <sys/socket.h>
- #include <netdb.h>
-
-+#include <errno.h>
-+#include <pthread.h>
-+
- GIOChannel * mpc_mpd = NULL;
-+pthread_mutex_t mpc_mutex = { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0 } } }; //PTHREAD_MUTEX_INITIALIZER;
-+
-+gboolean mpc_mpd_connected() {
-+ if(pthread_mutex_trylock(&mpc_mutex)){
-+ return (FALSE);
-+ }
-+ pthread_mutex_unlock(&mpc_mutex);
-+ return (gboolean)mpc_mpd;
-+}
-
- /*
- * Connects to the MPD server, sets up the mpd object, sets the status decal to ON
- */
--gboolean mpc_mpd_connect() {
-+void* mpc_mpd_connect_worker(void* arg) {
- int sockfd;
- struct hostent *server;
- struct sockaddr_in serv_addr;
- gchar * line;
- gchar ** parts;
- gboolean retval;
-+
-+ pthread_mutex_lock(&mpc_mutex);
-
- if (mpc_mpd) {
- /*
-@@ -33,11 +47,11 @@
- }
-
- if (!mpc_conf_hostname || !mpc_conf_port) {
-- return (FALSE);
-+ goto err;
- }
-
-- if ((sockfd = socket(PF_INET, SOCK_STREAM, 0)) == -1) return(FALSE);
-- if (!(server = gethostbyname(mpc_conf_hostname))) return(FALSE);
-+ if ((sockfd = socket(PF_INET, SOCK_STREAM, 0)) == -1) goto err;
-+ if (!(server = gethostbyname(mpc_conf_hostname))) goto err;
-
- bzero((char *) &serv_addr, sizeof(serv_addr));
- serv_addr.sin_family = AF_INET;
-@@ -46,7 +60,7 @@
- server->h_length);
- serv_addr.sin_port = htons(mpc_conf_port);
-
-- if (connect(sockfd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0) return(FALSE);
-+ if (connect(sockfd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0) goto err;
-
- /* Getup the mpd object */
- mpc_mpd = g_io_channel_unix_new(sockfd);
-@@ -72,29 +86,40 @@
- retval = FALSE;
- }
-
-- if (retval) {
-- gkrellm_draw_decal_pixmap(mpc_panel, mpc_status_decal, D_MISC_LED1);
-- mpc_update_label("MPD");
-- mpc_update_songname("");
-- }
-
-- return(retval);
-+err:
-+ pthread_mutex_unlock(&mpc_mutex);
-+ return NULL;
-+}
-+
-+gboolean mpc_mpd_connect() {
-+ pthread_attr_t attr;
-+ pthread_t thread_id;
-+
-+ if(pthread_mutex_trylock(&mpc_mutex)){
-+ return (FALSE);
-+ }
-+
-+ pthread_attr_init(&attr);
-+ pthread_create(&thread_id, &attr, mpc_mpd_connect_worker, NULL);
-+
-+ pthread_mutex_unlock(&mpc_mutex);
-+
-+ return (FALSE);
- }
-
- /*
- * Disconnects from MPD, destroys the mpd object, sets the status decal to off
- */
- gboolean mpc_mpd_disconnect() {
--
-+ pthread_mutex_lock(&mpc_mutex);
- if (mpc_mpd) {
- g_io_channel_shutdown(mpc_mpd, FALSE, NULL);
- free(mpc_mpd);
- mpc_mpd = NULL;
- }
-
-- gkrellm_draw_decal_pixmap(mpc_panel, mpc_status_decal, D_MISC_LED0);
-- mpc_update_label("NO MPD");
-- mpc_update_songname("");
-+ pthread_mutex_unlock(&mpc_mutex);
- return (TRUE);
- }
-
-diff -uNr gkrellmpc-0.1_beta9/mpd.h gkrellmpc-0.1_beta9.mine/mpd.h
---- gkrellmpc-0.1_beta9/mpd.h 2005-01-05 22:33:16.000000000 +0300
-+++ gkrellmpc-0.1_beta9.mine/mpd.h 2009-04-05 19:51:25.000000000 +0400
-@@ -10,5 +10,6 @@
- gboolean mpc_mpd_do(gchar *);
- GHashTable * mpc_mpd_get(gchar *);
- GPtrArray * mpc_mpd_get_clumps(gchar *, gboolean);
-+gboolean mpc_mpd_connected();
-
- #endif