From 9e2cb9701cdceeba9e010ce9ca566af7ffd0074d Mon Sep 17 00:00:00 2001
From: Daniel Hartwig <mandyke@gmail.com>
Date: Wed, 29 May 2013 11:52:42 +0800
Subject: [PATCH] fix FTBFS with Boost 1.53

* src/generic/util/sqlite.h (statement, blob): Also befriend the new
  boost::make_shared prototype.  Some better solution may be possible
  at a later point, this is enough for now.

* src/cmdline/mocks/terminal.h: Remove predefinition of
  boost::make_shared that conflicts with Boost 1.53.

Closes: #710208
---
 src/cmdline/mocks/terminal.h |    6 +-----
 src/generic/util/sqlite.h    |    7 +++++++
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/cmdline/mocks/terminal.h b/src/cmdline/mocks/terminal.h
index cbd06f3..fa85022 100644
--- a/src/cmdline/mocks/terminal.h
+++ b/src/cmdline/mocks/terminal.h
@@ -27,14 +27,10 @@
 
 // System includes:
 #include <boost/shared_ptr.hpp>
+#include <boost/make_shared.hpp>
 
 #include <gmock/gmock.h>
 
-namespace boost
-{
-  template<typename T> boost::shared_ptr<T> make_shared();
-}
-
 namespace aptitude
 {
   namespace cmdline
diff --git a/src/generic/util/sqlite.h b/src/generic/util/sqlite.h
index 4c85c00..253d9ad 100644
--- a/src/generic/util/sqlite.h
+++ b/src/generic/util/sqlite.h
@@ -374,6 +374,10 @@ namespace aptitude
       statement(db &_parent, sqlite3_stmt *_handle);
       template<typename A, typename B, typename C>
       friend boost::shared_ptr<A> boost::make_shared(const B &, const C &);
+      // FIXME: Ouch.  Boost 1.53 requires this mess or something else
+      // I haven't worked out yet.
+      template<typename A, typename B, typename C>
+      friend typename boost::detail::sp_if_not_array<A>::type boost::make_shared(const B &, const C &);
 
       /** \brief Throw an exception if there isn't result data ready
        *  to be read.
@@ -567,6 +571,9 @@ namespace aptitude
       blob(db &_parent, sqlite3_blob *_handle);
       template<typename A, typename B, typename C>
       friend boost::shared_ptr<A> boost::make_shared(const B &, const C &);
+      // FIXME: Ouch.  Again.
+      template<typename A, typename B, typename C>
+      friend typename boost::detail::sp_if_not_array<A>::type boost::make_shared(const B &, const C &);
 
     public:
       /** \brief Open an existing BLOB.
-- 
1.7.10.4

