Merge branch 'master' into epel7
This commit is contained in:
commit
7f626d6b58
22
cppcheck-1.70-link.patch
Normal file
22
cppcheck-1.70-link.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- cppcheck-1.70/cli/CMakeLists.txt.stlink 2015-11-13 15:07:57.987502410 +0900
|
||||||
|
+++ cppcheck-1.70/cli/CMakeLists.txt 2015-11-13 16:13:30.256811541 +0900
|
||||||
|
@@ -5,7 +5,7 @@
|
||||||
|
file(GLOB mainfile "main.cpp")
|
||||||
|
list(REMOVE_ITEM srcs ${mainfile})
|
||||||
|
|
||||||
|
-link_libraries(${PROJECT_NAME} -ltinyxml2)
|
||||||
|
+link_libraries(-Wl,--whole-archive ${PROJECT_NAME} -Wl,--no-whole-archive -ltinyxml2)
|
||||||
|
|
||||||
|
add_library(cli_lib OBJECT ${hdrs} ${srcs})
|
||||||
|
|
||||||
|
--- cppcheck-1.70/gui/CMakeLists.txt.stlink 2015-11-13 15:07:57.989502413 +0900
|
||||||
|
+++ cppcheck-1.70/gui/CMakeLists.txt 2015-11-13 16:13:47.930824027 +0900
|
||||||
|
@@ -21,7 +21,7 @@
|
||||||
|
QT4_ADD_RESOURCES(resources "gui.qrc")
|
||||||
|
QT4_ADD_TRANSLATION(qms ${tss})
|
||||||
|
|
||||||
|
- link_libraries(${PROJECT_NAME} -ltinyxml2 ${QT_LIBRARIES})
|
||||||
|
+ link_libraries(-Wl,--whole-archive ${PROJECT_NAME} -Wl,--no-whole-archive -ltinyxml2 ${QT_LIBRARIES})
|
||||||
|
|
||||||
|
add_executable(cppcheck-gui ${hdrs} ${srcs} ${uis_hdrs} ${resources} ${qms})
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: cppcheck
|
Name: cppcheck
|
||||||
Version: 1.70
|
Version: 1.70
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: Tool for static C/C++ code analysis
|
Summary: Tool for static C/C++ code analysis
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
@ -15,6 +15,8 @@ Patch0: cppcheck-1.70-tinyxml.patch
|
|||||||
Patch1: cppcheck-1.70-translations.patch
|
Patch1: cppcheck-1.70-translations.patch
|
||||||
# Fix library install suffix
|
# Fix library install suffix
|
||||||
Patch2: cppcheck-1.70-libsuffix.patch
|
Patch2: cppcheck-1.70-libsuffix.patch
|
||||||
|
# Link whole library
|
||||||
|
Patch3: cppcheck-1.70-link.patch
|
||||||
|
|
||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
BuildRequires: tinyxml2-devel >= 2.1.0
|
BuildRequires: tinyxml2-devel >= 2.1.0
|
||||||
@ -45,6 +47,7 @@ This package contains the graphical user interface for cppcheck.
|
|||||||
%patch0 -p1 -b .tinyxml
|
%patch0 -p1 -b .tinyxml
|
||||||
%patch1 -p1 -b .translations
|
%patch1 -p1 -b .translations
|
||||||
%patch2 -p1 -b .libsuffix
|
%patch2 -p1 -b .libsuffix
|
||||||
|
%patch3 -p1 -b .link
|
||||||
# Make sure bundled tinyxml is not used
|
# Make sure bundled tinyxml is not used
|
||||||
rm -r externals/tinyxml
|
rm -r externals/tinyxml
|
||||||
|
|
||||||
@ -59,8 +62,9 @@ xsltproc --nonet -o man/manual.html \
|
|||||||
mkdir objdir-%{_target_platform}
|
mkdir objdir-%{_target_platform}
|
||||||
cd objdir-%{_target_platform}
|
cd objdir-%{_target_platform}
|
||||||
# Upstream doesn't support shared libraries (unversioned solib)
|
# Upstream doesn't support shared libraries (unversioned solib)
|
||||||
%cmake .. -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=1 -DBUILD_GUI=1 -DBUILD_SHARED_LIBS:BOOL=OFF
|
%cmake .. -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=1 -DBUILD_GUI=1 -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTS=1
|
||||||
make %{?_smp_mflags}
|
# SMP make doesn't seem to work
|
||||||
|
make cppcheck
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
@ -77,13 +81,8 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
|
|||||||
install -D -p -m 644 gui/icon.png %{buildroot}%{_datadir}/pixmaps/cppcheck.png
|
install -D -p -m 644 gui/icon.png %{buildroot}%{_datadir}/pixmaps/cppcheck.png
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# CMake build doesn't have check...
|
cd objdir-%{_target_platform}/bin
|
||||||
CXXFLAGS="%{optflags} -DNDEBUG $(pcre-config --cflags)" \
|
./testrunner -g -q
|
||||||
LDFLAGS="$RPM_LD_FLAGS" LIBS=-ltinyxml2 make TINYXML= \
|
|
||||||
CFGDIR=$(pwd)/cfg \
|
|
||||||
HAVE_RULES=yes \
|
|
||||||
DB2MAN=%{_datadir}/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl \
|
|
||||||
%{?_smp_mflags} check
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
@ -101,6 +100,10 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 13 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.70-4
|
||||||
|
- Link whole archive (BZ #1280242), patch by Mamoru Tasaka.
|
||||||
|
- Compile and run tests using CMake.
|
||||||
|
|
||||||
* Wed Nov 11 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.70-3
|
* Wed Nov 11 2015 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.70-3
|
||||||
- Enable HAVE_RULES.
|
- Enable HAVE_RULES.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user