ports/186588: [patch] Fix installation failure without DOCS for devel/cppcheck
Kevin Zheng
kevinz5000 at gmail.com
Sun Feb 9 15:10:00 UTC 2014
>Number: 186588
>Category: ports
>Synopsis: [patch] Fix installation failure without DOCS for devel/cppcheck
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Feb 09 15:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Kevin Zheng
>Release: 10.0-RELEASE
>Organization:
>Environment:
FreeBSD epsilon.local 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root at snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
devel/cppcheck installs a man page when DOCS is set. If DOCS is not set, the man page is not installed, but still appears in PLIST_FILES, resulting in an installation failure. There are two ways to solve this problem:
1) Unconditionally install the man page, since they're pretty much essential for everybody (my way)
2) Change the PLIST_FILES to a conditional entry, that is: add the man page only if DOCS is enabled
Personally I like #1, and that's what my patch does.
>How-To-Repeat:
Install devel/cppcheck without DOCS set.
>Fix:
Apply the attached patch.
Patch attached with submission follows:
diff --git a/devel/cppcheck/Makefile b/devel/cppcheck/Makefile
index ad33b23..59a82ba 100644
--- a/devel/cppcheck/Makefile
+++ b/devel/cppcheck/Makefile
@@ -35,7 +35,6 @@ MAKE_ENV+= CFGDIR="${DATADIR}/cfg"
PORTDATA= *
.endif
-.if ${PORT_OPTIONS:MDOCS}
ALL_TARGET+= man
BUILD_DEPENDS+= xsltproc:${PORTSDIR}/textproc/libxslt \
${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl
@@ -43,7 +42,6 @@ MAKE_ENV+= DB2MAN="${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl"
post-install:
@${INSTALL_MAN} ${WRKSRC}/cppcheck.1 ${STAGEDIR}${PREFIX}/man/man1
-.endif
.if ${PORT_OPTIONS:MMATCHCOMPILER}
MAKE_ENV+= SRCDIR=build
@@ -59,10 +57,8 @@ post-patch:
@${REINPLACE_CMD} \
-e 's|-Iexternals -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
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list