public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/bc/, sys-devel/bc/files/
@ 2018-09-18  3:50 Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2018-09-18  3:50 UTC (permalink / raw
  To: gentoo-commits

commit:     35e6708437937e606a718be756ba8a7988652323
Author:     Mike Frysinger <vapier <AT> chromium <DOT> org>
AuthorDate: Tue Sep 18 03:47:29 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=35e67084

sys-devel/bc: fix cross-compile builds #627126

Fixes: https://bugs.gentoo.org/627126

 sys-devel/bc/bc-1.07.1-r2.ebuild                 |  3 +++
 sys-devel/bc/files/bc-1.07.1-use-system-bc.patch | 16 ++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/sys-devel/bc/bc-1.07.1-r2.ebuild b/sys-devel/bc/bc-1.07.1-r2.ebuild
index 5a7d1afa3a7..99044d02af9 100644
--- a/sys-devel/bc/bc-1.07.1-r2.ebuild
+++ b/sys-devel/bc/bc-1.07.1-r2.ebuild
@@ -35,6 +35,9 @@ PATCHES=(
 src_prepare() {
 	default
 
+	# Avoid bad build tool usage when cross-compiling.  #627126
+	tc-is-cross-compiler && eapply "${FILESDIR}/${PN}-1.07.1-use-system-bc.patch"
+
 	# A patch to make this into a configure option has been sent upstream,
 	# but lets avoid regenerating all the autotools just for this.
 	if use forced-sandbox ; then

diff --git a/sys-devel/bc/files/bc-1.07.1-use-system-bc.patch b/sys-devel/bc/files/bc-1.07.1-use-system-bc.patch
new file mode 100644
index 00000000000..03ccb68c083
--- /dev/null
+++ b/sys-devel/bc/files/bc-1.07.1-use-system-bc.patch
@@ -0,0 +1,16 @@
+when cross-compiling, the local fbc binary won't work.  use the system
+bc instead as the demands of the .b script are simple enough.
+
+https://bugs.gentoo.org/627126
+
+--- a/bc/Makefile.in
++++ b/bc/Makefile.in
+@@ -628,7 +628,7 @@ libmath.h: libmath.b $(fbcOBJ) $(LIBBC)
+ 	echo '{0}' > libmath.h
+ 	$(MAKE) global.o
+ 	$(LINK) -o fbc $(fbcOBJ) global.o $(LIBBC) $(LIBL) $(READLINELIB) $(LIBS)
+-	./fbc -c $(srcdir)/libmath.b </dev/null >libmath.h
++	bc -c $(srcdir)/libmath.b </dev/null >libmath.h
+ 	$(srcdir)/fix-libmath_h
+ 	rm -f ./fbc ./global.o
+ sbc.o: sbc.c


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/bc/, sys-devel/bc/files/
@ 2018-09-18  3:50 Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2018-09-18  3:50 UTC (permalink / raw
  To: gentoo-commits

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}/
++'


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-18  3:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-18  3:50 [gentoo-commits] repo/gentoo:master commit in: sys-devel/bc/, sys-devel/bc/files/ Mike Frysinger
  -- strict thread matches above, loose matches on Subject: below --
2018-09-18  3:50 Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox