[v4l-utils/el6] Enable qv4l2 compilation

mchehab mchehab at fedoraproject.org
Mon Nov 24 14:41:50 UTC 2014


commit 681ce4bc8b1b303580ee095158758a58cb6729e3
Author: Mauro Carvalho Chehab <mchehab at osg.samsung.com>
Date:   Mon Nov 24 12:07:32 2014 -0200

    Enable qv4l2 compilation
    
    Signed-off-by: Mauro Carvalho Chehab <mchehab at osg.samsung.com>

 0004-fix-qtgl-detection.patch |   59 +++++++++++++++++++++++++++++++++++++++++
 v4l-utils.spec                |   38 +++++++++++++++++++++++++-
 2 files changed, 95 insertions(+), 2 deletions(-)
---
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 <mchehab at osg.samsung.com> - 1.6.2-2
+- Enable qv4l2 package
+
 * Sat Nov 22 2014 Mauro Carvalho Chehab <mchehab at osg.samsung.com> - 1.6.2-1
 - Update to version 1.6.2 with contains several bugfixes
 


More information about the scm-commits mailing list