From 49d6e312ca3a7619fa002e4e66c7bf63b46ce550 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 16 Jun 2025 07:14:15 +0000 Subject: [PATCH] sys-devel/bc: Sync with Gentoo It's from Gentoo commit bc847864751d0a4a729be37eebd1a019022f6bf4. --- .../portage-stable/sys-devel/bc/Manifest | 1 + .../sys-devel/bc/bc-1.08.2.ebuild | 77 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/sys-devel/bc/bc-1.08.2.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/bc/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/bc/Manifest index 89a797708e..cc05123055 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/bc/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-devel/bc/Manifest @@ -1,3 +1,4 @@ DIST bc-1.07.1.tar.gz 419850 BLAKE2B dcedc193be5521aa0fa3a19746233ed65bc1fe8ef12e15155341706de6fbeecb6dd7ee4ab11e2d4b3aca2ae7097cce89e389b3573493bbc893e00b4ed3239594 SHA512 02126d0db6b6ed06d56cfc292d6f5475ff1e574779d7e69c7809bbb1e13f946f57ea07da2a7666baa092507a951a822044b0970075f75eefe65a5c1999b75d34 DIST bc-1.08.0.tar.gz 452231 BLAKE2B f42af858507e72171caf0786ca7b72506d79c93a73aa1816a6471798f63d831c14f66cab6fd5af624a21a09b9930772ebf2e791c06f043b45e8b5893134481c7 SHA512 6ce5b510ad7aa8b489d0c3f060c34cf738da33fde4dda8398d9f75fabadef16d9b423ae8752881eff395b10088cd9d9fb16868c578b0950008f1ee08d12be197 DIST bc-1.08.1.tar.gz 458434 BLAKE2B 51d1bac17f31bb7dbb044c28752cccfe59dd5bcb78a2c3bfa66a345577ea3aee37fef8d7efae83a57e41ae77d7317008f3682dfbc3165c76888770636deead01 SHA512 256c94833ead8029122d3ba6475cf4ff030c208a5bd3e2e9c5c8888467215e0fa9ab34e4226791bbd6e47498c0c61f0dc6399eecb0c8cf6a43453e84911c1847 +DIST bc-1.08.2.tar.gz 457557 BLAKE2B 6ff6d5083aa67d4075116c691b1f975127ab5079e1a1b63d916fbd3e6d5e95c7f4bc7fe196cac0e2a51a7f4c56d91da60495f3ce60f08bee8f2ba4278a791834 SHA512 0876a4c5bfc23da79479519c6a8e03ac9f59ae54077eb71ffdcc6ddaccb76c4b7595b088e89e6ad82d833c072eeff5b378178084276584813c00eedace4c6f8c diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/bc/bc-1.08.2.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/bc/bc-1.08.2.ebuild new file mode 100644 index 0000000000..0a08fa03ba --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/bc/bc-1.08.2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Handy console-based calculator utility" +HOMEPAGE="https://www.gnu.org/software/bc/bc.html" +SRC_URI="mirror://gnu/bc/${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="libedit readline static" + +RDEPEND=" + !readline? ( libedit? ( dev-libs/libedit:= ) ) + readline? ( + sys-libs/readline:= + sys-libs/ncurses:= + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + sys-devel/flex + app-alternatives/yacc +" +PDEPEND="app-alternatives/bc" + +src_configure() { + local myconf=( + $(use_with readline) + --program-suffix=-reference + ) + + if use readline ; then + myconf+=( --without-libedit ) + else + myconf+=( $(use_with libedit) ) + fi + + use static && append-ldflags -static + + # The libedit code isn't compatible currently. #830101 + use libedit && append-flags -fcommon + + # AC_SYS_LARGEFILE in configure.ac would handle this, but we don't patch + # autotools otherwise currently. This change has been sent upstream, but + # who knows when they'll make another release. + append-lfs-flags + + # configure dies with other lexes: + # "configure: error: readline works only with flex." + export LEX=flex + + econf "${myconf[@]}" + + # Do not regen docs -- configure produces a small fragment that includes + # the version info which causes all pages to regen (newer file). Bug #554774 + touch -r doc doc/* || die +} + +src_compile() { + emake AR="$(tc-getAR)" +} + +pkg_postinst() { + # ensure to preserve the symlinks before app-alternatives/bc + # is installed + local x + for x in bc dc ; do + if [[ ! -h ${EROOT}/usr/bin/${x} ]] ; then + ln -s "${x}-reference" "${EROOT}/usr/bin/${x}" || die + fi + done +}