From 854fd932cf879b8ac23979110d8a877566f0525d Mon Sep 17 00:00:00 2001 From: Gilles Dartiguelongue Date: Sun, 15 Feb 2009 19:22:53 +0000 Subject: Bump to 0.6.6-r2. Fix compilation on 2.6.28, closes #254564. (Portage version: 2.2_rc23/cvs/Linux x86_64) --- media-video/qc-usb/ChangeLog | 8 +- .../qc-usb/files/qc-usb-0.6.6-kcompat-2.6.28.patch | 110 +++++++++++++++++++++ media-video/qc-usb/qc-usb-0.6.6-r2.ebuild | 64 ++++++++++++ 3 files changed, 181 insertions(+), 1 deletion(-) create mode 100644 media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.28.patch create mode 100644 media-video/qc-usb/qc-usb-0.6.6-r2.ebuild (limited to 'media-video') diff --git a/media-video/qc-usb/ChangeLog b/media-video/qc-usb/ChangeLog index 3656bf8b5bfa..8856f09943ef 100644 --- a/media-video/qc-usb/ChangeLog +++ b/media-video/qc-usb/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-video/qc-usb # Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/qc-usb/ChangeLog,v 1.31 2009/01/04 14:53:35 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/qc-usb/ChangeLog,v 1.32 2009/02/15 19:22:53 eva Exp $ + +*qc-usb-0.6.6-r2 (15 Feb 2009) + + 15 Feb 2009; Gilles Dartiguelongue + +files/qc-usb-0.6.6-kcompat-2.6.28.patch, +qc-usb-0.6.6-r2.ebuild: + Bump to 0.6.6-r2. Fix compilation on 2.6.28, closes #254564. 04 Jan 2009; Markus Meier qc-usb-0.6.6-r1.ebuild: amd64/x86 stable, bug #252581 diff --git a/media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.28.patch b/media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.28.patch new file mode 100644 index 000000000000..438891f179a3 --- /dev/null +++ b/media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.28.patch @@ -0,0 +1,110 @@ +--- a/qc-driver.c 2009-01-11 17:54:22.000000000 +0100 ++++ b/qc-driver.c 2009-01-11 17:50:38.000000000 +0100 +@@ -645,7 +645,11 @@ + * - There is still commands to be sent in commands buffer or pid=0x850 and finalization packet is not yet sent. + */ + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) ++static void qc_i2c_handler(struct urb *urb) ++#else + static void qc_i2c_handler(struct urb *urb, struct pt_regs *ptregs) ++#endif + #else + static void qc_i2c_handler(struct urb *urb) + #endif +@@ -1740,7 +1744,11 @@ + * - There are too many transfer errors + */ + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) ++static void qc_isoc_handler(struct urb *urb) ++#else + static void qc_isoc_handler(struct urb *urb, struct pt_regs *ptregs) ++#endif + #else + static void qc_isoc_handler(struct urb *urb) + #endif +@@ -2255,7 +2263,11 @@ + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + struct video_device *dev = video_devdata(file); + #endif ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) ++ struct quickcam *qc = (struct quickcam *) video_get_drvdata(dev); ++#else + struct quickcam *qc = (struct quickcam *)dev->priv; ++#endif + struct qc_frame_data *fd = &qc->frame_data; + int mask; + +@@ -2307,7 +2319,11 @@ + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + struct video_device *dev = video_devdata(file); + #endif ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) ++ struct quickcam *qc = (struct quickcam *) video_get_drvdata(dev); ++#else + struct quickcam *qc = dev->priv; ++#endif + int r; + + if (qcdebug&QC_DEBUGLOGIC || qcdebug&QC_DEBUGUSER) PDEBUG("qc_v4l_open(qc=%p)", qc); +@@ -2375,7 +2391,11 @@ + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + struct video_device *dev = video_devdata(file); + #endif ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) ++ struct quickcam *qc = (struct quickcam *) video_get_drvdata(dev); ++#else + struct quickcam *qc = (struct quickcam *)dev->priv; ++#endif + if (qcdebug&QC_DEBUGLOGIC || qcdebug&QC_DEBUGUSER) PDEBUG("qc_v4l_close(dev=%p,qc=%p)",dev,qc); + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + TEST_BUGR_MSG(qc==NULL, "qc==NULL"); +@@ -2423,7 +2443,11 @@ + struct video_device *dev = video_devdata(file); + int noblock = file->f_flags & O_NONBLOCK; + #endif ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) ++ struct quickcam *qc = (struct quickcam *) video_get_drvdata(dev); ++#else + struct quickcam *qc = (struct quickcam *)dev->priv; ++#endif + int frame_len; + unsigned char *frame; + long r = 0; +@@ -2478,7 +2502,11 @@ + const void *start = (void *)vma->vm_start; + unsigned long size = vma->vm_end - vma->vm_start; + #endif ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) ++ struct quickcam *qc = (struct quickcam *) video_get_drvdata(dev); ++#else + struct quickcam *qc = (struct quickcam *)dev->priv; ++#endif + unsigned char *frame; + int ret = 0, frame_size; + #if !HAVE_VMA && LINUX_VERSION_CODE= KERNEL_VERSION(2,6,28) ++ struct quickcam *qc = (struct quickcam *) video_get_drvdata(dev); ++#else + struct quickcam *qc = (struct quickcam *)dev->priv; ++#endif + int i, retval = 0; + + if (qcdebug&QC_DEBUGLOGIC || qcdebug&QC_DEBUGUSER) PDEBUG("qc_v4l_ioctl(dev=%p,cmd=%u,arg=%p,qc=%p)",dev,cmd,argp,qc); +@@ -3161,7 +3193,11 @@ + + /* Register V4L video device */ + memcpy(&qc->vdev, &qc_v4l_template, sizeof(qc_v4l_template)); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) ++ video_set_drvdata(&qc->vdev, qc); ++#else + qc->vdev.priv = qc; ++#endif + r = video_register_device(&qc->vdev, VFL_TYPE_GRABBER, video_nr); + if (r<0) goto fail3; + PRINTK(KERN_INFO, "Registered device: /dev/video%i", qc->vdev.minor); diff --git a/media-video/qc-usb/qc-usb-0.6.6-r2.ebuild b/media-video/qc-usb/qc-usb-0.6.6-r2.ebuild new file mode 100644 index 000000000000..54116493968a --- /dev/null +++ b/media-video/qc-usb/qc-usb-0.6.6-r2.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/qc-usb/qc-usb-0.6.6-r2.ebuild,v 1.1 2009/02/15 19:22:53 eva Exp $ + +inherit linux-mod eutils multilib + +DESCRIPTION="Logitech USB Quickcam Express Linux Driver Modules" +HOMEPAGE="http://qce-ga.sourceforge.net/" +SRC_URI="mirror://sourceforge/qce-ga/${P}.tar.gz" + +IUSE="" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +CONFIG_CHECK="USB VIDEO_DEV VIDEO_V4L1_COMPAT" +MODULE_NAMES="quickcam(usb:)" +BUILD_TARGETS="all" + +RDEPEND="!media-video/qc-usb-messenger" +DEPEND="${RDEPEND}" + +pkg_setup() { + ABI=${KERNEL_ABI} + linux-mod_pkg_setup + BUILD_PARAMS="LINUX_DIR=${KV_DIR} OUTPUT_DIR=${KV_OUT_DIR}" +} + +src_unpack() { + unpack ${A} + cd "${S}" + + convert_to_m "${S}"/Makefile + epatch "${FILESDIR}/${P}-koutput.patch" + + # Do not strip symbols + sed -i -e "s/-s qcset.c/qcset.c/" Makefile + + # Fix compilation with 2.6.24 + epatch "${FILESDIR}/${P}-kcompat-2.6.24.patch" + + if kernel_is ge 2 6 26; then + # Fix compilation with 2.6.26, bug #232390 + epatch "${FILESDIR}/${P}-kcompat-2.6.26.patch" + fi + + if kernel_is ge 2 6 27; then + # Fix compilation with 2.6.27 + epatch "${FILESDIR}/${P}-kcompat-2.6.27.patch" + fi + + # Fix compilation with 2.6.28, bug #254564 + epatch "${FILESDIR}/${P}-kcompat-2.6.28.patch" +} + +src_install() { + linux-mod_src_install + + dobin qcset + dodoc README* APPLICATIONS CREDITS TODO FAQ + + insinto /usr/share/doc/${PF} + doins quickcam.sh debug.sh freeshm.sh +} -- cgit v1.2.3-65-gdbad