Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/upstream/master' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	recipes/libjxl/all/conandata.yml
#	recipes/libjxl/all/conanfile.py
#	recipes/libjxl/config.yml
#	recipes/swig/all/conanfile.py
#	recipes/swig/all/test_package/conanfile.py
  • Loading branch information
valgur committed Jul 15, 2024
2 parents 29c970c + eb5b21c commit 06fbd15
Show file tree
Hide file tree
Showing 78 changed files with 1,517 additions and 545 deletions.
9 changes: 9 additions & 0 deletions .c3i/conan_v2_ready_references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ required_for_references:
- ezc3d
- faac
- fakeit
- faker-cxx
- farmhash
- fast-cdr
- fast-cpp-csv-parser
Expand Down Expand Up @@ -513,6 +514,7 @@ required_for_references:
- gtest
- gtk
- gtk-doc-stub
- gtlab-logging
- gtsam
- guetzli
- gumbo-parser
Expand Down Expand Up @@ -658,6 +660,7 @@ required_for_references:
- libatomic_ops
- libattr
- libavif
- libavrocpp
- libb2
- libbacktrace
- libbasisu
Expand Down Expand Up @@ -1114,6 +1117,7 @@ required_for_references:
- ozz-animation
- p-ranav-glob
- p7zip
- pagmo2
- paho-mqtt-c
- paho-mqtt-cpp
- pango
Expand Down Expand Up @@ -1221,11 +1225,13 @@ required_for_references:
- quaternions
- quazip
- quickcpplib
- quickfast
- quickfix
- quickjs
- quill
- quirc
- qwt
- qxmpp
- r8brain-free-src
- rabbitmq-c
- ragel
Expand Down Expand Up @@ -1291,6 +1297,7 @@ required_for_references:
- sassc
- sbepp
- sbp
- scc
- scdoc
- scip
- scippp
Expand Down Expand Up @@ -1568,6 +1575,7 @@ required_for_references:
- wil
- wildcards
- wildmidi
- wineditline
- winflexbison
- winmd
- winreg
Expand Down Expand Up @@ -1613,6 +1621,7 @@ required_for_references:
- yandex-ozo
- yas
- yasm
- ydcpp-tcpcat
- yder
- yoga
- yomm2
Expand Down
2 changes: 1 addition & 1 deletion .c3i/config_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
id: 'conan-io/conan-center-index'

conan:
version: 2.3.1
version: 2.5.0
backup_sources:
upload_url: "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/"
download_url: "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/"
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

### 10-Jul-2024 - 13:22 CEST

- [feature] Add support for Conan 2.5.0 in the CI
- [fix] Invalid configuration from tool requirement in Conan 1.x

### 22-May-2024 - 12:04 CEST

- [feature] Add support for Conan 2.3.1 in the CI
Expand Down
18 changes: 18 additions & 0 deletions recipes/azure-sdk-for-cpp/all/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 3.15)
project(cmake_wrapper)

# The cmake_wrapper allows users to build only modules they want and not the entire sdk,
# the CMakeLists.txt from source does not provide this modularity to users (it's all or nothing).

foreach(sdk ${BUILD_LIST})
if(${sdk} STREQUAL azure-core)
# Always build Core
add_subdirectory("src/sdk/core")
elseif(${sdk} STREQUAL azure-storage-common)
add_subdirectory("src/sdk/storage/azure-storage-common")
elseif(${sdk} STREQUAL azure-storage-blobs)
add_subdirectory("src/sdk/storage/azure-storage-blobs")
elseif(${sdk} STREQUAL azure-storage-files-shares)
add_subdirectory("src/sdk/storage/azure-storage-files-shares")
endif()
endforeach()
4 changes: 4 additions & 0 deletions recipes/azure-sdk-for-cpp/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sources:
"1.11.3":
url: "https://github.com/Azure/azure-sdk-for-cpp/archive/refs/tags/azure-core_1.11.3.tar.gz"
sha256: "c67e42622bf1ebafee29aa09f333e41adc24712b0c993ada5dd97c9265b444cc"
110 changes: 110 additions & 0 deletions recipes/azure-sdk-for-cpp/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
from conan.tools.files import get, copy, rmdir
from conan.tools.scm import Version
import os

required_conan_version = ">=1.54.0"

AZURE_SDK_MODULES = (
"azure-storage-common",
"azure-storage-blobs",
"azure-storage-files-shares"
)

