2023-09-27 19:32:48 +00:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://www.softsynth.com/pforth/
|
2016-08-23 23:12:27 +00:00
|
|
|
TERMUX_PKG_DESCRIPTION="Portable Forth in C"
|
2019-01-21 14:00:12 +00:00
|
|
|
TERMUX_PKG_LICENSE="Public Domain"
|
2023-02-08 04:01:25 +00:00
|
|
|
TERMUX_PKG_LICENSE_FILE="license.txt"
|
2020-12-20 13:16:34 +00:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2023-02-08 04:01:25 +00:00
|
|
|
TERMUX_PKG_VERSION=1:2.0.1
|
|
|
|
TERMUX_PKG_SRCURL=https://github.com/philburk/pforth/archive/refs/tags/v${TERMUX_PKG_VERSION#*:}.tar.gz
|
|
|
|
TERMUX_PKG_SHA256=f4c417d7d1f2c187716263484bdc534d3224b6d159e049d00828a89fa5d6894d
|
2019-08-12 15:28:41 +00:00
|
|
|
TERMUX_PKG_HOSTBUILD=true
|
2022-02-04 16:26:20 +00:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
2016-08-23 23:12:27 +00:00
|
|
|
|
2022-02-04 16:26:20 +00:00
|
|
|
termux_step_host_build() {
|
|
|
|
termux_setup_cmake
|
|
|
|
|
|
|
|
cp -a $TERMUX_PKG_SRCDIR/* .
|
|
|
|
|
|
|
|
mkdir -p 32bit
|
|
|
|
# Add -Wno-shift-count-overflow to ignore:
|
|
|
|
# /home/builder/.termux-build/pforth/src/csrc/pf_save.c:223:34: error: right shift count >= width of type [-Werror=shift-count-overflow
|
|
|
|
# 223 | *addr++ = (uint8_t) (data>>56);
|
|
|
|
# | ^~
|
|
|
|
CC="gcc -m32" CFLAGS="-Wno-shift-count-overflow" cmake .
|
|
|
|
make
|
|
|
|
install -m700 fth/pforth 32bit/
|
|
|
|
install -m600 csrc/pfdicdat.h 32bit/
|
|
|
|
|
|
|
|
rm -rf CMakeCache.txt CMakeFiles
|
|
|
|
|
|
|
|
mkdir -p 64bit
|
|
|
|
cmake .
|
|
|
|
make
|
|
|
|
install -m700 fth/pforth 64bit/
|
|
|
|
install -m600 csrc/pfdicdat.h 64bit/
|
2017-11-18 21:22:50 +00:00
|
|
|
}
|
|
|
|
|
2022-02-04 16:26:20 +00:00
|
|
|
termux_step_post_configure() {
|
2017-11-18 21:18:05 +00:00
|
|
|
if [ $TERMUX_ARCH_BITS = "32" ]; then
|
2022-02-04 16:26:20 +00:00
|
|
|
local folder=32bit
|
|
|
|
else
|
|
|
|
local folder=64bit
|
2017-11-18 21:18:05 +00:00
|
|
|
fi
|
2022-02-04 16:26:20 +00:00
|
|
|
cp $TERMUX_PKG_HOSTBUILD_DIR/$folder/pforth fth/
|
|
|
|
cp $TERMUX_PKG_HOSTBUILD_DIR/$folder/pfdicdat.h csrc/
|
2016-08-23 23:12:27 +00:00
|
|
|
}
|
|
|
|
|
2019-02-08 09:37:29 +00:00
|
|
|
termux_step_make_install() {
|
2022-02-04 16:26:20 +00:00
|
|
|
install -m700 fth/pforth_standalone $TERMUX_PREFIX/bin/pforth
|
2016-08-23 23:12:27 +00:00
|
|
|
}
|