From a8c5d2b92c5dafc88abd9653b769dc1d772b7a00 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 28 Apr 2020 05:00:00 -0400 Subject: [PATCH] import qt5-qtserialbus-5.12.5-1.el8 --- .gitignore | 2 +- .qt5-qtserialbus.metadata | 2 +- ...bus-everywhere-src-5.12.3-SIOCGSTAMP.patch | 16 ++++++ SPECS/qt5-qtserialbus.spec | 56 ++++++++++++++++--- 4 files changed, 65 insertions(+), 11 deletions(-) create mode 100644 SOURCES/qtserialbus-everywhere-src-5.12.3-SIOCGSTAMP.patch diff --git a/.gitignore b/.gitignore index 361b3aa..b0ce639 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/qtserialbus-everywhere-src-5.11.1.tar.xz +SOURCES/qtserialbus-everywhere-src-5.12.5.tar.xz diff --git a/.qt5-qtserialbus.metadata b/.qt5-qtserialbus.metadata index e8fa80d..946a925 100644 --- a/.qt5-qtserialbus.metadata +++ b/.qt5-qtserialbus.metadata @@ -1 +1 @@ -0f383e30e6c3f1dd0bbbdddd446c3d4e998ae4b2 SOURCES/qtserialbus-everywhere-src-5.11.1.tar.xz +8d3e72216d094c0a2d73fae643c1dc3c45c7b3e9 SOURCES/qtserialbus-everywhere-src-5.12.5.tar.xz diff --git a/SOURCES/qtserialbus-everywhere-src-5.12.3-SIOCGSTAMP.patch b/SOURCES/qtserialbus-everywhere-src-5.12.3-SIOCGSTAMP.patch new file mode 100644 index 0000000..7809cb8 --- /dev/null +++ b/SOURCES/qtserialbus-everywhere-src-5.12.3-SIOCGSTAMP.patch @@ -0,0 +1,16 @@ +diff --git a/src/plugins/canbus/socketcan/socketcanbackend.cpp b/src/plugins/canbus/socketcan/socketcanbackend.cpp +index 74b0d1d..03a3d14 100644 +--- a/src/plugins/canbus/socketcan/socketcanbackend.cpp ++++ b/src/plugins/canbus/socketcan/socketcanbackend.cpp +@@ -51,6 +51,11 @@ + #include + #include + ++// Seems that kernel 5.2.0 renames this define to SIOCGSTAMP_OLD ++#ifndef SIOCGSTAMP ++#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ ++#endif ++ + #ifndef CANFD_MTU + // CAN FD support was added by Linux kernel 3.6 + // For prior kernels we redefine the missing defines here diff --git a/SPECS/qt5-qtserialbus.spec b/SPECS/qt5-qtserialbus.spec index 4da3ff4..c81e9a6 100644 --- a/SPECS/qt5-qtserialbus.spec +++ b/SPECS/qt5-qtserialbus.spec @@ -1,9 +1,11 @@ %global qt_module qtserialbus +%global build_tests 1 + Summary: Qt5 - SerialPort component Name: qt5-%{qt_module} -Version: 5.11.1 -Release: 2%{?dist} +Version: 5.12.5 +Release: 1%{?dist} # See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions @@ -11,6 +13,10 @@ Url: http://www.qt.io %global majmin %(echo %{version} | cut -d. -f1-2) Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submodules/%{qt_module}-everywhere-src-%{version}.tar.xz +## upstreamable patches +# workaround FTBFS against kernel-header-5.2.0+ +Patch100: qtserialbus-everywhere-src-5.12.3-SIOCGSTAMP.patch + BuildRequires: qt5-qtbase-devel >= %{version} BuildRequires: qt5-qtbase-private-devel #libQt5Core.so.5(Qt_5_PRIVATE_API)(64bit) @@ -18,8 +24,8 @@ BuildRequires: qt5-qtbase-private-devel BuildRequires: qt5-qtserialport-devel >= %{version} %description -Qt Serial Port provides the basic functionality, which includes configuring, -I/O operations, getting and setting the control signals of the RS-232 pinouts. +Qt Serial Bus (API) provides classes and functions to access the various +industrial serial buses and protocols, such as CAN, ModBus, and others. %package devel Summary: Development files for %{name} @@ -34,23 +40,46 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description examples %{summary}. +%if 0%{?build_tests} +%package tests +Summary: Unit tests for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description tests +%{summary}. +%endif + %prep %autosetup -n %{qt_module}-everywhere-src-%{version} -p1 %build -mkdir %{_target_platform} -pushd %{_target_platform} -%{qmake_qt5} .. \ +%{qmake_qt5} \ %{?_qt5_examplesdir:CONFIG+=qt_example_installs} %make_build +%if 0%{?build_tests} +make sub-tests %{?_smp_mflags} -k ||: +%endif + %install -make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} +make install INSTALL_ROOT=%{buildroot} +%if 0%{?build_tests} +# Install tests for gating +mkdir -p %{buildroot}%{_qt5_libdir}/qt5 +find ./tests -not -path '*/\.*' -type d | while read LINE +do + mkdir -p "%{buildroot}%{_qt5_libdir}/qt5/$LINE" +done +find ./tests -not -path '*/\.*' -not -name '*.h' -not -name '*.cpp' -not -name '*.pro' -not -name 'uic_wrapper.sh' -not -name 'Makefile' -not -name 'target_wrapper.sh' -type f | while read LINE +do + cp -r --parents "$LINE" %{buildroot}%{_qt5_libdir}/qt5/ +done +%endif %ldconfig_scriptlets @@ -67,7 +96,7 @@ make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} %dir %{_qt5_libdir}/cmake/Qt5SerialBus/ %{_qt5_libdir}/cmake/Qt5SerialBus %{_qt5_libdir}/pkgconfig/Qt5SerialBus.pc -%{_qt5_prefix}/mkspecs/modules/* +%{_qt5_archdatadir}/mkspecs/modules/* %exclude %{_qt5_libdir}/libQt5SerialBus.la # no examples, yet @@ -76,8 +105,17 @@ make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} %{_qt5_examplesdir}/ %endif +%if 0%{?build_tests} +%files tests +%{_qt5_libdir}/qt5/tests +%endif + %changelog +* Mon Nov 18 2019 Jan Grulich - 5.12.5-1 +- 5.12.5 + Resolves: bz#1733149 + * Mon Dec 10 2018 Jan Grulich - 5.11.1-2 - Rebuild to fix CET notes Resolves: bz#1657223