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