From 0a2993d06e14d9003c531991783adbc45e521c93 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Sat, 23 Jun 2007 20:58:05 +0000 Subject: - Add Open Sound System drivers, version 4.0 build 1003. Approved by: miwi (mentor) --- audio/Makefile | 1 + audio/oss/Makefile | 78 ++++++++++++++++++++++ audio/oss/distinfo | 3 + audio/oss/files/oss.in | 30 +++++++++ audio/oss/files/patch-setup-FreeBSD-build.sh | 11 +++ audio/oss/files/patch-setup-FreeBSD-make.local | 18 +++++ .../files/patch-setup-FreeBSD-oss-build-install.sh | 29 ++++++++ .../files/patch-setup-FreeBSD-oss-build-osscore.c | 11 +++ audio/oss/files/patch-setup-FreeBSD-sbin-soundoff | 16 +++++ audio/oss/files/patch-setup-FreeBSD-sbin-soundon | 38 +++++++++++ audio/oss/files/pkg-install.in | 8 +++ audio/oss/files/pkg-message.in | 7 ++ audio/oss/pkg-descr | 5 ++ audio/oss/pkg-plist | 58 ++++++++++++++++ 14 files changed, 313 insertions(+) create mode 100644 audio/oss/Makefile create mode 100644 audio/oss/distinfo create mode 100644 audio/oss/files/oss.in create mode 100644 audio/oss/files/patch-setup-FreeBSD-build.sh create mode 100644 audio/oss/files/patch-setup-FreeBSD-make.local create mode 100644 audio/oss/files/patch-setup-FreeBSD-oss-build-install.sh create mode 100644 audio/oss/files/patch-setup-FreeBSD-oss-build-osscore.c create mode 100644 audio/oss/files/patch-setup-FreeBSD-sbin-soundoff create mode 100644 audio/oss/files/patch-setup-FreeBSD-sbin-soundon create mode 100644 audio/oss/files/pkg-install.in create mode 100644 audio/oss/files/pkg-message.in create mode 100644 audio/oss/pkg-descr create mode 100644 audio/oss/pkg-plist diff --git a/audio/Makefile b/audio/Makefile index c17282a5c92b..513f98c3f981 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -426,6 +426,7 @@ SUBDIR += orpheus SUBDIR += osalp SUBDIR += osdmixer + SUBDIR += oss SUBDIR += p5-Audio SUBDIR += p5-Audio-Beep SUBDIR += p5-Audio-CD diff --git a/audio/oss/Makefile b/audio/oss/Makefile new file mode 100644 index 000000000000..9d3e17612968 --- /dev/null +++ b/audio/oss/Makefile @@ -0,0 +1,78 @@ +# New ports collection makefile for: oss +# Date created: 2007-06-14 +# Whom: Edward Tomasz Napierala +# +# $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"||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 + +.if ${OSVERSION} < 600000 || ${OSVERSION} > 700000 +BROKEN= Does not compile on 5.x and 7.x +.endif + +.include diff --git a/audio/oss/distinfo b/audio/oss/distinfo new file mode 100644 index 000000000000..460422f8c65f --- /dev/null +++ b/audio/oss/distinfo @@ -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 diff --git a/audio/oss/files/oss.in b/audio/oss/files/oss.in new file mode 100644 index 000000000000..3454a4667a8d --- /dev/null +++ b/audio/oss/files/oss.in @@ -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" + diff --git a/audio/oss/files/patch-setup-FreeBSD-build.sh b/audio/oss/files/patch-setup-FreeBSD-build.sh new file mode 100644 index 000000000000..00bd698d4d00 --- /dev/null +++ b/audio/oss/files/patch-setup-FreeBSD-build.sh @@ -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/ diff --git a/audio/oss/files/patch-setup-FreeBSD-make.local b/audio/oss/files/patch-setup-FreeBSD-make.local new file mode 100644 index 000000000000..602585647f8a --- /dev/null +++ b/audio/oss/files/patch-setup-FreeBSD-make.local @@ -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 diff --git a/audio/oss/files/patch-setup-FreeBSD-oss-build-install.sh b/audio/oss/files/patch-setup-FreeBSD-oss-build-install.sh new file mode 100644 index 000000000000..cfb583859afd --- /dev/null +++ b/audio/oss/files/patch-setup-FreeBSD-oss-build-install.sh @@ -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 diff --git a/audio/oss/files/patch-setup-FreeBSD-oss-build-osscore.c b/audio/oss/files/patch-setup-FreeBSD-oss-build-osscore.c new file mode 100644 index 000000000000..099afcad7bab --- /dev/null +++ b/audio/oss/files/patch-setup-FreeBSD-oss-build-osscore.c @@ -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 + #include /* defines used in kernel.h */ + #include + #include diff --git a/audio/oss/files/patch-setup-FreeBSD-sbin-soundoff b/audio/oss/files/patch-setup-FreeBSD-sbin-soundoff new file mode 100644 index 000000000000..c4ab583a751b --- /dev/null +++ b/audio/oss/files/patch-setup-FreeBSD-sbin-soundoff @@ -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 diff --git a/audio/oss/files/patch-setup-FreeBSD-sbin-soundon b/audio/oss/files/patch-setup-FreeBSD-sbin-soundon new file mode 100644 index 000000000000..c7041f2ad13f --- /dev/null +++ b/audio/oss/files/patch-setup-FreeBSD-sbin-soundon @@ -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 diff --git a/audio/oss/files/pkg-install.in b/audio/oss/files/pkg-install.in new file mode 100644 index 000000000000..0da7a60ba40f --- /dev/null +++ b/audio/oss/files/pkg-install.in @@ -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 diff --git a/audio/oss/files/pkg-message.in b/audio/oss/files/pkg-message.in new file mode 100644 index 000000000000..4e74f16c4020 --- /dev/null +++ b/audio/oss/files/pkg-message.in @@ -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. + +--------------------------------------------------------------------- diff --git a/audio/oss/pkg-descr b/audio/oss/pkg-descr new file mode 100644 index 000000000000..e91f68ded4d4 --- /dev/null +++ b/audio/oss/pkg-descr @@ -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/ diff --git a/audio/oss/pkg-plist b/audio/oss/pkg-plist new file mode 100644 index 000000000000..e9caf0973dfb --- /dev/null +++ b/audio/oss/pkg-plist @@ -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 -- cgit v1.2.3