testing/kcbench: new aport

https://gitlab.com/knurd42/kcbench
Linux kernel compile benchmark
This commit is contained in:
fossdd 2025-01-29 16:17:30 +01:00 committed by omni
parent c06010b39e
commit c69cb62334
2 changed files with 82 additions and 0 deletions

44
testing/kcbench/APKBUILD Normal file
View file

@ -0,0 +1,44 @@
maintainer="fossdd <fossdd@pwned.life>"
pkgname=kcbench
pkgver=0.9.11
pkgrel=0
pkgdesc="Linux kernel compile benchmark"
url="https://gitlab.com/knurd42/kcbench"
arch="noarch"
license="MIT"
depends="
bash
binutils
bison
coreutils
elfutils-dev
flex
gcc
grep
lscpu
make
openssl
openssl-dev
perl
pkgconf
time
xz
musl-dev
"
subpackages="$pkgname-doc"
source="https://gitlab.com/knurd42/kcbench/-/archive/v$pkgver/kcbench-v$pkgver.tar.gz
allow-alpine.patch
"
builddir="$srcdir/$pkgname-v$pkgver"
options="!check" # no tests
package() {
make DESTDIR="$pkgdir" PREFIX=/usr/ install
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
sha512sums="
e36bcfb4aa25433ab9e4d4446f77228b19a9ab9e532c67463548a8836dd766218c223a720eb6e318bdbf81ba11661cc777c45aa956667af499e9ba1b71ed9bc2 kcbench-v0.9.11.tar.gz
ccc5329a113b42ae6874f6505ab8ab0ae87586c02fc8ea251c57ecba80dba3b4ca67baaa8cafd755e1b4cbb47d5bfb7cd943880df934610ed212fe3c17de7838 allow-alpine.patch
"

View file

@ -0,0 +1,38 @@
Patch-Source: https://gitlab.com/knurd42/kcbench/-/commit/68c446d3f14dc33834ffe54588c5a94f842023c5
---
From 68c446d3f14dc33834ffe54588c5a94f842023c5 Mon Sep 17 00:00:00 2001
From: fossdd <fossdd@pwned.life>
Date: Wed, 29 Jan 2025 16:27:11 +0100
Subject: [PATCH] Allow usage on Alpine Linux
Alpine Linux provides /usr/bin/time (GNU time) in the testing/time
package since 2018.
Link: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/79170
Link: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/testing/time/APKBUILD
Fixes: 9b6774abc07e ("ensure GNU grep and time are used")
Signed-off-by: fossdd <fossdd@pwned.life>
---
kcbench | 6 ------
1 file changed, 6 deletions(-)
diff --git a/kcbench b/kcbench
index 19eced9..0cc0754 100755
--- a/kcbench
+++ b/kcbench
@@ -284,12 +284,6 @@ kcbench_init_basic ()
kcbench_init_real_checktools()
{
- if grep -e '^NAME="Alpine Linux"$' /etc/os-release &> /dev/null; then
- kcbench_echo 2 1 "Aborting ${KCB_prog_name}: Alpine Linux is currently unsupported, as it lacks"
- kcbench_echo 2 1 "GNU time as of this writing."
- kcbench_exit 2
- fi
-
local checktools_compiler=( "$@" )
local errormsg=""
--
GitLab