From 240997e3bfee9bb8085dd475c9a2c89242a587dc Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 5 Apr 2026 09:54:02 +0200 Subject: [PATCH] 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 --- app-misc/cmd-timer/cmd-timer-2.1.0.ebuild | 7 +++-- app-misc/cmd-timer/cmd-timer-9999.ebuild | 1 - .../cmd-timer-2.1.0-Makefile-add-lrt.patch | 27 +++++++++++++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 app-misc/cmd-timer/files/cmd-timer-2.1.0-Makefile-add-lrt.patch diff --git a/app-misc/cmd-timer/cmd-timer-2.1.0.ebuild b/app-misc/cmd-timer/cmd-timer-2.1.0.ebuild index 34cd60e30e..c8f8009742 100644 --- a/app-misc/cmd-timer/cmd-timer-2.1.0.ebuild +++ b/app-misc/cmd-timer/cmd-timer-2.1.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 2025 Haelwenn (lanodan) Monnier +# Copyright 2025-2026 Haelwenn (lanodan) Monnier # 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 } diff --git a/app-misc/cmd-timer/cmd-timer-9999.ebuild b/app-misc/cmd-timer/cmd-timer-9999.ebuild index 34cd60e30e..addf788836 100644 --- a/app-misc/cmd-timer/cmd-timer-9999.ebuild +++ b/app-misc/cmd-timer/cmd-timer-9999.ebuild @@ -46,7 +46,6 @@ if [ "${PV}" != "9999" ]; then fi src_configure() { - export LDFLAGS="${LDFLAGS} -lrt" use static && export LDSTATIC=-static } diff --git a/app-misc/cmd-timer/files/cmd-timer-2.1.0-Makefile-add-lrt.patch b/app-misc/cmd-timer/files/cmd-timer-2.1.0-Makefile-add-lrt.patch new file mode 100644 index 0000000000..533c9ae861 --- /dev/null +++ b/app-misc/cmd-timer/files/cmd-timer-2.1.0-Makefile-add-lrt.patch @@ -0,0 +1,27 @@ +From f9bb8654ce65164181ee69ca79ea56af74e69187 Mon Sep 17 00:00:00 2001 +From: "Haelwenn (lanodan) Monnier" +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 +