From d98a9d1a57880adcdf29d6a6273eb66f48cf5bae9d3e3f4841f3c98d46674e28 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Tue, 7 Aug 2012 12:27:55 +0000 Subject: [PATCH] Accepting request 130256 from home:dimstar:branches:GNOME:Factory Fix cdda support. 2nd part to fix bnc#774636 OBS-URL: https://build.opensuse.org/request/show/130256 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gvfs?expand=0&rev=149 --- gvfs-cdda.patch | 34 ++++++++++++++++++++++++++++++++++ gvfs.changes | 9 +++++++++ gvfs.spec | 7 +++++-- 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 gvfs-cdda.patch diff --git a/gvfs-cdda.patch b/gvfs-cdda.patch new file mode 100644 index 0000000..a6906bf --- /dev/null +++ b/gvfs-cdda.patch @@ -0,0 +1,34 @@ +diff --git a/daemon/gvfsbackendcdda.c b/daemon/gvfsbackendcdda.c +index 6f009c7..5abbbf1 100644 +--- a/daemon/gvfsbackendcdda.c ++++ b/daemon/gvfsbackendcdda.c +@@ -169,11 +169,11 @@ fetch_metadata (GVfsBackendCdda *cdda_backend) + if (!cdio) + return; + +- cdtext = cdio_get_cdtext(cdio, 0); ++ cdtext = cdio_get_cdtext(cdio); + if (cdtext) { +- cdda_backend->album_title = g_strdup (cdtext_get (CDTEXT_TITLE, cdtext)); +- cdda_backend->album_artist = g_strdup (cdtext_get (CDTEXT_PERFORMER, cdtext)); +- cdda_backend->genre = g_strdup (cdtext_get (CDTEXT_GENRE, cdtext)); ++ cdda_backend->album_title = g_strdup (cdtext_get (cdtext, CDTEXT_FIELD_TITLE, 0)); ++ cdda_backend->album_artist = g_strdup (cdtext_get (cdtext, CDTEXT_FIELD_PERFORMER, 0)); ++ cdda_backend->genre = g_strdup (cdtext_get (cdtext, CDTEXT_FIELD_GENRE, 0)); + } + + cdtrack = cdio_get_first_track_num(cdio); +@@ -182,10 +182,10 @@ fetch_metadata (GVfsBackendCdda *cdda_backend) + for ( ; cdtrack < last_cdtrack; cdtrack++ ) { + GVfsBackendCddaTrack *track; + track = g_new0 (GVfsBackendCddaTrack, 1); +- cdtext = cdio_get_cdtext(cdio, cdtrack); ++ cdtext = cdio_get_cdtext(cdio); + if (cdtext) { +- track->title = g_strdup (cdtext_get (CDTEXT_TITLE, cdtext)); +- track->artist = g_strdup (cdtext_get (CDTEXT_PERFORMER, cdtext)); ++ track->title = g_strdup (cdtext_get (cdtext, CDTEXT_FIELD_TITLE, cdtrack)); ++ track->artist = g_strdup (cdtext_get (cdtext, CDTEXT_FIELD_PERFORMER, cdtrack)); + } + track->duration = cdio_get_track_sec_count (cdio, cdtrack) / CDIO_CD_FRAMES_PER_SEC; + diff --git a/gvfs.changes b/gvfs.changes index 82db827..6f55c8c 100644 --- a/gvfs.changes +++ b/gvfs.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Aug 6 19:30:09 UTC 2012 - dimstar@opensuse.org + +- Add gvfs-cdda.patch: Fix build with libcdio_paranoia 0.83 + (bnc#774636). +- Re-enable cdda backend by setting with_cdda %define to 1 +- Replace libcdio-devel BuildRequires with + pkgconfig(libdio_paranoia), which is what configure checks for. + ------------------------------------------------------------------- Mon Aug 6 18:40:31 CEST 2012 - sbrabec@suse.cz diff --git a/gvfs.spec b/gvfs.spec index 6486ecd..f5dd7e9 100644 --- a/gvfs.spec +++ b/gvfs.spec @@ -17,7 +17,7 @@ %define with_udisks2 1 -%define with_cdda 0 +%define with_cdda 1 Name: gvfs Version: 1.12.3 @@ -32,6 +32,8 @@ Source99: baselibs.conf Patch5: gvfs-nvvfs.patch # PATCH-FEATURE-OPENSUSE gvfs-nds.patch ksamrat@novell.com -- Provides NDS browsing for nautilus Patch6: gvfs-nds.patch +# PATCH-FIX-UPSTREAM gvfs-cdda.patch bgo#678257 dimstar@opensuse.org -- Fix build with libcdio 0.83, where the CDText API changed. +Patch7: gvfs-cdda.patch BuildRequires: bluez-devel BuildRequires: dbus-1-glib-devel BuildRequires: fuse-devel @@ -40,7 +42,7 @@ BuildRequires: intltool BuildRequires: libarchive-devel BuildRequires: libavahi-glib-devel %if %{with_cdda} -BuildRequires: libcdio-devel +BuildRequires: pkgconfig(libcdio_paranoia) >= 0.78.2 %endif BuildRequires: libexpat-devel BuildRequires: libgcrypt-devel @@ -129,6 +131,7 @@ VFS functionality for GLib. translation-update-upstream %patch5 -p1 %patch6 -p1 +%patch7 -p1 %build autoreconf -f