Accepting request 130314 from GNOME:Factory

Fix cdda support. 2nd part to fix bnc#774636 (forwarded request 130256 from vuntz)

OBS-URL: https://build.opensuse.org/request/show/130314
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gvfs?expand=0&rev=86
This commit is contained in:
Stephan Kulow 2012-08-07 19:52:11 +00:00 committed by Git OBS Bridge
commit 45cd411f7f
3 changed files with 48 additions and 2 deletions

34
gvfs-cdda.patch Normal file
View File

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

View File

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

View File

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