Skip to content

Commit

Permalink
Merge branch 'master' into qt5_fix_webengine_build_err_binutils_2_41
Browse files Browse the repository at this point in the history
  • Loading branch information
wdobbe authored Nov 9, 2023
2 parents bc92ad7 + c9ac240 commit a10ec05
Show file tree
Hide file tree
Showing 137 changed files with 2,007 additions and 1,541 deletions.
3 changes: 3 additions & 0 deletions recipes/arrow/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"14.0.0":
url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-14.0.0/apache-arrow-14.0.0.tar.gz?action=download"
sha256: "4eb0da50ec071baf15fc163cb48058931e006f1c862c8def0e180fd07d531021"
"13.0.0":
url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-13.0.0/apache-arrow-13.0.0.tar.gz?action=download"
sha256: "35dfda191262a756be934eef8afee8d09762cad25021daa626eb249e251ac9e6"
Expand Down
2 changes: 2 additions & 0 deletions recipes/arrow/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"14.0.0":
folder: all
"13.0.0":
folder: all
"12.0.1":
Expand Down
2 changes: 1 addition & 1 deletion recipes/asyncly/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def layout(self):

def requirements(self):
self.requires("boost/1.83.0", transitive_headers=True)
self.requires("function2/4.2.3", transitive_headers=True)
self.requires("function2/4.2.4", transitive_headers=True)
self.requires("prometheus-cpp/1.1.0", transitive_headers=True)

def validate(self):
Expand Down
3 changes: 3 additions & 0 deletions recipes/aws-c-common/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ sources:
"0.8.23":
url: "https://github.com/awslabs/aws-c-common/archive/v0.8.23.tar.gz"
sha256: "67455d8149c74b1db3e4dd68db47dc7372de02dd78fbc620f9c7f0270d9d6018"
"0.8.2":
url: "https://github.com/awslabs/aws-c-common/archive/v0.8.2.tar.gz"
sha256: "36edc6e486c43bbb34059dde227e872c0d41ab54f0b3609d38f188cfbbc6d1f8"
"0.7.5":
url: "https://github.com/awslabs/aws-c-common/archive/v0.7.5.tar.gz"
sha256: "e34fd3d3d32e3597f572205aaabbe995e162f4015e14c7328987b596bd25812c"
Expand Down
2 changes: 2 additions & 0 deletions recipes/aws-c-common/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ versions:
folder: all
"0.8.23":
folder: all
"0.8.2":
folder: all
"0.7.5":
folder: all
"0.6.20":
Expand Down
3 changes: 3 additions & 0 deletions recipes/aws-c-io/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"0.13.35":
url: "https://github.com/awslabs/aws-c-io/archive/v0.13.35.tar.gz"
sha256: "a9232dbbb3324de36a280859a4ea84dd2b75e47961805f1cffe0f3a7e1831711"
"0.13.32":
url: "https://github.com/awslabs/aws-c-io/archive/v0.13.32.tar.gz"
sha256: "2a6b18c544d014ca4f55cb96002dbbc1e52a2120541c809fa974cb0838ea72cc"
Expand Down
6 changes: 3 additions & 3 deletions recipes/aws-c-io/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ def requirements(self):
self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True)
self.requires("aws-c-cal/0.5.13")
else:
self.requires("aws-c-common/0.9.0", transitive_headers=True, transitive_libs=True)
self.requires("aws-c-cal/0.6.1", transitive_headers=True)
self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True)
self.requires("aws-c-cal/0.6.9", transitive_headers=True)

