SHA256
8
0
forked from pool/cpprest
2017-08-30 08:53:05 +00:00
committed by Git OBS Bridge
parent 65a84bd299
commit ba4b52902a
4 changed files with 48 additions and 9 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,34 @@
From d4f707abb4575aacf43ec02d30fa10afed464c7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wolfgang=20St=C3=B6ggl?= <c72578@yahoo.de>
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 <boost/algorithm/string.hpp>
-#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 <xlocale.h>
#endif
#endif
--
2.14.1