aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2007-04-19 18:48:07 +0800
committermiwi <miwi@FreeBSD.org>2007-04-19 18:48:07 +0800
commitf8b7842df1e46d7bc1232ab04727a18544d56436 (patch)
tree5d0bacaa06dc03717c7d2483380b714c43541074 /math
parent0f4979caeb8cbf3fd892367bc6fbecc594b830b4 (diff)
downloadfreebsd-ports-graphics-f8b7842df1e46d7bc1232ab04727a18544d56436.tar.gz
freebsd-ports-graphics-f8b7842df1e46d7bc1232ab04727a18544d56436.tar.zst
freebsd-ports-graphics-f8b7842df1e46d7bc1232ab04727a18544d56436.zip
moo is a simple calculator that accepts C-like syntax as input.
Calculations are done on expr, if given. Otherwise, the standard input is used. Numbers can be entered in hexadecimal (0xbeef), decimal (1984), octal (007), and binary (0b1001). All numerical operators (+, -, *, /, %), bit operators (|, ^, &, ~, <<, >>), and logical operators (==, !=, <, >, <=, >=, !, &&, ||) are supported. WWW: http://cyth.net/~ray/moo/ PR: ports/111824 Submitted by: Steven Kreuzer <skreuzer at f2o.org>
Diffstat (limited to 'math')
-rw-r--r--math/Makefile1
-rw-r--r--math/moo/Makefile24
-rw-r--r--math/moo/distinfo3
-rw-r--r--math/moo/files/patch-Makefile18
-rw-r--r--math/moo/files/patch-moo.y11
-rw-r--r--math/moo/pkg-descr9
6 files changed, 66 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index e2ab6bf294e..0c148307d9b 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -145,6 +145,7 @@
SUBDIR += metis
SUBDIR += metis-edf
SUBDIR += miracl
+ SUBDIR += moo
SUBDIR += mpexpr
SUBDIR += mpfr
SUBDIR += mprime
diff --git a/math/moo/Makefile b/math/moo/Makefile
new file mode 100644
index 00000000000..17e0a3958f2
--- /dev/null
+++ b/math/moo/Makefile
@@ -0,0 +1,24 @@
+# New ports collection makefile for: moo
+# Date created: 05 Apr 2007
+# Whom: Steven Kreuzer <skreuzer@f2o.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= moo
+PORTVERSION= 1.3
+CATEGORIES= math
+MASTER_SITES= http://cyth.net/~ray/moo/
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= skreuzer@f2o.org
+COMMENT= Calculator that accepts C-like syntax as input
+
+PLIST_FILES= bin/moo
+MAN1= moo.1
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/moo ${PREFIX}/bin/
+ ${INSTALL_MAN} ${WRKSRC}/moo.1 ${MANPREFIX}/man/man1
+
+.include <bsd.port.mk>
diff --git a/math/moo/distinfo b/math/moo/distinfo
new file mode 100644
index 00000000000..25e0eaeb260
--- /dev/null
+++ b/math/moo/distinfo
@@ -0,0 +1,3 @@
+MD5 (moo-1.3.tgz) = ab3cc3d9877f372986f3c0f94a934944
+SHA256 (moo-1.3.tgz) = 32d567dc74ac0123034009d570d3809f35d12a13978fb409153520448b40d45f
+SIZE (moo-1.3.tgz) = 7380
diff --git a/math/moo/files/patch-Makefile b/math/moo/files/patch-Makefile
new file mode 100644
index 00000000000..c11fb19931f
--- /dev/null
+++ b/math/moo/files/patch-Makefile
@@ -0,0 +1,18 @@
+--- Makefile.orig Thu Apr 5 14:13:26 2007
++++ Makefile Thu Apr 5 14:14:06 2007
+@@ -3,14 +3,11 @@
+ PROG= moo
+ SRCS= moo.c scan.c
+ CPPFLAGS+= -I${.CURDIR}
+-COPTS+= -Wall -W -Wno-unused -Wshadow -pedantic
++COPTS+= -Wall -W -Wno-unused -Wshadow
+ CLEANFILES+= moo.c y.tab.h scan.c lex.yy.c
+
+ LOCALBASE?=/usr/local
+ BINDIR=${LOCALBASE}/bin
+ MANDIR=${LOCALBASE}/man/cat
+-
+-regress::
+- cd ${.CURDIR}/regress && ${MAKE} MOO=${.OBJDIR}/moo
+
+ .include <bsd.prog.mk>
diff --git a/math/moo/files/patch-moo.y b/math/moo/files/patch-moo.y
new file mode 100644
index 00000000000..14776a3a666
--- /dev/null
+++ b/math/moo/files/patch-moo.y
@@ -0,0 +1,11 @@
+--- moo.y.orig Thu Apr 5 14:14:22 2007
++++ moo.y Thu Apr 5 14:14:29 2007
+@@ -37,7 +37,7 @@
+
+ static void divbyzero(void);
+ static void printnum(int64_t);
+-__dead static void usage(void);
++__dead2 static void usage(void);
+ void yyerror(char *);
+ int yylex(void);
+ int yyparse(void);
diff --git a/math/moo/pkg-descr b/math/moo/pkg-descr
new file mode 100644
index 00000000000..2730c0912a0
--- /dev/null
+++ b/math/moo/pkg-descr
@@ -0,0 +1,9 @@
+moo is a simple calculator that accepts C-like syntax as input.
+Calculations are done on expr, if given. Otherwise, the standard input is used.
+
+Numbers can be entered in hexadecimal (0xbeef), decimal (1984), octal (007),
+and binary (0b1001). All numerical operators (+, -, *, /, %), bit operators
+(|, ^, &, ~, <<, >>), and logical operators (==, !=, <, >, <=, >=, !, &&, ||)
+are supported.
+
+WWW: http://cyth.net/~ray/moo/