[packages/libecap] - added C++11 patch, fixed unresolved symbols when compiling with ecap and --std=c++11, ie. squid
hawk
hawk at pld-linux.org
Mon Mar 12 11:31:45 CET 2018
commit 2b956e00e4d71a5897db2b7270af91c13b361a20
Author: Marcin Krol <hawk at tld-linux.org>
Date: Mon Mar 12 10:30:00 2018 +0000
- added C++11 patch, fixed unresolved symbols when compiling with ecap and
--std=c++11, ie. squid
libecap-c++11.patch | 41 +++++++++++++++++++++++++++++++++++++++++
libecap.spec | 4 +++-
2 files changed, 44 insertions(+), 1 deletion(-)
---
diff --git a/libecap.spec b/libecap.spec
index b4a231e..236fa72 100644
--- a/libecap.spec
+++ b/libecap.spec
@@ -2,11 +2,12 @@ Summary: eCAP - the code in the middle
Summary(pl.UTF-8): eCAP - kod pośredniczący
Name: libecap
Version: 1.0.1
-Release: 1
+Release: 2
License: BSD
Group: Libraries
Source0: http://www.measurement-factory.com/tmp/ecap/%{name}-%{version}.tar.gz
# Source0-md5: ba3b9025264e6c23e6413666fff9fdab
+Patch0: %{name}-c++11.patch
URL: http://www.e-cap.org/
BuildRequires: libstdc++-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -65,6 +66,7 @@ Statyczna biblioteka eCAP.
%prep
%setup -q
+%patch0 -p1
%build
%configure
diff --git a/libecap-c++11.patch b/libecap-c++11.patch
new file mode 100644
index 0000000..841a3ae
--- /dev/null
+++ b/libecap-c++11.patch
@@ -0,0 +1,41 @@
+diff -ur libecap-1.0.1.orig/src/libecap/common/area.cc libecap-1.0.1/src/libecap/common/area.cc
+--- libecap-1.0.1.orig/src/libecap/common/area.cc 2015-05-13 16:00:35.000000000 +0000
++++ libecap-1.0.1/src/libecap/common/area.cc 2018-03-12 10:20:54.916970413 +0000
+@@ -14,8 +14,8 @@
+
+
+ libecap::Area libecap::Area::FromTempString(const std::string &tmp) {
+- shared_ptr<StdStringAreaDetails> details(new StdStringAreaDetails(tmp));
+- return Area(details->owner_.data(), details->owner_.size(), details);
++ shared_ptr<StdStringAreaDetails> detls(new StdStringAreaDetails(tmp));
++ return Area(detls->owner_.data(), detls->owner_.size(), detls);
+ }
+
+ libecap::Area libecap::Area::FromTempBuffer(const char *start, libecap::size_type size) {
+diff -ur libecap-1.0.1.orig/src/libecap/common/memory.h libecap-1.0.1/src/libecap/common/memory.h
+--- libecap-1.0.1.orig/src/libecap/common/memory.h 2014-10-02 04:05:24.000000000 +0000
++++ libecap-1.0.1/src/libecap/common/memory.h 2018-03-12 10:20:58.251970376 +0000
+@@ -4,14 +4,23 @@
+ #define LIBECAP__COMMON_MEMORY_H
+
+ #include <libecap/common/libecap.h>
++#if defined(_LIBCPP_VERSION)
++#include <memory>
++#else
+ #include <tr1/memory>
++#endif
+
+ // TODO: add support for boost pointers if std::tr1 is not available
+
+ namespace libecap {
+
++#if defined(_LIBCPP_VERSION)
++using std::weak_ptr;
++using std::shared_ptr;
++#else
+ using std::tr1::weak_ptr;
+ using std::tr1::shared_ptr;
++#endif
+
+ } // namespace libecap
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libecap.git/commitdiff/2b956e00e4d71a5897db2b7270af91c13b361a20
More information about the pld-cvs-commit
mailing list