Skip to content

Commit

Permalink
date: Add option to use manual tz db
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Mazurkiewicz authored and Kaaml committed Mar 13, 2024
1 parent d4d9670 commit 636d5bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion recipes/date/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ class DateConan(ConanFile):
"header_only": [True, False],
"use_system_tz_db": [True, False],
"use_tz_db_in_dot": [True, False],
"manual_tz_db": [True, False],
}
default_options = {
"shared": False,
"fPIC": True,
"header_only": False,
"use_system_tz_db": False,
"use_tz_db_in_dot": False,
"manual_tz_db": False,
}

def export_sources(self):
Expand All @@ -53,7 +55,7 @@ def layout(self):
cmake_layout(self, src_folder="src")

def requirements(self):
if not self.options.header_only and not self.options.use_system_tz_db:
if not self.options.header_only and not self.options.use_system_tz_db and not self.options.manual_tz_db:
self.requires("libcurl/[>=7.78 <9]")

def package_id(self):
Expand All @@ -72,6 +74,7 @@ def generate(self):
tc.variables["ENABLE_DATE_TESTING"] = False
tc.variables["USE_SYSTEM_TZ_DB"] = self.options.use_system_tz_db
tc.variables["USE_TZ_DB_IN_DOT"] = self.options.use_tz_db_in_dot
tc.variables["MANUAL_TZ_DB "] = self.options.manual_tz_db
tc.variables["BUILD_TZ_LIB"] = not self.options.header_only
# workaround for clang 5 not having string_view
if Version(self.version) >= "3.0.0" and self.settings.compiler == "clang" \
Expand Down

0 comments on commit 636d5bf

Please sign in to comment.