app-misc/cmd-timer: apply upstream -lrt patch instead of changing $LDFLAGS

flag-o-matic `append-ldflags -lrt` throws a QA warning.

Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
This commit is contained in:
Haelwenn (lanodan) Monnier
2026-04-05 09:54:02 +02:00
parent 8ab42dbfa5
commit 240997e3bf
3 changed files with 32 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
# Copyright 2025 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
# Copyright 2025-2026 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -25,6 +25,10 @@ SLOT="0"
IUSE="static"
PATCHES=(
"${FILESDIR}/cmd-timer-2.1.0-Makefile-add-lrt.patch"
)
if [ "${PV}" != "9999" ]; then
BDEPEND="${BDEPEND} verify-sig? ( sec-keys/signify-keys-lanodan:2025 )"
@@ -46,7 +50,6 @@ if [ "${PV}" != "9999" ]; then
fi
src_configure() {
export LDFLAGS="${LDFLAGS} -lrt"
use static && export LDSTATIC=-static
}

View File

@@ -46,7 +46,6 @@ if [ "${PV}" != "9999" ]; then
fi
src_configure() {
export LDFLAGS="${LDFLAGS} -lrt"
use static && export LDSTATIC=-static
}

View File

@@ -0,0 +1,27 @@
From f9bb8654ce65164181ee69ca79ea56af74e69187 Mon Sep 17 00:00:00 2001
From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
Date: Wed, 1 Apr 2026 16:20:41 +0200
Subject: [PATCH] Makefile: add -lrt
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 00cbf95..08f7efb 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ MAN1DIR ?= ${MANDIR}/man1
TIMER_SRC_C = timer.c strtodur.o
timer: ${TIMER_SRC_C} strtodur.h
- ${CC} -std=c99 ${CFLAGS} -o $@ ${TIMER_SRC_C} ${LDFLAGS} ${LDSTATIC}
+ ${CC} -std=c99 ${CFLAGS} -o $@ ${TIMER_SRC_C} -lrt ${LDFLAGS} ${LDSTATIC}
TEST_STRTODUR_SRC_C = t_strtodur.c strtodur.o
t_strtodur: ${TEST_STRTODUR_SRC_C} strtodur.h
base-commit: ce19db749d5afddaf3e3ead8ebb4ed128a0df97d
--
2.52.0