Skip to content

Commit

Permalink
Merge branch 'master' into restinio
Browse files Browse the repository at this point in the history
  • Loading branch information
gegles authored Jun 4, 2024
2 parents 6623be4 + c77b037 commit b1109a0
Show file tree
Hide file tree
Showing 111 changed files with 1,153 additions and 943 deletions.
9 changes: 8 additions & 1 deletion .c3i/authorized_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ authorized_users:
- Croydon
- Johnnyxy
- solvingj
- ericLemanissier
- tru
- sztomi
- theodelrieu
Expand Down Expand Up @@ -1359,3 +1358,11 @@ authorized_users:
- tttapa
- zeeshancs07
- jll63
- Jie-Cheng
- jjardina
- soonick
- Mercotui
- sunbubble
- praetorian20
- phbasler
- gsantner
5 changes: 5 additions & 0 deletions .c3i/conan_v2_ready_references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,7 @@ required_for_references:
- libpq
- libpqxx
- libproperties
- libprotobuf-mutator
- libpsl
- libqasm
- libqrencode
Expand Down Expand Up @@ -845,6 +846,7 @@ required_for_references:
- libxshmfence
- libxslt
- libyaml
- libyang
- libyuv
- libzen
- libzip
Expand Down Expand Up @@ -1158,6 +1160,7 @@ required_for_references:
- polylabel
- polylineencoder
- polymorphic_value
- popl
- poppler-data
- popt
- portable-file-dialogs
Expand Down Expand Up @@ -1309,6 +1312,7 @@ required_for_references:
- simfil
- simple-websocket-server
- simple-yaml
- sioclient
- sjson-cpp
- skyr-url
- sleef
Expand Down Expand Up @@ -1478,6 +1482,7 @@ required_for_references:
- units
- unity
- univalue
- unleash-client-cpp
- unordered_dense
- unqlite
- upx
Expand Down
6 changes: 3 additions & 3 deletions .c3i/reviewers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ reviewers:
- user: "theirix"
type: "community"
request_reviews: false
- user: "ericLemanissier"
type: "community"
request_reviews: false
- user: "prince-chrismc"
type: "community"
request_reviews: false
Expand Down Expand Up @@ -90,3 +87,6 @@ reviewers:
- user: "valgur"
type: "community"
request_reviews: false
- user: "perseoGI"
type: "team"
request_reviews: false
1 change: 1 addition & 0 deletions .c3i/waitlist_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ waitlist_users:
- Mike-Solar
- retroandchill
- refactorTractor
- jjbel
7 changes: 0 additions & 7 deletions docs/community_resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,12 @@ If you are looking to stay up to date with the last Conan news, follow us on Twi

