From fc4c9ce6c3edc7b17e1f446a6351c76239f842e2 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Mon, 4 Nov 2024 18:01:52 +0800 Subject: [PATCH] disable LTO build --- cmocka.spec | 55 ++++++++++++++++++++++------------------------------- cmocka.yaml | 2 +- 2 files changed, 24 insertions(+), 33 deletions(-) diff --git a/cmocka.spec b/cmocka.spec index 05f9f26..b6e3ed3 100644 --- a/cmocka.spec +++ b/cmocka.spec @@ -1,14 +1,19 @@ +%define _lto_cflags %{nil} +%undefine __cmake_in_source_build + Name: cmocka Version: 1.1.7 -Release: 1 +Release: 2 -License: ASL 2.0 +License: Apache-2.0 Summary: An elegant unit testing framework for C with support for mock objects URL: https://cmocka.org Source0: https://cmocka.org/files/1.1/%{name}-%{version}.tar.xz -BuildRequires: cmake doxygen glibc-devel gnupg2 gcc +BuildRequires: gcc +BuildRequires: cmake >= 3.5.0 +BuildRequires: doxygen %description Cmocka is an elegant unit testing framework for C with support for mock objects. @@ -19,7 +24,6 @@ support for mock objects %package -n libcmocka Summary: Lightweight library to simplify and generalize unit tests for C - Conflicts: cmockery2 %description -n libcmocka @@ -43,53 +47,40 @@ Development headers for the cmocka unit testing library. %autosetup -p1 %build -if test ! -e "obj"; then - mkdir obj -fi -cd obj/ %cmake \ -DWITH_STATIC_LIB=ON \ -DWITH_CMOCKERY_SUPPORT=ON \ - -DUNIT_TESTING=ON \ - %{_builddir}/%{name}-%{version} + -DUNIT_TESTING=ON -%make_build VERBOSE=1 -make docs -cd ../ +%cmake_build +%cmake_build --target docs %install -cd obj/ -%make_install -cd ../ +%cmake_install ln -s libcmocka.so %{buildroot}%{_libdir}/libcmockery.so -%post -n libcmocka -p /sbin/ldconfig - -%postun -n libcmocka -p /sbin/ldconfig - %check -cd obj/ -ctest --output-on-failure -cd ../ +%ctest %files -n libcmocka -%doc COPYING AUTHORS README.md ChangeLog +%license COPYING +%doc AUTHORS README.md ChangeLog %{_libdir}/libcmocka.so.* %files -n libcmocka-devel -%doc obj/doc/html -%{_includedir}/cmocka.h -%{_includedir}/cmocka_pbc.h -%{_includedir}/cmockery/cmockery.h -%{_includedir}/cmockery/pbc.h +%doc %{_vpath_builddir}/doc/html +%{_includedir}/*.h +%{_includedir}/cmockery %{_libdir}/libcmocka.so %{_libdir}/libcmockery.so %{_libdir}/pkgconfig/cmocka.pc -%{_libdir}/cmake/cmocka/cmocka-config-version.cmake -%{_libdir}/cmake/cmocka/cmocka-config.cmake -%{_libdir}/cmake/cmocka/cmocka-config-noconfig.cmake +%{_libdir}/cmake/cmocka %changelog +* Sun Oct 06 2024 Funda Wang - 1.1.7-2 +- Disable LTO build +- adopt to new cmake macro + * Wed Jun 21 2023 yaoxin - 1.1.7-1 - Update to 1.1.7 diff --git a/cmocka.yaml b/cmocka.yaml index 8a515eb..e2b16ea 100644 --- a/cmocka.yaml +++ b/cmocka.yaml @@ -1,4 +1,4 @@ version_control: git src_repo: https://git.cryptomilk.org/projects/cmocka.git tag_prefix: ^cmocka- -seperator: . +separator: . -- Gitee