[packages/criterion] up to 2.4.1

atler atler at pld-linux.org
Sun Nov 20 02:05:36 CET 2022


commit 2371444bbad079170ab0108b28a1688538fea6e8
Author: Jan Palus <atler at pld-linux.org>
Date:   Sun Nov 20 02:03:27 2022 +0100

    up to 2.4.1
    
    - build system switched to meson

 criterion-libdir.patch | 35 -----------------------------------
 criterion.spec         | 45 ++++++++++++++++++++++-----------------------
 no-cram.patch          | 23 -----------------------
 x32.patch              | 35 +++++++++++++++++------------------
 4 files changed, 39 insertions(+), 99 deletions(-)
---
diff --git a/criterion.spec b/criterion.spec
index 129b84f..66c2817 100644
--- a/criterion.spec
+++ b/criterion.spec
@@ -8,23 +8,28 @@
 Summary:	A cross-platform C and C++ unit testing framework for the 21th century
 Summary(pl.UTF-8):	Wieloplatformowy szkielet do testów jednostkowych dla C i C++ w XXI wieku
 Name:		criterion
-Version:	2.3.3
-Release:	5
+Version:	2.4.1
+Release:	1
 License:	LGPL v2.1+
 Group:		Libraries
 #Source0Download: https://github.com/Snaipe/Criterion/releases
-Source0:	https://github.com/Snaipe/Criterion/releases/download/v%{version}/%{name}-v%{version}.tar.bz2
-# Source0-md5:	0305dbb5e00f04fd65b22e9ad82ba952
-Patch0:		%{name}-libdir.patch
-Patch1:		x32.patch
-Patch2:		no-cram.patch
+Source0:	https://github.com/Snaipe/Criterion/releases/download/v%{version}/%{name}-%{version}.tar.xz
+# Source0-md5:	93e91812837a68524d76339409ed2008
+Patch0:		x32.patch
 URL:		https://github.com/Snaipe/Criterion
-BuildRequires:	cmake >= 2.8.0
 BuildRequires:	dyncall >= 1.0
+BuildRequires:	libffi-devel
+BuildRequires:	libgit2-devel
+BuildRequires:	meson >= 0.51.0
 BuildRequires:	nanomsg-devel >= 1.0.0
-BuildRequires:	rpmbuild(macros) >= 1.605
+BuildRequires:	ninja
+BuildRequires:	rpmbuild(macros) >= 1.736
+BuildRequires:	tar >= 1:1.22
+BuildRequires:	xz
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define filterout_c -mbranch-protection=standard
+
 %description
 A dead-simple, yet extensible, C and C++ unit testing framework.
 
@@ -46,28 +51,22 @@ Header files for criterion library.
 Pliki nagłówkowe biblioteki criterion.
 
 %prep
-%setup -q -n %{name}-v%{version}
+%setup -q
 %patch0 -p1
-%patch1 -p1
-%patch2 -p1
 
 %build
-install -d build
-cd build
-%cmake .. \
-	%{cmake_on_off tests CTESTS}
-
-%{__make}
+%meson build \
+	-Dtests=%{__true_false tests}
 
-%{?with_tests:%{__make} criterion_tests test}
+%ninja_build -C build
+%{?with_tests:%ninja_test -C build}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} -C build install \
-	DESTDIR=$RPM_BUILD_ROOT
+%ninja_install -C build
 
-%find_lang Criterion
+%find_lang criterion
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -76,7 +75,7 @@ rm -rf $RPM_BUILD_ROOT
 %postun	-p /sbin/ldconfig
 
 
