# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= reduce VERSION= 20231218 KEYWORDS= math lang VARIANTS= standard SDESC[standard]= Codemist Std Lisp general-purpose computer system HOMEPAGE= http://www.reduce-algebra.com/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= SF/reduce-algebra/snapshot_2023-12-18 DISTFILE[1]= Reduce-svn6658-src.tar.gz:main DF_INDEX= 1 SPKGS[standard]= complete primary docs OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BUILD_DEPENDS= libtool:single:standard autoconf:single:standard automake:single:standard RUN_DEPENDS= gnuplot:complete:standard USES= gmake jpeg png tiff ncurses shebangfix zstd:build zlib:build fontconfig:build XORG_COMPONENTS= x11 xext xft xrender DISTNAME= Reduce-svn6658-src LICENSE= BSD2CLAUSE:primary LICENSE_FILE= BSD2CLAUSE:{{WRKSRC}}/csl/reduce.doc/BSD-LICENSE.txt LICENSE_SCHEME= solo FPC_EQUIVALENT= math/reduce SHEBANG_ADD_SH= scripts/here.sh MUST_CONFIGURE= gnu CONFIGURE_TARGET= {{VAR1}} CONFIGURE_ARGS= --with-csl --with-autogen=no AMDEP_TRUE="\#" am__fastdepCC_TRUE="\#" am__fastdepCXX_TRUE="\#" BUILD_TARGET= # SINGLE_JOB= yes SUB_FILES= redcsl CPPFLAGS= `freetype-config --cflags` -I{{NCURSESINC}} -fcommon LDFLAGS= `freetype-config --libs` -ltinfo VAR_OPSYS[freebsd]= VAR1={{ARCH_STANDARD}}-raven-freebsd{{MAJOR}} VAR_OPSYS[sunos]= VAR1={{ARCH_STANDARD}}-raven-solaris2.10 VAR_OPSYS[linux]= VAR1={{ARCH_STANDARD}}-raven-linux-gnu{{MAJOR}} VAR_OPSYS[netbsd]= VAR1={{ARCH_STANDARD}}-raven-netbsd{{MAJOR}} VAR_OPSYS[dragonfly]= VAR1={{ARCH_STANDARD}}-raven-dragonfly{{MAJOR}} VAR_OPSYS[midnightbsd]= VAR1=x86_64-raven-freebsd12.3 post-patch: ${REINPLACE_CMD} -e 's|/usr/pkg/|${LOCALBASE}/|' \ -e 's|`./config.guess`|${CONFIGURE_TARGET}|' \ ${WRKSRC}/scripts/make.sh ${REINPLACE_CMD} -e '/AC_CONFIG_MACRO_DIR(/d' \ ${WRKSRC}/configure.ac \ ${WRKSRC}/generic/newfront/configure.ac \ ${WRKSRC}/csl/cslbase/configure.ac \ ${WRKSRC}/psl/configure.ac ${REINPLACE_CMD} -e "s|am__api_version='1.15'|am__api_version='1.16'|" \ ${WRKSRC}/csl/cslbase/aclocal.m4 \ ${WRKSRC}/psl/aclocal.m4 pre-configure: (cd ${WRKSRC} && ./autogen.sh --sequential --with-csl) do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/share/reduce ${STAGEDIR}${STD_DOCDIR} ${INSTALL_DATA} ${WRKSRC}/cslbuild/${CONFIGURE_TARGET}/csl/reduce.img \ ${STAGEDIR}${PREFIX}/share/reduce ${INSTALL_PROGRAM} ${WRKSRC}/cslbuild/${CONFIGURE_TARGET}/csl/reduce \ ${STAGEDIR}${PREFIX}/share/reduce ${INSTALL_SCRIPT} ${WRKDIR}/redcsl ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_MAN} ${FILESDIR}/redcsl.1 ${STAGEDIR}${MANPREFIX}/man/man1/ (cd ${WRKSRC}/cslbuild/${CONFIGURE_TARGET}/csl/reduce.doc && \ ${COPYTREE_SHARE} . ${STAGEDIR}${STD_DOCDIR}) ${RM} ${STAGEDIR}${STD_DOCDIR}/*-LICENSE.txt ${RM} ${STAGEDIR}${STD_DOCDIR}/LGPL-2.1.txt (cd ${WRKSRC}/cslbuild/${CONFIGURE_TARGET}/csl/reduce.fonts && \ ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/share/reduce/reduce.fonts) ${INSTALL_DATA} ${WRKSRC}/doc/manual/manual.pdf \ ${STAGEDIR}${STD_DOCDIR} ${INSTALL_DATA} ${WRKSRC}/doc/primers/*.pdf \ ${STAGEDIR}${STD_DOCDIR} [FILE:1067:descriptions/desc.primary] REDUCE Codemist Standard Lisp, (CSL) version REDUCE is an interactive system for general algebraic computations of interest to mathematicians, scientists and engineers. CSL is a newer Lisp system that continues to evolve and is now written completely in C++, which makes it very easy to port to a new machine. Like PSL, it is a faithful implementation of Standard Lisp and has been optimized for running REDUCE. It requires a very small memory partition for its Lisp support. Furthermore, most of the REDUCE facilities are supported as machine independent pseudocode, which is quite compact. In the worst case, the performance of this system is about a factor of two slower than PSL, though in many cases it matches PSL performance. However, the memory use is smaller. All CSL versions are distributed with sufficient CSL support to run on the given computing system. This is also an ideal system for those wishing to embed algebraic calculations in a C or C++ programming environment. The developer of CSL before it became Open Source was Codemist Ltd. [FILE:104:distinfo] d32a15a5b9290b6ab2bb99ebb294ab40a694ec5e5134c79bfd16cfb44bb85bc5 243547020 Reduce-svn6658-src.tar.gz [FILE:730:manifests/plist.primary] bin/redcsl share/man/man1/redcsl.1.gz share/reduce/ reduce reduce.img share/reduce/reduce.fonts/ README README.BaKoMa README.cmps-fonts cmex10.pfa cmex10.pfb cmex10.ttf cmex7.ttf cmex8.ttf cmex9.ttf cmmi10.pfa cmmi10.pfb cmmi10.ttf cmmi12.ttf cmmi5.ttf cmmi6.ttf cmmi7.ttf cmmi8.ttf cmmi9.ttf cmr10.pfa cmr10.pfb cmr10.ttf cmr12.ttf cmr17.ttf cmr5.ttf cmr6.ttf cmr7.ttf cmr8.ttf cmr9.ttf cmsy10.pfa cmsy10.pfb cmsy10.ttf cmsy5.ttf cmsy6.ttf cmsy7.ttf cmsy8.ttf cmsy9.ttf cmuntt.pfb cmuntt.ttf fonts.dir fonts.scale share/reduce/reduce.fonts/pfmfiles/ cmex10.pfm cmmi10.pfm cmr10.pfm cmsy10.pfm share/reduce/reduce.fonts/src/ cmex10.asm.gz cmmi10.asm.gz cmr10.asm.gz cmsy10.asm.gz [FILE:741:manifests/plist.docs] share/doc/reduce/ abstract.tex acknowl.tex appenda.tex aprop.tex cfrac.tex command.tex convert.tex exprn.tex header.tex hephys.tex heugcd.tex index.html insidereduce.pdf inter.tex intro.tex io.tex list.tex macros.tex maintain.tex manual.pdf manual.tex map.tex matrix.tex oper.tex oper2.tex polyrat.tex primer.pdf proc.tex progstr.tex r38_0001.html r38_0050.html r38_0100.html r38_0150.html r38_0200.html r38_0250.html r38_0300.html r38_0350.html r38_0400.html r38_0450.html r38_0500.html r38_0550.html r38_0600.html r38_0650.html r38_idx.html redlogo.gif rememb.tex rest.tex rlisp88.tex rlispref.tex sl.pdf solve.tex statemnt.tex structr.tex subst.tex symbolic.tex title.tex util.tex [FILE:1398:patches/patch-csl_cslbase_arithlib.hpp] --- csl/cslbase/arithlib.hpp.orig 2023-08-18 15:27:13 UTC +++ csl/cslbase/arithlib.hpp @@ -3642,7 +3642,7 @@ inline int nlz(std::uint64_t x) { return __builtin_clzll(x); // Must use the 64-bit version of clz. } -inline int popcount(std::uint64_t x) +inline int my_popcount(std::uint64_t x) { return __builtin_popcountll(x); } @@ -3670,7 +3670,7 @@ inline int nlz(uint64_t x) return nlzTable[x % 67]; } -inline int popcount(std::uint64_t x) +inline int my_popcount(std::uint64_t x) { x = (x & 0x5555555555555555U) + ((x >> 1) & 0x5555555555555555U); x = (x & 0x3333333333333333U) + ((x >> 2) & 0x3333333333333333U); x = x + ((x >> 4) & 0x0f0f0f0f0f0f0f0fU); @@ -7662,15 +7662,15 @@ inline std::size_t Logcount::op(std::uin { std::size_t lena = numberSize(a); std::size_t r = 0; if (negative(a[lena-1])) - { for (std::size_t i=0; i( (tt - threadClockBase)*clock_cycle_calibration); -#else // Windows +#elif defined __linux__ // There is no tidy guarantee about the resolution of the clock used // here on any particular platform. struct std::timespec tt; clock_gettime(CLOCK_MONOTONIC_RAW, &tt); return 1.0e9*static_cast(tt.tv_sec) + static_cast(tt.tv_nsec); +#else + struct std::timespec tt; + clock_gettime(CLOCK_MONOTONIC, &tt); + return 1.0e9*static_cast(tt.tv_sec) + + static_cast(tt.tv_nsec); #endif // Windows } [FILE:387:patches/patch-scripts_make.sh] --- scripts/make.sh.orig 2023-08-17 22:59:10 UTC +++ scripts/make.sh @@ -127,11 +127,6 @@ then *cygwin* | *windows*) list="cslbuild/*-cygwin*/csl cslbuild/*-windows*/csl" ;; - mac_*) - host1=${host/aarch64/universal} - host1=${host1/x86_64/universal} - list="cslbuild/*${host}*/csl cslbuild/*${host1}*/csl" - ;; *) list="cslbuild/*${host}*/csl" ;; [FILE:7925:files/redcsl.1] .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. . [FILE:50:files/redcsl.in] #!/bin/sh exec %%PREFIX%%/share/reduce/reduce $*