# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit linux-mod DESCRIPTION="spca5xx driver for webcams." HOMEPAGE="http://mxhaard.free.fr/spca5xx.html" SRC_URI="http://mxhaard.free.fr/spca50x/Download/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" IUSE="usbfix" RESTRICT="" DEPEND="" RDEPEND="" MODULE_NAMES="spca5xx(usb/video:)" BUILD_TARGETS="default" CONFIG_CHECK="VIDEO_DEV" if kernel_is 2 6 18; then CONFIG_CHECK="${CONFIG_CHECK} VIDEO_V4L1_COMPAT" fi pkg_setup() { linux-mod_pkg_setup BUILD_PARAMS="KERNELDIR=${KV_DIR}" } src_unpack() { unpack ${A} convert_to_m ${S}/Makefile cd "${S}" epatch "${FILESDIR}"/spca-${PV}-defines.patch if kernel_is 2 6 18; then epatch "${FILESDIR}"/spca-${PV}-2.6.18.patch fi if use usbfix; then epatch "${FILESDIR}"/spca-${PV}-usb-bandwidth-fix.patch fi } src_install() { dodoc CHANGELOG INSTALL README linux-mod_src_install } pkg_postinst() { if use !usbfix; then einfo "If you get messages like:" einfo "can't open /dev/video0: No space left on device" einfo "activate CONFIG_USB_BANDWIDTH=y in the kernel config." einfo "" einfo "If this doesn't help, set the pentium use flag!" ewarn "This may affect your quality of the webcam!" einfo "" einfo "You should use general your webcam without any other" einfo "devices on the usb hub" fi if use usbfix; then einfo "You activated the usbfix use flag!" einfo "Use this ONLY if you get error messages like:" einfo "can't open /dev/video0: No space left on device" einfo "and you already activated CONFIG_USB_BANDWIDTH=y" einfo "in the kernel config because is may reduce the" einfo "quality of your webcam." fi }