[hal/f15] Backport changes from hal-git to disable v4l1 support when not available in kernel headers.
Richard Hughes
rhughes at fedoraproject.org
Wed Oct 12 08:28:53 UTC 2011
commit c9f56260e74aa223e3b9c680f44eb932d59762cb
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Oct 12 09:28:31 2011 +0100
Backport changes from hal-git to disable v4l1 support when not
available in kernel headers.
hal-v4l1and2-00.patch | 12 ++++++++++++
hal-v4l1and2-01.patch | 38 ++++++++++++++++++++++++++++++++++++++
hal.spec | 15 ++++++++++++++-
3 files changed, 64 insertions(+), 1 deletions(-)
---
diff --git a/hal-v4l1and2-00.patch b/hal-v4l1and2-00.patch
new file mode 100644
index 0000000..3ac3549
--- /dev/null
+++ b/hal-v4l1and2-00.patch
@@ -0,0 +1,12 @@
+--- hal-0.5.14/configure.in 2009-08-24 14:42:29.000000000 +0200
++++ hal-0.5.14/configure.in.new 2011-10-10 11:45:09.647193592 +0200
+@@ -479,6 +479,9 @@
+ fi
+ AM_CONDITIONAL([HAVE_LIBPCI], [test "x$USE_LIBPCI" = "xyes"])
+
++AC_CHECK_HEADERS([linux/videodev.h], [have_videodev_h=yes], [])
++AM_CONDITIONAL(HAVE_V4L1, [test "x$have_videodev_h" = "xyes"])
++
+ USE_LIBUSB20=no
+ USE_LIBUSB=no
+ LIBUSB20_LIBS=""
diff --git a/hal-v4l1and2-01.patch b/hal-v4l1and2-01.patch
new file mode 100644
index 0000000..81a4720
--- /dev/null
+++ b/hal-v4l1and2-01.patch
@@ -0,0 +1,38 @@
+--- hal-0.5.14/hald/linux/probing/probe-video4linux.c.old 2011-10-10 11:59:37.304614834 +0200
++++ hal-0.5.14/hald/linux/probing/probe-video4linux.c 2011-10-10 12:12:32.157724998 +0200
+@@ -30,7 +30,9 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/ioctl.h>
++#ifdef HAVE_LINUX_VIDEODEV_H
+ #include <linux/videodev.h>
++#endif
+ #include <linux/videodev2.h>
+ #include <errno.h>
+ #include <fcntl.h>
+@@ -50,7 +52,9 @@
+ int ret = -1;
+ char *udi;
+ char *device_file;
++#ifdef HAVE_LINUX_VIDEODEV_H
+ struct video_capability v1cap;
++#endif
+ struct v4l2_capability v2cap;
+ LibHalContext *ctx = NULL;
+ LibHalChangeSet *cset;
+@@ -109,6 +113,7 @@
+ } else {
+ HAL_DEBUG (("ioctl VIDIOC_QUERYCAP failed"));
+
++#ifdef HAVE_LINUX_VIDEODEV_H
+ if (ioctl (fd, VIDIOCGCAP, &v1cap) == 0) {
+ libhal_changeset_set_property_string (cset,
+ "video4linux.version", "1");
+@@ -132,6 +137,7 @@
+ } else {
+ HAL_DEBUG (("ioctl VIDIOCGCAP failed"));
+ }
++#endif
+ }
+
+ LIBHAL_FREE_DBUS_ERROR (&error);
diff --git a/hal.spec b/hal.spec
index b157ad9..425a10f 100644
--- a/hal.spec
+++ b/hal.spec
@@ -26,7 +26,7 @@
Summary: Hardware Abstraction Layer
Name: hal
Version: 0.5.14
-Release: 7%{?dist}
+Release: 8%{?dist}
#Release: 1.%{?alphatag}%{?dist}
URL: http://www.freedesktop.org/Software/hal
Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.tar.bz2
@@ -59,6 +59,13 @@ Patch14: probe-input-segfault.patch
# https://bugs.launchpad.net/ubuntu/+source/hal/+bug/546992
Patch15: do_not_check_hal_on_bus.patch
+# http://cgit.freedesktop.org/hal/commit/?id=ae13d96fa2a0612b6000f4b8f6ed9d3564035703
+# but fixed to keep the ioctl error reporting intact
+# and prior autoconf change it's depending on
+# http://cgit.freedesktop.org/hal/commit/?id=8f624253f0135ca77a893ad4e8168f51ef90d4da
+Patch16: hal-v4l1and2-00.patch
+Patch17: hal-v4l1and2-01.patch
+
Patch100: hal-use-at-console.patch
License: AFL or GPLv2
@@ -168,6 +175,8 @@ Storage polling support for HAL
%patch13 -p1 -b .xen-unignore
%patch14 -p1 -b .probe-input-segfault
%patch15 -p1 -b .do_not_check_hal_on_bus.patch
+%patch16 -p1 -b .v4l100
+%patch17 -p1 -b .v4l101
%patch100 -p1 -b .drop-polkit
autoreconf -i -f
@@ -335,6 +344,10 @@ fi
%{_libexecdir}/hald-addon-storage
%changelog
+* Mon Oct 10 2011 Jiri Kastner <jkastner at redhat.com> - 0.5.14-8
+- Backport changes from hal-git to disable v4l1 support when not
+ available in kernel headers.
+
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.14-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list