-%files -f Criterion.lang
+%files -f criterion.lang
 %defattr(644,root,root,755)
 %doc ChangeLog doc/*.txt
 %attr(755,root,root) %{_libdir}/libcriterion.so.*.*.*
diff --git a/criterion-libdir.patch b/criterion-libdir.patch
deleted file mode 100644
index fb00e10..0000000
--- a/criterion-libdir.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- criterion-v2.3.3/src/criterion.pc.in.orig	2018-11-05 01:59:28.000000000 +0100
-+++ criterion-v2.3.3/src/criterion.pc.in	2020-04-29 21:13:27.924872823 +0200
-@@ -1,7 +1,7 @@
- prefix=@CMAKE_INSTALL_PREFIX@
- exec_prefix=${prefix}
- includedir=${prefix}/include
--libdir=${prefix}/lib
-+libdir=${prefix}/lib at LIB_SUFFIX@
- 
- Name: @PROJECT_NAME@
- Description: A KISS, Cross platform unit testing framework for C and C++
---- criterion-v2.3.3/src/CMakeLists.txt.orig	2018-11-05 01:59:28.000000000 +0100
-+++ criterion-v2.3.3/src/CMakeLists.txt	2020-04-29 21:14:27.667882501 +0200
-@@ -141,7 +141,7 @@
-   @ONLY
- )
- 
--install (FILES "${CMAKE_CURRENT_BINARY_DIR}/criterion.pc" DESTINATION "share/pkgconfig")
-+install (FILES "${CMAKE_CURRENT_BINARY_DIR}/criterion.pc" DESTINATION "lib${LIB_SUFFIX}/pkgconfig")
- 
- set (SOURCE_FILES ${SOURCE_FILES} PARENT_SCOPE)
- set (INTERFACE_FILES ${INTERFACE_FILES} PARENT_SCOPE)
---- criterion-v2.3.3/.cmake/Modules/PackageUtils.cmake.orig	2018-11-05 01:59:28.000000000 +0100
-+++ criterion-v2.3.3/.cmake/Modules/PackageUtils.cmake	2020-04-29 21:16:30.190552072 +0200
-@@ -51,8 +51,8 @@
- 
-   install(TARGETS ${_LIB}
-     RUNTIME DESTINATION bin
--    LIBRARY DESTINATION lib
--    ARCHIVE DESTINATION lib ${install_flags}
-+    LIBRARY DESTINATION lib${LIB_SUFFIX}
-+    ARCHIVE DESTINATION lib${LIB_SUFFIX} ${install_flags}
-   )
- endfunction ()
- 
diff --git a/no-cram.patch b/no-cram.patch
deleted file mode 100644
index f348b46..0000000
--- a/no-cram.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- criterion-v2.3.3/test/CMakeLists.txt~	2018-11-05 01:59:28.000000000 +0100
-+++ criterion-v2.3.3/test/CMakeLists.txt	2020-05-06 10:18:05.799801261 +0200
-@@ -36,20 +36,3 @@
- add_dependencies(criterion_tests criterion_unit_tests)
- 
- add_test(criterion_unit_tests criterion_unit_tests)
--
--find_program(SH NAMES sh sh.exe)
--
--if (SH) # we disable the scripted tests when sh is not available
--  add_custom_target(cram_tests)
--
--  add_custom_command(TARGET cram_tests POST_BUILD
--      COMMAND "${CMAKE_COMMAND}"
--        -DPROJECT_BINARY_DIR="${PROJECT_BINARY_DIR}"
--        -DCRAM_PATH="${CMAKE_CURRENT_SOURCE_DIR}/cram"
--        -DCRAM_SHELL="${SH}"
--        -P "${CMAKE_MODULE_PATH}/Cram.cmake"
--  )
--
--  add_test(cram_tests cmake --build ${PROJECT_BINARY_DIR} --target cram_tests)
--
--endif ()
diff --git a/x32.patch b/x32.patch
index 936d557..a11b660 100644
--- a/x32.patch
+++ b/x32.patch
@@ -1,18 +1,17 @@
---- criterion-v2.3.3/dependencies/boxfort/CMakeLists.txt~	2018-11-05 02:19:59.000000000 +0100
-+++ criterion-v2.3.3/dependencies/boxfort/CMakeLists.txt	2020-05-06 09:01:11.433286507 +0200
-@@ -70,9 +70,15 @@
-         else ()
-             set (BXF_ABI "systemv")
-         endif ()
-+	if (CMAKE_C_COMPILER_ABI MATCHES "ELF X32")
-+        set (BXF_ARCH "x86_64")
-+        set (BXF_BITS 32)
-+        set (BXF_ARCH_x86_64 1)
-+	else ()
-         set (BXF_ARCH "x86_64")
-         set (BXF_BITS 64)
-         set (BXF_ARCH_x86_64 1)
-+	endif ()
-     elseif (_ARCH MATCHES "${ARM32}")
-         set (BXF_ARCH "arm")
-         set (BXF_ABI "arm")
+--- criterion-2.4.1/subprojects/boxfort/meson.build.orig	2022-04-26 08:55:02.322888100 +0200
++++ criterion-2.4.1/subprojects/boxfort/meson.build	2022-11-20 00:30:33.386292493 +0100
+@@ -81,7 +81,13 @@
+ if arch == 'x86'
+ 	bitness = 32
+ elif arch == 'x86_64'
+-	bitness = 64
++	if cc.compiles('''#ifdef __ILP32__
++#error x32
++#endif''')
++		bitness = 64
++        else
++		bitness = 32
++        endif
+ elif arch == 'arm'
+ 	bitness = 32
+ elif arch == 'aarch64'
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/criterion.git/commitdiff/2371444bbad079170ab0108b28a1688538fea6e8



More information about the pld-cvs-commit mailing list