Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
LevWi authored Jun 30, 2023
2 parents c7a05ef + 64a30a5 commit 444829d
Show file tree
Hide file tree
Showing 202 changed files with 3,687 additions and 1,595 deletions.
3 changes: 3 additions & 0 deletions .c3i/authorized_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1182,3 +1182,6 @@ authorized_users:
- ChrisThrasher
- ViktarHasiul231862
- Becheler
- jalapenopuzzle
- HalfSweet
- CJCombrink
16 changes: 16 additions & 0 deletions .c3i/conan_v2_ready_references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ required_for_references:
- cgal
- cgif
- cgns
- chaiscript
- charls
- chef-fun
- chipmunk2d
Expand Down Expand Up @@ -221,6 +222,7 @@ required_for_references:
- emio
- enet
- entityx
- entt
- enum-flags
- erikzenker-hsm
- erkir
Expand Down Expand Up @@ -401,6 +403,7 @@ required_for_references:
- libnabo
- libnfs
- libnghttp2
- libnl
- libnop
- libnova
- libnuma
Expand Down Expand Up @@ -474,16 +477,22 @@ required_for_references:
- matchit
- mawk
- mbedtls
- mbits-args
- mbits-mstch
- mbits-semver
- mbits-utfconv
- md4c
- md4qt
- mdnsresponder
- mdspan
- meson
- metis
- mgs
- microservice-essentials
- mikelankamp-fpm
- mimalloc
- miniaudio
- minimp3
- minisat
- minizip
- minizip-ng
Expand All @@ -493,6 +502,7 @@ required_for_references:
- mozjpeg
- mp-units
- mpg123
- mppp
- ms-gsl
- msgpack-c
- msgpack-cxx
Expand Down Expand Up @@ -568,6 +578,7 @@ required_for_references:
- prometheus-cpp
- proposal
- protobuf
- protobuf-c
- psimd
- pthreadpool
- pthreads4w
Expand Down Expand Up @@ -600,6 +611,7 @@ required_for_references:
- restbed
- restinio
- ring-span-lite
- rmm
- roaring
- robin-hood-hashing
- rttr
Expand All @@ -621,6 +633,7 @@ required_for_references:
- sfml
- shield
- sigslot
- simde
- simdjson
- simdutf
- skyr-url
Expand All @@ -638,8 +651,11 @@ required_for_references:
- sqlite3
- sqlite_orm
- sqlitecpp
- sqlpp11
- ssht
- status-code
- stb
- stlab
- strawberryperl
- string-view-lite
- strong_type
Expand Down
2 changes: 1 addition & 1 deletion recipes/arrow/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def package_info(self):
del self.options.plasma

if self.options.acero:
self.cpp_info.components["libacero"].libs = [f"acero{suffix}"]
self.cpp_info.components["libacero"].libs = [f"arrow_acero{suffix}"]
self.cpp_info.components["libacero"].names["cmake_find_package"] = "acero"
self.cpp_info.components["libacero"].names["cmake_find_package_multi"] = "acero"
self.cpp_info.components["libacero"].names["pkg_config"] = "acero"
Expand Down
67 changes: 42 additions & 25 deletions recipes/certify/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
from conans import ConanFile, tools
from conans.errors import ConanInvalidConfiguration
import os

required_conan_version = ">=1.43.0"
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.files import copy, get
from conan.tools.layout import basic_layout

required_conan_version = ">=1.52.0"


class CertifyConan(ConanFile):
name = "certify"
description = "Platform-specific TLS keystore abstraction for use with Boost.ASIO and OpenSSL"
topics = ("boost", "asio", "tls", "ssl", "https")
license = "BSL-1.0"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/djarek/certify"
license = "BSL-1.0"
topics = ("boost", "asio", "tls", "ssl", "https", "header-only")

package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"
no_copy_source = True

@property
def _source_subfolder(self):
return "source_subfolder"
def _min_cppstd(self):
return 17

@property
def _compilers_minimum_version(self):
Expand All @@ -28,17 +34,19 @@ def _compilers_minimum_version(self):
"apple-clang": "11",
}

@property
def _min_cppstd(self):
return "17"
def layout(self):
basic_layout(self, src_folder="src")

def requirements(self):
self.requires("boost/1.79.0")
self.requires("openssl/1.1.1q")
self.requires("boost/1.82.0")
self.requires("openssl/[>=1.1 <4]")

def package_id(self):
self.info.clear()

def validate(self):
if self.settings.compiler.get_safe("cppstd"):
tools.check_min_cppstd(self, self._min_cppstd)
check_min_cppstd(self, self._min_cppstd)

