commit:     27a2058ec6a21b717a2fe18abf7b92f6eb7c23f0
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed May  1 11:08:17 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed May  1 11:22:19 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27a2058e

sys-process/cronutils: Fix build / tests with musl-1.2.5

Closes: https://bugs.gentoo.org/928613
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-process/cronutils/cronutils-1.10.ebuild        |  6 +++-
 .../files/cronutils-1.10-musl-1.2.5.patch          | 37 ++++++++++++++++++++++
 2 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/sys-process/cronutils/cronutils-1.10.ebuild 
b/sys-process/cronutils/cronutils-1.10.ebuild
index 852bd502e451..04037ab1c5ac 100644
--- a/sys-process/cronutils/cronutils-1.10.ebuild
+++ b/sys-process/cronutils/cronutils-1.10.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -14,6 +14,10 @@ LICENSE="Apache-2.0"
 SLOT="0"
 KEYWORDS="amd64 x86"
 
+PATCHES=(
+       "${FILESDIR}/${P}-musl-1.2.5.patch"
+)
+
 src_compile() {
        emake CC="$(tc-getCC)" CFLAGS="-D_XOPEN_SOURCE=500 ${CFLAGS}"
 }

diff --git a/sys-process/cronutils/files/cronutils-1.10-musl-1.2.5.patch 
b/sys-process/cronutils/files/cronutils-1.10-musl-1.2.5.patch
new file mode 100644
index 000000000000..a332dcb5a432
--- /dev/null
+++ b/sys-process/cronutils/files/cronutils-1.10-musl-1.2.5.patch
@@ -0,0 +1,37 @@
+From cbab73af5a3c218aabd16e3733c77d2b1c541564 Mon Sep 17 00:00:00 2001
+From: Paul Meyer <[email protected]>
+Date: Wed, 31 Jan 2024 20:12:01 +0100
+Subject: [PATCH] add missing libgen include
+
+Without including libgen.h, build will fail on darwin as basename isn't 
declared.
+
+Signed-off-by: Paul Meyer <[email protected]>
+---
+ runalarm.c | 1 +
+ runlock.c  | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/runalarm.c b/runalarm.c
+index fb8617a..95a40ac 100644
+--- a/runalarm.c
++++ b/runalarm.c
+@@ -17,6 +17,7 @@ limitations under the License.
+ #define _GNU_SOURCE /* basename */
+ 
+ #include <errno.h>
++#include <libgen.h>
+ #include <signal.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+diff --git a/runlock.c b/runlock.c
+index 0e446b0..75ac08f 100644
+--- a/runlock.c
++++ b/runlock.c
+@@ -18,6 +18,7 @@ limitations under the License.
+ 
+ #include <errno.h>
+ #include <fcntl.h>
++#include <libgen.h>
+ #include <limits.h>
+ #include <signal.h>
+ #include <stdio.h>

Reply via email to