commit:     c467a8a6e70b793221cd1f6a6658894c2e4a190e
Author:     Mike Frysinger <vapier <AT> chromium <DOT> org>
AuthorDate: Tue Sep 18 03:40:54 2018 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Sep 18 03:48:36 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c467a8a6

sys-devel/bc: replace ed usage with sed

The ed usage here is minor and easy enough to convert to sed.
This avoids a depend that no one else generally has.

 sys-devel/bc/bc-1.07.1-r2.ebuild                 |  2 +-
 sys-devel/bc/files/bc-1.07.1-no-ed-its-sed.patch | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/sys-devel/bc/bc-1.07.1-r2.ebuild b/sys-devel/bc/bc-1.07.1-r2.ebuild
index 78cc0f0805f..5a7d1afa3a7 100644
--- a/sys-devel/bc/bc-1.07.1-r2.ebuild
+++ b/sys-devel/bc/bc-1.07.1-r2.ebuild
@@ -23,13 +23,13 @@ RDEPEND="
 "
 DEPEND="
        ${RDEPEND}
-       sys-apps/ed
        sys-devel/flex
        virtual/yacc
 "
 
 PATCHES=(
        "${FILESDIR}/${PN}-1.07.1-sandbox.patch"
+       "${FILESDIR}/${PN}-1.07.1-no-ed-its-sed.patch"
 )
 
 src_prepare() {

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
new file mode 100644
index 00000000000..ce8e456186b
--- /dev/null
+++ b/sys-devel/bc/files/bc-1.07.1-no-ed-its-sed.patch
@@ -0,0 +1,23 @@
+in Gentoo, everyone has sed.  no one really has ed.  tweak this minor script
+to use sed instead of ed.  the changes are straight forward:
+* change \$ to $
+* merge last two $,$ commands into one
+* delete w/q commands
+
+--- a/bc/fix-libmath_h
++++ b/bc/fix-libmath_h
+@@ -1,9 +1,6 @@
+-ed libmath.h <<EOS-EOS
++sed -i libmath.h -e '
+ 1,1s/^/{"/
+-1,\$s/\$/",/
+-2,\$s/^/"/
+-\$,\$d
+-\$,\$s/,\$/,0}/
+-w
+-q
+-EOS-EOS
++1,$s/$/",/
++2,$s/^/"/
++$s/.*/0}/
++'

Reply via email to