diff options
-rw-r--r-- | devel/cppcheck/Makefile | 23 | ||||
-rw-r--r-- | devel/cppcheck/PLIST | 3 | ||||
-rw-r--r-- | devel/cppcheck/PLIST.qt | 10 | ||||
-rw-r--r-- | devel/cppcheck/options.mk | 45 |
4 files changed, 74 insertions, 7 deletions
diff --git a/devel/cppcheck/Makefile b/devel/cppcheck/Makefile index f06df33efcf..343b411c2f9 100644 --- a/devel/cppcheck/Makefile +++ b/devel/cppcheck/Makefile @@ -1,22 +1,33 @@ -# $NetBSD: Makefile,v 1.1.1.1 2010/02/02 16:35:46 reed Exp $ +# $NetBSD: Makefile,v 1.2 2010/02/03 09:46:42 wiz Exp $ # DISTNAME= cppcheck-1.40 +PKGREVISION= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=cppcheck/} EXTRACT_SUFX= .tar.bz2 MAINTAINER= reed@reedmedia.net HOMEPAGE= http://cppcheck.wiki.sourceforge.net/ -COMMENT= Simple syntax checking of C/C++ +COMMENT= Tool for static C/C++ code analysis +LICENSE= gnu-gpl-v3 -INSTALLATION_DIRS+= bin +BUILD_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt +BUILD_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl + +INSTALLATION_DIRS+= bin ${PKGMANDIR}/man1 PKG_DESTDIR_SUPPORT= user-destdir USE_LANGUAGES= c++ -# TODO: manpage is in docbook, needs to be converted +.include "options.mk" -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/cppcheck ${DESTDIR}${PREFIX}/bin/ +post-build: man-build +man-build: + cd ${WRKSRC}/man && xsltproc --nonet \ + --param man.charmap.use.subset "0" \ + --param make.year.ranges "1" \ + --param make.single.year.ranges "1" \ + ${PREFIX}/share/xsl/docbook/manpages/docbook.xsl \ + cppcheck.1.xml .include "../../mk/bsd.pkg.mk" diff --git a/devel/cppcheck/PLIST b/devel/cppcheck/PLIST index 6fb49c77182..60786e933a1 100644 --- a/devel/cppcheck/PLIST +++ b/devel/cppcheck/PLIST @@ -1,2 +1,3 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2010/02/02 16:35:46 reed Exp $ +@comment $NetBSD: PLIST,v 1.2 2010/02/03 09:46:42 wiz Exp $ bin/cppcheck +man/man1/cppcheck.1 diff --git a/devel/cppcheck/PLIST.qt b/devel/cppcheck/PLIST.qt new file mode 100644 index 00000000000..c33023b513f --- /dev/null +++ b/devel/cppcheck/PLIST.qt @@ -0,0 +1,10 @@ +@comment $NetBSD: PLIST.qt,v 1.1 2010/02/03 09:46:42 wiz Exp $ +bin/cppcheck-gui +lib/cppcheck-gui +share/cppcheck/cppcheck_de.qm +share/cppcheck/cppcheck_en.qm +share/cppcheck/cppcheck_fi.qm +share/cppcheck/cppcheck_nl.qm +share/cppcheck/cppcheck_pl.qm +share/cppcheck/cppcheck_ru.qm +share/cppcheck/cppcheck_se.qm diff --git a/devel/cppcheck/options.mk b/devel/cppcheck/options.mk new file mode 100644 index 00000000000..0042cb69b8c --- /dev/null +++ b/devel/cppcheck/options.mk @@ -0,0 +1,45 @@ +# $NetBSD: options.mk,v 1.1 2010/02/03 09:46:42 wiz Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.cppcheck +PKG_SUPPORTED_OPTIONS= qt + +.include "../../mk/bsd.options.mk" + +.if !empty(PKG_OPTIONS:Mqt) +SUBST_CLASSES+= lrelease +SUBST_FILES.lrelease= gui/gui.pro +SUBST_STAGE.lrelease= post-extract +SUBST_SED.lrelease= -e "s,lrelease gui.pro,${PREFIX}/qt4/bin/lrelease gui.pro,g" +SUBST_MESSAGE.lrelease= Fixing path to lrelease. + +INSTALLATION_DIRS+= lib share/cppcheck + +PLIST_SRC+= PLIST PLIST.qt + +do-configure: + cd ${WRKSRC} && ${PREFIX}/qt4/bin/qmake + +post-build: link-build +link-build: + echo '#!/bin/sh' > ${WRKSRC}/cppcheck-gui + echo 'cd ${PREFIX}/share/cppcheck && ${PREFIX}/lib/cppcheck-gui "$@"' >> ${WRKSRC}/cppcheck-gui + +post-install: qt-install +qt-install: + ${INSTALL_SCRIPT} ${WRKSRC}/cli/cppcheck ${DESTDIR}${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/cppcheck-gui ${DESTDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/gui/gui \ + ${DESTDIR}${PREFIX}/lib/cppcheck-gui + ${INSTALL_DATA} ${WRKSRC}/man/cppcheck.1 \ + ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 + ${INSTALL_DATA} ${WRKSRC}/gui/*.qm ${DESTDIR}${PREFIX}/share/cppcheck + +.include "../../x11/qt4-libs/buildlink3.mk" +.include "../../x11/qt4-tools/buildlink3.mk" +.else +post-install: main-install +main-install: + ${INSTALL_PROGRAM} ${WRKSRC}/cppcheck ${DESTDIR}${PREFIX}/bin/ + ${INSTALL_DATA} ${WRKSRC}/man/cppcheck.1 \ + ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 +.endif |