Ravenium wrote:The nforce-audio ebuild reports that it compiled successfully (albeit with multiple warnings), but then reports that it cannot statd nvaudio.ko and thus does not copy it into the modules tree.
Code: Select all
inherit eutils kmod
X86_PKG_V="pkg1"
AMD64_PKG_V="pkg1"
NV_V="${PV/1.0./1.0-}"
X86_NV_PACKAGE="NFORCE-Linux-x86-${NV_V}"
AMD64_NV_PACKAGE="NFORCE-Linux-x86_64-${NV_V}"
DESCRIPTION="Linux kernel module for the NVIDIA's nForce SoundStorm audio chipset"
HOMEPAGE="http://www.nvidia.com/"
SRC_URI="x86? (ftp://download.nvidia.com/XFree86/nforce/${NV_V}/${X86_NV_PACKAGE}-${X86_PKG_V}.run)
amd64? (http://download.nvidia.com/XFree86/nforce/amd64/${NV_V}/${AMD64_NV_PACKAGE}-${AMD64_PKG_V}.run)"
if use x86; then
PKG_V="${X86_PKG_V}"
NV_PACKAGE="${X86_NV_PACKAGE}"
elif use amd64; then
PKG_V="${AMD64_PKG_V}"
NV_PACKAGE="${AMD64_NV_PACKAGE}"
fi
S=${WORKDIR}/${NV_PACKAGE}-${PKG_V}/nvsound
# The slot needs to be set to $KV to prevent unmerges of modules for other kernels.
LICENSE="NVIDIA"
SLOT="${KV}"
KEYWORDS="-* ~x86 ~amd64"
RESTRICT="nostrip"
IUSE=""
DEPEND="virtual/linux-sources"
KMOD_SOURCES="none"
src_unpack() {
# Let the kmod eclass set the variables for us
kmod_src_unpack
cd ${WORKDIR}
bash ${DISTDIR}/${NV_PACKAGE}-${PKG_V}.run --extract-only
}
src_compile() {
# IGNORE_CC_MISMATCH disables a sanity check that's needed when gcc has been
# updated but the running kernel is still compiled with an older gcc. This is
# needed for chrooted building, where the sanity check detects the gcc of the
# kernel outside the chroot rather than within.
if is_kernel 2 5 || is_kernel 2 6
then
unset ARCH
fi
cd ${S}/main
make KERNSRC="/usr/src/linux" || die
}
src_install() {
# The driver goes into the standard modules location
insinto /lib/modules/${KV}/kernel/drivers/sound
# Insert the module
doins main/nvsound.${KV_OBJ}
# Docs
dodoc ${S}/ReleaseNotes.html
# Add the aliases
insinto /etc/modules.d
cat > ${D}/etc/modules.d/nvsound << EOF
# change spdif_status to 1 to enable digital out; this will cause audio
# playback to be clamped to 48KHz which can cause some programs to play
# back audio at the wrong speed.
options nvsound spdif_status="0"
EOF
}
pkg_postinst() {
if [ "${ROOT}" = "/" ] ; then
# Update module dependency
[ -x /usr/sbin/update-modules ] && /usr/sbin/update-modules
fi
echo
einfo "If you need to load the module automatically on boot up you need"
einfo "to add "nvsound" to /etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}"
echo
einfo "You may also be interested in media-sound/nforce-nvmixer"
}