Skip to content

Commit

Permalink
Merge branch 'master' into mrjoel/no-qt-example-licenses
Browse files Browse the repository at this point in the history
  • Loading branch information
AbrilRBS authored Oct 23, 2023
2 parents 81045e3 + 3e07efa commit a63e164
Show file tree
Hide file tree
Showing 119 changed files with 1,386 additions and 174 deletions.
3 changes: 3 additions & 0 deletions .c3i/authorized_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1246,3 +1246,6 @@ authorized_users:
- tamaskenezlego
- luizfeldmann
- ma30002000
- thbeu
- HypoYoung
- technoyes
1 change: 1 addition & 0 deletions .c3i/config_v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ tasks:
job_name: "prod-v2/cci" # e.g. "cci-v2/cci" -> this means waiting for cci-v2/cci/PR-<number>
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
scheduled_export_check:
report_issue_url: https://github.com/conan-io/conan-center-index/issues/20516
report_issue_append: false
Expand Down
2 changes: 1 addition & 1 deletion docs/developing_recipes_locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This file is intended to provide all the commands you need to run in order to be
### Installing the ConanCenter Hooks

> **Warning**: This is not yet supported with Conan 2.0
> **Warning**: This is not yet supported with Conan 2.0. Please, follow the instructions below only in case you are using Conan 1.0.
The system will use the [conan-center hooks](https://github.com/conan-io/hooks) to perform some quality checks. You can install the hooks by running:

Expand Down
38 changes: 24 additions & 14 deletions docs/package_templates/meson_package/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from conan.tools.gnu import PkgConfigDeps
from conan.tools.layout import basic_layout
from conan.tools.meson import Meson, MesonToolchain
from conan.tools.microsoft import check_min_vs, is_msvc
from conan.tools.microsoft import is_msvc
from conan.tools.scm import Version
import os

Expand Down Expand Up @@ -35,10 +35,12 @@ class PackageConan(ConanFile):
options = {
"shared": [True, False],
"fPIC": [True, False],
"feature": [True, False],
}
default_options = {
"shared": False,
"fPIC": True,
"feature": True,
}

@property
Expand All @@ -49,9 +51,11 @@ def _min_cppstd(self):
@property
def _compilers_minimum_version(self):
return {
"gcc": "7",
"clang": "7",
"apple-clang": "10",
"clang": "7",
"gcc": "7",
"msvc": "191",
"Visual Studio": "15",
}

# no exports_sources attribute, but export_sources(self) method instead
Expand All @@ -67,8 +71,8 @@ def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
# for plain C projects only
self.settings.rm_safe("compiler.libcxx")
self.settings.rm_safe("compiler.cppstd")
self.settings.rm_safe("compiler.libcxx")

def layout(self):
# src_folder must use the same source folder name the project
Expand All @@ -82,34 +86,39 @@ def validate(self):
# validate the minimum cpp standard supported. For C++ projects only
if self.settings.compiler.get_safe("cppstd"):
check_min_cppstd(self, self._min_cppstd)
check_min_vs(self, 191)
if not is_msvc(self):
minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
if minimum_version and Version(self.settings.compiler.version) < minimum_version:
raise ConanInvalidConfiguration(
f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support."
)
minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
if minimum_version and Version(self.settings.compiler.version) < minimum_version:
raise ConanInvalidConfiguration(
f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support."
)
# in case it does not work in another configuration, it should validated here too
if is_msvc(self) and self.info.options.shared:
raise ConanInvalidConfiguration(f"{self.ref} can not be built as shared on Visual Studio and msvc.")

# if another tool than the compiler or Meson is required to build the project (pkgconf, bison, flex etc)
def build_requirements(self):
# CCI policy assumes that Meson may not be installed on consumers machine
self.tool_requires("meson/0.63.3")
self.tool_requires("meson/1.2.2")
# pkgconf is largely used by Meson, it should be added in build requirement when there are dependencies
if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str):
self.tool_requires("pkgconf/1.9.3")
self.tool_requires("pkgconf/2.0.3")

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

def generate(self):
# Meson feature options must be set to "enabled" or "disabled"
feature = lambda option: "enabled" if option else "disabled"

