Skip to content

Commit

Permalink
(#11561) Fix #11553 - ruby/3.1.0: build error on all platforms due to…
Browse files Browse the repository at this point in the history
… wrong prefix

* #11553 Suppress prefix

* Don't override the _default_configure_install_flags from AutotoolsToolchain rather than pass --prefix=

* force enable-shared if not passed already (conan < 1.49 ?)
  • Loading branch information
jmarrec authored Jul 19, 2022
1 parent 543a833 commit 335eba1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions recipes/ruby/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,16 @@ def generate(self):
td.generate()

tc = AutotoolsToolchain(self)
# TODO: removed in conan 1.49
tc.default_configure_install_args = True
tc.configure_args = ["--disable-install-doc"]

tc.configure_args.append("--disable-install-doc")
if self.options.shared and not is_msvc(self):
tc.configure_args.append("--enable-shared")
# Force fPIC
tc.fpic = True
if "--enable-shared" not in tc.configure_args:
tc.configure_args.append("--enable-shared")

if cross_building(self) and is_apple_os(self.settings.os):
apple_arch = to_apple_arch(self.settings.arch)
if apple_arch:
Expand All @@ -114,6 +119,7 @@ def generate(self):
if self.settings.build_type in ["Debug", "RelWithDebInfo"]:
tc.ldflags.append("-debug")
tc.build_type_flags = [f if f != "-O2" else self._msvc_optflag for f in tc.build_type_flags]

tc.generate()

def build(self):
Expand Down

0 comments on commit 335eba1

Please sign in to comment.