pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/ecap_clamav_adapter Update ecap_clamav_adapte...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6881046aec69
branches:  trunk
changeset: 349013:6881046aec69
user:      prlw1 <prlw1%pkgsrc.org@localhost>
date:      Thu Jun 23 15:17:28 2016 +0000

description:
Update ecap_clamav_adapter to use C++11 in line with libecap (and squid3).

diffstat:

 security/ecap_clamav_adapter/Makefile                     |   5 +-
 security/ecap_clamav_adapter/distinfo                     |   7 ++-
 security/ecap_clamav_adapter/patches/patch-src_Pointers.h |  25 +++++++++++
 security/ecap_clamav_adapter/patches/patch-src_Service.cc |  33 +++++++++++++++
 security/ecap_clamav_adapter/patches/patch-src_Service.h  |  15 ++++++
 security/ecap_clamav_adapter/patches/patch-src_Xaction.cc |  33 +++++++++++++++
 security/ecap_clamav_adapter/patches/patch-src_Xaction.h  |  32 ++++++++++++++
 7 files changed, 148 insertions(+), 2 deletions(-)

diffs (195 lines):

diff -r 0442c9984062 -r 6881046aec69 security/ecap_clamav_adapter/Makefile
--- a/security/ecap_clamav_adapter/Makefile     Thu Jun 23 15:10:36 2016 +0000
+++ b/security/ecap_clamav_adapter/Makefile     Thu Jun 23 15:17:28 2016 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2016/06/18 10:18:57 prlw1 Exp $
+# $NetBSD: Makefile,v 1.2 2016/06/23 15:17:28 prlw1 Exp $
 
 DISTNAME=      ecap_clamav_adapter-2.0.0
+PKGREVISION=   1
 CATEGORIES=    security
 MASTER_SITES=  http://www.measurement-factory.com/tmp/ecap/
 
@@ -14,6 +15,8 @@
 USE_LIBTOOL=   yes
 USE_TOOLS+=    pkg-config
 
+CXXFLAGS+=     -std=c++11
+
 .include "../../security/clamav/buildlink3.mk"
 .include "../../www/libecap/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 0442c9984062 -r 6881046aec69 security/ecap_clamav_adapter/distinfo
--- a/security/ecap_clamav_adapter/distinfo     Thu Jun 23 15:10:36 2016 +0000
+++ b/security/ecap_clamav_adapter/distinfo     Thu Jun 23 15:17:28 2016 +0000
@@ -1,6 +1,11 @@
-$NetBSD: distinfo,v 1.1 2016/06/18 10:18:57 prlw1 Exp $
+$NetBSD: distinfo,v 1.2 2016/06/23 15:17:28 prlw1 Exp $
 
 SHA1 (ecap_clamav_adapter-2.0.0.tar.gz) = 2aaf6c970db3622d1380d353c4c38b21b6aab769
 RMD160 (ecap_clamav_adapter-2.0.0.tar.gz) = 1869b60b4de16ef0202fd86c47c053413948674d
 SHA512 (ecap_clamav_adapter-2.0.0.tar.gz) = 882e66ad566220f68e59d41ea5c199af2745eaaa96610cdb7fe475811dbf87b01b5a6a97e6c9a729aecbf470aaae7082dbe502830aa88e86d32ae0d1acabde4b
 Size (ecap_clamav_adapter-2.0.0.tar.gz) = 383682 bytes
+SHA1 (patch-src_Pointers.h) = 9e9b562c12af401de15aeeddb595a9134d31e1d6
+SHA1 (patch-src_Service.cc) = e14a4b29539c25f679b4f207cdd659ae752c0fac
+SHA1 (patch-src_Service.h) = 5b4997278e7b67aa7ee4813ba5a7753e154cb2ae
+SHA1 (patch-src_Xaction.cc) = bca8f15a1985b952f10c94a8c0c9953c91e4e310
+SHA1 (patch-src_Xaction.h) = 59348fcc787fda5d0b80021526561faef44e285d
diff -r 0442c9984062 -r 6881046aec69 security/ecap_clamav_adapter/patches/patch-src_Pointers.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/ecap_clamav_adapter/patches/patch-src_Pointers.h Thu Jun 23 15:17:28 2016 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_Pointers.h,v 1.1 2016/06/23 15:17:28 prlw1 Exp $
+
+https://bugs.launchpad.net/bugs/1595562
+
+--- src/Pointers.h.orig        2015-11-08 18:07:35.000000000 +0000
++++ src/Pointers.h
+@@ -5,15 +5,14 @@
+ #ifndef ECAP_CLAMAV_ADAPTER_POINTERS_H
+ #define ECAP_CLAMAV_ADAPTER_POINTERS_H
+ 
+-#include <libecap/common/forward.h>
+-#include <libecap/common/memory.h>
++#include <memory>
+ 
+ namespace Adapter {
+ 
+     class Xaction;
+ 
+-    typedef libecap::shared_ptr<Xaction> SharedXactionPointer;
+-    typedef libecap::weak_ptr<Xaction> XactionPointer;
++    typedef std::shared_ptr<Xaction> SharedXactionPointer;
++    typedef std::weak_ptr<Xaction> XactionPointer;
+ 
+ } // namespace Adapter
+ 
diff -r 0442c9984062 -r 6881046aec69 security/ecap_clamav_adapter/patches/patch-src_Service.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/ecap_clamav_adapter/patches/patch-src_Service.cc Thu Jun 23 15:17:28 2016 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_Service.cc,v 1.1 2016/06/23 15:17:28 prlw1 Exp $
+
+https://bugs.launchpad.net/bugs/1595562
+
+--- src/Service.cc.orig        2015-11-09 01:12:46.000000000 +0000
++++ src/Service.cc
+@@ -177,7 +177,7 @@ void Adapter::Service::setAll(const Opti
+     tmpFileNameTemplate = TmpFileNameTemplateDefault;
+ 
+     // TODO: convert to std::unique_ptr when we require C++11.
+-    const std::auto_ptr<TricklingConfig> oldTricklingConfig(tricklingConfig_);
++    const std::unique_ptr<TricklingConfig> oldTricklingConfig(tricklingConfig_);
+     tricklingConfig_ = new TricklingConfig();
+ 
+     Cfgtor cfgtor(*this);
+@@ -339,7 +339,7 @@ Adapter::Service::MadeXactionPointer
+ Adapter::Service::makeXaction(libecap::host::Xaction *hostx)
+ {
+     checkpoint();
+-    const libecap::shared_ptr<Service> s = std::tr1::static_pointer_cast<Service>(self);
++    const std::shared_ptr<Service> s = std::static_pointer_cast<Service>(self);
+     SharedXactionPointer x(new Xaction(s, hostx));
+     x->self = x;
+     x->serviceRegistration = new Xactions::iterator(xactions->insert(xactions->end(), x));
+@@ -385,7 +385,7 @@ Adapter::Service::tricklingConfig()
+     return *tricklingConfig_;
+ }
+ 
+-void Adapter::Service::finalizeTricklingConfig(const std::auto_ptr<TricklingConfig> &oldConfig)
++void Adapter::Service::finalizeTricklingConfig(const std::unique_ptr<TricklingConfig> &oldConfig)
+ {
+     if (!tricklingConfig_->dropSize) {
+         // TODO: Warn if at least one other trickling option was explicitly configured.
diff -r 0442c9984062 -r 6881046aec69 security/ecap_clamav_adapter/patches/patch-src_Service.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/ecap_clamav_adapter/patches/patch-src_Service.h  Thu Jun 23 15:17:28 2016 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_Service.h,v 1.1 2016/06/23 15:17:28 prlw1 Exp $
+
+https://bugs.launchpad.net/bugs/1595562
+
+--- src/Service.h.orig 2015-11-09 01:19:35.000000000 +0000
++++ src/Service.h
+@@ -96,7 +96,7 @@ protected:
+ 
+ private:
+     void notifyTimeouts();
+-    void finalizeTricklingConfig(const std::auto_ptr<TricklingConfig> &oldConfig);
++    void finalizeTricklingConfig(const std::unique_ptr<TricklingConfig> &oldConfig);
+     void printTricklingConfig() const;
+ 
+     // either sets how long we can wait for resume() or returns false
diff -r 0442c9984062 -r 6881046aec69 security/ecap_clamav_adapter/patches/patch-src_Xaction.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/ecap_clamav_adapter/patches/patch-src_Xaction.cc Thu Jun 23 15:17:28 2016 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_Xaction.cc,v 1.1 2016/06/23 15:17:28 prlw1 Exp $
+
+https://bugs.launchpad.net/bugs/1595562
+
+--- src/Xaction.cc.orig        2015-11-09 01:33:00.000000000 +0000
++++ src/Xaction.cc
+@@ -89,7 +89,7 @@ void Adapter::MyAnswer::deliver()
+     DebugFun(flXaction) << "exiting " << this
+ 
+ 
+-Adapter::Xaction::Xaction(libecap::shared_ptr<Service> aService,
++Adapter::Xaction::Xaction(std::shared_ptr<Service> aService,
+     libecap::host::Xaction *aHostX):
+     serviceRegistration(0),
+     service(aService),
+@@ -347,7 +347,7 @@ void Adapter::Xaction::noteVbContentDone
+ 
+     vbFile->flush();
+ 
+-    libecap::shared_ptr<Antivirus> scanner = service->scanner;
++    std::shared_ptr<Antivirus> scanner = service->scanner;
+     Must(scanner);
+ 
+     if (service->makesAsyncXactions()) {
+@@ -411,7 +411,7 @@ void Adapter::Xaction::useVirgin()
+ 
+ void Adapter::Xaction::useStored()
+ {
+-    libecap::shared_ptr<libecap::Message> adapted = hostx().virgin().clone();
++    std::shared_ptr<libecap::Message> adapted = hostx().virgin().clone();
+     Must(adapted != 0);
+ 
+     Must(adapted->body());
diff -r 0442c9984062 -r 6881046aec69 security/ecap_clamav_adapter/patches/patch-src_Xaction.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/ecap_clamav_adapter/patches/patch-src_Xaction.h  Thu Jun 23 15:17:28 2016 +0000
@@ -0,0 +1,32 @@
+$NetBSD: patch-src_Xaction.h,v 1.1 2016/06/23 15:17:28 prlw1 Exp $
+
+https://bugs.launchpad.net/bugs/1595562
+
+--- src/Xaction.h.orig 2015-11-09 01:18:50.000000000 +0000
++++ src/Xaction.h
+@@ -13,7 +13,6 @@
+ #include <libecap/adapter/xaction.h>
+ #include <libecap/host/host.h>
+ #include <libecap/host/xaction.h>
+-#include <libecap/common/memory.h>
+ #include <libecap/common/message.h>
+ #include <libecap/common/header.h>
+ #include <libecap/common/names.h>
+@@ -47,7 +46,7 @@ private:
+ class Xaction: public libecap::adapter::Xaction, public Antivirus::User
+ {
+ public:
+-    Xaction(libecap::shared_ptr<Service> aService, libecap::host::Xaction *aHostX);
++    Xaction(std::shared_ptr<Service> aService, libecap::host::Xaction *aHostX);
+     virtual ~Xaction();
+ 
+     // meta-information for the host transaction
+@@ -166,7 +165,7 @@ private:
+ 
+     void disconnect(); // expect no more notifications from Service or Host
+ 
+-    libecap::shared_ptr<const Service> service; // configuration access
++    std::shared_ptr<const Service> service; // configuration access
+     libecap::host::Xaction *hostx_; // host transaction representative
+     libecap::Area uri; // Request-URI from headers, for logging
+ 



Home | Main Index | Thread Index | Old Index