diff options
-rw-r--r-- | media-video/qc-usb/ChangeLog | 10 | ||||
-rw-r--r-- | media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.26.patch | 30 | ||||
-rw-r--r-- | media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.27.patch | 25 | ||||
-rw-r--r-- | media-video/qc-usb/qc-usb-0.6.6-r1.ebuild | 61 |
4 files changed, 125 insertions, 1 deletions
diff --git a/media-video/qc-usb/ChangeLog b/media-video/qc-usb/ChangeLog index aac7e7b66eb9..bce16a42423d 100644 --- a/media-video/qc-usb/ChangeLog +++ b/media-video/qc-usb/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for media-video/qc-usb # Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/qc-usb/ChangeLog,v 1.29 2008/07/28 23:31:06 eva Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/qc-usb/ChangeLog,v 1.30 2008/10/23 21:39:05 eva Exp $ + +*qc-usb-0.6.6-r1 (23 Oct 2008) + + 23 Oct 2008; Gilles Dartiguelongue <eva@gentoo.org> + +files/qc-usb-0.6.6-kcompat-2.6.26.patch, + +files/qc-usb-0.6.6-kcompat-2.6.27.patch, +qc-usb-0.6.6-r1.ebuild: + Include patch for 2.6.26 and 2.6.27 compatibility, bug #232390. + Kudos to ubuntu and debian folks for still tracking this issues. 28 Jul 2008; Gilles Dartiguelongue <eva@gentoo.org> qc-usb-0.6.6.ebuild: fix pre-stripping QA warning. diff --git a/media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.26.patch b/media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.26.patch new file mode 100644 index 000000000000..a3863372894f --- /dev/null +++ b/media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.26.patch @@ -0,0 +1,30 @@ +From kernel 2.6.26rc2, SetPageReserved and ClearPageReserved changed from +macros to inline functions, that are generated using macros (among which +SETPAGEFLAG). + +The functions were redefined because they don't exist as macros, and then +preventing compilation. + +This patch allows to compile the quickcam/qce-ga/qc-usb module on kernels +2.6.26rc2 and later. + +An other fix could use #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26). + +Signed-off-by: Guillaume Bedot <littletux@mandriva.org> +--- qc-usb-0.6.6.orig/qc-memory.c 2008-05-27 16:41:19.000000000 +0200 ++++ qc-usb-0.6.6/qc-memory.c 2008-05-27 16:41:35.000000000 +0200 +@@ -81,12 +81,14 @@ + #define pte_offset(pmd,adr) pte_offset_map(pmd,adr) /* Emulation for a kernel using the new rmap-vm */ + #endif /* Fix by Michele Balistreri <brain87@gmx.net> */ + ++#ifndef SETPAGEFLAG + #ifndef SetPageReserved + #define SetPageReserved(p) mem_map_reserve(p) + #endif + #ifndef ClearPageReserved + #define ClearPageReserved(p) mem_map_unreserve(p) + #endif ++#endif + /* }}} */ + + /* {{{ [fold] kvirt_to_pa(): obtain physical address from virtual address obtained by vmalloc() */ diff --git a/media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.27.patch b/media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.27.patch new file mode 100644 index 000000000000..2fb93fa2ada1 --- /dev/null +++ b/media-video/qc-usb/files/qc-usb-0.6.6-kcompat-2.6.27.patch @@ -0,0 +1,25 @@ +--- + Patch inspired bug [1] + + [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/268134 +--- a/qc-driver.c 2008-10-23 22:55:48.000000000 +0200 ++++ b/qc-driver.c 2008-10-23 22:56:53.000000000 +0200 +@@ -2528,7 +2528,7 @@ + if (qcdebug&QC_DEBUGUSER) PDEBUG("VIDIOCGCAP"); + memset(&b, 0, sizeof(b)); + strcpy(b.name, "Logitech QuickCam USB"); /* Max 31 characters */ +- b.type = qc->vdev.type; ++ b.type = VID_TYPE_CAPTURE; + b.channels = 1; + b.audios = 0; + b.maxwidth = qc->sensor_data.maxwidth; +@@ -3007,7 +3007,9 @@ + + static struct video_device qc_v4l_template = { + name: "QuickCam USB", ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) + type: VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE, ++#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) + hardware: VID_HARDWARE_QCAM_USB, + #endif diff --git a/media-video/qc-usb/qc-usb-0.6.6-r1.ebuild b/media-video/qc-usb/qc-usb-0.6.6-r1.ebuild new file mode 100644 index 000000000000..6958cb3254df --- /dev/null +++ b/media-video/qc-usb/qc-usb-0.6.6-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2008 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-r1.ebuild,v 1.1 2008/10/23 21:39:05 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 +} + +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 +} |