aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2006-12-12 13:36:06 +0800
committermarcus <marcus@FreeBSD.org>2006-12-12 13:36:06 +0800
commitd90fd12fb9f36b219926840acaa48c2fa49fcc94 (patch)
tree04d8653627e1dda91eec29d11a6dd0ccb8989290 /audio
parent29a435ab4c6630a81b988f684050ac27c60078fd (diff)
downloadfreebsd-ports-gnome-d90fd12fb9f36b219926840acaa48c2fa49fcc94.tar.gz
freebsd-ports-gnome-d90fd12fb9f36b219926840acaa48c2fa49fcc94.tar.zst
freebsd-ports-gnome-d90fd12fb9f36b219926840acaa48c2fa49fcc94.zip
Fix CD-ROM detection by using CDIOCGETVOL instead of CDIOCCAPABILITY as
the CD device test ioctl. While CDIOCCAPABILITY sounds pleasant enough, it's not actually implemented anywhere. Seems this is a pretty old issue (see kern/50687).
Diffstat (limited to 'audio')
-rw-r--r--audio/gnome-media/Makefile1
-rw-r--r--audio/gnome-media/files/patch-gnome-cd_gst-cdrom.c30
2 files changed, 31 insertions, 0 deletions
diff --git a/audio/gnome-media/Makefile b/audio/gnome-media/Makefile
index fcaf64734cd1..efc3a12124dc 100644
--- a/audio/gnome-media/Makefile
+++ b/audio/gnome-media/Makefile
@@ -8,6 +8,7 @@
PORTNAME= gnome-media
PORTVERSION= 2.16.1
+PORTREVISION= 1
CATEGORIES= audio gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/gnome-media/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}
diff --git a/audio/gnome-media/files/patch-gnome-cd_gst-cdrom.c b/audio/gnome-media/files/patch-gnome-cd_gst-cdrom.c
new file mode 100644
index 000000000000..fadbb049d0e2
--- /dev/null
+++ b/audio/gnome-media/files/patch-gnome-cd_gst-cdrom.c
@@ -0,0 +1,30 @@
+--- gnome-cd/gst-cdrom.c.orig Tue Dec 12 00:18:40 2006
++++ gnome-cd/gst-cdrom.c Tue Dec 12 00:23:17 2006
+@@ -41,13 +41,17 @@
+ #endif
+
+ #if defined(__FreeBSD__)
+-# define GST_CDROM_IOCTL_CDCAPABILITY_REQUEST CDIOCCAPABILITY
++# define GST_CDROM_IOCTL_CDCAPABILITY_REQUEST CDIOCGETVOL
++struct ioc_vol vol_value;
++# define GST_CDROM_IOCTL_CDCAPABILITY_REQUEST_ADDR &vol_value
+ # define GST_CDROM_IOCTL_EJECT_REQUEST CDIOCEJECT
+ #elif defined(__NetBSD__) || defined(__OpenBSD__)
+ # define GST_CDROM_IOCTL_CDCAPABILITY_REQUEST CDIOCGETVOL
++# define GST_CDROM_IOCTL_CDCAPABILITY_REQUEST_ADDR 0
+ # define GST_CDROM_IOCTL_EJECT_REQUEST CDIOCEJECT
+ #else
+ # define GST_CDROM_IOCTL_CDCAPABILITY_REQUEST CDROM_GET_CAPABILITY
++# define GST_CDROM_IOCTL_CDCAPABILITY_REQUEST_ADDR 0
+ # define GST_CDROM_IOCTL_EJECT_REQUEST CDROMEJECT
+ #endif
+
+@@ -184,7 +188,7 @@ gst_cdrom_is_cdrom_device (GnomeCDRom *
+
+ fd = open (device, O_RDONLY | O_NONBLOCK);
+ if (fd >= 0) {
+- if (ioctl (fd, GST_CDROM_IOCTL_CDCAPABILITY_REQUEST, 0) >= 0) {
++ if (ioctl (fd, GST_CDROM_IOCTL_CDCAPABILITY_REQUEST, GST_CDROM_IOCTL_CDCAPABILITY_REQUEST_ADDR) >= 0) {
+ res = TRUE;
+ } else {
+ GST_DEBUG ("ioctl() failed: %s", g_strerror (errno));