Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/databases/libcassandra Just use C++11 std::shared_ptr ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8de54f58ac98
branches:  trunk
changeset: 431568:8de54f58ac98
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu May 14 19:09:09 2020 +0000

description:
Just use C++11 std::shared_ptr instead of boost variant as dependencies
do so anyway.

diffstat:

 databases/libcassandra/Makefile                                         |   4 +-
 databases/libcassandra/distinfo                                         |  20 +-
 databases/libcassandra/patches/patch-aa                                 |  49 +++++-
 databases/libcassandra/patches/patch-libcassandra_cassandra.cc          |  17 +-
 databases/libcassandra/patches/patch-libcassandra_cassandra.h           |  35 +---
 databases/libcassandra/patches/patch-libcassandra_cassandra__factory.cc |  44 +++-
 databases/libcassandra/patches/patch-libcassandra_cassandra__factory.h  |  20 +-
 databases/libcassandra/patches/patch-libcassandra_keyspace__factory.cc  |  25 +--
 databases/libcassandra/patches/patch-libcassandra_keyspace__factory.h   |  24 +--
 databases/libcassandra/patches/patch-libgenthrift_Cassandra.cpp         |   6 +-
 databases/libcassandra/patches/patch-libgenthrift_Cassandra.h           |  76 +++++++++-
 11 files changed, 192 insertions(+), 128 deletions(-)

diffs (truncated from 597 to 300 lines):

diff -r e3fa96023705 -r 8de54f58ac98 databases/libcassandra/Makefile
--- a/databases/libcassandra/Makefile   Thu May 14 19:08:27 2020 +0000
+++ b/databases/libcassandra/Makefile   Thu May 14 19:09:09 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.50 2020/05/06 14:04:23 adam Exp $
+# $NetBSD: Makefile,v 1.51 2020/05/14 19:09:09 joerg Exp $
 #
 
 DISTNAME=              libcassandra-20101010
@@ -32,7 +32,7 @@
 
 .include "../../mk/compiler.mk"
 .if !empty(PKGSRC_COMPILER:Mclang)
-CXXFLAGS+=     -Wno-unknown-warning-option
+CXXFLAGS+=     -Wno-unknown-warning-option -Wno-unused-parameter
 CXXFLAGS+=     -Wno-c++11-extensions -Wno-error=unused-local-typedef
 .endif
 
diff -r e3fa96023705 -r 8de54f58ac98 databases/libcassandra/distinfo
--- a/databases/libcassandra/distinfo   Thu May 14 19:08:27 2020 +0000
+++ b/databases/libcassandra/distinfo   Thu May 14 19:09:09 2020 +0000
@@ -1,15 +1,15 @@
-$NetBSD: distinfo,v 1.8 2015/11/03 01:56:13 agc Exp $
+$NetBSD: distinfo,v 1.9 2020/05/14 19:09:09 joerg Exp $
 
 SHA1 (libcassandra-20101010.tar.gz) = 457dcf1fd24ad310c63eefb3b532f58835f326ef
 RMD160 (libcassandra-20101010.tar.gz) = e3e05861d1c1173d2492d49442aa68ee429d7b8f
 SHA512 (libcassandra-20101010.tar.gz) = 22ae1d5fe2a3558dc9cda94fd4576957c6948f55a866558882db08d4abaf49ae63e41e450f7485280fc342033cdea640759f589453a9a819b6482c5fd2cd8296
 Size (libcassandra-20101010.tar.gz) = 873233 bytes
