Accepting request 729146 from home:StefanBruens:branches:devel:libraries:c_c++

use _multibuild for qv4l2

OBS-URL: https://build.opensuse.org/request/show/729146
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/v4l-utils?expand=0&rev=61
This commit is contained in:
Tomáš Chvátal 2019-09-09 07:39:10 +00:00 committed by Git OBS Bridge
parent 067631b809
commit b1a9178ff1
4 changed files with 94 additions and 36 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>qv4l2</package>
</multibuild>

View File

@ -0,0 +1,23 @@
diff --git a/utils/qv4l2/Makefile.am b/utils/qv4l2/Makefile.am
index ccd1a2a..6978cf3 100644
--- a/utils/qv4l2/Makefile.am
+++ b/utils/qv4l2/Makefile.am
@@ -6,8 +6,7 @@ qv4l2_SOURCES = qv4l2.cpp general-tab.cpp ctrl-tab.cpp vbi-tab.cpp capture-win.c
raw2sliced.cpp qv4l2.h capture-win.h general-tab.h vbi-tab.h raw2sliced.h \
v4l2-tpg-core.c v4l2-tpg-colors.c
nodist_qv4l2_SOURCES = moc_qv4l2.cpp moc_general-tab.cpp moc_capture-win.cpp moc_vbi-tab.cpp qrc_qv4l2.cpp
-qv4l2_LDADD = ../../lib/libv4l2/libv4l2.la ../../lib/libv4lconvert/libv4lconvert.la \
- ../libv4l2util/libv4l2util.la ../libmedia_dev/libmedia_dev.la
+qv4l2_LDADD = ../libv4l2util/libv4l2util.la ../libmedia_dev/libmedia_dev.la
qv4l2_CPPFLAGS = -I$(top_srcdir)/utils/common
if WITH_QTGL
@@ -21,6 +20,8 @@ endif
qv4l2_CPPFLAGS += $(ALSA_CFLAGS)
qv4l2_LDFLAGS += $(ALSA_LIBS) -pthread
+qv4l2_LDFLAGS += -lv4l2 -lv4lconvert
+
EXTRA_DIST = enterbutt.png exit.png fileopen.png qv4l2_24x24.png qv4l2_64x64.png qv4l2.png qv4l2.svg \
snapshot.png video-television.png fileclose.png qv4l2_16x16.png qv4l2_32x32.png qv4l2.desktop \
qv4l2.qrc saveraw.png qv4l2.pro qv4l2.1 fullscreenexit.png fullscreen.png start.png step.png

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Sat Sep 7 22:37:25 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Split build of qv4l2ctl to an independent package. This allows
building libv4l much earlier in the build cycle, as it no
longer depends on libQt5.
* Add use_system_v4l_for_qv4l.patch
- Drop glu BuildRequires, only used for unused test binary in
contrib.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Oct 1 10:35:11 UTC 2018 - schwab@suse.de Mon Oct 1 10:35:11 UTC 2018 - schwab@suse.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package v4l-utils # spec file for package v4l
# #
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,39 +16,49 @@
# #
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "qv4l2"
%global psuffix -%{flavor}
%endif
%define _udevdir %(pkg-config --variable udevdir udev) %define _udevdir %(pkg-config --variable udevdir udev)
%define so_ver 0 %define so_ver 0
%ifarch aarch64 %{arm} %define sname v4l-utils
# qv4l2 does not support GLES Name: v4l-utils%{?psuffix}
%bcond_with qv4l2
%else
%bcond_without qv4l2
%endif
Name: v4l-utils
Version: 1.14.2 Version: 1.14.2
Release: 0 Release: 0
Summary: Utilities for video4linux Summary: Utilities for video4linux
License: GPL-2.0-or-later AND GPL-2.0-only License: LGPL-2.1-or-later AND GPL-2.0-or-later AND GPL-2.0-only
Group: Hardware/TV Group: Hardware/TV
URL: https://linuxtv.org/downloads/v4l-utils/ URL: https://linuxtv.org/downloads/v4l-utils/
Source0: https://linuxtv.org/downloads/v4l-utils/%{name}-%{version}.tar.bz2 Source0: https://linuxtv.org/downloads/v4l-utils/%{sname}-%{version}.tar.bz2
Source1: https://linuxtv.org/downloads/v4l-utils/%{name}-%{version}.tar.bz2.asc Source1: https://linuxtv.org/downloads/v4l-utils/%{sname}-%{version}.tar.bz2.asc
Source2: %{name}.keyring Source2: %{sname}.keyring
Source100: baselibs.conf Source100: baselibs.conf
Patch0: sysmacros.patch Patch0: sysmacros.patch
BuildRequires: doxygen Patch1: use_system_v4l_for_qv4l.patch
BuildRequires: kernel-headers BuildRequires: gcc-c++
BuildRequires: libjpeg-devel BuildRequires: libjpeg-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(udev)
%if "%{flavor}" == ""
BuildRequires: doxygen
BuildRequires: kernel-headers
%endif
%if "%{flavor}" == "qv4l2"
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5OpenGL) BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(libv4l2)
BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libv4lconvert)
BuildRequires: pkgconfig(udev) %endif
Requires: libv4l = %{version} Requires: libv4l = %{version}
%description %description
@ -183,34 +193,53 @@ Requires(postun): update-desktop-files
%description -n qv4l2 %description -n qv4l2
qv4l2 is a test control and streaming test application for video4linux. qv4l2 is a test control and streaming test application for video4linux.
%prep %prep
%setup -q %setup -q -n %{sname}-%{version}
%patch0 -p1 %patch0 -p1
%patch1 -p1
%build %build
%if "%{flavor}" == "qv4l2"
autoreconf -vfi
%endif
%configure \ %configure \
--disable-static \ --disable-static \
--disable-silent-rules \ --disable-silent-rules \
%if %{without qv4l2} %if "%{flavor}" == "qv4l2"
--disable-libdvb5 \
--enable-qv4l2 \
%else
--enable-libdvb5 \
--disable-qv4l2 \ --disable-qv4l2 \
%endif %endif
--with-udevdir=%{_udevdir} --with-udevdir=%{_udevdir}
make %{?_smp_mflags}
%if "%{flavor}" == "qv4l2"
%make_build -C utils/libmedia_dev
%make_build -C utils/libv4l2util
%make_build -C utils/qv4l2
%else
%make_build
%endif
%install %install
%make_install %if "%{flavor}" == "qv4l2"
find %{buildroot} -type f -name "*.la" -delete -print %make_install -C utils/qv4l2
%suse_update_desktop_file -N "QV4l2" -G "V4L2 Test Utility" -r qv4l2 Qt AudioVideo Video TV
%else
%make_install
%find_lang "%{name}" %find_lang "%{name}"
%find_lang "libdvbv5" libdvbv5.lang %find_lang "libdvbv5" libdvbv5.lang
# Not needed (links to plugins in libv4l subdir) # Not needed (links to plugins in libv4l subdir)
rm %{buildroot}%{_libdir}/{v4l1compat.so,v4l2convert.so} rm %{buildroot}%{_libdir}/{v4l1compat.so,v4l2convert.so}
%if %{with qv4l2}
%suse_update_desktop_file -N "QV4l2" -G "V4L2 Test Utility" -r qv4l2 Qt AudioVideo Video TV
%endif %endif
find %{buildroot} -type f -name "*.la" -delete -print
%if "%{flavor}" == ""
%post -n libdvbv5-%{so_ver} -p /sbin/ldconfig %post -n libdvbv5-%{so_ver} -p /sbin/ldconfig
%postun -n libdvbv5-%{so_ver} -p /sbin/ldconfig %postun -n libdvbv5-%{so_ver} -p /sbin/ldconfig
%post -n libv4l1-%{so_ver} -p /sbin/ldconfig %post -n libv4l1-%{so_ver} -p /sbin/ldconfig
@ -221,17 +250,9 @@ rm %{buildroot}%{_libdir}/{v4l1compat.so,v4l2convert.so}
%postun -n libv4l2rds%{so_ver} -p /sbin/ldconfig %postun -n libv4l2rds%{so_ver} -p /sbin/ldconfig
%post -n libv4lconvert%{so_ver} -p /sbin/ldconfig %post -n libv4lconvert%{so_ver} -p /sbin/ldconfig
%postun -n libv4lconvert%{so_ver} -p /sbin/ldconfig %postun -n libv4lconvert%{so_ver} -p /sbin/ldconfig
%if %{with qv4l2}
%post -n qv4l2
%desktop_database_post
%icon_theme_cache_post
%postun -n qv4l2
%desktop_database_postun
%icon_theme_cache_postun
%endif %endif
%if "%{flavor}" == ""
%files %files
%license COPYING %license COPYING
%doc ChangeLog README TODO %doc ChangeLog README TODO
@ -310,8 +331,9 @@ rm %{buildroot}%{_libdir}/{v4l1compat.so,v4l2convert.so}
%{_includedir}/libv4l*.h %{_includedir}/libv4l*.h
%{_libdir}/libv4l*.so %{_libdir}/libv4l*.so
%{_libdir}/pkgconfig/libv4l*.pc %{_libdir}/pkgconfig/libv4l*.pc
%endif
%if %{with qv4l2} %if "%{flavor}" == "qv4l2"
%files -n qv4l2 %files -n qv4l2
%license COPYING %license COPYING
%doc ChangeLog README TODO %doc ChangeLog README TODO