Skip to content

Commit

Permalink
[tz] Fix binary database compilation on Macos
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-emrys committed Dec 7, 2023
1 parent 69914f8 commit a89ec20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion recipes/tz/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion recipes/tz/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a89ec20

Please sign in to comment.