From e971f6c01ee6574d167e767a4854a61e117cb5cc Mon Sep 17 00:00:00 2001 From: "Z. Liu" Date: Tue, 28 Oct 2025 21:29:44 +0800 Subject: [PATCH] app-containers/crun: fix building on musl The reason is the same as in commit a4aa03f192a3b51ffce6e540220c3b466d3381ae, which had been fixed upstream in https://github.com/containers/crun/pull/1887. However, since we cannot provide a single patch for all the thress versions in the tree, this is fixed by using sed to remove error.h from AC_CHECK_HEADERS and append a new line with AC_CHECK_FUNC included. Closes: https://bugs.gentoo.org/956287 Closes: https://bugs.gentoo.org/963641 Signed-off-by: Z. Liu Part-of: https://github.com/gentoo/gentoo/pull/44377 Closes: https://github.com/gentoo/gentoo/pull/44377 Signed-off-by: Sam James --- app-containers/crun/crun-1.19.1.ebuild | 11 ++++++++++- app-containers/crun/crun-1.20.ebuild | 11 ++++++++++- app-containers/crun/crun-1.21.ebuild | 11 ++++++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/app-containers/crun/crun-1.19.1.ebuild b/app-containers/crun/crun-1.19.1.ebuild index af92ab475fd34..0e59b651b1ebd 100644 --- a/app-containers/crun/crun-1.19.1.ebuild +++ b/app-containers/crun/crun-1.19.1.ebuild @@ -5,7 +5,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..13} ) -inherit libtool python-any-r1 +inherit autotools libtool python-any-r1 DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C" HOMEPAGE="https://github.com/containers/crun" @@ -40,6 +40,15 @@ BDEPEND=" src_prepare() { default elibtoolize + + # https://github.com/containers/crun/pull/1887 + sed -i -E '/AC_CHECK_HEADERS\(\[error.h/{ + s/error\.h[[:space:]]*//g + a\ + AC_CHECK_HEADER([error.h], [AC_CHECK_FUNC([error], AC_DEFINE([HAVE_ERROR_H], [1], [Define if error.h is usable]))]) + }' configure.ac || die + + eautoreconf } src_configure() { diff --git a/app-containers/crun/crun-1.20.ebuild b/app-containers/crun/crun-1.20.ebuild index 1a97040741a25..8d8b91f378e0a 100644 --- a/app-containers/crun/crun-1.20.ebuild +++ b/app-containers/crun/crun-1.20.ebuild @@ -5,7 +5,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..13} ) -inherit libtool python-any-r1 +inherit autotools libtool python-any-r1 DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C" HOMEPAGE="https://github.com/containers/crun" @@ -40,6 +40,15 @@ BDEPEND=" src_prepare() { default elibtoolize + + # https://github.com/containers/crun/pull/1887 + sed -i -E '/AC_CHECK_HEADERS\(\[error.h/{ + s/error\.h[[:space:]]*//g + a\ + AC_CHECK_HEADER([error.h], [AC_CHECK_FUNC([error], AC_DEFINE([HAVE_ERROR_H], [1], [Define if error.h is usable]))]) + }' configure.ac || die + + eautoreconf } src_configure() { diff --git a/app-containers/crun/crun-1.21.ebuild b/app-containers/crun/crun-1.21.ebuild index 16f0b6821136d..eb94320c065f8 100644 --- a/app-containers/crun/crun-1.21.ebuild +++ b/app-containers/crun/crun-1.21.ebuild @@ -5,7 +5,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{11..14} ) -inherit libtool python-any-r1 +inherit autotools libtool python-any-r1 DESCRIPTION="Fast and low-memory footprint OCI Container Runtime fully written in C" HOMEPAGE="https://github.com/containers/crun" @@ -42,6 +42,15 @@ BDEPEND=" src_prepare() { default elibtoolize + + # https://github.com/containers/crun/pull/1887 + sed -i -E '/AC_CHECK_HEADERS\(\[error.h/{ + s/error\.h[[:space:]]*//g + a\ + AC_CHECK_HEADER([error.h], [AC_CHECK_FUNC([error], AC_DEFINE([HAVE_ERROR_H], [1], [Define if error.h is usable]))]) + }' configure.ac || die + + eautoreconf } src_configure() {