aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2023-12-30 02:14:59 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2023-12-30 03:44:45 +0000
commit4c859788ed8a181ff7c05bb01a014dfb173d238b (patch)
tree914545729e316b30710d270cb620f33c71a03976
parentadd1ba90ee227cc89621574424f4f03964320f37 (diff)
downloadports-4c859788ed8a181ff7c05bb01a014dfb173d238b.tar.gz
ports-4c859788ed8a181ff7c05bb01a014dfb173d238b.zip
math/tinyexpr: New port: Tiny expression parser/compiler/evaluation engine for math expressions
-rw-r--r--math/Makefile1
-rw-r--r--math/tinyexpr/Makefile28
-rw-r--r--math/tinyexpr/distinfo3
-rw-r--r--math/tinyexpr/pkg-descr2
4 files changed, 34 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 744598647931..51bf24e648f2 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -1201,6 +1201,7 @@
SUBDIR += the-algorithms-c++
SUBDIR += timbl
SUBDIR += tiny-bignum-c
+ SUBDIR += tinyexpr
SUBDIR += tinymt
SUBDIR += tlapack
SUBDIR += tmv
diff --git a/math/tinyexpr/Makefile b/math/tinyexpr/Makefile
new file mode 100644
index 000000000000..25f9ba86e7a8
--- /dev/null
+++ b/math/tinyexpr/Makefile
@@ -0,0 +1,28 @@
+PORTNAME= tinyexpr
+DISTVERSION= g20221120
+CATEGORIES= math
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Tiny expression parser/compiler/evaluation engine for math expressions
+WWW= https://codeplea.com/tinyexpr
+
+LICENSE= MIT
+
+USE_LDCONFIG= yes
+
+USE_GITHUB= yes
+GH_ACCOUNT= codeplea
+GH_TAGNAME= 74804b8
+
+PLIST_FILES= include/${PORTNAME}.h \
+ lib/lib${PORTNAME}.so
+
+do-build:
+ @cd ${WRKSRC} && \
+ ${CC} ${CFLAGS} -fPIC ${LDFLAGS} -Wl,-soname,lib${PORTNAME}.so -shared -lm -o lib${PORTNAME}.so ${PORTNAME}.c
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.h ${STAGEDIR}${PREFIX}/include
+ ${INSTALL_LIB} ${WRKSRC}/lib${PORTNAME}.so ${STAGEDIR}${PREFIX}/lib
+
+.include <bsd.port.mk>
diff --git a/math/tinyexpr/distinfo b/math/tinyexpr/distinfo
new file mode 100644
index 000000000000..d96ad9f62d10
--- /dev/null
+++ b/math/tinyexpr/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1703899688
+SHA256 (codeplea-tinyexpr-g20221120-74804b8_GH0.tar.gz) = dbf1da2ac35fd71f381e5fbdd2d20955fd77e452138c55b6961412e8a18f0f09
+SIZE (codeplea-tinyexpr-g20221120-74804b8_GH0.tar.gz) = 38145
diff --git a/math/tinyexpr/pkg-descr b/math/tinyexpr/pkg-descr
new file mode 100644
index 000000000000..652861d3eae3
--- /dev/null
+++ b/math/tinyexpr/pkg-descr
@@ -0,0 +1,2 @@
+TinyExpr is a very small parser and evaluation library for evaluating math
+expressions from C. It's open-source, free, and is extremely easy to use.