Skip to content

Commit

Permalink
Merge branch 'master' into migrate/flatcc
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur authored Nov 1, 2023
2 parents 8a18af9 + aa3f687 commit 0953a56
Show file tree
Hide file tree
Showing 321 changed files with 5,124 additions and 2,284 deletions.
5 changes: 5 additions & 0 deletions .c3i/authorized_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1252,3 +1252,8 @@ authorized_users:
- Subash-Lamichhane
- rezvee6
- SpiffGreen
- hegyizs
- kkloberdanz
- martin-olivier
- lucaskdc
- fnadeau
13 changes: 13 additions & 0 deletions .c3i/conan_v2_ready_references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ required_for_references:
- aaplus
- abseil
- absent
- acado
- access_private
- acl
- ada
Expand Down Expand Up @@ -259,6 +260,7 @@ required_for_references:
- deco
- di
- dice-template-library
- directx-headers
- dirent
- discount
- djinni-generator
Expand Down Expand Up @@ -305,13 +307,15 @@ required_for_references:
- enhex-generic_serialization
- enhex-strong_type
- enkits
- ensmallen
- entityx
- entt
- enum-flags
- erikzenker-hsm
- erkir
- etc2comp
- eternal
- ethash
- etl
- evmc
- exiv2
Expand Down Expand Up @@ -873,6 +877,7 @@ required_for_references:
- ode
- ogdf
- ogg
- ohnet
- ois
- onedpl
- onetbb
Expand Down Expand Up @@ -912,6 +917,7 @@ required_for_references:
- opentelemetry-cpp
- opentelemetry-proto
- opentracing-cpp
- openvino
- openxlsx
- optional-lite
- opus
Expand All @@ -920,6 +926,7 @@ required_for_references:
- osqp
- out_ptr
- outcome
- ozz-animation
- p-ranav-glob
- paho-mqtt-c
- paho-mqtt-cpp
Expand Down Expand Up @@ -1007,6 +1014,7 @@ required_for_references:
- qpoases
- qr-code-generator
- qt
- qtawesome
- quantlib
- quaternions
- quazip
Expand Down Expand Up @@ -1091,11 +1099,13 @@ required_for_references:
- seqan3
- serd
- serdepp
- serf
- serial
- sfml
- shapelib
- shield
- si
- signals-light
- sigslot
- simde
- simdjson
Expand Down Expand Up @@ -1140,6 +1150,7 @@ required_for_references:
- status-value-lite
- stb
- stc
- stdgpu
- stduuid
- stlab
- strawberryperl
Expand Down Expand Up @@ -1297,6 +1308,7 @@ required_for_references:
- wglext
- whereami
- whisper-cpp
- wide-integer
- wil
- wildmidi
- winflexbison
Expand Down Expand Up @@ -1363,4 +1375,5 @@ required_for_references:
- zug
- zulu-openjdk
- zxing-cpp
- zyre
- zziplib
4 changes: 4 additions & 0 deletions .c3i/config_v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ tasks:
timeout_seconds: 600 # Maximum time to wait for the multibranch job
merge_messages: true # Merge messages from the multibranch job waited for
merge_labels: true # Merge labels from the multibranch job waited for
job_relauncher:
job_names:
- prod-v1/cci
- prod-v2/cci
scheduled_export_check:
report_issue_url: https://github.com/conan-io/conan-center-index/issues/20516
report_issue_append: false
Expand Down
13 changes: 13 additions & 0 deletions docs/adding_packages/conanfile_attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ The license attribute is a mandatory field which provides the legal information
* `LicenseRef-` as a prefix, followed by the name of the library. For example:`LicenseRef-libfoo-public-domain`
* If the library makes no mention of a license and the terms of use - it **shall not be accepted in ConanCenter** , even if the code is publicly available in GitHub or any other platforms.

In case the license changes in a new release, the recipe should update the license attribute accordingly:

```python
class LibfooConan(ConanFile):
license = ("MIT", "BSD-3-Clause") # keep both old and new licenses, so conan inspect can find it

def configure (self):
# change the license according to the version, so conan graph info can show the correct one

# INFO: Version < 2.0 the license was MIT, but changed to BSD-3-Clause now.
self.license = "BSD-3-Clause" if Version(self.version) >= "2.0.0" else "MIT"
```

## Order of methods and attributes

Prefer the following order of documented methods in python code (`conanfile.py`, `test_package/conanfile.py`):
Expand Down
7 changes: 7 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

