1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

- Add Open Sound System drivers, version 4.0 build 1003.

Approved by:	miwi (mentor)
This commit is contained in:
Edward Tomasz Napierala 2007-06-23 20:58:05 +00:00
parent 1231cc2edb
commit 0a2993d06e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=194139
14 changed files with 313 additions and 0 deletions

View File

@ -426,6 +426,7 @@
SUBDIR += orpheus
SUBDIR += osalp
SUBDIR += osdmixer
SUBDIR += oss
SUBDIR += p5-Audio
SUBDIR += p5-Audio-Beep
SUBDIR += p5-Audio-CD

78
audio/oss/Makefile Normal file
View File

@ -0,0 +1,78 @@
# New ports collection makefile for: oss
# Date created: 2007-06-14
# Whom: Edward Tomasz Napierala <trasz@freebsd.org>
#
# $FreeBSD$
#
PORTNAME= oss
DISTVERSION= 4.0-build1003
CATEGORIES= audio
MASTER_SITES= http://developer.opensound.com/sources/stable/
DISTNAME= ${PORTNAME}-v${DISTVERSION}-src-gpl
MAINTAINER= trasz@freebsd.org
COMMENT= Open Sound System
BUILD_DEPENDS= gawk:${PORTSDIR}/lang/gawk
USE_BZIP2= yes
ALL_TARGET= all install
USE_LDCONFIG= yes
USE_GNOME= gtk20
USE_RC_SUBR= oss
WRKSRC= ${WRKDIR}/build
PATCH_WRKSRC= ${WRKDIR}/${DISTNAME}
SUB_FILES= pkg-install pkg-message
MAN1= ossinfo.1 ossmix.1 ossplay.1 ossrecord.1 osstest.1 ossxmix.1
MAN8= ossctl.8 ossdevlinks.8 savemixer.8 ossdetect.8
.if !exists(${SRC_BASE}/sys/Makefile)
IGNORE= requires kernel source to be installed
.endif
do-configure:
${MKDIR} ${WRKSRC}
cd ${WRKSRC} && ${WRKDIR}/${DISTNAME}/configure
${FIND} ${WRKDIR}/${DISTNAME} -type f -name '*.[hc]' | ${XARGS} ${REINPLACE_CMD} \
-e 's|"/usr/include/stdarg.h"|<stdarg.h>|g' \
-e 's|/usr/|${PREFIX}/|g' \
-e 's|/etc/oss|${PREFIX}/etc/oss|g'
${REINPLACE_CMD} -e "s|mkdir|mkdir -p|" ${WRKSRC}/build.sh
${FIND} ${WRKDIR} -name soundon -or -name soundoff -or -name build.sh | ${XARGS} ${REINPLACE_CMD} \
-e 's|%%PREFIX%%|${PREFIX}|g'
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/prototype/usr/bin/* ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/prototype/usr//sbin/savemixer ${PREFIX}/sbin
${INSTALL_PROGRAM} ${WRKSRC}/prototype/usr/sbin/ossdevlinks ${PREFIX}/sbin
${INSTALL_PROGRAM} ${WRKSRC}/prototype/usr/sbin/ossdetect ${PREFIX}/sbin
${INSTALL_PROGRAM} ${WRKSRC}/prototype/usr/sbin/ossctl ${PREFIX}/sbin
${INSTALL_SCRIPT} ${WRKSRC}/prototype/usr/sbin/soundon ${PREFIX}/sbin
${INSTALL_SCRIPT} ${WRKSRC}/prototype/usr/sbin/soundoff ${PREFIX}/sbin
${INSTALL_PROGRAM} ${WRKSRC}/prototype/usr/lib/oss/lib/libOSSlib.so ${PREFIX}/lib
@# oss.conf does not contain any user-configurable data; it's ok to overwrite it.
${INSTALL_DATA} ${WRKSRC}/prototype/etc/oss.conf ${PREFIX}/etc/oss.conf
${MKDIR} ${PREFIX}/include/sys
${INSTALL_DATA} ${WRKSRC}/prototype/usr/lib/oss/include/sys/soundcard.h ${PREFIX}/include/sys
${INSTALL_DATA} ${WRKSRC}/prototype/usr/lib/oss/include/midiparser.h ${PREFIX}/include
${MKDIR} ${PREFIX}/lib/oss
${MKDIR} ${PREFIX}/lib/oss/etc
${INSTALL_DATA} ${WRKSRC}/prototype/usr/lib/oss/etc/devices.list ${PREFIX}/lib/oss/etc
${INSTALL_DATA} ${WRKSRC}/prototype/usr/lib/oss/version.dat ${PREFIX}/lib/oss
${INSTALL_DATA} ${WRKSRC}/prototype/usr/lib/oss/sysfiles.list ${PREFIX}/lib/oss
${MKDIR} ${PREFIX}/lib/oss/modules
${INSTALL_DATA} ${WRKSRC}/prototype/usr/lib/oss/modules/* ${PREFIX}/lib/oss/modules
${INSTALL_MAN} ${WRKSRC}/prototype/usr/man/man8/* ${PREFIX}/man/man8/
${INSTALL_MAN} ${WRKSRC}/prototype/usr/man/man1/* ${PREFIX}/man/man1/
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 600000 || ${OSVERSION} > 700000
BROKEN= Does not compile on 5.x and 7.x
.endif
.include <bsd.port.post.mk>

3
audio/oss/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (oss-v4.0-build1003-src-gpl.tar.bz2) = cda08a7fd676b5180f9001513b21513e
SHA256 (oss-v4.0-build1003-src-gpl.tar.bz2) = e8f0d1eefe0f0fba92590425d5b727336e3d0f13f2a7df38678dc4e9227668bf
SIZE (oss-v4.0-build1003-src-gpl.tar.bz2) = 1462911

30
audio/oss/files/oss.in Normal file
View File

@ -0,0 +1,30 @@
#!/bin/sh -
# PROVIDE: oss
# REQUIRE: cleanvar
# KEYWORD: nojail shutdown
. %%RC_SUBR%%
name="oss"
rcvar=${name}_enable
stop_cmd="oss_stop"
start_cmd="oss_start"
load_rc_config $name
oss_start()
{
echo "Starting Open Sound System"
%%PREFIX%%/sbin/soundon
}
oss_stop()
{
echo "Stopping Open Sound System"
%%PREFIX%%/sbin/soundoff
}
run_rc_command "$1"

View File

@ -0,0 +1,11 @@
--- setup/FreeBSD/build.sh.orig Fri Jun 22 15:55:18 2007
+++ setup/FreeBSD/build.sh Fri Jun 22 15:56:34 2007
@@ -23,7 +23,7 @@
mkdir prototype/usr/man/man1
mkdir prototype/usr/man/man8
-echo "OSSLIBDIR=/usr/lib/oss" > prototype/etc/oss.conf
+echo "OSSLIBDIR=%%PREFIX%%/lib/oss" > prototype/etc/oss.conf
cp -r $SRCDIR/setup/FreeBSD/oss prototype/usr/lib/
cp $SRCDIR/kernel/OS/FreeBSD/wrapper/bsddefs.h prototype/usr/lib/oss/build/

View File

@ -0,0 +1,18 @@
--- setup/FreeBSD/make.local.orig Fri Jun 15 22:52:47 2007
+++ setup/FreeBSD/make.local Fri Jun 15 22:53:15 2007
@@ -2,14 +2,9 @@
sh build.sh
copy: build
- cp -R prototype/* /
package: build
sh setup/FreeBSD/mkpkg.sh
install: copy
- cd /usr/lib/oss/build && sh install.sh
- sync
- soundoff
- sync
- soundon
+ cd prototype/usr/lib/oss/build && sh install.sh

View File

@ -0,0 +1,29 @@
--- setup/FreeBSD/oss/build/install.sh.orig Thu Jan 11 23:48:14 2007
+++ setup/FreeBSD/oss/build/install.sh Fri Jun 22 15:15:32 2007
@@ -1,11 +1,6 @@
#!/bin/sh
-if test -f /etc/oss.conf
-then
- . /etc/oss.conf
-else
- OSSLIBDIR=/usr/lib/oss
-fi
+OSSLIBDIR=${PREFIX}/lib/oss
rm -f osscore_mainline.o
ln -s osscore.lib osscore_mainline.o
@@ -58,13 +53,5 @@
make clean > /dev/null 2>&1
rm -f Makefile
done
-
-if ! test -f $OSSLIBDIR/etc/installed_drivers
-then
- echo "-----------------------------"
- /usr/sbin/ossdetect -v
- echo "-----------------------------"
- echo ""
-fi
exit 0

View File

@ -0,0 +1,11 @@
--- setup/FreeBSD/oss/build/osscore.c.orig Fri Jun 15 22:37:18 2007
+++ setup/FreeBSD/oss/build/osscore.c Fri Jun 15 22:37:28 2007
@@ -7,7 +7,7 @@
* In this way the same OSS binary package can be used with several FreeBSD
* versions.
*/
-#include "/usr/include/stdarg.h"
+#include <stdarg.h>
#include <sys/param.h> /* defines used in kernel.h */
#include <sys/module.h>
#include <sys/systm.h>

