summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Benedikt Morbach <moben@exherbo.org> 2018-04-16 15:14:33 +0200
committerAvatar Benedikt Morbach <moben@exherbo.org> 2018-04-16 15:16:48 +0200
commit221ca16b23d225c2d808372e03181c17a5c9f64f (patch)
tree4a8744719c73dabe9dfa12ed082b7fdba5de5fed
parentd86eb1f302bedcfd206274475c51de6efa46fba4 (diff)
downloadoffice-master.tar.gz
office-master.tar.xz
libcmis: fix testsHEADmaster
fix one genuine problem and disable cppcheck as it can introduce new failures, just like -Werror
-rw-r--r--packages/net-libs/libcmis/files/ff7ed27039693f91e8348495f3b909c23871123d.patch24
-rw-r--r--packages/net-libs/libcmis/libcmis-0.5.1-r1.exheres-0 (renamed from packages/net-libs/libcmis/libcmis-0.5.1.exheres-0)4
-rw-r--r--packages/net-libs/libcmis/libcmis.exlib3
3 files changed, 30 insertions, 1 deletions
diff --git a/packages/net-libs/libcmis/files/ff7ed27039693f91e8348495f3b909c23871123d.patch b/packages/net-libs/libcmis/files/ff7ed27039693f91e8348495f3b909c23871123d.patch
new file mode 100644
index 0000000..1390207
--- /dev/null
+++ b/packages/net-libs/libcmis/files/ff7ed27039693f91e8348495f3b909c23871123d.patch
@@ -0,0 +1,24 @@
+Upstream: yes
+
+From ff7ed27039693f91e8348495f3b909c23871123d Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon@redhat.com>
+Date: Thu, 18 Jan 2018 10:42:04 +0100
+Subject: [PATCH] do not try to use [] on an empty string
+
+---
+ src/libcmis/ws-relatedmultipart.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libcmis/ws-relatedmultipart.cxx b/src/libcmis/ws-relatedmultipart.cxx
+index 3b31634..675c274 100644
+--- a/src/libcmis/ws-relatedmultipart.cxx
++++ b/src/libcmis/ws-relatedmultipart.cxx
+@@ -169,7 +169,7 @@ RelatedMultipart::RelatedMultipart( const string& body, const string& contentTyp
+ if ( inHeaders )
+ {
+ // Remove potential \r at the end
+- if ( line[line.length() - 1] == '\r' )
++ if ( !line.empty() && line[line.length() - 1] == '\r' )
+ line = line.substr( 0, line.length() - 1 );
+
+ if ( line.empty( ) )
diff --git a/packages/net-libs/libcmis/libcmis-0.5.1.exheres-0 b/packages/net-libs/libcmis/libcmis-0.5.1-r1.exheres-0
index 4d141c7..2b984ee 100644
--- a/packages/net-libs/libcmis/libcmis-0.5.1.exheres-0
+++ b/packages/net-libs/libcmis/libcmis-0.5.1-r1.exheres-0
@@ -6,3 +6,7 @@ require libcmis
SLOT="0.5"
PLATFORMS="~amd64 ~x86"
+DEFAULT_SRC_PREPARE_PATCHES=(
+ "${FILES}"/ff7ed27039693f91e8348495f3b909c23871123d.patch
+)
+
diff --git a/packages/net-libs/libcmis/libcmis.exlib b/packages/net-libs/libcmis/libcmis.exlib
index 8dd9775..4e94388 100644
--- a/packages/net-libs/libcmis/libcmis.exlib
+++ b/packages/net-libs/libcmis/libcmis.exlib
@@ -22,7 +22,6 @@ DEPENDENCIES="
net-misc/curl
test:
dev-cpp/cppunit[>=1.12]
- dev-util/cppcheck
"
# man pages need docbook2X (unwritten)
@@ -31,6 +30,8 @@ DEFAULT_SRC_CONFIGURE_PARAMS=(
--disable-static
--disable-werror
--without-man
+ # new cppcheck versions add new warnings which fail libcmis's tests. Disable like -Werror
+ ac_cv_path_CPPCHECK=''
)
DEFAULT_SRC_CONFIGURE_TESTS=( '--enable-tests --disable-tests' )