### 26-Oct-2023 - 12:13 CEST

- [feature] Allow X.Y semver for version bumps
- [feature] Add assert message for parent commit checks on PR checkout
- [feature] JobRelauncher restarts both Conan v1 and v2 pipelines.
- [fix] Do not close the report issue of the recipe export check

### 11-Oct-2023 - 12:17 CEST

- [feature] Update Conan 2.x to the version 2.0.12 in the CI
Expand Down
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.7.2":
url: "https://github.com/ada-url/ada/archive/v2.7.2.tar.gz"
sha256: "4dea9dd6a46695547da2dac3dc7254d32187cd35d3170179c0cdc0900090c025"
"2.7.0":
url: "https://github.com/ada-url/ada/archive/v2.7.0.tar.gz"
sha256: "08646b8a41cd6367b282aab2c87c82e5ce4876078a0cbe0799af7e51e4358591"
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.7.2":
folder: all
"2.7.0":
folder: all
"2.6.10":
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.2":
url: "https://github.com/chriskohlhoff/asio/archive/asio-1-28-2.tar.gz"
sha256: "5705a0e403017eba276625107160498518838064a6dd7fd8b00b2e30c0ffbdee"
"1.28.1":
url: "https://github.com/chriskohlhoff/asio/archive/asio-1-28-1.tar.gz"
sha256: "5ff6111ec8cbe73a168d997c547f562713aa7bd004c5c02326f0e9d579a5f2ce"
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.2":
folder: all
"1.28.1":
folder: all
"1.28.0":
Expand Down
48 changes: 37 additions & 11 deletions recipes/backward-cpp/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir
from conan.tools.layout import basic_layout
from conan.tools.scm import Version
import os

Expand All @@ -20,12 +21,14 @@ class BackwardCppConan(ConanFile):
package_type = "library"
settings = "os", "arch", "compiler", "build_type"
options = {
"header_only": [True, False],
"shared": [True, False],
"fPIC": [True, False],
"stack_walking": ["unwind", "libunwind", "backtrace"],
"stack_details": ["dw", "bfd", "dwarf", "backtrace_symbol"],
}
default_options = {
"header_only": False,
"shared": False,
"fPIC": True,
"stack_walking": "unwind",
Expand All @@ -34,7 +37,7 @@ class BackwardCppConan(ConanFile):

@property
def _supported_os(self):
supported_os = ["Linux", "Macos", "Android"]
supported_os = ["Linux", "FreeBSD", "Android", "Macos"]
if Version(self.version) >= "1.5":
supported_os.append("Windows")
return supported_os
Expand All @@ -57,23 +60,33 @@ def config_options(self):
self.options.stack_details = "backtrace_symbol"

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

def layout(self):
cmake_layout(self, src_folder="src")
if self.options.header_only:
basic_layout(self, src_folder="src")
else:
cmake_layout(self, src_folder="src")

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

def requirements(self):
if self.settings.os in ["Linux", "Android"]:
if self.settings.os in ["Linux", "FreeBSD", "Android"]:
if self._has_stack_walking("libunwind"):
self.requires("libunwind/1.6.2", transitive_headers=True)
if self._has_stack_details("dwarf"):
self.requires("libdwarf/20191104", transitive_headers=True, transitive_libs=True)
self.requires("libelf/0.8.13")
if self._has_stack_details("dw"):
self.requires("elfutils/0.186", transitive_headers=True, transitive_libs=True)
self.requires("elfutils/0.186", transitive_headers=True)
if self._has_stack_details("bfd"):
self.requires("binutils/2.38", transitive_headers=True, transitive_libs=True)
self.requires("binutils/2.38", transitive_headers=True)

def validate(self):
if self.settings.os not in self._supported_os:
Expand All @@ -95,6 +108,8 @@ def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)

def generate(self):
if self.options.header_only:
return
tc = CMakeToolchain(self)
tc.variables["STACK_WALKING_UNWIND"] = self._has_stack_walking("unwind")
tc.variables["STACK_WALKING_LIBUNWIND"] = self._has_stack_walking("libunwind")
Expand All @@ -113,15 +128,22 @@ def generate(self):

def build(self):
apply_conandata_patches(self)
if self.options.header_only:
return
cmake = CMake(self)
cmake.configure()
cmake.build()

