Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/bc/
Date: Fri, 09 Sep 2022 08:24:02
Message-Id: 1662711184.d5211fff3db25183146af1d0ccadd89f5ef3f52c.vapier@gentoo
1 commit: d5211fff3db25183146af1d0ccadd89f5ef3f52c
2 Author: Mike Frysinger <vapier <AT> chromium <DOT> org>
3 AuthorDate: Fri Sep 9 08:10:48 2022 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 9 08:13:04 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5211fff
7
8 sys-devel/bc: enable LFS flags #471102
9
10 Minor change for a minor tool, but easy enough to fill out short of
11 upstream ever updating the autotool usage directly.
12
13 Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
14
15 sys-devel/bc/bc-1.07.1-r5.ebuild | 62 ++++++++++++++++++++++++++++++++++++++++
16 1 file changed, 62 insertions(+)
17
18 diff --git a/sys-devel/bc/bc-1.07.1-r5.ebuild b/sys-devel/bc/bc-1.07.1-r5.ebuild
19 new file mode 100644
20 index 000000000000..f9c1a2daa3e5
21 --- /dev/null
22 +++ b/sys-devel/bc/bc-1.07.1-r5.ebuild
23 @@ -0,0 +1,62 @@
24 +# Copyright 1999-2022 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=7
28 +
29 +inherit flag-o-matic toolchain-funcs
30 +
31 +DESCRIPTION="Handy console-based calculator utility"
32 +HOMEPAGE="https://www.gnu.org/software/bc/bc.html"
33 +SRC_URI="mirror://gnu/bc/${P}.tar.gz"
34 +
35 +LICENSE="GPL-3+"
36 +SLOT="0"
37 +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"
38 +IUSE="libedit readline static"
39 +
40 +RDEPEND="
41 + !readline? ( libedit? ( dev-libs/libedit:= ) )
42 + readline? (
43 + sys-libs/readline:=
44 + sys-libs/ncurses:=
45 + )"
46 +DEPEND="${RDEPEND}"
47 +BDEPEND="
48 + sys-devel/flex
49 + virtual/yacc"
50 +
51 +PATCHES=( "${FILESDIR}"/${PN}-1.07.1-no-ed-its-sed.patch )
52 +
53 +src_prepare() {
54 + default
55 +
56 + # Avoid bad build tool usage when cross-compiling. Bug #627126
57 + tc-is-cross-compiler && eapply "${FILESDIR}"/${PN}-1.07.1-use-system-bc.patch
58 +}
59 +
60 +src_configure() {
61 + local myconf=(
62 + $(use_with readline)
63 + )
64 + if use readline ; then
65 + myconf+=( --without-libedit )
66 + else
67 + myconf+=( $(use_with libedit) )
68 + fi
69 + use static && append-ldflags -static
70 +
71 + # AC_SYS_LARGEFILE in configure.ac would handle this, but we don't patch
72 + # autotools otherwise currently. This change has been sent upstream, but
73 + # who knows when they'll make another release.
74 + append-lfs-flags
75 +
76 + econf "${myconf[@]}"
77 +
78 + # Do not regen docs -- configure produces a small fragment that includes
79 + # the version info which causes all pages to regen (newer file). Bug #554774
80 + touch -r doc doc/* || die
81 +}
82 +
83 +src_compile() {
84 + emake AR="$(tc-getAR)"
85 +}