pforth: Fix build
[termux-packages] / packages / pforth / build.sh
CommitLineData
d34d2ca6
FF
1TERMUX_PKG_HOMEPAGE=http://www.softsynth.com/pforth/
2TERMUX_PKG_DESCRIPTION="Portable Forth in C"
3_COMMIT=706b5e4b7faffb3fb4c58651be5df3e4bd2be794
4TERMUX_PKG_VERSION=20160530
5TERMUX_PKG_SRCURL=https://github.com/philburk/pforth/archive/${_COMMIT}.zip
6TERMUX_PKG_FOLDERNAME=pforth-${_COMMIT}
7TERMUX_PKG_HOSTBUILD=yes
8
9termux_step_host_build () {
da8abb73 10 cp -Rf $TERMUX_PKG_SRCDIR/* .
d34d2ca6 11 cd build/unix
7ce56385 12 CC=gcc make pfdicdat.h
d34d2ca6
FF
13 CC=gcc make all
14}
15
16termux_step_pre_configure () {
17 for file in pfdicdat.h pforth; do
18 cp $TERMUX_PKG_HOSTBUILD_DIR/build/unix/$file $TERMUX_PKG_SRCDIR/build/unix/$file
19 $TERMUX_TOUCH -d "next hour" $TERMUX_PKG_SRCDIR/build/unix/$file
20 done
21
22 export TERMUX_PKG_BUILDDIR=$TERMUX_PKG_SRCDIR/build/unix
23 export CC="$CC $CFLAGS"
24}
25termux_step_make_install () {
26 cp $TERMUX_PKG_BUILDDIR/pforth_standalone $TERMUX_PREFIX/bin/pforth
27}