def lazy_lt_semver(v1, v2):
lv1 = [int(v) for v in v1.split(".")]
Expand All @@ -48,29 +56,38 @@ def lazy_lt_semver(v1, v2):

minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
if not minimum_version:
self.output.warn("{} requires C++17. Your compiler is unknown. Assuming it supports C++17.".format(self.name))
self.output.warning(
f"{self.name} requires C++17. Your compiler is unknown. Assuming it supports C++17."
)
elif lazy_lt_semver(str(self.settings.compiler.version), minimum_version):
raise ConanInvalidConfiguration("{} requires C++17, which your compiler does not support.".format(self.name))

def package_id(self):
self.info.header_only()
raise ConanInvalidConfiguration(
f"{self.name} requires C++17, which your compiler does not support."
)

def source(self):
tools.get(**self.conan_data["sources"][self.version],
strip_root=True, destination=self._source_subfolder)
get(self, **self.conan_data["sources"][self.version], strip_root=True)

def package(self):
self.copy(pattern="LICENSE_1_0.txt", dst="licenses",
src=self._source_subfolder)
self.copy(pattern="*", dst="include",
src=os.path.join(self._source_subfolder, "include"))
copy(
self,
pattern="LICENSE_1_0.txt",
dst=os.path.join(self.package_folder, "licenses"),
src=self.source_folder,
)
copy(
self,
pattern="*",
dst=os.path.join(self.package_folder, "include"),
src=os.path.join(self.source_folder, "include"),
)

def package_info(self):
self.cpp_info.set_property("cmake_file_name", "certify")
self.cpp_info.set_property("cmake_target_name", "certify::core")
self.cpp_info.components["_certify"].requires = ["boost::boost", "openssl::openssl"]

self.cpp_info.components["_certify"].requires = ["boost::boost", "openssl::openssl"]
self.cpp_info.components["_certify"].names["cmake_find_package"] = "core"
self.cpp_info.components["_certify"].names["cmake_find_package_multi"] = "core"

self.cpp_info.names["cmake_find_package"] = "certify"
self.cpp_info.names["cmake_find_package_multi"] = "certify"
7 changes: 2 additions & 5 deletions recipes/certify/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
cmake_minimum_required(VERSION 3.8)
project(test_package)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES CXX)

find_package(certify REQUIRED CONFIG)

Expand Down
21 changes: 15 additions & 6 deletions recipes/certify/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
from conans import ConanFile, CMake, tools
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import cmake_layout, CMake
import os


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

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

def layout(self):
cmake_layout(self)

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def test(self):
if not tools.cross_building(self):
bin_path = os.path.join("bin", "test_package")
self.run(bin_path, run_environment=True)
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindir, "test_package")
self.run(bin_path, env="conanrun")
18 changes: 9 additions & 9 deletions recipes/certify/all/test_package/test_package.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
#include <iostream>

int main() {
boost::asio::io_context ioc{1};
boost::asio::ssl::context context{boost::asio::ssl::context_base::method::tls_client};
boost::asio::ssl::stream<boost::asio::ip::tcp::socket> stream(ioc, context);
constexpr auto hostname = "example.com";
boost::asio::io_context ioc{1};
boost::asio::ssl::context context{boost::asio::ssl::context_base::method::tls_client};
boost::asio::ssl::stream<boost::asio::ip::tcp::socket> stream(ioc, context);
constexpr auto hostname = "example.com";

BOOST_TEST(boost::certify::sni_hostname(stream).empty());
boost::certify::sni_hostname(stream, hostname);
BOOST_TEST(boost::certify::sni_hostname(stream) == hostname);
std::cout << boost::report_errors();
BOOST_TEST(boost::certify::sni_hostname(stream).empty());
boost::certify::sni_hostname(stream, hostname);
BOOST_TEST(boost::certify::sni_hostname(stream) == hostname);
std::cout << boost::report_errors();

return 0;
return 0;
}
3 changes: 3 additions & 0 deletions recipes/cmake/3.x.x/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ sources:
"3.25.2":
url: "https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2.tar.gz"
sha256: "c026f22cb931dd532f648f087d587f07a1843c6e66a3dfca4fb0ea21944ed33c"
"3.26.4":
url: "https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4.tar.gz"
sha256: "313b6880c291bd4fe31c0aa51d6e62659282a521e695f30d5cc0d25abbd5c208"
Loading

0 comments on commit 444829d

Please sign in to comment.