Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Aug 2005 18:39:50 +0000
From:      Michael Seyfert <michaels@sdf.lonestar.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/84653: New port: audio/emu10kx
Message-ID:  <20050807183950.GA23640@SDF.LONESTAR.ORG>
Resent-Message-ID: <200508071850.j77IoFpW063279@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         84653
>Category:       ports
>Synopsis:       New port: audio/emu10kx
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 07 18:50:15 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     michaels@sdf.lonestar.org
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD 7.0-CURRENT i386

>Description:
New port: audio/emu10kx

>How-To-Repeat:
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	emu10kx
#	emu10kx/Makefile
#	emu10kx/files
#	emu10kx/files/patch-Makefile
#	emu10kx/pkg-message
#	emu10kx/distinfo
#	emu10kx/pkg-descr
#	emu10kx/pkg-install
#	emu10kx/pkg-deinstall
#
echo c - emu10kx
mkdir -p emu10kx > /dev/null 2>&1
echo x - emu10kx/Makefile
sed 's/^X//' >emu10kx/Makefile << 'END-of-emu10kx/Makefile'
X# Ports collection makefile for: emu10kx
X# Date created:  7 Aug 2005
X# Whom: michaels@sdf.lonestar.org
X#
X# $FreeBSD$
X#
X
XPORTNAME=	emu10kx
XPORTVERSION=	20050423
XCATEGORIES=	audio
XMASTER_SITES=	http://chibis.persons.gfk.ru/audigy/emu10kx/
XDISTNAME=	${PORTNAME}-2005-04-23
X
XMAINTAINER=	michaels@sdf.lonestar.org
XCOMMENT=	SBLive!, Audigy, and Audigy2 driver for FreeBSD
X
XUSE_BZIP2=	yes
X
XNO_PACKAGE=	should be recompiled for a particular FreeBSD kernel
X
Xpost-install:
X	${PKGINSTALL} ${PKGNAME} POST-INSTALL
X	${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-emu10kx/Makefile
echo c - emu10kx/files
mkdir -p emu10kx/files > /dev/null 2>&1
echo x - emu10kx/files/patch-Makefile
sed 's/^X//' >emu10kx/files/patch-Makefile << 'END-of-emu10kx/files/patch-Makefile'
X--- Makefile.orig	Sun Aug  7 10:23:02 2005
X+++ Makefile	Sun Aug  7 10:23:08 2005
X@@ -14,7 +14,7 @@
X WARNS?=6
X NO_WERROR?=1
X WERROR=
X-SUBDIR=emuctrl
X+#SUBDIR=emuctrl
X 
X # [4.x Only]If you have another device with same major device number, change
X # 			definition of E10KX_MAJOR below (valid numbers are 200-252 except
END-of-emu10kx/files/patch-Makefile
echo x - emu10kx/pkg-message
sed 's/^X//' >emu10kx/pkg-message << 'END-of-emu10kx/pkg-message'
X
XTo use these drivers, make sure that you have loaded the emu10kx kernel
Xmodule, by doing
X
X	# kldload snd_emu10kx
X
Xor adding
X
X	snd_emu10kx_load="YES"
X
Xto your /boot/loader.conf (normally done automatically when installing
Xthe port).
X
XNote you should disable loading of the emu10k1 driver (this driver is for
Xthe same hardware).
END-of-emu10kx/pkg-message
echo x - emu10kx/distinfo
sed 's/^X//' >emu10kx/distinfo << 'END-of-emu10kx/distinfo'
XMD5 (emu10kx-2005-04-23.tar.bz2) = 452081b711ff4f10fb987308be6dd886
XSIZE (emu10kx-2005-04-23.tar.bz2) = 63332
END-of-emu10kx/distinfo
echo x - emu10kx/pkg-descr
sed 's/^X//' >emu10kx/pkg-descr << 'END-of-emu10kx/pkg-descr'
XThis is a port of the snd_emu10kx sound driver. This driver works for
XSBLive!, Audigy, and Audigy2 based cards.
X
XThis is an alternate driver that you may use instead of the snd_emu10k1
Xdriver in the FreeBSD kernel.
X
XWWW: http://chibis.persons.gfk.ru/audigy/
END-of-emu10kx/pkg-descr
echo x - emu10kx/pkg-install
sed 's/^X//' >emu10kx/pkg-install << 'END-of-emu10kx/pkg-install'
X#!/bin/sh
X
X[ "$2" != "POST-INSTALL" ] && exit 0
X
X#============================================================
X# POST-INSTALL
X#============================================================
XDRIVERNAME=snd_emu10kx
X
X# Unload the driver
Xkldstat -n $DRIVERNAME > /dev/null 2>&1; RESULT=$?
Xif [ ${RESULT} -eq 0 ]; then
X	kldunload -n $DRIVERNAME > /dev/null 2>&1; RESULT=$?
X	if [ ${RESULT} -ne 0 ]; then
X		echo 'ERROR: Failed to unload the $DRIVERNAME module!'
X		echo 'ERROR: Is $DRIVERNAME.ko in use?'
X		exit 1;
X	fi
Xfi
X
X# Load the driver
Xkldload $DRIVERNAME > /dev/null 2>&1 ; RESULT=$?
Xif [ ${RESULT} -ne 0 ]; then
X	echo 'ERROR: Failed to load the $DRIVERNAME module!'
X	exit 1;
Xfi
X
X# Have the driver load at boot
Xgrep ${DRIVERNAME}_load /boot/loader.conf > /dev/null 2>&1; RESULT=$?
Xif [ ${RESULT} -eq 0 ]; then
X	# Present.
X	sed -e s/${DRIVERNAME}_load.*/${DRIVERNAME}_load=\"YES\"/g -i.orig /boot/loader.conf
Xelse
X	# Not present.
X	echo "${DRIVERNAME}_load=\"YES\"" >> /boot/loader.conf
Xfi
X#============================================================
END-of-emu10kx/pkg-install
echo x - emu10kx/pkg-deinstall
sed 's/^X//' >emu10kx/pkg-deinstall << 'END-of-emu10kx/pkg-deinstall'
X#!/bin/sh
X
X[ "$2" != "DEINSTALL" ] && exit 0
X
X#============================================================
X# DEINSTALL
X#============================================================
XDRIVERNAME=snd_emu10kx
X
X# Unload the driver
Xkldstat -n $DRIVERNAME > /dev/null 2>&1; RESULT=$?
Xif [ ${RESULT} -eq 0 ]; then
X	kldunload -n $DRIVERNAME > /dev/null 2>&1; RESULT=$?
X	if [ ${RESULT} -ne 0 ]; then
X		echo 'ERROR: Failed to unload the $DRIVERNAME module!'
X		echo 'ERROR: Is $DRIVERNAME.ko in use?'
X		exit 1;
X	fi
Xfi
X
X# Remove the driver
Xrm /boot/kernel/$DRIVERNAME.ko
X
X# Remove the driver from loader.conf
Xgrep ${DRIVERNAME}_load /boot/loader.conf > /dev/null 2>&1; RESULT=$?
Xif [ ${RESULT} -eq 0 ]; then
X	sed -e /${DRIVERNAME}_load.*/d -i.orig /boot/loader.conf
Xfi
X#============================================================
END-of-emu10kx/pkg-deinstall
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050807183950.GA23640>