aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2009-02-16 15:28:02 +0800
committermarcus <marcus@FreeBSD.org>2009-02-16 15:28:02 +0800
commit58c79af14e4db3538459c571001efa7e84f0dba3 (patch)
treec2d8dff9b144f5aed7963dee0a9b24e3cfb9a8e4 /audio
parentdf903b2cd74a9e513540f66c6d31eb3703cb466c (diff)
downloadfreebsd-ports-gnome-58c79af14e4db3538459c571001efa7e84f0dba3.tar.gz
freebsd-ports-gnome-58c79af14e4db3538459c571001efa7e84f0dba3.tar.zst
freebsd-ports-gnome-58c79af14e4db3538459c571001efa7e84f0dba3.zip
Add optional libmtp support, and fix the build when it is enabled.
PR: 131712 Submitted by: "Junji NAKANISHI" <jun-g@daemonfreaks.com> (build fix)
Diffstat (limited to 'audio')
-rw-r--r--audio/rhythmbox-devel/Makefile10
-rw-r--r--audio/rhythmbox-devel/files/patch-plugins_mtpdevice_rb-mtp-source.c20
-rw-r--r--audio/rhythmbox-devel/pkg-plist4
3 files changed, 34 insertions, 0 deletions
diff --git a/audio/rhythmbox-devel/Makefile b/audio/rhythmbox-devel/Makefile
index bf70dfe52fbc..c3cc5cd2fb1f 100644
--- a/audio/rhythmbox-devel/Makefile
+++ b/audio/rhythmbox-devel/Makefile
@@ -50,6 +50,7 @@ OPTIONS= DAAP "Enable iTunes music sharing" off \
NOTIFY "Enable libnotify support" on \
VORBIS "Enable Ogg/Vorbis support" on \
LIRC "Enable Infrared syncing support" off \
+ MTP "Enable Microsoft's Media Transfer Protocol support" off \
GECKO_PLUGIN "Enable iTunes browser plugin" on
# GDA "Enable GDA database storage" off
@@ -83,6 +84,15 @@ CONFIGURE_ARGS+=--disable-lirc
PLIST_SUB+= LIRC="@comment "
.endif
+.if defined(WITH_MTP)
+LIB_DEPENDS+= mtp.8:${PORTSDIR}/audio/libmtp
+PLIST_SUB+= MTP=""
+CONFIGURE_ARGS+= --with-mtp
+.else
+CONFIGURE_ARGS+= --without-mtp
+PLIST_SUB+= MTP="@comment "
+.endif
+
.if defined(WITH_DAAP)
CONFIGURE_ARGS+= --enable-daap --with-mdns=avahi
LIB_DEPENDS+= avahi-client:${PORTSDIR}/net/avahi-app \
diff --git a/audio/rhythmbox-devel/files/patch-plugins_mtpdevice_rb-mtp-source.c b/audio/rhythmbox-devel/files/patch-plugins_mtpdevice_rb-mtp-source.c
new file mode 100644
index 000000000000..8dc96631aff8
--- /dev/null
+++ b/audio/rhythmbox-devel/files/patch-plugins_mtpdevice_rb-mtp-source.c
@@ -0,0 +1,20 @@
+--- plugins/mtpdevice/rb-mtp-source.c.orig 2009-02-15 22:33:07.000000000 +0900
++++ plugins/mtpdevice/rb-mtp-source.c 2009-02-15 22:35:14.000000000 +0900
+@@ -357,7 +357,7 @@
+
+ g_assert (db != NULL);
+
+- tracks = LIBMTP_Get_Tracklisting (priv->device);
++ tracks = LIBMTP_Get_Tracklisting_With_Callback (priv->device, NULL, NULL);
+ if (tracks != NULL) {
+ LIBMTP_track_t *track, *tmp = NULL;
+ for (track = tracks; track != NULL; track = track->next) {
+@@ -714,7 +714,7 @@
+ trackmeta->filetype = mimetype_to_filetype (mimetype);
+ }
+
+- if (LIBMTP_Send_Track_From_File (device, filename, trackmeta, NULL, NULL, 0) != 0) {
++ if (LIBMTP_Send_Track_From_File (device, filename, trackmeta, NULL, NULL) != 0) {
+ LIBMTP_destroy_track_t (trackmeta);
+ rb_debug ("Tracktransfer failed\n");
+ return NULL;
diff --git a/audio/rhythmbox-devel/pkg-plist b/audio/rhythmbox-devel/pkg-plist
index d7d13860228d..9a203ec1abae 100644
--- a/audio/rhythmbox-devel/pkg-plist
+++ b/audio/rhythmbox-devel/pkg-plist
@@ -138,6 +138,10 @@ lib/rhythmbox/plugins/mmkeys/libmmkeys.a
lib/rhythmbox/plugins/mmkeys/libmmkeys.la
lib/rhythmbox/plugins/mmkeys/libmmkeys.so
lib/rhythmbox/plugins/mmkeys/mmkeys.rb-plugin
+%%MTP%%lib/rhythmbox/plugins/mtpdevice/libmtpdevice.a
+%%MTP%%lib/rhythmbox/plugins/mtpdevice/libmtpdevice.la
+%%MTP%%lib/rhythmbox/plugins/mtpdevice/libmtpdevice.so
+%%MTP%%lib/rhythmbox/plugins/mtpdevice/mtpdevice.rb-plugin
lib/rhythmbox/plugins/power-manager/libpower-manager.a
lib/rhythmbox/plugins/power-manager/libpower-manager.la
lib/rhythmbox/plugins/power-manager/libpower-manager.so