summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2013-09-12 10:48:51 +0000
committerjperkin <jperkin@pkgsrc.org>2013-09-12 10:48:51 +0000
commit28c45b64c6186aa64b6ec322a8210e85f98fe3f9 (patch)
treed2f768cdda72b23db33216fb38453cc7f31b1c50 /mk
parent99ad6391b876d08693ff162cc18eb833548041a5 (diff)
downloadpkgsrc-28c45b64c6186aa64b6ec322a8210e85f98fe3f9.tar.gz
Switch to textproc/mdocml as the tool replacement provider for 'nroff'.
The nroff tool is primarily used to generate catman pages, however there were circular dependency issues with using groff as the provider, as it has a large number of dependencies, some of which depend on nroff. mdocml is much smaller, has fewer dependencies, is BSD licensed, and is just as capable in nroff mode.
Diffstat (limited to 'mk')
-rw-r--r--mk/tools/replace.mk25
1 files changed, 23 insertions, 2 deletions
diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk
index 20d47833988..9fb01140b5f 100644
--- a/mk/tools/replace.mk
+++ b/mk/tools/replace.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.261 2013/08/17 12:00:37 richard Exp $
+# $NetBSD: replace.mk,v 1.262 2013/09/12 10:48:51 jperkin Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -991,10 +991,31 @@ TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/bin/g${_t_}
######################################################################
+# These tools are supplied by textproc/mdocml as replacements for their
+# groff counterparts. As this package has fewer dependencies it should
+# be preferred over groff wherever possible.
+#
+_TOOLS.mdocml= nroff
+
+.for _t_ in ${_TOOLS.mdocml}
+. if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_})
+. if !empty(PKGPATH:Mtextproc/mdocml)
+MAKEFLAGS+= TOOLS_IGNORE.${_t_}=
+. elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
+TOOLS_DEPENDS.${_t_}?= mdocml>=1.12.0nb3:../../textproc/mdocml
+TOOLS_CREATE+= ${_t_}
+TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=mdocml
+TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/bin/mandoc
+. endif
+. endif
+.endfor
+
+######################################################################
+
# These tools are all supplied by the textproc/groff package if there is
# no native tool available.
#
-_TOOLS.groff= groff nroff soelim tbl
+_TOOLS.groff= groff soelim tbl
.for _t_ in ${_TOOLS.groff}
. if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_})