class AzureSDKForCppConan(ConanFile):
name = "azure-sdk-for-cpp"
description = "Microsoft Azure Storage Client Library for C++"
license = "Apache-2.0"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/Azure/azure-sdk-for-cpp"
topics = ("azure", "cpp", "cross-platform", "microsoft", "cloud")
package_type = "library"
settings = "os", "arch", "compiler", "build_type"
options = {"shared": [True, False], "fPIC": [True, False]}
options.update({_name: [True, False] for _name in AZURE_SDK_MODULES})
default_options = {"shared": False, "fPIC": True}
default_options.update({_name: True for _name in AZURE_SDK_MODULES}) # Build all modules by default, let users pick what they do not want

def export_sources(self):
copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder)

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

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

def requirements(self):
self.requires("openssl/[>=1.1 <4]")
self.requires("libcurl/[>=7.78 <9]")
self.requires("libxml2/[>=2.12.5 <3]")

def layout(self):
cmake_layout(self, src_folder="src")

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

# Open to contributions for windows and apple
if self.settings.os != "Linux":
raise ConanInvalidConfiguration(
f"{self.ref} Conan recipe in ConanCenter still does not support {self.settings.os}, contributions to the recipe welcome.")

if self.settings.compiler != "gcc":
raise ConanInvalidConfiguration(
f"{self.ref} Conan recipe in ConanCenter still does not support {self.settings.compiler}, contributions to the recipe welcome.")

if self.settings.compiler == 'gcc' and Version(self.settings.compiler.version) < "6":
raise ConanInvalidConfiguration("Building requires GCC >= 6")

def generate(self):
tc = CMakeToolchain(self)

build_list = ["azure-core"]
for sdk in AZURE_SDK_MODULES:
if self.options.get_safe(sdk):
build_list.append(sdk)
tc.cache_variables["BUILD_LIST"] = ";".join(build_list)

tc.variables["AZ_ALL_LIBRARIES"] = "ON"
tc.variables["FETCH_SOURCE_DEPS"] = "OFF"
tc.cache_variables["BUILD_TESTING"] = "OFF"
tc.cache_variables["BUILD_WINDOWS_UWP"] = "ON"
tc.cache_variables["DISABLE_AZURE_CORE_OPENTELEMETRY"] = "ON"
tc.cache_variables["BUILD_TRANSPORT_CURL"] = "ON"
tc.generate()

deps = CMakeDeps(self)
deps.generate()

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

def package(self):
copy(self, "LICENSE.txt",
dst=os.path.join(self.package_folder, "licenses"),
src=self.source_folder)
cmake = CMake(self)
cmake.install()

rmdir(self, os.path.join(self.package_folder, "share"))

def package_info(self):
self.cpp_info.set_property("cmake_file_name", "AzureSDK")

# core component
self.cpp_info.components["azure-core"].set_property("cmake_target_name", "Azure::azure-core")
self.cpp_info.components["azure-core"].libs = ["azure-core"]
self.cpp_info.components["azure-core"].requires.extend(["openssl::openssl", "libcurl::curl", "libxml2::libxml2"])

enabled_sdks = [sdk for sdk in AZURE_SDK_MODULES if self.options.get_safe(sdk)]
for sdk in enabled_sdks:
self.cpp_info.components[sdk].set_property("cmake_target_name", f"Azure::{sdk}")
self.cpp_info.components[sdk].libs = [sdk]
17 changes: 17 additions & 0 deletions recipes/azure-sdk-for-cpp/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.8)

project(test_package LANGUAGES CXX)

find_package(AzureSDK CONFIG REQUIRED)

add_executable(test_azure-core test_azure-core.cc)
target_link_libraries(test_azure-core PRIVATE Azure::azure-core)

add_executable(test_azure-storage-common test_azure-storage-common.cc)
target_link_libraries(test_azure-storage-common PRIVATE Azure::azure-core Azure::azure-storage-common)

add_executable(test_azure-storage-blobs test_azure-storage-blobs.cc)
target_link_libraries(test_azure-storage-blobs PRIVATE Azure::azure-core Azure::azure-storage-common Azure::azure-storage-blobs)

add_executable(test_azure-storage-files-shares test_azure-storage-files-shares.cc)
target_link_libraries(test_azure-storage-files-shares PRIVATE Azure::azure-core Azure::azure-storage-common Azure::azure-storage-files-shares)
33 changes: 33 additions & 0 deletions recipes/azure-sdk-for-cpp/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import CMake, cmake_layout
import os


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

@property
def _tested_modules(self):
return ["azure-core",
"azure-storage-common",
"azure-storage-blobs",
"azure-storage-files-shares"]

def layout(self):
cmake_layout(self)

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

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

def test(self):
if can_run(self):
for module in self._tested_modules:
bin_path = os.path.join(self.cpp.build.bindirs[0], f"test_{module}")
self.run(bin_path, env="conanrun")
10 changes: 10 additions & 0 deletions recipes/azure-sdk-for-cpp/all/test_package/test_azure-core.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <iostream>
#include <azure/core.hpp>

