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/, sys-devel/bc/files/
Date: Tue, 18 Sep 2018 03:50:23
Message-Id: 1537242516.c467a8a6e70b793221cd1f6a6658894c2e4a190e.vapier@gentoo
1 commit: c467a8a6e70b793221cd1f6a6658894c2e4a190e
2 Author: Mike Frysinger <vapier <AT> chromium <DOT> org>
3 AuthorDate: Tue Sep 18 03:40:54 2018 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 18 03:48:36 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c467a8a6
7
8 sys-devel/bc: replace ed usage with sed
9
10 The ed usage here is minor and easy enough to convert to sed.
11 This avoids a depend that no one else generally has.
12
13 sys-devel/bc/bc-1.07.1-r2.ebuild | 2 +-
14 sys-devel/bc/files/bc-1.07.1-no-ed-its-sed.patch | 23 +++++++++++++++++++++++
15 2 files changed, 24 insertions(+), 1 deletion(-)
16
17 diff --git a/sys-devel/bc/bc-1.07.1-r2.ebuild b/sys-devel/bc/bc-1.07.1-r2.ebuild
18 index 78cc0f0805f..5a7d1afa3a7 100644
19 --- a/sys-devel/bc/bc-1.07.1-r2.ebuild
20 +++ b/sys-devel/bc/bc-1.07.1-r2.ebuild
21 @@ -23,13 +23,13 @@ RDEPEND="
22 "
23 DEPEND="
24 ${RDEPEND}
25 - sys-apps/ed
26 sys-devel/flex
27 virtual/yacc
28 "
29
30 PATCHES=(
31 "${FILESDIR}/${PN}-1.07.1-sandbox.patch"
32 + "${FILESDIR}/${PN}-1.07.1-no-ed-its-sed.patch"
33 )
34
35 src_prepare() {
36
37 diff --git a/sys-devel/bc/files/bc-1.07.1-no-ed-its-sed.patch b/sys-devel/bc/files/bc-1.07.1-no-ed-its-sed.patch
38 new file mode 100644
39 index 00000000000..ce8e456186b
40 --- /dev/null
41 +++ b/sys-devel/bc/files/bc-1.07.1-no-ed-its-sed.patch
42 @@ -0,0 +1,23 @@
43 +in Gentoo, everyone has sed. no one really has ed. tweak this minor script
44 +to use sed instead of ed. the changes are straight forward:
45 +* change \$ to $
46 +* merge last two $,$ commands into one
47 +* delete w/q commands
48 +
49 +--- a/bc/fix-libmath_h
50 ++++ b/bc/fix-libmath_h
51 +@@ -1,9 +1,6 @@
52 +-ed libmath.h <<EOS-EOS
53 ++sed -i libmath.h -e '
54 + 1,1s/^/{"/
55 +-1,\$s/\$/",/
56 +-2,\$s/^/"/
57 +-\$,\$d
58 +-\$,\$s/,\$/,0}/
59 +-w
60 +-q
61 +-EOS-EOS
62 ++1,$s/$/",/
63 ++2,$s/^/"/
64 ++$s/.*/0}/
65 ++'