f2212f0953fdb827b8480722634b501162d3b1b9
[openwrt/openwrt.git] / tools / bc / patches / 002-fix-libmath.patch
1 --- a/bc/fix-libmath_h
2 +++ b/bc/fix-libmath_h
3 @@ -1,9 +1,9 @@
4 -ed libmath.h <<EOS-EOS
5 -1,1s/^/{"/
6 -1,\$s/\$/",/
7 -2,\$s/^/"/
8 -\$,\$d
9 -\$,\$s/,\$/,0}/
10 -w
11 -q
12 -EOS-EOS
13 +#!/usr/bin/env bash
14 +sed -e '1 s/^/{"/' \
15 + -e 's/$/",/' \
16 + -e '2,$ s/^/"/' \
17 + -e '$ d' \
18 + -i libmath.h
19 +
20 +sed -e '$ s/$/0}/' \
21 + -i libmath.h
22 --- a/configure
23 +++ b/configure
24 @@ -5288,7 +5288,7 @@ case $bcle-$bcrl-$LEX in
25 ?-?-flex)
26 LEX="flex -I -8" ;;
27 ?-y-*)
28 - as_fn_error $? "readline works only with flex." "$LINENO" 5 ;;
29 + : ;; # as_fn_error $? "readline works only with flex." "$LINENO" 5 ;;
30 esac
31
32 case $LEX-`uname -s` in