This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ITA] cppcheck-1.66-1


On 22/09/14 05:03, Yaakov Selkowitz wrote:
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.

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.

Thank you for such constructive comments, Yaakov. I have a new build of cppcheck with the following changes:

  - All of Yaakov's suggestions have been included (hopefully!).

- I have tracked down and patched the bug that was causing the warning when cppcheck-gui was launched for the first time. This was caused by the application not detecting the English locale correctly. This is fixed and the warning is not generated in this build; I will try to send this patch upstream.

- cppcheck now links dynamically with libtinyxml2_2, rather than a static link with a bundled version of tinyxml2. This is in line with how cppcheck is packaged on Fedora, Debian and their offspring. I sent a separate ITP for tinyxml2 to this list earlier [1].

Download links are as follows:


# 32-bit:
BASEURL=https://dl.dropboxusercontent.com/u/119453582/Cygwin/32bit/release
wget --no-check-certificate --no-host-directories --force-directories --cut-dirs=5 \
${BASEURL}/cppcheck/cppcheck-1.66-1-src.tar.xz \
${BASEURL}/cppcheck/cppcheck-1.66-1.tar.xz \
${BASEURL}/cppcheck/cppcheck-debuginfo/cppcheck-debuginfo-1.66-1.tar.xz \
${BASEURL}/cppcheck/cppcheck-debuginfo/setup.hint \
${BASEURL}/cppcheck/cppcheck-gui/cppcheck-gui-1.66-1.tar.xz \
${BASEURL}/cppcheck/cppcheck-gui/setup.hint \
${BASEURL}/cppcheck/setup.hint


# 64-bit:
BASEURL=https://dl.dropboxusercontent.com/u/119453582/Cygwin/64bit/release
wget --no-check-certificate --no-host-directories --force-directories --cut-dirs=5 \
${BASEURL}/cppcheck/cppcheck-1.66-1-src.tar.xz \
${BASEURL}/cppcheck/cppcheck-1.66-1.tar.xz \
${BASEURL}/cppcheck/cppcheck-debuginfo/cppcheck-debuginfo-1.66-1.tar.xz \
${BASEURL}/cppcheck/cppcheck-debuginfo/setup.hint \
${BASEURL}/cppcheck/cppcheck-gui/cppcheck-gui-1.66-1.tar.xz \
${BASEURL}/cppcheck/cppcheck-gui/setup.hint \
${BASEURL}/cppcheck/setup.hint


Don't forget that you will also require tinyxml2 - see the ITP e-mail for links [1].

Many thanks once again for looking at this,

Dave.

[1] - https://cygwin.com/ml/cygwin-apps/2014-09/msg00040.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]