View File

@ -0,0 +1,16 @@
--- setup/FreeBSD/sbin/soundoff.orig Fri Jun 22 15:30:11 2007
+++ setup/FreeBSD/sbin/soundoff Fri Jun 22 15:30:38 2007
@@ -1,10 +1,10 @@
#!/bin/sh
-if test -f /etc/oss.conf
+if test -f %%PREFIX%%/etc/oss.conf
then
- . /etc/oss.conf
+ . %%PREFIX%%/etc/oss.conf
else
- OSSLIBDIR=/usr/lib/oss
+ OSSLIBDIR=%%PREFIX%%/usr/lib/oss
fi
if ! /sbin/kldstat | grep -q osscore.ko

View File

@ -0,0 +1,38 @@
--- setup/FreeBSD/sbin/soundon.orig Fri Jun 22 15:26:04 2007
+++ setup/FreeBSD/sbin/soundon Fri Jun 22 15:29:46 2007
@@ -1,13 +1,13 @@
#!/bin/sh
-if test -f /etc/oss.conf
+if test -f %%PREFIX%%/etc/oss.conf
then
- . /etc/oss.conf
+ . %%PREFIX%%/etc/oss.conf
else
- OSSLIBDIR=/usr/lib/oss
+ OSSLIBDIR=%%PREFIX%%/lib/oss
fi
-LOG=$OSSLIBDIR/logs/soundon.log
+LOG=/var/log/soundon.log
echo "Open Sound System starting" `date` > $LOG
echo "OSS version: " `cat $OSSLIBDIR/version.dat` >> $LOG 2>&1
echo "Kernel version: " `uname -a` >> $LOG
@@ -29,7 +29,7 @@
if test -f $OSSLIBDIR/etc/license.asc
then
- /usr/sbin/ossdetect -l >> $LOG
+ %%PREFIX%%/sbin/ossdetect -l >> $LOG
fi
if ! /sbin/kldload $OSSLIBDIR/modules/osscore.ko
@@ -74,7 +74,7 @@
ls -l /dev/dsp* /dev/sndstat /dev/mixer* /dev/oss/*/* >> $LOG 2>&1
-/usr/sbin/savemixer -L >> $LOG 2>&1
+%%PREFIX%%/sbin/savemixer -L >> $LOG 2>&1
if test -x $OSSLIBDIR/soundon.user
then

View File

@ -0,0 +1,8 @@
#! /bin/sh
case $2 in
POST-INSTALL)
if ! test -f ${PKG_PREFIX}/lib/oss/etc/installed_drivers; then
${PKG_PREFIX}/sbin/ossdetect -v
fi
esac

View File

@ -0,0 +1,7 @@
---------------------------------------------------------------------
This port uses installation procedure that is very different from
the one used by 4Front and is not supported by them. All bug reports
should go to the port maintainer via the usual PR mechanism.
---------------------------------------------------------------------

5
audio/oss/pkg-descr Normal file
View File

@ -0,0 +1,5 @@
Open Sound System for FreeBSD is a audio subsystem that provides
a cross platform audio and MIDI API with device drivers for most
consumer and professional PCI and USB audio devices.
WWW: http://opensound.com/

58
audio/oss/pkg-plist Normal file
View File

@ -0,0 +1,58 @@
etc/oss.conf
bin/ossxmix
bin/osstest
bin/ossrecord
bin/ossplay
bin/ossmix
bin/ossinfo
sbin/savemixer
sbin/ossdevlinks
sbin/ossdetect
sbin/ossctl
sbin/soundon
sbin/soundoff
lib/libOSSlib.so
include/sys/soundcard.h
@dirrmtry include/sys
include/midiparser.h
lib/oss/modules/osscore.ko
lib/oss/modules/ali5455.ko
lib/oss/modules/allegro.ko
lib/oss/modules/als300.ko
lib/oss/modules/als4000.ko
lib/oss/modules/apci97.ko
lib/oss/modules/atiaudio.ko
lib/oss/modules/audigyls.ko
lib/oss/modules/audioloop.ko
lib/oss/modules/audiopci.ko
lib/oss/modules/cmi8788.ko
lib/oss/modules/cmpci.ko
lib/oss/modules/cs4280.ko
lib/oss/modules/cs4281.ko
lib/oss/modules/digi32.ko
lib/oss/modules/digi96.ko
lib/oss/modules/emu10k1x.ko
lib/oss/modules/fm801.ko
lib/oss/modules/geode.ko
lib/oss/modules/hdaudio.ko
lib/oss/modules/ich.ko
lib/oss/modules/imux.ko
lib/oss/modules/maestro.ko
lib/oss/modules/neomagic.ko
lib/oss/modules/s3vibes.ko
lib/oss/modules/sblive.ko
lib/oss/modules/softoss.ko
lib/oss/modules/solo.ko
lib/oss/modules/trident.ko
lib/oss/modules/via8233.ko
lib/oss/modules/via97.ko
lib/oss/modules/vmix.ko
lib/oss/modules/vortex.ko
lib/oss/modules/ymf7xx.ko
@dirrm lib/oss/modules
lib/oss/etc/devices.list
@unexec rm -f %D/lib/oss/etc/installed_drivers
@dirrm lib/oss/etc
lib/oss/version.dat
lib/oss/sysfiles.list
@dirrm lib/oss