From 8b063364dddfd2f6b9f3c4c54245ca6c95879ad10914734afe9b5d2de4862bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= Date: Tue, 22 Jul 2014 07:09:01 +0000 Subject: [PATCH] Accepting request 241782 from LibreOffice:Factory Fix C++11-isms OBS-URL: https://build.opensuse.org/request/show/241782 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmis-client?expand=0&rev=24 --- 0001-Remove-C-11-only-std-to_string.patch | 61 +++++++++++++++++++++++ cmis-client.changes | 6 +++ cmis-client.spec | 2 + 3 files changed, 69 insertions(+) create mode 100644 0001-Remove-C-11-only-std-to_string.patch diff --git a/0001-Remove-C-11-only-std-to_string.patch b/0001-Remove-C-11-only-std-to_string.patch new file mode 100644 index 0000000..c9ab6a7 --- /dev/null +++ b/0001-Remove-C-11-only-std-to_string.patch @@ -0,0 +1,61 @@ +From 9f4613246c433d1a9c803cf79dada6a74b4979c6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fridrich=20=C5=A0trba?= +Date: Tue, 1 Jul 2014 17:17:03 +0200 +Subject: [PATCH] Remove C++11 only std::to_string + +(cherry picked from commit b05508b6e9d54cb0dfdb9a9a3f745a63aee6bea8) + +Conflicts: + src/libcmis/ws-relatedmultipart.cxx +--- + src/libcmis/ws-relatedmultipart.cxx | 19 +++++++++---------- + 1 file changed, 9 insertions(+), 10 deletions(-) + +diff --git a/src/libcmis/ws-relatedmultipart.cxx b/src/libcmis/ws-relatedmultipart.cxx +index 6fa33ce..169d56c 100644 +--- a/src/libcmis/ws-relatedmultipart.cxx ++++ b/src/libcmis/ws-relatedmultipart.cxx +@@ -26,6 +26,7 @@ + * instead of those above. + */ + ++#include + #include + #include + #include +@@ -61,8 +62,9 @@ RelatedMultipart::RelatedMultipart( ) : + m_parts( ), + m_boundary( ) + { +- uuid uuid = random_generator()(); +- m_boundary = "--------uuid:" + to_string( uuid ); ++ stringstream tmpStream("--------uuid:"); ++ tmpStream << random_generator()(); ++ m_boundary = tmpStream.str(); + } + + RelatedMultipart::RelatedMultipart( const string& body, const string& contentType ) : +@@ -273,15 +275,12 @@ boost::shared_ptr< istringstream > RelatedMultipart::toStream( ) + + string RelatedMultipart::createPartId( const string& name ) + { +- string cid( name + "*" ); ++ stringstream tmpStream(name); ++ tmpStream << "*"; ++ tmpStream << random_generator()(); ++ tmpStream << "@libcmis.sourceforge.net"; + +- // Generate the UUID part of the id +- uuid uuid = random_generator()(); +- cid += to_string( uuid ); +- +- cid += "@libcmis.sourceforge.net"; +- +- return cid; ++ return tmpStream.str(); + } + + boost::shared_ptr< istream > getStreamFromNode( xmlNodePtr node, RelatedMultipart& multipart ) +-- +2.0.0 + diff --git a/cmis-client.changes b/cmis-client.changes index 0b65bcf..55e0f87 100644 --- a/cmis-client.changes +++ b/cmis-client.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jul 2 12:31:44 UTC 2014 - fstrba@suse.com + +- 0001-Remove-C-11-only-std-to_string.patch + Fix some C++11-isms. + ------------------------------------------------------------------- Tue Mar 4 13:46:50 UTC 2014 - cbosdonnat@suse.com diff --git a/cmis-client.spec b/cmis-client.spec index 0da70ec..5160f79 100644 --- a/cmis-client.spec +++ b/cmis-client.spec @@ -30,6 +30,7 @@ Source0: %{_name}-%{version}.tar.gz # Upstream patches Patch0: 433fad3-Fix-int-bool-confusion-on-big-endian-architectures.patch +Patch1: 0001-Remove-C-11-only-std-to_string.patch BuildRequires: boost-devel >= 1.42 BuildRequires: docbook2X @@ -84,6 +85,7 @@ This allows C applications to connect to any CMIS-enabled repositories. It is on %prep %setup -q -n %{_name}-%{version} %patch0 -p1 +%patch1 -p1 %build export CFLAGS="%{optflags} -D_GNU_SOURCE $(getconf LFS_CFLAGS)"