From ba4b52902a3290fe1697f1b6b0940da6d34160a0557d94e1225f9114c10a60ef Mon Sep 17 00:00:00 2001 From: Andreas Stieger Date: Wed, 30 Aug 2017 08:53:05 +0000 Subject: [PATCH] fix Factory OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cpprest?expand=0&rev=21 --- cpprest.changes | 6 ++++ cpprest.spec | 17 +++++----- ...uild-error-with-glibc-2.26-xlocale.h.patch | 34 +++++++++++++++++++ v2.9.1.tar.gz => cpprestsdk-2.9.1.tar.gz | 0 4 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 cpprestsdk-2.9.1-Fix-build-error-with-glibc-2.26-xlocale.h.patch rename v2.9.1.tar.gz => cpprestsdk-2.9.1.tar.gz (100%) diff --git a/cpprest.changes b/cpprest.changes index 6e4e612..4972348 100644 --- a/cpprest.changes +++ b/cpprest.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 30 08:48:08 UTC 2017 - astieger@suse.com + +- fix build with glibc 2.26, adding + cpprestsdk-2.9.1-Fix-build-error-with-glibc-2.26-xlocale.h.patch + ------------------------------------------------------------------- Thu Feb 2 09:08:31 UTC 2017 - astieger@suse.com diff --git a/cpprest.spec b/cpprest.spec index c20158b..76e93af 100644 --- a/cpprest.spec +++ b/cpprest.spec @@ -22,17 +22,21 @@ Name: cpprest Version: 2.9.1 Release: 0 Summary: C++ REST library -License: MIT and BSD-3-Clause and Zlib -Group: Development/Libraries/C and C++ # main: MIT (license.txt) # Websocket++: BSD-3-Clause (ThirdPartyNotices.txt) # base64/base64.hpp: Zlib (ThirdPartyNotices.txt) # sha1/sha1.hpp: BSD-3-Clause (ThirdPartyNotices.txt) # common/md5.hpp: Zlib (ThirdPartyNotices.txt) # utf8_validation.hpp: MIT (ThirdPartyNotices.txt) +License: MIT AND BSD-3-Clause AND Zlib +Group: Development/Libraries/C and C++ Url: https://github.com/Microsoft/cpprestsdk -Source: https://github.com/Microsoft/cpprestsdk/archive/v%{version}.tar.gz +Source: https://github.com/Microsoft/cpprestsdk/archive/v%{version}.tar.gz#/cpprestsdk-%{version}.tar.gz Patch1: cpprest-pthread.patch +Patch2: cpprestsdk-2.9.1-Fix-build-error-with-glibc-2.26-xlocale.h.patch +BuildRequires: cmake >= 2.6 +BuildRequires: gcc-c++ +BuildRequires: openssl-devel >= 1.0 %if 0%{?suse_version} > 1325 BuildRequires: libboost_filesystem-devel BuildRequires: libboost_random-devel @@ -42,10 +46,6 @@ BuildRequires: libboost_thread-devel %else BuildRequires: boost-devel >= 1.55 %endif -BuildRequires: cmake >= 2.6 -BuildRequires: gcc-c++ -BuildRequires: openssl-devel >= 1.0 -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description The C++ REST SDK is a Microsoft project for cloud-based client-server @@ -78,6 +78,7 @@ Development files. %prep %setup -q -n cpprestsdk-%{version} %patch1 -p1 +%patch2 -p1 %build %cmake \ @@ -100,12 +101,10 @@ ln -sf libcpprest.so.%{major}.%{minor} %{buildroot}%{_libdir}/libcpprest.so %postun -n libcpprest%{major}_%{minor} -p /sbin/ldconfig %files -n libcpprest%{major}_%{minor} -%defattr(-,root,root) %doc CONTRIBUTORS.txt license.txt ThirdPartyNotices.txt %{_libdir}/libcpprest.so.%{major}.%{minor} %files devel -%defattr(-,root,root) %doc CONTRIBUTORS.txt license.txt %{_includedir}/%{name} %{_includedir}/pplx diff --git a/cpprestsdk-2.9.1-Fix-build-error-with-glibc-2.26-xlocale.h.patch b/cpprestsdk-2.9.1-Fix-build-error-with-glibc-2.26-xlocale.h.patch new file mode 100644 index 0000000..c8db8c6 --- /dev/null +++ b/cpprestsdk-2.9.1-Fix-build-error-with-glibc-2.26-xlocale.h.patch @@ -0,0 +1,34 @@ +From d4f707abb4575aacf43ec02d30fa10afed464c7d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Wolfgang=20St=C3=B6ggl?= +Date: Thu, 13 Jul 2017 10:00:12 +0200 +Subject: [PATCH] Fix build error with glibc 2.26, xlocale.h + +- Do not include xlocale.h on systems, where __GLIBC__ is defined + xlocale.h has been removed from glibc 2.26 + The include of locale.h in asyncrt_utils.h is sufficient + Further details: + https://sourceware.org/git/?p=glibc.git;a=commit;h=f0be25b +- Fixes https://github.com/Microsoft/cpprestsdk/issues/485 +--- + Release/include/cpprest/asyncrt_utils.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Release/include/cpprest/asyncrt_utils.h b/Release/include/cpprest/asyncrt_utils.h +index 169ec3a2..fac70a91 100644 +--- a/Release/include/cpprest/asyncrt_utils.h ++++ b/Release/include/cpprest/asyncrt_utils.h +@@ -29,7 +29,10 @@ + + #ifndef _WIN32 + #include +-#if !defined(ANDROID) && !defined(__ANDROID__) // CodePlex 269 ++#if !defined(ANDROID) && !defined(__ANDROID__) && !defined(__GLIBC__) // CodePlex 269 ++/* Systems using glibc: xlocale.h has been removed from glibc 2.26 ++ The above include of locale.h is sufficient ++ Further details: https://sourceware.org/git/?p=glibc.git;a=commit;h=f0be25b6336db7492e47d2e8e72eb8af53b5506d */ + #include + #endif + #endif +-- +2.14.1 + diff --git a/v2.9.1.tar.gz b/cpprestsdk-2.9.1.tar.gz similarity index 100% rename from v2.9.1.tar.gz rename to cpprestsdk-2.9.1.tar.gz