-SHA1 (patch-aa) = 9cfe12f0fe26514bd7216d49e83248073cf26f4c
-SHA1 (patch-libcassandra_cassandra.cc) = 88d78156cbdbf51e0bd59326e72ca230de3a7688
-SHA1 (patch-libcassandra_cassandra.h) = 751a4b2847e52c87bbd9ccbf05bdcd62dfbb9ae3
-SHA1 (patch-libcassandra_cassandra__factory.cc) = fb5daea713f9b6a2df05c1dd2a2a033f49360cbe
-SHA1 (patch-libcassandra_cassandra__factory.h) = 602752ecd9d692bef0c692ba54098a75df4047c6
-SHA1 (patch-libcassandra_keyspace__factory.cc) = 9ac440c383243fd11e13147e9375e62c48847ebc
-SHA1 (patch-libcassandra_keyspace__factory.h) = bd611da5e673ce38a5eb811e6196a903a5a80ff8
-SHA1 (patch-libgenthrift_Cassandra.cpp) = b8ab38d7e28f98ad84d0f2cd3459d564a8decfc7
-SHA1 (patch-libgenthrift_Cassandra.h) = 271f776e8a4ba898fccd66b951cb7227c7c72cad
+SHA1 (patch-aa) = 00c444efc76919e0742f44e8f782d93205182490
+SHA1 (patch-libcassandra_cassandra.cc) = 766f59afb3185dc96c1fc1b5199b79c759a83092
+SHA1 (patch-libcassandra_cassandra.h) = d832fb8c600fc2f70512c89ecc1119e57add9361
+SHA1 (patch-libcassandra_cassandra__factory.cc) = 5ef14b0455cc6a02b8f616e6c0a445795b60e70b
+SHA1 (patch-libcassandra_cassandra__factory.h) = 1f82cec5ad2d601bf26c9041cf1d140b9e5c7bff
+SHA1 (patch-libcassandra_keyspace__factory.cc) = 57d84d8908d1778bdbca2f8ff639c8357160c84f
+SHA1 (patch-libcassandra_keyspace__factory.h) = 2fdad06db1167ac39806f84edec61caa859a9c62
+SHA1 (patch-libgenthrift_Cassandra.cpp) = e4e78815e9bdae8f288d153c3521d2355b863b80
+SHA1 (patch-libgenthrift_Cassandra.h) = ee6b007d6c39ae80e6ebc5a4639cb9b4af26a483
diff -r e3fa96023705 -r 8de54f58ac98 databases/libcassandra/patches/patch-aa
--- a/databases/libcassandra/patches/patch-aa   Thu May 14 19:08:27 2020 +0000
+++ b/databases/libcassandra/patches/patch-aa   Thu May 14 19:09:09 2020 +0000
@@ -1,11 +1,38 @@
-$NetBSD: patch-aa,v 1.4 2013/05/30 15:36:29 joerg Exp $
+$NetBSD: patch-aa,v 1.5 2020/05/14 19:09:10 joerg Exp $
 
 Remove the -pedantic flag from the configure script, it isn't terribly
 useful for C++0x code.
 
+Fix C++11 test case to actually work. The existing test fails with both
+GCC and Clang.
+
 --- configure.orig     2010-10-10 00:59:59.000000000 +0000
 +++ configure
