From a89ec207994dc946d2136c5cd0ac3b2d63b406bc Mon Sep 17 00:00:00 2001 From: Samuel Dowling Date: Thu, 7 Dec 2023 13:50:54 +1030 Subject: [PATCH] [tz] Fix binary database compilation on Macos --- recipes/tz/all/conanfile.py | 5 ++++- recipes/tz/all/test_package/conanfile.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/tz/all/conanfile.py b/recipes/tz/all/conanfile.py index 9594c748a2d19..14cd721a590c0 100644 --- a/recipes/tz/all/conanfile.py +++ b/recipes/tz/all/conanfile.py @@ -58,7 +58,10 @@ def build(self): if self.options.with_binary_db: self._patch_sources() autotools = Autotools(self) - autotools.make(args=["-C", self.source_folder.replace("\\", "/")]) + ldlibs = "" + if self.settings.os == "Macos": + ldlibs = "-lintl" + autotools.make(args=["-C", self.source_folder.replace("\\", "/"), f"LDLIBS={ldlibs}"]) def package(self): copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) diff --git a/recipes/tz/all/test_package/conanfile.py b/recipes/tz/all/test_package/conanfile.py index 2c8fc7ce6d5ba..1833957cc43fc 100644 --- a/recipes/tz/all/test_package/conanfile.py +++ b/recipes/tz/all/test_package/conanfile.py @@ -38,7 +38,7 @@ def test(self): if can_run(self): if self.dependencies['tz'].options.with_binary_db: self.output.info("Test that binary tzdb is readable") - with open("tzdata.info", "r") as fd: + with open(os.path.join(self.generators_folder, "tzdata.info"), "r") as fd: self.tzdata = fd.read() self.run(f"zdump {os.path.join(self.tzdata, 'America', 'Los_Angeles')}", env="conanrun") else: