mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-22 08:58:47 +00:00
update to 1.58; sort some assignments; shorten a long line;
trim Makefile header; fix header search order; make it possible to build a slim version with minimal dependencies
This commit is contained in:
parent
69d1f269ca
commit
f4cb02c443
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=310506
@ -1,13 +1,8 @@
|
||||
# New ports collection makefile for: cppcheck
|
||||
# Date created: March 3, 2009
|
||||
# Whom: Gabor Pali <pgj@FreeBSD.org>
|
||||
#
|
||||
# Created by: Gabor Pali <pgj@FreeBSD.org>
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= cppcheck
|
||||
PORTVERSION= 1.57
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 1.58
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}/
|
||||
|
||||
@ -16,38 +11,74 @@ COMMENT= Static analysis of C/C++ code
|
||||
|
||||
LICENSE= GPLv3
|
||||
|
||||
LIB_DEPENDS= pcre:${PORTSDIR}/devel/pcre \
|
||||
tinyxml:${PORTSDIR}/textproc/tinyxml
|
||||
LIB_DEPENDS= tinyxml:${PORTSDIR}/textproc/tinyxml
|
||||
|
||||
USE_GMAKE= yes
|
||||
USE_BZIP2= yes
|
||||
USE_GMAKE= yes
|
||||
|
||||
ALL_TARGET= cppcheck
|
||||
LDFLAGS+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib
|
||||
CPPFLAGS+= -I${LOCALBASE}/include
|
||||
MAKE_ENV+= HAVE_RULES=yes TINYXML=-ltinyxml
|
||||
MAKE_ENV+= TINYXML=-ltinyxml
|
||||
|
||||
OPTIONS_DEFINE= MATCHCOMPILER RULES
|
||||
OPTIONS_DEFAULT= MATCHCOMPILER RULES
|
||||
|
||||
MATCHCOMPILER_DESC= Build-time optimizations via Python
|
||||
RULES_DESC= User-defined rule support (requires PCRE)
|
||||
|
||||
PLIST_FILES= bin/cppcheck
|
||||
|
||||
ALL_TARGET= cppcheck
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
ALL_TARGET+= man
|
||||
BUILD_DEPENDS+= xsltproc:${PORTSDIR}/textproc/libxslt \
|
||||
${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl
|
||||
|
||||
MANCOMPRESSED= no
|
||||
MAKE_ENV+= DB2MAN="${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl"
|
||||
MAN1= cppcheck.1
|
||||
ALL_TARGET+= man
|
||||
MANCOMPRESSED= no
|
||||
|
||||
post-install:
|
||||
@${INSTALL_MAN} ${WRKSRC}/cppcheck.1 ${PREFIX}/man/man1
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MMATCHCOMPILER}
|
||||
MAKE_ENV+= SRCDIR=build
|
||||
USE_PYTHON_BUILD= 2.6+
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MRULES}
|
||||
LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
|
||||
MAKE_ENV+= HAVE_RULES=yes
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} \
|
||||
-e 's|-Iexternals/tinyxml|-I${LOCALBASE}/include|' \
|
||||
${WRKSRC}/Makefile
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
@${REINPLACE_CMD} -e '\|DB2MAN=|d' \
|
||||
${WRKSRC}/Makefile
|
||||
.endif
|
||||
.if ${PORT_OPTIONS:MMATCHCOMPILER}
|
||||
@${REINPLACE_CMD} -e 's|python|${PYTHON_CMD}|' \
|
||||
${WRKSRC}/Makefile
|
||||
.endif
|
||||
.if ${PORT_OPTIONS:MRULES}
|
||||
@${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 ${PREFIX}/bin
|
||||
|
||||
check regression-test test: build
|
||||
@(cd ${BUILD_WRKSRC}; \
|
||||
${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} test)
|
||||
${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} \
|
||||
${_MAKE_JOBS} ${MAKE_ARGS} test)
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (cppcheck-1.57.tar.bz2) = 8774a804e08465787e3ddc3af9faf496606c207aa65f750eefd2851a9ccdafd5
|
||||
SIZE (cppcheck-1.57.tar.bz2) = 1180272
|
||||
SHA256 (cppcheck-1.58.tar.bz2) = d82e98f83ad9fa963d8f9f72d73b409abe13a35aaf302a86a0114a161715b19b
|
||||
SIZE (cppcheck-1.58.tar.bz2) = 1230439
|
||||
|
@ -1,23 +0,0 @@
|
||||
--- Makefile.orig 2011-12-10 07:00:45.000000000 -0500
|
||||
+++ Makefile 2011-12-10 23:10:57.000000000 -0500
|
||||
@@ -31,17 +31,17 @@
|
||||
endif
|
||||
|
||||
ifndef INCLUDE_FOR_CLI
|
||||
- INCLUDE_FOR_CLI=-Ilib -Iexternals -Iexternals/tinyxml
|
||||
+ INCLUDE_FOR_CLI=-Ilib -Iexternals
|
||||
endif
|
||||
|
||||
ifndef INCLUDE_FOR_TEST
|
||||
- INCLUDE_FOR_TEST=-Ilib -Icli -Iexternals -Iexternals/tinyxml
|
||||
+ INCLUDE_FOR_TEST=-Ilib -Icli -Iexternals
|
||||
endif
|
||||
|
||||
BIN=$(DESTDIR)$(PREFIX)/bin
|
||||
|
||||
# For 'make man': sudo apt-get install xsltproc docbook-xsl docbook-xml on Linux
|
||||
-DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
|
||||
+DB2MAN=${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl
|
||||
XP=xsltproc -''-nonet -''-param man.charmap.use.subset "0"
|
||||
MAN_SOURCE=man/cppcheck.1.xml
|
||||
|
Loading…
Reference in New Issue
Block a user