Add libmtp option (default off). No change to default binary package, so

no PKGREVISION bump.
This commit is contained in:
wiz 2008-09-22 05:35:20 +00:00
parent 258aa86864
commit 5776f22fc0
4 changed files with 59 additions and 5 deletions

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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 );