diff options
author | jkim <jkim@FreeBSD.org> | 2012-02-01 05:03:22 +0800 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2012-02-01 05:03:22 +0800 |
commit | 04d567d1eee3b691147a20920f98dd959307010e (patch) | |
tree | 44ec98fd1d66b18e03ebec06f236f7693d87e0cc | |
parent | 9b1eb54d56a9c04e21b590e84eb2a407429b68da (diff) | |
download | freebsd-ports-gnome-04d567d1eee3b691147a20920f98dd959307010e.tar.gz freebsd-ports-gnome-04d567d1eee3b691147a20920f98dd959307010e.tar.zst freebsd-ports-gnome-04d567d1eee3b691147a20920f98dd959307010e.zip |
- Do not allow loading osscore when sound(4) is loaded. [1]
- Make portlint little happier.
PR: ports/164567 [1]
Submitted by: crees (initial version) [1]
-rw-r--r-- | audio/oss/Makefile | 5 | ||||
-rw-r--r-- | audio/oss/files/patch-kernel-OS-FreeBSD-os_freebsd.c | 45 |
2 files changed, 45 insertions, 5 deletions
diff --git a/audio/oss/Makefile b/audio/oss/Makefile index 7b9df56440e5..b38b94f1ed3f 100644 --- a/audio/oss/Makefile +++ b/audio/oss/Makefile @@ -7,6 +7,7 @@ PORTNAME= oss DISTVERSION= 4.2-build2005 +PORTREVISION= 1 CATEGORIES= audio kld MASTER_SITES= http://www.opensound.com/developer/sources/stable/bsd/ DISTNAME= ${PORTNAME}-v${DISTVERSION}-src-bsd @@ -14,10 +15,10 @@ DISTNAME= ${PORTNAME}-v${DISTVERSION}-src-bsd MAINTAINER= jkim@FreeBSD.org COMMENT= Open Sound System -BUILD_DEPENDS= gawk:${PORTSDIR}/lang/gawk - LICENSE= BSD +BUILD_DEPENDS= gawk:${PORTSDIR}/lang/gawk + USE_BZIP2= yes ALL_TARGET= all install USE_GNOME= gtk20 diff --git a/audio/oss/files/patch-kernel-OS-FreeBSD-os_freebsd.c b/audio/oss/files/patch-kernel-OS-FreeBSD-os_freebsd.c index 13a3a42763da..173400a18ec0 100644 --- a/audio/oss/files/patch-kernel-OS-FreeBSD-os_freebsd.c +++ b/audio/oss/files/patch-kernel-OS-FreeBSD-os_freebsd.c @@ -1,6 +1,14 @@ ---- kernel/OS/FreeBSD/os_freebsd.c.orig 2011-01-05 16:06:40.000000000 -0500 -+++ kernel/OS/FreeBSD/os_freebsd.c 2011-06-21 17:52:41.000000000 -0400 -@@ -315,7 +315,7 @@ oss_get_cardinfo (int cardnum, oss_card_ +--- kernel/OS/FreeBSD/os_freebsd.c.orig 2011-08-11 19:51:27.000000000 -0400 ++++ kernel/OS/FreeBSD/os_freebsd.c 2012-01-31 15:16:58.000000000 -0500 +@@ -16,6 +16,7 @@ + #include "midi_core.h" + #include <oss_pci.h> + #include <sys/conf.h> ++#include <sys/module.h> + #include <sys/proc.h> + #include <sys/sx.h> + #include <sys/mman.h> +@@ -315,7 +316,7 @@ if (cards[cardnum]->name != NULL) strncpy (ci->longname, cards[cardnum]->name, 128); @@ -9,3 +17,34 @@ if (cards[cardnum]->nick != NULL) strncpy (ci->shortname, cards[cardnum]->nick, 16); +@@ -413,8 +414,17 @@ + + if (!(flags & CHDEV_VIRTUAL) && (name != NULL)) + { ++#if __FreeBSD_version >= 801500 ++ if (make_dev_p (MAKEDEV_CHECKNAME, &bsd_cdev, &oss_cdevsw, NULL, ++ UID_ROOT, GID_WHEEL, 0666, name, 0)) ++ { ++ cmn_err (CE_WARN, "Cannot allocate device node /dev/%s\n", name); ++ return; ++ } ++#else + bsd_cdev = + make_dev (&oss_cdevsw, num, UID_ROOT, GID_WHEEL, 0666, name, 0); ++#endif + cdev->info = bsd_cdev; + } + } +@@ -604,6 +614,12 @@ + { + oss_device_t *osdev; + ++ if (module_lookupbyname("sound") != NULL) ++ { ++ cmn_err (CE_WARN, "Open Sound System conflicts with FreeBSD driver\n"); ++ cmn_err (CE_CONT, "Please remove sound(4) from kernel or unload it\n"); ++ return EBUSY; ++ } + if ((osdev = PMALLOC (NULL, sizeof (*osdev))) == NULL) + { + return ENOSPC; |