Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 693352

Summary: dev-util/cppcheck-2.2 bump request
Product: Gentoo Linux Reporter: Jens Lindenmeier <gentoo>
Component: Current packagesAssignee: Matthias Maier <tamiko>
Status: RESOLVED FIXED    
Severity: normal CC: ao, b.buschinski, dschridde+gentoobugs, gabemarcano, gentoo, jstein, O01eg, sping
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/danmar/cppcheck/releases
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: ebuild file that worked in my EPREFIX env...
2nd version of cppcheck-1.89.ebuild
cppcheck-1.90.ebuild
cppcheck-1.90-tinyxml2.patch
cppcheck-2.2.ebuild

Description Jens Lindenmeier 2019-09-02 15:47:46 UTC
Created attachment 588818 [details]
ebuild file that worked in my EPREFIX env...

cppcheck-1.89 has been released, this release was not straight forward, copy of ebuild of 1.88 was not possible.

Attached an ebuild that worked for me, removing the patches from 1.88, removing the tinyxml dir deleting and modifying the install emake call, since cppcheck introduced FILESDIR

Not sure if:
                CFGDIR="${EROOT}/usr/share/${PN}/cfg" \
                DB2MAN="${EROOT}/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl"

is still correct.
I have an EPREFIX and for me also ROOT works, but better not change a running ebuild...
Comment 1 Jens Lindenmeier 2019-09-03 14:40:25 UTC
I just realized that my ebuild is not yet working, will post a new ebuild as soon I find a solution.
Comment 2 Jens Lindenmeier 2019-09-03 19:41:30 UTC
Created attachment 589010 [details]
2nd version of cppcheck-1.89.ebuild

Found a solution, ebuild attached.
tested in EPREFIX system only. Tested against ~100 cpp files including xml report generation. (cppcheck --xml)
Comment 3 Bernd Buschinski 2020-02-26 20:10:42 UTC
Meanwhile, cppcheck-1.90 was released (2019-12-21).
https://sourceforge.net/p/cppcheck/news/2019/12/cppcheck-190/
Comment 4 Gabriel Marcano 2020-02-27 06:39:44 UTC
So, on cppcheck-1.90 they no longer use the CFGDIR variable, instead replacing it with FILESDIR... which collides with Gentoo's FILESDIR variable. Is there a better way to deal with the collision than sed s/FILESDIR/FILESDIR_/g on all the files in the project in src_prepare()?

In any case, I spent some time trying to get something to work, and I think it kind of does? I'm uploading both a patch file and a prototype ebuild for 1.90.
Comment 5 Gabriel Marcano 2020-02-27 06:40:59 UTC
Created attachment 616182 [details]
cppcheck-1.90.ebuild

WIP cppcheck-1.90 ebuild.
Comment 6 Gabriel Marcano 2020-02-27 06:42:03 UTC
Created attachment 616184 [details, diff]
cppcheck-1.90-tinyxml2.patch

Patch stripping tinyxml2 from the Makefile/dmake build system in cppcheck.
Comment 7 Sebastian Pipping gentoo-dev 2020-05-12 19:31:00 UTC
Matthias, any chance you could bump cppcheck to 2.0 this week?
I need it to debug https://github.com/libexpat/libexpat/issues/404 and the live ebuild is failing to install.  Thank you!
Comment 8 Bernd Buschinski 2020-08-06 09:07:44 UTC
Cppcheck 2.1 was released on 2020-06-13.

https://sourceforge.net/p/cppcheck/news/2020/06/cppcheck-21/
Comment 9 Bernd Buschinski 2020-10-18 10:39:37 UTC
cppcheck 2.2 was released on 2020-10-03.

https://sourceforge.net/p/cppcheck/news/2020/10/cppcheck-22/
Comment 10 Bernd Buschinski 2020-11-01 12:42:49 UTC
Created attachment 669587 [details]
cppcheck-2.2.ebuild

My initial try at cppcheck-2.2.ebuild

- cmake based
- uses internal tinyxml, it's a huge PITA to deal with it correctly
- more/different FILESDIR "fixes"
Comment 11 Larry the Git Cow gentoo-dev 2020-12-04 05:37:44 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f631b786b5dc48a16224e856417ceb44231428a7

commit f631b786b5dc48a16224e856417ceb44231428a7
Author:     Matthias Maier <tamiko@gentoo.org>
AuthorDate: 2020-12-04 04:56:31 +0000
Commit:     Matthias Maier <tamiko@gentoo.org>
CommitDate: 2020-12-04 05:37:16 +0000

    dev-util/cppcheck: version bump to 2.2
    
    Thanks to Bernd Buschinski for the initial ebuild
    
    Closes: https://bugs.gentoo.org/693352
    Bug: https://bugs.gentoo.org/699594
    Package-Manager: Portage-3.0.11, Repoman-3.0.2
    Signed-off-by: Matthias Maier <tamiko@gentoo.org>

 dev-util/cppcheck/Manifest            |  1 +
 dev-util/cppcheck/cppcheck-2.2.ebuild | 80 +++++++++++++++++++++++++++++++++++
 dev-util/cppcheck/metadata.xml        |  3 ++
 profiles/arch/hppa/package.use.mask   |  4 ++
 profiles/arch/sparc/package.use.mask  |  4 ++
 5 files changed, 92 insertions(+)