commit: 1b128fea54bc1070737a53a0b410df39145845da Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org> AuthorDate: Sun Jun 15 19:38:17 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Jun 15 23:31:15 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b128fea
app-misc/beanstalkd: fix build with gcc 15 Closes: https://bugs.gentoo.org/944304 Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org> Part-of: https://github.com/gentoo/gentoo/pull/42613 Closes: https://github.com/gentoo/gentoo/pull/42613 Signed-off-by: Sam James <sam <AT> gentoo.org> app-misc/beanstalkd/beanstalkd-1.13-r1.ebuild | 45 ++++++++++++++++++++++ .../beanstalkd/files/beanstalkd-1.13-gcc15.patch | 41 ++++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/app-misc/beanstalkd/beanstalkd-1.13-r1.ebuild b/app-misc/beanstalkd/beanstalkd-1.13-r1.ebuild new file mode 100644 index 000000000000..5e0fb8a6c490 --- /dev/null +++ b/app-misc/beanstalkd/beanstalkd-1.13-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd toolchain-funcs + +DESCRIPTION="A simple, fast work queue" +HOMEPAGE="https://kr.github.io/beanstalkd/" +SRC_URI="https://github.com/beanstalkd/beanstalkd/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~mips ~x86 ~amd64-linux ~x64-macos" + +RDEPEND=" + acct-group/beanstalk + acct-user/beanstalk +" + +DOCS=( README News docs/protocol.txt ) + +PATCHES=( + "${FILESDIR}"/${P}-gcc15.patch +) + +src_prepare() { + default + sed -e "/override/d" -i Makefile || die +} + +src_compile() { + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" LD="$(tc-getLD)" +} + +src_install() { + dobin beanstalkd + + doman doc/"${PN}".1 + + newconfd "${FILESDIR}/conf-1.9" beanstalkd + newinitd "${FILESDIR}/init-1.9" beanstalkd + + systemd_dounit "${S}/adm/systemd/${PN}".{service,socket} +} diff --git a/app-misc/beanstalkd/files/beanstalkd-1.13-gcc15.patch b/app-misc/beanstalkd/files/beanstalkd-1.13-gcc15.patch new file mode 100644 index 000000000000..ba6cdc3c4aab --- /dev/null +++ b/app-misc/beanstalkd/files/beanstalkd-1.13-gcc15.patch @@ -0,0 +1,41 @@ +https://github.com/beanstalkd/beanstalkd/pull/663 +https://bugs.gentoo.org/944304 + +From f34500b789a970a5e57518fba99a7987f2d38afc Mon Sep 17 00:00:00 2001 +From: Apollon Oikonomopoulos <[email protected]> +Date: Mon, 17 Mar 2025 10:37:46 +0200 +Subject: [PATCH] Fix handle_sigterm_pid1() signature + +This is a signal handler, so it should accept a signal number as the +only argument, otherwise GCC 15 fails with the following error: + + main.c: In function 'set_sig_handlers': + main.c:75:23: error: assignment to '__sighandler_t' {aka 'void (*)(int)'} from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types] + 75 | sa.sa_handler = handle_sigterm_pid1; + | ^ + main.c:40:1: note: 'handle_sigterm_pid1' declared here + 40 | handle_sigterm_pid1() + | ^~~~~~~~~~~~~~~~~~~ + In file included from main.c:3: + /usr/include/signal.h:72:16: note: '__sighandler_t' declared here + 72 | typedef void (*__sighandler_t) (int); + | ^~~~~~~~~~~~~~ + +See also https://bugs.debian.org/1096364. +--- + main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/main.c b/main.c +index 7e7dc078..20277ff2 100644 +--- a/main.c ++++ b/main.c +@@ -37,7 +37,7 @@ su(const char *user) + } + + static void +-handle_sigterm_pid1() ++handle_sigterm_pid1(int _unused) + { + exit(143); + }