# default_library and b_staticpic are automatically parsed when self.options.shared and self.options.fpic exist
# buildtype is automatically parsed for self.settings
tc = MesonToolchain(self)
# In case need to pass definitions directly to the compiler
tc.preprocessor_definitions["MYDEFINE"] = "MYDEF_VALUE"
# Meson features are typically enabled automatically when possible.
# The default behavior can be changed to disable all features by setting "auto_features" to "disabled".
tc.project_options["auto_features"] = "disabled"
tc.project_options["feature"] = feature(self.options.get_safe("feature"))
# Meson project options may vary their types
tc.project_options["tests"] = False
tc.generate()
Expand All @@ -133,11 +142,12 @@ def build(self):
meson.build()

def package(self):
copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses"))
meson = Meson(self)
meson.install()

# some files extensions and folders are not allowed. Please, read the FAQs to get informed.
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
rmdir(self, os.path.join(self.package_folder, "share"))
rm(self, "*.pdb", os.path.join(self.package_folder, "lib"))
rm(self, "*.pdb", os.path.join(self.package_folder, "bin"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def requirements(self):
self.requires(self.tested_reference_str)

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

def build(self):
meson = Meson(self)
Expand Down
5 changes: 5 additions & 0 deletions recipes/7zip/19.00/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
sources:
"23.01":
url:
- https://www.7-zip.org/a/7z2301-src.tar.xz
- https://sourceforge.net/projects/sevenzip/files/7-Zip/23.01/7z2301-src.tar.xz
sha256: "356071007360e5a1824d9904993e8b2480b51b570e8c9faf7c0f58ebe4bf9f74"
"22.01":
url:
- https://www.7-zip.org/a/7z2201-src.tar.xz
Expand Down
6 changes: 6 additions & 0 deletions recipes/7zip/19.00/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ def _patch_sources(self):
os.chmod(fn, 0o644)
replace_in_file(self, fn, "-MT", f"-{self.settings.compiler.runtime}")
replace_in_file(self, fn, "-MD", f"-{self.settings.compiler.runtime}")
if self.version < Version("23.01"):
replace_in_file(self, fn, "-WX", "")

pfc = os.path.join(self.source_folder, "CPP", "7zip", "UI", "FileManager", "PanelFolderChange.cpp")
os.chmod(pfc, 0o644)
replace_in_file(self, pfc, r'L"\\"', r'static_cast<UString>(L"\\")')

def build(self):
self._patch_sources()
Expand Down
2 changes: 2 additions & 0 deletions recipes/7zip/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"23.01":
folder: "19.00"
"22.01":
folder: "19.00"
"19.00":
Expand Down
3 changes: 3 additions & 0 deletions recipes/ade/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"0.1.2d":
url: "https://github.com/opencv/ade/archive/refs/tags/v0.1.2d.tar.gz"
sha256: "edefba61a33d6cd4b78a9976cb3309c95212610a81ba6dade09882d1794198ff"
"0.1.2c":
url: "https://github.com/opencv/ade/archive/refs/tags/v0.1.2c.tar.gz"
sha256: "1387891c707c6e5c76448ea09e2df2e8bce1645c11f262c10b3f3ebec88749c2"
Expand Down
2 changes: 2 additions & 0 deletions recipes/ade/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"0.1.2d":
folder: "all"
"0.1.2c":
folder: "all"
"0.1.2a":
Expand Down
10 changes: 8 additions & 2 deletions recipes/aeron/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AeronConan(ConanFile):
description = "Efficient reliable UDP unicast, UDP multicast, and IPC message transport"
topics = ("udp", "messaging", "low-latency")
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/real-logic/aeron/wiki"
homepage = "https://github.com/real-logic/aeron"
license = "Apache-2.0"

package_type = "library"
Expand Down Expand Up @@ -72,7 +72,7 @@ def validate(self):
raise ConanInvalidConfiguration("This platform (os=Macos arch=armv8) is not yet supported by this recipe")

def build_requirements(self):
self.tool_requires("zulu-openjdk/11.0.15")
self.tool_requires("zulu-openjdk/11.0.19")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand All @@ -90,6 +90,12 @@ def generate(self):
tc.cache_variables["AERON_BUILD_DOCUMENTATION"] = False
tc.cache_variables["AERON_INSTALL_TARGETS"] = True
tc.cache_variables["AERON_ENABLE_NONSTANDARD_OPTIMIZATIONS"] = True
# The finite-math-only optimization has no effect and can cause linking errors
# when linked against glibc >= 2.31
tc.blocks["cmake_flags_init"].template += (
'string(APPEND CMAKE_CXX_FLAGS_INIT " -fno-finite-math-only")\n'
'string(APPEND CMAKE_C_FLAGS_INIT " -fno-finite-math-only")\n'
)
tc.generate()

def _patch_sources(self):
Expand Down
2 changes: 1 addition & 1 deletion recipes/avahi/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def generate(self):
tc.configure_args.append("--disable-python")
tc.configure_args.append("--disable-qt5")
tc.configure_args.append("--with-systemdsystemunitdir=/lib/systemd/system")
tc.configure_args.append("ac_cv_func_strlcpy=no")
if self.settings.os in ["Linux", "FreeBSD"]:
tc.configure_args.append("ac_cv_func_setproctitle=no")
tc.generate()
Expand Down Expand Up @@ -106,7 +107,6 @@ def package_info(self):
self.cpp_info.components[lib].names["cmake_find_package"] = lib
self.cpp_info.components[lib].names["cmake_find_package_multi"] = lib
self.cpp_info.components[lib].libs = [avahi_lib]
self.cpp_info.components[lib].includedirs = [os.path.join("include", avahi_lib)]
self.cpp_info.components["compat-libdns_sd"].libs = ["dns_sd"]

self.cpp_info.components["client"].requires = ["common", "dbus::dbus"]
Expand Down
4 changes: 2 additions & 2 deletions recipes/avahi/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES C)

find_package(Avahi CONFIG REQUIRED)

add_executable(${PROJECT_NAME} test_package.c)
target_link_libraries(${PROJECT_NAME} PRIVATE avahi::compat-libdns_sd)
target_link_libraries(${PROJECT_NAME} PRIVATE avahi::compat-libdns_sd avahi::core)
16 changes: 9 additions & 7 deletions recipes/avahi/all/test_package/test_package.c
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
#include <dns_sd.h>
#include <stdio.h>
#include <stdlib.h>

int main()
{
#include "avahi-compat-libdns_sd/dns_sd.h"
#include "avahi-core/log.h"


int main(void) {
DNSServiceRef sdRef;
DNSServiceErrorType err = DNSServiceBrowse(&sdRef, 0, 0, "_example._tcp", NULL, NULL, NULL);
if (err == kDNSServiceErr_NoError)
{
printf("DNSServiceBrowse succeeded\n");
avahi_log_error("DNSServiceBrowse succeeded\n");
DNSServiceRefDeallocate(sdRef);
}
else
{
printf("DNSServiceBrowse failed: %d\n", err);
avahi_log_info("DNSServiceBrowse failed: %d\n", err);
}
return 0;
return EXIT_SUCCESS;
}
4 changes: 2 additions & 2 deletions recipes/coin-clp/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def layout(self):

def requirements(self):
# Symbols are exposed https://github.com/conan-io/conan-center-index/pull/16053#issuecomment-1512637106
self.requires("coin-utils/2.11.6", transitive_headers=True, transitive_libs=True)
self.requires("coin-utils/2.11.9", transitive_headers=True, transitive_libs=True)
self.requires("coin-osi/0.108.7", transitive_headers=True)

def validate(self):
Expand All @@ -63,7 +63,7 @@ def validate(self):
def build_requirements(self):
self.tool_requires("gnu-config/cci.20210814")
if not self.conf.get("tools.gnu:pkg_config", check_type=str):
self.tool_requires("pkgconf/1.9.3")
self.tool_requires("pkgconf/2.0.3")
if self._settings_build.os == "Windows":
self.win_bash = True
if not self.conf.get("tools.microsoft.bash:path", check_type=str):
Expand Down
4 changes: 2 additions & 2 deletions recipes/coin-osi/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def layout(self):
basic_layout(self, src_folder="src")

def requirements(self):
self.requires("coin-utils/2.11.6")
self.requires("coin-utils/2.11.9")

def validate(self):
if self.settings.os == "Windows" and self.options.shared:
Expand All @@ -61,7 +61,7 @@ def validate(self):
def build_requirements(self):
self.tool_requires("gnu-config/cci.20210814")
if not self.conf.get("tools.gnu:pkg_config", check_type=str):
self.tool_requires("pkgconf/1.9.3")
self.tool_requires("pkgconf/2.0.3")
if self._settings_build.os == "Windows":
self.win_bash = True
if not self.conf.get("tools.microsoft.bash:path", check_type=str):
Expand Down
2 changes: 1 addition & 1 deletion recipes/coin-osi/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def requirements(self):

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

def build(self):
cmake = CMake(self)
Expand Down
7 changes: 7 additions & 0 deletions recipes/cppbenchmark/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.0.4.0":
url: "https://github.com/chronoxor/CppBenchmark/archive/1.0.4.0.tar.gz"
sha256: "44fec3d4264b6654999dfa0f6ceb8a7aeef4eca32db0d229fba70819e11cede0"
"1.0.3.0":
url: "https://github.com/chronoxor/CppBenchmark/archive/1.0.3.0.tar.gz"
sha256: "6a62cfdb2aacf91523f74c6d0e42a3e2388ff94a2b7b983bec543c88554cc3e9"
Expand All @@ -9,6 +12,10 @@ sources:
url: "https://github.com/chronoxor/CppBenchmark/archive/8605a8e886647e964180cb7a622424404a1da01f.tar.gz"
sha256: "f0b88802b4418b13c04ae4dfdb859b2cb81142a47ca473ad447a8be087e0adee"
patches:
"1.0.4.0":
- patch_file: "patches/1.0.3.0-0001-fix-cmake.patch"
patch_description: "fix install path, use cci packages, disable tests"
patch_type: "conan"
"1.0.3.0":
- patch_file: "patches/1.0.3.0-0001-fix-cmake.patch"
patch_description: "fix install path, use cci packages, disable tests"
Expand Down
2 changes: 2 additions & 0 deletions recipes/cppbenchmark/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.0.4.0":
folder: all
"1.0.3.0":
folder: all
"1.0.0.0":
Expand Down
18 changes: 18 additions & 0 deletions recipes/doxygen/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,41 @@ patches:
patch_description: "Enable modern compilers"
patch_type: "portability"
patch_source: "https://github.com/doxygen/doxygen/commit/5198966c8d5fec89116d025c74934ac03ea511fa"
- patch_file: "patches/1.9.4-0002-fix-iconv-linkage.patch"
patch_description: "Replace IConv CMake variables by Conan CMake targets"
patch_type: "conan"
"1.9.2":
- patch_file: "patches/1.9.2-0001-imported-target.patch"
patch_description: "Fix includes"
patch_type: "portability"
- patch_file: "patches/1.9.2-0002-fix-iconv-linkage.patch"
patch_description: "Replace IConv CMake variables by Conan CMake targets"
patch_type: "conan"
"1.9.1":
- patch_file: "patches/1.9.1-0001-imported-target.patch"
patch_description: "Fix includes"
patch_type: "portability"
- patch_file: "patches/1.9.1-0002-fix-iconv-linkage.patch"
patch_description: "Replace IConv CMake variables by Conan CMake targets"
patch_type: "conan"
"1.8.20":
- patch_file: "patches/1.8-0001-xapian.patch"
patch_description: "Fix xapian find_package command"
patch_type: "portability"
- patch_file: "patches/1.8.20-0002-fix-iconv-linkage.patch"
patch_description: "Replace IConv CMake variables by Conan CMake targets"
patch_type: "conan"
"1.8.18":
- patch_file: "patches/1.8-0001-xapian.patch"
patch_description: "Fix xapian find_package command"
patch_type: "portability"
- patch_file: "patches/1.8.18-0002-fix-iconv-linkage.patch"
patch_description: "Replace IConv CMake variables by Conan CMake targets"
patch_type: "conan"
"1.8.17":
- patch_file: "patches/1.8-0001-xapian.patch"
patch_description: "Fix xapian find_package command"
patch_type: "portability"
- patch_file: "patches/1.8.17-0002-fix-iconv-linkage.patch"
patch_description: "Replace IConv CMake variables by Conan CMake targets"
patch_type: "conan"
Loading

0 comments on commit a63e164

Please sign in to comment.