Date: Tue, 18 Feb 2014 03:48:17 GMT From: Pedro Giffuni <giffunip@tutopia.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/186855: New port: math/reduce Message-ID: <201402180348.s1I3mH5Z028887@cgiserv.freebsd.org> Resent-Message-ID: <201402180350.s1I3o0Z8059409@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 186855 >Category: ports >Synopsis: New port: math/reduce >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Feb 18 03:50:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Pedro Giffuni >Release: 10-STABLE >Organization: >Environment: FreeBSD kakumen 10.0-STABLE FreeBSD 10.0-STABLE #1 r262131: Mon Feb 17 16:01:38 COT 2014 pfg@kakumen:/usr/obj/usr/src/sys/GENERIC amd64 >Description: This is a powerful Computer-Algebra System written in it's own version of LISP with quite a long history behind it. The package was available commercially in two variants (PSL and CSL) and since some years ago it has been available freely under a BSD license. This port only builds and install the CSL version, which is very portable and has a small memory footprint but is somewhat slower than the PSL version. >How-To-Repeat: I have had this port for a while in the "wanted ports" Wiki and finally I found some time to finish it. It is also my first port that uses staging from the start. >Fix: Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # reduce # reduce/Makefile # reduce/distinfo # reduce/files # reduce/files/redcsl.1 # reduce/files/runcsl.sh # reduce/files/patch-csl_cslbase_headers.h # reduce/pkg-descr # reduce/pkg-plist # echo c - reduce mkdir -p reduce > /dev/null 2>&1 echo x - reduce/Makefile sed 's/^X//' >reduce/Makefile << '2c9ce4455c8dc4ce66412ec2ebb6f3e5' X# Created by: Pedro Giffuni X# $FreeBSD$ X XPORTNAME= reduce XPORTVERSION= 20110414 XCATEGORIES= math lang XMASTER_SITES= SF/${PORTNAME}-algebra/ XDISTNAME= ${PORTNAME}-src-${PORTVERSION} X XMAINTAINER= giffunip@tutopia.com XCOMMENT= Portable general-purpose computer algebra system (CSL version) X XLICENSE= BSD X XRUN_DEPENDS= gnuplot:${PORTSDIR}/math/gnuplot XLIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \ X libpng15.so:${PORTSDIR}/graphics/png \ X libtiff.so:${PORTSDIR}/graphics/tiff X XUSE_BZIP2= yes XUSES= gmake XUSE_XORG= xext x11 xft XUSE_GNOME= lthack ltverhack X XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} X XHAS_CONFIGURE= yes XCONFIGURE_ARGS= --with-csl XALL_TARGET= X X.include <bsd.port.pre.mk> X XHMAN1= redcsl.1 X X.if ${ARCH} == "amd64" XTARGET_SDIR= x86_64-unknown-${OPSYS:L}${OSREL} X.else XTARGET_SDIR= ${ARCH}-unknown-${OPSYS:L}${OSREL} X.endif XREDUCECSL= ${WRKSRC}/cslbuild/${TARGET_SDIR}/csl X Xdo-install: X ${MKDIR} ${STAGEDIR}${DATADIR} X ${INSTALL_PROGRAM} ${REDUCECSL}/reduce ${STAGEDIR}${DATADIR} X ${INSTALL_DATA} ${REDUCECSL}/reduce.img ${STAGEDIR}${DATADIR} X ${INSTALL_SCRIPT} ${FILESDIR}/runcsl.sh ${STAGEDIR}${PREFIX}/bin/redcsl X ${INSTALL_MAN} ${FILESDIR}/redcsl.1 ${STAGEDIR}${MANPREFIX}/man/man1/ X ${MKDIR} ${STAGEDIR}${DATADIR}/reduce.doc X (cd ${REDUCECSL}/reduce.doc && ${COPYTREE_SHARE} . \ X ${STAGEDIR}${DATADIR}/reduce.doc) X ${MKDIR} ${STAGEDIR}${PREFIX}/${FONTDIR} X (cd ${REDUCECSL}/reduce.fonts && ${COPYTREE_SHARE} . \ X ${STAGEDIR}${DATADIR}/reduce.fonts) X X.include <bsd.port.post.mk> 2c9ce4455c8dc4ce66412ec2ebb6f3e5 echo x - reduce/distinfo sed 's/^X//' >reduce/distinfo << 'f64a885b9e81d87a488bf7574cf225d6' XSHA256 (reduce-src-20110414.tar.bz2) = d6ac7a30e817ea71555d21b03a119a5236967b251eae8946a1817ae9a81cee03 XSIZE (reduce-src-20110414.tar.bz2) = 136783974 f64a885b9e81d87a488bf7574cf225d6 echo c - reduce/files mkdir -p reduce/files > /dev/null 2>&1 echo x - reduce/files/redcsl.1 sed 's/^X//' >reduce/files/redcsl.1 << '036f6084133ba4efe259d3762efb02ea' X.TH REDCSL 1 "2010 October 10" "redcsl" X. X. X.SH NAME Xredcsl \- Run REDUCE under CSL X. X. X.SH Synopsis X.B redcsl X[ X.I command-line switches X] [ X.I file ...\& X] X. X. X.SH DESCRIPTION X.I redcsl Xruns REDUCE based on the X.BR CSL XLisp system. X. X. X.SH REDCSL Options X.TP X.I file Xread input from file. X XAfter all other options have been processed, the files given on the rest of Xthe command line are read in and processed. A filename of X.B - Xcan be used to designate standard input. X.TP X.B -b [OIP] Xtells the system to avoid any attempt to recolour prompts and input text. XIt will mainly be needed on X terminals that have been set up so that they Xuse colours that make the defaults here unhelpful, like white-on-black. X XThis option can be followed by colour specifications to make things yet Xmore specific. It is supposed to be the idea that three colours can be Xspecified after it for output, input and prompts, with the letters KRGYbMCW Xstanding for blacK, Red, Green, Yellow, blue, Magenta, Cyan and White. X XThis may not fully work yet! X.TP X.BI -d " symbol[=value]" Xdefines Lisp symbol X.I symbol Xat system start, with value X.I value X. X.TP X.B -g Xenables debugging mode. It sets a lisp variable X.SB !*backtrace Xand arranges that all backtraces are displayed notwithstanding use of X.SB errorset. X.TP X.BI \-i " imagefile\fR,\fP " \-i- XCSL and Reduce use image files to keep both initial heap images and X.I fasl Xloadable modules. By default if the executable launched has some name, Xsay xxx, then an image file xxx.img is used. But to support greater Xgenerality X.B -i Xintroduces a new image, X.B -i- Xindicates the default one and a sequence of such directives list Ximage files that are searched in the order given. These are read-only. XThe similar option X.B -o Xequally introduces image files that are scanned for input, but that Xcan also be used for output. Normally there would only be one X.B -o Xdirective. X.TP X.BI -j " dumpfile" Xdumps a record of all the files read during the Lisp run into X.I dumpfile Xwith a view that it can be included in a Makefile to document dependencies. X.TP X.BI -k " nnn[/ss]" Xsets the size of the heap to be used. If X.BI -k nnn Xis given then that much Xmemory will be allocated and the heap will never expand. Without this Xoption a default amount is used, and (on many machines) it will grow Xif space seems tight. X XIf this options is given as X.B -k X.I nnn/ss Xthen ss is the number of CSL pages to be allocated to the Lisp stack. XThe default value (which is 1) should suffice for almost all users, and Xit should be noted that the C stack is separate from and independent of Xthis one and it too could overflow. X XA suffix K, M or G on the number indicates units of kilobytes, Xmegabytes or gigabytes, with megabytes being the default. so X.B -k200M Xmight represent typical usage. X.TP X.BI -l " logfile" Xsends a copy of the standard output to X.I logfile\fR.\fP XIt is very much as if the Lisp function X.SB (spool logfile) Xhad been invoked at the start of the run. X.TP X.B -n Xignore startup function. X XNormally when the system is started it will run a X.I restart function Xas indicated in its heap image. There can be cases where a heap image has Xbeen created in a bad way such that the saved restart function always fails Xabruptly, and hence working out what was wrong becomes hard. In such cases Xit may be useful to give the X.B -n Xoptions that forces CSL to ignore any startup function and merely begin Xin a minimal Lisp-style read-eval-print loop. X.TP X.B -o Xsee X.B -i X.TP X.B -q Xquiet run: sets X.SB !*echo Xto X.SB nil Xand switches off garbage collector messages. X.TP X.BI -r " nnn[,mmm]" Xseed random number generator. X XThe random-number generator in CSL is normally initialised to a value Xbased on the time of day and is hence not reproducible from run to run. XIn many cases that behavious is desirable, but for debugging it can be useful Xto force a seed. The directive X.B -r X.I nnn[,mmm] Xsets the seed to up to 64 bits taken from the values X.I nnn Xand X.I mmm. XTHe second value is optional, and specifying X.B -r0 Xexplicitly asks for the non-reproducible behaviour (I hope). Note that Xthe main Reduce-level random number source is coded at a higher level Xand does not get reset this way - this is the lower level CSL Xgenerator. X.TP X.B -s Xsets the Lisp variable X.SB !*plap Xand hence the compiler generates an assembly listing. X.TP X.BI -t " name" Xreports the time-stamp on the named module, and then exits. This is Xfor use in perl scripts and the like, and is needed because the stamps Xon modules within an image or library file are not otherwise instantly Xavailable. X XNote that especially on windowed systems it may be necessary to use Xthis with X.BI -- " filename" Xsince the information generated here goes to the default output, which Xin some cases is just the screen. X.TP X.BI -u " symbol" Xforcibly undefine a Lisp symbol. There are probably very very few Xcases where it is useful since I do not have a large number of Xsystem-specific predefined names. X.TP X.B -v XAn option to make things mildly more verbose. It displays more of a Xbanner at startup and switches garbage collection messages on. X.TP X.B -w Xforce console mode. X XOn a typical system if the system is launched it creates a new window and uses Xits own windowed intarface in that. If it is run such that at startup the Xstandard input or output are associated with a file or pipe, or under X the Xvariable X.SB DISPLAY Xis not set it will try to start up in console Xmode. The flag X.B -w Xindicates that the system should run in console Xmore regadless, while X.B -w+ Xattempts a window even if that seems doomed to failure. When running Xthe system to obey a script it will often make sense to use the X.B -w Xoption. Note that on Windows the system is provided as Xtwo separate (but almost identical) binaries. For example the file X.SB csl.exe Xis linked in windows mode. A result is that if launched from the Xcommand line it detaches from its console, and if launched by Xdouble-clicking it does not create a console. It is in fact very ugly Xwhen double clicking on an application causes an unwanted console Xwindow to appear. In contrast X.SB csl.com Xis a console mode version of just the same program, so when launched Xfrom a command line it can communicate with the console in the Xordinary expected manner. X.TP X.B -z Xstart without image. X XWhen bootstrapping it is necessary to start up the system for one initial time Xwithout the benefit of any image file at all. This option makes Xthis happen, so when it is specified the system starts up with a minimal Xenvironment and only those capabilities that are present in the CSL Xkernel. It will normally make sense to start loading some basic Lisp Xdefinitions rather rapidly. The files X.SB compat.lsp X, X.SB extras.lsp Xand X.SB compiler.lsp Xhave Lisp source for the main things I use, and once they are loaded Xthe Lisp compiler can be used to compile itself. X.TP X.B --help XIt is probably obvious what this option does! But in particular it Xdisplays an explanation of the X.B --dump-source Xoption, and hence should count as a prominent and easy-to-find way of Xalerting people to their rights and obligations. Note that on Windows Xof the application was linked as a windows binary it carefully creates Xa console to display the help text in, and organizes a delay to give Xpeople a chance to read it. X.TP X.BI -- " filename" XIf the application is run in console mode then its standard output could Xbe redirected to a file using shell facilities. But the X.B -- Xdirective (followed by a file name) redirects output within the Lisp Xrather than outside it. If this is done a very limited capability for Xsending progress or status reports to stderr (or the title-bar when Xrunning in windowed mode) remains via the X.SB report!-right Xfunction. X XThe X.B -w Xoption may frequently make sense in such cases, but if that Xis not used and the system tries to run in a window it will create it Xstarting off minimised. X. 036f6084133ba4efe259d3762efb02ea echo x - reduce/files/runcsl.sh sed 's/^X//' >reduce/files/runcsl.sh << 'c02f7086e8f4c4b98062e872d03bf7d0' X#! /bin/sh X Xexec /usr/local/share/reduce/reduce $* X c02f7086e8f4c4b98062e872d03bf7d0 echo x - reduce/files/patch-csl_cslbase_headers.h sed 's/^X//' >reduce/files/patch-csl_cslbase_headers.h << '8903c66736260f6e90e07b0f14218ffd' XIndex: csl/cslbase/headers.h X=================================================================== X--- csl/cslbase/headers.h (revision 1603) X+++ csl/cslbase/headers.h (working copy) X@@ -97,6 +97,17 @@ X #define PRIxPTR "llx" X #endif X X+/* X+ * This is necessary to for timeval in BSD systems. X+ */ X+#if (defined(__unix__) || defined(unix)) && !defined(USG) X+#include <sys/param.h> X+#endif X+ X+#if (defined(BSD) && (BSD >= 199103)) X+#include <sys/time.h> X+#endif X+ X #ifndef UNDER_CE X /* X * The test for UNDER_CE is a little odd here, but when I once compiled a 8903c66736260f6e90e07b0f14218ffd echo x - reduce/pkg-descr sed 's/^X//' >reduce/pkg-descr << '4ec86e57fcb7f549897bc3be737e46b9' XREDUCE is an interactive system for general algebraic computations of Xinterest to mathematicians, scientists and engineers. It has been Xproduced by a collaborative effort involving many contributors. Its Xcapabilities include: X X* expansion and ordering of polynomials and rational functions; X* substitutions and pattern matching in a wide variety of forms; X* automatic and user controlled simplification of expressions; X* calculations with symbolic matrices; X* arbitrary precision integer and real arithmetic; X* facilities for defining new functions and extending program syntax; X* analytic differentiation and integration; X* factorization of polynomials; X* facilities for the solution of a variety of algebraic equations; X* facilities for the output of expressions in a variety of formats; X* facilities for generating optimized numerical programs from symbolic input; X* calculations with a wide variety of special functions; X* Dirac matrix calculations of interest to high energy physicists. X XIt is often used as an algebraic calculator for problems that are possible Xto do by hand. However, REDUCE is designed to support calculations that Xare not feasible by hand. X XWWW: http://www.reduce-algebra.com/ 4ec86e57fcb7f549897bc3be737e46b9 echo x - reduce/pkg-plist sed 's/^X//' >reduce/pkg-plist << 'fb4fb61c35d2d9d8405ab62b49321b08' Xbin/redcsl X%%DATADIR%%/reduce X%%DATADIR%%/reduce.img X%%DATADIR%%/reduce.doc/matrix.tex X%%DATADIR%%/reduce.doc/progstr.tex X%%DATADIR%%/reduce.doc/inter.tex X%%DATADIR%%/reduce.doc/macros.tex X%%DATADIR%%/reduce.doc/convert.tex X%%DATADIR%%/reduce.doc/exprn.tex X%%DATADIR%%/reduce.doc/r38_0500.html X%%DATADIR%%/reduce.doc/hephys.tex X%%DATADIR%%/reduce.doc/io.tex X%%DATADIR%%/reduce.doc/r38_idx.html X%%DATADIR%%/reduce.doc/manual.tex X%%DATADIR%%/reduce.doc/oper2.tex X%%DATADIR%%/reduce.doc/polyrat.tex X%%DATADIR%%/reduce.doc/rest.tex X%%DATADIR%%/reduce.doc/heugcd.tex X%%DATADIR%%/reduce.doc/BSD-LICENSE.txt X%%DATADIR%%/reduce.doc/r38_0400.html X%%DATADIR%%/reduce.doc/list.tex X%%DATADIR%%/reduce.doc/cfrac.tex X%%DATADIR%%/reduce.doc/r38_0001.html X%%DATADIR%%/reduce.doc/BINARY-LICENSE.txt X%%DATADIR%%/reduce.doc/r38_0150.html X%%DATADIR%%/reduce.doc/symbolic.tex X%%DATADIR%%/reduce.doc/r38_0450.html X%%DATADIR%%/reduce.doc/r38_0350.html X%%DATADIR%%/reduce.doc/rlisp88.tex X%%DATADIR%%/reduce.doc/rlispref.tex X%%DATADIR%%/reduce.doc/abstract.tex X%%DATADIR%%/reduce.doc/acknowl.tex X%%DATADIR%%/reduce.doc/command.tex X%%DATADIR%%/reduce.doc/map.tex X%%DATADIR%%/reduce.doc/rememb.tex X%%DATADIR%%/reduce.doc/redlogo.gif X%%DATADIR%%/reduce.doc/oper.tex X%%DATADIR%%/reduce.doc/maintain.tex X%%DATADIR%%/reduce.doc/aprop.tex X%%DATADIR%%/reduce.doc/title.tex X%%DATADIR%%/reduce.doc/r38_0100.html X%%DATADIR%%/reduce.doc/structr.tex X%%DATADIR%%/reduce.doc/LGPL-2.1.txt X%%DATADIR%%/reduce.doc/solve.tex X%%DATADIR%%/reduce.doc/util.tex X%%DATADIR%%/reduce.doc/subst.tex X%%DATADIR%%/reduce.doc/r38_0250.html X%%DATADIR%%/reduce.doc/intro.tex X%%DATADIR%%/reduce.doc/r38_0550.html X%%DATADIR%%/reduce.doc/r38_0050.html X%%DATADIR%%/reduce.doc/r38_0300.html X%%DATADIR%%/reduce.doc/r38_0600.html X%%DATADIR%%/reduce.doc/index.html X%%DATADIR%%/reduce.doc/statemnt.tex X%%DATADIR%%/reduce.doc/appenda.tex X%%DATADIR%%/reduce.doc/header.tex X%%DATADIR%%/reduce.doc/proc.tex X%%DATADIR%%/reduce.doc/r38_0200.html X%%DATADIR%%/reduce.doc/r38_0650.html X@dirrm %%DATADIR%%/reduce.doc X%%DATADIR%%/reduce.fonts/cmmi9.ttf X%%DATADIR%%/reduce.fonts/cmsy9.ttf X%%DATADIR%%/reduce.fonts/cmsy6.ttf X%%DATADIR%%/reduce.fonts/pfmfiles/cmsy10.pfm X%%DATADIR%%/reduce.fonts/pfmfiles/cmr10.pfm X%%DATADIR%%/reduce.fonts/pfmfiles/cmex10.pfm X%%DATADIR%%/reduce.fonts/pfmfiles/cmmi10.pfm X@dirrm %%DATADIR%%/reduce.fonts/pfmfiles X%%DATADIR%%/reduce.fonts/cmmi6.ttf X%%DATADIR%%/reduce.fonts/cmmi7.ttf X%%DATADIR%%/reduce.fonts/cmr12.ttf X%%DATADIR%%/reduce.fonts/cmsy7.ttf X%%DATADIR%%/reduce.fonts/cmex10.pfa X%%DATADIR%%/reduce.fonts/cmr9.ttf X%%DATADIR%%/reduce.fonts/cmsy10.pfa X%%DATADIR%%/reduce.fonts/cmsy5.ttf X%%DATADIR%%/reduce.fonts/cmmi10.pfb X%%DATADIR%%/reduce.fonts/cmex10.pfb X%%DATADIR%%/reduce.fonts/cmex10.ttf X%%DATADIR%%/reduce.fonts/cmr7.ttf X%%DATADIR%%/reduce.fonts/cmr10.ttf X%%DATADIR%%/reduce.fonts/cmsy10.pfb X%%DATADIR%%/reduce.fonts/cmex9.ttf X%%DATADIR%%/reduce.fonts/cmmi5.ttf X%%DATADIR%%/reduce.fonts/cmmi10.pfa X%%DATADIR%%/reduce.fonts/cmsy10.ttf X%%DATADIR%%/reduce.fonts/cmex8.ttf X%%DATADIR%%/reduce.fonts/README X%%DATADIR%%/reduce.fonts/fonts.dir X%%DATADIR%%/reduce.fonts/cmsy8.ttf X%%DATADIR%%/reduce.fonts/cmmi10.ttf X%%DATADIR%%/reduce.fonts/cmmi8.ttf X%%DATADIR%%/reduce.fonts/cmr8.ttf X%%DATADIR%%/reduce.fonts/fonts.scale X%%DATADIR%%/reduce.fonts/cmex7.ttf X%%DATADIR%%/reduce.fonts/cmmi12.ttf X%%DATADIR%%/reduce.fonts/README.cmps-fonts X%%DATADIR%%/reduce.fonts/README.BaKoMa X%%DATADIR%%/reduce.fonts/cmr10.pfa X%%DATADIR%%/reduce.fonts/cmr5.ttf X%%DATADIR%%/reduce.fonts/cmr10.pfb X%%DATADIR%%/reduce.fonts/cmr6.ttf X%%DATADIR%%/reduce.fonts/cmr17.ttf X%%DATADIR%%/reduce.fonts/src/cmr10.asm.gz X%%DATADIR%%/reduce.fonts/src/cmex10.asm.gz X%%DATADIR%%/reduce.fonts/src/cmsy10.asm.gz X%%DATADIR%%/reduce.fonts/src/cmmi10.asm.gz X@dirrm %%DATADIR%%/reduce.fonts/src X@dirrm %%DATADIR%%/reduce.fonts X@dirrm %%DATADIR%% fb4fb61c35d2d9d8405ab62b49321b08 exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402180348.s1I3mH5Z028887>