diff --git a/macros.qt6 b/macros.qt6 index f37ed8e..bc56784 100644 --- a/macros.qt6 +++ b/macros.qt6 @@ -63,3 +63,32 @@ -DINSTALL_SYSCONFDIR=%{_qt6_sysconfdir} \\\ -DINSTALL_TRANSLATIONSDIR=%{_qt6_translationdir} \\\ -DQT_DISABLE_RPATH=TRUE + +%qt6_fix_tests \ + pushd tests/auto \ + find . -type f -name 'CMakeLists.txt' \\\ + -exec sed -i 's|\\\(.*DIR="*\\\)${CMAKE_CURRENT_SOURCE_DIR}/\\\(.*\\\)|\\\1\\\2|' {} \\\; \ + find . -type f \\\( -name '*.sh' -o -name '*.py' \\\) \\\ + -exec sed -i 's|/usr/bin/python$|/usr/bin/python3|' {} \\\; \\\ + -exec sed -i 's|/usr/bin/env\\\ python3*|/usr/bin/python3|' {} \\\; \\\ + -exec sed -i 's|^/bin/sh$|!#/bin/sh|' {} \\\; \ + popd \ + +%qt6_dont_autoinstall_tests \ + sed -i 's|include(".*tests/cmake_install.cmake")||' %_vpath_srcdir/%_vpath_builddir/cmake_install.cmake \ + +%qt6_install_tests \ + mkdir -p %{buildroot}%{_qt6_archdatadir}/tests \ + pushd tests/auto \ + find . -type f \\\ + ! -path '*/.*' \\\ + ! -name '*.h' \\\ + ! -name '*.cpp' \\\ + ! -name 'CMakeLists.txt' \\\ + -exec cp -r --parents {} %{buildroot}%{_qt6_archdatadir}/tests \\\; \ + popd \ + pushd %_vpath_srcdir/%_vpath_builddir/tests/auto \ + find . -type f -executable \\\ + -exec patchelf --remove-rpath {} \\\; \\\ + -exec cp -r --parents {} %{buildroot}%{_qt6_archdatadir}/tests \\\; \ + popd \ diff --git a/qt6.spec b/qt6.spec index e70588e..65d5835 100644 --- a/qt6.spec +++ b/qt6.spec @@ -1,7 +1,7 @@ Name: qt6 Version: 6.6.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Qt6 meta package License: GPL-3.0-only URL: https://getfedora.org/ @@ -91,6 +91,7 @@ Requires: qt6-rpm-macros Summary: RPM macros for building Qt6 and KDE Frameworks 5 packages Requires: cmake >= 3 Requires: gcc-c++ +Requires: patchelf %description rpm-macros %{summary}. @@ -148,6 +149,10 @@ echo "- Qt6 devel meta package" > %{buildroot}%{_docdir}/qt6-devel/README %changelog +* Wed Mar 27 2024 Jan Grulich - 6.6.1-6 +- Add macros to build and fix Qt unit tests + Resolves: RHEL-28239 + * Fri Jan 26 2024 Fedora Release Engineering - 6.6.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild