diff --git a/recipes/libpsl/all/conandata.yml b/recipes/libpsl/all/conandata.yml index 0f43ba25d532c..5bb1a97519f37 100644 --- a/recipes/libpsl/all/conandata.yml +++ b/recipes/libpsl/all/conandata.yml @@ -1,7 +1,7 @@ sources: + "0.21.5": + url: "https://github.com/rockdaboot/libpsl/releases/download/0.21.5/libpsl-0.21.5.tar.gz" + sha256: "1dcc9ceae8b128f3c0b3f654decd0e1e891afc6ff81098f227ef260449dae208" "0.21.1": url: "https://github.com/rockdaboot/libpsl/releases/download/0.21.1/libpsl-0.21.1.tar.gz" sha256: "ac6ce1e1fbd4d0254c4ddb9d37f1fa99dec83619c1253328155206b896210d4c" -patches: - "0.21.1": - - patch_file: "patches/0001-0.21.2-meson-no-tests.patch" diff --git a/recipes/libpsl/all/conanfile.py b/recipes/libpsl/all/conanfile.py index 0de3f9766ed38..87cc0d1f0e6b4 100644 --- a/recipes/libpsl/all/conanfile.py +++ b/recipes/libpsl/all/conanfile.py @@ -1,10 +1,11 @@ from conan import ConanFile from conan.tools.apple import fix_apple_shared_install_name from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir +from conan.tools.files import copy, get, rm, rmdir, replace_in_file from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -30,9 +31,6 @@ class LibPslConan(ConanFile): "with_idna": "icu", } - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -48,18 +46,18 @@ def layout(self): def requirements(self): if self.options.with_idna == "icu": - self.requires("icu/73.2") + self.requires("icu/74.1") elif self.options.with_idna == "libidn": self.requires("libidn/1.36") elif self.options.with_idna == "libidn2": self.requires("libidn2/2.3.0") if self.options.with_idna in ("libidn", "libidn2"): - self.requires("libunistring/0.9.10") + self.requires("libunistring/1.1") def build_requirements(self): - self.tool_requires("meson/1.2.1") + self.tool_requires("meson/[>=1.2.3 <2]") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/[>=2.2.0 <3]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -76,13 +74,22 @@ def generate(self): env.generate() tc = MesonToolchain(self) tc.project_options["runtime"] = self._idna_option - tc.project_options["builtin"] = self._idna_option + if Version(self.version) >= "0.21.2": + tc.project_options["builtin"] = "true" if self.options.with_idna else "false" + else: + tc.project_options["builtin"] = self._idna_option + if not self.options.shared: + tc.preprocessor_definitions["PSL_STATIC"] = "1" tc.generate() deps = PkgConfigDeps(self) deps.generate() + def _patch_sources(self): + replace_in_file(self, os.path.join(self.source_folder, "meson.build"), "subdir('tests')", "") + replace_in_file(self, os.path.join(self.source_folder, "meson.build"), "subdir('fuzz')", "") + def build(self): - apply_conandata_patches(self) + self._patch_sources() meson = Meson(self) meson.configure() meson.build() @@ -94,6 +101,7 @@ def package(self): meson.install() rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) fix_apple_shared_install_name(self) fix_msvc_libname(self) diff --git a/recipes/libpsl/all/patches/0001-0.21.2-meson-no-tests.patch b/recipes/libpsl/all/patches/0001-0.21.2-meson-no-tests.patch deleted file mode 100644 index 46bd2ea7a2c59..0000000000000 --- a/recipes/libpsl/all/patches/0001-0.21.2-meson-no-tests.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- meson.build -+++ meson.build -@@ -148,5 +148,5 @@ - subdir('include') - subdir('src') --subdir('tools') --subdir('tests') --subdir('fuzz') -+#subdir('tools') # FIXME!!!! https://github.com/rockdaboot/libpsl/issues/160 -+#subdir('tests') -+#subdir('fuzz') diff --git a/recipes/libpsl/config.yml b/recipes/libpsl/config.yml index 079bf2c67f869..00068fd9ad17d 100644 --- a/recipes/libpsl/config.yml +++ b/recipes/libpsl/config.yml @@ -1,3 +1,5 @@ versions: + "0.21.5": + folder: "all" "0.21.1": folder: "all"