From 2ee9efadee9cf362946151b9ee3f97f5de3c0d60 Mon Sep 17 00:00:00 2001 From: Viktar Hasiul Date: Tue, 20 Jun 2023 12:43:07 +0200 Subject: [PATCH 1/3] Allow to set ENABLE_HARU and WT_RASTERIMAGE_IMPLEMENTATION --- recipes/wt/all/conanfile.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index 6378a056d8e5c..1446b8aacc267 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -29,6 +29,8 @@ class WtConan(ConanFile): "with_dbo": [True, False], "with_opengl": [True, False], "with_unwind": [True, False], + "with_haru": [True, False], + "raster_image": ["none", "Direct2D", "GraphicsMagick"], "no_std_locale": [True, False], "no_std_wstring": [True, False], "multi_threaded": [True, False], @@ -48,6 +50,8 @@ class WtConan(ConanFile): "with_dbo": True, "with_opengl": False, "with_unwind": True, + "with_haru": False, + "raster_image": "none", "no_std_locale": False, "no_std_wstring": False, "multi_threaded": True, @@ -120,6 +124,8 @@ def validate(self): f"{self.ref} requires non header-only boost with these components: " f"{', '.join(self._required_boost_components)}" ) + if self.options.get_safe("raster_image", "none") == "Direct2D" and self.settings.os != "Windows": + raise ConanInvalidConfiguration("Direct2D is supported only on Windows.") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -167,7 +173,7 @@ def generate(self): tc.variables["BUILD_EXAMPLES"] = False tc.variables["BUILD_TESTS"] = False tc.variables["ENABLE_SSL"] = self.options.with_ssl - tc.variables["ENABLE_HARU"] = False + tc.variables["ENABLE_HARU"] = self.options.with_haru tc.variables["ENABLE_PANGO"] = False tc.variables["ENABLE_SQLITE"] = self.options.get_safe("with_sqlite", False) tc.variables["ENABLE_POSTGRES"] = self.options.get_safe("with_postgres", False) @@ -180,6 +186,7 @@ def generate(self): tc.variables["ENABLE_LIBWTDBO"] = self.options.with_dbo tc.variables["ENABLE_OPENGL"] = self.options.with_opengl tc.variables["ENABLE_UNWIND"] = self.options.get_safe("with_unwind", False) + tc.variables["WT_WRASTERIMAGE_IMPLEMENTATION"] = self.options.get_safe("raster_image", "none") tc.variables["WT_NO_STD_LOCALE"] = self.options.no_std_locale tc.variables["WT_NO_STD_WSTRING"] = self.options.no_std_wstring tc.variables["MULTI_THREADED"] = self.options.multi_threaded From 29d73c66534a4d8004a768008d660fd83179a546 Mon Sep 17 00:00:00 2001 From: Viktar Hasiul Date: Thu, 22 Jun 2023 12:50:46 +0200 Subject: [PATCH 2/3] add libharu to requirements --- recipes/wt/all/conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index 1446b8aacc267..10cead68cfb4c 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -115,6 +115,8 @@ def requirements(self): self.requires("odbc/2.3.11") if self.options.get_safe("with_unwind"): self.requires("libunwind/1.6.2") + if self.options.with_haru: + self.requires("libharu/2.4.3") def validate(self): miss_boost_required_comp = any(self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) From 71dda3a63127a8ef7210e9d65e4869e905412ce2 Mon Sep 17 00:00:00 2001 From: Viktar Hasiul Date: Fri, 23 Jun 2023 13:06:11 +0200 Subject: [PATCH 3/3] set HARU_PREFIX and haru package_info --- recipes/wt/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index 10cead68cfb4c..f997394d3639a 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -227,6 +227,8 @@ def generate(self): tc.variables["ODBC_FOUND"] = True if self.options.get_safe("with_unwind"): tc.variables["UNWIND_PREFIX"] = self._cmakify_path_list(self.dependencies["libunwind"].package_folder) + if self.options.with_haru: + tc.variables["HARU_PREFIX"] = self._cmakify_path_list(self.dependencies["libharu"].package_folder) if self.settings.os == "Windows": tc.variables["CONNECTOR_FCGI"] = False tc.variables["CONNECTOR_ISAPI"] = self.options.connector_isapi @@ -300,6 +302,8 @@ def package_info(self): self.cpp_info.components["wtmain"].requires.append("openssl::openssl") if self.options.get_safe("with_unwind"): self.cpp_info.components["wtmain"].requires.append("libunwind::libunwind") + if self.options.with_haru: + self.cpp_info.components["wtmain"].requires.append("libharu::libharu") # wttest if self.options.with_test: