aboutsummaryrefslogtreecommitdiff
path: root/math/bcal
diff options
context:
space:
mode:
authorMateusz Piotrowski <0mp@FreeBSD.org>2022-01-23 16:11:50 +0000
committerMateusz Piotrowski <0mp@FreeBSD.org>2022-01-23 16:11:50 +0000
commitf59e54edb48ec386b0051b7d9bcd75c392e78a17 (patch)
tree4d495cb7400d6c9bb61c02aa03720c8e634cc780 /math/bcal
parent05663d559cb8a942baf883ab5972db5f0605632c (diff)
downloadports-f59e54edb48ec386b0051b7d9bcd75c392e78a17.tar.gz
ports-f59e54edb48ec386b0051b7d9bcd75c392e78a17.zip
math/bcal: Add a missing patch and depend on math/calc
These changes should be a part of the previous commit.
Diffstat (limited to 'math/bcal')
-rw-r--r--math/bcal/Makefile4
-rw-r--r--math/bcal/files/patch-src_bcal.c11
2 files changed, 14 insertions, 1 deletions
diff --git a/math/bcal/Makefile b/math/bcal/Makefile
index 3c60559bfbb6..9bc8f9e181e3 100644
--- a/math/bcal/Makefile
+++ b/math/bcal/Makefile
@@ -1,6 +1,7 @@
PORTNAME= bcal
DISTVERSIONPREFIX= v
DISTVERSION= 2.3
+PORTREVISION= 1
CATEGORIES= math
MAINTAINER= 0mp@FreeBSD.org
@@ -14,7 +15,8 @@ ONLY_FOR_ARCHS= amd64 powerpc64 powerpc64le
# GNU bc must be used because bcal depends on some behaviors
# specific to GNU bc. Run the test suite with the bc from the
# base to see that some tests fail.
-RUN_DEPENDS= ${LOCALBASE}/bin/bc:math/gnubc
+RUN_DEPENDS= ${LOCALBASE}/bin/bc:math/gnubc \
+ calc:math/calc
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR}
USES= gmake python:test,3.5+ readline
diff --git a/math/bcal/files/patch-src_bcal.c b/math/bcal/files/patch-src_bcal.c
new file mode 100644
index 000000000000..4805695cb1db
--- /dev/null
+++ b/math/bcal/files/patch-src_bcal.c
@@ -0,0 +1,11 @@
+--- src/bcal.c.orig 2022-01-23 15:55:59 UTC
++++ src/bcal.c
+@@ -179,7 +179,7 @@ static int try_bc(char *expr)
+ int pipe_pc[2], pipe_cp[2];
+ size_t len;
+ ssize_t ret;
+- char *ptr = cfg.calc ? "calc" : "bc";
++ char *ptr = cfg.calc ? "calc" : "%%BC_CMD%%";
+
+ if (!expr) {
+ if (curexpr)