86.2. groff-1.24.1
The roff typesetting system — troff, nroff, eqn, tbl, pic and the PDF, PostScript and HTML output devices
| Version | 1.24.1, release 1 |
| Shelf | doctools — Documentation toolchains, man pages, markup converters and TeX typesetting |
| Phase | 41_system (System), 410 of 1047 in build order |
| Licence | GPL-3.0-or-later |
| Homepage | https://www.gnu.org/software/groff/ |
| Build time | 2.5 SBU |
| Installed size | 25.9 MiB in 630 files |
| Recipe | ports/core/doctools/groff/kpkgbuild |
About
GNU groff is the roff typesetting system: troff and nroff, the eqn, tbl, pic and refer preprocessors, the man, mdoc, ms, me and mm macro packages, and output drivers for terminals, PostScript, PDF, HTML and DVI. On KDOS manual pages are formatted by mandoc; groff is there for documents written for the full roff language and for typesetting a page to PostScript, PDF or HTML.
Sources
groff-1.24.1.tar.gz(8.6 MiB)
sha25674e2819795b6aff431aeac983d63a9c8968eeaba2a2eba7df8ba4c7b41e7cfd8
upstream: https://ftp.gnu.org/gnu/groff/groff-1.24.1.tar.gz
archive copy: sources-1/doctools--groff-1.24.1.tar.gz
Dependencies
Depends on: perl, m4, bison, texinfo, zlib, uchardet, ghostscript, netpbm, mandoc.
Required by: no port names it.
Patches
build.sh applies these; kpkg applies nothing by itself.
fix-neqn-wrapper.patch— src/preproc/eqn: avoid broken @g@ substitution in neqnWe do not install groff with a command prefix, but the release tarball seems to generate a broken neqn wrapper leaving a literal "@g@eqn" in the script.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install groff'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/doctools/groff.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/doctools/groff
echo '74e2819795b6aff431aeac983d63a9c8968eeaba2a2eba7df8ba4c7b41e7cfd8 groff-1.24.1.tar.gz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/groff
SRC=$SRC_ROOT/groff-1.24.1
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf groff-1.24.1.tar.gz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/fix-neqn-wrapper.patch"
./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib \
--disable-rpath \
--without-x \
--with-uchardet=yes \
--with-gs=gs \
--without-urw-fonts \
--with-compatibility-wrappers=no
make
make DESTDIR=$PKG install
rm -f "$PKG/usr/bin/soelim" \
"$PKG/usr/share/man/man1/soelim.1" \
"$PKG/usr/share/man/man7/roff.7"
rm -f "$PKG/usr/lib/charset.alias"
The switches, and why each is set:
--disable-rpath— Does not write a run-time library search path into the programs.--without-x— Does not buildgxditview, the X11 previewer for troff output, orxtotroff, which writes groff font descriptions for X11 fonts.--with-uchardet=yes— Buildspreconv, the input-encoding converter, against uchardet, so it can guess the encoding of a file that does not declare one.yesmakes a missing uchardet a configure error instead of apreconvwithout it.--with-gs=gs— Names the Ghostscript program instead of searching for one; configure takes the name as given and does not look for it onPATH. grohtml renders the pictures, tables and equations of an HTML page through ghostscript (gsandps2ps) and the netpbm tools (pnmcrop,pamcut,pnmtopng,pnmtops). configure looks forps2psand the netpbm tools; with any missing it warns that grohtml will not work properly and makes no HTML documentation.--without-urw-fonts— Turns off the search for the URW Type 1 fonts. That search takes Ghostscript’sResource/Fontdirectory for the URW set, finds no AFM metrics there, and the install then stops on theU-*font descriptions that were never generated. Without them, configure rates gropdf’s font supportintermediate(Ghostscript found) rather thanfull.--with-compatibility-wrappers=no— Installs no wrappers that let groff use a vendor’s non-GNU troff macro packages; there is no vendor troff on the system.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/groff, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf groff-1.24.1-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/groff, and runs the triggers its paths call for.
Contents
Installed programs: addftinfo, afmtodit, chem, eqn, eqn2graph, gdiffmk, glilypond, gperl, gpinyin, grap2graph, grn, grodvi, groff, grog, grolbp, grolj4, gropdf, grops, grotty, hpftodit, indxbib, lkbib, lookbib, mmroff, neqn, nroff, pdfmom, pfbtops, pic, pic2graph, post-grohtml, pre-grohtml, preconv, refer, tbl, tfmtodit, troff.
Installed directories: /usr/lib/groff, /usr/share/doc/groff-1.24.1, /usr/share/groff, /usr/share/licenses/groff.
Short descriptions
addftinfo |
add font metrics to troff fonts for use with groff |
afmtodit |
adapt Adobe Font Metrics files for groff PostScript and PDF output |
chem |
embed chemical structure diagrams in groff documents |
eqn |
format mathematics (equations) for groff or MathML |
eqn2graph |
convert an eqn generic equation into a cropped image |
gdiffmk |
mark differences between groff / nroff / troff files |
glilypond |
embed LilyPond musical notation in groff documents |
gperl |
execute Perl commands in groff documents |
gpinyin |
use Hanyu Pinyin Chinese in groff documents |
grap2graph |
convert a grap diagram into a cropped image |
grn |
embed Gremlin images in groff documents |
grodvi |
groff output driver for TeX DVI format |
groff |
front end to the GNU roff document formatting system |
grog |
"groff guess"—infer the groff command a document requires |
grolbp |
groff output driver for Canon CaPSL printers |
grolj4 |
groff output driver for HP LaserJet 4 and compatible printers |
gropdf |
groff output driver for Portable Document Format |
grops |
groff output driver for PostScript |
grotty |
groff output driver for typewriter-like (terminal) devices |
hpftodit |
create font description files for use with groff and grolj4 |
indxbib |
make inverted index of bibliographic databases |
lkbib |
search bibliographic databases |
lookbib |
search bibliographic databases interactively |
mmroff |
reference- and PostScript inclusion-handling front end for GNU roff mm macro package |
neqn |
format equations for character-cell terminal output |
nroff |
format documents with groff for terminal (TTY) devices |
pdfmom |
produce PDF documents using the mom macro package for groff |
pfbtops |
translate PostScript Printer Font Binary files to Printer Font ASCII |
pic |
compile pictures for troff or TeX |
pic2graph |
convert a pic diagram into a cropped image |
preconv |
prepare files for typesetting with groff |
refer |
process bibliographic references for groff |
tbl |
prepare tables for groff documents |
tfmtodit |
adapt TeX Font Metrics files for use with groff and grodvi |
troff |
GNU roff typesetter and document formatter |
Notes
- mandoc owns
soelimandroff(7). The package deletes groff’ssoelim, its manual page androff.7, because mandoc installs the same paths and two packages cannot own one file. Bothsoelimprograms read the same.sorequests, so the manual-page pipeline is unchanged. charset.aliasis removed. groff’s bundled gnulib installs/usr/lib/charset.alias, a table of character-set name aliases, on C libraries other than glibc; the package does not ship it.