From d4274543ab83e104bc1bc47d1761770f5087622f Mon Sep 17 00:00:00 2001 From: provos Date: Thu, 11 Nov 1999 16:40:11 +0000 Subject: [PATCH] calc port, help by dugsong@, okay dugsong@, turan@ --- math/calc/Makefile | 13 ++ math/calc/files/md5 | 3 + math/calc/patches/patch-aa | 76 +++++++ math/calc/patches/patch-ab | 15 ++ math/calc/patches/patch-ac | 19 ++ math/calc/pkg/COMMENT | 1 + math/calc/pkg/DESCR | 13 ++ math/calc/pkg/PLIST | 435 +++++++++++++++++++++++++++++++++++++ 8 files changed, 575 insertions(+) create mode 100644 math/calc/Makefile create mode 100644 math/calc/files/md5 create mode 100644 math/calc/patches/patch-aa create mode 100644 math/calc/patches/patch-ab create mode 100644 math/calc/patches/patch-ac create mode 100644 math/calc/pkg/COMMENT create mode 100644 math/calc/pkg/DESCR create mode 100644 math/calc/pkg/PLIST diff --git a/math/calc/Makefile b/math/calc/Makefile new file mode 100644 index 00000000000..ead18acca59 --- /dev/null +++ b/math/calc/Makefile @@ -0,0 +1,13 @@ +# $OpenBSD: Makefile,v 1.1.1.1 1999/11/11 16:40:11 provos Exp $ +# + +DISTNAME= calc-2.11.0t9.4.1 +CATEGORIES= math +MASTER_SITES= ftp://ftp.uu.net/pub/calc/ \ + ftp://reality.sgi.com/users/chongo/src/calc/ + +MAINTAINER= provos@openbsd.org + +NO_CONFIGURE= yes + +.include diff --git a/math/calc/files/md5 b/math/calc/files/md5 new file mode 100644 index 00000000000..2449d38e6a7 --- /dev/null +++ b/math/calc/files/md5 @@ -0,0 +1,3 @@ +MD5 (calc-2.11.0t9.4.1.tar.gz) = 505bd47040d9d30f888aca869876e6d6 +RMD160 (calc-2.11.0t9.4.1.tar.gz) = 92bc14c9f1f0ba2ce2b9e4e5ff64619c852c4e9c +SHA1 (calc-2.11.0t9.4.1.tar.gz) = 0eb5150cec745cc159e88b447046999717bf86c4 diff --git a/math/calc/patches/patch-aa b/math/calc/patches/patch-aa new file mode 100644 index 00000000000..0eeb7f3b736 --- /dev/null +++ b/math/calc/patches/patch-aa @@ -0,0 +1,76 @@ +--- Makefile.orig Fri Nov 5 17:05:52 1999 ++++ Makefile Mon Nov 8 12:31:06 1999 +@@ -323,9 +323,12 @@ + #ERRNO_DECL= -DERRNO_STD_DECL + #ERRNO_DECL= -DERRNO_OLD_DECL + ++# Installation prefix ++PREFIX?= /usr/local ++ + # where to install binary files + # +-BINDIR= /usr/local/bin ++BINDIR= $(PREFIX)/bin + #BINDIR= /usr/bin + #BINDIR= /usr/contrib/bin + +@@ -339,14 +342,14 @@ + # ${CUSTOMLIBDIR} is where custom lib files are installed. + # ${CUSTOMHELPDIR} is where custom help files are installed. + # +-TOPDIR= /usr/local/lib ++TOPDIR= $(PREFIX)/lib + #TOPDIR= /usr/lib + #TOPDIR= /usr/libdata + #TOPDIR= /usr/contrib/lib + # + LIBDIR= ${TOPDIR}/calc + HELPDIR= ${LIBDIR}/help +-INCDIR= /usr/local/include ++INCDIR= $(PREFIX)/include + INCDIRCALC= ${INCDIR}/calc + CUSTOMLIBDIR= ${LIBDIR}/custom + CUSTOMHELPDIR= ${HELPDIR}/custhelp +@@ -355,8 +358,8 @@ + # + # Use MANDIR= to disable installation of the calc man (source) page. + # +-MANDIR= +-#MANDIR= /usr/local/man/man1 ++#MANDIR= ++MANDIR= $(PREFIX)/man/man1 + #MANDIR= /usr/man/man1 + #MANDIR= /usr/share/man/man1 + #MANDIR= /usr/man/u_man/man1 +@@ -453,10 +456,10 @@ + # + # If in doubt, set USE_READLINE, READLINE_LIB and READLINE_INCLUDE to nothing. + # +-USE_READLINE= +-#USE_READLINE= -DUSE_READLINE ++#USE_READLINE= ++USE_READLINE= -DUSE_READLINE + # +-READLINE_LIB= ++READLINE_LIB= -lreadline -lcurses + #READLINE_LIB= -L/usr/gnu/lib -lreadline -lhistory + #READLINE_LIB= -lreadline -lhistory + #READLINE_LIB= -L/usr/local/lib -lreadline -lhistory +@@ -482,7 +485,7 @@ + #DEBUG= -O1 -g3 + #DEBUG= -O2 + #DEBUG= -O2 -g +-DEBUG= -O2 -g3 ++#DEBUG= -O2 -g3 + #DEBUG= -O2 -ipa + #DEBUG= -O2 -g3 -ipa + #DEBUG= -O3 +@@ -656,7 +659,7 @@ + CCOPT= ${DEBUG} ${NO_SHARED} + CCMISC= + # +-CFLAGS= ${CCWARN} ${CCOPT} ${CCMISC} ++CFLAGS+= ${CCWARN} ${CCOPT} ${CCMISC} + ICFLAGS= ${CCWARN} ${CCMISC} + # + LCFLAGS= diff --git a/math/calc/patches/patch-ab b/math/calc/patches/patch-ab new file mode 100644 index 00000000000..b916fabc8d1 --- /dev/null +++ b/math/calc/patches/patch-ab @@ -0,0 +1,15 @@ +--- alloc.h.orig Mon Nov 8 12:11:28 1999 ++++ alloc.h Mon Nov 8 12:37:39 1999 +@@ -13,8 +13,11 @@ + #include "have_newstr.h" + #include "have_string.h" + #include "have_memmv.h" ++#include "have_stdlib.h" + +-#ifdef HAVE_MALLOC_H ++#ifdef HAVE_STDLIB_H ++# include ++#elif defined (HAVE_MALLOC_H) + # include + #else + #if defined(FORCE_STDC) || (defined(__STDC__) && __STDC__ != 0) || defined(__cplusplus) diff --git a/math/calc/patches/patch-ac b/math/calc/patches/patch-ac new file mode 100644 index 00000000000..0312c4f0347 --- /dev/null +++ b/math/calc/patches/patch-ac @@ -0,0 +1,19 @@ +--- hist.c.orig Mon Nov 8 12:23:18 1999 ++++ hist.c Mon Nov 8 12:40:16 1999 +@@ -1444,7 +1444,6 @@ + + + #include +-#include + + + /* +@@ -1506,7 +1505,7 @@ + using_history(); + + /* name of history file */ +- my_calc_history = tilde_expand("~/.calc_history"); ++ my_calc_history = (char *)tilde_expand("~/.calc_history"); + + /* read previous history */ + read_history(my_calc_history); diff --git a/math/calc/pkg/COMMENT b/math/calc/pkg/COMMENT new file mode 100644 index 00000000000..d335fc5fa02 --- /dev/null +++ b/math/calc/pkg/COMMENT @@ -0,0 +1 @@ +C-style arbitrary precision calculator diff --git a/math/calc/pkg/DESCR b/math/calc/pkg/DESCR new file mode 100644 index 00000000000..df7aaaa1f35 --- /dev/null +++ b/math/calc/pkg/DESCR @@ -0,0 +1,13 @@ +From the webpage: + +Calc is arbitrary precision arithmetic system that uses a C-like +language. Calc is useful as a calculator, an algorithm prototyped and +as a mathematical research tool. More importantly, calc provides one +with a machine independent means of computation. Calc comes with a +rich set of builtin mathematical and programmatic functions. A +partial list of calc builtin functions is available. + +The calc language is a C-like language. The language includes +commands such as variable declarations, expressions, tests, labels, +loops, file operations, function calls. These commands are very +similar to their counterparts in C. diff --git a/math/calc/pkg/PLIST b/math/calc/pkg/PLIST new file mode 100644 index 00000000000..0321610fd56 --- /dev/null +++ b/math/calc/pkg/PLIST @@ -0,0 +1,435 @@ +bin/calc +include/calc/align32.h +include/calc/alloc.h +include/calc/args.h +include/calc/blkcpy.h +include/calc/block.h +include/calc/byteswap.h +include/calc/calc.h +include/calc/calc_errno.h +include/calc/calcerr.h +include/calc/cmath.h +include/calc/conf.h +include/calc/config.h +include/calc/custom.h +include/calc/endian_calc.h +include/calc/file.h +include/calc/fposval.h +include/calc/func.h +include/calc/hash.h +include/calc/have_const.h +include/calc/have_fpos.h +include/calc/have_getpgid.h +include/calc/have_getprid.h +include/calc/have_getsid.h +include/calc/have_gettime.h +include/calc/have_malloc.h +include/calc/have_memmv.h +include/calc/have_newstr.h +include/calc/have_offscl.h +include/calc/have_posscl.h +include/calc/have_rusage.h +include/calc/have_stdlib.h +include/calc/have_string.h +include/calc/have_times.h +include/calc/have_uid_t.h +include/calc/have_unistd.h +include/calc/have_urandom.h +include/calc/have_ustat.h +include/calc/hist.h +include/calc/jump.h +include/calc/label.h +include/calc/lib_util.h +include/calc/longbits.h +include/calc/longlong.h +include/calc/math_error.h +include/calc/md5.h +include/calc/nametype.h +include/calc/opcodes.h +include/calc/prime.h +include/calc/qmath.h +include/calc/shs.h +include/calc/shs1.h +include/calc/string.h +include/calc/symbol.h +include/calc/terminal.h +include/calc/token.h +include/calc/value.h +include/calc/zmath.h +include/calc/zrand.h +include/calc/zrandom.h +lib/calc/README +lib/calc/altbind +lib/calc/beer.cal +lib/calc/bernoulli.cal +lib/calc/bigprime.cal +lib/calc/bindings +lib/calc/chrem.cal +lib/calc/custom/argv.cal +lib/calc/custom/halflen.cal +lib/calc/custom/libcustcalc.a +lib/calc/custom/pzasusb8.cal +lib/calc/deg.cal +lib/calc/ellip.cal +lib/calc/hello.cal +lib/calc/help/abs +lib/calc/help/access +lib/calc/help/acos +lib/calc/help/acosh +lib/calc/help/acot +lib/calc/help/acoth +lib/calc/help/acsc +lib/calc/help/acsch +lib/calc/help/address +lib/calc/help/agd +lib/calc/help/altbind +lib/calc/help/append +lib/calc/help/appr +lib/calc/help/archive +lib/calc/help/arg +lib/calc/help/arrow +lib/calc/help/asec +lib/calc/help/asech +lib/calc/help/asin +lib/calc/help/asinh +lib/calc/help/assign +lib/calc/help/assoc +lib/calc/help/atan +lib/calc/help/atan2 +lib/calc/help/atanh +lib/calc/help/avg +lib/calc/help/base +lib/calc/help/binding +lib/calc/help/bindings +lib/calc/help/bit +lib/calc/help/blk +lib/calc/help/blkcpy +lib/calc/help/blkfree +lib/calc/help/blocks +lib/calc/help/bround +lib/calc/help/btrunc +lib/calc/help/bug +lib/calc/help/bugs +lib/calc/help/builtin +lib/calc/help/calclevel +lib/calc/help/ceil +lib/calc/help/cfappr +lib/calc/help/cfsim +lib/calc/help/change +lib/calc/help/changes +lib/calc/help/char +lib/calc/help/cmdbuf +lib/calc/help/cmp +lib/calc/help/comb +lib/calc/help/command +lib/calc/help/config +lib/calc/help/conj +lib/calc/help/contrib +lib/calc/help/cos +lib/calc/help/cosh +lib/calc/help/cot +lib/calc/help/coth +lib/calc/help/count +lib/calc/help/cp +lib/calc/help/credit +lib/calc/help/csc +lib/calc/help/csch +lib/calc/help/ctime +lib/calc/help/custhelp/argv +lib/calc/help/custhelp/devnull +lib/calc/help/custhelp/help +lib/calc/help/custhelp/pzasusb8 +lib/calc/help/custhelp/sysinfo +lib/calc/help/custom +lib/calc/help/custom_cal +lib/calc/help/define +lib/calc/help/delete +lib/calc/help/den +lib/calc/help/dereference +lib/calc/help/det +lib/calc/help/digit +lib/calc/help/digits +lib/calc/help/dp +lib/calc/help/environment +lib/calc/help/epsilon +lib/calc/help/errcount +lib/calc/help/errmax +lib/calc/help/errno +lib/calc/help/error +lib/calc/help/errorcode +lib/calc/help/errorcodes +lib/calc/help/eval +lib/calc/help/exp +lib/calc/help/expression +lib/calc/help/fact +lib/calc/help/factor +lib/calc/help/fclose +lib/calc/help/fcnt +lib/calc/help/feof +lib/calc/help/ferror +lib/calc/help/fflush +lib/calc/help/fgetc +lib/calc/help/fgetfield +lib/calc/help/fgetline +lib/calc/help/fgets +lib/calc/help/fgetstr +lib/calc/help/fib +lib/calc/help/file +lib/calc/help/files +lib/calc/help/floor +lib/calc/help/fopen +lib/calc/help/forall +lib/calc/help/fprintf +lib/calc/help/fputc +lib/calc/help/fputs +lib/calc/help/fputstr +lib/calc/help/frac +lib/calc/help/free +lib/calc/help/freeglobals +lib/calc/help/freeredc +lib/calc/help/freestatics +lib/calc/help/frem +lib/calc/help/freopen +lib/calc/help/fscan +lib/calc/help/fscanf +lib/calc/help/fseek +lib/calc/help/fsize +lib/calc/help/ftell +lib/calc/help/full +lib/calc/help/gcd +lib/calc/help/gcdrem +lib/calc/help/gd +lib/calc/help/getenv +lib/calc/help/hash +lib/calc/help/head +lib/calc/help/help +lib/calc/help/highbit +lib/calc/help/history +lib/calc/help/hmean +lib/calc/help/hnrmod +lib/calc/help/hypot +lib/calc/help/ilog +lib/calc/help/ilog10 +lib/calc/help/ilog2 +lib/calc/help/im +lib/calc/help/inputlevel +lib/calc/help/insert +lib/calc/help/int +lib/calc/help/interrupt +lib/calc/help/intro +lib/calc/help/inverse +lib/calc/help/iroot +lib/calc/help/isassoc +lib/calc/help/isatty +lib/calc/help/isblk +lib/calc/help/isconfig +lib/calc/help/isdefined +lib/calc/help/iserror +lib/calc/help/iseven +lib/calc/help/isfile +lib/calc/help/ishash +lib/calc/help/isident +lib/calc/help/isint +lib/calc/help/islist +lib/calc/help/ismat +lib/calc/help/ismult +lib/calc/help/isnull +lib/calc/help/isnum +lib/calc/help/isobj +lib/calc/help/isobjtype +lib/calc/help/isodd +lib/calc/help/isprime +lib/calc/help/isptr +lib/calc/help/isqrt +lib/calc/help/isrand +lib/calc/help/israndom +lib/calc/help/isreal +lib/calc/help/isrel +lib/calc/help/issimple +lib/calc/help/issq +lib/calc/help/isstr +lib/calc/help/istype +lib/calc/help/jacobi +lib/calc/help/join +lib/calc/help/lcm +lib/calc/help/lcmfact +lib/calc/help/lfactor +lib/calc/help/libcalc +lib/calc/help/list +lib/calc/help/ln +lib/calc/help/lowbit +lib/calc/help/ltol +lib/calc/help/makelist +lib/calc/help/mat +lib/calc/help/matdim +lib/calc/help/matfill +lib/calc/help/matmax +lib/calc/help/matmin +lib/calc/help/matsum +lib/calc/help/mattrace +lib/calc/help/mattrans +lib/calc/help/max +lib/calc/help/md5 +lib/calc/help/memsize +lib/calc/help/meq +lib/calc/help/min +lib/calc/help/minv +lib/calc/help/mmin +lib/calc/help/mne +lib/calc/help/mod +lib/calc/help/modify +lib/calc/help/name +lib/calc/help/near +lib/calc/help/new_custom +lib/calc/help/newerror +lib/calc/help/nextcand +lib/calc/help/nextprime +lib/calc/help/norm +lib/calc/help/null +lib/calc/help/num +lib/calc/help/obj +lib/calc/help/oldvalue +lib/calc/help/operator +lib/calc/help/ord +lib/calc/help/overview +lib/calc/help/param +lib/calc/help/perm +lib/calc/help/pfact +lib/calc/help/pi +lib/calc/help/pix +lib/calc/help/places +lib/calc/help/pmod +lib/calc/help/polar +lib/calc/help/poly +lib/calc/help/pop +lib/calc/help/popcnt +lib/calc/help/power +lib/calc/help/prevcand +lib/calc/help/prevprime +lib/calc/help/printf +lib/calc/help/prompt +lib/calc/help/protect +lib/calc/help/ptest +lib/calc/help/push +lib/calc/help/putenv +lib/calc/help/quo +lib/calc/help/quomod +lib/calc/help/rand +lib/calc/help/randbit +lib/calc/help/random +lib/calc/help/randombit +lib/calc/help/randperm +lib/calc/help/rcin +lib/calc/help/rcmul +lib/calc/help/rcout +lib/calc/help/rcpow +lib/calc/help/rcsq +lib/calc/help/re +lib/calc/help/remove +lib/calc/help/reverse +lib/calc/help/rewind +lib/calc/help/rm +lib/calc/help/root +lib/calc/help/round +lib/calc/help/rsearch +lib/calc/help/runtime +lib/calc/help/saveval +lib/calc/help/scale +lib/calc/help/scan +lib/calc/help/scanf +lib/calc/help/search +lib/calc/help/sec +lib/calc/help/sech +lib/calc/help/seed +lib/calc/help/segment +lib/calc/help/select +lib/calc/help/sgn +lib/calc/help/sha +lib/calc/help/sha1 +lib/calc/help/sin +lib/calc/help/sinh +lib/calc/help/size +lib/calc/help/sizeof +lib/calc/help/sort +lib/calc/help/sqrt +lib/calc/help/srand +lib/calc/help/srandom +lib/calc/help/ssq +lib/calc/help/statement +lib/calc/help/stdlib +lib/calc/help/str +lib/calc/help/strcat +lib/calc/help/strerror +lib/calc/help/strlen +lib/calc/help/strpos +lib/calc/help/strprintf +lib/calc/help/strscan +lib/calc/help/strscanf +lib/calc/help/substr +lib/calc/help/sum +lib/calc/help/swap +lib/calc/help/system +lib/calc/help/tail +lib/calc/help/tan +lib/calc/help/tanh +lib/calc/help/test +lib/calc/help/time +lib/calc/help/todo +lib/calc/help/trunc +lib/calc/help/type +lib/calc/help/types +lib/calc/help/unexpected +lib/calc/help/usage +lib/calc/help/variable +lib/calc/help/wishlist +lib/calc/help/xor +lib/calc/libcalc.a +lib/calc/lucas.cal +lib/calc/lucas_chk.cal +lib/calc/lucas_tbl.cal +lib/calc/mersenne.cal +lib/calc/mfactor.cal +lib/calc/mod.cal +lib/calc/natnumset.cal +lib/calc/pell.cal +lib/calc/pi.cal +lib/calc/pix.cal +lib/calc/pollard.cal +lib/calc/poly.cal +lib/calc/prompt.cal +lib/calc/psqrt.cal +lib/calc/qtime.cal +lib/calc/quat.cal +lib/calc/randbitrun.cal +lib/calc/randmprime.cal +lib/calc/randombitrun.cal +lib/calc/randomrun.cal +lib/calc/randrun.cal +lib/calc/regress.cal +lib/calc/seedrandom.cal +lib/calc/solve.cal +lib/calc/sumsq.cal +lib/calc/surd.cal +lib/calc/test1700.cal +lib/calc/test2300.cal +lib/calc/test2600.cal +lib/calc/test2700.cal +lib/calc/test3100.cal +lib/calc/test3300.cal +lib/calc/test3400.cal +lib/calc/test3500.cal +lib/calc/test4000.cal +lib/calc/test4100.cal +lib/calc/test4600.cal +lib/calc/test5100.cal +lib/calc/test5200.cal +lib/calc/test8400.cal +lib/calc/unitfrac.cal +lib/calc/varargs.cal +lib/calc/xx_print.cal +man/man1/calc.1 +@dirrm lib/calc/help/custhelp +@dirrm lib/calc/help +@dirrm lib/calc/custom +@dirrm lib/calc +@dirrm include/calc