aboutsummaryrefslogtreecommitdiffstats
path: root/math/reduce
diff options
context:
space:
mode:
authorstephen <stephen@FreeBSD.org>2014-02-19 06:16:33 +0800
committerstephen <stephen@FreeBSD.org>2014-02-19 06:16:33 +0800
commitfbd1cea885e30bdd9efeecdfc53366928309b345 (patch)
tree59ded198633ff3ce9dfec5f5d8987a032dbabddd /math/reduce
parent1e6c0741bc9312eea47b360e64b715abc8bf6023 (diff)
downloadfreebsd-ports-gnome-fbd1cea885e30bdd9efeecdfc53366928309b345.tar.gz
freebsd-ports-gnome-fbd1cea885e30bdd9efeecdfc53366928309b345.tar.zst
freebsd-ports-gnome-fbd1cea885e30bdd9efeecdfc53366928309b345.zip
- New port math/reduce.
This is a powerful Computer-Algebra System written in it's own version of LISP with quite a long history behind it. PR: ports/186855 Submitted by: Pedro Giffuni <giffunip@tutopia.com>
Diffstat (limited to 'math/reduce')
-rw-r--r--math/reduce/Makefile55
-rw-r--r--math/reduce/distinfo2
-rw-r--r--math/reduce/files/patch-csl_cslbase_headers.h22
-rw-r--r--math/reduce/files/redcsl.1253
-rw-r--r--math/reduce/files/runcsl.sh4
-rw-r--r--math/reduce/pkg-descr24
-rw-r--r--math/reduce/pkg-plist110
7 files changed, 470 insertions, 0 deletions
diff --git a/math/reduce/Makefile b/math/reduce/Makefile
new file mode 100644
index 000000000000..f55264056c40
--- /dev/null
+++ b/math/reduce/Makefile
@@ -0,0 +1,55 @@
+# Created by: Pedro Giffuni
+# $FreeBSD$
+
+PORTNAME= reduce
+PORTVERSION= 20110414
+CATEGORIES= math lang
+MASTER_SITES= SF/${PORTNAME}-algebra/
+DISTNAME= ${PORTNAME}-src-${PORTVERSION}
+
+MAINTAINER= giffunip@tutopia.com
+COMMENT= Portable general-purpose computer algebra system (CSL version)
+
+LICENSE= BSD
+
+RUN_DEPENDS= gnuplot:${PORTSDIR}/math/gnuplot
+LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \
+ libpng15.so:${PORTSDIR}/graphics/png \
+ libtiff.so:${PORTSDIR}/graphics/tiff
+
+USE_BZIP2= yes
+USES= gmake
+USE_XORG= xext x11 xft
+USE_GNOME= lthack ltverhack
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS= --with-csl
+ALL_TARGET=
+
+.include <bsd.port.pre.mk>
+
+HMAN1= redcsl.1
+
+.if ${ARCH} == "amd64"
+TARGET_SDIR= x86_64-unknown-${OPSYS:L}${OSREL}
+.else
+TARGET_SDIR= ${ARCH}-unknown-${OPSYS:L}${OSREL}
+.endif
+REDUCECSL= ${WRKSRC}/cslbuild/${TARGET_SDIR}/csl
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+ ${INSTALL_PROGRAM} ${REDUCECSL}/reduce ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${REDUCECSL}/reduce.img ${STAGEDIR}${DATADIR}
+ ${INSTALL_SCRIPT} ${FILESDIR}/runcsl.sh ${STAGEDIR}${PREFIX}/bin/redcsl
+ ${INSTALL_MAN} ${FILESDIR}/redcsl.1 ${STAGEDIR}${MANPREFIX}/man/man1/
+ ${MKDIR} ${STAGEDIR}${DATADIR}/reduce.doc
+ (cd ${REDUCECSL}/reduce.doc && ${COPYTREE_SHARE} . \
+ ${STAGEDIR}${DATADIR}/reduce.doc)
+ ${MKDIR} ${STAGEDIR}${PREFIX}/${FONTDIR}
+ (cd ${REDUCECSL}/reduce.fonts && ${COPYTREE_SHARE} . \
+ ${STAGEDIR}${DATADIR}/reduce.fonts)
+
+.include <bsd.port.post.mk>
diff --git a/math/reduce/distinfo b/math/reduce/distinfo
new file mode 100644
index 000000000000..9ee43e1fa297
--- /dev/null
+++ b/math/reduce/distinfo
@@ -0,0 +1,2 @@
+SHA256 (reduce-src-20110414.tar.bz2) = d6ac7a30e817ea71555d21b03a119a5236967b251eae8946a1817ae9a81cee03
+SIZE (reduce-src-20110414.tar.bz2) = 136783974
diff --git a/math/reduce/files/patch-csl_cslbase_headers.h b/math/reduce/files/patch-csl_cslbase_headers.h
new file mode 100644
index 000000000000..535004a26723
--- /dev/null
+++ b/math/reduce/files/patch-csl_cslbase_headers.h
@@ -0,0 +1,22 @@
+Index: csl/cslbase/headers.h
+===================================================================
+--- csl/cslbase/headers.h (revision 1603)
++++ csl/cslbase/headers.h (working copy)
+@@ -97,6 +97,17 @@
+ #define PRIxPTR "llx"
+ #endif
+
++/*
++ * This is necessary to for timeval in BSD systems.
++ */
++#if (defined(__unix__) || defined(unix)) && !defined(USG)
++#include <sys/param.h>
++#endif
++
++#if (defined(BSD) && (BSD >= 199103))
++#include <sys/time.h>
++#endif
++
+ #ifndef UNDER_CE
+ /*
+ * The test for UNDER_CE is a little odd here, but when I once compiled a
diff --git a/math/reduce/files/redcsl.1 b/math/reduce/files/redcsl.1
new file mode 100644
index 000000000000..05106629ba78
--- /dev/null
+++ b/math/reduce/files/redcsl.1
@@ -0,0 +1,253 @@
+.TH REDCSL 1 "2010 October 10" "redcsl"
+.
+.
+.SH NAME
+redcsl \- Run REDUCE under CSL
+.
+.
+.SH Synopsis
+.B redcsl
+[
+.I command-line switches
+] [
+.I file ...\&
+]
+.
+.
+.SH DESCRIPTION
+.I redcsl
+runs REDUCE based on the
+.BR CSL
+Lisp system.
+.
+.
+.SH REDCSL Options
+.TP
+.I file
+read input from file.
+
+After all other options have been processed, the files given on the rest of
+the command line are read in and processed. A filename of
+.B -
+can be used to designate standard input.
+.TP
+.B -b [OIP]
+tells the system to avoid any attempt to recolour prompts and input text.
+It will mainly be needed on X terminals that have been set up so that they
+use colours that make the defaults here unhelpful, like white-on-black.
+
+This option can be followed by colour specifications to make things yet
+more specific. It is supposed to be the idea that three colours can be
+specified after it for output, input and prompts, with the letters KRGYbMCW
+standing for blacK, Red, Green, Yellow, blue, Magenta, Cyan and White.
+
+This may not fully work yet!
+.TP
+.BI -d " symbol[=value]"
+defines Lisp symbol
+.I symbol
+at system start, with value
+.I value
+.
+.TP
+.B -g
+enables debugging mode. It sets a lisp variable
+.SB !*backtrace
+and arranges that all backtraces are displayed notwithstanding use of
+.SB errorset.
+.TP
+.BI \-i " imagefile\fR,\fP " \-i-
+CSL and Reduce use image files to keep both initial heap images and
+.I fasl
+loadable modules. By default if the executable launched has some name,
+say xxx, then an image file xxx.img is used. But to support greater
+generality
+.B -i
+introduces a new image,
+.B -i-
+indicates the default one and a sequence of such directives list
+image files that are searched in the order given. These are read-only.
+The similar option
+.B -o
+equally introduces image files that are scanned for input, but that
+can also be used for output. Normally there would only be one
+.B -o
+directive.
+.TP
+.BI -j " dumpfile"
+dumps a record of all the files read during the Lisp run into
+.I dumpfile
+with a view that it can be included in a Makefile to document dependencies.
+.TP
+.BI -k " nnn[/ss]"
+sets the size of the heap to be used. If
+.BI -k nnn
+is given then that much
+memory will be allocated and the heap will never expand. Without this
+option a default amount is used, and (on many machines) it will grow
+if space seems tight.
+
+If this options is given as
+.B -k
+.I nnn/ss
+then ss is the number of CSL pages to be allocated to the Lisp stack.
+The default value (which is 1) should suffice for almost all users, and
+it should be noted that the C stack is separate from and independent of
+this one and it too could overflow.
+
+A suffix K, M or G on the number indicates units of kilobytes,
+megabytes or gigabytes, with megabytes being the default. so
+.B -k200M
+might represent typical usage.
+.TP
+.BI -l " logfile"
+sends a copy of the standard output to
+.I logfile\fR.\fP
+It is very much as if the Lisp function
+.SB (spool logfile)
+had been invoked at the start of the run.
+.TP
+.B -n
+ignore startup function.
+
+Normally when the system is started it will run a
+.I restart function
+as indicated in its heap image. There can be cases where a heap image has
+been created in a bad way such that the saved restart function always fails
+abruptly, and hence working out what was wrong becomes hard. In such cases
+it may be useful to give the
+.B -n
+options that forces CSL to ignore any startup function and merely begin
+in a minimal Lisp-style read-eval-print loop.
+.TP
+.B -o
+see
+.B -i
+.TP
+.B -q
+quiet run: sets
+.SB !*echo
+to
+.SB nil
+and switches off garbage collector messages.
+.TP
+.BI -r " nnn[,mmm]"
+seed random number generator.
+
+The random-number generator in CSL is normally initialised to a value
+based on the time of day and is hence not reproducible from run to run.
+In many cases that behavious is desirable, but for debugging it can be useful
+to force a seed. The directive
+.B -r
+.I nnn[,mmm]
+sets the seed to up to 64 bits taken from the values
+.I nnn
+and
+.I mmm.
+THe second value is optional, and specifying
+.B -r0
+explicitly asks for the non-reproducible behaviour (I hope). Note that
+the main Reduce-level random number source is coded at a higher level
+and does not get reset this way - this is the lower level CSL
+generator.
+.TP
+.B -s
+sets the Lisp variable
+.SB !*plap
+and hence the compiler generates an assembly listing.
+.TP
+.BI -t " name"
+reports the time-stamp on the named module, and then exits. This is
+for use in perl scripts and the like, and is needed because the stamps
+on modules within an image or library file are not otherwise instantly
+available.
+
+Note that especially on windowed systems it may be necessary to use
+this with
+.BI -- " filename"
+since the information generated here goes to the default output, which
+in some cases is just the screen.
+.TP
+.BI -u " symbol"
+forcibly undefine a Lisp symbol. There are probably very very few
+cases where it is useful since I do not have a large number of
+system-specific predefined names.
+.TP
+.B -v
+An option to make things mildly more verbose. It displays more of a
+banner at startup and switches garbage collection messages on.
+.TP
+.B -w
+force console mode.
+
+On a typical system if the system is launched it creates a new window and uses
+its own windowed intarface in that. If it is run such that at startup the
+standard input or output are associated with a file or pipe, or under X the
+variable
+.SB DISPLAY
+is not set it will try to start up in console
+mode. The flag
+.B -w
+indicates that the system should run in console
+more regadless, while
+.B -w+
+attempts a window even if that seems doomed to failure. When running
+the system to obey a script it will often make sense to use the
+.B -w
+option. Note that on Windows the system is provided as
+two separate (but almost identical) binaries. For example the file
+.SB csl.exe
+is linked in windows mode. A result is that if launched from the
+command line it detaches from its console, and if launched by
+double-clicking it does not create a console. It is in fact very ugly
+when double clicking on an application causes an unwanted console
+window to appear. In contrast
+.SB csl.com
+is a console mode version of just the same program, so when launched
+from a command line it can communicate with the console in the
+ordinary expected manner.
+.TP
+.B -z
+start without image.
+
+When bootstrapping it is necessary to start up the system for one initial time
+without the benefit of any image file at all. This option makes
+this happen, so when it is specified the system starts up with a minimal
+environment and only those capabilities that are present in the CSL
+kernel. It will normally make sense to start loading some basic Lisp
+definitions rather rapidly. The files
+.SB compat.lsp
+,
+.SB extras.lsp
+and
+.SB compiler.lsp
+have Lisp source for the main things I use, and once they are loaded
+the Lisp compiler can be used to compile itself.
+.TP
+.B --help
+It is probably obvious what this option does! But in particular it
+displays an explanation of the
+.B --dump-source
+option, and hence should count as a prominent and easy-to-find way of
+alerting people to their rights and obligations. Note that on Windows
+of the application was linked as a windows binary it carefully creates
+a console to display the help text in, and organizes a delay to give
+people a chance to read it.
+.TP
+.BI -- " filename"
+If the application is run in console mode then its standard output could
+be redirected to a file using shell facilities. But the
+.B --
+directive (followed by a file name) redirects output within the Lisp
+rather than outside it. If this is done a very limited capability for
+sending progress or status reports to stderr (or the title-bar when
+running in windowed mode) remains via the
+.SB report!-right
+function.
+
+The
+.B -w
+option may frequently make sense in such cases, but if that
+is not used and the system tries to run in a window it will create it
+starting off minimised.
+.
diff --git a/math/reduce/files/runcsl.sh b/math/reduce/files/runcsl.sh
new file mode 100644
index 000000000000..34682fd33723
--- /dev/null
+++ b/math/reduce/files/runcsl.sh
@@ -0,0 +1,4 @@
+#! /bin/sh
+
+exec /usr/local/share/reduce/reduce $*
+
diff --git a/math/reduce/pkg-descr b/math/reduce/pkg-descr
new file mode 100644
index 000000000000..076131d45a17
--- /dev/null
+++ b/math/reduce/pkg-descr
@@ -0,0 +1,24 @@
+REDUCE is an interactive system for general algebraic computations of
+interest to mathematicians, scientists and engineers. It has been
+produced by a collaborative effort involving many contributors. Its
+capabilities include:
+
+* expansion and ordering of polynomials and rational functions;
+* substitutions and pattern matching in a wide variety of forms;
+* automatic and user controlled simplification of expressions;
+* calculations with symbolic matrices;
+* arbitrary precision integer and real arithmetic;
+* facilities for defining new functions and extending program syntax;
+* analytic differentiation and integration;
+* factorization of polynomials;
+* facilities for the solution of a variety of algebraic equations;
+* facilities for the output of expressions in a variety of formats;
+* facilities for generating optimized numerical programs from symbolic input;
+* calculations with a wide variety of special functions;
+* Dirac matrix calculations of interest to high energy physicists.
+
+It is often used as an algebraic calculator for problems that are possible
+to do by hand. However, REDUCE is designed to support calculations that
+are not feasible by hand.
+
+WWW: http://www.reduce-algebra.com/
diff --git a/math/reduce/pkg-plist b/math/reduce/pkg-plist
new file mode 100644
index 000000000000..aac43e1bb638
--- /dev/null
+++ b/math/reduce/pkg-plist
@@ -0,0 +1,110 @@
+bin/redcsl
+%%DATADIR%%/reduce
+%%DATADIR%%/reduce.img
+%%DATADIR%%/reduce.doc/matrix.tex
+%%DATADIR%%/reduce.doc/progstr.tex
+%%DATADIR%%/reduce.doc/inter.tex
+%%DATADIR%%/reduce.doc/macros.tex
+%%DATADIR%%/reduce.doc/convert.tex
+%%DATADIR%%/reduce.doc/exprn.tex
+%%DATADIR%%/reduce.doc/r38_0500.html
+%%DATADIR%%/reduce.doc/hephys.tex
+%%DATADIR%%/reduce.doc/io.tex
+%%DATADIR%%/reduce.doc/r38_idx.html
+%%DATADIR%%/reduce.doc/manual.tex
+%%DATADIR%%/reduce.doc/oper2.tex
+%%DATADIR%%/reduce.doc/polyrat.tex
+%%DATADIR%%/reduce.doc/rest.tex
+%%DATADIR%%/reduce.doc/heugcd.tex
+%%DATADIR%%/reduce.doc/BSD-LICENSE.txt
+%%DATADIR%%/reduce.doc/r38_0400.html
+%%DATADIR%%/reduce.doc/list.tex
+%%DATADIR%%/reduce.doc/cfrac.tex
+%%DATADIR%%/reduce.doc/r38_0001.html
+%%DATADIR%%/reduce.doc/BINARY-LICENSE.txt
+%%DATADIR%%/reduce.doc/r38_0150.html
+%%DATADIR%%/reduce.doc/symbolic.tex
+%%DATADIR%%/reduce.doc/r38_0450.html
+%%DATADIR%%/reduce.doc/r38_0350.html
+%%DATADIR%%/reduce.doc/rlisp88.tex
+%%DATADIR%%/reduce.doc/rlispref.tex
+%%DATADIR%%/reduce.doc/abstract.tex
+%%DATADIR%%/reduce.doc/acknowl.tex
+%%DATADIR%%/reduce.doc/command.tex
+%%DATADIR%%/reduce.doc/map.tex
+%%DATADIR%%/reduce.doc/rememb.tex
+%%DATADIR%%/reduce.doc/redlogo.gif
+%%DATADIR%%/reduce.doc/oper.tex
+%%DATADIR%%/reduce.doc/maintain.tex
+%%DATADIR%%/reduce.doc/aprop.tex
+%%DATADIR%%/reduce.doc/title.tex
+%%DATADIR%%/reduce.doc/r38_0100.html
+%%DATADIR%%/reduce.doc/structr.tex
+%%DATADIR%%/reduce.doc/LGPL-2.1.txt
+%%DATADIR%%/reduce.doc/solve.tex
+%%DATADIR%%/reduce.doc/util.tex
+%%DATADIR%%/reduce.doc/subst.tex
+%%DATADIR%%/reduce.doc/r38_0250.html
+%%DATADIR%%/reduce.doc/intro.tex
+%%DATADIR%%/reduce.doc/r38_0550.html
+%%DATADIR%%/reduce.doc/r38_0050.html
+%%DATADIR%%/reduce.doc/r38_0300.html
+%%DATADIR%%/reduce.doc/r38_0600.html
+%%DATADIR%%/reduce.doc/index.html
+%%DATADIR%%/reduce.doc/statemnt.tex
+%%DATADIR%%/reduce.doc/appenda.tex
+%%DATADIR%%/reduce.doc/header.tex
+%%DATADIR%%/reduce.doc/proc.tex
+%%DATADIR%%/reduce.doc/r38_0200.html
+%%DATADIR%%/reduce.doc/r38_0650.html
+@dirrm %%DATADIR%%/reduce.doc
+%%DATADIR%%/reduce.fonts/cmmi9.ttf
+%%DATADIR%%/reduce.fonts/cmsy9.ttf
+%%DATADIR%%/reduce.fonts/cmsy6.ttf
+%%DATADIR%%/reduce.fonts/pfmfiles/cmsy10.pfm
+%%DATADIR%%/reduce.fonts/pfmfiles/cmr10.pfm
+%%DATADIR%%/reduce.fonts/pfmfiles/cmex10.pfm
+%%DATADIR%%/reduce.fonts/pfmfiles/cmmi10.pfm
+@dirrm %%DATADIR%%/reduce.fonts/pfmfiles
+%%DATADIR%%/reduce.fonts/cmmi6.ttf
+%%DATADIR%%/reduce.fonts/cmmi7.ttf
+%%DATADIR%%/reduce.fonts/cmr12.ttf
+%%DATADIR%%/reduce.fonts/cmsy7.ttf
+%%DATADIR%%/reduce.fonts/cmex10.pfa
+%%DATADIR%%/reduce.fonts/cmr9.ttf
+%%DATADIR%%/reduce.fonts/cmsy10.pfa
+%%DATADIR%%/reduce.fonts/cmsy5.ttf
+%%DATADIR%%/reduce.fonts/cmmi10.pfb
+%%DATADIR%%/reduce.fonts/cmex10.pfb
+%%DATADIR%%/reduce.fonts/cmex10.ttf
+%%DATADIR%%/reduce.fonts/cmr7.ttf
+%%DATADIR%%/reduce.fonts/cmr10.ttf
+%%DATADIR%%/reduce.fonts/cmsy10.pfb
+%%DATADIR%%/reduce.fonts/cmex9.ttf
+%%DATADIR%%/reduce.fonts/cmmi5.ttf
+%%DATADIR%%/reduce.fonts/cmmi10.pfa
+%%DATADIR%%/reduce.fonts/cmsy10.ttf
+%%DATADIR%%/reduce.fonts/cmex8.ttf
+%%DATADIR%%/reduce.fonts/README
+%%DATADIR%%/reduce.fonts/fonts.dir
+%%DATADIR%%/reduce.fonts/cmsy8.ttf
+%%DATADIR%%/reduce.fonts/cmmi10.ttf
+%%DATADIR%%/reduce.fonts/cmmi8.ttf
+%%DATADIR%%/reduce.fonts/cmr8.ttf
+%%DATADIR%%/reduce.fonts/fonts.scale
+%%DATADIR%%/reduce.fonts/cmex7.ttf
+%%DATADIR%%/reduce.fonts/cmmi12.ttf
+%%DATADIR%%/reduce.fonts/README.cmps-fonts
+%%DATADIR%%/reduce.fonts/README.BaKoMa
+%%DATADIR%%/reduce.fonts/cmr10.pfa
+%%DATADIR%%/reduce.fonts/cmr5.ttf
+%%DATADIR%%/reduce.fonts/cmr10.pfb
+%%DATADIR%%/reduce.fonts/cmr6.ttf
+%%DATADIR%%/reduce.fonts/cmr17.ttf
+%%DATADIR%%/reduce.fonts/src/cmr10.asm.gz
+%%DATADIR%%/reduce.fonts/src/cmex10.asm.gz
+%%DATADIR%%/reduce.fonts/src/cmsy10.asm.gz
+%%DATADIR%%/reduce.fonts/src/cmmi10.asm.gz
+@dirrm %%DATADIR%%/reduce.fonts/src
+@dirrm %%DATADIR%%/reduce.fonts
+@dirrm %%DATADIR%%