1 |
commit: 35e6708437937e606a718be756ba8a7988652323 |
2 |
Author: Mike Frysinger <vapier <AT> chromium <DOT> org> |
3 |
AuthorDate: Tue Sep 18 03:47:29 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=35e67084 |
7 |
|
8 |
sys-devel/bc: fix cross-compile builds #627126 |
9 |
|
10 |
Fixes: https://bugs.gentoo.org/627126 |
11 |
|
12 |
sys-devel/bc/bc-1.07.1-r2.ebuild | 3 +++ |
13 |
sys-devel/bc/files/bc-1.07.1-use-system-bc.patch | 16 ++++++++++++++++ |
14 |
2 files changed, 19 insertions(+) |
15 |
|
16 |
diff --git a/sys-devel/bc/bc-1.07.1-r2.ebuild b/sys-devel/bc/bc-1.07.1-r2.ebuild |
17 |
index 5a7d1afa3a7..99044d02af9 100644 |
18 |
--- a/sys-devel/bc/bc-1.07.1-r2.ebuild |
19 |
+++ b/sys-devel/bc/bc-1.07.1-r2.ebuild |
20 |
@@ -35,6 +35,9 @@ PATCHES=( |
21 |
src_prepare() { |
22 |
default |
23 |
|
24 |
+ # Avoid bad build tool usage when cross-compiling. #627126 |
25 |
+ tc-is-cross-compiler && eapply "${FILESDIR}/${PN}-1.07.1-use-system-bc.patch" |
26 |
+ |
27 |
# A patch to make this into a configure option has been sent upstream, |
28 |
# but lets avoid regenerating all the autotools just for this. |
29 |
if use forced-sandbox ; then |
30 |
|
31 |
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 |
32 |
new file mode 100644 |
33 |
index 00000000000..03ccb68c083 |
34 |
--- /dev/null |
35 |
+++ b/sys-devel/bc/files/bc-1.07.1-use-system-bc.patch |
36 |
@@ -0,0 +1,16 @@ |
37 |
+when cross-compiling, the local fbc binary won't work. use the system |
38 |
+bc instead as the demands of the .b script are simple enough. |
39 |
+ |
40 |
+https://bugs.gentoo.org/627126 |
41 |
+ |
42 |
+--- a/bc/Makefile.in |
43 |
++++ b/bc/Makefile.in |
44 |
+@@ -628,7 +628,7 @@ libmath.h: libmath.b $(fbcOBJ) $(LIBBC) |
45 |
+ echo '{0}' > libmath.h |
46 |
+ $(MAKE) global.o |
47 |
+ $(LINK) -o fbc $(fbcOBJ) global.o $(LIBBC) $(LIBL) $(READLINELIB) $(LIBS) |
48 |
+- ./fbc -c $(srcdir)/libmath.b </dev/null >libmath.h |
49 |
++ bc -c $(srcdir)/libmath.b </dev/null >libmath.h |
50 |
+ $(srcdir)/fix-libmath_h |
51 |
+ rm -f ./fbc ./global.o |
52 |
+ sbc.o: sbc.c |