summaryrefslogtreecommitdiffstats
path: root/textproc/unrtf/Makefile
blob: 320c3086ed982561260eee9d62b2900430308a0b (plain)
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
# Created by: Oliver Braun <obraun@informatik.unibw-muenchen.de>
# $FreeBSD$

PORTNAME=	unrtf
PORTVERSION=	0.21.5
CATEGORIES=	textproc
MASTER_SITES=	GNU

MAINTAINER=	bf@FreeBSD.org
COMMENT=	Converter from RTF to several formats, including HTML and LaTeX

LICENSE=	GPLv3

USES=		gmake iconv
GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--libdir=${PREFIX}/share

PLIST_FILES=	bin/unrtf \
		%%DATADIR%%/SYMBOL.charmap \
		%%DATADIR%%/html.conf \
		%%DATADIR%%/latex.conf \
		%%DATADIR%%/rtf.conf \
		%%DATADIR%%/text.conf \
		%%DATADIR%%/troff_mm.conf \
		%%DATADIR%%/vt.conf \
		man/man1/unrtf.1.gz

CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}

post-patch:
	@${FIND} -X ${WRKSRC} -type f -and -name "*.[1h]" | ${XARGS} \
		${REINPLACE_CMD} -e \
		's|/usr/local/lib/unrtf/|${DATADIR}/|g'
	@${REINPLACE_CMD} -e '/^attr_get_param/,/^}/s/return;/return NULL;/' \
		${WRKSRC}/src/attr.c

check regression-test test: build
	@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} check)

.include <bsd.port.mk>
OpenPOWER on IntegriCloud