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

Add a with_extras option to the ICU package #9299

Merged
merged 2 commits into from
Feb 14, 2022
Merged
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: 8 additions & 3 deletions recipes/icu/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class ICUBase(ConanFile):
"with_dyload": [True, False],
"dat_package_file": "ANY",
"with_icuio": [True, False],
"with_extras": [True, False],
}
default_options = {
"shared": False,
Expand All @@ -36,6 +37,7 @@ class ICUBase(ConanFile):
"with_dyload": True,
"dat_package_file": None,
"with_icuio": True,
"with_extras": False,
}

_env_build = None
Expand Down Expand Up @@ -200,8 +202,7 @@ def _build_config_cmd(self):
"--prefix={0}".format(prefix),
"--disable-samples",
"--disable-layout",
"--disable-layoutex",
"--disable-extras"]
"--disable-layoutex"]

if not self.options.with_dyload:
args += ["--disable-dyload"]
Expand All @@ -212,6 +213,9 @@ def _build_config_cmd(self):
if not self.options.with_icuio:
args.append("--disable-icuio")

if not self.options.with_extras:
args.append("--disable-extras")

env_build = self._configure_autotools()
if tools.cross_building(self, skip_x64_x86=True):
if self.settings.os in ["iOS", "tvOS", "watchOS"]:
Expand Down Expand Up @@ -376,7 +380,7 @@ def package_info(self):
data_path = os.path.join(self.package_folder, "res", self._data_filename).replace("\\", "/")
self.output.info("Prepending to ICU_DATA runtime environment variable: {}".format(data_path))
self.runenv_info.prepend_path("ICU_DATA", data_path)
if self._enable_icu_tools:
if self._enable_icu_tools or self.options.with_extras:
self.buildenv_info.prepend_path("ICU_DATA", data_path)
# TODO: to remove after conan v2, it allows to not break consumers still relying on virtualenv generator
self.env_info.ICU_DATA.append(data_path)
Expand All @@ -398,6 +402,7 @@ def package_info(self):
self.cpp_info.components["icu-test"].libs = [self._lib_name("icutest")]
self.cpp_info.components["icu-test"].requires = ["icu-tu", "icu-uc"]

if self._enable_icu_tools or self.options.with_extras:
bin_path = os.path.join(self.package_folder, "bin")
self.output.info("Appending PATH environment variable: {}".format(bin_path))
self.env_info.PATH.append(bin_path)
Expand Down