Skip to content

Commit

Permalink
Make changes for 2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed Dec 15, 2023
1 parent df7d2f0 commit 7ef9d59
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
13 changes: 8 additions & 5 deletions recipes/ruby/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,17 @@ def generate(self):

# Ruby doesn't respect the --with-gmp-dir for eg. After removal of libgmp-dev on conanio/gcc10 build failed
opt_dirs = []
for name, dep_cpp_info in self.deps_cpp_info.dependencies:
if name in ['zlib', 'openssl', 'libffi', 'libyaml', 'readline', 'gmp']:
root_path = unix_path(self, dep_cpp_info.rootpath)
tc.configure_args.append(f'--with-{name}-dir={root_path}')

# zlib always True
tc.configure_args.append(f'--with-zlib-dir={self.dependencies["zlib"].package_path.as_posix()}')
for dep in ['zlib', 'openssl', 'libffi', 'libyaml', 'readline', 'gmp']:
if self.options.get_safe(f'with_{dep}'):
root_path = self.dependencies[dep].package_path.as_posix()
tc.configure_args.append(f'--with-{dep}-dir={root_path}')
opt_dirs.append(root_path)

if opt_dirs:
sep = ';' if self.settings.os == "Windows" else ":"

tc.configure_args.append(f"--with-opt-dir={sep.join(opt_dirs)}")

if cross_building(self) and is_apple_os(self):
Expand Down
5 changes: 3 additions & 2 deletions recipes/ruby/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ def build(self):
# We define RUBY_STATIC_RUBY when ruby itself is static
# We define RUBY_STATIC_LINKED_EXT when the ruby extensions are static (same as EXTSTATIC but clearer)
defs = {}
if not self.options['ruby'].shared:
tested_options = self.dependencies[self.tested_reference_str].options
if not tested_options.shared:
defs['RUBY_STATIC_RUBY'] = 1
if self.options['ruby'].with_static_linked_ext:
if tested_options.with_static_linked_ext:
defs['RUBY_STATIC_LINKED_EXT'] = 1
cmake.configure(variables=defs)
cmake.build()
Expand Down

0 comments on commit 7ef9d59

Please sign in to comment.