Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aeron: add v1.43.0, bump JDK, don't write to ~/.gradle #21855

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions recipes/aeron/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
sources:
"1.43.0":
url: "https://github.com/real-logic/aeron/archive/1.43.0.tar.gz"
sha256: "61a11fd81580d1cf3a3b2306165e4990a2c97032d2c0ba06c1d6ba83b78d2efd"
"1.41.4":
url: "https://github.com/real-logic/aeron/archive/1.41.4.tar.gz"
sha256: "681e2a045ca04672612b6edeb7a09c0d574e12c6875cfe26f677b12772d71ad5"
"1.35.1":
url: "https://github.com/real-logic/aeron/archive/1.35.1.tar.gz"
sha256: "19b0f27c2cbc27b422e26a533e4a04a60592217e1c70fdbdd48a92a7b932cccb"
"1.34.0":
url: https://github.com/real-logic/aeron/archive/refs/tags/1.34.0.tar.gz
url: "https://github.com/real-logic/aeron/archive/refs/tags/1.34.0.tar.gz"
sha256: "e475f895f0f75654bc7e25e21169d656401f446bf63a03d4efd931deb60246ca"
"1.33.1":
url: https://github.com/real-logic/aeron/archive/refs/tags/1.33.1.tar.gz
sha256: "a4d936ba82d3aefa0342056680790246620f67de4e275fdd07a013dee795233d"
"1.32.0":
url: https://github.com/real-logic/aeron/archive/refs/tags/1.32.0.tar.gz
sha256: "998ca14c895cd154345c85298b7c2e2ef76aef45b10c742030fd3a32065b9b1c"
16 changes: 14 additions & 2 deletions recipes/aeron/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
from conan.tools.env import VirtualBuildEnv
from conan.tools.env import VirtualBuildEnv, Environment
from conan.tools.files import collect_libs, copy, get, replace_in_file, rename, rm
from conan.tools.microsoft import is_msvc
from conan.tools.scm import Version
Expand Down Expand Up @@ -72,14 +72,18 @@ def validate(self):
raise ConanInvalidConfiguration("This platform (os=Macos arch=armv8) is not yet supported by this recipe")

def build_requirements(self):
self.tool_requires("zulu-openjdk/11.0.19")
if Version(self.version) >= "1.41":
self.tool_requires("zulu-openjdk/17.0.9")
else:
self.tool_requires("zulu-openjdk/11.0.19")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)

def generate(self):
env = VirtualBuildEnv(self)
env.generate()

tc = CMakeToolchain(self)
tc.cache_variables["BUILD_AERON_DRIVER"] = self.options.build_aeron_driver
tc.cache_variables["BUILD_AERON_ARCHIVE_API"] = self.options.build_aeron_archive_api
Expand All @@ -98,9 +102,17 @@ def generate(self):
)
tc.generate()

# Do not create a gradle cache under ~/.gradle
env = Environment()
env.define_path("GRADLE_USER_HOME", self.build_folder)
env.vars(self).save_script("conanbuild_gradle_home")

def _patch_sources(self):
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "/MTd", "")
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "/MT", "")
if Version(self.version) >= "1.42.0":
replace_in_file(self, os.path.join(self.source_folder, "build.gradle"),
"def gitCommitHash = ", 'def gitCommitHash = "" //')

def build(self):
self._patch_sources()
Expand Down
6 changes: 2 additions & 4 deletions recipes/aeron/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
versions:
"1.43.0":
folder: all
"1.41.4":
folder: all
"1.35.1":
folder: all
"1.34.0":
folder: all
"1.33.1":
folder: all
"1.32.0":
folder: all