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

- [boost] fix libiconv detection (needed by boost locale) for iOS, Android #7146

Merged
merged 10 commits into from
Sep 10, 2021
15 changes: 14 additions & 1 deletion recipes/boost/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,13 @@ def config_options(self):
# iconv is off by default on Windows and Solaris
if self._is_windows_platform or self.settings.os == "SunOS":
self.options.i18n_backend_iconv = "off"
elif self.settings.os == "Macos":
elif tools.is_apple_os(self.settings.os):
self.options.i18n_backend_iconv = "libiconv"
elif self.settings.os == "Android":
# bionic provides iconv since API level 28
api_level = self.settings.get_safe("os.api_level")
if api_level and tools.Version(api_level) < "28":
self.options.i18n_backend_iconv = "libiconv"

# Remove options not supported by this version of boost
for dep_name in CONFIGURE_OPTIONS:
Expand Down Expand Up @@ -778,6 +783,14 @@ def build(self):
"thread_local", "/* thread_local */")
tools.replace_in_file(os.path.join(self.source_folder, self._source_subfolder, "boost", "stacktrace", "detail", "libbacktrace_impls.hpp"),
"static __thread", "/* static __thread */")
tools.replace_in_file(os.path.join(self.source_folder, self._source_subfolder, "tools", "build", "src", "tools", "gcc.jam"),
"local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;",
"local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux iphone ] ;",
SSE4 marked this conversation as resolved.
Show resolved Hide resolved
strict=False)
tools.replace_in_file(os.path.join(self.source_folder, self._source_subfolder, "tools", "build", "src", "tools", "gcc.jam"),
"local no-threading = android beos haiku sgi darwin vxworks ;",
"local no-threading = android beos haiku sgi darwin vxworks iphone ;",
SSE4 marked this conversation as resolved.
Show resolved Hide resolved
strict=False)

if self.options.header_only:
self.output.warn("Header only package, skipping build")
Expand Down