pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/rhythmbox Add HAL and ipod support; tested with ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/66f9e7aec6ae
branches:  trunk
changeset: 552091:66f9e7aec6ae
user:      jmcneill <jmcneill%pkgsrc.org@localhost>
date:      Fri Dec 26 15:35:51 2008 +0000

description:
Add HAL and ipod support; tested with an iPod Shuffle and a PSP-2000.

diffstat:

 audio/rhythmbox/Makefile         |  26 +++++++++++++----
 audio/rhythmbox/PLIST            |   6 +++-
 audio/rhythmbox/distinfo         |   3 +-
 audio/rhythmbox/patches/patch-ae |  57 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 83 insertions(+), 9 deletions(-)

diffs (167 lines):

diff -r b92a471c44e3 -r 66f9e7aec6ae audio/rhythmbox/Makefile
--- a/audio/rhythmbox/Makefile  Fri Dec 26 15:33:03 2008 +0000
+++ b/audio/rhythmbox/Makefile  Fri Dec 26 15:35:51 2008 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.58 2008/10/29 01:39:57 wiz Exp $
+# $NetBSD: Makefile,v 1.59 2008/12/26 15:35:51 jmcneill Exp $
 #
 
 DISTNAME=      rhythmbox-0.11.6
+PKGREVISION=   1
 CATEGORIES=    audio gnome
 MASTER_SITES=  ${MASTER_SITE_GNOME:=sources/rhythmbox/0.11/}
 EXTRACT_SUFX=  .tar.bz2
@@ -12,6 +13,13 @@
 
 PKG_DESTDIR_SUPPORT=   user-destdir
 
+PKG_OPTIONS_VAR=       rhythmbox
+PKG_SUPPORTED_OPTIONS= hal
+PKG_SUGGESTED_OPTIONS= hal
+PLIST_VARS+=           ${PKG_SUPPORTED_OPTIONS}
+
+.include "../../mk/bsd.options.mk"
+
 GNU_CONFIGURE=         YES
 USE_DIRS+=             gnome2-1.5
 USE_TOOLS+=            gmake intltool msgfmt pkg-config
@@ -20,10 +28,18 @@
 
 CONFIGURE_ARGS+=       --disable-python
 CONFIGURE_ARGS+=       --with-html-dir=${PREFIX}/share/doc
-# need newer HAL
-#CONFIGURE_ARGS+=      --with-ipod
+.if !empty(PKG_OPTIONS:Mhal)
+CONFIGURE_ARGS+=       --with-ipod
+.include "../../audio/libgpod/buildlink3.mk"
+# needs a newer libmtp
 #CONFIGURE_ARGS+=      --with-mtp
+#.include "../../devel/libmtp/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-hal
+PLIST.hal=             yes
+.include "../../sysutils/hal/buildlink3.mk"
+.else
 CONFIGURE_ARGS+=       --without-hal
+.endif
 
 GCONF_SCHEMAS=         rhythmbox.schemas
 
@@ -31,16 +47,12 @@
 BUILDLINK_API_DEPENDS.musicbrainz+=    musicbrainz>=2.1.0
 BUILDLINK_API_DEPENDS.totem+=          {totem,totem-xine}>=1.1.5
 
-# needs newer HAL
-#.include "../../audio/libgpod/buildlink3.mk"
 .include "../../audio/musicbrainz/buildlink3.mk"
 .include "../../devel/GConf/schemas.mk"
 .include "../../devel/gettext-lib/buildlink3.mk"
 .include "../../devel/glib2/buildlink3.mk"
 .include "../../devel/libglade/buildlink3.mk"
 .include "../../devel/libgnomeui/buildlink3.mk"
-# needs newer HAL
-#.include "../../devel/libmtp/buildlink3.mk"
 .include "../../devel/libsexy/buildlink3.mk"
 .include "../../graphics/hicolor-icon-theme/buildlink3.mk"
 .include "../../multimedia/gnome-media/buildlink3.mk"
diff -r b92a471c44e3 -r 66f9e7aec6ae audio/rhythmbox/PLIST
--- a/audio/rhythmbox/PLIST     Fri Dec 26 15:33:03 2008 +0000
+++ b/audio/rhythmbox/PLIST     Fri Dec 26 15:35:51 2008 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.17 2008/10/29 01:39:57 wiz Exp $
+@comment $NetBSD: PLIST,v 1.18 2008/12/26 15:35:51 jmcneill Exp $
 bin/rhythmbox
 bin/rhythmbox-client
 lib/librhythmbox-core.la
@@ -21,6 +21,9 @@
 lib/rhythmbox/plugins/generic-player/generic-player-ui.xml
 lib/rhythmbox/plugins/generic-player/generic-player.rb-plugin
 lib/rhythmbox/plugins/generic-player/libgeneric-player.la