def package(self):
copy(self, "LICENSE*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
cmake = CMake(self)
cmake.install()
rmdir(self, os.path.join(self.package_folder, "lib", "backward"))
if self.options.header_only:
copy(self, pattern="*.hpp",
src=self.source_folder,
dst=os.path.join(self.package_folder, "include"))
else:
cmake = CMake(self)
cmake.install()
rmdir(self, os.path.join(self.package_folder, "lib", "backward"))

def package_info(self):
self.cpp_info.set_property("cmake_file_name", "Backward")
Expand All @@ -137,8 +159,12 @@ def package_info(self):
self.cpp_info.defines.append(f"BACKWARD_HAS_DWARF={int(self._has_stack_details('dwarf'))}")
self.cpp_info.defines.append(f"BACKWARD_HAS_PDB_SYMBOL={int(self.settings.os == 'Windows')}")

self.cpp_info.libs = ["backward"]
if self.settings.os == "Linux":
if self.options.header_only:
self.cpp_info.libdirs = []
self.cpp_info.bindirs = []
else:
self.cpp_info.libs = ["backward"]
if self.settings.os in ["Linux", "FreeBSD", "Android"]:
self.cpp_info.system_libs.extend(["dl", "m"])
if self.settings.os == "Windows":
self.cpp_info.system_libs.extend(["psapi", "dbghelp"])
Expand Down
3 changes: 3 additions & 0 deletions recipes/c-ares/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"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"
Expand Down
2 changes: 2 additions & 0 deletions recipes/c-ares/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.21.0":
folder: all
"1.20.1":
folder: all
"1.19.1":
Expand Down
2 changes: 2 additions & 0 deletions recipes/cairo/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.18.0":
folder: meson
"1.17.6":
folder: meson
"1.17.4":
Expand Down
3 changes: 3 additions & 0 deletions recipes/cairo/meson/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.18.0":
sha256: "abf8fba4d510086a492783c3e0828e90b32734738fd80906595617d229d02bab"
url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.18.0/cairo-1.18.0.tar.bz2"
"1.17.6":
sha256: "90496d135c9ef7612c98f8ee358390cdec0825534573778a896ea021155599d2"
url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.17.6/cairo-1.17.6.tar.bz2"
Expand Down
25 changes: 13 additions & 12 deletions recipes/cairo/meson/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def config_options(self):
del self.options.with_xlib_xrender
del self.options.with_xcb
del self.options.with_symbol_lookup
if self.settings.os in ["Macos", "Windows"]:
if self.settings.os in ["Macos", "Windows"] or Version(self.version) >= "1.18.0":
del self.options.with_opengl

def configure(self):
Expand Down Expand Up @@ -135,7 +135,7 @@ def validate(self):
)

def build_requirements(self):
self.tool_requires("meson/1.2.2")
self.tool_requires("meson/1.2.3")
if not self.conf.get("tools.gnu:pkg_config", check_type=str):
self.tool_requires("pkgconf/2.0.3")

Expand Down Expand Up @@ -164,16 +164,17 @@ def is_enabled(value):
else:
options["xcb"] = "disabled"
options["xlib"] = "disabled"
if self.options.get_safe("with_opengl") == "desktop":
options["gl-backend"] = "gl"
elif self.options.get_safe("with_opengl") == "gles2":
options["gl-backend"] = "glesv2"
elif self.options.get_safe("with_opengl") == "gles3":
options["gl-backend"] = "glesv3"
else:
options["gl-backend"] = "disabled"
options["glesv2"] = is_enabled(self.options.get_safe("with_opengl") == "gles2")
options["glesv3"] = is_enabled(self.options.get_safe("with_opengl") == "gles3")
if Version(self.version) < "1.18.0":
if self.options.get_safe("with_opengl") == "desktop":
options["gl-backend"] = "gl"
elif self.options.get_safe("with_opengl") == "gles2":
options["gl-backend"] = "glesv2"
elif self.options.get_safe("with_opengl") == "gles3":
options["gl-backend"] = "glesv3"
else:
options["gl-backend"] = "disabled"
options["glesv2"] = is_enabled(self.options.get_safe("with_opengl") == "gles2")
options["glesv3"] = is_enabled(self.options.get_safe("with_opengl") == "gles3")
options["tee"] = is_enabled(self.options.tee)
options["symbol-lookup"] = is_enabled(self.options.get_safe("with_symbol_lookup"))

Expand Down
Loading

0 comments on commit 0953a56

Please sign in to comment.