Skip to content

Commit

Permalink
Merge branch 'master' into vsg-versions
Browse files Browse the repository at this point in the history
  • Loading branch information
psyinf authored Aug 5, 2023
2 parents 51e7d4a + 8d74df2 commit 964bdb1
Show file tree
Hide file tree
Showing 74 changed files with 643 additions and 263 deletions.
6 changes: 6 additions & 0 deletions .c3i/authorized_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1203,3 +1203,9 @@ authorized_users:
- jeremy-rifkin
- Christian-Prather
- Siarh199
- liquiddaniel
- seppeon
- SavenkovIgor
- aliaksei135
- ibosnic00
- Xav83
8 changes: 8 additions & 0 deletions .c3i/conan_v2_ready_references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,18 @@ required_for_references:
- function2
- fxdiv
- g3log
- gainput
- gamma
- gcem
- gdbm
- gdcm
- gdk-pixbuf
- gegles-spdlog_setup
- gemmlowp
- genie
- geographiclib
- geos
- geotrans
- getopt-for-visual-studio
- gettext
- gflags
Expand All @@ -326,6 +331,9 @@ required_for_references:
- gklib
- glad
- glaze
- glbinding
- glew
- glext
- glfw
- gli
- glib
Expand Down
2 changes: 1 addition & 1 deletion .c3i/config_v1.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: 1.60.1
version: 1.60.2

artifactory:
url: "https://c3i.jfrog.io/c3i"
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.0.8
version: 2.0.9

artifactory:
url: "https://c3i.jfrog.io/c3i"
Expand Down
3 changes: 3 additions & 0 deletions recipes/asio-grpc/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"2.5.1":
url: "https://github.com/Tradias/asio-grpc/archive/refs/tags/v2.5.1.tar.gz"
sha256: "571779a25be6eed77a345088e3ded2cccf880c16800ee0075ece57116f14fc35"
"2.4.0":
url: "https://github.com/Tradias/asio-grpc/archive/refs/tags/v2.4.0.tar.gz"
sha256: "d71de4f8de91dc0ad44d6a161fc628496b80622a6f9030dcd4c53b516629b8b7"
Expand Down
5 changes: 3 additions & 2 deletions recipes/asio-grpc/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def _compilers_minimum_version(self):
return {
"gcc": "7",
"Visual Studio": "15.7",
"msvc": "191",
"clang": "6",
"apple-clang": "11",
}
Expand All @@ -57,9 +58,9 @@ def configure(self):
def requirements(self):
self.requires("grpc/1.50.1")
if self._local_allocator_option == "boost_container" or self.options.backend == "boost":
self.requires("boost/1.81.0")
self.requires("boost/1.82.0")
if self.options.backend == "asio":
self.requires("asio/1.24.0")
self.requires("asio/1.28.0")
if self.options.backend == "unifex":
self.requires("libunifex/cci.20220430")

Expand Down
2 changes: 2 additions & 0 deletions recipes/asio-grpc/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"2.5.1":
folder: all
"2.4.0":
folder: all
"2.3.0":
Expand Down
3 changes: 3 additions & 0 deletions recipes/asio/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.28.1":
url: "https://github.com/chriskohlhoff/asio/archive/asio-1-28-1.tar.gz"
sha256: "5ff6111ec8cbe73a168d997c547f562713aa7bd004c5c02326f0e9d579a5f2ce"
"1.28.0":
url: "https://github.com/chriskohlhoff/asio/archive/asio-1-28-0.tar.gz"
sha256: "226438b0798099ad2a202563a83571ce06dd13b570d8fded4840dbc1f97fa328"
Expand Down
2 changes: 2 additions & 0 deletions recipes/asio/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.28.1":
folder: all
"1.28.0":
folder: all
"1.27.0":
Expand Down
7 changes: 7 additions & 0 deletions recipes/aws-c-common/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"0.9.0":
url: "https://github.com/awslabs/aws-c-common/archive/v0.9.0.tar.gz"
sha256: "9b62ab1dcece3107810ea4f4511fe8e1e010a83cb0cb502b6ec685ce752a7b0c"
"0.8.2":
url: "https://github.com/awslabs/aws-c-common/archive/v0.8.2.tar.gz"
sha256: "36edc6e486c43bbb34059dde227e872c0d41ab54f0b3609d38f188cfbbc6d1f8"
Expand Down Expand Up @@ -53,4 +56,8 @@ sources:
patches:
"0.4.25":
- patch_file: "patches/0001-disable-fPIC.patch"
patch_description: "Don't enable position independent code (will be handled by conan)"
patch_type: "conan"
- patch_file: "patches/0002-no-warnings-as-errors.patch"
patch_description: "Don't make all warnings into errors"
patch_type: "portability"
8 changes: 0 additions & 8 deletions recipes/aws-c-common/all/test_v1_package/CMakeLists.txt

This file was deleted.

2 changes: 2 additions & 0 deletions recipes/aws-c-common/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"0.9.0":
folder: all
"0.8.2":
folder: all
"0.7.5":
Expand Down
4 changes: 1 addition & 3 deletions recipes/bx/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.layout import cmake_layout
from conan.tools.cmake import CMake
from conan.tools.cmake import CMake, cmake_layout
import os

