aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/htmltolatex/Makefile
blob: a2d08eaa3fe1082a3f9f34b605063d103175df1c (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
# Created by: ijliao
# $FreeBSD$

PORTNAME=   htmltolatex
PORTVERSION=    1
PORTREVISION=   21
CATEGORIES= textproc
MASTER_SITES=   http://people.FreeBSD.org/~foxfair/distfiles/
DISTNAME=   ${PORTNAME}

MAINTAINER= pi@FreeBSD.org
COMMENT=    HTML to LaTeX to PDF Converter

LICENSE=    GPLv2+
LICENSE_FILE=   ${WRKSRC}/copying.txt

LIB_DEPENDS=    libGraphicsMagick++.so:graphics/GraphicsMagick

USES=       bison gmake
MAKEFILE=   GNUmakefile
MAKE_JOBS_UNSAFE=   yes
MAKE_ARGS=  CXX="${CXX}" \
        CXXFLAGS="${CXXFLAGS} -DUNIX \
            `GraphicsMagick++-config --cppflags`"

post-configure:
    ${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},g'   \
        -e 's,-lMagick,-lGraphicsMagick,g'  \
        -e 's,-lstdc++,,'   \
        -e 's,{quote},{tightquote},' ${WRKSRC}/QA/test1*_baseline*.tex \
        ${WRKSRC}/${MAKEFILE}

post-build test:
    @if ! cd ${WRKSRC}/QA && ./run_tests;   \
    then    \
        ${CAT} ${WRKSRC}/QA/*.diff; \
        exit 1; \
    fi

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/h2l ${STAGEDIR}${PREFIX}/bin
    @${MKDIR} ${STAGEDIR}${DATADIR}
    ${INSTALL_DATA} ${WRKSRC}/nmr.tex ${STAGEDIR}${DATADIR}

.include <bsd.port.mk>