We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[request] icu/66.1
### Package Details
  * Package Name/Version: **icu/66.1**
  * Changelog: **https://github.com/unicode-org/icu/releases/tag/release-66-1**


The above mentioned version is newly released by the upstream project and not yet available as a recipe. Please add this version.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `recipes/icu/all/conanfile.py`
Content:
```
1 import os
2 import glob
3 import platform
4 import shutil
5 from conans import ConanFile, tools, AutoToolsBuildEnvironment
6 from conans.tools import Version
7 
8 
9 class ICUBase(ConanFile):
10     name = "icu"
11     homepage = "http://site.icu-project.org"
12     license = "ICU"
13     description = "ICU is a mature, widely used set of C/C++ and Java libraries " \
14                   "providing Unicode and Globalization support for software applications."
15     url = "https://github.com/conan-io/conan-center-index"
16     topics = ("conan", "icu", "icu4c", "i see you", "unicode")
17     _source_subfolder = "source_subfolder"
18     _build_subfolder = "build_subfolder"
19     _env_build = None
20     settings = "os", "arch", "compiler", "build_type"
21     options = {"shared": [True, False],
22                "fPIC": [True, False],
23                "data_packaging": ["files", "archive", "library", "static"],
24                "with_unit_tests": [True, False],
25                "silent": [True, False],
26                "with_dyload": [True, False]}
27     default_options = {"shared": False,
28                        "fPIC": True,
29                        "data_packaging": "archive",
30                        "with_unit_tests": False,
31                        "silent": True,
32                        "with_dyload": True}
33 
34     @property
35     def _is_msvc(self):
36         return self.settings.compiler == "Visual Studio"
37 
38     @property
39     def _is_mingw(self):
40         return self.settings.os == "Windows" and self.settings.compiler == "gcc"
41 
42     def build_requirements(self):
43         if tools.os_info.is_windows and "CONAN_BASH_PATH" not in os.environ and \
44                 tools.os_info.detect_windows_subsystem() != "msys2":
45             self.build_requires("msys2/20190524")
46 
47     def source(self):
48         tools.get(**self.conan_data["sources"][self.version])
49         os.rename("icu", self._source_subfolder)
50 
51     def _workaround_icu_20545(self):
52         if tools.os_info.is_windows:
53             # https://unicode-org.atlassian.net/projects/ICU/issues/ICU-20545
54             srcdir = os.path.join(self.build_folder, self._source_subfolder, "source")
55             makeconv_cpp = os.path.join(srcdir, "tools", "makeconv", "makeconv.cpp")
56             tools.replace_in_file(makeconv_cpp,
57                                   "pathBuf.appendPathPart(arg, localError);",
58                                   "pathBuf.append('/', localError); pathBuf.append(arg, localError);")
59 
60     def build(self):
61         for filename in glob.glob("patches/*.patch"):
62             self.output.info('applying patch "%s"' % filename)
63             tools.patch(base_path=self._source_subfolder, patch_file=filename)
64 
65         if self._is_msvc:
66             run_configure_icu_file = os.path.join(self._source_subfolder, 'source', 'runConfigureICU')
67 
68             flags = "-%s" % self.settings.compiler.runtime
69             if self.settings.get_safe("build_type") in ['Debug', 'RelWithDebInfo'] and Version(self.settings.compiler.version) >= "12":
70                 flags += " -FS"
71             tools.replace_in_file(run_configure_icu_file, "-MDd", flags)
72             tools.replace_in_file(run_configure_icu_file, "-MD", flags)
73 
74         self._workaround_icu_20545()
75 
76         self._env_build = AutoToolsBuildEnvironment(self)
77         if not self.options.get_safe("shared"):
78             self._env_build.defines.append("U_STATIC_IMPLEMENTATION")
79         if tools.is_apple_os(self.settings.os):
80             self._env_build.defines.append("_DARWIN_C_SOURCE")
81             if self.settings.get_safe("os.version"):
82                 self._env_build.flags.append(tools.apple_deployment_target_flag(self.settings.os,
83                                                                             self.settings.os.version))
84 
85         if "msys2" in self.deps_user_info:
86             self._env_build.vars["PYTHON"] = tools.unix_path(os.path.join(self.deps_env_info["msys2"].MSYS_BIN, "python"), tools.MSYS2)
87 
88         build_dir = os.path.join(self.build_folder, self._source_subfolder, 'build')
89         os.mkdir(build_dir)
90 
91         with tools.vcvars(self.settings) if self._is_msvc else tools.no_op():
92             with tools.environment_append(self._env_build.vars):
93                 with tools.chdir(build_dir):
94                     # workaround for https://unicode-org.atlassian.net/browse/ICU-20531
95                     os.makedirs(os.path.join("data", "out", "tmp"))
96 
97                     self.run(self._build_config_cmd, win_bash=tools.os_info.is_windows)
98                     if self.options.get_safe("silent"):
99                         silent = '--silent' if self.options.silent else 'VERBOSE=1'
100                     else:
101                         silent = '--silent'
102                     command = "make {silent} -j {cpu_count}".format(silent=silent,
103                                                                     cpu_count=tools.cpu_count())
104                     self.run(command, win_bash=tools.os_info.is_windows)
105                     if self.options.get_safe("with_unit_tests"):
106                         command = "make {silent} check".format(silent=silent)
107                         self.run(command, win_bash=tools.os_info.is_windows)
108                     command = "make {silent} install".format(silent=silent)
109                     self.run(command, win_bash=tools.os_info.is_windows)
110 
111         self._install_name_tool()
112 
113     def package(self):
114         if self._is_msvc:
115             for dll in glob.glob(os.path.join(self.package_folder, 'lib', '*.dll')):
116                 shutil.move(dll, os.path.join(self.package_folder, 'bin'))
117 
118         self.copy("LICENSE", dst="licenses", src=os.path.join(self.source_folder, self._source_subfolder))
119         tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig"))
120         tools.rmdir(os.path.join(self.package_folder, "share"))
121 
122     @staticmethod
123     def detected_os():
124         if tools.OSInfo().is_macos:
125             return "Macos"
126         if tools.OSInfo().is_windows:
127             return "Windows"
128         return platform.system()
129 
130     @property
131     def cross_building(self):
132         if tools.cross_building(self.settings):
133             if self.settings.os == self.detected_os():
134                 if self.settings.arch == "x86" and tools.detected_architecture() == "x86_64":
135                     return False
136             return True
137         return False
138 
139     @property
140     def build_config_args(self):
141         prefix = self.package_folder.replace('\\', '/')
142         platform = {("Windows", "Visual Studio"): "Cygwin/MSVC",
143                     ("Windows", "gcc"): "MinGW",
144                     ("AIX", "gcc"): "AIX/GCC",
145                     ("AIX", "xlc"): "AIX",
146                     ("SunOS", "gcc"): "Solaris/GCC",
147                     ("Linux", "gcc"): "Linux/gcc",
148                     ("Linux", "clang"): "Linux",
149                     ("Macos", "gcc"): "MacOSX",
150                     ("Macos", "clang"): "MacOSX",
151                     ("Macos", "apple-clang"): "MacOSX"}.get((str(self.settings.os),
152                                                              str(self.settings.compiler)))
153         arch64 = ['x86_64', 'sparcv9', 'ppc64']
154         bits = "64" if self.settings.arch in arch64 else "32"
155         args = [platform,
156                 "--prefix={0}".format(prefix),
157                 "--with-library-bits={0}".format(bits),
158                 "--disable-samples",
159                 "--disable-layout",
160                 "--disable-layoutex"]
161         
162         if not self.options.with_dyload:
163             args += ["--disable-dyload"]
164 
165         if self.cross_building:
166             if self._env_build.build:
167                 args.append("--build=%s" % self._env_build.build)
168             if self._env_build.host:
169                 args.append("--host=%s" % self._env_build.host)
170             if self._env_build.target:
171                 args.append("--target=%s" % self._env_build.target)
172 
173         if self.options.get_safe("data_packaging"):
174             args.append("--with-data-packaging={0}".format(self.options.data_packaging))
175         else:
176             args.append("--with-data-packaging=static")
177         datadir = os.path.join(self.package_folder, "lib")
178         datadir = datadir.replace("\\", "/") if tools.os_info.is_windows else datadir
179         args.append("--datarootdir=%s" % datadir)  # do not use share
180         bindir = os.path.join(self.package_folder, "bin")
181         bindir = bindir.replace("\\", "/") if tools.os_info.is_windows else bindir
182         args.append("--sbindir=%s" % bindir)
183 
184         if self._is_mingw:
185             mingw_chost = 'i686-w64-mingw32' if self.settings.arch == 'x86' else 'x86_64-w64-mingw32'
186             args.extend(["--build={0}".format(mingw_chost),
187                          "--host={0}".format(mingw_chost)])
188 
189         if self.settings.get_safe("build_type") == "Debug":
190             args.extend(["--disable-release", "--enable-debug"])
191         if self.options.get_safe("shared"):
192             args.extend(["--disable-static", "--enable-shared"])
193         else:
194             args.extend(["--enable-static", "--disable-shared"])
195         if not self.options.get_safe("with_unit_tests"):
196             args.append('--disable-tests')
197         return args
198 
199     @property
200     def _build_config_cmd(self):
201         return "../source/runConfigureICU %s" % " ".join(self.build_config_args)
202 
203     def _install_name_tool(self):
204         if tools.is_apple_os(self.settings.os):
205             with tools.chdir(os.path.join(self.package_folder, 'lib')):
206                 for dylib in glob.glob('*icu*.{0}.dylib'.format(self.version)):
207                     command = 'install_name_tool -id {0} {1}'.format(os.path.basename(dylib), dylib)
208                     self.output.info(command)
209                     self.run(command)
210 
211     def package_id(self):
212         del self.info.options.with_unit_tests  # ICU unit testing shouldn't affect the package's ID
213         del self.info.options.silent  # Verbosity doesn't affect package's ID
214 
215     def config_options(self):
216         if self.settings.os == "Windows":
217             del self.options.fPIC
218 
219     def package_info(self):
220         self.cpp_info.names['cmake_find_package'] = 'ICU'
221         self.cpp_info.names['cmake_find_package_multi'] = 'ICU'
222 
223         def lib_name(lib):
224             name = lib
225             if self.settings.os == "Windows":
226                 if not self.options.shared:
227                     name = 's' + name
228                 if self.settings.build_type == "Debug":
229                     name += 'd'
230             return name
231 
232         libs = ['icuin' if self.settings.os == "Windows" else 'icui18n',
233                 'icuio', 'icutest', 'icutu', 'icuuc',
234                 'icudt' if self.settings.os == "Windows" else 'icudata']
235         self.cpp_info.libs = [lib_name(lib) for lib in libs]
236         self.cpp_info.bindirs.append('lib')
237 
238         data_dir_name = self.name
239         if self.settings.os == "Windows" and self.settings.build_type == "Debug":
240             data_dir_name += 'd'
241         data_dir = os.path.join(self.package_folder, 'lib', data_dir_name, self.version)
242         vtag = self.version.split('.')[0]
243         data_file = "icudt{v}l.dat".format(v=vtag)
244         data_path = os.path.join(data_dir, data_file).replace('\\', '/')
245         if self.options.get_safe("data_packaging") in ["files", "archive"]:
246             self.env_info.ICU_DATA.append(data_path)
247 
248         if not self.options.shared:
249             self.cpp_info.defines.append("U_STATIC_IMPLEMENTATION")
250         if self.settings.os == 'Linux' and self.options.with_dyload:
251             self.cpp_info.libs.append('dl')
252 
253         if self.settings.os == 'Windows':
254             self.cpp_info.libs.append('advapi32')
255
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/recipes/icu/all/conanfile.py b/recipes/icu/all/conanfile.py
--- a/recipes/icu/all/conanfile.py
+++ b/recipes/icu/all/conanfile.py
@@ -18,6 +18,7 @@
     _build_subfolder = "build_subfolder"
     _env_build = None
     settings = "os", "arch", "compiler", "build_type"
+    exports = ["patches/*.patch"]
     options = {"shared": [True, False],
                "fPIC": [True, False],
                "data_packaging": ["files", "archive", "library", "static"],
@@ -58,10 +59,8 @@
                                   "pathBuf.append('/', localError); pathBuf.append(arg, localError);")
 
     def build(self):
-        for filename in glob.glob("patches/*.patch"):
-            self.output.info('applying patch "%s"' % filename)
-            tools.patch(base_path=self._source_subfolder, patch_file=filename)
-
+        for p in self.conan_data["patches"][self.version]:
+            tools.patch(**p)
         if self._is_msvc:
             run_configure_icu_file = os.path.join(self._source_subfolder, 'source', 'runConfigureICU')
 
@@ -111,31 +110,13 @@
         self._install_name_tool()
 
     def package(self):
-        if self._is_msvc:
-            for dll in glob.glob(os.path.join(self.package_folder, 'lib', '*.dll')):
-                shutil.move(dll, os.path.join(self.package_folder, 'bin'))
+        for dll in glob.glob(os.path.join(self.package_folder, 'lib', '*.dll')):
+            shutil.move(dll, os.path.join(self.package_folder, 'bin'))
 
         self.copy("LICENSE", dst="licenses", src=os.path.join(self.source_folder, self._source_subfolder))
         tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig"))
         tools.rmdir(os.path.join(self.package_folder, "share"))
 
-    @staticmethod
-    def detected_os():
-        if tools.OSInfo().is_macos:
-            return "Macos"
-        if tools.OSInfo().is_windows:
-            return "Windows"
-        return platform.system()
-
-    @property
-    def cross_building(self):
-        if tools.cross_building(self.settings):
-            if self.settings.os == self.detected_os():
-                if self.settings.arch == "x86" and tools.detected_architecture() == "x86_64":
-                    return False
-            return True
-        return False
-
     @property
     def build_config_args(self):
         prefix = self.package_folder.replace('\\', '/')
@@ -157,12 +138,13 @@
                 "--with-library-bits={0}".format(bits),
                 "--disable-samples",
                 "--disable-layout",
-                "--disable-layoutex"]
+                "--disable-layoutex",
+                "--disable-extras"]
         
         if not self.options.with_dyload:
             args += ["--disable-dyload"]
 
-        if self.cross_building:
+        if tools.cross_building(self.settings, skip_x64_x86=True):
             if self._env_build.build:
                 args.append("--build=%s" % self._env_build.build)
             if self._env_build.host:
@@ -247,8 +229,10 @@
 
         if not self.options.shared:
             self.cpp_info.defines.append("U_STATIC_IMPLEMENTATION")
-        if self.settings.os == 'Linux' and self.options.with_dyload:
-            self.cpp_info.libs.append('dl')
+        if self.settings.os == 'Linux':
+            if self.options.with_dyload:
+                self.cpp_info.system_libs.append('dl')
+            self.cpp_info.system_libs.append('pthread')
 
         if self.settings.os == 'Windows':
-            self.cpp_info.libs.append('advapi32')
+            self.cpp_info.system_libs.append('advapi32')

{"golden_diff": "diff --git a/recipes/icu/all/conanfile.py b/recipes/icu/all/conanfile.py\n--- a/recipes/icu/all/conanfile.py\n+++ b/recipes/icu/all/conanfile.py\n@@ -18,6 +18,7 @@\n     _build_subfolder = \"build_subfolder\"\n     _env_build = None\n     settings = \"os\", \"arch\", \"compiler\", \"build_type\"\n+    exports = [\"patches/*.patch\"]\n     options = {\"shared\": [True, False],\n                \"fPIC\": [True, False],\n                \"data_packaging\": [\"files\", \"archive\", \"library\", \"static\"],\n@@ -58,10 +59,8 @@\n                                   \"pathBuf.append('/', localError); pathBuf.append(arg, localError);\")\n \n     def build(self):\n-        for filename in glob.glob(\"patches/*.patch\"):\n-            self.output.info('applying patch \"%s\"' % filename)\n-            tools.patch(base_path=self._source_subfolder, patch_file=filename)\n-\n+        for p in self.conan_data[\"patches\"][self.version]:\n+            tools.patch(**p)\n         if self._is_msvc:\n             run_configure_icu_file = os.path.join(self._source_subfolder, 'source', 'runConfigureICU')\n \n@@ -111,31 +110,13 @@\n         self._install_name_tool()\n \n     def package(self):\n-        if self._is_msvc:\n-            for dll in glob.glob(os.path.join(self.package_folder, 'lib', '*.dll')):\n-                shutil.move(dll, os.path.join(self.package_folder, 'bin'))\n+        for dll in glob.glob(os.path.join(self.package_folder, 'lib', '*.dll')):\n+            shutil.move(dll, os.path.join(self.package_folder, 'bin'))\n \n         self.copy(\"LICENSE\", dst=\"licenses\", src=os.path.join(self.source_folder, self._source_subfolder))\n         tools.rmdir(os.path.join(self.package_folder, \"lib\", \"pkgconfig\"))\n         tools.rmdir(os.path.join(self.package_folder, \"share\"))\n \n-    @staticmethod\n-    def detected_os():\n-        if tools.OSInfo().is_macos:\n-            return \"Macos\"\n-        if tools.OSInfo().is_windows:\n-            return \"Windows\"\n-        return platform.system()\n-\n-    @property\n-    def cross_building(self):\n-        if tools.cross_building(self.settings):\n-            if self.settings.os == self.detected_os():\n-                if self.settings.arch == \"x86\" and tools.detected_architecture() == \"x86_64\":\n-                    return False\n-            return True\n-        return False\n-\n     @property\n     def build_config_args(self):\n         prefix = self.package_folder.replace('\\\\', '/')\n@@ -157,12 +138,13 @@\n                 \"--with-library-bits={0}\".format(bits),\n                 \"--disable-samples\",\n                 \"--disable-layout\",\n-                \"--disable-layoutex\"]\n+                \"--disable-layoutex\",\n+                \"--disable-extras\"]\n         \n         if not self.options.with_dyload:\n             args += [\"--disable-dyload\"]\n \n-        if self.cross_building:\n+        if tools.cross_building(self.settings, skip_x64_x86=True):\n             if self._env_build.build:\n                 args.append(\"--build=%s\" % self._env_build.build)\n             if self._env_build.host:\n@@ -247,8 +229,10 @@\n \n         if not self.options.shared:\n             self.cpp_info.defines.append(\"U_STATIC_IMPLEMENTATION\")\n-        if self.settings.os == 'Linux' and self.options.with_dyload:\n-            self.cpp_info.libs.append('dl')\n+        if self.settings.os == 'Linux':\n+            if self.options.with_dyload:\n+                self.cpp_info.system_libs.append('dl')\n+            self.cpp_info.system_libs.append('pthread')\n \n         if self.settings.os == 'Windows':\n-            self.cpp_info.libs.append('advapi32')\n+            self.cpp_info.system_libs.append('advapi32')\n", "issue": "[request] icu/66.1\n### Package Details\r\n  * Package Name/Version: **icu/66.1**\r\n  * Changelog: **https://github.com/unicode-org/icu/releases/tag/release-66-1**\r\n\r\n\r\nThe above mentioned version is newly released by the upstream project and not yet available as a recipe. Please add this version.\r\n\n", "before_files": [{"content": "import os\nimport glob\nimport platform\nimport shutil\nfrom conans import ConanFile, tools, AutoToolsBuildEnvironment\nfrom conans.tools import Version\n\n\nclass ICUBase(ConanFile):\n    name = \"icu\"\n    homepage = \"http://site.icu-project.org\"\n    license = \"ICU\"\n    description = \"ICU is a mature, widely used set of C/C++ and Java libraries \" \\\n                  \"providing Unicode and Globalization support for software applications.\"\n    url = \"https://github.com/conan-io/conan-center-index\"\n    topics = (\"conan\", \"icu\", \"icu4c\", \"i see you\", \"unicode\")\n    _source_subfolder = \"source_subfolder\"\n    _build_subfolder = \"build_subfolder\"\n    _env_build = None\n    settings = \"os\", \"arch\", \"compiler\", \"build_type\"\n    options = {\"shared\": [True, False],\n               \"fPIC\": [True, False],\n               \"data_packaging\": [\"files\", \"archive\", \"library\", \"static\"],\n               \"with_unit_tests\": [True, False],\n               \"silent\": [True, False],\n               \"with_dyload\": [True, False]}\n    default_options = {\"shared\": False,\n                       \"fPIC\": True,\n                       \"data_packaging\": \"archive\",\n                       \"with_unit_tests\": False,\n                       \"silent\": True,\n                       \"with_dyload\": True}\n\n    @property\n    def _is_msvc(self):\n        return self.settings.compiler == \"Visual Studio\"\n\n    @property\n    def _is_mingw(self):\n        return self.settings.os == \"Windows\" and self.settings.compiler == \"gcc\"\n\n    def build_requirements(self):\n        if tools.os_info.is_windows and \"CONAN_BASH_PATH\" not in os.environ and \\\n                tools.os_info.detect_windows_subsystem() != \"msys2\":\n            self.build_requires(\"msys2/20190524\")\n\n    def source(self):\n        tools.get(**self.conan_data[\"sources\"][self.version])\n        os.rename(\"icu\", self._source_subfolder)\n\n    def _workaround_icu_20545(self):\n        if tools.os_info.is_windows:\n            # https://unicode-org.atlassian.net/projects/ICU/issues/ICU-20545\n            srcdir = os.path.join(self.build_folder, self._source_subfolder, \"source\")\n            makeconv_cpp = os.path.join(srcdir, \"tools\", \"makeconv\", \"makeconv.cpp\")\n            tools.replace_in_file(makeconv_cpp,\n                                  \"pathBuf.appendPathPart(arg, localError);\",\n                                  \"pathBuf.append('/', localError); pathBuf.append(arg, localError);\")\n\n    def build(self):\n        for filename in glob.glob(\"patches/*.patch\"):\n            self.output.info('applying patch \"%s\"' % filename)\n            tools.patch(base_path=self._source_subfolder, patch_file=filename)\n\n        if self._is_msvc:\n            run_configure_icu_file = os.path.join(self._source_subfolder, 'source', 'runConfigureICU')\n\n            flags = \"-%s\" % self.settings.compiler.runtime\n            if self.settings.get_safe(\"build_type\") in ['Debug', 'RelWithDebInfo'] and Version(self.settings.compiler.version) >= \"12\":\n                flags += \" -FS\"\n            tools.replace_in_file(run_configure_icu_file, \"-MDd\", flags)\n            tools.replace_in_file(run_configure_icu_file, \"-MD\", flags)\n\n        self._workaround_icu_20545()\n\n        self._env_build = AutoToolsBuildEnvironment(self)\n        if not self.options.get_safe(\"shared\"):\n            self._env_build.defines.append(\"U_STATIC_IMPLEMENTATION\")\n        if tools.is_apple_os(self.settings.os):\n            self._env_build.defines.append(\"_DARWIN_C_SOURCE\")\n            if self.settings.get_safe(\"os.version\"):\n                self._env_build.flags.append(tools.apple_deployment_target_flag(self.settings.os,\n                                                                            self.settings.os.version))\n\n        if \"msys2\" in self.deps_user_info:\n            self._env_build.vars[\"PYTHON\"] = tools.unix_path(os.path.join(self.deps_env_info[\"msys2\"].MSYS_BIN, \"python\"), tools.MSYS2)\n\n        build_dir = os.path.join(self.build_folder, self._source_subfolder, 'build')\n        os.mkdir(build_dir)\n\n        with tools.vcvars(self.settings) if self._is_msvc else tools.no_op():\n            with tools.environment_append(self._env_build.vars):\n                with tools.chdir(build_dir):\n                    # workaround for https://unicode-org.atlassian.net/browse/ICU-20531\n                    os.makedirs(os.path.join(\"data\", \"out\", \"tmp\"))\n\n                    self.run(self._build_config_cmd, win_bash=tools.os_info.is_windows)\n                    if self.options.get_safe(\"silent\"):\n                        silent = '--silent' if self.options.silent else 'VERBOSE=1'\n                    else:\n                        silent = '--silent'\n                    command = \"make {silent} -j {cpu_count}\".format(silent=silent,\n                                                                    cpu_count=tools.cpu_count())\n                    self.run(command, win_bash=tools.os_info.is_windows)\n                    if self.options.get_safe(\"with_unit_tests\"):\n                        command = \"make {silent} check\".format(silent=silent)\n                        self.run(command, win_bash=tools.os_info.is_windows)\n                    command = \"make {silent} install\".format(silent=silent)\n                    self.run(command, win_bash=tools.os_info.is_windows)\n\n        self._install_name_tool()\n\n    def package(self):\n        if self._is_msvc:\n            for dll in glob.glob(os.path.join(self.package_folder, 'lib', '*.dll')):\n                shutil.move(dll, os.path.join(self.package_folder, 'bin'))\n\n        self.copy(\"LICENSE\", dst=\"licenses\", src=os.path.join(self.source_folder, self._source_subfolder))\n        tools.rmdir(os.path.join(self.package_folder, \"lib\", \"pkgconfig\"))\n        tools.rmdir(os.path.join(self.package_folder, \"share\"))\n\n    @staticmethod\n    def detected_os():\n        if tools.OSInfo().is_macos:\n            return \"Macos\"\n        if tools.OSInfo().is_windows:\n            return \"Windows\"\n        return platform.system()\n\n    @property\n    def cross_building(self):\n        if tools.cross_building(self.settings):\n            if self.settings.os == self.detected_os():\n                if self.settings.arch == \"x86\" and tools.detected_architecture() == \"x86_64\":\n                    return False\n            return True\n        return False\n\n    @property\n    def build_config_args(self):\n        prefix = self.package_folder.replace('\\\\', '/')\n        platform = {(\"Windows\", \"Visual Studio\"): \"Cygwin/MSVC\",\n                    (\"Windows\", \"gcc\"): \"MinGW\",\n                    (\"AIX\", \"gcc\"): \"AIX/GCC\",\n                    (\"AIX\", \"xlc\"): \"AIX\",\n                    (\"SunOS\", \"gcc\"): \"Solaris/GCC\",\n                    (\"Linux\", \"gcc\"): \"Linux/gcc\",\n                    (\"Linux\", \"clang\"): \"Linux\",\n                    (\"Macos\", \"gcc\"): \"MacOSX\",\n                    (\"Macos\", \"clang\"): \"MacOSX\",\n                    (\"Macos\", \"apple-clang\"): \"MacOSX\"}.get((str(self.settings.os),\n                                                             str(self.settings.compiler)))\n        arch64 = ['x86_64', 'sparcv9', 'ppc64']\n        bits = \"64\" if self.settings.arch in arch64 else \"32\"\n        args = [platform,\n                \"--prefix={0}\".format(prefix),\n                \"--with-library-bits={0}\".format(bits),\n                \"--disable-samples\",\n                \"--disable-layout\",\n                \"--disable-layoutex\"]\n        \n        if not self.options.with_dyload:\n            args += [\"--disable-dyload\"]\n\n        if self.cross_building:\n            if self._env_build.build:\n                args.append(\"--build=%s\" % self._env_build.build)\n            if self._env_build.host:\n                args.append(\"--host=%s\" % self._env_build.host)\n            if self._env_build.target:\n                args.append(\"--target=%s\" % self._env_build.target)\n\n        if self.options.get_safe(\"data_packaging\"):\n            args.append(\"--with-data-packaging={0}\".format(self.options.data_packaging))\n        else:\n            args.append(\"--with-data-packaging=static\")\n        datadir = os.path.join(self.package_folder, \"lib\")\n        datadir = datadir.replace(\"\\\\\", \"/\") if tools.os_info.is_windows else datadir\n        args.append(\"--datarootdir=%s\" % datadir)  # do not use share\n        bindir = os.path.join(self.package_folder, \"bin\")\n        bindir = bindir.replace(\"\\\\\", \"/\") if tools.os_info.is_windows else bindir\n        args.append(\"--sbindir=%s\" % bindir)\n\n        if self._is_mingw:\n            mingw_chost = 'i686-w64-mingw32' if self.settings.arch == 'x86' else 'x86_64-w64-mingw32'\n            args.extend([\"--build={0}\".format(mingw_chost),\n                         \"--host={0}\".format(mingw_chost)])\n\n        if self.settings.get_safe(\"build_type\") == \"Debug\":\n            args.extend([\"--disable-release\", \"--enable-debug\"])\n        if self.options.get_safe(\"shared\"):\n            args.extend([\"--disable-static\", \"--enable-shared\"])\n        else:\n            args.extend([\"--enable-static\", \"--disable-shared\"])\n        if not self.options.get_safe(\"with_unit_tests\"):\n            args.append('--disable-tests')\n        return args\n\n    @property\n    def _build_config_cmd(self):\n        return \"../source/runConfigureICU %s\" % \" \".join(self.build_config_args)\n\n    def _install_name_tool(self):\n        if tools.is_apple_os(self.settings.os):\n            with tools.chdir(os.path.join(self.package_folder, 'lib')):\n                for dylib in glob.glob('*icu*.{0}.dylib'.format(self.version)):\n                    command = 'install_name_tool -id {0} {1}'.format(os.path.basename(dylib), dylib)\n                    self.output.info(command)\n                    self.run(command)\n\n    def package_id(self):\n        del self.info.options.with_unit_tests  # ICU unit testing shouldn't affect the package's ID\n        del self.info.options.silent  # Verbosity doesn't affect package's ID\n\n    def config_options(self):\n        if self.settings.os == \"Windows\":\n            del self.options.fPIC\n\n    def package_info(self):\n        self.cpp_info.names['cmake_find_package'] = 'ICU'\n        self.cpp_info.names['cmake_find_package_multi'] = 'ICU'\n\n        def lib_name(lib):\n            name = lib\n            if self.settings.os == \"Windows\":\n                if not self.options.shared:\n                    name = 's' + name\n                if self.settings.build_type == \"Debug\":\n                    name += 'd'\n            return name\n\n        libs = ['icuin' if self.settings.os == \"Windows\" else 'icui18n',\n                'icuio', 'icutest', 'icutu', 'icuuc',\n                'icudt' if self.settings.os == \"Windows\" else 'icudata']\n        self.cpp_info.libs = [lib_name(lib) for lib in libs]\n        self.cpp_info.bindirs.append('lib')\n\n        data_dir_name = self.name\n        if self.settings.os == \"Windows\" and self.settings.build_type == \"Debug\":\n            data_dir_name += 'd'\n        data_dir = os.path.join(self.package_folder, 'lib', data_dir_name, self.version)\n        vtag = self.version.split('.')[0]\n        data_file = \"icudt{v}l.dat\".format(v=vtag)\n        data_path = os.path.join(data_dir, data_file).replace('\\\\', '/')\n        if self.options.get_safe(\"data_packaging\") in [\"files\", \"archive\"]:\n            self.env_info.ICU_DATA.append(data_path)\n\n        if not self.options.shared:\n            self.cpp_info.defines.append(\"U_STATIC_IMPLEMENTATION\")\n        if self.settings.os == 'Linux' and self.options.with_dyload:\n            self.cpp_info.libs.append('dl')\n\n        if self.settings.os == 'Windows':\n            self.cpp_info.libs.append('advapi32')\n", "path": "recipes/icu/all/conanfile.py"}], "after_files": [{"content": "import os\nimport glob\nimport platform\nimport shutil\nfrom conans import ConanFile, tools, AutoToolsBuildEnvironment\nfrom conans.tools import Version\n\n\nclass ICUBase(ConanFile):\n    name = \"icu\"\n    homepage = \"http://site.icu-project.org\"\n    license = \"ICU\"\n    description = \"ICU is a mature, widely used set of C/C++ and Java libraries \" \\\n                  \"providing Unicode and Globalization support for software applications.\"\n    url = \"https://github.com/conan-io/conan-center-index\"\n    topics = (\"conan\", \"icu\", \"icu4c\", \"i see you\", \"unicode\")\n    _source_subfolder = \"source_subfolder\"\n    _build_subfolder = \"build_subfolder\"\n    _env_build = None\n    settings = \"os\", \"arch\", \"compiler\", \"build_type\"\n    exports = [\"patches/*.patch\"]\n    options = {\"shared\": [True, False],\n               \"fPIC\": [True, False],\n               \"data_packaging\": [\"files\", \"archive\", \"library\", \"static\"],\n               \"with_unit_tests\": [True, False],\n               \"silent\": [True, False],\n               \"with_dyload\": [True, False]}\n    default_options = {\"shared\": False,\n                       \"fPIC\": True,\n                       \"data_packaging\": \"archive\",\n                       \"with_unit_tests\": False,\n                       \"silent\": True,\n                       \"with_dyload\": True}\n\n    @property\n    def _is_msvc(self):\n        return self.settings.compiler == \"Visual Studio\"\n\n    @property\n    def _is_mingw(self):\n        return self.settings.os == \"Windows\" and self.settings.compiler == \"gcc\"\n\n    def build_requirements(self):\n        if tools.os_info.is_windows and \"CONAN_BASH_PATH\" not in os.environ and \\\n                tools.os_info.detect_windows_subsystem() != \"msys2\":\n            self.build_requires(\"msys2/20190524\")\n\n    def source(self):\n        tools.get(**self.conan_data[\"sources\"][self.version])\n        os.rename(\"icu\", self._source_subfolder)\n\n    def _workaround_icu_20545(self):\n        if tools.os_info.is_windows:\n            # https://unicode-org.atlassian.net/projects/ICU/issues/ICU-20545\n            srcdir = os.path.join(self.build_folder, self._source_subfolder, \"source\")\n            makeconv_cpp = os.path.join(srcdir, \"tools\", \"makeconv\", \"makeconv.cpp\")\n            tools.replace_in_file(makeconv_cpp,\n                                  \"pathBuf.appendPathPart(arg, localError);\",\n                                  \"pathBuf.append('/', localError); pathBuf.append(arg, localError);\")\n\n    def build(self):\n        for p in self.conan_data[\"patches\"][self.version]:\n            tools.patch(**p)\n        if self._is_msvc:\n            run_configure_icu_file = os.path.join(self._source_subfolder, 'source', 'runConfigureICU')\n\n            flags = \"-%s\" % self.settings.compiler.runtime\n            if self.settings.get_safe(\"build_type\") in ['Debug', 'RelWithDebInfo'] and Version(self.settings.compiler.version) >= \"12\":\n                flags += \" -FS\"\n            tools.replace_in_file(run_configure_icu_file, \"-MDd\", flags)\n            tools.replace_in_file(run_configure_icu_file, \"-MD\", flags)\n\n        self._workaround_icu_20545()\n\n        self._env_build = AutoToolsBuildEnvironment(self)\n        if not self.options.get_safe(\"shared\"):\n            self._env_build.defines.append(\"U_STATIC_IMPLEMENTATION\")\n        if tools.is_apple_os(self.settings.os):\n            self._env_build.defines.append(\"_DARWIN_C_SOURCE\")\n            if self.settings.get_safe(\"os.version\"):\n                self._env_build.flags.append(tools.apple_deployment_target_flag(self.settings.os,\n                                                                            self.settings.os.version))\n\n        if \"msys2\" in self.deps_user_info:\n            self._env_build.vars[\"PYTHON\"] = tools.unix_path(os.path.join(self.deps_env_info[\"msys2\"].MSYS_BIN, \"python\"), tools.MSYS2)\n\n        build_dir = os.path.join(self.build_folder, self._source_subfolder, 'build')\n        os.mkdir(build_dir)\n\n        with tools.vcvars(self.settings) if self._is_msvc else tools.no_op():\n            with tools.environment_append(self._env_build.vars):\n                with tools.chdir(build_dir):\n                    # workaround for https://unicode-org.atlassian.net/browse/ICU-20531\n                    os.makedirs(os.path.join(\"data\", \"out\", \"tmp\"))\n\n                    self.run(self._build_config_cmd, win_bash=tools.os_info.is_windows)\n                    if self.options.get_safe(\"silent\"):\n                        silent = '--silent' if self.options.silent else 'VERBOSE=1'\n                    else:\n                        silent = '--silent'\n                    command = \"make {silent} -j {cpu_count}\".format(silent=silent,\n                                                                    cpu_count=tools.cpu_count())\n                    self.run(command, win_bash=tools.os_info.is_windows)\n                    if self.options.get_safe(\"with_unit_tests\"):\n                        command = \"make {silent} check\".format(silent=silent)\n                        self.run(command, win_bash=tools.os_info.is_windows)\n                    command = \"make {silent} install\".format(silent=silent)\n                    self.run(command, win_bash=tools.os_info.is_windows)\n\n        self._install_name_tool()\n\n    def package(self):\n        for dll in glob.glob(os.path.join(self.package_folder, 'lib', '*.dll')):\n            shutil.move(dll, os.path.join(self.package_folder, 'bin'))\n\n        self.copy(\"LICENSE\", dst=\"licenses\", src=os.path.join(self.source_folder, self._source_subfolder))\n        tools.rmdir(os.path.join(self.package_folder, \"lib\", \"pkgconfig\"))\n        tools.rmdir(os.path.join(self.package_folder, \"share\"))\n\n    @property\n    def build_config_args(self):\n        prefix = self.package_folder.replace('\\\\', '/')\n        platform = {(\"Windows\", \"Visual Studio\"): \"Cygwin/MSVC\",\n                    (\"Windows\", \"gcc\"): \"MinGW\",\n                    (\"AIX\", \"gcc\"): \"AIX/GCC\",\n                    (\"AIX\", \"xlc\"): \"AIX\",\n                    (\"SunOS\", \"gcc\"): \"Solaris/GCC\",\n                    (\"Linux\", \"gcc\"): \"Linux/gcc\",\n                    (\"Linux\", \"clang\"): \"Linux\",\n                    (\"Macos\", \"gcc\"): \"MacOSX\",\n                    (\"Macos\", \"clang\"): \"MacOSX\",\n                    (\"Macos\", \"apple-clang\"): \"MacOSX\"}.get((str(self.settings.os),\n                                                             str(self.settings.compiler)))\n        arch64 = ['x86_64', 'sparcv9', 'ppc64']\n        bits = \"64\" if self.settings.arch in arch64 else \"32\"\n        args = [platform,\n                \"--prefix={0}\".format(prefix),\n                \"--with-library-bits={0}\".format(bits),\n                \"--disable-samples\",\n                \"--disable-layout\",\n                \"--disable-layoutex\",\n                \"--disable-extras\"]\n        \n        if not self.options.with_dyload:\n            args += [\"--disable-dyload\"]\n\n        if tools.cross_building(self.settings, skip_x64_x86=True):\n            if self._env_build.build:\n                args.append(\"--build=%s\" % self._env_build.build)\n            if self._env_build.host:\n                args.append(\"--host=%s\" % self._env_build.host)\n            if self._env_build.target:\n                args.append(\"--target=%s\" % self._env_build.target)\n\n        if self.options.get_safe(\"data_packaging\"):\n            args.append(\"--with-data-packaging={0}\".format(self.options.data_packaging))\n        else:\n            args.append(\"--with-data-packaging=static\")\n        datadir = os.path.join(self.package_folder, \"lib\")\n        datadir = datadir.replace(\"\\\\\", \"/\") if tools.os_info.is_windows else datadir\n        args.append(\"--datarootdir=%s\" % datadir)  # do not use share\n        bindir = os.path.join(self.package_folder, \"bin\")\n        bindir = bindir.replace(\"\\\\\", \"/\") if tools.os_info.is_windows else bindir\n        args.append(\"--sbindir=%s\" % bindir)\n\n        if self._is_mingw:\n            mingw_chost = 'i686-w64-mingw32' if self.settings.arch == 'x86' else 'x86_64-w64-mingw32'\n            args.extend([\"--build={0}\".format(mingw_chost),\n                         \"--host={0}\".format(mingw_chost)])\n\n        if self.settings.get_safe(\"build_type\") == \"Debug\":\n            args.extend([\"--disable-release\", \"--enable-debug\"])\n        if self.options.get_safe(\"shared\"):\n            args.extend([\"--disable-static\", \"--enable-shared\"])\n        else:\n            args.extend([\"--enable-static\", \"--disable-shared\"])\n        if not self.options.get_safe(\"with_unit_tests\"):\n            args.append('--disable-tests')\n        return args\n\n    @property\n    def _build_config_cmd(self):\n        return \"../source/runConfigureICU %s\" % \" \".join(self.build_config_args)\n\n    def _install_name_tool(self):\n        if tools.is_apple_os(self.settings.os):\n            with tools.chdir(os.path.join(self.package_folder, 'lib')):\n                for dylib in glob.glob('*icu*.{0}.dylib'.format(self.version)):\n                    command = 'install_name_tool -id {0} {1}'.format(os.path.basename(dylib), dylib)\n                    self.output.info(command)\n                    self.run(command)\n\n    def package_id(self):\n        del self.info.options.with_unit_tests  # ICU unit testing shouldn't affect the package's ID\n        del self.info.options.silent  # Verbosity doesn't affect package's ID\n\n    def config_options(self):\n        if self.settings.os == \"Windows\":\n            del self.options.fPIC\n\n    def package_info(self):\n        self.cpp_info.names['cmake_find_package'] = 'ICU'\n        self.cpp_info.names['cmake_find_package_multi'] = 'ICU'\n\n        def lib_name(lib):\n            name = lib\n            if self.settings.os == \"Windows\":\n                if not self.options.shared:\n                    name = 's' + name\n                if self.settings.build_type == \"Debug\":\n                    name += 'd'\n            return name\n\n        libs = ['icuin' if self.settings.os == \"Windows\" else 'icui18n',\n                'icuio', 'icutest', 'icutu', 'icuuc',\n                'icudt' if self.settings.os == \"Windows\" else 'icudata']\n        self.cpp_info.libs = [lib_name(lib) for lib in libs]\n        self.cpp_info.bindirs.append('lib')\n\n        data_dir_name = self.name\n        if self.settings.os == \"Windows\" and self.settings.build_type == \"Debug\":\n            data_dir_name += 'd'\n        data_dir = os.path.join(self.package_folder, 'lib', data_dir_name, self.version)\n        vtag = self.version.split('.')[0]\n        data_file = \"icudt{v}l.dat\".format(v=vtag)\n        data_path = os.path.join(data_dir, data_file).replace('\\\\', '/')\n        if self.options.get_safe(\"data_packaging\") in [\"files\", \"archive\"]:\n            self.env_info.ICU_DATA.append(data_path)\n\n        if not self.options.shared:\n            self.cpp_info.defines.append(\"U_STATIC_IMPLEMENTATION\")\n        if self.settings.os == 'Linux':\n            if self.options.with_dyload:\n                self.cpp_info.system_libs.append('dl')\n            self.cpp_info.system_libs.append('pthread')\n\n        if self.settings.os == 'Windows':\n            self.cpp_info.system_libs.append('advapi32')\n", "path": "recipes/icu/all/conanfile.py"}]}