Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jan 2015 16:31:40 +0000 (UTC)
From:      Olivier Duchateau <olivierd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r376716 - in head/audio/xfmpc: . files
Message-ID:  <201501101631.t0AGVehb031538@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: olivierd
Date: Sat Jan 10 16:31:39 2015
New Revision: 376716
URL: https://svnweb.freebsd.org/changeset/ports/376716
QAT: https://qat.redports.org/buildarchive/r376716/

Log:
  - 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

Added:
  head/audio/xfmpc/files/
  head/audio/xfmpc/files/config.vapi   (contents, props changed)
  head/audio/xfmpc/files/patch-src_extended-interface.vala   (contents, props changed)
  head/audio/xfmpc/files/patch-src_main-window.vala   (contents, props changed)
  head/audio/xfmpc/files/patch-src_mpdclient.c   (contents, props changed)
  head/audio/xfmpc/files/patch-src_playlist.vala   (contents, props changed)
Modified:
  head/audio/xfmpc/Makefile

Modified: head/audio/xfmpc/Makefile
==============================================================================
--- head/audio/xfmpc/Makefile	Sat Jan 10 16:16:58 2015	(r376715)
+++ head/audio/xfmpc/Makefile	Sat Jan 10 16:31:39 2015	(r376716)
@@ -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>

Added: head/audio/xfmpc/files/config.vapi
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/xfmpc/files/config.vapi	Sat Jan 10 16:31:39 2015	(r376716)
@@ -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;
+}

Added: head/audio/xfmpc/files/patch-src_extended-interface.vala
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/xfmpc/files/patch-src_extended-interface.vala	Sat Jan 10 16:31:39 2015	(r376716)
@@ -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) {
+ 		}
+ 
+ 		/*

Added: head/audio/xfmpc/files/patch-src_main-window.vala
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/xfmpc/files/patch-src_main-window.vala	Sat Jan 10 16:31:39 2015	(r376716)
@@ -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 () {

Added: head/audio/xfmpc/files/patch-src_mpdclient.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/xfmpc/files/patch-src_mpdclient.c	Sat Jan 10 16:31:39 2015	(r376716)
@@ -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;
+ }
+ 

Added: head/audio/xfmpc/files/patch-src_playlist.vala
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/xfmpc/files/patch-src_playlist.vala	Sat Jan 10 16:31:39 2015	(r376716)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501101631.t0AGVehb031538>