This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [ITA] cppcheck-1.66-1
- From: Yaakov Selkowitz <yselkowitz at cygwin dot com>
- To: cygwin-apps at cygwin dot com
- Date: Sun, 21 Sep 2014 23:03:42 -0500
- Subject: Re: [ITA] cppcheck-1.66-1
- Authentication-results: sourceware.org; auth=none
- References: <541F26D0 dot 6030400 at tiscali dot co dot uk>
On 2014-09-21 14:28, David Stacey wrote:
I would like to adopt cppcheck, which was orphaned by Chris Sutcliffe
last week [1]. The following notes may be of use when reviewing this
package:
I have enabled custom rules for cppcheck, which gives the user the scope
to create custom checks. This introduces a dependency on libpcre1.
I have built the Qt GUI for cppcheck, which is available as a
sub-package. cppcheck-gui is available in openSUSE [2] and ArchLinux [3].
The gui code is built without proper optimization or debuginfo. This
can be fixed in gui/gui.pro:
-CONFIG += warn_on debug
+CONFIG += warn_on
cppcheck-gui contains a number of language translations, which are
included. However, the way that the GUI locates these translations is a
little bizarre. The user is expected to call 'cppcheck-gui
--data-dir=/path/to/translations' before using cppcheck-gui for the
first time. This would be an ideal candidate for a post-install step,
except that it has to be done by each user (not just the user performing
the install), and an X server needs to be running (even though no window
is opened). So for both of these reasons I consider that a post-install
step is not the way forward.
Instead, I have patched the GUI to always look for the translation files
in a set directory. This seems sensible, as you should just have one set
of translation files that are shared between all users. This works, but
the GUI gives a harmless warning the first time it is invoked. This is
probably a bug in the cppcheck-gui code, as the native Windows version
does the same. Otherwise, the GUI works well.
Not a blocker, but I suspect you're going to get "bug" reports due to
that first-run warning message, so it would be good if you could
eventually figure that out.
The cppcheck build scripts from openSUSE [4] and ArchLinux [5] don't
offer much inspiration - neither ship with the translation files at all,
which will just give an error when the user tries to switch languages.
So I would be very interested if anyone could find a more elegant
solution to this problem.
IMO this should suffice. Another alternative might be to add the
translations to the resource file (gui/gui.qrc) and change the code to
look there for the translations.
One other thing: as a graphical program it should have a desktop menu
entry, which can be accomplished by appending the following to your
src_install():
newicon ${S}/gui/icon.png cppcheck.png
make_desktop_entry cppcheck-gui "Cppcheck" cppcheck "Development"
and adding usr/share/applications/ and usr/share/pixmaps/ to
cppcheck_gui_CONTENTS.
Yaakov