Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libpsl: added version 0.21.5 #23642

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions recipes/libpsl/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
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"

Check warning on line 10 in recipes/libpsl/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - patch_file: patches/0001-0.2 ... ^ (line: 10)
13 changes: 11 additions & 2 deletions recipes/libpsl/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
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"
Expand All @@ -23,11 +24,13 @@ class LibPslConan(ConanFile):
"shared": [True, False],
"fPIC": [True, False],
"with_idna": [False, "icu", "libidn", "libidn2"],
"enable_builtin": [True, False],
}
default_options = {
"shared": False,
"fPIC": True,
"with_idna": "icu",
"enable_builtin": True,
}

def export_sources(self):
Expand All @@ -36,6 +39,8 @@ def export_sources(self):
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
if Version(self.version) < "0.21.5":
self.options.rm_safe("enable_builtin")

def configure(self):
if self.options.shared:
Expand All @@ -57,7 +62,7 @@ def requirements(self):
self.requires("libunistring/0.9.10")

def build_requirements(self):
self.tool_requires("meson/1.2.1")
self.tool_requires("meson/1.4.0")
if not self.conf.get("tools.gnu:pkg_config", check_type=str):
self.tool_requires("pkgconf/2.0.3")

Expand All @@ -76,7 +81,11 @@ 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.5":
tc.project_options["builtin"] = self.options.enable_builtin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this option is only valid from this version onward, it should be removed in the config_options() method so as to not influcence the pkgid of older versions :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this PR that tried to target an older release https://github.com/conan-io/conan-center-index/pull/22029/files#diff-308e90de1d7646e4db40d401de640dd72698dbb96cb43871ac4fb7bbd8eb8566R77

has it still check for the old ._idna_option. I take that yours is more extensible, but could you confirm what the original upstream intention is? Thanks! :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it should not be removed, older versions of the lib used to allow setting the 'builtin' option to the same values as the 'runtime' option (libicu, libidn, etc) but now they changed the meaning/possible values to just True/False.
I preserved compatibility with older versions

tc.project_options["builtin"] = self._idna_option

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry took me a while to understand your comment :), fixed in 1e108a3

tc.project_options["tests"] = not self.conf.get("tools.build:skip_test", default=True, check_type=bool)
else:
tc.project_options["builtin"] = self._idna_option
tc.generate()
deps = PkgConfigDeps(self)
deps.generate()
Expand Down
2 changes: 2 additions & 0 deletions recipes/libpsl/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"0.21.5":
folder: "all"
"0.21.1":
folder: "all"
Loading