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

prometheus-cpp: add version 1.3.0 #25809

Merged
merged 2 commits into from
Nov 4, 2024
Merged
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
18 changes: 3 additions & 15 deletions recipes/prometheus-cpp/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.3.0":
url: "https://github.com/jupp0r/prometheus-cpp/archive/v1.3.0.tar.gz"
sha256: "ac6e958405a29fbbea9db70b00fa3c420e16ad32e1baf941ab233ba031dd72ee"
"1.2.4":
url: "https://github.com/jupp0r/prometheus-cpp/archive/v1.2.4.tar.gz"
sha256: "48dbad454d314b836cc667ec4def93ec4a6e4255fc8387c20cacb3b8b6faee30"
Expand All @@ -8,18 +11,3 @@ sources:
"1.0.1":
url: "https://github.com/jupp0r/prometheus-cpp/archive/v1.0.1.tar.gz"
sha256: "593e028d401d3298eada804d252bc38d8cab3ea1c9e88bcd72095281f85e6d16"
"1.0.0":
url: "https://github.com/jupp0r/prometheus-cpp/archive/v1.0.0.tar.gz"
sha256: "07018db604ea3e61f5078583e87c80932ea10c300d979061490ee1b7dc8e3a41"
"0.12.3":
url: "https://github.com/jupp0r/prometheus-cpp/archive/v0.12.3.tar.gz"
sha256: "e021e76e8e933672f1af0d223307282004f585a054354f8d894db39debddff8e"
"0.12.1":
url: "https://github.com/jupp0r/prometheus-cpp/archive/v0.12.1.tar.gz"
sha256: "2102609457f812dbeaaafd55736461fd0538fc7e7568174b1cdec43399dbded4"
"0.11.0":
url: "https://github.com/jupp0r/prometheus-cpp/archive/v0.11.0.tar.gz"
sha256: "aab4ef8342319f631969e01b8c41e355704847cbe76131cb1dd5ea1862000bda"
patches:
"0.11.0":
- patch_file: "patches/0001-include-limits.patch"
27 changes: 3 additions & 24 deletions recipes/prometheus-cpp/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir
from conan.tools.files import get, copy, rmdir
from conan.tools.build import check_min_cppstd, valid_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.scm import Version

import os

required_conan_version = ">=1.53.0"
required_conan_version = ">=2.0"

class PrometheusCppConan(ConanFile):
name = "prometheus-cpp"
Expand Down Expand Up @@ -37,21 +37,6 @@ class PrometheusCppConan(ConanFile):
def _min_cppstd(self):
return "14" if Version(self.version) == "1.1.0" else "11"

@property
def _compilers_minimum_version(self):
return {
"14": {
"gcc": "7",
"clang": "7",
"apple-clang": "10",
"Visual Studio": "15",
"msvc": "191",
},
}.get(self._min_cppstd, {})

def export_sources(self):
export_conandata_patches(self)

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
Expand All @@ -69,18 +54,13 @@ def requirements(self):
if self.options.with_pull:
self.requires("civetweb/1.16")
if self.options.with_push:
self.requires("libcurl/[>=7.78.0 <9]")
self.requires("libcurl/[>=7.78.0 <9]", transitive_headers=True)
if self.options.get_safe("with_compression"):
self.requires("zlib/[>=1.2.11 <2]")

def validate(self):
if self.info.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."
)

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand All @@ -101,7 +81,6 @@ def generate(self):
deps.generate()

def build(self):
apply_conandata_patches(self)
cmake = CMake(self)
cmake.configure()
cmake.build()
Expand Down
10 changes: 2 additions & 8 deletions recipes/prometheus-cpp/config.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
versions:
"1.3.0":
folder: all
"1.2.4":
folder: all
"1.1.0":
folder: all
"1.0.1":
folder: all
"1.0.0":
folder: all
"0.12.3":
folder: all
"0.12.1":
folder: all
"0.11.0":
folder: all