aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authorstas <stas@FreeBSD.org>2007-01-03 19:27:48 +0800
committerstas <stas@FreeBSD.org>2007-01-03 19:27:48 +0800
commit74bffa513403272a2f10e8c6e1576dd8c046087d (patch)
treeffb0c565580c4b7482f30259f7657355141185a1 /multimedia
parentf02f89e0ca43ae557f08a50b322a8e1812b03936 (diff)
downloadfreebsd-ports-gnome-74bffa513403272a2f10e8c6e1576dd8c046087d.tar.gz
freebsd-ports-gnome-74bffa513403272a2f10e8c6e1576dd8c046087d.tar.zst
freebsd-ports-gnome-74bffa513403272a2f10e8c6e1576dd8c046087d.zip
- Fix detecting of device types
Currently, this patch handles all devfs cases (it uses realpath to resolve symlinks). However, submitter supposes, that we should have a generic way to detect which device the file belongs to. I'll leave the PR in suspended state for a better solution come up. PR: ports/101450 Reported by: Chad Fraleigh <chadf@bookcase.com> Approved by: multimedia (ahze)
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/transcode/Makefile2
-rw-r--r--multimedia/transcode/files/patch-import_ioaux.c43
2 files changed, 44 insertions, 1 deletions
diff --git a/multimedia/transcode/Makefile b/multimedia/transcode/Makefile
index c68d29dbef96..f40cfdea3450 100644
--- a/multimedia/transcode/Makefile
+++ b/multimedia/transcode/Makefile
@@ -7,7 +7,7 @@
PORTNAME= transcode
PORTVERSION= 1.0.2
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= multimedia
MASTER_SITES= http://dl.fkb.wormulon.net/transcode/ \
http://dl.kel.wormulon.net/transcode/ \
diff --git a/multimedia/transcode/files/patch-import_ioaux.c b/multimedia/transcode/files/patch-import_ioaux.c
new file mode 100644
index 000000000000..d84365d6f63f
--- /dev/null
+++ b/multimedia/transcode/files/patch-import_ioaux.c
@@ -0,0 +1,43 @@
+--- import/ioaux.c.orig Mon Jul 4 11:09:33 2005
++++ import/ioaux.c Wed Jan 3 02:44:37 2007
+@@ -261,6 +261,25 @@
+ /* char device could be several things, depending on system */
+ /* *BSD DVD device? v4l? bktr? sunau? */
+ if(S_ISCHR(fbuf.st_mode)) {
++# ifdef __FreeBSD__
++ char rpath[PATH_MAX], *prpath;
++
++ prpath = realpath(name, &rpath);
++ if (prpath == NULL) {
++ warn("realpath(%s)", name);
++ return TC_PROBE_PATH_ABSPATH;
++ }
++
++ if (strstr(rpath, "bktr") != NULL || strstr(rpath, "tuner") || \
++ strstr(rpath, "vbi"))
++ return(TC_PROBE_PATH_BKTR);
++ else if (strstr(rpath, "dsp") || strstr(rpath, "audio") || \
++ strstr(rpath, "music"))
++ return(TC_PROBE_PATH_OSS);
++ else
++ return(TC_PROBE_PATH_ABSPATH);
++# endif
++
+ switch (major(fbuf.st_rdev)) {
+ #ifdef SYS_BSD
+ # ifdef __OpenBSD__
+@@ -270,14 +289,6 @@
+ return(TC_PROBE_PATH_SUNAU);
+ case 49: /* bktr */
+ return(TC_PROBE_PATH_BKTR);
+-# endif
+-# ifdef __FreeBSD__
+- case 4: /* acd */
+- return(TC_PROBE_PATH_ABSPATH);
+- case 229: /* bktr */
+- return(TC_PROBE_PATH_BKTR);
+- case 0: /* OSS */
+- return(TC_PROBE_PATH_OSS);
+ # endif
+ default: /* libdvdread uses "raw" disk devices here */
+ return(TC_PROBE_PATH_ABSPATH);