2016-08-24 01:12:27 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=http://www.softsynth.com/pforth/
|
|
|
|
TERMUX_PKG_DESCRIPTION="Portable Forth in C"
|
2019-01-21 15:00:12 +01:00
|
|
|
TERMUX_PKG_LICENSE="Public Domain"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2018-05-19 02:32:50 +02:00
|
|
|
_COMMIT=ee8dc9e9e0f59b8e38dec3732caefe9f3af2b431
|
|
|
|
TERMUX_PKG_VERSION=20180513
|
2019-03-11 00:23:39 +01:00
|
|
|
TERMUX_PKG_REVISION=1
|
2016-08-24 01:12:27 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/philburk/pforth/archive/${_COMMIT}.zip
|
2020-01-13 02:00:07 +01:00
|
|
|
TERMUX_PKG_SHA256=3cf472bb944aa53b0eb0b93d021c8c2c0eff18dd2e3e54daddaf4af342e441ea
|
2019-08-12 17:28:41 +02:00
|
|
|
TERMUX_PKG_HOSTBUILD=true
|
2016-08-24 01:12:27 +02:00
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_post_configure() {
|
2017-11-18 22:22:50 +01:00
|
|
|
# Avoid caching the host build as it differs between arches
|
|
|
|
# and is quite fast here anyway:
|
|
|
|
rm -Rf $TERMUX_PKG_HOSTBUILD_DIR
|
|
|
|
}
|
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_host_build() {
|
2017-11-18 22:20:30 +01:00
|
|
|
local M32=""
|
2017-11-18 22:18:05 +01:00
|
|
|
if [ $TERMUX_ARCH_BITS = "32" ]; then
|
2017-11-18 22:20:30 +01:00
|
|
|
M32="-m32"
|
2017-11-18 22:18:05 +01:00
|
|
|
fi
|
2016-09-14 23:12:09 +02:00
|
|
|
cp -Rf $TERMUX_PKG_SRCDIR/* .
|
2016-08-24 01:12:27 +02:00
|
|
|
cd build/unix
|
2017-11-18 22:18:05 +01:00
|
|
|
CC="gcc $M32" make pfdicdat.h
|
|
|
|
CC="gcc $M32" make all
|
2016-08-24 01:12:27 +02:00
|
|
|
}
|
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_pre_configure() {
|
2016-08-24 01:12:27 +02:00
|
|
|
for file in pfdicdat.h pforth; do
|
|
|
|
cp $TERMUX_PKG_HOSTBUILD_DIR/build/unix/$file $TERMUX_PKG_SRCDIR/build/unix/$file
|
2017-04-18 08:19:48 +02:00
|
|
|
touch -d "next hour" $TERMUX_PKG_SRCDIR/build/unix/$file
|
2016-08-24 01:12:27 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
export TERMUX_PKG_BUILDDIR=$TERMUX_PKG_SRCDIR/build/unix
|
2019-03-11 00:23:39 +01:00
|
|
|
export CC="$CC $CFLAGS $LDFLAGS"
|
2016-08-24 01:12:27 +02:00
|
|
|
}
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_make_install() {
|
2016-08-24 01:12:27 +02:00
|
|
|
cp $TERMUX_PKG_BUILDDIR/pforth_standalone $TERMUX_PREFIX/bin/pforth
|
|
|
|
}
|