Tweak math/tvmet version 1.7.2
[dports.git] / math / tvmet / Makefile
1 # Created by: ijliao
2 # $FreeBSD$
3
4 PORTNAME=       tvmet
5 PORTVERSION=    1.7.2
6 CATEGORIES=     math
7 MASTER_SITES=   SF/${PORTNAME}/Tar.Gz_Bz2%20Archive/${PORTVERSION}
8
9 MAINTAINER=     ports@FreeBSD.org
10 COMMENT=        Tiny Vector and Matrix template library
11
12 LICENSE=        LGPL21 # (or later)
13
14 OPTIONS_DEFINE= CPPUNIT DEBUG DOCS EXAMPLES
15
16 USE_BZIP2=      yes
17 USES=           gmake
18 USE_AUTOTOOLS=  libtool
19 CONFIGURE_ARGS= --with-cxx=${CXX}
20
21 .include <bsd.port.options.mk>
22
23 .if ${PORT_OPTIONS:MCPPUNIT}
24 LIB_DEPENDS+=   libcppunit-1.12.so:${PORTSDIR}/devel/cppunit
25 CONFIGURE_ARGS+=        --with-cppunit-prefix=${LOCALBASE}
26 .else
27 CONFIGURE_ENV+= ac_cv_path_CPPUNIT_CONFIG=no
28 .endif
29
30 .if ${PORT_OPTIONS:MDEBUG}
31 CXXFLAGS+=      -DTVMET_DEBUG
32 .else
33 CXXFLAGS+=      -DTVMET_OPTIMIZE
34 .endif
35
36 post-patch:
37         @${REINPLACE_CMD} -e 's|= -O |= |g' ${WRKSRC}/doc/Makefile.in
38
39 post-install:
40         @${MKDIR} ${STAGEDIR}${DOCSDIR}
41 .for ext in dox cc css h png
42         (cd ${WRKSRC}/doc && ${INSTALL_DATA} *.${ext} \
43                 ${STAGEDIR}${DOCSDIR})
44 .endfor
45         @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
46 .for ext in cc
47         (cd ${WRKSRC}/examples && ${INSTALL_DATA} *.${ext} \
48                 ${STAGEDIR}${EXAMPLESDIR})
49 .endfor
50
51 .include <bsd.port.mk>