diff --git a/quazip.spec b/quazip.spec index 53f5f39..e78483b 100644 --- a/quazip.spec +++ b/quazip.spec @@ -1,5 +1,7 @@ %undefine __cmake_in_source_build +%bcond_without test + Name: quazip Version: 1.1 Release: 3%{?dist} @@ -144,6 +146,26 @@ install -d %{buildroot}%{_datadir}/cmake/Modules install -pm 0644 %{SOURCE1} %{buildroot}%{_datadir}/cmake/Modules/FindQuaZip.cmake install -pm 0644 %{SOURCE1} %{buildroot}%{_datadir}/cmake/Modules/FindQuaZip5.cmake +%if %{with test} +%check +# Qt4 uses the locale rather than libicu to determine file name encoding. +# Thus we need to force a UTF-8 locale, otherwise the tests will fail +# under Qt4. +# https://github.com/stachenov/quazip/issues/127 +export LC_ALL=C.UTF-8 +# In some emulated environments (such as the s390x mock chroot emulated +# on x86_64) the regexp JIT is broken, so turn it off to avoid incorrect +# test failures. +export QT_ENABLE_REGEXP_JIT=0 + +%global _vpath_builddir build-qt4 +%cmake_build -t check +%global _vpath_builddir build-qt5 +%cmake_build -t check +%global _vpath_builddir build-qt6 +%cmake_build -t check +%endif + %ldconfig_scriptlets %files