From a1c69b81acbab1ef20c1108f8352c75b83a4146c Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 4 Aug 2020 18:27:52 +0200 Subject: [PATCH] Use CMake macros for the build; Change how python tests are invoked (RH bug #1865924) --- libical-3.0.8-invoke-python-tests.patch | 12 ++++++++++++ libical.spec | 17 ++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 libical-3.0.8-invoke-python-tests.patch diff --git a/libical-3.0.8-invoke-python-tests.patch b/libical-3.0.8-invoke-python-tests.patch new file mode 100644 index 0000000..9539bcc --- /dev/null +++ b/libical-3.0.8-invoke-python-tests.patch @@ -0,0 +1,12 @@ +diff -up libical-3.0.8/src/test/libical-glib/CMakeLists.txt.test-patch libical-3.0.8/src/test/libical-glib/CMakeLists.txt +--- libical-3.0.8/src/test/libical-glib/CMakeLists.txt.test-patch 2020-03-07 15:42:42.000000000 +0100 ++++ libical-3.0.8/src/test/libical-glib/CMakeLists.txt 2020-08-04 17:18:13.961171044 +0200 +@@ -31,7 +31,7 @@ if(PYTHON3) + + add_test( + NAME ${test_name} +- COMMAND ${PYTHON3} ${CMAKE_CURRENT_SOURCE_DIR}/${test_file} ++ COMMAND ${PYTHON3} -I ${CMAKE_CURRENT_SOURCE_DIR}/${test_file} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + diff --git a/libical.spec b/libical.spec index bd52413..15d1a5f 100644 --- a/libical.spec +++ b/libical.spec @@ -1,4 +1,4 @@ -%global __cmake_in_source_build 1 +%undefine __cmake_in_source_build Summary: Reference implementation of the iCalendar data type and serialization format Name: libical @@ -9,6 +9,7 @@ URL: https://libical.github.io/libical/ Source: https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Patch01: libical-3.0.3-load-builtin-timezone.patch +Patch02: libical-3.0.8-invoke-python-tests.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -67,24 +68,22 @@ Development files needed for building things which link against %{name}-glib. %setup -q %patch01 -p1 -b .load-builtin-timezone +%patch02 -p1 -b .invoke-python-tests %build -mkdir -p %{_target_platform} -pushd %{_target_platform} -%{cmake} .. \ +%{cmake} \ -DUSE_INTEROPERABLE_VTIMEZONES:BOOL=true \ -DICAL_ALLOW_EMPTY_PROPERTIES:BOOL=true \ -DGOBJECT_INTROSPECTION:BOOL=true \ -DICAL_GLIB:BOOL=true \ -DICAL_GLIB_VAPI:BOOL=true \ -DSHARED_ONLY:BOOL=true -popd # avoid parallel-builds, gir generatation fails on slower archs -%make_build -j1 -C %{_target_platform} +%cmake_build -j1 %install -make install/fast DESTDIR=%{buildroot} -C %{_target_platform} +%cmake_install %check make test ARGS="-V" -C %{_target_platform} @@ -136,6 +135,10 @@ make test ARGS="-V" -C %{_target_platform} %{_datadir}/gtk-doc/html/%{name}-glib %changelog +* Tue Aug 04 2020 Milan Crha - 3.0.8-5 +- Use CMake macros for the build +- Change how python tests are invoked (RH bug #1865924) + * Sat Aug 01 2020 Fedora Release Engineering - 3.0.8-5 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild