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

pistache: add version 0.4.25 #26463

Open
wants to merge 1 commit 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/pistache/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"0.4.25":
url: "https://github.com/pistacheio/pistache/archive/refs/tags/v0.4.25.tar.gz"
sha256: "30569c5d7290f38d2874e9a7c1a2e9a1a8f16b7567f581eba9590d7e1016756e"
"0.0.5":
url: "https://github.com/pistacheio/pistache/archive/refs/tags/0.0.5.tar.gz"
sha256: "e2da87ebc01367e33bd8d7800cb2bf5c23e9fb4e6f49dce2cab5f8756df8dca0"
Expand Down
46 changes: 5 additions & 41 deletions recipes/pistache/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir, replace_in_file, collect_libs
from conan.tools.build import check_min_cppstd
from conan.tools.apple import fix_apple_shared_install_name
from conan.tools.scm import Version
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.env import VirtualBuildEnv
from conan.tools.meson import Meson, MesonToolchain
Expand All @@ -12,7 +11,7 @@

import os

required_conan_version = ">=1.53.0"
required_conan_version = ">=2.0.9"

class PistacheConan(ConanFile):
name = "pistache"
Expand All @@ -33,29 +32,11 @@ class PistacheConan(ConanFile):
"fPIC": True,
"with_ssl": False,
}

@property
def _min_cppstd(self):
return 17

@property
def _compilers_minimum_version(self):
return {
"gcc": "7",
"clang": "6",
}
implements = ["auto_shared_fpic"]

def export_sources(self):
export_conandata_patches(self)

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")

def layout(self):
if self.version == "cci.20201127":
cmake_layout(self, src_folder="src")
Expand All @@ -70,19 +51,12 @@ def requirements(self):
self.requires("date/3.0.1")

def validate(self):
if self.settings.os != "Linux":
raise ConanInvalidConfiguration(f"{self.ref} is only support on Linux.")

if self.settings.os != "Linux" and self.version in ["cci.20201127", "0.0.5"]:
raise ConanInvalidConfiguration(f"{self.ref} is only support on Linux.")
if self.settings.compiler == "clang" and self.version in ["cci.20201127", "0.0.5"]:
raise ConanInvalidConfiguration(f"{self.ref}'s clang support is broken. See pistacheio/pistache#835.")

if self.settings.compiler.cppstd:
check_min_cppstd(self, self._min_cppstd)
minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
if minimum_version and Version(self.settings.compiler.version) < minimum_version:
raise ConanInvalidConfiguration(
f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support."
)
check_min_cppstd(self, 17)

def build_requirements(self):
if self.version != "cci.20201127":
Expand Down Expand Up @@ -167,13 +141,3 @@ def package_info(self):
self.cpp_info.components["libpistache"].system_libs = ["pthread"]
if self.version != "cci.20201127":
self.cpp_info.components["libpistache"].system_libs.append("m")

# TODO: to remove in conan v2 once cmake_find_package_* generators removed
self.cpp_info.filenames["cmake_find_package"] = "Pistache"
self.cpp_info.filenames["cmake_find_package_multi"] = "Pistache"
self.cpp_info.names["cmake_find_package"] = "Pistache"
self.cpp_info.names["cmake_find_package_multi"] = "Pistache"
self.cpp_info.names["pkg_config"] = "libpistache"
suffix = "_{}".format("shared" if self.options.shared else "static")
self.cpp_info.components["libpistache"].names["cmake_find_package"] = "pistache" + suffix
self.cpp_info.components["libpistache"].names["cmake_find_package_multi"] = "pistache" + suffix
2 changes: 2 additions & 0 deletions recipes/pistache/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"0.4.25":
folder: all
"0.0.5":
folder: all
"cci.20240107":
Expand Down