aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/html2text/Makefile
blob: c8949fd62a95857e988a1d3294cee6ba97b310a2 (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
# Created by: Simon 'corecode' Schubert <corecode@corecode.ath.cx>
# $FreeBSD$

PORTNAME=   html2text
PORTVERSION=    1.3.2a
CATEGORIES= textproc
MASTER_SITES=   ${MASTER_SITE_SUNSITE} \
        http://www.mbayer.de/html2text/downloads/
MASTER_SITE_SUBDIR= apps/www/converters

MAINTAINER= eadler@FreeBSD.org
COMMENT=    Converts HTML documents into plain text

HAS_CONFIGURE=  yes
MAKE_ARGS=  CXX="${CXX}"

MANCOMPRESSED=  yes
MAN1=       html2text.1
MAN5=       html2textrc.5
PORTDOCS=   CHANGES CREDITS KNOWN_BUGS README TODO
PLIST_FILES=    bin/html2text

CONFLICTS=  py27-html2text-[0-9]*

post-patch:
    @${REINPLACE_CMD} -e '/echo=/s/ -e//' ${WRKSRC}/configure
.for file in Makefile.in libstd/Makefile.in
    @${REINPLACE_CMD} -e '/^DEBUG/s/^/#/; \
         /^CXXFLAGS/s/=/+=/' ${WRKSRC}/${file}
.endfor
.for file in Area.h HTMLControl.h Properties.h format.h
    @${REINPLACE_CMD} -e 's/<istream>/<iostream>/' ${WRKSRC}/${file}
.endfor

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/html2text ${PREFIX}/bin
    ${INSTALL_MAN} ${WRKSRC}/html2text.1.gz ${MANPREFIX}/man/man1
    ${INSTALL_MAN} ${WRKSRC}/html2textrc.5.gz ${MANPREFIX}/man/man5
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for file in ${PORTDOCS}
    ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.mk>