From 8f5d510af69d7ac0fd2d601f9aa165bf52f9fc90 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 24 Sep 2024 16:27:30 +0300 Subject: [PATCH 1/4] innoextract: add package_type, bump deps --- recipes/innoextract/all/conanfile.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/recipes/innoextract/all/conanfile.py b/recipes/innoextract/all/conanfile.py index c21ccf578684a..b38a8c42c814b 100644 --- a/recipes/innoextract/all/conanfile.py +++ b/recipes/innoextract/all/conanfile.py @@ -1,9 +1,9 @@ +import os + from conan import ConanFile -from conan.tools.files import get, rmdir, copy, apply_conandata_patches, export_conandata_patches from conan.tools.cmake import cmake_layout, CMake, CMakeDeps, CMakeToolchain from conan.tools.env import VirtualBuildEnv -import os - +from conan.tools.files import get, rmdir, copy, apply_conandata_patches, export_conandata_patches, rm required_conan_version = ">=1.52.0" @@ -15,6 +15,7 @@ class InnoextractConan(ConanFile): topics = ("inno-setup", "decompression") homepage = "https://constexpr.org/innoextract" url = "https://github.com/conan-io/conan-center-index" + package_type = "application" settings = "os", "arch", "compiler", "build_type" def export_sources(self): @@ -24,17 +25,15 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.80.0") - self.requires("xz_utils/5.2.5") + self.requires("boost/1.85.0") + self.requires("xz_utils/[>=5.4.5 <6]") self.requires("libiconv/1.17") def package_id(self): del self.info.settings.compiler - self.info.requires.clear() def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True, - destination=self.source_folder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): env = VirtualBuildEnv(self) @@ -51,14 +50,14 @@ def generate(self): def build(self): apply_conandata_patches(self) - os.remove(os.path.join(self.source_folder, 'cmake', 'FindLZMA.cmake')) - os.remove(os.path.join(self.source_folder, 'cmake', 'Findiconv.cmake')) + rm(self, "FindLZMA.cmake", os.path.join(self.source_folder, "cmake")) + rm(self, "Findiconv.cmake", os.path.join(self.source_folder, "cmake")) cmake = CMake(self) cmake.configure() cmake.build() def package(self): - copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "share")) @@ -66,6 +65,7 @@ def package(self): def package_info(self): self.cpp_info.includedirs = [] self.cpp_info.libdirs = [] + + # TODO: Remove after dropping Conan 1.x support bindir = os.path.join(self.package_folder, "bin") - self.output.info(f"Appending PATH environment variable: {bindir}") self.env_info.PATH.append(bindir) From 56a2838550459ad4199e4d2de3254e7c7ce20ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abril=20Rinc=C3=B3n=20Blanco?= Date: Tue, 24 Sep 2024 17:50:32 +0200 Subject: [PATCH 2/4] Update recipes/innoextract/all/conanfile.py --- recipes/innoextract/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/innoextract/all/conanfile.py b/recipes/innoextract/all/conanfile.py index b38a8c42c814b..817d9e3eee578 100644 --- a/recipes/innoextract/all/conanfile.py +++ b/recipes/innoextract/all/conanfile.py @@ -25,7 +25,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.85.0") + self.requires("boost/1.80.0") self.requires("xz_utils/[>=5.4.5 <6]") self.requires("libiconv/1.17") From 83d4ad08ae60db5163cacfa56f14be68a74f32b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abril=20Rinc=C3=B3n=20Blanco?= Date: Tue, 24 Sep 2024 17:54:59 +0200 Subject: [PATCH 3/4] Fix Boost 1.85 usage --- recipes/innoextract/all/conandata.yml | 4 ++++ recipes/innoextract/all/conanfile.py | 2 +- .../patches/0003-fix-boost-1_85-usage.patch | 24 +++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 recipes/innoextract/all/patches/0003-fix-boost-1_85-usage.patch diff --git a/recipes/innoextract/all/conandata.yml b/recipes/innoextract/all/conandata.yml index a280c970476d1..483273e3d6496 100644 --- a/recipes/innoextract/all/conandata.yml +++ b/recipes/innoextract/all/conandata.yml @@ -8,3 +8,7 @@ patches: "1.9.0": - patch_file: "patches/0001-cmake-fix-module.patch" - patch_file: "patches/0002-remove-custom-cmake-find-modules.patch" + - patch_file: "patches/0003-fix-boost-1_85-usage.patch" + patch_description: "Fix Boost 1.85 usage" + patch_type: "backport" + patch_source: "https://github.com/dscharrer/innoextract/pull/169" diff --git a/recipes/innoextract/all/conanfile.py b/recipes/innoextract/all/conanfile.py index 817d9e3eee578..b38a8c42c814b 100644 --- a/recipes/innoextract/all/conanfile.py +++ b/recipes/innoextract/all/conanfile.py @@ -25,7 +25,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.80.0") + self.requires("boost/1.85.0") self.requires("xz_utils/[>=5.4.5 <6]") self.requires("libiconv/1.17") diff --git a/recipes/innoextract/all/patches/0003-fix-boost-1_85-usage.patch b/recipes/innoextract/all/patches/0003-fix-boost-1_85-usage.patch new file mode 100644 index 0000000000000..c975532bd4744 --- /dev/null +++ b/recipes/innoextract/all/patches/0003-fix-boost-1_85-usage.patch @@ -0,0 +1,24 @@ +From 264c2fe6b84f90f6290c670e5f676660ec7b2387 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= +Date: Thu, 28 Mar 2024 15:11:40 +0100 +Subject: [PATCH] Fix build with boost 1.85 + +As of boost 1.85-beta1, boost/filesystem/directory.hpp is no longer +implicitly included by boost/filesystem/operations.hpp. Include it +explicitly. +--- + src/stream/slice.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/stream/slice.cpp b/src/stream/slice.cpp +index 12468a38..f7ebe0e5 100644 +--- a/src/stream/slice.cpp ++++ b/src/stream/slice.cpp +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + + #include "util/console.hpp" \ No newline at end of file From b1ea1a670e3852e6989511ed18efdad57d2e5650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abril=20Rinc=C3=B3n=20Blanco?= Date: Wed, 25 Sep 2024 12:19:43 +0200 Subject: [PATCH 4/4] Fix license, add max_cppstd of 14 due to auto_ptr usage --- recipes/innoextract/all/conanfile.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/recipes/innoextract/all/conanfile.py b/recipes/innoextract/all/conanfile.py index b38a8c42c814b..39a0b0164bd6a 100644 --- a/recipes/innoextract/all/conanfile.py +++ b/recipes/innoextract/all/conanfile.py @@ -1,6 +1,6 @@ import os -from conan import ConanFile +from conan import ConanFile, conan_version from conan.tools.cmake import cmake_layout, CMake, CMakeDeps, CMakeToolchain from conan.tools.env import VirtualBuildEnv from conan.tools.files import get, rmdir, copy, apply_conandata_patches, export_conandata_patches, rm @@ -11,7 +11,7 @@ class InnoextractConan(ConanFile): name = "innoextract" description = "Extract contents of Inno Setup installers" - license = "LicenseRef-LICENSE" + license = "Zlib" topics = ("inno-setup", "decompression") homepage = "https://constexpr.org/innoextract" url = "https://github.com/conan-io/conan-center-index" @@ -29,6 +29,14 @@ def requirements(self): self.requires("xz_utils/[>=5.4.5 <6]") self.requires("libiconv/1.17") + def validate(self): + # TODO: Remove guard after dropping Conan 1.x support + if conan_version > "2": + # This was not backported to Conan 1.x + from conan.tools.build import check_max_cppstd + # Uses auto_ptr + check_max_cppstd(self, "14") + def package_id(self): del self.info.settings.compiler