if self.settings.os in ["Linux", "FreeBSD", "Android"]:
self.requires("s2n/1.3.50")
self.requires("s2n/1.3.55")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand Down
2 changes: 2 additions & 0 deletions recipes/aws-c-io/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"0.13.35":
folder: all
"0.13.32":
folder: all
"0.13.4":
Expand Down
2 changes: 1 addition & 1 deletion recipes/aws-checksums/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def requirements(self):
if Version(self.version) < "0.1.17":
self.requires("aws-c-common/0.8.2")
else:
self.requires("aws-c-common/0.9.0", transitive_headers=True)
self.requires("aws-c-common/0.9.6", transitive_headers=True)

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand Down
3 changes: 3 additions & 0 deletions recipes/base64/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"0.5.1":
url: "https://github.com/aklomp/base64/archive/v0.5.1.tar.gz"
sha256: "35fd9400ce85ba5fc5455b3f1c8d0078d084ad246bd808315fd01ea8f2876dbf"
"0.5.0":
url: "https://github.com/aklomp/base64/archive/v0.5.0.tar.gz"
sha256: "b21be58a90d31302ba86056db7ef77a481393b9359c505be5337d7d54e8a0559"
Expand Down
2 changes: 2 additions & 0 deletions recipes/base64/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"0.5.1":
folder: all
"0.5.0":
folder: all
"0.4.0":
Expand Down
4 changes: 1 addition & 3 deletions recipes/boost/all/dependencies/dependencies-1.83.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ dependencies:
- date_time
- exception
- system
timer:
- chrono
- system
timer: []
type_erasure:
- thread
unit_test_framework:
Expand Down
117 changes: 55 additions & 62 deletions recipes/boost/all/rebuild-dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@

import argparse
import dataclasses
from pathlib import Path
import json
import logging
import pprint
import re
import subprocess
import tempfile
from pathlib import Path
from typing import Dict, List, Tuple

from conans import tools
import logging
import pprint
import json
import yaml

from conan.tools.files import chdir

