Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
C++ client API for Apache Cassandra. The standard front-end (in the sense
of "language binding") for writing C++ programs that use Cassandra.

View File

@@ -0,0 +1,41 @@
# $NetBSD: Makefile,v 1.19 2013/05/31 12:39:47 wiz Exp $
#
DISTNAME= libcassandra-20101010
PKGREVISION= 11
CATEGORIES= databases
MASTER_SITES= ftp://ftp.ancient-solutions.com/pub/bsdprojects/NetBSD/packages/distfiles/
MAINTAINER= tonnerre@NetBSD.org
HOMEPAGE= http://github.com/posulliv/libcassandra/
LICENSE= modified-bsd
COMMENT= C++ interface to Cassandra
USE_LANGUAGES= c c++
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
USE_TOOLS+= perl
# libthrift is not clean
BUILDLINK_TRANSFORM+= rm:-Wundef
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} != "DragonFly"
GCC_REQD+= 4.4
.endif
.include "../../devel/boost-headers/buildlink3.mk"
.include "../../devel/boost-libs/buildlink3.mk"
.include "../../devel/libthrift/buildlink3.mk"
CONFIGURE_ARGS+= CPPFLAGS="-I${BUILDLINK_PREFIX.libthrift}/include/thrift -I${BUILDLINK_PREFIX.boost-headers}/include/boost"
MAKE_ENV+= AM_DEFAULT_VERBOSITY=1
.include "../../mk/compiler.mk"
.if !empty(PKGSRC_COMPILER:Mclang)
CXXFLAGS+= -Wno-c++11-extensions
.endif
.include "../../mk/bsd.pkg.mk"

View File

@@ -0,0 +1,13 @@
@comment $NetBSD: PLIST,v 1.2 2010/10/16 11:43:30 tonnerre Exp $
include/libcassandra/cassandra.h
include/libcassandra/cassandra_factory.h
include/libcassandra/cassandra_host.h
include/libcassandra/exception.h
include/libcassandra/keyspace.h
include/libcassandra/keyspace_factory.h
include/libcassandra/util_functions.h
include/libgenthrift/Cassandra.h
include/libgenthrift/cassandra_constants.h
include/libgenthrift/cassandra_types.h
lib/libcassandra.la
lib/libgenthrift.la

View File

@@ -0,0 +1,13 @@
# $NetBSD: buildlink3.mk,v 1.2 2012/05/07 01:53:18 dholland Exp $
BUILDLINK_TREE+= libcassandra
.if !defined(LIBCASSANDRA_BUILDLINK3_MK)
LIBCASSANDRA_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.libcassandra+= libcassandra>=20100501
BUILDLINK_ABI_DEPENDS.libcassandra+= libcassandra>=20100501
BUILDLINK_PKGSRCDIR.libcassandra?= ../../databases/libcassandra
.endif # LIBCASSANDRA_BUILDLINK3_MK
BUILDLINK_TREE+= -libcassandra

View File

@@ -0,0 +1,14 @@
$NetBSD: distinfo,v 1.7 2013/06/26 21:25:59 joerg Exp $
SHA1 (libcassandra-20101010.tar.gz) = 457dcf1fd24ad310c63eefb3b532f58835f326ef
RMD160 (libcassandra-20101010.tar.gz) = e3e05861d1c1173d2492d49442aa68ee429d7b8f
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

View File

@@ -0,0 +1,99 @@
$NetBSD: patch-aa,v 1.4 2013/05/30 15:36:29 joerg Exp $
Remove the -pedantic flag from the configure script, it isn't terribly
useful for C++0x code.
--- configure.orig 2010-10-10 00:59:59.000000000 +0000
+++ configure
@@ -17972,7 +17972,7 @@ if test "${ac_cv_safe_to_use_wconversion
$as_echo_n "(cached) " >&6
else
save_CFLAGS="$CFLAGS"
- CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
+ CFLAGS="-Wconversion -Werror ${AM_CFLAGS} ${CFLAGS}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18011,7 +18011,7 @@ if test "${ac_cv_safe_to_use_Wconversion
$as_echo_n "(cached) " >&6
else
save_CFLAGS="$CFLAGS"
- CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
+ CFLAGS="-Wconversion -Werror ${AM_CFLAGS} ${CFLAGS}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18071,7 +18071,7 @@ if test "${ac_cv_safe_to_use_Wextra_+set
$as_echo_n "(cached) " >&6
else
save_CFLAGS="$CFLAGS"
- CFLAGS="${W_FAIL} -pedantic -Wextra ${AM_CFLAGS} ${CFLAGS}"
+ CFLAGS="${W_FAIL} -Wextra ${AM_CFLAGS} ${CFLAGS}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18098,7 +18098,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; }
- BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}"
+ BASE_WARNINGS="${W_FAIL} -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}"
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
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="-Werror -pedantic -Wmissing-declarations ${AM_CXXFLAGS}"
+ CXXFLAGS="-Werror -Wmissing-declarations ${AM_CXXFLAGS}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18163,7 +18163,7 @@ if test "${ac_cv_safe_to_use_Wlogical_op
$as_echo_n "(cached) " >&6
else
save_CFLAGS="$CFLAGS"
- CFLAGS="${W_FAIL} -pedantic -Wlogical-op ${AM_CFLAGS} ${CFLAGS}"
+ CFLAGS="${W_FAIL} -Wlogical-op ${AM_CFLAGS} ${CFLAGS}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18205,7 +18205,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXX
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
save_CXXFLAGS="${CXXFLAGS}"
- CXXFLAGS="${W_FAIL} -pedantic -Wredundant-decls ${AM_CXXFLAGS}"
+ CXXFLAGS="${W_FAIL} -Wredundant-decls ${AM_CXXFLAGS}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18255,7 +18255,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXX
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
save_CXXFLAGS="${CXXFLAGS}"
- CXXFLAGS="${W_FAIL} -pedantic -Wattributes -fvisibility=hidden ${AM_CXXFLAGS}"
+ CXXFLAGS="${W_FAIL} -Wattributes -fvisibility=hidden ${AM_CXXFLAGS}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18313,7 +18313,7 @@ if test "${ac_cv_safe_to_use_Wno_attribu
$as_echo_n "(cached) " >&6
else
save_CFLAGS="$CFLAGS"
- CFLAGS="${W_FAIL} -pedantic -Wno_attributes_ ${AM_CFLAGS} ${CFLAGS}"
+ CFLAGS="${W_FAIL} -Wno_attributes_ ${AM_CFLAGS} ${CFLAGS}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -21222,8 +21222,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. */
-#include $ac_cv_cxx_cstdint;
- #include <$location>
+#include $ac_cv_cxx_cstdint
+#include <$location>
int
main ()
{

View File

@@ -0,0 +1,57 @@
$NetBSD: patch-libcassandra_cassandra.cc,v 1.1 2013/05/30 15:36:29 joerg Exp $
--- libcassandra/cassandra.cc.orig 2013-05-30 10:33:52.000000000 +0000
+++ libcassandra/cassandra.cc
@@ -17,6 +17,13 @@
#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()
}
-tr1::shared_ptr<Keyspace> Cassandra::getKeyspace(const string &name)
+shared_ptr<Keyspace> Cassandra::getKeyspace(const string &name)
{
return getKeyspace(name, DCQUORUM);
}
-tr1::shared_ptr<Keyspace> Cassandra::getKeyspace(const string &name,
+shared_ptr<Keyspace> Cassandra::getKeyspace(const string &name,
ConsistencyLevel level)
{
string keymap_name= buildKeyspaceMapName(name, level);
- map<string, tr1::shared_ptr<Keyspace> >::iterator key_it= keyspace_map.find(keymap_name);
+ map<string, shared_ptr<Keyspace> >::iterator key_it= keyspace_map.find(keymap_name);
if (key_it == keyspace_map.end())
{
getKeyspaces();
@@ -104,7 +111,7 @@ tr1::shared_ptr<Keyspace> Cassandra::get
{
map< string, map<string, string> > keyspace_desc;
thrift_client->describe_keyspace(keyspace_desc, name);
- tr1::shared_ptr<Keyspace> ret(new Keyspace(this, name, keyspace_desc, level));
+ shared_ptr<Keyspace> ret(new Keyspace(this, name, keyspace_desc, level));
keyspace_map[keymap_name]= ret;
}
else
@@ -117,7 +124,7 @@ tr1::shared_ptr<Keyspace> Cassandra::get
}
-void Cassandra::removeKeyspace(tr1::shared_ptr<Keyspace> k)
+void Cassandra::removeKeyspace(shared_ptr<Keyspace> k)
{
string keymap_name= buildKeyspaceMapName(k->getName(), k->getConsistencyLevel());
keyspace_map.erase(keymap_name);

View File

@@ -0,0 +1,58 @@
$NetBSD: patch-libcassandra_cassandra.h,v 1.1 2013/05/30 15:36:29 joerg Exp $
--- libcassandra/cassandra.h.orig 2013-05-30 10:29:32.000000000 +0000
+++ libcassandra/cassandra.h
@@ -14,7 +14,11 @@
#include <vector>
#include <set>
#include <map>
+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+#include <memory>
+#else
#include <tr1/memory>
+#endif
#include "libgenthrift/cassandra_types.h"
@@ -65,17 +69,29 @@ public:
/**
* @return the keyspace with the given name.
*/
+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+ 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::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::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:
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::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&);

View File

@@ -0,0 +1,34 @@
$NetBSD: patch-libcassandra_cassandra__factory.cc,v 1.2 2013/06/26 21:25:59 joerg Exp $
--- libcassandra/cassandra_factory.cc.orig 2013-05-30 10:34:39.000000000 +0000
+++ libcassandra/cassandra_factory.cc
@@ -63,17 +63,29 @@ CassandraFactory::CassandraFactory(const
CassandraFactory::~CassandraFactory() {}
+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+std::shared_ptr<Cassandra> CassandraFactory::create()
+#else
tr1::shared_ptr<Cassandra> CassandraFactory::create()
+#endif
{
/* Default is Buffered Transport */
return create(false);
}
+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+std::shared_ptr<Cassandra> CassandraFactory::create(bool framed_transport)
+#else
tr1::shared_ptr<Cassandra> CassandraFactory::create(bool framed_transport)
+#endif
{
CassandraClient *thrift_client= createThriftClient(host, port, framed_transport);
+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+ std::shared_ptr<Cassandra> ret(new Cassandra(thrift_client, host, port));
+#else
tr1::shared_ptr<Cassandra> ret(new Cassandra(thrift_client, host, port));
+#endif
return ret;
}

View File

@@ -0,0 +1,30 @@
$NetBSD: patch-libcassandra_cassandra__factory.h,v 1.1 2013/05/30 15:36:29 joerg Exp $
--- libcassandra/cassandra_factory.h.orig 2013-05-30 10:31:55.000000000 +0000
+++ libcassandra/cassandra_factory.h
@@ -12,7 +12,11 @@
#include <string>
#include <vector>
+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+#include <memory>
+#else
#include <tr1/memory>
+#endif
namespace org
{
@@ -44,8 +48,13 @@ public:
/**
* @return a shared ptr which points to a Cassandra client
*/
+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+ std::shared_ptr<Cassandra> create();
+ std::shared_ptr<Cassandra> create(bool framed_transport);
+#else
std::tr1::shared_ptr<Cassandra> create();
std::tr1::shared_ptr<Cassandra> create(bool framed_transport);
+#endif
int getPort() const;
const std::string &getHost() const;

View File

@@ -0,0 +1,28 @@
$NetBSD: patch-libcassandra_keyspace__factory.cc,v 1.1 2013/05/30 15:36:29 joerg Exp $
--- libcassandra/keyspace_factory.cc.orig 2013-05-30 11:03:36.000000000 +0000
+++ libcassandra/keyspace_factory.cc
@@ -34,6 +34,16 @@ KeyspaceFactory::KeyspaceFactory() {}
KeyspaceFactory::~KeyspaceFactory() {}
+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+std::shared_ptr<Keyspace> KeyspaceFactory::create(Cassandra *client,
+ const string &name,
+ const map< string, map<string, string> > &descrip,
+ ConsistencyLevel level)
+{
+ std::shared_ptr<Keyspace> ret(new Keyspace(client, name, descrip, level));
+ return ret;
+}
+#else
tr1::shared_ptr<Keyspace> KeyspaceFactory::create(Cassandra *client,
const string &name,
const map< string, map<string, string> > &descrip,
@@ -42,4 +52,4 @@ tr1::shared_ptr<Keyspace> KeyspaceFactor
tr1::shared_ptr<Keyspace> ret(new Keyspace(client, name, descrip, level));
return ret;
}
-
+#endif
\ No newline at end of file

View File

@@ -0,0 +1,34 @@
$NetBSD: patch-libcassandra_keyspace__factory.h,v 1.1 2013/05/30 15:36:29 joerg Exp $
--- libcassandra/keyspace_factory.h.orig 2013-05-30 10:36:25.000000000 +0000
+++ libcassandra/keyspace_factory.h
@@ -12,7 +12,11 @@
#include <string>
#include <map>
+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+#include <memory>
+#else
#include <tr1/memory>
+#endif
namespace libcassandra
{
@@ -31,10 +35,17 @@ public:
/**
* @return a shared ptr which points to a Keyspace class
*/
+#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
+ std::shared_ptr<Keyspace> create(Cassandra *client,
+ const std::string &name,
+ const std::map< std::string, std::map<std::string, std::string> > &descrip,
+ org::apache::cassandra::ConsistencyLevel level);
+#else
std::tr1::shared_ptr<Keyspace> create(Cassandra *client,
const std::string &name,
const std::map< std::string, std::map<std::string, std::string> > &descrip,
org::apache::cassandra::ConsistencyLevel level);
+#endif
};

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-libgenthrift_Cassandra.cpp,v 1.1 2011/11/23 15:39:21 joerg Exp $
--- libgenthrift/Cassandra.cpp.orig 2011-11-23 14:40:36.000000000 +0000
+++ libgenthrift/Cassandra.cpp
@@ -6761,7 +6761,8 @@ void CassandraClient::recv_describe_spli
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "describe_splits failed: unknown result");
}
-bool CassandraProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot) {
+bool CassandraProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* connectionContext) {
+ (void)&connectionContext;
::apache::thrift::protocol::TProtocol* iprot = piprot.get();
::apache::thrift::protocol::TProtocol* oprot = poprot.get();

View File

@@ -0,0 +1,21 @@
$NetBSD: patch-libgenthrift_Cassandra.h,v 1.2 2012/11/16 00:40:18 joerg Exp $
--- libgenthrift/Cassandra.h.orig 2010-10-10 00:59:23.000000000 +0000
+++ libgenthrift/Cassandra.h
@@ -2609,7 +2609,7 @@ class CassandraProcessor : virtual publi
processMap_["describe_splits"] = &CassandraProcessor::process_describe_splits;
}
- virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot);
+ virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot, void* connectionContext);
virtual ~CassandraProcessor() {}
};
@@ -2689,6 +2689,7 @@ class CassandraMultiface : virtual publi
ifaces_[i]->get_count(keyspace, key, column_parent, consistency_level);
}
}
+ return 0;
}
void get_range_slice(std::vector<KeySlice> & _return, const std::string& keyspace, const ColumnParent& column_parent, const SlicePredicate& predicate, const std::string& start_key, const std::string& finish_key, const int32_t row_count, const ConsistencyLevel consistency_level) {