2018-11-16 07:30:35 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://swi-prolog.org/
|
|
|
|
TERMUX_PKG_DESCRIPTION="Most popular and complete prolog implementation"
|
2019-01-31 13:22:08 +01:00
|
|
|
TERMUX_PKG_LICENSE="ISC"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2020-07-02 23:27:30 +02:00
|
|
|
# Use "development" versions.
|
2021-07-17 23:29:29 +02:00
|
|
|
TERMUX_PKG_VERSION=8.3.26
|
2020-07-02 23:27:30 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://www.swi-prolog.org/download/devel/src/swipl-${TERMUX_PKG_VERSION}.tar.gz
|
2021-07-17 23:29:29 +02:00
|
|
|
TERMUX_PKG_SHA256=41d554d23137d2bedddf366ac43e0293068fd07f359f0e0546e771edb7a10962
|
2019-04-14 14:51:46 +02:00
|
|
|
TERMUX_PKG_DEPENDS="libarchive, libcrypt, libgmp, libjpeg-turbo, libyaml, ncurses, ncurses-ui-libs, pcre, readline, ossp-uuid, zlib"
|
2019-01-31 13:22:08 +01:00
|
|
|
TERMUX_PKG_FORCE_CMAKE=true
|
|
|
|
TERMUX_PKG_HOSTBUILD=true
|
2018-11-16 07:30:35 +01:00
|
|
|
|
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
2019-09-23 17:19:58 +02:00
|
|
|
-DINSTALL_DOCUMENTATION=OFF
|
2018-11-16 07:30:35 +01:00
|
|
|
-DUSE_GMP=ON
|
|
|
|
-DSWIPL_NATIVE_FRIEND=${TERMUX_PKG_HOSTBUILD_DIR}
|
|
|
|
-DPOSIX_SHELL=${TERMUX_PREFIX}/bin/sh
|
2019-01-31 13:22:08 +01:00
|
|
|
-DSWIPL_TMP_DIR=${TERMUX_PREFIX}/tmp
|
2018-11-16 07:30:35 +01:00
|
|
|
-DSWIPL_INSTALL_IN_LIB=ON
|
|
|
|
-DSWIPL_PACKAGES_BDB=OFF
|
|
|
|
-DSWIPL_PACKAGES_ODBC=OFF
|
|
|
|
-DSWIPL_PACKAGES_QT=OFF
|
|
|
|
-DSWIPL_PACKAGES_X=OFF
|
2020-04-19 00:48:17 +02:00
|
|
|
-DINSTALL_TESTS=OFF
|
|
|
|
-DBUILD_TESTING=OFF
|
2018-11-16 07:30:35 +01:00
|
|
|
-DSYSTEM_CACERT_FILENAME=${TERMUX_PREFIX}/etc/tls/cert.pem"
|
|
|
|
|
|
|
|
# We do this to produce:
|
|
|
|
# a native host build to produce
|
|
|
|
# boot<nn>.prc, INDEX.pl, ssl cetificate tests,
|
2019-01-31 13:22:08 +01:00
|
|
|
# SWIPL_NATIVE_FRIEND tells SWI-Prolog to use
|
2018-11-16 07:30:35 +01:00
|
|
|
# this build for the artifacts needed to build the
|
|
|
|
# Android version
|
2019-01-31 13:22:08 +01:00
|
|
|
termux_step_host_build() {
|
2018-11-16 07:30:35 +01:00
|
|
|
termux_setup_cmake
|
2019-01-31 13:22:08 +01:00
|
|
|
termux_setup_ninja
|
2018-11-16 07:30:35 +01:00
|
|
|
|
|
|
|
if [ $TERMUX_ARCH_BITS = 32 ]; then
|
2019-01-31 13:22:08 +01:00
|
|
|
export LDFLAGS=-m32
|
|
|
|
export CFLAGS=-m32
|
|
|
|
export CXXFLAGS=-m32
|
|
|
|
CMAKE_EXTRA_DEFS="-DCMAKE_LIBRARY_PATH=/usr/lib/i386-linux-gnu"
|
2018-11-16 07:30:35 +01:00
|
|
|
else
|
2019-01-31 13:22:08 +01:00
|
|
|
CMAKE_EXTRA_DEFS=""
|
2018-11-16 07:30:35 +01:00
|
|
|
fi
|
|
|
|
|
2019-01-31 13:22:08 +01:00
|
|
|
cmake "$TERMUX_PKG_SRCDIR" \
|
|
|
|
-G "Ninja" \
|
|
|
|
$CMAKE_EXTRA_DEFS \
|
|
|
|
-DINSTALL_DOCUMENTATION=OFF \
|
|
|
|
-DSWIPL_PACKAGES=ON \
|
|
|
|
-DUSE_GMP=OFF \
|
|
|
|
-DBUILD_TESTING=ON \
|
2019-01-31 15:04:57 +01:00
|
|
|
-DSWIPL_SHARED_LIB=OFF \
|
|
|
|
-DSWIPL_PACKAGES_BDB=OFF \
|
|
|
|
-DSWIPL_PACKAGES_ODBC=OFF \
|
|
|
|
-DSWIPL_PACKAGES_QT=OFF \
|
|
|
|
-DSWIPL_PACKAGES_X=OFF
|
2018-11-16 07:30:35 +01:00
|
|
|
ninja
|
|
|
|
|
|
|
|
unset LDFLAGS
|
|
|
|
unset CFLAGS
|
|
|
|
unset CXXFLAGS
|
|
|
|
}
|
|
|
|
|
2019-01-31 13:22:08 +01:00
|
|
|
termux_step_post_make_install() {
|
2018-11-16 07:30:35 +01:00
|
|
|
# Remove host build because future builds may be
|
|
|
|
# of a different word size (e.g. 32bit or 64bit)
|
|
|
|
rm -rf "$TERMUX_PKG_HOSTBUILD_DIR"
|
|
|
|
}
|