summaryrefslogtreecommitdiff
path: root/audio/amarok
diff options
context:
space:
mode:
authorwiz <wiz>2008-09-22 05:35:20 +0000
committerwiz <wiz>2008-09-22 05:35:20 +0000
commit91b788f3f92b8d5dd214fbe011d1099f0f58aa27 (patch)
treef2ec4a64087b03b8444ca38c749ae3dd6e19d9c7 /audio/amarok
parent3cfbe4e610499e842e64be0e466b465fbe161a7c (diff)
downloadpkgsrc-91b788f3f92b8d5dd214fbe011d1099f0f58aa27.tar.gz
Add libmtp option (default off). No change to default binary package, so
no PKGREVISION bump.
Diffstat (limited to 'audio/amarok')
-rw-r--r--audio/amarok/PLIST4
-rw-r--r--audio/amarok/distinfo3
-rw-r--r--audio/amarok/options.mk11
-rw-r--r--audio/amarok/patches/patch-aa46
4 files changed, 59 insertions, 5 deletions
diff --git a/audio/amarok/PLIST b/audio/amarok/PLIST
index 2b5f9cad16b..fd934bfd5a9 100644
--- a/audio/amarok/PLIST
+++ b/audio/amarok/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.29 2008/08/15 12:52:57 wiz Exp $
+@comment $NetBSD: PLIST,v 1.30 2008/09/22 05:35:20 wiz Exp $
bin/amarok
bin/amarok_daapserver.rb
bin/amarok_libvisual
@@ -10,6 +10,7 @@ lib/kde3/libamarok_daap-mediadevice.la
lib/kde3/libamarok_generic-mediadevice.la
${PLIST.ipod}lib/kde3/libamarok_ipod-mediadevice.la
lib/kde3/libamarok_massstorage-device.la
+${PLIST.libmtp}lib/kde3/libamarok_mtp-mediadevice.la
lib/kde3/libamarok_nfs-device.la
lib/kde3/libamarok_smb-device.la
lib/kde3/libamarok_void-engine_plugin.la
@@ -927,6 +928,7 @@ share/kde/services/amarok_daap-mediadevice.desktop
share/kde/services/amarok_generic-mediadevice.desktop
${PLIST.ipod}share/kde/services/amarok_ipod-mediadevice.desktop
share/kde/services/amarok_massstorage-device.desktop
+${PLIST.libmtp}share/kde/services/amarok_mtp-mediadevice.desktop
share/kde/services/amarok_nfs-device.desktop
share/kde/services/amarok_smb-device.desktop
share/kde/services/amarok_void-engine_plugin.desktop
diff --git a/audio/amarok/distinfo b/audio/amarok/distinfo
index fbb462a33cb..4ab46b95654 100644
--- a/audio/amarok/distinfo
+++ b/audio/amarok/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.34 2008/08/15 12:52:57 wiz Exp $
+$NetBSD: distinfo,v 1.35 2008/09/22 05:35:20 wiz Exp $
SHA1 (amarok-1.4.10.tar.bz2) = cb0bebe99c6f4dc1b01601f2f3aee3a86da08fbd
RMD160 (amarok-1.4.10.tar.bz2) = f86c71dd0459e0cf1ff586cd6de240ca6501cf62
Size (amarok-1.4.10.tar.bz2) = 12812583 bytes
+SHA1 (patch-aa) = 53316f334f45a8a4780ae71061d528374a75cb5a
SHA1 (patch-ab) = 91097c1d901fb66c5c8e593005c462b1874f50bf
diff --git a/audio/amarok/options.mk b/audio/amarok/options.mk
index 3614ef3468e..f394d6d20de 100644
--- a/audio/amarok/options.mk
+++ b/audio/amarok/options.mk
@@ -1,11 +1,11 @@
-# $NetBSD: options.mk,v 1.5 2008/04/12 22:42:57 jlam Exp $
+# $NetBSD: options.mk,v 1.6 2008/09/22 05:35:20 wiz Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.amarok
-PKG_SUPPORTED_OPTIONS= libgpod mysql pgsql
+PKG_SUPPORTED_OPTIONS= libgpod libmtp mysql pgsql
.include "../../mk/bsd.options.mk"
-PLIST_VARS+= ipod
+PLIST_VARS+= ipod libmtp
.if !empty(PKG_OPTIONS:Mlibgpod)
PLIST.ipod= yes
@@ -14,6 +14,11 @@ BUILDLINK_API_DEPENDS.libgpod+= libgpod>=0.4.2
. include "../../audio/libgpod/buildlink3.mk"
.endif
+.if !empty(PKG_OPTIONS:Mlibmtp)
+PLIST.libmtp= yes
+. include "../../devel/libmtp/buildlink3.mk"
+.endif
+
.if !empty(PKG_OPTIONS:Mmysql)
CONFIGURE_ARGS+= --enable-mysql
. include "../../mk/mysql.buildlink3.mk"
diff --git a/audio/amarok/patches/patch-aa b/audio/amarok/patches/patch-aa
new file mode 100644
index 00000000000..3d513f26024
--- /dev/null
+++ b/audio/amarok/patches/patch-aa
@@ -0,0 +1,46 @@
+$NetBSD: patch-aa,v 1.14 2008/09/22 05:35:20 wiz Exp $
+
+--- amarok/src/mediadevice/mtp/mtpmediadevice.cpp.orig 2008-08-13 23:21:51.000000000 +0200
++++ amarok/src/mediadevice/mtp/mtpmediadevice.cpp
+@@ -293,12 +293,13 @@ MediaItem
+ parent_id = getDefaultParentId();
+ }
+ debug() << "Parent id : " << parent_id << endl;
++ trackmeta->parent_id = parent_id;
+
+ m_critical_mutex.lock();
+ debug() << "Sending track... " << bundle.url().path().utf8() << endl;
+ int ret = LIBMTP_Send_Track_From_File(
+ m_device, bundle.url().path().utf8(), trackmeta,
+- progressCallback, this, parent_id
++ progressCallback, this
+ );
+ m_critical_mutex.unlock();
+
+@@ -529,7 +530,7 @@ LIBMTP_album_t
+ for( MtpMediaItem *it = dynamic_cast<MtpMediaItem*>(items->first()); it; it = dynamic_cast<MtpMediaItem*>(items->next()) )
+ album_object->tracks[i++] = it->track()->id();
+ album_object->no_tracks = items->count();
+- ret = LIBMTP_Create_New_Album( m_device, album_object, 0 );
++ ret = LIBMTP_Create_New_Album( m_device, album_object );
+ if( ret != 0 )
+ {
+ debug() << "creating album failed : " << ret << endl;
+@@ -608,7 +609,7 @@ MtpMediaDevice::createFolder( const char
+ {
+ debug() << "Creating new folder '" << name << "' as a child of "<< parent_id << endl;
+ char *name_copy = qstrdup( name );
+- uint32_t new_folder_id = LIBMTP_Create_Folder( m_device, name_copy, parent_id );
++ uint32_t new_folder_id = LIBMTP_Create_Folder( m_device, name_copy, parent_id, 0 );
+ delete(name_copy);
+ debug() << "New folder ID: " << new_folder_id << endl;
+ if( new_folder_id == 0 )
+@@ -913,7 +914,7 @@ MtpMediaDevice::playlistFromItem( MtpMed
+ if( item->playlist()->id() == 0 )
+ {
+ debug() << "creating new playlist : " << metadata->name << endl;
+- int ret = LIBMTP_Create_New_Playlist( m_device, metadata, 0 );
++ int ret = LIBMTP_Create_New_Playlist( m_device, metadata );
+ if( ret == 0 )
+ {
+ item->playlist()->setId( metadata->playlist_id );