aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiva Mahadevan <me@svmhdvn.name>2025-04-22 06:36:14 +0000
committerWen Heping <wen@FreeBSD.org>2025-04-22 06:38:49 +0000
commit3c6713efe52c1fef3dbcae1044b4f1b7369f7700 (patch)
treea8a6062164f0ae49658a9ae6b9eb5b06d8ed436e
parenta9de83cc04ac2f11ea000fa7922e79ba7244916b (diff)
lang/trealla-prolog: New port
A compact, efficient Prolog interpreter with ISO Prolog aspirations. MIT licensed Integers & Rationals are unbounded Atoms are UTF-8 of unlimited length The default double-quoted representation is *chars* list Strings & slices are super-efficient (especially with mmap'd files) REPL with history Runs on Linux, Android, FreeBSD, macOS, and WebAssembly (WASI) & Go API for calling from C (or by using WASM from Go & JS) Foreign function interface (FFI) for calling out to user code Access SQLITE databases using builtin module (uses FFI) Concurrency via tasks / linda / futures / engines (generators) Pre-emptive multi-threading Blackboarding primitives ... FFIs for GNU Scientific Library (GSL), SQLite, Raylib Delimited continuations ##EXPERIMENTAL## Rational trees ##EXPERIMENTAL## CLP(Z) ##EXPERIMENTAL## PR: 286272 Reported by: Siva Mahadevan <me@svmhdvn.name>
-rw-r--r--lang/Makefile1
-rw-r--r--lang/trealla-prolog/Makefile46
-rw-r--r--lang/trealla-prolog/distinfo3
-rw-r--r--lang/trealla-prolog/pkg-descr20
4 files changed, 70 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile
index b8624503e1ed..b47244907bdd 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -384,6 +384,7 @@
SUBDIR += tclX
SUBDIR += tolua
SUBDIR += tolua++
+ SUBDIR += trealla-prolog
SUBDIR += tuareg-mode.el
SUBDIR += typstfmt
SUBDIR += typstyle
diff --git a/lang/trealla-prolog/Makefile b/lang/trealla-prolog/Makefile
new file mode 100644
index 000000000000..e15215286902
--- /dev/null
+++ b/lang/trealla-prolog/Makefile
@@ -0,0 +1,46 @@
+PORTNAME= trealla-prolog
+DISTVERSIONPREFIX= v
+DISTVERSION= 2.68.20
+CATEGORIES= lang
+
+MAINTAINER= me@svmhdvn.name
+COMMENT= Compact, efficient Prolog interpreter written in plain-old C
+WWW= https://github.com/trealla-prolog/trealla/
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= gmake
+
+BUILD_DEPENDS= xxd:sysutils/xxd
+
+PLIST_FILES= bin/tpl
+
+TEST_TARGET= test
+
+OPTIONS_DEFINE= FFI READLINE SSL THREADS
+OPTIONS_DEFAULT= FFI READLINE SSL THREADS
+
+FFI_DESC= FFI support
+READLINE_DESC= GNU readline support
+SSL_DESC= SSL support
+THREADS_DESC= Preemptive multithreading support
+
+FFI_LIB_DEPENDS= libffi.so:devel/libffi
+FFI_MAKE_ARGS_OFF= NOFFI=1
+
+READLINE_USES= readline
+READLINE_MAKE_ARGS_OFF= ISOCLINE=1
+
+SSL_USES= ssl
+SSL_MAKE_ARGS_OFF= NOSSL=1
+
+THREADS_MAKE_ARGS_OFF= NOTHREADS=1
+
+USE_GITHUB= yes
+GH_PROJECT= trealla
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/tpl ${STAGEDIR}${PREFIX}/bin/
+
+.include <bsd.port.mk>
diff --git a/lang/trealla-prolog/distinfo b/lang/trealla-prolog/distinfo
new file mode 100644
index 000000000000..fe35666e5665
--- /dev/null
+++ b/lang/trealla-prolog/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1745272025
+SHA256 (trealla-prolog-trealla-v2.68.20_GH0.tar.gz) = 2fb4d08e02e75622c78e8f4a5edf5d7a76856b6f3e4c87db37c1b0c040db944a
+SIZE (trealla-prolog-trealla-v2.68.20_GH0.tar.gz) = 610669
diff --git a/lang/trealla-prolog/pkg-descr b/lang/trealla-prolog/pkg-descr
new file mode 100644
index 000000000000..5552f8e154ae
--- /dev/null
+++ b/lang/trealla-prolog/pkg-descr
@@ -0,0 +1,20 @@
+A compact, efficient Prolog interpreter with ISO Prolog aspirations.
+
+MIT licensed
+Integers & Rationals are unbounded
+Atoms are UTF-8 of unlimited length
+The default double-quoted representation is *chars* list
+Strings & slices are super-efficient (especially with mmap'd files)
+REPL with history
+Runs on Linux, Android, FreeBSD, macOS, and WebAssembly (WASI) & Go
+API for calling from C (or by using WASM from Go & JS)
+Foreign function interface (FFI) for calling out to user code
+Access SQLITE databases using builtin module (uses FFI)
+Concurrency via tasks / linda / futures / engines (generators)
+Pre-emptive multi-threading
+Blackboarding primitives
+...
+FFIs for GNU Scientific Library (GSL), SQLite, Raylib
+Delimited continuations ##EXPERIMENTAL##
+Rational trees ##EXPERIMENTAL##
+CLP(Z) ##EXPERIMENTAL##