log = logging.Logger("boost-dependency-builder")
log.parent = logging.root
Expand Down Expand Up @@ -111,23 +110,24 @@ def __init__(self, boost_version: str, boostdep_version: str, tmppath: Path, git
self.tmppath = tmppath
self.outputdir = outputdir
self.unsafe = unsafe
self._boostdep = None

@property
def boost_path(self) -> Path:
return self.tmppath / "boost"

def do_git_update(self) -> None:
if not self.boost_path.exists():
with tools.chdir(str(self.tmppath)):
with chdir(self, self.tmppath):
print("Cloning boost git")
subprocess.check_call(["git", "clone", "--", self.git_url, "boost"])
with tools.chdir(str(self.boost_path)):
with chdir(self, self.boost_path):
print("Checking out current master")
subprocess.check_call(["git", "checkout", "origin/master"])
print("Removing master branch")
subprocess.check_call(["git", "branch", "-D", "master"])
else:
with tools.chdir(str(self.boost_path)):
with chdir(self, self.boost_path):
print("Updating git repo")
subprocess.check_call(["git", "fetch", "origin"])
print("Removing all local changes to git repo")
Expand All @@ -136,17 +136,17 @@ def do_git_update(self) -> None:
subprocess.check_call(["git", "checkout", "origin/master"])

def do_git_submodule_update(self):
with tools.chdir(str(self.boost_path)):
with chdir(self, self.boost_path):
if not self.unsafe:
# De-init + init to make sure that boostdep won't detect a new or removed boost library
print("De-init git submodules")
subprocess.check_call(["git", "submodule", "deinit", "--all", "-f"])

try:
print("Checking out version {}".format(self.boost_version))
subprocess.check_call(["git", "checkout", "boost-{}".format(self.boost_version)])
print(f"Checking out version {self.boost_version}")
subprocess.check_call(["git", "checkout", f"boost-{self.boost_version}"])
except subprocess.CalledProcessError:
print("version {} does not exist".format(self.boost_version))
print(f"version {self.boost_version} does not exist")
raise

print("Re-init git submodules")
Expand All @@ -156,15 +156,11 @@ def do_git_submodule_update(self):
subprocess.check_call(["git", "clean", "-d", "-f"])

def do_install_boostdep(self):
with tools.chdir(str(self.boost_path)):
print("Installing boostdep/{}".format(self.boostdep_version))
subprocess.check_call(["conan", "install", "boostdep/{}@".format(self.boostdep_version), "-g", "json"])

@property
def _bin_paths(self):
with tools.chdir(str(self.boost_path)):
data = json.loads(open("conanbuildinfo.json").read())
return data["dependencies"][0]["bin_paths"]
with chdir(self, self.boost_path):
print(f"Installing boostdep/{self.boostdep_version}")
cmd = ["conan", "install", "--tool-requires", f"boostdep/{self.boostdep_version}", "--format", "json", "-vquiet"]
info = json.loads(subprocess.check_output(cmd))
self._boostdep = Path(info["graph"]["nodes"]["1"]["package_folder"]) / "bin" / "boostdep"

_GREP_IGNORE_PREFIX = ("#", "\"")
_GREP_IGNORE_PARTS = ("boost", "<", ">")
Expand Down Expand Up @@ -228,32 +224,29 @@ def _sort_requirements(self, requirements: List[str]) -> Tuple[List[str], Dict[s
return list(conan_requirements), system_libs, list(unknown_libs)

def do_boostdep_collect(self) -> BoostDependencies:
with tools.chdir(str(self.boost_path)):
with tools.environment_append({"PATH": self._bin_paths}):
buildables = subprocess.check_output(["boostdep", "--list-buildable"], text=True)
buildables = buildables.splitlines()
log.debug("`boostdep --list--buildable` returned these buildables: %s", buildables)

# modules = subprocess.check_output(["boostdep", "--list-modules"])
# modules = modules.decode().splitlines()

dep_modules = buildables

dependency_tree = {}
buildable_dependencies = subprocess.check_output(["boostdep", "--list-buildable-dependencies"], text=True)
log.debug("boostdep --list-buildable-dependencies returns: %s", buildable_dependencies)
for line in buildable_dependencies.splitlines():
if re.match(r"^[\s]*#.*", line):
continue
match = re.match(r"([\S]+)\s*=\s*([^;]+)\s*;\s*", line)
if not match:
continue
master = match.group(1)
dependencies = re.split(r"\s+", match.group(2).strip())
dependency_tree[master] = dependencies

log.debug("Using `boostdep --track-sources`, the following dependency tree was calculated:")
log.debug(pprint.pformat(dependency_tree))
with chdir(self, self.boost_path):
buildables = subprocess.check_output([self._boostdep, "--list-buildable"], text=True)
buildables = buildables.splitlines()
log.debug("`boostdep --list--buildable` returned these buildables: %s", buildables)

# modules = subprocess.check_output([self._boostdep_path, "--list-modules"])
# modules = modules.decode().splitlines()

dependency_tree = {}
buildable_dependencies = subprocess.check_output([self._boostdep, "--list-buildable-dependencies"], text=True)
log.debug("boostdep --list-buildable-dependencies returns: %s", buildable_dependencies)
for line in buildable_dependencies.splitlines():
if re.match(r"^[\s]*#.*", line):
continue
match = re.match(r"([\S]+)\s*=\s*([^;]+)\s*;\s*", line)
if not match:
continue
master = match.group(1)
dependencies = re.split(r"\s+", match.group(2).strip())
dependency_tree[master] = dependencies

log.debug("Using `boostdep --track-sources`, the following dependency tree was calculated:")
log.debug(pprint.pformat(dependency_tree))

filtered_dependency_tree = {k: [d for d in v if d in buildables] for k, v in dependency_tree.items() if k in buildables}

Expand Down Expand Up @@ -330,45 +323,45 @@ def _fix_dependencies(self, deptree: Dict[str, List[str]]) -> Dict[str, List[str

remaining_tree = self.detect_cycles(deptree)
if remaining_tree:
raise Exception("Dependency cycle detected. Remaining tree: {}".format(remaining_tree))
raise Exception(f"Dependency cycle detected. Remaining tree: {remaining_tree}")
return deptree

@staticmethod
def _boostify_library(lib: str) -> str:
return "boost_{}".format(lib)
return f"boost_{lib}"

def do_create_libraries(self, boost_dependencies: BoostDependencies):
libraries = {}
module_provides_extra = {}

# Look for the names of libraries in Jam build files
for buildable in boost_dependencies.buildables:
construct_jam = lambda jam_ext : self.boost_path / "libs" / buildable / "build" / "Jamfile{}".format(jam_ext)
construct_jam = lambda jam_ext : self.boost_path / "libs" / buildable / "build" / f"Jamfile{jam_ext}"
try:
buildable_jam = next(construct_jam(jam_ext) for jam_ext in ("", ".v2") if construct_jam(jam_ext).is_file())
except StopIteration:
raise Exception("Cannot find jam build file for {}".format(buildable))
raise Exception(f"Cannot find jam build file for {buildable}")
jam_text = buildable_jam.read_text()
buildable_libs = re.findall("[ \n](boost-)?lib ([a-zA-Z0-9_]+)[ \n]", jam_text)
buildable_libs = set("boost_{}".format(lib) if lib_prefix else lib for lib_prefix, lib in buildable_libs)
buildable_libs = set(f"boost_{lib}" if lib_prefix else lib for lib_prefix, lib in buildable_libs)
buildable_libs = set(l[len("boost_"):] for l in buildable_libs if l.startswith("boost_")) # list(filter(lambda l: l.startswith("boost"), buildable_libs))

if not buildable_libs:
# Some boost releases support multiple python versions
if buildable == "python":
buildable_libs.add("python")
if not buildable_libs:
raise Exception("Cannot find any library for buildable {}".format(buildable))
raise Exception(f"Cannot find any library for buildable {buildable}")

if buildable in buildable_libs:
libraries[buildable] = ["boost_{}".format(buildable)]
libraries[buildable] = [f"boost_{buildable}"]
buildable_libs.remove(buildable)
else:
libraries[buildable] = []
module_provides_extra[buildable] = buildable_libs
for buildable_dep in buildable_libs:
boost_dependencies.export.dependencies[buildable_dep] = [buildable]
libraries[buildable_dep] = ["boost_{}".format(buildable_dep)]
libraries[buildable_dep] = [f"boost_{buildable_dep}"]

# Boost.Test: unit_test_framework depends on all libraries of Boost.Test
if "unit_test_framework" in boost_dependencies.export.dependencies and "test" in module_provides_extra:
Expand All @@ -394,7 +387,7 @@ def do_create_libraries(self, boost_dependencies: BoostDependencies):

@property
def _outputpath(self) -> Path:
return self.outputdir / "dependencies-{}.yml".format(self.boost_version)
return self.outputdir / f"dependencies-{self.boost_version}.yml"

@classmethod
def _sort_item(cls, item):
Expand Down Expand Up @@ -423,7 +416,7 @@ def do_create_dependency_file(self) -> None:

data = self._sort_item(data)

print("Creating {}".format(self.outputdir))
print(f"Creating {self.outputdir}")
with self._outputpath.open("w") as fout:
yaml.dump(data, fout)

Expand All @@ -432,7 +425,7 @@ def main(args=None) -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--verbose", dest="verbose", action="store_true", help="verbose output")
parser.add_argument("-t", dest="tmppath", help="temporary folder where to clone boost (default is system temporary folder)")
parser.add_argument("-d", dest="boostdep_version", default="1.75.0", type=str, help="boostdep version")
parser.add_argument("-d", dest="boostdep_version", default="1.82.0", type=str, help="boostdep version")
parser.add_argument("-u", dest="git_url", default=BOOST_GIT_URL, help="boost git url")
parser.add_argument("-U", dest="git_update", action="store_true", help="update the git repo")
parser.add_argument("-o", dest="outputdir", default=None, type=Path, help="output dependency dir")
Expand All @@ -449,10 +442,10 @@ def main(args=None) -> int:

if not ns.tmppath:
ns.tmppath = Path(tempfile.gettempdir())
print("Temporary folder is {}".format(ns.tmppath))
print(f"Temporary folder is {ns.tmppath}")
if not ns.outputdir:
ns.outputdir = Path("dependencies")
print("Dependencies folder is {}".format(ns.outputdir))
print(f"Dependencies folder is {ns.outputdir}")

ns.outputdir.mkdir(exist_ok=True)

Expand All @@ -465,7 +458,7 @@ def main(args=None) -> int:
boost_versions = [ns.boost_version]

for boost_version in boost_versions:
print("Starting {}".format(boost_version))
print(f"Starting {boost_version}")
boost_collector = BoostDependencyBuilder(
boost_version=boost_version,
boostdep_version=ns.boostdep_version,
Expand Down
2 changes: 1 addition & 1 deletion recipes/cimg/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def requirements(self):
if self.options.enable_jpeg:
self.requires("libjpeg/9e")
if self.options.enable_openexr:
self.requires("openexr/3.1.9")
self.requires("openexr/3.2.1")
if self.options.enable_png:
self.requires("libpng/1.6.40")
if self.options.enable_tiff:
Expand Down
2 changes: 1 addition & 1 deletion recipes/continuable/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def layout(self):
basic_layout(self, src_folder="src")

def requirements(self):
self.requires("function2/4.2.3")
self.requires("function2/4.2.4")

def package_id(self):
self.info.clear()
Expand Down
Loading

0 comments on commit a10ec05

Please sign in to comment.