groff - Document formatting system ChangeLog

HOWTO


# GNU Troff 1.23.0
# ================
# Slackware 13.0, 13.1: groff 1.20.1
# Slackware 13.37, 14.0: groff 1.21
# Slackware 14.1, 14.2: groff 1.22.2
# Slackware 15.0: groff 1.22.4

# info-gnu: Groff version 1.23.0
# GNU roff (groff) Manuals Online
# groff mailing list archives
# Savannah: GNU roff - Summary

# Prerequisites:
# XFree86 or X or Wayland (optional; for gxditview and xtotroff)
# Perl
# lpr from CUPS or another to print
# bison
# m4
# texinfo (to view the texinfo manual or convert it to dvi, pdf, or
#   html format)
# A TeX such as teTeX or TeX Live
# pkg-config
# glibc's iconv or libiconv
# ghostscript 9.00 <= x < 9.54 (for grops)
# netpbm (if you want grohtml)
# URW fonts
# uchardet

# If you have trouble getting it from the download URL below, try one of
# these:
# http://ftp.gnu.org/gnu/groff/
# ftp://ftp.gnu.org/gnu/groff/
# https://savannah.gnu.org/git/?group=groff

# Get it
cd
test -f installed/groff-1.23.0.tar.gz && mv installed/groff-1.23.0.tar.gz .
test ! -f groff-1.23.0.tar.gz &&
wget http://ftpmirror.gnu.org/groff/groff-1.23.0.tar.gz

# Verify tarball w/ cksum from coreutils >= 9.2:
echo "a5dX9ZK3UYtJAutq9+VFcL3Mujeocf3bLTCuOGNRHB\
M=  groff-1.23.0.tar.gz" | cksum -a sha256 -c

# Verify tarball w/ sha256sum:
# (this came from my cksum and gpg-verified tarball)
echo "6b9757f592b7518b4902eb6af7e54570bdccba37a871fddb2d30ae3863511c\
13  groff-1.23.0.tar.gz" | sha256sum -c

# Verify tarball w/ gpg:
( gpg --list-keys E707FDA5 > /dev/null 2>&1 || gpg --recv-keys E707FDA5 ) &&
wget -nc http://ftpmirror.gnu.org/groff/groff-1.23.0.tar.gz.sig &&
  gpg --verify groff-1.23.0.tar.gz.sig && rm groff-1.23.0.tar.gz.sig

# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "groff-*" -exec rm -r {} \;
tar xzvf ~/groff-1.23.0.tar.gz
cd groff-1.23.0
test $UID = 0 && chown -R root:root .

# Read ./README and if upgrading ./NEWS and/or ./ChangeLog

# If you have the 'ghostscript-fonts-std' package installed, you can either
# symlink /usr/share/fonts/Type1 to /usr/share/fonts/type1 or
# use --with-urw-fonts-dir=/usr/share/fonts/Type1
#
# If you do not have 'ghostscript-fonts' installed, you can get fonts
# from https://github.com/ArtifexSoftware/urw-base35-fonts/releases
# See font/devpdf/Foundry.in for paths that gropdf will look for them

# Put PAGE=letter at the beginning of your configure line to use letter
# instead of A4 as the default page size

# Various things may end up in /usr/share/doc/groff-* instead of
# /usr/doc/groff-* as specified by --docdir
# If you do not already have a /usr/share/doc -> /usr/doc symlink,
# that may be a good idea, otherwise you may want/need to use these also:
# --htmldir=/usr/doc/groff-1.23.0
# --dvidir=/usr/doc/groff-1.23.0
# --pdfdir=/usr/doc/groff-1.23.0
# --psdir=/usr/doc/groff-1.23.0

# Configure the build for 64-bit
PAGE=letter ./configure --prefix=/usr --docdir=/usr/doc/groff-1.23.0 \
--infodir=/usr/info --libdir=/usr/lib64 --mandir=/usr/man \
--with-urw-fonts-dir=/usr/share/fonts/Type1

# Configure the build for anything else
PAGE=letter ./configure --prefix=/usr --docdir=/usr/doc/groff-1.23.0 \
--infodir=/usr/info --mandir=/usr/man \
--with-urw-fonts-dir=/usr/share/fonts/Type1

# Build it
make

# Become root to install it
su

# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg groff

# Clean up old version docs
find /usr/doc -maxdepth 1 -type d -name "groff-*" -exec rm -r {} \;

# If upgrading, old version files may be in here: /usr/share/groff/

# Install the new version
make install

# Create g* symlinks and a z* one
( cd /usr/bin
  for bin in eqn indxbib lookbib neqn nroff pic refer soelim tbl troff;
  do
    test -e g${bin} && rm -f g${bin}
    ln -s $bin g${bin}
  done
  rm -f zsoelim
  ln -s soelim zsoelim )

# Without this, 'man' output will have control codes in it as of groff 1.18.x
# Slackware replaces the files in /usr/share/groff/site-tmac/ to disable
# color ANSI output instead.
# If you use a very old Slackware without /etc/profile.d/, you can add the
# "export PAGER" line to /etc/profile
echo '#!/bin/sh' > /etc/profile.d/groff.sh
echo '# This fixes control codes that' >> /etc/profile.d/groff.sh
echo '# appear in "man" output' >> /etc/profile.d/groff.sh
echo 'export PAGER="less -R"' >> /etc/profile.d/groff.sh
chmod +x /etc/profile.d/groff.sh
. /etc/profile.d/groff.sh

# Try it out
man groff

# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .

# Become yourself again
exit

# Either source /etc/profile.d/groff.sh or log out and log back in so the
# settings take effect for your current (non-root) shell
test -r /etc/profile.d/groff.sh && . /etc/profile.d/groff.sh

# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/groff-*.tar.*
mv groff-1.23.0.tar.gz installed/


# If you ever want to uninstall GNU roff, this should do it:
cd
su
test -d src/groff-* && ( cd src/groff-* ; make uninstall )
( cd /usr/bin
  rm -f addftinfo afmtodit chem eqn eqn2graph gdiffmk grap2graph grn grodvi \
   groff groffer grog grolbp grolj4 grops grotty gxditview hpftodit indxbib \
   lookbib mmroff neqn nroff pfbtops pic pic2graph post-grohtml pre-grohtml \
   preconv refer soelim tbl tfmtodit troff xtotroff )
rm -f /etc/X11/app-defaults/GXditview /usr/info/groff.info
test -d /usr/lib/groff && rm -r /usr/lib/groff
test -d /usr/lib64/groff && rm -r /usr/lib64/groff
test -d /usr/share/groff && rm -r /usr/share/groff
exit
find ~/src -maxdepth 1 -type d -name "groff-*" -exec rm -r {} \;
rm -f ~/installed/groff-*.tar.*

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EDT -0400)
HOWTO last updated: 2025-03-30 5:09pm
Copyright © 2001-2025 Jason Englander. All Rights reserved.
[HTML5]