summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
Diffstat (limited to 'math')
-rw-r--r--math/calc/Makefile32
-rw-r--r--math/calc/distinfo6
-rw-r--r--math/calc/pkg-descr6
-rw-r--r--math/calc/pkg-plist2
-rw-r--r--math/octave-forge-llms/Makefile1
-rw-r--r--math/octave-forge-llms/files/patch-Makefile9
-rw-r--r--math/octave-forge-llms/files/patch-fpng.cpp39
7 files changed, 84 insertions, 11 deletions
diff --git a/math/calc/Makefile b/math/calc/Makefile
index 4a631e2f1db2..1511cc4d38c3 100644
--- a/math/calc/Makefile
+++ b/math/calc/Makefile
@@ -1,5 +1,5 @@
PORTNAME= calc
-PORTVERSION= 2.16.0.0
+PORTVERSION= 2.16.0.2
DISTVERSIONPREFIX= v
CATEGORIES= math
@@ -10,25 +10,35 @@ WWW= https://github.com/lcn2/calc
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/COPYING-LGPL
+FLAVORS= default tiny
+
USES= gmake tar:bzip2 readline
USE_GITHUB= yes
GH_ACCOUNT= lcn2
-CONFLICTS_INSTALL= schilyutils # bin/calc
-
-MAKE_JOBS_UNSAFE= yes
-PLIST_SUB+= VERSION=${PORTVERSION} VERSION_R=${PORTVERSION:R}
-
MAKE_ARGS= DATADIR="${DATADIR}"
+MAKE_JOBS_UNSAFE= yes
TEST_TARGET= check
+CONFLICTS_INSTALL= calc calc-tiny schilyutils
+PLIST_SUB+= VERSION=${PORTVERSION} VERSION_R=${PORTVERSION:R}
+
OPTIONS_DEFINE= FULL HELP
OPTIONS_DEFAULT=FULL HELP
OPTIONS_SUB= yes
FULL_DESC= Install all funcs/scripts/headers (OFF: just basic calculator)
HELP_DESC= Install calc help files
-# We use Makefile.freebsd because Makefile.local is in .gitignore
+.if ${FLAVOR:U} == tiny
+OPTIONS_EXCLUDE=FULL HELP
+PKGNAMESUFFIX= -tiny
+MAKE_ENV+= BLD_TYPE=calc-static-only
+PLIST_FILES= bin/calc
+PLIST= # Use only PLIST_FILES
+.endif
+
+.include <bsd.port.pre.mk>
+# We use Makefile.freebsd because Makefile.local is in our .gitignore
post-extract:
${SED} -e 's|%%CC%%|${CC}|; s|%%CFLAGS%%|${CFLAGS}|; s|%%SH%%|${SH}|' \
${FILESDIR}/Makefile.freebsd > ${WRKSRC}/Makefile.local
@@ -37,7 +47,13 @@ post-extract:
${FIND} ${WRKSRC} -name 'Makefile*' \
| ${XARGS} ${REINPLACE_CMD} -i '' -E -e '/SHELL:?=/s|bash|${SH}|'
+.if ${FLAVOR:U} == default
post-install:
cd ${STAGEDIR}${PREFIX} && ${STRIP_CMD} bin/calc lib/lib*.so
-.include <bsd.port.mk>
+.else
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/calc ${STAGEDIR}${PREFIX}/bin
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/math/calc/distinfo b/math/calc/distinfo
index fdf4d15dcc89..df10f00aa517 100644
--- a/math/calc/distinfo
+++ b/math/calc/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1755224365
-SHA256 (lcn2-calc-v2.16.0.0_GH0.tar.gz) = 096acf2162afa0eee50ac818a5e70399e3a3299eb9e4b088e455dedc023cae23
-SIZE (lcn2-calc-v2.16.0.0_GH0.tar.gz) = 1309374
+TIMESTAMP = 1766411172
+SHA256 (lcn2-calc-v2.16.0.2_GH0.tar.gz) = 2beedbf40eedea431b765b37e39e1a7e2aa35bfde4136694800e4149074b1b53
+SIZE (lcn2-calc-v2.16.0.2_GH0.tar.gz) = 1324642
diff --git a/math/calc/pkg-descr b/math/calc/pkg-descr
index bb60c95a3e54..929f2ca92eb5 100644
--- a/math/calc/pkg-descr
+++ b/math/calc/pkg-descr
@@ -6,3 +6,9 @@ Otherwise, it enters interactive mode. There are a great number
of pre-defined functions. The calculator can calculate transcendental
functions, and accept and display numbers in real or exponential format.
The calculator also knows about complex numbers.
+
+There is a "tiny" flavor (pkg install calc-tiny) that excludes both
+the help files and loadable modules. It provides a basic calculator
+(still with MANY built-in functions) in under 20K (on amb64). Note
+that the tiny flavor installs a static executable only, so libcalc.so
+is not available (as of the time of writing, no other ports use it).
diff --git a/math/calc/pkg-plist b/math/calc/pkg-plist
index 5d858521bb4c..6bca8e7e75ed 100644
--- a/math/calc/pkg-plist
+++ b/math/calc/pkg-plist
@@ -64,12 +64,14 @@ lib/libcustcalc.so.%%VERSION%%
%%HELP%%%%DATADIR%%/custhelp/argv
%%HELP%%%%DATADIR%%/custhelp/devnull
%%HELP%%%%DATADIR%%/custhelp/help
+%%HELP%%%%DATADIR%%/custhelp/pfe
%%HELP%%%%DATADIR%%/custhelp/pmodm127
%%HELP%%%%DATADIR%%/custhelp/pzasusb8
%%HELP%%%%DATADIR%%/custhelp/register
%%HELP%%%%DATADIR%%/custhelp/sysinfo
%%FULL%%%%DATADIR%%/custom/argv.cal
%%FULL%%%%DATADIR%%/custom/halflen.cal
+%%FULL%%%%DATADIR%%/custom/pfe.cal
%%FULL%%%%DATADIR%%/custom/pmodm127.cal
%%FULL%%%%DATADIR%%/custom/pzasusb8.cal
%%FULL%%%%DATADIR%%/custom/register.cal
diff --git a/math/octave-forge-llms/Makefile b/math/octave-forge-llms/Makefile
index 21c9fc32b8f4..0fac261aa88f 100644
--- a/math/octave-forge-llms/Makefile
+++ b/math/octave-forge-llms/Makefile
@@ -1,6 +1,7 @@
PORTNAME= octave-forge-llms
DISTVERSIONPREFIX= release-
DISTVERSION= 0.1.2
+PORTREVISION= 1
CATEGORIES= math
MAINTAINER= stephen@FreeBSD.org
diff --git a/math/octave-forge-llms/files/patch-Makefile b/math/octave-forge-llms/files/patch-Makefile
new file mode 100644
index 000000000000..1273332beb4e
--- /dev/null
+++ b/math/octave-forge-llms/files/patch-Makefile
@@ -0,0 +1,9 @@
+--- Makefile.orig 2025-12-22 13:05:16 UTC
++++ Makefile
+@@ -1,5 +1,5 @@ all:
+ # Makefile for compiling required oct files
+
+ all:
+- $(MKOCTFILE) -march=native -O2 fig2base64.cc fpng.cpp
++ $(MKOCTFILE) -O2 fig2base64.cc fpng.cpp
+ $(MKOCTFILE) __ollama__.cc
diff --git a/math/octave-forge-llms/files/patch-fpng.cpp b/math/octave-forge-llms/files/patch-fpng.cpp
new file mode 100644
index 000000000000..e157e463c4cb
--- /dev/null
+++ b/math/octave-forge-llms/files/patch-fpng.cpp
@@ -0,0 +1,39 @@
+--- fpng.cpp.orig 2025-12-22 13:08:02 UTC
++++ fpng.cpp
+@@ -79,13 +79,13 @@
+ #endif
+
+ // Assume little endian on Windows/x86/x64.
+- #define __BYTE_ORDER __LITTLE_ENDIAN
++ #define __BYTE_ORDER__ __LITTLE_ENDIAN
+ #elif defined(__APPLE__)
+- #define __BYTE_ORDER __BYTE_ORDER__
++ #define __BYTE_ORDER__ __BYTE_ORDER__
+ #define __LITTLE_ENDIAN __LITTLE_ENDIAN__
+ #define __BIG_ENDIAN __BIG_ENDIAN__
+ #else
+- // for __BYTE_ORDER (__LITTLE_ENDIAN or __BIG_ENDIAN)
++ // for __BYTE_ORDER__ (__LITTLE_ENDIAN or __BIG_ENDIAN)
+ #include <sys/param.h>
+
+ #ifndef __LITTLE_ENDIAN
+@@ -96,8 +96,8 @@
+ #endif
+ #endif
+
+-#if !defined(__BYTE_ORDER)
+- #error __BYTE_ORDER undefined. Compile with -D__BYTE_ORDER=1234 for little endian or -D__BYTE_ORDER=4321 for big endian.
++#if !defined(__BYTE_ORDER__)
++ #error __BYTE_ORDER__ undefined. Compile with -D__BYTE_ORDER=1234 for little endian or -D__BYTE_ORDER=4321 for big endian.
+ #endif
+
+ namespace fpng
+@@ -131,7 +131,7 @@ namespace fpng
+ }
+
+ #if FPNG_USE_UNALIGNED_LOADS
+- #if __BYTE_ORDER == __BIG_ENDIAN
++ #if __BYTE_ORDER__ == __BIG_ENDIAN
+ #define READ_LE32(p) swap32(*reinterpret_cast<const uint32_t *>(p))
+ #define WRITE_LE32(p, v) *reinterpret_cast<uint32_t *>(p) = swap32((uint32_t)(v))
+ #define WRITE_LE64(p, v) *reinterpret_cast<uint64_t *>(p) = swap64((uint64_t)(v))