Commit 2c6198a9 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Upgraded bc to 3.0.3

parent 6ed34bc6
all: bc-fix-libmath.h all:
tar xf bc-1.07.1.tar.gz tar xf bc-3.0.3.tar.xz
@echo "$$LIBMATH" > bc-1.07.1/bc/fix-libmath_h cd bc-3.0.3 && PREFIX=/usr CC=gcc CFLAGS="-std=c99" ./configure.sh -G -O3
ln -sv /tools/lib/libncursesw.so.6 /usr/lib/libncursesw.so.6 $(MAKE) -C bc-3.0.3
ln -sfv libncurses.so.6 /usr/lib/libncurses.so
cd bc-1.07.1 && sed -i -e '/flex/s/as_fn_error/: ;; # &/' configure
cd bc-1.07.1 && ./configure --prefix=/usr --with-readline --mandir=/usr/share/man --infodir=/usr/share/info
$(MAKE) -C bc-1.07.1
if [[ ! "$(BUILD_OPTIONS)" =~ no-tests ]] ; then \ if [[ ! "$(BUILD_OPTIONS)" =~ no-tests ]] ; then \
cd bc-1.07.1 && echo "quit" | ./bc/bc -l Test/checklib.b ; \ $(MAKE) -C bc-3.0.3 test ; \
fi fi
$(MAKE) -C bc-1.07.1 install $(MAKE) -C bc-3.0.3 install
rm -rf bc-1.07.1 rm -rf bc-3.0.3
bc-fix-libmath.h:
define LIBMATH
#!/bin/bash
sed -e '1 s/^/{"/' -e 's/$$/",/' -e '2,$$ s/^/"/' -e '$$ d' -i libmath.h
sed -e '$$ s/$$/0}/' -i libmath.h
endef
export LIBMATH
File added
<project name="bc"> <project name="bc">
<target name="boot-bc"> <target name="boot-bc">
<property name="makedir" value="${builddir}/bc-1.07.1"/> <property name="makedir" value="${builddir}/bc-3.0.3"/>
<exec executable="tar" failonerror="true"> <exec executable="tar" failonerror="true">
<arg line="xf packages/bc/bc-1.07.1.tar.gz -C ${builddir}"/> <arg line="xf packages/bc/bc-3.0.3.tar.xz -C ${builddir}"/>
</exec> </exec>
<exec executable="./configure" dir="${makedir}" failonerror="true"> <exec executable="./configure" dir="${makedir}" failonerror="true">
<env key="PREFIX" value="${sysrootdir}/cross-tools"/>
<env key="CC" value="gcc"/> <env key="CC" value="gcc"/>
<arg line="--prefix=${sysrootdir}/cross-tools"/> <env key="CFLAGS" value="-std=c99"/>
<arg line="-G O3"/>
</exec> </exec>
<exec executable="make" dir="${makedir}" failonerror="true"/> <exec executable="make" dir="${makedir}" failonerror="true"/>
<exec executable="make" dir="${makedir}" failonerror="true"> <exec executable="make" dir="${makedir}" failonerror="true">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment