mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-30 05:40:06 +00:00
- 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]
This commit is contained in:
parent
d3748ea363
commit
c65143707c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=290195
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user