Created
November 8, 2018 23:14
-
-
Save spchamp/fc34b65f884a64d548607c98751095d8 to your computer and use it in GitHub Desktop.
mk/docbook2x.buildlink3.mk - provides ports e.g textproc/expat with build configuration for docbook2X or xmlto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $NetBSD$ | |
# | |
# This Makefile fragment is meant to be included by ports that require | |
# a docbook2X implementation during build | |
# | |
# === Variables set by this file === | |
# | |
# DOCBOOK2X_TYPE | |
# The name of the selected docbook2X implementation. | |
# One of: docbook2X, docbook2x, xmlto | |
.include "bsd.fast.prefs.mk" | |
DOCBOOK2X_TYPE?= xmlto | |
## distpatch on DOCBOOK2X_TYPE to set 'configure' environment variable DOCBOOK_TO_MAN | |
.if !empty(DOCBOOK2X_TYPE:Mxmlto) | |
CONFIGURE_ENV+= DOCBOOK_TO_MAN="xmlto man --skip-validation" | |
BUILD_DEPENDS+= xmlto:../../textproc/xmlto | |
.elif !empty(DOCBOOK2X_TYPE:Mdocbook2[Xx]) | |
CONFIGURE_ENV+= DOCBOOK_TO_MAN="docbook2man" | |
BUILD_DEPENDS+= docbook2X:../../wip/docbook2X | |
.else | |
PKG_FAIL_REASON +="Unrecognized DOCBOOK2X_TYPE ${DOCBOOK2X_TYPE}" | |
.endif | |
I've tested this now, for the docbook2X
configuration case. The xmlwf(1) manual page is presented in a manner as equivalent to the xmlto
(default) configuration.
Will add this change to a local branch onto pkgsrc, along with a patched Makefile for textproc/expat
such that makes use of the additional buildlink resource, contributed here.
Along with an addition of this mk-files fragment, the pkgsrc Makefile textproc/expat/Makefile
may patched correspondingly, such that last two lines in the file will read as follows:
.include "../../mk/docbook2X.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
xmlto
case appears to result in appropriate formatting for the generated documentation, e.g xmlwf(1) as generated during thetextproc/expat
buildOnce the docbook2X build completes, will be able to test for the
DOCBOOK2X_TYPE=docbook2X
build-configuration case, also, with a rebuild oftextproc/expat
locally patched for this buildlink addition and thusly configured