Author: thl
Update of /cvs/free/rpms/qc-usb-kmod/F-9
In directory se02.es.rpmfusion.net:/tmp/cvs-serv32499
Modified Files:
.cvsignore sources
Added Files:
qc-usb-0.6.6-2.6.24.patch qc-usb-0.6.6-2.6.26.patch
qc-usb-kmod.spec
Log Message:
import from livna
qc-usb-0.6.6-2.6.24.patch:
--- NEW FILE qc-usb-0.6.6-2.6.24.patch ---
Fixes kernel 2.6.24 compatibility.
Stefan Lippers-Hollmann <s.l-h(a)gmx.de>
diff -urp qc-usb-0.6.6.orig/qc-driver.c qc-usb-0.6.6/qc-driver.c
--- qc-usb-0.6.6.orig/qc-driver.c 2006-10-24 04:06:19.000000000 +0200
+++ qc-usb-0.6.6/qc-driver.c 2008-02-10 18:42:36.000000000 +0100
@@ -821,7 +821,9 @@ static int qc_i2c_init(struct quickcam *
if (!cr) goto fail2;
urb->transfer_buffer = kmalloc(qc_i2c_maxbufsize*sizeof(u8), GFP_KERNEL); /* Allocate
maximum ever needed */
if (!urb->transfer_buffer) goto fail3;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
spin_lock_init(&urb->lock);
+#endif
urb->complete = qc_i2c_handler;
urb->context = qc;
#if (LINUX_VERSION_CODE<KERNEL_VERSION(2,6,9) && !defined(CONFIG_SUSE_KERNEL))
|| LINUX_VERSION_CODE<KERNEL_VERSION(2,6,8)
@@ -3006,7 +3008,9 @@ static struct file_operations qc_v4l_fop
static struct video_device qc_v4l_template = {
name: "QuickCam USB",
type: VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
hardware: VID_HARDWARE_QCAM_USB,
+#endif
minor: -1,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
release: qc_v4l_release,
diff -urp qc-usb-0.6.6.orig/quickcam.h qc-usb-0.6.6/quickcam.h
--- qc-usb-0.6.6.orig/quickcam.h 2006-11-04 14:38:27.000000000 +0100
+++ qc-usb-0.6.6/quickcam.h 2008-02-10 18:42:36.000000000 +0100
@@ -126,7 +126,9 @@ struct qc_userlut {
#define FALSE 0
#define TRUE (!FALSE)
typedef unsigned char Bool;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
#define BIT(x) (1<<(x))
+#endif
#define SIZE(a) (sizeof(a)/sizeof((a)[0]))
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
qc-usb-0.6.6-2.6.26.patch:
--- NEW FILE qc-usb-0.6.6-2.6.26.patch ---
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(a)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(a)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() */
--- NEW FILE qc-usb-kmod.spec ---
# buildforkernels macro hint: when you build a new version or a new release
# that contains bugfixes or other improvements then you must disable the
# "buildforkernels newest" macro for just that build; immediately after
# queuing that build enable the macro again for subsequent builds; that way
# a new akmod package will only get build when a new one is actually needed
%define buildforkernels newest
Name: qc-usb-kmod
Version: 0.6.6
Release: 41%{?dist}.1
Summary: qc-usb kernel modules
Group: System Environment/Kernel
License: GPLv2+
URL:
http://qce-ga.sourceforge.net/
Source0:
http://downloads.sourceforge.net/qce-ga/qc-usb-%{version}.tar.gz
Patch0: qc-usb-0.6.6-2.6.24.patch
# from
http://patch-tracking.debian.net/patch/series/view/qc-usb/0.6.6-6/kcompat...
Patch1: qc-usb-0.6.6-2.6.26.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: i586 i686 x86_64
# get the needed BuildRequires (in parts depending on what we build for)
BuildRequires: %{_bindir}/kmodtool
%{!?kernels:BuildRequires:
buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu}
}
# kmodtool does its magic here
%{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name}
%{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"}
2>/dev/null) }
%description
Logitech QuickCam video driver with V4L support
%prep
# error out if there was something wrong with kmodtool
%{?kmodtool_check}
# print kmodtool output for debugging purposes:
kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name}
%{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"}
2>/dev/null
# go
%setup -q -c -T -a 0
%patch0 -p0 -b .2.6.24
%patch1 -p0 -b .2.6.26
for kernel_version in %{?kernel_versions}; do
cp -a qc-usb-%{version} _kmod_build_${kernel_version%%___*}
done
%build
for kernel_version in %{?kernel_versions}; do
make -C "_kmod_build_${kernel_version%%___*}"
LINUX_DIR="${kernel_version##*___}" %{?_smp_mflags} quickcam.ko
done
%install
rm -rf $RPM_BUILD_ROOT
for kernel_version in %{?kernel_versions}; do
install -D -m 755 _kmod_build_${kernel_version%%___*}/quickcam.ko
$RPM_BUILD_ROOT%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/quickcam.ko
done
%{?akmod_install}
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Fri Oct 03 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info - 0.6.6-41.1
- rebuild for rpm fusion
* Wed Oct 01 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info - 0.6.6-40.1
- rebuild for new kernels
* Mon Sep 30 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info - 0.6.6-39.1
- add qc-usb-0.6.6-2.6.26.patch
- temporary disable ppc
* Sat Aug 16 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info - 0.6.6-37
- rebuild for new kernels
* Thu Jul 24 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 0.6.6-36
- rebuild for new Fedora kernels
* Tue Jul 15 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 0.6.6-35
- rebuild for new Fedora kernels
* Wed Jul 02 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 0.6.6-34
- rebuild for new Fedora kernels
* Fri Jun 13 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 0.6.6-33
- rebuild for new Fedora kernels
* Fri Jun 06 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 0.6.6-32
- rebuild for new Fedora kernels
* Thu May 15 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 0.6.6-31
- rebuild for new Fedora kernels
* Sun May 04 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 0.6.6-30
- build for f9
* Sat Feb 16 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 0.6.6-23
- fix typo
* Sun Feb 10 2008 Lubomir Kundrak <lkundrak(a)redhat.com> - 0.6.6-22
- Patch for 2.6.24
* Sat Jan 26 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 0.6.6-21
- rebuild for new kmodtools, akmod adjustments
* Sun Jan 20 2008 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 0.6.6-20
- build akmods package
* Thu Dec 20 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 0.6.6-5
- rebuilt for 2.6.21-2952.fc8xen 2.6.23.9-85.fc8
* Tue Dec 04 2007 Thorsten Leemhuis <fedora[AT]leemhuis[DOT]info> - 0.6.6-4
- Convert to kmod2
* Tue Dec 04 2007 Lubomir Kundrak <lkundrak(a)redhat.com> - 0.6.6-3
- Add ExclusiveArch and description
* Sun Dec 02 2007 Lubomir Kundrak <lkundrak(a)redhat.com> - 0.6.6-2
- Rename from kmod-qc-usb to qc-usb-kmod
* Sat Dec 01 2007 Lubomir Kundrak <lkundrak(a)redhat.com> - 0.6.6-1
- Version bump
- Enable non-x86 builds
* Mon Sep 17 2007 Lubomir Kundrak <lkundrak(a)redhat.com> 0.6.5-1
- Initial package
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/qc-usb-kmod/F-9/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 3 Oct 2008 12:00:34 -0000 1.1
+++ .cvsignore 3 Oct 2008 13:44:47 -0000 1.2
@@ -0,0 +1 @@
+qc-usb-0.6.6.tar.gz
Index: sources
===================================================================
RCS file: /cvs/free/rpms/qc-usb-kmod/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 3 Oct 2008 12:00:34 -0000 1.1
+++ sources 3 Oct 2008 13:44:47 -0000 1.2
@@ -0,0 +1 @@
+9eab8fb3a75326d1565d59b0c7256075 qc-usb-0.6.6.tar.gz