aboutsummaryrefslogtreecommitdiffstats
path: root/audio/xfmpc
diff options
context:
space:
mode:
authorolivierd <olivierd@FreeBSD.org>2015-01-11 00:31:39 +0800
committerolivierd <olivierd@FreeBSD.org>2015-01-11 00:31:39 +0800
commitcd702a02c2060efde09df510908c2d5edd339e9a (patch)
tree0150a82b17dfa7413c5acfee3223a259ecf14da6 /audio/xfmpc
parentf353d04d9e3d610087a4ac755830d4fbb49c99c0 (diff)
downloadfreebsd-ports-gnome-cd702a02c2060efde09df510908c2d5edd339e9a.tar.gz
freebsd-ports-gnome-cd702a02c2060efde09df510908c2d5edd339e9a.tar.zst
freebsd-ports-gnome-cd702a02c2060efde09df510908c2d5edd339e9a.zip
- Fix crash (use new GLib threads) [1]
- Unbreak build with Vala 0.26 (there are lot of warnings, because Xfmpc still uses Gtk2 code, deprecated since Vala 0.17.5) - Bump PORTREVISION PR: 195629 [1] Submitted by: Akhmichin Andrey
Diffstat (limited to 'audio/xfmpc')
-rw-r--r--audio/xfmpc/Makefile10
-rw-r--r--audio/xfmpc/files/config.vapi32
-rw-r--r--audio/xfmpc/files/patch-src_extended-interface.vala13
-rw-r--r--audio/xfmpc/files/patch-src_main-window.vala16
-rw-r--r--audio/xfmpc/files/patch-src_mpdclient.c68
-rw-r--r--audio/xfmpc/files/patch-src_playlist.vala13
6 files changed, 151 insertions, 1 deletions
diff --git a/audio/xfmpc/Makefile b/audio/xfmpc/Makefile
index 8de4deb7acb8..d990af3da1b6 100644
--- a/audio/xfmpc/Makefile
+++ b/audio/xfmpc/Makefile
@@ -3,7 +3,7 @@
PORTNAME= xfmpc
PORTVERSION= 0.2.2
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= audio xfce
MASTER_SITES= ${MASTER_SITE_XFCE}
MASTER_SITE_SUBDIR=/src/apps/${PORTNAME}/${PORTVERSION:R}
@@ -12,6 +12,7 @@ DIST_SUBDIR= xfce4
MAINTAINER= xfce@FreeBSD.org
COMMENT= Graphical MPD client focusing on low footprint
+BUILD_DEPENDS= valac:${PORTSDIR}/lang/vala
LIB_DEPENDS= libmpd.so:${PORTSDIR}/audio/libmpd
INSTALLS_ICONS= yes
@@ -20,4 +21,11 @@ GNU_CONFIGURE= yes
USE_GNOME= gtk20 intltool intlhack
USE_XFCE= configenv libmenu libutil
+post-extract:
+ ${CP} ${FILESDIR}/config.vapi ${WRKSRC}/src
+
+post-patch:
+ ${FIND} ${WRKSRC} -type f -name 'Makefile.in' | \
+ ${XARGS} ${REINPLACE_CMD} 's|@VALAC@|${LOCALBASE}/bin/valac|'
+
.include <bsd.port.mk>
diff --git a/audio/xfmpc/files/config.vapi b/audio/xfmpc/files/config.vapi
new file mode 100644
index 000000000000..0c27101252bd
--- /dev/null
+++ b/audio/xfmpc/files/config.vapi
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2009-2010 Mike Massonnet <mmassonnet@xfce.org>
+ * Copyright (c) 2009-2010 Vincent Legout <vincent@xfce.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+[CCode (cprefix="", lower_case_prefix="", cheader_filename="config.h")]
+namespace Config {
+ [CCode (cname = "GETTEXT_PACKAGE")]
+ public const string GETTEXT_PACKAGE;
+ [CCode (cname = "PACKAGE_LOCALE_DIR")]
+ public const string PACKAGE_LOCALE_DIR;
+ [CCode (cname = "PACKAGE_VERSION")]
+ public const string PACKAGE_VERSION;
+ [CCode (cname = "PACKAGE_STRING")]
+ public const string PACKAGE_STRING;
+ [CCode (cname = "PACKAGE_NAME")]
+ public const string PACKAGE_NAME;
+}
diff --git a/audio/xfmpc/files/patch-src_extended-interface.vala b/audio/xfmpc/files/patch-src_extended-interface.vala
new file mode 100644
index 000000000000..50bc1585b064
--- /dev/null
+++ b/audio/xfmpc/files/patch-src_extended-interface.vala
@@ -0,0 +1,13 @@
+Fix ambiguity between GLib.Menu and Gtk.Menu (bug #8922)
+
+--- src/extended-interface.vala.orig 2011-10-23 13:55:52 UTC
++++ src/extended-interface.vala
+@@ -197,7 +197,7 @@ namespace Xfmpc {
+ this.context_menu.show_all ();
+ }
+
+- private void menu_detach (Widget attach_widget, Menu menu) {
++ private void menu_detach (Gtk.Widget attach_widget, Gtk.Menu menu) {
+ }
+
+ /*
diff --git a/audio/xfmpc/files/patch-src_main-window.vala b/audio/xfmpc/files/patch-src_main-window.vala
new file mode 100644
index 000000000000..852fd233daef
--- /dev/null
+++ b/audio/xfmpc/files/patch-src_main-window.vala
@@ -0,0 +1,16 @@
+main-window.vala:135.4-135.10: error: `Timeout' is an ambiguous reference
+between `GLib.Timeout' and `Gtk.Timeout'
+ Timeout.add (1000, refresh);
+ ^^^^^^^
+
+--- src/main-window.vala.orig 2011-10-23 15:08:38 UTC
++++ src/main-window.vala
+@@ -132,7 +132,7 @@ namespace Xfmpc {
+ this.preferences.notify["show-statusbar"].connect (cb_show_statusbar_changed);
+
+ /* === Timeout === */
+- Timeout.add (1000, refresh);
++ GLib.Timeout.add (1000, refresh);
+ }
+
+ private void show_hide_status_icon () {
diff --git a/audio/xfmpc/files/patch-src_mpdclient.c b/audio/xfmpc/files/patch-src_mpdclient.c
new file mode 100644
index 000000000000..4e7d3b085b25
--- /dev/null
+++ b/audio/xfmpc/files/patch-src_mpdclient.c
@@ -0,0 +1,68 @@
+--- src/mpdclient.c.orig 2011-02-01 18:13:51 UTC
++++ src/mpdclient.c
+@@ -106,7 +106,7 @@ struct _XfmpcMpdclientPrivate
+ gboolean env_cached;
+ gboolean connecting;
+ guint connection_count;
+- GMutex *mutex;
++ GMutex mutex;
+ };
+
+
+@@ -275,8 +275,7 @@ xfmpc_mpdclient_init (XfmpcMpdclient *mp
+
+ priv->mi = mpd_new_default ();
+
+- if (!g_thread_supported ()) g_thread_init (NULL);
+- priv->mutex = g_mutex_new ();
++ g_mutex_init (&priv->mutex);
+
+ mpd_signal_connect_status_changed (priv->mi, (StatusChangedCallback)cb_status_changed, mpdclient);
+ }
+@@ -288,7 +287,7 @@ xfmpc_mpdclient_finalize (GObject *objec
+ XfmpcMpdclientPrivate *priv = XFMPC_MPDCLIENT (mpdclient)->priv;
+
+ mpd_free (priv->mi);
+- g_mutex_free (priv->mutex);
++ g_mutex_clear (&priv->mutex);
+
+ (*G_OBJECT_CLASS (parent_class)->finalize) (object);
+ }
+@@ -389,8 +388,6 @@ xfmpc_mpdclient_connect_thread (XfmpcMpd
+
+ priv->connecting = FALSE;
+
+- g_mutex_unlock (priv->mutex);
+-
+ return NULL;
+ }
+
+@@ -405,7 +402,7 @@ xfmpc_mpdclient_connect (XfmpcMpdclient
+ return TRUE;
+
+ /* return FALSE if a we are already trying to connect to mpd */
+- if (!g_mutex_trylock (priv->mutex))
++ if (!g_mutex_trylock (&priv->mutex))
+ {
+ g_warning ("Already connecting to mpd");
+ return FALSE;
+@@ -413,8 +410,8 @@ xfmpc_mpdclient_connect (XfmpcMpdclient
+
+ priv->connecting = TRUE;
+
+- thread = g_thread_create ((GThreadFunc) xfmpc_mpdclient_connect_thread,
+- mpdclient, TRUE, NULL);
++ thread = g_thread_new ("0", (GThreadFunc) xfmpc_mpdclient_connect_thread,
++ mpdclient);
+
+ while (priv->connecting)
+ {
+@@ -427,6 +424,8 @@ xfmpc_mpdclient_connect (XfmpcMpdclient
+
+ g_signal_emit (mpdclient, signals[SIG_CONNECTED], 0);
+
++ g_mutex_unlock (&priv->mutex);
++
+ return TRUE;
+ }
+
diff --git a/audio/xfmpc/files/patch-src_playlist.vala b/audio/xfmpc/files/patch-src_playlist.vala
new file mode 100644
index 000000000000..4faf7ff11414
--- /dev/null
+++ b/audio/xfmpc/files/patch-src_playlist.vala
@@ -0,0 +1,13 @@
+Fix ambiguity between GLib.Menu and Gtk.Menu (bug #8922)
+
+--- src/playlist.vala.orig 2011-10-23 15:02:51 UTC
++++ src/playlist.vala
+@@ -98,7 +98,7 @@ namespace Xfmpc {
+ new Gtk.Adjustment (0, 0, 0, 0, 0, 0));
+ scrolled.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.ALWAYS);
+
+- this.menu = new Menu ();
++ this.menu = new Gtk.Menu ();
+
+ var mi = new Gtk.ImageMenuItem.from_stock (Gtk.Stock.REMOVE, null);
+ this.menu.append (mi);