PKGNAME=groff
PKGDES="GNU Nroff alternative"
PKGSEC=utils
PKGDEP="glibc ncurses perl uchardet"
# NOTE: Type-1 URW fonts must present during build.
# They are used to build some examples, which we would discard.
# However, if we disable these examples completely, we will miss some
# executables.
BUILDDEP="urw-fonts"

ABTYPE=autotools

# FIXME: Re-configure with autoreconf(1).
#
# '[...]/groff-1.24.1/autogen.sh' -> '[...]/groff-1.24.1/bootstrap'
# [...]/groff-1.24.1/bootstrap: Bootstrapping from a non-checked-out distribution is risky.
ABNOBOOTSTRAP=1
ABNOAUTOGEN=1

# FIXME: Installation fails with parallelism with many-core systems.
NOPARALLEL=1

AUTOTOOLS_AFTER=(
    '--enable-threads'
    '--disable-rpath'
    '--disable-groff-allocator'
    '--enable-year2038'
    '--with-x'
    '--with-uchardet=yes'
    '--with-urw-fonts'
    '--with-urw-fonts-dir=/usr/share/fonts/Type1'
    '--with-compatibility-wrappers=check'
    '--with-gs=/usr/bin/gs'
)

# Needed by Afterglow, whereas FAIL_ARCH defaults to mainline-only.
FAIL_ARCH="!(mainline|retro)"
