Update to 0.4.0 and unbreak.

Remove qt4 build tools from run dependencies.

Approved by:	maintainer timeout (2 weeks)
This commit is contained in:
Max Brazhnikov 2009-05-24 10:10:52 +00:00
parent b423b81588
commit cd075b3021
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=234479
4 changed files with 69 additions and 15 deletions

View file

@ -6,28 +6,24 @@
#
PORTNAME= esperanza
PORTVERSION= 0.3
PORTREVISION= 2
PORTVERSION= 0.4.0
CATEGORIES= audio
MASTER_SITES= http://xmms2.xmms.se/~tru/esperanza/0.3/
MASTER_SITES= http://exodus.xmms.se/~tru/esperanza/0.4/
MAINTAINER= alexbl@FreeBSD.org
COMMENT= Advanced QT4 XMMS2 client
BUILD_DEPENDS= ${LOCALBASE}/lib/libxmmsclient++.so.3:${PORTSDIR}/audio/cpp-xmms2
RUN_DEPENDS= ${LOCALBASE}/lib/libxmmsclient++.so.3:${PORTSDIR}/audio/cpp-xmms2
BROKEN= does not build
LIB_DEPENDS= xmmsclient++.3:${PORTSDIR}/audio/cpp-xmms2
USE_QT_VER= 4
QT_COMPONENTS= gui moc qmake rcc uic xml network imageformats
QT_COMPONENTS= gui xml network imageformats_run \
qmake_build moc_build rcc_build uic_build
HAS_CONFIGURE= yes
QT_NONSTANDARD= yes
USE_GMAKE= yes
CONFIGURE_ARGS+=--prefix=${PREFIX} --disable-growl
MAKE_JOBS_SAFE= yes
PLIST_FILES= bin/esperanza
do-configure:
@cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} \
${QMAKE} -unix PREFIX=${PREFIX} esperanza.pro
.include <bsd.port.mk>

View file

@ -1,3 +1,3 @@
MD5 (esperanza-0.3.tar.gz) = 4a6c23d2e4f73af2d2143e1e0f5ea766
SHA256 (esperanza-0.3.tar.gz) = c365c22c0154f15a83951e287068faf0b862ae017a7b402ed34e0ca85cde3ae6
SIZE (esperanza-0.3.tar.gz) = 211618
MD5 (esperanza-0.4.0.tar.gz) = 0b97576cee5d89a58aef9a6754d3fb00
SHA256 (esperanza-0.4.0.tar.gz) = 81402074e03160cf2f093a31565b040bf2206f0c8e89b8d4088d1ecbcf519359
SIZE (esperanza-0.4.0.tar.gz) = 238337

View file

@ -0,0 +1,42 @@
diff --git a/src/lib/playlistmodel.cpp b/src/lib/playlistmodel.cpp
index 69a8d46..dab4967 100644
--- ./src/lib/playlistmodel.cpp
+++ ./src/lib/playlistmodel.cpp
@@ -27,6 +27,9 @@
#include "playlistmodel.h"
+// Used to check for Protocolversion at compiletime
+#include <xmmsc/xmmsc_idnumbers.h>
+
PlaylistModel::PlaylistModel (QObject *parent, XClient *client, const QString &name) : QAbstractItemModel (parent)
{
// m_columns.append ("#");
@@ -108,6 +111,19 @@ PlaylistModel::handle_pls_loaded (const std::string &name)
return true;
}
+#if (XMMS_IPC_PROTOCOL_VERSION > 10)
+bool
+PlaylistModel::handle_update_pos (const Xmms::Dict &posdict)
+{
+ QString changed_pl = XClient::stdToQ (posdict.get<std::string> ("name"));
+ if (changed_pl == m_name) {
+ uint32_t pos = posdict.get<uint32_t> ("position");
+ m_current_pos = pos;
+ emit dataChanged(index (pos, 0), index (pos, m_columns.size ()));
+ }
+ return true;
+}
+#else
bool
PlaylistModel::handle_update_pos (const uint32_t &pos)
{
@@ -115,6 +131,7 @@ PlaylistModel::handle_update_pos (const uint32_t &pos)
emit dataChanged(index (pos, 0), index (pos, m_columns.size ()));
return true;
}
+#endif
QList<QString>
PlaylistModel::columns () const

View file

@ -0,0 +1,16 @@
diff --git a/src/lib/playlistmodel.h b/src/lib/playlistmodel.h
index d4f6860..eb54660 100644
--- ./src/lib/playlistmodel.h
+++ ./src/lib/playlistmodel.h
@@ -128,7 +128,11 @@ class PlaylistModel : public QAbstractItemModel
private:
bool handle_list (const Xmms::List< unsigned int > &list);
bool handle_change (const Xmms::Dict &chg);
+#if (XMMS_IPC_PROTOCOL_VERSION > 10)
+ bool handle_update_pos (const Xmms::Dict &pos);
+#else
bool handle_update_pos (const unsigned int &pos);
+#endif
bool handle_pls_loaded (const std::string &);
bool handle_current_pls (const std::string &);