-@@ -17972,7 +17972,7 @@ if test "${ac_cv_safe_to_use_wconversion
+@@ -15328,7 +15328,6 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ 
+     typedef check<int> check_type;
+     check_type c;
+-    check_type&& cr = c;
+ int
+ main ()
+ {
+@@ -15384,7 +15383,6 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ 
+     typedef check<int> check_type;
+     check_type c;
+-    check_type&& cr = c;
+ int
+ main ()
+ {
+@@ -15441,7 +15439,6 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ 
+     typedef check<int> check_type;
+     check_type c;
+-    check_type&& cr = c;
+ int
+ main ()
+ {
+@@ -17972,7 +17969,7 @@ if test "${ac_cv_safe_to_use_wconversion
    $as_echo_n "(cached) " >&6
  else
    save_CFLAGS="$CFLAGS"
@@ -14,7 +41,7 @@
         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
-@@ -18011,7 +18011,7 @@ if test "${ac_cv_safe_to_use_Wconversion
+@@ -18011,7 +18008,7 @@ if test "${ac_cv_safe_to_use_Wconversion
    $as_echo_n "(cached) " >&6
  else
    save_CFLAGS="$CFLAGS"
@@ -23,7 +50,7 @@
           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
-@@ -18071,7 +18071,7 @@ if test "${ac_cv_safe_to_use_Wextra_+set
+@@ -18071,7 +18068,7 @@ if test "${ac_cv_safe_to_use_Wextra_+set
    $as_echo_n "(cached) " >&6
  else
    save_CFLAGS="$CFLAGS"
@@ -32,7 +59,7 @@
           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
-@@ -18098,7 +18098,7 @@ fi
+@@ -18098,7 +18095,7 @@ fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_use_Wextra_" >&5
  $as_echo "$ac_cv_safe_to_use_Wextra_" >&6; }
  
@@ -41,7 +68,7 @@
        if test "$ac_cv_safe_to_use_Wextra_" = "yes"; then :
    BASE_WARNINGS="${BASE_WARNINGS} -Wextra"
  else
-@@ -18120,7 +18120,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXX
+@@ -18120,7 +18117,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXX
  ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  
           save_CXXFLAGS="$CXXFLAGS"
@@ -50,7 +77,7 @@
           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
-@@ -18163,7 +18163,7 @@ if test "${ac_cv_safe_to_use_Wlogical_op
+@@ -18163,7 +18160,7 @@ if test "${ac_cv_safe_to_use_Wlogical_op
    $as_echo_n "(cached) " >&6
  else
    save_CFLAGS="$CFLAGS"
@@ -59,7 +86,7 @@
           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
-@@ -18205,7 +18205,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXX
+@@ -18205,7 +18202,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXX
  ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  
           save_CXXFLAGS="${CXXFLAGS}"
@@ -68,7 +95,7 @@
           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
-@@ -18255,7 +18255,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXX
+@@ -18255,7 +18252,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXX
  ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  
           save_CXXFLAGS="${CXXFLAGS}"
@@ -77,7 +104,7 @@
           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
-@@ -18313,7 +18313,7 @@ if test "${ac_cv_safe_to_use_Wno_attribu
+@@ -18313,7 +18310,7 @@ if test "${ac_cv_safe_to_use_Wno_attribu
    $as_echo_n "(cached) " >&6
  else
    save_CFLAGS="$CFLAGS"
@@ -86,7 +113,7 @@
           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
-@@ -21222,8 +21222,8 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+@@ -21222,8 +21219,8 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
       if test -z "$ac_cv_cxx_cinttypes"; then
         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
diff -r e3fa96023705 -r 8de54f58ac98 databases/libcassandra/patches/patch-libcassandra_cassandra.cc
--- a/databases/libcassandra/patches/patch-libcassandra_cassandra.cc    Thu May 14 19:08:27 2020 +0000
+++ b/databases/libcassandra/patches/patch-libcassandra_cassandra.cc    Thu May 14 19:09:09 2020 +0000
@@ -1,22 +1,17 @@
-$NetBSD: patch-libcassandra_cassandra.cc,v 1.1 2013/05/30 15:36:29 joerg Exp $
+$NetBSD: patch-libcassandra_cassandra.cc,v 1.2 2020/05/14 19:09:10 joerg Exp $
 
---- libcassandra/cassandra.cc.orig     2013-05-30 10:33:52.000000000 +0000
+--- libcassandra/cassandra.cc.orig     2010-10-10 00:59:23.000000000 +0000
 +++ libcassandra/cassandra.cc
-@@ -17,6 +17,13 @@
+@@ -17,6 +17,8 @@
  #include "libcassandra/keyspace.h"
  #include "libcassandra/exception.h"
  
-+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
 +#include <memory>
-+#else
-+#include <tr1/memory>
-+using std::tr1::shared_ptr;
-+#endif
 +
  using namespace std;
  using namespace org::apache::cassandra;
  using namespace libcassandra;
-@@ -85,17 +92,17 @@ set<string> Cassandra::getKeyspaces()
+@@ -85,17 +87,17 @@ set<string> Cassandra::getKeyspaces()
  }
  
  
@@ -37,7 +32,7 @@
    if (key_it == keyspace_map.end())
    {
      getKeyspaces();
-@@ -104,7 +111,7 @@ tr1::shared_ptr<Keyspace> Cassandra::get
+@@ -104,7 +106,7 @@ tr1::shared_ptr<Keyspace> Cassandra::get
      {
        map< string, map<string, string> > keyspace_desc;
        thrift_client->describe_keyspace(keyspace_desc, name);
@@ -46,7 +41,7 @@
        keyspace_map[keymap_name]= ret;
      }
      else
-@@ -117,7 +124,7 @@ tr1::shared_ptr<Keyspace> Cassandra::get
+@@ -117,7 +119,7 @@ tr1::shared_ptr<Keyspace> Cassandra::get
  }
  
  
diff -r e3fa96023705 -r 8de54f58ac98 databases/libcassandra/patches/patch-libcassandra_cassandra.h
--- a/databases/libcassandra/patches/patch-libcassandra_cassandra.h     Thu May 14 19:08:27 2020 +0000
+++ b/databases/libcassandra/patches/patch-libcassandra_cassandra.h     Thu May 14 19:09:09 2020 +0000
@@ -1,58 +1,43 @@
-$NetBSD: patch-libcassandra_cassandra.h,v 1.1 2013/05/30 15:36:29 joerg Exp $
+$NetBSD: patch-libcassandra_cassandra.h,v 1.2 2020/05/14 19:09:10 joerg Exp $
 
---- libcassandra/cassandra.h.orig      2013-05-30 10:29:32.000000000 +0000
+--- libcassandra/cassandra.h.orig      2010-10-10 00:59:23.000000000 +0000
 +++ libcassandra/cassandra.h
-@@ -14,7 +14,11 @@
+@@ -14,7 +14,7 @@
  #include <vector>
  #include <set>
  #include <map>
-+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+-#include <tr1/memory>
 +#include <memory>
-+#else
- #include <tr1/memory>
-+#endif
  
  #include "libgenthrift/cassandra_types.h"
  
-@@ -65,17 +69,29 @@ public:
+@@ -65,17 +65,17 @@ public:
    /**
     * @return the keyspace with the given name.
     */
-+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+-  std::tr1::shared_ptr<Keyspace> getKeyspace(const std::string &name);
 +  std::shared_ptr<Keyspace> getKeyspace(const std::string &name);
-+#else
-   std::tr1::shared_ptr<Keyspace> getKeyspace(const std::string &name);
-+#endif
  
    /**
     * @return the keyspace with the given name at the given consistency level.
     */
-+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+-  std::tr1::shared_ptr<Keyspace> getKeyspace(const std::string &name, org::apache::cassandra::ConsistencyLevel level);
 +  std::shared_ptr<Keyspace> getKeyspace(const std::string &name, org::apache::cassandra::ConsistencyLevel level);
-+#else
-   std::tr1::shared_ptr<Keyspace> getKeyspace(const std::string &name, org::apache::cassandra::ConsistencyLevel level);
-+#endif
  
    /**
     * Remove the given keyspace.
     */
-+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+-  void removeKeyspace(std::tr1::shared_ptr<Keyspace> k);
 +  void removeKeyspace(std::shared_ptr<Keyspace> k);
-+#else
-   void removeKeyspace(std::tr1::shared_ptr<Keyspace> k);
-+#endif
  
    /**
     * @return the target server cluster name.
-@@ -128,7 +144,11 @@ private:
+@@ -128,7 +128,7 @@ private:
    std::string config_file;
    std::set<std::string> key_spaces;
    std::map<std::string, std::string> token_map;
-+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+-  std::map<std::string, std::tr1::shared_ptr<Keyspace> > keyspace_map;
 +  std::map<std::string, std::shared_ptr<Keyspace> > keyspace_map;
-+#else
-   std::map<std::string, std::tr1::shared_ptr<Keyspace> > keyspace_map;
-+#endif
  
    Cassandra(const Cassandra&);
    Cassandra &operator=(const Cassandra&);
diff -r e3fa96023705 -r 8de54f58ac98 databases/libcassandra/patches/patch-libcassandra_cassandra__factory.cc
--- a/databases/libcassandra/patches/patch-libcassandra_cassandra__factory.cc   Thu May 14 19:08:27 2020 +0000
+++ b/databases/libcassandra/patches/patch-libcassandra_cassandra__factory.cc   Thu May 14 19:09:09 2020 +0000
@@ -1,34 +1,48 @@
-$NetBSD: patch-libcassandra_cassandra__factory.cc,v 1.2 2013/06/26 21:25:59 joerg Exp $
+$NetBSD: patch-libcassandra_cassandra__factory.cc,v 1.3 2020/05/14 19:09:10 joerg Exp $
 
---- libcassandra/cassandra_factory.cc.orig     2013-05-30 10:34:39.000000000 +0000



Home | Main Index | Thread Index | Old Index