aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/docbook-to-man/Makefile
blob: ebb2b73cf8c582a8d22de24b291ff97a58749f16 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# New ports collection makefile for:    gnupg-devel
# Date created:     5 Oct 2001
# Whom:         Cyrille Lefevre <clefevre@citeweb.net>
#
# $FreeBSD$
#

PORTNAME=   docbook-to-man
PORTVERSION=    1.0
CATEGORIES= textproc
MASTER_SITES=   http://www.oasis-open.org/docbook/tools/dtm/
DISTNAME=   ${PORTNAME}

MAINTAINER= cyrille.lefevre@laposte.net
COMMENT=    A DocBook SGML DTD into nroff/troff -man macros converter

.include <bsd.port.pre.mk>

# Global variables
#

# There are two ports that satisfy the nsgmls requirement.
# Jade is preferred, but it currently doesn't compile on 2.1.x
# system, so use sp in that case.

.if ${MACHINE_ARCH} == "alpha"
WITH_OPENJADE=  yes
.endif

.if ${OSVERSION} < 220000
RUN_DEPENDS=    nsgmls:${PORTSDIR}/textproc/sp
.elif defined(WITH_OPENJADE)
RUN_DEPENDS=    onsgmls:${PORTSDIR}/textproc/openjade
.else
RUN_DEPENDS=    nsgmls:${PORTSDIR}/textproc/jade
.endif
RUN_DEPENDS+=   ${LOCALBASE}/share/sgml/docbook:${PORTSDIR}/textproc/docbook

USE_REINPLACE=  yes
USE_IMAKE=  yes
PREFIX?=    ${LOCALBASE}
USE_XLIB=   yes
XFREE86_HTML_MAN= no

MAN1=   oinstant.1

# Local variables
#

.if defined(WITH_OPENJADE)
NSGMLS=     onsgmls
.else
NSGMLS=     nsgmls
.endif

# Post extract
#

post-extract: move-instant.1

move-instant.1:
    @${MV} ${WRKSRC}/Doc/instant.1 ${WRKSRC}/Instant/oinstant.man

# Post patch
#

post-patch: patch-docbook-to-man

patch-docbook-to-man:
    @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|;s|%%NSGMLS%%|${NSGMLS}|' \
        ${WRKSRC}/cmd/docbook-to-man.sh

.include <bsd.port.post.mk>