- [Updatable Recipes](https://github.com/qchateau/conan-center-bot): Automatically scans available recipes and checked for new upstream releases and tests one configuration
- The results can be found here: https://qchateau.github.io/conan-center-bot/#/updatable
- [Conflicting Pull Requests](https://github.com/ericLemanissier/conan-center-conflicting-prs): Checks all the open pull requests for those which edit the same
recipe files and posts a message.
- The results can be found here: https://ericlemanissier.github.io/conan-center-conflicting-prs/
- [Pending Review](https://github.com/prince-chrismc/conan-center-index-pending-review)
- The results can be found here: https://prince-chrismc.github.io/conan-center-index-pending-review/
- [Pull Request In Progress Status](https://ericlemanissier.github.io/conan-center-pr-status/in_progress_jobs)
- [System Package Checks](https://github.com/bincrafters/system-packages-checks): Builds automatically all `system` versions of recipes merged on CCI
and being pull requested on a selection of Linux distributions and FreeBSD
- The results can be found here: https://bincrafters.github.io/system-packages-checks/

## Tools

- [FreeBSD Testing](https://github.com/ericLemanissier/conan-center-index/tree/freebsd): Detects pull requests with `FreeBSD` in the description and runs a test for
one configuration on that platform
- The results can be found here: https://github.com/ericLemanissier/conan-center-index/actions?query=workflow%3ACI
- [Bincrafters Conventions](https://github.com/bincrafters/bincrafters-conventions): Automatically updates Conan recipes to the latest conventions and rules
3 changes: 3 additions & 0 deletions recipes/ada/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"2.8.0":
url: "https://github.com/ada-url/ada/archive/v2.8.0.tar.gz"
sha256: "83b77fb53d1a9eea22b1484472cea0215c50478c9ea2b4b44b0ba3b52e07c139"
"2.7.8":
url: "https://github.com/ada-url/ada/archive/v2.7.8.tar.gz"
sha256: "8de067b7cb3da1808bf5439279aee6048d761ba246bf8a854c2af73b16b41c75"
Expand Down
2 changes: 2 additions & 0 deletions recipes/ada/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"2.8.0":
folder: all
"2.7.8":
folder: all
"2.7.7":
Expand Down
5 changes: 4 additions & 1 deletion recipes/aws-c-cal/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ def layout(self):
def requirements(self):
if Version(self.version) <= "0.5.20":
self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True)
else:
elif Version(self.version) <= "0.6.1":
self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True)
else:
# [>=0.9.7]
self.requires("aws-c-common/0.9.12", transitive_headers=True, transitive_libs=True)
if self._needs_openssl:
self.requires("openssl/[>=1.1 <4]")

Expand Down
53 changes: 34 additions & 19 deletions recipes/boost/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,20 @@ def _has_cppstd_14_supported(self):
# supported_cppstd: lists GCC 5 due partial support for C++14, but not enough for Boost
return (compiler_version >= required_compiler_version) and supported_cxx14

@property
def _has_cppstd_20_supported(self):
cppstd = self.settings.compiler.get_safe("cppstd")
if cppstd:
return valid_min_cppstd(self, 20)
required_compiler_version = self._min_compiler_version_default_cxx20
if required_compiler_version:
msvc_versions = {14: 190, 15: 191, 16: 192, 17: 193}
compiler_version = Version(self.settings.compiler.version)
is_visual_studio = str(self.settings.compiler) == "Visual Studio"
# supported_cppstd only supports msvc, but not Visual Studio as compiler
supported_cxx20 = "20" in supported_cppstd(self, "msvc", msvc_versions.get(compiler_version)) if is_visual_studio else "20" in supported_cppstd(self)
# We still dont have a compiler using C++20 by default
return (compiler_version >= required_compiler_version) or supported_cxx20

@property
def _min_compiler_version_nowide(self):
Expand Down Expand Up @@ -618,7 +632,7 @@ def _cxx11_boost_libraries(self):
if Version(self.version) >= "1.85.0":
libraries.append("system")
libraries.sort()
return filter(lambda library: f"without_{library}" in self.options, libraries)
return list(filter(lambda library: f"without_{library}" in self.options, libraries))

@property
def _cxx14_boost_libraries(self):
Expand All @@ -627,7 +641,16 @@ def _cxx14_boost_libraries(self):
# https://github.com/boostorg/math/blob/develop/README.md#boost-math-library
libraries.append("math")
libraries.sort()
return filter(lambda library: f"without_{library}" in self.options, libraries)
return list(filter(lambda library: f"without_{library}" in self.options, libraries))

@property
def _cxx20_boost_libraries(self):
libraries = []
if Version(self.version) >= "1.84.0":
# https://github.com/boostorg/cobalt/blob/boost-1.84.0/build/Jamfile#L54
libraries.append("cobalt")
libraries.sort()
return list(filter(lambda library: f"without_{library}" in self.options, libraries))

def validate(self):
if not self.options.multithreading:
Expand Down Expand Up @@ -669,24 +692,16 @@ def validate(self):
if mincompiler_version and Version(self.settings.compiler.version) < mincompiler_version:
raise ConanInvalidConfiguration("This compiler is too old to build Boost.nowide.")

if any([not self.options.get_safe(f"without_{library}", True) for library in self._cxx11_boost_libraries]):
if self.settings.compiler.get_safe("cppstd"):
check_min_cppstd(self, 11)
else:
if not self._has_cppstd_11_supported:
raise ConanInvalidConfiguration(
f"Boost.{{{','.join(self._cxx11_boost_libraries)}}} requires a c++11 compiler "
"(please set compiler.cppstd or use a newer compiler)"
)

if any([not self.options.get_safe(f"without_{library}", True) for library in self._cxx14_boost_libraries]):
if self.settings.compiler.get_safe("cppstd"):
check_min_cppstd(self, 14)
else:
if not self._has_cppstd_14_supported:
for cxx_standard, boost_libraries, has_cppstd_supported in [
(11, self._cxx11_boost_libraries, self._has_cppstd_11_supported),
(14, self._cxx14_boost_libraries, self._has_cppstd_14_supported),
(20, self._cxx20_boost_libraries, self._has_cppstd_20_supported)]:
if any([not self.options.get_safe(f"without_{library}", True) for library in boost_libraries]):
if (self.settings.compiler.get_safe("cppstd") and not valid_min_cppstd(self, cxx_standard)) or \
not has_cppstd_supported:
raise ConanInvalidConfiguration(
f"Boost.{{{','.join(self._cxx14_boost_libraries)}}} requires a c++14 compiler "
"(please set compiler.cppstd or use a newer compiler)"
f"Boost libraries {', '.join(boost_libraries)} requires a C++{cxx_standard} compiler. "
"Please, set compiler.cppstd or use a newer compiler version or disable from building."
)

def _with_dependency(self, dependency):
Expand Down
3 changes: 3 additions & 0 deletions recipes/cpp-dump/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"0.6.0":
url: "https://github.com/philip82148/cpp-dump/archive/refs/tags/v0.6.0.tar.gz"
sha256: "22bc5fafa22ac7c1e99db8824fdabec4af6baabed0c8b7cc80a0205dfb550414"
"0.5.0":
url: "https://github.com/philip82148/cpp-dump/archive/refs/tags/v0.5.0.tar.gz"
sha256: "31fa8b03c9ee820525137be28f37b36e2abe7fd91df7d67681cb894db2230fe6"
2 changes: 2 additions & 0 deletions recipes/cpp-dump/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"0.6.0":
folder: all
"0.5.0":
folder: all
3 changes: 3 additions & 0 deletions recipes/cpuinfo/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,6 @@ def package_info(self):
self.cpp_info.components["cpuinfo"].requires = ["clog"]
if self.settings.os in ["Linux", "FreeBSD"]:
self.cpp_info.components["cpuinfo"].system_libs.append("pthread")

if self.settings.os == "Android":
self.cpp_info.components["cpuinfo"].system_libs.append("log")
3 changes: 3 additions & 0 deletions recipes/crowcpp-crow/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.2.0":
url: "https://github.com/CrowCpp/crow/archive/refs/tags/v1.2.0.tar.gz"
sha256: "c80d0b23c6a20f8aa6fe776669dc8a9fb984046891d2f70bfc0539d16998164b"
"1.1.0":
url: "https://github.com/CrowCpp/crow/archive/refs/tags/v1.1.0.tar.gz"
sha256: "f4281c3f25769dbc82437dd4199a8ba07b2a6e8a2f42e36a6fd805c493aae5ca"
Expand Down
1 change: 1 addition & 0 deletions recipes/crowcpp-crow/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class CrowConan(ConanFile):
url = "https://github.com/conan-io/conan-center-index"
homepage = "http://crowcpp.org/"
topics = ("web", "microframework", "header-only")
package_type = "header-library"
settings = "os", "compiler", "arch", "build_type"
options = {
"amalgamation": [True, False],
Expand Down
2 changes: 2 additions & 0 deletions recipes/crowcpp-crow/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.2.0":
folder: all
"1.1.0":
folder: all
"1.0+5":
Expand Down
2 changes: 1 addition & 1 deletion recipes/elfutils/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def requirements(self):
self.requires("libmicrohttpd/0.9.75")

def build_requirements(self):
self.tool_requires("gettext/0.21")
self.tool_requires("gettext/0.22.5")
self.tool_requires("automake/1.16.5")
self.build_requires("m4/1.4.19")
self.build_requires("flex/2.6.4")
Expand Down
3 changes: 3 additions & 0 deletions recipes/etl/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"20.38.16":
url: "https://github.com/ETLCPP/etl/archive/20.38.16.tar.gz"
sha256: "6d05e33d6e7eb2c8d4654c77dcd083adc70da29aba808f471ba7c6e2b8fcbf03"
"20.38.15":
url: "https://github.com/ETLCPP/etl/archive/20.38.15.tar.gz"
sha256: "c4f3108b35eb669ce4a6a217264ca133fe52cc8b5bce026a474ec81c0a2c4026"
Expand Down
2 changes: 2 additions & 0 deletions recipes/etl/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"20.38.16":
folder: all
"20.38.15":
folder: all
"20.38.14":
Expand Down
3 changes: 3 additions & 0 deletions recipes/extra-cmake-modules/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"6.2.0":
url: "https://download.kde.org/stable/frameworks/6.2/extra-cmake-modules-6.2.0.tar.xz"
sha256: "6374bfa0dded8be265c702acd5de11eecd2851c625b93e1c87d8d0f5f1a8ebe1"
"5.113.0":
url: "https://download.kde.org/stable/frameworks/5.113/extra-cmake-modules-5.113.0.tar.xz"
sha256: "265e5440eebeca07351a469e617a4bf35748927bd907b00ace9c018392bb3bc4"
Expand Down
2 changes: 2 additions & 0 deletions recipes/extra-cmake-modules/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"6.2.0":
folder: "all"
"5.113.0":
folder: "all"
"5.111.0":
Expand Down
18 changes: 4 additions & 14 deletions recipes/glib/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES C)

add_executable(${PROJECT_NAME} test_package.c)
find_package(glib CONFIG REQUIRED)

if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
find_package(glib CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE glib::glib-2.0 glib::gio-2.0 glib::gmodule-2.0 glib::gobject-2.0 glib::gthread-2.0)
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(glib-2.0 REQUIRED IMPORTED_TARGET glib-2.0)
pkg_check_modules(gio-2.0 REQUIRED IMPORTED_TARGET gio-2.0)
pkg_check_modules(gmodule-2.0 REQUIRED IMPORTED_TARGET gmodule-2.0)
pkg_check_modules(gobject-2.0 REQUIRED IMPORTED_TARGET gobject-2.0)
pkg_check_modules(gthread-2.0 REQUIRED IMPORTED_TARGET gthread-2.0)
target_link_libraries(${PROJECT_NAME} PRIVATE PkgConfig::glib-2.0 PkgConfig::gio-2.0 PkgConfig::gmodule-2.0 PkgConfig::gobject-2.0 PkgConfig::gthread-2.0)
endif()
add_executable(${PROJECT_NAME} test_package.c)
target_link_libraries(${PROJECT_NAME} PRIVATE glib::glib-2.0 glib::gio-2.0 glib::gmodule-2.0 glib::gobject-2.0 glib::gthread-2.0)
39 changes: 4 additions & 35 deletions recipes/glib/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,47 +1,19 @@
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import cmake_layout, CMake, CMakeDeps, CMakeToolchain
from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv
from conan.tools.gnu import PkgConfig, PkgConfigDeps
from conan.tools.cmake import cmake_layout, CMake
import os


class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
generators = "CMakeDeps", "CMakeToolchain", "VirtualBuildEnv", "VirtualRunEnv"
test_type = "explicit"

def layout(self):
cmake_layout(self)

def requirements(self):
self.requires(self.tested_reference_str)

def build_requirements(self):
if self.settings.os != "Windows" and not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str):
self.tool_requires("pkgconf/2.0.3")

def generate(self):
tc = CMakeToolchain(self)
tc.generate()
virtual_run_env = VirtualRunEnv(self)
virtual_run_env.generate()

if self.settings.os == "Macos":
env = Environment()
# Avoid conflicts with system libiconv
# see: https://github.com/conan-io/conan-center-index/pull/17610#issuecomment-1552921286
env.define_path("DYLD_FALLBACK_LIBRARY_PATH", "$DYLD_LIBRARY_PATH")
env.define_path("DYLD_LIBRARY_PATH", "")
env.vars(self, scope="run").save_script("conanrun_macos_runtimepath")

if self.settings.os == "Windows":
deps = CMakeDeps(self)
deps.generate()
else:
virtual_build_env = VirtualBuildEnv(self)
virtual_build_env.generate()
pkg_config_deps = PkgConfigDeps(self)
pkg_config_deps.generate()
self.requires(self.tested_reference_str, run=True)

def build(self):
cmake = CMake(self)
Expand All @@ -52,8 +24,5 @@ def test(self):
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
self.run(bin_path, env="conanrun")

if self.settings.os != "Windows":
pkg_config = PkgConfig(self, "gio-2.0", pkg_config_path=self.generators_folder)
gdbus_codegen = pkg_config.variables["gdbus_codegen"]
self.run(f"{gdbus_codegen} -h", env="conanrun")
self.run("gdbus-codegen -h", env="conanrun")
2 changes: 1 addition & 1 deletion recipes/glib/all/test_v1_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.15)
project(test_package)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
Expand Down
Loading

0 comments on commit b1109a0

Please sign in to comment.