--- /usr/portage/net-dialup/slmodem/slmodem-2.9.7-r1.ebuild 2004-06-05 14:11:00.000000000 +0200 +++ /usr/local/portage/net-dialup/slmodem/slmodem-2.9.7-r2.ebuild 2004-06-08 21:20:37.381967112 +0200 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.7-r1.ebuild,v 1.3 2004/06/05 12:11:00 dragonheart Exp $ -inherit eutils +inherit eutils kmod DESCRIPTION="Driver for Smart Link modem" HOMEPAGE="http://www.smlink.com/" @@ -13,20 +13,25 @@ KEYWORDS="~x86" IUSE="alsa" RDEPEND="virtual/glibc" +DEPEND="sys-apps/sed" S="${WORKDIR}/${MY_P}" src_unpack() { unpack ${A} epatch ${FILESDIR}/${P}-makefile-fixup.patch -} -src_compile() { - if has sandbox ${FEATURES} || has userpriv ${FEATURES} || has usersandbox ${FEATURES}; then - ewarn "Users emerging this with a 2.6 kernel still need to disable" - ewarn "sandbox, usersandbox, userpriv from FEATURES." + if is_kernel 2 6 && [ "${KV_PATCH}" -ge 6 ]; then + einfo "Patching drivers/Makefile for kernel 2.6.6 and above" + sed -i -e "s:SUBDIRS=:M=:" ${S}/drivers/Makefile + elif has sandbox ${FEATURES} || has userpriv ${FEATURES} || has usersandbox ${FEATURES}; then + ewarn "Users emerging this with a 2.6 kernel earlier than 2.6.6 still" + ewarn "need to disable sandbox, usersandbox, userpriv from FEATURES." einfo 'use: env FEATURES="-userpriv -usersandbox -sandbox" emerge slmodem' die "bad FEATURES - sandbox, usersandbox and/or userpriv " fi +} + +src_compile() { unset ARCH if use alsa ; then emake SUPPORT_ALSA=1 MODVERDIR=${T}/.tmp_versions || die 'Alsa support failed, try USE="-alsa"' @@ -97,5 +102,6 @@ fi echo - einfo "You must edit /etc/conf.d/${PN} for your configuration" + einfo "You must edit /etc/conf.d/${PN} for your configuration." + einfo "Please study the supplied README file for further instructions." }