int main()
{
std::vector<uint8_t> data = {1, 2, 3, 4};
Azure::Core::IO::MemoryBodyStream stream(data);

return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <azure/storage/blobs.hpp>

using namespace Azure::Storage::Blobs;

int main()
{
BlobAudience audience{"TEST"};

return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <azure/storage/common/storage_common.hpp>

using namespace Azure::Storage;

int main()
{
ContentHash contentHash{};

return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <azure/storage/files/shares.hpp>

using namespace Azure::Storage::Files::Shares;

int main()
{
SetSharePropertiesOptions options;

return 0;
}
3 changes: 3 additions & 0 deletions recipes/azure-sdk-for-cpp/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
versions:
"1.11.3":
folder: "all"
3 changes: 3 additions & 0 deletions recipes/blend2d/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"0.11.3":
url: "https://blend2d.com/download/blend2d-0.11.3.tar.gz"
sha256: "6dfb2c0260073f2af6c3dfe6c30a31da637e6facf7802f6b2836cc3c4e74fdd8"
"0.11.1":
url: "https://blend2d.com/download/blend2d-0.11.1.tar.gz"
sha256: "f46d61b6aa477fea1a353a41f5906d4e861817ae059ed22fc6ecdd50ff859dd2"
Expand Down
2 changes: 2 additions & 0 deletions recipes/blend2d/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"0.11.3":
folder: all
"0.11.1":
folder: all
"0.10.6":
Expand Down
23 changes: 5 additions & 18 deletions recipes/c-ares/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.32.1":
url: "https://github.com/c-ares/c-ares/releases/download/v1.32.1/c-ares-1.32.1.tar.gz"
sha256: "63be2c4ee121faa47e9766f735b4cde750fff2c563f81c11e572d3dc6401e5e7"
"1.31.0":
url: "https://github.com/c-ares/c-ares/releases/download/v1.31.0/c-ares-1.31.0.tar.gz"
sha256: "0167a33dba96ca8de29f3f598b1e6cabe531799269fd63d0153aa0e6f5efeabd"
Expand All @@ -14,27 +17,11 @@ sources:
"1.26.0":
url: "https://github.com/c-ares/c-ares/releases/download/cares-1_26_0/c-ares-1.26.0.tar.gz"
sha256: "bed58c4f02b009080ebda6c2467ba469722ac6aebbf4497dc44a83d8c6194e50"
# keep 1.25.0 for libnghttp2, trantor, libcoro
"1.25.0":
url: "https://github.com/c-ares/c-ares/releases/download/cares-1_25_0/c-ares-1.25.0.tar.gz"
sha256: "71832b93a48f5ff579c505f4869120c14e57b783275367207f1a98314aa724e5"
"1.22.1":
url: "https://github.com/c-ares/c-ares/releases/download/cares-1_22_1/c-ares-1.22.1.tar.gz"
sha256: "f67c180deb799c670d9dda995a18ce06f6c7320b6c6363ff8fa85b77d0da9db8"
"1.22.0":
url: "https://github.com/c-ares/c-ares/releases/download/cares-1_22_0/c-ares-1.22.0.tar.gz"
sha256: "ad2e205088083317147c9f9eab5f24b82c3d50927c381a7c963deeb1182dbc21"
"1.21.0":
url: "https://github.com/c-ares/c-ares/releases/download/cares-1_21_0/c-ares-1.21.0.tar.gz"
sha256: "cd7aa3af1d3ee780d6437039a7ddb7f1ec029f9c4f7aabb0197e384eb5bc2f2d"
"1.20.1":
url: "https://github.com/c-ares/c-ares/releases/download/cares-1_20_1/c-ares-1.20.1.tar.gz"
sha256: "de24a314844cb157909730828560628704f4f896d167dd7da0fa2fb93ea18b10"
# keep 1.19.1 for grpc
"1.19.1":
url: "https://github.com/c-ares/c-ares/releases/download/cares-1_19_1/c-ares-1.19.1.tar.gz"
sha256: "321700399b72ed0e037d0074c629e7741f6b2ec2dda92956abe3e9671d3e268e"
"1.19.0":
url: "https://github.com/c-ares/c-ares/releases/download/cares-1_19_0/c-ares-1.19.0.tar.gz"
sha256: "bfceba37e23fd531293829002cac0401ef49a6dc55923f7f92236585b7ad1dd3"
"1.18.1":
url: "https://github.com/c-ares/c-ares/releases/download/cares-1_18_1/c-ares-1.18.1.tar.gz"
sha256: "1a7d52a8a84a9fbffb1be9133c0f6e17217d91ea5a6fa61f6b4729cda78ebbcf"
Loading

0 comments on commit 06fbd15

Please sign in to comment.