From a73ff799f3f4ef911cd9dd4bf7b28ea0bfcacb39 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Fri, 7 Jul 2023 11:37:41 +0100 Subject: [PATCH 1/5] wt: bump dependencies and remove old versions --- recipes/wt/all/conandata.yml | 37 ------------------- recipes/wt/all/conanfile.py | 14 +++---- .../patches/4.3.1-0001-use-cci-package.patch | 32 ---------------- .../wt/all/patches/4.3.1-0002-gcc_11.patch | 10 ----- recipes/wt/config.yml | 8 ---- 5 files changed, 6 insertions(+), 95 deletions(-) delete mode 100644 recipes/wt/all/patches/4.3.1-0001-use-cci-package.patch delete mode 100644 recipes/wt/all/patches/4.3.1-0002-gcc_11.patch diff --git a/recipes/wt/all/conandata.yml b/recipes/wt/all/conandata.yml index 8b83e78419f05..c26a610e865f7 100644 --- a/recipes/wt/all/conandata.yml +++ b/recipes/wt/all/conandata.yml @@ -14,18 +14,6 @@ sources: "4.6.0": url: "https://github.com/emweb/wt/archive/4.6.0.tar.gz" sha256: "7f709e132d32c4925e6db0a590c7ccc5613344e8b9052676ef891a25ccb550e6" - "4.5.1": - url: "https://github.com/emweb/wt/archive/4.5.1.tar.gz" - sha256: "c2820646095af5618fc235705c0108797e3898225fb1826f2c6185c405c21a17" - "4.5.0": - url: "https://github.com/emweb/wt/archive/4.5.0.tar.gz" - sha256: "119b1eae83285a153b9c901d3f4f25775c7a460d30b1e48242d7d2d649d61deb" - "4.4.0": - url: "https://github.com/emweb/wt/archive/4.4.0.tar.gz" - sha256: "2eabefea915ecc4deb36f9f67ab30dd3b1f6c73893d76c9d9fa39ac25f4f3690" - "4.3.1": - url: "https://github.com/emweb/wt/archive/4.3.1.tar.gz" - sha256: "6c0130f36c829ed67119679770c2f62d7768a62eaa281bb10070c4cf1b145139" patches: "4.9.1": - patch_file: "patches/4.8.0-0001-use-cci-package.patch" @@ -47,28 +35,3 @@ patches: - patch_file: "patches/4.6.2-0001-use-cci-package.patch" patch_description: "use cci package" patch_type: "conan" - "4.5.1": - - patch_file: "patches/4.3.1-0001-use-cci-package.patch" - patch_description: "use cci package" - patch_type: "conan" - "4.5.0": - - patch_file: "patches/4.3.1-0001-use-cci-package.patch" - patch_description: "use cci package" - patch_type: "conan" - - patch_file: "patches/4.3.1-0002-gcc_11.patch" - patch_description: "include limits header" - patch_type: "portability" - "4.4.0": - - patch_file: "patches/4.3.1-0001-use-cci-package.patch" - patch_description: "use cci package" - patch_type: "conan" - - patch_file: "patches/4.3.1-0002-gcc_11.patch" - patch_description: "include limits header" - patch_type: "portability" - "4.3.1": - - patch_file: "patches/4.3.1-0001-use-cci-package.patch" - patch_description: "use cci package" - patch_type: "conan" - - patch_file: "patches/4.3.1-0002-gcc_11.patch" - patch_description: "include limits header" - patch_type: "portability" diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index 6378a056d8e5c..8458695177cbc 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -91,26 +91,24 @@ def _required_boost_components(self): return ["program_options", "filesystem", "thread"] def requirements(self): - if Version(self.version) < "4.6.0": - self.requires("boost/1.76.0") - elif Version(self.version) < "4.9.0": + if Version(self.version) < "4.9.0": self.requires("boost/1.80.0") else: - self.requires("boost/1.81.0") + self.requires("boost/1.82.0") if self.options.connector_http: self.requires("zlib/1.2.13") if self.options.with_ssl: - self.requires("openssl/1.1.1t") + self.requires("openssl/[>=1.1 <4]") if self.options.get_safe("with_sqlite"): - self.requires("sqlite3/3.41.1") + self.requires("sqlite3/3.42.0") if self.options.get_safe("with_mysql"): self.requires("libmysqlclient/8.0.31", transitive_headers=True, transitive_libs=True) if self.options.get_safe("with_postgres"): - self.requires("libpq/14.7", transitive_headers=True, transitive_libs=True) + self.requires("libpq/15.3", transitive_headers=True, transitive_libs=True) if self.options.get_safe("with_mssql") and self.settings.os != "Windows": self.requires("odbc/2.3.11") if self.options.get_safe("with_unwind"): - self.requires("libunwind/1.6.2") + self.requires("libunwind/1.7.0") def validate(self): miss_boost_required_comp = any(self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) diff --git a/recipes/wt/all/patches/4.3.1-0001-use-cci-package.patch b/recipes/wt/all/patches/4.3.1-0001-use-cci-package.patch deleted file mode 100644 index af7c47db572a3..0000000000000 --- a/recipes/wt/all/patches/4.3.1-0001-use-cci-package.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/src/Wt/Dbo/backend/CMakeLists.txt b/src/Wt/Dbo/backend/CMakeLists.txt -index 827abf3..5324034 100644 ---- a/src/Wt/Dbo/backend/CMakeLists.txt -+++ b/src/Wt/Dbo/backend/CMakeLists.txt -@@ -127,11 +127,12 @@ IF(ENABLE_POSTGRES AND POSTGRES_FOUND) - SET_PROPERTY(TARGET wtdbopostgres PROPERTY CXX_VISIBILITY_PRESET hidden) - SET_PROPERTY(TARGET wtdbopostgres PROPERTY VISIBILITY_INLINES_HIDDEN YES) - -+ find_package(PostgreSQL REQUIRED CONFIG) - TARGET_LINK_LIBRARIES(wtdbopostgres - PUBLIC - wtdbo - PRIVATE -- ${POSTGRES_LIBRARIES} -+ PostgreSQL::PostgreSQL - ) - - IF(TARGET Boost::headers) -@@ -291,11 +292,12 @@ IF(ENABLE_MYSQL AND MYSQL_FOUND) - SET_PROPERTY(TARGET wtdbomysql PROPERTY CXX_VISIBILITY_PRESET hidden) - SET_PROPERTY(TARGET wtdbomysql PROPERTY VISIBILITY_INLINES_HIDDEN YES) - -+ find_package(libmysqlclient REQUIRED CONFIG) - TARGET_LINK_LIBRARIES(wtdbomysql - PUBLIC - wtdbo - PRIVATE -- ${MYSQL_LIBRARIES} -+ libmysqlclient::libmysqlclient - ) - - INCLUDE_DIRECTORIES(${MYSQL_INCLUDE}) diff --git a/recipes/wt/all/patches/4.3.1-0002-gcc_11.patch b/recipes/wt/all/patches/4.3.1-0002-gcc_11.patch deleted file mode 100644 index 03d2aaff9236b..0000000000000 --- a/recipes/wt/all/patches/4.3.1-0002-gcc_11.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/Wt/Render/WTextRenderer.C -+++ b/src/Wt/Render/WTextRenderer.C -@@ -14,6 +14,7 @@ - #include "Block.h" - - #include -+#include - #include - - namespace { diff --git a/recipes/wt/config.yml b/recipes/wt/config.yml index f24f55b014506..d129fd323175f 100644 --- a/recipes/wt/config.yml +++ b/recipes/wt/config.yml @@ -9,11 +9,3 @@ versions: folder: all "4.6.0": folder: all - "4.5.1": - folder: all - "4.5.0": - folder: all - "4.4.0": - folder: all - "4.3.1": - folder: all From c5d34685132da09bf4513c04a76329f251294588 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 11 May 2023 00:34:47 +0200 Subject: [PATCH 2/5] remove CMP0077 workaround it's fixed in conan >= 1.54.0 --- recipes/wt/all/conanfile.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index 8458695177cbc..3b955b8126f36 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -7,7 +7,8 @@ import os import shutil -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.54.0" + class WtConan(ConanFile): name = "wt" @@ -222,8 +223,6 @@ def generate(self): else: tc.variables["CONNECTOR_FCGI"] = self.options.connector_fcgi tc.variables["CONNECTOR_ISAPI"] = False - - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() deps = CMakeDeps(self) From fb4a21a84e6d45c2ec492d4126f994ce51042357 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Thu, 11 May 2023 00:33:47 +0200 Subject: [PATCH 3/5] add package_type --- recipes/wt/all/conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index 3b955b8126f36..407ae280b0746 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -17,6 +17,7 @@ class WtConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/emweb/wt" topics = ("server", "web", "webapp", "websocket", "cgi", "fastcgi", "orm") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], From e66630a9ddf7b5a6e3723d1111e781437422f3db Mon Sep 17 00:00:00 2001 From: Pero Skoko Date: Thu, 18 May 2023 15:13:54 +0200 Subject: [PATCH 4/5] wt: add transitive_headers = True for boost dependency --- recipes/wt/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index 407ae280b0746..84a7b25723993 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -94,9 +94,9 @@ def _required_boost_components(self): def requirements(self): if Version(self.version) < "4.9.0": - self.requires("boost/1.80.0") + self.requires("boost/1.80.0", transitive_headers = True) else: - self.requires("boost/1.82.0") + self.requires("boost/1.82.0", transitive_headers = True) if self.options.connector_http: self.requires("zlib/1.2.13") if self.options.with_ssl: From 5828ae322539d3df87f55ad1bf1c48e9c7d946a2 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Mon, 10 Jul 2023 14:35:00 +0100 Subject: [PATCH 5/5] wt: fix openssl/zlib linking issues --- recipes/wt/all/conanfile.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index 84a7b25723993..86da6cd03dedb 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -232,12 +232,18 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") - replace_in_file(self, cmakelists, "find_package(OpenSSL)", "#find_package(OpenSSL)") replace_in_file(self, cmakelists, "INCLUDE(cmake/WtFindMysql.txt)", "#INCLUDE(cmake/WtFindMysql.txt)") replace_in_file(self, cmakelists, "INCLUDE(cmake/WtFindPostgresql.txt)", "#INCLUDE(cmake/WtFindPostgresql.txt)") if self.settings.os != "Windows": replace_in_file(self, cmakelists, "INCLUDE(cmake/WtFindOdbc.txt)", "#INCLUDE(cmake/WtFindOdbc.txt)") + if self.options.with_ssl: + # Ensure the conan-generated config is used for OpenSSL when required as a dependency + replace_in_file(self, cmakelists, "find_package(OpenSSL)", "find_package(OpenSSL CONFIG REQUIRED)") + else: + # Avoid searching for OpenSSL if it is not required + replace_in_file(self, cmakelists, "find_package(OpenSSL)", "") + # Do not pollute rpath of shared libs of the install tree on macOS please replace_in_file(self, cmakelists,