Accepting request 356634 from openSUSE:Factory:Staging:Gcc6

- Add nghttp2-c++14.patch to properly guard make_unique templates.
  [bsc#964140]

OBS-URL: https://build.opensuse.org/request/show/356634
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/nghttp2?expand=0&rev=49
This commit is contained in:
Martin Pluskal 2016-01-29 09:07:25 +00:00 committed by Git OBS Bridge
parent b6a659ca54
commit fb98a26132
3 changed files with 29 additions and 1 deletions

20
nghttp2-c++14.patch Normal file
View File

@ -0,0 +1,20 @@
--- src/template.h.orig 2016-01-28 15:30:56.549094834 +0100
+++ src/template.h 2016-01-28 15:42:13.188970636 +0100
@@ -37,6 +37,9 @@
namespace nghttp2 {
+#if __cplusplus > 201103L
+using std::make_unique;
+#else
template <typename T, typename... U>
typename std::enable_if<!std::is_array<T>::value, std::unique_ptr<T>>::type
make_unique(U &&... u) {
@@ -48,6 +51,7 @@
make_unique(size_t size) {
return std::unique_ptr<T>(new typename std::remove_extent<T>::type[size]());
}
+#endif
// std::forward is constexpr since C++14
template <typename... T>

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jan 28 14:43:56 UTC 2016 - rguenther@suse.com
- Add nghttp2-c++14.patch to properly guard make_unique templates.
[bsc#964140]
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 26 20:02:00 UTC 2016 - mpluskal@suse.com Tue Jan 26 20:02:00 UTC 2016 - mpluskal@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package nghttp2 # spec file for package nghttp2
# #
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -31,6 +31,7 @@ Source: https://github.com/tatsuhiro-t/%{name}/releases/download/v%{vers
Source1: baselibs.conf Source1: baselibs.conf
# PATCH-FIX-OPENSUSE nghttp2-remove-python-build.patch # PATCH-FIX-OPENSUSE nghttp2-remove-python-build.patch
Patch0: %{name}-remove-python-build.patch Patch0: %{name}-remove-python-build.patch
Patch1: %{name}-c++14.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: boost-devel BuildRequires: boost-devel
@ -114,6 +115,7 @@ HTTP/2 client, server and proxy.
%prep %prep
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
%patch1
%build %build
autoreconf -fiv autoreconf -fiv