[arch-commits] Commit in (mandoc mandoc/repos mandoc/trunk mandoc/trunk/PKGBUILD)
Eli Schwartz
eschwartz at archlinux.org
Thu Nov 26 00:23:31 UTC 2020
Date: Thursday, November 26, 2020 @ 00:23:31
Author: eschwartz
Revision: 761320
addpkg: mandoc 1.14.5-4: man implementation, alternative to man-db
Also provides mandoc(1) formatter used by https://jlk.fjfi.cvut.cz/arch/manpages/
and hopefully soon https://man.archlinux.org/
Added:
mandoc/
mandoc/repos/
mandoc/trunk/
mandoc/trunk/PKGBUILD
----------+
PKGBUILD | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
Added: mandoc/trunk/PKGBUILD
===================================================================
--- mandoc/trunk/PKGBUILD (rev 0)
+++ mandoc/trunk/PKGBUILD 2020-11-26 00:23:31 UTC (rev 761320)
@@ -0,0 +1,69 @@
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+# Contributor: Jakub Klinkovský <j.l.k at gmx.com>
+# Contributor: Matheus de Alcantara <matheus.de.alcantara at gmail.com>
+
+pkgname=mandoc
+pkgver=1.14.5
+pkgrel=4
+pkgdesc='A suite of tools compiling mdoc from the OpenBSD project'
+arch=('x86_64')
+url='https://mdocml.bsd.lv/'
+license=('ISC')
+depends=('zlib')
+provides=('man')
+conflicts=('man')
+source=("${url}/snapshots/${pkgname}-${pkgver}.tar.gz"
+ 'configure.local'
+ 'mandoc.service'
+ 'mandoc.timer'
+ 'fix-tbl-segfault.patch')
+sha256sums=('8219b42cb56fc07b2aa660574e6211ac38eefdbf21f41b698d3348793ba5d8f7'
+ '383772d5dd7c51319588ac4b63d4e7c452490568f6a3e905d118fdd6c4aa8a68'
+ '2091411d5f87a3c371a5ba74b4773d1e454046446fa2cb045485979e52419bb6'
+ '74d6a02b97a17fffddcc0a3dc830e811348b1f6c6b84f867882c776d50f00ea4'
+ '12e6138be6ec2e8a34373876d8a5fce387a1d2b51a461ae20e1d98637af1d15c')
+
+prepare() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+
+ cp ../configure.local .
+
+ # broken script tries to execute make to get $CC, fails due to env -i
+ # see https://savannah.gnu.org/bugs/index.php?57674
+ # fixed in CVS
+ sed -i -e 's/^CC=.*/CC=cc/' ./configure
+
+ # fix segfault when formatting tables on some man pages
+ # fixed in CVS
+ patch -Np0 -i ../fix-tbl-segfault.patch
+
+ # remove useless duplicate global variables
+ # broken with gcc 10 -fno-common, unused
+ # fixed in CVS
+ sed -i -e '/^int dummy;$/d' ./compat_*.c
+}
+
+build() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+
+ # apply CFLAGS and LDFLAGS from makepkg.conf
+ {
+ echo "CFLAGS=${CFLAGS at Q}"
+ echo "LDFLAGS=${LDFLAGS at Q}"
+ } >> configure.local
+
+ ./configure
+ make
+}
+
+package() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+
+ DESTDIR="${pkgdir}" make install
+ install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+
+ install -Dm644 "${srcdir}"/mandoc.timer "${pkgdir}"/usr/lib/systemd/system/mandoc.timer
+ install -Dm644 "${srcdir}"/mandoc.service "${pkgdir}"/usr/lib/systemd/system/mandoc.service
+ install -dm755 "${pkgdir}"/usr/lib/systemd/system/multi-user.target.wants
+ ln -s ../mandoc.timer "${pkgdir}"/usr/lib/systemd/system/multi-user.target.wants/mandoc.timer
+}
More information about the arch-commits
mailing list