From 3f64c179bfc9b6bdce066498658ad8dcc27c46e9 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 7 Oct 2011 15:29:05 -0300 Subject: [PATCH 01/14] Build v4l-utils without needing libv4l Some of the v4l-utils are dependent on the libv4l shipped with it. However, as RHEL6 ships its own version on it (generally a legacy one), change the build system to build only a local static copy of libv4l, and linkedit the tools that need it statically. Signed-off-by: Mauro Carvalho Chehab --- .gitignore | 1 + sources | 2 +- v4l-utils.spec | 79 ++++++++++---------------------------------------- 3 files changed, 18 insertions(+), 64 deletions(-) diff --git a/.gitignore b/.gitignore index 9251380..75711a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /v4l-utils-0.8.3.tar.bz2 +/v4l-utils-0.9.0.git5f24b816.tar.bz2 diff --git a/sources b/sources index 4131152..5d5ada1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f25ad639717d7411a58f10a9e378d7db v4l-utils-0.8.3.tar.bz2 +b79b3fa554f799b2e82ce956c47f4100 v4l-utils-0.9.0.git5f24b816.tar.bz2 diff --git a/v4l-utils.spec b/v4l-utils.spec index 18a9d81..edb25c4 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -1,5 +1,5 @@ Name: v4l-utils -Version: 0.8.3 +Version: 0.9.0.git5f24b816 Release: 2%{?dist} Summary: Utilities for video4linux and DVB devices Group: Applications/System @@ -10,10 +10,9 @@ Source0: http://linuxtv.org/downloads/v4l-utils/v4l-utils-%{version}.tar. Source1: qv4l2.desktop Source2: qv4l2.svg BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: qt4-devel libsysfs-devel kernel-headers desktop-file-utils +BuildRequires: qt4-devel kernel-headers desktop-file-utils # For /etc/udev/rules.d ownership Requires: udev -Requires: libv4l = %{version}-%{release} %description v4l-utils is a collection of various video4linux (V4L) and DVB utilities. The @@ -25,7 +24,6 @@ v4l2-sysfs-path. Summary: Utilities for v4l2 / DVB driver development and debugging # decode_tm6000 is GPLv2 only License: GPLv2+ and GPLv2 -Requires: libv4l = %{version}-%{release} %description devel-tools Utilities for v4l2 / DVB driver authors: decode_tm6000, v4l2-compliance and @@ -35,51 +33,14 @@ v4l2-dbg. %package -n qv4l2 Summary: QT v4l2 test control and streaming test application License: GPLv2+ -Requires: libv4l = %{version}-%{release} %description -n qv4l2 QT v4l2 test control and streaming test application. - -%package -n libv4l -Summary: Collection of video4linux support libraries -Group: System Environment/Libraries -# Some of the decompression helpers are GPLv2, the rest is LGPLv2+ -License: LGPLv2+ and GPLv2 -URL: http://hansdegoede.livejournal.com/3636.html - -%description -n libv4l -libv4l is a collection of libraries which adds a thin abstraction layer on -top of video4linux2 devices. The purpose of this (thin) layer is to make it -easy for application writers to support a wide variety of devices without -having to write separate code for different devices in the same class. libv4l -consists of 3 different libraries: libv4lconvert, libv4l1 and libv4l2. - -libv4lconvert offers functions to convert from any (known) pixel-format -to V4l2_PIX_FMT_BGR24 or V4l2_PIX_FMT_YUV420. - -libv4l1 offers the (deprecated) v4l1 API on top of v4l2 devices, independent -of the drivers for those devices supporting v4l1 compatibility (which many -v4l2 drivers do not). - -libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the -application transparent libv4lconvert conversion where necessary. - - -%package -n libv4l-devel -Summary: Development files for libv4l -Group: Development/Libraries -License: LGPLv2+ -URL: http://hansdegoede.livejournal.com/3636.html -Requires: libv4l = %{version}-%{release} - -%description -n libv4l-devel -The libv4l-devel package contains libraries and header files for -developing applications that use libv4l. - - %prep -%setup -q +%setup +make +./configure --disable-libv4l %build @@ -103,10 +64,6 @@ install -p -m 644 %{SOURCE2} \ rm -rf $RPM_BUILD_ROOT -%post -n libv4l -p /sbin/ldconfig - -%postun -n libv4l -p /sbin/ldconfig - %post -n qv4l2 touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : @@ -126,7 +83,8 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %dir %{_sysconfdir}/rc_keymaps %config(noreplace) %{_sysconfdir}/rc_keymaps/* %config(noreplace) %{_sysconfdir}/rc_maps.cfg -%config(noreplace) %{_sysconfdir}/udev/rules.d/70-infrared.rules +%config(noreplace) /lib/udev/rules.d/70-infrared.rules + %{_bindir}/cx18-ctl %{_bindir}/ir-keytable %{_bindir}/ivtv-ctl @@ -147,22 +105,17 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_bindir}/qv4l2 %{_datadir}/applications/qv4l2.desktop %{_datadir}/icons/hicolor/scalable/apps/qv4l2.svg - -%files -n libv4l -%defattr(-,root,root,-) -%doc COPYING.LIB COPYING ChangeLog README.lib TODO -%{_libdir}/libv4l*.so.* -%{_libdir}/libv4l - -%files -n libv4l-devel -%defattr(-,root,root,-) -%doc README.lib-multi-threading -%{_includedir}/libv4l*.h -%{_libdir}/libv4l*.so -%{_libdir}/pkgconfig/libv4l*.pc - +%{_datadir}/icons/hicolor/16x16/apps/qv4l2.png +%{_datadir}/icons/hicolor/24x24/apps/qv4l2.png +%{_datadir}/icons/hicolor/32x32/apps/qv4l2.png +%{_datadir}/icons/hicolor/64x64/apps/qv4l2.png %changelog +* Fri Oct 7 2011 Mauro Carvalho Chehab 0.9.0.git5f24b816 +- Based on git changeset 5f24b816, this version will allow adding a v4l-utils + package without compiling the libv4l. This avoids a conflict with the + existing libv4l package that is part of the RHEL6 repositories. + * Sat Mar 12 2011 Hans de Goede 0.8.3-2 - Add a .desktop file for qv4l2 - Add fully versioned Requires on libv4l to other (sub)packages From b3a0342f29c4ebfb5c72705f4075cf217043a569 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 7 Oct 2011 15:45:28 -0300 Subject: [PATCH 02/14] Need autoconf too Signed-off-by: Mauro Carvalho Chehab --- v4l-utils.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/v4l-utils.spec b/v4l-utils.spec index edb25c4..6c31fcc 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -11,6 +11,7 @@ Source1: qv4l2.desktop Source2: qv4l2.svg BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: qt4-devel kernel-headers desktop-file-utils +BuildRequires: autoconf # For /etc/udev/rules.d ownership Requires: udev From 230d7bab97a05c10279243117688ad9f857f2541 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 8 Sep 2014 21:21:00 -0300 Subject: [PATCH 03/14] Update do version 1.4.0 Add a package for libdvbv5. Signed-off-by: Mauro Carvalho Chehab --- .gitignore | 1 + sources | 2 +- v4l-utils.spec | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 48 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index d7f4557..42dc631 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /v4l-utils-0.8.8.tar.bz2 /v4l-utils-0.9.5.tar.bz2 /v4l-utils-1.0.0.tar.bz2 +/v4l-utils-1.4.0.tar.bz2 diff --git a/sources b/sources index 5aee428..e264aea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2127f2d06be9162b0d346f7037a9e852 v4l-utils-1.0.0.tar.bz2 +7ce03062482b8963694251b45da93f42 v4l-utils-1.4.0.tar.bz2 diff --git a/v4l-utils.spec b/v4l-utils.spec index 5c916d1..d3be603 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -1,13 +1,14 @@ Name: v4l-utils -Version: 1.0.0 +Version: 1.4.0 Release: 1%{?dist} Summary: Utilities for video4linux and DVB devices Group: Applications/System -# ir-keytable and v4l2-sysfs-path are GPLv2 only +# libdvbv5, dvbv5 utils, ir-keytable and v4l2-sysfs-path are GPLv2 only License: GPLv2+ and GPLv2 URL: http://www.linuxtv.org/downloads/v4l-utils/ Source0: http://linuxtv.org/downloads/v4l-utils/v4l-utils-%{version}.tar.bz2 BuildRequires: libjpeg-devel qt4-devel kernel-headers desktop-file-utils +BuildRequires: alsa-lib-devel doxygen # For /lib/udev/rules.d ownership Requires: udev Requires: libv4l%{?_isa} = %{version}-%{release} @@ -63,6 +64,14 @@ libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the application transparent libv4lconvert conversion where necessary. +%package -n libdvbv5 +Summary: Libraries to control, scan and zap on Digital TV channels +Group: Development/Libraries +License: GPLv2 + +%description -n libdvbv5 +Libraries to control, scan and zap on Digital TV channels + %package -n libv4l-devel Summary: Development files for libv4l Group: Development/Libraries @@ -75,22 +84,37 @@ The libv4l-devel package contains libraries and header files for developing applications that use libv4l. +%package -n libdvbv5-devel +Summary: Development files for libdvbv5 +Group: Development/Libraries +License: GPLv2 +Requires: libdvbv5%{?_isa} = %{version}-%{release} + +%description -n libdvbv5-devel +The libdvbv5-devel package contains libraries and header +files for developing applications that use libdvbv5. + + %prep %setup -q %build -%configure --disable-static +%configure --disable-static --enable-libdvbv5 --enable-doxygen-man # Don't use rpath! sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} +make doxygen-run %install %make_install find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' rm $RPM_BUILD_ROOT%{_libdir}/{v4l1compat.so,v4l2convert.so} +mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3/ +cp -arv %{_builddir}/%{name}-%{version}/doxygen-doc/man/man3 $RPM_BUILD_ROOT%{_mandir}/ +rm $RPM_BUILD_ROOT%{_mandir}/man3/_*3 desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/qv4l2.desktop @@ -98,6 +122,10 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/qv4l2.desktop %postun -n libv4l -p /sbin/ldconfig +%post -n libdvbv5 -p /sbin/ldconfig + +%postun -n libdvbv5 -p /sbin/ldconfig + %post -n qv4l2 touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : @@ -121,10 +149,12 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_bindir}/dvb* %{_bindir}/ir-keytable %{_bindir}/ivtv-ctl +%{_bindir}/media-ctl %{_bindir}/rds-ctl %{_bindir}/v4l2-ctl %{_bindir}/v4l2-sysfs-path %{_mandir}/man1/ir-keytable.1* +%{_mandir}/man1/qv4l2.1* %files devel-tools %doc README @@ -149,8 +179,21 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_libdir}/libv4l*.so %{_libdir}/pkgconfig/libv4l*.pc +%files -n libdvbv5 +%doc COPYING ChangeLog lib/libdvbv5/README +%{_libdir}/libdvbv5*.so.* + +%files -n libdvbv5-devel +%{_includedir}/libdvbv5/*.h +%{_libdir}/libdvbv5*.so +%{_libdir}/pkgconfig/libdvbv5*.pc +%{_mandir}/man3/*.3* + %changelog +* Mon Sep 08 2014 Mauro Carvalho Chehab - 1.4.0-1 +- Upgrade to version 1.4.0 + * Sat Aug 3 2013 Hans de Goede - 1.0.0-1 - New upstream release 1.0.0 final - Drop libdvb5 (made private upstream for now) From 3f6c9a77ba1c23ce01d54911d561b3a6b093faae Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 5 Oct 2014 13:26:51 -0300 Subject: [PATCH 04/14] Update to version 1.6.0 Signed-off-by: Mauro Carvalho Chehab --- .gitignore | 1 + sources | 2 +- v4l-utils.spec | 8 +++++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 42dc631..395d6a2 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /v4l-utils-0.9.5.tar.bz2 /v4l-utils-1.0.0.tar.bz2 /v4l-utils-1.4.0.tar.bz2 +/v4l-utils-1.6.0.tar.bz2 diff --git a/sources b/sources index e264aea..0ad5f47 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7ce03062482b8963694251b45da93f42 v4l-utils-1.4.0.tar.bz2 +921dab41b8d950fb7d1412e39f48703e v4l-utils-1.6.0.tar.bz2 diff --git a/v4l-utils.spec b/v4l-utils.spec index d3be603..fd2d28e 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -1,5 +1,5 @@ Name: v4l-utils -Version: 1.4.0 +Version: 1.6.0 Release: 1%{?dist} Summary: Utilities for video4linux and DVB devices Group: Applications/System @@ -153,8 +153,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_bindir}/rds-ctl %{_bindir}/v4l2-ctl %{_bindir}/v4l2-sysfs-path -%{_mandir}/man1/ir-keytable.1* -%{_mandir}/man1/qv4l2.1* +%{_mandir}/man1/*.1* %files devel-tools %doc README @@ -191,6 +190,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sun Oct 05 2014 Mauro Carvalho Chehab - 1.6.0-1 +- Upgrade to version 1.6.0 + * Mon Sep 08 2014 Mauro Carvalho Chehab - 1.4.0-1 - Upgrade to version 1.4.0 From 63e34493c7632b7d9f8e803c3f70ff448ea1aa9b Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 22 Nov 2014 07:50:19 -0200 Subject: [PATCH 05/14] Update to version 1.6.2 It contains several fixes: Hans Verkuil (5): v4l2-ctl: fix sliced vbi mode parsing v4l2-compliance: when streaming used at least 2 buffers. v4l2-compliance: add initial checks for VIDIOC_QUERY_EXT_CTRL v4l2-ctl: add support for U32 control type. v4l2-ctl: fix array handling Gregor Jasny (5): man: remove duplicate backslash from NAME section man: Use Unicode character for ellipsis and fall back to ... man: add generated files to .gitignore v4l2-compliance: Explicitely link against rt library v4l2-ctl: Explicitely link against rt library Hans Verkuil (1): qv4l2/v4l2-ctl: fix buffer overrun in vivid-tpg. Hans de Goede (2): rc_keymaps: allwinner: S/KEY_HOME/KEY_HOMEPAGE/ v4lconvert: Fix decoding of jpeg data with no vertical sub-sampling Mauro Carvalho Chehab (4): libdvbv5: properly represent Satellite frequencies README: better document the package ir-keytable: fix a regression introduced by fe2aa5f767eba rc: Update the protocol name at RC6 tables Niels Ole Salscheider (1): qv4l2: Fix out-of-source build Patch1 is not needed anymore, as the fix got merged on version 1.6.1. Signed-off-by: Mauro Carvalho Chehab --- .gitignore | 1 + sources | 2 +- v4l-utils.spec | 9 +++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 15cbf55..e51c1df 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /v4l-utils-1.2.1.tar.bz2 /v4l-utils-1.4.0.tar.bz2 /v4l-utils-1.6.0.tar.bz2 +/v4l-utils-1.6.2.tar.bz2 diff --git a/sources b/sources index 0ad5f47..8ba1ca2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -921dab41b8d950fb7d1412e39f48703e v4l-utils-1.6.0.tar.bz2 +9cb3c178f937954e65bf30920af433ef v4l-utils-1.6.2.tar.bz2 diff --git a/v4l-utils.spec b/v4l-utils.spec index 42e0be7..be5f49c 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -1,13 +1,12 @@ Name: v4l-utils -Version: 1.6.0 -Release: 2%{?dist} +Version: 1.6.2 +Release: 1%{?dist} Summary: Utilities for video4linux and DVB devices Group: Applications/System # libdvbv5, dvbv5 utils, ir-keytable and v4l2-sysfs-path are GPLv2 only License: GPLv2+ and GPLv2 URL: http://www.linuxtv.org/downloads/v4l-utils/ Source0: http://linuxtv.org/downloads/v4l-utils/v4l-utils-%{version}.tar.bz2 -Patch1: 0001-v4lconvert-Fix-decoding-of-jpeg-data-with-no-vertica.patch BuildRequires: libjpeg-devel qt4-devel kernel-headers desktop-file-utils BuildRequires: alsa-lib-devel doxygen # For /lib/udev/rules.d ownership @@ -98,7 +97,6 @@ files for developing applications that use libdvbv5. %prep %setup -q -%patch1 -p1 %build @@ -192,6 +190,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Nov 22 2014 Mauro Carvalho Chehab - 1.6.2-1 +- Update to version 1.6.2 with contains several bugfixes + * Thu Nov 20 2014 Hans de Goede - 1.6.0-2 - Fix crash when decoding 1920x1080 jpeg to YUV420 From 3f3420e7887e4fc9c68ea7aae7a0b18d94056e72 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 24 Nov 2014 09:27:23 -0200 Subject: [PATCH 06/14] Synchronize Kernel headers with upstream This is needed to build with RHEL6's Kernel. Signed-off-by: Mauro Carvalho Chehab --- 0001-media-headers-sync.patch | 268 ++++++++++++++++++++++++++++++++++ v4l-utils.spec | 2 + 2 files changed, 270 insertions(+) create mode 100644 0001-media-headers-sync.patch diff --git a/0001-media-headers-sync.patch b/0001-media-headers-sync.patch new file mode 100644 index 0000000..cd5c5e4 --- /dev/null +++ b/0001-media-headers-sync.patch @@ -0,0 +1,268 @@ +diff --git a/Makefile.am b/Makefile.am +index 03169ce..758d355 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -36,6 +36,7 @@ sync-with-kernel: + cp -a $(KERNEL_DIR)/usr/include/linux/v4l2-common.h $(top_srcdir)/include/linux + cp -a $(KERNEL_DIR)/usr/include/linux/v4l2-subdev.h $(top_srcdir)/include/linux + cp -a $(KERNEL_DIR)/usr/include/linux/v4l2-mediabus.h $(top_srcdir)/include/linux ++ cp -a $(KERNEL_DIR)/usr/include/linux/media-bus-format.h $(top_srcdir)/include/linux + cp -a $(KERNEL_DIR)/usr/include/linux/ivtv.h $(top_srcdir)/include/linux + cp -a $(KERNEL_DIR)/usr/include/linux/dvb/frontend.h $(top_srcdir)/include/linux/dvb + cp -a $(KERNEL_DIR)/usr/include/linux/dvb/dmx.h $(top_srcdir)/include/linux/dvb +diff --git a/contrib/freebsd/include/linux/v4l2-controls.h b/contrib/freebsd/include/linux/v4l2-controls.h +index 8b93021..661f119 100644 +--- a/contrib/freebsd/include/linux/v4l2-controls.h ++++ b/contrib/freebsd/include/linux/v4l2-controls.h +@@ -746,6 +746,8 @@ enum v4l2_auto_focus_range { + V4L2_AUTO_FOCUS_RANGE_INFINITY = 3, + }; + ++#define V4L2_CID_PAN_SPEED (V4L2_CID_CAMERA_CLASS_BASE+32) ++#define V4L2_CID_TILT_SPEED (V4L2_CID_CAMERA_CLASS_BASE+33) + + /* FM Modulator class control IDs */ + +diff --git a/contrib/freebsd/include/linux/videodev2.h b/contrib/freebsd/include/linux/videodev2.h +index 02f2005..98e3615 100644 +--- a/contrib/freebsd/include/linux/videodev2.h ++++ b/contrib/freebsd/include/linux/videodev2.h +@@ -111,6 +111,7 @@ typedef int8_t __s8; + /* Four-character-code (FOURCC) */ + #define v4l2_fourcc(a, b, c, d)\ + ((uint32_t)(a) | ((uint32_t)(b) << 8) | ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24)) ++#define v4l2_fourcc_be(a, b, c, d) (v4l2_fourcc(a, b, c, d) | (1 << 31)) + + /* + * E N U M S +@@ -339,6 +340,8 @@ struct v4l2_pix_format { + #define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */ + #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ + #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ ++#define V4L2_PIX_FMT_ARGB555X v4l2_fourcc_be('A', 'R', '1', '5') /* 16 ARGB-5-5-5 BE */ ++#define V4L2_PIX_FMT_XRGB555X v4l2_fourcc_be('X', 'R', '1', '5') /* 16 XRGB-5-5-5 BE */ + #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ + #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ + #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ +diff --git a/include/linux/media-bus-format.h b/include/linux/media-bus-format.h +new file mode 100644 +index 0000000..23b4090 +--- /dev/null ++++ b/include/linux/media-bus-format.h +@@ -0,0 +1,125 @@ ++/* ++ * Media Bus API header ++ * ++ * Copyright (C) 2009, Guennadi Liakhovetski ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#ifndef __LINUX_MEDIA_BUS_FORMAT_H ++#define __LINUX_MEDIA_BUS_FORMAT_H ++ ++/* ++ * These bus formats uniquely identify data formats on the data bus. Format 0 ++ * is reserved, MEDIA_BUS_FMT_FIXED shall be used by host-client pairs, where ++ * the data format is fixed. Additionally, "2X8" means that one pixel is ++ * transferred in two 8-bit samples, "BE" or "LE" specify in which order those ++ * samples are transferred over the bus: "LE" means that the least significant ++ * bits are transferred first, "BE" means that the most significant bits are ++ * transferred first, and "PADHI" and "PADLO" define which bits - low or high, ++ * in the incomplete high byte, are filled with padding bits. ++ * ++ * The bus formats are grouped by type, bus_width, bits per component, samples ++ * per pixel and order of subsamples. Numerical values are sorted using generic ++ * numerical sort order (8 thus comes before 10). ++ * ++ * As their value can't change when a new bus format is inserted in the ++ * enumeration, the bus formats are explicitly given a numerical value. The next ++ * free values for each category are listed below, update them when inserting ++ * new pixel codes. ++ */ ++ ++#define MEDIA_BUS_FMT_FIXED 0x0001 ++ ++/* RGB - next is 0x100e */ ++#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001 ++#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002 ++#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE 0x1003 ++#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE 0x1004 ++#define MEDIA_BUS_FMT_BGR565_2X8_BE 0x1005 ++#define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006 ++#define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007 ++#define MEDIA_BUS_FMT_RGB565_2X8_LE 0x1008 ++#define MEDIA_BUS_FMT_RGB666_1X18 0x1009 ++#define MEDIA_BUS_FMT_RGB888_1X24 0x100a ++#define MEDIA_BUS_FMT_RGB888_2X12_BE 0x100b ++#define MEDIA_BUS_FMT_RGB888_2X12_LE 0x100c ++#define MEDIA_BUS_FMT_ARGB8888_1X32 0x100d ++ ++/* YUV (including grey) - next is 0x2024 */ ++#define MEDIA_BUS_FMT_Y8_1X8 0x2001 ++#define MEDIA_BUS_FMT_UV8_1X8 0x2015 ++#define MEDIA_BUS_FMT_UYVY8_1_5X8 0x2002 ++#define MEDIA_BUS_FMT_VYUY8_1_5X8 0x2003 ++#define MEDIA_BUS_FMT_YUYV8_1_5X8 0x2004 ++#define MEDIA_BUS_FMT_YVYU8_1_5X8 0x2005 ++#define MEDIA_BUS_FMT_UYVY8_2X8 0x2006 ++#define MEDIA_BUS_FMT_VYUY8_2X8 0x2007 ++#define MEDIA_BUS_FMT_YUYV8_2X8 0x2008 ++#define MEDIA_BUS_FMT_YVYU8_2X8 0x2009 ++#define MEDIA_BUS_FMT_Y10_1X10 0x200a ++#define MEDIA_BUS_FMT_UYVY10_2X10 0x2018 ++#define MEDIA_BUS_FMT_VYUY10_2X10 0x2019 ++#define MEDIA_BUS_FMT_YUYV10_2X10 0x200b ++#define MEDIA_BUS_FMT_YVYU10_2X10 0x200c ++#define MEDIA_BUS_FMT_Y12_1X12 0x2013 ++#define MEDIA_BUS_FMT_UYVY8_1X16 0x200f ++#define MEDIA_BUS_FMT_VYUY8_1X16 0x2010 ++#define MEDIA_BUS_FMT_YUYV8_1X16 0x2011 ++#define MEDIA_BUS_FMT_YVYU8_1X16 0x2012 ++#define MEDIA_BUS_FMT_YDYUYDYV8_1X16 0x2014 ++#define MEDIA_BUS_FMT_UYVY10_1X20 0x201a ++#define MEDIA_BUS_FMT_VYUY10_1X20 0x201b ++#define MEDIA_BUS_FMT_YUYV10_1X20 0x200d ++#define MEDIA_BUS_FMT_YVYU10_1X20 0x200e ++#define MEDIA_BUS_FMT_YUV10_1X30 0x2016 ++#define MEDIA_BUS_FMT_AYUV8_1X32 0x2017 ++#define MEDIA_BUS_FMT_UYVY12_2X12 0x201c ++#define MEDIA_BUS_FMT_VYUY12_2X12 0x201d ++#define MEDIA_BUS_FMT_YUYV12_2X12 0x201e ++#define MEDIA_BUS_FMT_YVYU12_2X12 0x201f ++#define MEDIA_BUS_FMT_UYVY12_1X24 0x2020 ++#define MEDIA_BUS_FMT_VYUY12_1X24 0x2021 ++#define MEDIA_BUS_FMT_YUYV12_1X24 0x2022 ++#define MEDIA_BUS_FMT_YVYU12_1X24 0x2023 ++ ++/* Bayer - next is 0x3019 */ ++#define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001 ++#define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013 ++#define MEDIA_BUS_FMT_SGRBG8_1X8 0x3002 ++#define MEDIA_BUS_FMT_SRGGB8_1X8 0x3014 ++#define MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8 0x3015 ++#define MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8 0x3016 ++#define MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8 0x3017 ++#define MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8 0x3018 ++#define MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8 0x300b ++#define MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8 0x300c ++#define MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8 0x3009 ++#define MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8 0x300d ++#define MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE 0x3003 ++#define MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE 0x3004 ++#define MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE 0x3005 ++#define MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE 0x3006 ++#define MEDIA_BUS_FMT_SBGGR10_1X10 0x3007 ++#define MEDIA_BUS_FMT_SGBRG10_1X10 0x300e ++#define MEDIA_BUS_FMT_SGRBG10_1X10 0x300a ++#define MEDIA_BUS_FMT_SRGGB10_1X10 0x300f ++#define MEDIA_BUS_FMT_SBGGR12_1X12 0x3008 ++#define MEDIA_BUS_FMT_SGBRG12_1X12 0x3010 ++#define MEDIA_BUS_FMT_SGRBG12_1X12 0x3011 ++#define MEDIA_BUS_FMT_SRGGB12_1X12 0x3012 ++ ++/* JPEG compressed formats - next is 0x4002 */ ++#define MEDIA_BUS_FMT_JPEG_1X8 0x4001 ++ ++/* Vendor specific formats - next is 0x5002 */ ++ ++/* S5C73M3 sensor specific interleaved UYVY and JPEG */ ++#define MEDIA_BUS_FMT_S5C_UYVY_JPEG_1X8 0x5001 ++ ++/* HSV - next is 0x6002 */ ++#define MEDIA_BUS_FMT_AHSV8888_1X32 0x6001 ++ ++#endif /* __LINUX_MEDIA_BUS_FORMAT_H */ +diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h +index 8b93021..661f119 100644 +--- a/include/linux/v4l2-controls.h ++++ b/include/linux/v4l2-controls.h +@@ -746,6 +746,8 @@ enum v4l2_auto_focus_range { + V4L2_AUTO_FOCUS_RANGE_INFINITY = 3, + }; + ++#define V4L2_CID_PAN_SPEED (V4L2_CID_CAMERA_CLASS_BASE+32) ++#define V4L2_CID_TILT_SPEED (V4L2_CID_CAMERA_CLASS_BASE+33) + + /* FM Modulator class control IDs */ + +diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h +index 87b83c3..ef4c72a 100644 +--- a/include/linux/videodev2.h ++++ b/include/linux/videodev2.h +@@ -77,6 +77,7 @@ + /* Four-character-code (FOURCC) */ + #define v4l2_fourcc(a, b, c, d)\ + ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24)) ++#define v4l2_fourcc_be(a, b, c, d) (v4l2_fourcc(a, b, c, d) | (1 << 31)) + + /* + * E N U M S +@@ -305,6 +306,8 @@ struct v4l2_pix_format { + #define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */ + #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ + #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ ++#define V4L2_PIX_FMT_ARGB555X v4l2_fourcc_be('A', 'R', '1', '5') /* 16 ARGB-5-5-5 BE */ ++#define V4L2_PIX_FMT_XRGB555X v4l2_fourcc_be('X', 'R', '1', '5') /* 16 XRGB-5-5-5 BE */ + #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ + #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ + #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ +diff --git a/utils/v4l2-ctl/vivid-tpg.c b/utils/v4l2-ctl/vivid-tpg.c +index 21e7f4e..cbcd625 100644 +--- a/utils/v4l2-ctl/vivid-tpg.c ++++ b/utils/v4l2-ctl/vivid-tpg.c +@@ -183,7 +183,7 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc) + case V4L2_PIX_FMT_XBGR32: + case V4L2_PIX_FMT_ARGB32: + case V4L2_PIX_FMT_ABGR32: +- tpg->is_yuv = 0; ++ tpg->is_yuv = false; + break; + case V4L2_PIX_FMT_NV16M: + case V4L2_PIX_FMT_NV61M: +@@ -193,7 +193,7 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc) + case V4L2_PIX_FMT_UYVY: + case V4L2_PIX_FMT_YVYU: + case V4L2_PIX_FMT_VYUY: +- tpg->is_yuv = 1; ++ tpg->is_yuv = true; + break; + default: + return false; +@@ -249,7 +249,7 @@ void tpg_s_crop_compose(struct tpg_data *tpg, const struct v4l2_rect *crop, + } + + void tpg_reset_source(struct tpg_data *tpg, unsigned width, unsigned height, +- enum v4l2_field field) ++ u32 field) + { + unsigned p; + +diff --git a/utils/v4l2-ctl/vivid-tpg.h.patch b/utils/v4l2-ctl/vivid-tpg.h.patch +index f200203..6348c19 100644 +--- a/utils/v4l2-ctl/vivid-tpg.h.patch ++++ b/utils/v4l2-ctl/vivid-tpg.h.patch +@@ -1,8 +1,8 @@ +-diff --git b/utils/v4l2-ctl/vivid-tpg.h a/utils/v4l2-ctl/vivid-tpg.h +-index 51ef7d1..76c373a 100644 +---- b/utils/v4l2-ctl/vivid-tpg.h +-+++ a/utils/v4l2-ctl/vivid-tpg.h +-@@ -20,13 +20,46 @@ ++diff --git a/devel/v4l/patchwork//drivers/media/platform/vivid/vivid-tpg.h b/utils/v4l2-ctl/vivid-tpg.h ++index 8ef3e52ba3be..76c373a7b4f1 100644 ++--- a/devel/v4l/patchwork//drivers/media/platform/vivid/vivid-tpg.h +++++ b/utils/v4l2-ctl/vivid-tpg.h ++@@ -20,14 +20,46 @@ + #ifndef _VIVID_TPG_H_ + #define _VIVID_TPG_H_ + +@@ -11,6 +11,7 @@ index 51ef7d1..76c373a 100644 + -#include + -#include + -#include ++-#include + #include + + +#include diff --git a/v4l-utils.spec b/v4l-utils.spec index 8d6f8f4..b953d86 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -7,6 +7,7 @@ Group: Applications/System License: GPLv2+ and GPLv2 URL: http://www.linuxtv.org/downloads/v4l-utils/ Source0: http://linuxtv.org/downloads/v4l-utils/v4l-utils-%{version}.tar.bz2 +Patch1: 0001-media-headers-sync.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libjpeg-devel qt4-devel kernel-headers desktop-file-utils BuildRequires: alsa-lib-devel doxygen @@ -99,6 +100,7 @@ files for developing applications that use libdvbv5. %prep %setup -q +%patch1 -p1 %build From 9e2a56fcf8d09f8566ca0ba97a21277df4b553da Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 24 Nov 2014 09:43:35 -0200 Subject: [PATCH 07/14] Preserve the old location for keymaps Let's not change the location for the keymaps, as we don't want to cause troubles when upgrading the package. Signed-off-by: Mauro Carvalho Chehab --- 0002-use-etc-for-keymaps.patch | 126 +++++++++++++++++++++++++++++++++ v4l-utils.spec | 6 +- 2 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 0002-use-etc-for-keymaps.patch diff --git a/0002-use-etc-for-keymaps.patch b/0002-use-etc-for-keymaps.patch new file mode 100644 index 0000000..edbc9a0 --- /dev/null +++ b/0002-use-etc-for-keymaps.patch @@ -0,0 +1,126 @@ +diff --git a/configure.ac b/configure.ac +index 069913d..26763f5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -233,8 +233,7 @@ AC_SUBST([libv4l1privdir], [$libdir/$with_libv4l1subdir]) + AC_SUBST([libv4l2privdir], [$libdir/$with_libv4l2subdir]) + AC_SUBST([libv4l2plugindir], [$libdir/$with_libv4l2subdir/plugins]) + AC_SUBST([libv4lconvertprivdir], [$libdir/$with_libv4lconvertsubdir]) +-AC_SUBST([keytablesystemdir], [$with_udevdir/rc_keymaps]) +-AC_SUBST([keytableuserdir], [$sysconfdir/rc_keymaps]) ++AC_SUBST([keytablesystemdir], [$sysconfdir/rc_keymaps]) + AC_SUBST([udevrulesdir], [$with_udevdir/rules.d]) + AC_SUBST([pkgconfigdir], [$libdir/pkgconfig]) + +@@ -244,7 +243,6 @@ AC_DEFINE_DIR([LIBV4L2_PRIV_DIR], [libv4l2privdir], [libv4l2 private lib directo + AC_DEFINE_DIR([LIBV4L2_PLUGIN_DIR], [libv4l2plugindir], [libv4l2 plugin directory]) + AC_DEFINE_DIR([LIBV4LCONVERT_PRIV_DIR], [libv4lconvertprivdir], [libv4lconvert private lib directory]) + AC_DEFINE_DIR([IR_KEYTABLE_SYSTEM_DIR], [keytablesystemdir], [ir-keytable preinstalled tables directory]) +-AC_DEFINE_DIR([IR_KEYTABLE_USER_DIR], [keytableuserdir], [ir-keytable user defined tables directory]) + + # options + +diff --git a/utils/keytable/Makefile.am b/utils/keytable/Makefile.am +index 3e66eba..9611591 100644 +--- a/utils/keytable/Makefile.am ++++ b/utils/keytable/Makefile.am +@@ -1,7 +1,7 @@ + bin_PROGRAMS = ir-keytable + man_MANS = ir-keytable.1 + sysconf_DATA = rc_maps.cfg +-keytablesystem_DATA = $(srcdir)/rc_keymaps/* ++sysconf_DATA = $(srcdir)/rc_keymaps/* + udevrules_DATA = 70-infrared.rules + + ir_keytable_SOURCES = keytable.c parse.h +@@ -9,10 +9,6 @@ ir_keytable_LDFLAGS = $(ARGP_LIBS) + + EXTRA_DIST = 70-infrared.rules rc_keymaps gen_keytables.pl ir-keytable.1 rc_maps.cfg + +-# custom target +-install-data-local: +- $(install_sh) -d "$(DESTDIR)$(keytableuserdir)" +- + sync-with-kernel: + @if [ ! -f $(KERNEL_DIR)/usr/include/linux/input.h ]; then \ + echo "Error you must set KERNEL_DIR to point to an extracted kernel source dir"; \ +diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c +index 1f42316..90faf99 100644 +--- a/utils/keytable/keytable.c ++++ b/utils/keytable/keytable.c +@@ -198,6 +198,7 @@ static error_t parse_keyfile(char *fname, char **table) + + fin = fopen(fname, "r"); + if (!fin) { ++ perror("opening keycode file"); + return errno; + } + +@@ -1610,31 +1611,15 @@ int main(int argc, char *argv[]) + cur->fname); + if (cur->fname[0] == '/' || ((cur->fname[0] == '.') && strchr(cur->fname, '/'))) { + fname = cur->fname; +- rc = parse_keyfile(fname, &name); +- if (rc < 0) { +- fprintf(stderr, "Can't load %s table\n", fname); +- return -1; +- } + } else { +- fname = malloc(strlen(cur->fname) + strlen(IR_KEYTABLE_USER_DIR) + 2); +- strcpy(fname, IR_KEYTABLE_USER_DIR); ++ fname = malloc(strlen(cur->fname) + strlen(IR_KEYTABLE_SYSTEM_DIR) + 2); ++ strcpy(fname, IR_KEYTABLE_SYSTEM_DIR); + strcat(fname, "/"); + strcat(fname, cur->fname); +- rc = parse_keyfile(fname, &name); +- if (rc != 0) { +- fname = malloc(strlen(cur->fname) + strlen(IR_KEYTABLE_SYSTEM_DIR) + 2); +- strcpy(fname, IR_KEYTABLE_SYSTEM_DIR); +- strcat(fname, "/"); +- strcat(fname, cur->fname); +- rc = parse_keyfile(fname, &name); +- } +- if (rc != 0) { +- fprintf(stderr, "Can't load %s table from %s or %s\n", cur->fname, IR_KEYTABLE_USER_DIR, IR_KEYTABLE_SYSTEM_DIR); +- return -1; +- } + } +- if (!keys.next) { +- fprintf(stderr, "Empty table %s\n", fname); ++ rc = parse_keyfile(fname, &name); ++ if (rc < 0 || !keys.next) { ++ fprintf(stderr, "Can't load %s table or empty table\n", fname); + return -1; + } + clear = 1; +diff --git a/configure b/configure +index c577fbfd4379..672c8f8681eb 100755 +--- a/configure ++++ b/configure +@@ -657,7 +657,6 @@ LIBV4L2_PRIV_DIR + LIBV4L1_PRIV_DIR + pkgconfigdir + udevrulesdir +-keytableuserdir + keytablesystemdir + libv4lconvertprivdir + libv4l2plugindir +@@ -19701,9 +19700,7 @@ libv4l2plugindir=$libdir/$with_libv4l2subdir/plugins + + libv4lconvertprivdir=$libdir/$with_libv4lconvertsubdir + +-keytablesystemdir=$with_udevdir/rc_keymaps +- +-keytableuserdir=$sysconfdir/rc_keymaps ++keytablesystemdir=$sysconfdir/rc_keymaps + + udevrulesdir=$with_udevdir/rules.d + +@@ -19805,7 +19802,6 @@ _ACEOF + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix +- eval ac_define_dir="\"$keytableuserdir\"" + eval ac_define_dir="\"$ac_define_dir\"" + IR_KEYTABLE_USER_DIR="$ac_define_dir" + diff --git a/v4l-utils.spec b/v4l-utils.spec index b953d86..0c97dc1 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -8,6 +8,7 @@ License: GPLv2+ and GPLv2 URL: http://www.linuxtv.org/downloads/v4l-utils/ Source0: http://linuxtv.org/downloads/v4l-utils/v4l-utils-%{version}.tar.bz2 Patch1: 0001-media-headers-sync.patch +Patch2: 0002-use-etc-for-keymaps.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libjpeg-devel qt4-devel kernel-headers desktop-file-utils BuildRequires: alsa-lib-devel doxygen @@ -101,6 +102,7 @@ files for developing applications that use libdvbv5. %prep %setup -q %patch1 -p1 +%patch2 -p1 %build @@ -146,9 +148,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files %doc README %dir %{_sysconfdir}/rc_keymaps +%config(noreplace) %{_sysconfdir}/rc_keymaps/* %config(noreplace) %{_sysconfdir}/rc_maps.cfg -%config(noreplace) /lib/udev/rules.d/70-infrared.rules -%{_prefix}/lib/udev/rc_keymaps/* +%{_udevrulesdir}/70-infrared.rules %{_bindir}/cx18-ctl %{_bindir}/dvb* %{_bindir}/ir-keytable From 161ba07903bb9af38c96d3e84f015142c7d7a692 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 24 Nov 2014 11:15:32 -0200 Subject: [PATCH 08/14] Add missing media.h file The media.h file found on RHEL6 is not enough to build the media-ctl tools. So, keep it in sync with the updated Kernel's one. Signed-off-by: Mauro Carvalho Chehab --- 0003-add-media-header.patch | 164 ++++++++++++++++++++++++++++++++++++ v4l-utils.spec | 2 + 2 files changed, 166 insertions(+) create mode 100644 0003-add-media-header.patch diff --git a/0003-add-media-header.patch b/0003-add-media-header.patch new file mode 100644 index 0000000..5ad7f17 --- /dev/null +++ b/0003-add-media-header.patch @@ -0,0 +1,164 @@ +commit 6d9ab872c7a936a3042b3872cf10560b6b2950e4 +Author: Mauro Carvalho Chehab +Date: Mon Nov 24 11:13:01 2014 -0200 + + sync-with-kernel: add include/linux/media.h + + Without this, build breaks when compiling a package for RHEL6, + with uses an older media stack. + + Signed-off-by: Mauro Carvalho Chehab + +diff --git a/Makefile.am b/Makefile.am +index 758d355..68c61a0 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -37,6 +37,7 @@ sync-with-kernel: + cp -a $(KERNEL_DIR)/usr/include/linux/v4l2-subdev.h $(top_srcdir)/include/linux + cp -a $(KERNEL_DIR)/usr/include/linux/v4l2-mediabus.h $(top_srcdir)/include/linux + cp -a $(KERNEL_DIR)/usr/include/linux/media-bus-format.h $(top_srcdir)/include/linux ++ cp -a $(KERNEL_DIR)/usr/include/linux/media.h $(top_srcdir)/include/linux + cp -a $(KERNEL_DIR)/usr/include/linux/ivtv.h $(top_srcdir)/include/linux + cp -a $(KERNEL_DIR)/usr/include/linux/dvb/frontend.h $(top_srcdir)/include/linux/dvb + cp -a $(KERNEL_DIR)/usr/include/linux/dvb/dmx.h $(top_srcdir)/include/linux/dvb +diff --git a/include/linux/media.h b/include/linux/media.h +new file mode 100644 +index 0000000..87a0e10 +--- /dev/null ++++ b/include/linux/media.h +@@ -0,0 +1,135 @@ ++/* ++ * Multimedia device API ++ * ++ * Copyright (C) 2010 Nokia Corporation ++ * ++ * Contacts: Laurent Pinchart ++ * Sakari Ailus ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ */ ++ ++#ifndef __LINUX_MEDIA_H ++#define __LINUX_MEDIA_H ++ ++#include ++#include ++#include ++ ++#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) ++ ++struct media_device_info { ++ char driver[16]; ++ char model[32]; ++ char serial[40]; ++ char bus_info[32]; ++ __u32 media_version; ++ __u32 hw_revision; ++ __u32 driver_version; ++ __u32 reserved[31]; ++}; ++ ++#define MEDIA_ENT_ID_FLAG_NEXT (1 << 31) ++ ++#define MEDIA_ENT_TYPE_SHIFT 16 ++#define MEDIA_ENT_TYPE_MASK 0x00ff0000 ++#define MEDIA_ENT_SUBTYPE_MASK 0x0000ffff ++ ++#define MEDIA_ENT_T_DEVNODE (1 << MEDIA_ENT_TYPE_SHIFT) ++#define MEDIA_ENT_T_DEVNODE_V4L (MEDIA_ENT_T_DEVNODE + 1) ++#define MEDIA_ENT_T_DEVNODE_FB (MEDIA_ENT_T_DEVNODE + 2) ++#define MEDIA_ENT_T_DEVNODE_ALSA (MEDIA_ENT_T_DEVNODE + 3) ++#define MEDIA_ENT_T_DEVNODE_DVB (MEDIA_ENT_T_DEVNODE + 4) ++ ++#define MEDIA_ENT_T_V4L2_SUBDEV (2 << MEDIA_ENT_TYPE_SHIFT) ++#define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV + 1) ++#define MEDIA_ENT_T_V4L2_SUBDEV_FLASH (MEDIA_ENT_T_V4L2_SUBDEV + 2) ++#define MEDIA_ENT_T_V4L2_SUBDEV_LENS (MEDIA_ENT_T_V4L2_SUBDEV + 3) ++/* A converter of analogue video to its digital representation. */ ++#define MEDIA_ENT_T_V4L2_SUBDEV_DECODER (MEDIA_ENT_T_V4L2_SUBDEV + 4) ++ ++#define MEDIA_ENT_FL_DEFAULT (1 << 0) ++ ++struct media_entity_desc { ++ __u32 id; ++ char name[32]; ++ __u32 type; ++ __u32 revision; ++ __u32 flags; ++ __u32 group_id; ++ __u16 pads; ++ __u16 links; ++ ++ __u32 reserved[4]; ++ ++ union { ++ /* Node specifications */ ++ struct { ++ __u32 major; ++ __u32 minor; ++ } v4l; ++ struct { ++ __u32 major; ++ __u32 minor; ++ } fb; ++ struct { ++ __u32 card; ++ __u32 device; ++ __u32 subdevice; ++ } alsa; ++ int dvb; ++ ++ /* Sub-device specifications */ ++ /* Nothing needed yet */ ++ __u8 raw[184]; ++ }; ++}; ++ ++#define MEDIA_PAD_FL_SINK (1 << 0) ++#define MEDIA_PAD_FL_SOURCE (1 << 1) ++#define MEDIA_PAD_FL_MUST_CONNECT (1 << 2) ++ ++struct media_pad_desc { ++ __u32 entity; /* entity ID */ ++ __u16 index; /* pad index */ ++ __u32 flags; /* pad flags */ ++ __u32 reserved[2]; ++}; ++ ++#define MEDIA_LNK_FL_ENABLED (1 << 0) ++#define MEDIA_LNK_FL_IMMUTABLE (1 << 1) ++#define MEDIA_LNK_FL_DYNAMIC (1 << 2) ++ ++struct media_link_desc { ++ struct media_pad_desc source; ++ struct media_pad_desc sink; ++ __u32 flags; ++ __u32 reserved[2]; ++}; ++ ++struct media_links_enum { ++ __u32 entity; ++ /* Should have enough room for pads elements */ ++ struct media_pad_desc *pads; ++ /* Should have enough room for links elements */ ++ struct media_link_desc *links; ++ __u32 reserved[4]; ++}; ++ ++#define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info) ++#define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc) ++#define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) ++#define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) ++ ++#endif /* __LINUX_MEDIA_H */ diff --git a/v4l-utils.spec b/v4l-utils.spec index 0c97dc1..33f49dc 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -9,6 +9,7 @@ URL: http://www.linuxtv.org/downloads/v4l-utils/ Source0: http://linuxtv.org/downloads/v4l-utils/v4l-utils-%{version}.tar.bz2 Patch1: 0001-media-headers-sync.patch Patch2: 0002-use-etc-for-keymaps.patch +Patch3: 0003-add-media-header.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libjpeg-devel qt4-devel kernel-headers desktop-file-utils BuildRequires: alsa-lib-devel doxygen @@ -103,6 +104,7 @@ files for developing applications that use libdvbv5. %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build From 84dc73e2f71e95fd27dee430246f863939513564 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 24 Nov 2014 11:29:27 -0200 Subject: [PATCH 09/14] Disable qv4l2 This package requires QGLFunctions with seems to be unavailable on rhel6. Signed-off-by: Mauro Carvalho Chehab --- v4l-utils.spec | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/v4l-utils.spec b/v4l-utils.spec index 33f49dc..59d0b69 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -35,15 +35,6 @@ Utilities for v4l2 / DVB driver authors: decode_tm6000, v4l2-compliance and v4l2-dbg. -%package -n qv4l2 -Summary: QT v4l2 test control and streaming test application -License: GPLv2+ -Requires: libv4l%{?_isa} = %{version}-%{release} - -%description -n qv4l2 -QT v4l2 test control and streaming test application. - - %package -n libv4l Summary: Collection of video4linux support libraries Group: System Environment/Libraries @@ -108,7 +99,7 @@ files for developing applications that use libdvbv5. %build -%configure --disable-static --enable-libdvbv5 --enable-doxygen-man +%configure --disable-static --enable-libdvbv5 --enable-doxygen-man --disable-qv4l2 # Don't use rpath! sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool @@ -123,7 +114,6 @@ rm $RPM_BUILD_ROOT%{_libdir}/{v4l1compat.so,v4l2convert.so} mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3/ cp -arv %{_builddir}/%{name}-%{version}/doxygen-doc/man/man3 $RPM_BUILD_ROOT%{_mandir}/ rm $RPM_BUILD_ROOT%{_mandir}/man3/_*3 -desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/qv4l2.desktop %post -n libv4l -p /sbin/ldconfig @@ -134,19 +124,6 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/qv4l2.desktop %postun -n libdvbv5 -p /sbin/ldconfig -%post -n qv4l2 -touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - -%postun -n qv4l2 -if [ $1 -eq 0 ] ; then - touch --no-create %{_datadir}/icons/hicolor &>/dev/null - gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi - -%posttrans -n qv4l2 -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - - %files %doc README %dir %{_sysconfdir}/rc_keymaps @@ -169,12 +146,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_bindir}/v4l2-compliance %{_sbindir}/v4l2-dbg -%files -n qv4l2 -%doc README -%{_bindir}/qv4l2 -%{_datadir}/applications/qv4l2.desktop -%{_datadir}/icons/hicolor/*/apps/qv4l2.* - %files -n libv4l %doc COPYING.libv4l COPYING ChangeLog README.libv4l TODO %{_libdir}/libv4l From f15e1baef4b2460ca592ed18e7d4ef1020ad705d Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 24 Nov 2014 11:31:59 -0200 Subject: [PATCH 10/14] Fix build on rhel6 Fix some remaining issues related to file packaging. Signed-off-by: Mauro Carvalho Chehab --- v4l-utils.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/v4l-utils.spec b/v4l-utils.spec index 59d0b69..7085045 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -113,7 +113,6 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' rm $RPM_BUILD_ROOT%{_libdir}/{v4l1compat.so,v4l2convert.so} mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3/ cp -arv %{_builddir}/%{name}-%{version}/doxygen-doc/man/man3 $RPM_BUILD_ROOT%{_mandir}/ -rm $RPM_BUILD_ROOT%{_mandir}/man3/_*3 %post -n libv4l -p /sbin/ldconfig @@ -129,7 +128,7 @@ rm $RPM_BUILD_ROOT%{_mandir}/man3/_*3 %dir %{_sysconfdir}/rc_keymaps %config(noreplace) %{_sysconfdir}/rc_keymaps/* %config(noreplace) %{_sysconfdir}/rc_maps.cfg -%{_udevrulesdir}/70-infrared.rules +%config(noreplace) /lib/udev/rules.d/70-infrared.rules %{_bindir}/cx18-ctl %{_bindir}/dvb* %{_bindir}/ir-keytable From 681ce4bc8b1b303580ee095158758a58cb6729e3 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 24 Nov 2014 12:07:32 -0200 Subject: [PATCH 11/14] Enable qv4l2 compilation Signed-off-by: Mauro Carvalho Chehab --- 0004-fix-qtgl-detection.patch | 59 +++++++++++++++++++++++++++++++++++ v4l-utils.spec | 38 ++++++++++++++++++++-- 2 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 0004-fix-qtgl-detection.patch diff --git a/0004-fix-qtgl-detection.patch b/0004-fix-qtgl-detection.patch new file mode 100644 index 0000000..91e26f8 --- /dev/null +++ b/0004-fix-qtgl-detection.patch @@ -0,0 +1,59 @@ +diff --git a/configure.ac b/configure.ac +index 7411d92..4375f39 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -148,7 +148,7 @@ else + AC_MSG_WARN(Qt4 or higher is not available) + fi + +-PKG_CHECK_MODULES(QTGL, [QtOpenGL >= 4.4 gl], [qt_pkgconfig_gl=true], [qt_pkgconfig_gl=false]) ++PKG_CHECK_MODULES(QTGL, [QtOpenGL >= 4.8 gl], [qt_pkgconfig_gl=true], [qt_pkgconfig_gl=false]) + if test "x$qt_pkgconfig_gl" = "xtrue"; then + AC_DEFINE([HAVE_QTGL], [1], [qt has opengl support]) + else +--- a/configure ++++ b/configure +@@ -18190,12 +18190,12 @@ if test -n "$QTGL_CFLAGS"; then + pkg_cv_QTGL_CFLAGS="$QTGL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtOpenGL >= 4.4 gl\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "QtOpenGL >= 4.4 gl") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtOpenGL >= 4.8 gl\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "QtOpenGL >= 4.8 gl") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_QTGL_CFLAGS=`$PKG_CONFIG --cflags "QtOpenGL >= 4.4 gl" 2>/dev/null` ++ pkg_cv_QTGL_CFLAGS=`$PKG_CONFIG --cflags "QtOpenGL >= 4.8 gl" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -18207,12 +18207,12 @@ if test -n "$QTGL_LIBS"; then + pkg_cv_QTGL_LIBS="$QTGL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtOpenGL >= 4.4 gl\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "QtOpenGL >= 4.4 gl") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtOpenGL >= 4.8 gl\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "QtOpenGL >= 4.8 gl") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_QTGL_LIBS=`$PKG_CONFIG --libs "QtOpenGL >= 4.4 gl" 2>/dev/null` ++ pkg_cv_QTGL_LIBS=`$PKG_CONFIG --libs "QtOpenGL >= 4.8 gl" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -18233,9 +18233,9 @@ else + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- QTGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "QtOpenGL >= 4.4 gl" 2>&1` ++ QTGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "QtOpenGL >= 4.8 gl" 2>&1` + else +- QTGL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "QtOpenGL >= 4.4 gl" 2>&1` ++ QTGL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "QtOpenGL >= 4.8 gl" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$QTGL_PKG_ERRORS" >&5 diff --git a/v4l-utils.spec b/v4l-utils.spec index 7085045..6bb7cf5 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -1,6 +1,6 @@ Name: v4l-utils Version: 1.6.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Utilities for video4linux and DVB devices Group: Applications/System # libdvbv5, dvbv5 utils, ir-keytable and v4l2-sysfs-path are GPLv2 only @@ -10,6 +10,7 @@ Source0: http://linuxtv.org/downloads/v4l-utils/v4l-utils-%{version}.tar. Patch1: 0001-media-headers-sync.patch Patch2: 0002-use-etc-for-keymaps.patch Patch3: 0003-add-media-header.patch +Patch4: 0004-fix-qtgl-detection.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libjpeg-devel qt4-devel kernel-headers desktop-file-utils BuildRequires: alsa-lib-devel doxygen @@ -35,6 +36,15 @@ Utilities for v4l2 / DVB driver authors: decode_tm6000, v4l2-compliance and v4l2-dbg. +%package -n qv4l2 +Summary: QT v4l2 test control and streaming test application +License: GPLv2+ +Requires: libv4l%{?_isa} = %{version}-%{release} + +%description -n qv4l2 +QT v4l2 test control and streaming test application. + + %package -n libv4l Summary: Collection of video4linux support libraries Group: System Environment/Libraries @@ -96,10 +106,11 @@ files for developing applications that use libdvbv5. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build -%configure --disable-static --enable-libdvbv5 --enable-doxygen-man --disable-qv4l2 +%configure --disable-static --enable-libdvbv5 --enable-doxygen-man # Don't use rpath! sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool @@ -113,6 +124,7 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' rm $RPM_BUILD_ROOT%{_libdir}/{v4l1compat.so,v4l2convert.so} mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3/ cp -arv %{_builddir}/%{name}-%{version}/doxygen-doc/man/man3 $RPM_BUILD_ROOT%{_mandir}/ +desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/qv4l2.desktop %post -n libv4l -p /sbin/ldconfig @@ -123,6 +135,19 @@ cp -arv %{_builddir}/%{name}-%{version}/doxygen-doc/man/man3 $RPM_BUILD_ROOT%{_m %postun -n libdvbv5 -p /sbin/ldconfig +%post -n qv4l2 +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun -n qv4l2 +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans -n qv4l2 +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + + %files %doc README %dir %{_sysconfdir}/rc_keymaps @@ -145,6 +170,12 @@ cp -arv %{_builddir}/%{name}-%{version}/doxygen-doc/man/man3 $RPM_BUILD_ROOT%{_m %{_bindir}/v4l2-compliance %{_sbindir}/v4l2-dbg +%files -n qv4l2 +%doc README +%{_bindir}/qv4l2 +%{_datadir}/applications/qv4l2.desktop +%{_datadir}/icons/hicolor/*/apps/qv4l2.* + %files -n libv4l %doc COPYING.libv4l COPYING ChangeLog README.libv4l TODO %{_libdir}/libv4l @@ -168,6 +199,9 @@ cp -arv %{_builddir}/%{name}-%{version}/doxygen-doc/man/man3 $RPM_BUILD_ROOT%{_m %changelog +* Mon Nov 24 2014 Mauro Carvalho Chehab - 1.6.2-2 +- Enable qv4l2 package + * Sat Nov 22 2014 Mauro Carvalho Chehab - 1.6.2-1 - Update to version 1.6.2 with contains several bugfixes From 321f313d760bdb759fb1e06e5b9ab71953be1c5a Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 10 Dec 2014 18:42:15 -0200 Subject: [PATCH 12/14] Remove libv4l from being packaged This avoids a conflict with RHEL6 package. Signed-off-by: Mauro Carvalho Chehab --- v4l-utils.spec | 69 ++++++-------------------------------------------- 1 file changed, 8 insertions(+), 61 deletions(-) diff --git a/v4l-utils.spec b/v4l-utils.spec index 6bb7cf5..263fa8d 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -1,6 +1,6 @@ Name: v4l-utils Version: 1.6.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Utilities for video4linux and DVB devices Group: Applications/System # libdvbv5, dvbv5 utils, ir-keytable and v4l2-sysfs-path are GPLv2 only @@ -17,7 +17,6 @@ BuildRequires: alsa-lib-devel doxygen BuildRequires: autoconf # For /etc/udev/rules.d ownership Requires: udev -Requires: libv4l%{?_isa} = %{version}-%{release} %description v4l-utils is a collection of various video4linux (V4L) and DVB utilities. The @@ -29,7 +28,6 @@ v4l2-sysfs-path. Summary: Utilities for v4l2 / DVB driver development and debugging # decode_tm6000 is GPLv2 only License: GPLv2+ and GPLv2 -Requires: libv4l%{?_isa} = %{version}-%{release} %description devel-tools Utilities for v4l2 / DVB driver authors: decode_tm6000, v4l2-compliance and @@ -39,37 +37,11 @@ v4l2-dbg. %package -n qv4l2 Summary: QT v4l2 test control and streaming test application License: GPLv2+ -Requires: libv4l%{?_isa} = %{version}-%{release} %description -n qv4l2 QT v4l2 test control and streaming test application. -%package -n libv4l -Summary: Collection of video4linux support libraries -Group: System Environment/Libraries -# Some of the decompression helpers are GPLv2, the rest is LGPLv2+ -License: LGPLv2+ and GPLv2 -URL: http://hansdegoede.livejournal.com/3636.html - -%description -n libv4l -libv4l is a collection of libraries which adds a thin abstraction layer on -top of video4linux2 devices. The purpose of this (thin) layer is to make it -easy for application writers to support a wide variety of devices without -having to write separate code for different devices in the same class. libv4l -consists of 3 different libraries: libv4lconvert, libv4l1 and libv4l2. - -libv4lconvert offers functions to convert from any (known) pixel-format -to V4l2_PIX_FMT_BGR24 or V4l2_PIX_FMT_YUV420. - -libv4l1 offers the (deprecated) v4l1 API on top of v4l2 devices, independent -of the drivers for those devices supporting v4l1 compatibility (which many -v4l2 drivers do not). - -libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the -application transparent libv4lconvert conversion where necessary. - - %package -n libdvbv5 Summary: Libraries to control, scan and zap on Digital TV channels Group: Development/Libraries @@ -78,18 +50,6 @@ License: GPLv2 %description -n libdvbv5 Libraries to control, scan and zap on Digital TV channels -%package -n libv4l-devel -Summary: Development files for libv4l -Group: Development/Libraries -License: LGPLv2+ -URL: http://hansdegoede.livejournal.com/3636.html -Requires: libv4l%{?_isa} = %{version}-%{release} - -%description -n libv4l-devel -The libv4l-devel package contains libraries and header files for -developing applications that use libv4l. - - %package -n libdvbv5-devel Summary: Development files for libdvbv5 Group: Development/Libraries @@ -110,7 +70,7 @@ files for developing applications that use libdvbv5. %build -%configure --disable-static --enable-libdvbv5 --enable-doxygen-man +%configure --disable-shared --enable-libdvbv5 --enable-doxygen-man # Don't use rpath! sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool @@ -120,17 +80,13 @@ make doxygen-run %install %make_install +rm $RPM_BUILD_ROOT/usr/include/libv4l*.h $RPM_BUILD_ROOT/usr/lib64/libv4l*.a $RPM_BUILD_ROOT/usr/lib64/pkgconfig/libv4l*.pc +rm -r $RPM_BUILD_ROOT/usr/lib64/libv4l/ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' -rm $RPM_BUILD_ROOT%{_libdir}/{v4l1compat.so,v4l2convert.so} mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3/ cp -arv %{_builddir}/%{name}-%{version}/doxygen-doc/man/man3 $RPM_BUILD_ROOT%{_mandir}/ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/qv4l2.desktop - -%post -n libv4l -p /sbin/ldconfig - -%postun -n libv4l -p /sbin/ldconfig - %post -n libdvbv5 -p /sbin/ldconfig %postun -n libdvbv5 -p /sbin/ldconfig @@ -176,29 +132,20 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/applications/qv4l2.desktop %{_datadir}/icons/hicolor/*/apps/qv4l2.* -%files -n libv4l -%doc COPYING.libv4l COPYING ChangeLog README.libv4l TODO -%{_libdir}/libv4l -%{_libdir}/libv4l*.so.* - -%files -n libv4l-devel -%doc README.lib-multi-threading -%{_includedir}/libv4l*.h -%{_libdir}/libv4l*.so -%{_libdir}/pkgconfig/libv4l*.pc - %files -n libdvbv5 %doc COPYING ChangeLog lib/libdvbv5/README -%{_libdir}/libdvbv5*.so.* +%{_libdir}/libdvbv5* %files -n libdvbv5-devel %{_includedir}/libdvbv5/*.h -%{_libdir}/libdvbv5*.so %{_libdir}/pkgconfig/libdvbv5*.pc %{_mandir}/man3/*.3* %changelog +* Wed Dec 10 2014 Mauro Carvalho Chehab - 1.6.2-3 +- Remove libv4l from packaging, to avoid override RHEL6 one + * Mon Nov 24 2014 Mauro Carvalho Chehab - 1.6.2-2 - Enable qv4l2 package From 3420d0074dccab4610c98c998a8b5046eb20bdc9 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 10 Dec 2014 19:49:25 -0200 Subject: [PATCH 13/14] Ignore errors at remove command Signed-off-by: Mauro Carvalho Chehab --- v4l-utils.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v4l-utils.spec b/v4l-utils.spec index 263fa8d..30bac13 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -80,7 +80,7 @@ make doxygen-run %install %make_install -rm $RPM_BUILD_ROOT/usr/include/libv4l*.h $RPM_BUILD_ROOT/usr/lib64/libv4l*.a $RPM_BUILD_ROOT/usr/lib64/pkgconfig/libv4l*.pc +-rm $RPM_BUILD_ROOT/usr/include/libv4l*.h $RPM_BUILD_ROOT/usr/lib64/libv4l*.a $RPM_BUILD_ROOT/usr/lib64/pkgconfig/libv4l*.pc rm -r $RPM_BUILD_ROOT/usr/lib64/libv4l/ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3/ From 70708db4fa752863f5cd13c3a6fb9571c7470ec9 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 10 Dec 2014 21:55:38 -0200 Subject: [PATCH 14/14] Fix libdir at the removal part of the spec file The way it was doesn't build on i686 Signed-off-by: Mauro Carvalho Chehab --- v4l-utils.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v4l-utils.spec b/v4l-utils.spec index 30bac13..0bc9525 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -80,8 +80,8 @@ make doxygen-run %install %make_install --rm $RPM_BUILD_ROOT/usr/include/libv4l*.h $RPM_BUILD_ROOT/usr/lib64/libv4l*.a $RPM_BUILD_ROOT/usr/lib64/pkgconfig/libv4l*.pc -rm -r $RPM_BUILD_ROOT/usr/lib64/libv4l/ +rm $RPM_BUILD_ROOT/usr/include/libv4l*.h $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libv4l*.pc $RPM_BUILD_ROOT/%{_libdir}/libv4l*.a +rm -r $RPM_BUILD_ROOT/%{_libdir}/libv4l/ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3/ cp -arv %{_builddir}/%{name}-%{version}/doxygen-doc/man/man3 $RPM_BUILD_ROOT%{_mandir}/