From bcba0ef4486eb9baec3cd4d17250b91e1c8a7f79 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 31 Dec 2025 18:55:49 +0300 Subject: no longer touch installed files at install-time * hash-bang lines in grosciteco.tes and tedoc.tes are fixed up at build time instead of install-time (via install-exec-hook). * This will hopefully resolve problems with the FreeBSD port, since Poudriere installs the package as non-root but with BINMODE=555. The alternative would have been to set BINMODE=755 in the port which may not be acceptible by the official port committer. Anyway, I decided to go out of the way of any conflicts. See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?format=multiple&id=283601 * On the downside, this will break install-path overrides at install-time (e.g. `make install bindir=...`). --- doc/tedoc.tes.in | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100755 doc/tedoc.tes.in (limited to 'doc/tedoc.tes.in') diff --git a/doc/tedoc.tes.in b/doc/tedoc.tes.in new file mode 100755 index 0000000..cc4f726 --- /dev/null +++ b/doc/tedoc.tes.in @@ -0,0 +1,130 @@ +#!/usr/local/bin/sciteco -m +!* tedoc.tes [-C] [--] *! + +0,2EJ !* FIXME: Memory limiting is too slow *! + +:EIQ[$SCITECOPATH]/getopt.tes + +@[format_header]{ + FD--S .,(:L"S.|Z')@Xa I^J + + EBN[\#tm] + I\# GENERATED FROM Q.#sc (\.#sc):^J + I.SS  Ga -A-10"N I^J ' + :Q.[topics]"> + I.SCITECO_TOPIC  G.[topics] + ' + + EQ.[header] + J + J < + SMA; .U.t + 1Ua <."=1;' -A"A|1;' -A"V -1Ua 1;' R> + Qa"S + Q.tJ + | + .,Q.t@Xa + I^J.B Qa^J + ' + > + J < + S[[MC]]; 1Xa D + I^J.RI [ Qa ]^J + > + J \(->;> + J < + SMCM[|MC]; + .U.t <-A"C|-A-|"N1;'' R> + .,Q.t@Xa EQa + + EQ.[header] + I^J.IR Qa^J + > + J + J + J + J 0A-10"=D' + ZJ -A-10"=-D' + EBN[\#tm] + G.[header] + I^J.^J +} + +@[format_body]{ + I.LP^J + + J + J + !* set margin for list paragraphs *! + J 0U.n < + Z-.-3"<1;' + .,.+3:S.LP"S + Q.n"> + 0L I.RE^J 0U.n + ' + | + .,.+3:S.IP"S + Q.n"=0L I.RS^J %.n ' + ' + ' + :L; + > + Q.n"> ZJ I^J.RE ' + J ; -D I^J -S< -D I^J.I > + J + J + EBN[\#tm] + G.c I^J.^J.^J +} + +!* process command-line options *! +[optstring]C +M[getopt]U#ou Q#ou"< Invalid command-line^J 1 ' +:Q[getopt.C]"< + [comment.start]!* [comment.end]*! +| + [comment.start]/* [comment.end]*/ +' +Q#ou+1U#tm Q#tmU.i <:Q[\.i]:; EBN[\.i] %.i> + +!* switch to the main troff template (#tm) *! +EB EF + +I\# +\# AUTOGENERATED FROM Q[\#tm] +\# DO NOT EDIT MANUALLY!!! +\#^J + +!* find insertion point *! +:FS^J.TEDOC^J^J"F Missing .TEDOC call^J 1 ' + +EJ-1< + < + 2U* [*].#sc + + !* extract comment *! + SQ[comment.start]$; + .-:Q[comment.start]-1U.#sc + SQ[comment.end] + Q.#sc+:Q[comment.start]+1,.-:Q[comment.end]X.c + EQ.c + + J + J 0A-10"N @X.[topics] ' + <0A-10"N 0A- "N 0A-9"N 1; ' ' ' D> + ZJ <-A-10"N -A- "N -A-9"N 1; ' ' ' -D> + + !* extract header *! + H:FD^J^J"F ZJ ' + 0,.@X.[header] + + EQ.[header] + :M[format_header] + EQ.c + :M[format_body] + > + EF +> + +2EL EWQ[\#ou] +EX -- cgit v1.2.3