1# Contributor: Leo <thinkabit.ukim@gmail.com>2# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>3# Maintainer: Natanael Copa <ncopa@alpinelinux.org>4pkgname=mandoc5pkgver=1.14.66pkgrel=177pkgdesc="mandoc (formerly mdocml) UNIX manpage compiler toolset"8url="https://mandoc.bsd.lv/"9arch="all"10license="ISC"11# Requires a BusyBox version which accept's -T in less(1).12depends="busybox>=1.38.0-r5"13makedepends="zlib-dev"14checkdepends="perl"15install="$pkgname-apropos.post-deinstall"16replaces="mdocml"17subpackages="$pkgname-doc $pkgname-dev $pkgname-apropos $pkgname-soelim"18source="https://mandoc.bsd.lv/snapshots/mandoc-$pkgver.tar.gz19 fix-core-dump-tag-put-assertion.patch20 shared-libmandoc.patch21 outdated-warn-disable.patch22 empty-title.patch23 $pkgname.cron24 "2526# higher than community/man-db for this27provides="doc-provider mdocml=$pkgver-r$pkgrel"28provider_priority=1002930prepare() {31 default_prepare3233 cat >configure.local<<-__EOF__34 PREFIX=/usr35 MANDIR=/usr/share/man36 LIBDIR=/usr/lib37 CFLAGS="$CFLAGS"38 UTF8_LOCALE="en_US.UTF-8"39 MANPATH_DEFAULT="/usr/share/man:/usr/local/man:/usr/local/share/man"40 MANPATH_BASE="/usr/share/man"41 LN="ln -sf"42__EOF__43}4445build() {46 ./configure47 [ "$(awk '/HAVE_LESS_T/ {print $3}' config.h)" -eq 1 ] || \48 die "Failed to correctly detect tagfile support"49 make50}5152check() {53 LD_LIBRARY_PATH="$builddir" make regress54}5556package() {57 make -j1 DESTDIR="$pkgdir" base-install lib-install58}5960apropos() {61 pkgdesc="makewhatis/whatis and apropos tools and index"62 amove usr/bin/apropos usr/bin/whatis usr/sbin/makewhatis63 install -Dm755 "$srcdir"/$pkgname.cron \64 "$subpkgdir"/etc/periodic/daily/makewhatis65}6667soelim() {68 pkgdesc="so elimination tool"69 depends=""70 amove usr/bin/soelim71}7273sha512sums="7454286070812a47b629f68757046d3c9a1bdd2b5d1c3b84a5c8e4cb92f1331afa745443f7238175835d8cfbe5b8dd442e00c75c3a5b5b8f8efd8d2ec8f636dad4 mandoc-1.14.6.tar.gz755b71606015fab924612a6c22ec46ac0df06b28cf1c92e1ff24829aec8c206fb22bd2961c928d1a1f056fa7064b22f016dc0ece5f4d1dd28b6ce562417c505fed fix-core-dump-tag-put-assertion.patch76b512bcb8bae11853a3006e2122d7e652806d4bf2234638d8809fd823375b5b0bd590f7d6a90412baffcc3b7b6a0f197a10986728a70f24fe628f91bfb651d266 shared-libmandoc.patch776eda39920cccb1238b104bb90ac4be2c32883897c72363560d8d39345819cdeff535680e78396052b2b8f981e169ad9b3c30da724def80a1501785d82ce7fa25 outdated-warn-disable.patch780bad44e3640f5521df6bb510a7fe9053bebf3df9213ca8f249abbdf1144eafd533d67c4f22e34cd86e53e12648a2cd1cf6d873892640d7c82ce93bbc382c303c empty-title.patch791af9627ee519ecf7d4962db52c83b28f3eb4e9fc6bf38e674bd5e17b21076c3c74c9eed2a1161812f8ac0c75471986b73fcf0acfc7065bc2c15280e1d696a00b mandoc.cron80"