+${PLIST.hal}lib/rhythmbox/plugins/ipod/ipod-ui.xml
+${PLIST.hal}lib/rhythmbox/plugins/ipod/ipod.rb-plugin
+${PLIST.hal}lib/rhythmbox/plugins/ipod/libipod.la
 lib/rhythmbox/plugins/iradio/iradio-initial.pls
 lib/rhythmbox/plugins/iradio/iradio-ui.xml
 lib/rhythmbox/plugins/iradio/iradio.rb-plugin
@@ -460,6 +463,7 @@
 @dirrm lib/rhythmbox/plugins/power-manager
 @dirrm lib/rhythmbox/plugins/mmkeys
 @dirrm lib/rhythmbox/plugins/iradio
+${PLIST.hal}@dirrm lib/rhythmbox/plugins/ipod
 @dirrm lib/rhythmbox/plugins/generic-player
 @dirrm lib/rhythmbox/plugins/daap
 @dirrm lib/rhythmbox/plugins/cd-recorder
diff -r b92a471c44e3 -r 66f9e7aec6ae audio/rhythmbox/distinfo
--- a/audio/rhythmbox/distinfo  Fri Dec 26 15:33:03 2008 +0000
+++ b/audio/rhythmbox/distinfo  Fri Dec 26 15:35:51 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2008/10/29 01:39:57 wiz Exp $
+$NetBSD: distinfo,v 1.23 2008/12/26 15:35:51 jmcneill Exp $
 
 SHA1 (rhythmbox-0.11.6.tar.bz2) = 4364447bd4f6fb0e969039213cea37d6d3e4fb58
 RMD160 (rhythmbox-0.11.6.tar.bz2) = 3fd6b8595705a91c779c458a26333575ba5e2233
@@ -6,3 +6,4 @@
 SHA1 (patch-aa) = fa82e1d8176f4ee0b82e8fc307d506444ae22600
 SHA1 (patch-ac) = c2cad1c4b074910797a21117f6809d8e00d12f30
 SHA1 (patch-ad) = 64139d56a250543b82d5d5586f58f38912a2cdc4
+SHA1 (patch-ae) = a8c940cc300d49a2908aec4568b5ff2ad9131dc3
diff -r b92a471c44e3 -r 66f9e7aec6ae audio/rhythmbox/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/rhythmbox/patches/patch-ae  Fri Dec 26 15:35:51 2008 +0000
@@ -0,0 +1,57 @@
+$NetBSD: patch-ae,v 1.5 2008/12/26 15:35:51 jmcneill Exp $
+
+From http://svn.gnome.org/viewvc/rhythmbox?view=revision&revision=5992
+
+--- plugins/generic-player/rb-generic-player-source.c  2008/10/01 19:28:24     5961
++++ plugins/generic-player/rb-generic-player-source.c  2008/10/23 11:50:40     5992
+@@ -824,21 +824,43 @@
+               char *udi = get_hal_udi_for_player (ctx, mount);
+               if (udi != NULL) {
+                       DBusError error;
++                      char **proplist;
+                       char *prop;
+ 
+                       rb_debug ("Checking udi %s", udi);
+                       /* check that it can be accessed as mass-storage */
+                       dbus_error_init (&error);
+-                      prop = libhal_device_get_property_string (ctx, udi, "portable_audio_player.access_method", &error);
+-                      if (prop != NULL && strcmp (prop, "storage") == 0 && !dbus_error_is_set (&error)) {
+-                              /* the device has passed all tests, so it should be a usable player */
+-                              result = TRUE;
+-                      } else {
++                      proplist = libhal_device_get_property_strlist (ctx, udi, "portable_audio_player.access_method.protocols", &error);
++                      if (proplist != NULL && !dbus_error_is_set (&error)) {
++                              int i;
++                              for (i = 0; proplist[i] != NULL; i++) {
++                                      rb_debug ("device access method: %s", proplist[i]);
++                                      if (strcmp (proplist[i], "storage") == 0) {
++                                              result = TRUE;
++                                              break;
++                                      }
++                              }
++
++                              libhal_free_string_array (proplist);
++                      }
++                      free_dbus_error ("checking device access method", &error);
++
++                      if (result == FALSE) {
++                              dbus_error_init (&error);
++                              prop = libhal_device_get_property_string (ctx, udi, "portable_audio_player.access_method", &error);
++                              if (prop != NULL && strcmp (prop, "storage") == 0 && !dbus_error_is_set (&error)) {
++                                      /* the device has passed all tests, so it should be a usable player */
++                                      result = TRUE;
++                              }
++
++                              libhal_free_string (prop);
++                              free_dbus_error ("checking device access method", &error);
++                      }
++
++                      if (result == FALSE) {
+                               rb_debug ("device cannot be accessed via storage");
+                       }
+-                      libhal_free_string (prop);
+ 
+-                      free_dbus_error ("checking device access method", &error);
+               } else {
+                       rb_debug ("device is not an audio player");
+               }



Home | Main Index | Thread Index | Old Index