required_conan_version = ">=1.50.0"

class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
Expand Down
2 changes: 1 addition & 1 deletion recipes/cairo/meson/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def requirements(self):
if self.options.with_png:
self.requires("libpng/1.6.40")
if self.options.with_glib:
self.requires("glib/2.76.3")
self.requires("glib/2.77.0")
if self.settings.os == "Linux":
if self.options.with_xlib or self.options.with_xlib_xrender or self.options.with_xcb:
self.requires("xorg/system")
Expand Down
3 changes: 3 additions & 0 deletions recipes/cpp-httplib/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"0.13.3":
url: "https://github.com/yhirose/cpp-httplib/archive/v0.13.3.tar.gz"
sha256: "2a4503f9f2015f6878baef54cd94b01849cc3ed19dfe95f2c9775655bea8b73f"
"0.13.1":
url: "https://github.com/yhirose/cpp-httplib/archive/v0.13.1.tar.gz"
sha256: "9b837d290b61e3f0c4239da0b23bbf14c382922e2bf2a9bac21c1e3feabe1ff9"
Expand Down
2 changes: 2 additions & 0 deletions recipes/cpp-httplib/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"0.13.3":
folder: all
"0.13.1":
folder: all
"0.12.6":
Expand Down
81 changes: 44 additions & 37 deletions recipes/cprocessing/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,45 @@
from conans import ConanFile, tools
from conans.tools import ConanInvalidConfiguration
import os
import re

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, load, replace_in_file, save
from conan.tools.layout import basic_layout
from conan.tools.scm import Version

required_conan_version = ">=1.52.0"


class CProcessingConan(ConanFile):
name = "cprocessing"
description = "Processsing programming for C++ "
description = "Processing programming for C++ "
license = "MIT"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/maksmakuta/CProcessing"
topics = ("processing", "opengl", "sketch")
topics = ("processing", "opengl", "sketch", "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 20

@property
def _compilers_minimum_version(self):
return {
"gcc": "9",
"Visual Studio": "16.2",
"msvc": "19.22",
"clang": "10",
"apple-clang": "11"
"gcc": "9",
"Visual Studio": "16.2",
"msvc": "19.22",
"clang": "10",
"apple-clang": "11",
}

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

def requirements(self):
self.requires("glfw/3.3.7")
self.requires("glm/0.9.9.8")
Expand All @@ -36,44 +48,39 @@ def requirements(self):
self.requires("opengl/system")

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

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

def lazy_lt_semver(v1, v2):
lv1 = [int(v) for v in v1.split(".")]
lv2 = [int(v) for v in v2.split(".")]
min_length = min(len(lv1), len(lv2))
return lv1[:min_length] < lv2[:min_length]

compiler_version = str(self.settings.compiler.version)

check_min_cppstd(self, self._min_cppstd)
minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
if not minimum_version:
self.output.warn("{} requires C++20. Your compiler is unknown. Assuming it supports C++20.".format(self.name))
elif lazy_lt_semver(compiler_version, minimum_version):
raise ConanInvalidConfiguration("{} requires some C++20 features,".format(self.name))
if minimum_version and Version(self.settings.compiler.version) < minimum_version:
raise ConanInvalidConfiguration(
f"{self.ref} requires some C++{self._min_cppstd} features, 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 build(self):
tools.replace_in_file(os.path.join(self._source_subfolder, "lib", "PImage.h"),
"stb/stb_image.h",
"stb_image.h")

def package(self):
self.copy("*.h", "include", os.path.join(self._source_subfolder, "lib"))
replace_in_file(self, os.path.join(self.source_folder, "lib", "PImage.h"), "stb/stb_image.h", "stb_image.h")

def _extract_license(self):
# Extract the License/s from README.md to a file
tmp = tools.load(os.path.join(self._source_subfolder, "README.md"))
tmp = load(self, os.path.join(self.source_folder, "README.md"))
license_contents = re.search("(## Author.*)", tmp, re.DOTALL)[1]
tools.save(os.path.join(self.package_folder, "licenses", "LICENSE.md"), license_contents)
save(self, os.path.join(self.package_folder, "licenses", "LICENSE.md"), license_contents)

def package(self):
self._extract_license()
copy(self, "*.h",
dst=os.path.join(self.package_folder, "include"),
src=os.path.join(self.source_folder, "lib"))

def package_info(self):
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []

self.cpp_info.set_property("cmake_file_name", "CProcessing")
self.cpp_info.set_property("cmake_target_name", "CProcessing::CProcessing")

Expand Down
5 changes: 1 addition & 4 deletions recipes/cprocessing/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.15)
project(test_package CXX)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)

find_package(CProcessing REQUIRED CONFIG)

add_executable(${PROJECT_NAME} test_package.cpp)
Expand Down
20 changes: 14 additions & 6 deletions recipes/cprocessing/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,18 +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", "arch", "compiler", "build_type"
generators = "cmake", "cmake_find_package_multi"
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):
test_file = os.path.join("bin", "test_package")
if self.settings.os == "Windows":
test_file += ".exe"
assert os.path.exists(test_file)
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindir, "test_package")
self.run(bin_path, env="conanrun")
Loading

0 comments on commit 964bdb1

Please sign in to comment.