diff --git a/recipes/objectbox/all/conandata.yml b/recipes/objectbox/all/conandata.yml index ca8ae614b9798..f231640a4b482 100644 --- a/recipes/objectbox/all/conandata.yml +++ b/recipes/objectbox/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.0": + url: "https://github.com/objectbox/objectbox-c/archive/refs/tags/v4.0.0.tar.gz" + sha256: "1cd1f0633290395a7cacace484485197562f38ec85ac6cc3b3a1bceae430c615" # The release tarball is invalid, so we need to get the tarball from the v0.20.0 commit. # https://github.com/objectbox/objectbox-c/issues/38 "0.21.0": @@ -20,6 +23,10 @@ sources: url: "https://github.com/objectbox/objectbox-c/archive/refs/tags/v0.17.0.tar.gz" sha256: "3b936b3352ae0c8ea3706cc0a1790d2714a415cdce16007c2caca367ead5af8d" patches: + "4.0.0": + - patch_file: "patches/0.21.0-0001-fix-cmake.patch" + patch_description: "add sync option, disable tests/examples, support max length of windows path" + patch_type: "conan" "0.21.0": - patch_file: "patches/0.21.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" diff --git a/recipes/objectbox/all/conanfile.py b/recipes/objectbox/all/conanfile.py index ffcc6e09fb17f..293e8275f899e 100644 --- a/recipes/objectbox/all/conanfile.py +++ b/recipes/objectbox/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.scm import Version import os +import platform required_conan_version = ">=1.53.0" @@ -34,6 +35,8 @@ def validate(self): if Version(self.version) >= "0.19.0" and \ self.settings.compiler == "gcc" and Version(self.settings.compiler.version) <= "5": raise ConanInvalidConfiguration(f"{self.ref} requires GCC 6 or higher") + if Version(self.version) >= "4.0.0" and self._is_glibc_older_than_2_27_on_linux: + raise ConanInvalidConfiguration(f"{self.ref} requires glibc>=2.27") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -62,3 +65,12 @@ def package_info(self): self.cpp_info.system_libs.extend(["m", "pthread"]) if Version(self.version) >= "0.18.0": self.cpp_info.system_libs.append("dl") + + @property + def _is_glibc_older_than_2_27_on_linux(self): + libver = platform.libc_ver() + return ( + self.settings.os == 'Linux' and + libver[0] == 'glibc' and + Version(libver[1]) < '2.27' + ) diff --git a/recipes/objectbox/config.yml b/recipes/objectbox/config.yml index 455f77377fdff..25251d5e1cd7a 100644 --- a/recipes/objectbox/config.yml +++ b/recipes/objectbox/config.yml @@ -1,4 +1,6 @@ versions: + "4.0.0": + folder: all "0.21.0": folder: all "0.20.0":