public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/bc/
Date: Fri,  2 Dec 2022 21:30:58 +0000 (UTC)	[thread overview]
Message-ID: <1670016645.5c2dbdd9394c3f3c8c038924f7a35388f28e177f.sam@gentoo> (raw)

commit:     5c2dbdd9394c3f3c8c038924f7a35388f28e177f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  2 07:29:12 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec  2 21:30:45 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c2dbdd9

sys-devel/bc: support app-alternatives/bc

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/bc/bc-1.07.1-r6.ebuild | 80 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)

diff --git a/sys-devel/bc/bc-1.07.1-r6.ebuild b/sys-devel/bc/bc-1.07.1-r6.ebuild
new file mode 100644
index 000000000000..83e40a7d2488
--- /dev/null
+++ b/sys-devel/bc/bc-1.07.1-r6.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2022 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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-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"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.07.1-no-ed-its-sed.patch )
+
+src_prepare() {
+	default
+
+	# Avoid bad build tool usage when cross-compiling. Bug #627126
+	tc-is-cross-compiler && eapply "${FILESDIR}"/${PN}-1.07.1-use-system-bc.patch
+}
+
+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
+
+	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
+}


             reply	other threads:[~2022-12-02 21:31 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 21:30 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-05-30 13:55 [gentoo-commits] repo/gentoo:master commit in: sys-devel/bc/ Fabian Groffen
2022-12-28  0:33 Sam James
2022-12-27 19:53 Sam James
2022-12-27 19:45 Sam James
2022-12-27 13:40 Sam James
2022-12-27 11:31 Sam James
2022-12-02 22:34 Sam James
2022-11-04  8:16 Agostino Sarubbo
2022-11-03 19:13 Sam James
2022-11-03 19:11 Arthur Zamarin
2022-09-09  8:23 Mike Frysinger
2022-09-09  8:23 Mike Frysinger
2022-07-28  6:40 Sam James
2022-06-19 18:50 David Seifert
2022-06-19 18:50 David Seifert
2021-04-21 19:02 Sam James
2021-02-26 16:11 Sam James
2021-01-06 15:32 Fabian Groffen
2020-12-27 18:18 Fabian Groffen
2020-08-23  8:10 Sergei Trofimovich
2020-08-19  8:31 Sergei Trofimovich
2020-08-17 12:03 Agostino Sarubbo
2020-08-17 10:01 Agostino Sarubbo
2020-08-17  9:59 Agostino Sarubbo
2020-08-17  9:58 Agostino Sarubbo
2020-08-17  9:57 Agostino Sarubbo
2020-01-17 16:02 Mike Gilbert
2019-05-05 11:04 Mikle Kolyada
2018-01-18 21:23 Mikle Kolyada
2018-01-18 21:20 Mikle Kolyada
2018-01-10  6:19 Markus Meier
2018-01-08 20:12 Sergei Trofimovich
2018-01-06 22:30 Sergei Trofimovich
2018-01-06 21:49 Sergei Trofimovich
2018-01-04 22:11 Sergei Trofimovich
2018-01-04 20:10 Lars Wendler
2018-01-04 13:00 Lars Wendler
2017-12-01 18:25 Fabian Groffen
2017-10-28 13:10 Thomas Deutschmann
2017-10-28 13:10 Thomas Deutschmann
2017-04-10  9:06 Lars Wendler
2017-04-10  7:58 Lars Wendler
2017-04-10  7:58 Lars Wendler
2017-04-10  7:58 Lars Wendler
2017-04-10  7:55 Lars Wendler
2017-03-21 15:46 Michael Haubenwallner
2015-12-31 17:07 Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1670016645.5c2dbdd9394c3f3c8c038924f7a35388f28e177f.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox