From 9bd38dd2907c8fc58c2fce91ccfeeb2e078d93a2 Mon Sep 17 00:00:00 2001 From: Alex Kremer Date: Mon, 9 Oct 2023 13:28:11 +0100 Subject: [PATCH] Update cassandra version (#844) Fixes #843 --- README.md | 1 - conanfile.py | 2 +- external/cassandra/conanfile.py | 87 --------------------------------- 3 files changed, 1 insertion(+), 89 deletions(-) delete mode 100644 external/cassandra/conanfile.py diff --git a/README.md b/README.md index 3eda19b6..cc16326a 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,6 @@ Now you should be able to download prebuilt `xrpl` package on some platforms. 2. Remove old packages you may have cached: ```sh conan remove -f xrpl -conan remove -f cassandra-cpp-driver ``` ## Building Clio diff --git a/conanfile.py b/conanfile.py index 3c3609c6..75634832 100644 --- a/conanfile.py +++ b/conanfile.py @@ -21,7 +21,7 @@ class Clio(ConanFile): requires = [ 'boost/1.82.0', - 'cassandra-cpp-driver/2.16.2', + 'cassandra-cpp-driver/2.17.0', 'fmt/10.0.0', 'grpc/1.50.1', 'openssl/1.1.1u', diff --git a/external/cassandra/conanfile.py b/external/cassandra/conanfile.py deleted file mode 100644 index ea23e4aa..00000000 --- a/external/cassandra/conanfile.py +++ /dev/null @@ -1,87 +0,0 @@ -from conan import ConanFile, tools -from conan.tools.cmake import CMake, CMakeToolchain - -class Cassandra(ConanFile): - name = 'cassandra-cpp-driver' - version = '2.16.2' - license = 'Apache-2.0' - url = 'https://github.com/conan-io/conan-center-index' - homepage = 'https://docs.datastax.com/en/developer/cpp-driver/' - description = 'Cassandra C++ Driver' - topics = ('conan', 'cassandra', 'driver') - - settings = 'os', 'arch', 'compiler', 'build_type' - options = { - 'shared': [True, False], - 'fPIC': [True, False], - 'install_header_in_subdir': [True, False], - 'use_atomic': [None, 'boost', 'std'], - 'with_openssl': [True, False], - 'with_zlib': [True, False], - 'with_kerberos': [True, False], - 'use_timerfd': [True, False], - } - default_options = { - 'shared': False, - 'fPIC': True, - 'install_header_in_subdir': False, - 'use_atomic': None, - 'with_openssl': True, - 'with_zlib': True, - 'with_kerberos': False, - 'use_timerfd': True, - } - - def requirements(self): - self.requires('libuv/1.44.1') - self.requires('http_parser/2.9.4') - if self.options.with_openssl: - self.requires('openssl/1.1.1q') - if self.options.with_zlib: - self.requires('minizip/1.2.12') - self.requires('zlib/1.2.13') - if self.options.use_atomic == 'boost': - self.requires('boost/1.79.0') - - exports_sources = ['CMakeLists.txt'] - - def config_options(self): - if self.settings.os == 'Windows': - del self.options.fPIC - - def configure(self): - self.options['libuv'].shared = self.options.shared - - def generate(self): - tc = CMakeToolchain(self) - if self.settings.get_safe('compiler.cppstd') == '20': - tc.blocks['cppstd'].values['cppstd'] = 17 - tc.variables['CASS_BUILD_STATIC'] = not self.options.shared - tc.variables['CASS_USE_STATIC_LIBS'] = not self.options.shared - tc.variables['CASS_BUILD_SHARED'] = self.options.shared - tc.variables['LIBUV_ROOT_DIR'] = self.deps_cpp_info['libuv'].rootpath - if self.options.with_openssl: - tc.variables['OPENSSL_ROOT_DIR'] = self.deps_cpp_info['openssl'].rootpath - tc.generate() - - def source(self): - tools.files.get(self, f'https://github.com/datastax/cpp-driver/archive/refs/tags/{self.version}.tar.gz', strip_root=True) - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def package(self): - cmake = CMake(self) - cmake.install() - - def package_info(self): - if self.options.shared: - self.cpp_info.libs = ['cassandra'] - else: - self.cpp_info.libs = ['cassandra_static'] - if self.settings.os == 'Windows': - self.cpp_info.libs.extend(['iphlpapi', 'psapi', 'wsock32', 'crypt32', 'ws2_32', 'userenv']) - if not self.options.shared: - self.cpp_info.defines = ['CASS_STATIC']