diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/Manifest index c47ce9ccb0..82a7043fed 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/Manifest @@ -1,2 +1,2 @@ -DIST libbsd-0.11.3.tar.xz 399712 BLAKE2B 1af04b8fcbc0bfa59fba549639d61a33ac934fe7ee42b506d1b0452e0b836b0bfdd3d8739de90465be46fe6a9d326a2d11bcf72280aa19ccba81db5da6d63d89 SHA512 a7015ea1ffa3766b1a4690526a25231898ad8275149b31fb6801082450172249997c36165626d101ffce53b59767a46676eebc0806426922fe4e773a0376c1f5 -DIST libbsd-0.11.5.tar.xz 409972 BLAKE2B 00c89ad1be351e7851538eac2744f5aef87b5937330d514d17af8a20a04bc6eab0e2bda61d0080da1d1439306b3b191ab68b4bc4cd8558ff0adfe402bfbf5b52 SHA512 c52c19eddd53630aca14f9f6221f7b84aa9cc798b4bb91e867822b161793313aab872ac1c0350d29312a72fee6e2061f3910ff918b724ec171d8c9de5837c841 +DIST libbsd-0.11.7.tar.xz 418508 BLAKE2B 2ff0aa951c5b37a58ab101aade52d077d52f3695bb8535c99dec89659775501d93af16f164fef946776f445ee88a276d00870f64cb3fef58942ce26af6d2eaa9 SHA512 51fda4724f41dd8a4628afd58c21236a7588d9045e337e06eeabf83805a9aaaa53705441ca901ad11f1c65f18e881523bdc97721a7d3d6a5cced27f2450d09a2 +DIST libbsd-0.11.7.tar.xz.asc 833 BLAKE2B 925cd4f5b68c0dccceb476cb188bb5a8185ad77895b9b458ff6819ae241dbd8cbf1c18dd12d10b90b3a9ea3f9e065b44566d1a908d0c111ecbd435434b922a66 SHA512 bdcce69ee261039900896c5be48659f1b6b809f3a6e8a5220aac30a6687926ac29e478a3ea737727d077d6575ee11b86eed896932568fdd261a9aaeb46d695b6 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/files/libbsd-0.11.7-musl-lfs.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/files/libbsd-0.11.7-musl-lfs.patch new file mode 100644 index 0000000000..41cc27e752 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/files/libbsd-0.11.7-musl-lfs.patch @@ -0,0 +1,32 @@ +https://bugs.gentoo.org/905912 +https://gitlab.freedesktop.org/libbsd/libbsd/-/merge_requests/24 + +From c36c29f014b0ef56a3aef984fa40b0e100b6f419 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 15 Dec 2022 09:02:22 -0800 +Subject: [PATCH] funopen: Replace off64_t with off_t in funopen_seek + +AC_SYS_LARGEFILE in configure.ac is setting needed defines to make +64bit off_t on relevant platforms. + +Fixes build on musl + +| ../../../../../../../../workspace/sources/libbsd/src/funopen.c:68:28: error: unknown type name 'off64_t'; did you mean 'off_t'? +| funopen_seek(void *cookie, off64_t *offset, int whence) +| ^~~~~~~ +| off_t + +Signed-off-by: Khem Raj +--- a/src/funopen.c ++++ b/src/funopen.c +@@ -65,7 +65,7 @@ funopen_write(void *cookie, const char *buf, size_t size) + } + + static int +-funopen_seek(void *cookie, off64_t *offset, int whence) ++funopen_seek(void *cookie, off_t *offset, int whence) + { + struct funopen_cookie *cookiewrap = cookie; + off_t soff = *offset; +-- +GitLab diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/files/libbsd-build-Fix-version-script-linker-support-detection.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/files/libbsd-build-Fix-version-script-linker-support-detection.patch new file mode 100644 index 0000000000..2e45429021 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/files/libbsd-build-Fix-version-script-linker-support-detection.patch @@ -0,0 +1,36 @@ +From dec783dce5a7131e232a06e63a544645b5463dd8 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sun, 12 Feb 2023 23:55:09 +0100 +Subject: [PATCH] build: Fix version script linker support detection + +When the linker uses --no-undefined-version either specified by the user +or as the default behavior (such as with newer clang >= 16 releases), +a missing symbol definition will cause a linker error if that symbol is +listed in the version script. + +Upstream commit: https://gitlab.freedesktop.org/libbsd/libbsd/-/commit/dec783dce5a7131e232a06e63a544645b5463dd8 + +--- + configure.ac | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 17d113c..7d17a93 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -33,7 +33,11 @@ AC_CACHE_CHECK([if ld supports --version-script flag], + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" + AC_LINK_IFELSE([ +- AC_LANG_PROGRAM([], []) ++ AC_LANG_PROGRAM([[ ++extern int symbol(void); ++int symbol(void) { return 0; } ++]], [[ ++]]) + ], [ + libbsd_cv_version_script=yes + ], [ +-- +2.39.1.615.ga0422de7ea.dirty + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.5.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.5.ebuild deleted file mode 100644 index 55d75e728b..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.5.ebuild +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib-minimal - -DESCRIPTION="Library to provide useful functions commonly found on BSD systems" -HOMEPAGE="https://libbsd.freedesktop.org/wiki/ https://gitlab.freedesktop.org/libbsd/libbsd" -SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz" - -LICENSE="BSD BSD-2 BSD-4 ISC" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" -IUSE="static-libs" - -RDEPEND="app-crypt/libmd[${MULTILIB_USEDEP}]" -DEPEND="${RDEPEND} - >=sys-kernel/linux-headers-3.17 -" - -multilib_src_configure() { - # The build system will install libbsd-ctor.a despite of USE="-static-libs" - # which is correct, see: - # https://gitlab.freedesktop.org/libbsd/libbsd/commit/c5b959028734ca2281250c85773d9b5e1d259bc8 - ECONF_SOURCE="${S}" econf $(use_enable static-libs static) -} - -multilib_src_install() { - emake DESTDIR="${D}" install - - find "${ED}" -type f -name "*.la" -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.7-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.7-r2.ebuild new file mode 100644 index 0000000000..cc3316c69e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.7-r2.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/guillemjover.asc +inherit autotools multilib multilib-minimal verify-sig + +DESCRIPTION="Library to provide useful functions commonly found on BSD systems" +HOMEPAGE="https://libbsd.freedesktop.org/wiki/ https://gitlab.freedesktop.org/libbsd/libbsd" +SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz" +SRC_URI+=" verify-sig? ( https://${PN}.freedesktop.org/releases/${P}.tar.xz.asc )" + +LICENSE="BSD BSD-2 BSD-4 ISC" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +IUSE="static-libs" + +RDEPEND="app-crypt/libmd[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-3.17 +" +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-guillemjover )" + +PATCHES=( + "${FILESDIR}/libbsd-build-Fix-version-script-linker-support-detection.patch" + "${FILESDIR}/libbsd-0.11.7-musl-lfs.patch" +) + +src_prepare() { + default + + # Drop on next release, only needed for lld patch + eautoreconf +} + +multilib_src_configure() { + # The build system will install libbsd-ctor.a despite USE="-static-libs" + # which is correct, see: + # https://gitlab.freedesktop.org/libbsd/libbsd/commit/c5b959028734ca2281250c85773d9b5e1d259bc8 + ECONF_SOURCE="${S}" econf $(use_enable static-libs static) +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + find "${ED}" -type f -name "*.la" -delete || die + + # ld scripts on standalone prefix (RAP) systems should have the prefix + # stripped from any paths, as the sysroot is automatically prepended. + local ldscript=${ED}/usr/$(get_libdir)/${PN}$(get_libname) + if use prefix && ! use prefix-guest && grep -qIF "ld script" "${ldscript}" 2>/dev/null; then + sed -i "s|${EPREFIX}/|/|g" "${ldscript}" || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.3.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.7.ebuild similarity index 64% rename from sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.3.ebuild rename to sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.7.ebuild index 1551e7d7f7..f01b8521ce 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.3.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.7.ebuild @@ -3,34 +3,27 @@ EAPI=8 -inherit multilib-minimal +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/guillemjover.asc +inherit multilib-minimal verify-sig DESCRIPTION="Library to provide useful functions commonly found on BSD systems" HOMEPAGE="https://libbsd.freedesktop.org/wiki/ https://gitlab.freedesktop.org/libbsd/libbsd" SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz" +SRC_URI+=" verify-sig? ( https://${PN}.freedesktop.org/releases/${P}.tar.xz.asc )" LICENSE="BSD BSD-2 BSD-4 ISC" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" IUSE="static-libs" RDEPEND="app-crypt/libmd[${MULTILIB_USEDEP}]" DEPEND="${RDEPEND} >=sys-kernel/linux-headers-3.17 " - -pkg_setup() { - local f="${EROOT}/usr/$(get_libdir)/${PN}.a" - if ! has_version ${CATEGORY}/${PN}; then - if [[ -e ${f} ]]; then - eerror "${m}" - die "You need to remove ${f} by hand or re-emerge sys-libs/glibc first." - fi - fi -} +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-guillemjover )" multilib_src_configure() { - # The build system will install libbsd-ctor.a despite of USE="-static-libs" + # The build system will install libbsd-ctor.a despite USE="-static-libs" # which is correct, see: # https://gitlab.freedesktop.org/libbsd/libbsd/commit/c5b959028734ca2281250c85773d9b5e1d259bc8 ECONF_SOURCE="${S}" econf $(use_enable static-libs static) @@ -38,5 +31,6 @@ multilib_src_configure() { multilib_src_install() { emake DESTDIR="${D}" install + find "${ED}" -type f -name "*.la" -delete || die } diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/metadata.xml index 822dbca255..f7d2c3e6ba 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/metadata.xml @@ -1,11 +1,16 @@ + + base-system@gentoo.org + Gentoo Base System + freedesktop-bugs@gentoo.org Gentoo Freedesktop Project cpe:/a:libbsd:libbsd + libbsd/libbsd