[cppcheck] Necessary modifications to really build.

Susi Lehtola jussilehtola at fedoraproject.org
Sun May 18 12:33:55 UTC 2014


commit 284c16370e7eab722e1b6de126acb7d86ab2e1f5
Author: Susi Lehtola <jussilehtola at fedoraproject.org>
Date:   Sun May 18 15:33:50 2014 +0300

    Necessary modifications to really build.

 cppcheck.spec |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/cppcheck.spec b/cppcheck.spec
index b81add0..0d91d99 100644
--- a/cppcheck.spec
+++ b/cppcheck.spec
@@ -9,7 +9,7 @@ Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
 BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
 BuildRequires:	pcre-devel
-BuildRequires:	tinyxml2-devel
+BuildRequires:	tinyxml2-devel >= 2.1.0
 BuildRequires:	docbook-style-xsl
 BuildRequires:	libxslt
 
@@ -50,7 +50,14 @@ for f in *; do
 done
 
 %check
-make TINYXML= check
+# Config is not available in the system-wide directory - delete executables and recompile
+find . -name \*.o -delete
+CXXFLAGS="%{optflags} -DNDEBUG $(pcre-config --cflags)" \
+    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
 rm -rf %{buildroot}


More information about the scm-commits mailing list