Skip to content

Commit 37a1b00

Browse files
authored
(#24417) libavrocpp: add version 1.11.3, compatibility conan v2
* libavrocpp: add version 1.11.3, compatibility conan v2 * Correctly check c++ standard version * Disable warn as error for boost portability * Remove dependencies ranges compatibility according to conan-center policy
1 parent 0f8819d commit 37a1b00

File tree

4 files changed

+40
-4
lines changed

4 files changed

+40
-4
lines changed

recipes/libavrocpp/all/conandata.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
sources:
2+
"1.11.3":
3+
url: "https://github.com/apache/avro/archive/release-1.11.3.tar.gz"
4+
sha256: "da377ac1cf8b91458bf702cbcfb214eecb5c399b267f0ca9c0aade6cabaf126e"
25
"1.11.1":
36
url: "https://github.com/apache/avro/archive/release-1.11.1.tar.gz"
47
sha256: "599f96bb405f72a35154b2477caa6254d723bb4e3f6a0e54e9ae540664321752"
@@ -12,6 +15,22 @@ sources:
1215
url: "https://github.com/apache/avro/archive/release-1.10.1.tar.gz"
1316
sha256: "8fd1f850ce37e60835e6d8335c0027a959aaa316773da8a9660f7d33a66ac142"
1417
patches:
18+
"1.11.3":
19+
- patch_file: "patches/0001-add-iterator-include-1-11-0.patch"
20+
patch_description: "include iterator"
21+
patch_type: "portability"
22+
- patch_file: "patches/0002-disable-tests-1-11-1.patch"
23+
patch_description: "disable tests"
24+
patch_type: "conan"
25+
- patch_file: "patches/0003-allow-static-boost-linkage-1-11-0.patch"
26+
patch_description: "remove boost linkage definitions"
27+
patch_type: "conan"
28+
- patch_file: "patches/0004-fix-windows-shared-installation-1-11-1.patch"
29+
patch_description: "fix runtime installation path"
30+
patch_type: "portability"
31+
- patch_file: "patches/0006-disable-warn-as-error-1-11-3.patch"
32+
patch_description: "disable warn as error for boost c++14 breaking change"
33+
patch_type: "portability"
1534
"1.11.1":
1635
- patch_file: "patches/0001-add-iterator-include-1-11-0.patch"
1736
patch_description: "include iterator"

recipes/libavrocpp/all/conanfile.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from conan import ConanFile
22
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, replace_in_file
3-
from conan.tools.build import check_min_cppstd
3+
from conan.tools.build import check_min_cppstd, valid_min_cppstd
44
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
55
import os
66

@@ -14,6 +14,7 @@ class LibavrocppConan(ConanFile):
1414
url = "https://github.com/conan-io/conan-center-index"
1515
homepage = "https://avro.apache.org/"
1616
topics = ("serialization", "deserialization","avro")
17+
package_type = "library"
1718
settings = "os", "arch", "compiler", "build_type"
1819
options = {
1920
"shared": [True, False],
@@ -42,9 +43,10 @@ def configure(self):
4243

4344
def layout(self):
4445
cmake_layout(self, src_folder="src")
45-
46+
4647
def requirements(self):
47-
self.requires("boost/1.81.0")
48+
# boost upper to 1.81.0 requires C++14 minimum
49+
self.requires("boost/1.81.0", transitive_headers=True)
4850
self.requires("snappy/1.1.9")
4951

5052
def validate(self):
@@ -93,7 +95,7 @@ def package(self):
9395
rm(self, dll_pattern_to_remove, os.path.join(self.package_folder, "bin"))
9496

9597
def package_info(self):
96-
self.cpp_info.libs = ["avrocpp" if self.options.shared else "avrocpp_s"]
98+
self.cpp_info.libs = ["avrocpp"] if self.options.shared else ["avrocpp_s"]
9799
if self.options.shared:
98100
self.cpp_info.defines.append("AVRO_DYN_LINK")
99101
if self.settings.os in ["Linux", "FreeBSD"]:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/lang/c++/CMakeLists.txt b/lang/c++/CMakeLists.txt
2+
index 52d6ac8a..26d8d146 100644
3+
--- a/lang/c++/CMakeLists.txt
4+
+++ b/lang/c++/CMakeLists.txt
5+
@@ -59,7 +59,7 @@ if (WIN32 AND NOT CYGWIN AND NOT MSYS)
6+
endif()
7+
8+
if (CMAKE_COMPILER_IS_GNUCXX)
9+
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror")
10+
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic")
11+
if (AVRO_ADD_PROTECTOR_FLAGS)
12+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fstack-protector-all -D_GLIBCXX_DEBUG")
13+
# Unset _GLIBCXX_DEBUG for avrogencpp.cc because using Boost Program Options

recipes/libavrocpp/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
versions:
2+
1.11.3:
3+
folder: all
24
1.11.1:
35
folder: all
46
1.11.0:

0 commit comments

Comments
 (0)