app-text/mandoc: add recipe (#1990)

This commit is contained in:
Leorize
2017-12-28 20:22:51 +07:00
committed by fbrosson
parent bcc3b3d3ef
commit 6d360986c2
3 changed files with 573 additions and 0 deletions

View File

@@ -0,0 +1,110 @@
SUMMARY="A suite of tools compiling mdoc from the OpenBSD project"
DESCRIPTION="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, ISO C, ISC-licensed, 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 UNIX terminals, \
HTML 5, PostScript, and PDF."
HOMEPAGE="http://mandoc.bsd.lv/"
# Copyrights should be updated on every new release
# http://mandoc.bsd.lv/cgi-bin/cvsweb/LICENSE
COPYRIGHT="2008-2012, 2014 Kristaps Dzonsons
2010-2017 Ingo Schwarze
2009, 2010, 2011, 2012 Joerg Sonnenberger
2013 Franco Fichtner
2014 Baptiste Daroussin
2016 Ed Maste
2017 Michael Stapelberg
1999, 2004 Marc Espie
1998, 2004, 2010 Todd C. Miller
2008, 2017 Otto Moerbeek
2004 Ted Unangst
1994 Christos Zoulas
2003, 2007, 2008, 2014 Jason McIntyre
2014 Baptiste Daroussin
1989, 1990, 1993, 1994 The Regents of the University of California
1994 Christos Zoulas"
LICENSE="ISC
BSD (2-clause)
BSD (3-clause)"
REVISION="1"
SOURCE_URI="http://mandoc.bsd.lv/snapshots/mandoc-$portVersion.tar.gz"
CHECKSUM_SHA256="0b0c8f67958c1569ead4b690680c337984b879dfd2ad4648d96924332fd99528"
PATCHES="mandoc-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
mandoc$secondaryArchSuffix = $portVersion
cmd:apropos = $portVersion
cmd:demandoc = $portVersion
cmd:makewhatis = $portVersion
cmd:man = $portVersion
cmd:mandoc = $portVersion
cmd:mandocd = $portVersion
cmd:soelim = $portVersion
cmd:whatis = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
CONFLICTS="
cmd:man
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cc$secondaryArchSuffix
cmd:make
"
TEST_REQUIRES="
cmd:diff
cmd:perl
"
BUILD_PREREQUIRES+="$TEST_REQUIRES"
USER_SETTINGS_FILES="settings/man.conf"
BUILD()
{
cat > configure.local << EOF
CFLAGS='-O2 -pipe -D_BSD_SOURCE'
DBDIR='$(finddir B_SYSTEM_VAR_DIRECTORY)/mandoc'
HAVE_ERR=1
HAVE_PROGNAME=1
HAVE_STRSEP=1
LDFLAGS="-lbsd"
LN='ln -sf'
MANDIR='$manDir'
PREFIX='$prefix'
SBINDIR="\${PREFIX}/bin"
SYSCONFDIR='$sysconfDir'
UTF8_LOCALE='en.UTF-8'
EOF
./configure
make $jobArgs
}
INSTALL()
{
make install
sed -i \
-e "s|/etc/man.conf|$(finddir B_SYSTEM_SETTINGS_DIRECTORY)/man.conf|" \
$manDir/man1/apropos.1 \
$manDir/man1/man.1 \
$manDir/man5/man.conf.5 \
$manDir/man8/makewhatis.8
}
TEST()
{
make regress
}