I would like to contribute mandoc. Also present in Debian, Fedora, Ubuntu, ... and as the default man page formatter on *BSD.

Useful to check man pages for compatibility with *BSD systems.

The build is reproducible without the need to export SOURCE_DATE_EPOCH.

SUMMARY="BSD mandoc compiler toolset"

DESCRIPTION="\
mandoc is a suite of tools compiling mdoc, the roff macro language of
choice for BSD manual pages, and man, the predominant historical language
for UNIX manuals.  It is small, self-contained, and quite fast.  The main
component of the toolset is the mandoc utility program, based on the
libmandoc validating compiler, to format output for UTF-8 and ASCII
terminals, HTML 5, PostScript, and PDF."

mandoc-1.14.6-1.tar.xz:
usr/bin/demandoc.exe
usr/bin/mandoc.exe
usr/bin/mapropos -> mandoc
usr/bin/mman -> mandoc
usr/bin/msoelim.exe
usr/bin/mwhatis -> mandoc
usr/sbin/mandocdb -> ../bin/mandoc
usr/share/doc/mandoc/*
usr/share/man/man1/demandoc.1.gz
usr/share/man/man1/mandoc.1.gz
usr/share/man/man1/mapropos.1.gz
usr/share/man/man1/mman.1.gz
usr/share/man/man1/msoelim.1.gz
usr/share/man/man1/mwhatis.1.gz
usr/share/man/man5/mandoc.conf.5.gz
usr/share/man/man5/mandoc.db.5.gz
usr/share/man/man7/mandoc_char.7.gz
usr/share/man/man7/mandoc_eqn.7.gz
usr/share/man/man7/mandoc_man.7.gz
usr/share/man/man7/mandoc_mdoc.7.gz
usr/share/man/man7/mandoc_roff.7.gz
usr/share/man/man7/mandoc_tbl.7.gz
usr/share/man/man8/mandocdb.8.gz

--
Regards,
Christian

# cygport script for mandoc
NAME=mandoc
VERSION=1.14.6
RELEASE=1
SOURCE_DATE="2024-03-11 18:00:00 UTC"

SUMMARY="BSD mandoc compiler toolset"

DESCRIPTION="\
mandoc is a suite of tools compiling mdoc, the roff macro language of
choice for BSD manual pages, and man, the predominant historical language
for UNIX manuals.  It is small, self-contained, and quite fast.  The main
component of the toolset is the mandoc utility program, based on the
libmandoc validating compiler, to format output for UTF-8 and ASCII
terminals, HTML 5, PostScript, and PDF."

LICENSE="ISC"
CATEGORY="Text"
REQUIRES="" # zlib0
BUILD_REQUIRES="binutils gcc-core perl_base" # make

HOMEPAGE="https://mandoc.bsd.lv/";
SRC_URI="https://mandoc.bsd.lv/snapshots/${P}.tar.gz";

SOURCE_DATE_EPOCH=$(date -d "${SOURCE_DATE}" +%s) # 'export' is not needed

src_compile() {
        cd ${B}
        lndirs

        cat <<-EOF > configure.local
                OSNAME="Cygwin"

                PREFIX="/usr"
                MANDIR="/usr/share/man"
                MANPATH_BASE="/usr/share/man"
                MANPATH_DEFAULT="/usr/share/man:/usr/local/share/man"

                HAVE_WCHAR=1
                CFLAGS="${CFLAGS}"
                LDFLAGS="${LDFLAGS}"
                LN="ln -sf"

                BINM_APROPOS="mapropos"     # "apropos"
                BINM_MAKEWHATIS="mandocdb"  # "makewhatis"
                BINM_MAN="mman"             # "man"
                BINM_SOELIM="msoelim"       # "soelim"
                BINM_WHATIS="mwhatis"       # "whatis"
                MANM_EQN="mandoc_eqn"       # "eqn"
                MANM_MANCONF="mandoc.conf"  # "man.conf"
                MANM_MAN="mandoc_man"       # "man"
                MANM_MDOC="mandoc_mdoc"     # "mdoc"
                MANM_ROFF="mandoc_roff"     # "roff"
                MANM_TBL="mandoc_tbl"       # "tbl"
        EOF

        # No cygconf because ./configure is not generated
        ./configure

        cygmake
}

src_test() {
        cd ${B}/regress
        ./regress.pl . ascii tag man html markdown lint

        # Unicode chars >= U+10000 do not work
        # U+1D6C1 (Mathematical Bold Nabla) is output as U+D6C1 (Hangul 
Syllable Hyot)
        ./regress.pl . utf8 ||
                inform "The above failure of the 'nabla' testcase could be 
safely ignored"
}

Reply via email to