subversion: Update from 1.9.7 to 1.10.0
[termux-packages] / packages / pforth / build.sh
1 TERMUX_PKG_HOMEPAGE=http://www.softsynth.com/pforth/
2 TERMUX_PKG_DESCRIPTION="Portable Forth in C"
3 _COMMIT=f1994bf609c5b053c5c0d7db2062b570fa9f5ead
4 TERMUX_PKG_VERSION=20170116
5 TERMUX_PKG_SRCURL=https://github.com/philburk/pforth/archive/${_COMMIT}.zip
6 TERMUX_PKG_SHA256=fffd7aec1f6601c48a9e2baa284c82d4b22a77f5860a49d83bd811ca4ea18a05
7 TERMUX_PKG_HOSTBUILD=yes
8 TERMUX_PKG_REVISION=1
9
10 termux_step_post_configure () {
11 # Avoid caching the host build as it differs between arches
12 # and is quite fast here anyway:
13 rm -Rf $TERMUX_PKG_HOSTBUILD_DIR
14 }
15
16 termux_step_host_build () {
17 local M32=""
18 if [ $TERMUX_ARCH_BITS = "32" ]; then
19 M32="-m32"
20 fi
21 cp -Rf $TERMUX_PKG_SRCDIR/* .
22 cd build/unix
23 CC="gcc $M32" make pfdicdat.h
24 CC="gcc $M32" make all
25 }
26
27 termux_step_pre_configure () {
28 for file in pfdicdat.h pforth; do
29 cp $TERMUX_PKG_HOSTBUILD_DIR/build/unix/$file $TERMUX_PKG_SRCDIR/build/unix/$file
30 touch -d "next hour" $TERMUX_PKG_SRCDIR/build/unix/$file
31 done
32
33 export TERMUX_PKG_BUILDDIR=$TERMUX_PKG_SRCDIR/build/unix
34 export CC="$CC $CFLAGS"
35 }
36 termux_step_make_install () {
37 cp $TERMUX_PKG_BUILDDIR/pforth_standalone $TERMUX_PREFIX/bin/pforth
38 }