diff options
author | Sam James <sam@gentoo.org> | 2023-02-14 04:07:30 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-02-14 04:07:33 +0000 |
commit | c9283e917a7d9668efb21be616ed14c23291536f (patch) | |
tree | e09694c898d275f7f8adb8b7e083d4cf320acff6 /app-admin | |
parent | app-accessibility/espeak: fix build w/ clang 16 (diff) | |
download | gentoo-c9283e917a7d9668efb21be616ed14c23291536f.tar.gz gentoo-c9283e917a7d9668efb21be616ed14c23291536f.tar.bz2 gentoo-c9283e917a7d9668efb21be616ed14c23291536f.zip |
app-admin/augeas: fix musl/clang 15 build & runtime
Closes: https://bugs.gentoo.org/894188
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/augeas/augeas-1.14.0-r2.ebuild | 53 | ||||
-rw-r--r-- | app-admin/augeas/files/augeas-1.14.0-musl-strerror_r.patch | 22 |
2 files changed, 75 insertions, 0 deletions
diff --git a/app-admin/augeas/augeas-1.14.0-r2.ebuild b/app-admin/augeas/augeas-1.14.0-r2.ebuild new file mode 100644 index 000000000000..a8fbc7adbc26 --- /dev/null +++ b/app-admin/augeas/augeas-1.14.0-r2.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="A library for changing configuration files" +HOMEPAGE="http://augeas.net/" +SRC_URI="https://github.com/hercules-team/augeas/releases/download/release-${PV}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-libs/libxml2 + sys-libs/readline:=" +DEPEND="${RDEPEND}" +BDEPEND=" + >=app-doc/NaturalDocs-1.40 + virtual/pkgconfig + test? ( dev-lang/ruby ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.14.0-musl-strerror_r.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # selinux needs to be implemented + econf --without-selinux +} + +src_compile() { + addpredict /usr/share/NaturalDocs/Config/Languages.txt + addpredict /usr/share/NaturalDocs/Config/Topics.txt + + default +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die +} diff --git a/app-admin/augeas/files/augeas-1.14.0-musl-strerror_r.patch b/app-admin/augeas/files/augeas-1.14.0-musl-strerror_r.patch new file mode 100644 index 000000000000..07cda4c4ae02 --- /dev/null +++ b/app-admin/augeas/files/augeas-1.14.0-musl-strerror_r.patch @@ -0,0 +1,22 @@ +https://github.com/hercules-team/augeas/pull/791 + +From 46ecd3542820604603ab4f046f9fb3e6195f60aa Mon Sep 17 00:00:00 2001 +From: Dimitry Andric <dimitry@andric.com> +Date: Thu, 8 Dec 2022 13:08:53 +0100 +Subject: [PATCH] Only use GNU specific strerror_r() API when __GLIBC__ is + defined. + +--- a/src/internal.c ++++ b/src/internal.c +@@ -431,8 +431,8 @@ char *cleanpath(char *path) { + + const char *xstrerror(int errnum, char *buf, size_t len) { + #ifdef HAVE_STRERROR_R +-# ifdef __USE_GNU +- /* Annoying linux specific API contract */ ++# if defined(__USE_GNU) && defined(__GLIBC__) ++ /* Annoying GNU specific API contract */ + return strerror_r(errnum, buf, len); + # else + strerror_r(errnum, buf, len); + |