pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: update devel/cppcheck with qt option



On Tue, Apr 19, 2011 at 09:23:51AM -0500, Jeremy C. Reed wrote:
> Can someone please fix the qt option build for devel/cppcheck?

Attached is much nicer than the current pkgsrc version, and it works
fine for me both with qt enabled and disabled. Please use it when you
update the package.

Thanks,
 Thomas
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/cppcheck/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- Makefile    13 Jan 2011 13:53:24 -0000      1.8
+++ Makefile    21 Apr 2011 20:05:09 -0000
@@ -1,8 +1,7 @@
 # $NetBSD: Makefile,v 1.8 2011/01/13 13:53:24 wiz Exp $
 #
 
-DISTNAME=      cppcheck-1.46.1
-PKGREVISION=   1
+DISTNAME=      cppcheck-1.48
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=cppcheck/}
 EXTRACT_SUFX=  .tar.bz2
@@ -17,7 +16,8 @@
 
 INSTALLATION_DIRS+=    bin ${PKGMANDIR}/man1
 PKG_DESTDIR_SUPPORT=   user-destdir
-USE_LANGUAGES=         c++
+USE_LANGUAGES=         c c++
+USE_CMAKE=             yes
 USE_TOOLS+=            gmake
 
 BUILDLINK_TRANSFORM+=  rm:-Wlogical-op
@@ -34,4 +34,5 @@
                ${PREFIX}/share/xsl/docbook/manpages/docbook.xsl \
                cppcheck.1.xml
 
+.include "../../devel/pcre/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: PLIST.qt
===================================================================
RCS file: /cvsroot/pkgsrc/devel/cppcheck/PLIST.qt,v
retrieving revision 1.1
diff -u -r1.1 PLIST.qt
--- PLIST.qt    3 Feb 2010 09:46:42 -0000       1.1
+++ PLIST.qt    21 Apr 2011 20:05:09 -0000
@@ -1,10 +1,2 @@
 @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
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/cppcheck/distinfo,v
retrieving revision 1.3
diff -u -r1.3 distinfo
--- distinfo    15 Dec 2010 13:01:38 -0000      1.3
+++ distinfo    21 Apr 2011 20:05:09 -0000
@@ -1,5 +1,5 @@
 $NetBSD: distinfo,v 1.3 2010/12/15 13:01:38 wiz Exp $
 
-SHA1 (cppcheck-1.46.1.tar.bz2) = fb1bc1b44341c8fd111e06c217c91f108142b71c
-RMD160 (cppcheck-1.46.1.tar.bz2) = 5a82adb010c9bee0e96d2ac1fddd4b5fc4f7ad5c
-Size (cppcheck-1.46.1.tar.bz2) = 676586 bytes
+SHA1 (cppcheck-1.48.tar.bz2) = 10cf38034148b7cb258840febe620ba397114fd1
+RMD160 (cppcheck-1.48.tar.bz2) = de40627f6fced2694427f132d2d93f9f33211187
+Size (cppcheck-1.48.tar.bz2) = 833185 bytes
Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/cppcheck/options.mk,v
retrieving revision 1.2
diff -u -r1.2 options.mk
--- options.mk  3 Feb 2010 09:52:32 -0000       1.2
+++ options.mk  21 Apr 2011 20:05:09 -0000
@@ -6,43 +6,23 @@
 .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
-
-.PHONY: link-build
-post-build: link-build
-link-build:
-       ${ECHO} '#!/bin/sh' > ${WRKSRC}/cppcheck-gui
-       ${ECHO} 'cd ${PREFIX}/share/cppcheck && ${PREFIX}/lib/cppcheck-gui 
"$$@"' >> ${WRKSRC}/cppcheck-gui
-
-.PHONY: qt-install
-post-install: qt-install
-qt-install:
+do-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_PROGRAM} ${WRKSRC}/gui/cppcheck-gui \
+               ${DESTDIR}${PREFIX}/bin
        ${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"
+BUILDLINK_DEPMETHOD.qt4-tools?= full
 .include "../../x11/qt4-tools/buildlink3.mk"
 .else
-.PHONY: main-install
-post-install: main-install
-main-install:
-       ${INSTALL_PROGRAM} ${WRKSRC}/cppcheck ${DESTDIR}${PREFIX}/bin/
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/cli/cppcheck ${DESTDIR}${PREFIX}/bin/
        ${INSTALL_DATA} ${WRKSRC}/man/cppcheck.1 \
                ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
 .endif


Home | Main Index | Thread Index | Old Index