# 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" }