From 95094606112ebb3f0313e5eecc28e293bba3d6bc Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Thu, 19 Apr 2007 10:48:07 +0000 Subject: 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 --- math/moo/Makefile | 24 ++++++++++++++++++++++++ math/moo/distinfo | 3 +++ math/moo/files/patch-Makefile | 18 ++++++++++++++++++ math/moo/files/patch-moo.y | 11 +++++++++++ math/moo/pkg-descr | 9 +++++++++ 5 files changed, 65 insertions(+) create mode 100644 math/moo/Makefile create mode 100644 math/moo/distinfo create mode 100644 math/moo/files/patch-Makefile create mode 100644 math/moo/files/patch-moo.y create mode 100644 math/moo/pkg-descr (limited to 'math/moo') diff --git a/math/moo/Makefile b/math/moo/Makefile new file mode 100644 index 000000000000..17e0a3958f29 --- /dev/null +++ b/math/moo/Makefile @@ -0,0 +1,24 @@ +# New ports collection makefile for: moo +# Date created: 05 Apr 2007 +# Whom: Steven Kreuzer +# +# $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 diff --git a/math/moo/distinfo b/math/moo/distinfo new file mode 100644 index 000000000000..25e0eaeb260b --- /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 000000000000..c11fb19931f8 --- /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 diff --git a/math/moo/files/patch-moo.y b/math/moo/files/patch-moo.y new file mode 100644 index 000000000000..14776a3a6668 --- /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 000000000000..2730c0912a07 --- /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/ -- cgit v1.2.3