new bblfs: dev-libs/check-0.15.2

This commit is contained in:
2026-01-07 04:15:33 -05:00
parent 792c8d8c5c
commit 9953334430
4 changed files with 134 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
pkgname=check
pkgver=0.15.2
pkgdesc="Unit testing framework for C"
url="https://libcheck.github.io/check/"
arch=(x86_64)
license=(LGPL-2.1-or-later)
depends=(
awk
gcc-libs
glibc
)
makedepends=(
cmake
ninja
)
_patches=("check-0.14.0-r2-disable-automagic-dep.patch"
"check-0.15.2-Fix-pkgconfig-file-s-libdir-value.patch"
"check-0.15.2-avoid-static-lib.patch"
)
_patch_sums=("2db61d66f1e7fe682db3670f581d300a"
"a05bd4221f99dcc3d920ced659a26b35"
"9bfe4e3f930d58ba691d99c7cd39b965"
)
sources=("${pkgname}-${pkgver}.tar.gz"
"${_patches[@]}"
)
urls=("https://github.com/libcheck/check/archive/${pkgver}.tar.gz"
"${_patches[@]}"
)
md5sums=("2528f5cff61db6d53d44fb95da0c7fce"
"${_patch_sums[@]}"
)
src_prepare() {
tar -xf ${distdir}/${sources[0]} --strip-components=1
for _patch in ${_patches[@]}; do
patch -p1 -i ${filedir}/${_patch}
done
}
src_build() {
local cmake_options=(
-D AWK_GSUB_DBL_BSLASH='\\\\'
-D CHECK_ENABLE_TIMEOUT_TESTS=OFF
-D CMAKE_BUILD_TYPE=None
-D CMAKE_INSTALL_PREFIX=/usr
-D CHECK_ENABLE_SUBUNIT=OFF
)
cmake -B build -G Ninja "${cmake_options[@]}"
cmake --build build
}
src_install() {
DESTDIR="$pkgdir" cmake --build build --target install
}
# vim:ft=sh syn=sh et sw=2:

View File

@@ -0,0 +1,23 @@
--- a/CMakeLists.txt 2020-03-21 09:42:30.411037664 +0200
+++ b/CMakeLists.txt 2020-03-21 09:49:12.358161439 +0200
@@ -365,15 +365,16 @@
ADD_DEFINITIONS(-DHAVE_LIBRT=1)
endif (HAVE_LIBRT)
-check_library_exists(subunit subunit_test_start "" HAVE_SUBUNIT)
-if (HAVE_SUBUNIT)
+option(CHECK_ENABLE_SUBUNIT "Enable subunit support" ON)
+if (CHECK_ENABLE_SUBUNIT)
set(SUBUNIT "subunit")
set(ENABLE_SUBUNIT 1)
+ set(HAVE_SUBUNIT 1)
add_definitions(-DENABLE_SUBUNIT=1)
-else(HAVE_SUBUNIT)
+else(CHECK_ENABLE_SUBUNIT)
set(ENABLE_SUBUNIT 0)
add_definitions(-DENABLE_SUBUNIT=0)
-endif (HAVE_SUBUNIT)
+endif (CHECK_ENABLE_SUBUNIT)
###############################################################################
# Generate "config.h" from "cmake/config.h.in"

View File

@@ -0,0 +1,30 @@
From a6de6b02e6f8b971149c477eeca04de7d0fa5d3c Mon Sep 17 00:00:00 2001
From: Matt Turner <mattst88@gmail.com>
Date: Wed, 10 Mar 2021 17:00:33 -0500
Subject: [PATCH] Fix pkgconfig file's libdir value
And make a similar fix for includedir while we're here.
Bug: https://bugs.gentoo.org/729642
---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 23311d8..9d3ac07 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -439,8 +439,8 @@ if(NOT THIS_IS_SUBPROJECT)
set(prefix_save "${PREFIX}")
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\${prefix}")
- set(libdir "\${exec_prefix}/lib")
- set(includedir "\${prefix}/include")
+ set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
+ set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
set(VERSION "${PROJECT_VERSION}")
if (HAVE_SUBUNIT)
--
2.26.2

View File

@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Fri, 2 Oct 2020 22:22:02 +0100
Subject: [PATCH] Avoid static library
Fixes: https://bugs.archlinux.org/task/68076
---
src/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4a02dbeaec4d..4d731c9bfcac 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -188,7 +188,7 @@ target_include_directories(checkShared
)
if(NOT THIS_IS_SUBPROJECT)
- install(TARGETS check checkShared
+ install(TARGETS checkShared
EXPORT check-targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}