Skip to content

Commit

Permalink
(conan-io#22550) cppkafka: add version 0.4.1, update dependencies
Browse files Browse the repository at this point in the history
* cppkafka: add version 0.4.1

* make boost transitive_headers
  • Loading branch information
toge authored Jan 28, 2024
1 parent e5def28 commit 44518a6
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 9 deletions.
12 changes: 9 additions & 3 deletions recipes/cppkafka/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
sources:
"0.4.1":
url: "https://github.com/mfontanini/cppkafka/archive/refs/tags/v0.4.1.tar.gz"
sha256: "45770ae0404cb9ba73d659618c51cd55b574c66ed3c7b148360222fb524b0ff7"
"0.4.0":
url: "https://github.com/mfontanini/cppkafka/archive/refs/tags/0.4.0.tar.gz"
sha256: "f4f05eb7a180a856663b02ec0b777283275ef88e5523f3013fd51c6c4ab63b5a"
patches:
"0.4.1":
- patch_file: "patches/0.4.0-0001-no-template-export.patch"
- patch_file: "patches/0.4.1-0003-clean-rpath.patch"
"0.4.0":
- patch_file: "patches/0001-no-template-export.patch"
- patch_file: "patches/0002-cppstd.patch"
- patch_file: "patches/0003-clean-rpath.patch"
- patch_file: "patches/0.4.0-0001-no-template-export.patch"
- patch_file: "patches/0.4.0-0002-cppstd.patch"
- patch_file: "patches/0.4.0-0003-clean-rpath.patch"
12 changes: 6 additions & 6 deletions recipes/cppkafka/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir
from conan.tools.scm import Version
import os

required_conan_version = ">=1.53.0"
Expand All @@ -10,11 +11,10 @@
class CppKafkaConan(ConanFile):
name = "cppkafka"
description = "Modern C++ Apache Kafka client library (wrapper for librdkafka)"
topics = ("librdkafka", "kafka")
license = "MIT"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/mfontanini/cppkafka"
license = "MIT"

topics = ("librdkafka", "kafka")
package_type = "library"
settings = "os", "arch", "compiler", "build_type"
options = {
Expand All @@ -41,8 +41,8 @@ def layout(self):
cmake_layout(self, src_folder="src")

def requirements(self):
self.requires("boost/1.81.0")
self.requires("librdkafka/2.0.2")
self.requires("boost/1.83.0", transitive_headers=True)
self.requires("librdkafka/2.3.0", transitive_headers=True)

def validate(self):
if self.settings.compiler.get_safe("cppstd"):
Expand All @@ -57,7 +57,7 @@ def generate(self):
tc.variables["CPPKAFKA_DISABLE_TESTS"] = True
tc.variables["CPPKAFKA_DISABLE_EXAMPLES"] = True
tc.variables["CPPKAFKA_RDKAFKA_STATIC_LIB"] = False # underlying logic is useless
if self.settings.os == "Windows":
if Version(self.version) < "0.4.1" and self.settings.os == "Windows":
tc.preprocessor_definitions["NOMINMAX"] = 1
tc.generate()
cd = CMakeDeps(self)
Expand Down
28 changes: 28 additions & 0 deletions recipes/cppkafka/all/patches/0.4.1-0003-clean-rpath.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c667df..46c5590 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,7 +28,7 @@ if (NOT CMAKE_CXX_FLAGS)
add_definitions("-DNOGDI=1")
add_definitions("-DNOMINMAX=1")
else()
- set(CMAKE_CXX_FLAGS "-Wall")
+# set(CMAKE_CXX_FLAGS "-Wall")
endif()
endif()

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 214ccd4..d2667ce 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -46,8 +46,8 @@ set_target_properties(${TARGET_NAME} PROPERTIES
ARCHIVE_OUTPUT_NAME "${TARGET_NAME}"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_INSTALL_LIBDIR}"
LIBRARY_OUTPUT_NAME "${TARGET_NAME}"
- INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}"
- INSTALL_RPATH_USE_LINK_PATH TRUE
+ # INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}"
+ # INSTALL_RPATH_USE_LINK_PATH TRUE
VERSION ${CPPKAFKA_VERSION}
SOVERSION ${CPPKAFKA_VERSION})
# In CMake >= 3.15 Boost::boost == Boost::headers
2 changes: 2 additions & 0 deletions recipes/cppkafka/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"0.4.1":
folder: "all"
"0.4.0":
folder: "all"

0 comments on commit 44518a6

Please sign in to comment.