1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-29 10:18:30 +00:00

Correct the plist for the case when the manpage isn't built, and

use a more specific option name

PR:		186588, 186795
Submitted by:	amdmi3, K. Zheng
This commit is contained in:
Brendan Fabeny 2014-03-03 16:36:37 +00:00
parent 6a73fedbcf
commit da20974526
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=346928

View File

@ -20,13 +20,13 @@ ALL_TARGET= cppcheck
LDFLAGS+= -L${LOCALBASE}/lib
MAKE_ENV+= TINYXML=-ltinyxml2
OPTIONS_DEFINE= MATCHCOMPILER RULES
OPTIONS_DEFAULT= MATCHCOMPILER RULES
OPTIONS_DEFINE= MATCHCOMPILER RULES MANPAGES
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 man/man1/cppcheck.1.gz
PLIST_FILES= bin/cppcheck bin/cppcheck-htmlreport
.include <bsd.port.options.mk>
@ -35,12 +35,14 @@ MAKE_ENV+= CFGDIR="${DATADIR}/cfg"
PORTDATA= *
.endif
.if ${PORT_OPTIONS:MDOCS}
.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
@ -59,7 +61,7 @@ post-patch:
@${REINPLACE_CMD} \
-e 's|-Iexternals -Iexternals/tinyxml|-I${LOCALBASE}/include|' \
${WRKSRC}/Makefile
.if ${PORT_OPTIONS:MDOCS}
.if ${PORT_OPTIONS:MMANPAGES}
@${REINPLACE_CMD} -e '\|DB2MAN=|d' \
${WRKSRC}/Makefile
.endif