]> git.pld-linux.org Git - packages/criterion.git/commitdiff
- fix miscompiled library on x32 auto/th/criterion-2.3.3-5
authorJan Rękorajski <baggins@pld-linux.org>
Wed, 6 May 2020 08:19:58 +0000 (10:19 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Wed, 6 May 2020 08:19:58 +0000 (10:19 +0200)
- added tests
- rel 5

criterion.spec
x32.patch [new file with mode: 0644]

index 1ed1c187dfc34e4cd52c20b7dd4469c942b6d433..129b84f2fd6ff40fa2fba5930d526ab48406f7ad 100644 (file)
@@ -1,17 +1,23 @@
 # TODO:
 # - system boxfort (when released): https://github.com/diacritic/BoxFort
 # - system libcsptr (when some post-2017 release made): https://github.com/Snaipe/libcsptr
+#
+# Conditional build:
+%bcond_without tests           # build without tests
+#
 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:       4
+Release:       5
 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
 URL:           https://github.com/Snaipe/Criterion
 BuildRequires: cmake >= 2.8.0
 BuildRequires: dyncall >= 1.0
@@ -42,13 +48,19 @@ Pliki nagłówkowe biblioteki criterion.
 %prep
 %setup -q -n %{name}-v%{version}
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
 install -d build
 cd build
-%cmake ..
+%cmake .. \
+       %{cmake_on_off tests CTESTS}
+
 %{__make}
 
+%{?with_tests:%{__make} criterion_tests test}
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
diff --git a/x32.patch b/x32.patch
new file mode 100644 (file)
index 0000000..936d557
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,18 @@
+--- 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")
This page took 0.192822 seconds and 4 git commands to generate.