From 59f6dfec3839f10df2b3f713c6bcec82011f332d Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 15 Jun 2025 01:04:09 +0100 Subject: [PATCH] sys-apps/daemonize: fix build w/ c23 Thanks to Robert Schultz. Closes: https://bugs.gentoo.org/880439 Signed-off-by: Sam James --- sys-apps/daemonize/daemonize-1.7.8-r2.ebuild | 26 +++++++++++++++++++ .../daemonize/files/daemonize-1.7.8-c23.patch | 14 ++++++++++ 2 files changed, 40 insertions(+) create mode 100644 sys-apps/daemonize/daemonize-1.7.8-r2.ebuild create mode 100644 sys-apps/daemonize/files/daemonize-1.7.8-c23.patch diff --git a/sys-apps/daemonize/daemonize-1.7.8-r2.ebuild b/sys-apps/daemonize/daemonize-1.7.8-r2.ebuild new file mode 100644 index 0000000000000..0720c88c204db --- /dev/null +++ b/sys-apps/daemonize/daemonize-1.7.8-r2.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Runs a command as a Unix daemon" +HOMEPAGE="https://software.clapper.org/daemonize/" +SRC_URI="https://github.com/bmc/${PN}/archive/release-${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-release-${PV}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DOCS=( {CHANGELOG,README}.md ) + +PATCHES=( + "${FILESDIR}"/${PN}-1.7.8-c23.patch +) + +src_prepare() { + default + sed -i \ + -e 's:\($(CC)\) $(CFLAGS) \(.*\.o\):\1 $(LDFLAGS) \2:' \ + Makefile.in || die +} diff --git a/sys-apps/daemonize/files/daemonize-1.7.8-c23.patch b/sys-apps/daemonize/files/daemonize-1.7.8-c23.patch new file mode 100644 index 0000000000000..e7e1baeb37fad --- /dev/null +++ b/sys-apps/daemonize/files/daemonize-1.7.8-c23.patch @@ -0,0 +1,14 @@ +https://bugs.gentoo.org/880439#c10 +--- a/getopt.c ++++ b/getopt.c +@@ -43,9 +43,9 @@ + #include + /* We're ANSI now; we're guaranteed to have strchr(). */ + #include ++#include + + #define ERR(s, c) if(x_opterr){\ +- extern int write();\ + char errbuf[2];\ + errbuf[0] = c; errbuf[1] = '\n';\ + (void) write(2, argv[0], (unsigned)strlen(argv[0]));\