From 4323a16bf16c869c844cdcdbfb86756d64db7f13 Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Mon, 10 Feb 2003 02:55:37 +0000 Subject: [PATCH] * Fix build with cdparanoia. * Add support for optional cdparanoia support [1] Submitted by: Arjan van Leeuwen [1] --- devel/gnome-vfs/Makefile | 15 ++++++++++- .../files/patch-modules_cdda-method.c | 26 +++++++++++++++++++ devel/gnome-vfs/pkg-plist | 2 ++ devel/gnomevfs2/Makefile | 15 ++++++++++- .../files/patch-modules_cdda-method.c | 26 +++++++++++++++++++ devel/gnomevfs2/pkg-plist | 2 ++ 6 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 devel/gnome-vfs/files/patch-modules_cdda-method.c create mode 100644 devel/gnomevfs2/files/patch-modules_cdda-method.c diff --git a/devel/gnome-vfs/Makefile b/devel/gnome-vfs/Makefile index daa9d0eb2095..e5b4258219bf 100644 --- a/devel/gnome-vfs/Makefile +++ b/devel/gnome-vfs/Makefile @@ -32,6 +32,19 @@ CONFIGURE_ENV= CPPFLAGS="${PTHREAD_CFLAGS} -I${LOCALBASE}/include" \ BSD_PTHREAD_LIBS=${PTHREAD_LIBS} CONFIGURE_TARGET= --target=${MACHINE_ARCH}-unknown-freebsd${OSREL} +.include + +.if exists(${LOCALBASE}/lib/libcdda_paranoia.so.0) +WITH_CDPARANOIA= yes +.endif + +.if defined(WITH_CDPARANOIA) +LIB_DEPENDS+= cdda_paranoia.0:${PORTSDIR}/audio/cdparanoia +PLIST_SUB+= CDPARANOIA="" +.else +PLIST_SUB+= CDPARANOIA="@comment " +.endif + post-patch: @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure @${FIND} ${WRKSRC} -name "*info.in" | xargs ${REINPLACE_CMD} -e \ @@ -39,4 +52,4 @@ post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/libgnomevfs/Makefile.in -.include +.include diff --git a/devel/gnome-vfs/files/patch-modules_cdda-method.c b/devel/gnome-vfs/files/patch-modules_cdda-method.c new file mode 100644 index 000000000000..d1692cc03e47 --- /dev/null +++ b/devel/gnome-vfs/files/patch-modules_cdda-method.c @@ -0,0 +1,26 @@ +--- modules/cdda-method.c.orig Wed Jan 22 13:54:31 2003 ++++ modules/cdda-method.c Wed Jan 22 13:54:33 2003 +@@ -623,7 +623,11 @@ + // Check and see if we already have opened and stashed this drive + if (!use_base) { + if (global_context != NULL) { ++#ifdef Linux + if (strcmp (drive->cdda_device_name, global_context->drive->cdda_device_name) == 0) { ++#elif defined(__FreeBSD__) ++ if (strcmp (drive->dev->device_path, global_context->drive->dev->device_path) == 0) { ++#endif + use_cache = TRUE; + cdda_close (drive); + gnome_vfs_file_info_copy (file_info, global_context->file_info); +@@ -709,7 +713,11 @@ + if (!use_base) { + // Check for cache + if (global_context != NULL) { ++#ifdef Linux + if (strcmp (drive->cdda_device_name, global_context->drive->cdda_device_name) != 0) { ++#elif defined(__FreeBSD__) ++ if (strcmp (drive->dev->device_path, global_context->drive->dev->device_path) != 0) { ++#endif + // Clear old cache + cdda_context_free (global_context); + global_context = cdda_context_new (drive, uri); diff --git a/devel/gnome-vfs/pkg-plist b/devel/gnome-vfs/pkg-plist index 0de6103098c9..538ab619071e 100644 --- a/devel/gnome-vfs/pkg-plist +++ b/devel/gnome-vfs/pkg-plist @@ -3,6 +3,7 @@ etc/gconf/gconf.xml.defaults/schemas/system/http_proxy/%gconf.xml etc/gconf/gconf.xml.defaults/system/%gconf.xml etc/gconf/gconf.xml.defaults/system/http_proxy/%gconf.xml etc/gconf/schemas/system_http_proxy.schemas +%%CDPARANOIA%%etc/gnome-vfs-2.0/modules/cdda-module.conf etc/gnome-vfs-2.0/modules/default-modules.conf etc/gnome-vfs-2.0/vfolders/applications-all-users.vfolder-info etc/gnome-vfs-2.0/vfolders/favorites.vfolder-info @@ -50,6 +51,7 @@ include/gnome-vfs-module-2.0/libgnomevfs/gnome-vfs-ssl.h include/gnome-vfs-module-2.0/libgnomevfs/gnome-vfs-transform.h lib/bonobo/monikers/libmoniker_gnome_vfs_std.so lib/gnome-vfs-2.0/modules/libbzip2.so +%%CDPARANOIA%%lib/gnome-vfs-2.0/modules/libcdda.so lib/gnome-vfs-2.0/modules/libextfs.so lib/gnome-vfs-2.0/modules/libfile.so lib/gnome-vfs-2.0/modules/libftp.so diff --git a/devel/gnomevfs2/Makefile b/devel/gnomevfs2/Makefile index daa9d0eb2095..e5b4258219bf 100644 --- a/devel/gnomevfs2/Makefile +++ b/devel/gnomevfs2/Makefile @@ -32,6 +32,19 @@ CONFIGURE_ENV= CPPFLAGS="${PTHREAD_CFLAGS} -I${LOCALBASE}/include" \ BSD_PTHREAD_LIBS=${PTHREAD_LIBS} CONFIGURE_TARGET= --target=${MACHINE_ARCH}-unknown-freebsd${OSREL} +.include + +.if exists(${LOCALBASE}/lib/libcdda_paranoia.so.0) +WITH_CDPARANOIA= yes +.endif + +.if defined(WITH_CDPARANOIA) +LIB_DEPENDS+= cdda_paranoia.0:${PORTSDIR}/audio/cdparanoia +PLIST_SUB+= CDPARANOIA="" +.else +PLIST_SUB+= CDPARANOIA="@comment " +.endif + post-patch: @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure @${FIND} ${WRKSRC} -name "*info.in" | xargs ${REINPLACE_CMD} -e \ @@ -39,4 +52,4 @@ post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/libgnomevfs/Makefile.in -.include +.include diff --git a/devel/gnomevfs2/files/patch-modules_cdda-method.c b/devel/gnomevfs2/files/patch-modules_cdda-method.c new file mode 100644 index 000000000000..d1692cc03e47 --- /dev/null +++ b/devel/gnomevfs2/files/patch-modules_cdda-method.c @@ -0,0 +1,26 @@ +--- modules/cdda-method.c.orig Wed Jan 22 13:54:31 2003 ++++ modules/cdda-method.c Wed Jan 22 13:54:33 2003 +@@ -623,7 +623,11 @@ + // Check and see if we already have opened and stashed this drive + if (!use_base) { + if (global_context != NULL) { ++#ifdef Linux + if (strcmp (drive->cdda_device_name, global_context->drive->cdda_device_name) == 0) { ++#elif defined(__FreeBSD__) ++ if (strcmp (drive->dev->device_path, global_context->drive->dev->device_path) == 0) { ++#endif + use_cache = TRUE; + cdda_close (drive); + gnome_vfs_file_info_copy (file_info, global_context->file_info); +@@ -709,7 +713,11 @@ + if (!use_base) { + // Check for cache + if (global_context != NULL) { ++#ifdef Linux + if (strcmp (drive->cdda_device_name, global_context->drive->cdda_device_name) != 0) { ++#elif defined(__FreeBSD__) ++ if (strcmp (drive->dev->device_path, global_context->drive->dev->device_path) != 0) { ++#endif + // Clear old cache + cdda_context_free (global_context); + global_context = cdda_context_new (drive, uri); diff --git a/devel/gnomevfs2/pkg-plist b/devel/gnomevfs2/pkg-plist index 0de6103098c9..538ab619071e 100644 --- a/devel/gnomevfs2/pkg-plist +++ b/devel/gnomevfs2/pkg-plist @@ -3,6 +3,7 @@ etc/gconf/gconf.xml.defaults/schemas/system/http_proxy/%gconf.xml etc/gconf/gconf.xml.defaults/system/%gconf.xml etc/gconf/gconf.xml.defaults/system/http_proxy/%gconf.xml etc/gconf/schemas/system_http_proxy.schemas +%%CDPARANOIA%%etc/gnome-vfs-2.0/modules/cdda-module.conf etc/gnome-vfs-2.0/modules/default-modules.conf etc/gnome-vfs-2.0/vfolders/applications-all-users.vfolder-info etc/gnome-vfs-2.0/vfolders/favorites.vfolder-info @@ -50,6 +51,7 @@ include/gnome-vfs-module-2.0/libgnomevfs/gnome-vfs-ssl.h include/gnome-vfs-module-2.0/libgnomevfs/gnome-vfs-transform.h lib/bonobo/monikers/libmoniker_gnome_vfs_std.so lib/gnome-vfs-2.0/modules/libbzip2.so +%%CDPARANOIA%%lib/gnome-vfs-2.0/modules/libcdda.so lib/gnome-vfs-2.0/modules/libextfs.so lib/gnome-vfs-2.0/modules/libfile.so lib/gnome-vfs-2.0/modules/libftp.so