Ravenports generated: 08 Jan 2023 04:18
[ravenports.git] / bucket_48 / reduce
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               reduce
4 VERSION=                20220617
5 KEYWORDS=               math lang
6 VARIANTS=               standard
7 SDESC[standard]=        Codemist Std Lisp general-purpose computer system
8 HOMEPAGE=               http://www.reduce-algebra.com/
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            SF/reduce-algebra/snapshot_2022-06-17
13 DISTFILE[1]=            Reduce-svn6339-src.tar.gz:main
14 DF_INDEX=               1
15 SPKGS[standard]=        complete
16                         primary
17                         docs
18
19 OPTIONS_AVAILABLE=      none
20 OPTIONS_STANDARD=       none
21
22 BUILD_DEPENDS=          libtool:single:standard
23                         autoconf:single:standard
24                         automake:single:standard
25 RUN_DEPENDS=            gnuplot:complete:standard
26
27 USES=                   gmake jpeg png tiff ncurses shebangfix
28 XORG_COMPONENTS=        x11 xext xft
29
30 DISTNAME=               Reduce-svn6339-src
31
32 LICENSE=                BSD2CLAUSE:primary
33 LICENSE_FILE=           BSD2CLAUSE:{{WRKSRC}}/csl/reduce.doc/BSD-LICENSE.txt
34 LICENSE_SCHEME=         solo
35
36 FPC_EQUIVALENT=         math/reduce
37 SHEBANG_ADD_SH=         scripts/here.sh
38
39 MUST_CONFIGURE=         gnu
40 CONFIGURE_TARGET=       {{VAR1}}
41 CONFIGURE_ARGS=         --with-csl
42                         --with-autogen=no
43                         AMDEP_TRUE="\#"
44                         am__fastdepCC_TRUE="\#"
45                         am__fastdepCXX_TRUE="\#"
46
47 BUILD_TARGET=           #
48 SINGLE_JOB=             yes
49
50 SUB_FILES=              redcsl
51
52 CPPFLAGS=               `freetype-config
53                         --cflags`
54                         -I{{NCURSESINC}}
55                         -fcommon
56 LDFLAGS=                `freetype-config
57                         --libs`
58                         -ltinfo
59 VAR_OPSYS[freebsd]=     VAR1={{ARCH_STANDARD}}-raven-freebsd{{MAJOR}}
60 VAR_OPSYS[sunos]=       VAR1={{ARCH_STANDARD}}-raven-solaris2.10
61 VAR_OPSYS[linux]=       VAR1={{ARCH_STANDARD}}-raven-linux-gnu{{MAJOR}}
62 VAR_OPSYS[netbsd]=      VAR1={{ARCH_STANDARD}}-raven-netbsd{{MAJOR}}
63 VAR_OPSYS[dragonfly]=   VAR1={{ARCH_STANDARD}}-raven-dragonfly{{MAJOR}}
64
65 post-patch:
66         ${REINPLACE_CMD} -e 's|/usr/pkg/|${LOCALBASE}/|' \
67                 -e 's|`./config.guess`|${CONFIGURE_TARGET}|' \
68                 ${WRKSRC}/scripts/make.sh
69         ${REINPLACE_CMD} -e '/AC_CONFIG_MACRO_DIR(/d' \
70                 ${WRKSRC}/configure.ac \
71                 ${WRKSRC}/generic/newfront/configure.ac \
72                 ${WRKSRC}/csl/cslbase/configure.ac \
73                 ${WRKSRC}/psl/configure.ac
74         ${REINPLACE_CMD} -e "s|am__api_version='1.15'|am__api_version='1.16'|" \
75                 ${WRKSRC}/csl/cslbase/aclocal.m4 \
76                 ${WRKSRC}/psl/aclocal.m4
77
78 pre-configure:
79         (cd ${WRKSRC} && ./autogen.sh --sequential --with-csl)
80
81 do-install:
82         ${MKDIR} ${STAGEDIR}${PREFIX}/share/reduce ${STAGEDIR}${STD_DOCDIR}
83         ${INSTALL_DATA} ${WRKSRC}/cslbuild/${CONFIGURE_TARGET}/csl/reduce.img \
84                 ${STAGEDIR}${PREFIX}/share/reduce
85         ${INSTALL_PROGRAM} ${WRKSRC}/cslbuild/${CONFIGURE_TARGET}/csl/reduce \
86                 ${STAGEDIR}${PREFIX}/share/reduce
87         ${INSTALL_SCRIPT} ${WRKDIR}/redcsl ${STAGEDIR}${PREFIX}/bin/
88         ${INSTALL_MAN} ${FILESDIR}/redcsl.1 ${STAGEDIR}${MANPREFIX}/man/man1/
89         (cd ${WRKSRC}/cslbuild/${CONFIGURE_TARGET}/csl/reduce.doc && \
90                 ${COPYTREE_SHARE} . ${STAGEDIR}${STD_DOCDIR})
91         ${RM} ${STAGEDIR}${STD_DOCDIR}/*-LICENSE.txt
92         ${RM} ${STAGEDIR}${STD_DOCDIR}/LGPL-2.1.txt
93         (cd ${WRKSRC}/cslbuild/${CONFIGURE_TARGET}/csl/reduce.fonts && \
94                 ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/share/reduce/reduce.fonts)
95         ${INSTALL_DATA} ${WRKSRC}/doc/manual/manual.pdf \
96                 ${STAGEDIR}${STD_DOCDIR}
97         ${INSTALL_DATA} ${WRKSRC}/doc/primers/*.pdf \
98                 ${STAGEDIR}${STD_DOCDIR}
99
100 [FILE:1067:descriptions/desc.primary]
101 REDUCE Codemist Standard Lisp, (CSL) version
102
103 REDUCE is an interactive system for general algebraic computations of
104 interest to mathematicians, scientists and engineers.
105
106 CSL is a newer Lisp system that continues to evolve and is now written 
107 completely in C++, which makes it very easy to port to a new machine. 
108 Like PSL, it is a faithful implementation of Standard Lisp and has been 
109 optimized for running REDUCE. It requires a very small memory partition 
110 for its Lisp support. Furthermore, most of the REDUCE facilities are 
111 supported as machine independent pseudocode, which is quite compact. In 
112 the worst case, the performance of this system is about a factor of two 
113 slower than PSL, though in many cases it matches PSL performance. 
114 However, the memory use is smaller. All CSL versions are distributed with 
115 sufficient CSL support to run on the given computing system. This is also
116 an ideal system for those wishing to embed algebraic calculations in a C 
117 or C++ programming environment. The developer of CSL before it became 
118 Open Source was Codemist Ltd.
119
120
121 [FILE:104:distinfo]
122 fba8567372126431bd60a14d780dc584e4677eb3275af351a5109552e7a62d4a    242370067 Reduce-svn6339-src.tar.gz
123
124
125 [FILE:730:manifests/plist.primary]
126 bin/redcsl
127 share/man/man1/redcsl.1.gz
128 share/reduce/
129  reduce
130  reduce.img
131 share/reduce/reduce.fonts/
132  README
133  README.BaKoMa
134  README.cmps-fonts
135  cmex10.pfa
136  cmex10.pfb
137  cmex10.ttf
138  cmex7.ttf
139  cmex8.ttf
140  cmex9.ttf
141  cmmi10.pfa
142  cmmi10.pfb
143  cmmi10.ttf
144  cmmi12.ttf
145  cmmi5.ttf
146  cmmi6.ttf
147  cmmi7.ttf
148  cmmi8.ttf
149  cmmi9.ttf
150  cmr10.pfa
151  cmr10.pfb
152  cmr10.ttf
153  cmr12.ttf
154  cmr17.ttf
155  cmr5.ttf
156  cmr6.ttf
157  cmr7.ttf
158  cmr8.ttf
159  cmr9.ttf
160  cmsy10.pfa
161  cmsy10.pfb
162  cmsy10.ttf
163  cmsy5.ttf
164  cmsy6.ttf
165  cmsy7.ttf
166  cmsy8.ttf
167  cmsy9.ttf
168  cmuntt.pfb
169  cmuntt.ttf
170  fonts.dir
171  fonts.scale
172 share/reduce/reduce.fonts/pfmfiles/
173  cmex10.pfm
174  cmmi10.pfm
175  cmr10.pfm
176  cmsy10.pfm
177 share/reduce/reduce.fonts/src/
178  cmex10.asm.gz
179  cmmi10.asm.gz
180  cmr10.asm.gz
181  cmsy10.asm.gz
182
183
184 [FILE:741:manifests/plist.docs]
185 share/doc/reduce/
186  abstract.tex
187  acknowl.tex
188  appenda.tex
189  aprop.tex
190  cfrac.tex
191  command.tex
192  convert.tex
193  exprn.tex
194  header.tex
195  hephys.tex
196  heugcd.tex
197  index.html
198  insidereduce.pdf
199  inter.tex
200  intro.tex
201  io.tex
202  list.tex
203  macros.tex
204  maintain.tex
205  manual.pdf
206  manual.tex
207  map.tex
208  matrix.tex
209  oper.tex
210  oper2.tex
211  polyrat.tex
212  primer.pdf
213  proc.tex
214  progstr.tex
215  r38_0001.html
216  r38_0050.html
217  r38_0100.html
218  r38_0150.html
219  r38_0200.html
220  r38_0250.html
221  r38_0300.html
222  r38_0350.html
223  r38_0400.html
224  r38_0450.html
225  r38_0500.html
226  r38_0550.html
227  r38_0600.html
228  r38_0650.html
229  r38_idx.html
230  redlogo.gif
231  rememb.tex
232  rest.tex
233  rlisp88.tex
234  rlispref.tex
235  sl.pdf
236  solve.tex
237  statemnt.tex
238  structr.tex
239  subst.tex
240  symbolic.tex
241  title.tex
242  util.tex
243
244
245 [FILE:1556:patches/patch-csl_cslbase_arith08.cpp]
246 --- csl/cslbase/arith08.cpp.orig        2022-01-20 22:10:59 UTC
247 +++ csl/cslbase/arith08.cpp
248 @@ -847,13 +847,13 @@ inline int nlz(uint64_t x)
249  #ifndef POPCOUNT_DEFINED
250  #ifdef __GNUC__
251  
252 -inline int popcount(uint64_t x)
253 +inline int my_popcount(uint64_t x)
254  {   return __builtin_popcountll(x);
255  }
256  
257  #else // __GNUC__
258  
259 -inline int popcount(uint64_t x)
260 +inline int my_popcount(uint64_t x)
261  {   x = (x & 0x5555555555555555U) + (x >> 1 & 0x5555555555555555U);
262      x = (x & 0x3333333333333333U) + (x >> 2 & 0x3333333333333333U);
263      x = x + (x >> 4) & 0x0f0f0f0f0f0f0f0fU;
264 @@ -868,19 +868,19 @@ inline int popcount(uint64_t x)
265  static LispObject Llogcount(LispObject env, LispObject a)
266  {   if (is_fixnum(a))
267      {   intptr_t n = int_of_fixnum(a);
268 -        if (a >= 0) return onevalue(fixnum_of_int(popcount(n)));
269 -        else return onevalue(fixnum_of_int(popcount(~n)));
270 +        if (a >= 0) return onevalue(fixnum_of_int(my_popcount(n)));
271 +        else return onevalue(fixnum_of_int(my_popcount(~n)));
272      }
273      else if (is_bignum(a))
274      {   size_t len = (length_of_header(numhdr(a)) - CELL)/4;
275          int n = 0;
276          if ((int32_t)bignum_digits(a)[len-1] < 0)
277          {   for (size_t i=0; i<len; i++)
278 -                n += popcount(~bignum_digits(a)[i]);
279 +                n += my_popcount(~bignum_digits(a)[i]);
280          }
281          else
282          {   for (size_t i=0; i<len; i++)
283 -                n += popcount(bignum_digits(a)[i]);
284 +                n += my_popcount(bignum_digits(a)[i]);
285          }
286          return onevalue(fixnum_of_int(n));
287      }
288
289
290 [FILE:386:patches/patch-scripts_make.sh]
291 --- scripts/make.sh.orig        2023-01-06 03:01:26 UTC
292 +++ scripts/make.sh
293 @@ -127,11 +127,6 @@ then
294    *cygwin* | *windows*)
295      list="cslbuild/*-cygwin*/csl cslbuild/*-windows*/csl"
296      ;;
297 -  mac_*)
298 -    host1=${host/aarch64/universal}
299 -    host1=${host1/x86_64/universa}
300 -    list="cslbuild/*${host}*/csl cslbuild/*${host1}*/csl"
301 -    ;;
302    *)
303      list="cslbuild/*${host}*/csl"
304      ;;
305
306
307 [FILE:7925:files/redcsl.1]
308 .TH REDCSL 1 "2010 October 10" "redcsl"
309 .
310 .
311 .SH NAME
312 redcsl \- Run REDUCE under CSL
313 .
314 .
315 .SH Synopsis
316 .B redcsl
317 [
318 .I command-line switches
319 ] [
320 .I file ...\&
321 ]
322 .
323 .
324 .SH DESCRIPTION
325 .I redcsl
326 runs REDUCE based on the 
327 .BR CSL
328 Lisp system.
329 .
330 .
331 .SH REDCSL Options
332 .TP
333 .I file
334 read input from file. 
335
336 After all other options have been processed, the files given on the rest of
337 the command line are read in and processed. A filename of
338 .B -
339 can be used to designate standard input.
340 .TP
341 .B -b [OIP]
342 tells the system to avoid any attempt to recolour prompts and input text.
343 It will mainly be needed on X terminals that have been set up so that they
344 use colours that make the defaults here unhelpful, like white-on-black.
345
346 This option can be followed by colour specifications to make things yet
347 more specific. It is supposed to be the idea that three colours can be
348 specified after it for output, input and prompts, with the letters KRGYbMCW
349 standing for blacK, Red, Green, Yellow, blue, Magenta, Cyan and White.
350
351 This may not fully work yet!
352 .TP
353 .BI -d " symbol[=value]"
354 defines Lisp symbol
355 .I symbol
356 at system start, with value 
357 .I value
358 .
359 .TP
360 .B -g
361 enables debugging mode.  It sets a lisp variable
362 .SB !*backtrace
363 and arranges that all backtraces are displayed notwithstanding use of
364 .SB errorset.
365 .TP
366 .BI \-i " imagefile\fR,\fP " \-i-
367 CSL and Reduce use image files to keep both initial heap images and
368 .I fasl
369 loadable modules. By default if the executable launched has some name,
370 say xxx, then an image file xxx.img is used. But to support greater
371 generality 
372 .B -i
373 introduces a new image,
374 .B -i-
375 indicates the default one and a sequence of such directives list
376 image files that are searched in the order given. These are read-only.
377 The similar option 
378 .B -o
379 equally introduces image files that are scanned for input, but that
380 can also be used for output. Normally there would only be one
381 .B -o
382 directive.
383 .TP
384 .BI -j " dumpfile"
385 dumps a record of all the files read during the Lisp run into
386 .I dumpfile
387 with a view that it can be included in a Makefile to document dependencies.
388 .TP
389 .BI -k " nnn[/ss]"
390 sets the size of the heap to be used.  If 
391 .BI -k nnn 
392 is given then that much
393 memory will be allocated and the heap will never expand.  Without this 
394 option a default amount is used, and (on many machines) it will grow
395 if space seems tight.
396
397 If this options is given as
398 .B -k 
399 .I nnn/ss
400 then ss is the number of CSL pages to be allocated to the Lisp stack.
401 The default value (which is 1) should suffice for almost all users, and
402 it should be noted that the C stack is separate from and independent of
403 this one and it too could overflow.
404
405 A suffix K, M or G on the number indicates units of kilobytes,
406 megabytes or gigabytes, with megabytes being the default. so
407 .B -k200M
408 might represent typical usage.
409 .TP
410 .BI -l " logfile"
411 sends a copy of the standard output to 
412 .I logfile\fR.\fP
413 It is very much as if the Lisp function
414 .SB (spool logfile)
415 had been invoked at the start of the run.
416 .TP
417 .B -n
418 ignore startup function.
419
420 Normally when the system is started it will run a 
421 .I restart function
422 as indicated in its heap image. There can be cases where a heap image has
423 been created in a bad way such that the saved restart function always fails
424 abruptly, and hence working out what was wrong becomes hard. In such cases
425 it may be useful to give the
426 .B -n
427 options that forces CSL to ignore any startup function and merely begin
428 in a minimal Lisp-style read-eval-print loop.
429 .TP 
430 .B -o
431 see 
432 .B -i
433 .TP
434 .B -q
435 quiet run: sets
436 .SB !*echo
437 to
438 .SB nil
439 and switches off garbage collector messages.
440 .TP
441 .BI -r " nnn[,mmm]"
442 seed random number generator.
443
444 The random-number generator in CSL is normally initialised to a value
445 based on the time of day and is hence not reproducible from run to run.
446 In many cases that behavious is desirable, but for debugging it can be useful
447 to force a seed. The directive
448 .B -r 
449 .I nnn[,mmm]
450 sets the seed to up to 64 bits taken from the values 
451 .I nnn 
452 and 
453 .I mmm. 
454 THe second value is optional, and specifying 
455 .B -r0
456 explicitly asks for the non-reproducible behaviour (I hope). Note that
457 the main Reduce-level random number source is coded at a higher level
458 and does not get reset this way - this is the lower level CSL
459 generator.
460 .TP 
461 .B -s
462 sets the Lisp variable 
463 .SB !*plap
464 and hence the compiler generates an assembly listing.
465 .TP
466 .BI -t " name"
467 reports the time-stamp on the named module, and then exits. This is
468 for use in perl scripts and the like, and is needed because the stamps
469 on modules within an image or library file are not otherwise instantly
470 available.
471
472 Note that especially on windowed systems it may be necessary to use
473 this with 
474 .BI -- " filename"
475 since the information generated here goes to the default output, which
476 in some cases is just the screen.
477 .TP
478 .BI -u " symbol"
479 forcibly undefine a Lisp symbol. There are probably very very few
480 cases where it is useful since I do not have a large number of
481 system-specific predefined names.
482 .TP
483 .B -v
484 An option to make things mildly more verbose. It displays more of a
485 banner at startup and switches garbage collection messages on.
486 .TP
487 .B -w
488 force console mode.
489
490 On a typical system if the system is launched it creates a new window and uses
491 its own windowed intarface in that. If it is run such that at startup the
492 standard input or output are associated with a file or pipe, or under X the
493 variable 
494 .SB DISPLAY
495 is not set it will try to start up in console
496 mode. The flag 
497 .B -w
498 indicates that the system should run in console
499 more regadless, while 
500 .B -w+
501 attempts a window even if that seems doomed to failure. When running
502 the system to obey a script it will often make sense to use the
503 .B -w
504 option. Note that on Windows the system is provided as
505 two separate (but almost identical) binaries. For example the file
506 .SB csl.exe
507 is linked in windows mode. A result is that if launched from the
508 command line it detaches from its console, and if launched by
509 double-clicking it does not create a console. It is in fact very ugly
510 when double clicking on an application causes an unwanted console
511 window to appear. In contrast
512 .SB csl.com
513 is a console mode version of just the same program, so when launched
514 from a command line it can communicate with the console in the
515 ordinary expected manner.
516 .TP
517 .B -z 
518 start without image.
519
520 When bootstrapping it is necessary to start up the system for one initial time
521 without the benefit of any image file at all. This option makes
522 this happen, so when it is specified the system starts up with a minimal
523 environment and only those capabilities that are present in the CSL
524 kernel. It will normally make sense to start loading some basic Lisp
525 definitions rather rapidly. The files
526 .SB compat.lsp
527 ,
528 .SB extras.lsp 
529 and 
530 .SB compiler.lsp
531 have Lisp source for the main things I use, and once they are loaded
532 the Lisp compiler can be used to compile itself.
533 .TP
534 .B --help
535 It is probably obvious what this option does! But in particular it
536 displays an explanation of the 
537 .B --dump-source
538 option, and hence should count as a prominent and easy-to-find way of
539 alerting people to their rights and obligations. Note that on Windows
540 of the application was linked as a windows binary it carefully creates
541 a console to display the help text in, and organizes a delay to give
542 people a chance to read it.
543 .TP
544 .BI -- " filename"
545 If the application is run in console mode then its standard output could
546 be redirected to a file using shell facilities. But the
547 .B --
548 directive (followed by a file name) redirects output within the Lisp
549 rather than outside it. If this is done a very limited capability for
550 sending progress or status reports to stderr (or the title-bar when
551 running in windowed mode) remains via the 
552 .SB report!-right
553 function.
554
555 The 
556 .B -w 
557 option may frequently make sense in such cases, but if that
558 is not used and the system tries to run in a window it will create it
559 starting off minimised.
560 .
561
562
563 [FILE:50:files/redcsl.in]
564 #!/bin/sh
565
566 exec %%PREFIX%%/share/reduce/reduce $*
567