summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
4 files changed, 35 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