commit:     7ddff7fe0d7817e30215be831f49737b52181bd4
Author:     Gavin D. Howard <gavin <AT> gavinhoward <DOT> com>
AuthorDate: Fri Aug 23 03:29:40 2024 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Fri Aug 23 04:09:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ddff7fe

sci-calculators/bc-gh: add 7.0.0

Closes: https://bugs.gentoo.org/937152
Signed-off-by: Gavin D. Howard <gavin <AT> gavinhoward.com>
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 sci-calculators/bc-gh/Manifest           |  1 +
 sci-calculators/bc-gh/bc-gh-7.0.0.ebuild | 77 ++++++++++++++++++++++++++++++++
 2 files changed, 78 insertions(+)

diff --git a/sci-calculators/bc-gh/Manifest b/sci-calculators/bc-gh/Manifest
index e9f5245f83e7..008a6d3635e0 100644
--- a/sci-calculators/bc-gh/Manifest
+++ b/sci-calculators/bc-gh/Manifest
@@ -1,3 +1,4 @@
 DIST bc-6.5.0.tar.xz 461380 BLAKE2B 
e4aa633162d03fc5723e967ba81f985ab1b16e47b3c9a3ca1c32e9a717db682ce88cc6ba453d5e9b09539dcb8ddbb258b7b7dbdd2e27279355e3c35028d56130
 SHA512 
1cb03038d828a0b10734c29931777add8b22f194c507b8ff538ec1aa52a2a97a4ac2733d72cdb0710fdc6937807074e929f7918c56aaf5be8fbe908ea7c5a401
 DIST bc-6.7.5.tar.xz 468572 BLAKE2B 
3942cfbbc2b8a307bc24b9f7c3e037bce374bd17332b236a8c76ccacef1177e36669b7f61944a5c5791b0a436dec171991cfc821526865a816fba91e65aa1f04
 SHA512 
5f689fd20801ea7ede725ae5dc4e8744bdf2d72424bffef99c53193a950f4bd83b6eb4c5a07556576d0b3f5b6cd7f9fc7cbcb41d27891f488bb2e97a186f76a4
 DIST bc-6.7.6.tar.xz 473104 BLAKE2B 
447cf15d94e8800ad81d734efef5a6b4dfdc4930eeb0bff3a4c093e31d65a8449cf3e685af077ae3397a1a730c4345fb7e95c82446d09b692f4fd6ef6e90ea88
 SHA512 
418ce61e8151a548627b794692325f48c68f8cedca7a0cb8d896bb74510f55b33486214af0af1b160c1f387f3d034300dff6fbc29c2d44d7b304a7a37c3c478b
+DIST bc-7.0.0.tar.xz 474468 BLAKE2B 
2905f96639558a7f1203a0f63207f26b5e4cb75a91c4b848a4ef7f0313dfaa698499f948eb7ecdbc5eb3fcd0bd3ecf8c2f005256e48a58615fa8b69ec19932ae
 SHA512 
ef89525eea8773dddb7efd3dd33f589de287ac807b772480e884bd666f29b2b0b362c999029cc6d82733f830195ca3f6fd867f15190fbcbf807ddbc4b24abb65

diff --git a/sci-calculators/bc-gh/bc-gh-7.0.0.ebuild 
b/sci-calculators/bc-gh/bc-gh-7.0.0.ebuild
new file mode 100644
index 000000000000..f60e406b8630
--- /dev/null
+++ b/sci-calculators/bc-gh/bc-gh-7.0.0.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo
+
+MY_P="bc-${PV}"
+DESCRIPTION="Implementation of POSIX bc with GNU extensions"
+HOMEPAGE="
+       https://git.gavinhoward.com/gavin/bc/
+       https://github.com/gavinhoward/bc/
+"
+SRC_URI="
+       https://github.com/gavinhoward/bc/releases/download/${PV}/${MY_P}.tar.xz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86"
+IUSE="libedit readline"
+
+DEPEND="
+       !readline? (
+               libedit? ( dev-libs/libedit:= )
+       )
+       readline? (
+               sys-libs/readline:=
+               sys-libs/ncurses:=
+       )
+"
+RDEPEND="
+       ${DEPEND}
+"
+
+src_configure() {
+       local myconf=(
+               # GNU and BSD bc's have slightly different behavior. This bc 
can act
+               # like both, changing at runtime with environment variables, 
but it
+               # needs defaults, which can be set at compile time. This option 
sets all
+               # of the defaults to match the GNU bc/dc since it's common on 
Linux.
+               -pGNU
+               # A lot of test results are generated first by a bc compatible 
with the
+               # GNU bc. If there is no GNU bc installed, then those tests 
should be
+               # skipped. That's what this option does. Without it, we would 
have a
+               # dependency cycle. Those tests are super long, anyway.
+               -G
+               # Disables the automatic stripping of binaries.
+               -T
+               # Enables installing all locales, which is important for 
packages.
+               -l
+               # Disables some "problematic" tests that need specific options 
on Linux
+               # to not trigger the OOM killer because malloc() lies.
+               -P
+       )
+       if use readline ; then
+               myconf+=( -r )
+       elif use libedit ; then
+               myconf+=( -e )
+       fi
+
+       local -x EXECSUFFIX="-gh"
+       local -x PREFIX="${EPREFIX}/usr"
+       edo ./configure.sh "${myconf[@]}"
+}
+
+src_test() {
+       # This is to fix a bug encountered on Arch. It is to ensure we don't get
+       # segfaults on `make check` when the error messages change because the 
error
+       # messages are passed to printf(); they have format specifiers. With 
these
+       # env vars, the internal error messages are used, instead of the 
installed
+       # locales, which might be different since the new locale files are not
+       # installed yet. (It is impossible to use uninstalled locales because 
of the
+       # poor design of POSIX locales.)
+       env LANG=C LC_ALL=C emake check
+}

Reply via email to