1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-05 06:27:37 +00:00

- Update to 1.70

- Use options helpers
- Use test framework

PR:		204325
Submitted by:	amdmi3
Approved by:	maintainer timeout (bf, 2 weeks)
This commit is contained in:
Dmitry Marakasov 2015-11-23 20:24:26 +00:00
parent 6ce470c38c
commit b0d65ac40f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=402326
2 changed files with 28 additions and 41 deletions

View File

@ -2,14 +2,14 @@
# $FreeBSD$
PORTNAME= cppcheck
PORTVERSION= 1.69
PORTVERSION= 1.70
CATEGORIES= devel
MASTER_SITES= SF
MAINTAINER= bf@FreeBSD.org
COMMENT= Static analysis of C/C++ code
LICENSE= GPLv3
LICENSE= GPLv3 # or later
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libtinyxml2.so:${PORTSDIR}/textproc/tinyxml2
@ -17,8 +17,12 @@ LIB_DEPENDS= libtinyxml2.so:${PORTSDIR}/textproc/tinyxml2
USES= compiler:c++11-lib execinfo gmake tar:bzip2
ALL_TARGET= cppcheck
TEST_TARGET= test
LDFLAGS+= -L${LOCALBASE}/lib -lexecinfo
MAKE_ENV+= TINYXML=-ltinyxml2
MAKE_ENV+= TINYXML=-ltinyxml2 CFGDIR="${DATADIR}/cfg"
PLIST_FILES= bin/cppcheck bin/cppcheck-htmlreport
PORTDATA= *
OPTIONS_DEFINE= MATCHCOMPILER RULES MANPAGES
OPTIONS_DEFAULT= MATCHCOMPILER RULES MANPAGES
@ -26,63 +30,46 @@ OPTIONS_DEFAULT= MATCHCOMPILER RULES MANPAGES
MATCHCOMPILER_DESC= Build-time optimizations via Python
RULES_DESC= User-defined rule support (requires PCRE)
PLIST_FILES= bin/cppcheck bin/cppcheck-htmlreport
MANPAGES_ALL_TARGET= man
MANPAGES_BUILD_DEPENDS= xsltproc:${PORTSDIR}/textproc/libxslt \
${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl
MANPAGES_MAKE_ENV= DB2MAN="${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl"
MANPAGES_PLIST_FILES= man/man1/cppcheck.1.gz
.include <bsd.port.options.mk>
MATCHCOMPILER_MAKE_ENV= SRCDIR=build
MATCHCOMPILER_USES= python:2,build
MAKE_ENV+= CFGDIR="${DATADIR}/cfg"
PORTDATA= *
.if ${PORT_OPTIONS:MMANPAGES}
ALL_TARGET+= man
BUILD_DEPENDS+= xsltproc:${PORTSDIR}/textproc/libxslt \
${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl
MAKE_ENV+= DB2MAN="${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl"
PLIST_FILES+= man/man1/cppcheck.1.gz
post-install:
@${INSTALL_MAN} ${WRKSRC}/cppcheck.1 ${STAGEDIR}${PREFIX}/man/man1
.endif
.if ${PORT_OPTIONS:MMATCHCOMPILER}
MAKE_ENV+= SRCDIR=build
USES+= python:2,build
.endif
.if ${PORT_OPTIONS:MRULES}
LIB_DEPENDS+= libpcre.so:${PORTSDIR}/devel/pcre
MAKE_ENV+= HAVE_RULES=yes
.endif
RULES_LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre
RULES_MAKE_ENV= HAVE_RULES=yes
post-patch:
@${REINPLACE_CMD} \
-e 's|-Iexternals/tinyxml|-I${LOCALBASE}/include|' \
${WRKSRC}/Makefile
.if ${PORT_OPTIONS:MMANPAGES}
post-patch-MANPAGES-on:
@${REINPLACE_CMD} -e '\|DB2MAN=|d' \
${WRKSRC}/Makefile
.endif
.if ${PORT_OPTIONS:MMATCHCOMPILER}
post-patch-MATCHCOMPILER-on:
@${REINPLACE_CMD} -e 's|python|${PYTHON_CMD}|' \
${WRKSRC}/Makefile
.endif
.if ${PORT_OPTIONS:MRULES}
post-patch-RULES-on:
@${REINPLACE_CMD} \
-e '\|CXXFLAGS +=| \
s| -DTIXML_USE_STL $$(shell pcre-config --cflags)||' \
-e '\|$$(SRCDIR)/cppcheck.cpp| \
s|$${INCLUDE_FOR_LIB}|& $$(shell pcre-config --cflags)|' \
${WRKSRC}/Makefile
.endif
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/cppcheck ${STAGEDIR}${PREFIX}/bin
@${INSTALL_SCRIPT} ${WRKSRC}/htmlreport/cppcheck-htmlreport ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/cppcheck ${STAGEDIR}${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/htmlreport/cppcheck-htmlreport ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${DATADIR}/cfg
@cd ${WRKSRC}/cfg; ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/cfg/
check regression-test test: build
@cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test
do-install-MANPAGES-on:
${INSTALL_MAN} ${WRKSRC}/cppcheck.1 ${STAGEDIR}${PREFIX}/man/man1
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (cppcheck-1.69.tar.bz2) = 4bd5c8031258ef29764a4c92666384238a625beecbb2aceeb7065ec388c7532e
SIZE (cppcheck-1.69.tar.bz2) = 1052984
SHA256 (cppcheck-1.70.tar.bz2) = c6aaafd41b4c2050f3fb96a4aa159507007403a163d05361bd9544e5baf18f39
SIZE (cppcheck-1.70.tar.bz2) = 1111291