diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 3414a9d5c8b7b..39c27c970be1f 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -966,7 +966,7 @@ authorized_users: - kletoz - agilemapper - ZXfkSIE -- RubenRBS +- AbrilRBS - Alex-PLACET - antekone - ambroff @@ -1377,3 +1377,48 @@ authorized_users: - glywk - aniederl - SvenRoederer +- MridulS +- leemaguire +- RobinQu +- MatthewRasa +- jan-kelemen +- xiadnoring +- FeignClaims +- husitawi +- fpoirotte +- cuppajoeman +- vsbogd +- Nevermore1994 +- maciejjablonsky +- luc-c +- willprice +- pasbi +- liuzicheng1987 +- guyutongxue +- ciclark +- John-LittleBearLabs +- jasal82 +- philipp-m-w +- nine +- OMGtechy +- sabapathi20 +- seekstar +- dcoburnMEDITECH +- mattangus +- arnaudmathias +- hankhsu1996 +- stephematician +- awest03 +- sun-mir +- fhamonic +- simbahebinbo +- alessiosacco +- Blackflame576 +- Bakul-Gaur +- itsmejoeeey +- JustCallMeRay +- shun2wang +- czheng-bt +- jorgen +- simshi +- alatarum diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 5f2e14749e554..c7beaad8761f2 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -43,6 +43,7 @@ required_for_references: - args-parser - argtable2 - argtable3 +- argz - armadillo - arrow - arsenalgear @@ -58,6 +59,7 @@ required_for_references: - asyncly - asyncplusplus - asyncpp +- atomic_queue - audiofile - autoconf - autoconf-archive @@ -81,6 +83,8 @@ required_for_references: - aws-lambda-cpp - aws-libfabric - aws-sdk-cpp +- azure-sdk-for-cpp +- azure-storage-cpp - b2 - b64 - backport-cpp @@ -90,6 +94,7 @@ required_for_references: - bandit - base64 - basu +- battery-embed - bazel - bdwgc - bear @@ -177,6 +182,7 @@ required_for_references: - chipmunk2d - choc - chunkio +- cigi-ccl - cimg - circularbuffer - cista @@ -207,6 +213,7 @@ required_for_references: - coin-osi - coin-utils - commata +- compute_library - concurrencpp - concurrentqueue - console_bridge @@ -276,6 +283,7 @@ required_for_references: - cuda-samples - cunit - cute_headers +- cutlass - cvplot - cwalk - cxxgraph @@ -390,6 +398,7 @@ required_for_references: - ezc3d - faac - fakeit +- faker-cxx - farmhash - fast-cdr - fast-cpp-csv-parser @@ -408,6 +417,7 @@ required_for_references: - fftw - fire-hpp - fixed-containers +- fixed_math - flac - flann - flatbuffers @@ -423,6 +433,7 @@ required_for_references: - fmi3 - fmt - fmtlog +- folly - fontconfig - foonathan-lexy - foonathan-memory @@ -450,6 +461,7 @@ required_for_references: - fusepp - fxdiv - g3log +- gaia-ecs - gainput - gamenetworkingsockets - gamma @@ -465,6 +477,7 @@ required_for_references: - geographiclib - geos - geotrans +- getdns - getopt-for-visual-studio - gettext - gf-complete @@ -495,6 +508,7 @@ required_for_references: - gnu-config - gnulib - gnutls +- gobject-introspection - godot-cpp - godot_headers - googleapis @@ -513,6 +527,7 @@ required_for_references: - gtest - gtk - gtk-doc-stub +- gtlab-logging - gtsam - guetzli - gumbo-parser @@ -581,6 +596,7 @@ required_for_references: - inversify-cpp - iowow - ipaddress +- iphreeqc - iqa - irrxml - isa-l @@ -649,6 +665,7 @@ required_for_references: - lest - leveldb - lexbor +- libaec - libaesgm - libaio - libalsa @@ -658,6 +675,7 @@ required_for_references: - libatomic_ops - libattr - libavif +- libavrocpp - libb2 - libbacktrace - libbasisu @@ -703,6 +721,7 @@ required_for_references: - libevdev - libevent - libexif +- libfabric - libfdk_aac - libffi - libfork @@ -736,8 +755,10 @@ required_for_references: - libipt - libjpeg - libjpeg-turbo +- libjxl - libkml - libliftoff +- liblqr - liblsl - libltc - liblzf @@ -748,6 +769,7 @@ required_for_references: - libmd - libmediainfo - libmemcached +- libmeshb - libmetalink - libmicrohttpd - libmikmod @@ -777,7 +799,9 @@ required_for_references: - libpcap - libpciaccess - libpfm4 +- libphonenumber - libpng +- libpointmatcher - libpq - libpqxx - libproperties @@ -806,6 +830,7 @@ required_for_references: - libslz - libsmacker - libsndfile +- libsndio - libsodium - libsolace - libspatialindex @@ -873,6 +898,7 @@ required_for_references: - lksctp-tools - llama-cpp - llhttp +- llnl-units - llvm-openmp - lmdb - lodepng @@ -945,6 +971,7 @@ required_for_references: - mimalloc - mingw-builds - mingw-w64 +- minhook - mini - miniaudio - minicoro @@ -956,6 +983,7 @@ required_for_references: - miniz - minizip - minizip-ng +- minmea - mio - mlpack - mm_file @@ -1003,6 +1031,7 @@ required_for_references: - nasm - ncurses - neargye-semver +- net-snmp - netcdf - nettle - newmat @@ -1087,9 +1116,11 @@ required_for_references: - openjpeg - openldap - openmesh +- openmpi - openmvg - openpam - openscenegraph +- openslide - openssh - openssl - opensubdiv @@ -1114,6 +1145,7 @@ required_for_references: - ozz-animation - p-ranav-glob - p7zip +- pagmo2 - paho-mqtt-c - paho-mqtt-cpp - pango @@ -1180,6 +1212,7 @@ required_for_references: - poppler-data - popt - portable-file-dialogs +- poselib - poshlib - pprint - pranav-csv2 @@ -1221,11 +1254,13 @@ required_for_references: - quaternions - quazip - quickcpplib +- quickfast - quickfix - quickjs - quill - quirc - qwt +- qxmpp - r8brain-free-src - rabbitmq-c - ragel @@ -1248,6 +1283,7 @@ required_for_references: - readerwriterqueue - readline - readosm +- rebound - recastnavigation - reckless - rectanglebinpack @@ -1291,6 +1327,7 @@ required_for_references: - sassc - sbepp - sbp +- scc - scdoc - scip - scippp @@ -1302,6 +1339,7 @@ required_for_references: - sdf - sdl - sdl_image +- sdl_mixer - sdl_net - sdl_ttf - seadex-essentials @@ -1332,6 +1370,7 @@ required_for_references: - simfil - simple-websocket-server - simple-yaml +- simple_enum - sioclient - sjson-cpp - skyr-url @@ -1397,6 +1436,7 @@ required_for_references: - svector - svgpp - svgwrite +- swig - symengine - systemc - systemc-cci @@ -1568,6 +1608,7 @@ required_for_references: - wil - wildcards - wildmidi +- wineditline - winflexbison - winmd - winreg @@ -1577,6 +1618,7 @@ required_for_references: - wslay - wt - wtl +- wxwidgets - wyhash - xapian-core - xbyak @@ -1613,6 +1655,7 @@ required_for_references: - yandex-ozo - yas - yasm +- ydcpp-tcpcat - yder - yoga - yomm2 diff --git a/.c3i/config_v1.yml b/.c3i/config_v1.yml index 117f1105d056f..3b536765fa330 100644 --- a/.c3i/config_v1.yml +++ b/.c3i/config_v1.yml @@ -3,7 +3,7 @@ id: 'conan-io/conan-center-index' conan: - version: 1.64.1 + version: 1.65.0 artifactory: url: "https://c3i.jfrog.io/c3i" diff --git a/.c3i/config_v2.yml b/.c3i/config_v2.yml index 8fc08cb36e853..fd1ae8b31ead6 100644 --- a/.c3i/config_v2.yml +++ b/.c3i/config_v2.yml @@ -3,7 +3,7 @@ id: 'conan-io/conan-center-index' conan: - version: 2.3.1 + version: 2.7.1 backup_sources: upload_url: "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/" download_url: "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/" @@ -60,6 +60,8 @@ tasks: list_packages: update_yaml_list_path: ".c3i/conan_v2_ready_references" update_yaml_list_key: "required_for_references" + promote_packages: + additional_repo_target: "conan-center-v2-only" scheduled_export_check: report_issue_url: https://github.com/conan-io/conan-center-index/issues/15557 report_issue_append: false diff --git a/.c3i/reviewers.yml b/.c3i/reviewers.yml index bdf9a4146d268..e877828a1a9a3 100644 --- a/.c3i/reviewers.yml +++ b/.c3i/reviewers.yml @@ -9,21 +9,45 @@ reviewers: - user: "lasote" type: "team" request_reviews: false - - user: "jgsogo" - type: "community" - request_reviews: false - user: "czoido" type: "team" request_reviews: false - user: "memsharded" type: "team" request_reviews: false - - user: "SSE4" - type: "community" - request_reviews: false - user: "uilianries" type: "team" request_reviews: true + - user: "jcar87" + type: "team" + request_reviews: true + - user: "franramirez688" + type: "team" + request_reviews: true + - user: "AbrilRBS" + type: "team" + request_reviews: true + - user: "davidsanfal" + type: "team" + request_reviews: false + - user: "juansblanco" + type: "team" + request_reviews: false + - user: "perseoGI" + type: "team" + request_reviews: false + - user: "ErniGH" + type: "team" + request_reviews: false + ######## + ### Begin community reviewers + ######## + - user: "jgsogo" + type: "community" + request_reviews: false + - user: "SSE4" + type: "community" + request_reviews: false - user: "madebr" type: "community" request_reviews: false @@ -54,21 +78,12 @@ reviewers: - user: "MartinDelille" type: "community" request_reviews: false - - user: "jcar87" - type: "team" - request_reviews: true - - user: "franramirez688" - type: "team" - request_reviews: true - user: "paulocoutinhox" type: "community" request_reviews: false - user: "jwillikers" type: "community" request_reviews: false - - user: "RubenRBS" - type: "team" - request_reviews: true - user: "System-Arch" type: "community" request_reviews: false @@ -78,19 +93,6 @@ reviewers: - user: "StellaSmith" type: "community" request_reviews: false - - user: "davidsanfal" - type: "team" - request_reviews: false - - user: "juansblanco" - type: "team" - request_reviews: false - user: "valgur" type: "community" request_reviews: false - - user: "perseoGI" - type: "team" - request_reviews: false - - user: "ErniGH" - type: "team" - request_reviews: false - diff --git a/.c3i/waitlist_users.yml b/.c3i/waitlist_users.yml index 0a820a622ea67..4be8317a18a4b 100644 --- a/.c3i/waitlist_users.yml +++ b/.c3i/waitlist_users.yml @@ -4,3 +4,9 @@ waitlist_users: - refactorTractor - jjbel - synaptics-lspintzyk +- wer14 +- connor-i-clark +- NeXuS4Developer +- sabapathim +- pixelsoba +- liss-h diff --git a/.github/workflows/linter-yaml.yml b/.github/workflows/linter-yaml.yml index d7d4050e8071d..4e0fb288a25ec 100644 --- a/.github/workflows/linter-yaml.yml +++ b/.github/workflows/linter-yaml.yml @@ -91,7 +91,7 @@ jobs: done echo "::remove-matcher owner=yamllint_matcher::" - for file in ${{ steps.changed_files_conandata.outputs.all_changed_files }}; do + for file in ${{ steps.changed_files_config.outputs.all_changed_files }}; do python3 linter/config_yaml_linter.py ${file} done diff --git a/docs/adding_packages/conandata_yml_format.md b/docs/adding_packages/conandata_yml_format.md index ed96865802cc0..065e1f2da34d4 100644 --- a/docs/adding_packages/conandata_yml_format.md +++ b/docs/adding_packages/conandata_yml_format.md @@ -126,8 +126,9 @@ Usually, `url` has a [https](https://tools.ietf.org/html/rfc2660) scheme, but ot #### sha256 [sha256](https://tools.ietf.org/html/rfc6234) is a preferred method to specify hash sum for the released sources. It allows to check the integrity of sources downloaded. -You may use an [online service](https://hash.online-convert.com/sha256-generator) to compute `sha256` sum for the given `url`. -Also, you may use [sha256sum](https://linux.die.net/man/1/sha256sum) command ([windows](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-filehash?view=powershell-7.4) you can use PowerShell). +You may use an [online service](https://hash.online-convert.com/sha256-generator) to compute `sha256` sum for the given file located at `url`. + +If you're using linux you can run `wget -q -O - url | sha256sum` to get the hash which uses the [sha256sum](https://linux.die.net/man/1/sha256sum) command ([windows](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-filehash?view=powershell-7.4) you can use PowerShell). ## patches diff --git a/docs/adding_packages/dependencies.md b/docs/adding_packages/dependencies.md index f10a35809ada3..3a93fcb8bad12 100644 --- a/docs/adding_packages/dependencies.md +++ b/docs/adding_packages/dependencies.md @@ -178,7 +178,11 @@ for consumer, we do impose some limits on Conan features to provide a smoother f Version ranges are a useful Conan feature, [documentation here](https://docs.conan.io/2/tutorial/versioning/version_ranges.html). With the introduction of Conan 2.0, we are currently working to allow the use of version ranges and are allowing this for a handful of dependencies. -Currently, these are (except if the recipe needs a newer lower/upper version bound for specific reasons): + +Version ranges are being progressively introduced by Conan team maintainers and are being rolled out in phases, and we do not intend +to do it all at once. + +Version ranges for the following dependencies will be accepted in pull requests: * OpenSSL: `[>=1.1 <4]` for libraries known to be compatible with OpenSSL 1.x and 3.x * CMake: `[>3.XX <4]`, where `3.XX` is the minimum version of CMake required by the relevant build scripts. Note that CCI recipes assume 3.15 is installed in the system, so add this @@ -192,6 +196,11 @@ version range only when a requirement for a newer version is needed. * qt5: `[~5.15]`, if your library depends on qt5, only the 5.15 minor version is allowed * qt6: `[>=6.x <7]`, where 6.x is the lower bound of your needed qt6 version * c-ares: `[>=1.27 <2]` +* zstd: `[~1.5]` it's equivalent to `[>=1.5 <1.6]` +* ninja: `[>=1.10.2 <2]` +* meson: `[>=1.2.3 <2]` +* pkgconf: `[>=2.2 <3]` +* xz_utils: `[>=5.4.5 <6]` > **Warning**: With Conan 1.x, [version ranges](https://docs.conan.io/1/versioning/version_ranges.html) adhere to a much more strict sematic version spec, > OpenSSL 1.1.x does not follow this so the client will not resolve to that range and will pick a 3.x version. In order to select a lower version you @@ -202,11 +211,14 @@ Conan maintainers may introduce this for other dependencies over time. Outside o #### Adding Version Ranges -You might also see version ranges in some PR by CCI maintainers. +You might also see version ranges being added in pull requests by Conan maintainers, that +are not in the list above. These are being introduced on a case-by-case basis, and are being rolled out +in phases to ensure that they do not cause problems to users. Note that version ranges can +only be used for libraries and tools that have strong compatibility guarantees - and may not +be suitable in all cases. -These are being done on a case-by-case basis, and are being rolled out in phases to ensure -that they do not cause problems to users. Please do not open PRs that exclusively add version ranges to dependencies, -unless they are solving current conflicts, in which case we welcome them and they will be prioritized. +Please do not open PRs that exclusively add version ranges to dependencies, unless they are solving +current conflicts, in which case we welcome them and they will be prioritized. ## Handling "internal" dependencies diff --git a/docs/changelog.md b/docs/changelog.md index b122737101341..ecdf3c49ada2f 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,15 @@ # Changelog +### 12-Sep-2024 - 09:23 CEST + +- [feature] Add support for Conan 2.7.1 in the CI +- [feature] Add support for Conan 1.65.0 in the CI + +### 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 diff --git a/docs/package_templates/autotools_package/all/conanfile.py b/docs/package_templates/autotools_package/all/conanfile.py index 2bd1c8b1bd5e9..c08a33c668f62 100644 --- a/docs/package_templates/autotools_package/all/conanfile.py +++ b/docs/package_templates/autotools_package/all/conanfile.py @@ -105,7 +105,7 @@ def build_requirements(self): self.tool_requires("libtool/x.y.z") # only if upstream configure.ac relies on PKG_CHECK_MODULES macro if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/x.y.z") + self.tool_requires("pkgconf/[>=1.2.3 <2]") # required to suppport windows as a build machine if self._settings_build.os == "Windows": self.win_bash = True diff --git a/docs/package_templates/meson_package/all/conanfile.py b/docs/package_templates/meson_package/all/conanfile.py index 617e18d12f4ad..172c9c688ab22 100644 --- a/docs/package_templates/meson_package/all/conanfile.py +++ b/docs/package_templates/meson_package/all/conanfile.py @@ -98,10 +98,10 @@ def validate(self): # 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/1.2.3") + self.tool_requires("meson/[>=1.2.3 <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/2.0.3") + self.tool_requires("pkgconf/[>=2.2 <3]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/docs/package_templates/meson_package/all/test_package/conanfile.py b/docs/package_templates/meson_package/all/test_package/conanfile.py index 8adddf3b7b73c..3064d349d2d58 100644 --- a/docs/package_templates/meson_package/all/test_package/conanfile.py +++ b/docs/package_templates/meson_package/all/test_package/conanfile.py @@ -18,9 +18,9 @@ def requirements(self): self.requires(self.tested_reference_str) def build_requirements(self): - self.tool_requires("meson/1.2.3") + self.tool_requires("meson/[>=1.2.3 <2]") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/[>=2.2 <3]") def build(self): meson = Meson(self) diff --git a/linter/conandata_yaml_linter.py b/linter/conandata_yaml_linter.py index a946b4b5f2ecd..ac9cc25487e7a 100644 --- a/linter/conandata_yaml_linter.py +++ b/linter/conandata_yaml_linter.py @@ -31,7 +31,7 @@ def main(): patch_fields = MapCombined( { "patch_file": Str(), - "patch_description": Str(), + Optional("patch_description"): Str(), Optional("patch_type"): Enum( ["official", "conan", "portability", "bugfix", "vulnerability"] ), diff --git a/recipes/7bitdi/all/conandata.yml b/recipes/7bitdi/all/conandata.yml index 46ec1df1a2623..ad96c33d43330 100644 --- a/recipes/7bitdi/all/conandata.yml +++ b/recipes/7bitdi/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.4.0": + url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v3.4.0.tar.gz" + sha256: "8381102f5966a5d83cf590b8fa45904d055d74ec90822628240786ab100fb929" "3.3.0": url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v3.3.0.tar.gz" sha256: "b9ddb2fc263c79cb414544e97d44dcc8cd1e1a91b38129d96b7051728a4583b9" diff --git a/recipes/7bitdi/all/conanfile.py b/recipes/7bitdi/all/conanfile.py index 9a614d07b3d74..6709e44476413 100644 --- a/recipes/7bitdi/all/conanfile.py +++ b/recipes/7bitdi/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd -from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import get, copy, rmdir from conan.tools.scm import Version import os diff --git a/recipes/7bitdi/config.yml b/recipes/7bitdi/config.yml index 37a63b9d3b41b..3fbfbf1ec3bc5 100644 --- a/recipes/7bitdi/config.yml +++ b/recipes/7bitdi/config.yml @@ -1,4 +1,6 @@ versions: + "3.4.0": + folder: all "3.3.0": folder: all "3.2.0": diff --git a/recipes/abseil/all/conandata.yml b/recipes/abseil/all/conandata.yml index 7958f236ae252..fa078f9fc7138 100644 --- a/recipes/abseil/all/conandata.yml +++ b/recipes/abseil/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20240722.0": + url: "https://github.com/abseil/abseil-cpp/archive/20240722.0.tar.gz" + sha256: "f50e5ac311a81382da7fa75b97310e4b9006474f9560ac46f54a9967f07d4ae3" "20240116.2": url: "https://github.com/abseil/abseil-cpp/archive/20240116.2.tar.gz" sha256: "733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc" @@ -18,6 +21,11 @@ sources: url: "https://github.com/abseil/abseil-cpp/archive/20211102.0.tar.gz" sha256: "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4" patches: + "20240722.0": + - patch_file: "patches/0003-absl-string-libm-20240116.patch" + patch_description: "link libm to absl string" + patch_type: "portability" + patch_source: "https://github.com/abseil/abseil-cpp/issues/1100" "20240116.2": - patch_file: "patches/0003-absl-string-libm-20240116.patch" patch_description: "link libm to absl string" @@ -27,6 +35,10 @@ patches: patch_description: "Fix GCC 7 including in C++17 mode when it is not available (until GCC 8)" patch_type: "portability" patch_source: "https://github.com/abseil/abseil-cpp/commit/bb83aceacb554e79e7cd2404856f0be30bd00303" + - patch_file: "patches/0004-test-allocator-testonly.patch" + patch_description: "Do not build test_allocator target when tests are disabled" + patch_type: "portability" + patch_source: "https://github.com/abseil/abseil-cpp/commit/779a3565ac6c5b69dd1ab9183e500a27633117d5" "20240116.1": - patch_file: "patches/0003-absl-string-libm-20240116.patch" patch_description: "link libm to absl string" @@ -36,6 +48,10 @@ patches: patch_description: "Fix GCC 7 including in C++17 mode when it is not available (until GCC 8)" patch_type: "portability" patch_source: "https://github.com/abseil/abseil-cpp/commit/bb83aceacb554e79e7cd2404856f0be30bd00303" + - patch_file: "patches/0004-test-allocator-testonly.patch" + patch_description: "Do not build test_allocator target when tests are disabled" + patch_type: "portability" + patch_source: "https://github.com/abseil/abseil-cpp/commit/779a3565ac6c5b69dd1ab9183e500a27633117d5" "20230802.1": - patch_file: "patches/0003-absl-string-libm-20230802.patch" patch_description: "link libm to absl string" diff --git a/recipes/abseil/all/conanfile.py b/recipes/abseil/all/conanfile.py index 6c10812e38452..55ae607eb9d58 100644 --- a/recipes/abseil/all/conanfile.py +++ b/recipes/abseil/all/conanfile.py @@ -74,6 +74,11 @@ def validate(self): # upstream tries its best to export symbols, but it's broken for the moment raise ConanInvalidConfiguration(f"{self.ref} shared not availabe for Visual Studio, please use version 20230802.1 or newer") + def build_requirements(self): + # https://github.com/abseil/abseil-cpp/blob/20240722.0/CMakeLists.txt#L19 + if Version(self.version) >= "20240722.0": + self.tool_requires("cmake/[>=3.16 <4]") + def layout(self): cmake_layout(self, src_folder="src") diff --git a/recipes/abseil/all/patches/0004-test-allocator-testonly.patch b/recipes/abseil/all/patches/0004-test-allocator-testonly.patch new file mode 100644 index 0000000000000..909c1f791c488 --- /dev/null +++ b/recipes/abseil/all/patches/0004-test-allocator-testonly.patch @@ -0,0 +1,10 @@ +--- a/absl/container/CMakeLists.txt ++++ b/absl/container/CMakeLists.txt +@@ -213,6 +213,7 @@ absl_cc_library( + DEPS + absl::config + GTest::gmock ++ TESTONLY + ) + + absl_cc_test( diff --git a/recipes/abseil/config.yml b/recipes/abseil/config.yml index 0af2b7beb4451..d29c717557868 100644 --- a/recipes/abseil/config.yml +++ b/recipes/abseil/config.yml @@ -1,4 +1,6 @@ versions: + "20240722.0": + folder: all "20240116.2": folder: all "20240116.1": diff --git a/recipes/ada/all/conandata.yml b/recipes/ada/all/conandata.yml index ce7f88f9c21c4..d02f03916e176 100644 --- a/recipes/ada/all/conandata.yml +++ b/recipes/ada/all/conandata.yml @@ -1,49 +1,22 @@ sources: + "2.9.2": + url: "https://github.com/ada-url/ada/archive/v2.9.2.tar.gz" + sha256: "f41575ad7eec833afd9f6a0d6101ee7dc2f947fdf19ae8f1b54a71d59f4ba5ec" + "2.9.1": + url: "https://github.com/ada-url/ada/archive/v2.9.1.tar.gz" + sha256: "64eb3d91db941645d1b68ac8d1cbb7b534fbe446b66c1da11e384e17fca975e7" + "2.9.0": + url: "https://github.com/ada-url/ada/archive/v2.9.0.tar.gz" + sha256: "8b992f0ce9134cb4eafb74b164d2ce2cb3af1900902162713b0e0c5ab0b6acd8" "2.8.0": url: "https://github.com/ada-url/ada/archive/v2.8.0.tar.gz" sha256: "83b77fb53d1a9eea22b1484472cea0215c50478c9ea2b4b44b0ba3b52e07c139" "2.7.8": url: "https://github.com/ada-url/ada/archive/v2.7.8.tar.gz" sha256: "8de067b7cb3da1808bf5439279aee6048d761ba246bf8a854c2af73b16b41c75" - "2.7.7": - url: "https://github.com/ada-url/ada/archive/v2.7.7.tar.gz" - sha256: "7116d86a80b79886efbc9d946d3919801815060ae62daf78de68c508552af554" - "2.7.5": - url: "https://github.com/ada-url/ada/archive/v2.7.5.tar.gz" - sha256: "25a5d62fdd4950dbef785db5725675c15f3df2cf899a4a920449fe9a05fc6d00" - "2.7.4": - url: "https://github.com/ada-url/ada/archive/v2.7.4.tar.gz" - sha256: "897942ba8c99153f916c25698a49604022f3e54441cfa9b76f657ad15b6ca041" - "2.7.3": - url: "https://github.com/ada-url/ada/archive/v2.7.3.tar.gz" - sha256: "8e222d536d237269488f7d454544eedf12847f47b3d42651e8c9963c3fb0cf5e" - "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" "2.6.10": url: "https://github.com/ada-url/ada/archive/v2.6.10.tar.gz" sha256: "a43e1ea0bcdd7585edf538afffe1fc3303b936752e18bac545fa11729de088bc" - "2.6.7": - url: "https://github.com/ada-url/ada/archive/v2.6.7.tar.gz" - sha256: "882a0aa6e19174b60b2fa00ee75d35a31ecd5158fb97d0e4e719ba21bb07acb9" - "2.6.4": - url: "https://github.com/ada-url/ada/archive/v2.6.4.tar.gz" - sha256: "5b488e9a7a700de5d40a749c96c4339bcc9c425e5f5406a0887b13e70bd90907" - "2.6.2": - url: "https://github.com/ada-url/ada/archive/v2.6.2.tar.gz" - sha256: "425b8696a28a22d19ee7aa4516c26fc8ae3ab574870a9a74ef58ba8a345b822e" - "2.6.0": - url: "https://github.com/ada-url/ada/archive/v2.6.0.tar.gz" - sha256: "09551bfbd92853e59d731e5f44a88a690425fd2906977ad03a6a1059615a02a5" "2.5.1": url: "https://github.com/ada-url/ada/archive/v2.5.1.tar.gz" sha256: "a7591d771822c3f16e6665311b0c6b4de7dd7615333183f35d89c7573be7f7fa" - "2.5.0": - url: "https://github.com/ada-url/ada/archive/v2.5.0.tar.gz" - sha256: "bf11c9d0cc1ee9e377080bdd8a3b8a8bf736ac7acaedcae882587e21b3e5625c" - "2.4.2": - url: "https://github.com/ada-url/ada/archive/v2.4.2.tar.gz" - sha256: "d865ab8828c14fc1e2217ca9f5d7918d50775175b2873faf2fbda0085e0623d2" diff --git a/recipes/ada/config.yml b/recipes/ada/config.yml index 65b7e7769826f..29ab8232ac483 100644 --- a/recipes/ada/config.yml +++ b/recipes/ada/config.yml @@ -1,33 +1,15 @@ versions: - "2.8.0": - folder: all - "2.7.8": - folder: all - "2.7.7": + "2.9.2": folder: all - "2.7.5": + "2.9.1": folder: all - "2.7.4": + "2.9.0": folder: all - "2.7.3": - folder: all - "2.7.2": + "2.8.0": folder: all - "2.7.0": + "2.7.8": folder: all "2.6.10": folder: all - "2.6.7": - folder: all - "2.6.4": - folder: all - "2.6.2": - folder: all - "2.6.0": - folder: all "2.5.1": folder: all - "2.5.0": - folder: all - "2.4.2": - folder: all diff --git a/recipes/amgcl/all/conandata.yml b/recipes/amgcl/all/conandata.yml index cbd774ff5f231..2059663ce0b33 100644 --- a/recipes/amgcl/all/conandata.yml +++ b/recipes/amgcl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.4": + url: "https://github.com/ddemidov/amgcl/archive/1.4.4.tar.gz" + sha256: "02fd5418e14d669422f65fc739ce72bf9516ced2d8942574d4b8caa05dda9d8c" "1.4.3": url: "https://github.com/ddemidov/amgcl/archive/1.4.3.tar.gz" sha256: "e920d5767814ce697d707d1f359a16c9b9eb79eba28fe19e14c18c2a505fe0ad" diff --git a/recipes/amgcl/all/conanfile.py b/recipes/amgcl/all/conanfile.py index d2ddd6171e66f..e04106ab75c2b 100644 --- a/recipes/amgcl/all/conanfile.py +++ b/recipes/amgcl/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get from conan.tools.layout import basic_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.51.1" @@ -20,12 +21,19 @@ class AmgclConan(ConanFile): package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True + options = { 'with_boost': [True, False] } + default_options = { 'with_boost': True } + + def config_options(self): + if Version(self.version) < "1.4.4": + del self.options.with_boost def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.81.0") + if self.options.get_safe("with_boost"): + self.requires("boost/1.85.0") def package_id(self): self.info.clear() @@ -37,9 +45,6 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*", src=os.path.join(self.source_folder, "amgcl"), diff --git a/recipes/amgcl/config.yml b/recipes/amgcl/config.yml index 1d12970eb4fba..02bed7da76340 100644 --- a/recipes/amgcl/config.yml +++ b/recipes/amgcl/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.4": + folder: all "1.4.3": folder: all "1.4.2": diff --git a/recipes/android-ndk/all/conandata.yml b/recipes/android-ndk/all/conandata.yml index 450b3b65da338..28d9619ab0124 100644 --- a/recipes/android-ndk/all/conandata.yml +++ b/recipes/android-ndk/all/conandata.yml @@ -1,4 +1,17 @@ sources: + "r27": + "Windows": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r27-windows.zip" + sha256: "342ceafd7581ae26a0bd650a5e0bbcd0aa2ee15eadfd7508b3dedeb1372d7596" + "Linux": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r27-linux.zip" + sha256: "2f17eb8bcbfdc40201c0b36e9a70826fcd2524ab7a2a235e2c71186c302da1dc" + "Macos": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r27-darwin.zip" + sha256: "2f2ef00b22fe22c1c9c78fda1b38ea7ffa6528e25eac0b70a92f8cb0093143be" "r26d": "Windows": "x86_64": diff --git a/recipes/android-ndk/config.yml b/recipes/android-ndk/config.yml index ae138de6957a2..5a16edd20d5af 100644 --- a/recipes/android-ndk/config.yml +++ b/recipes/android-ndk/config.yml @@ -1,4 +1,6 @@ versions: + "r27": + folder: all "r26d": folder: all "r26c": diff --git a/recipes/angelscript/all/conandata.yml b/recipes/angelscript/all/conandata.yml index edfe7e005b855..a5590460838fe 100644 --- a/recipes/angelscript/all/conandata.yml +++ b/recipes/angelscript/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.37.0": + url: "https://www.angelcode.com/angelscript/sdk/files/angelscript_2.37.0.zip" + sha256: "0c52d1688016a0b2484e9ca549471c4e295df060770c57840144c64815f54f10" "2.36.1": url: "https://www.angelcode.com/angelscript/sdk/files/angelscript_2.36.1.zip" sha256: "58bb749af9c7e386304705f4e6e627ae41dfe03e0b6a73c3d0d2e017c4fc948f" diff --git a/recipes/angelscript/all/conanfile.py b/recipes/angelscript/all/conanfile.py index 88cdd729c8bf1..0a17df3020929 100644 --- a/recipes/angelscript/all/conanfile.py +++ b/recipes/angelscript/all/conanfile.py @@ -10,13 +10,13 @@ class AngelScriptConan(ConanFile): name = "angelscript" - license = "Zlib" - homepage = "http://www.angelcode.com/angelscript" - url = "https://github.com/conan-io/conan-center-index" description = ( "An extremely flexible cross-platform scripting library designed to " "allow applications to extend their functionality through external scripts." ) + license = "Zlib" + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://www.angelcode.com/angelscript" topics = ("angelcode", "embedded", "scripting", "language", "compiler", "interpreter") package_type = "library" @@ -90,7 +90,7 @@ def package_info(self): # TODO: back to global scope in conan v2 once cmake_find_package* generators removed self.cpp_info.components["_angelscript"].libs = [f"angelscript{postfix}"] if self.settings.os in ("Linux", "FreeBSD", "SunOS"): - self.cpp_info.components["_angelscript"].system_libs.append("pthread") + self.cpp_info.components["_angelscript"].system_libs.extend(["m", "pthread"]) # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "Angelscript" diff --git a/recipes/angelscript/config.yml b/recipes/angelscript/config.yml index f3cbb4fedf454..621b347e7a383 100644 --- a/recipes/angelscript/config.yml +++ b/recipes/angelscript/config.yml @@ -1,4 +1,6 @@ versions: + "2.37.0": + folder: all "2.36.1": folder: all "2.36.0": diff --git a/recipes/apriltag/all/conandata.yml b/recipes/apriltag/all/conandata.yml index 612b22768b3e7..cdf1bd2eb180f 100644 --- a/recipes/apriltag/all/conandata.yml +++ b/recipes/apriltag/all/conandata.yml @@ -1,20 +1,13 @@ sources: + "3.4.2": + url: "https://github.com/AprilRobotics/apriltag/archive/refs/tags/v3.4.2.tar.gz" + sha256: "7e021bab89f136aa3cf736f772a635aaa353f93f6f8859495f4bd8c519be4805" "3.1.4": url: "https://github.com/AprilRobotics/apriltag/archive/refs/tags/v3.1.4.tar.gz" sha256: "ad2888d432e9ddcad2f639f243479934a4cd677ed5d2f8dee3b3418617b64f5d" - "3.1.2": - url: "https://github.com/AprilRobotics/apriltag/archive/3.1.2.tar.gz" - sha256: "2759b044ff1dc9ef725e7c456b49283399ef78deee24754bc3617cbe369584f1" - "3.1.1": - url: "https://github.com/AprilRobotics/apriltag/archive/3.1.1.tar.gz" - sha256: "7349e1fcc8b2979230b46c0d62ccf2ba2bbd611d87ef80cfd37ffe74425f5efb" patches: "3.1.4": - - patch_file: "patches/3.1.4-0001-fix-cmake.patch" - - patch_file: "patches/3.1.1-0002-windows-nominmax.patch" - "3.1.2": - - patch_file: "patches/3.1.2-0001-fix-cmake.patch" - - patch_file: "patches/3.1.1-0002-windows-nominmax.patch" - "3.1.1": - - patch_file: "patches/3.1.1-0001-fix-cmake.patch" - - patch_file: "patches/3.1.1-0002-windows-nominmax.patch" + - patch_file: "patches/3.1.4-0001-disable-examples.patch" + patch_type: "conan" + patch_description: "Disable building of examples" + - patch_file: "patches/3.1.4-0002-fix-cmake.patch" diff --git a/recipes/apriltag/all/conanfile.py b/recipes/apriltag/all/conanfile.py index c5ee7a9043fc1..8c9220521508c 100644 --- a/recipes/apriltag/all/conanfile.py +++ b/recipes/apriltag/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile -from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.microsoft import is_msvc from conan.tools.scm import Version @@ -11,10 +11,10 @@ class ApriltagConan(ConanFile): name = "apriltag" - description = ("AprilTag is a visual fiducial system, useful for a wide variety of tasks \ - including augmented reality, robotics, and camera calibration") + description = ("AprilTag is a visual fiducial system, useful for a wide variety of tasks" + " including augmented reality, robotics, and camera calibration") homepage = "https://april.eecs.umich.edu/software/apriltag" - topics = ("robotics",) + topics = ("robotics", "computer-vision", "augmented-reality", "camera-calibration") license = "BSD-2-Clause" url = "https://github.com/conan-io/conan-center-index" package_type = "library" @@ -45,24 +45,28 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if is_msvc(self): + if is_msvc(self) and Version(self.version) < "3.3.0": self.requires("pthreads4w/3.0.0", transitive_headers=True) - def validate(self): - if is_msvc(self) and self.settings.build_type == "Debug": - # segfault in test package... - raise ConanInvalidConfiguration(f"{self.ref} doesn't support Debug with msvc yet") + def build_requirements(self): + if Version(self.version) >= "3.4.0": + self.tool_requires("cmake/[>=3.16 <4]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): + VirtualBuildEnv(self).generate() tc = CMakeToolchain(self) - if Version(self.version) >= "3.1.4": - tc.variables["BUILD_PYTHON_WRAPPER"] = False - tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.cache_variables["BUILD_EXAMPLES"] = False + tc.variables["BUILD_PYTHON_WRAPPER"] = False + if Version(self.version) < "3.4.0": + # Newer versions set it in the project CMakelists.txt + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + if self.settings.os == "Windows": + tc.preprocessor_definitions["NOMINMAX"] = "" tc.generate() - if is_msvc(self): + if is_msvc(self) and Version(self.version) < "3.3.0": deps = CMakeDeps(self) deps.generate() @@ -73,7 +77,7 @@ def build(self): cmake.build() def package(self): - copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSE.md", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "share")) @@ -83,9 +87,13 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "apriltag") self.cpp_info.set_property("cmake_target_name", "apriltag::apriltag") self.cpp_info.set_property("pkg_config_name", "apriltag") - self.cpp_info.libs = ["apriltag"] + suffix = "" + if self.settings.build_type == "Debug" and Version(self.version) >= "3.2.0": + suffix = "d" + self.cpp_info.libs = ["apriltag" + suffix] self.cpp_info.includedirs.append(os.path.join("include", "apriltag")) if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["m", "pthread"] elif self.settings.os == "Windows": self.cpp_info.system_libs = ["winmm"] + self.cpp_info.defines.append("NOMINMAX") diff --git a/recipes/apriltag/all/patches/3.1.1-0001-fix-cmake.patch b/recipes/apriltag/all/patches/3.1.1-0001-fix-cmake.patch deleted file mode 100644 index 74b09907feed6..0000000000000 --- a/recipes/apriltag/all/patches/3.1.1-0001-fix-cmake.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,24 +1,29 @@ --cmake_minimum_required(VERSION 3.1) --project(apriltag) -+cmake_minimum_required(VERSION 3.8) -+project(apriltag LANGUAGES C) - --find_package(OpenCV QUIET) - - include_directories(.) - aux_source_directory(common COMMON_SRC) - aux_source_directory(. APRILTAG_SRCS) - --set(CMAKE_BUILD_TYPE Release) - - # Library --add_library(${PROJECT_NAME} SHARED ${APRILTAG_SRCS} ${COMMON_SRC}) -+add_library(${PROJECT_NAME} ${APRILTAG_SRCS} ${COMMON_SRC}) -+target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) - if (MSVC) - # FindThreads will not find pthread.h with MSVC - # winmm is necessary for __imp_timeGetTime -- find_library(PTHREAD_LIBRARIES NAMES pthreads) -- target_link_libraries(${PROJECT_NAME} ${PTHREAD_LIBRARIES} winmm) -+ find_package(pthreads4w REQUIRED CONFIG) -+ target_link_libraries(${PROJECT_NAME} pthreads4w::pthreads4w winmm) -+ target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS) - else() - find_package(Threads REQUIRED) -- target_link_libraries(${PROJECT_NAME} Threads::Threads m) -+ target_link_libraries(${PROJECT_NAME} Threads::Threads) -+ include(CheckFunctionExists) -+ check_function_exists(pow HAVE_MATH_SYSTEM) -+ if(NOT HAVE_MATH_SYSTEM) -+ target_link_libraries(${PROJECT_NAME} m) -+ endif() - endif() - - set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 3 VERSION 3.1.0) -@@ -39,6 +43,7 @@ set_source_files_properties(SOURCE ${TAG_FILES} PROPERTIES COMPILE_FLAGS -O0) - - # install library - install(TARGETS ${PROJECT_NAME} EXPORT apriltag -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) -@@ -63,16 +68,13 @@ install(FILES "${PROJECT_BINARY_DIR}/apriltag.pc" DESTINATION "lib/pkgconfig/") - - # Examples - # apriltag_demo --add_executable(apriltag_demo example/apriltag_demo.c) --target_link_libraries(apriltag_demo apriltag) - - # opencv_demo --if(OpenCV_FOUND) -+if(0) - add_executable(opencv_demo example/opencv_demo.cc) - target_link_libraries(opencv_demo apriltag ${OpenCV_LIBRARIES}) - install(TARGETS opencv_demo RUNTIME DESTINATION bin) --endif(OpenCV_FOUND) -+endif() - - # install example programs --install(TARGETS apriltag_demo RUNTIME DESTINATION bin) - diff --git a/recipes/apriltag/all/patches/3.1.1-0002-windows-nominmax.patch b/recipes/apriltag/all/patches/3.1.1-0002-windows-nominmax.patch deleted file mode 100644 index 6ca9d00b5704e..0000000000000 --- a/recipes/apriltag/all/patches/3.1.1-0002-windows-nominmax.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/common/time_util.h -+++ b/common/time_util.h -@@ -30,6 +30,7 @@ either expressed or implied, of the Regents of The University of Michigan. - #include - #include - #ifdef _WIN32 -+#define NOMINMAX - #include - typedef long long suseconds_t; - #endif ---- a/common/workerpool.c -+++ b/common/workerpool.c -@@ -33,6 +33,7 @@ either expressed or implied, of the Regents of The University of Michigan. - #include - #include - #ifdef _WIN32 -+#define NOMINMAX - #include - #else - #include diff --git a/recipes/apriltag/all/patches/3.1.2-0001-fix-cmake.patch b/recipes/apriltag/all/patches/3.1.2-0001-fix-cmake.patch deleted file mode 100644 index 58464b0668d96..0000000000000 --- a/recipes/apriltag/all/patches/3.1.2-0001-fix-cmake.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,26 +1,31 @@ --cmake_minimum_required(VERSION 3.1) --project(apriltag) -+cmake_minimum_required(VERSION 3.8) -+project(apriltag LANGUAGES C) - --find_package(OpenCV QUIET) - - include_directories(.) - aux_source_directory(common COMMON_SRC) - set(APRILTAG_SRCS apriltag.c apriltag_pose.c apriltag_quad_thresh.c) - --set(CMAKE_BUILD_TYPE Release) - - # Library - file(GLOB TAG_FILES ${CMAKE_SOURCE_DIR}/tag*.c) - set_source_files_properties(SOURCE ${TAG_FILES} PROPERTIES COMPILE_FLAGS -O0) --add_library(${PROJECT_NAME} SHARED ${APRILTAG_SRCS} ${COMMON_SRC} ${TAG_FILES}) -+add_library(${PROJECT_NAME} ${APRILTAG_SRCS} ${COMMON_SRC} ${TAG_FILES}) -+target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) - if (MSVC) - # FindThreads will not find pthread.h with MSVC - # winmm is necessary for __imp_timeGetTime -- find_library(PTHREAD_LIBRARIES NAMES pthreads) -- target_link_libraries(${PROJECT_NAME} ${PTHREAD_LIBRARIES} winmm) -+ find_package(pthreads4w REQUIRED CONFIG) -+ target_link_libraries(${PROJECT_NAME} pthreads4w::pthreads4w winmm) -+ target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS) - else() - find_package(Threads REQUIRED) -- target_link_libraries(${PROJECT_NAME} Threads::Threads m) -+ target_link_libraries(${PROJECT_NAME} Threads::Threads) -+ include(CheckFunctionExists) -+ check_function_exists(pow HAVE_MATH_SYSTEM) -+ if(NOT HAVE_MATH_SYSTEM) -+ target_link_libraries(${PROJECT_NAME} m) -+ endif() - endif() - - set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 3 VERSION 3.1.0) -@@ -39,6 +43,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES - - # install library - install(TARGETS ${PROJECT_NAME} EXPORT apriltag -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) -@@ -63,6 +68,7 @@ install(FILES "${PROJECT_BINARY_DIR}/apriltag.pc" DESTINATION "lib/pkgconfig/") - - - # Python wrapper -+if(0) - SET(Python_ADDITIONAL_VERSIONS 3) - find_package(PythonLibs) - execute_process(COMMAND which python3 OUTPUT_QUIET RESULT_VARIABLE Python3_NOT_FOUND) -@@ -95,21 +101,19 @@ execute_process(COMMAND python3 -m site --user-site OUTPUT_VARIABLE PY_DEST) - string(STRIP ${PY_DEST} PY_DEST) - install(CODE "execute_process(COMMAND cp ${PROJECT_BINARY_DIR}/apriltag${PY_EXT_SUFFIX} ${PY_DEST})") - endif (NOT Python3_NOT_FOUND AND NOT Numpy_NOT_FOUND AND PYTHONLIBS_FOUND) -+endif() - - - # Examples - # apriltag_demo --add_executable(apriltag_demo example/apriltag_demo.c) --target_link_libraries(apriltag_demo apriltag) - - # opencv_demo --if(OpenCV_FOUND) -+if(0) - add_executable(opencv_demo example/opencv_demo.cc) - target_link_libraries(opencv_demo apriltag ${OpenCV_LIBRARIES}) - set_target_properties(opencv_demo PROPERTIES CXX_STANDARD 11) - install(TARGETS opencv_demo RUNTIME DESTINATION bin) --endif(OpenCV_FOUND) -+endif() - - # install example programs --install(TARGETS apriltag_demo RUNTIME DESTINATION bin) - diff --git a/recipes/apriltag/all/patches/3.1.4-0001-disable-examples.patch b/recipes/apriltag/all/patches/3.1.4-0001-disable-examples.patch new file mode 100644 index 0000000000000..a3696589cece2 --- /dev/null +++ b/recipes/apriltag/all/patches/3.1.4-0001-disable-examples.patch @@ -0,0 +1,15 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -101,6 +101,7 @@ + + + # Examples ++if(BUILD_EXAMPLES) + # apriltag_demo + add_executable(apriltag_demo example/apriltag_demo.c) + target_link_libraries(apriltag_demo apriltag) +@@ -115,3 +116,4 @@ + + # install example programs + install(TARGETS apriltag_demo RUNTIME DESTINATION bin) ++endif() diff --git a/recipes/apriltag/all/patches/3.1.4-0001-fix-cmake.patch b/recipes/apriltag/all/patches/3.1.4-0002-fix-cmake.patch similarity index 69% rename from recipes/apriltag/all/patches/3.1.4-0001-fix-cmake.patch rename to recipes/apriltag/all/patches/3.1.4-0002-fix-cmake.patch index ba813f1dc3969..7baec487b4ea0 100644 --- a/recipes/apriltag/all/patches/3.1.4-0001-fix-cmake.patch +++ b/recipes/apriltag/all/patches/3.1.4-0002-fix-cmake.patch @@ -3,7 +3,7 @@ @@ -1,26 +1,31 @@ -cmake_minimum_required(VERSION 3.1) -project(apriltag) -+cmake_minimum_required(VERSION 3.8) ++cmake_minimum_required(VERSION 3.15) +project(apriltag LANGUAGES C) -find_package(OpenCV QUIET) @@ -40,30 +40,11 @@ endif() set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 3 VERSION 3.1.0) -@@ -33,6 +37,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC - - # install library +@@ -35,6 +30,7 @@ install(TARGETS ${PROJECT_NAME} EXPORT apriltagTargets -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) -@@ -102,16 +107,13 @@ endif (NOT Python3_NOT_FOUND AND NOT Numpy_NOT_FOUND AND PYTHONLIBS_FOUND AND BU - - # Examples - # apriltag_demo --add_executable(apriltag_demo example/apriltag_demo.c) --target_link_libraries(apriltag_demo apriltag) - - # opencv_demo --if(OpenCV_FOUND) -+if(0) - add_executable(opencv_demo example/opencv_demo.cc) - target_link_libraries(opencv_demo apriltag ${OpenCV_LIBRARIES}) - set_target_properties(opencv_demo PROPERTIES CXX_STANDARD 11) - install(TARGETS opencv_demo RUNTIME DESTINATION bin) --endif(OpenCV_FOUND) -+endif() - # install example programs --install(TARGETS apriltag_demo RUNTIME DESTINATION bin) + # install header file hierarchy diff --git a/recipes/apriltag/all/test_package/test_package.c b/recipes/apriltag/all/test_package/test_package.c index 098b0a3741e4d..78f28e3f94542 100644 --- a/recipes/apriltag/all/test_package/test_package.c +++ b/recipes/apriltag/all/test_package/test_package.c @@ -10,8 +10,8 @@ int main(int argc, char *argv[]) apriltag_family_t *tf = tagStandard41h12_create(); apriltag_detector_add_family(td, tf); - tagStandard41h12_destroy(tf); apriltag_detector_destroy(td); + tagStandard41h12_destroy(tf); printf("Apriltag test_package ran successfully\n"); diff --git a/recipes/apriltag/config.yml b/recipes/apriltag/config.yml index 6aa1925bfcd8e..0471f5090e86a 100644 --- a/recipes/apriltag/config.yml +++ b/recipes/apriltag/config.yml @@ -1,7 +1,5 @@ versions: - "3.1.4": - folder: all - "3.1.2": + "3.4.2": folder: all - "3.1.1": + "3.1.4": folder: all diff --git a/recipes/aravis/all/conandata.yml b/recipes/aravis/all/conandata.yml index 768365163e373..07eea0a5354b4 100644 --- a/recipes/aravis/all/conandata.yml +++ b/recipes/aravis/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.8.33": + url: "https://github.com/AravisProject/aravis/releases/download/0.8.33/aravis-0.8.33.tar.xz" + sha256: "3c4409a12ea70bba4de25e5b08c777112de854bc801896594f2cb6f8c2bd6fbc" "0.8.30": url: "https://github.com/AravisProject/aravis/releases/download/0.8.30/aravis-0.8.30.tar.xz" sha256: "40380f06fa04524a7875bd456e5a5ea78b2c058fa84b5598bc6e0642fcef00b0" @@ -8,9 +11,6 @@ sources: "0.8.25": # latest version that supports GenDC data format (supported by U3V 1.1) url: "https://github.com/AravisProject/aravis/releases/download/0.8.25/aravis-0.8.25.tar.xz" sha256: "3ba18f941ae4e2c898fed1f63c4ce67ea41a800a902ee5684eef4ffdb87f1c09" - "0.8.20": - url: "https://github.com/AravisProject/aravis/releases/download/0.8.20/aravis-0.8.20.tar.xz" - sha256: "0c0eb5a76109f29180c09c7e6a23fd403633bf22bbe8468a0ae44995c4449f46" patches: "0.8.30": - patch_file: "patches/0.8.29-gst-shared-lib.patch" @@ -24,7 +24,3 @@ patches: - patch_file: "patches/0.8.25-gst-shared-lib.patch" patch_description: "remove forcing of shared library built for gst-plugins" patch_type: conan - "0.8.20": - - patch_file: "patches/0.8.19-gst-shared-lib.patch" - patch_description: "remove forcing of shared library built for gst-plugins" - patch_type: conan diff --git a/recipes/aravis/all/conanfile.py b/recipes/aravis/all/conanfile.py index af5a8560dea48..1b412478f26e7 100644 --- a/recipes/aravis/all/conanfile.py +++ b/recipes/aravis/all/conanfile.py @@ -33,7 +33,6 @@ class AravisConan(ConanFile): "gst_plugin": [True, False], "tools": [True, False], "introspection": [True, False], - "gv_n_buffers": ["ANY"], } default_options = { "shared": False, @@ -43,7 +42,6 @@ class AravisConan(ConanFile): "gst_plugin": False, "tools": True, "introspection": False, - "gv_n_buffers": 16, } def export_sources(self): @@ -54,10 +52,6 @@ def config_options(self): del self.options.fPIC if self.settings.os not in ["Linux", "FreeBSD"]: del self.options.packet_socket - # https://github.com/AravisProject/aravis/commit/b4211e5e0266d0226e936818b3faefd6d0daaa3a#diff-f28598af2e23aa5d2bc7c72e022ae2c56a33802eb970afffaeca1e40607f97fe - if Version(self.version) < "0.8.21": - del self.options.gv_n_buffers - def configure(self): if self.options.shared: @@ -72,8 +66,8 @@ def layout(self): def requirements(self): # glib-object.h and gio/gio.h are used in several public headers - self.requires("glib/2.78.1", transitive_headers=True) - self.requires("libxml2/2.12.3") + self.requires("glib/2.78.3", transitive_headers=True) + self.requires("libxml2/[>=2.12.5 <3]") self.requires("zlib/[>=1.2.11 <2]") if self.options.usb: @@ -93,18 +87,9 @@ def validate(self): "conan-io/conan#7324 gets merged to fix macOS SIP issue #8443" ) - if self.options.get_safe("gv_n_buffers"): - try: - gv_n_buffers_val = int(str(self.options.gv_n_buffers)) - if gv_n_buffers_val < 1: - raise ConanInvalidConfiguration( - f"gv_n_buffers_val must be greater than 1 Provided: {gv_n_buffers_val}") - except ValueError as e: - raise ConanInvalidConfiguration("gv_n_buffers_val must be an integer.") from e - def build_requirements(self): #windows build: meson/1.2.1 works, meson/1.2.2 breaks for some reason! - self.tool_requires("meson/1.3.1") + self.tool_requires("meson/1.4.0") self.tool_requires("glib/") if not self.conf.get("tools.gnu:pkg_config", check_type=str): self.tool_requires("pkgconf/2.1.0") @@ -129,10 +114,6 @@ def generate(self): tc.project_options["viewer"] = "disabled" tc.project_options["tests"] = False tc.project_options["documentation"] = "disabled" - - if self.options.get_safe("gv_n_buffers"): - tc.project_options["gv-n-buffers"] = int(str(self.options.gv_n_buffers)) - tc.project_options["fast-heartbeat"] = False if self.settings.get_safe("compiler.runtime"): tc.project_options["b_vscrt"] = msvc_runtime_flag(self).lower() diff --git a/recipes/aravis/all/patches/0.8.19-gst-shared-lib.patch b/recipes/aravis/all/patches/0.8.19-gst-shared-lib.patch deleted file mode 100644 index fec845831e656..0000000000000 --- a/recipes/aravis/all/patches/0.8.19-gst-shared-lib.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gst/meson.build -+++ b/gst/meson.build -@@ -15,7 +15,7 @@ gst_c_args = [ - - gst_plugin_filename = 'gstaravis.@0@'.format (aravis_api_version) - --gst_plugin = shared_library (gst_plugin_filename, -+gst_plugin = library (gst_plugin_filename, - gst_sources, gst_headers, - name_suffix: [], - link_with: aravis_library, diff --git a/recipes/aravis/config.yml b/recipes/aravis/config.yml index 1aa8532edf0e6..456a2949d4232 100644 --- a/recipes/aravis/config.yml +++ b/recipes/aravis/config.yml @@ -1,4 +1,6 @@ versions: + "0.8.33": + folder: all "0.8.30": folder: all "0.8.29": @@ -6,5 +8,3 @@ versions: # 0.8.25 is the last version to support GenDC data format "0.8.25": folder: all - "0.8.20": - folder: all diff --git a/recipes/argparse/all/conandata.yml b/recipes/argparse/all/conandata.yml index 719dc54ae5a72..db1ee3caae6a8 100644 --- a/recipes/argparse/all/conandata.yml +++ b/recipes/argparse/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.1": + url: "https://github.com/p-ranav/argparse/archive/v3.1.tar.gz" + sha256: "d01733552ca4a18ab501ae8b8be878131baa32e89090fafdeef018ebfa4c6e46" "3.0": url: "https://github.com/p-ranav/argparse/archive/v3.0.tar.gz" sha256: "ba7b465759bb01069d57302855eaf4d1f7d677f21ad7b0b00b92939645c30f47" diff --git a/recipes/argparse/all/conanfile.py b/recipes/argparse/all/conanfile.py index 11300088df46e..cae941dd0cc89 100644 --- a/recipes/argparse/all/conanfile.py +++ b/recipes/argparse/all/conanfile.py @@ -75,12 +75,11 @@ def package(self): copy(self, "*.hpp", src=os.path.join(self.source_folder, "include"), dst=include_dst) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.set_property("cmake_file_name", "argparse") self.cpp_info.set_property("cmake_target_name", "argparse::argparse") self.cpp_info.set_property("pkg_config_name", "argparse") if Version(self.version) <= "2.1": self.cpp_info.includedirs.append(os.path.join("include", "argparse")) - self.cpp_info.bindirs = [] - self.cpp_info.frameworkdirs = [] - self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] diff --git a/recipes/argparse/config.yml b/recipes/argparse/config.yml index fef29e0dad433..7a2d6d99b91e4 100644 --- a/recipes/argparse/config.yml +++ b/recipes/argparse/config.yml @@ -1,4 +1,6 @@ versions: + "3.1": + folder: all "3.0": folder: all "2.9": diff --git a/recipes/argz/all/conandata.yml b/recipes/argz/all/conandata.yml new file mode 100644 index 0000000000000..a8b111b9078ce --- /dev/null +++ b/recipes/argz/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.2.1": + url: "https://github.com/stephenberry/argz/archive/refs/tags/v0.2.1.tar.gz" + sha256: "1a9d85ef7e4722f81ce426c2cf8ceaa0a10cc42e7762cdf2465ae6484ece9c7e" diff --git a/recipes/argz/all/conanfile.py b/recipes/argz/all/conanfile.py new file mode 100644 index 0000000000000..1d0b4e30fd7e6 --- /dev/null +++ b/recipes/argz/all/conanfile.py @@ -0,0 +1,70 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.52.0" + + +class ArgzConan(ConanFile): + name = "argz" + description = "A light weight C++ in memory argument parser" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/stephenberry/argz" + topics = ("argument", "parser", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "11", + "clang": "12", + "apple-clang": "14", + "Visual Studio": "16", + "msvc": "192", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + 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." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "argz") + self.cpp_info.set_property("cmake_target_name", "argz::argz") diff --git a/recipes/argz/all/test_package/CMakeLists.txt b/recipes/argz/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8904da5a62a1d --- /dev/null +++ b/recipes/argz/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(argz REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE argz::argz) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/argz/all/test_package/conanfile.py b/recipes/argz/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/argz/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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 = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + 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): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/argz/all/test_package/test_package.cpp b/recipes/argz/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..8e6558ac798fa --- /dev/null +++ b/recipes/argz/all/test_package/test_package.cpp @@ -0,0 +1,28 @@ +#include + +int main(int argc, char* argv[]) { + constexpr std::string_view version = "1.2.3"; + argz::about about{ "My program description", version }; + + std::string input{}; + std::string study{}; + int number = 123; + bool boolean = true; + std::optional number_opt{}; + argz::options opts{ + { { "input", 'i' }, input, "the input file"}, + { { "study", 's' }, study, "a study file"}, + { { "number" }, number, "input an int"}, + { { "boolean" }, boolean, "a boolean" }, + { { "number_opt" }, number_opt, "input an int"} + }; + + try { + argz::parse(about, opts, argc, argv); + } + catch (const std::exception& e) { + std::cerr << e.what() << '\n'; + } + + return 0; +} diff --git a/recipes/argz/config.yml b/recipes/argz/config.yml new file mode 100644 index 0000000000000..f975c1e3261f7 --- /dev/null +++ b/recipes/argz/config.yml @@ -0,0 +1,3 @@ +versions: + "0.2.1": + folder: all diff --git a/recipes/arrow/all/conandata.yml b/recipes/arrow/all/conandata.yml index e231222d58659..aa96940081481 100644 --- a/recipes/arrow/all/conandata.yml +++ b/recipes/arrow/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "17.0.0": + url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-17.0.0/apache-arrow-17.0.0.tar.gz?action=download" + sha256: "9d280d8042e7cf526f8c28d170d93bfab65e50f94569f6a790982a878d8d898d" "16.1.0": url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-16.1.0/apache-arrow-16.1.0.tar.gz?action=download" sha256: "c9e60c7e87e59383d21b20dc874b17153729ee153264af6d21654b7dff2c60d7" diff --git a/recipes/arrow/all/conanfile.py b/recipes/arrow/all/conanfile.py index bf069b6fbabb1..1af7642b14652 100644 --- a/recipes/arrow/all/conanfile.py +++ b/recipes/arrow/all/conanfile.py @@ -170,7 +170,7 @@ def requirements(self): if self.options.with_mimalloc: self.requires("mimalloc/1.7.6") if self.options.with_boost: - self.requires("boost/1.84.0") + self.requires("boost/1.85.0") if self.options.with_gflags: self.requires("gflags/2.2.2") if self.options.with_glog: @@ -579,7 +579,8 @@ def package_info(self): if self._requires_rapidjson(): self.cpp_info.components["libarrow"].requires.append("rapidjson::rapidjson") if self.options.with_s3: - self.cpp_info.components["libarrow"].requires.append("aws-sdk-cpp::s3") + # https://github.com/apache/arrow/blob/6b268f62a8a172249ef35f093009c740c32e1f36/cpp/src/arrow/CMakeLists.txt#L98 + self.cpp_info.components["libarrow"].requires.extend([f"aws-sdk-cpp::{x}" for x in ["cognito-identity", "core", "identity-management", "s3", "sts"]]) if self.options.get_safe("with_gcs"): self.cpp_info.components["libarrow"].requires.append("google-cloud-cpp::storage") if self.options.with_orc: @@ -600,8 +601,6 @@ def package_info(self): self.cpp_info.components["libarrow"].requires.append("zlib::zlib") if self.options.with_zstd: self.cpp_info.components["libarrow"].requires.append("zstd::zstd") - if self.options.with_boost: - self.cpp_info.components["libarrow"].requires.append("boost::boost") if self.options.with_grpc: self.cpp_info.components["libarrow"].requires.append("grpc::grpc") if self.options.with_flight_rpc: diff --git a/recipes/arrow/config.yml b/recipes/arrow/config.yml index 9ee5f53ad1cbe..6d012719cd8e2 100644 --- a/recipes/arrow/config.yml +++ b/recipes/arrow/config.yml @@ -1,4 +1,6 @@ versions: + "17.0.0": + folder: all "16.1.0": folder: all "16.0.0": diff --git a/recipes/artery-font-format/all/conandata.yml b/recipes/artery-font-format/all/conandata.yml index b248576ab34a5..d7128685d341e 100644 --- a/recipes/artery-font-format/all/conandata.yml +++ b/recipes/artery-font-format/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1": + url: "https://github.com/Chlumsky/artery-font-format/archive/v1.1.tar.gz" + sha256: "cd8eb58590d85069312b831ce5bc6eba21778ef2fa8ca8ac06e1ecf8eca53a7c" "1.0.1": url: "https://github.com/Chlumsky/artery-font-format/archive/v1.0.1.tar.gz" sha256: "23dc9450d2364c9f1a67fcb0ae8f2bef365fabc5a3f4af55d9a646f8fbcdc537" diff --git a/recipes/artery-font-format/all/conanfile.py b/recipes/artery-font-format/all/conanfile.py index 0b2ff0a648da1..ec8583e598e0b 100644 --- a/recipes/artery-font-format/all/conanfile.py +++ b/recipes/artery-font-format/all/conanfile.py @@ -1,4 +1,5 @@ from conan import ConanFile +from conan.tools.build import check_min_cppstd from conan.tools.files import get, copy import os @@ -7,24 +8,29 @@ class ArteryFontFormatConan(ConanFile): name = "artery-font-format" + description = "Artery Atlas Font format library" license = "MIT" - homepage = "https://github.com/Chlumsky/artery-font-format" url = "https://github.com/conan-io/conan-center-index" - description = "Artery Atlas Font format library" - topics = ("artery", "font", "atlas") + homepage = "https://github.com/Chlumsky/artery-font-format" + topics = ("artery", "font", "atlas", "header-only") package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True + @property + def _min_cppstd(self): + return 11 + def package_id(self): self.info.clear() + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - # header only: no build step - pass - def package(self): copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy( @@ -39,3 +45,7 @@ def package(self): dst=os.path.join(self.package_folder, "include"), src=self.source_folder, ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/artery-font-format/all/test_package/CMakeLists.txt b/recipes/artery-font-format/all/test_package/CMakeLists.txt index 240a8cec38d93..d7b8e200d1115 100644 --- a/recipes/artery-font-format/all/test_package/CMakeLists.txt +++ b/recipes/artery-font-format/all/test_package/CMakeLists.txt @@ -4,5 +4,5 @@ project(test_package LANGUAGES CXX) find_package(artery-font-format REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} artery-font-format::artery-font-format) +target_link_libraries(${PROJECT_NAME} PRIVATE artery-font-format::artery-font-format) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/artery-font-format/all/test_package/conanfile.py b/recipes/artery-font-format/all/test_package/conanfile.py index 0a808db45f245..3a91c9439218e 100644 --- a/recipes/artery-font-format/all/test_package/conanfile.py +++ b/recipes/artery-font-format/all/test_package/conanfile.py @@ -4,7 +4,6 @@ import os -# It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" diff --git a/recipes/artery-font-format/config.yml b/recipes/artery-font-format/config.yml index 7b06dd8bf61ea..3c69caf4158b5 100644 --- a/recipes/artery-font-format/config.yml +++ b/recipes/artery-font-format/config.yml @@ -1,4 +1,6 @@ versions: + "1.1": + folder: all "1.0.1": folder: all "1.0": diff --git a/recipes/asio/all/conandata.yml b/recipes/asio/all/conandata.yml index 2701f5013ce40..bf7c7ab528f44 100644 --- a/recipes/asio/all/conandata.yml +++ b/recipes/asio/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.31.0": + url: "https://github.com/chriskohlhoff/asio/archive/asio-1-31-0.tar.gz" + sha256: "530540f973498c2d297771af1bc852f69b27509bbb56bc7ac3309c928373286f" "1.30.2": url: "https://github.com/chriskohlhoff/asio/archive/asio-1-30-2.tar.gz" sha256: "755bd7f85a4b269c67ae0ea254907c078d408cce8e1a352ad2ed664d233780e8" diff --git a/recipes/asio/config.yml b/recipes/asio/config.yml index 1655f339efad7..0f4a1ba23b387 100644 --- a/recipes/asio/config.yml +++ b/recipes/asio/config.yml @@ -1,4 +1,6 @@ versions: + "1.31.0": + folder: all "1.30.2": folder: all "1.30.1": diff --git a/recipes/assimp/5.x/conandata.yml b/recipes/assimp/5.x/conandata.yml index 503614eeac72a..e267d49bf4f17 100644 --- a/recipes/assimp/5.x/conandata.yml +++ b/recipes/assimp/5.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.4.2": + url: "https://github.com/assimp/assimp/archive/refs/tags/v5.4.2.tar.gz" + sha256: "7414861a7b038e407b510e8b8c9e58d5bf8ca76c9dfe07a01d20af388ec5086a" "5.4.1": url: "https://github.com/assimp/assimp/archive/refs/tags/v5.4.1.tar.gz" sha256: "a1bf71c4eb851ca336bba301730cd072b366403e98e3739d6a024f6313b8f954" diff --git a/recipes/assimp/config.yml b/recipes/assimp/config.yml index e3725a7b77888..e0bd8dc212a2c 100644 --- a/recipes/assimp/config.yml +++ b/recipes/assimp/config.yml @@ -1,4 +1,6 @@ versions: + "5.4.2": + folder: "5.x" "5.4.1": folder: "5.x" "5.3.1": diff --git a/recipes/at-spi2-core/config.yml b/recipes/at-spi2-core/config.yml index f37e219eb66cb..c890631d2ad5f 100644 --- a/recipes/at-spi2-core/config.yml +++ b/recipes/at-spi2-core/config.yml @@ -25,3 +25,5 @@ versions: folder: new "2.51.0": folder: new + "2.53.1": + folder: new diff --git a/recipes/at-spi2-core/new/conandata.yml b/recipes/at-spi2-core/new/conandata.yml index 58e8f4f097094..225eb1193882e 100644 --- a/recipes/at-spi2-core/new/conandata.yml +++ b/recipes/at-spi2-core/new/conandata.yml @@ -1,13 +1,16 @@ sources: + "2.53.1": + url: "https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.53/at-spi2-core-2.53.1.tar.xz" + sha256: "2affe2c88dae3defcd754c2c2bcecfb2e52b9541edf2e469f94b3a0bb1307cf4" "2.51.0": - sha256: 8dd07c6160e3115f4f77e2205963449def6822a3dc85d495c5db389f56663037 - url: https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.51/at-spi2-core-2.51.0.tar.xz + url: "https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.51/at-spi2-core-2.51.0.tar.xz" + sha256: "8dd07c6160e3115f4f77e2205963449def6822a3dc85d495c5db389f56663037" "2.50.0": - sha256: e9f5a8c8235c9dd963b2171de9120301129c677dde933955e1df618b949c4adc - url: https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.50/at-spi2-core-2.50.0.tar.xz + url: "https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.50/at-spi2-core-2.50.0.tar.xz" + sha256: "e9f5a8c8235c9dd963b2171de9120301129c677dde933955e1df618b949c4adc" "2.49.1": - sha256: 53ed9eb77e4c48b3bf6ac4afb5689391e0d7d0f44f7ca4443d8b13c7dd26119c - url: https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.49/at-spi2-core-2.49.1.tar.xz + url: "https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.49/at-spi2-core-2.49.1.tar.xz" + sha256: "53ed9eb77e4c48b3bf6ac4afb5689391e0d7d0f44f7ca4443d8b13c7dd26119c" "2.48.3": url: "https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.48/at-spi2-core-2.48.3.tar.xz" sha256: "37316df43ca9989ce539d54cf429a768c28bb38a0b34950beadd0421827edf55" diff --git a/recipes/at-spi2-core/new/conanfile.py b/recipes/at-spi2-core/new/conanfile.py index 265bde97b8ace..e12168d36a06f 100644 --- a/recipes/at-spi2-core/new/conanfile.py +++ b/recipes/at-spi2-core/new/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile -from conan.errors import ConanException, ConanInvalidConfiguration -from conan.tools.apple import fix_apple_shared_install_name +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir from conan.tools.gnu import PkgConfigDeps @@ -32,7 +32,7 @@ class AtSpi2CoreConan(ConanFile): default_options = { "shared": False, "fPIC": True, - "with_x11": False, + "with_x11": True, } def export_sources(self): @@ -41,6 +41,8 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if self.settings.os not in ["Linux", "FreeBSD"]: + del self.options.with_x11 def configure(self): if self.options.shared: @@ -56,22 +58,20 @@ def build_requirements(self): def requirements(self): self.requires("glib/2.78.3") - if self.options.with_x11: - self.requires("xorg/system") - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.requires("dbus/1.15.8") + if self.options.get_safe("with_x11"): + self.requires("xorg/system") def validate(self): - if self.options.shared and not self.dependencies["glib"].options.shared: + if self.options.shared and not self.dependencies["glib"].options.shared: raise ConanInvalidConfiguration( "Linking a shared library against static glib can cause unexpected behaviour." ) - if Version(self.version) < "2.49.1": - if self.settings.os == "Windows": - raise ConanInvalidConfiguration("Windows is not supported before version 2.49.1") - if Version(self.version) < "2.50.0": - if self.settings.os == "Macos": - raise ConanInvalidConfiguration("macos is not supported before version 2.50.0") + if Version(self.version) < "2.49.1" and self.settings.os == "Windows": + raise ConanInvalidConfiguration("Windows is not supported before version 2.49.1") + if Version(self.version) < "2.50.0" and is_apple_os(self): + raise ConanInvalidConfiguration("macOS is not supported before version 2.50.0") def layout(self): basic_layout(self, src_folder="src") @@ -86,10 +86,10 @@ def generate(self): tc = MesonToolchain(self) if Version(self.version) >= "2.47.1": tc.project_options["introspection"] = "disabled" - tc.project_options["x11"] = "enabled" if self.options.with_x11 else "disabled" + tc.project_options["x11"] = "enabled" if self.options.get_safe("with_x11") else "disabled" else: tc.project_options["introspection"] = "no" - tc.project_options["x11"] = "yes" if self.options.with_x11 else "no" + tc.project_options["x11"] = "yes" if self.options.get_safe("with_x11") else "no" if self.settings.os != "Linux": tc.project_options["atk_only"] = "true" @@ -124,24 +124,25 @@ def package(self): fix_apple_shared_install_name(self) fix_msvc_libname(self) - def package_info(self): - if self.settings.os == "Linux": - self.cpp_info.components["atspi"].libs = ['atspi'] - self.cpp_info.components["atspi"].includedirs = ["include/at-spi-2.0"] - self.cpp_info.components["atspi"].requires = ["dbus::dbus", "glib::glib"] + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["atspi"].set_property("pkg_config_name", "atspi-2") + self.cpp_info.components["atspi"].libs = ["atspi"] + self.cpp_info.components["atspi"].includedirs = ["include/at-spi-2.0"] + self.cpp_info.components["atspi"].requires = ["dbus::dbus", "glib::glib-2.0", "glib::gobject-2.0"] + if self.options.with_x11: + self.cpp_info.components["atspi"].requires.extend(["xorg::x11", "xorg::xtst", "xorg::xi"]) + self.cpp_info.components["atk"].set_property("pkg_config_name", "atk") self.cpp_info.components["atk"].libs = ["atk-1.0"] - self.cpp_info.components["atk"].includedirs = ['include/atk-1.0'] - self.cpp_info.components["atk"].requires = ["glib::glib"] - self.cpp_info.components["atk"].set_property("pkg_config_name", 'atk') - - if self.settings.os == "Linux": - self.cpp_info.components["atk-bridge"].libs = ['atk-bridge-2.0'] - self.cpp_info.components["atk-bridge"].includedirs = [os.path.join('include', 'at-spi2-atk', '2.0')] - self.cpp_info.components["atk-bridge"].requires = ["dbus::dbus", "atk", "glib::glib", "atspi"] - self.cpp_info.components["atk-bridge"].set_property("pkg_config_name", 'atk-bridge-2.0') + self.cpp_info.components["atk"].includedirs = ["include/atk-1.0"] + self.cpp_info.components["atk"].requires = ["glib::glib-2.0", "glib::gobject-2.0"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["atk-bridge"].set_property("pkg_config_name", "atk-bridge-2.0") + self.cpp_info.components["atk-bridge"].libs = ["atk-bridge-2.0"] + self.cpp_info.components["atk-bridge"].includedirs = [os.path.join("include", "at-spi2-atk", "2.0")] + self.cpp_info.components["atk-bridge"].requires = ["atspi", "atk", "glib::gmodule-2.0"] def fix_msvc_libname(conanfile, remove_lib_prefix=True): diff --git a/recipes/atomic_queue/all/conandata.yml b/recipes/atomic_queue/all/conandata.yml new file mode 100644 index 0000000000000..f19fe2ba05117 --- /dev/null +++ b/recipes/atomic_queue/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.6.3": + url: "https://github.com/max0x7ba/atomic_queue/archive/refs/tags/v1.6.3.tar.gz" + sha256: "0ad6e0203d90367f6a4e496449dfd9ad65b80168fadafef4eac08820c6bda79c" diff --git a/recipes/atomic_queue/all/conanfile.py b/recipes/atomic_queue/all/conanfile.py new file mode 100644 index 0000000000000..8e73409204f38 --- /dev/null +++ b/recipes/atomic_queue/all/conanfile.py @@ -0,0 +1,46 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.50.0" + +class CxxOptsConan(ConanFile): + name = "atomic_queue" + homepage = "https://github.com/max0x7ba/atomic_queue" + url = "https://github.com/conan-io/conan-center-index" + description = "Multiple-producer-multiple-consumer lock-free queues based on circular buffer and std::atomic." + license = "MIT" + topics = ("queue", "lockfree", "atomic") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 14 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, pattern="*", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/atomic_queue/all/test_package/CMakeLists.txt b/recipes/atomic_queue/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..2935185362d0c --- /dev/null +++ b/recipes/atomic_queue/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(atomic_queue REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE atomic_queue::atomic_queue) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/atomic_queue/all/test_package/conanfile.py b/recipes/atomic_queue/all/test_package/conanfile.py new file mode 100644 index 0000000000000..081c97abefb38 --- /dev/null +++ b/recipes/atomic_queue/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +import os +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout + +required_conan_version = ">=1.50.0" + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + 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): + if can_run(self): + self.run(os.path.join(self.cpp.build.bindirs[0], "test_package"), env="conanrun") diff --git a/recipes/atomic_queue/all/test_package/test_package.cpp b/recipes/atomic_queue/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..bdfe611442b89 --- /dev/null +++ b/recipes/atomic_queue/all/test_package/test_package.cpp @@ -0,0 +1,13 @@ +#include + +int main(int argc, char* argv[]) +{ + atomic_queue::AtomicQueue q; + + const int iPush = 42; + q.push(iPush); + + const int iPop = q.pop(); + + return (iPush - iPop); +} diff --git a/recipes/atomic_queue/config.yml b/recipes/atomic_queue/config.yml new file mode 100644 index 0000000000000..6a0b843662fca --- /dev/null +++ b/recipes/atomic_queue/config.yml @@ -0,0 +1,3 @@ +versions: + "1.6.3": + folder: "all" diff --git a/recipes/aws-c-auth/all/conandata.yml b/recipes/aws-c-auth/all/conandata.yml index 027010126b13f..be2876a831b62 100644 --- a/recipes/aws-c-auth/all/conandata.yml +++ b/recipes/aws-c-auth/all/conandata.yml @@ -1,28 +1,7 @@ sources: - "0.7.8": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.7.8.tar.gz" - sha256: "5db8ab91262b5c055e3634f2c9dc2bc1a3285c2dd5513fdcafcb3e79468dc7de" - "0.7.7": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.7.7.tar.gz" - sha256: "ea3c9e75b59b36aaf9147deec655d1669f197745bbe914cd3b8e234740be29ba" - "0.6.17": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.6.17.tar.gz" - sha256: "b43678ad3a779c9c7fccf8f931c162eaaf4d5d64d2955ac1fcfd32e538545c0f" - "0.6.11": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.6.11.tar.gz" - sha256: "d8a0d373cf8b0ff148a014ae2ba24c51f2e7a598b5b0cf3a6e64482c1cd37f90" - "0.6.8": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.6.8.tar.gz" - sha256: "48b1c0008265ea8e7d7b653b34640ce8111e00d6e0e3f4855f3fba71e1ac5704" + "0.7.16": + url: "https://github.com/awslabs/aws-c-auth/archive/v0.7.16.tar.gz" + sha256: "7ee5afe05482f750dd0406b8b5b55dafb446fc21288f98c0b4118d62795003ba" "0.6.4": url: "https://github.com/awslabs/aws-c-auth/archive/v0.6.4.tar.gz" sha256: "119cec67e85b01af8c01b11d962c610d8e9b183cde96fee77db669cccaa19ac9" - "0.6.0": - url: "https://github.com/awslabs/aws-c-auth/archive/v0.6.0.tar.gz" - sha256: "5f5fff63110c3e8f619385ca563f77886bc101d3e054987eecbb87586e27b651" -patches: - "0.6.17": - - patch_file: "patches/0.6.17-0001-fix-macro-usage.patch" - patch_description: "Fix inconsistent usage of macros" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-auth/pull/181" diff --git a/recipes/aws-c-auth/all/conanfile.py b/recipes/aws-c-auth/all/conanfile.py index edc82083e9c0b..924a52fe64d4d 100644 --- a/recipes/aws-c-auth/all/conanfile.py +++ b/recipes/aws-c-auth/all/conanfile.py @@ -47,23 +47,17 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.6.17": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.5.13") - if Version(self.version) < "0.6.17": - self.requires("aws-c-io/0.10.20", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-http/0.6.13", transitive_headers=True) - else: - self.requires("aws-c-io/0.13.4", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-http/0.6.22", transitive_headers=True) - if Version(self.version) >= "0.6.5": - self.requires("aws-c-sdkutils/0.1.3", transitive_headers=True) - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.6.9") - self.requires("aws-c-io/0.13.35", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-http/0.7.14", transitive_headers=True) - self.requires("aws-c-sdkutils/0.1.12", transitive_headers=True) + if self.version == "0.7.16": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-io/0.14.7", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-http/0.8.1", transitive_headers=True) + self.requires("aws-c-sdkutils/0.1.15", transitive_headers=True) + if self.version == "0.6.4": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-io/0.10.9", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-http/0.6.7", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-auth/all/patches/0.6.17-0001-fix-macro-usage.patch b/recipes/aws-c-auth/all/patches/0.6.17-0001-fix-macro-usage.patch deleted file mode 100644 index bed12b1bd563b..0000000000000 --- a/recipes/aws-c-auth/all/patches/0.6.17-0001-fix-macro-usage.patch +++ /dev/null @@ -1,132 +0,0 @@ -diff --git a/source/aws_signing.c b/source/aws_signing.c -index 940d7be..ecc1144 100644 ---- a/source/aws_signing.c -+++ b/source/aws_signing.c -@@ -2500,7 +2500,7 @@ int aws_verify_sigv4a_signing( - aws_credentials_release(signing_state->config.credentials); - signing_state->config.credentials = ecc_credentials; - if (signing_state->config.credentials == NULL) { -- AWS_LOGF_ERROR(AWS_LS_AUTH_SIGNING, "Unable to create ECC from provided credentials") -+ AWS_LOGF_ERROR(AWS_LS_AUTH_SIGNING, "Unable to create ECC from provided credentials"); - goto done; - } - } -diff --git a/source/credentials_provider_process.c b/source/credentials_provider_process.c -index 655df86..29f99d0 100644 ---- a/source/credentials_provider_process.c -+++ b/source/credentials_provider_process.c -@@ -187,7 +187,7 @@ static struct aws_string *s_get_command(struct aws_allocator *allocator, struct - if (!command_buf.len) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to resolve credentials_process command during process credentials provider initialization.") -+ "Failed to resolve credentials_process command during process credentials provider initialization."); - goto on_finish; - } - -@@ -202,7 +202,7 @@ static struct aws_string *s_get_command(struct aws_allocator *allocator, struct - - AWS_LOGF_DEBUG( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Successfully loaded credentials_process command for process credentials provider.") -+ "Successfully loaded credentials_process command for process credentials provider."); - - on_finish: - aws_string_destroy(profile_name); -diff --git a/source/credentials_provider_sts_web_identity.c b/source/credentials_provider_sts_web_identity.c -index cb03cb5..c3e4697 100644 ---- a/source/credentials_provider_sts_web_identity.c -+++ b/source/credentials_provider_sts_web_identity.c -@@ -231,7 +231,7 @@ static bool s_parse_retryable_error_from_response(struct aws_allocator *allocato - if (xml_parser == NULL) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to init xml parser for sts web identity credentials provider to parse error information.") -+ "Failed to init xml parser for sts web identity credentials provider to parse error information."); - return false; - } - bool get_retryable_error = false; -@@ -330,14 +330,14 @@ static struct aws_credentials *s_parse_credentials_from_response( - if (xml_parser == NULL) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to init xml parser for sts web identity credentials provider to parse error information.") -+ "Failed to init xml parser for sts web identity credentials provider to parse error information."); - return NULL; - } - uint64_t now = UINT64_MAX; - if (aws_sys_clock_get_ticks(&now) != AWS_OP_SUCCESS) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to get sys clock for sts web identity credentials provider to parse error information.") -+ "Failed to get sys clock for sts web identity credentials provider to parse error information."); - goto on_finish; - } - uint64_t now_seconds = aws_timestamp_convert(now, AWS_TIMESTAMP_NANOS, AWS_TIMESTAMP_SECS, NULL); -@@ -998,7 +998,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, - "Failed to resolve either region, role arn or token file path during sts web identity provider " -- "initialization.") -+ "initialization."); - goto on_finish; - - } else { -@@ -1021,7 +1021,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator - aws_byte_buf_init_copy_from_cursor(¶meters->role_arn, allocator, aws_byte_cursor_from_string(role_arn))) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to resolve role arn during sts web identity provider initialization.") -+ "Failed to resolve role arn during sts web identity provider initialization."); - goto on_finish; - } - -@@ -1031,7 +1031,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator - ¶meters->token_file_path, allocator, aws_byte_cursor_from_string(token_file_path))) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Failed to resolve token file path during sts web identity provider initialization.") -+ "Failed to resolve token file path during sts web identity provider initialization."); - goto on_finish; - } - -@@ -1047,7 +1047,7 @@ static struct sts_web_identity_parameters *s_parameters_new(struct aws_allocator - - AWS_LOGF_DEBUG( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Successfully loaded all required parameters for sts web identity credentials provider.") -+ "Successfully loaded all required parameters for sts web identity credentials provider."); - success = true; - - on_finish: -diff --git a/source/credentials_utils.c b/source/credentials_utils.c -index 061e26b..2cb61d6 100644 ---- a/source/credentials_utils.c -+++ b/source/credentials_utils.c -@@ -98,7 +98,7 @@ static bool s_parse_expiration_value_from_json_object( - - if (expiration_cursor.len == 0) { - AWS_LOGF_INFO( -- AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed a credentials json document with empty expiration.") -+ AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed a credentials json document with empty expiration."); - return false; - } - -@@ -211,7 +211,7 @@ struct aws_credentials *aws_parse_credentials_from_aws_json_object( - if (access_key_id_cursor.len == 0 || secrete_access_key_cursor.len == 0) { - AWS_LOGF_ERROR( - AWS_LS_AUTH_CREDENTIALS_PROVIDER, -- "Parsed an unexpected credentials json document, either access key, secret key is empty.") -+ "Parsed an unexpected credentials json document, either access key, secret key is empty."); - goto done; - } - -@@ -222,7 +222,7 @@ struct aws_credentials *aws_parse_credentials_from_aws_json_object( - aws_json_value_get_string(token, &session_token_cursor); - if (options->token_required && session_token_cursor.len == 0) { - AWS_LOGF_ERROR( -- AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed an unexpected credentials json document with empty token.") -+ AWS_LS_AUTH_CREDENTIALS_PROVIDER, "Parsed an unexpected credentials json document with empty token."); - goto done; - } - } diff --git a/recipes/aws-c-auth/config.yml b/recipes/aws-c-auth/config.yml index 8edcc1ff10f28..485e385b44014 100644 --- a/recipes/aws-c-auth/config.yml +++ b/recipes/aws-c-auth/config.yml @@ -1,15 +1,5 @@ versions: - "0.7.8": - folder: all - "0.7.7": - folder: all - "0.6.17": - folder: all - "0.6.11": - folder: all - "0.6.8": + "0.7.16": folder: all "0.6.4": folder: all - "0.6.0": - folder: all diff --git a/recipes/aws-c-cal/all/conandata.yml b/recipes/aws-c-cal/all/conandata.yml index 0bf0d966b7d3a..e4a0abfc8c668 100644 --- a/recipes/aws-c-cal/all/conandata.yml +++ b/recipes/aws-c-cal/all/conandata.yml @@ -1,56 +1,11 @@ sources: - "0.6.9": - url: "https://github.com/awslabs/aws-c-cal/archive/v0.6.9.tar.gz" - sha256: "46defd807034ca9d873cc1459bc60f0bb4662029f7120db1af464421907fb480" - "0.6.1": - url: "https://github.com/awslabs/aws-c-cal/archive/v0.6.1.tar.gz" - sha256: "52df95150a8548ac35a0e4b6f59fbdebff27e4124c0b7e5eaa969ed3ba62fc82" - "0.5.20": - url: "https://github.com/awslabs/aws-c-cal/archive/v0.5.20.tar.gz" - sha256: "acc352359bd06f8597415c366cf4ec4f00d0b0da92d637039a73323dd55b6cd0" - "0.5.19": - url: "https://github.com/awslabs/aws-c-cal/archive/refs/tags/v0.5.19.tar.gz" - sha256: "23452ab7960c480f1ec0a96ac55bde32d7d27c4a664baeadc248923b19c12086" - "0.5.17": - url: "https://github.com/awslabs/aws-c-cal/archive/v0.5.17.tar.gz" - sha256: "40297da04443d4ee2988d1c5fb0dc4a156d0e4cfaf80e6a1df1867452566d540" - "0.5.13": - url: "https://github.com/awslabs/aws-c-cal/archive/v0.5.13.tar.gz" - sha256: "3aba3954877ea5271ce68361f3bd9c155b422b1149eed403874f6493285ca04d" + "0.6.14": + url: "https://github.com/awslabs/aws-c-cal/archive/v0.6.14.tar.gz" + sha256: "2326304b15bec45b212f6b738020c21afa41f9da295936687e103f9f2efb7b5e" "0.5.12": url: "https://github.com/awslabs/aws-c-cal/archive/v0.5.12.tar.gz" sha256: "350c29a288d5d498bd6574fca659cffc9453bf62691fbde5788399716c2bd132" patches: - "0.6.9": - - patch_file: "patches/0002-apple-corefoundation-0.6.9.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" - "0.6.1": - - patch_file: "patches/0002-apple-corefoundation-0.6.1.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" - "0.5.20": - - patch_file: "patches/0002-apple-corefoundation-0.5.13.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" - "0.5.19": - - patch_file: "patches/0002-apple-corefoundation-0.5.13.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" - "0.5.17": - - patch_file: "patches/0002-apple-corefoundation-0.5.13.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" - "0.5.13": - - patch_file: "patches/0002-apple-corefoundation-0.5.13.patch" - patch_description: "Link to CoreFoundation on Apple" - patch_type: "backport" - patch_source: "https://github.com/awslabs/aws-c-cal/pull/126" "0.5.12": - patch_file: "patches/0001-use-openssl-cmake-imported-target.patch" - patch_file: "patches/0002-apple-corefoundation-0.5.11.patch" diff --git a/recipes/aws-c-cal/all/conanfile.py b/recipes/aws-c-cal/all/conanfile.py index 82f0949981b96..c0ea74e4902c8 100644 --- a/recipes/aws-c-cal/all/conanfile.py +++ b/recipes/aws-c-cal/all/conanfile.py @@ -48,13 +48,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.5.20": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - elif Version(self.version) <= "0.6.1": - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - else: - # [>=0.9.7] - self.requires("aws-c-common/0.9.12", transitive_headers=True, transitive_libs=True) + if self.version == "0.6.14": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + if self.version == "0.5.12": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) if self._needs_openssl: self.requires("openssl/[>=1.1 <4]") diff --git a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.5.13.patch b/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.5.13.patch deleted file mode 100644 index 422624b80de7e..0000000000000 --- a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.5.13.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -78,7 +78,12 @@ elseif (APPLE) - message(FATAL_ERROR "Security Framework not found") - endif () - -- list(APPEND PLATFORM_LIBS "-framework Security") -+ find_library(COREFOUNDATION_LIB CoreFoundation) -+ if(NOT COREFOUNDATION_LIB) -+ message(FATAL_ERROR "CoreFoundation Framework not found") -+ endif() -+ -+ list(APPEND PLATFORM_LIBS "-framework Security -framework CoreFoundation") - endif() - else () - if (NOT BYO_CRYPTO) ---- a/source/darwin/securityframework_ecc.c -+++ b/source/darwin/securityframework_ecc.c -@@ -7,6 +7,7 @@ - #include - #include - -+#include - #include - #include - diff --git a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.1.patch b/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.1.patch deleted file mode 100644 index 616d8257a2980..0000000000000 --- a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.1.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -84,7 +84,12 @@ elseif (APPLE) - message(FATAL_ERROR "Security Framework not found") - endif () - -- list(APPEND PLATFORM_LIBS "-framework Security") -+ find_library(COREFOUNDATION_LIB CoreFoundation) -+ if(NOT COREFOUNDATION_LIB) -+ message(FATAL_ERROR "CoreFoundation Framework not found") -+ endif() -+ -+ list(APPEND PLATFORM_LIBS "-framework Security -framework CoreFoundation") - endif() - else () - if (NOT BYO_CRYPTO) ---- a/source/darwin/securityframework_ecc.c -+++ b/source/darwin/securityframework_ecc.c -@@ -7,6 +7,7 @@ - #include - #include - -+#include - #include - #include - diff --git a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.9.patch b/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.9.patch deleted file mode 100644 index 1059e3dd42f14..0000000000000 --- a/recipes/aws-c-cal/all/patches/0002-apple-corefoundation-0.6.9.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d57a3fd..7d1d5f2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -79,7 +79,11 @@ elseif (APPLE) - message(FATAL_ERROR "Security Framework not found") - endif () - -- list(APPEND PLATFORM_LIBS "-framework Security") -+ find_library(COREFOUNDATION_LIB CoreFoundation) -+ if(NOT COREFOUNDATION_LIB) -+ message(FATAL_ERROR "CoreFoundation Framework not found") -+ endif() -+ list(APPEND PLATFORM_LIBS "-framework Security -framework CoreFoundation") - endif() - else () - if (NOT BYO_CRYPTO) -diff --git a/source/darwin/securityframework_ecc.c b/source/darwin/securityframework_ecc.c -index adedadd..d34531e 100644 ---- a/source/darwin/securityframework_ecc.c -+++ b/source/darwin/securityframework_ecc.c -@@ -6,7 +6,7 @@ - - #include - #include -- -+#include - #include - #include - diff --git a/recipes/aws-c-cal/config.yml b/recipes/aws-c-cal/config.yml index f62f1684b8f2a..05b13d1c5771c 100644 --- a/recipes/aws-c-cal/config.yml +++ b/recipes/aws-c-cal/config.yml @@ -1,15 +1,5 @@ versions: - "0.6.9": - folder: all - "0.6.1": - folder: all - "0.5.20": - folder: all - "0.5.19": - folder: all - "0.5.17": - folder: all - "0.5.13": + "0.6.14": folder: all "0.5.12": folder: all diff --git a/recipes/aws-c-common/all/conandata.yml b/recipes/aws-c-common/all/conandata.yml index 0b34391746ed3..615dbce394f02 100644 --- a/recipes/aws-c-common/all/conandata.yml +++ b/recipes/aws-c-common/all/conandata.yml @@ -1,36 +1,7 @@ sources: - "0.9.12": - url: "https://github.com/awslabs/aws-c-common/archive/v0.9.12.tar.gz" - sha256: "10ef8f5629fb6ac24aa4893f3bb9a8480997e96a58c81043e019bf6b149f4332" - "0.9.6": - url: "https://github.com/awslabs/aws-c-common/archive/v0.9.6.tar.gz" - sha256: "5c30cc066a7f05fb8e4728f93aeed0e0e2698197a6df76237ac4e1200977d090" - "0.9.3": - url: "https://github.com/awslabs/aws-c-common/archive/v0.9.3.tar.gz" - sha256: "389eaac7f64d7d5a91ca3decad6810429eb5a65bbba54798b9beffcb4d1d1ed6" - "0.9.0": - url: "https://github.com/awslabs/aws-c-common/archive/v0.9.0.tar.gz" - sha256: "9b62ab1dcece3107810ea4f4511fe8e1e010a83cb0cb502b6ec685ce752a7b0c" - "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" - "0.6.20": - url: "https://github.com/awslabs/aws-c-common/archive/v0.6.20.tar.gz" - sha256: "6eb0b806c78b36a32eec9bcba8d2833e3973491a29d46fe3d11edc3f8d3e7f73" - "0.4.25": - url: "https://github.com/awslabs/aws-c-common/archive/v0.4.25.tar.gz" - sha256: "f85a8f74e42bd983a4615654457f8037876bc6b8dbf890e368bb516cbc2e9844" -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" + "0.9.15": + url: "https://github.com/awslabs/aws-c-common/archive/v0.9.15.tar.gz" + sha256: "8f36c7a6a5d2e17365759d15591f800d3e76dcaa34a226389b92647cbd92393a" + "0.6.11": + url: "https://github.com/awslabs/aws-c-common/archive/v0.6.11.tar.gz" + sha256: "86159bd1128eee2813f705c275d319e14d1b77017fab46f6ca5dafcc66edaea9" diff --git a/recipes/aws-c-common/all/conanfile.py b/recipes/aws-c-common/all/conanfile.py index 4c7af96e0f6da..f3f589547f059 100644 --- a/recipes/aws-c-common/all/conanfile.py +++ b/recipes/aws-c-common/all/conanfile.py @@ -41,8 +41,6 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if Version(self.version) < "0.6.11": - del self.options.cpu_extensions def configure(self): if self.options.shared: @@ -64,8 +62,7 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_TESTING"] = False tc.variables["AWS_ENABLE_LTO"] = False - if Version(self.version) >= "0.6.0": - tc.variables["AWS_WARNINGS_ARE_ERRORS"] = False + tc.variables["AWS_WARNINGS_ARE_ERRORS"] = False if is_msvc(self): tc.variables["STATIC_CRT"] = is_msvc_static_runtime(self) tc.variables["USE_CPU_EXTENSIONS"] = self.options.get_safe("cpu_extensions", False) diff --git a/recipes/aws-c-common/all/patches/0001-disable-fPIC.patch b/recipes/aws-c-common/all/patches/0001-disable-fPIC.patch deleted file mode 100644 index 1c3c5cada4202..0000000000000 --- a/recipes/aws-c-common/all/patches/0001-disable-fPIC.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- cmake/AwsCFlags.cmake -+++ cmake/AwsCFlags.cmake -@@ -62,8 +62,8 @@ - # Warning disables always go last to avoid future flags re-enabling them - list(APPEND AWS_C_FLAGS -Wno-long-long) - -- # Always enable position independent code, since this code will always end up in a shared lib -- list(APPEND AWS_C_FLAGS -fPIC) -+ # Don't always set fPIC as conan will handle position independent code. -+ # list(APPEND AWS_C_FLAGS -fPIC) - - if (LEGACY_COMPILER_SUPPORT) - list(APPEND AWS_C_FLAGS -Wno-strict-aliasing) diff --git a/recipes/aws-c-common/all/patches/0002-no-warnings-as-errors.patch b/recipes/aws-c-common/all/patches/0002-no-warnings-as-errors.patch deleted file mode 100644 index 8abe45bd0a3d6..0000000000000 --- a/recipes/aws-c-common/all/patches/0002-no-warnings-as-errors.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/cmake/AwsCFlags.cmake -+++ b/cmake/AwsCFlags.cmake -@@ -34,7 +34,7 @@ function(aws_set_common_properties target) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" PARENT_SCOPE) - endif() - -- list(APPEND AWS_C_FLAGS /W4 /WX /MP) -+ list(APPEND AWS_C_FLAGS /W4 /MP) - # /volatile:iso relaxes some implicit memory barriers that MSVC normally applies for volatile accesses - # Since we want to be compatible with user builds using /volatile:iso, use it for the tests. - list(APPEND AWS_C_FLAGS /volatile:iso) -@@ -49,7 +49,7 @@ function(aws_set_common_properties target) - list(APPEND AWS_C_FLAGS "${_FLAGS}") - - else() -- list(APPEND AWS_C_FLAGS -Wall -Werror -Wstrict-prototypes) -+ list(APPEND AWS_C_FLAGS -Wall -Wstrict-prototypes) - - if(NOT SET_PROPERTIES_NO_WEXTRA) - list(APPEND AWS_C_FLAGS -Wextra) diff --git a/recipes/aws-c-common/config.yml b/recipes/aws-c-common/config.yml index 0ba98edce43a1..e7b9215f4c431 100644 --- a/recipes/aws-c-common/config.yml +++ b/recipes/aws-c-common/config.yml @@ -1,19 +1,5 @@ versions: - "0.9.12": + "0.9.15": folder: all - "0.9.6": - folder: all - "0.9.3": - folder: all - "0.9.0": - folder: all - "0.8.23": - folder: all - "0.8.2": - folder: all - "0.7.5": - folder: all - "0.6.20": - folder: all - "0.4.25": + "0.6.11": folder: all diff --git a/recipes/aws-c-compression/all/conandata.yml b/recipes/aws-c-compression/all/conandata.yml index d936f5ef9af18..1bbf0a0f551fb 100644 --- a/recipes/aws-c-compression/all/conandata.yml +++ b/recipes/aws-c-compression/all/conandata.yml @@ -1,13 +1,7 @@ sources: - "0.2.17": - url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.17.tar.gz" - sha256: "703d1671e395ea26f8b0b70d678ed471421685a89e127f8aa125e2b2ecedb0e0" - "0.2.15": - url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.15.tar.gz" - sha256: "11d58a229e2961b2b36493155a981dea2c8a0bc0d113b0073deb8c3189cfa04e" + "0.2.18": + url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.18.tar.gz" + sha256: "517c361f3b7fffca08efd5ad251a20489794f056eab0dfffacc6d5b341df8e86" "0.2.14": url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.14.tar.gz" sha256: "8737863ced57d92f5a0bdde554bf0fe70eaa76aae118fec09a6c361dfc55d0d5" - "0.2.13": - url: "https://github.com/awslabs/aws-c-compression/archive/v0.2.13.tar.gz" - sha256: "6b6ebb223408b48a8b2c74ba7042ff61e5333dc900acd67c40ca1cd4b382c137" diff --git a/recipes/aws-c-compression/all/conanfile.py b/recipes/aws-c-compression/all/conanfile.py index a6b8eb1260a1b..eda11edf4e93e 100644 --- a/recipes/aws-c-compression/all/conanfile.py +++ b/recipes/aws-c-compression/all/conanfile.py @@ -40,10 +40,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.2.15": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) + if self.version == "0.2.18": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + if self.version == "0.2.14": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-compression/config.yml b/recipes/aws-c-compression/config.yml index aae181600c27e..ddebab3901e18 100644 --- a/recipes/aws-c-compression/config.yml +++ b/recipes/aws-c-compression/config.yml @@ -1,9 +1,5 @@ versions: - "0.2.17": - folder: all - "0.2.15": + "0.2.18": folder: all "0.2.14": folder: all - "0.2.13": - folder: all diff --git a/recipes/aws-c-event-stream/all/conandata.yml b/recipes/aws-c-event-stream/all/conandata.yml index dd1f6736ca7be..63e6c5f58778f 100644 --- a/recipes/aws-c-event-stream/all/conandata.yml +++ b/recipes/aws-c-event-stream/all/conandata.yml @@ -1,26 +1,7 @@ sources: - "0.3.2": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.3.2.tar.gz" - sha256: "3134b35a45e9f9d974c2b78ee44fd2ea0aebc04df80236b80692aa63bee2092e" - "0.3.1": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.3.1.tar.gz" - sha256: "bdbc420efc2572689fb167ac288e982a01224876eb79d80e2411fad4c43e9dc0" - "0.2.15": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.2.15.tar.gz" - sha256: "4ff2ada07ede3c6afa4b8e6e20de541e717038307f29b38c27efa7c4d875ee26" - "0.2.12": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.2.12.tar.gz" - sha256: "cc4ebfe715d8df5b9e3f4a3ce9b67d5f480017a7ebbbfa1d5e64ea53ec672580" - "0.2.11": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.2.11.tar.gz" - sha256: "4818b8d3fe02016fcfdd033c1e9d8f6be07ccaeb38664fe8c31c0fd153ea56e6" + "0.4.2": + url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.4.2.tar.gz" + sha256: "c98b8fa05c2ca10aacfce7327b92a84669c2da95ccb8e7d7b3e3285fcec8beee" "0.2.7": url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.2.7.tar.gz" sha256: "bb5c94cdff70c1985fb0b5f30d81756cedb5a3c3075d37f7e1e2b34e2a33c8c0" - "0.1.5": - url: "https://github.com/awslabs/aws-c-event-stream/archive/v0.1.5.tar.gz" - sha256: "f1b423a487b5d6dca118bfc0d0c6cc596dc476b282258a3228e73a8f730422d4" -patches: - "0.1.5": - - patch_file: "patches/0001-disable-tests-bin.patch" - - patch_file: "patches/0002-use-PROJECT_SOURCE_DIR.patch" diff --git a/recipes/aws-c-event-stream/all/conanfile.py b/recipes/aws-c-event-stream/all/conanfile.py index e7d1df562c48b..7fc076d11b4af 100644 --- a/recipes/aws-c-event-stream/all/conanfile.py +++ b/recipes/aws-c-event-stream/all/conanfile.py @@ -43,19 +43,14 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) < "0.3.1": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-checksums/0.1.13") - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - self.requires("aws-checksums/0.1.17") - if Version(self.version) >= "0.2": - if Version(self.version) < "0.2.11": - self.requires("aws-c-io/0.10.20") - elif Version(self.version) < "0.3.1": - self.requires("aws-c-io/0.13.4") - else: - self.requires("aws-c-io/0.13.35") + if self.version == "0.4.2": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-checksums/0.1.18") + self.requires("aws-c-io/0.14.7") + if self.version == "0.2.7": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-checksums/0.1.12") + self.requires("aws-c-io/0.10.9") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-event-stream/all/patches/0001-disable-tests-bin.patch b/recipes/aws-c-event-stream/all/patches/0001-disable-tests-bin.patch deleted file mode 100644 index 21eae44486c93..0000000000000 --- a/recipes/aws-c-event-stream/all/patches/0001-disable-tests-bin.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -112,14 +112,18 @@ - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" - DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/" - COMPONENT Development) - - --include(CTest) --enable_testing() --add_subdirectory(tests) -+if(BUILD_TESTING) -+ include(CTest) -+ enable_testing() -+ add_subdirectory(tests) -+endif() - - if(NOT MSVC) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) - endif() - --add_subdirectory(bin) -+if(BUILD_BINARIES) -+ add_subdirectory(bin) -+endif() diff --git a/recipes/aws-c-event-stream/all/patches/0002-use-PROJECT_SOURCE_DIR.patch b/recipes/aws-c-event-stream/all/patches/0002-use-PROJECT_SOURCE_DIR.patch deleted file mode 100644 index f2b60bb0f9a1d..0000000000000 --- a/recipes/aws-c-event-stream/all/patches/0002-use-PROJECT_SOURCE_DIR.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -70,25 +70,25 @@ - ${AWS_EVENT_STREAM_SRC} - ) - --add_library(${CMAKE_PROJECT_NAME} ${EVENT_STREAM_SRC}) --aws_set_common_properties(${CMAKE_PROJECT_NAME}) --aws_add_sanitizers(${CMAKE_PROJECT_NAME}) --aws_prepare_symbol_visibility_args(${CMAKE_PROJECT_NAME} "AWS_EVENT_STREAM") -+add_library(${PROJECT_NAME} ${EVENT_STREAM_SRC}) -+aws_set_common_properties(${PROJECT_NAME}) -+aws_add_sanitizers(${PROJECT_NAME}) -+aws_prepare_symbol_visibility_args(${PROJECT_NAME} "AWS_EVENT_STREAM") - --target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC -+target_include_directories(${PROJECT_NAME} PUBLIC - $ - $) - - --set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES VERSION 1.0.0) --set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES SOVERSION 0unstable) -+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION 1.0.0) -+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 0unstable) - - find_package(aws-c-common REQUIRED) - find_package(aws-checksums REQUIRED) - --target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC AWS::aws-c-common AWS::aws-checksums) -+target_link_libraries(${PROJECT_NAME} PUBLIC AWS::aws-c-common AWS::aws-checksums) - --aws_prepare_shared_lib_exports(${CMAKE_PROJECT_NAME}) -+aws_prepare_shared_lib_exports(${PROJECT_NAME}) - - install(FILES ${AWS_EVENT_STREAM_HEADERS} - DESTINATION "include/aws/event-stream" -@@ -100,17 +100,17 @@ - set (TARGET_DIR "static") - endif() - --install(EXPORT "${CMAKE_PROJECT_NAME}-targets" -- DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/${TARGET_DIR}/" -+install(EXPORT "${PROJECT_NAME}-targets" -+ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}/" - NAMESPACE AWS:: - COMPONENT Development) - --configure_file("cmake/${CMAKE_PROJECT_NAME}-config.cmake" -- "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" -+configure_file("cmake/${PROJECT_NAME}-config.cmake" -+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" - @ONLY) - --install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" -- DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/" -+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" -+ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" - COMPONENT Development) - - diff --git a/recipes/aws-c-event-stream/all/test_package/test_package.c b/recipes/aws-c-event-stream/all/test_package/test_package.c index 1b923438da34f..2cb953a451bf1 100644 --- a/recipes/aws-c-event-stream/all/test_package/test_package.c +++ b/recipes/aws-c-event-stream/all/test_package/test_package.c @@ -15,7 +15,7 @@ int main() { int res = aws_event_stream_message_init(&message, allocator, NULL, NULL); if (res != 0) { - fprintf(stderr, "Failed to init messag\n"); + fprintf(stderr, "Failed to init message\n"); } if (sizeof(expected_data) != aws_event_stream_message_total_length(&message)) { @@ -31,5 +31,7 @@ int main() { } } + aws_event_stream_message_clean_up(&message); + return EXIT_SUCCESS; } diff --git a/recipes/aws-c-event-stream/config.yml b/recipes/aws-c-event-stream/config.yml index 38b22762f5273..015334b5552b6 100644 --- a/recipes/aws-c-event-stream/config.yml +++ b/recipes/aws-c-event-stream/config.yml @@ -1,15 +1,5 @@ versions: - "0.3.2": - folder: all - "0.3.1": - folder: all - "0.2.15": - folder: all - "0.2.12": - folder: all - "0.2.11": + "0.4.2": folder: all "0.2.7": folder: all - "0.1.5": - folder: all diff --git a/recipes/aws-c-http/all/conandata.yml b/recipes/aws-c-http/all/conandata.yml index 6ee734ea998ca..515176a226691 100644 --- a/recipes/aws-c-http/all/conandata.yml +++ b/recipes/aws-c-http/all/conandata.yml @@ -2,21 +2,6 @@ sources: "0.8.1": url: "https://github.com/awslabs/aws-c-http/archive/v0.8.1.tar.gz" sha256: "83fb47e2d7956469bb328f16dea96663e96f8f20dc60dc4e9676b82804588530" - "0.7.14": - url: "https://github.com/awslabs/aws-c-http/archive/v0.7.14.tar.gz" - sha256: "afb935395c93427ac0853d6363900a71816a0508f18c86e84da0e6ebe7271429" - "0.6.22": - url: "https://github.com/awslabs/aws-c-http/archive/v0.6.22.tar.gz" - sha256: "a178fd04bd1618469cd21afc5b84cbe436d1f9d9e036fefbd3a8f00356da4d4c" - "0.6.13": - url: "https://github.com/awslabs/aws-c-http/archive/v0.6.13.tar.gz" - sha256: "8c69f8fc58b7073039e598383da3e1fd9b23f392cb992dbe769a7b80f342dbaf" - "0.6.10": - url: "https://github.com/awslabs/aws-c-http/archive/v0.6.10.tar.gz" - sha256: "4413faf2b8f6a83c898bb535cf83542fa548d7ecc1acf681dc79b7959a07231a" "0.6.7": url: "https://github.com/awslabs/aws-c-http/archive/v0.6.7.tar.gz" sha256: "2244d1e26ce5b5f40f96e570b1c4332a07c645ef744644d5b90b089d3695ec3b" - "0.6.5": - url: "https://github.com/awslabs/aws-c-http/archive/v0.6.5.tar.gz" - sha256: "9cb82f1cfe1342f4bbd58f51b74beaeb6a544fb6792c48f9b0d3967619b33221" diff --git a/recipes/aws-c-http/all/conanfile.py b/recipes/aws-c-http/all/conanfile.py index f9311547cb20c..2c2aed337ab03 100644 --- a/recipes/aws-c-http/all/conanfile.py +++ b/recipes/aws-c-http/all/conanfile.py @@ -40,19 +40,15 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.6.22": - self.requires("aws-c-compression/0.2.15") - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - else: - self.requires("aws-c-compression/0.2.17") - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - - if Version(self.version) <= "0.6.13": - self.requires("aws-c-io/0.10.20", transitive_headers=True, transitive_libs=True) - elif Version(self.version) <= "0.6.22": - self.requires("aws-c-io/0.13.4", transitive_headers=True, transitive_libs=True) - else: - self.requires("aws-c-io/0.13.35", transitive_headers=True, transitive_libs=True) + if self.version == "0.8.1": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-compression/0.2.18") + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-io/0.14.7", transitive_headers=True, transitive_libs=True) + if self.version == "0.6.7": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-compression/0.2.14") + self.requires("aws-c-io/0.10.9", transitive_headers=True, transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-http/config.yml b/recipes/aws-c-http/config.yml index 9ef90600a046d..b4cfbdf31c4fc 100644 --- a/recipes/aws-c-http/config.yml +++ b/recipes/aws-c-http/config.yml @@ -1,15 +1,5 @@ versions: "0.8.1": folder: all - "0.7.14": - folder: all - "0.6.22": - folder: all - "0.6.13": - folder: all - "0.6.10": - folder: all "0.6.7": folder: all - "0.6.5": - folder: all diff --git a/recipes/aws-c-io/all/conandata.yml b/recipes/aws-c-io/all/conandata.yml index 1e15f1d87d7c3..60d48a7600965 100644 --- a/recipes/aws-c-io/all/conandata.yml +++ b/recipes/aws-c-io/all/conandata.yml @@ -1,19 +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" - "0.13.4": - url: "https://github.com/awslabs/aws-c-io/archive/v0.13.4.tar.gz" - sha256: "133bd0aa46caa2041962cd4f6d076209686ce2934af82f86d1a258df4cbdce8b" - "0.11.2": - url: "https://github.com/awslabs/aws-c-io/archive/v0.11.2.tar.gz" - sha256: "b60270d23b6e2f4a5d80e64ca6538ba114cd6044b53752964c940f87e59bf0d9" - "0.10.20": - url: "https://github.com/awslabs/aws-c-io/archive/v0.10.20.tar.gz" - sha256: "293248ef96166826370223865bff2537bea5e08f6913919884c53add8238ba97" - "0.10.13": - url: "https://github.com/awslabs/aws-c-io/archive/v0.10.13.tar.gz" - sha256: "ee34a93190e35a5c372ba73661dd69c48986e051a4b26dedb62bc5aa78f1660f" + "0.14.7": + url: "https://github.com/awslabs/aws-c-io/archive/v0.14.7.tar.gz" + sha256: "ecf1f660d7d43913aa8a416be6a2027101ce87c3b241344342d608335b4df7d4" + "0.10.9": + url: "https://github.com/awslabs/aws-c-io/archive/v0.10.9.tar.gz" + sha256: "c64464152abe8b7e23f10bc026ed54a15eaf0ec0aae625d28e2caf4489090327" diff --git a/recipes/aws-c-io/all/conanfile.py b/recipes/aws-c-io/all/conanfile.py index 36c3965b9abd8..a0bc513a7bf85 100644 --- a/recipes/aws-c-io/all/conanfile.py +++ b/recipes/aws-c-io/all/conanfile.py @@ -1,7 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import get, copy, rmdir, save -from conan.tools.scm import Version import os import textwrap @@ -40,17 +39,16 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - # the versions of aws-c-common and aws-c-io are tied since aws-c-common/0.6.12 and aws-c-io/0.10.10 - # Please refer https://github.com/conan-io/conan-center-index/issues/7763 - if Version(self.version) <= "0.13.4": - 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.6", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.6.9", transitive_headers=True, transitive_libs=True) - - if self.settings.os in ["Linux", "FreeBSD", "Android"]: - self.requires("s2n/1.3.55") + if self.version == "0.14.7": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.6.14") + if self.settings.os in ["Linux", "FreeBSD", "Android"]: + self.requires("s2n/1.4.1") + if self.version == "0.10.9": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.5.12") + if self.settings.os in ["Linux", "FreeBSD", "Android"]: + self.requires("s2n/1.3.55") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-io/config.yml b/recipes/aws-c-io/config.yml index 8a602cc8c0e60..659ff80091e7d 100644 --- a/recipes/aws-c-io/config.yml +++ b/recipes/aws-c-io/config.yml @@ -1,13 +1,5 @@ versions: - "0.13.35": + "0.14.7": folder: all - "0.13.32": - folder: all - "0.13.4": - folder: all - "0.11.2": - folder: all - "0.10.20": - folder: all - "0.10.13": + "0.10.9": folder: all diff --git a/recipes/aws-c-mqtt/all/conandata.yml b/recipes/aws-c-mqtt/all/conandata.yml index 275052c56df7c..d212e8cf3426a 100644 --- a/recipes/aws-c-mqtt/all/conandata.yml +++ b/recipes/aws-c-mqtt/all/conandata.yml @@ -1,19 +1,7 @@ sources: - "0.9.10": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.9.10.tar.gz" - sha256: "a8f92cb045e2c1e0b7e87e5c43ca373eb020014b5d3ebd75ed67ffff430d9ab6" - "0.8.12": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.8.12.tar.gz" - sha256: "df02de478ab1806bb57bcb78e5faa21b567716dcb64f8a52ae90a2b84f43cba1" - "0.7.12": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.7.12.tar.gz" - sha256: "cf80f1b4f37aa8a6b8698315fae32cbf2bd944b67784f07b5762f392f18e64df" - "0.7.10": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.7.10.tar.gz" - sha256: "95667477e17bc99d49a1d6674d7fb98f9a0379b6966cb2ed4863152e959d9e8f" - "0.7.9": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.7.9.tar.gz" - sha256: "8556ae7c2b30ebb4ccb61becb120a848ea33315f7cf85436ebe5f21b75ab09c4" - "0.7.6": - url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.7.6.tar.gz" - sha256: "a02c0525f7ddcdc058cd9f507b2f3a8be0383fc946920ed32c9d780cc29703ac" + "0.10.3": + url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.10.3.tar.gz" + sha256: "bb938d794b0757d669b5877526363dc6f6f0e43869ca19fc196ffd0f7a35f5b9" + "0.7.8": + url: "https://github.com/awslabs/aws-c-mqtt/archive/v0.7.8.tar.gz" + sha256: "bf5ed63706f3f1aed86a878462fac78e5f045dfc34567bfb86c38f8b9d9d51ef" diff --git a/recipes/aws-c-mqtt/all/conanfile.py b/recipes/aws-c-mqtt/all/conanfile.py index 4740c4414b3ba..1405aeca68d5a 100644 --- a/recipes/aws-c-mqtt/all/conanfile.py +++ b/recipes/aws-c-mqtt/all/conanfile.py @@ -41,16 +41,16 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.7.12": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.5.13") - self.requires("aws-c-io/0.10.20", transitive_headers=True) - self.requires("aws-c-http/0.6.13") - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.6.9") - self.requires("aws-c-io/0.13.35", transitive_headers=True) - self.requires("aws-c-http/0.7.14") + if self.version == "0.10.3": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-io/0.14.7", transitive_headers=True) + self.requires("aws-c-http/0.8.1") + if self.version == "0.7.8": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-io/0.10.9", transitive_headers=True) + self.requires("aws-c-http/0.6.7") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-mqtt/config.yml b/recipes/aws-c-mqtt/config.yml index 788eeccfb0963..a54bded63fa25 100644 --- a/recipes/aws-c-mqtt/config.yml +++ b/recipes/aws-c-mqtt/config.yml @@ -1,13 +1,5 @@ versions: - "0.9.10": + "0.10.3": folder: all - "0.8.12": - folder: all - "0.7.12": - folder: all - "0.7.10": - folder: all - "0.7.9": - folder: all - "0.7.6": + "0.7.8": folder: all diff --git a/recipes/aws-c-s3/all/conandata.yml b/recipes/aws-c-s3/all/conandata.yml index 2433ee657645c..bacf4d1932974 100644 --- a/recipes/aws-c-s3/all/conandata.yml +++ b/recipes/aws-c-s3/all/conandata.yml @@ -1,19 +1,7 @@ sources: - "0.4.5": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.4.5.tar.gz" - sha256: "c9b588f5761ae6754dab2b51124784be78887f054856f02e44b6e51c25873055" - "0.3.24": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.3.24.tar.gz" - sha256: "09803db4af98bba0af263434e2de432cdccdb3ab709411abba8e05d34840f815" - "0.1.49": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.49.tar.gz" - sha256: "71acbba41a02477a6c352172da561bc2138bf239b936490c773d7aaa83afc9ab" - "0.1.37": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.37.tar.gz" - sha256: "2c35100c1739300e438d47f49aaa2c374001416a79fe3c6f27d79371fb2ac90b" - "0.1.29": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.29.tar.gz" - sha256: "bcbc38d091ad994fec2789bffd1d99e157c5e29a60685e836f028006e531bc60" - "0.1.27": - url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.27.tar.gz" - sha256: "8fccbf967c3b29f0feaa1ba3de158b7ead805c3b4302c45b7cad3429f045920c" + "0.5.5": + url: "https://github.com/awslabs/aws-c-s3/archive/v0.5.5.tar.gz" + sha256: "81d3913826953cb634ef1183a0c241d5e117419a877b625d69d7e1e54bbe5219" + "0.1.26": + url: "https://github.com/awslabs/aws-c-s3/archive/v0.1.26.tar.gz" + sha256: "68467095ce2c523caa9ecac27453cd83f4c195c33c6ab8c8b0fa6534565d19bf" diff --git a/recipes/aws-c-s3/all/conanfile.py b/recipes/aws-c-s3/all/conanfile.py index 1813ec30adc8a..957de6e997292 100644 --- a/recipes/aws-c-s3/all/conanfile.py +++ b/recipes/aws-c-s3/all/conanfile.py @@ -40,28 +40,19 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) < "0.3.24": - 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.6", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.6.9") - if Version(self.version) < "0.1.49": - self.requires("aws-c-auth/0.6.11", transitive_headers=True) - self.requires("aws-c-http/0.6.13") - self.requires("aws-c-io/0.10.20", transitive_headers=True) - elif Version(self.version) < "0.3.24": - self.requires("aws-c-auth/0.6.17", transitive_headers=True) - self.requires("aws-c-http/0.6.22") - self.requires("aws-c-io/0.13.4", transitive_headers=True) - else: - self.requires("aws-c-auth/0.7.8", transitive_headers=True) - self.requires("aws-c-http/0.7.14") - self.requires("aws-c-io/0.13.35", transitive_headers=True) - if Version(self.version) >= "0.3.24": - self.requires("aws-checksums/0.1.17") - elif Version(self.version) >= "0.1.36": - self.requires("aws-checksums/0.1.13") + if self.version == "0.5.5": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-auth/0.7.16", transitive_headers=True) + self.requires("aws-c-http/0.8.1") + self.requires("aws-c-io/0.14.7", transitive_headers=True) + self.requires("aws-checksums/0.1.18") + if self.version == "0.1.26": + self.requires("aws-c-common/0.6.11", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-auth/0.6.4", transitive_headers=True) + self.requires("aws-c-http/0.6.7") + self.requires("aws-c-io/0.10.9", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-s3/config.yml b/recipes/aws-c-s3/config.yml index 9dc59a14978b9..31b0a063a88bd 100644 --- a/recipes/aws-c-s3/config.yml +++ b/recipes/aws-c-s3/config.yml @@ -1,13 +1,5 @@ versions: - "0.4.5": + "0.5.5": folder: all - "0.3.24": - folder: all - "0.1.49": - folder: all - "0.1.37": - folder: all - "0.1.29": - folder: all - "0.1.27": + "0.1.26": folder: all diff --git a/recipes/aws-c-sdkutils/all/conandata.yml b/recipes/aws-c-sdkutils/all/conandata.yml index 4f2cc09884562..36557b2156d5c 100644 --- a/recipes/aws-c-sdkutils/all/conandata.yml +++ b/recipes/aws-c-sdkutils/all/conandata.yml @@ -1,13 +1,4 @@ sources: - "0.1.12": - url: "https://github.com/awslabs/aws-c-sdkutils/archive/v0.1.12.tar.gz" - sha256: "c876c3ce2918f1181c24829f599c8f06e29733f0bd6556d4c4fb523390561316" - "0.1.3": - url: "https://github.com/awslabs/aws-c-sdkutils/archive/v0.1.3.tar.gz" - sha256: "13d99c0877424a8fad40f312762968012dd54ec60a4438fb601ee65ff8b2484b" - "0.1.2": - url: "https://github.com/awslabs/aws-c-sdkutils/archive/refs/tags/v0.1.2.tar.gz" - sha256: "d654670c145212ed3ce0699a988b9f83ebf3e7c44ed74d4d0772dc95ad46b38e" - "0.1.1": - url: "https://github.com/awslabs/aws-c-sdkutils/archive/refs/tags/v0.1.1.tar.gz" - sha256: "201a5f694c912c952f50abab54fa0e576db75ddf6e8710c589896038ff9673f7" + "0.1.15": + url: "https://github.com/awslabs/aws-c-sdkutils/archive/v0.1.15.tar.gz" + sha256: "15fa30b8b0a357128388f2f40ab0ba3df63742fd333cc2f89cb91a9169f03bdc" diff --git a/recipes/aws-c-sdkutils/all/conanfile.py b/recipes/aws-c-sdkutils/all/conanfile.py index e2bfcefef6878..1aca7b380c09d 100644 --- a/recipes/aws-c-sdkutils/all/conanfile.py +++ b/recipes/aws-c-sdkutils/all/conanfile.py @@ -40,10 +40,8 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) <= "0.1.3": - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - else: - self.requires("aws-c-common/0.9.6", transitive_headers=True, transitive_libs=True) + if self.version == "0.1.15": + self.requires("aws-c-common/0.9.15", transitive_headers=True, transitive_libs=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/aws-c-sdkutils/config.yml b/recipes/aws-c-sdkutils/config.yml index c2aa05a42982f..d90a2c03c7832 100644 --- a/recipes/aws-c-sdkutils/config.yml +++ b/recipes/aws-c-sdkutils/config.yml @@ -1,9 +1,3 @@ versions: - "0.1.12": - folder: all - "0.1.3": - folder: all - "0.1.2": - folder: all - "0.1.1": + "0.1.15": folder: all diff --git a/recipes/aws-checksums/all/conandata.yml b/recipes/aws-checksums/all/conandata.yml index 989708680b889..19b138c8eb788 100644 --- a/recipes/aws-checksums/all/conandata.yml +++ b/recipes/aws-checksums/all/conandata.yml @@ -1,27 +1,7 @@ sources: - "0.1.17": - url: "https://github.com/awslabs/aws-checksums/archive/v0.1.17.tar.gz" - sha256: "83c1fbae826631361a529e9565e64a942c412baaec6b705ae5da3f056b97b958" - "0.1.13": - url: "https://github.com/awslabs/aws-checksums/archive/v0.1.13.tar.gz" - sha256: "0f897686f1963253c5069a0e495b85c31635ba146cd3ac38cc2ea31eaf54694d" + "0.1.18": + url: "https://github.com/awslabs/aws-checksums/archive/v0.1.18.tar.gz" + sha256: "bdba9d0a8b8330a89c6b8cbc00b9aa14f403d3449b37ff2e0d96d62a7301b2ee" "0.1.12": url: "https://github.com/awslabs/aws-checksums/archive/v0.1.12.tar.gz" sha256: "394723034b81cc7cd528401775bc7aca2b12c7471c92350c80a0e2fb9d2909fe" - "0.1.11": - url: "https://github.com/awslabs/aws-checksums/archive/v0.1.11.tar.gz" - sha256: "9312e305428655bcea1f81524c3a8f617ce5299b903187047078929e850fb6d4" - "0.1.5": - url: "https://github.com/awslabs/aws-checksums/archive/v0.1.5.tar.gz" - sha256: "6e6bed6f75cf54006b6bafb01b3b96df19605572131a2260fddaf0e87949ced0" -patches: - "0.1.5": - - patch_file: "patches/0001-use-PROJECT_SOURCE_DIR.patch" - patch_description: "use PROJECT_NAME instead of CMAKE_PROJECT_NAME" - patch_type: "conan" - - patch_file: "patches/0002-disable-overriding-fPIC.patch" - patch_description: "disable overriding -fPIC" - patch_type: "conan" - - patch_file: "patches/0003-disable-building-tests.patch" - patch_description: "build no tests" - patch_type: "conan" diff --git a/recipes/aws-checksums/all/conanfile.py b/recipes/aws-checksums/all/conanfile.py index e2711f6d5488f..135cd94267f12 100644 --- a/recipes/aws-checksums/all/conanfile.py +++ b/recipes/aws-checksums/all/conanfile.py @@ -46,10 +46,10 @@ def layout(self): cmake_layout(self, src_folder="src") 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.6", transitive_headers=True) + if self.version == "0.1.18": + self.requires("aws-c-common/0.9.15", transitive_headers=True) + if self.version == "0.1.12": + self.requires("aws-c-common/0.6.11", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -62,7 +62,6 @@ def generate(self): deps.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/aws-checksums/all/patches/0001-use-PROJECT_SOURCE_DIR.patch b/recipes/aws-checksums/all/patches/0001-use-PROJECT_SOURCE_DIR.patch deleted file mode 100644 index 9a309a9f74658..0000000000000 --- a/recipes/aws-checksums/all/patches/0001-use-PROJECT_SOURCE_DIR.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -98,7 +98,7 @@ - target_compile_definitions(aws-checksums PRIVATE "-DDEBUG_BUILD") - endif() - --target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC -+target_include_directories(${PROJECT_NAME} PUBLIC - $ - $) - -@@ -129,7 +129,7 @@ - endif() - - install(FILES ${AWS_CHECKSUMS_HEADERS} DESTINATION "include/aws/checksums") --aws_prepare_shared_lib_exports(${CMAKE_PROJECT_NAME}) -+aws_prepare_shared_lib_exports(${PROJECT_NAME}) - - if (BUILD_SHARED_LIBS) - set (TARGET_DIR "shared") -@@ -137,14 +137,14 @@ - set (TARGET_DIR "static") - endif() - --install(EXPORT "${CMAKE_PROJECT_NAME}-targets" -- DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/${TARGET_DIR}/" -+install(EXPORT "${PROJECT_NAME}-targets" -+ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}/" - NAMESPACE AWS::) - --configure_file("cmake/${CMAKE_PROJECT_NAME}-config.cmake" -- "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" -+configure_file("cmake/${PROJECT_NAME}-config.cmake" -+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" - @ONLY) - --install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" -- DESTINATION "${LIBRARY_DIRECTORY}/${CMAKE_PROJECT_NAME}/cmake/") -+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" -+ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/") - diff --git a/recipes/aws-checksums/all/patches/0002-disable-overriding-fPIC.patch b/recipes/aws-checksums/all/patches/0002-disable-overriding-fPIC.patch deleted file mode 100644 index 31249bcf0671b..0000000000000 --- a/recipes/aws-checksums/all/patches/0002-disable-overriding-fPIC.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -83,9 +83,9 @@ - target_compile_definitions(aws-checksums PRIVATE "-DAWS_CHECKSUMS_EXPORTS") - endif() - --if(NOT MSVC) -- target_compile_options(aws-checksums PRIVATE -fPIC) --endif() -+#if(NOT MSVC) -+# target_compile_options(aws-checksums PRIVATE -fPIC) -+#endif() - - if(BUILD_JNI_BINDINGS) - find_package(JNI) diff --git a/recipes/aws-checksums/all/patches/0003-disable-building-tests.patch b/recipes/aws-checksums/all/patches/0003-disable-building-tests.patch deleted file mode 100644 index f62f7e4733e64..0000000000000 --- a/recipes/aws-checksums/all/patches/0003-disable-building-tests.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -109,7 +109,7 @@ - file(GLOB TESTS ${TEST_HDRS} ${TEST_SRC}) - - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/tests) --add_executable(aws-checksums-tests ${TESTS}) -+add_executable(aws-checksums-tests EXCLUDE_FROM_ALL ${TESTS}) - target_compile_options(aws-checksums-tests PRIVATE ${_FLAGS}) - target_link_libraries(aws-checksums-tests aws-checksums) - set_target_properties(aws-checksums-tests PROPERTIES LINKER_LANGUAGE C) diff --git a/recipes/aws-checksums/config.yml b/recipes/aws-checksums/config.yml index efe23bdebe7e1..932ab94596844 100644 --- a/recipes/aws-checksums/config.yml +++ b/recipes/aws-checksums/config.yml @@ -1,11 +1,5 @@ versions: - "0.1.17": - folder: all - "0.1.13": + "0.1.18": folder: all "0.1.12": folder: all - "0.1.11": - folder: all - "0.1.5": - folder: all diff --git a/recipes/aws-crt-cpp/all/conandata.yml b/recipes/aws-crt-cpp/all/conandata.yml index 9126f56004fa0..a6902dfc92a08 100644 --- a/recipes/aws-crt-cpp/all/conandata.yml +++ b/recipes/aws-crt-cpp/all/conandata.yml @@ -1,29 +1,13 @@ sources: - "0.24.1": - url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.24.1.tar.gz" - sha256: "c627fbc76fc31332801e29872203a11ce0234b7c17e75811277aa913f1550d6f" - "0.17.23": - url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.17.23.tar.gz" - sha256: "28061c3efa493519cfae46e4ea96389f03a81eeec7613d7da861dd8c5f4f6598" - "0.17.12": - url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.17.12.tar.gz" - sha256: "acdd8b83198c5a471f92702bc4101828fe55361005764143704c39acd6f80ffc" - "0.14.3": - url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.14.3.tar.gz" - sha256: "3ea16c43e691bab0c373ba1ad072f6535390c516ebda658dfaf4d074d920e0fb" + "0.26.9": + url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.26.9.tar.gz" + sha256: "5b5760d34fbbfcc971f561296e828de4c788750472fd9bd3ac20068a083620f2" + "0.17.1a": + url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.17.1a.tar.gz" + sha256: "64053c8237e350cfbec24984a3696aaf914bfa64e6200ef19bebe9cf5bb0692b" patches: - "0.24.1": - - patch_file: "patches/0.24.1-fix-cast-error.patch" - patch_description: "fix const cast error" - patch_type: "portability" - - patch_file: "patches/0.24.1-disable-sanitizers.patch" - patch_description: "disable sanitizers" - patch_type: "conan" - "0.17.23": - - patch_file: "patches/0.17.23-fix-cast-error.patch" - patch_description: "fix const cast error" - patch_type: "portability" - "0.17.12": - - patch_file: "patches/0.17.12-fix-cast-error.patch" - patch_description: "fix const cast error" - patch_type: "portability" + "0.17.1a": + - patch_file: "patches/0.17.23-fix-cpp20-windows.patch" + patch_description: "Fixes cpp 20 builds for windows." + patch_type: "bugfix" + patch_source: "https://github.com/awslabs/aws-crt-cpp/pull/364" diff --git a/recipes/aws-crt-cpp/all/conanfile.py b/recipes/aws-crt-cpp/all/conanfile.py index 459770aa822b1..92652a3ebbf87 100644 --- a/recipes/aws-crt-cpp/all/conanfile.py +++ b/recipes/aws-crt-cpp/all/conanfile.py @@ -48,29 +48,31 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) < "0.24.1": - self.requires("aws-c-cal/0.5.13", transitive_headers=True) - self.requires("aws-c-common/0.8.2", transitive_headers=True) - self.requires("aws-checksums/0.1.13") - else: - self.requires("aws-c-cal/0.6.9", transitive_headers=True) - self.requires("aws-c-common/0.9.6", transitive_headers=True) - self.requires("aws-checksums/0.1.17") - if Version(self.version) < "0.17.29": - self.requires("aws-c-auth/0.6.11", transitive_headers=True) + if self.version == "0.26.9": + # From add_subdirectory() calls in https://github.com/awslabs/aws-crt-cpp/blob/v0.26.9/CMakeLists.txt + self.requires("aws-c-common/0.9.15") + self.requires("aws-c-sdkutils/0.1.15") + self.requires("aws-c-io/0.14.7", transitive_headers=True) + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-compression/0.2.18") + self.requires("aws-c-http/0.8.1", transitive_headers=True) + self.requires("aws-c-auth/0.7.16", transitive_headers=True) + self.requires("aws-c-mqtt/0.10.3", transitive_headers=True) + self.requires("aws-checksums/0.1.18") + self.requires("aws-c-event-stream/0.4.2") + self.requires("aws-c-s3/0.5.5") + if self.version == "0.17.1a": + # From add_subdirectory() calls in https://github.com/awslabs/aws-crt-cpp/blob/v0.17.1a/CMakeLists.txt#L95 + self.requires("aws-c-http/0.6.7", transitive_headers=True) + self.requires("aws-c-mqtt/0.7.8", transitive_headers=True) + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-compression/0.2.14") + self.requires("aws-c-auth/0.6.4", transitive_headers=True) + self.requires("aws-c-common/0.6.11") + self.requires("aws-c-io/0.10.9", transitive_headers=True) + self.requires("aws-checksums/0.1.12") self.requires("aws-c-event-stream/0.2.7") - self.requires("aws-c-http/0.6.13", transitive_headers=True) - self.requires("aws-c-io/0.10.20", transitive_headers=True) - self.requires("aws-c-mqtt/0.7.10", transitive_headers=True) - self.requires("aws-c-s3/0.1.37") - else: - self.requires("aws-c-auth/0.7.8", transitive_headers=True) - self.requires("aws-c-event-stream/0.3.1") - self.requires("aws-c-http/0.7.14", transitive_headers=True) - self.requires("aws-c-io/0.13.35", transitive_headers=True) - self.requires("aws-c-mqtt/0.9.10", transitive_headers=True) - self.requires("aws-c-s3/0.3.24") - self.requires("aws-c-sdkutils/0.1.12") + self.requires("aws-c-s3/0.1.26") def validate(self): if self.settings.compiler.get_safe("cppstd"): diff --git a/recipes/aws-crt-cpp/all/patches/0.17.12-fix-cast-error.patch b/recipes/aws-crt-cpp/all/patches/0.17.12-fix-cast-error.patch deleted file mode 100644 index be886c030a52c..0000000000000 --- a/recipes/aws-crt-cpp/all/patches/0.17.12-fix-cast-error.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/source/io/TlsOptions.cpp b/source/io/TlsOptions.cpp -index 9f9f8cf..e9913ef 100644 ---- a/source/io/TlsOptions.cpp -+++ b/source/io/TlsOptions.cpp -@@ -216,7 +216,7 @@ namespace Aws - - if (m_slotId) - { -- options.slot_id = &(*m_slotId); -+ options.slot_id = const_cast(&(*m_slotId)); - } - - if (m_userPin) diff --git a/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cast-error.patch b/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cast-error.patch deleted file mode 100644 index 676d3a87fbac2..0000000000000 --- a/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cast-error.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/source/io/TlsOptions.cpp b/source/io/TlsOptions.cpp -index 3018e4c..eb5e129 100644 ---- a/source/io/TlsOptions.cpp -+++ b/source/io/TlsOptions.cpp -@@ -213,7 +213,7 @@ namespace Aws - - if (m_slotId) - { -- options.slot_id = &(*m_slotId); -+ options.slot_id = const_cast(&(*m_slotId)); - } - - if (m_userPin) diff --git a/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cpp20-windows.patch b/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cpp20-windows.patch new file mode 100644 index 0000000000000..9f32e19e32b8b --- /dev/null +++ b/recipes/aws-crt-cpp/all/patches/0.17.23-fix-cpp20-windows.patch @@ -0,0 +1,28 @@ +From 3216ce53fa7f276ae4407a450cafafa9e809fea1 Mon Sep 17 00:00:00 2001 +From: Sam Bisciglia +Date: Tue, 12 Apr 2022 14:42:26 -0400 +Subject: [PATCH] Fixes cpp 20 builds for windows. (#364) + +--- +diff --git a/include/aws/crt/StringView.h b/include/aws/crt/StringView.h +index a0fec83..dc2f05b 100644 +--- a/include/aws/crt/StringView.h ++++ b/include/aws/crt/StringView.h +@@ -15,7 +15,7 @@ + #include + #include + +-#if __cplusplus >= 201703L || (defined(_MSC_LANG) && _MSC_LANG >= 201703L) ++#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) + # include + #endif + +@@ -53,7 +53,7 @@ namespace Aws + + basic_string_view &operator=(const basic_string_view &) noexcept = default; + +-#if __cplusplus >= 201703L || (defined(_MSC_LANG) && _MSC_LANG >= 201703L) ++#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) + constexpr basic_string_view(const std::basic_string_view &other) noexcept + : m_size(other.size()), m_data(other.data()) + { diff --git a/recipes/aws-crt-cpp/all/patches/0.24.1-disable-sanitizers.patch b/recipes/aws-crt-cpp/all/patches/0.24.1-disable-sanitizers.patch deleted file mode 100644 index bb37fbe98b61a..0000000000000 --- a/recipes/aws-crt-cpp/all/patches/0.24.1-disable-sanitizers.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt.orig 2024-02-23 17:49:55 -+++ CMakeLists.txt 2024-02-23 17:50:20 -@@ -314,7 +314,7 @@ - aws_use_package(aws-c-event-stream) - aws_use_package(aws-c-s3) - --aws_add_sanitizers(${PROJECT_NAME}) -+#aws_add_sanitizers(${PROJECT_NAME}) - - target_link_libraries(${PROJECT_NAME} PUBLIC ${DEP_AWS_LIBS}) - diff --git a/recipes/aws-crt-cpp/all/patches/0.24.1-fix-cast-error.patch b/recipes/aws-crt-cpp/all/patches/0.24.1-fix-cast-error.patch deleted file mode 100644 index 78b3163f7e6d5..0000000000000 --- a/recipes/aws-crt-cpp/all/patches/0.24.1-fix-cast-error.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/source/io/TlsOptions.cpp b/source/io/TlsOptions.cpp -index 6077912..74a55c9 100644 ---- a/source/io/TlsOptions.cpp -+++ b/source/io/TlsOptions.cpp -@@ -219,7 +219,7 @@ namespace Aws - - if (m_slotId) - { -- options.slot_id = &(*m_slotId); -+ options.slot_id = const_cast(&(*m_slotId)); - } - - if (m_userPin) diff --git a/recipes/aws-crt-cpp/config.yml b/recipes/aws-crt-cpp/config.yml index 20f59bce0267f..b1a11f4753b30 100644 --- a/recipes/aws-crt-cpp/config.yml +++ b/recipes/aws-crt-cpp/config.yml @@ -1,9 +1,5 @@ versions: - "0.24.1": + "0.26.9": folder: all - "0.17.23": - folder: all - "0.17.12": - folder: all - "0.14.3": + "0.17.1a": folder: all diff --git a/recipes/aws-lambda-cpp/all/conanfile.py b/recipes/aws-lambda-cpp/all/conanfile.py index 0b0de62c879d3..849efb9333447 100644 --- a/recipes/aws-lambda-cpp/all/conanfile.py +++ b/recipes/aws-lambda-cpp/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile -from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, copy, rmdir +from conan.errors import ConanInvalidConfiguration, ConanException +from conan.tools.files import get, copy, rmdir, load, save, rename from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.scm import Version @@ -72,16 +72,29 @@ def build(self): cmake.configure() cmake.build() + def _extract_cmake_module(self): + cmake_module = load(self, os.path.join(self.source_folder, "cmake", "aws-lambda-runtime-config.cmake")) + start = "set(AWS_LAMBDA_PACKAGING_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/packager)" + start_index = cmake_module.find(start) + if start_index == -1: + raise ConanException("Could not extract aws_lambda_package_target from aws-lambda-runtime-config.cmake file.") + return cmake_module[start_index:] + def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) cmake.install() + + save(self, os.path.join(self.package_folder, "lib", "cmake", "aws_lambda_package_target.cmake"), self._extract_cmake_module()) + rename(self, os.path.join(self.package_folder, "lib", "aws-lambda-runtime", "cmake", "packager"), os.path.join(self.package_folder, "lib", "cmake", "packager")) rmdir(self, os.path.join(self.package_folder, "lib", "aws-lambda-runtime")) def package_info(self): self.cpp_info.libs = ["aws-lambda-runtime"] + self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) self.cpp_info.set_property("cmake_file_name", "aws-lambda-runtime") self.cpp_info.set_property("cmake_target_name", "AWS::aws-lambda-runtime") + self.cpp_info.set_property("cmake_build_modules", [os.path.join("lib", "cmake", "aws_lambda_package_target.cmake")]) self.cpp_info.system_libs.append("m") diff --git a/recipes/aws-lambda-cpp/all/test_package/CMakeLists.txt b/recipes/aws-lambda-cpp/all/test_package/CMakeLists.txt index 073c5e204a51e..1821ed75da1ec 100644 --- a/recipes/aws-lambda-cpp/all/test_package/CMakeLists.txt +++ b/recipes/aws-lambda-cpp/all/test_package/CMakeLists.txt @@ -6,3 +6,7 @@ find_package(aws-lambda-runtime REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE AWS::aws-lambda-runtime) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) + +if(NOT COMMAND aws_lambda_package_target) + message(FATAL_ERROR "aws_lambda_package_target should have been defined as part of find_package(aws-lambda-runtime)") +endif() diff --git a/recipes/aws-sdk-cpp/all/conandata.yml b/recipes/aws-sdk-cpp/all/conandata.yml index 5818aef791db0..e0488a5541cdd 100644 --- a/recipes/aws-sdk-cpp/all/conandata.yml +++ b/recipes/aws-sdk-cpp/all/conandata.yml @@ -2,27 +2,9 @@ sources: "1.9.234": url: "https://github.com/aws/aws-sdk-cpp/archive/1.9.234.tar.gz" sha256: "52e36cf568fe0b2a0fc82a9333c0b31ba843db16670f4ccbb7b9fd142f1b00a5" - "1.9.100": - url: "https://github.com/aws/aws-sdk-cpp/archive/1.9.100.tar.gz" - sha256: "f0930d14ec92b9ddf1e3c966d9a3fe70d2a01b80e79e3e76da78d108bb81e5c4" - "1.8.130": - url: "https://github.com/aws/aws-sdk-cpp/archive/1.8.130.tar.gz" - sha256: "5dd09baa28d3f6f4fb03fbba1a4269724d79bcca3d47752cd3e15caf97276bda" patches: "1.9.234": - patch_file: patches/1.9.234-0001-issue-1816.patch - patch_file: patches/1.9.234-0002-disable-sort-links.patch - patch_file: patches/1.9.100-0002-aws-plugin-conf.patch - patch_file: patches/1.8.130-0004-improve-pulseaudio-detection.patch - "1.9.100": - - patch_file: patches/1.9.100-0001-disable-sort-links.patch - - patch_file: patches/1.9.100-0002-aws-plugin-conf.patch - - patch_file: patches/1.9.100-0003-issue-1816.patch - - patch_file: patches/1.8.130-0004-improve-pulseaudio-detection.patch - "1.8.130": - - patch_file: patches/1.8.130-0001-disable-sort-links.patch - - patch_file: patches/1.8.130-0002-force-archive-directory-to-library-directory.patch - - patch_file: patches/1.8.130-0003-disable-cmake-install-rpath-use-link-path.patch - - patch_file: patches/1.8.130-0004-improve-pulseaudio-detection.patch - - patch_file: patches/1.8.130-0005-aws-plugin-conf.patch - - patch_file: patches/1.8.130-0006-issue-1816.patch diff --git a/recipes/aws-sdk-cpp/all/conanfile.py b/recipes/aws-sdk-cpp/all/conanfile.py index 678d3e32eb8c9..b122f2d6fdd0e 100644 --- a/recipes/aws-sdk-cpp/all/conanfile.py +++ b/recipes/aws-sdk-cpp/all/conanfile.py @@ -320,18 +320,12 @@ def _internal_requirements(self): "transfer": ["s3"], } - @property - def _use_aws_crt_cpp(self): - return Version(self.version) >= "1.9" - def export_sources(self): export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if Version(self.version) < "1.9": - self.options.rm_safe("s3-crt") def configure(self): if self.options.shared: @@ -341,14 +335,26 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("aws-c-common/0.8.2") - self.requires("aws-c-event-stream/0.2.7") - self.requires("aws-checksums/0.1.13") - if self._use_aws_crt_cpp: - self.requires("aws-c-cal/0.5.13") - self.requires("aws-c-http/0.6.13") - self.requires("aws-c-io/0.10.20") - self.requires("aws-crt-cpp/0.17.23", transitive_headers=True) + if self.version == "1.11.352": + self.requires("aws-c-common/0.9.15") + self.requires("aws-c-event-stream/0.4.2") + self.requires("aws-checksums/0.1.18") + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-http/0.8.1") + self.requires("aws-c-io/0.14.7") + self.requires("aws-crt-cpp/0.26.9", transitive_headers=True) + if self.options.get_safe("s3-crt"): + self.requires("aws-c-s3/0.5.5") + if self.version == "1.9.234": + self.requires("aws-c-common/0.6.11") + self.requires("aws-c-event-stream/0.2.7") + self.requires("aws-checksums/0.1.12") + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-http/0.6.7") + self.requires("aws-c-io/0.10.9") + self.requires("aws-crt-cpp/0.17.1a", transitive_headers=True) + if self.options.get_safe("s3-crt"): + self.requires("aws-c-s3/0.1.26") if self.settings.os != "Windows": self.requires("openssl/[>=1.1 <4]") self.requires("libcurl/[>=7.78.0 <9]") @@ -364,17 +370,8 @@ def validate(self): "Doesn't support gcc5 / shared. " "See https://github.com/conan-io/conan-center-index/pull/4401#issuecomment-802631744" ) - if (Version(self.version) < "1.9.234" - and self.settings.compiler == "gcc" - and Version(self.settings.compiler.version) >= "11.0" - and self.settings.build_type == "Release"): - raise ConanInvalidConfiguration( - "Versions prior to 1.9.234 don't support release builds on >= gcc 11 " - "See https://github.com/aws/aws-sdk-cpp/issues/1505" - ) - if self._use_aws_crt_cpp: - if is_msvc(self) and is_msvc_static_runtime(self): - raise ConanInvalidConfiguration("Static runtime is not working for more recent releases") + if is_msvc(self) and is_msvc_static_runtime(self): + raise ConanInvalidConfiguration("Static runtime is not working for more recent releases") else: if self.settings.os == "Macos" and self.settings.arch == "armv8": raise ConanInvalidConfiguration( @@ -410,7 +407,7 @@ def generate(self): tc.cache_variables["ENABLE_OPENSSL_ENCRYPTION"] = True tc.cache_variables["MINIMIZE_SIZE"] = self.options.min_size - if is_msvc(self) and not self._use_aws_crt_cpp: + if is_msvc(self): tc.cache_variables["FORCE_SHARED_CRT"] = not is_msvc_static_runtime(self) if cross_building(self): @@ -429,10 +426,11 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) # Disable warnings as errors - replace_in_file( - self, os.path.join(self.source_folder, "cmake", "compiler_settings.cmake"), - 'list(APPEND AWS_COMPILER_WARNINGS "-Wall" "-Werror" "-pedantic" "-Wextra")', "", - ) + if self.version == "1.9.234": + replace_in_file( + self, os.path.join(self.source_folder, "cmake", "compiler_settings.cmake"), + 'list(APPEND AWS_COMPILER_WARNINGS "-Wall" "-Werror" "-pedantic" "-Wextra")', "", + ) def build(self): self._patch_sources() @@ -498,13 +496,12 @@ def package_info(self): "aws-c-event-stream::aws-c-event-stream", "aws-checksums::aws-checksums", ] - if self._use_aws_crt_cpp: - self.cpp_info.components["core"].requires.extend([ - "aws-c-cal::aws-c-cal", - "aws-c-http::aws-c-http", - "aws-c-io::aws-c-io", - "aws-crt-cpp::aws-crt-cpp", - ]) + self.cpp_info.components["core"].requires.extend([ + "aws-c-cal::aws-c-cal", + "aws-c-http::aws-c-http", + "aws-c-io::aws-c-io", + "aws-crt-cpp::aws-crt-cpp", + ]) # other components enabled_sdks = [sdk for sdk in self._sdks if self.options.get_safe(sdk)] @@ -548,6 +545,9 @@ def package_info(self): if self.options.get_safe("text-to-speech"): self.cpp_info.components["text-to-speech"].requires.append("pulseaudio::pulseaudio") + if self.options.get_safe("s3-crt"): + self.cpp_info.components["s3-crt"].requires.append("aws-c-s3::aws-c-s3") + if self.settings.os == "Macos": if self.options.get_safe("text-to-speech"): self.cpp_info.components["text-to-speech"].frameworks.append("CoreAudio") diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0001-disable-sort-links.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0001-disable-sort-links.patch deleted file mode 100644 index bd8fbce5589dc..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0001-disable-sort-links.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/sdks.cmake b/cmake/sdks.cmake -index 975281faaa..ebedbcc6e5 100644 ---- a/cmake/sdks.cmake -+++ b/cmake/sdks.cmake -@@ -236,7 +236,7 @@ function(add_sdks) - - # the catch-all config needs to list all the targets in a dependency-sorted order - include(dependencies) -- sort_links(EXPORTS) -+ # sort_links(EXPORTS) - - # make an everything config by just including all the individual configs - file(WRITE ${CMAKE_BINARY_DIR}/aws-sdk-cpp-config.cmake "") diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0002-force-archive-directory-to-library-directory.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0002-force-archive-directory-to-library-directory.patch deleted file mode 100644 index ae9310e5bb684..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0002-force-archive-directory-to-library-directory.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a653e38628..6761052856 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -295,11 +295,7 @@ if (CMAKE_INSTALL_INCLUDEDIR) - set(INCLUDE_DIRECTORY "${CMAKE_INSTALL_INCLUDEDIR}") - endif() - --if(BUILD_SHARED_LIBS) -- set(ARCHIVE_DIRECTORY "${BINARY_DIRECTORY}") --else() -- set(ARCHIVE_DIRECTORY "${LIBRARY_DIRECTORY}") --endif() -+set(ARCHIVE_DIRECTORY "${LIBRARY_DIRECTORY}") - - if (ENABLE_ADDRESS_SANITIZER) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -g -fno-omit-frame-pointer") diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0003-disable-cmake-install-rpath-use-link-path.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0003-disable-cmake-install-rpath-use-link-path.patch deleted file mode 100644 index 6f85ba392127f..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0003-disable-cmake-install-rpath-use-link-path.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a653e38628..4aac800fde 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -142,7 +142,7 @@ else() - endif() - - # Add Linker search paths to RPATH so as to fix the problem where some linkers can't find cross-compiled dependent libraries in customer paths when linking executables. --set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true) -+# set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true) - - # build third-party targets - if (BUILD_DEPS) diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0005-aws-plugin-conf.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0005-aws-plugin-conf.patch deleted file mode 100644 index b3eccfe69cc45..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0005-aws-plugin-conf.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit 1179cb040d6b9292d30eb7d444298cd286f9f574 -Author: dvirtz -Date: Tue Nov 16 21:38:45 2021 +0200 - - add a file to configure SDK plugins - -diff --git a/cmake/sdk_plugin_conf.cmake b/cmake/sdk_plugin_conf.cmake -new file mode 100644 -index 0000000000..474ead75bd ---- /dev/null -+++ b/cmake/sdk_plugin_conf.cmake -@@ -0,0 +1,32 @@ -+get_filename_component(AWS_NATIVE_SDK_ROOT ${CMAKE_CURRENT_LIST_DIR} DIRECTORY) -+set(SIMPLE_INSTALL TRUE) -+ -+if (CMAKE_INSTALL_BINDIR) -+ set(BINARY_DIRECTORY "${CMAKE_INSTALL_BINDIR}") -+endif() -+ -+if (CMAKE_INSTALL_LIBDIR) -+ set(LIBRARY_DIRECTORY "${CMAKE_INSTALL_LIBDIR}") -+endif() -+ -+if (CMAKE_INSTALL_INCLUDEDIR) -+ set(INCLUDE_DIRECTORY "${CMAKE_INSTALL_INCLUDEDIR}") -+endif() -+ -+if(BUILD_SHARED_LIBS) -+ set(ARCHIVE_DIRECTORY "${BINARY_DIRECTORY}") -+else() -+ set(ARCHIVE_DIRECTORY "${LIBRARY_DIRECTORY}") -+endif() -+ -+if(DEFINED CMAKE_CXX_STANDARD) -+ set(STANDARD_DEFAULT ${CMAKE_CXX_STANDARD}) -+else() -+ set(STANDARD_DEFAULT "11") -+endif() -+set(CPP_STANDARD ${STANDARD_DEFAULT} CACHE STRING "Flag to upgrade the C++ standard used. The default is 11. The minimum is 11.") -+ -+include(CMakePackageConfigHelpers) -+include(initialize_project_version) -+include(utilities) -+include(compiler_settings) diff --git a/recipes/aws-sdk-cpp/all/patches/1.8.130-0006-issue-1816.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0006-issue-1816.patch deleted file mode 100644 index 6abce1b705a47..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0006-issue-1816.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -index c633f3fabe..abb1ab7332 100644 ---- aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -+++ aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -@@ -146,7 +146,6 @@ namespace Aws - AWS_LOGSTREAM_TRACE(CLASS_TAG, "Audio retrieved from Polly. " << result.GetContentType() << " with " - << result.GetRequestCharacters() << " characters syntesized"); - -- std::streamsize amountRead(0); - unsigned char buffer[BUFF_SIZE]; - - std::lock_guard m(m_driverLock); -@@ -159,7 +158,6 @@ namespace Aws - AWS_LOGSTREAM_TRACE(CLASS_TAG, "Writing " << read << " bytes to device."); - - successfullyPlayed = m_activeDriver->WriteBufferToDevice(buffer, (std::size_t)read); -- amountRead += read; - played = successfullyPlayed; - } - diff --git a/recipes/aws-sdk-cpp/all/patches/1.9.100-0001-disable-sort-links.patch b/recipes/aws-sdk-cpp/all/patches/1.9.100-0001-disable-sort-links.patch deleted file mode 100644 index 6e93f7675b327..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.9.100-0001-disable-sort-links.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/sdks.cmake b/cmake/sdks.cmake -index 0ec9981ddf..d86a9f4874 100644 ---- a/cmake/sdks.cmake -+++ b/cmake/sdks.cmake -@@ -250,7 +250,7 @@ function(add_sdks) - - # the catch-all config needs to list all the targets in a dependency-sorted order - include(dependencies) -- sort_links(EXPORTS) -+ #sort_links(EXPORTS) - - # make an everything config by just including all the individual configs - file(WRITE ${CMAKE_BINARY_DIR}/aws-sdk-cpp-config.cmake "") diff --git a/recipes/aws-sdk-cpp/all/patches/1.9.100-0003-issue-1816.patch b/recipes/aws-sdk-cpp/all/patches/1.9.100-0003-issue-1816.patch deleted file mode 100644 index 6abce1b705a47..0000000000000 --- a/recipes/aws-sdk-cpp/all/patches/1.9.100-0003-issue-1816.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -index c633f3fabe..abb1ab7332 100644 ---- aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -+++ aws-cpp-sdk-text-to-speech/source/text-to-speech/TextToSpeechManager.cpp -@@ -146,7 +146,6 @@ namespace Aws - AWS_LOGSTREAM_TRACE(CLASS_TAG, "Audio retrieved from Polly. " << result.GetContentType() << " with " - << result.GetRequestCharacters() << " characters syntesized"); - -- std::streamsize amountRead(0); - unsigned char buffer[BUFF_SIZE]; - - std::lock_guard m(m_driverLock); -@@ -159,7 +158,6 @@ namespace Aws - AWS_LOGSTREAM_TRACE(CLASS_TAG, "Writing " << read << " bytes to device."); - - successfullyPlayed = m_activeDriver->WriteBufferToDevice(buffer, (std::size_t)read); -- amountRead += read; - played = successfullyPlayed; - } - diff --git a/recipes/aws-sdk-cpp/config.yml b/recipes/aws-sdk-cpp/config.yml index 3af57130465e4..aeb73ff8f53ec 100644 --- a/recipes/aws-sdk-cpp/config.yml +++ b/recipes/aws-sdk-cpp/config.yml @@ -1,7 +1,3 @@ versions: "1.9.234": folder: "all" - "1.9.100": - folder: "all" - "1.8.130": - folder: "all" diff --git a/recipes/azure-sdk-for-cpp/all/CMakeLists.txt b/recipes/azure-sdk-for-cpp/all/CMakeLists.txt new file mode 100644 index 0000000000000..46e5bc05a5d70 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/CMakeLists.txt @@ -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() diff --git a/recipes/azure-sdk-for-cpp/all/conandata.yml b/recipes/azure-sdk-for-cpp/all/conandata.yml new file mode 100644 index 0000000000000..62ba6f53644b1 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/conandata.yml @@ -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" diff --git a/recipes/azure-sdk-for-cpp/all/conanfile.py b/recipes/azure-sdk-for-cpp/all/conanfile.py new file mode 100644 index 0000000000000..48f2abf1a5de9 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/conanfile.py @@ -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] diff --git a/recipes/azure-sdk-for-cpp/all/test_package/CMakeLists.txt b/recipes/azure-sdk-for-cpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..8347b50cbb47d --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/CMakeLists.txt @@ -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) diff --git a/recipes/azure-sdk-for-cpp/all/test_package/conanfile.py b/recipes/azure-sdk-for-cpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..2dfe88d001d05 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/conanfile.py @@ -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") diff --git a/recipes/azure-sdk-for-cpp/all/test_package/test_azure-core.cc b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-core.cc new file mode 100644 index 0000000000000..bfd5501b81141 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-core.cc @@ -0,0 +1,10 @@ +#include +#include + +int main() +{ + std::vector data = {1, 2, 3, 4}; + Azure::Core::IO::MemoryBodyStream stream(data); + + return 0; +} diff --git a/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-blobs.cc b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-blobs.cc new file mode 100644 index 0000000000000..23cc6b485edbc --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-blobs.cc @@ -0,0 +1,10 @@ +#include + +using namespace Azure::Storage::Blobs; + +int main() +{ + BlobAudience audience{"TEST"}; + + return 0; +} diff --git a/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-common.cc b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-common.cc new file mode 100644 index 0000000000000..5fdbe6d99f6dc --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-common.cc @@ -0,0 +1,10 @@ +#include + +using namespace Azure::Storage; + +int main() +{ + ContentHash contentHash{}; + + return 0; +} diff --git a/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-files-shares.cc b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-files-shares.cc new file mode 100644 index 0000000000000..00034be2a0119 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/all/test_package/test_azure-storage-files-shares.cc @@ -0,0 +1,10 @@ +#include + +using namespace Azure::Storage::Files::Shares; + +int main() +{ + SetSharePropertiesOptions options; + + return 0; +} diff --git a/recipes/azure-sdk-for-cpp/config.yml b/recipes/azure-sdk-for-cpp/config.yml new file mode 100644 index 0000000000000..dc736edb41043 --- /dev/null +++ b/recipes/azure-sdk-for-cpp/config.yml @@ -0,0 +1,3 @@ +versions: + "1.11.3": + folder: "all" diff --git a/recipes/azure-storage-cpp/all/CMakeLists.txt b/recipes/azure-storage-cpp/all/CMakeLists.txt index 82ba25e8c2576..3d130cd5365bf 100644 --- a/recipes/azure-storage-cpp/all/CMakeLists.txt +++ b/recipes/azure-storage-cpp/all/CMakeLists.txt @@ -1,7 +1,16 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.15) project(cmake_wrapper) -include(conanbuildinfo.cmake) -conan_basic_setup() +find_package(cpprestsdk REQUIRED) +find_package(OpenSSL REQUIRED) +find_package(LibXml2 REQUIRED) +find_package(UUID QUIET) -add_subdirectory("source_subfolder/Microsoft.WindowsAzure.Storage") +add_subdirectory(src/Microsoft.WindowsAzure.Storage) + +target_link_libraries(azurestorage + cpprestsdk::cpprestsdk + OpenSSL::SSL + LibXml2::LibXml2 + $ +) diff --git a/recipes/azure-storage-cpp/all/conandata.yml b/recipes/azure-storage-cpp/all/conandata.yml index ccef8ba8c5bd6..5ce9572d0f722 100644 --- a/recipes/azure-storage-cpp/all/conandata.yml +++ b/recipes/azure-storage-cpp/all/conandata.yml @@ -4,5 +4,7 @@ sources: sha256: "446a821d115949f6511b7eb01e6a0e4f014b17bfeba0f3dc33a51750a9d5eca5" patches: "7.5.0": - - base_path: source_subfolder - patch_file: patches/0001-cmake-fixes.patch + - patch_file: "patches/fix-cpp17-incompatibility.patch" + patch_description: "Fix a minor C++17 incompatibility in util.cpp" + patch_type: "portability" + patch_source: "https://patch-diff.githubusercontent.com/raw/Azure/azure-storage-cpp/pull/366" diff --git a/recipes/azure-storage-cpp/all/conanfile.py b/recipes/azure-storage-cpp/all/conanfile.py index 92f05a255ac83..abe044bfc3367 100644 --- a/recipes/azure-storage-cpp/all/conanfile.py +++ b/recipes/azure-storage-cpp/all/conanfile.py @@ -1,19 +1,27 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd, valid_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, export_conandata_patches, apply_conandata_patches +from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + class AzureStorageCppConan(ConanFile): name = "azure-storage-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-storage-cpp" - description = "Microsoft Azure Storage Client Library for C++" topics = ("azure", "cpp", "cross-platform", "microsoft", "cloud") - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" - exports_sources = ["CMakeLists.txt", "patches/**"] + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -22,16 +30,6 @@ class AzureStorageCppConan(ConanFile): "shared": False, "fPIC": True, } - short_paths = True - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" @property def _minimum_cpp_standard(self): @@ -40,41 +38,16 @@ def _minimum_cpp_standard(self): @property def _minimum_compiler_version(self): return { - "gcc": "5", + "gcc": "6", "Visual Studio": "14", + "msvc": "190", "clang": "3.4", "apple-clang": "5.1", } - def requirements(self): - self.requires("cpprestsdk/2.10.18") - if self.settings.os != "Windows": - self.requires("boost/1.76.0") - self.requires("libxml2/2.9.10") - self.requires("util-linux-libuuid/2.39") - if self.settings.os == "Macos": - self.requires("libgettext/0.20.1") - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - - self._cmake.definitions["CMAKE_FIND_FRAMEWORK"] = "LAST" - self._cmake.definitions["BUILD_TESTS"] = False - self._cmake.definitions["BUILD_SAMPLES"] = False - if not self.settings.compiler.cppstd: - self._cmake.definitions["CMAKE_CXX_STANDARD"] = self._minimum_cpp_standard - - if self.settings.os == "Macos": - self._cmake.definitions["GETTEXT_LIB_DIR"] = self.deps_cpp_info["libgettext"].lib_paths[0] - - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -82,42 +55,100 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("cpprestsdk/2.10.19", transitive_headers=True, transitive_libs=True) + self.requires("libxml2/[>=2.12.5 <3]", transitive_headers=True, transitive_libs=True) + if self.settings.os != "Windows": + # Boost.Asio is used in a public header here: + # https://github.com/Azure/azure-storage-cpp/blob/v7.5.0/Microsoft.WindowsAzure.Storage/includes/wascore/timer_handler.h#L27 + self.requires("boost/1.83.0", transitive_headers=True, transitive_libs=True) + self.requires("util-linux-libuuid/2.39.2", transitive_headers=True, transitive_libs=True) + self.requires("openssl/[>=1.1 <4]") + if is_apple_os(self): + self.requires("libgettext/0.22") def validate(self): if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, self._minimum_cpp_standard) + check_min_cppstd(self, self._minimum_cpp_standard) min_version = self._minimum_compiler_version.get(str(self.settings.compiler)) if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format( - self.name, self.settings.compiler)) + self.output.warning( + f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support." + ) else: - if tools.Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( - self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) + if Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration( + f"{self.name} requires C++{self._minimum_cpp_standard} support. The current compiler" + f" {self.settings.compiler} {self.settings.compiler.version} does not support it." + ) # FIXME: Visual Studio 2015 & 2017 are supported but CI of CCI lacks several Win SDK components # https://github.com/conan-io/conan-center-index/issues/4195 - if self.settings.compiler == "Visual Studio" and tools.Version(self.settings.compiler.version) < "16": + if not check_min_vs(self, 192, raise_invalid=False): raise ConanInvalidConfiguration("Visual Studio < 2019 not yet supported in this recipe") - if self.settings.compiler == "Visual Studio" and self.options.shared and "MT" in self.settings.compiler.runtime: + if self.options.shared and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("Visual Studio build for shared library with MT runtime is not supported") + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_FIND_FRAMEWORK"] = "LAST" + tc.variables["BUILD_TESTS"] = False + tc.variables["BUILD_SAMPLES"] = False + if is_apple_os(self): + tc.variables["GETTEXT_LIB_DIR"] = self.dependencies["libgettext"].cpp_info.libdir + if not valid_min_cppstd(self, self._minimum_cpp_standard): + tc.variables["CMAKE_CXX_STANDARD"] = self._minimum_cpp_standard + # Allow non-cache_variables to be used + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + # Relocatable shared libs on macOS + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("util-linux-libuuid", "cmake_file_name", "UUID") + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + cmakelists_path = os.path.join(self.source_folder, "Microsoft.WindowsAzure.Storage", "CMakeLists.txt") + # Do not force C++11 and libc++ + replace_in_file(self, cmakelists_path, "-std=c++11", "") + replace_in_file(self, cmakelists_path, "-stdlib=libc++", "") + # Let Conan handle the Boost defines + replace_in_file(self, cmakelists_path, "add_definitions(-DBOOST_LOG_DYN_LINK)", "") + def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() + self._patch_sources() + cmake = CMake(self) + cmake.configure(build_script_folder=self.source_path.parent) cmake.build() def package(self): - self.copy("LICENSE.txt", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): - - self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Windows": + # https://github.com/Azure/azure-storage-cpp/blob/v7.5.0/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt#L100 + self.cpp_info.libs = ["wastorage"] + # https://github.com/Azure/azure-storage-cpp/blob/v7.5.0/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt#L90 self.cpp_info.system_libs = ["ws2_32", "rpcrt4", "xmllite", "bcrypt"] - if not self.options.shared: - self.cpp_info.defines = ["_NO_WASTORAGE_API"] + if is_msvc(self): + # https://github.com/Azure/azure-storage-cpp/blob/v7.5.0/Microsoft.WindowsAzure.Storage/CMakeLists.txt#L116-L120 + if self.options.shared: + self.cpp_info.defines = ["WASTORAGE_DLL", "_USRDLL"] + else: + self.cpp_info.defines = ["_NO_WASTORAGE_API"] + else: + self.cpp_info.libs = ["azurestorage"] diff --git a/recipes/azure-storage-cpp/all/patches/0001-cmake-fixes.patch b/recipes/azure-storage-cpp/all/patches/0001-cmake-fixes.patch deleted file mode 100644 index c775329eb84fe..0000000000000 --- a/recipes/azure-storage-cpp/all/patches/0001-cmake-fixes.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index ac9e65d..f5988f6 100644 ---- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt -+++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -@@ -46,9 +46,9 @@ if(UNIX) - find_package(OpenSSL 1.0.0 REQUIRED) - - -- find_package(UUID REQUIRED) -- find_package(Casablanca REQUIRED) -- find_package(LibXML2 REQUIRED) -+ find_package(libuuid REQUIRED) -+ find_package(cpprestsdk REQUIRED) -+ find_package(LibXml2 REQUIRED) - - if(BUILD_TESTS) - find_package(UnitTest++ REQUIRED) -@@ -57,7 +57,7 @@ if(UNIX) - - elseif(WIN32) - message("-- Setting WIN32 options") -- find_package(Casablanca REQUIRED) -+ find_package(cpprestsdk REQUIRED) - add_definitions(-DUNICODE -D_UNICODE -D_WIN32) - else() - message("-- Unsupported Build Platform.") -@@ -85,13 +85,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - - set(LD_FLAGS "${LD_FLAGS} -Wl,-z,defs") - -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") - - set(STRICT_CXX_FLAGS ${WARNINGS} "-Werror -pedantic") - -- if (BUILD_SHARED_LIBS) -- add_definitions(-DBOOST_LOG_DYN_LINK) -- endif() - add_definitions(-D_TURN_OFF_PLATFORM_STRING) - elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - message("-- Setting clang options") -@@ -100,14 +97,11 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - set(OSX_SUPPRESSIONS "-Wno-overloaded-virtual -Wno-sign-conversion -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-char-subscripts -Wno-switch -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated -Wno-unused-value -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-unused-function -Wno-sign-compare -Wno-shorten-64-to-32 -Wno-reorder -Wno-unused-local-typedefs") - set(WARNINGS "${WARNINGS} ${OSX_SUPPRESSIONS}") - -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration") - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11") - -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing") -- if (BUILD_SHARED_LIBS) -- add_definitions(-DBOOST_LOG_DYN_LINK) -- endif() -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") - add_definitions(-D_TURN_OFF_PLATFORM_STRING) - elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - message("-- Setting MSVC options") -@@ -142,11 +136,11 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) - - set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes) --set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${LibXML2_INCLUDE_DIR}) -+set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${cpprestsdk_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OpenSSL_INCLUDE_DIRS} ${libuuid_INCLUDE_DIRS} ${LibXml2_INCLUDE_DIR}) - - - set(AZURESTORAGE_LIBRARY azurestorage) --set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${UUID_LIBRARIES} ${LibXML2_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) -+set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${cpprestsdk_LIBRARIES} ${Boost_LIBRARIES} ${OpenSSL_LIBRARIES} ${libuuid_LIBRARIES} ${LibXml2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) - - # Set version numbers centralized - set (AZURESTORAGE_VERSION_MAJOR 7) diff --git a/recipes/azure-storage-cpp/all/patches/fix-cpp17-incompatibility.patch b/recipes/azure-storage-cpp/all/patches/fix-cpp17-incompatibility.patch new file mode 100644 index 0000000000000..23af9f8243be8 --- /dev/null +++ b/recipes/azure-storage-cpp/all/patches/fix-cpp17-incompatibility.patch @@ -0,0 +1,51 @@ +From b81d6349d3f6c05741978bab9b07372150c85137 Mon Sep 17 00:00:00 2001 +From: Adam Mensel +Date: Mon, 31 Aug 2020 19:44:24 -0600 +Subject: [PATCH 1/2] Use lambdas instead of std::fun_ptr, to get free C++17 + compatibility. + +--- + Microsoft.WindowsAzure.Storage/src/util.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Microsoft.WindowsAzure.Storage/src/util.cpp b/Microsoft.WindowsAzure.Storage/src/util.cpp +index cf0a3116..2d0d540c 100644 +--- a/Microsoft.WindowsAzure.Storage/src/util.cpp ++++ b/Microsoft.WindowsAzure.Storage/src/util.cpp +@@ -334,8 +334,8 @@ namespace azure { namespace storage { namespace core { + + utility::string_t str_trim_starting_trailing_whitespaces(const utility::string_t& str) + { +- auto non_space_begin = std::find_if(str.begin(), str.end(), std::not1(std::ptr_fun(isspace))); +- auto non_space_end = std::find_if(str.rbegin(), str.rend(), std::not1(std::ptr_fun(isspace))).base(); ++ auto non_space_begin = std::find_if(str.begin(), str.end(), [](char c) { return !std::isspace(c); }); ++ auto non_space_end = std::find_if(str.rbegin(), str.rend(), [](char c) { return !std::isspace(c); }).base(); + return utility::string_t(non_space_begin, non_space_end); + } + + +From b71db982b9f7065494c950c558f7e30b89026a89 Mon Sep 17 00:00:00 2001 +From: Adam Mensel +Date: Mon, 31 Aug 2020 23:02:29 -0600 +Subject: [PATCH 2/2] Keep the exact same logic as before, but still using a + lambda instead of std::fun_ptr. + +--- + Microsoft.WindowsAzure.Storage/src/util.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Microsoft.WindowsAzure.Storage/src/util.cpp b/Microsoft.WindowsAzure.Storage/src/util.cpp +index 2d0d540c..c2a3d7d4 100644 +--- a/Microsoft.WindowsAzure.Storage/src/util.cpp ++++ b/Microsoft.WindowsAzure.Storage/src/util.cpp +@@ -334,8 +334,8 @@ namespace azure { namespace storage { namespace core { + + utility::string_t str_trim_starting_trailing_whitespaces(const utility::string_t& str) + { +- auto non_space_begin = std::find_if(str.begin(), str.end(), [](char c) { return !std::isspace(c); }); +- auto non_space_end = std::find_if(str.rbegin(), str.rend(), [](char c) { return !std::isspace(c); }).base(); ++ auto non_space_begin = std::find_if(str.begin(), str.end(), [](int c) { return !isspace(c); }); ++ auto non_space_end = std::find_if(str.rbegin(), str.rend(), [](int c) { return !isspace(c); }).base(); + return utility::string_t(non_space_begin, non_space_end); + } + diff --git a/recipes/azure-storage-cpp/all/test_package/CMakeLists.txt b/recipes/azure-storage-cpp/all/test_package/CMakeLists.txt index 1c789ba4ceba1..b3dc1a61ac7d2 100644 --- a/recipes/azure-storage-cpp/all/test_package/CMakeLists.txt +++ b/recipes/azure-storage-cpp/all/test_package/CMakeLists.txt @@ -1,12 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) -set(CMAKE_CXX_STANDARD 11) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - find_package(azure-storage-cpp REQUIRED CONFIG) add_executable(example example.cpp) target_link_libraries(example azure-storage-cpp::azure-storage-cpp) +target_compile_features(example PRIVATE cxx_std_11) diff --git a/recipes/azure-storage-cpp/all/test_package/conanfile.py b/recipes/azure-storage-cpp/all/test_package/conanfile.py index 33fb4c0ecc216..8d52b7021efe1 100644 --- a/recipes/azure-storage-cpp/all/test_package/conanfile.py +++ b/recipes/azure-storage-cpp/all/test_package/conanfile.py @@ -1,11 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" -class AwsSdkCppTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "example") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "example") + self.run(bin_path, env="conanrun") diff --git a/recipes/cairo/meson/test_v1_package/CMakeLists.txt b/recipes/azure-storage-cpp/all/test_v1_package/CMakeLists.txt similarity index 100% rename from recipes/cairo/meson/test_v1_package/CMakeLists.txt rename to recipes/azure-storage-cpp/all/test_v1_package/CMakeLists.txt diff --git a/recipes/azure-storage-cpp/all/test_v1_package/conanfile.py b/recipes/azure-storage-cpp/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..33fb4c0ecc216 --- /dev/null +++ b/recipes/azure-storage-cpp/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class AwsSdkCppTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "example") + self.run(bin_path, run_environment=True) diff --git a/recipes/battery-embed/all/conandata.yml b/recipes/battery-embed/all/conandata.yml new file mode 100644 index 0000000000000..b94490b90ffc3 --- /dev/null +++ b/recipes/battery-embed/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.2.19": + url: "https://github.com/batterycenter/embed/archive/refs/tags/v1.2.19.tar.gz" + sha256: "d472655b6eec215cd7cd20411f3596f22f597ea6a82fbbc5a5d7271e102b610e" diff --git a/recipes/battery-embed/all/conanfile.py b/recipes/battery-embed/all/conanfile.py new file mode 100644 index 0000000000000..42b1dc0f23c98 --- /dev/null +++ b/recipes/battery-embed/all/conanfile.py @@ -0,0 +1,74 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.cmake import cmake_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + +class BatteryEmbedConan(ConanFile): + name = "battery-embed" + description = "A CMake/C++20 library to embed resource files at compile time" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/batterycenter/embed" + topics = ("embed") + package_type = "build-scripts" + settings = "os", "arch", "compiler", "build_type" + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "11", + "clang": "12", + "apple-clang": "13", + "Visual Studio": "16", + "msvc": "192", + } + + def export_sources(self): + copy(self, "embed.cmake", src=self.recipe_folder, dst=self.export_sources_folder) + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + 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." + ) + + def package_id(self): + del self.info.settings.arch + del self.info.settings.compiler + del self.info.settings.build_type + del self.info.settings.os + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + copy(self, "embed.cmake", os.path.join(self.source_folder, os.pardir), self.recipe_folder) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "embed.cmake", self.recipe_folder, os.path.join(self.package_folder, "lib", "cmake")) + copy(self, "CMakeLists.txt", self.source_folder, os.path.join(self.package_folder, "lib", "cmake", "battery-embed")) + + def package_info(self): + self.cpp_info.libdirs = [] + self.cpp_info.bindirs = [] + self.cpp_info.includedirs = [] + + self.cpp_info.set_property("cmake_target_name", "battery::embed") + self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) + self.cpp_info.set_property("cmake_build_modules", [os.path.join("lib", "cmake", "embed.cmake")]) diff --git a/recipes/battery-embed/all/embed.cmake b/recipes/battery-embed/all/embed.cmake new file mode 100644 index 0000000000000..59fe1f00e55a0 --- /dev/null +++ b/recipes/battery-embed/all/embed.cmake @@ -0,0 +1,4 @@ +# cmake proxy module +cmake_minimum_required(VERSION 3.21) + +add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/battery-embed battery-embed-build) diff --git a/recipes/battery-embed/all/test_package/CMakeLists.txt b/recipes/battery-embed/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..b5eb771902175 --- /dev/null +++ b/recipes/battery-embed/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(battery-embed REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) + +b_embed(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/battery-embed/all/test_package/conanfile.py b/recipes/battery-embed/all/test_package/conanfile.py new file mode 100644 index 0000000000000..065416112515f --- /dev/null +++ b/recipes/battery-embed/all/test_package/conanfile.py @@ -0,0 +1,29 @@ +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 = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.21 <4]") + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/battery-embed/all/test_package/test_package.cpp b/recipes/battery-embed/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..feb15d322e7f2 --- /dev/null +++ b/recipes/battery-embed/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include + +#include "battery/embed.hpp" + +int main(void) { + std::cout << b::embed<"test_package.cpp">() << std::endl; + return EXIT_SUCCESS; +} diff --git a/recipes/battery-embed/config.yml b/recipes/battery-embed/config.yml new file mode 100644 index 0000000000000..a18e338f675d9 --- /dev/null +++ b/recipes/battery-embed/config.yml @@ -0,0 +1,3 @@ +versions: + "1.2.19": + folder: all diff --git a/recipes/bazel/all/conandata.yml b/recipes/bazel/all/conandata.yml index 243efd0d24b9d..554c60438f66f 100644 --- a/recipes/bazel/all/conandata.yml +++ b/recipes/bazel/all/conandata.yml @@ -1,4 +1,30 @@ sources: + "7.2.1": + license: + url: "https://raw.githubusercontent.com/bazelbuild/bazel/7.2.1/LICENSE" + sha256: "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + Macos: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-darwin-x86_64" + sha256: "2c29176d6ce9ccdd16d5a15e348c756abd6e0005c77d4695b61871219295fa96" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-darwin-arm64" + sha256: "6ac72cd7c0b422e3e8162a6912f963ddee45c645bf7dadb924728a80076c38b2" + Linux: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-linux-x86_64" + sha256: "80ccd1ecb4b88750fbe5d7622d67072fddcba9da7808f13356555e480bf67875" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-linux-arm64" + sha256: "5a4cc979353671e438b9469b833924c2361e25a580cc278a75877aedc27c1c53" + Windows: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-windows-x86_64.exe" + sha256: "4926bd3bf580b8b3323e0d09bde5dc6120fdd262d99f753eb61fedfb9a2cfc49" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-windows-arm64.exe" + sha256: "d8b1a0da1c6e9d94a5ac4a2728d344e496c32e68cf27ed6a2c117d38fa994fc8" + "7.0.0": license: url: "https://raw.githubusercontent.com/bazelbuild/bazel/7.0.0/LICENSE" @@ -25,6 +51,32 @@ sources: url: "https://github.com/bazelbuild/bazel/releases/download/7.0.0/bazel-7.0.0-windows-arm64.exe" sha256: "7846fc1180c7cf1985f7748db40066590f20a62a9e5c56ee5b1f1f127cb978c5" + "6.5.0": + license: + url: "https://raw.githubusercontent.com/bazelbuild/bazel/6.5.0/LICENSE" + sha256: "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + Macos: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-darwin-x86_64" + sha256: "bbf9c2c03bac48e0514f46db0295027935535d91f6d8dcd960c53393559eab29" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-darwin-arm64" + sha256: "c6b6dc17efcdf13fba484c6fe0b6c3361b888ae7b9573bc25a2dbe8c502448eb" + Linux: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-linux-x86_64" + sha256: "a40ac69263440761199fcb8da47ad4e3f328cbe79ffbf4ecc14e5ba252857307" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-linux-arm64" + sha256: "5afe973cadc036496cac66f1414ca9be36881423f576db363d83afc9084c0c2f" + Windows: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-windows-x86_64.exe" + sha256: "6eae8e7f28e1b68b833503d1a58caf139c11e52de19df0d787d974653a0ea4c6" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-windows-arm64.exe" + sha256: "b40d2ab8aa0b8413b2bdd599ec1c571d09714275f35ba476e89b3fca6857a937" + "6.2.0": license: url: "https://raw.githubusercontent.com/bazelbuild/bazel/6.2.0/LICENSE" @@ -77,6 +129,29 @@ sources: url: "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-windows-arm64.exe" sha256: "1e273c20dfa8493bf21b002614592a6cb3aa9eabe8b30eda96f8a517fca1a619" + "4.2.4": + license: + url: "https://raw.githubusercontent.com/bazelbuild/bazel/4.2.4/LICENSE" + sha256: "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + Macos: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/4.2.4/bazel-4.2.4-darwin-x86_64" + sha256: "84e5c594ce4c1d4354b68c90f6e81eb3a7d89737f60c3e3f4a689212d984dbc6" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/4.2.4/bazel-4.2.4-darwin-arm64" + sha256: "6bc6acf5049f8ac78d083dce9538bade04186e56157e21330b0d565575547759" + Linux: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/4.2.4/bazel-4.2.4-linux-x86_64" + sha256: "29921e744399018efa0038bb770d2d11c77457e9162e5dcb58e6e11ab2bca7d3" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/4.2.4/bazel-4.2.4-linux-arm64" + sha256: "1479d683ac64b8b4d8fc07f72da1c58914f4ef1113412beaa421b341b947a3dd" + Windows: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/4.2.4/bazel-4.2.4-windows-x86_64.exe" + sha256: "92103ac197fa53883e0671fbfda77b435619f94279fabf0694ec8623959348f8" + "4.0.0": license: url: "https://raw.githubusercontent.com/bazelbuild/bazel/4.0.0/LICENSE" diff --git a/recipes/bazel/config.yml b/recipes/bazel/config.yml index e9824e01dcd11..51015201a5c54 100644 --- a/recipes/bazel/config.yml +++ b/recipes/bazel/config.yml @@ -1,9 +1,15 @@ versions: + "7.2.1": + folder: all "7.0.0": folder: all + "6.5.0": + folder: all "6.2.0": folder: all "5.4.1": folder: all + "4.2.4": + folder: all "4.0.0": folder: all diff --git a/recipes/bdwgc/all/conandata.yml b/recipes/bdwgc/all/conandata.yml index d463c9bb2301b..3e842ffa56b67 100644 --- a/recipes/bdwgc/all/conandata.yml +++ b/recipes/bdwgc/all/conandata.yml @@ -14,6 +14,9 @@ sources: "8.2.6": url: "https://github.com/ivmai/bdwgc/releases/download/v8.2.6/gc-8.2.6.tar.gz" sha256: "b9183fe49d4c44c7327992f626f8eaa1d8b14de140f243edb1c9dcff7719a7fc" + "8.2.8": + url: "https://github.com/ivmai/bdwgc/releases/download/v8.2.8/gc-8.2.8.tar.gz" + sha256: "7649020621cb26325e1fb5c8742590d92fb48ce5c259b502faf7d9fb5dabb160" patches: "8.0.4": - patch_file: "patches/update-cmake-8_0_4.patch" @@ -25,3 +28,5 @@ patches: - patch_file: "patches/update-cmake-8_2_4.patch" "8.2.6": - patch_file: "patches/update-cmake-8_2_6.patch" + "8.2.8": + - patch_file: "patches/update-cmake-8_2_6.patch" diff --git a/recipes/bdwgc/config.yml b/recipes/bdwgc/config.yml index c736cacb36944..2171a77e5a1a9 100644 --- a/recipes/bdwgc/config.yml +++ b/recipes/bdwgc/config.yml @@ -9,3 +9,5 @@ versions: folder: all "8.2.6": folder: all + "8.2.8": + folder: all diff --git a/recipes/behaviortree.cpp/all/conandata.yml b/recipes/behaviortree.cpp/all/conandata.yml index 25beb0006c60f..38e09ddf41730 100644 --- a/recipes/behaviortree.cpp/all/conandata.yml +++ b/recipes/behaviortree.cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.6.2": + url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.6.2.tar.gz" + sha256: "b0e7e53b27feae894e2df3f3faadfdd49f2108ebccfb1bd7cc0d405ffc56cecd" "4.6.1": url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.6.1.tar.gz" sha256: "a4e0dd92b200eedfbc6a16bebe613aeeb84b685416211b68fd097d21254f324b" @@ -17,3 +20,8 @@ sources: "3.7.0": url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/3.7.0.tar.gz" sha256: "ab0d8ac1a0df4dd43cf45da8a784bab7fdedf711bd0e227f7ed071f79b0c7b5c" +patches: + "4.6.2": + - patch_file: "patches/001-minitrace.patch" + patch_description: "Consume minitrace from Conan" + patch_type: "conan" diff --git a/recipes/behaviortree.cpp/all/conanfile.py b/recipes/behaviortree.cpp/all/conanfile.py index 219b2a799c6c6..df11b679e6fcb 100644 --- a/recipes/behaviortree.cpp/all/conanfile.py +++ b/recipes/behaviortree.cpp/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.build import check_min_cppstd, cross_building from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import export_conandata_patches, apply_conandata_patches import os @@ -74,6 +75,7 @@ def _minimum_compilers_version(self): } def export_sources(self): + export_conandata_patches(self) copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): @@ -216,6 +218,7 @@ def generate(self): deps.generate() def _patch_sources(self): + apply_conandata_patches(self) cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") # Let Conan handle -fPIC replace_in_file(self, cmakelists, "set(CMAKE_POSITION_INDEPENDENT_CODE ON)\n", "") @@ -226,7 +229,9 @@ def _patch_sources(self): # Unvendor minitrace if self._with_minitrace: rmdir(self, os.path.join(self.source_folder, "3rdparty", "minitrace")) - replace_in_file(self, cmakelists, "3rdparty/minitrace/minitrace.cpp", "") + if Version(self.version) < "4.6.2": + # INFO: Version 4.6.2 removed minitrace via patch file 001-minitrace.patch + replace_in_file(self, cmakelists, "3rdparty/minitrace/minitrace.cpp", "") replace_in_file(self, os.path.join(self.source_folder, "src", "loggers", "bt_minitrace_logger.cpp"), "minitrace/minitrace.h", "minitrace.h") # Unvendor tinyxml2 diff --git a/recipes/behaviortree.cpp/all/patches/001-minitrace.patch b/recipes/behaviortree.cpp/all/patches/001-minitrace.patch new file mode 100644 index 0000000000000..734c4e7f4c8b5 --- /dev/null +++ b/recipes/behaviortree.cpp/all/patches/001-minitrace.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9b6d1eb..fd0e84f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,6 +39,7 @@ endif() + + #---- Find other packages ---- + find_package(Threads REQUIRED) ++find_package(minitrace REQUIRED) + + + set(BEHAVIOR_TREE_LIBRARY ${PROJECT_NAME}) +@@ -80,10 +81,6 @@ endif() + + add_subdirectory(3rdparty/lexy) + +-add_library(minitrace STATIC 3rdparty/minitrace/minitrace.cpp) +-target_compile_definitions(minitrace PRIVATE MTR_ENABLED=True) +-set_property(TARGET minitrace PROPERTY POSITION_INDEPENDENT_CODE ON) +- + list(APPEND BT_SOURCE + src/action_node.cpp + src/basic_types.cpp +@@ -166,7 +163,7 @@ target_link_libraries(${BTCPP_LIBRARY} + Threads::Threads + ${CMAKE_DL_LIBS} + $ +- minitrace ++ minitrace::minitrace + PUBLIC + ${BTCPP_EXTRA_LIBRARIES} + ) diff --git a/recipes/behaviortree.cpp/config.yml b/recipes/behaviortree.cpp/config.yml index 6056a1ddad488..12e603c7e2db2 100644 --- a/recipes/behaviortree.cpp/config.yml +++ b/recipes/behaviortree.cpp/config.yml @@ -1,4 +1,6 @@ versions: + "4.6.2": + folder: all "4.6.1": folder: all "4.6.0": diff --git a/recipes/benchmark/all/conandata.yml b/recipes/benchmark/all/conandata.yml index 102609d9c75c2..fac51279a430d 100644 --- a/recipes/benchmark/all/conandata.yml +++ b/recipes/benchmark/all/conandata.yml @@ -1,4 +1,11 @@ sources: + "1.9.0": + url: "https://github.com/google/benchmark/archive/refs/tags/v1.9.0.tar.gz" + sha256: "35a77f46cc782b16fac8d3b107fbfbb37dcd645f7c28eee19f3b8e0758b48994" + "1.8.5": + url: "https://github.com/google/benchmark/archive/refs/tags/v1.8.5.tar.gz" + sha256: "d26789a2b46d8808a48a4556ee58ccc7c497fcd4c0af9b90197674a81e04798a" + # keep 1.8.4, the last release for c++11 "1.8.4": url: "https://github.com/google/benchmark/archive/refs/tags/v1.8.4.tar.gz" sha256: "3e7059b6b11fb1bbe28e33e02519398ca94c1818874ebed18e504dc6f709be45" diff --git a/recipes/benchmark/all/conanfile.py b/recipes/benchmark/all/conanfile.py index 65bfbc736fc66..ff99379d8d400 100644 --- a/recipes/benchmark/all/conanfile.py +++ b/recipes/benchmark/all/conanfile.py @@ -1,8 +1,8 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.build import cross_building +from conan.tools.build import cross_building, check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, rmdir +from conan.tools.files import copy, get, rmdir, replace_in_file from conan.tools.microsoft import is_msvc, check_min_vs from conan.tools.scm import Version import os @@ -35,6 +35,26 @@ class BenchmarkConan(ConanFile): "enable_libpfm": False, } + @property + def _min_cppstd(self): + if Version(self.version) >= "1.8.5": + return 14 + if is_msvc(self): + return 14 + return 11 + + @property + def _compilers_minimum_version(self): + return { + "14": { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + }.get(self._min_cppstd, {}) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -49,6 +69,14 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + 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." + ) + check_min_vs(self, "190") if Version(self.version) < "1.7.0" and is_msvc(self) and self.options.shared: raise ConanInvalidConfiguration(f"{self.ref} doesn't support msvc shared builds") @@ -71,6 +99,8 @@ def generate(self): tc.variables["BENCHMARK_ENABLE_LTO"] = self.options.enable_lto tc.variables["BENCHMARK_ENABLE_EXCEPTIONS"] = self.options.enable_exceptions tc.variables["BENCHMARK_ENABLE_LIBPFM"] = self.options.get_safe("enable_libpfm", False) + if not self.settings.compiler.cppstd: + tc.cache_variables["CMAKE_CXX_STANDARD"] = self._min_cppstd if Version(self.version) >= "1.6.1": tc.variables["BENCHMARK_ENABLE_WERROR"] = False tc.variables["BENCHMARK_FORCE_WERROR"] = False @@ -83,8 +113,17 @@ def generate(self): else: tc.variables["BENCHMARK_USE_LIBCXX"] = False tc.generate() + + def _patch_sources(self): + if Version(self.version) > "1.7.0": + replace_in_file(self, + os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_CXX_STANDARD", + "#" + ) def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/benchmark/config.yml b/recipes/benchmark/config.yml index 13430070c7797..f5694a4c32d21 100644 --- a/recipes/benchmark/config.yml +++ b/recipes/benchmark/config.yml @@ -1,4 +1,8 @@ versions: + "1.9.0": + folder: all + "1.8.5": + folder: all "1.8.4": folder: all "1.8.3": diff --git a/recipes/bitsery/all/conandata.yml b/recipes/bitsery/all/conandata.yml index 5af8798ccd4e5..fd5e93d076949 100644 --- a/recipes/bitsery/all/conandata.yml +++ b/recipes/bitsery/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.2.4": + url: "https://github.com/fraillt/bitsery/archive/v5.2.4.tar.gz" + sha256: "ff741a3fee5420b31af31c7a8cefbcc3aaaf6f7f8c3ac49aa020f99b21d96020" "5.2.3": url: "https://github.com/fraillt/bitsery/archive/v5.2.3.tar.gz" sha256: "896d82ab4ccea9899ff2098aa69ad6d25e524ee1d4c747ce3232d0afe3cd05a5" diff --git a/recipes/bitsery/all/conanfile.py b/recipes/bitsery/all/conanfile.py index 2e0ffa53b2c89..26bcf9c123505 100644 --- a/recipes/bitsery/all/conanfile.py +++ b/recipes/bitsery/all/conanfile.py @@ -13,10 +13,10 @@ class BitseryConan(ConanFile): "Header only C++ binary serialization library. It is designed around " "the networking requirements for real-time data delivery, especially for games." ) - topics = ("serialization", "binary", "header-only") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/fraillt/bitsery" - license = "MIT" + topics = ("serialization", "binary", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True diff --git a/recipes/bitsery/config.yml b/recipes/bitsery/config.yml index 383bfb1cfff8d..ef54c243e956f 100644 --- a/recipes/bitsery/config.yml +++ b/recipes/bitsery/config.yml @@ -1,4 +1,6 @@ versions: + "5.2.4": + folder: all "5.2.3": folder: all "5.2.2": diff --git a/recipes/blend2d/all/conandata.yml b/recipes/blend2d/all/conandata.yml index 839e0c16a15fb..54dc0ba094e18 100644 --- a/recipes/blend2d/all/conandata.yml +++ b/recipes/blend2d/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.11.4": + url: "https://blend2d.com/download/blend2d-0.11.4.tar.gz" + sha256: "07f7d99d2ebb7b42a707a4f0035745b781faf9083933f944084f66e6246bb01c" + "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" diff --git a/recipes/blend2d/config.yml b/recipes/blend2d/config.yml index 8c167771e148d..b62e83e2e1cd2 100644 --- a/recipes/blend2d/config.yml +++ b/recipes/blend2d/config.yml @@ -1,4 +1,8 @@ versions: + "0.11.4": + folder: all + "0.11.3": + folder: all "0.11.1": folder: all "0.10.6": diff --git a/recipes/boost-ext-ut/all/conandata.yml b/recipes/boost-ext-ut/all/conandata.yml index 6a4836cd7d3f2..81761a3dd0a75 100644 --- a/recipes/boost-ext-ut/all/conandata.yml +++ b/recipes/boost-ext-ut/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.0": + url: "https://github.com/boost-ext/ut/archive/v2.1.0.tar.gz" + sha256: "1c9c35c039ad3a9795a278447db6da0a4ec1a1d223bf7d64687ad28f673b7ae8" "2.0.1": url: "https://github.com/boost-ext/ut/archive/v2.0.1.tar.gz" sha256: "1e43be17045a881c95cedc843d72fe9c1e53239b02ed179c1e39e041ebcd7dad" diff --git a/recipes/boost-ext-ut/all/conanfile.py b/recipes/boost-ext-ut/all/conanfile.py index a73d7aef01853..87082efe83c5e 100644 --- a/recipes/boost-ext-ut/all/conanfile.py +++ b/recipes/boost-ext-ut/all/conanfile.py @@ -52,6 +52,11 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): + if (Version(self.version) == "2.1.0" and self.settings.os == "Linux" and self.settings.compiler == "clang" and + 12 <= Version(self.settings.compiler.version) <= 16 and "libstdc++" in self.settings.compiler.libcxx): + # https://github.com/boost-ext/ut/issues/637 + raise ConanInvalidConfiguration(f"{self.ref} does support Clang + libstdc++. Use -s compiler.libcxx=libc++ or Clang >16.") + if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._minimum_cpp_standard) if Version(self.version) <= "1.1.8" and is_msvc(self): diff --git a/recipes/boost-ext-ut/config.yml b/recipes/boost-ext-ut/config.yml index c1e4e8bebed11..61e709f7dc6a2 100644 --- a/recipes/boost-ext-ut/config.yml +++ b/recipes/boost-ext-ut/config.yml @@ -1,4 +1,6 @@ versions: + "2.1.0": + folder: "all" "2.0.1": folder: "all" "2.0.0": diff --git a/recipes/boost/all/conandata.yml b/recipes/boost/all/conandata.yml index b60976ce52867..9a49b404141c2 100644 --- a/recipes/boost/all/conandata.yml +++ b/recipes/boost/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "1.86.0": + url: + - "https://boostorg.jfrog.io/artifactory/main/release/1.86.0/source/boost_1_86_0.tar.bz2" + - "https://sourceforge.net/projects/boost/files/boost/1.86.0/boost_1_86_0.tar.bz2" + sha256: "1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b" "1.85.0": url: - "https://boostorg.jfrog.io/artifactory/main/release/1.85.0/source/boost_1_85_0.tar.bz2" @@ -73,6 +78,10 @@ sources: url: "https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2" sha256: "d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee" patches: + "1.86.0": + - patch_file: "patches/1.82.0-locale-iconv-library-option.patch" + patch_description: "Optional flag to specify iconv from either libc of libiconv" + patch_type: "conan" "1.85.0": - patch_file: "patches/1.82.0-locale-iconv-library-option.patch" patch_description: "Optional flag to specify iconv from either libc of libiconv" diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py index 794784341c254..1300dc4480ac6 100644 --- a/recipes/boost/all/conanfile.py +++ b/recipes/boost/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanException, ConanInvalidConfiguration from conan.tools.apple import is_apple_os, to_apple_arch, XCRun -from conan.tools.build import build_jobs, check_min_cppstd, cross_building, valid_min_cppstd, supported_cppstd +from conan.tools.build import build_jobs, cross_building, valid_min_cppstd, supported_cppstd from conan.tools.env import VirtualBuildEnv from conan.tools.files import ( apply_conandata_patches, chdir, collect_libs, copy, export_conandata_patches, @@ -82,7 +82,7 @@ class BoostConan(ConanFile): "filesystem_no_deprecated": [True, False], "filesystem_use_std_fs": [True, False], "filesystem_version": [None, "3", "4"], - "layout": ["system", "versioned", "tagged", "b2-default"], + "layout": ["system", "versioned", "tagged"], "magic_autolink": [True, False], # enables BOOST_ALL_NO_LIB "diagnostic_definitions": [True, False], # enables BOOST_LIB_DIAGNOSTIC "python_executable": [None, "ANY"], # system default python installation is used, if None @@ -432,6 +432,8 @@ def config_options(self): self.options.without_url = True if Version(self.version) >= "1.85.0" and not self._has_cppstd_14_supported: self.options.without_math = True + if Version(self.version) >= "1.86.0" and not self._has_cppstd_14_supported: + self.options.without_graph = True # iconv is off by default on Windows and Solaris if self._is_windows_platform or self.settings.os == "SunOS": @@ -457,6 +459,14 @@ def disable_math(): except ConanException: pass + def disable_graph(): + super_modules = self._all_super_modules("graph") + for smod in super_modules: + try: + setattr(self.options, f"without_{smod}", True) + except ConanException: + pass + if Version(self.version) >= "1.76.0": # Starting from 1.76.0, Boost.Math requires a c++11 capable compiler # ==> disable it by default for older compilers or c++ standards @@ -565,6 +575,18 @@ def disable_cobalt(): elif not self._has_cppstd_14_supported: disable_math() + if Version(self.version) >= "1.86.0": + # Boost 1.86.0 updated more components that require C++14 and C++17 + # https://www.boost.org/users/history/version_1_86_0.html + if self.settings.compiler.get_safe("cppstd"): + if not valid_min_cppstd(self, 14): + disable_graph() + else: + min_compiler_version = self._min_compiler_version_default_cxx14 + if min_compiler_version is None: + self.output.warning("Assuming the compiler supports c++14 by default") + elif not self._has_cppstd_14_supported: + disable_graph() @property def _configure_options(self): @@ -587,8 +609,12 @@ def _stacktrace_addr2line_available(self): @property def _stacktrace_from_exception_available(self): - if Version(self.version) >= "1.85.0": + if Version(self.version) == "1.85.0": + # https://github.com/boostorg/stacktrace/blob/boost-1.85.0/build/Jamfile.v2#L143 return not self.options.header_only and not self.options.without_stacktrace and self.settings.os != "Windows" + elif Version(self.version) >= "1.86.0": + # https://github.com/boostorg/stacktrace/blob/boost-1.86.0/build/Jamfile.v2#L148 + return not self.options.header_only and not self.options.without_stacktrace and self.settings.arch == "x86_64" def configure(self): if self.options.header_only: @@ -625,9 +651,6 @@ def configure(self): if self.options.get_safe("without_stacktrace", True): self.options.rm_safe("with_stacktrace_backtrace") - if self.options.layout == "b2-default": - self.options.layout = "versioned" if self.settings.os == "Windows" else "system" - if self.options.without_fiber: self.options.rm_safe("numa") @@ -778,14 +801,14 @@ def requirements(self): if self._with_bzip2: self.requires("bzip2/1.0.8") if self._with_lzma: - self.requires("xz_utils/5.4.4") + self.requires("xz_utils/[>=5.4.5 <6]") if self._with_zstd: - self.requires("zstd/1.5.5") + self.requires("zstd/[>=1.5 <1.6]") if self._with_stacktrace_backtrace: self.requires("libbacktrace/cci.20210118", transitive_headers=True, transitive_libs=True) if self._with_icu: - self.requires("icu/73.2") + self.requires("icu/74.2") if self._with_iconv: self.requires("libiconv/1.17") @@ -1601,7 +1624,7 @@ def _toolset(self): return str(self.settings.compiler) if self.settings.compiler == "sun-cc": return "sunpro" - if self.settings.compiler == "intel": + if "intel" in str(self.settings.compiler): return { "Macos": "intel-darwin", "Windows": "intel-win", @@ -1879,6 +1902,8 @@ def add_libprefix(n): libprefix = "" if is_msvc(self) and (not self._shared or n in self._dependencies["static_only"]): libprefix = "lib" + elif self._toolset == "clang-win": + libprefix = "lib" return libprefix + n all_detected_libraries = set(l[:-4] if l.endswith(".dll") else l for l in collect_libs(self)) @@ -1892,7 +1917,9 @@ def filter_transform_module_libraries(names): continue if name in ("boost_math_c99l", "boost_math_tr1l") and str(self.settings.arch).startswith("ppc"): continue - if name in ("boost_stacktrace_addr2line", "boost_stacktrace_backtrace", "boost_stacktrace_basic", "boost_stacktrace_from_exception",) and self.settings.os == "Windows": + if name in ("boost_stacktrace_addr2line", "boost_stacktrace_backtrace", "boost_stacktrace_basic") and self.settings.os == "Windows": + continue + if name == "boost_stacktrace_from_exception" and not self._stacktrace_from_exception_available: continue if name == "boost_stacktrace_addr2line" and not self._stacktrace_addr2line_available: continue diff --git a/recipes/boost/all/dependencies/dependencies-1.86.0.yml b/recipes/boost/all/dependencies/dependencies-1.86.0.yml new file mode 100644 index 0000000000000..e1e1e40afaac1 --- /dev/null +++ b/recipes/boost/all/dependencies/dependencies-1.86.0.yml @@ -0,0 +1,291 @@ +configure_options: +- atomic +- charconv +- chrono +- cobalt +- container +- context +- contract +- coroutine +- date_time +- exception +- fiber +- filesystem +- graph +- graph_parallel +- iostreams +- json +- locale +- log +- math +- mpi +- nowide +- program_options +- python +- random +- regex +- serialization +- stacktrace +- system +- test +- thread +- timer +- type_erasure +- url +- wave +dependencies: + atomic: [] + charconv: [] + chrono: + - system + cobalt: + - container + - system + container: [] + context: [] + contract: + - exception + - thread + coroutine: + - context + - exception + - system + date_time: [] + exception: [] + fiber: + - context + - filesystem + fiber_numa: + - fiber + filesystem: + - atomic + - system + graph: + - math + - random + - regex + - serialization + graph_parallel: + - filesystem + - graph + - mpi + - random + - serialization + iostreams: + - random + - regex + json: + - container + - system + locale: + - thread + log: + - atomic + - date_time + - exception + - filesystem + - random + - regex + - system + - thread + log_setup: + - log + math: [] + math_c99: + - math + math_c99f: + - math + math_c99l: + - math + math_tr1: + - math + math_tr1f: + - math + math_tr1l: + - math + mpi: + - graph + - serialization + mpi_python: + - mpi + - python + nowide: + - filesystem + numpy: + - python + prg_exec_monitor: + - test + program_options: [] + python: [] + random: + - system + regex: [] + serialization: [] + stacktrace: [] + stacktrace_addr2line: + - stacktrace + stacktrace_backtrace: + - stacktrace + stacktrace_basic: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - stacktrace + stacktrace_from_exception: + - stacktrace + system: [] + test: + - exception + test_exec_monitor: + - test + thread: + - atomic + - chrono + - container + - date_time + - exception + - system + timer: [] + type_erasure: + - thread + unit_test_framework: + - prg_exec_monitor + - test + - test_exec_monitor + url: + - system + wave: + - filesystem + - serialization + wserialization: + - serialization +libs: + atomic: + - boost_atomic + charconv: + - boost_charconv + chrono: + - boost_chrono + cobalt: + - boost_cobalt + container: + - boost_container + context: + - boost_context + contract: + - boost_contract + coroutine: + - boost_coroutine + date_time: + - boost_date_time + exception: + - boost_exception + fiber: + - boost_fiber + fiber_numa: + - boost_fiber_numa + filesystem: + - boost_filesystem + graph: + - boost_graph + graph_parallel: + - boost_graph_parallel + iostreams: + - boost_iostreams + json: + - boost_json + locale: + - boost_locale + log: + - boost_log + log_setup: + - boost_log_setup + math: [] + math_c99: + - boost_math_c99 + math_c99f: + - boost_math_c99f + math_c99l: + - boost_math_c99l + math_tr1: + - boost_math_tr1 + math_tr1f: + - boost_math_tr1f + math_tr1l: + - boost_math_tr1l + mpi: + - boost_mpi + mpi_python: + - boost_mpi_python + nowide: + - boost_nowide + numpy: + - boost_numpy{py_major}{py_minor} + prg_exec_monitor: + - boost_prg_exec_monitor + program_options: + - boost_program_options + python: + - boost_python{py_major}{py_minor} + random: + - boost_random + regex: + - boost_regex + serialization: + - boost_serialization + stacktrace: [] + stacktrace_addr2line: + - boost_stacktrace_addr2line + stacktrace_backtrace: + - boost_stacktrace_backtrace + stacktrace_basic: + - boost_stacktrace_basic + stacktrace_from_exception: + - boost_stacktrace_from_exception + stacktrace_noop: + - boost_stacktrace_noop + stacktrace_windbg: + - boost_stacktrace_windbg + stacktrace_windbg_cached: + - boost_stacktrace_windbg_cached + system: + - boost_system + test: [] + test_exec_monitor: + - boost_test_exec_monitor + thread: + - boost_thread + timer: + - boost_timer + type_erasure: + - boost_type_erasure + unit_test_framework: + - boost_unit_test_framework + url: + - boost_url + wave: + - boost_wave + wserialization: + - boost_wserialization +requirements: + iostreams: + - bzip2 + - lzma + - zlib + - zstd + locale: + - iconv + - icu + python: + - python + regex: + - icu + stacktrace: + - backtrace +static_only: +- boost_exception +- boost_test_exec_monitor +version: 1.86.0 diff --git a/recipes/boost/config.yml b/recipes/boost/config.yml index 3363c84d6a537..2cac249885115 100644 --- a/recipes/boost/config.yml +++ b/recipes/boost/config.yml @@ -1,4 +1,6 @@ versions: + "1.86.0": + folder: all "1.85.0": folder: all "1.84.0": diff --git a/recipes/botan/all/conandata.yml b/recipes/botan/all/conandata.yml index 3472b4e6e2200..311b92ac7d1b5 100644 --- a/recipes/botan/all/conandata.yml +++ b/recipes/botan/all/conandata.yml @@ -35,6 +35,9 @@ sources: "3.4.0": url: "https://github.com/randombit/botan/archive/3.4.0.tar.gz" sha256: "6ef2a16a0527b1cfc9648a644877f7b95c4d07e8ef237273b030c623418c5e5b" + "3.5.0": + url: "https://github.com/randombit/botan/archive/3.5.0.tar.gz" + sha256: "7d91d3349e6029e1a6929a50ab587f9fd4e29a9af3f3d698553451365564001f" patches: "2.18.2": - patch_file: "patches/fix-amalgamation-build.patch" diff --git a/recipes/botan/all/conanfile.py b/recipes/botan/all/conanfile.py index 082f448005d3f..8ed902567cf53 100644 --- a/recipes/botan/all/conanfile.py +++ b/recipes/botan/all/conanfile.py @@ -53,6 +53,8 @@ class BotanConan(ConanFile): "with_powercrypto": [True, False], "enable_modules": [None, "ANY"], "disable_modules": [None, "ANY"], + "enable_experimental_features": [True, False], + "enable_deprecated_features": [True, False], "system_cert_bundle": [None, "ANY"], "module_policy": [None, "bsi", "modern", "nist"], } @@ -81,6 +83,8 @@ class BotanConan(ConanFile): "with_powercrypto": True, "enable_modules": None, "disable_modules": None, + "enable_experimental_features": False, + "enable_deprecated_features": True, "system_cert_bundle": None, "module_policy": None, } @@ -336,6 +340,20 @@ def _configure_cmd(self): if self._extra_cxxflags: botan_extra_cxx_flags.append(self._extra_cxxflags) + if Version(self.version) >= '3.4': + # Botan 3.4.0 introduced a 'module life cycle' feature, before that + # the experimental/deprecated feature switches are ignored. + + if self.options.enable_experimental_features: + build_flags.append('--enable-experimental-features') + else: + build_flags.append('--disable-experimental-features') + + if self.options.enable_deprecated_features: + build_flags.append('--enable-deprecated-features') + else: + build_flags.append('--disable-deprecated-features') + if self.options.enable_modules: build_flags.append('--minimized-build') build_flags.append('--enable-modules={}'.format(self.options.enable_modules)) diff --git a/recipes/botan/config.yml b/recipes/botan/config.yml index 97827ec9a391e..0d0ff4ded0853 100644 --- a/recipes/botan/config.yml +++ b/recipes/botan/config.yml @@ -23,3 +23,5 @@ versions: folder: all "3.4.0": folder: all + "3.5.0": + folder: all diff --git a/recipes/box2d/2.4.x/conandata.yml b/recipes/box2d/2.4.x/conandata.yml deleted file mode 100644 index c7372e2a8f037..0000000000000 --- a/recipes/box2d/2.4.x/conandata.yml +++ /dev/null @@ -1,10 +0,0 @@ -sources: - "2.4.0": - url: "https://github.com/erincatto/Box2D/archive/v2.4.0.zip" - sha256: "6aebbc54c93e367c97e382a57ba12546731dcde51526964c2ab97dec2050f8b9" - "2.4.1": - url: "https://github.com/erincatto/box2d/archive/refs/tags/v2.4.1.tar.gz" - sha256: "d6b4650ff897ee1ead27cf77a5933ea197cbeef6705638dd181adc2e816b23c2" -patches: - "2.4.0": - - patch_file: "patches/0001-install-and-allow-shared.patch" diff --git a/recipes/box2d/2.4.x/conanfile.py b/recipes/box2d/2.4.x/conanfile.py deleted file mode 100644 index cc297963ae36d..0000000000000 --- a/recipes/box2d/2.4.x/conanfile.py +++ /dev/null @@ -1,71 +0,0 @@ -import os -from conan import ConanFile -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, rm, rmdir, copy -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.scm import Version - -required_conan_version = ">=1.53.0" - - -class Box2dConan(ConanFile): - name = "box2d" - license = "Zlib" - description = "Box2D is a 2D physics engine for games" - homepage = "http://box2d.org/" - url = "https://github.com/conan-io/conan-center-index" - topics = ("physics-engine", "graphic", "2d", "collision") - package_type = "library" - settings = "os", "compiler", "build_type", "arch" - options = { - "shared": [True, False], - "fPIC": [True, False] - } - default_options = { - "shared": False, - "fPIC": True - } - - def export_sources(self): - export_conandata_patches(self) - - def config_options(self): - if self.settings.os == "Windows": - self.options.rm_safe("fPIC") - - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - - def layout(self): - cmake_layout(self, src_folder="src") - - def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) - - def generate(self): - tc = CMakeToolchain(self) - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" - tc.variables["BOX2D_BUILD_TESTBED"] = False - tc.variables["BOX2D_BUILD_UNIT_TESTS"] = False - tc.generate() - - def build(self): - apply_conandata_patches(self) - cmake = CMake(self) - cmake.configure() - cmake.build() - - def package(self): - copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - cmake = CMake(self) - cmake.configure() - cmake.install() - rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - rm(self, "*.pdb", self.package_folder, recursive=True) - - def package_info(self): - self.cpp_info.names["cmake_find_package"] = "box2d" - self.cpp_info.names["cmake_find_package_multi"] = "box2d" - self.cpp_info.libs = ["box2d"] - if Version(self.version) >= "2.4.1" and self.options.shared: - self.cpp_info.defines.append("B2_SHARED") diff --git a/recipes/box2d/2.4.x/test_package/CMakeLists.txt b/recipes/box2d/2.4.x/test_package/CMakeLists.txt deleted file mode 100644 index fb4d8d7f5888a..0000000000000 --- a/recipes/box2d/2.4.x/test_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -find_package(box2d REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} box2d::box2d) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/box2d/2.4.x/test_package/test_package.cpp b/recipes/box2d/2.4.x/test_package/test_package.cpp deleted file mode 100644 index 7dfa813bc1d2e..0000000000000 --- a/recipes/box2d/2.4.x/test_package/test_package.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include "box2d/box2d.h" - -int main(void) { - b2Vec2 gravity(0.0f, -10.0f); - b2World world(gravity); - - b2BodyDef groundBodyDef; - groundBodyDef.position.Set(0.0f, -10.0f); - - b2Body* groundBody = world.CreateBody(&groundBodyDef); - b2PolygonShape groundBox; - groundBox.SetAsBox(50.0f, 10.0f); - - return 0; -} diff --git a/recipes/box2d/2.4.x/test_v1_package/CMakeLists.txt b/recipes/box2d/2.4.x/test_v1_package/CMakeLists.txt deleted file mode 100644 index 373fb5bb61846..0000000000000 --- a/recipes/box2d/2.4.x/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(box2d REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} box2d::box2d) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/box2d/2.4.x/test_v1_package/test_package.cpp b/recipes/box2d/2.4.x/test_v1_package/test_package.cpp deleted file mode 100644 index 7dfa813bc1d2e..0000000000000 --- a/recipes/box2d/2.4.x/test_v1_package/test_package.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include "box2d/box2d.h" - -int main(void) { - b2Vec2 gravity(0.0f, -10.0f); - b2World world(gravity); - - b2BodyDef groundBodyDef; - groundBodyDef.position.Set(0.0f, -10.0f); - - b2Body* groundBody = world.CreateBody(&groundBodyDef); - b2PolygonShape groundBox; - groundBox.SetAsBox(50.0f, 10.0f); - - return 0; -} diff --git a/recipes/box2d/all/conandata.yml b/recipes/box2d/all/conandata.yml index 857c8f5d17268..8a363f08c6689 100644 --- a/recipes/box2d/all/conandata.yml +++ b/recipes/box2d/all/conandata.yml @@ -1,4 +1,15 @@ sources: - "2.3.1": - url: "https://github.com/erincatto/Box2D/archive/v2.3.1.zip" - sha256: "8ddd947400c59bcf09774bd75787e6253098a0bd337f5c61dae38b91aea678cf" + "2.4.2": + url: "https://github.com/erincatto/box2d/archive/refs/tags/v2.4.2.tar.gz" + sha256: "85b9b104d256c985e6e244b4227d447897fac429071cc114e5cc819dae848852" + "2.4.1": + url: "https://github.com/erincatto/box2d/archive/refs/tags/v2.4.1.tar.gz" + sha256: "d6b4650ff897ee1ead27cf77a5933ea197cbeef6705638dd181adc2e816b23c2" + "2.4.0": + url: "https://github.com/erincatto/Box2D/archive/v2.4.0.zip" + sha256: "6aebbc54c93e367c97e382a57ba12546731dcde51526964c2ab97dec2050f8b9" +patches: + "2.4.0": + - patch_file: "patches/0001-install-and-allow-shared.patch" + patch_description: "add install, allow shared build" + patch_type: "conan" diff --git a/recipes/box2d/all/conanfile.py b/recipes/box2d/all/conanfile.py index e5adde1f2b06a..cdd4fd6ee5dc9 100644 --- a/recipes/box2d/all/conanfile.py +++ b/recipes/box2d/all/conanfile.py @@ -1,68 +1,73 @@ import os -from conan import ConanFile, tools -from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout +from conan import ConanFile +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, rm, rmdir, copy +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.scm import Version -required_conan_version = ">=1.46.0" +required_conan_version = ">=1.53.0" class Box2dConan(ConanFile): name = "box2d" - license = "Zlib" description = "Box2D is a 2D physics engine for games" - topics = ("physics", "engine", "game development") - homepage = "http://box2d.org/" + license = "Zlib" url = "https://github.com/conan-io/conan-center-index" - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], - "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True,} + homepage = "http://box2d.org/" + topics = ("physics-engine", "graphic", "2d", "collision") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False] + } + default_options = { + "shared": False, + "fPIC": True + } + + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def layout(self): - cmake_layout(self, src_folder="Box2D") + cmake_layout(self, src_folder="src") def source(self): - tools.files.get(self, - **self.conan_data["sources"][self.version], - strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - tc.variables["BOX2D_BUILD_SHARED"] = self.options.shared - tc.variables["BOX2D_BUILD_STATIC"] = not self.options.shared - if self.settings.os == "Windows" and self.options.shared: - tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True - tc.variables["BOX2D_BUILD_EXAMPLES"] = False + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.variables["BOX2D_BUILD_TESTBED"] = False + tc.variables["BOX2D_BUILD_UNIT_TESTS"] = False tc.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) - cmake.configure(build_script_folder="Box2D") + cmake.configure() cmake.build() def package(self): - tools.files.copy(self, "License.txt", src=os.path.join(self.source_folder, "Box2D"), dst=os.path.join(self.package_folder,"licenses")) - tools.files.copy(self, os.path.join("Box2D", "*.h"), src=os.path.join(self.source_folder, "Box2D"), dst=os.path.join(self.package_folder, "include")) - tools.files.copy(self, "*.lib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) - tools.files.copy(self, "*.dll", src=self.build_folder, dst=os.path.join(self.package_folder, "bin"), keep_path=False) - tools.files.copy(self, "*.so*", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) - tools.files.copy(self, "*.dylib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) - tools.files.copy(self, "*.a", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.configure() + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rm(self, "*.pdb", self.package_folder, recursive=True) def package_info(self): - self.cpp_info.libs = ["Box2D"] - if self.settings.os in ("FreeBSD", "Linux"): - self.cpp_info.system_libs = ["m"] + self.cpp_info.names["cmake_find_package"] = "box2d" + self.cpp_info.names["cmake_find_package_multi"] = "box2d" + self.cpp_info.libs = ["box2d"] + if Version(self.version) >= "2.4.1" and self.options.shared: + self.cpp_info.defines.append("B2_SHARED") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/box2d/2.4.x/patches/0001-install-and-allow-shared.patch b/recipes/box2d/all/patches/0001-install-and-allow-shared.patch similarity index 100% rename from recipes/box2d/2.4.x/patches/0001-install-and-allow-shared.patch rename to recipes/box2d/all/patches/0001-install-and-allow-shared.patch diff --git a/recipes/box2d/all/test_package/CMakeLists.txt b/recipes/box2d/all/test_package/CMakeLists.txt index 22c1118333f4f..985bafbcaa4c7 100644 --- a/recipes/box2d/all/test_package/CMakeLists.txt +++ b/recipes/box2d/all/test_package/CMakeLists.txt @@ -1,7 +1,8 @@ -cmake_minimum_required(VERSION 3.4) -project(test_package) +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES CXX) -find_package(box2d) +find_package(box2d REQUIRED CONFIG) -add_executable(test_package test_package.cpp) -target_link_libraries(test_package box2d::box2d) +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE box2d::box2d) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/box2d/all/test_package/conanfile.py b/recipes/box2d/all/test_package/conanfile.py index a3a0294a68898..d1ce1a2cbc477 100644 --- a/recipes/box2d/all/test_package/conanfile.py +++ b/recipes/box2d/all/test_package/conanfile.py @@ -1,11 +1,13 @@ import os -from conan import ConanFile, tools +from conan import ConanFile +from conan.tools.build import can_run from conan.tools.cmake import CMake, cmake_layout class Box2DTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" def layout(self): cmake_layout(self) @@ -19,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.build.cross_building(self): + if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/box2d/all/test_package/test_package.cpp b/recipes/box2d/all/test_package/test_package.cpp index 045f0bf063169..31112b0dcea5a 100644 --- a/recipes/box2d/all/test_package/test_package.cpp +++ b/recipes/box2d/all/test_package/test_package.cpp @@ -1,88 +1,15 @@ -#include -#include +#include "box2d/box2d.h" -#include - -// This is a simple example of building and running a simulation -// using Box2D. Here we create a large ground box and a small dynamic -// box. -// There are no graphics for this example. Box2D is meant to be used -// with your rendering engine in your game engine. -int main(int argc, char **argv) -{ - B2_NOT_USED(argc); - B2_NOT_USED(argv); - - // Define the gravity vector. +int main(void) { b2Vec2 gravity(0.0f, -10.0f); - - // Construct a world object, which will hold and simulate the rigid bodies. b2World world(gravity); - // Define the ground body. b2BodyDef groundBodyDef; groundBodyDef.position.Set(0.0f, -10.0f); - // Call the body factory which allocates memory for the ground body - // from a pool and creates the ground box shape (also from a pool). - // The body is also added to the world. - b2Body *groundBody = world.CreateBody(&groundBodyDef); - - // Define the ground box shape. + b2Body* groundBody = world.CreateBody(&groundBodyDef); b2PolygonShape groundBox; - - // The extents are the half-widths of the box. groundBox.SetAsBox(50.0f, 10.0f); - // Add the ground fixture to the ground body. - groundBody->CreateFixture(&groundBox, 0.0f); - - // Define the dynamic body. We set its position and call the body factory. - b2BodyDef bodyDef; - bodyDef.type = b2_dynamicBody; - bodyDef.position.Set(0.0f, 4.0f); - b2Body *body = world.CreateBody(&bodyDef); - - // Define another box shape for our dynamic body. - b2PolygonShape dynamicBox; - dynamicBox.SetAsBox(1.0f, 1.0f); - - // Define the dynamic body fixture. - b2FixtureDef fixtureDef; - fixtureDef.shape = &dynamicBox; - - // Set the box density to be non-zero, so it will be dynamic. - fixtureDef.density = 1.0f; - - // Override the default friction. - fixtureDef.friction = 0.3f; - - // Add the shape to the body. - body->CreateFixture(&fixtureDef); - - // Prepare for simulation. Typically we use a time step of 1/60 of a - // second (60Hz) and 10 iterations. This provides a high quality simulation - // in most game scenarios. - float32 timeStep = 1.0f / 60.0f; - int32 velocityIterations = 6; - int32 positionIterations = 2; - - // This is our little game loop. - for (int32 i = 0; i < 60; ++i) - { - // Instruct the world to perform a single step of simulation. - // It is generally best to keep the time step and iterations fixed. - world.Step(timeStep, velocityIterations, positionIterations); - - // Now print the position and angle of the body. - b2Vec2 position = body->GetPosition(); - float32 angle = body->GetAngle(); - - printf("%4.2f %4.2f %4.2f\n", position.x, position.y, angle); - } - - // When the world destructor is called, all bodies and joints are freed. This can - // create orphaned pointers, so be careful about your world management. - return 0; } diff --git a/recipes/box2d/all/test_v1_package/CMakeLists.txt b/recipes/box2d/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 458981ad5eb24..0000000000000 --- a/recipes/box2d/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -add_executable(test_package ../test_package/test_package.cpp) -target_link_libraries(test_package ${CONAN_LIBS}) diff --git a/recipes/box2d/config.yml b/recipes/box2d/config.yml index 1922ed59d887d..d0f0027e07e5c 100644 --- a/recipes/box2d/config.yml +++ b/recipes/box2d/config.yml @@ -1,7 +1,7 @@ versions: - "2.3.1": + "2.4.2": folder: "all" - "2.4.0": - folder: "2.4.x" "2.4.1": - folder: "2.4.x" + folder: "all" + "2.4.0": + folder: "all" diff --git a/recipes/bzip2/all/conanfile.py b/recipes/bzip2/all/conanfile.py index 2a39045a8299d..ce77ac1450e7d 100644 --- a/recipes/bzip2/all/conanfile.py +++ b/recipes/bzip2/all/conanfile.py @@ -12,7 +12,7 @@ class Bzip2Conan(ConanFile): name = "bzip2" url = "https://github.com/conan-io/conan-center-index" homepage = "https://sourceware.org/bzip2" - license = "bzip2-1.0.8" + license = "bzip2-1.0.6" description = "bzip2 is a free and open-source file compression program that uses the Burrows Wheeler algorithm." topics = ("data-compressor", "file-compression") package_type = "library" diff --git a/recipes/c-ares/all/conandata.yml b/recipes/c-ares/all/conandata.yml index 22fdd92f351ad..a67dccf1e1ee5 100644 --- a/recipes/c-ares/all/conandata.yml +++ b/recipes/c-ares/all/conandata.yml @@ -1,4 +1,19 @@ sources: + "1.33.1": + url: "https://github.com/c-ares/c-ares/releases/download/v1.33.1/c-ares-1.33.1.tar.gz" + sha256: "06869824094745872fa26efd4c48e622b9bd82a89ef0ce693dc682a23604f415" + "1.33.0": + url: "https://github.com/c-ares/c-ares/releases/download/v1.33.0/c-ares-1.33.0.tar.gz" + sha256: "3e41df2f172041eb4ecb754a464c11ccc5046b2a1c8b1d6a40dac45d3a3b2346" + "1.32.3": + url: "https://github.com/c-ares/c-ares/releases/download/v1.32.3/c-ares-1.32.3.tar.gz" + sha256: "5f02cc809aac3f6cc5edc1fac6c4423fd5616d7406ce47b904c24adf0ff2cd0f" + "1.32.2": + url: "https://github.com/c-ares/c-ares/releases/download/v1.32.2/c-ares-1.32.2.tar.gz" + sha256: "072ff6b30b9682d965b87eb9b77851dc1cd8e6d8090f6821a56bd8fa89595061" + "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" @@ -14,27 +29,17 @@ 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" +patches: + "1.33.0": + - patch_file: "patches/1.33.0-0001-fix-tcp-fastopen.patch" + patch_description: "fix compilation error for TCP_FASTOPEN_CONNECT" + patch_type: "portability" + patch_source: "https://github.com/c-ares/c-ares/commit/4abdf7de3678d98f474bd2abeedea741f6c50231" diff --git a/recipes/c-ares/all/conanfile.py b/recipes/c-ares/all/conanfile.py index 635628761aed5..e4428917c336f 100644 --- a/recipes/c-ares/all/conanfile.py +++ b/recipes/c-ares/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import collect_libs, copy, get, rm, rmdir +from conan.tools.files import collect_libs, copy, get, rm, rmdir, apply_conandata_patches, export_conandata_patches from conan.tools.scm import Version import os @@ -28,6 +28,9 @@ class CAresConan(ConanFile): "tools": True, } + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -54,6 +57,7 @@ def generate(self): tc.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/c-ares/all/patches/1.33.0-0001-fix-tcp-fastopen.patch b/recipes/c-ares/all/patches/1.33.0-0001-fix-tcp-fastopen.patch new file mode 100644 index 0000000000000..a5aff6174105f --- /dev/null +++ b/recipes/c-ares/all/patches/1.33.0-0001-fix-tcp-fastopen.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib/ares__socket.c b/src/lib/ares__socket.c +index 2e360ef..86e281f 100644 +--- a/src/lib/ares__socket.c ++++ b/src/lib/ares__socket.c +@@ -56,7 +56,7 @@ + #include + #include + +-#if defined(__linux__) && defined(MSG_FASTOPEN) ++#if defined(__linux__) && defined(TCP_FASTOPEN_CONNECT) + # define TFO_SUPPORTED 1 + # define TFO_SKIP_CONNECT 0 + # define TFO_USE_SENDTO 0 diff --git a/recipes/c-ares/config.yml b/recipes/c-ares/config.yml index 41f2a05256ac8..16fb0dfe22209 100644 --- a/recipes/c-ares/config.yml +++ b/recipes/c-ares/config.yml @@ -1,4 +1,14 @@ versions: + "1.33.1": + folder: all + "1.33.0": + folder: all + "1.32.3": + folder: all + "1.32.2": + folder: all + "1.32.1": + folder: all "1.31.0": folder: all "1.30.0": @@ -11,17 +21,5 @@ versions: folder: all "1.25.0": folder: all - "1.22.1": - folder: all - "1.22.0": - folder: all - "1.21.0": - folder: all - "1.20.1": - folder: all "1.19.1": folder: all - "1.19.0": - folder: all - "1.18.1": - folder: all diff --git a/recipes/c4core/all/conandata.yml b/recipes/c4core/all/conandata.yml index 742894bf86081..8abc810fc0588 100644 --- a/recipes/c4core/all/conandata.yml +++ b/recipes/c4core/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.2.2": + url: "https://github.com/biojppm/c4core/releases/download/v0.2.2/c4core-0.2.2-src.tgz" + sha256: "beea43a5bdc64616d897cc0af728f408e35e2d75a8bb6014e6e25e90e0484578" "0.2.1": url: "https://github.com/biojppm/c4core/releases/download/v0.2.1/c4core-0.2.1-src.tgz" sha256: "6447896444c59002af58c8543d0bc64184b9a5c5992c8fc09d6d71935d039f89" @@ -18,6 +21,10 @@ sources: url: "https://github.com/biojppm/c4core/releases/download/v0.1.8/c4core-0.1.8-src.tgz" sha256: "95c0663192c6bff7a098b50afcb05d22a34dd0fd8e6be2e1b61edad2b9675fde" patches: + "0.2.2": + - patch_file: "patches/0.2.2-0001-make-fast_float-external.patch" + patch_description: "use cci's fast_float recipe" + patch_type: "conan" "0.2.1": - patch_file: "patches/0.2.0-0001-make-fast_float-external.patch" patch_description: "use cci's fast_float recipe" diff --git a/recipes/c4core/all/patches/0.2.2-0001-make-fast_float-external.patch b/recipes/c4core/all/patches/0.2.2-0001-make-fast_float-external.patch new file mode 100644 index 0000000000000..159c3bcb4195b --- /dev/null +++ b/recipes/c4core/all/patches/0.2.2-0001-make-fast_float-external.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 79451c5..c93511a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -76,7 +76,7 @@ set(C4CORE_SRC_FILES + if(C4CORE_WITH_FASTFLOAT) + list(APPEND C4CORE_SRC_FILES + c4/ext/fast_float.hpp +- c4/ext/fast_float_all.h ++# c4/ext/fast_float_all.h + ) + endif() + set(C4CORE_AMALGAMATED ${C4CORE_SRC_DIR}/../src_singleheader/c4/c4core_all.hpp) +@@ -95,7 +95,10 @@ c4_add_library(c4core + SOURCE_ROOT ${C4CORE_SRC_DIR} + SOURCES ${C4CORE_SRC_FILES} + ) +-if(NOT C4CORE_WITH_FASTFLOAT) ++if(C4CORE_WITH_FASTFLOAT) ++ find_package(FastFloat REQUIRED CONFIG) ++ target_link_libraries(c4core PUBLIC "FastFloat::fast_float") ++else() + target_compile_definitions(c4core PUBLIC -DC4CORE_NO_FAST_FLOAT) + endif() + if(C4CORE_NO_DEBUG_BREAK) +diff --git a/src/c4/ext/fast_float.hpp b/src/c4/ext/fast_float.hpp +index 4bf3c0d..b6a3a77 100644 +--- a/src/c4/ext/fast_float.hpp ++++ b/src/c4/ext/fast_float.hpp +@@ -20,7 +20,7 @@ + # pragma GCC diagnostic ignored "-Wold-style-cast" + #endif + +-#include "c4/ext/fast_float_all.h" ++#include "fast_float/fast_float.h" + + #ifdef _MSC_VER + # pragma warning(pop) diff --git a/recipes/c4core/config.yml b/recipes/c4core/config.yml index afc5fb74fc180..6368871bf45ae 100644 --- a/recipes/c4core/config.yml +++ b/recipes/c4core/config.yml @@ -1,4 +1,6 @@ versions: + "0.2.2": + folder: all "0.2.1": folder: all "0.2.0": diff --git a/recipes/caf/all/conandata.yml b/recipes/caf/all/conandata.yml index 4b177005e2f51..ae0696f7a640b 100644 --- a/recipes/caf/all/conandata.yml +++ b/recipes/caf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.0": + url: "https://github.com/actor-framework/actor-framework/archive/1.0.0.tar.gz" + sha256: "602018239d23a1805d35ebda704fd5c969a0693fc513fcf7459063b628459e5b" "0.19.4": url: "https://github.com/actor-framework/actor-framework/archive/0.19.4.tar.gz" sha256: "114d43e3a7a2305ca1d2106cd0daeff471564f62b90db1e453ba9eb5c47c02f6" diff --git a/recipes/caf/all/conanfile.py b/recipes/caf/all/conanfile.py index 08713d4f8b3b0..a477d38bc4ce6 100644 --- a/recipes/caf/all/conanfile.py +++ b/recipes/caf/all/conanfile.py @@ -12,11 +12,10 @@ class CAFConan(ConanFile): name = "caf" description = "An open source implementation of the Actor Model in C++" + license = "BSD-3-Clause", "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/actor-framework/actor-framework" - topics = "actor-framework", "actor-model", "pattern-matching", "actors" - license = "BSD-3-Clause", "BSL-1.0" - + topics = ("actor-framework", "actor-model", "pattern-matching", "actors") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -41,7 +40,7 @@ def _minimum_compilers_version(self): return { "Visual Studio": "16", "msvc": "192", - "gcc": "7", + "gcc": "7" if Version(self.version) < "1.0.0" else "8", "clang": "6", # Should be 5 but clang 5 has a bug that breaks compiling CAF # see https://github.com/actor-framework/actor-framework/issues/1226 "apple-clang": "10", @@ -90,6 +89,8 @@ def generate(self): tc = CMakeToolchain(self) if not valid_min_cppstd(self, self._min_cppstd): tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd + else: + tc.variables["CAF_CXX_VERSION"] = str(self.settings.compiler.cppstd).replace("gnu", "") tc.variables["CAF_ENABLE_OPENSSL_MODULE"] = self.options.with_openssl tc.variables["CAF_ENABLE_EXAMPLES"] = False tc.variables["CAF_ENABLE_TOOLS"] = False diff --git a/recipes/caf/config.yml b/recipes/caf/config.yml index 548a9345742d5..a133d776e2a27 100644 --- a/recipes/caf/config.yml +++ b/recipes/caf/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.0": + folder: all "0.19.4": folder: all "0.19.3": diff --git a/recipes/cairo/meson/conandata.yml b/recipes/cairo/all/conandata.yml similarity index 100% rename from recipes/cairo/meson/conandata.yml rename to recipes/cairo/all/conandata.yml diff --git a/recipes/cairo/meson/conanfile.py b/recipes/cairo/all/conanfile.py similarity index 100% rename from recipes/cairo/meson/conanfile.py rename to recipes/cairo/all/conanfile.py diff --git a/recipes/cairo/meson/patches/binutils-2.34-libbfd-fix.patch b/recipes/cairo/all/patches/binutils-2.34-libbfd-fix.patch similarity index 100% rename from recipes/cairo/meson/patches/binutils-2.34-libbfd-fix.patch rename to recipes/cairo/all/patches/binutils-2.34-libbfd-fix.patch diff --git a/recipes/cairo/meson/patches/cairo-1.17.4-encoding-backport.patch b/recipes/cairo/all/patches/cairo-1.17.4-encoding-backport.patch similarity index 100% rename from recipes/cairo/meson/patches/cairo-1.17.4-encoding-backport.patch rename to recipes/cairo/all/patches/cairo-1.17.4-encoding-backport.patch diff --git a/recipes/cairo/meson/patches/cairo-1.17.4-symbol-lookup-backport.patch b/recipes/cairo/all/patches/cairo-1.17.4-symbol-lookup-backport.patch similarity index 100% rename from recipes/cairo/meson/patches/cairo-1.17.4-symbol-lookup-backport.patch rename to recipes/cairo/all/patches/cairo-1.17.4-symbol-lookup-backport.patch diff --git a/recipes/cairo/meson/patches/cairo-1.17.4-trace-cflags-fix.patch b/recipes/cairo/all/patches/cairo-1.17.4-trace-cflags-fix.patch similarity index 100% rename from recipes/cairo/meson/patches/cairo-1.17.4-trace-cflags-fix.patch rename to recipes/cairo/all/patches/cairo-1.17.4-trace-cflags-fix.patch diff --git a/recipes/cairo/meson/patches/cairo-1.17.4-xlib-xrender-option.patch b/recipes/cairo/all/patches/cairo-1.17.4-xlib-xrender-option.patch similarity index 100% rename from recipes/cairo/meson/patches/cairo-1.17.4-xlib-xrender-option.patch rename to recipes/cairo/all/patches/cairo-1.17.4-xlib-xrender-option.patch diff --git a/recipes/cairo/meson/test_package/CMakeLists.txt b/recipes/cairo/all/test_package/CMakeLists.txt similarity index 100% rename from recipes/cairo/meson/test_package/CMakeLists.txt rename to recipes/cairo/all/test_package/CMakeLists.txt diff --git a/recipes/cairo/meson/test_package/conanfile.py b/recipes/cairo/all/test_package/conanfile.py similarity index 100% rename from recipes/cairo/meson/test_package/conanfile.py rename to recipes/cairo/all/test_package/conanfile.py diff --git a/recipes/cairo/meson/test_package/test_package.c b/recipes/cairo/all/test_package/test_package.c similarity index 100% rename from recipes/cairo/meson/test_package/test_package.c rename to recipes/cairo/all/test_package/test_package.c diff --git a/recipes/plutovg/all/test_v1_package/CMakeLists.txt b/recipes/cairo/all/test_v1_package/CMakeLists.txt similarity index 74% rename from recipes/plutovg/all/test_v1_package/CMakeLists.txt rename to recipes/cairo/all/test_v1_package/CMakeLists.txt index de3b75d9538de..91630d79f4abb 100644 --- a/recipes/plutovg/all/test_v1_package/CMakeLists.txt +++ b/recipes/cairo/all/test_v1_package/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES C) +cmake_minimum_required(VERSION 3.15) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) diff --git a/recipes/cairo/meson/test_v1_package/conanfile.py b/recipes/cairo/all/test_v1_package/conanfile.py similarity index 100% rename from recipes/cairo/meson/test_v1_package/conanfile.py rename to recipes/cairo/all/test_v1_package/conanfile.py diff --git a/recipes/cairo/config.yml b/recipes/cairo/config.yml index 63606cbea47b1..ec5b451e74c04 100644 --- a/recipes/cairo/config.yml +++ b/recipes/cairo/config.yml @@ -1,9 +1,9 @@ versions: "1.18.0": - folder: meson + folder: all "1.17.8": - folder: meson + folder: all "1.17.6": - folder: meson + folder: all "1.17.4": - folder: meson + folder: all diff --git a/recipes/catch2/3.x.x/conandata.yml b/recipes/catch2/3.x.x/conandata.yml index bd54e7086e964..f13e63f80f8cb 100644 --- a/recipes/catch2/3.x.x/conandata.yml +++ b/recipes/catch2/3.x.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.7.0": + url: "https://github.com/catchorg/Catch2/archive/v3.7.0.tar.gz" + sha256: "5b10cd536fa3818112a82820ce0787bd9f2a906c618429e7c4dea639983c8e88" "3.6.0": url: "https://github.com/catchorg/Catch2/archive/v3.6.0.tar.gz" sha256: "485932259a75c7c6b72d4b874242c489ea5155d17efa345eb8cc72159f49f356" diff --git a/recipes/catch2/config.yml b/recipes/catch2/config.yml index 51d1bba3d03b7..a1edebfb1f349 100644 --- a/recipes/catch2/config.yml +++ b/recipes/catch2/config.yml @@ -1,4 +1,6 @@ versions: + "3.7.0": + folder: 3.x.x "3.6.0": folder: 3.x.x "3.5.4": diff --git a/recipes/cctag/all/conandata.yml b/recipes/cctag/all/conandata.yml index 1f24a6339e1f2..85f3e81e772c2 100644 --- a/recipes/cctag/all/conandata.yml +++ b/recipes/cctag/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.4": + url: "https://github.com/alicevision/CCTag/archive/refs/tags/v1.0.4.tar.gz" + sha256: "f4ced6138419f4ad09d62d4373738c172586c91068faff8bf08c2caa5e76d516" "1.0.3": url: "https://github.com/alicevision/CCTag/archive/refs/tags/v1.0.3.tar.gz" sha256: "25396b03c4aa3c1be241a2a8518a29511cb4fff695caa5126203fbba8e8e444d" diff --git a/recipes/cctag/all/conanfile.py b/recipes/cctag/all/conanfile.py index 8d249cbcf72c9..617a9b8ecd704 100644 --- a/recipes/cctag/all/conanfile.py +++ b/recipes/cctag/all/conanfile.py @@ -59,7 +59,9 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.84.0", transitive_headers=True, transitive_libs=True) + # boost/1.85.0 not compatible because of "error: 'numeric' is not a namespace-name" error + boost_version = "1.85.0" if Version(self.version) >= "1.0.4" else "1.84.0" + self.requires(f"boost/{boost_version}", transitive_headers=True, transitive_libs=True) self.requires("eigen/3.4.0", transitive_headers=True) if Version(self.version) >= "1.0.3": self.requires("onetbb/2021.10.0") @@ -126,8 +128,10 @@ def _patch_sources(self): replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), "${OpenCV_LIBS}", "opencv_core opencv_videoio opencv_imgproc opencv_imgcodecs") - # Remove very old CUDA compute capabilities - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + # From https://github.com/alicevision/CCTag/pull/210/files CCTAG_CUDA_CC_LIST_INIT0 variable doesn't exists anymore in favor of a chooseCudaCC() cmake function + if Version(self.version) < "1.0.4": + # Remove very old CUDA compute capabilities + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "set(CCTAG_CUDA_CC_LIST_INIT0 3.5 3.7 5.0 5.2)", "set(CCTAG_CUDA_CC_LIST_INIT0 5.0 5.2)") diff --git a/recipes/cctag/config.yml b/recipes/cctag/config.yml index 2350f098ddd20..20e7cbd11f28a 100644 --- a/recipes/cctag/config.yml +++ b/recipes/cctag/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.4": + folder: all "1.0.3": folder: all "1.0.1": diff --git a/recipes/chipmunk2d/all/conandata.yml b/recipes/chipmunk2d/all/conandata.yml index 0fcc6c23d2ed4..41e39beaf8dc2 100644 --- a/recipes/chipmunk2d/all/conandata.yml +++ b/recipes/chipmunk2d/all/conandata.yml @@ -2,3 +2,10 @@ sources: "7.0.3": url: "https://chipmunk-physics.net/release/Chipmunk-7.x/Chipmunk-7.0.3.tgz" sha256: "048b0c9eff91c27bab8a54c65ad348cebd5a982ac56978e8f63667afbb63491a" + +patches: + "7.0.3": + - patch_file: "patches/0001-remove-sysctl-linux-win.patch" + patch_type: bugfix + patch_source: https://github.com/slembcke/Chipmunk2D/pull/175 + patch_description: "Needed to build with glib > 2.30" diff --git a/recipes/chipmunk2d/all/conanfile.py b/recipes/chipmunk2d/all/conanfile.py index 785d8d95d890d..53afb4be1c99c 100644 --- a/recipes/chipmunk2d/all/conanfile.py +++ b/recipes/chipmunk2d/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, replace_in_file +from conan.tools.files import copy, get, replace_in_file, apply_conandata_patches, export_conandata_patches import os required_conan_version = ">=1.53.0" @@ -52,9 +52,13 @@ def generate(self): tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True tc.generate() + def export_sources(self): + export_conandata_patches(self) + def _patch_sources(self): # The finite-math-only optimization has no effect and can cause linking errors # when linked against glibc >= 2.31 + apply_conandata_patches(self) replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "-ffast-math", "-ffast-math -fno-finite-math-only") diff --git a/recipes/chipmunk2d/all/patches/0001-remove-sysctl-linux-win.patch b/recipes/chipmunk2d/all/patches/0001-remove-sysctl-linux-win.patch new file mode 100644 index 0000000000000..8b123a7652b29 --- /dev/null +++ b/recipes/chipmunk2d/all/patches/0001-remove-sysctl-linux-win.patch @@ -0,0 +1,16 @@ +--- a/src/cpHastySpace.c ++++ b/src/cpHastySpace.c +@@ -7,8 +7,12 @@ + //TODO: Move all the thread stuff to another file + + //#include +-#ifndef _WIN32 ++ ++#ifdef __APPLE__ + #include ++#endif ++ ++#ifndef _WIN32 + #include + #else + #ifndef WIN32_LEAN_AND_MEAN diff --git a/recipes/cigi-ccl/all/conandata.yml b/recipes/cigi-ccl/all/conandata.yml new file mode 100644 index 0000000000000..f77d32f6993f8 --- /dev/null +++ b/recipes/cigi-ccl/all/conandata.yml @@ -0,0 +1,5 @@ +sources: + "4.0.6a": + url: + - "https://master.dl.sourceforge.net/project/cigi/CIGI%20Class%20Library%20%28CCL%29/CCL%20Version%204.0.6a/ccl_4_0%20rev6a.zip" + sha256: "a55099c0418c663e572109bd62ed2f7b411c51af7b404212988e36360e8a13cc" diff --git a/recipes/cigi-ccl/all/conanfile.py b/recipes/cigi-ccl/all/conanfile.py new file mode 100644 index 0000000000000..5237537049f2f --- /dev/null +++ b/recipes/cigi-ccl/all/conanfile.py @@ -0,0 +1,102 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.apple import is_apple_os +import os + +required_conan_version = ">=1.53.0" + +class CigiClConan(ConanFile): + name = "cigi-ccl" + description = "Industry standard communication with compliant image generators" + license = "LGPL-2.1-only" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://cigi.sourceforge.io/product_ccl.php" + topics = ("simulation", "interface engines", "data visualization") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if is_apple_os(self): + # CigiOutgoingMsg.cpp:196:38: error: use of undeclared identifier 'PTHREAD_MUTEX_RECURSIVE_NP' + raise ConanInvalidConfiguration(f"{self.settings.os} Conan recipe is not supported on Apple. Contributions are welcome.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + + if is_msvc(self): + tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) + + tc.generate() + + def _patch_sources(self): + cmake_lists_fixes = { + # This old CMakeLists.txt had PROJECT() before CMAKE_MINIMUM_REQUIRED(); this order must be inverted + "CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7)": "", + "PROJECT(ccl)": "CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7)\nPROJECT(ccl)", + # Using backslash for path is being interpreted as invalid escape sequence in newer versions of CMake + "Header Files\\": "Header Files/", + "Source Files\\": "Source Files/", + # Incorrectly tries to install both the static and shared targets + "INSTALL(TARGETS cigicl-static cigicl-shared": f"INSTALL(TARGETS {'cigicl-shared' if self.options.shared else 'cigicl-static'}" + } + + for old, new in cmake_lists_fixes.items(): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), old, new) + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + if self.options.shared: + cmake.build(target="cigicl-shared") + else: + cmake.build(target="cigicl-static") + + def package(self): + cmake = CMake(self) + cmake.install() + + copy(self, "license.html", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + + def package_info(self): + self.cpp_info.set_property("pkg_config_name", "cigicl") + build_type_suffix = "" + if self.settings.build_type == "Debug" and self.settings.os == "Windows": + build_type_suffix = "D" + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["pthread", "m"]) + + if self.options.shared: + self.cpp_info.libs = ["ccl_dll" + build_type_suffix] + self.cpp_info.defines = ["CCL_DLL"] + else: + self.cpp_info.libs = ["ccl_lib" + build_type_suffix] diff --git a/recipes/cigi-ccl/all/test_package/CMakeLists.txt b/recipes/cigi-ccl/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..9ff9e1c44f12c --- /dev/null +++ b/recipes/cigi-ccl/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) + +find_package(cigi-ccl REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) + +target_link_libraries(${PROJECT_NAME} PRIVATE cigi-ccl::cigi-ccl) diff --git a/recipes/cigi-ccl/all/test_package/conanfile.py b/recipes/cigi-ccl/all/test_package/conanfile.py new file mode 100644 index 0000000000000..f5cf204295e19 --- /dev/null +++ b/recipes/cigi-ccl/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +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 = "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): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/cigi-ccl/all/test_package/test_package.cpp b/recipes/cigi-ccl/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..9a4a0a228de16 --- /dev/null +++ b/recipes/cigi-ccl/all/test_package/test_package.cpp @@ -0,0 +1,7 @@ +#include + +int main(void) { + CigiOutgoingMsg message; + message.CreateBuffer(); + return 0; +} diff --git a/recipes/cigi-ccl/config.yml b/recipes/cigi-ccl/config.yml new file mode 100644 index 0000000000000..f73e93e2624ef --- /dev/null +++ b/recipes/cigi-ccl/config.yml @@ -0,0 +1,3 @@ +versions: + "4.0.6a": + folder: all diff --git a/recipes/clipper2/all/conandata.yml b/recipes/clipper2/all/conandata.yml index 317fd4373a1de..5d1e76ef64605 100644 --- a/recipes/clipper2/all/conandata.yml +++ b/recipes/clipper2/all/conandata.yml @@ -1,7 +1,10 @@ sources: + "1.4.0": + url: "https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Clipper2_1.4.0.tar.gz" + sha256: "b83f71bb6a338f4f82116089c5ae867dbc43a2d651b5441380970dd966edd959" "1.3.0": - url: "https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Cliper2_1.3.0.tar.gz" - sha256: "f7e1a706f5f786ed1be8ae969ce15ca569ce36d8de1c3d3f3dacfb3ce0c493e8" + url: "https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Clipper2_1.3.0.tar.gz" + sha256: "8e537ec320e140afaa8fba1f23120416693cc1d71b0f76ad801d24b88b5e0b3c" "1.2.4": url: "https://github.com/AngusJohnson/Clipper2/archive/refs/tags/Clipper2_1.2.4.tar.gz" sha256: "a013d391c25c5f665cdb5cbd75cdd842dcc28f6e1bd098454beb359f6f212f33" diff --git a/recipes/clipper2/all/conanfile.py b/recipes/clipper2/all/conanfile.py index fe88fd67b3e80..c01db389a4cf8 100644 --- a/recipes/clipper2/all/conanfile.py +++ b/recipes/clipper2/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, copy, rmdir, export_conandata_patches, apply_conandata_patches +from conan.tools.files import get, copy, rmdir, export_conandata_patches, apply_conandata_patches, replace_in_file from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout @@ -21,11 +21,15 @@ class Clipper2Conan(ConanFile): "shared": [True, False], "fPIC": [True, False], "usingz": ["ON", "OFF", "ONLY"], + "with_max_precision": ["ANY"], + "with_hi_precision": [True, False], } default_options = { "shared": False, "fPIC": True, "usingz": "ON", + "with_max_precision": 8, + "with_hi_precision": False, } @property @@ -48,6 +52,10 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "1.2.4": + del self.options.with_max_precision + if Version(self.version) < "1.4.0": + del self.options.with_hi_precision def configure(self): if self.options.shared: @@ -75,10 +83,18 @@ def generate(self): tc.variables["CLIPPER2_EXAMPLES"] = False tc.variables["CLIPPER2_TESTS"] = False tc.variables["CLIPPER2_USINGZ"] = self.options.usingz + if "with_hi_precision" in self.options: + tc.variables["CLIPPER2_HI_PRECISION"] = self.options.with_hi_precision + if "with_max_precision" in self.options: + tc.variables["CLIPPER2_MAX_PRECISION"] = self.options.with_max_precision tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + replace_in_file(self, os.path.join(self.source_folder, "CPP", "CMakeLists.txt"), "-Werror", "") def build(self): - apply_conandata_patches(self) + self._patch_sources() cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, "CPP")) cmake.build() @@ -89,6 +105,7 @@ def package(self): cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): if self.options.usingz != "ONLY": diff --git a/recipes/clipper2/config.yml b/recipes/clipper2/config.yml index 49b239cf22a6f..4c35529540bb1 100644 --- a/recipes/clipper2/config.yml +++ b/recipes/clipper2/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.0": + folder: all "1.3.0": folder: all "1.2.4": diff --git a/recipes/cmake/binary/conandata.yml b/recipes/cmake/binary/conandata.yml index 7b682380b0ea6..7959b73239b48 100644 --- a/recipes/cmake/binary/conandata.yml +++ b/recipes/cmake/binary/conandata.yml @@ -1,4 +1,61 @@ sources: + "3.30.1": + Linux: + armv8: + url: "https://cmake.org/files/v3.30/cmake-3.30.1-linux-aarch64.tar.gz" + sha256: "ad234996f8750f11d7bd0d17b03f55c434816adf1f1671aab9e8bab21a43286a" + x86_64: + url: "https://cmake.org/files/v3.30/cmake-3.30.1-linux-x86_64.tar.gz" + sha256: "ac31f077ef3378641fa25a3cb980d21b2f083982d3149a8f2eb9154f2b53696b" + Macos: + universal: + url: "https://cmake.org/files/v3.30/cmake-3.30.1-macos10.10-universal.tar.gz" + sha256: "4c1beda2bb2ab830f22fdb29aa6cc844f9b0eb32cca0fb4f01b407688944d181" + Windows: + armv8: + url: "https://cmake.org/files/v3.30/cmake-3.30.1-windows-arm64.zip" + sha256: "02b433f70aa549449be2d53046d0179590bf3b6290d9fda3fbbb23f96a4f2802" + x86_64: + url: "https://cmake.org/files/v3.30/cmake-3.30.1-windows-x86_64.zip" + sha256: "cf7788ff9d92812da194847d4ec874fc576f34079987d0f20c96cd09e2a16220" + "3.30.0": + Linux: + armv8: + url: "https://cmake.org/files/v3.30/cmake-3.30.0-linux-aarch64.tar.gz" + sha256: "3db7f12dadc91be9b30f0e5a71038c51d7f5b7cc03e32625621a052e9996bef0" + x86_64: + url: "https://cmake.org/files/v3.30/cmake-3.30.0-linux-x86_64.tar.gz" + sha256: "09846a3858583f38189b59177586adf125a08c15f3cddcaf7d7d7081ac86969f" + Macos: + universal: + url: "https://cmake.org/files/v3.30/cmake-3.30.0-macos10.10-universal.tar.gz" + sha256: "54f237212362efa3f192508eeb25d98f2150779ed45c46a77fe356597c3d2749" + Windows: + armv8: + url: "https://cmake.org/files/v3.30/cmake-3.30.0-windows-arm64.zip" + sha256: "cb8fb65a8f523daa0ce6c531407ae10fcab8d0eefe18a6ef9fb718c54307d6e3" + x86_64: + url: "https://cmake.org/files/v3.30/cmake-3.30.0-windows-x86_64.zip" + sha256: "f8d2da0eaf3bab9cf065e97bd6d8e1819886f8671d3d4c7bb93cb774123fa448" + "3.29.7": + Linux: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.7-linux-aarch64.tar.gz" + sha256: "ee8cf1ceaef011578ec070c13471c4b26e87f065315155e11177063b0743da68" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.7-linux-x86_64.tar.gz" + sha256: "fb0837495a3a1d044f5101d0a76d294c825ff85c10a32c42d7167604278344f7" + Macos: + universal: + url: "https://cmake.org/files/v3.29/cmake-3.29.7-macos10.10-universal.tar.gz" + sha256: "3a148e37bf57c419e40817d6208916a33eff8c1757b0947d9991eca902916559" + Windows: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.7-windows-arm64.zip" + sha256: "ae87f2ff173deeb3ae8891d31c8f92ebabab8a4c29a074c5c5d39b38dde706d2" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.7-windows-x86_64.zip" + sha256: "3d9580b54faa0651f4cb0bccdff222bd123366b35a8b1051ee33a64915384ee4" "3.29.6": Linux: armv8: diff --git a/recipes/cmake/config.yml b/recipes/cmake/config.yml index f02222d081bdc..1f33473eb51a7 100644 --- a/recipes/cmake/config.yml +++ b/recipes/cmake/config.yml @@ -1,4 +1,10 @@ versions: + "3.30.1": + folder: "binary" + "3.30.0": + folder: "binary" + "3.29.7": + folder: "binary" "3.29.6": folder: "binary" "3.29.5": diff --git a/recipes/cnats/all/conandata.yml b/recipes/cnats/all/conandata.yml index 7a17667b0dc32..ebda96545ffb0 100644 --- a/recipes/cnats/all/conandata.yml +++ b/recipes/cnats/all/conandata.yml @@ -2,3 +2,6 @@ sources: "3.8.0": url: "https://github.com/nats-io/nats.c/archive/refs/tags/v3.8.0.tar.gz" sha256: "465811380cdc6eab3304e40536d03f99977a69c0e56fcf566000c29dd075e4dd" + "3.8.2": + url: "https://github.com/nats-io/nats.c/archive/refs/tags/v3.8.2.tar.gz" + sha256: "083ee03cf5a413629d56272e88ad3229720c5006c286e8180c9e5b745c10f37d" diff --git a/recipes/cnats/config.yml b/recipes/cnats/config.yml index ca7b223bb16c2..5defa697a5927 100644 --- a/recipes/cnats/config.yml +++ b/recipes/cnats/config.yml @@ -1,3 +1,5 @@ versions: "3.8.0": folder: all + "3.8.2": + folder: all diff --git a/recipes/commata/all/conandata.yml b/recipes/commata/all/conandata.yml index f27e5a5899c63..859d53c719d79 100644 --- a/recipes/commata/all/conandata.yml +++ b/recipes/commata/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.0": + url: "https://github.com/furfurylic/commata/archive/refs/tags/v1.0.0.tar.gz" + sha256: "ecf0a88f6a4616d10770522b4ef4838e4100511759eb640270f6b932e4b7df69" "0.2.9": url: "https://github.com/furfurylic/commata/archive/refs/tags/v0.2.9.tar.gz" sha256: "24c404e90e2f01a2f9e46e55c2f8121a3f146d1f2dfb819b8d7ab5cf13bd6a9f" diff --git a/recipes/commata/config.yml b/recipes/commata/config.yml index 142c2b3beaf0a..992edc2e1338d 100644 --- a/recipes/commata/config.yml +++ b/recipes/commata/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.0": + folder: all "0.2.9": folder: all "0.2.8": diff --git a/recipes/compute_library/all/conandata.yml b/recipes/compute_library/all/conandata.yml new file mode 100644 index 0000000000000..3b952c4dbb5e0 --- /dev/null +++ b/recipes/compute_library/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "23.08": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v23.08.tar.gz" + sha256: "62f514a555409d4401e5250b290cdf8cf1676e4eb775e5bd61ea6a740a8ce24f" + "23.02.1": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v23.02.1.tar.gz" + sha256: "c3a443e26539f866969242e690cf0651ef629149741ee18732f954c734da6763" diff --git a/recipes/compute_library/all/conanfile.py b/recipes/compute_library/all/conanfile.py new file mode 100644 index 0000000000000..6becfaaa8f1bb --- /dev/null +++ b/recipes/compute_library/all/conanfile.py @@ -0,0 +1,149 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy, rm, chdir +from conan.tools.build import check_min_cppstd, cross_building, build_jobs +from conan.tools.scm import Version +from conan.tools.env import VirtualBuildEnv +from conan.tools.gnu import AutotoolsDeps, AutotoolsToolchain +from conan.tools.layout import basic_layout +import os + + +required_conan_version = ">=1.53.0" + + +class ComputeLibraryConan(ConanFile): + name = "compute_library" + description = "The Compute Library is a set of computer vision and machine learning functions optimized for both Arm CPUs and GPUs using SIMD technologies" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ARM-software/ComputeLibrary" + topics = ("android", "linux", "machine-learning", "arm", "computer-vision", "neural-network") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "enable_openmp": [True, False], + "enable_opencl": [True, False], + "enable_neon": [True, False], + "enable_multi_isa": [True, False], + } + default_options = { + "shared": False, + "enable_openmp": False, + "enable_opencl": True, + "enable_neon": True, + "enable_multi_isa": False, + } + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "6", + "clang": "5", + "apple-clang": "5.1", + } + + def config_options(self): + # INFO: Neon option is reserved to arm architecture + if "arm" not in str(self.settings.arch): + del self.options.enable_neon + # INFO: OpenMP option only works with g++, according to the documentation + if self.settings.compiler == "clang": + del self.options.enable_openmp + # INFO: OpenCL fails to build with MacOS + if self.settings.os == "Macos": + del self.options.enable_opencl + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") + + def build_requirements(self): + self.tool_requires("scons/4.3.0") + + def requirements(self): + if self.options.get_safe("enable_opencl"): + self.requires("opencl-headers/2023.04.17") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + 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.") + # INFO: https://github.com/ARM-software/ComputeLibrary#supported-systems + supported_os = ["Android", "Linux", "OpenBSD", "Macos", "Tizen", "Windows"] + if str(self.settings.os) not in supported_os: + raise ConanInvalidConfiguration(f"{self.ref} does not support {self.settings.os}. It is only supported on {supported_os}.") + if self.settings.os == "Windows": + if cross_building(self): + # INFO: https://arm-software.github.io/ComputeLibrary/latest/how_to_build.xhtml#S1_6_windows_host + raise ConanInvalidConfiguration(f"Using scons directly from the Windows command line is known to cause problems. Please, try native native build on Windows ARM or cross-build on Linux Ubuntu.") + if "arm" in str(self.settings.arch): + # INFO: https://arm-software.github.io/ComputeLibrary/latest/how_to_build.xhtml#S1_6_3_WoA + self.output.warn("Native builds on Windows are experimental and some features from the library interacting with the OS are missing.") + if "x86" in str(self.settings.arch): + raise ConanInvalidConfiguration(f"{self.ref} does not support native builds on Windows x86/x86_64. It is only supported on Windows ARM.") + if "arm" not in str(self.settings.arch) and "x86" not in str(self.settings.arch): + # INFO: https://github.com/ARM-software/ComputeLibrary#supported-architecturestechnologies + raise ConanInvalidConfiguration(f"{self.ref} does not support {self.settings.arch}. It is only supported on arm and x86.") + if "x86" in str(self.settings.arch) and self.settings.os != "Macos" and not self.options.get_safe("enable_opencl", False): + raise ConanInvalidConfiguration(f"{self.ref} can be built for x86_64 targets only with enable_neon=False and enable_opencl=True.") + if self.settings.os == "Linux" and self.settings.compiler == "clang": + # INFO: https://arm-software.github.io/ComputeLibrary/latest/how_to_build.xhtml#S1_2_linux + raise ConanInvalidConfiguration(f"{self.ref} does not support Linux with clang. It is only supported on Linux with gcc.") + if "armv8" not in str(self.settings.arch) and self.options.enable_multi_isa: + raise ConanInvalidConfiguration(f"{self.ref} does not support multi_isa option for {self.settings.arch}. It is only supported on armv8.") + if self.settings.arch == "armv8" and self.settings_build.arch == "x86_64" and self.settings.os == "Macos" and self.settings.compiler == "apple-clang": + raise ConanInvalidConfiguration(f"Mac Intel is not supported for armv8-a. Please, use Mac M1 as native build.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + tc.generate() + tc = AutotoolsDeps(self) + tc.generate() + tc = VirtualBuildEnv(self) + tc.generate(scope="build") + + def build(self): + # INFO: Using scons to build the library we don't have control over shared/static and install step, it is done all together always + # INFO: https://arm-software.github.io/ComputeLibrary/latest/how_to_build.xhtml + yes_no = lambda v: "1" if v else "0" + debug = yes_no(self.settings.build_type == "Debug") + build_os = str(self.settings.os).lower() + arch = {"armv8": "armv8a", "x86": "x86_32", "armv7": "armv7a", "armv7hf": "armv7a-hf"}.get(str(self.settings.arch), str(self.settings.arch)) + neon = yes_no(self.options.get_safe("enable_neon")) + opencl = yes_no(self.options.get_safe("enable_opencl", False)) + openmp = yes_no(self.options.get_safe("enable_openmp")) + multi_isa = yes_no(self.options.enable_multi_isa) + build = "cross_compile" if cross_building(self) else "native" + with chdir(self, self.source_folder): + self.run(f"scons Werror=0 validation_tests=0 examples=0 gemm_tuner=0 multi_isa={multi_isa} openmp={openmp} debug={debug} neon={neon} opencl={opencl} os={build_os} arch={arch} build={build} build_dir={self.build_folder} install_dir={self.package_folder} -j{build_jobs(self)} toolchain_prefix=''", env="conanbuild") + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + # INFO: Artifacts are installed during build step, so we just need to remove what we don't want + rm(self, "*.bazel", self.package_folder, recursive=True) + rm(self, "*.cpp", self.package_folder, recursive=True) + if self.options.shared: + rm(self, "*.a", os.path.join(self.package_folder, "lib")) + else: + rm(self, "*.so*", os.path.join(self.package_folder, "lib")) + rm(self, "*.dylib*", os.path.join(self.package_folder, "lib")) + + def package_info(self): + suffix = "" if self.options.shared else "-static" + self.cpp_info.libs = [f"arm_compute{suffix}", f"arm_compute_core{suffix}", f"arm_compute_graph{suffix}"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m", "pthread"] diff --git a/recipes/compute_library/all/test_package/CMakeLists.txt b/recipes/compute_library/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..4c1184efde1e9 --- /dev/null +++ b/recipes/compute_library/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(compute_library REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE compute_library::compute_library) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/compute_library/all/test_package/conanfile.py b/recipes/compute_library/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/compute_library/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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 = "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): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/compute_library/all/test_package/test_package.cpp b/recipes/compute_library/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..2457b9908b8ac --- /dev/null +++ b/recipes/compute_library/all/test_package/test_package.cpp @@ -0,0 +1,11 @@ +#include +#include +#include "arm_compute/core/Version.h" + + +int main(void) { + std::cout << "ComputeLibrary information:" << std::endl; + std::cout << arm_compute::build_information() << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/compute_library/config.yml b/recipes/compute_library/config.yml new file mode 100644 index 0000000000000..118236bce990b --- /dev/null +++ b/recipes/compute_library/config.yml @@ -0,0 +1,5 @@ +versions: + "23.08": + folder: all + "23.02.1": + folder: all diff --git a/recipes/cpp-channel/all/conandata.yml b/recipes/cpp-channel/all/conandata.yml index 8e45b89578701..ed231f8fb8014 100644 --- a/recipes/cpp-channel/all/conandata.yml +++ b/recipes/cpp-channel/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.8.3": + url: "https://github.com/andreiavrammsd/cpp-channel/archive/refs/tags/v0.8.3.tar.gz" + sha256: "49539a9e387797bd91d1713588f7c88beef98d69919bfb7b0712ed060527567a" "0.8.2": url: "https://github.com/andreiavrammsd/cpp-channel/archive/refs/tags/v0.8.2.tar.gz" sha256: "7666ec6ef275029593dc97bf35057761bc049298d71597a640da1e659c39a667" diff --git a/recipes/cpp-channel/config.yml b/recipes/cpp-channel/config.yml index bed1cdd9bb5b1..eda9ea75e51a5 100644 --- a/recipes/cpp-channel/config.yml +++ b/recipes/cpp-channel/config.yml @@ -1,3 +1,5 @@ versions: + "0.8.3": + folder: all "0.8.2": folder: all diff --git a/recipes/cpp-dump/all/conandata.yml b/recipes/cpp-dump/all/conandata.yml index e2ca2bfcf8c91..adaa64a423425 100644 --- a/recipes/cpp-dump/all/conandata.yml +++ b/recipes/cpp-dump/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.7.0": + url: "https://github.com/philip82148/cpp-dump/archive/refs/tags/v0.7.0.tar.gz" + sha256: "b27a0854a405aa10619f341f66e26a6c39dca1ad41a26dd4fa6d86ad6752c4f8" "0.6.0": url: "https://github.com/philip82148/cpp-dump/archive/refs/tags/v0.6.0.tar.gz" sha256: "22bc5fafa22ac7c1e99db8824fdabec4af6baabed0c8b7cc80a0205dfb550414" diff --git a/recipes/cpp-dump/all/conanfile.py b/recipes/cpp-dump/all/conanfile.py index b9f479f3b52af..36c04e6dd12c9 100644 --- a/recipes/cpp-dump/all/conanfile.py +++ b/recipes/cpp-dump/all/conanfile.py @@ -55,18 +55,32 @@ def source(self): def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - copy( - self, - pattern="dump.hpp", - dst=os.path.join(self.package_folder, "include"), - src=self.source_folder, - ) - copy( - self, - pattern="*.hpp", - dst=os.path.join(self.package_folder, "include", "hpp"), - src=os.path.join(self.source_folder, "hpp"), - ) + if Version(self.version) < "0.7.0": + copy( + self, + pattern="dump.hpp", + dst=os.path.join(self.package_folder, "include"), + src=self.source_folder, + ) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include", "hpp"), + src=os.path.join(self.source_folder, "hpp"), + ) + else: + copy( + self, + pattern="*dump.hpp", + dst=os.path.join(self.package_folder, "include"), + src=self.source_folder, + ) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include", "cpp-dump"), + src=os.path.join(self.source_folder, "cpp-dump"), + ) def package_info(self): self.cpp_info.bindirs = [] diff --git a/recipes/cpp-dump/config.yml b/recipes/cpp-dump/config.yml index 33d7618432d30..d61439bae1bc3 100644 --- a/recipes/cpp-dump/config.yml +++ b/recipes/cpp-dump/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.0": + folder: all "0.6.0": folder: all "0.5.0": diff --git a/recipes/cpp-httplib/all/conandata.yml b/recipes/cpp-httplib/all/conandata.yml index 8ff6cdba110e7..0670cdc087177 100644 --- a/recipes/cpp-httplib/all/conandata.yml +++ b/recipes/cpp-httplib/all/conandata.yml @@ -1,34 +1,32 @@ sources: + "0.18.0": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.18.0.tar.gz" + sha256: "6ed5894bbbc4a34a0f4c5e962672d0003d2ea099bbadacc66f6dee2b213ff394" + "0.17.3": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.17.3.tar.gz" + sha256: "95bd6dba4241656c59d6f0854d408d14c220f7c71e673319ee27d30aee741aaa" + "0.17.1": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.17.1.tar.gz" + sha256: "044c5a233da242e981d9543dd136a5945e0549c5641a0373934db88bbd192f41" + "0.16.3": + url: "https://github.com/yhirose/cpp-httplib/archive/v0.16.3.tar.gz" + sha256: "c1742fc7179aaae2a67ad9bba0740b7e9ffaf4f5e62feef53101ecdef1478716" "0.16.0": url: "https://github.com/yhirose/cpp-httplib/archive/v0.16.0.tar.gz" sha256: "c125022eb85eaa12235518dc4638be93b62c3216d0f87b655af7b17b71b38851" "0.15.3": url: "https://github.com/yhirose/cpp-httplib/archive/v0.15.3.tar.gz" sha256: "2121bbf38871bb2aafb5f7f2b9b94705366170909f434428352187cb0216124e" - "0.15.2": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.15.2.tar.gz" - sha256: "4afbcf4203249d2cbcb698e46e1f6fb61b479013a84844d6bb1c044e233cab6a" - "0.15.1": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.15.1.tar.gz" - sha256: "8d6a4a40ee8fd3f553b7e895882e60e674bd910883fc1857587dbbabee3cdb91" "0.14.3": url: "https://github.com/yhirose/cpp-httplib/archive/v0.14.3.tar.gz" sha256: "dcf6486d9030937636d8a4f820ca9531808fd7edb283893dddbaa05f99357e63" - "0.14.2": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.14.2.tar.gz" - sha256: "dbcf5590e8ed35c6745c2ad659a5ebec92f05187d1506eec24449d6db95e5084" + # keep 0.14.1 for enjincppsdk and microservice-essentials "0.14.1": url: "https://github.com/yhirose/cpp-httplib/archive/v0.14.1.tar.gz" sha256: "2d4fb5544da643e5d0a82585555d8b7502b4137eb321a4abbb075e21d2f00e96" - "0.14.0": - url: "https://github.com/yhirose/cpp-httplib/archive/v0.14.0.tar.gz" - sha256: "3a92248ef8cf2c32ad07f910b8e3052ff2427022b2adb871cf326fb620d2438e" "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" "0.12.6": url: "https://github.com/yhirose/cpp-httplib/archive/v0.12.6.tar.gz" sha256: "24bc594a9efcc08a5a6f3928e848d046d411a88b07bcd6f7f3851227a1f0133e" diff --git a/recipes/cpp-httplib/all/conanfile.py b/recipes/cpp-httplib/all/conanfile.py index 7ecbe0a2931e5..4e28d01766a72 100644 --- a/recipes/cpp-httplib/all/conanfile.py +++ b/recipes/cpp-httplib/all/conanfile.py @@ -11,8 +11,8 @@ class CpphttplibConan(ConanFile): name = "cpp-httplib" description = "A C++11 single-file header-only cross platform HTTP/HTTPS library." license = "MIT" - homepage = "https://github.com/yhirose/cpp-httplib" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/yhirose/cpp-httplib" topics = ("http", "https", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" @@ -49,9 +49,6 @@ def layout(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "httplib.h", src=self.source_folder, dst=os.path.join(self.package_folder, "include", "httplib")) diff --git a/recipes/cpp-httplib/all/test_package/conanfile.py b/recipes/cpp-httplib/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/cpp-httplib/all/test_package/conanfile.py +++ b/recipes/cpp-httplib/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/cpp-httplib/config.yml b/recipes/cpp-httplib/config.yml index d7f8c6163badb..c86ca5c2b8cb2 100644 --- a/recipes/cpp-httplib/config.yml +++ b/recipes/cpp-httplib/config.yml @@ -1,24 +1,22 @@ versions: - "0.16.0": + "0.18.0": folder: all - "0.15.3": + "0.17.3": folder: all - "0.15.2": + "0.17.1": folder: all - "0.15.1": + "0.16.3": folder: all - "0.14.3": + "0.16.0": folder: all - "0.14.2": + "0.15.3": folder: all - "0.14.1": + "0.14.3": folder: all - "0.14.0": + "0.14.1": folder: all "0.13.3": folder: all - "0.13.1": - folder: all "0.12.6": folder: all "0.11.4": diff --git a/recipes/cpp-peglib/1.x.x/conandata.yml b/recipes/cpp-peglib/1.x.x/conandata.yml index 7aa81fd5b52ff..8c4317d3da7ef 100644 --- a/recipes/cpp-peglib/1.x.x/conandata.yml +++ b/recipes/cpp-peglib/1.x.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.9.0": + url: "https://github.com/yhirose/cpp-peglib/archive/v1.9.0.tar.gz" + sha256: "6f4f0956ea2f44fd1c5882f8adc5782451ba9d227c467d214196390ddedb024c" "1.8.8": url: "https://github.com/yhirose/cpp-peglib/archive/v1.8.8.tar.gz" sha256: "3019d8084a146562fe2fd4c71e3226ac6e3994e8cee21cab27b3cd5a86bcef34" diff --git a/recipes/cpp-peglib/config.yml b/recipes/cpp-peglib/config.yml index 81349971ce40f..a8b6a2fd0565c 100644 --- a/recipes/cpp-peglib/config.yml +++ b/recipes/cpp-peglib/config.yml @@ -1,4 +1,6 @@ versions: + "1.9.0": + folder: "1.x.x" "1.8.8": folder: "1.x.x" "1.8.7": diff --git a/recipes/cpp-yyjson/all/conandata.yml b/recipes/cpp-yyjson/all/conandata.yml index a6c03b5fc9f4d..acb24326f9a42 100644 --- a/recipes/cpp-yyjson/all/conandata.yml +++ b/recipes/cpp-yyjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.6.0": + url: "https://github.com/yosh-matsuda/cpp-yyjson/archive/refs/tags/v0.6.0.tar.gz" + sha256: "e146e5e2de023a83ffafba52320506bd25512e6ae9d13ee7836110f659253914" "0.5.0": url: "https://github.com/yosh-matsuda/cpp-yyjson/archive/refs/tags/v0.5.0.tar.gz" sha256: "c1d44460c9ca3c21d5cfaea882ffaca83565c24984c5d17322e0b74a84ececfc" diff --git a/recipes/cpp-yyjson/all/conanfile.py b/recipes/cpp-yyjson/all/conanfile.py index b65b4445b46dd..1e453082ca159 100644 --- a/recipes/cpp-yyjson/all/conanfile.py +++ b/recipes/cpp-yyjson/all/conanfile.py @@ -38,7 +38,10 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("yyjson/0.9.0") + if Version(self.version) < "0.6.0": + self.requires("yyjson/0.9.0") + else: + self.requires("yyjson/0.10.0") self.requires("fmt/10.2.1") self.requires("nameof/0.10.4") diff --git a/recipes/cpp-yyjson/config.yml b/recipes/cpp-yyjson/config.yml index ca7b2c3985d5e..33d7618432d30 100644 --- a/recipes/cpp-yyjson/config.yml +++ b/recipes/cpp-yyjson/config.yml @@ -1,3 +1,5 @@ versions: + "0.6.0": + folder: all "0.5.0": folder: all diff --git a/recipes/cppcheck/all/conandata.yml b/recipes/cppcheck/all/conandata.yml index a93642627eb02..8d322ee34302a 100644 --- a/recipes/cppcheck/all/conandata.yml +++ b/recipes/cppcheck/all/conandata.yml @@ -1,16 +1,13 @@ sources: + "2.15.0": + url: "https://github.com/danmar/cppcheck/archive/2.15.0.tar.gz" + sha256: "98bcc40ac8062635b492fb096d7815376a176ae26749d6c708083f4637f7c0bb" "2.14.2": url: "https://github.com/danmar/cppcheck/archive/2.14.2.tar.gz" sha256: "9c3acea5f489336bd83a8ea33917a9a04a80c56d874bf270287e7de27acf2d00" - "2.14.1": - url: "https://github.com/danmar/cppcheck/archive/2.14.1.tar.gz" - sha256: "22d1403fbc3158f35b5216d7b0a50bbaf0c80bf6663933a71f65cc4fc307ff3d" "2.13.4": url: "https://github.com/danmar/cppcheck/archive/2.13.4.tar.gz" sha256: "d6ea064ebab76c6aa000795440479767d8d814dd29405918df4c1bbfcd6cb86c" - "2.13.3": - url: "https://github.com/danmar/cppcheck/archive/2.13.3.tar.gz" - sha256: "ac8c526d19496038c09bf4781bd804ab1f7aaadee4c3b699629830d24742dd81" "2.12.1": url: "https://github.com/danmar/cppcheck/archive/2.12.1.tar.gz" sha256: "2a3d4ba1179419612183ab3d6aed6d3b18be75e98cd6f138ea8e2020905dced2" diff --git a/recipes/cppcheck/config.yml b/recipes/cppcheck/config.yml index 23cb6f096c9de..494b8f5cd4792 100644 --- a/recipes/cppcheck/config.yml +++ b/recipes/cppcheck/config.yml @@ -1,12 +1,10 @@ versions: - "2.14.2": + "2.15.0": folder: all - "2.14.1": + "2.14.2": folder: all "2.13.4": folder: all - "2.13.3": - folder: all "2.12.1": folder: all "2.11.1": diff --git a/recipes/cpptrace/all/conandata.yml b/recipes/cpptrace/all/conandata.yml index 2bf854f46723a..dcee072fe65ad 100644 --- a/recipes/cpptrace/all/conandata.yml +++ b/recipes/cpptrace/all/conandata.yml @@ -1,77 +1,32 @@ sources: - # Newer versions at the top + "0.7.1": + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.7.1.tar.gz" + sha256: "63df54339feb0c68542232229777df057e1848fc8294528613971bbf42889e83" + "0.7.0": + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.7.0.tar.gz" + sha256: "b5c1fbd162f32b8995d9b1fefb1b57fac8b1a0e790f897b81cdafe3625d12001" + "0.6.3": + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.6.3.tar.gz" + sha256: "665bf76645ec7b9e6d785a934616f0138862c36cdb58b0d1c9dd18dd4c57395a" "0.6.2": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.6.2.tar.gz" + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.6.2.tar.gz" sha256: "02a0540b5b1be0788565f48b065b456d3eab81ae2323a50e75ed36449a0143ed" "0.6.1": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.6.1.tar.gz" + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.6.1.tar.gz" sha256: "4bb478eedbe4b2c0093ef7af4f64795304850e03312e658076b25ef8d6019c75" + # 0.6.0 is required by libassert v2 "0.6.0": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.6.0.tar.gz" + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.6.0.tar.gz" sha256: "7c2996f03d15f61016bc81fe7fa5220b1cc42498333c5c0e699ad2f96b918b96" - "0.5.4": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.5.4.tar.gz" - sha256: "bab0f76330f90c445216ccade1a3ff29c9c4bbd44805be34d52095cd95b02df4" - "0.5.3": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.5.3.tar.gz" - sha256: "fb84b8b021bf8c1265e650b4cc19ae8acc9c07b980eb1e34d9806acf15bb4fdf" - "0.5.2": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.5.2.tar.gz" - sha256: "d148998e175b9c69ffb4383ab321a0d27487392e4eee3f39441d35b6856c8f78" - "0.5.1": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.5.1.tar.gz" - sha256: "27b9f862ec6185f570ee59c07fdd12bebb55a986191518e896621317d2654f26" - "0.5.0": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.5.0.tar.gz" - sha256: "dc034503aed3009618312c42c40e1f80bf14d4148c9bc8b3ea02cf971459120e" - "0.4.1": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.4.1.tar.gz" - sha256: "8b6e2c813cf2db332c1aa0502c38afd01a1e00ece0ecc7fcd82fcae4b34e5161" - "0.4.0": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.4.0.tar.gz" - sha256: "eef368f5bed2d85c976ea90b325e4c9bfc1b9618cbbfa15bf088adc8fa98ff89" + # 0.3.1 is required by libassert v1 "0.3.1": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.3.1.tar.gz" + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.3.1.tar.gz" sha256: "3c4c5b3406c2b598e5cd2a8cb97f9e8e1f54d6df087a0e62564e6fb68fed852d" - "0.3.0": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.3.0.tar.gz" - sha256: "1650d760ff0c0f9763de7e1e04285033f2b0189df87398ba8bf76e9937d5a4ee" + # 0.2.1 is required by libassert v1 "0.2.1": - url: - - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.2.1.tar.gz" + url: "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.2.1.tar.gz" sha256: "3184f404c61b6b8ba6fe7c64fc40d1c3d6d87df59bcacf1845d846101bc22f9a" patches: - "0.5.2": - - patch_file: "patches/0.5.2/0001-msvc-bug.patch" - patch_type: "official" - patch_source: "https://github.com/jeremy-rifkin/cpptrace/commit/599d6abd6cc74e80e8429fc309247be5f7edd5d7" - patch_description: "Workaround bug for old msvc" - "0.4.0": - - patch_file: "patches/0.4.0/0001-libdwarf_path.patch" - patch_type: "conan" - patch_source: "https://github.com/jeremy-rifkin/cpptrace/commit/a1624238000c794243e20801dc2b35b2f847d492" - patch_description: "Use new libdwarf header placement" - - patch_file: "patches/0.4.0/0002-zstd.patch" - patch_type: "conan" - patch_source: "https://github.com/jeremy-rifkin/cpptrace/commit/b7d14bc952111df973268c76133bb8ad99afdeb0" - patch_description: "Zstd is handled by libdwarf" - "0.3.0": - - patch_file: "patches/0.3.0/0001-cpptrace_export.patch" - patch_type: "bugfix" - patch_source: "https://github.com/jeremy-rifkin/cpptrace/commit/b3b9d5fda6c7f53b069848e7e79454f3618ca356" - patch_description: "Fix an incorrect CPPTRACE_EXPORT annotation" "0.2.1": - patch_file: "patches/0.2.1/0001-to_uintptr.patch" patch_type: "bugfix" diff --git a/recipes/cpptrace/all/conanfile.py b/recipes/cpptrace/all/conanfile.py index fe0556f21f1b2..8b802e49b1649 100644 --- a/recipes/cpptrace/all/conanfile.py +++ b/recipes/cpptrace/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc -from conan.tools.files import get, copy, rm, rmdir +from conan.tools.files import get, copy, rmdir 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, export_conandata_patches @@ -76,6 +76,7 @@ def generate(self): tc.variables["CPPTRACE_USE_SYSTEM_LIBDWARF"] = True if self.options.unwind == "libunwind": tc.variables["CPPTRACE_UNWIND_WITH_LIBUNWIND"] = True + tc.cache_variables["CPPTRACE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) tc.generate() tc = CMakeDeps(self) tc.generate() @@ -94,12 +95,7 @@ def package(self): if self.settings.os == "Windows" and self.options.shared: copy(self, "*.dll", src=self.build_folder, dst=os.path.join(self.package_folder, "bin"), keep_path=False) - rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - rmdir(self, os.path.join(self.package_folder, "share")) - rm(self, "*.la", os.path.join(self.package_folder, "lib")) - rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) - rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) def package_info(self): self.cpp_info.libs = ["cpptrace"] diff --git a/recipes/cpptrace/all/patches/0.3.0/0001-cpptrace_export.patch b/recipes/cpptrace/all/patches/0.3.0/0001-cpptrace_export.patch deleted file mode 100644 index d75b21cd35c7f..0000000000000 --- a/recipes/cpptrace/all/patches/0.3.0/0001-cpptrace_export.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/cpptrace/cpptrace.hpp b/include/cpptrace/cpptrace.hpp -index b35bed1..27b626b 100644 ---- a/include/cpptrace/cpptrace.hpp -+++ b/include/cpptrace/cpptrace.hpp -@@ -90,7 +90,7 @@ namespace cpptrace { - // This is used over std::optional because the library is C++11 and also std::optional is a bit heavy-duty for this - // use. - template::value, int>::type = 0> -- struct CPPTRACE_EXPORT nullable { -+ struct nullable { - T raw_value; - nullable& operator=(T value) { - raw_value = value; diff --git a/recipes/cpptrace/all/patches/0.4.0/0001-libdwarf_path.patch b/recipes/cpptrace/all/patches/0.4.0/0001-libdwarf_path.patch deleted file mode 100644 index 4561234caabeb..0000000000000 --- a/recipes/cpptrace/all/patches/0.4.0/0001-libdwarf_path.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e077cf8..2f848dd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -404,7 +404,6 @@ if(CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) - endif() - if(CPPTRACE_CONAN) - target_link_libraries(${target_name} PRIVATE libdwarf::libdwarf) -- target_compile_definitions(${target_name} PRIVATE CPPTRACE_USE_NESTED_LIBDWARF_HEADER_PATH) - elseif(CPPTRACE_VCPKG) - target_link_libraries(${target_name} PRIVATE libdwarf::dwarf) - elseif(CPPTRACE_USE_EXTERNAL_LIBDWARF) diff --git a/recipes/cpptrace/all/patches/0.4.0/0002-zstd.patch b/recipes/cpptrace/all/patches/0.4.0/0002-zstd.patch deleted file mode 100644 index 97ccd388d4128..0000000000000 --- a/recipes/cpptrace/all/patches/0.4.0/0002-zstd.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2f848dd..8f3ec74 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -338,40 +338,39 @@ endif() - - if(CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) - target_compile_definitions(${target_name} PUBLIC CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF) -- # First, dependencies: Zstd and zlib (currently relying on system zlib) -- if(CPPTRACE_USE_EXTERNAL_ZSTD) -- find_package(zstd) -- else() -- include(FetchContent) -- cmake_policy(SET CMP0074 NEW) -- FetchContent_Declare( -- zstd -- GIT_REPOSITORY https://github.com/facebook/zstd.git -- GIT_TAG 63779c798237346c2b245c546c40b72a5a5913fe # v1.5.5 -- GIT_SHALLOW 1 -- SOURCE_SUBDIR build/cmake -- ) -- # FetchContent_MakeAvailable(zstd) -- FetchContent_GetProperties(zstd) -- if(NOT zstd_POPULATED) -- FetchContent_Populate(zstd) -- set(ZSTD_BUILD_PROGRAMS OFF) -- set(ZSTD_BUILD_CONTRIB OFF) -- set(ZSTD_BUILD_TESTS OFF) -- set(ZSTD_BUILD_STATIC ON) -- set(ZSTD_BUILD_SHARED OFF) -- set(ZSTD_LEGACY_SUPPORT OFF) -- add_subdirectory("${zstd_SOURCE_DIR}/build/cmake" "${zstd_BINARY_DIR}") -- endif() -- endif() -- # Libdwarf itself - if(CPPTRACE_USE_EXTERNAL_LIBDWARF) - find_package(libdwarf REQUIRED) - else() -+ include(FetchContent) -+ # First, dependencies: Zstd and zlib (currently relying on system zlib) -+ if(CPPTRACE_USE_EXTERNAL_ZSTD) -+ find_package(zstd) -+ else() -+ cmake_policy(SET CMP0074 NEW) -+ FetchContent_Declare( -+ zstd -+ GIT_REPOSITORY https://github.com/facebook/zstd.git -+ GIT_TAG 63779c798237346c2b245c546c40b72a5a5913fe # v1.5.5 -+ GIT_SHALLOW 1 -+ SOURCE_SUBDIR build/cmake -+ ) -+ # FetchContent_MakeAvailable(zstd) -+ FetchContent_GetProperties(zstd) -+ if(NOT zstd_POPULATED) -+ FetchContent_Populate(zstd) -+ set(ZSTD_BUILD_PROGRAMS OFF) -+ set(ZSTD_BUILD_CONTRIB OFF) -+ set(ZSTD_BUILD_TESTS OFF) -+ set(ZSTD_BUILD_STATIC ON) -+ set(ZSTD_BUILD_SHARED OFF) -+ set(ZSTD_LEGACY_SUPPORT OFF) -+ add_subdirectory("${zstd_SOURCE_DIR}/build/cmake" "${zstd_BINARY_DIR}") -+ endif() -+ endif() -+ # Libdwarf itself - set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) - # set(PIC_ALWAYS TRUE) - # set(BUILD_DWARFDUMP FALSE) -- include(FetchContent) - FetchContent_Declare( - libdwarf - # GIT_REPOSITORY https://github.com/davea42/libdwarf-code.git diff --git a/recipes/cpptrace/all/patches/0.5.2/0001-msvc-bug.patch b/recipes/cpptrace/all/patches/0.5.2/0001-msvc-bug.patch deleted file mode 100644 index b9a184ee0d627..0000000000000 --- a/recipes/cpptrace/all/patches/0.5.2/0001-msvc-bug.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/src/utils/microfmt.hpp b/src/utils/microfmt.hpp -index ba47db7..0f750c3 100644 ---- a/src/utils/microfmt.hpp -+++ b/src/utils/microfmt.hpp -@@ -302,20 +302,27 @@ namespace microfmt { - } - } - -- template - #if defined(__cpp_lib_string_view) && __cpp_lib_string_view >= 201606L -+ template - std::string format(std::string_view fmt, Args&&... args) { -- #else -- std::string format(const std::string& fmt, Args&&... args) { -- #endif - return detail::format(fmt.begin(), fmt.end(), {detail::format_value(args)...}); - } - -+ inline std::string format(std::string_view fmt) { -+ return std::string(fmt); -+ } -+ #endif -+ - template - std::string format(const char* fmt, Args&&... args) { - return detail::format(fmt, fmt + std::strlen(fmt), {detail::format_value(args)...}); - } - -+ // working around an old msvc bug https://godbolt.org/z/88T8hrzzq mre: https://godbolt.org/z/drd8echbP -+ inline std::string format(const char* fmt) { -+ return std::string(fmt); -+ } -+ - template - void print(const S& fmt, Args&&... args) { - std::cout<=3.19 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + # Install via CMake to ensure headers are configured correctly + tc = CMakeToolchain(self) + tc.cache_variables["CMAKE_SUPPRESS_REGENERATION"] = True + tc.cache_variables["CUTLASS_REVISION"]=f"v{self.version}" + tc.cache_variables["CUTLASS_NATIVE_CUDA"] = False + tc.cache_variables["CUTLASS_ENABLE_HEADERS_ONLY"] = True + tc.cache_variables["CUTLASS_ENABLE_TOOLS"] = False + tc.cache_variables["CUTLASS_ENABLE_LIBRARY"] = False + tc.cache_variables["CUTLASS_ENABLE_PROFILER"] = False + tc.cache_variables["CUTLASS_ENABLE_PERFORMANCE"] = False + tc.cache_variables["CUTLASS_ENABLE_TESTS"] = False + tc.cache_variables["CUTLASS_ENABLE_GTEST_UNIT_TESTS"] = False + tc.cache_variables["CUTLASS_ENABLE_CUBLAS"] = False + tc.cache_variables["CUTLASS_ENABLE_CUDNN"] = False + tc.generate() + VirtualBuildEnv(self).generate() + + def _patch_sources(self): + # Don't look for CUDA, we're only installing the headers + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "include(${CMAKE_CURRENT_SOURCE_DIR}/CUDA.cmake)", + """ + if(NOT CUTLASS_ENABLE_HEADERS_ONLY) + include(${CMAKE_CURRENT_SOURCE_DIR}/CUDA.cmake) + endif()""") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "test")) + + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "NvidiaCutlass") + self.cpp_info.set_property("cmake_target_name", "nvidia::cutlass::cutlass") + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/cutlass/all/test_package/CMakeLists.txt b/recipes/cutlass/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..a4872b3ed37c7 --- /dev/null +++ b/recipes/cutlass/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(NvidiaCutlass REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE nvidia::cutlass::cutlass) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/cutlass/all/test_package/conanfile.py b/recipes/cutlass/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/cutlass/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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 = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + 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): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/cutlass/all/test_package/test_package.cpp b/recipes/cutlass/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..9e74847cbedd3 --- /dev/null +++ b/recipes/cutlass/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include + +#include + +int main() { + std::cout << "CUTLASS version: " << + cutlass::getVersionMajor() << "." << + cutlass::getVersionMinor() << "." << + cutlass::getVersionPatch() << std::endl; +} diff --git a/recipes/cutlass/config.yml b/recipes/cutlass/config.yml new file mode 100644 index 0000000000000..4ab92d6cac50e --- /dev/null +++ b/recipes/cutlass/config.yml @@ -0,0 +1,3 @@ +versions: + "3.5.0": + folder: all diff --git a/recipes/dataframe/all/conandata.yml b/recipes/dataframe/all/conandata.yml index 0b340ef68332f..76e42aa109c01 100644 --- a/recipes/dataframe/all/conandata.yml +++ b/recipes/dataframe/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.2.0": + url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/3.2.0.tar.gz" + sha256: "44c513ef7956976738c2ca37384a220c5383e95fc363ad933541c6f3eef9d294" "3.1.0": url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/3.1.0.tar.gz" sha256: "09280a81f17d87d171062210c904c1acd94b1cdcf4c040eaa16cc9d224d526d4" diff --git a/recipes/dataframe/config.yml b/recipes/dataframe/config.yml index 7878d4c106a55..b500f2488a199 100644 --- a/recipes/dataframe/config.yml +++ b/recipes/dataframe/config.yml @@ -1,4 +1,6 @@ versions: + "3.2.0": + folder: all "3.1.0": folder: all "3.0.0": diff --git a/recipes/date/all/conanfile.py b/recipes/date/all/conanfile.py index 315ca73f8ae1f..50c70b315563a 100644 --- a/recipes/date/all/conanfile.py +++ b/recipes/date/all/conanfile.py @@ -91,20 +91,13 @@ def build(self): def package(self): copy(self, "LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - if self.options.header_only: - src = os.path.join(self.source_folder, "include", "date") - dst = os.path.join(self.package_folder, "include", "date") - copy(self, "date.h", dst=dst, src=src) - copy(self, "tz.h", dst=dst, src=src) - copy(self, "ptz.h", dst=dst, src=src) - copy(self, "iso_week.h", dst=dst, src=src) - copy(self, "julian.h", dst=dst, src=src) - copy(self, "islamic.h", dst=dst, src=src) - else: + if not self.options.header_only: cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rmdir(self, os.path.join(self.package_folder, "CMake")) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include", "date"), + src=os.path.join(self.source_folder, "include", "date")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "date") @@ -120,18 +113,13 @@ def package_info(self): lib_name = "{}tz".format("date-" if Version(self.version) >= "3.0.0" else "") self.cpp_info.components["date-tz"].libs = [lib_name] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["date-tz"].system_libs.append("pthread") - self.cpp_info.components["date-tz"].system_libs.append("m") + self.cpp_info.components["date-tz"].system_libs.extend(["m", "pthread"]) if not self.options.use_system_tz_db: self.cpp_info.components["date-tz"].requires.append("libcurl::libcurl") - if self.options.use_system_tz_db and not self.settings.os == "Windows": - use_os_tzdb = 1 - else: - use_os_tzdb = 0 - - defines = ["USE_OS_TZDB={}".format(use_os_tzdb)] + use_os_tzdb = 1 if self.options.use_system_tz_db and not self.settings.os == "Windows" else 0 + defines = [f"USE_OS_TZDB={use_os_tzdb}"] if self.settings.os == "Windows" and self.options.shared: defines.append("DATE_USE_DLL=1") diff --git a/recipes/dav1d/all/conandata.yml b/recipes/dav1d/all/conandata.yml index f8c452bd8a5e4..be4e7f8263cbc 100644 --- a/recipes/dav1d/all/conandata.yml +++ b/recipes/dav1d/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.3": + url: "http://ftp.videolan.org/pub/videolan/dav1d/1.4.3/dav1d-1.4.3.tar.xz" + sha256: "42fe524bcc82ea3a830057178faace22923a79bad3d819a4962d8cfc54c36f19" "1.4.1": url: "http://ftp.videolan.org/pub/videolan/dav1d/1.4.1/dav1d-1.4.1.tar.xz" sha256: "8d407dd5fe7986413c937b14e67f36aebd06e1fa5cfec679d10e548476f2d5f8" diff --git a/recipes/dav1d/config.yml b/recipes/dav1d/config.yml index 9202e5ce9c4a9..d5bc79ec13e97 100644 --- a/recipes/dav1d/config.yml +++ b/recipes/dav1d/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.3": + folder: "all" "1.4.1": folder: "all" "1.3.0": diff --git a/recipes/daw_header_libraries/all/conandata.yml b/recipes/daw_header_libraries/all/conandata.yml index 335d9cb66c88f..d625fa7c5a1cb 100644 --- a/recipes/daw_header_libraries/all/conandata.yml +++ b/recipes/daw_header_libraries/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "2.110.0": + url: "https://github.com/beached/header_libraries/archive/v2.110.0.tar.gz" + sha256: "6515bb7a130656adff9f1f17d6be69dbd7c40dbcebbe418e9d0cf15bbc71bffc" + "2.107.0": + url: "https://github.com/beached/header_libraries/archive/v2.107.0.tar.gz" + sha256: "b84f7666d004da466d0035e9f475797395e90b6e8f23e000816b45aa13d4fc35" + "2.106.2": + url: "https://github.com/beached/header_libraries/archive/v2.106.2.tar.gz" + sha256: "33609d83aec5a6081efebf871627b7a8bddc2b7f0eb8d4ac14756d403d29d089" + "2.106.1": + url: "https://github.com/beached/header_libraries/archive/v2.106.1.tar.gz" + sha256: "393815fbf249ca1220a216899cae3d2672ca193f9db228a0b99925a9b0f90854" "2.106.0": url: "https://github.com/beached/header_libraries/archive/v2.106.0.tar.gz" sha256: "7838ada09afa69e7a42d742991c4b24b32ba27681e7b4dadf7b1e45c168937b5" @@ -14,30 +26,3 @@ sources: "2.96.1": url: "https://github.com/beached/header_libraries/archive/v2.96.1.tar.gz" sha256: "2a9a5c33baa9e3adc1d82fa13a56522638af13cc39372a0c1c8f5c5d984f1464" - "2.95.0": - url: "https://github.com/beached/header_libraries/archive/v2.95.0.tar.gz" - sha256: "8799c06f0587b202fd6049d95e70b04675acbfdbf6e86ac3bbd061cbb9d42b54" - "2.93.1": - url: "https://github.com/beached/header_libraries/archive/v2.93.1.tar.gz" - sha256: "200690094237e4a2c37ac81c23c8c5138ba90ccdeeb2a1dda37690a9d32301ad" - "2.92.0": - url: "https://github.com/beached/header_libraries/archive/v2.92.0.tar.gz" - sha256: "96835f0ff4d3082a38b4ef4c14653c88e193cd26a08cd406fdbfadcfd654d136" - "2.88.0": - url: "https://github.com/beached/header_libraries/archive/v2.88.0.tar.gz" - sha256: "2a634763f3d34f206f6b352ac9609a89d501059afea0ba7c857bd55adc435890" - "2.85.1": - url: "https://github.com/beached/header_libraries/archive/v2.85.1.tar.gz" - sha256: "fb4880e254a481e3c750261fdb75a1696afc9ef4404e095a7f3ba0683bcd9930" - "2.79.0": - url: "https://github.com/beached/header_libraries/archive/v2.79.0.tar.gz" - sha256: "2dfa8fc9495499379cff39ed648c6bba156a87eb177fc91a860045a410aebb99" - "2.76.3": - url: "https://github.com/beached/header_libraries/archive/v2.76.3.tar.gz" - sha256: "2d66f9aec38fb9a42779e0283fa2fc5842e04d34f2bf655c72a9beb4bf5cc8c8" - "2.76.2": - url: "https://github.com/beached/header_libraries/archive/v2.76.2.tar.gz" - sha256: "bfa2da192360a66e400d03a52f8a7bf0fccd23de1f446a812a8890b11df2c592" - "2.74.2": - url: "https://github.com/beached/header_libraries/archive/v2.74.2.tar.gz" - sha256: "32871df3d314cc9b4e293a9a8c79968d1c963dfd3dd60965dbf704eb18acb218" diff --git a/recipes/daw_header_libraries/all/conanfile.py b/recipes/daw_header_libraries/all/conanfile.py index b6840ea09fa55..98257810d2c5a 100644 --- a/recipes/daw_header_libraries/all/conanfile.py +++ b/recipes/daw_header_libraries/all/conanfile.py @@ -16,7 +16,7 @@ class DawHeaderLibrariesConan(ConanFile): license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/beached/header_libraries" - topics = ("algorithms", "helpers", "data-structures") + topics = ("algorithms", "helpers", "data-structures", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -44,7 +44,6 @@ def package_id(self): def validate(self): if self.settings.get_safe("compiler.cppstd"): check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.get_safe("compiler.version")) < minimum_version: raise ConanInvalidConfiguration( @@ -54,9 +53,6 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, pattern="LICENSE*", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) diff --git a/recipes/daw_header_libraries/all/test_package/CMakeLists.txt b/recipes/daw_header_libraries/all/test_package/CMakeLists.txt index 817fb2a992dc4..2474980662644 100644 --- a/recipes/daw_header_libraries/all/test_package/CMakeLists.txt +++ b/recipes/daw_header_libraries/all/test_package/CMakeLists.txt @@ -4,6 +4,10 @@ project(test_package LANGUAGES CXX) find_package(daw-header-libraries REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package.cpp) +if(daw-header-libraries_VERSION VERSION_LESS "2.109.0") + add_executable(${PROJECT_NAME} test_package_old.cpp) +else() + add_executable(${PROJECT_NAME} test_package.cpp) +endif() target_link_libraries(${PROJECT_NAME} PRIVATE daw::daw-header-libraries) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/daw_header_libraries/all/test_package/test_package.cpp b/recipes/daw_header_libraries/all/test_package/test_package.cpp index 7b47a51d28ef5..63fa16b601f2d 100644 --- a/recipes/daw_header_libraries/all/test_package/test_package.cpp +++ b/recipes/daw_header_libraries/all/test_package/test_package.cpp @@ -1,7 +1,7 @@ -#include "daw/daw_carray.h" +#include "daw/daw_bounded_array.h" int main() { - daw::carray t = { 1, 2, 3, 4, 5, 6 }; + daw::array t = { 1, 2, 3, 4, 5, 6 }; auto val = t[3]; diff --git a/recipes/daw_header_libraries/all/test_package/test_package_old.cpp b/recipes/daw_header_libraries/all/test_package/test_package_old.cpp new file mode 100644 index 0000000000000..7b47a51d28ef5 --- /dev/null +++ b/recipes/daw_header_libraries/all/test_package/test_package_old.cpp @@ -0,0 +1,9 @@ +#include "daw/daw_carray.h" + +int main() { + daw::carray t = { 1, 2, 3, 4, 5, 6 }; + + auto val = t[3]; + + return 0; +} diff --git a/recipes/daw_header_libraries/config.yml b/recipes/daw_header_libraries/config.yml index 0cd95a38e7776..5a75a14b1e758 100644 --- a/recipes/daw_header_libraries/config.yml +++ b/recipes/daw_header_libraries/config.yml @@ -1,4 +1,12 @@ versions: + "2.110.0": + folder: all + "2.107.0": + folder: all + "2.106.2": + folder: all + "2.106.1": + folder: all "2.106.0": folder: all "2.101.0": @@ -9,21 +17,3 @@ versions: folder: all "2.96.1": folder: all - "2.95.0": - folder: all - "2.93.1": - folder: all - "2.92.0": - folder: all - "2.88.0": - folder: all - "2.85.1": - folder: all - "2.79.0": - folder: all - "2.76.3": - folder: all - "2.76.2": - folder: all - "2.74.2": - folder: all diff --git a/recipes/daw_json_link/all/conandata.yml b/recipes/daw_json_link/all/conandata.yml index 3284b09ee8d98..35b1b14775dc9 100644 --- a/recipes/daw_json_link/all/conandata.yml +++ b/recipes/daw_json_link/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.24.1": + url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.24.1.tar.gz" + sha256: "439b4678377950f165e3d49d472c0676f0ef2fae3c5e6e7febddd5633f6e4f39" "3.23.2": url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.23.2.tar.gz" sha256: "fd1234a14c126c79076e0b6e6eceae42afd465c419dc7a7393c69c28aa7f53d4" @@ -23,15 +26,23 @@ sources: "3.15.0": url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.15.0.tar.gz" sha256: "6f72c69944e33f56823d941b09c8d17ece44b224e802ae0a3416c32f2bdbec40" - "3.14.1": - url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.14.1.tar.gz" - sha256: "a761c594dabd14b7484f5d286db31e9272f633d2ad0dab44cdae5ff3f06db6fb" - "3.14.0": - url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.14.tar.gz" - sha256: "07171e1b8f09f525116627015b6618990dc9cfb32357ba821512c0508730c9a4" - "3.12.0": - url: "https://github.com/beached/daw_json_link/archive/v3.12.0.tar.gz" - sha256: "b32097954caae14071893232fd85febbfda1deec34bb939f6aad76c077c6c5d5" - "3.11.1": - url: "https://github.com/beached/daw_json_link/archive/v3.11.1.tar.gz" - sha256: "d2b5cb221892c6b1ecd30fd2e45d168d6b378e97d134e75349703104c5882309" +daw_headers_mapping: + "3.24.1": "2.106.0" + "3.23.2": "2.101.0" + "3.23.0": "2.97.0" + "3.20.1": "2.97.0" + "3.19.0": "2.97.0" + "3.17.2": "2.97.0" + "3.17.1": "2.97.0" + "3.16.0": "2.97.0" + "3.15.0": "2.97.0" +daw_utf_mapping: + "3.24.1": "2.2.5" + "3.23.2": "2.2.4" + "3.23.0": "2.2.3" + "3.20.1": "2.2.3" + "3.19.0": "2.2.3" + "3.17.2": "2.2.3" + "3.17.1": "2.2.3" + "3.16.0": "2.2.3" + "3.15.0": "2.2.3" diff --git a/recipes/daw_json_link/all/conanfile.py b/recipes/daw_json_link/all/conanfile.py index f75c692a8d93d..eeaf0710c5e7a 100644 --- a/recipes/daw_json_link/all/conanfile.py +++ b/recipes/daw_json_link/all/conanfile.py @@ -39,12 +39,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) < "3.23.2": - self.requires("daw_header_libraries/2.97.0") - self.requires("daw_utf_range/2.2.3") - else: - self.requires("daw_header_libraries/2.101.0") - self.requires("daw_utf_range/2.2.4") + corresponding_daw_header_version = self.conan_data["daw_headers_mapping"][self.version] + self.requires(f"daw_header_libraries/{corresponding_daw_header_version}") + corresponding_daw_utf_version = self.conan_data["daw_utf_mapping"][self.version] + self.requires(f"daw_utf_range/{corresponding_daw_utf_version}") def package_id(self): self.info.clear() diff --git a/recipes/daw_json_link/config.yml b/recipes/daw_json_link/config.yml index e102478003a7f..f518e618fe0e7 100644 --- a/recipes/daw_json_link/config.yml +++ b/recipes/daw_json_link/config.yml @@ -1,4 +1,6 @@ versions: + "3.24.1": + folder: "all" "3.23.2": folder: "all" "3.23.0": @@ -15,11 +17,3 @@ versions: folder: "all" "3.15.0": folder: "all" - "3.14.1": - folder: "all" - "3.14.0": - folder: "all" - "3.12.0": - folder: "all" - "3.11.1": - folder: "all" diff --git a/recipes/daw_utf_range/all/conandata.yml b/recipes/daw_utf_range/all/conandata.yml index 274810345e204..38e97ab2afcd4 100644 --- a/recipes/daw_utf_range/all/conandata.yml +++ b/recipes/daw_utf_range/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.5": + url: "https://github.com/beached/utf_range/archive/v2.2.5.tar.gz" + sha256: "18cc142c319c817da86ed037813cd50a16ff1af8e041a22b8af11beaef30ca32" "2.2.4": url: "https://github.com/beached/utf_range/archive/v2.2.4.tar.gz" sha256: "e6df85d6da445c16507e738d70c6313df2a70e64b739a05d6437b06a5f83b8b1" @@ -11,3 +14,9 @@ sources: "2.2.0": url: "https://github.com/beached/utf_range/archive/v2.2.0.tar.gz" sha256: "00f60360736062403c8a7a94dd07c750366958f20d1864578faecf2e09d84265" +daw_headers_mapping: + "2.2.5": "2.106.0" + "2.2.4": "2.101.0" + "2.2.3": "2.97.0" + "2.2.2": "2.97.0" + "2.2.0": "2.97.0" diff --git a/recipes/daw_utf_range/all/conanfile.py b/recipes/daw_utf_range/all/conanfile.py index ad4fd8d98f0b6..bb05e8ba48169 100644 --- a/recipes/daw_utf_range/all/conanfile.py +++ b/recipes/daw_utf_range/all/conanfile.py @@ -38,10 +38,8 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) >= "2.2.4": - self.requires("daw_header_libraries/2.101.0") - else: - self.requires("daw_header_libraries/2.97.0") + corresponding_daw_header_version = self.conan_data["daw_headers_mapping"][self.version] + self.requires(f"daw_header_libraries/{corresponding_daw_header_version}") def package_id(self): self.info.clear() diff --git a/recipes/daw_utf_range/config.yml b/recipes/daw_utf_range/config.yml index 0856bcef8b94d..86bdc8b77e0d5 100644 --- a/recipes/daw_utf_range/config.yml +++ b/recipes/daw_utf_range/config.yml @@ -1,4 +1,6 @@ versions: + "2.2.5": + folder: "all" "2.2.4": folder: "all" "2.2.3": diff --git a/recipes/dbus/1.x.x/conandata.yml b/recipes/dbus/all/conandata.yml similarity index 100% rename from recipes/dbus/1.x.x/conandata.yml rename to recipes/dbus/all/conandata.yml diff --git a/recipes/dbus/1.x.x/conanfile.py b/recipes/dbus/all/conanfile.py similarity index 98% rename from recipes/dbus/1.x.x/conanfile.py rename to recipes/dbus/all/conanfile.py index cbac60eeeb9e9..0d7c729968e28 100644 --- a/recipes/dbus/1.x.x/conanfile.py +++ b/recipes/dbus/all/conanfile.py @@ -27,7 +27,7 @@ class DbusConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], - "dbus_user": ["ANY"], + "dbus_user": [None, "ANY"], "message_bus": [True, False], "system_socket": [None, "ANY"], "system_pid_file": [None, "ANY"], @@ -113,7 +113,6 @@ def generate(self): tc.project_options["asserts"] = not is_apple_os(self) tc.project_options["checks"] = False tc.project_options["datadir"] = os.path.join("res", "share") - tc.project_options["localstatedir"] = os.path.join("res", "var") tc.project_options["sysconfdir"] = os.path.join("res", "etc") tc.project_options["doxygen_docs"] = "disabled" tc.project_options["ducktype_docs"] = "disabled" diff --git a/recipes/dbus/1.x.x/patches/0001-meson-Use-check_header-to-confirm-headers-work.patch b/recipes/dbus/all/patches/0001-meson-Use-check_header-to-confirm-headers-work.patch similarity index 100% rename from recipes/dbus/1.x.x/patches/0001-meson-Use-check_header-to-confirm-headers-work.patch rename to recipes/dbus/all/patches/0001-meson-Use-check_header-to-confirm-headers-work.patch diff --git a/recipes/dbus/1.x.x/patches/0003-meson-monotonic-clock-check.patch b/recipes/dbus/all/patches/0003-meson-monotonic-clock-check.patch similarity index 100% rename from recipes/dbus/1.x.x/patches/0003-meson-monotonic-clock-check.patch rename to recipes/dbus/all/patches/0003-meson-monotonic-clock-check.patch diff --git a/recipes/dbus/1.x.x/test_package/CMakeLists.txt b/recipes/dbus/all/test_package/CMakeLists.txt similarity index 100% rename from recipes/dbus/1.x.x/test_package/CMakeLists.txt rename to recipes/dbus/all/test_package/CMakeLists.txt diff --git a/recipes/dbus/1.x.x/test_package/conanfile.py b/recipes/dbus/all/test_package/conanfile.py similarity index 100% rename from recipes/dbus/1.x.x/test_package/conanfile.py rename to recipes/dbus/all/test_package/conanfile.py diff --git a/recipes/dbus/1.x.x/test_package/test_package.c b/recipes/dbus/all/test_package/test_package.c similarity index 100% rename from recipes/dbus/1.x.x/test_package/test_package.c rename to recipes/dbus/all/test_package/test_package.c diff --git a/recipes/dbus/1.x.x/test_v1_package/CMakeLists.txt b/recipes/dbus/all/test_v1_package/CMakeLists.txt similarity index 100% rename from recipes/dbus/1.x.x/test_v1_package/CMakeLists.txt rename to recipes/dbus/all/test_v1_package/CMakeLists.txt diff --git a/recipes/dbus/1.x.x/test_v1_package/conanfile.py b/recipes/dbus/all/test_v1_package/conanfile.py similarity index 100% rename from recipes/dbus/1.x.x/test_v1_package/conanfile.py rename to recipes/dbus/all/test_v1_package/conanfile.py diff --git a/recipes/dbus/config.yml b/recipes/dbus/config.yml index a6d5fb2e5d5f7..e3b8080de35a7 100644 --- a/recipes/dbus/config.yml +++ b/recipes/dbus/config.yml @@ -1,9 +1,9 @@ versions: "1.15.8": - folder: 1.x.x + folder: all "1.15.6": - folder: 1.x.x + folder: all "1.15.2": - folder: 1.x.x + folder: all "1.15.0": - folder: 1.x.x + folder: all diff --git a/recipes/debug_assert/all/conandata.yml b/recipes/debug_assert/all/conandata.yml index cfa7ab5250ed4..dc2038ed34a68 100644 --- a/recipes/debug_assert/all/conandata.yml +++ b/recipes/debug_assert/all/conandata.yml @@ -1,4 +1,7 @@ sources: - '1.3.3': - url: https://github.com/foonathan/debug_assert/archive/v1.3.3.zip - sha256: c0871c7bb8d7e0f36cfae9a5ba526ea0c0fcaa41203ffb4280de27cb030e7383 + "1.3.4": + url: "https://github.com/foonathan/debug_assert/archive/v1.3.4.zip" + sha256: "e29925b1b51e10b46e8c4f3d57a86db6a7ebc7cdec53fe30c1b0ca22ef845f43" + "1.3.3": + url: "https://github.com/foonathan/debug_assert/archive/v1.3.3.zip" + sha256: "c0871c7bb8d7e0f36cfae9a5ba526ea0c0fcaa41203ffb4280de27cb030e7383" diff --git a/recipes/debug_assert/config.yml b/recipes/debug_assert/config.yml index 416be34945c37..3b34bc0f54258 100644 --- a/recipes/debug_assert/config.yml +++ b/recipes/debug_assert/config.yml @@ -1,3 +1,5 @@ versions: - '1.3.3': + "1.3.4": + folder: all + "1.3.3": folder: all diff --git a/recipes/dice-template-library/all/conandata.yml b/recipes/dice-template-library/all/conandata.yml index f3c3a88f7edef..580b85f394958 100644 --- a/recipes/dice-template-library/all/conandata.yml +++ b/recipes/dice-template-library/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.9.0": + url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.9.0.tar.gz" + sha256: "ca82a61bd445e0eaf69e68fc4a96d037c8b2ea36ff7762042dbb6f47a89f99e9" + "1.8.0": + url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.8.0.tar.gz" + sha256: "cb20717cb596b156b098146d043caa158618e055b8edbeb4d3245cd11e1c8276" + "1.6.0": + url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.6.0.tar.gz" + sha256: "4eb176930beb05dba183d4a48fd9e9716676fe92f0a98a8f527cb8791b0d64fd" "1.5.0": url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.5.0.tar.gz" sha256: "5ab4155097af5674dc9b34d1643db9ea8b30f78d15c1e547c58396ea31068ffd" diff --git a/recipes/dice-template-library/config.yml b/recipes/dice-template-library/config.yml index 4b83ac8cb2f11..37901e90b8f3b 100644 --- a/recipes/dice-template-library/config.yml +++ b/recipes/dice-template-library/config.yml @@ -1,4 +1,10 @@ versions: + "1.9.0": + folder: all + "1.8.0": + folder: all + "1.6.0": + folder: all "1.5.0": folder: all "1.3.0": diff --git a/recipes/directx-headers/all/conandata.yml b/recipes/directx-headers/all/conandata.yml index 6289c24e10856..ad2d7265cac43 100644 --- a/recipes/directx-headers/all/conandata.yml +++ b/recipes/directx-headers/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.614.0": + url: "https://github.com/microsoft/DirectX-Headers/archive/refs/tags/v1.614.0.tar.gz" + sha256: "1cd54449799501a4ad129a4c7ccf0c026bbb699f937ba299d92de3aacd29c5be" "1.610.2": url: "https://github.com/microsoft/DirectX-Headers/archive/refs/tags/v1.610.2.tar.gz" sha256: "59492497e99bd3c23f8f8aa8a709f4d7b5bc5bd5057efa8c568bbad40015a8b2" diff --git a/recipes/directx-headers/config.yml b/recipes/directx-headers/config.yml index 15678ab870488..5129440c45004 100644 --- a/recipes/directx-headers/config.yml +++ b/recipes/directx-headers/config.yml @@ -1,3 +1,5 @@ versions: + "1.614.0": + folder: all "1.610.2": folder: all diff --git a/recipes/drogon/all/conandata.yml b/recipes/drogon/all/conandata.yml index 1918973ce4360..fecd2ed6377de 100644 --- a/recipes/drogon/all/conandata.yml +++ b/recipes/drogon/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.9.7": + url: "https://github.com/drogonframework/drogon/archive/v1.9.7.tar.gz" + sha256: "e54c5d604769a496b951e5af52a0f85e60eba584fae426d204eb5b2f02cfbf59" + "1.9.6": + url: "https://github.com/drogonframework/drogon/archive/v1.9.6.tar.gz" + sha256: "a81d0ea0e87b0214aa56f7fa7bb851011efe606af67891a0945825104505a08a" "1.9.5": url: "https://github.com/drogonframework/drogon/archive/v1.9.5.tar.gz" sha256: "ec17882835abeb0672db29cb36ab0c5523f144d5d8ff177861b8f5865803eaae" @@ -20,16 +26,25 @@ sources: "1.8.7": url: "https://github.com/drogonframework/drogon/archive/v1.8.7.tar.gz" sha256: "d2d80d35becd69bf80d74bf09b69425193f1b7be3926bd44f3ac7b951e54465d" - "1.8.6": - url: "https://github.com/drogonframework/drogon/archive/v1.8.6.tar.gz" - sha256: "ff02979f28047e97e19e36d1f363b3052b8122975fa8a379305d746dfe5fb004" - "1.8.5": - url: "https://github.com/drogonframework/drogon/archive/v1.8.5.tar.gz" - sha256: "9469f99408c114bc1e89945a3a8dab4640ea6d8cb06e7d42f06c1dfda3f71d2a" - "1.8.4": - url: "https://github.com/drogonframework/drogon/archive/v1.8.4.tar.gz" - sha256: "6f2f59ead0f0c37b0aac4bc889cbaedf3c2540f3020e892596c72f0a4d887a18" patches: + "1.9.7": + - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" + patch_description: "remove shared libs option" + patch_type: "conan" + - patch_file: "patches/1.9.7-0002-find-cci-packages.patch" + patch_description: "Fix jsoncpp cmake target name" + patch_type: "conan" + - patch_file: "patches/1.9.7-0003-include-exception.patch" + patch_description: "include exception for exception_ptr" + patch_type: "portability" + patch_source: "https://github.com/drogonframework/drogon/pull/2159" + "1.9.6": + - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" + patch_description: "remove shared libs option" + patch_type: "conan" + - patch_file: "patches/1.9.6-0002-find-cci-packages.patch" + patch_description: "Fix jsoncpp cmake target name" + patch_type: "conan" "1.9.5": - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" patch_description: "remove shared libs option" @@ -79,34 +94,3 @@ patches: - patch_file: "patches/1.8.6-0002-find-cci-packages.patch" patch_description: "Fix jsoncpp cmake target name" patch_type: "conan" - "1.8.6": - - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" - patch_description: "remove shared libs option" - patch_type: "conan" - - patch_file: "patches/1.8.6-0002-find-cci-packages.patch" - patch_description: "Fix jsoncpp cmake target name" - patch_type: "conan" - "1.8.5": - - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" - patch_description: "remove shared libs option" - patch_type: "conan" - - patch_file: "patches/1.8.5-0002-find-cci-packages.patch" - patch_description: "Fix jsoncpp cmake target name" - patch_type: "conan" - "1.8.4": - - patch_file: "patches/1.8.4-0001-remove-shared-libs.patch" - patch_description: "remove shared libs option" - patch_type: "conan" - - patch_file: "patches/1.8.4-0002-find-package-jsoncpp.patch" - patch_description: "Fix jsoncpp cmake target name" - patch_type: "conan" - - patch_file: "patches/1.8.4-0003-find-package-sqlite.patch" - patch_description: "Fix sqlite cmake target name" - patch_type: "conan" - - patch_file: "patches/1.8.4-0004-find-package-yaml-cpp.patch" - patch_description: "Fix yaml-cpp cmake target name" - patch_type: "conan" - - patch_file: "patches/1.8.2-0004-support-gcc13.patch" - patch_description: "Fix compilation error on gcc13 with C++17" - patch_type: "portability" - patch_source: "https://github.com/drogonframework/drogon/pull/1563/" diff --git a/recipes/drogon/all/conanfile.py b/recipes/drogon/all/conanfile.py index 1aa59c64d8206..88788705194dd 100644 --- a/recipes/drogon/all/conanfile.py +++ b/recipes/drogon/all/conanfile.py @@ -110,7 +110,10 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires boost on C++14") def requirements(self): - self.requires("trantor/1.5.19", transitive_headers=True, transitive_libs=True) + if Version(self.version) < "1.9.7": + self.requires("trantor/1.5.19", transitive_headers=True, transitive_libs=True) + else: + self.requires("trantor/1.5.21", transitive_headers=True, transitive_libs=True) self.requires("jsoncpp/1.9.5", transitive_headers=True, transitive_libs=True) self.requires("openssl/[>=1.1 <4]") self.requires("zlib/[>=1.2.11 <2]") diff --git a/recipes/drogon/all/patches/1.8.2-0004-support-gcc13.patch b/recipes/drogon/all/patches/1.8.2-0004-support-gcc13.patch deleted file mode 100644 index 477d23fb1fd63..0000000000000 --- a/recipes/drogon/all/patches/1.8.2-0004-support-gcc13.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/lib/inc/drogon/RateLimiter.h b/lib/inc/drogon/RateLimiter.h -index 3b8706b..dece795 100644 ---- a/lib/inc/drogon/RateLimiter.h -+++ b/lib/inc/drogon/RateLimiter.h -@@ -3,6 +3,7 @@ - #include - #include - #include -+#include - - namespace drogon - { diff --git a/recipes/drogon/all/patches/1.8.4-0001-remove-shared-libs.patch b/recipes/drogon/all/patches/1.8.4-0001-remove-shared-libs.patch deleted file mode 100644 index f51304849a04f..0000000000000 --- a/recipes/drogon/all/patches/1.8.4-0001-remove-shared-libs.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4406362..c346e60 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -16,7 +16,6 @@ option(BUILD_CTL "Build drogon_ctl" ${BUILD_PROGRAMS}) - option(BUILD_EXAMPLES "Build examples" ${BUILD_PROGRAMS}) - option(BUILD_ORM "Build orm" ON) - option(COZ_PROFILING "Use coz for profiling" OFF) --option(BUILD_SHARED_LIBS "Build drogon as a shared lib" OFF) - option(BUILD_DOC "Build Doxygen documentation" OFF) - option(BUILD_BROTLI "Build Brotli" ON) - option(BUILD_YAML_CONFIG "Build yaml config" ON) diff --git a/recipes/drogon/all/patches/1.8.4-0002-find-package-jsoncpp.patch b/recipes/drogon/all/patches/1.8.4-0002-find-package-jsoncpp.patch deleted file mode 100644 index 362fa96c66cc6..0000000000000 --- a/recipes/drogon/all/patches/1.8.4-0002-find-package-jsoncpp.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c346e60..e561e5c 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -206,9 +206,9 @@ else() - endif() - - # jsoncpp --find_package(Jsoncpp REQUIRED) --target_link_libraries(${PROJECT_NAME} PUBLIC Jsoncpp_lib) --list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${JSONCPP_INCLUDE_DIRS}) -+find_package(jsoncpp REQUIRED) -+target_link_libraries(${PROJECT_NAME} PUBLIC jsoncpp_lib) -+list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${jsoncpp_INCLUDE_DIRS}) - - # yamlcpp - if(BUILD_YAML_CONFIG) diff --git a/recipes/drogon/all/patches/1.8.4-0003-find-package-sqlite.patch b/recipes/drogon/all/patches/1.8.4-0003-find-package-sqlite.patch deleted file mode 100644 index 6f97d35a4d314..0000000000000 --- a/recipes/drogon/all/patches/1.8.4-0003-find-package-sqlite.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e561e5c..993b21a 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -437,7 +437,7 @@ if (BUILD_SQLITE) - find_package(SQLite3 QUIET) - find_package(unofficial-sqlite3 QUIET) - if (SQLite3_FOUND) -- target_link_libraries(${PROJECT_NAME} PRIVATE SQLite3_lib) -+ target_link_libraries(${PROJECT_NAME} PRIVATE SQLite::SQLite3) - set(DROGON_FOUND_SQLite3 TRUE) - elseif (unofficial-sqlite3_FOUND) - target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) diff --git a/recipes/drogon/all/patches/1.8.4-0004-find-package-yaml-cpp.patch b/recipes/drogon/all/patches/1.8.4-0004-find-package-yaml-cpp.patch deleted file mode 100644 index a9fca7863aea7..0000000000000 --- a/recipes/drogon/all/patches/1.8.4-0004-find-package-yaml-cpp.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 44063629..c18c86db 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -215,7 +215,7 @@ if(BUILD_YAML_CONFIG) - find_package(yaml-cpp QUIET) - if(yaml-cpp_FOUND) - message(STATUS "yaml-cpp found") -- target_link_libraries(${PROJECT_NAME} PUBLIC ${YAML_CPP_LIBRARIES}) -+ target_link_libraries(${PROJECT_NAME} PUBLIC yaml-cpp) - target_compile_definitions(${PROJECT_NAME} PUBLIC HAS_YAML_CPP) - else() - message(STATUS "yaml-cpp not used") diff --git a/recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch b/recipes/drogon/all/patches/1.9.6-0002-find-cci-packages.patch similarity index 89% rename from recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch rename to recipes/drogon/all/patches/1.9.6-0002-find-cci-packages.patch index 8bf9e60842f93..1e82fc39d8876 100644 --- a/recipes/drogon/all/patches/1.8.5-0002-find-cci-packages.patch +++ b/recipes/drogon/all/patches/1.9.6-0002-find-cci-packages.patch @@ -1,9 +1,9 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index e3e7fcf..d1032da 100755 +index 11c96b2..441b2c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -198,9 +198,9 @@ else() - endif() +@@ -180,9 +180,9 @@ endif() + # jsoncpp -find_package(Jsoncpp REQUIRED) @@ -15,7 +15,7 @@ index e3e7fcf..d1032da 100755 # yamlcpp if(BUILD_YAML_CONFIG) -@@ -212,7 +212,7 @@ if(BUILD_YAML_CONFIG) +@@ -194,7 +194,7 @@ if(BUILD_YAML_CONFIG) message(STATUS "yaml-cpp not used") else() message(STATUS "yaml-cpp found ") @@ -24,7 +24,7 @@ index e3e7fcf..d1032da 100755 target_compile_definitions(${PROJECT_NAME} PUBLIC HAS_YAML_CPP) endif() else() -@@ -442,7 +442,7 @@ if (BUILD_SQLITE) +@@ -432,7 +432,7 @@ if (BUILD_SQLITE) find_package(SQLite3 QUIET) find_package(unofficial-sqlite3 QUIET) if (SQLite3_FOUND) @@ -33,7 +33,7 @@ index e3e7fcf..d1032da 100755 set(DROGON_FOUND_SQLite3 TRUE) elseif (unofficial-sqlite3_FOUND) target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) -@@ -465,10 +465,10 @@ if (BUILD_SQLITE) +@@ -455,10 +455,10 @@ if (BUILD_SQLITE) endif (BUILD_SQLITE) if (BUILD_REDIS) @@ -47,7 +47,7 @@ index e3e7fcf..d1032da 100755 set(DROGON_SOURCES ${DROGON_SOURCES} nosql_lib/redis/src/RedisClientImpl.cc -@@ -488,10 +488,10 @@ if (BUILD_REDIS) +@@ -478,10 +478,10 @@ if (BUILD_REDIS) nosql_lib/redis/src/SubscribeContext.h nosql_lib/redis/src/RedisSubscriberImpl.h) @@ -60,7 +60,7 @@ index e3e7fcf..d1032da 100755 set(DROGON_SOURCES ${DROGON_SOURCES} lib/src/RedisClientSkipped.cc -@@ -500,7 +500,7 @@ if (NOT Hiredis_FOUND) +@@ -490,7 +490,7 @@ if (NOT Hiredis_FOUND) set(private_headers ${private_headers} lib/src/RedisClientManager.h) diff --git a/recipes/drogon/all/patches/1.9.7-0002-find-cci-packages.patch b/recipes/drogon/all/patches/1.9.7-0002-find-cci-packages.patch new file mode 100644 index 0000000000000..10aaaaa8d1cad --- /dev/null +++ b/recipes/drogon/all/patches/1.9.7-0002-find-cci-packages.patch @@ -0,0 +1,71 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 91b9b9b..9a2773f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -185,9 +185,9 @@ endif() + + + # jsoncpp +-find_package(Jsoncpp REQUIRED) +-target_link_libraries(${PROJECT_NAME} PUBLIC Jsoncpp_lib) +-list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${JSONCPP_INCLUDE_DIRS}) ++find_package(jsoncpp REQUIRED) ++target_link_libraries(${PROJECT_NAME} PUBLIC jsoncpp_lib) ++list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${jsoncpp_INCLUDE_DIRS}) + + # yamlcpp + if(BUILD_YAML_CONFIG) +@@ -199,7 +199,7 @@ if(BUILD_YAML_CONFIG) + message(STATUS "yaml-cpp not used") + else() + message(STATUS "yaml-cpp found ") +- target_link_libraries(${PROJECT_NAME} PUBLIC ${YAML_CPP_LINK_LIBRARY}) ++ target_link_libraries(${PROJECT_NAME} PUBLIC yaml-cpp) + target_compile_definitions(${PROJECT_NAME} PUBLIC HAS_YAML_CPP) + endif() + else() +@@ -437,7 +437,7 @@ if (BUILD_SQLITE) + find_package(SQLite3 QUIET) + find_package(unofficial-sqlite3 QUIET) + if (SQLite3_FOUND) +- target_link_libraries(${PROJECT_NAME} PRIVATE SQLite3_lib) ++ target_link_libraries(${PROJECT_NAME} PRIVATE SQLite::SQLite3) + set(DROGON_FOUND_SQLite3 TRUE) + elseif (unofficial-sqlite3_FOUND) + target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) +@@ -460,10 +460,10 @@ if (BUILD_SQLITE) + endif (BUILD_SQLITE) + + if (BUILD_REDIS) +- find_package(Hiredis) +- if (Hiredis_FOUND) ++ find_package(hiredis) ++ if (hiredis_FOUND) + add_definitions(-DUSE_REDIS) +- target_link_libraries(${PROJECT_NAME} PRIVATE Hiredis_lib) ++ target_link_libraries(${PROJECT_NAME} PRIVATE hiredis::hiredis) + set(DROGON_SOURCES + ${DROGON_SOURCES} + nosql_lib/redis/src/RedisClientImpl.cc +@@ -483,10 +483,10 @@ if (BUILD_REDIS) + nosql_lib/redis/src/SubscribeContext.h + nosql_lib/redis/src/RedisSubscriberImpl.h) + +- endif (Hiredis_FOUND) ++ endif () + endif (BUILD_REDIS) + +-if (NOT Hiredis_FOUND) ++if (NOT hiredis_FOUND) + set(DROGON_SOURCES + ${DROGON_SOURCES} + lib/src/RedisClientSkipped.cc +@@ -495,7 +495,7 @@ if (NOT Hiredis_FOUND) + set(private_headers + ${private_headers} + lib/src/RedisClientManager.h) +-endif (NOT Hiredis_FOUND) ++endif () + + if (BUILD_TESTING) + add_subdirectory(nosql_lib/redis/tests) diff --git a/recipes/drogon/all/patches/1.9.7-0003-include-exception.patch b/recipes/drogon/all/patches/1.9.7-0003-include-exception.patch new file mode 100644 index 0000000000000..8c99b4baf0dcc --- /dev/null +++ b/recipes/drogon/all/patches/1.9.7-0003-include-exception.patch @@ -0,0 +1,13 @@ +diff --git a/lib/inc/drogon/RequestStream.h b/lib/inc/drogon/RequestStream.h +index 852f075..b72e39e 100644 +--- a/lib/inc/drogon/RequestStream.h ++++ b/lib/inc/drogon/RequestStream.h +@@ -16,7 +16,7 @@ + #include + #include + #include +- ++#include + namespace drogon + { + class HttpRequest; diff --git a/recipes/drogon/config.yml b/recipes/drogon/config.yml index ad963339f39e6..b6e81018df502 100644 --- a/recipes/drogon/config.yml +++ b/recipes/drogon/config.yml @@ -1,4 +1,8 @@ versions: + "1.9.7": + folder: "all" + "1.9.6": + folder: "all" "1.9.5": folder: "all" "1.9.4": @@ -13,9 +17,3 @@ versions: folder: "all" "1.8.7": folder: "all" - "1.8.6": - folder: "all" - "1.8.5": - folder: "all" - "1.8.4": - folder: "all" diff --git a/recipes/dtl/all/conandata.yml b/recipes/dtl/all/conandata.yml index 7ae1dc4743d98..b14780dd20c90 100644 --- a/recipes/dtl/all/conandata.yml +++ b/recipes/dtl/all/conandata.yml @@ -1,10 +1,10 @@ sources: + "1.21": + url: "https://github.com/cubicdaiya/dtl/archive/v1.21.tar.gz" + sha256: "90ed2dbf4e6d687737fe25f118bbcb6aed778cecc3f2115d191a032bf8643dbd" "1.20": url: "https://github.com/cubicdaiya/dtl/archive/v1.20.tar.gz" sha256: "579f81bca88f4b9760a59d99c5a95bd8dd5dc2f20f33f1f9b5f64cb08979f54d" "1.19": url: "https://github.com/cubicdaiya/dtl/archive/v1.19.tar.gz" sha256: "f47b99dd11e5d771ad32a8dc960db4ab2fbe349fb0346fa0795f53c846a99c5d" - "cci.20210404": - url: "https://github.com/cubicdaiya/dtl/archive/0551c22f5ee3d30dbc4b0700bde5acdb6f1a9348.tar.gz" - sha256: "59c2e770454c935200179aa4457f72741aec2319072862950b2490d0758d4e43" diff --git a/recipes/dtl/all/conanfile.py b/recipes/dtl/all/conanfile.py index c53d228db8921..bc5ebc68cd927 100644 --- a/recipes/dtl/all/conanfile.py +++ b/recipes/dtl/all/conanfile.py @@ -1,9 +1,9 @@ import os from conan import ConanFile -from conan.tools.build import check_min_cppstd -from conan.tools.files import copy, get +from conan.tools.files import copy, get, replace_in_file from conan.tools.layout import basic_layout +from conan.tools.scm import Version required_conan_version = ">=1.52.0" @@ -28,6 +28,9 @@ def package_id(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + if Version(self.version) < "1.21": + # See https://github.com/cubicdaiya/dtl/pull/18 + replace_in_file(self, os.path.join(self.source_folder, "dtl", "Diff.hpp"), "void enableTrivial () const {", "void enableTrivial () {") def package(self): copy(self, "COPYING", diff --git a/recipes/dtl/config.yml b/recipes/dtl/config.yml index 66e68aaaf6fad..c7b2d5892fa8b 100644 --- a/recipes/dtl/config.yml +++ b/recipes/dtl/config.yml @@ -1,7 +1,7 @@ versions: + "1.21": + folder: "all" "1.20": folder: "all" "1.19": folder: "all" - "cci.20210404": - folder: "all" diff --git a/recipes/duckdb/all/conandata.yml b/recipes/duckdb/all/conandata.yml index 4288594f5fc5e..cf9fce4151d56 100644 --- a/recipes/duckdb/all/conandata.yml +++ b/recipes/duckdb/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/duckdb/duckdb/archive/refs/tags/v1.1.0.tar.gz" + sha256: "d9be2c6d3a5ebe2b3d33044fb2cb535bb0bd972a27ae38c4de5e1b4caa4bf68d" "1.0.0": url: "https://github.com/duckdb/duckdb/archive/refs/tags/v1.0.0.tar.gz" sha256: "04e472e646f5cadd0a3f877a143610674b0d2bcf9f4102203ac3c3d02f1c5f26" @@ -33,6 +36,13 @@ sources: url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.5.1.tar.gz" sha256: "3dab7ba0d0f8d024d3c73fd3d4fb8834203c31d7b0ddb1e8539ee266e11b0e9b" patches: + "1.1.0": + - patch_file: "patches/1.1.0-0001-fix-cmake.patch" + patch_description: "install static of shared library, add installation for odbc extention" + patch_type: "portability" + - patch_file: "patches/1.1.0-0002-msvc-bicobj.patch" + patch_description: "add /bigobj flag" + patch_type: "portability" "1.0.0": - patch_file: "patches/1.0.0-0001-fix-cmake.patch" patch_description: "install static of shared library, add installation for odbc extention" diff --git a/recipes/duckdb/all/conanfile.py b/recipes/duckdb/all/conanfile.py index 0c71916124ae9..7f21bb189c4b0 100644 --- a/recipes/duckdb/all/conanfile.py +++ b/recipes/duckdb/all/conanfile.py @@ -76,6 +76,8 @@ def config_options(self): del self.options.fPIC if Version(self.version) >= "0.9.0": del self.options.with_parquet + if Version(self.version) >= "1.1.0": + del self.options.with_odbc def configure(self): if self.options.shared: @@ -86,7 +88,7 @@ def layout(self): def requirements(self): # FIXME: duckdb vendors a bunch of deps by modify the source code to have their own namespace - if self.options.with_odbc: + if self.options.get_safe("with_odbc"): self.requires("odbc/2.3.11") if self.options.with_httpfs: self.requires("openssl/[>=1.1 <4]") @@ -148,7 +150,8 @@ def generate(self): tc.variables["BUILD_EXCEL_EXTENSION"] = self.options.with_excel tc.variables["BUILD_SQLSMITH_EXTENSION"] = self.options.with_sqlsmith - tc.variables["BUILD_ODBC_DRIVER"] = self.options.with_odbc + if "self.options" in self.options: + tc.variables["BUILD_ODBC_DRIVER"] = self.options.with_odbc tc.variables["FORCE_QUERY_LOG"] = self.options.with_query_log tc.variables["BUILD_SHELL"] = self.options.with_shell tc.variables["DISABLE_THREADS"] = not self.options.with_threads diff --git a/recipes/duckdb/all/patches/1.1.0-0001-fix-cmake.patch b/recipes/duckdb/all/patches/1.1.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..988bca9f377f1 --- /dev/null +++ b/recipes/duckdb/all/patches/1.1.0-0001-fix-cmake.patch @@ -0,0 +1,110 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7dc2bb7..89c0adc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -896,12 +896,12 @@ function(build_loadable_extension_directory NAME ABI_TYPE OUTPUT_DIRECTORY EXTEN + set(FOOTER_VERSION_VALUE ${CAPI_VERSION}) + endif() + +- add_custom_command( +- TARGET ${TARGET_NAME} +- POST_BUILD +- COMMAND +- ${CMAKE_COMMAND} -DABI_TYPE=${ABI_TYPE} -DEXTENSION=$${EXTENSION_POSTFIX} -DPLATFORM_FILE=${DuckDB_BINARY_DIR}/duckdb_platform_out -DVERSION_FIELD="${FOOTER_VERSION_VALUE}" -DEXTENSION_VERSION="${EXTENSION_VERSION}" -DNULL_FILE=${DUCKDB_MODULE_BASE_DIR}/scripts/null.txt -P ${DUCKDB_MODULE_BASE_DIR}/scripts/append_metadata.cmake +- ) ++ # add_custom_command( ++ # TARGET ${TARGET_NAME} ++ # POST_BUILD ++ # COMMAND ++ # ${CMAKE_COMMAND} -DABI_TYPE=${ABI_TYPE} -DEXTENSION=$${EXTENSION_POSTFIX} -DPLATFORM_FILE=${DuckDB_BINARY_DIR}/duckdb_platform_out -DVERSION_FIELD="${FOOTER_VERSION_VALUE}" -DEXTENSION_VERSION="${EXTENSION_VERSION}" -DNULL_FILE=${DUCKDB_MODULE_BASE_DIR}/scripts/null.txt -P ${DUCKDB_MODULE_BASE_DIR}/scripts/append_metadata.cmake ++ # ) + add_dependencies(${TARGET_NAME} duckdb_platform) + if (NOT EXTENSION_CONFIG_BUILD AND NOT ${EXTENSION_TESTS_ONLY} AND NOT CLANG_TIDY) + add_dependencies(duckdb_local_extension_repo ${TARGET_NAME}) +@@ -931,7 +931,7 @@ function(build_static_extension NAME PARAMETERS) + set(FILES "${ARGV}") + list(REMOVE_AT FILES 0) + add_library(${NAME}_extension STATIC ${FILES}) +- target_link_libraries(${NAME}_extension duckdb_static) ++ # target_link_libraries(${NAME}_extension duckdb_static) + endfunction() + + # Internal extension register function +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 3e757a4..957f0e4 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -109,7 +109,7 @@ else() + duckdb_skiplistlib + duckdb_mbedtls + duckdb_yyjson) +- ++ if(BUILD_SHARED_LIBS) + add_library(duckdb SHARED ${ALL_OBJECT_FILES}) + + if(WIN32 AND NOT MINGW) +@@ -135,16 +135,16 @@ else() + target_link_libraries(duckdb ${DUCKDB_LINK_LIBS}) + link_threads(duckdb) + link_extension_libraries(duckdb) +- ++ endif() + add_library(duckdb_static STATIC ${ALL_OBJECT_FILES}) + target_link_libraries(duckdb_static ${DUCKDB_LINK_LIBS}) + link_threads(duckdb_static) + link_extension_libraries(duckdb_static) +- ++ if(BUILD_SHARED_LIBS) + target_include_directories( + duckdb PUBLIC $ + $) +- ++ endif() + target_include_directories( + duckdb_static PUBLIC $ + $) +@@ -160,10 +160,18 @@ else() + DESTINATION "${INSTALL_INCLUDE_DIR}") + + endif() +- ++if(BUILD_SHARED_LIBS) + install( +- TARGETS duckdb duckdb_static ++ TARGETS duckdb + EXPORT "${DUCKDB_EXPORT_SET}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + RUNTIME DESTINATION "${INSTALL_BIN_DIR}") ++else() ++install( ++ TARGETS duckdb_static ++ EXPORT "${DUCKDB_EXPORT_SET}" ++ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ++ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" ++ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") ++endif() +diff --git a/tools/sqlite3_api_wrapper/CMakeLists.txt b/tools/sqlite3_api_wrapper/CMakeLists.txt +index e29c33e..9e387f9 100644 +--- a/tools/sqlite3_api_wrapper/CMakeLists.txt ++++ b/tools/sqlite3_api_wrapper/CMakeLists.txt +@@ -26,12 +26,12 @@ if(NOT AMALGAMATION_BUILD) + endif() + link_threads(sqlite3_api_wrapper_static) + +-if(NOT WIN32 AND NOT ZOS) ++if(BUILD_SHARED_LIBS AND NOT WIN32 AND NOT ZOS) + add_library(sqlite3_api_wrapper SHARED ${SQLITE_API_WRAPPER_FILES}) + target_link_libraries(sqlite3_api_wrapper duckdb ${DUCKDB_EXTRA_LINK_FLAGS}) + link_threads(sqlite3_api_wrapper) + endif() +- ++if(0) + include_directories(../../third_party/catch) + + include_directories(test/include) +@@ -43,3 +43,4 @@ if(WIN32 OR ZOS) + else() + target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper) + endif() ++endif() diff --git a/recipes/duckdb/all/patches/1.1.0-0002-msvc-bicobj.patch b/recipes/duckdb/all/patches/1.1.0-0002-msvc-bicobj.patch new file mode 100644 index 0000000000000..838678649e638 --- /dev/null +++ b/recipes/duckdb/all/patches/1.1.0-0002-msvc-bicobj.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 89c0adc..af5b786 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -574,7 +574,7 @@ if(NOT MSVC) + endif() + else() + set(CMAKE_CXX_WINDOWS_FLAGS +- "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8") ++ "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8 /bigobj") + if(TREAT_WARNINGS_AS_ERRORS) + set(CMAKE_CXX_WINDOWS_FLAGS "${CMAKE_CXX_WINDOWS_FLAGS} /WX") + endif() diff --git a/recipes/duckdb/config.yml b/recipes/duckdb/config.yml index 5a30e62447ed4..f79e88a559bee 100644 --- a/recipes/duckdb/config.yml +++ b/recipes/duckdb/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: "all" "1.0.0": folder: "all" "0.10.2": diff --git a/recipes/entt/3.x.x/conandata.yml b/recipes/entt/3.x.x/conandata.yml index 47adab23698d5..a45ca1a3e9ade 100644 --- a/recipes/entt/3.x.x/conandata.yml +++ b/recipes/entt/3.x.x/conandata.yml @@ -1,7 +1,7 @@ sources: - "3.13.0": - url: "https://github.com/skypjack/entt/archive/refs/tags/v3.13.0.tar.gz" - sha256: "dc0ab3ee136a1fe7f92df8898ff215dff1fe4d05d81b60144c7c0468446540a9" + "3.13.2": + url: "https://github.com/skypjack/entt/archive/refs/tags/v3.13.2.tar.gz" + sha256: "cb556aa543d01177b62de41321759e02d96078948dda72705b3d7fe68af88489" "3.12.2": url: "https://github.com/skypjack/entt/archive/refs/tags/v3.12.2.tar.gz" sha256: "3F3E43988218DAECC0530CCAF45E960F7F7416E1FCF2C69799160C18B6A2FEE3" diff --git a/recipes/entt/config.yml b/recipes/entt/config.yml index 10a22d0efa93f..c49da489cfd20 100644 --- a/recipes/entt/config.yml +++ b/recipes/entt/config.yml @@ -1,5 +1,5 @@ versions: - "3.13.0": + "3.13.2": folder: 3.x.x "3.12.2": folder: 3.x.x diff --git a/recipes/etl/all/conandata.yml b/recipes/etl/all/conandata.yml index d43f353b12095..ad1ca82dd2b02 100644 --- a/recipes/etl/all/conandata.yml +++ b/recipes/etl/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "20.39.4": + url: "https://github.com/ETLCPP/etl/archive/20.39.4.tar.gz" + sha256: "ce1222ed12fb39ae7a6160f8c33da61534d6b4c4d0d36be622910bbd545f5ee7" + "20.39.3": + url: "https://github.com/ETLCPP/etl/archive/20.39.3.tar.gz" + sha256: "1d596bc47d17959ced8b4586e0ae22348c903df6ab00f47ef900d854ef5e30c8" "20.38.17": url: "https://github.com/ETLCPP/etl/archive/20.38.17.tar.gz" sha256: "5b490aca3faad3796a48bf0980e74f2a67953967fad3c051a6d4981051cb0b9a" @@ -20,24 +26,3 @@ sources: "20.38.10": url: "https://github.com/ETLCPP/etl/archive/20.38.10.tar.gz" sha256: "562f9b5d9e6786350b09d87be9c5f030073e34d7bf0a975de3e91476ddd471a3" - "20.38.7": - url: "https://github.com/ETLCPP/etl/archive/20.38.7.tar.gz" - sha256: "65cfc033bacab452af05a36bd53b8cdc2bdfd1492b2adc5bb51d2f00e451491f" - "20.38.6": - url: "https://github.com/ETLCPP/etl/archive/20.38.6.tar.gz" - sha256: "95515f2229fe75393d18ee95548998a06e65a02acd5eedae5808dd34f8201462" - "20.38.4": - url: "https://github.com/ETLCPP/etl/archive/20.38.4.tar.gz" - sha256: "4074583bacac17e7944030f099d18a4ea3591d5d58b8d8b85c1b7f080a3e9610" - "20.38.3": - url: "https://github.com/ETLCPP/etl/archive/20.38.3.tar.gz" - sha256: "7d2f384dfa9a50c8e066b716524016d2b62e753b0b75fed09a2b7e2c260759d2" - "20.38.0": - url: "https://github.com/ETLCPP/etl/archive/20.38.0.tar.gz" - sha256: "7e29ce81a2a2d5826286502a2ad5bde1f4b591d2c9e0ef7ccc335e75445223cd" - "20.37.3": - url: "https://github.com/ETLCPP/etl/archive/20.37.3.tar.gz" - sha256: "fbdf60c770772cd96d1eb25bdf56e4f45f23bf4029e18ef1f2af1f2056b9ea41" - "20.36.0": - url: "https://github.com/ETLCPP/etl/archive/20.36.0.tar.gz" - sha256: "bcab607d619008c7e3942ecc9cb429e17deb553c81bc5f1fd013fbc1e17f1344" diff --git a/recipes/etl/config.yml b/recipes/etl/config.yml index e0622751730c6..084ac6d8aaecd 100644 --- a/recipes/etl/config.yml +++ b/recipes/etl/config.yml @@ -1,4 +1,8 @@ versions: + "20.39.4": + folder: all + "20.39.3": + folder: all "20.38.17": folder: all "20.38.16": @@ -13,17 +17,3 @@ versions: folder: all "20.38.10": folder: all - "20.38.7": - folder: all - "20.38.6": - folder: all - "20.38.4": - folder: all - "20.38.3": - folder: all - "20.38.0": - folder: all - "20.37.3": - folder: all - "20.36.0": - folder: all diff --git a/recipes/expat/all/conandata.yml b/recipes/expat/all/conandata.yml index f010a588a6317..70a835971e10a 100644 --- a/recipes/expat/all/conandata.yml +++ b/recipes/expat/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.6.3": + url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_3/expat-2.6.3.tar.xz" + sha256: "274db254a6979bde5aad404763a704956940e465843f2a9bd9ed7af22e2c0efc" "2.6.2": url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_2/expat-2.6.2.tar.xz" sha256: "ee14b4c5d8908b1bec37ad937607eab183d4d9806a08adee472c3c3121d27364" diff --git a/recipes/expat/config.yml b/recipes/expat/config.yml index ee86cf4cc73ee..14651d18d6467 100644 --- a/recipes/expat/config.yml +++ b/recipes/expat/config.yml @@ -1,4 +1,6 @@ versions: + "2.6.3": + folder: all "2.6.2": folder: all "2.6.0": diff --git a/recipes/faker-cxx/all/conandata.yml b/recipes/faker-cxx/all/conandata.yml index 7125cc87621a1..33704b20363da 100644 --- a/recipes/faker-cxx/all/conandata.yml +++ b/recipes/faker-cxx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.0.0": + url: "https://github.com/cieslarmichal/faker-cxx/archive/refs/tags/v3.0.0.tar.gz" + sha256: "63d6846376593e05da690136cabe8e7bf42ddcdd4edad3ae9b48696f86d80468" "2.0.0": url: "https://github.com/cieslarmichal/faker-cxx/archive/refs/tags/v2.0.0.tar.gz" sha256: "8a7f5441f4453af868444675878a2d9a74918c1595caa65d537d3ea327e46a49" diff --git a/recipes/faker-cxx/all/test_package/CMakeLists.txt b/recipes/faker-cxx/all/test_package/CMakeLists.txt index 23e8286ff283c..2485457ffc81e 100644 --- a/recipes/faker-cxx/all/test_package/CMakeLists.txt +++ b/recipes/faker-cxx/all/test_package/CMakeLists.txt @@ -6,3 +6,6 @@ find_package(faker-cxx REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE faker-cxx::faker-cxx) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +if(faker-cxx_VERSION VERSION_LESS "3.0.0") + target_compile_definitions(${PROJECT_NAME} PRIVATE FAKER_CXX_2) +endif() diff --git a/recipes/faker-cxx/all/test_package/test_package.cpp b/recipes/faker-cxx/all/test_package/test_package.cpp index ed71cb953c909..7251d095e5300 100644 --- a/recipes/faker-cxx/all/test_package/test_package.cpp +++ b/recipes/faker-cxx/all/test_package/test_package.cpp @@ -1,7 +1,13 @@ #include -#include "faker-cxx/Internet.h" -#include "faker-cxx/String.h" -#include "faker-cxx/Date.h" +#ifdef FAKER_CXX_2 + #include "faker-cxx/Internet.h" + #include "faker-cxx/String.h" + #include "faker-cxx/Date.h" +#else + #include "faker-cxx/internet.h" + #include "faker-cxx/string.h" + #include "faker-cxx/date.h" +#endif int main() { diff --git a/recipes/faker-cxx/config.yml b/recipes/faker-cxx/config.yml index d77ad03cbf510..70df618778342 100644 --- a/recipes/faker-cxx/config.yml +++ b/recipes/faker-cxx/config.yml @@ -1,3 +1,5 @@ versions: + "3.0.0": + folder: all "2.0.0": folder: all diff --git a/recipes/fast-cdr/all/conandata.yml b/recipes/fast-cdr/all/conandata.yml index f1fb4fa51912e..0e16ebb10baa2 100644 --- a/recipes/fast-cdr/all/conandata.yml +++ b/recipes/fast-cdr/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.3": + url: "https://github.com/eProsima/Fast-CDR/archive/v2.2.3.tar.gz" + sha256: "2501ef0930727d3b3ac1819672a6df8631a58fbcf7f005947046c2de46e8da69" "2.2.0": url: "https://github.com/eProsima/Fast-CDR/archive/v2.2.0.tar.gz" sha256: "8a75ee3aed59f495e95208050920d2c2146df92f073809505a3bd29011c21f20" diff --git a/recipes/fast-cdr/config.yml b/recipes/fast-cdr/config.yml index c6c63a5158e6b..f92947a12e733 100644 --- a/recipes/fast-cdr/config.yml +++ b/recipes/fast-cdr/config.yml @@ -1,4 +1,6 @@ versions: + "2.2.3": + folder: all "2.2.0": folder: all "2.1.0": diff --git a/recipes/fast-dds/all/conandata.yml b/recipes/fast-dds/all/conandata.yml index 9e3502b8efbdc..f53bf9511da8b 100644 --- a/recipes/fast-dds/all/conandata.yml +++ b/recipes/fast-dds/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.14.3": + url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.14.3.tar.gz" + sha256: "292e4170e4689d878eb5ddd38661134a704a1541402a4f564353190e4aadd23d" "2.14.0": url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.14.0.tar.gz" sha256: "a6f12bce6b77f265cab81abde5dc2e08133be9a55bc29e573c84571d44eddbc2" @@ -15,6 +18,10 @@ sources: url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.3.4.tar.gz" sha256: "b1b2322de0ca55a16495666e3fbda8aca32b888bbfaecda29f2ffc4b072ef7ac" patches: + "2.14.3": + - patch_file: "patches/2.13.3-0001-fix-find-asio-and-tinyxml2.patch" + patch_type: "conan" + patch_description: "Fixup find asio and tinyxml2" "2.14.0": - patch_file: "patches/2.13.3-0001-fix-find-asio-and-tinyxml2.patch" patch_type: "conan" diff --git a/recipes/fast-dds/config.yml b/recipes/fast-dds/config.yml index 29bc2c57212d7..101b2295a806a 100644 --- a/recipes/fast-dds/config.yml +++ b/recipes/fast-dds/config.yml @@ -1,4 +1,6 @@ versions: + "2.14.3": + folder: all "2.14.0": folder: all "2.13.3": diff --git a/recipes/fast_float/all/conandata.yml b/recipes/fast_float/all/conandata.yml index a35ee1375a199..a71f0d864046f 100644 --- a/recipes/fast_float/all/conandata.yml +++ b/recipes/fast_float/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "6.1.5": + url: "https://github.com/fastfloat/fast_float/archive/v6.1.5.tar.gz" + sha256: "597126ff5edc3ee59d502c210ded229401a30dafecb96a513135e9719fcad55f" + "6.1.4": + url: "https://github.com/fastfloat/fast_float/archive/v6.1.4.tar.gz" + sha256: "12cb6d250824160ca16bcb9d51f0ca7693d0d10cb444f34f1093bc02acfce704" + "6.1.3": + url: "https://github.com/fastfloat/fast_float/archive/v6.1.3.tar.gz" + sha256: "7dd99cc2ff44e07dc2a42bed0c6b8c4a8ee4e3b1c330f77073b6cfdb48724c8e" "6.1.1": url: "https://github.com/fastfloat/fast_float/archive/v6.1.1.tar.gz" sha256: "10159a4a58ba95fe9389c3c97fe7de9a543622aa0dcc12dd9356d755e9a94cb4" diff --git a/recipes/fast_float/all/conanfile.py b/recipes/fast_float/all/conanfile.py index ec98c563d0552..e53918364ffe6 100644 --- a/recipes/fast_float/all/conanfile.py +++ b/recipes/fast_float/all/conanfile.py @@ -11,9 +11,9 @@ class FastFloatConan(ConanFile): description = "Fast and exact implementation of the C++ from_chars " \ "functions for float and double types." license = ("Apache-2.0", "MIT", "BSL-1.0") - topics = ("conversion", "from_chars", "header-only") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/fastfloat/fast_float" + topics = ("conversion", "from_chars", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True diff --git a/recipes/fast_float/all/test_package/conanfile.py b/recipes/fast_float/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/fast_float/all/test_package/conanfile.py +++ b/recipes/fast_float/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/fast_float/config.yml b/recipes/fast_float/config.yml index dbe55c83d4f49..58f7867f85a24 100644 --- a/recipes/fast_float/config.yml +++ b/recipes/fast_float/config.yml @@ -1,4 +1,10 @@ versions: + "6.1.5": + folder: all + "6.1.4": + folder: all + "6.1.3": + folder: all "6.1.1": folder: all "6.1.0": diff --git a/recipes/fast_io/all/conandata.yml b/recipes/fast_io/all/conandata.yml index a32bf70cd25f3..849d1ed038071 100644 --- a/recipes/fast_io/all/conandata.yml +++ b/recipes/fast_io/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240729": + url: "https://github.com/cppfastio/fast_io/archive/44617e9368b64047fabd00cd98b037c1c2fc7fb2.tar.gz" + sha256: "077692f72f2a7e3fed44fa5b37613d058657738c2592addfcb6559cf1ae30716" "cci.20240219": url: "https://github.com/cppfastio/fast_io/archive/316afccde333721b059a761b25217084e84a9ca0.tar.gz" sha256: "9feab7802957c8069b2a112f97bfb885d503ff5d7f433197f47636f40a20188a" diff --git a/recipes/fast_io/config.yml b/recipes/fast_io/config.yml index 957c6f90fa002..7559ae4709057 100644 --- a/recipes/fast_io/config.yml +++ b/recipes/fast_io/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20240729": + folder: all "cci.20240219": folder: all diff --git a/recipes/ffmpeg/all/conandata.yml b/recipes/ffmpeg/all/conandata.yml index b51138c1bc00b..0c31b9c82f58e 100644 --- a/recipes/ffmpeg/all/conandata.yml +++ b/recipes/ffmpeg/all/conandata.yml @@ -1,40 +1,25 @@ sources: + "7.0.1": + url: "https://ffmpeg.org//releases/ffmpeg-7.0.1.tar.bz2" + sha256: "5e77e84b6434d656106fafe3bceccc77176449014f3eba24d33db3fbd0939dc9" + "6.1.1": + url: "http://ffmpeg.org/releases/ffmpeg-6.1.1.tar.bz2" + sha256: "5e3133939a61ef64ac9b47ffd29a5ea6e337a4023ef0ad972094b4da844e3a20" "6.1": url: "http://ffmpeg.org/releases/ffmpeg-6.1.tar.bz2" sha256: "eb7da3de7dd3ce48a9946ab447a7346bd11a3a85e6efb8f2c2ce637e7f547611" "6.0.1": url: "http://ffmpeg.org/releases/ffmpeg-6.0.1.tar.bz2" sha256: "2c6e294569d1ba8e99cbf1acbe49e060a23454228a540a0f45d679d72ec69a06" - "6.0": - url: "https://ffmpeg.org/releases/ffmpeg-6.0.tar.bz2" - sha256: "47d062731c9f66a78380e35a19aac77cebceccd1c7cc309b9c82343ffc430c3d" "5.1.3": url: "https://ffmpeg.org/releases/ffmpeg-5.1.3.tar.bz2" sha256: "5d5bef6a11f0c500588f9870ec965a30acc0d54d8b1e535da6554a32902d236d" - "5.1": - url: "https://ffmpeg.org/releases/ffmpeg-5.1.tar.bz2" - sha256: "32b56fb01ce90d452958ae25e91c9564abf49ed5453c127bec23c63e530aa8fa" "5.0.3": url: "https://ffmpeg.org/releases/ffmpeg-5.0.3.tar.bz2" sha256: "664e8fa8ac4cc5dce03277f022798461998d9bb8d96b9e1859b24e74511229fd" - "5.0": - url: "https://ffmpeg.org/releases/ffmpeg-5.0.tar.bz2" - sha256: "c0130b8db2c763430fd1c6905288d61bc44ee0548ad5fcd2dfd650b88432bed9" "4.4.4": url: "https://ffmpeg.org/releases/ffmpeg-4.4.4.tar.bz2" sha256: "47b1fbf70a2c090d9c0fae5910da11c6406ca92408bb69d8c935cd46c622c7ce" - "4.4.3": - url: "https://ffmpeg.org/releases/ffmpeg-4.4.3.tar.bz2" - sha256: "33b8c2dbcd530fe1db5710415345609b4ca227bd0da1e3a9332dbb0f11fd273a" - "4.4": - url: "https://ffmpeg.org/releases/ffmpeg-4.4.tar.bz2" - sha256: "42093549751b582cf0f338a21a3664f52e0a9fbe0d238d3c992005e493607d0e" - "4.3.2": - url: "https://ffmpeg.org/releases/ffmpeg-4.3.2.tar.bz2" - sha256: "ab3a6d6a70358ba0a5f67f37f91f6656b7302b02e98e5b8c846c16763c99913a" - "4.2.1": - url: "https://ffmpeg.org/releases/ffmpeg-4.2.1.tar.bz2" - sha256: "682a9fa3f6864d7f0dbf224f86b129e337bc60286e0d00dffcd710998d521624" patches: "5.1.3": - patch_file: "patches/5.1-0001-fix-libsvtav1-compressed_ten_bit_format.patch" @@ -53,55 +38,25 @@ patches: patch_description: "Compatibility with vulkan >= 1.3.239" patch_type: "portability" patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/eb0455d64690eed0068e5cb202f72ecdf899837c" - "5.1": - - patch_file: "patches/5.1-0001-fix-libsvtav1-compressed_ten_bit_format.patch" - patch_description: "Compatibility with libsvtav1 > 1.2.0" - patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/031f1561cd286596cdb374da32f8aa816ce3b135" - - patch_file: "patches/5.1-0002-fix-libsvtav1-vbv_bufsize-1.patch" - patch_description: "Compatibility with libsvtav1 > 1.2.0" - patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/1c6fd7d756afe0f8b7df14dbf7a95df275f8f5ee" - - patch_file: "patches/5.1-0003-fix-libsvtav1-vbv_bufsize-2.patch" - patch_description: "Compatibility with libsvtav1 > 1.2.0" - patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/96748ac54f998ba6fe22802799c16b4eba8d4ccc" - - patch_file: "patches/5.0-0001-fix-hwcontext_vulkan.patch" - patch_description: "Compatibility with vulkan >= 1.3.239" + - patch_file: "patches/5.1-0004-fix-binutils.patch" + patch_description: "Compatibility with binutils >= 2.41" patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/eb0455d64690eed0068e5cb202f72ecdf899837c" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/effadce6c756247ea8bae32dc13bb3e6f464f0eb" "5.0.3": - patch_file: "patches/5.0-0001-fix-hwcontext_vulkan.patch" patch_description: "Compatibility with vulkan >= 1.3.239" patch_type: "portability" patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/eb0455d64690eed0068e5cb202f72ecdf899837c" - "5.0": - - patch_file: "patches/5.0-0001-fix-hwcontext_vulkan.patch" - patch_description: "Compatibility with vulkan >= 1.3.239" + - patch_file: "patches/5.1-0004-fix-binutils.patch" + patch_description: "Compatibility with binutils >= 2.41" patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/eb0455d64690eed0068e5cb202f72ecdf899837c" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/effadce6c756247ea8bae32dc13bb3e6f464f0eb" "4.4.4": - patch_file: "patches/4.4-0001-fix-aom_codec_av1_dx_algo.patch" patch_description: "Compatibility with shared libaom" patch_type: "portability" patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" - "4.4.3": - - patch_file: "patches/4.4-0001-fix-aom_codec_av1_dx_algo.patch" - patch_description: "Compatibility with shared libaom" - patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" - "4.4": - - patch_file: "patches/4.4-0001-fix-aom_codec_av1_dx_algo.patch" - patch_description: "Compatibility with shared libaom" + - patch_file: "patches/5.1-0004-fix-binutils.patch" + patch_description: "Compatibility with binutils >= 2.41" patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" - "4.3.2": - - patch_file: "patches/4.2-0001-fix-aom_codec_av1_dx_algo.patch" - patch_description: "Compatibility with shared libaom" - patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" - "4.2.1": - - patch_file: "patches/4.2-0001-fix-aom_codec_av1_dx_algo.patch" - patch_description: "Compatibility with shared libaom" - patch_type: "portability" - patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/effadce6c756247ea8bae32dc13bb3e6f464f0eb" \ No newline at end of file diff --git a/recipes/ffmpeg/all/conanfile.py b/recipes/ffmpeg/all/conanfile.py index faccb5c3993a9..3867ed6aa0b52 100644 --- a/recipes/ffmpeg/all/conanfile.py +++ b/recipes/ffmpeg/all/conanfile.py @@ -1,11 +1,11 @@ -from conan import ConanFile +from conan import ConanFile, conan_version from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os from conan.tools.build import cross_building from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv from conan.tools.files import ( apply_conandata_patches, chdir, copy, export_conandata_patches, get, rename, - replace_in_file, rm, rmdir + replace_in_file, rm, rmdir, save, load ) from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps from conan.tools.layout import basic_layout @@ -74,6 +74,10 @@ class FFMpegConan(ConanFile): "with_libsvtav1": [True, False], "with_libaom": [True, False], "with_libdav1d": [True, False], + "with_libdrm": [True, False], + "with_jni": [True, False], + "with_mediacodec": [True, False], + "with_xlib": [True, False], "disable_everything": [True, False], "disable_all_encoders": [True, False], "disable_encoders": [None, "ANY"], @@ -154,6 +158,10 @@ class FFMpegConan(ConanFile): "with_libsvtav1": True, "with_libaom": True, "with_libdav1d": True, + "with_libdrm": False, + "with_jni": False, + "with_mediacodec": False, + "with_xlib": True, "disable_everything": False, "disable_all_encoders": False, "disable_encoders": None, @@ -225,33 +233,29 @@ def _dependencies(self): "with_libsvtav1": ["avcodec"], "with_libaom": ["avcodec"], "with_libdav1d": ["avcodec"], + "with_mediacodec": ["with_jni"], + "with_xlib": ["avdevice"], } - @property - def _version_supports_vulkan(self): - return Version(self.version) >= "4.3.0" - @property def _version_supports_libsvtav1(self): return Version(self.version) >= "5.1.0" - @property - def _version_supports_libdav1d(self): - return Version(self.version) >= "4.3.0" - def export_sources(self): export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if not self.settings.os in ["Linux", "FreeBSD"]: + if self.settings.os not in ["Linux", "FreeBSD"]: del self.options.with_vaapi del self.options.with_vdpau del self.options.with_vulkan del self.options.with_xcb del self.options.with_libalsa del self.options.with_pulse + del self.options.with_xlib + del self.options.with_libdrm if self.settings.os != "Macos": del self.options.with_appkit if self.settings.os not in ["Macos", "iOS", "tvOS"]: @@ -260,12 +264,13 @@ def config_options(self): del self.options.with_videotoolbox if not is_apple_os(self): del self.options.with_avfoundation - if not self._version_supports_vulkan: - self.options.rm_safe("with_vulkan") + if not self.settings.os == "Android": + del self.options.with_jni + del self.options.with_mediacodec if not self._version_supports_libsvtav1: self.options.rm_safe("with_libsvtav1") - if not self._version_supports_libdav1d: - self.options.rm_safe("with_libdav1d") + if self.settings.os == "Android": + del self.options.with_libfdk_aac def configure(self): if self.options.shared: @@ -288,9 +293,9 @@ def requirements(self): if self.options.with_freetype: self.requires("freetype/2.13.2") if self.options.with_openjpeg: - self.requires("openjpeg/2.5.0") + self.requires("openjpeg/2.5.2") if self.options.with_openh264: - self.requires("openh264/2.3.1") + self.requires("openh264/2.4.1") if self.options.with_vorbis: self.requires("vorbis/1.3.7") if self.options.with_opus: @@ -300,14 +305,14 @@ def requirements(self): if self.options.with_sdl: self.requires("sdl/2.28.5") if self.options.with_libx264: - self.requires("libx264/cci.20220602") + self.requires("libx264/cci.20240224") if self.options.with_libx265: self.requires("libx265/3.4") if self.options.with_libvpx: - self.requires("libvpx/1.13.1") + self.requires("libvpx/1.14.1") if self.options.with_libmp3lame: self.requires("libmp3lame/3.100") - if self.options.with_libfdk_aac: + if self.options.get_safe("with_libfdk_aac"): self.requires("libfdk_aac/2.0.3") if self.options.with_libwebp: self.requires("libwebp/1.3.2") @@ -315,7 +320,7 @@ def requirements(self): self.requires("openssl/[>=1.1 <4]") if self.options.get_safe("with_libalsa"): self.requires("libalsa/1.2.10") - if self.options.get_safe("with_xcb") or self.options.get_safe("with_vaapi"): + if self.options.get_safe("with_xcb") or self.options.get_safe("with_xlib"): self.requires("xorg/system") if self.options.get_safe("with_pulse"): self.requires("pulseaudio/14.2") @@ -323,14 +328,16 @@ def requirements(self): self.requires("vaapi/system") if self.options.get_safe("with_vdpau"): self.requires("vdpau/system") - if self._version_supports_vulkan and self.options.get_safe("with_vulkan"): + if self.options.get_safe("with_vulkan"): self.requires("vulkan-loader/1.3.243.0") if self.options.get_safe("with_libsvtav1"): - self.requires("libsvtav1/1.6.0") + self.requires("libsvtav1/2.1.0") if self.options.with_libaom: self.requires("libaom-av1/3.6.1") if self.options.get_safe("with_libdav1d"): - self.requires("dav1d/1.2.1") + self.requires("dav1d/1.4.3") + if self.options.get_safe("with_libdrm"): + self.requires("libdrm/2.4.119") def validate(self): if self.options.with_ssl == "securetransport" and not is_apple_os(self): @@ -347,9 +354,25 @@ def validate(self): raise ConanInvalidConfiguration("FFmpeg '{}' option requires '{}' option to be enabled".format( dependency, "' or '".join(features))) + if Version(self.version) >= "6.1" and conan_version.major == 1 and is_msvc(self) and self.options.shared: + # Linking fails with "Argument list too long" for some reason on Conan v1 + raise ConanInvalidConfiguration("MSVC shared build is not supported for Conan v1") + + if Version(self.version) == "7.0.1" and self.settings.build_type == "Debug": + # FIXME: FFMpeg fails to build in Debug mode with the following error: + # ld: libavcodec/libavcodec.a(vvcdsp_init.o): in function `ff_vvc_put_pixels2_8_sse4': + # src/libavcodec/x86/vvc/vvcdsp_init.c:69: undefined reference to `ff_h2656_put_pixels2_8_sse4' + # May be related https://github.com/ffvvc/FFmpeg/issues/234 + raise ConanInvalidConfiguration(f"{self.ref} Conan recipe does not support build_type=Debug. Contributions are welcome to fix this issue.") + def build_requirements(self): if self.settings.arch in ("x86", "x86_64"): - self.tool_requires("yasm/1.3.0") + if Version(self.version) >= "7.0": + # INFO: FFmpeg 7.0+ added avcodec vvc_mc.asm which fails to assemble with yasm 1.3.0 + # src/libavcodec/x86/vvc/vvc_mc.asm:55: error: operand 1: expression is not simple or relocatable + self.tool_requires("nasm/2.16.01") + else: + self.tool_requires("yasm/1.3.0") if not self.conf.get("tools.gnu:pkg_config", check_type=str): self.tool_requires("pkgconf/2.1.0") if self._settings_build.os == "Windows": @@ -397,11 +420,10 @@ def _patch_sources(self): "#define X264_API_IMPORTS 1", "") if self.options.with_ssl == "openssl": # https://trac.ffmpeg.org/ticket/5675 - openssl_libraries = " ".join( - [f"-l{lib}" for lib in self.dependencies["openssl"].cpp_info.aggregated_components().libs]) + openssl_libs = load(self, os.path.join(self.build_folder, "openssl_libs.list")) replace_in_file(self, os.path.join(self.source_folder, "configure"), "check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||", - f"check_lib openssl openssl/ssl.h OPENSSL_init_ssl {openssl_libraries} || ") + f"check_lib openssl openssl/ssl.h OPENSSL_init_ssl {openssl_libs} || ") replace_in_file(self, os.path.join(self.source_folder, "configure"), "echo libx264.lib", "echo x264.lib") @@ -485,40 +507,36 @@ def opt_append_disable_if_set(args, what, v): opt_enable_disable("libx265", self.options.with_libx265), opt_enable_disable("libvpx", self.options.with_libvpx), opt_enable_disable("libmp3lame", self.options.with_libmp3lame), - opt_enable_disable("libfdk-aac", self.options.with_libfdk_aac), + opt_enable_disable("libfdk-aac", self.options.get_safe("with_libfdk_aac")), opt_enable_disable("libwebp", self.options.with_libwebp), opt_enable_disable("libaom", self.options.with_libaom), opt_enable_disable("openssl", self.options.with_ssl == "openssl"), opt_enable_disable("alsa", self.options.get_safe("with_libalsa")), - opt_enable_disable( - "libpulse", self.options.get_safe("with_pulse")), + opt_enable_disable("libpulse", self.options.get_safe("with_pulse")), opt_enable_disable("vaapi", self.options.get_safe("with_vaapi")), + opt_enable_disable("libdrm", self.options.get_safe("with_libdrm")), opt_enable_disable("vdpau", self.options.get_safe("with_vdpau")), opt_enable_disable("libxcb", self.options.get_safe("with_xcb")), - opt_enable_disable( - "libxcb-shm", self.options.get_safe("with_xcb")), - opt_enable_disable( - "libxcb-shape", self.options.get_safe("with_xcb")), - opt_enable_disable( - "libxcb-xfixes", self.options.get_safe("with_xcb")), + opt_enable_disable("libxcb-shm", self.options.get_safe("with_xcb")), + opt_enable_disable("libxcb-shape", self.options.get_safe("with_xcb")), + opt_enable_disable("libxcb-xfixes", self.options.get_safe("with_xcb")), opt_enable_disable("appkit", self.options.get_safe("with_appkit")), - opt_enable_disable( - "avfoundation", self.options.get_safe("with_avfoundation")), - opt_enable_disable( - "coreimage", self.options.get_safe("with_coreimage")), - opt_enable_disable( - "audiotoolbox", self.options.get_safe("with_audiotoolbox")), - opt_enable_disable( - "videotoolbox", self.options.get_safe("with_videotoolbox")), - opt_enable_disable("securetransport", - self.options.with_ssl == "securetransport"), + opt_enable_disable("avfoundation", self.options.get_safe("with_avfoundation")), + opt_enable_disable("coreimage", self.options.get_safe("with_coreimage")), + opt_enable_disable("audiotoolbox", self.options.get_safe("with_audiotoolbox")), + opt_enable_disable("videotoolbox", self.options.get_safe("with_videotoolbox")), + opt_enable_disable("securetransport", self.options.with_ssl == "securetransport"), + opt_enable_disable("vulkan", self.options.get_safe("with_vulkan")), + opt_enable_disable("libdav1d", self.options.get_safe("with_libdav1d")), + opt_enable_disable("jni", self.options.get_safe("with_jni")), + opt_enable_disable("mediacodec", self.options.get_safe("with_mediacodec")), + opt_enable_disable("xlib", self.options.get_safe("with_xlib")), "--disable-cuda", # FIXME: CUDA support "--disable-cuvid", # FIXME: CUVID support # Licenses - opt_enable_disable("nonfree", self.options.with_libfdk_aac or (self.options.with_ssl and ( + opt_enable_disable("nonfree", self.options.get_safe("with_libfdk_aac") or (self.options.with_ssl and ( self.options.with_libx264 or self.options.with_libx265 or self.options.postproc))), - opt_enable_disable( - "gpl", self.options.with_libx264 or self.options.with_libx265 or self.options.postproc) + opt_enable_disable("gpl", self.options.with_libx264 or self.options.with_libx265 or self.options.postproc) ] # Individual Component Options @@ -581,12 +599,8 @@ def opt_append_disable_if_set(args, what, v): args.extend(self._split_and_format_options_string( "disable-filter", self.options.disable_filters)) - if self._version_supports_vulkan: - args.append(opt_enable_disable("vulkan", self.options.get_safe("with_vulkan"))) if self._version_supports_libsvtav1: args.append(opt_enable_disable("libsvtav1", self.options.get_safe("with_libsvtav1"))) - if self._version_supports_libsvtav1: - args.append(opt_enable_disable("libdav1d", self.options.get_safe("with_libdav1d"))) if is_apple_os(self): # relocatable shared libs args.append("--install-name-dir=@rpath") @@ -687,6 +701,10 @@ def opt_append_disable_if_set(args, what, v): deps = PkgConfigDeps(self) deps.generate() + if self.options.with_ssl == "openssl": + openssl_libs = " ".join([f"-l{lib}" for lib in self.dependencies["openssl"].cpp_info.aggregated_components().libs]) + save(self, os.path.join(self.build_folder, "openssl_libs.list"), openssl_libs) + def _split_and_format_options_string(self, flag_name, options_list): if not options_list: return [] @@ -760,265 +778,159 @@ def _set_component_version(self, component_name): def package_info(self): if self.options.with_programs: if self.options.with_sdl: - self.cpp_info.components["programs"].requires = [ - "sdl::libsdl2"] - + self.cpp_info.components["programs"].requires = ["sdl::libsdl2"] + + def _add_component(name, dependencies): + component = self.cpp_info.components[name] + component.set_property("pkg_config_name", f"lib{name}") + self._set_component_version(name) + component.libs = [name] + if name != "avutil": + component.requires = ["avutil"] + for dep in dependencies: + if self.options.get_safe(dep): + component.requires.append(dep) + if self.settings.os in ("FreeBSD", "Linux"): + component.system_libs.append("m") + return component + + avutil = _add_component("avutil", []) if self.options.avdevice: - self.cpp_info.components["avdevice"].set_property( - "pkg_config_name", "libavdevice") - self.cpp_info.components["avdevice"].libs = ["avdevice"] - self.cpp_info.components["avdevice"].requires = ["avutil"] - if self.options.avfilter: - self.cpp_info.components["avdevice"].requires.append( - "avfilter") - if self.options.swscale: - self.cpp_info.components["avdevice"].requires.append("swscale") - if self.options.avformat: - self.cpp_info.components["avdevice"].requires.append( - "avformat") - if self.options.avcodec: - self.cpp_info.components["avdevice"].requires.append("avcodec") - if self.options.swresample: - self.cpp_info.components["avdevice"].requires.append( - "swresample") - if self.options.postproc: - self.cpp_info.components["avdevice"].requires.append( - "postproc") - self._set_component_version("avdevice") - + avdevice = _add_component("avdevice", ["avfilter", "swscale", "avformat", "avcodec", "swresample", "postproc"]) if self.options.avfilter: - self.cpp_info.components["avfilter"].set_property( - "pkg_config_name", "libavfilter") - self.cpp_info.components["avfilter"].libs = ["avfilter"] - self.cpp_info.components["avfilter"].requires = ["avutil"] - if self.options.swscale: - self.cpp_info.components["avfilter"].requires.append("swscale") - if self.options.avformat: - self.cpp_info.components["avfilter"].requires.append( - "avformat") - if self.options.avcodec: - self.cpp_info.components["avfilter"].requires.append("avcodec") - if self.options.swresample: - self.cpp_info.components["avfilter"].requires.append( - "swresample") - if self.options.postproc: - self.cpp_info.components["avfilter"].requires.append( - "postproc") - self._set_component_version("avfilter") - + avfilter = _add_component("avfilter", ["swscale", "avformat", "avcodec", "swresample", "postproc"]) if self.options.avformat: - self.cpp_info.components["avformat"].set_property( - "pkg_config_name", "libavformat") - self.cpp_info.components["avformat"].libs = ["avformat"] - self.cpp_info.components["avformat"].requires = ["avutil"] - if self.options.avcodec: - self.cpp_info.components["avformat"].requires.append("avcodec") - if self.options.swresample: - self.cpp_info.components["avformat"].requires.append( - "swresample") - self._set_component_version("avformat") - + avformat = _add_component("avformat", ["avcodec", "swscale"]) if self.options.avcodec: - self.cpp_info.components["avcodec"].set_property( - "pkg_config_name", "libavcodec") - self.cpp_info.components["avcodec"].libs = ["avcodec"] - self.cpp_info.components["avcodec"].requires = ["avutil"] - if self.options.swresample: - self.cpp_info.components["avcodec"].requires.append( - "swresample") - self._set_component_version("avcodec") - + avcodec = _add_component("avcodec", ["swresample"]) if self.options.swscale: - self.cpp_info.components["swscale"].set_property( - "pkg_config_name", "libswscale") - self.cpp_info.components["swscale"].libs = ["swscale"] - self.cpp_info.components["swscale"].requires = ["avutil"] - self._set_component_version("swscale") - + _add_component("swscale", []) if self.options.swresample: - self.cpp_info.components["swresample"].set_property( - "pkg_config_name", "libswresample") - self.cpp_info.components["swresample"].libs = ["swresample"] - self.cpp_info.components["swresample"].requires = ["avutil"] - self._set_component_version("swresample") - + _add_component("swresample", []) if self.options.postproc: - self.cpp_info.components["postproc"].set_property( - "pkg_config_name", "libpostproc") - self.cpp_info.components["postproc"].libs = ["postproc"] - self.cpp_info.components["postproc"].requires = ["avutil"] - self._set_component_version("postproc") - - self.cpp_info.components["avutil"].set_property( - "pkg_config_name", "libavutil") - self.cpp_info.components["avutil"].libs = ["avutil"] - self._set_component_version("avutil") + _add_component("postproc", []) if self.settings.os in ("FreeBSD", "Linux"): - self.cpp_info.components["avutil"].system_libs = [ - "pthread", "m", "dl"] - if self.options.swresample: - self.cpp_info.components["swresample"].system_libs = ["m"] - if self.options.swscale: - self.cpp_info.components["swscale"].system_libs = ["m"] - if self.options.postproc: - self.cpp_info.components["postproc"].system_libs = ["m"] + avutil.system_libs.extend(["pthread", "dl"]) if self.options.get_safe("fPIC"): if self.settings.compiler in ("gcc", "clang"): # https://trac.ffmpeg.org/ticket/1713 # https://ffmpeg.org/platform.html#Advanced-linking-configuration # https://ffmpeg.org/pipermail/libav-user/2014-December/007719.html - self.cpp_info.components["avcodec"].exelinkflags.append( - "-Wl,-Bsymbolic") - self.cpp_info.components["avcodec"].sharedlinkflags.append( - "-Wl,-Bsymbolic") - if self.options.avformat: - self.cpp_info.components["avformat"].system_libs = ["m"] + avcodec.exelinkflags.append("-Wl,-Bsymbolic") + avcodec.sharedlinkflags.append("-Wl,-Bsymbolic") if self.options.avfilter: - self.cpp_info.components["avfilter"].system_libs = [ - "m", "pthread"] - if self.options.avdevice: - self.cpp_info.components["avdevice"].system_libs = ["m"] + avfilter.system_libs.append("pthread") elif self.settings.os == "Windows": if self.options.avcodec: - self.cpp_info.components["avcodec"].system_libs = ["mfplat", "mfuuid", "strmiids"] + avcodec.system_libs = ["mfplat", "mfuuid", "strmiids"] if self.options.avdevice: - self.cpp_info.components["avdevice"].system_libs = [ - "ole32", "psapi", "strmiids", "uuid", "oleaut32", "shlwapi", "gdi32", "vfw32"] - self.cpp_info.components["avutil"].system_libs = [ - "user32", "bcrypt"] - self.cpp_info.components["avformat"].system_libs = ["secur32"] + avdevice.system_libs = ["ole32", "psapi", "strmiids", "uuid", "oleaut32", "shlwapi", "gdi32", "vfw32"] + avutil.system_libs = ["user32", "bcrypt"] + avformat.system_libs = ["secur32"] elif is_apple_os(self): if self.options.avdevice: - self.cpp_info.components["avdevice"].frameworks = [ - "CoreFoundation", "Foundation", "CoreGraphics"] + avdevice.frameworks = ["CoreFoundation", "Foundation", "CoreGraphics"] if self.options.avfilter: - self.cpp_info.components["avfilter"].frameworks = [ - "CoreGraphics"] + avfilter.frameworks = ["CoreGraphics"] if self.options.avcodec: - self.cpp_info.components["avcodec"].frameworks = [ - "CoreFoundation", "CoreVideo", "CoreMedia"] + avcodec.frameworks = ["CoreFoundation", "CoreVideo", "CoreMedia"] if self.settings.os == "Macos": if self.options.avdevice: - self.cpp_info.components["avdevice"].frameworks.append( - "OpenGL") + avdevice.frameworks.append("OpenGL") if self.options.avfilter: - self.cpp_info.components["avfilter"].frameworks.append( - "OpenGL") + avfilter.frameworks.append("OpenGL") if self.options.avdevice: if self.options.get_safe("with_libalsa"): - self.cpp_info.components["avdevice"].requires.append( - "libalsa::libalsa") + avdevice.requires.append("libalsa::libalsa") if self.options.get_safe("with_xcb"): - self.cpp_info.components["avdevice"].requires.append( - "xorg::xcb") + avdevice.requires.extend(["xorg::xcb", "xorg::xcb-shm", "xorg::xcb-xfixes", "xorg::xcb-shape", "xorg::xv", "xorg::xext"]) + if self.options.get_safe("with_xlib"): + avdevice.requires.extend(["xorg::x11", "xorg::xext", "xorg::xv"]) if self.options.get_safe("with_pulse"): - self.cpp_info.components["avdevice"].requires.append( - "pulseaudio::pulseaudio") + avdevice.requires.append("pulseaudio::pulseaudio") if self.options.get_safe("with_appkit"): - self.cpp_info.components["avdevice"].frameworks.append( - "AppKit") + avdevice.frameworks.append("AppKit") if self.options.get_safe("with_avfoundation"): - self.cpp_info.components["avdevice"].frameworks.append( - "AVFoundation") + avdevice.frameworks.append("AVFoundation") if self.options.get_safe("with_audiotoolbox"): - self.cpp_info.components["avdevice"].frameworks.append( - "CoreAudio") + avdevice.frameworks.append("CoreAudio") + if self.settings.os == "Android" and not self.options.shared: + avdevice.system_libs.extend(["android", "camera2ndk", "mediandk"]) if self.options.avcodec: if self.options.with_zlib: - self.cpp_info.components["avcodec"].requires.append( - "zlib::zlib") + avcodec.requires.append("zlib::zlib") if self.options.with_lzma: - self.cpp_info.components["avcodec"].requires.append( - "xz_utils::xz_utils") + avcodec.requires.append("xz_utils::xz_utils") if self.options.with_libiconv: - self.cpp_info.components["avcodec"].requires.append( - "libiconv::libiconv") + avcodec.requires.append("libiconv::libiconv") if self.options.with_openjpeg: - self.cpp_info.components["avcodec"].requires.append( - "openjpeg::openjpeg") + avcodec.requires.append("openjpeg::openjpeg") if self.options.with_openh264: - self.cpp_info.components["avcodec"].requires.append( - "openh264::openh264") + avcodec.requires.append("openh264::openh264") if self.options.with_vorbis: - self.cpp_info.components["avcodec"].requires.append( - "vorbis::vorbis") + avcodec.requires.append("vorbis::vorbis") if self.options.with_opus: - self.cpp_info.components["avcodec"].requires.append( - "opus::opus") + avcodec.requires.append("opus::opus") if self.options.with_libx264: - self.cpp_info.components["avcodec"].requires.append( - "libx264::libx264") + avcodec.requires.append("libx264::libx264") if self.options.with_libx265: - self.cpp_info.components["avcodec"].requires.append( - "libx265::libx265") + avcodec.requires.append("libx265::libx265") if self.options.with_libvpx: - self.cpp_info.components["avcodec"].requires.append( - "libvpx::libvpx") + avcodec.requires.append("libvpx::libvpx") if self.options.with_libmp3lame: - self.cpp_info.components["avcodec"].requires.append( - "libmp3lame::libmp3lame") - if self.options.with_libfdk_aac: - self.cpp_info.components["avcodec"].requires.append( - "libfdk_aac::libfdk_aac") + avcodec.requires.append("libmp3lame::libmp3lame") + if self.options.get_safe("with_libfdk_aac"): + avcodec.requires.append("libfdk_aac::libfdk_aac") if self.options.with_libwebp: - self.cpp_info.components["avcodec"].requires.append( - "libwebp::libwebp") + avcodec.requires.append("libwebp::libwebp") if self.options.get_safe("with_audiotoolbox"): - self.cpp_info.components["avcodec"].frameworks.append( - "AudioToolbox") + avcodec.frameworks.append("AudioToolbox") if self.options.get_safe("with_videotoolbox"): - self.cpp_info.components["avcodec"].frameworks.append( - "VideoToolbox") + avcodec.frameworks.append("VideoToolbox") if self.options.get_safe("with_libsvtav1"): - self.cpp_info.components["avcodec"].requires.extend( - ["libsvtav1::decoder", "libsvtav1::encoder"]) + avcodec.requires.extend(["libsvtav1::decoder", "libsvtav1::encoder"]) if self.options.get_safe("with_libaom"): - self.cpp_info.components["avcodec"].requires.append( - "libaom-av1::libaom-av1") + avcodec.requires.append("libaom-av1::libaom-av1") if self.options.get_safe("with_libdav1d"): - self.cpp_info.components["avcodec"].requires.append( - "dav1d::dav1d") + avcodec.requires.append("dav1d::dav1d") if self.options.avformat: if self.options.with_bzip2: - self.cpp_info.components["avformat"].requires.append( - "bzip2::bzip2") + avformat.requires.append("bzip2::bzip2") if self.options.with_zeromq: - self.cpp_info.components["avformat"].requires.append( - "zeromq::libzmq") + avformat.requires.append("zeromq::libzmq") if self.options.with_ssl == "openssl": - self.cpp_info.components["avformat"].requires.append( - "openssl::ssl") + avformat.requires.append("openssl::ssl") elif self.options.with_ssl == "securetransport": - self.cpp_info.components["avformat"].frameworks.append( - "Security") + avformat.frameworks.append("Security") if self.options.avfilter: if self.options.with_freetype: - self.cpp_info.components["avfilter"].requires.append( - "freetype::freetype") + avfilter.requires.append("freetype::freetype") if self.options.with_zeromq: - self.cpp_info.components["avfilter"].requires.append( - "zeromq::libzmq") + avfilter.requires.append("zeromq::libzmq") if self.options.get_safe("with_appkit"): - self.cpp_info.components["avfilter"].frameworks.append( - "AppKit") + avfilter.frameworks.append("AppKit") if self.options.get_safe("with_coreimage"): - self.cpp_info.components["avfilter"].frameworks.append( - "CoreImage") + avfilter.frameworks.append("CoreImage") if Version(self.version) >= "5.0" and is_apple_os(self): - self.cpp_info.components["avfilter"].frameworks.append("Metal") + avfilter.frameworks.append("Metal") + if self.options.get_safe("with_libdrm"): + avutil.requires.append("libdrm::libdrm_libdrm") if self.options.get_safe("with_vaapi"): - self.cpp_info.components["avutil"].requires.extend( - ["vaapi::vaapi", "xorg::x11"]) + avutil.requires.append("vaapi::vaapi") + if self.options.get_safe("with_xcb"): + avutil.requires.append("xorg::x11") if self.options.get_safe("with_vdpau"): - self.cpp_info.components["avutil"].requires.append("vdpau::vdpau") + avutil.requires.append("vdpau::vdpau") + + if self.options.with_ssl == "openssl": + avutil.requires.append("openssl::ssl") - if self._version_supports_vulkan and self.options.get_safe("with_vulkan"): - self.cpp_info.components["avutil"].requires.append( - "vulkan-loader::vulkan-loader") + if self.options.get_safe("with_vulkan"): + avutil.requires.append("vulkan-loader::vulkan-loader") diff --git a/recipes/ffmpeg/all/patches/4.2-0001-fix-aom_codec_av1_dx_algo.patch b/recipes/ffmpeg/all/patches/4.2-0001-fix-aom_codec_av1_dx_algo.patch deleted file mode 100644 index 7ed8995ec2e47..0000000000000 --- a/recipes/ffmpeg/all/patches/4.2-0001-fix-aom_codec_av1_dx_algo.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libavcodec/libaomdec.c -+++ b/libavcodec/libaomdec.c -@@ -216,7 +216,7 @@ static av_cold int aom_free(AVCodecContext *avctx) - - static av_cold int av1_init(AVCodecContext *avctx) - { -- return aom_init(avctx, &aom_codec_av1_dx_algo); -+ return aom_init(avctx, aom_codec_av1_dx()); - } - - AVCodec ff_libaom_av1_decoder = { diff --git a/recipes/ffmpeg/all/patches/5.1-0004-fix-binutils.patch b/recipes/ffmpeg/all/patches/5.1-0004-fix-binutils.patch new file mode 100644 index 0000000000000..53a596d0ee7d4 --- /dev/null +++ b/recipes/ffmpeg/all/patches/5.1-0004-fix-binutils.patch @@ -0,0 +1,73 @@ +From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= +Date: Sun, 16 Jul 2023 18:18:02 +0300 +Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift + instructions within inline assembly + +Fixes assembling with binutil as >= 2.41 + +Signed-off-by: James Almer +--- + libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++--- + 1 file changed, 23 insertions(+), 3 deletions(-) + +diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h +index 6298f5ed1983b..ca7e2dffc1076 100644 +--- a/libavcodec/x86/mathops.h ++++ b/libavcodec/x86/mathops.h +@@ -35,12 +35,20 @@ + static av_always_inline av_const int MULL(int a, int b, unsigned shift) + { + int rt, dummy; ++ if (__builtin_constant_p(shift)) + __asm__ ( + "imull %3 \n\t" + "shrdl %4, %%edx, %%eax \n\t" + :"=a"(rt), "=d"(dummy) +- :"a"(a), "rm"(b), "ci"((uint8_t)shift) ++ :"a"(a), "rm"(b), "i"(shift & 0x1F) + ); ++ else ++ __asm__ ( ++ "imull %3 \n\t" ++ "shrdl %4, %%edx, %%eax \n\t" ++ :"=a"(rt), "=d"(dummy) ++ :"a"(a), "rm"(b), "c"((uint8_t)shift) ++ ); + return rt; + } + +@@ -113,19 +121,31 @@ __asm__ volatile(\ + // avoid +32 for shift optimization (gcc should do that ...) + #define NEG_SSR32 NEG_SSR32 + static inline int32_t NEG_SSR32( int32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("sarl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("sarl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + + #define NEG_USR32 NEG_USR32 + static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("shrl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("shrl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + diff --git a/recipes/ffmpeg/config.yml b/recipes/ffmpeg/config.yml index 0ea4ae6cca888..024586b060fe7 100644 --- a/recipes/ffmpeg/config.yml +++ b/recipes/ffmpeg/config.yml @@ -1,25 +1,15 @@ versions: + "7.0.1": + folder: "all" + "6.1.1": + folder: "all" "6.1": folder: "all" "6.0.1": folder: "all" - "6.0": - folder: "all" "5.1.3": folder: "all" - "5.1": - folder: "all" "5.0.3": folder: "all" - "5.0": - folder: "all" "4.4.4": folder: "all" - "4.4.3": - folder: "all" - "4.4": - folder: "all" - "4.3.2": - folder: "all" - "4.2.1": - folder: "all" diff --git a/recipes/fixed_math/all/conandata.yml b/recipes/fixed_math/all/conandata.yml new file mode 100644 index 0000000000000..3e20dff4a8b77 --- /dev/null +++ b/recipes/fixed_math/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.2": + url: "https://github.com/arturbac/fixed_math/archive/refs/tags/v1.0.2.tar.gz" + sha256: "6c87217286e3b93ce5e1fff0bbbb08a9751d04f416cd76ddd5ddd37a8c6772cf" diff --git a/recipes/fixed_math/all/conanfile.py b/recipes/fixed_math/all/conanfile.py new file mode 100644 index 0000000000000..21e92751973d1 --- /dev/null +++ b/recipes/fixed_math/all/conanfile.py @@ -0,0 +1,138 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir +from conan.tools.scm import Version +from conan.tools.layout import basic_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.53.0" + +class FixedMathConan(ConanFile): + name = "fixed_math" + description = "A High-Performance C++17 Library for Fixed-Point 48.16 Arithmetic" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/arturbac/fixed_math/" + topics = ("mathematics", "fixed-point") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "header_only": [True, False], + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "header_only": False, + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "10", # fixed_math requires __has_builtin + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def config_options(self): + if self.settings.os == "Windows": + self.package_type = "static-library" + del self.options.fPIC + + def configure(self): + if self.settings.os == "Windows": + self.options.rm_safe("shared") + if self.options.header_only: + self.options.rm_safe("shared") + self.options.rm_safe("fPIC") + self.package_type = "header-library" + elif self.options.get_safe("shared"): + self.options.rm_safe("fPIC") + + def layout(self): + 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 validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + 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." + ) + + def build_requirements(self): + if not self.options.header_only: + self.tool_requires("cmake/[>=3.21 <4]") + + 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) + if is_msvc(self): + tc.variables["CMAKE_CXX_FLAGS"] = "/Zc:__cplusplus" + tc.generate() + venv = VirtualBuildEnv(self) + venv.generate(scope="build") + + def build(self): + if not self.options.header_only: + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENCE", self.source_folder, os.path.join(self.package_folder, "licenses")) + if not self.options.header_only: + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + else: + copy( + self, + "*.h", + os.path.join(self.source_folder, "fixed_lib", "include", "fixedmath"), + os.path.join(self.package_folder, "include", "fixed_math"), + ) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "fixed_lib", "include", "fixedmath"), + os.path.join(self.package_folder, "include", "fixed_math"), + ) + + def package_info(self): + if self.options.header_only: + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + else: + self.cpp_info.libs = ["fixed_math"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + + self.cpp_info.set_property("cmake_file_name", "fixed_math") + self.cpp_info.set_property("cmake_target_name", "fixed_math::fixed_math") + + if is_msvc(self): + self.cpp_info.cxxflags.append("/Zc:__cplusplus") diff --git a/recipes/fixed_math/all/test_package/CMakeLists.txt b/recipes/fixed_math/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..d63966d4ccdd2 --- /dev/null +++ b/recipes/fixed_math/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(fixed_math REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE fixed_math::fixed_math) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/fixed_math/all/test_package/conanfile.py b/recipes/fixed_math/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/fixed_math/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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 = "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): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/fixed_math/all/test_package/test_package.cpp b/recipes/fixed_math/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..fe7f675d4cade --- /dev/null +++ b/recipes/fixed_math/all/test_package/test_package.cpp @@ -0,0 +1,39 @@ +#include + +#include "fixed_math/fixed_math.hpp" +#include "fixed_math/iostream.h" + +using fixedmath::fixed_t; +using fixedmath::operator ""_fix; + +//fixed and all functionality is constexpr so You can declare constants see features [1] +inline constexpr fixed_t foo_constant{ fixedmath::tan( 15 * fixedmath::phi/180) }; + +constexpr fixed_t my_function( fixed_t value ) { + using namespace fixedmath; + return foo_constant + sin(value) / (1.41_fix - 2*cos(value) / 4); +} + +int main() { + // converting to/from fixed_t + // construction from other arithmetic types is explicit + fixed_t val { 3.14 }; + + //- there is no implicit assignment from other types + float some_float{val}; + fixed_t some_fixed{some_float}; + + some_fixed = fixed_t{some_float}; + + //- converting to other arithmetic types coud be done with static cast and is explicit + double some_double { static_cast(some_fixed) }; + + // for constant values postfix operator _fix may be used + some_fixed = some_float * 2.45_fix; //operation with float is promoted to fixed_t + some_double = 4.15 * some_fixed; //operation with double is promoted to double + + std::cout << some_fixed << '\n'; + std::cout << some_double << '\n'; + + return 0; +} diff --git a/recipes/fixed_math/config.yml b/recipes/fixed_math/config.yml new file mode 100644 index 0000000000000..8457ca9a4a8cd --- /dev/null +++ b/recipes/fixed_math/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.2": + folder: all diff --git a/recipes/flecs/all/conandata.yml b/recipes/flecs/all/conandata.yml index 3094ffc04d061..5e77688b77f2b 100644 --- a/recipes/flecs/all/conandata.yml +++ b/recipes/flecs/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.0": + url: "https://github.com/SanderMertens/flecs/archive/refs/tags/v4.0.0.tar.gz" + sha256: "6c9826c8602f797acd775269d143763adfb3d3a93031cc81bced2b6d267469d2" "3.2.11": url: "https://github.com/SanderMertens/flecs/archive/refs/tags/v3.2.11.tar.gz" sha256: "8ebc5f6f3ec7bbba30b0afe9d22f157437925772857ea1c6e4201eb5d31b4fe5" diff --git a/recipes/flecs/all/conanfile.py b/recipes/flecs/all/conanfile.py index b4d76faa5ed41..772d3a2cb6618 100644 --- a/recipes/flecs/all/conanfile.py +++ b/recipes/flecs/all/conanfile.py @@ -17,6 +17,7 @@ class FlecsConan(ConanFile): homepage = "https://github.com/SanderMertens/flecs" url = "https://github.com/conan-io/conan-center-index" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -53,6 +54,7 @@ def generate(self): else: tc.variables["FLECS_STATIC"] = not self.options.shared tc.variables["FLECS_SHARED"] = self.options.shared + tc.variables["FLECS_TESTS"] = False tc.variables["FLECS_PIC"] = self.options.get_safe("fPIC", True) tc.generate() diff --git a/recipes/flecs/all/test_package/conanfile.py b/recipes/flecs/all/test_package/conanfile.py index 0a6bc68712d90..1a364276dd853 100644 --- a/recipes/flecs/all/test_package/conanfile.py +++ b/recipes/flecs/all/test_package/conanfile.py @@ -1,12 +1,12 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import CMake, cmake_layout +from conan.tools.cmake import CMake, cmake_layout, CMakeToolchain import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def layout(self): @@ -15,6 +15,12 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) + def generate(self): + tc = CMakeToolchain(self) + if self.dependencies[self.tested_reference_str].ref.version < "4.0.0": + tc.preprocessor_definitions["LESS_VERSION_4"] = "1" + tc.generate() + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/flecs/all/test_package/test_package.c b/recipes/flecs/all/test_package/test_package.c index 6b277544863db..9a75f507a8f98 100644 --- a/recipes/flecs/all/test_package/test_package.c +++ b/recipes/flecs/all/test_package/test_package.c @@ -11,8 +11,11 @@ int main() { ecs_world_t *world = ecs_init(); ECS_COMPONENT(world, Position); - +#ifdef LESS_VERSION_4 ecs_entity_t e = ecs_new_id(world); +#else + ecs_entity_t e = ecs_new(world); +#endif ecs_set(world, e, Position, {10.0f, 20.0f}); const char *name = ecs_get_name(world, e); diff --git a/recipes/flecs/all/test_v1_package/CMakeLists.txt b/recipes/flecs/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 0d20897301b68..0000000000000 --- a/recipes/flecs/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/flecs/config.yml b/recipes/flecs/config.yml index 3122441aef13c..c8dc8eaef31be 100644 --- a/recipes/flecs/config.yml +++ b/recipes/flecs/config.yml @@ -1,4 +1,6 @@ versions: + "4.0.0": + folder: all "3.2.11": folder: all "3.2.8": diff --git a/recipes/fmt/all/conandata.yml b/recipes/fmt/all/conandata.yml index 1c4bb54e9bf65..5ec660a369fa8 100644 --- a/recipes/fmt/all/conandata.yml +++ b/recipes/fmt/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "11.0.2": + url: "https://github.com/fmtlib/fmt/releases/download/11.0.2/fmt-11.0.2.zip" + sha256: "40fc58bebcf38c759e11a7bd8fdc163507d2423ef5058bba7f26280c5b9c5465" + "11.0.1": + url: "https://github.com/fmtlib/fmt/releases/download/11.0.1/fmt-11.0.1.zip" + sha256: "62ca45531814109b5d6cef0cf2fd17db92c32a30dd23012976e768c685534814" + "11.0.0": + url: "https://github.com/fmtlib/fmt/releases/download/11.0.0/fmt-11.0.0.zip" + sha256: "583ce480ef07fad76ef86e1e2a639fc231c3daa86c4aa6bcba524ce908f30699" "10.2.1": url: "https://github.com/fmtlib/fmt/releases/download/10.2.1/fmt-10.2.1.zip" sha256: "312151a2d13c8327f5c9c586ac6cf7cddc1658e8f53edae0ec56509c8fa516c9" diff --git a/recipes/fmt/all/conanfile.py b/recipes/fmt/all/conanfile.py index fb9118c45657f..86da321d03862 100644 --- a/recipes/fmt/all/conanfile.py +++ b/recipes/fmt/all/conanfile.py @@ -6,17 +6,18 @@ from conan.tools.layout import basic_layout from conan.tools.build import check_min_cppstd from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc required_conan_version = ">=1.53.0" class FmtConan(ConanFile): name = "fmt" - homepage = "https://github.com/fmtlib/fmt" description = "A safe and fast alternative to printf and IOStreams." - topics = ("format", "iostream", "printf") - url = "https://github.com/conan-io/conan-center-index" license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/fmtlib/fmt" + topics = ("format", "iostream", "printf") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -25,6 +26,7 @@ class FmtConan(ConanFile): "fPIC": [True, False], "with_fmt_alias": [True, False], "with_os_api": [True, False], + "with_unicode": [True, False], } default_options = { "header_only": False, @@ -32,12 +34,17 @@ class FmtConan(ConanFile): "fPIC": True, "with_fmt_alias": False, "with_os_api": True, + "with_unicode": True, } @property def _has_with_os_api_option(self): return Version(self.version) >= "7.0.0" + @property + def _has_with_unicode_option(self): + return Version(self.version) >= "11.0.0" + def export_sources(self): export_conandata_patches(self) @@ -48,6 +55,8 @@ def config_options(self): del self.options.with_os_api elif str(self.settings.os) == "baremetal": self.options.with_os_api = False + if not self._has_with_unicode_option: + del self.options.with_unicode def configure(self): if self.options.header_only: @@ -85,6 +94,8 @@ def generate(self): tc.cache_variables["FMT_LIB_DIR"] = "lib" if self._has_with_os_api_option: tc.cache_variables["FMT_OS"] = bool(self.options.with_os_api) + if self._has_with_unicode_option: + tc.cache_variables["FMT_UNICODE"] = bool(self.options.with_unicode) tc.generate() def build(self): @@ -115,6 +126,9 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", f"fmt::{target}") self.cpp_info.set_property("pkg_config_name", "fmt") + if self.options.get_safe("with_unicode") and is_msvc(self): + self.cpp_info.components["_fmt"].cxxflags.append("/utf-8") + # TODO: back to global scope in conan v2 once cmake_find_package* generators removed if self.options.with_fmt_alias: self.cpp_info.components["_fmt"].defines.append("FMT_STRING_ALIAS=1") @@ -123,7 +137,6 @@ def package_info(self): self.cpp_info.components["_fmt"].defines.append("FMT_HEADER_ONLY=1") self.cpp_info.components["_fmt"].libdirs = [] self.cpp_info.components["_fmt"].bindirs = [] - else: postfix = "d" if self.settings.build_type == "Debug" else "" libname = "fmt" + postfix diff --git a/recipes/fmt/all/test_package/test_package.cpp b/recipes/fmt/all/test_package/test_package.cpp index 736bcb6a40958..c8074af5f8eff 100644 --- a/recipes/fmt/all/test_package/test_package.cpp +++ b/recipes/fmt/all/test_package/test_package.cpp @@ -40,7 +40,6 @@ namespace fmt { int main() { const std::string thing("World"); fmt::print("PRINT: Hello {}!\n", thing); - fmt::printf("PRINTF: Hello, %s!\n", thing); const std::string formatted = fmt::format("{0}{1}{0}", "abra", "cad"); fmt::print("{}\n", formatted); diff --git a/recipes/fmt/config.yml b/recipes/fmt/config.yml index fdd60b40c6f86..22c106719d701 100644 --- a/recipes/fmt/config.yml +++ b/recipes/fmt/config.yml @@ -1,4 +1,10 @@ versions: + "11.0.2": + folder: all + "11.0.1": + folder: all + "11.0.0": + folder: all "10.2.1": folder: all "10.2.0": diff --git a/recipes/folly/all/CMakeLists.txt b/recipes/folly/all/CMakeLists.txt deleted file mode 100644 index 61f3d3b039e2b..0000000000000 --- a/recipes/folly/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory("source_subfolder") diff --git a/recipes/folly/all/conan_deps.cmake b/recipes/folly/all/conan_deps.cmake new file mode 100644 index 0000000000000..075e362b62636 --- /dev/null +++ b/recipes/folly/all/conan_deps.cmake @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.17) +# Set the dependency flags expected by https://github.com/facebook/folly/blob/v2023.12.18.00/CMake/folly-deps.cmake + +macro(custom_find_package package_name variable_prefix) + find_package(${package_name} REQUIRED CONFIG ${ARGN}) + list(APPEND FROM FOUND VERSION VERSION_STRING INCLUDE_DIRS INCLUDE_DIR INCLUDE_DIR LIBRARIES LIBRARIES LIBRARIES DEFINITIONS) + list(APPEND TO FOUND VERSION VERSION_STRING INCLUDE_DIRS INCLUDE_DIR INCLUDE LIB LIBRARY LIBRARIES DEFINITIONS) + + foreach (from_substr to_substr IN ZIP_LISTS FROM TO) + set(src_var ${package_name}_${from_substr}) + set(dst_var ${variable_prefix}_${to_substr}) + if (NOT DEFINED ${src_var}) + continue() + endif() + if ((DEFINED ${dst_var}) AND ("${${dst_var}}" STREQUAL "${${src_var}}")) + # if they're equal, skip + continue() + endif() + message(DEBUG "custom_find_package definining ${dst_var} with ${src_var} contents: ${${src_var}}") + set(${dst_var} ${${src_var}}) + endforeach() +endmacro() + +custom_find_package(BZip2 BZIP2) +custom_find_package(DoubleConversion DOUBLE_CONVERSION REQUIRED) +custom_find_package(Gflags LIBGFLAGS) +custom_find_package(Glog GLOG) +custom_find_package(LZ4 LZ4) +custom_find_package(LibEvent LIBEVENT REQUIRED) +custom_find_package(LibLZMA LIBLZMA) +custom_find_package(Libsodium LIBSODIUM) +custom_find_package(OpenSSL OPENSSL REQUIRED) +custom_find_package(Snappy SNAPPY) +custom_find_package(ZLIB ZLIB) +custom_find_package(Zstd ZSTD) +custom_find_package(fmt FMT REQUIRED) + +if (NOT MSVC) + custom_find_package(LibDwarf LIBDWARF) +endif() +if (UNIX AND NOT APPLE) + custom_find_package(LibUring LIBURING) + custom_find_package(LibUnwind LIBUNWIND) + custom_find_package(Libiberty LIBIBERTY) +endif() \ No newline at end of file diff --git a/recipes/folly/all/conandata.yml b/recipes/folly/all/conandata.yml index 8fcc8945ab40d..a21030554ee04 100644 --- a/recipes/folly/all/conandata.yml +++ b/recipes/folly/all/conandata.yml @@ -1,56 +1,4 @@ sources: - "2019.10.21.00": - url: "https://github.com/facebook/folly/archive/v2019.10.21.00.tar.gz" - sha256: "6efcc2b2090691a9fe3d339c433d102d6399bbdc6dc4893080d59f15f648f393" - "2020.08.10.00": - url: "https://github.com/facebook/folly/archive/v2020.08.10.00.tar.gz" - sha256: "e81140d04a4e89e3f848e528466a9b3d3ae37d7eeb9e65467fca50d70918eef6" - "2022.01.31.00": - url: "https://github.com/facebook/folly/archive/v2022.01.31.00.tar.gz" - sha256: "d764b9a7832d967bb7cfea4bcda15d650315aa4d559fde1da2a52b015cd88b9c" -patches: - "2019.10.21.00": - - patch_file: "patches/0001-find-packages.patch" - base_path: "source_subfolder" - - patch_file: "patches/0002-compiler-flags.patch" - base_path: "source_subfolder" - - patch_file: "patches/0003-boost-shared-ptr.patch" - base_path: "source_subfolder" - - patch_file: "patches/0004-disable-posix-names.patch" - base_path: "source_subfolder" - - patch_file: "patches/0005-include-atomic.patch" - base_path: "source_subfolder" - - patch_file: "patches/0006-duplicate-hash.patch" - base_path: "source_subfolder" - - patch_file: "patches/0007-allow-builtins.patch" - base_path: "source_subfolder" - - patch_file: "patches/0013-include-bit.patch" - base_path: "source_subfolder" - - patch_file: "patches/0020-include-ssizet.patch" - base_path: "source_subfolder" - "2020.08.10.00": - - patch_file: "patches/0008-find-packages.patch" - base_path: "source_subfolder" - - patch_file: "patches/0009-ill-formed-atomic-copy.patch" - base_path: "source_subfolder" - - patch_file: "patches/0010-duplicate-hash.patch" - base_path: "source_subfolder" - - patch_file: "patches/0011-disable-logger-example.patch" - base_path: "source_subfolder" - - patch_file: "patches/0012-compiler-flags.patch" - base_path: "source_subfolder" - - patch_file: "patches/0014-find-librt.patch" - base_path: "source_subfolder" - - patch_file: "patches/0015-benchmark-format-macros.patch" - base_path: "source_subfolder" - "2022.01.31.00": - - patch_file: "patches/0016-find-packages.patch" - base_path: "source_subfolder" - - patch_file: "patches/0017-compiler-flags.patch" - base_path: "source_subfolder" - - patch_file: "patches/0018-find-glog.patch" - base_path: "source_subfolder" - - patch_file: "patches/0019-exclude-example.patch" - base_path: "source_subfolder" - - patch_file: "patches/0022-fix-windows-minmax.patch" - base_path: "source_subfolder" + "2024.08.12.00": + url: "https://github.com/facebook/folly/releases/download/v2024.08.12.00/folly-v2024.08.12.00.tar.gz" + sha256: "18d7be721721db547cb9c5dd5cc50df05cd88b0a8e683e3126ec6f9ce2c41c4d" diff --git a/recipes/folly/all/conanfile.py b/recipes/folly/all/conanfile.py index 06dc6965155a7..7b2eee5c31d02 100755 --- a/recipes/folly/all/conanfile.py +++ b/recipes/folly/all/conanfile.py @@ -1,14 +1,16 @@ -from conan.tools.microsoft import is_msvc, msvc_runtime_flag -from conan.tools.build import can_run -from conan.tools.scm import Version -from conan.tools import files from conan import ConanFile -from conans import CMake, tools from conan.errors import ConanInvalidConfiguration -import functools +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd, cross_building +from conan.tools.env import VirtualBuildEnv +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import get, copy, rmdir, replace_in_file, save, rm +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.scm import Version import os -required_conan_version = ">=1.45.0" + +required_conan_version = ">=1.54.0" class FollyConan(ConanFile): @@ -19,278 +21,263 @@ class FollyConan(ConanFile): homepage = "https://github.com/facebook/folly" license = "Apache-2.0" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - "use_sse4_2" : [True, False], } default_options = { "shared": False, "fPIC": True, - "use_sse4_2" : False } - generators = "cmake", "cmake_find_package" - @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 17 @property - def _minimum_cpp_standard(self): - return 17 if Version(self.version) >= "2022.01.31.00" else 14 - - @property - def _minimum_compilers_version(self): + def _compilers_minimum_version(self): + # https://github.com/facebook/folly/blob/v2024.07.08.00/folly/Portability.h return { - "Visual Studio": "15", - "gcc": "5", - "clang": "6", - "apple-clang": "8", - } if self._minimum_cpp_standard == 14 else { - "gcc": "7", + "gcc": "10", + "clang": "10", + "apple-clang": "14", + "msvc": "192", "Visual Studio": "16", - "clang": "6", - "apple-clang": "10", } def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) - + copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if str(self.settings.arch) not in ['x86', 'x86_64']: - del self.options.use_sse4_2 - def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + if is_msvc(self): + # Folly does not support shared library on Windows: https://github.com/facebook/folly/issues/962 + self.package_type = "static-library" + del self.options.shared + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.78.0") + self.requires("boost/1.85.0", transitive_headers=True, transitive_libs=True) self.requires("bzip2/1.0.8") - self.requires("double-conversion/3.2.0") + self.requires("double-conversion/3.3.0", transitive_headers=True, transitive_libs=True) self.requires("gflags/2.2.2") - self.requires("glog/0.4.0") - self.requires("libevent/2.1.12") - self.requires("openssl/1.1.1q") - self.requires("lz4/1.9.3") - self.requires("snappy/1.1.9") - self.requires("zlib/1.2.12") - self.requires("zstd/1.5.2") + self.requires("glog/0.7.1", transitive_headers=True, transitive_libs=True) + self.requires("libevent/2.1.12", transitive_headers=True, transitive_libs=True) + self.requires("openssl/[>=1.1 <4]") + self.requires("lz4/1.10.0", transitive_libs=True) + self.requires("snappy/1.2.1") + self.requires("zlib/[>=1.2.11 <2]") + self.requires("zstd/1.5.5", transitive_libs=True) if not is_msvc(self): - self.requires("libdwarf/20191104") - self.requires("libsodium/1.0.18") - self.requires("xz_utils/5.2.5") - # FIXME: Causing compilation issues on clang: self.requires("jemalloc/5.2.1") - if self.settings.os == "Linux": + self.requires("libdwarf/0.9.1") + self.requires("libsodium/1.0.19") + self.requires("xz_utils/[>=5.4.5 <6]") + if self.settings.os in ["Linux", "FreeBSD"]: self.requires("libiberty/9.1.0") - self.requires("libunwind/1.5.0") - if Version(self.version) >= "2020.08.10.00": - self.requires("fmt/7.1.3") + self.requires("libunwind/1.8.0") + if self.settings.os == "Linux": + self.requires("liburing/2.6") + # INFO: Folly does not support fmt 11 on MSVC: https://github.com/facebook/folly/issues/2250 + self.requires("fmt/10.2.1", transitive_headers=True, transitive_libs=True) + + def build_requirements(self): + # INFO: Required due ZIP_LISTS CMake feature in conan_deps.cmake + self.tool_requires("cmake/[>=3.17 <4]") @property def _required_boost_components(self): return ["context", "filesystem", "program_options", "regex", "system", "thread"] + @property + def _required_boost_conan_components(self): + return [f"boost::{comp}" for comp in self._required_boost_components] + + @property + def _required_boost_cmake_targets(self): + return [f"Boost::{comp}" for comp in self._required_boost_components] + def validate(self): - if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, self._minimum_cpp_standard) - min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) - if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format(self.name, self.settings.compiler)) - else: - if Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( - self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) - - if Version(self.version) < "2022.01.31.00" and self.settings.os != "Linux": - raise ConanInvalidConfiguration("Conan support for non-Linux platforms starts with Folly version 2022.01.31.00") - - if self.settings.os == "Macos" and self.settings.arch != "x86_64": - raise ConanInvalidConfiguration("Conan currently requires a 64bit target architecture for Folly on Macos") + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + 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.") if self.settings.os == "Windows" and self.settings.arch != "x86_64": - raise ConanInvalidConfiguration("Folly requires a 64bit target architecture on Windows") - - if self.settings.os in ["Macos", "Windows"] and self.options.shared: - raise ConanInvalidConfiguration("Folly could not be built on {} as shared library".format(self.settings.os)) + raise ConanInvalidConfiguration(f"{self.ref} Folly requires a 64bit target architecture on Windows.") - if Version(self.version) == "2020.08.10.00" and self.settings.compiler == "clang" and self.options.shared: - raise ConanInvalidConfiguration("Folly could not be built by clang as a shared library") + if self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "14.0": + # https://github.com/facebook/folly/issues/2266 + raise ConanInvalidConfiguration(f"{self.ref} could not be built by apple-clang < 14.0. Use apple-clang >= 14.0") - if self.options["boost"].header_only: - raise ConanInvalidConfiguration("Folly could not be built with a header only Boost") + boost = self.dependencies["boost"] + if boost.options.header_only: + raise ConanInvalidConfiguration(f"{self.ref} could not be built with a header only Boost. Use -o 'boost/*:header_only=False'") - miss_boost_required_comp = any(getattr(self.options["boost"], "without_{}".format(boost_comp), True) for boost_comp in self._required_boost_components) + miss_boost_required_comp = any(getattr(boost.options, f"without_{boost_comp}", True) for boost_comp in self._required_boost_components) if miss_boost_required_comp: - raise ConanInvalidConfiguration("Folly requires these boost components: {}".format(", ".join(self._required_boost_components))) - - min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) - if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format(self.name, self.settings.compiler)) - else: - if Version(self.settings.compiler.version) < min_version: - raise ConanInvalidConfiguration("{} requires C++{} support. The current compiler {} {} does not support it.".format( - self.name, self._minimum_cpp_standard, self.settings.compiler, self.settings.compiler.version)) - - if self.options.get_safe("use_sse4_2") and str(self.settings.arch) not in ['x86', 'x86_64']: - raise ConanInvalidConfiguration(f"{self.ref} can use the option use_sse4_2 only on x86 and x86_64 archs.") - - # FIXME: Freeze max. CMake version at 3.16.2 to fix the Linux build - def build_requirements(self): - self.build_requires("cmake/3.16.9") + required_components = ", ".join(self._required_boost_components) + raise ConanInvalidConfiguration(f"{self.ref} requires these Boost components: {required_components}. Try with '-o boost/*:without_{required_components}=False'") def source(self): - files.get(self, **self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=False) + + def _cppstd_flag_value(self, cppstd): + if is_msvc(self): + prefix = "c" + year = str(cppstd) + if year > "17": + year = "latest" + return f"{prefix}++{year}" + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = CMakeToolchain(self) + tc.variables["CMAKE_PROJECT_folly_INCLUDE"] = "conan_deps.cmake" + # Folly fails to check Gflags: https://github.com/conan-io/conan/issues/12012 + tc.variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = str(self.settings.build_type) + + if is_apple_os(self) and cross_building(self): + # INFO: Folly fails to configure Mac M1 -> Mac Intel: + # CMake Error: try_run() invoked in cross-compiling mode, please set the following cache variables appropriately: HAVE_VSNPRINTF_ERRORS_EXITCODE (advanced) + for var in ["FOLLY_HAVE_UNALIGNED_ACCESS", "FOLLY_HAVE_LINUX_VDSO", "FOLLY_HAVE_WCHAR_SUPPORT", "HAVE_VSNPRINTF_ERRORS"]: + tc.cache_variables[f"{var}_EXITCODE"] = 0 + + # Folly is not respecting this from the helper https://github.com/conan-io/conan-center-index/pull/15726/files#r1097068754 + tc.cache_variables["CMAKE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) + # Relocatable shared lib on Macos + if is_apple_os(self): + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" + # Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840) + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + # Honor Boost_ROOT set by boost recipe + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0074"] = "NEW" + + + # 2019.10.21.00 -> either MSVC_ flags or CXX_STD + if is_msvc(self): + cxx_std_value = self._cppstd_flag_value(self.settings.get_safe("compiler.cppstd", self._min_cppstd)) + tc.cache_variables["MSVC_LANGUAGE_VERSION"] = cxx_std_value + tc.cache_variables["MSVC_ENABLE_ALL_WARNINGS"] = False + tc.cache_variables["MSVC_USE_STATIC_RUNTIME"] = is_msvc_static_runtime(self) + tc.preprocessor_definitions["NOMINMAX"] = "" + + if not self.dependencies["boost"].options.header_only: + tc.cache_variables["BOOST_LINK_STATIC"] = not self.dependencies["boost"].options.shared + + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0074"] = "NEW" # Honor Boost_ROOT set by boost recipe + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("boost", "cmake_file_name", "Boost") + deps.set_property("bzip2", "cmake_file_name", "BZip2") + deps.set_property("double-conversion", "cmake_file_name", "DoubleConversion") + deps.set_property("fmt", "cmake_file_name", "fmt") + deps.set_property("gflags", "cmake_file_name", "Gflags") + deps.set_property("glog", "cmake_file_name", "Glog") + deps.set_property("libdwarf", "cmake_file_name", "LibDwarf") + deps.set_property("libevent", "cmake_file_name", "LibEvent") + deps.set_property("libiberty", "cmake_file_name", "Libiberty") + deps.set_property("libsodium", "cmake_file_name", "Libsodium") + deps.set_property("libunwind", "cmake_file_name", "LibUnwind") + deps.set_property("liburing", "cmake_file_name", "LibUring") + deps.set_property("lz4", "cmake_file_name", "LZ4") + deps.set_property("openssl", "cmake_file_name", "OpenSSL") + deps.set_property("snappy", "cmake_file_name", "Snappy") + deps.set_property("xz_utils", "cmake_file_name", "LibLZMA") + deps.set_property("zlib", "cmake_file_name", "ZLIB") + deps.set_property("zstd", "cmake_file_name", "Zstd") + deps.generate() + + def _patch_sources(self): + # Make sure will consume Conan dependencies + folly_deps = os.path.join(self.source_folder, "CMake", "folly-deps.cmake") + replace_in_file(self, folly_deps, " MODULE", " REQUIRED CONFIG") + replace_in_file(self, folly_deps, "${Boost_LIBRARIES}", f"{' '.join(self._required_boost_cmake_targets)}") + replace_in_file(self, folly_deps, "OpenSSL 1.1.1", "OpenSSL") + # Disable example + save(self, os.path.join(self.source_folder, "folly", "logging", "example", "CMakeLists.txt"), "") + # Disable custom find modules to use Conan CMakeDeps instead + rm(self, "Find*.cmake", os.path.join(self.source_folder, "CMake")) + rm(self, "Find*.cmake", os.path.join(self.source_folder, "build", "fbcode_builder", "CMake")) + # Skip generating .pc file to avoid Windows errors when trying to compile with pkg-config + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "gen_pkgconfig_vars(FOLLY_PKGCONFIG folly_deps)", "") - @functools.lru_cache(1) - def _configure_cmake(self): + def build(self): + self._patch_sources() cmake = CMake(self) - if can_run(self): - cmake.definitions["FOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE"] = "0" - cmake.definitions["FOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE__TRYRUN_OUTPUT"] = "" - cmake.definitions["FOLLY_HAVE_LINUX_VDSO_EXITCODE"] = "0" - cmake.definitions["FOLLY_HAVE_LINUX_VDSO_EXITCODE__TRYRUN_OUTPUT"] = "" - cmake.definitions["FOLLY_HAVE_WCHAR_SUPPORT_EXITCODE"] = "0" - cmake.definitions["FOLLY_HAVE_WCHAR_SUPPORT_EXITCODE__TRYRUN_OUTPUT"] = "" - cmake.definitions["HAVE_VSNPRINTF_ERRORS_EXITCODE"] = "0" - cmake.definitions["HAVE_VSNPRINTF_ERRORS_EXITCODE__TRYRUN_OUTPUT"] = "" - - if self.options.get_safe("use_sse4_2") and str(self.settings.arch) in ['x86', 'x86_64']: - # in folly, if simd >=sse4.2, we also needs -mfma flag to avoid compiling error. - if not is_msvc(self): - cmake.definitions["CMAKE_C_FLAGS"] = "-mfma" - cmake.definitions["CMAKE_CXX_FLAGS"] = "-mfma" - else: - cmake.definitions["CMAKE_C_FLAGS"] = "/arch:FMA" - cmake.definitions["CMAKE_CXX_FLAGS"] = "/arch:FMA" - - cmake.definitions["CMAKE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) - - cxx_std_flag = tools.cppstd_flag(self.settings) - cxx_std_value = cxx_std_flag.split('=')[1] if cxx_std_flag else "c++{}".format(self._minimum_cpp_standard) - cmake.definitions["CXX_STD"] = cxx_std_value - if is_msvc: - cmake.definitions["MSVC_LANGUAGE_VERSION"] = cxx_std_value - cmake.definitions["MSVC_ENABLE_ALL_WARNINGS"] = False - cmake.definitions["MSVC_USE_STATIC_RUNTIME"] = "MT" in msvc_runtime_flag(self) cmake.configure() - return cmake - - - def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - cmake = self._configure_cmake() cmake.build() def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() - files.rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - files.rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "folly") - self.cpp_info.set_property("cmake_target_name", "Folly::folly") + self.cpp_info.set_property("cmake_target_name", "folly::folly") self.cpp_info.set_property("pkg_config_name", "libfolly") - # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed - if Version(self.version) == "2019.10.21.00": - self.cpp_info.components["libfolly"].libs = [ - "follybenchmark", - "folly_test_util", - "folly" - ] - elif Version(self.version) >= "2020.08.10.00": - if self.settings.os == "Linux": - self.cpp_info.components["libfolly"].libs = [ - "folly_exception_counter", - "folly_exception_tracer", - "folly_exception_tracer_base", - "folly_test_util", - "follybenchmark", - "folly" - ] - else: - self.cpp_info.components["libfolly"].libs = [ - "folly_test_util", - "follybenchmark", - "folly" - ] - - self.cpp_info.components["libfolly"].requires = [ - "boost::boost", - "bzip2::bzip2", + self.cpp_info.components["libfolly"].set_property("cmake_target_name", "Folly::folly") + self.cpp_info.components["libfolly"].set_property("pkg_config_name", "libfolly") + self.cpp_info.components["libfolly"].libs = ["folly"] + self.cpp_info.components["libfolly"].requires = ["fmt::fmt"] + self._required_boost_conan_components + [ "double-conversion::double-conversion", "gflags::gflags", "glog::glog", "libevent::libevent", "lz4::lz4", "openssl::openssl", + "bzip2::bzip2", "snappy::snappy", "zlib::zlib", "zstd::zstd", "libsodium::libsodium", - "xz_utils::xz_utils" + "xz_utils::xz_utils", ] if not is_msvc(self): self.cpp_info.components["libfolly"].requires.append("libdwarf::libdwarf") - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["libfolly"].requires.extend(["libiberty::libiberty", "libunwind::libunwind"]) + if self.settings.os == "Linux": + self.cpp_info.components["libfolly"].requires.append("liburing::liburing") self.cpp_info.components["libfolly"].system_libs.extend(["pthread", "dl", "rt"]) - - if Version(self.version) >= "2020.08.10.00": - self.cpp_info.components["libfolly"].requires.append("fmt::fmt") - if self.settings.os == "Linux": - self.cpp_info.components["libfolly"].defines.extend(["FOLLY_HAVE_ELF", "FOLLY_HAVE_DWARF"]) - + self.cpp_info.components["libfolly"].defines.extend(["FOLLY_HAVE_ELF", "FOLLY_HAVE_DWARF"]) elif self.settings.os == "Windows": self.cpp_info.components["libfolly"].system_libs.extend(["ws2_32", "iphlpapi", "crypt32"]) - if (self.settings.os == "Linux" and self.settings.compiler == "clang" and - self.settings.compiler.libcxx == "libstdc++") or \ - (self.settings.os == "Macos" and self.settings.compiler == "apple-clang" and - Version(self.settings.compiler.version.value) == "9.0" and self.settings.compiler.libcxx == "libc++"): + if self.settings.get_safe("compiler.libcxx") == "libstdc++" or \ + (self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version.value) == "9.0" and \ + self.settings.get_safe("compiler.libcxx") == "libc++"): self.cpp_info.components["libfolly"].system_libs.append("atomic") - if self.settings.os == "Macos" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version.value) >= "11.0": + if self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version.value) >= "11.0": self.cpp_info.components["libfolly"].system_libs.append("c++abi") - if self.options.get_safe("use_sse4_2") and str(self.settings.arch) in ['x86', 'x86_64']: - self.cpp_info.components["libfolly"].defines = ["FOLLY_SSE=4", "FOLLY_SSE_MINOR=2"] - - # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed - self.cpp_info.filenames["cmake_find_package"] = "folly" - self.cpp_info.filenames["cmake_find_package_multi"] = "folly" - self.cpp_info.names["cmake_find_package"] = "Folly" - self.cpp_info.names["cmake_find_package_multi"] = "Folly" - self.cpp_info.names["pkg_config"] = "libfolly" - self.cpp_info.components["libfolly"].names["cmake_find_package"] = "folly" - self.cpp_info.components["libfolly"].names["cmake_find_package_multi"] = "folly" - self.cpp_info.components["libfolly"].set_property("cmake_target_name", "Folly::folly") - self.cpp_info.components["libfolly"].set_property("pkg_config_name", "libfolly") - - if Version(self.version) >= "2019.10.21.00": - self.cpp_info.components["follybenchmark"].set_property("cmake_target_name", "Folly::follybenchmark") - self.cpp_info.components["follybenchmark"].set_property("pkg_config_name", "libfollybenchmark") - self.cpp_info.components["follybenchmark"].libs = ["follybenchmark"] - self.cpp_info.components["follybenchmark"].requires = ["libfolly"] + self.cpp_info.components["follybenchmark"].set_property("cmake_target_name", "Folly::follybenchmark") + self.cpp_info.components["follybenchmark"].set_property("pkg_config_name", "libfollybenchmark") + self.cpp_info.components["follybenchmark"].libs = ["follybenchmark"] + self.cpp_info.components["follybenchmark"].requires = ["libfolly"] - self.cpp_info.components["folly_test_util"].set_property("cmake_target_name", "Folly::folly_test_util") - self.cpp_info.components["folly_test_util"].set_property("pkg_config_name", "libfolly_test_util") - self.cpp_info.components["folly_test_util"].libs = ["folly_test_util"] - self.cpp_info.components["folly_test_util"].requires = ["libfolly"] + self.cpp_info.components["folly_test_util"].set_property("cmake_target_name", "Folly::folly_test_util") + self.cpp_info.components["folly_test_util"].set_property("pkg_config_name", "libfolly_test_util") + self.cpp_info.components["folly_test_util"].libs = ["folly_test_util"] + self.cpp_info.components["folly_test_util"].requires = ["libfolly"] - if Version(self.version) >= "2020.08.10.00" and self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["folly_exception_tracer_base"].set_property("cmake_target_name", "Folly::folly_exception_tracer_base") self.cpp_info.components["folly_exception_tracer_base"].set_property("pkg_config_name", "libfolly_exception_tracer_base") self.cpp_info.components["folly_exception_tracer_base"].libs = ["folly_exception_tracer_base"] @@ -305,3 +292,26 @@ def package_info(self): self.cpp_info.components["folly_exception_counter"].set_property("pkg_config_name", "libfolly_exception_counter") self.cpp_info.components["folly_exception_counter"].libs = ["folly_exception_counter"] self.cpp_info.components["folly_exception_counter"].requires = ["folly_exception_tracer"] + + # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed + self.cpp_info.filenames["cmake_find_package"] = "folly" + self.cpp_info.filenames["cmake_find_package_multi"] = "folly" + self.cpp_info.names["cmake_find_package"] = "Folly" + self.cpp_info.names["cmake_find_package_multi"] = "Folly" + self.cpp_info.components["libfolly"].names["cmake_find_package"] = "folly" + self.cpp_info.components["libfolly"].names["cmake_find_package_multi"] = "folly" + + # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed + self.cpp_info.components["follybenchmark"].names["cmake_find_package"] = "follybenchmark" + self.cpp_info.components["follybenchmark"].names["cmake_find_package_multi"] = "follybenchmark" + self.cpp_info.components["folly_test_util"].names["cmake_find_package"] = "folly_test_util" + self.cpp_info.components["folly_test_util"].names["cmake_find_package_multi"] = "folly_test_util" + + if self.settings.os in ["Linux", "FreeBSD"]: + # TODO: to remove in conan v2 once cmake_find_package_* & pkg_config generators removed + self.cpp_info.components["folly_exception_tracer_base"].names["cmake_find_package"] = "folly_exception_tracer_base" + self.cpp_info.components["folly_exception_tracer_base"].names["cmake_find_package_multi"] = "folly_exception_tracer_base" + self.cpp_info.components["folly_exception_tracer"].names["cmake_find_package"] = "folly_exception_tracer" + self.cpp_info.components["folly_exception_tracer"].names["cmake_find_package_multi"] = "folly_exception_tracer" + self.cpp_info.components["folly_exception_counter"].names["cmake_find_package"] = "folly_exception_counter" + self.cpp_info.components["folly_exception_counter"].names["cmake_find_package_multi"] = "folly_exception_counter" diff --git a/recipes/folly/all/patches/0001-find-packages.patch b/recipes/folly/all/patches/0001-find-packages.patch deleted file mode 100644 index 4cee77cd34c1c..0000000000000 --- a/recipes/folly/all/patches/0001-find-packages.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff --git a/CMake/FindLibsodium.cmake b/CMake/FindLibsodium.cmake -index 18d4d0c..2b3cd2a 100644 ---- a/CMake/FindLibsodium.cmake -+++ b/CMake/FindLibsodium.cmake -@@ -15,7 +15,7 @@ - find_path(LIBSODIUM_INCLUDE_DIR NAMES sodium.h) - mark_as_advanced(LIBSODIUM_INCLUDE_DIR) - --find_library(LIBSODIUM_LIBRARY NAMES sodium) -+find_library(LIBSODIUM_LIBRARY NAMES sodium libsodium PATHS ${CONAN_LIBSODIUM_ROOT}) - mark_as_advanced(LIBSODIUM_LIBRARY) - - include(FindPackageHandleStandardArgs) -diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index 048e1cd..da3ab8e 100644 ---- a/CMake/folly-deps.cmake -+++ b/CMake/folly-deps.cmake -@@ -36,19 +36,19 @@ find_package(DoubleConversion MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) - --find_package(Gflags MODULE) --set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND}) --list(APPEND FOLLY_LINK_LIBRARIES ${LIBGFLAGS_LIBRARY}) --list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBGFLAGS_INCLUDE_DIR}) --list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBGFLAGS_LIBRARY}) --list(APPEND CMAKE_REQUIRED_INCLUDES ${LIBGFLAGS_INCLUDE_DIR}) -- --find_package(Glog MODULE) -+find_package(gflags MODULE REQUIRED) -+set(FOLLY_HAVE_LIBGFLAGS ${GFLAGS_FOUND}) -+list(APPEND FOLLY_LINK_LIBRARIES ${CONAN_LIBS_GFLAGS}) -+list(APPEND FOLLY_INCLUDE_DIRECTORIES ${CONAN_INCLUDE_DIRS_GFLAGS}) -+list(APPEND CMAKE_REQUIRED_LIBRARIES ${gflags_LIBRARY}) -+list(APPEND CMAKE_REQUIRED_INCLUDES ${gflags_INCLUDE_DIR}) -+ -+find_package(glog MODULE) - set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND}) - list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR}) - --find_package(LibEvent MODULE REQUIRED) -+find_package(Libevent MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBEVENT_LIB}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR}) - -diff --git a/build/fbcode_builder/CMake/FindGflags.cmake b/build/fbcode_builder/CMake/FindGflags.cmake -index 246ceac..385605e 100644 ---- a/build/fbcode_builder/CMake/FindGflags.cmake -+++ b/build/fbcode_builder/CMake/FindGflags.cmake -@@ -48,8 +48,13 @@ if (gflags_FOUND) - else() - FIND_PATH(LIBGFLAGS_INCLUDE_DIR gflags/gflags.h) - -- FIND_LIBRARY(LIBGFLAGS_LIBRARY_DEBUG NAMES gflagsd gflags_staticd) -- FIND_LIBRARY(LIBGFLAGS_LIBRARY_RELEASE NAMES gflags gflags_static) -+ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") -+ FIND_LIBRARY(LIBGFLAGS_LIBRARY_DEBUG NAMES gflagsd gflags_nothreads_staticd gflags_nothreads_static_debug PATHS ${CONAN_GFLAGS_ROOT}) -+ FIND_LIBRARY(LIBGFLAGS_LIBRARY_RELEASE NAMES gflags gflags_nothreads_static PATHS ${CONAN_GFLAGS_ROOT}) -+ else() -+ FIND_LIBRARY(LIBGFLAGS_LIBRARY_DEBUG NAMES gflags gflags_nothreads_debug PATHS ${CONAN_GFLAGS_ROOT}) -+ FIND_LIBRARY(LIBGFLAGS_LIBRARY_RELEASE NAMES gflags_nothreads gflags PATHS ${CONAN_GFLAGS_ROOT}) -+ endif() - - INCLUDE(SelectLibraryConfigurations) - SELECT_LIBRARY_CONFIGURATIONS(LIBGFLAGS) -diff --git a/build/fbcode_builder/CMake/FindGlog.cmake b/build/fbcode_builder/CMake/FindGlog.cmake -index a589b2e..15aef75 100644 ---- a/build/fbcode_builder/CMake/FindGlog.cmake -+++ b/build/fbcode_builder/CMake/FindGlog.cmake -@@ -8,8 +8,7 @@ - - include(FindPackageHandleStandardArgs) - --find_library(GLOG_LIBRARY glog -- PATHS ${GLOG_LIBRARYDIR}) -+find_library(GLOG_LIBRARY glog glogd PATHS ${CONAN_GLOG_ROOT}) - - find_path(GLOG_INCLUDE_DIR glog/logging.h - PATHS ${GLOG_INCLUDEDIR}) -diff --git a/build/fbcode_builder/CMake/FindLibEvent.cmake b/build/fbcode_builder/CMake/FindLibEvent.cmake -index dd11ebd..9ef0807 100644 ---- a/build/fbcode_builder/CMake/FindLibEvent.cmake -+++ b/build/fbcode_builder/CMake/FindLibEvent.cmake -@@ -50,7 +50,7 @@ if (TARGET event) - endif() - else() - find_path(LIBEVENT_INCLUDE_DIR event.h PATHS ${LibEvent_INCLUDE_PATHS}) -- find_library(LIBEVENT_LIB NAMES event PATHS ${LibEvent_LIB_PATHS}) -+ find_library(LIBEVENT_LIB NAMES event libevent PATHS ${CONAN_LIBEVENT_ROOT}) - - if (LIBEVENT_LIB AND LIBEVENT_INCLUDE_DIR) - set(LibEvent_FOUND TRUE) diff --git a/recipes/folly/all/patches/0002-compiler-flags.patch b/recipes/folly/all/patches/0002-compiler-flags.patch deleted file mode 100644 index b9213ff6d4895..0000000000000 --- a/recipes/folly/all/patches/0002-compiler-flags.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/CMake/FollyCompilerUnix.cmake b/CMake/FollyCompilerUnix.cmake -index 7fba75f..019d30f 100644 ---- a/CMake/FollyCompilerUnix.cmake -+++ b/CMake/FollyCompilerUnix.cmake -@@ -28,9 +28,9 @@ set( - ) - mark_as_advanced(CXX_STD) - --set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra") -+set(CMAKE_CXX_FLAGS_COMMON "-Wall -Wextra") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_COMMON}") --set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON} -O3") -+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON}") - - # Note that CMAKE_REQUIRED_FLAGS must be a string, not a list - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=${CXX_STD}") -@@ -44,7 +44,6 @@ function(apply_folly_compile_options_to_target THETARGET) - ) - target_compile_options(${THETARGET} - PRIVATE -- -g - -std=${CXX_STD} - -finput-charset=UTF-8 - -fsigned-char diff --git a/recipes/folly/all/patches/0003-boost-shared-ptr.patch b/recipes/folly/all/patches/0003-boost-shared-ptr.patch deleted file mode 100644 index 7608d6b2e9e2b..0000000000000 --- a/recipes/folly/all/patches/0003-boost-shared-ptr.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/folly/portability/PThread.cpp b/folly/portability/PThread.cpp -index f8cd6d4..0908668 100644 ---- a/folly/portability/PThread.cpp -+++ b/folly/portability/PThread.cpp -@@ -18,7 +18,9 @@ - - #if !FOLLY_HAVE_PTHREAD && defined(_WIN32) - #include // @manual -- -+#include -+#include -+#include - #include - - #include -@@ -683,7 +685,7 @@ int pthread_setspecific(pthread_key_t key, const void* value) { - // function, which we don't want to do. - boost::detail::set_tss_data( - realKey, -- boost::shared_ptr(), -+ 0,0, - const_cast(value), - false); - return 0; diff --git a/recipes/folly/all/patches/0004-disable-posix-names.patch b/recipes/folly/all/patches/0004-disable-posix-names.patch deleted file mode 100644 index 9efd4e24140e1..0000000000000 --- a/recipes/folly/all/patches/0004-disable-posix-names.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/folly/portability/Windows.h b/folly/portability/Windows.h -index f7990ca..b22fac5 100644 ---- a/folly/portability/Windows.h -+++ b/folly/portability/Windows.h -@@ -26,16 +26,12 @@ - // These have to be this way because we define our own versions - // of close(), because the normal Windows versions don't handle - // sockets at all. --#ifndef __STDC__ --/* nolint */ --#define __STDC__ 1 --#include // @manual nolint --#include // @manual nolint --#undef __STDC__ --#else --#include // @manual nolint --#include // @manual nolint --#endif -+#include -+#pragma push_macro("_CRT_INTERNAL_NONSTDC_NAMES") -+#define _CRT_INTERNAL_NONSTDC_NAMES 0 -+#include -+#include -+#pragma pop_macro("_CRT_INTERNAL_NONSTDC_NAMES") - - #if defined(min) || defined(max) - #error Windows.h needs to be included by this header, or else NOMINMAX needs \ diff --git a/recipes/folly/all/patches/0005-include-atomic.patch b/recipes/folly/all/patches/0005-include-atomic.patch deleted file mode 100644 index 0eb9382e49a9d..0000000000000 --- a/recipes/folly/all/patches/0005-include-atomic.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/portability/PThread.cpp b/folly/portability/PThread.cpp -index 2891c4c..7c98975 100644 ---- a/folly/portability/PThread.cpp -+++ b/folly/portability/PThread.cpp -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - - #include - #include diff --git a/recipes/folly/all/patches/0006-duplicate-hash.patch b/recipes/folly/all/patches/0006-duplicate-hash.patch deleted file mode 100644 index f8905d003157e..0000000000000 --- a/recipes/folly/all/patches/0006-duplicate-hash.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/folly/hash/Hash.h b/folly/hash/Hash.h -index 33fa553..4266cf1 100644 ---- a/folly/hash/Hash.h -+++ b/folly/hash/Hash.h -@@ -730,7 +730,7 @@ struct TupleHasher<0, Ts...> { - - // Custom hash functions. - namespace std { --#if FOLLY_SUPPLY_MISSING_INT128_TRAITS -+#if 0 - template <> - struct hash<__int128> : folly::detail::integral_hasher<__int128> {}; - diff --git a/recipes/folly/all/patches/0007-allow-builtins.patch b/recipes/folly/all/patches/0007-allow-builtins.patch deleted file mode 100644 index de09722f02acc..0000000000000 --- a/recipes/folly/all/patches/0007-allow-builtins.patch +++ /dev/null @@ -1,128 +0,0 @@ -diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h -index 971cb8819..e68de4456 100644 ---- a/folly/portability/Builtins.h -+++ b/folly/portability/Builtins.h -@@ -41,7 +41,6 @@ FOLLY_ALWAYS_INLINE void __builtin___clear_cache(char* begin, char* end) { - } - } - --#if !defined(_MSC_VER) || (_MSC_VER < 1923) - FOLLY_ALWAYS_INLINE int __builtin_clz(unsigned int x) { - unsigned long index; - return int(_BitScanReverse(&index, (unsigned long)x) ? 31 - index : 32); -@@ -93,7 +92,6 @@ FOLLY_ALWAYS_INLINE int __builtin_ctzll(unsigned long long x) { - return int(_BitScanForward64(&index, x) ? index : 64); - } - #endif --#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) - - FOLLY_ALWAYS_INLINE int __builtin_ffs(int x) { - unsigned long index; -@@ -119,15 +117,12 @@ FOLLY_ALWAYS_INLINE int __builtin_popcount(unsigned int x) { - return int(__popcnt(x)); - } - --#if !defined(_MSC_VER) || (_MSC_VER < 1923) - FOLLY_ALWAYS_INLINE int __builtin_popcountl(unsigned long x) { - static_assert(sizeof(x) == 4, ""); - return int(__popcnt(x)); - } --#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) - #endif - --#if !defined(_MSC_VER) || (_MSC_VER < 1923) - #if defined(_M_IX86) - FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { - return int(__popcnt((unsigned int)(x >> 32))) + -@@ -138,7 +133,6 @@ FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { - return int(__popcnt64(x)); - } - #endif --#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) - - FOLLY_ALWAYS_INLINE void* __builtin_return_address(unsigned int frame) { - // I really hope frame is zero... --- - -diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h -index e68de4456..30caf4003 100644 ---- a/folly/portability/Builtins.h -+++ b/folly/portability/Builtins.h -@@ -16,7 +16,7 @@ - - #pragma once - --#if defined(_WIN32) && !defined(__clang__) -+#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__clang__) - #include - #include - #include --- -see https://github.com/facebook/folly/issues/1412 -diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h -index 30caf4003..e8ef97266 100644 ---- a/folly/portability/Builtins.h -+++ b/folly/portability/Builtins.h -@@ -22,6 +22,14 @@ - #include - #include - -+// MSVC had added support for __builtin_clz etc. in 16.3 (1923) but it will be -+// removed in 16.8 (1928). -+#if (_MSC_VER >= 1923) && (_MSC_VER < 1928) -+#define FOLLY_DETAILFOLLY_DETAIL_MSC_BUILTIN_SUPPORT 1 -+#else -+#define FOLLY_DETAILFOLLY_DETAIL_MSC_BUILTIN_SUPPORT 0 -+#endif -+ - namespace folly { - namespace portability { - namespace detail { -@@ -41,6 +49,7 @@ FOLLY_ALWAYS_INLINE void __builtin___clear_cache(char* begin, char* end) { - } - } - -+#if !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - FOLLY_ALWAYS_INLINE int __builtin_clz(unsigned int x) { - unsigned long index; - return int(_BitScanReverse(&index, (unsigned long)x) ? 31 - index : 32); -@@ -92,6 +101,7 @@ FOLLY_ALWAYS_INLINE int __builtin_ctzll(unsigned long long x) { - return int(_BitScanForward64(&index, x) ? index : 64); - } - #endif -+#endif // !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - - FOLLY_ALWAYS_INLINE int __builtin_ffs(int x) { - unsigned long index; -@@ -117,12 +127,15 @@ FOLLY_ALWAYS_INLINE int __builtin_popcount(unsigned int x) { - return int(__popcnt(x)); - } - -+#if !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - FOLLY_ALWAYS_INLINE int __builtin_popcountl(unsigned long x) { - static_assert(sizeof(x) == 4, ""); - return int(__popcnt(x)); - } -+#endif // !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - #endif - -+#if !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - #if defined(_M_IX86) - FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { - return int(__popcnt((unsigned int)(x >> 32))) + -@@ -133,6 +146,7 @@ FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { - return int(__popcnt64(x)); - } - #endif -+#endif // !defined(_MSC_VER) || !defined(FOLLY_DETAIL_MSC_BUILTIN_SUPPORT) - - FOLLY_ALWAYS_INLINE void* __builtin_return_address(unsigned int frame) { - // I really hope frame is zero... -@@ -141,3 +155,5 @@ FOLLY_ALWAYS_INLINE void* __builtin_return_address(unsigned int frame) { - return _ReturnAddress(); - } - #endif -+ -+#undef FOLLY_DETAIL_MSC_BUILTIN_SUPPORT --- - diff --git a/recipes/folly/all/patches/0008-find-packages.patch b/recipes/folly/all/patches/0008-find-packages.patch deleted file mode 100644 index 3329a68425e3b..0000000000000 --- a/recipes/folly/all/patches/0008-find-packages.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index 3169b972d52..23dc6d509b1 100644 ---- a/CMake/folly-deps.cmake -+++ b/CMake/folly-deps.cmake -@@ -46,11 +46,11 @@ find_package(Boost 1.51.0 MODULE - list(APPEND FOLLY_LINK_LIBRARIES ${Boost_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS}) - --find_package(DoubleConversion MODULE REQUIRED) -+find_package(double-conversion MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) - --find_package(Gflags MODULE) -+find_package(gflags MODULE) - set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND}) - if(LIBGFLAGS_FOUND) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBGFLAGS_LIBRARY}) -@@ -59,12 +59,12 @@ if(LIBGFLAGS_FOUND) - list(APPEND CMAKE_REQUIRED_INCLUDES ${LIBGFLAGS_INCLUDE_DIR}) - endif() - --find_package(Glog MODULE) -+find_package(glog MODULE) - set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND}) - list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR}) - --find_package(LibEvent MODULE REQUIRED) -+find_package(Libevent MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBEVENT_LIB}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR}) - -@@ -96,14 +96,14 @@ if (LIBLZMA_FOUND) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBLZMA_LIBRARIES}) - endif() - --find_package(LZ4 MODULE) -+find_package(lz4 MODULE) - set(FOLLY_HAVE_LIBLZ4 ${LZ4_FOUND}) - if (LZ4_FOUND) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LZ4_INCLUDE_DIR}) - list(APPEND FOLLY_LINK_LIBRARIES ${LZ4_LIBRARY}) - endif() - --find_package(Zstd MODULE) -+find_package(zstd MODULE) - set(FOLLY_HAVE_LIBZSTD ${ZSTD_FOUND}) - if(ZSTD_FOUND) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${ZSTD_INCLUDE_DIR}) -@@ -117,11 +117,11 @@ if (SNAPPY_FOUND) - list(APPEND FOLLY_LINK_LIBRARIES ${SNAPPY_LIBRARY}) - endif() - --find_package(LibDwarf) -+find_package(libdwarf) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBDWARF_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBDWARF_INCLUDE_DIRS}) - --find_package(Libiberty) -+find_package(libiberty) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBIBERTY_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBIBERTY_INCLUDE_DIRS}) - -@@ -133,7 +133,7 @@ find_package(LibUring) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBURING_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBURING_INCLUDE_DIRS}) - --find_package(Libsodium) -+find_package(libsodium) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBSODIUM_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBSODIUM_INCLUDE_DIRS}) - diff --git a/recipes/folly/all/patches/0009-ill-formed-atomic-copy.patch b/recipes/folly/all/patches/0009-ill-formed-atomic-copy.patch deleted file mode 100644 index 58f95224f3873..0000000000000 --- a/recipes/folly/all/patches/0009-ill-formed-atomic-copy.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/folly/fibers/SemaphoreBase.cpp b/folly/fibers/SemaphoreBase.cpp -index 06e9ecc7111..77e2da75c18 100644 ---- a/folly/fibers/SemaphoreBase.cpp -+++ b/folly/fibers/SemaphoreBase.cpp -@@ -170,7 +170,7 @@ namespace { - class FutureWaiter final : public fibers::Baton::Waiter { - public: - explicit FutureWaiter(int64_t tokens) -- : semaphoreWaiter(SemaphoreBase::Waiter(tokens)) { -+ : semaphoreWaiter(tokens) { - semaphoreWaiter.baton.setWaiter(*this); - } - diff --git a/recipes/folly/all/patches/0010-duplicate-hash.patch b/recipes/folly/all/patches/0010-duplicate-hash.patch deleted file mode 100644 index 69268c6acf6f6..0000000000000 --- a/recipes/folly/all/patches/0010-duplicate-hash.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/folly/hash/Hash.h b/folly/hash/Hash.h -index a8a50e8e8dc..d7a3da8e61f 100644 ---- a/folly/hash/Hash.h -+++ b/folly/hash/Hash.h -@@ -733,7 +733,7 @@ struct TupleHasher<0, Ts...> { - - // Custom hash functions. - namespace std { --#if FOLLY_SUPPLY_MISSING_INT128_TRAITS -+#if 0 - template <> - struct hash<__int128> : folly::detail::integral_hasher<__int128> {}; - diff --git a/recipes/folly/all/patches/0011-disable-logger-example.patch b/recipes/folly/all/patches/0011-disable-logger-example.patch deleted file mode 100644 index fa20905367fb1..0000000000000 --- a/recipes/folly/all/patches/0011-disable-logger-example.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/CMakeLists.txt b/folly/CMakeLists.txt -index 08de7daf20f..cdc1f03bf46 100644 ---- a/folly/CMakeLists.txt -+++ b/folly/CMakeLists.txt -@@ -27,7 +27,6 @@ install( - ) - - add_subdirectory(experimental/exception_tracer) --add_subdirectory(logging/example) - - if (PYTHON_EXTENSIONS) - # Create tree of symbolic links in structure required for successful diff --git a/recipes/folly/all/patches/0012-compiler-flags.patch b/recipes/folly/all/patches/0012-compiler-flags.patch deleted file mode 100644 index 358500a1800cd..0000000000000 --- a/recipes/folly/all/patches/0012-compiler-flags.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/CMake/FollyCompilerUnix.cmake b/CMake/FollyCompilerUnix.cmake -index 8dcaf141a3a..200fe8d3798 100644 ---- a/CMake/FollyCompilerUnix.cmake -+++ b/CMake/FollyCompilerUnix.cmake -@@ -28,9 +28,9 @@ set( - ) - mark_as_advanced(CXX_STD) - --set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra") -+set(CMAKE_CXX_FLAGS_COMMON "-Wall -Wextra") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_COMMON}") --set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON} -O3") -+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON}") - - # Note that CMAKE_REQUIRED_FLAGS must be a string, not a list - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=${CXX_STD}") -@@ -43,7 +43,6 @@ function(apply_folly_compile_options_to_target THETARGET) - ) - target_compile_options(${THETARGET} - PRIVATE -- -g - -std=${CXX_STD} - -finput-charset=UTF-8 - -fsigned-char diff --git a/recipes/folly/all/patches/0013-include-bit.patch b/recipes/folly/all/patches/0013-include-bit.patch deleted file mode 100644 index 1a8ac249a146b..0000000000000 --- a/recipes/folly/all/patches/0013-include-bit.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/folly/lang/Bits.h -+++ b/folly/lang/Bits.h -@@ -64,6 +64,10 @@ - #include - #include - -+#if __has_include() && __cpp_lib_bit_cast -+#include -+#endif -+ - namespace folly { - - #if __cpp_lib_bit_cast diff --git a/recipes/folly/all/patches/0014-find-librt.patch b/recipes/folly/all/patches/0014-find-librt.patch deleted file mode 100644 index 90a1f0f7b9ada..0000000000000 --- a/recipes/folly/all/patches/0014-find-librt.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/CMake/FollyConfigChecks.cmake b/CMake/FollyConfigChecks.cmake -index 6b8b308c7..908d72d51 100644 ---- a/CMake/FollyConfigChecks.cmake -+++ b/CMake/FollyConfigChecks.cmake -@@ -83,6 +83,13 @@ string(REGEX REPLACE - CMAKE_REQUIRED_FLAGS - "${CMAKE_REQUIRED_FLAGS}") - -+if (CMAKE_SYSTEM_NAME STREQUAL "Linux") -+ find_library(LIBRT rt) -+ if (LIBRT) -+ list(APPEND CMAKE_REQUIRED_LIBRARIES "rt") -+ endif() -+endif() -+ - check_symbol_exists(pthread_atfork pthread.h FOLLY_HAVE_PTHREAD_ATFORK) - - # Unfortunately check_symbol_exists() does not work for memrchr(): diff --git a/recipes/folly/all/patches/0015-benchmark-format-macros.patch b/recipes/folly/all/patches/0015-benchmark-format-macros.patch deleted file mode 100644 index 14f8b2088a1b3..0000000000000 --- a/recipes/folly/all/patches/0015-benchmark-format-macros.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/folly/Benchmark.cpp b/folly/Benchmark.cpp -index 389ee46a1..390b7674b 100644 ---- a/folly/Benchmark.cpp -+++ b/folly/Benchmark.cpp -@@ -16,6 +16,10 @@ - - // @author Andrei Alexandrescu (andrei.alexandrescu@fb.com) - -+#ifndef __STDC_FORMAT_MACROS -+#define __STDC_FORMAT_MACROS 1 -+#endif -+ - #include - - #include diff --git a/recipes/folly/all/patches/0016-find-packages.patch b/recipes/folly/all/patches/0016-find-packages.patch deleted file mode 100644 index c6cd14fad52c9..0000000000000 --- a/recipes/folly/all/patches/0016-find-packages.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index 9c9d9ea60..e78611542 100644 ---- a/CMake/folly-deps.cmake -+++ b/CMake/folly-deps.cmake -@@ -48,25 +48,25 @@ find_package(Boost 1.51.0 MODULE - list(APPEND FOLLY_LINK_LIBRARIES ${Boost_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS}) - --find_package(DoubleConversion MODULE REQUIRED) -+find_package(double-conversion MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) - --find_package(Gflags MODULE) --set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND}) --if(LIBGFLAGS_FOUND) -- list(APPEND FOLLY_LINK_LIBRARIES ${LIBGFLAGS_LIBRARY}) -- list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBGFLAGS_INCLUDE_DIR}) -- set(FOLLY_LIBGFLAGS_LIBRARY ${LIBGFLAGS_LIBRARY}) -- set(FOLLY_LIBGFLAGS_INCLUDE ${LIBGFLAGS_INCLUDE_DIR}) -+find_package(gflags MODULE) -+set(FOLLY_HAVE_LIBGFLAGS ${gflags_FOUND}) -+if(gflags_FOUND) -+ list(APPEND FOLLY_LINK_LIBRARIES ${gflags_LIBRARIES}) -+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${gflags_INCLUDE_DIRS}) -+ set(FOLLY_LIBGFLAGS_LIBRARY ${gflags_LIBRARIES}) -+ set(FOLLY_LIBGFLAGS_INCLUDE ${gflags_INCLUDE_DIRS}) - endif() - --find_package(Glog MODULE) -+find_package(glog MODULE) - set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND}) - list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR}) - --find_package(LibEvent MODULE REQUIRED) -+find_package(Libevent MODULE REQUIRED) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBEVENT_LIB}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR}) - -@@ -104,14 +104,14 @@ if (LIBLZMA_FOUND) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBLZMA_LIBRARIES}) - endif() - --find_package(LZ4 MODULE) -+find_package(lz4 MODULE) - set(FOLLY_HAVE_LIBLZ4 ${LZ4_FOUND}) - if (LZ4_FOUND) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LZ4_INCLUDE_DIR}) - list(APPEND FOLLY_LINK_LIBRARIES ${LZ4_LIBRARY}) - endif() - --find_package(Zstd MODULE) -+find_package(zstd MODULE) - set(FOLLY_HAVE_LIBZSTD ${ZSTD_FOUND}) - if(ZSTD_FOUND) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${ZSTD_INCLUDE_DIR}) -@@ -125,11 +125,11 @@ if (SNAPPY_FOUND) - list(APPEND FOLLY_LINK_LIBRARIES ${SNAPPY_LIBRARY}) - endif() - --find_package(LibDwarf) -+find_package(libdwarf) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBDWARF_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBDWARF_INCLUDE_DIRS}) - --find_package(Libiberty) -+find_package(libiberty) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBIBERTY_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBIBERTY_INCLUDE_DIRS}) - -@@ -141,7 +141,7 @@ find_package(LibUring) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBURING_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBURING_INCLUDE_DIRS}) - --find_package(Libsodium) -+find_package(libsodium) - list(APPEND FOLLY_LINK_LIBRARIES ${LIBSODIUM_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBSODIUM_INCLUDE_DIRS}) - diff --git a/recipes/folly/all/patches/0017-compiler-flags.patch b/recipes/folly/all/patches/0017-compiler-flags.patch deleted file mode 100644 index 1290e801ba4ba..0000000000000 --- a/recipes/folly/all/patches/0017-compiler-flags.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/CMake/FollyCompilerUnix.cmake b/CMake/FollyCompilerUnix.cmake -index 8dcaf14..200fe8d 100644 ---- a/CMake/FollyCompilerUnix.cmake -+++ b/CMake/FollyCompilerUnix.cmake -@@ -28,9 +28,9 @@ set( - ) - mark_as_advanced(CXX_STD) - --set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra") -+set(CMAKE_CXX_FLAGS_COMMON "-Wall -Wextra") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_COMMON}") --set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON} -O3") -+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON}") - - # Note that CMAKE_REQUIRED_FLAGS must be a string, not a list - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=${CXX_STD}") -@@ -43,7 +43,6 @@ function(apply_folly_compile_options_to_target THETARGET) - ) - target_compile_options(${THETARGET} - PRIVATE -- -g - -std=${CXX_STD} - -finput-charset=UTF-8 - -fsigned-char diff --git a/recipes/folly/all/patches/0018-find-glog.patch b/recipes/folly/all/patches/0018-find-glog.patch deleted file mode 100644 index b2d17ad455a7b..0000000000000 --- a/recipes/folly/all/patches/0018-find-glog.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/build/fbcode_builder/CMake/FindGlog.cmake b/build/fbcode_builder/CMake/FindGlog.cmake -index 752647c..aa2fa1c 100644 ---- a/build/fbcode_builder/CMake/FindGlog.cmake -+++ b/build/fbcode_builder/CMake/FindGlog.cmake -@@ -10,9 +10,9 @@ include(FindPackageHandleStandardArgs) - include(SelectLibraryConfigurations) - - find_library(GLOG_LIBRARY_RELEASE glog -- PATHS ${GLOG_LIBRARYDIR}) -+ PATHS ${CONAN_GLOG_ROOT}) - find_library(GLOG_LIBRARY_DEBUG glogd -- PATHS ${GLOG_LIBRARYDIR}) -+ PATHS ${CONAN_GLOG_ROOT}) - - find_path(GLOG_INCLUDE_DIR glog/logging.h - PATHS ${GLOG_INCLUDEDIR}) diff --git a/recipes/folly/all/patches/0019-exclude-example.patch b/recipes/folly/all/patches/0019-exclude-example.patch deleted file mode 100644 index d2afb310ff8a0..0000000000000 --- a/recipes/folly/all/patches/0019-exclude-example.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/CMakeLists.txt b/folly/CMakeLists.txt -index 883f27c..2d2086f 100644 ---- a/folly/CMakeLists.txt -+++ b/folly/CMakeLists.txt -@@ -28,7 +28,6 @@ install( - ) - - add_subdirectory(experimental/exception_tracer) --add_subdirectory(logging/example) - - if (PYTHON_EXTENSIONS) - # Create tree of symbolic links in structure required for successful diff --git a/recipes/folly/all/patches/0020-include-ssizet.patch b/recipes/folly/all/patches/0020-include-ssizet.patch deleted file mode 100644 index 0575fecd13e84..0000000000000 --- a/recipes/folly/all/patches/0020-include-ssizet.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/executors/ExecutorWithPriority.h b/folly/executors/ExecutorWithPriority.h -index b95a6c4..18b8110 100644 ---- a/folly/executors/ExecutorWithPriority.h -+++ b/folly/executors/ExecutorWithPriority.h -@@ -18,6 +18,7 @@ - - #include - #include -+#include - - namespace folly { - diff --git a/recipes/folly/all/patches/0021-typedef-clockid.patch b/recipes/folly/all/patches/0021-typedef-clockid.patch deleted file mode 100644 index fb46c057d58ce..0000000000000 --- a/recipes/folly/all/patches/0021-typedef-clockid.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/folly/portability/Time.h b/folly/portability/Time.h -index 994a09e5d70..e4f0d101ca9 100644 ---- a/folly/portability/Time.h -+++ b/folly/portability/Time.h -@@ -49,7 +49,6 @@ - #define CLOCK_PROCESS_CPUTIME_ID 2 - #define CLOCK_THREAD_CPUTIME_ID 3 - --typedef uint8_t clockid_t; - extern "C" int clock_gettime(clockid_t clk_id, struct timespec* ts); - extern "C" int clock_getres(clockid_t clk_id, struct timespec* ts); - #endif diff --git a/recipes/folly/all/patches/0022-fix-windows-minmax.patch b/recipes/folly/all/patches/0022-fix-windows-minmax.patch deleted file mode 100644 index 1fc69a43a83e5..0000000000000 --- a/recipes/folly/all/patches/0022-fix-windows-minmax.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMake/FollyCompilerMSVC.cmake b/CMake/FollyCompilerMSVC.cmake -index ec2ce1a1d..16deda71c 100644 ---- a/CMake/FollyCompilerMSVC.cmake -+++ b/CMake/FollyCompilerMSVC.cmake -@@ -289,6 +289,7 @@ function(apply_folly_compile_options_to_target THETARGET) - # And the extra defines: - target_compile_definitions(${THETARGET} - PUBLIC -+ NOMINMAX - _CRT_NONSTDC_NO_WARNINGS # Don't deprecate posix names of functions. - _CRT_SECURE_NO_WARNINGS # Don't deprecate the non _s versions of various standard library functions, because safety is for chumps. - _SCL_SECURE_NO_WARNINGS # Don't deprecate the non _s versions of various standard library functions, because safety is for chumps. diff --git a/recipes/folly/all/test_package/CMakeLists.txt b/recipes/folly/all/test_package/CMakeLists.txt index 6a9df4ea0b752..82796f7de6547 100644 --- a/recipes/folly/all/test_package/CMakeLists.txt +++ b/recipes/folly/all/test_package/CMakeLists.txt @@ -4,13 +4,5 @@ project(test_package CXX) find_package(folly REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} - Folly::folly - Folly::follybenchmark) - - -if (${FOLLY_VERSION} VERSION_LESS "2021.07.20.00") - set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) -else() - set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) -endif() +target_link_libraries(${PROJECT_NAME} PRIVATE Folly::folly) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/folly/all/test_package/conanfile.py b/recipes/folly/all/test_package/conanfile.py index 63889d5258fa5..7aa104bd186ed 100644 --- a/recipes/folly/all/test_package/conanfile.py +++ b/recipes/folly/all/test_package/conanfile.py @@ -1,21 +1,19 @@ import os from conan import ConanFile -from conan.tools.cmake import CMake, CMakeToolchain +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout -required_conan_version = ">=1.43.0" class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) def generate(self): tc = CMakeToolchain(self) - tc.variables["FOLLY_VERSION"] = self.dependencies["folly"].ref.version tc.generate() def layout(self): @@ -28,4 +26,4 @@ def build(self): def test(self): if can_run(self): - self.run(os.path.join(self.cpp.build.bindirs[0], "test_package"), env="conanrun") + self.run(os.path.join(self.cpp.build.bindir, "test_package"), env="conanrun") diff --git a/recipes/folly/all/test_package/test_package.cpp b/recipes/folly/all/test_package/test_package.cpp index cc522b8b0280d..247e44f76e0fd 100644 --- a/recipes/folly/all/test_package/test_package.cpp +++ b/recipes/folly/all/test_package/test_package.cpp @@ -1,29 +1,12 @@ #include #include -#include + #include -#include -#include -#include -#include -#if FOLLY_HAVE_ELF -#include -#endif +#include -static void print_uri(const folly::fbstring& value) { - const folly::Uri uri(value); - std::cout << "The authority from " << value << " is " << uri.authority() << std::endl; -} int main() { - folly::ThreadedExecutor executor; - folly::Promise promise; - folly::Future future = promise.getSemiFuture().via(&executor); - folly::Future unit = std::move(future).thenValue(print_uri); - promise.setValue("https://github.com/bincrafters"); - std::move(unit).get(); -#if FOLLY_HAVE_ELF - folly::symbolizer::ElfFile elffile; -#endif + folly::fbstring address{"127.0.0.1"}; + folly::IPAddress::validate(address); return EXIT_SUCCESS; } diff --git a/recipes/folly/all/test_v1_package/CMakeLists.txt b/recipes/folly/all/test_v1_package/CMakeLists.txt index f8cc697ab67d2..c2866c350e271 100644 --- a/recipes/folly/all/test_v1_package/CMakeLists.txt +++ b/recipes/folly/all/test_v1_package/CMakeLists.txt @@ -4,14 +4,5 @@ project(test_package CXX) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(folly CONFIG REQUIRED) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} Folly::folly) - - -if (${FOLLY_VERSION} VERSION_LESS "2021.07.20.00") - set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) -else() - set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) -endif() +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/folly/all/test_v1_package/conanfile.py b/recipes/folly/all/test_v1_package/conanfile.py index 8b8cfae4c1882..49a3a66ea5bad 100644 --- a/recipes/folly/all/test_v1_package/conanfile.py +++ b/recipes/folly/all/test_v1_package/conanfile.py @@ -8,11 +8,10 @@ class TestPackageConan(ConanFile): def build(self): cmake = CMake(self) - cmake.definitions["FOLLY_VERSION"] = self.deps_cpp_info["folly"].version cmake.configure() cmake.build() def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - self.run(command=bin_path, run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/folly/all/test_v1_package/test_package.cpp b/recipes/folly/all/test_v1_package/test_package.cpp deleted file mode 100644 index cc522b8b0280d..0000000000000 --- a/recipes/folly/all/test_v1_package/test_package.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#if FOLLY_HAVE_ELF -#include -#endif - -static void print_uri(const folly::fbstring& value) { - const folly::Uri uri(value); - std::cout << "The authority from " << value << " is " << uri.authority() << std::endl; -} - -int main() { - folly::ThreadedExecutor executor; - folly::Promise promise; - folly::Future future = promise.getSemiFuture().via(&executor); - folly::Future unit = std::move(future).thenValue(print_uri); - promise.setValue("https://github.com/bincrafters"); - std::move(unit).get(); -#if FOLLY_HAVE_ELF - folly::symbolizer::ElfFile elffile; -#endif - return EXIT_SUCCESS; -} diff --git a/recipes/folly/config.yml b/recipes/folly/config.yml index 6a14a274c3fe9..e799fbeee0433 100644 --- a/recipes/folly/config.yml +++ b/recipes/folly/config.yml @@ -1,7 +1,3 @@ versions: - "2019.10.21.00": - folder: all - "2020.08.10.00": - folder: all - "2022.01.31.00": - folder: all + "2024.08.12.00": + folder: all diff --git a/recipes/fontconfig/meson/conandata.yml b/recipes/fontconfig/all/conandata.yml similarity index 100% rename from recipes/fontconfig/meson/conandata.yml rename to recipes/fontconfig/all/conandata.yml diff --git a/recipes/fontconfig/meson/conanfile.py b/recipes/fontconfig/all/conanfile.py similarity index 100% rename from recipes/fontconfig/meson/conanfile.py rename to recipes/fontconfig/all/conanfile.py diff --git a/recipes/fontconfig/meson/patches/0001-meson-win32.patch b/recipes/fontconfig/all/patches/0001-meson-win32.patch similarity index 100% rename from recipes/fontconfig/meson/patches/0001-meson-win32.patch rename to recipes/fontconfig/all/patches/0001-meson-win32.patch diff --git a/recipes/fontconfig/meson/test_package/CMakeLists.txt b/recipes/fontconfig/all/test_package/CMakeLists.txt similarity index 100% rename from recipes/fontconfig/meson/test_package/CMakeLists.txt rename to recipes/fontconfig/all/test_package/CMakeLists.txt diff --git a/recipes/fontconfig/meson/test_package/conanfile.py b/recipes/fontconfig/all/test_package/conanfile.py similarity index 100% rename from recipes/fontconfig/meson/test_package/conanfile.py rename to recipes/fontconfig/all/test_package/conanfile.py diff --git a/recipes/fontconfig/meson/test_package/test_package.c b/recipes/fontconfig/all/test_package/test_package.c similarity index 100% rename from recipes/fontconfig/meson/test_package/test_package.c rename to recipes/fontconfig/all/test_package/test_package.c diff --git a/recipes/fontconfig/meson/test_v1_package/CMakeLists.txt b/recipes/fontconfig/all/test_v1_package/CMakeLists.txt similarity index 100% rename from recipes/fontconfig/meson/test_v1_package/CMakeLists.txt rename to recipes/fontconfig/all/test_v1_package/CMakeLists.txt diff --git a/recipes/fontconfig/meson/test_v1_package/conanfile.py b/recipes/fontconfig/all/test_v1_package/conanfile.py similarity index 100% rename from recipes/fontconfig/meson/test_v1_package/conanfile.py rename to recipes/fontconfig/all/test_v1_package/conanfile.py diff --git a/recipes/fontconfig/config.yml b/recipes/fontconfig/config.yml index dafaaf15309ac..1d4c62bc9edab 100644 --- a/recipes/fontconfig/config.yml +++ b/recipes/fontconfig/config.yml @@ -1,7 +1,7 @@ versions: "2.15.0": - folder: meson + folder: all "2.14.2": - folder: meson + folder: all "2.13.93": - folder: meson + folder: all diff --git a/recipes/foxglove-websocket/all/conandata.yml b/recipes/foxglove-websocket/all/conandata.yml index 697b11f6c928c..82e61d0221936 100644 --- a/recipes/foxglove-websocket/all/conandata.yml +++ b/recipes/foxglove-websocket/all/conandata.yml @@ -1,4 +1,7 @@ sources: + 1.3.0: + url: https://github.com/foxglove/ws-protocol/archive/refs/tags/releases/cpp/v1.3.0.tar.gz + sha256: 5c1d4cda60a89bf635ef0150e8cd2f4da569f92beb8ac8555795ed7fd47f2a21 1.2.0: url: https://github.com/foxglove/ws-protocol/archive/refs/tags/releases/cpp/v1.2.0.tar.gz sha256: 0471d3932500ed6acd87a99cd76e048366c82f2527c1631afcee4f8ab71c4ab7 diff --git a/recipes/foxglove-websocket/config.yml b/recipes/foxglove-websocket/config.yml index 6f923ecb4a132..6431a1556fee0 100644 --- a/recipes/foxglove-websocket/config.yml +++ b/recipes/foxglove-websocket/config.yml @@ -1,4 +1,6 @@ versions: + 1.3.0: + folder: all 1.2.0: folder: all 1.1.0: diff --git a/recipes/frozen/all/conandata.yml b/recipes/frozen/all/conandata.yml index 4d9b977925cb2..cf0083d308f87 100644 --- a/recipes/frozen/all/conandata.yml +++ b/recipes/frozen/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.0": + url: "https://github.com/serge-sans-paille/frozen/archive/1.2.0.tar.gz" + sha256: "ed8339c017d7c5fe019ac2c642477f435278f0dc643c1d69d3f3b1e95915e823" "1.1.1": url: "https://github.com/serge-sans-paille/frozen/archive/1.1.1.tar.gz" sha256: "f7c7075750e8fceeac081e9ef01944f221b36d9725beac8681cbd2838d26be45" diff --git a/recipes/frozen/config.yml b/recipes/frozen/config.yml index 9234b604d8ed1..188555eba6e58 100644 --- a/recipes/frozen/config.yml +++ b/recipes/frozen/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.1": folder: all "1.0.1": diff --git a/recipes/functionalplus/all/conandata.yml b/recipes/functionalplus/all/conandata.yml index 995124a2aca90..ce67a8c16c149 100644 --- a/recipes/functionalplus/all/conandata.yml +++ b/recipes/functionalplus/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.2.25": + url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.25.tar.gz" + sha256: "9b5e24bbc92f43b977dc83efbc173bcf07dbe07f8718fc2670093655b56fcee3" "0.2.24": url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.24.tar.gz" sha256: "446c63ac3f2045e7587f694501882a3d7c7b962b70bcc08deacf5777bdaaff8c" diff --git a/recipes/functionalplus/config.yml b/recipes/functionalplus/config.yml index 13685d2ebceaf..1aa00fc767fdd 100644 --- a/recipes/functionalplus/config.yml +++ b/recipes/functionalplus/config.yml @@ -1,4 +1,6 @@ versions: + "0.2.25": + folder: all "0.2.24": folder: all "0.2.23": diff --git a/recipes/gaia-ecs/all/conandata.yml b/recipes/gaia-ecs/all/conandata.yml new file mode 100644 index 0000000000000..0f7a267f7719c --- /dev/null +++ b/recipes/gaia-ecs/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.8.6": + url: "https://github.com/richardbiely/gaia-ecs/archive/refs/tags/v0.8.6.tar.gz" + sha256: "9CAC0AC6F2FB19DFFF07D097F5DC0A97FF1CA4AEC3405219CB2D2A03601AB03F" diff --git a/recipes/gaia-ecs/all/conanfile.py b/recipes/gaia-ecs/all/conanfile.py new file mode 100644 index 0000000000000..ad8069272b4bb --- /dev/null +++ b/recipes/gaia-ecs/all/conanfile.py @@ -0,0 +1,74 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.scm import Version +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.52.0" + + +class GaiaConan(ConanFile): + name = "gaia-ecs" + description = "A simple and powerful entity component system (ECS) written in C++17 " + topics = ("gamedev", "performance", "entity", "ecs") + homepage = "https://github.com/richardbiely/gaia-ecs" + url = "https://github.com/conan-io/conan-center-index" + license = "MIT" + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + + @property + def _min_cppstd(self): + return "17" + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "10", + "clang": "7.0", + "apple-clang": "10.0", + "intel-cc": "2021.2" + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + 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." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + + def package_info(self): + if self.settings.os in ["FreeBSD", "Linux"]: + self.cpp_info.system_libs = ["pthread"] + + self.cpp_info.set_property("cmake_file_name", "gaia") + self.cpp_info.set_property("cmake_target_name", "gaia::gaia") + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + # TODO: remove when v1 support drops + self.cpp_info.names["cmake_find_package"] = "gaia" + self.cpp_info.names["cmake_find_package_multi"] = "gaia" diff --git a/recipes/gaia-ecs/all/test_package/CMakeLists.txt b/recipes/gaia-ecs/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..d9ccb13290576 --- /dev/null +++ b/recipes/gaia-ecs/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(gaia REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE gaia::gaia) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/gaia-ecs/all/test_package/conanfile.py b/recipes/gaia-ecs/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/gaia-ecs/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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 = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + 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): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/gaia-ecs/all/test_package/test_package.cpp b/recipes/gaia-ecs/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..105e808a6373e --- /dev/null +++ b/recipes/gaia-ecs/all/test_package/test_package.cpp @@ -0,0 +1,9 @@ +#include + +int main() +{ + gaia::ecs::World w; + gaia::ecs::Entity e = w.add(); + (void) w.valid(e); + return 0; +} diff --git a/recipes/gaia-ecs/config.yml b/recipes/gaia-ecs/config.yml new file mode 100644 index 0000000000000..5169c9c9c27e4 --- /dev/null +++ b/recipes/gaia-ecs/config.yml @@ -0,0 +1,3 @@ +versions: + "0.8.6": + folder: all diff --git a/recipes/gdk-pixbuf/all/conanfile.py b/recipes/gdk-pixbuf/all/conanfile.py index cbbd71f4d5295..edcf9d96b7ad2 100644 --- a/recipes/gdk-pixbuf/all/conanfile.py +++ b/recipes/gdk-pixbuf/all/conanfile.py @@ -63,17 +63,17 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.78.1", transitive_headers=True, transitive_libs=True) + self.requires("glib/2.78.3", transitive_headers=True, transitive_libs=True) if self.options.with_libpng: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.with_libtiff: self.requires("libtiff/4.6.0") if self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.1") + self.requires("libjpeg-turbo/3.0.2") elif self.options.with_libjpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_libjpeg == "mozjpeg": - self.requires("mozjpeg/4.1.3") + self.requires("mozjpeg/4.1.5") def validate(self): if self.options.shared and not self.dependencies["glib"].options.shared: @@ -86,12 +86,12 @@ def validate(self): ) def build_requirements(self): - self.tool_requires("meson/1.2.3") + self.tool_requires("meson/[>=1.2.3 <2]") # FIXME: unify libgettext and gettext?? # INFO: gettext provides msgfmt, which is required to build the .mo files - self.tool_requires("gettext/0.21") + self.tool_requires("gettext/0.22.5") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/[>=2.2 <3]") self.tool_requires("glib/") if self.options.with_introspection: self.tool_requires("gobject-introspection/1.72.0") @@ -123,8 +123,6 @@ def generate(self): "man": "false", "installed_tests": "false" }) - if Version(self.version) < "2.42.0": - tc.project_options["gir"] = "false" if Version(self.version) >= "2.42.8": tc.project_options.update({ diff --git a/recipes/geographiclib/all/conandata.yml b/recipes/geographiclib/all/conandata.yml index 1f35984a98249..6f7b35b699b25 100644 --- a/recipes/geographiclib/all/conandata.yml +++ b/recipes/geographiclib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.4": + url: "https://github.com/geographiclib/geographiclib/archive/refs/tags/v2.4.tar.gz" + sha256: "aa7edc6d86fcc297be6e6d6d53ddb6e622a46ef36fe9317335cac91bf471b5a9" "2.3": url: "https://github.com/geographiclib/geographiclib/archive/refs/tags/v2.3.tar.gz" sha256: "18131077061ef8be14064f073f6dba2897a138519733803af807f861a01976c1" diff --git a/recipes/geographiclib/all/conanfile.py b/recipes/geographiclib/all/conanfile.py index 9f1c405b1f7f1..62fa23933a44e 100644 --- a/recipes/geographiclib/all/conanfile.py +++ b/recipes/geographiclib/all/conanfile.py @@ -2,6 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv from conan.tools.files import ( apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir, collect_libs @@ -35,6 +36,35 @@ class GeographiclibConan(ConanFile): "tools": True, } + @property + def _min_cppstd(self): + if Version(self.version) >= "2.4": + return 14 + if Version(self.version) >= "1.51": + return 11 + return None + + @property + def _compilers_minimum_version(self): + if self._min_cppstd == 11: + # Minimum compiler version having C++11 math functions + return { + "apple-clang": "3.3", + "gcc": "4.9", + "clang": "6", + "Visual Studio": "14", # guess + "msvc": "190", + } + elif self._min_cppstd == 14: + return { + "gcc": "7", + "clang": "6", + "Visual Studio": "16", + "msvc": "192", + "apple-clang": "14", + } + return {} + def export_sources(self): export_conandata_patches(self) @@ -49,36 +79,28 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") - @property - def _compilers_minimum_version(self): - # Minimum compiler version having C++11 math functions - return { - "apple-clang": "3.3", - "gcc": "4.9", - "clang": "6", - "Visual Studio": "14", # guess - "msvc": "190", - } - def validate(self): - if Version(self.version) >= "1.51": - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + if self.settings.compiler.get_safe("cppstd") and self._min_cppstd: + check_min_cppstd(self, self._min_cppstd) - def loose_lt_semver(v1, v2): - return all(int(p1) < int(p2) for p1, p2 in zip(str(v1).split("."), str(v2).split("."))) + def loose_lt_semver(v1, v2): + return all(int(p1) < int(p2) for p1, p2 in zip(str(v1).split("."), str(v2).split("."))) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and loose_lt_semver(str(self.settings.compiler.version), minimum_version): - raise ConanInvalidConfiguration( - f"{self.ref} requires C++11 math functions, which your compiler does not support." - ) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and loose_lt_semver(str(self.settings.compiler.version), minimum_version): + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) if self.options.precision not in ["float", "double"]: # FIXME: add support for extended, quadruple and variable precisions # (may require external libs: boost multiprecision for quadruple, mpfr for variable) raise ConanInvalidConfiguration("extended, quadruple and variable precisions not yet supported in this recipe") + def build_requirements(self): + if Version(self.version) >= "2.4": + self.tool_requires("cmake/[>=3.16 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -98,6 +120,8 @@ def generate(self): tc.variables["GEOGRAPHICLIB_PRECISION"] = self._cmake_option_precision tc.generate() + VirtualBuildEnv(self).generate() + def _patch_sources(self): apply_conandata_patches(self) cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") diff --git a/recipes/geographiclib/config.yml b/recipes/geographiclib/config.yml index 23b0bc998f804..2557b05844a79 100644 --- a/recipes/geographiclib/config.yml +++ b/recipes/geographiclib/config.yml @@ -1,4 +1,6 @@ versions: + "2.4": + folder: all "2.3": folder: all "1.52": diff --git a/recipes/geos/all/conandata.yml b/recipes/geos/all/conandata.yml index cce81a5d0af84..1c16e5baab94b 100644 --- a/recipes/geos/all/conandata.yml +++ b/recipes/geos/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.13.0": + url: "https://github.com/libgeos/geos/releases/download/3.13.0/geos-3.13.0.tar.bz2" + sha256: "47ec83ff334d672b9e4426695f15da6e6368244214971fabf386ff8ef6df39e4" + "3.12.2": + url: "https://github.com/libgeos/geos/releases/download/3.12.2/geos-3.12.2.tar.bz2" + sha256: "34c7770bf0090ee88488af98767d08e779f124fa33437e0aabec8abd4609fec6" "3.12.0": url: "https://github.com/libgeos/geos/releases/download/3.12.0/geos-3.12.0.tar.bz2" sha256: "d96db96011259178a35555a0f6d6e75a739e52a495a6b2aa5efb3d75390fbc39" @@ -17,9 +23,3 @@ sources: "3.10.2": url: "https://download.osgeo.org/geos/geos-3.10.2.tar.bz2" sha256: "50bbc599ac386b4c2b3962dcc411f0040a61f204aaef4eba7225ecdd0cf45715" -patches: - "3.12.0": - - patch_file: "patches/3.12.0-0001-fix-cmake.patch" - patch_description: "Fix CMake on Windows with Visual Studio" - patch_type: "official" - patch_source: "https://github.com/libgeos/geos/pull/945" diff --git a/recipes/geos/all/conanfile.py b/recipes/geos/all/conanfile.py index 5bfc63783c7e5..1eefc045b2934 100644 --- a/recipes/geos/all/conanfile.py +++ b/recipes/geos/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd, stdcpp_library from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, rmdir, export_conandata_patches, apply_conandata_patches +from conan.tools.files import copy, get, rmdir, replace_in_file from conan.tools.scm import Version import os @@ -11,11 +11,11 @@ class GeosConan(ConanFile): name = "geos" - description = "C++11 library for performing operations on two-dimensional vector geometries" + description = "GEOS is a C++ library for performing operations on two-dimensional vector geometries." license = "LGPL-2.1" - topics = ("osgeo", "geometry", "topology", "geospatial") - homepage = "https://trac.osgeo.org/geos" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://libgeos.org/" + topics = ("osgeo", "geometry", "topology", "geospatial") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -51,9 +51,6 @@ def _compilers_minimum_version(self): def _has_inline_option(self): return Version(self.version) < "3.11.0" - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -96,8 +93,15 @@ def generate(self): tc.variables["BUILD_GEOSOP"] = self.options.utils tc.generate() + def _patch_sources(self): + # Avoid setting CMAKE_BUILD_TYPE default when multi-config generators are used. + # https://github.com/libgeos/geos/pull/945 + if Version(self.version) <= "3.12.1": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_BUILD_TYPE ${DEFAULT_BUILD_TYPE})", "") + def build(self): - apply_conandata_patches(self) + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/geos/all/patches/3.12.0-0001-fix-cmake.patch b/recipes/geos/all/patches/3.12.0-0001-fix-cmake.patch deleted file mode 100644 index d0abdd50a8211..0000000000000 --- a/recipes/geos/all/patches/3.12.0-0001-fix-cmake.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7a2906c..cdab138 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -114,8 +114,12 @@ endif() - - # Make sure we know our build type - if(NOT CMAKE_BUILD_TYPE) -- set(CMAKE_BUILD_TYPE ${DEFAULT_BUILD_TYPE}) -- message(STATUS "GEOS: Using default build type: ${CMAKE_BUILD_TYPE}") -+ get_property(_is_multi_config_generator GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) -+ if (NOT _is_multi_config_generator) -+ set(CMAKE_BUILD_TYPE ${DEFAULT_BUILD_TYPE}) -+ message(STATUS "GEOS: Using default build type: ${CMAKE_BUILD_TYPE}") -+ endif() -+ unset(_is_multi_config_generator) - else() - message(STATUS "GEOS: Build type: ${CMAKE_BUILD_TYPE}") - endif() -@@ -186,6 +190,11 @@ set(CMAKE_CXX_FLAGS_ASAN "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address -fno-omit- - set(CMAKE_EXE_LINKER_FLAGS_ASAN "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=address") - set(CMAKE_SHARED_LINKER_FLAGS_ASAN "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -fsanitize=address") - -+get_property(_cmake_build_type_is_cache CACHE CMAKE_BUILD_TYPE PROPERTY TYPE) -+if (_cmake_build_type_is_cache) -+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "ASAN") -+endif() -+unset(_cmake_build_type_is_cache) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "ASAN") - - #----------------------------------------------------------------------------- diff --git a/recipes/geos/config.yml b/recipes/geos/config.yml index bbc8ab7daf85c..b2d68bf99ca6a 100644 --- a/recipes/geos/config.yml +++ b/recipes/geos/config.yml @@ -1,4 +1,8 @@ versions: + "3.13.0": + folder: all + "3.12.2": + folder: all "3.12.0": folder: all "3.11.2": diff --git a/recipes/getdns/all/CMakeLists.txt b/recipes/getdns/all/CMakeLists.txt deleted file mode 100644 index f96c6dd4ed727..0000000000000 --- a/recipes/getdns/all/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -if(WIN32) - set(CMAKE_REQUIRED_LIBRARIES ws2_32) -endif() - -add_subdirectory(source_subfolder) diff --git a/recipes/getdns/all/conan_deps.cmake b/recipes/getdns/all/conan_deps.cmake new file mode 100644 index 0000000000000..0925ccf84a265 --- /dev/null +++ b/recipes/getdns/all/conan_deps.cmake @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 3.15) +project(cmake_wrapper) + +# Wrapper for find_package() that sets variables in the format expected by the project +macro(custom_find_package name) + find_package(${name} REQUIRED CONFIG + # Allow only Conan packages + NO_DEFAULT_PATH + PATHS ${CMAKE_PREFIX_PATH} + ) + string(TOUPPER ${name} name_upper) + set(${name_upper}_FOUND TRUE) + set(${name_upper}_INCLUDE_DIR ${${name}_INCLUDE_DIR}) + set(${name_upper}_LIBRARIES ${${name}_LIBRARIES}) +endmacro() + +custom_find_package(OpenSSL) +if(BUILD_LIBEV) + custom_find_package(Libev) +endif() +if(BUILD_LIBEVENT2) + custom_find_package(Libevent2) +endif() +if(BUILD_LIBUV) + custom_find_package(Libuv) +endif() +if(USE_LIBIDN2) + custom_find_package(Libidn2) +endif() diff --git a/recipes/getdns/all/conandata.yml b/recipes/getdns/all/conandata.yml index 63656d1d51254..a97e641f541f4 100644 --- a/recipes/getdns/all/conandata.yml +++ b/recipes/getdns/all/conandata.yml @@ -1,14 +1,11 @@ sources: - "1.6.0": - url: "https://getdnsapi.net/dist/getdns-1.6.0.tar.gz" - sha256: "40e5737471a3902ba8304b0fd63aa7c95802f66ebbc6eae53c487c8e8a380f4a" + "1.7.3": + url: "https://getdnsapi.net/dist/getdns-1.7.3.tar.gz" + sha256: "f1404ca250f02e37a118aa00cf0ec2cbe11896e060c6d369c6761baea7d55a2c" patches: - "1.6.0": - - patch_file: "patches/1.6.0-0001-install-runtimes.patch" - base_path: "source_subfolder" + "1.7.3": - patch_file: "patches/1.6.0-0002-fix-exports-extension-libraries.patch" - base_path: "source_subfolder" - - patch_file: "patches/1.6.0-0003-let-find-modules-use-pkgconfig.patch" - base_path: "source_subfolder" - - patch_file: "patches/1.6.0-0004-dont-install-symlinked-license.patch" - base_path: "source_subfolder" + - patch_file: "patches/1.7.3-fix-windows-build.patch" + patch_description: "Fix Windows build" + patch_source: "https://github.com/getdnsapi/getdns/pull/538" + patch_type: "portability" diff --git a/recipes/getdns/all/conanfile.py b/recipes/getdns/all/conanfile.py index a1d7aed1728a6..33e5e1ab9e6c1 100644 --- a/recipes/getdns/all/conanfile.py +++ b/recipes/getdns/all/conanfile.py @@ -1,24 +1,28 @@ -from conans import CMake, ConanFile, tools -from conans.errors import ConanInvalidConfiguration -import glob import os +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, rm +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" + class GetDnsConan(ConanFile): name = "getdns" description = "A modern asynchronous DNS API" - topics = "conan", "getdns", "asynchronous", "event" license = "BSD-3-Clause" - homepage = "https://getdnsapi.net/" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://getdnsapi.net/" + topics = ("dns", "asynchronous", "event") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" - exports_sources = "CMakeLists.txt", "patches/**" options = { "shared": [True, False], "fPIC": [True, False], - "tls": [False, "gnutls"], - "stub_only": ["auto", True, False], - "with_libev": ["auto", True, False], + "with_libev": [True, False], "with_libevent": [True, False], "with_libuv": [True, False], "with_libidn2": [True, False], @@ -26,36 +30,15 @@ class GetDnsConan(ConanFile): default_options = { "shared": False, "fPIC": True, - "stub_only": "auto", - "tls": False, - "with_libev": "auto", + "with_libev": True, "with_libevent": True, "with_libuv": True, - "with_libidn2": True, + "with_libidn2": True } - generators = "cmake", "pkg_config", "cmake_find_package" - - _cmake = None - - @property - def _with_libev(self): - if self.options.with_libev == "auto": - return self.settings.os != "Windows" - else: - return self.options.with_libev - - @property - def _stub_only(self): - if self.options.stub_only == "auto": - # FIXME: uncomment the next line when libunbound is available - # return self.settings.os == "Windows" - return True - else: - return self.options.stub_only - - @property - def _source_subfolder(self): - return "source_subfolder" + + def export_sources(self): + export_conandata_patches(self) + copy(self, "conan_deps.cmake", src=self.recipe_folder, dst=os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -63,108 +46,119 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("openssl/1.1.1j") - if self._with_libev: + self.requires("openssl/[>=1.1 <4]") + if self.options.with_libev: self.requires("libev/4.33") if self.options.with_libevent: self.requires("libevent/2.1.12") if self.options.with_libuv: - self.requires("libuv/1.41.0") + self.requires("libuv/1.48.0") if self.options.with_libidn2: self.requires("libidn2/2.3.0") - if self.options.tls == "gnutls": - self.requires("nettle/3.6") - # FIXME: missing gnutls recipe - raise ConanInvalidConfiguration("gnutls is not (yet) available on cci") - if not self._stub_only: - # FIXME: missing libunbound recipe - raise ConanInvalidConfiguration("libunbound is not (yet) available on cci") def build_requirements(self): - self.build_requires("pkgconf/1.7.3") + self.tool_requires("cmake/[>=3.20 <4]") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - os.rename("getdns-{}".format(self.version), self._source_subfolder) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["OPENSSL_USE_STATIC_LIBS"] = not self.options["openssl"].shared - self._cmake.definitions["ENABLE_SHARED"] = self.options.shared - self._cmake.definitions["ENABLE_STATIC"] = not self.options.shared - self._cmake.definitions["ENABLE_STUB_ONLY"] = self._stub_only - self._cmake.definitions["BUILD_LIBEV"] = self._with_libev - self._cmake.definitions["BUILD_LIBEVENT2"] = self.options.with_libevent - self._cmake.definitions["BUILD_LIBUV"] = self.options.with_libuv - self._cmake.definitions["USE_LIBIDN2"] = self.options.with_libidn2 - self._cmake.definitions["USE_GNUTLS"] = self.options.tls == "gnutls" - self._cmake.definitions["BUILD_TESTING"] = False - - self._cmake.configure() - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + VirtualBuildEnv(self).generate() + + tc = CMakeToolchain(self) + tc.variables["CMAKE_PROJECT_getdns_INCLUDE"] = "conan_deps.cmake" + tc.variables["OPENSSL_USE_STATIC_LIBS"] = not self.dependencies["openssl"].options.shared + tc.variables["ENABLE_SHARED"] = self.options.shared + tc.variables["ENABLE_STATIC"] = not self.options.shared + # INFO: Disabling stub-only requires libunbound + tc.variables["ENABLE_STUB_ONLY"] = True + tc.variables["BUILD_LIBEV"] = self.options.with_libev + tc.variables["BUILD_LIBEVENT2"] = self.options.with_libevent + tc.variables["BUILD_LIBUV"] = self.options.with_libuv + tc.variables["USE_LIBIDN2"] = self.options.with_libidn2 + # INFO: GnuTLS requires libdane support and is not supported by MSVC + tc.variables["USE_GNUTLS"] = False + # Force use of internal strptime when cross-compiling + tc.variables["FORCE_COMPAT_STRPTIME"] = True + tc.variables["BUILD_TESTING"] = False + # To fix OpenSSL try_compile() checks + # https://github.com/conan-io/conan/issues/12180 + tc.variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = str(self.settings.build_type) + if self.settings.compiler in ["clang", "apple-clang"]: + # INFO: https://github.com/getdnsapi/getdns/issues/544 + # TODO: Change to extra_clfags when CCI only uses Conan 2.x + tc.blocks["cmake_flags_init"].template += '\nstring(APPEND CMAKE_C_FLAGS_INIT " -Wno-incompatible-function-pointer-types")' + if self.options.with_libidn2 and is_msvc(self): + # INFO: getdns_static.lib(convert.c.obj): error LNK2019: unresolved external symbol __imp_idn2_lookup_u8 + tc.preprocessor_definitions.update({it: 1 for it in self.dependencies["libidn2"].cpp_info.defines}) + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("libev", "cmake_file_name", "Libev") + deps.set_property("libev", "cmake_target_name", "Libev::Libev") + deps.set_property("libevent", "cmake_file_name", "Libevent2") + deps.set_property("libevent::core", "cmake_target_name", "Libevent2::Libevent_core") + deps.set_property("libidn2", "cmake_file_name", "Libidn2") + deps.set_property("libidn2", "cmake_target_name", "Libidn2::Libidn2") + deps.set_property("libuv", "cmake_file_name", "Libuv") + deps.set_property("libuv", "cmake_target_name", "Libuv::Libuv") + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + rm(self, "Find*.cmake", os.path.join(self.source_folder, "cmake", "modules")) def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - # Use FindOpenSSL.cmake to let check_function_exists succeed - # Remove other cmake modules as they use FindPkgConfig - for fn in glob.glob("Find*cmake"): - if "OpenSSL" not in fn: - os.unlink(fn) - cmake = self._configure_cmake() + self._patch_sources() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - cmake = self._configure_cmake() + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "share")) - - def package_id(self): - self.info.options.stub_only = self._stub_only - self.info.options.with_libev = self._with_libev + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): libsuffix = "" - if self.settings.compiler == "Visual Studio" and not self.options.shared: + if is_msvc(self) and not self.options.shared: libsuffix = "_static" - self.cpp_info.components["libgetdns"].libs = ["getdns" + libsuffix] self.cpp_info.components["libgetdns"].includedirs.append(os.path.join("include", "getdns")) - self.cpp_info.components["libgetdns"].names["pkg_config"]= "getdns" + self.cpp_info.components["libgetdns"].set_property("pkg_config_name", "getdns") self.cpp_info.components["libgetdns"].requires = ["openssl::openssl"] if self.options.with_libidn2: self.cpp_info.components["libgetdns"].requires.append("libidn2::libidn2") - if self.options.with_libidn2: - self.cpp_info.components["libgetdns"].requires.append("libidn2::libidn2") - if self.options.tls == "gnutls": - self.cpp_info.components["libgetdns"].requires.extend(["nettle::nettle", "gnutls::gnutls"]) + if self.settings.os == "Windows": + self.cpp_info.components["libgetdns"].system_libs.extend(["ws2_32", "crypt32", "gdi32", "iphlpapi", "psapi", "userenv"]) if self.options.with_libevent: - self.cpp_info.components["dns_ex_event"].libs = ["getdns_ex_event" + libsuffix] - self.cpp_info.components["dns_ex_event"].requires= ["libgetdns", "libevent::libevent"] - self.cpp_info.components["dns_ex_event"].names["pkg_config"]= "getdns_ext_event" + self.cpp_info.components["dns_ext_event"].libs = ["getdns_ext_event" + libsuffix] + self.cpp_info.components["dns_ext_event"].requires = ["libgetdns", "libevent::libevent"] + self.cpp_info.components["dns_ext_event"].set_property("pkg_config_name", "getdns_ext_event") - if self._with_libev: - self.cpp_info.components["dns_ex_ev"].libs = ["getdns_ex_ev" + libsuffix] - self.cpp_info.components["dns_ex_ev"].requires = ["libgetdns", "libev::libev"] - self.cpp_info.components["dns_ex_ev"].names["pkg_config"]= "getdns_ext_ev" + if self.options.with_libev: + self.cpp_info.components["dns_ext_ev"].libs = ["getdns_ext_ev" + libsuffix] + self.cpp_info.components["dns_ext_ev"].requires = ["libgetdns", "libev::libev"] + self.cpp_info.components["dns_ext_ev"].set_property("pkg_config_name", "getdns_ext_ev") if self.options.with_libuv: - self.cpp_info.components["dns_ex_uv"].libs = ["getdns_ex_uv" + libsuffix] - self.cpp_info.components["dns_ex_uv"].requires = ["libgetdns", "libuv::libuv"] - self.cpp_info.components["dns_ex_uv"].names["pkg_config"]= "getdns_ext_uv" + self.cpp_info.components["dns_ext_uv"].libs = ["getdns_ext_uv" + libsuffix] + self.cpp_info.components["dns_ext_uv"].requires = ["libgetdns", "libuv::libuv"] + self.cpp_info.components["dns_ext_uv"].set_property("pkg_config_name", "getdns_ext_uv") + # TODO: Remove after dropping support for Conan 1.x in ConanCenterIndex bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path) diff --git a/recipes/getdns/all/patches/1.6.0-0001-install-runtimes.patch b/recipes/getdns/all/patches/1.6.0-0001-install-runtimes.patch deleted file mode 100644 index de23061cc40af..0000000000000 --- a/recipes/getdns/all/patches/1.6.0-0001-install-runtimes.patch +++ /dev/null @@ -1,33 +0,0 @@ -Based on https://github.com/getdnsapi/getdns/pull/477 - ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -1055,22 +1055,22 @@ - endif () - endif () - if (ENABLE_SHARED) -- install(TARGETS getdns_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+ install(TARGETS getdns_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - if (USE_LIBEV) -- install(TARGETS getdns_ex_ev_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+ install(TARGETS getdns_ex_ev_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif () - if (USE_LIBEVENT2) -- install(TARGETS getdns_ex_event_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+ install(TARGETS getdns_ex_event_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif () - if (USE_LIBUV) -- install(TARGETS getdns_ex_uv_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -+ install(TARGETS getdns_ex_uv_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif () - endif () - if (BUILD_GETDNS_QUERY) -- install(TARGETS getdns_query RUNTIME DESTINATION bin) -+ install(TARGETS getdns_query RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif () - if (BUILD_GETDNS_SERVER_MON) -- install(TARGETS getdns_server_mon RUNTIME DESTINATION bin) -+ install(TARGETS getdns_server_mon RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif () - - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/getdns DESTINATION include) diff --git a/recipes/getdns/all/patches/1.6.0-0003-let-find-modules-use-pkgconfig.patch b/recipes/getdns/all/patches/1.6.0-0003-let-find-modules-use-pkgconfig.patch deleted file mode 100644 index 9e446cae01b2a..0000000000000 --- a/recipes/getdns/all/patches/1.6.0-0003-let-find-modules-use-pkgconfig.patch +++ /dev/null @@ -1,641 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -659,9 +659,9 @@ - target_include_directories(getdns_objects PRIVATE src/ssl_dane) - set(USE_DANESSL 1) - endif () --if (Libidn_FOUND) -- target_include_directories(getdns_objects PRIVATE ${LIBIDN_INCLUDE_DIR}) --endif () -+#if (Libidn_FOUND) -+# target_include_directories(getdns_objects PRIVATE ${LIBIDN_INCLUDE_DIR}) -+#endif () - if (Libidn2_FOUND) - target_include_directories(getdns_objects PRIVATE ${LIBIDN2_INCLUDE_DIR}) - endif () -@@ -695,9 +695,9 @@ - if (Libunbound_FOUND) - target_link_libraries(getdns PUBLIC Libunbound::Libunbound) - endif () -- if (Libidn_FOUND) -- target_link_libraries(getdns PUBLIC Libidn::Libidn) -- endif () -+# if (Libidn_FOUND) -+# target_link_libraries(getdns PUBLIC Libidn::Libidn) -+# endif () - if (Libidn2_FOUND) - target_link_libraries(getdns PUBLIC Libidn2::Libidn2) - endif () ---- cmake/modules/FindGnuTLS.cmake -+++ cmake/modules/FindGnuTLS.cmake -@@ -30,51 +30,65 @@ - - #]=======================================================================] - --find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h -- HINTS -- "${GNUTLS_DIR}" -- "${GNUTLS_DIR}/include" --) -- --find_library(GNUTLS_LIBRARY NAMES gnutls libgnutls -- HINTS -- "${GNUTLS_DIR}" -- "${GNUTLS_DIR}/lib" --) -- --find_library(GNUTLS_DANE_LIBRARY NAMES gnutls-dane libgnutls-dane -- HINTS -- "${GNUTLS_DIR}" -- "${GNUTLS_DIR}/lib" --) -- --set(GNUTLS_LIBRARIES "") -- --if (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARY AND GNUTLS_DANE_LIBRARY) -- if (NOT TARGET GnuTLS::GnuTLS) -- add_library(GnuTLS::GnuTLS UNKNOWN IMPORTED) -- set_target_properties(GnuTLS::GnuTLS PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${GNUTLS_LIBRARY}" -- ) -- endif () -- if (NOT TARGET GnuTLS::Dane) -- add_library(GnuTLS::Dane UNKNOWN IMPORTED) -- set_target_properties(GnuTLS::Dane PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${GNUTLS_DANE_LIBRARY}" -- ) -- endif () -- -- if (NOT GNUTLS_VERSION AND GNUTLS_INCLUDE_DIR) -- file(STRINGS "${GNUTLS_INCLUDE_DIR}/gnutls/gnutls.h" GNUTLS_VER_H REGEX "^#define GNUTLS_VERSION_(MAJOR|MINOR|PATCH) ") -- string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3c" GNUTLS_VERSION "${GNUTLS_VER_H}") -- endif () -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgGnuTLS IMPORTED_TARGET GLOBAL QUIET gnutls) -+ pkg_check_modules(PkgGnuTLSDane IMPORTED_TARGET GLOBAL QUIET gnutls-dane) - endif() - --list(APPEND GNUTLS_LIBRARIES "${GNUTLS_LIBRARY}" "${GNUTLS_DANE_LIBRARY}") -+if(PkgGnuTLS_FOUND AND PkgGnuTLSDane_FOUND) -+ set(GNUTLS_INCLUDE_DIR ${PkgGnuTLS_INCLUDE_DIRS} $PkgGnuTLSDane_INCLUDE_DIRS}) -+ set(NETTLE_LIBRARIES ${PkgGnuTLS_LIBRARIES} ${PkgGnuTLSDane_LIBRARIES}) -+ set(NETTLE_VERSION ${PkgGnuTLS_VERSION}) -+ add_library(GnuTLS::GnuTLS ALIAS PkgConfig::PkgGnuTLS) -+ add_library(GnuTLS::Dane ALIAS PkgConfig::PkgGnuTLSDane) -+else() -+ find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h -+ HINTS -+ "${GNUTLS_DIR}" -+ "${GNUTLS_DIR}/include" -+ ) -+ -+ find_library(GNUTLS_LIBRARY NAMES gnutls libgnutls -+ HINTS -+ "${GNUTLS_DIR}" -+ "${GNUTLS_DIR}/lib" -+ ) -+ -+ find_library(GNUTLS_DANE_LIBRARY NAMES gnutls-dane libgnutls-dane -+ HINTS -+ "${GNUTLS_DIR}" -+ "${GNUTLS_DIR}/lib" -+ ) -+ -+ set(GNUTLS_LIBRARIES "") -+ -+ if (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARY AND GNUTLS_DANE_LIBRARY) -+ if (NOT TARGET GnuTLS::GnuTLS) -+ add_library(GnuTLS::GnuTLS UNKNOWN IMPORTED) -+ set_target_properties(GnuTLS::GnuTLS PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${GNUTLS_LIBRARY}" -+ ) -+ endif () -+ if (NOT TARGET GnuTLS::Dane) -+ add_library(GnuTLS::Dane UNKNOWN IMPORTED) -+ set_target_properties(GnuTLS::Dane PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${GNUTLS_DANE_LIBRARY}" -+ ) -+ endif () -+ -+ if (NOT GNUTLS_VERSION AND GNUTLS_INCLUDE_DIR) -+ file(STRINGS "${GNUTLS_INCLUDE_DIR}/gnutls/gnutls.h" GNUTLS_VER_H REGEX "^#define GNUTLS_VERSION_(MAJOR|MINOR|PATCH) ") -+ string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3c" GNUTLS_VERSION "${GNUTLS_VER_H}") -+ endif () -+ endif() -+ -+ list(APPEND GNUTLS_LIBRARIES "${GNUTLS_LIBRARY}" "${GNUTLS_DANE_LIBRARY}") -+endif() - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(GnuTLS ---- cmake/modules/FindLibevent2.cmake -+++ cmake/modules/FindLibevent2.cmake -@@ -28,37 +28,49 @@ - - #]=======================================================================] - --find_path(LIBEVENT2_INCLUDE_DIR event2/event.h -- HINTS -- "${LIBEVENT2_DIR}" -- "${LIBEVENT2_DIR}/include" --) -- --find_library(LIBEVENT2_LIBRARY NAMES event_core libevent_core -- HINTS -- "${LIBEVENT2_DIR}" -- "${LIBEVENT2_DIR}/lib" --) -- --set(LIBEVENT2_LIBRARIES "") -- --if (LIBEVENT2_INCLUDE_DIR AND LIBEVENT2_LIBRARY) -- if (NOT TARGET Libevent2::Libevent_core) -- add_library(Libevent2::Libevent_core UNKNOWN IMPORTED) -- set_target_properties(Libevent2::Libevent_core PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${LIBEVENT2_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${LIBEVENT2_LIBRARY}" -- ) -- endif () -- -- if (NOT LIBEVENT2_VERSION AND LIBEVENT2_INCLUDE_DIR AND EXISTS "${LIBEVENT2_INCLUDE_DIR}/event2/event.h") -- file(STRINGS "${LIBEVENT2_INCLUDE_DIR}/event2/event-config.h" LIBEVENT2_H REGEX "^#define _?EVENT_+VERSION ") -- string(REGEX REPLACE "^.*EVENT_+VERSION \"([^\"]+)\".*$" "\\1" LIBEVENT2_VERSION "${LIBEVENT2_H}") -- endif () -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgLibevent IMPORTED_TARGET GLOBAL QUIET libevent>=2) - endif() - --list(APPEND LIBEVENT2_LIBRARIES "${LIBEVENT2_LIBRARY}") -+if(PkgLibevent_FOUND) -+ set(LIBEVENT2_INCLUDE_DIR ${PkgLibevent_INCLUDE_DIRS}) -+ set(LIBEVENT2_LIBRARIES ${PkgLibevent_LIBRARIES}) -+ set(LIBEVENT2_VERSION ${PkgLibevent_VERSION}) -+ add_library(Libevent2::Libevent_core ALIAS PkgConfig::PkgLibevent) -+else() -+ find_path(LIBEVENT2_INCLUDE_DIR event2/event.h -+ HINTS -+ "${LIBEVENT2_DIR}" -+ "${LIBEVENT2_DIR}/include" -+ ) -+ -+ find_library(LIBEVENT2_LIBRARY NAMES event_core libevent_core -+ HINTS -+ "${LIBEVENT2_DIR}" -+ "${LIBEVENT2_DIR}/lib" -+ ) -+ -+ set(LIBEVENT2_LIBRARIES "") -+ -+ if (LIBEVENT2_INCLUDE_DIR AND LIBEVENT2_LIBRARY) -+ if (NOT TARGET Libevent2::Libevent_core) -+ add_library(Libevent2::Libevent_core UNKNOWN IMPORTED) -+ set_target_properties(Libevent2::Libevent_core PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${LIBEVENT2_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${LIBEVENT2_LIBRARY}" -+ ) -+ endif () -+ -+ if (NOT LIBEVENT2_VERSION AND LIBEVENT2_INCLUDE_DIR AND EXISTS "${LIBEVENT2_INCLUDE_DIR}/event2/event.h") -+ file(STRINGS "${LIBEVENT2_INCLUDE_DIR}/event2/event-config.h" LIBEVENT2_H REGEX "^#define _?EVENT_+VERSION ") -+ string(REGEX REPLACE "^.*EVENT_+VERSION \"([^\"]+)\".*$" "\\1" LIBEVENT2_VERSION "${LIBEVENT2_H}") -+ endif () -+ endif() -+ -+ list(APPEND LIBEVENT2_LIBRARIES "${LIBEVENT2_LIBRARY}") -+endif() - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Libevent2 ---- cmake/modules/FindLibidn2.cmake -+++ cmake/modules/FindLibidn2.cmake -@@ -28,37 +28,49 @@ - - #]=======================================================================] - --find_path(LIBIDN2_INCLUDE_DIR idn2.h -- HINTS -- "${LIBIDN2_DIR}" -- "${LIBIDN2_DIR}/include" --) -- --find_library(LIBIDN2_LIBRARY NAMES idn2 libidn2 -- HINTS -- "${LIBIDN2_DIR}" -- "${LIBIDN2_DIR}/lib" --) -- --set(LIBIDN2_LIBRARIES "") -- --if (LIBIDN2_INCLUDE_DIR AND LIBIDN2_LIBRARY) -- if (NOT TARGET Libidn2::Libidn2) -- add_library(Libidn2::Libidn2 UNKNOWN IMPORTED) -- set_target_properties(Libidn2::Libidn2 PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${LIBIDN2_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${LIBIDN2_LIBRARY}" -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgLibIdn2 IMPORTED_TARGET GLOBAL libidn2) -+endif() -+ -+if(PkgLibIdn2_FOUND) -+ set(LIBIDN2_INCLUDE_DIR ${PkgLibIdn2_INCLUDE_DIRS}) -+ set(LIBIDN2_LIBRARIES ${PkgLibIdn2_LIBRARIES}) -+ set(LIBIDN2_VERSION ${PkgLibIdn2_VERSION}) -+ add_library(Libidn2::Libidn2 ALIAS PkgConfig::PkgLibIdn2) -+else() -+ find_path(LIBIDN2_INCLUDE_DIR idn2.h -+ HINTS -+ "${LIBIDN2_DIR}" -+ "${LIBIDN2_DIR}/include" -+ ) -+ -+ find_library(LIBIDN2_LIBRARY NAMES idn2 libidn2 -+ HINTS -+ "${LIBIDN2_DIR}" -+ "${LIBIDN2_DIR}/lib" -+ ) -+ -+ set(LIBIDN2_LIBRARIES "") -+ -+ if (LIBIDN2_INCLUDE_DIR AND LIBIDN2_LIBRARY) -+ if (NOT TARGET Libidn2::Libidn2) -+ add_library(Libidn2::Libidn2 UNKNOWN IMPORTED) -+ set_target_properties(Libidn2::Libidn2 PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${LIBIDN2_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${LIBIDN2_LIBRARY}" - ) -- endif () -+ endif () - -- if (NOT LIBIDN2_VERSION AND LIBIDN2_INCLUDE_DIR AND EXISTS "${LIBIDN2_INCLUDE_DIR}/unbound.h") -- file(STRINGS "${LIBIDN2_INCLUDE_DIR}/idn2.h" LIBIDN2_H REGEX "^#define IDN2_VERSION ") -- string(REGEX REPLACE "^.*IDN2_VERSION \"([0-9.]+)\".*$" "\\1" LIBIDN2_VERSION "${LIBIDN2_H}") -- endif () --endif() -+ if (NOT LIBIDN2_VERSION AND LIBIDN2_INCLUDE_DIR AND EXISTS "${LIBIDN2_INCLUDE_DIR}/unbound.h") -+ file(STRINGS "${LIBIDN2_INCLUDE_DIR}/idn2.h" LIBIDN2_H REGEX "^#define IDN2_VERSION ") -+ string(REGEX REPLACE "^.*IDN2_VERSION \"([0-9.]+)\".*$" "\\1" LIBIDN2_VERSION "${LIBIDN2_H}") -+ endif () - --list(APPEND LIBIDN2_LIBRARIES "${LIBIDN2_LIBRARY}") -+ list(APPEND LIBIDN2_LIBRARIES "${LIBIDN2_LIBRARY}") -+ endif() -+endif() - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Libidn2 ---- cmake/modules/FindLibunbound.cmake -+++ cmake/modules/FindLibunbound.cmake -@@ -28,58 +28,70 @@ - - #]=======================================================================] - --find_path(LIBUNBOUND_INCLUDE_DIR unbound.h -- HINTS -- "${LIBUNBOUND_DIR}" -- "${LIBUNBOUND_DIR}/include" --) -- --find_library(LIBUNBOUND_LIBRARY NAMES unbound -- HINTS -- "${LIBUNBOUND_DIR}" -- "${LIBUNBOUND_DIR}/lib" --) -- --set(LIBUNBOUND_LIBRARIES "") -- --if (UNIX) -- find_package(Threads REQUIRED) -- find_package(OpenSSL REQUIRED) -- -- list(APPEND LIBUNBOUND_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}") -- list(APPEND LIBUNBOUND_LIBRARIES "${OPENSSL_LIBRARIES}") -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgLibunbound IMPORTED_TARGET GLOBAL QUIET libunbound) - endif() - --if (LIBUNBOUND_INCLUDE_DIR AND LIBUNBOUND_LIBRARY) -- if (NOT TARGET Libunbound::Libunbound) -- add_library(Libunbound::Libunbound UNKNOWN IMPORTED) -- set_target_properties(Libunbound::Libunbound PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${LIBUNBOUND_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${LIBUNBOUND_LIBRARY}" -- ) -- -- if(UNIX AND TARGET Threads::Threads) -- set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -- INTERFACE_LINK_LIBRARIES Threads::Threads) -- endif () -- if(UNIX AND TARGET OpenSSL::SSL) -- set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -- INTERFACE_LINK_LIBRARIES OpenSSL::SSL) -+if(PkgLibunbound_FOUND) -+ set(LIBUNBOUND_INCLUDE_DIR ${PkgLibunbound_INCLUDE_DIRS}) -+ set(LIBUNBOUND_LIBRARIES ${PkgLibunbound_LIBRARIES}) -+ set(LIBUNBOUND_VERSION ${PkgLibunbound_VERSION}) -+ add_library(Libunbound::Libunbound ALIAS PkgConfig::PkgLibunbound) -+else() -+ find_path(LIBUNBOUND_INCLUDE_DIR unbound.h -+ HINTS -+ "${LIBUNBOUND_DIR}" -+ "${LIBUNBOUND_DIR}/include" -+ ) -+ -+ find_library(LIBUNBOUND_LIBRARY NAMES unbound -+ HINTS -+ "${LIBUNBOUND_DIR}" -+ "${LIBUNBOUND_DIR}/lib" -+ ) -+ -+ set(LIBUNBOUND_LIBRARIES "") -+ -+ if (UNIX) -+ find_package(Threads REQUIRED) -+ find_package(OpenSSL REQUIRED) -+ -+ list(APPEND LIBUNBOUND_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}") -+ list(APPEND LIBUNBOUND_LIBRARIES "${OPENSSL_LIBRARIES}") -+ endif() -+ -+ if (LIBUNBOUND_INCLUDE_DIR AND LIBUNBOUND_LIBRARY) -+ if (NOT TARGET Libunbound::Libunbound) -+ add_library(Libunbound::Libunbound UNKNOWN IMPORTED) -+ set_target_properties(Libunbound::Libunbound PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${LIBUNBOUND_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${LIBUNBOUND_LIBRARY}" -+ ) -+ -+ if(UNIX AND TARGET Threads::Threads) -+ set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -+ INTERFACE_LINK_LIBRARIES Threads::Threads) -+ endif () -+ if(UNIX AND TARGET OpenSSL::SSL) -+ set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -+ INTERFACE_LINK_LIBRARIES OpenSSL::SSL) -+ endif () -+ if(UNIX AND TARGET OpenSSL::Crypto) -+ set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -+ INTERFACE_LINK_LIBRARIES OpenSSL::Crypto) -+ endif () - endif () -- if(UNIX AND TARGET OpenSSL::Crypto) -- set_property(TARGET Libunbound::Libunbound APPEND PROPERTY -- INTERFACE_LINK_LIBRARIES OpenSSL::Crypto) -+ -+ if (NOT LIBUNBOUND_VERSION AND LIBUNBOUND_INCLUDE_DIR AND EXISTS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h") -+ file(STRINGS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h" LIBUNBOUND_H REGEX "^#define UNBOUND_VERSION_M[A-Z]+") -+ string(REGEX REPLACE "^.*MAJOR ([0-9]+).*MINOR ([0-9]+).*MICRO ([0-9]+).*$" "\\1.\\2.\\3" LIBUNBOUND_VERSION "${LIBUNBOUND_H}") - endif () -- endif () -- -- if (NOT LIBUNBOUND_VERSION AND LIBUNBOUND_INCLUDE_DIR AND EXISTS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h") -- file(STRINGS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h" LIBUNBOUND_H REGEX "^#define UNBOUND_VERSION_M[A-Z]+") -- string(REGEX REPLACE "^.*MAJOR ([0-9]+).*MINOR ([0-9]+).*MICRO ([0-9]+).*$" "\\1.\\2.\\3" LIBUNBOUND_VERSION "${LIBUNBOUND_H}") -- endif () --endif() -- --list(APPEND LIBUNBOUND_LIBRARIES "${LIBUNBOUND_LIBRARY}") -+ endif() -+ -+ list(APPEND LIBUNBOUND_LIBRARIES "${LIBUNBOUND_LIBRARY}") -+endif - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Libunbound ---- cmake/modules/FindLibuv.cmake -+++ cmake/modules/FindLibuv.cmake -@@ -28,42 +28,54 @@ - - #]=======================================================================] - --find_path(LIBUV_INCLUDE_DIR uv.h -- HINTS -- "${LIBUV_DIR}" -- "${LIBUV_DIR}/include" --) -- --find_library(LIBUV_LIBRARY NAMES uv libuv -- HINTS -- "${LIBUV_DIR}" -- "${LIBUV_DIR}/lib" --) -- --set(LIBUV_LIBRARIES "") -- --if (LIBUV_INCLUDE_DIR AND LIBUV_LIBRARY) -- if (NOT TARGET Libuv::Libuv) -- add_library(Libuv::Libuv UNKNOWN IMPORTED) -- set_target_properties(Libuv::Libuv PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${LIBUV_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${LIBUV_LIBRARY}" -- ) -- endif () -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgLibuv IMPORTED_TARGET GLOBAL QUIET libuv) -+endif() - -- if (NOT LIBUV_VERSION AND LIBUV_INCLUDE_DIR) -- if (EXISTS "${LIBUV_INCLUDE_DIR}/uv-version.h") -- file(STRINGS "${LIBUV_INCLUDE_DIR}/uv-version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ") -- elseif (EXISTS "${LIBUV_INCLUDE_DIR}/uv/version.h") -- file(STRINGS "${LIBUV_INCLUDE_DIR}/uv/version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ") -+if(PkgLibuv_FOUND) -+ set(LIBUV_INCLUDE_DIR ${PkgLibuv_INCLUDE_DIRS}) -+ set(LIBUV_LIBRARIES ${PkgLibuv_LIBRARIES}) -+ set(LIBUV_VERSION ${PkgLibuv_VERSION}) -+ add_library(Libuv::Libuv ALIAS PkgConfig::PkgLibuv) -+else() -+ find_path(LIBUV_INCLUDE_DIR uv.h -+ HINTS -+ "${LIBUV_DIR}" -+ "${LIBUV_DIR}/include" -+ ) -+ -+ find_library(LIBUV_LIBRARY NAMES uv libuv -+ HINTS -+ "${LIBUV_DIR}" -+ "${LIBUV_DIR}/lib" -+ ) -+ -+ set(LIBUV_LIBRARIES "") -+ -+ if (LIBUV_INCLUDE_DIR AND LIBUV_LIBRARY) -+ if (NOT TARGET Libuv::Libuv) -+ add_library(Libuv::Libuv UNKNOWN IMPORTED) -+ set_target_properties(Libuv::Libuv PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${LIBUV_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${LIBUV_LIBRARY}" -+ ) - endif () -- string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3" LIBUV_VERSION "${LIBUV_VER_H}") -- endif () -+ -+ if (NOT LIBUV_VERSION AND LIBUV_INCLUDE_DIR) -+ if (EXISTS "${LIBUV_INCLUDE_DIR}/uv-version.h") -+ file(STRINGS "${LIBUV_INCLUDE_DIR}/uv-version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ") -+ elseif (EXISTS "${LIBUV_INCLUDE_DIR}/uv/version.h") -+ file(STRINGS "${LIBUV_INCLUDE_DIR}/uv/version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ") -+ endif () -+ string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3" LIBUV_VERSION "${LIBUV_VER_H}") -+ endif () -+ endif() -+ -+ list(APPEND LIBUV_LIBRARIES "${LIBUV_LIBRARY}") - endif() - --list(APPEND LIBUV_LIBRARIES "${LIBUV_LIBRARY}") -- - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Libuv - REQUIRED_VARS LIBUV_LIBRARIES LIBUV_INCLUDE_DIR ---- cmake/modules/FindNettle.cmake -+++ cmake/modules/FindNettle.cmake -@@ -30,62 +30,76 @@ - - #]=======================================================================] - --find_path(NETTLE_INCLUDE_DIR nettle/version.h -- HINTS -- "${NETTLE_DIR}" -- "${NETTLE_DIR}/include" --) -- --find_library(NETTLE_LIBRARY NAMES nettle libnettle -- HINTS -- "${NETTLE_DIR}" -- "${NETTLE_DIR}/lib" --) -- --find_library(HOGWEED_LIBRARY NAMES hogweed libhogweed -- HINTS -- "${NETTLE_DIR}" -- "${NETTLE_DIR}/lib" --) -- --set(NETTLE_LIBRARIES "") -- --# May need gmp library on Unix. --if (UNIX) -- find_library(NETTLE_GMP_LIBRARY gmp) -- -- if (NETTLE_GMP_LIBRARY) -- list(APPEND NETTLE_LIBRARIES "${NETTLE_GMP_LIBRARY}") -- endif () --endif () -- --if (NETTLE_INCLUDE_DIR AND NETTLE_LIBRARY AND HOGWEED_LIBRARY) -- if (NOT TARGET Nettle::Nettle) -- add_library(Nettle::Nettle UNKNOWN IMPORTED) -- set_target_properties(Nettle::Nettle PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}" -- INTERFACE_LINK_LIBRARIES "${NETTLE_LIBRARIES}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${NETTLE_LIBRARY}" -- ) -- endif () -- if (NOT TARGET Nettle::Hogweed) -- add_library(Nettle::Hogweed UNKNOWN IMPORTED) -- set_target_properties(Nettle::Hogweed PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}" -- IMPORTED_LINK_INTERFACE_LANGUAGES "C" -- IMPORTED_LOCATION "${HOGWEED_LIBRARY}" -- ) -- endif () -+include(FindPkgConfig) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PkgNettle IMPORTED_TARGET GLOBAL nettle) -+ pkg_check_modules(PkgHogweed IMPORTED_TARGET GLOBAL QUIET hogweed) -+endif() - -- if (NOT NETTLE_VERSION AND NETTLE_INCLUDE_DIR) -- file(STRINGS "${NETTLE_INCLUDE_DIR}/nettle/version.h" NETTLE_VER_H REGEX "^#define NETTLE_VERSION_(MAJOR|MINOR) ") -- string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*$" "\\1.\\2" NETTLE_VERSION "${NETTLE_VER_H}") -+if(PkgNettle_FOUND AND PkHogweed_FOUND) -+ set(NETTLE_INCLUDE_DIR ${PkgNettle_INCLUDE_DIRS} ${PkgHogweed_INCLUDE_DIRS}) -+ set(NETTLE_LIBRARIES ${PkgNettle_LIBRARIES} ${PkgHogweed_LIBRARIES}) -+ set(NETTLE_VERSION ${PkgNettle_VERSION}) -+ add_library(Nettle::Nettle ALIAS PkgConfig::PkgNettle) -+ add_library(Nettle::Hogweed ALIAS PkgConfig::PkgHogweed) -+else() -+ find_path(NETTLE_INCLUDE_DIR nettle/version.h -+ HINTS -+ "${NETTLE_DIR}" -+ "${NETTLE_DIR}/include" -+ ) -+ -+ find_library(NETTLE_LIBRARY NAMES nettle libnettle -+ HINTS -+ "${NETTLE_DIR}" -+ "${NETTLE_DIR}/lib" -+ ) -+ -+ find_library(HOGWEED_LIBRARY NAMES hogweed libhogweed -+ HINTS -+ "${NETTLE_DIR}" -+ "${NETTLE_DIR}/lib" -+ ) -+ -+ set(NETTLE_LIBRARIES "") -+ -+ # May need gmp library on Unix. -+ if (UNIX) -+ find_library(NETTLE_GMP_LIBRARY gmp) -+ -+ if (NETTLE_GMP_LIBRARY) -+ list(APPEND NETTLE_LIBRARIES "${NETTLE_GMP_LIBRARY}") -+ endif () - endif () -+ -+ if (NETTLE_INCLUDE_DIR AND NETTLE_LIBRARY AND HOGWEED_LIBRARY) -+ if (NOT TARGET Nettle::Nettle) -+ add_library(Nettle::Nettle UNKNOWN IMPORTED) -+ set_target_properties(Nettle::Nettle PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}" -+ INTERFACE_LINK_LIBRARIES "${NETTLE_LIBRARIES}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${NETTLE_LIBRARY}" -+ ) -+ endif () -+ if (NOT TARGET Nettle::Hogweed) -+ add_library(Nettle::Hogweed UNKNOWN IMPORTED) -+ set_target_properties(Nettle::Hogweed PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}" -+ IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ IMPORTED_LOCATION "${HOGWEED_LIBRARY}" -+ ) -+ endif () -+ -+ if (NOT NETTLE_VERSION AND NETTLE_INCLUDE_DIR) -+ file(STRINGS "${NETTLE_INCLUDE_DIR}/nettle/version.h" NETTLE_VER_H REGEX "^#define NETTLE_VERSION_(MAJOR|MINOR) ") -+ string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*$" "\\1.\\2" NETTLE_VERSION "${NETTLE_VER_H}") -+ endif () -+ endif() -+ -+ list(APPEND NETTLE_LIBRARIES "${NETTLE_LIBRARY}" "${HOGWEED_LIBRARY}") - endif() - --list(APPEND NETTLE_LIBRARIES "${NETTLE_LIBRARY}" "${HOGWEED_LIBRARY}") -- - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Nettle - REQUIRED_VARS NETTLE_LIBRARIES NETTLE_INCLUDE_DIR diff --git a/recipes/getdns/all/patches/1.6.0-0004-dont-install-symlinked-license.patch b/recipes/getdns/all/patches/1.6.0-0004-dont-install-symlinked-license.patch deleted file mode 100644 index fadb8d2d20e5f..0000000000000 --- a/recipes/getdns/all/patches/1.6.0-0004-dont-install-symlinked-license.patch +++ /dev/null @@ -1,16 +0,0 @@ -Avoids weird issue on c3i Windows builders: - - CMake Error at source_subfolder/cmake_install.cmake:104 (file): - file INSTALL cannot read symlink - "C:/J/w/cci_PR-2903@2/.conan/data/getdns/1.6.0/_/_/build/dd6d0e14f162a68e24ee52fee674d130eac57dea/source_subfolder/COPYING" - to duplicate at - "C:/J/w/cci_PR-2903@2/.conan/data/getdns/1.6.0/_/_/package/dd6d0e14f162a68e24ee52fee674d130eac57dea/share/doc/getdns/COPYING": - File exists. - Call Stack (most recent call first): - - ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -1080,1 +1080,1 @@ --install(FILES AUTHORS ChangeLog COPYING LICENSE NEWS README.md DESTINATION ${docdir}) -+install(FILES AUTHORS ChangeLog NEWS README.md DESTINATION ${docdir}) diff --git a/recipes/getdns/all/patches/1.7.3-fix-windows-build.patch b/recipes/getdns/all/patches/1.7.3-fix-windows-build.patch new file mode 100644 index 0000000000000..dc0f91e105f96 --- /dev/null +++ b/recipes/getdns/all/patches/1.7.3-fix-windows-build.patch @@ -0,0 +1,121 @@ +From bfd53d3cc3afbf199fa27f74bf4b35c1ad955c2e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rados=C5=82aw=20Szkodzi=C5=84ski?= +Date: Tue, 3 Jan 2023 14:14:07 +0100 +Subject: [PATCH] Fix Windows build + +Fixes all found instances of missing APIs and headers on Windows. +--- + src/anchor.c | 12 ++++++++++++ + src/compat/mkstemp.c | 6 +++--- + src/gldns/parse.c | 2 +- + src/gldns/parseutil.c | 2 ++ + src/stub.c | 5 +++++ + 5 files changed, 23 insertions(+), 4 deletions(-) + +diff --git a/src/anchor.c b/src/anchor.c +index f50c4a3d1..fc357b649 100644 +--- a/src/anchor.c ++++ b/src/anchor.c +@@ -551,7 +551,11 @@ static void tas_rinse(getdns_context *context, tas_connection *a) + GETDNS_CLEAR_EVENT(a->loop, &a->event); + a->event.ev = NULL; + if (a->fd >= 0) ++#ifdef USE_WINSOCK ++ closesocket(a->fd); ++#else + close(a->fd); ++#endif + a->fd = -1; + if (a->xml.data) + GETDNS_FREE(context->mf, a->xml.data); +@@ -662,7 +666,11 @@ static void tas_reconnect_cb(void *userarg) + , "Waiting for second document timeout. Reconnecting...\n"); + + GETDNS_CLEAR_EVENT(a->loop, &a->event); ++#ifdef USE_WINSOCK ++ closesocket(a->fd); ++#else + close(a->fd); ++#endif + a->fd = -1; + if (a->state == TAS_READ_PS7_HDR) { + a->state = TAS_RETRY; +@@ -778,7 +786,11 @@ static void tas_read_cb(void *userarg) + if (n == 0) { + DEBUG_ANCHOR("Connection closed\n"); + GETDNS_CLEAR_EVENT(a->loop, &a->event); ++#ifdef USE_WINSOCK ++ closesocket(a->fd); ++#else + close(a->fd); ++#endif + a->fd = -1; + if (a->state == TAS_READ_PS7_HDR) { + a->state = TAS_RETRY; +diff --git a/src/compat/mkstemp.c b/src/compat/mkstemp.c +index 49d3e919a..86d1dfd67 100644 +--- a/src/compat/mkstemp.c ++++ b/src/compat/mkstemp.c +@@ -30,14 +30,14 @@ + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +-#include +-#include + #include ++#include + #include ++#include + + int mkstemp(char *template) + { + if (_mktemp_s(template, strlen(template) + 1) != 0) + return -1; +- return open(template, _O_CREAT | _O_EXCL | _O_RDWR, _S_IWRITE | _S_IREAD); ++ return _open(template, _O_CREAT | _O_EXCL | _O_RDWR, _S_IWRITE | _S_IREAD); + } +diff --git a/src/gldns/parse.c b/src/gldns/parse.c +index 367fa80f3..c107c0df9 100644 +--- a/src/gldns/parse.c ++++ b/src/gldns/parse.c +@@ -13,7 +13,7 @@ + #include "gldns/gbuffer.h" + + #include +-#include ++#include + + gldns_lookup_table gldns_directive_types[] = { + { GLDNS_DIR_TTL, "$TTL" }, +diff --git a/src/gldns/parseutil.c b/src/gldns/parseutil.c +index 293496a90..1e4367898 100644 +--- a/src/gldns/parseutil.c ++++ b/src/gldns/parseutil.c +@@ -14,7 +14,9 @@ + + #include "config.h" + #include "gldns/parseutil.h" ++#ifdef HAVE_SYS_TIME_H + #include ++#endif + #include + #include + +diff --git a/src/stub.c b/src/stub.c +index ee3193126..ab393885d 100644 +--- a/src/stub.c ++++ b/src/stub.c +@@ -903,8 +903,13 @@ stub_tcp_write(int fd, getdns_tcp_state *tcp, getdns_network_req *netreq) + just fall back to a 'normal' write. */ + if (written == -1 + && _getdns_socketerror() == _getdns_EISCONN) ++#ifdef USE_WINSOCK ++ written = send(fd, (const char *)(netreq->query - 2) ++ , pkt_len + 2, 0); ++#else + written = write(fd, netreq->query - 2 + , pkt_len + 2); ++#endif + } else + written = send(fd, (const char *)(netreq->query - 2) + , pkt_len + 2, 0); diff --git a/recipes/getdns/all/test_package/CMakeLists.txt b/recipes/getdns/all/test_package/CMakeLists.txt index 3a403dc404b41..e78d760c7b17a 100644 --- a/recipes/getdns/all/test_package/CMakeLists.txt +++ b/recipes/getdns/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup() +find_package(getdns REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE getdns::getdns) diff --git a/recipes/getdns/all/test_package/conanfile.py b/recipes/getdns/all/test_package/conanfile.py index bd7165a553cf4..ef5d7042163ec 100644 --- a/recipes/getdns/all/test_package/conanfile.py +++ b/recipes/getdns/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -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", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/getdns/all/test_package/test_package.c b/recipes/getdns/all/test_package/test_package.c index c55c14f559026..b60140d92b44b 100644 --- a/recipes/getdns/all/test_package/test_package.c +++ b/recipes/getdns/all/test_package/test_package.c @@ -1,26 +1,10 @@ #include "getdns.h" -#include #include -#define CHECK(V) if ((V) != GETDNS_RETURN_GOOD) { \ - fprintf(stderr, "Fail: " #V "!\n"); \ - return 1; \ -} - -int main() -{ - getdns_context *context; - CHECK(getdns_context_create(&context, 1)); - getdns_dict *info = getdns_context_get_api_information(context); - if (info == NULL) { - fprintf(stderr, "Could not get api information\n"); - return 1; - } - char *txt = getdns_pretty_print_dict(info); - printf("%s\n", txt); - free(txt); - getdns_dict_destroy(info); +int main() { + getdns_context *context = NULL; + getdns_context_create(&context, 0); getdns_context_destroy(context); - return 0; + return EXIT_SUCCESS; } diff --git a/recipes/grpc/all/test_v1_package/CMakeLists.txt b/recipes/getdns/all/test_v1_package/CMakeLists.txt similarity index 72% rename from recipes/grpc/all/test_v1_package/CMakeLists.txt rename to recipes/getdns/all/test_v1_package/CMakeLists.txt index f16bc97992e86..91630d79f4abb 100644 --- a/recipes/grpc/all/test_v1_package/CMakeLists.txt +++ b/recipes/getdns/all/test_v1_package/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.8) -project(test_v1_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.15) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) diff --git a/recipes/box2d/2.4.x/test_v1_package/conanfile.py b/recipes/getdns/all/test_v1_package/conanfile.py similarity index 92% rename from recipes/box2d/2.4.x/test_v1_package/conanfile.py rename to recipes/getdns/all/test_v1_package/conanfile.py index 7513484720425..7e2dfe859bb27 100644 --- a/recipes/box2d/2.4.x/test_v1_package/conanfile.py +++ b/recipes/getdns/all/test_v1_package/conanfile.py @@ -1,8 +1,8 @@ -import os from conans import ConanFile, CMake, tools +import os -class Box2DTestConan(ConanFile): +class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake", "cmake_find_package_multi" diff --git a/recipes/getdns/config.yml b/recipes/getdns/config.yml index 10acb3ad5b1e8..e14fae48c780f 100644 --- a/recipes/getdns/config.yml +++ b/recipes/getdns/config.yml @@ -1,3 +1,3 @@ versions: - "1.6.0": + "1.7.3": folder: "all" diff --git a/recipes/ginkgo/all/conandata.yml b/recipes/ginkgo/all/conandata.yml index 8927c006e472b..471710d33e7c9 100644 --- a/recipes/ginkgo/all/conandata.yml +++ b/recipes/ginkgo/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.8.0": + url: "https://github.com/ginkgo-project/ginkgo/archive/v1.8.0.tar.gz" + sha256: "421efaed1be2ef11d230b79fc68bcf7e264a2c57ae52aff6dec7bd90f8d4ae30" "1.7.0": url: "https://github.com/ginkgo-project/ginkgo/archive/v1.7.0.tar.gz" sha256: "f4b362bcb046bc53fbe2e578662b939222d0c44b96449101829e73ecce02bcb3" diff --git a/recipes/ginkgo/all/conanfile.py b/recipes/ginkgo/all/conanfile.py index 89bbd2a608d1e..9eb411b3e5186 100644 --- a/recipes/ginkgo/all/conanfile.py +++ b/recipes/ginkgo/all/conanfile.py @@ -2,7 +2,13 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.files import ( + apply_conandata_patches, + copy, + export_conandata_patches, + get, + rmdir, +) from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version import os @@ -43,7 +49,7 @@ def _min_cppstd(self): def _minimum_compilers_version(self): return { "Visual Studio": "16", - "msvc": "192", + "msvc": "193", "gcc": "5.4", "clang": "3.9", "apple-clang": "10.0", @@ -126,7 +132,12 @@ def build(self): cmake.build() def package(self): - copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + 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", "cmake")) @@ -139,56 +150,85 @@ def package_info(self): debug_suffix = "d" if self.settings.build_type == "Debug" else "" has_dpcpp_device = Version(self.version) >= "1.4.0" + # Shared MSVC builds ues a separate library for part of Ginkgo since 1.8.0 + has_config_library = Version(self.version) >= "1.8.0" and self.options.shared and self.settings.os == "Windows" - self.cpp_info.components["ginkgo_core"].set_property("cmake_target_name", "Ginkgo::ginkgo") - self.cpp_info.components["ginkgo_core"].set_property("pkg_config_name", "ginkgo") - self.cpp_info.components["ginkgo_core"].libs = [ - "ginkgo" + debug_suffix] + self.cpp_info.components["ginkgo_core"].set_property( + "cmake_target_name", "Ginkgo::ginkgo" + ) + self.cpp_info.components["ginkgo_core"].set_property( + "pkg_config_name", "ginkgo" + ) + self.cpp_info.components["ginkgo_core"].libs = ["ginkgo" + debug_suffix] self.cpp_info.components["ginkgo_core"].requires = [ - "ginkgo_omp", "ginkgo_cuda", "ginkgo_reference", "ginkgo_hip" + "ginkgo_omp", + "ginkgo_cuda", + "ginkgo_reference", + "ginkgo_hip", ] - self.cpp_info.components["ginkgo_cuda"].set_property("cmake_target_name", "Ginkgo::ginkgo_cuda") - self.cpp_info.components["ginkgo_cuda"].libs = [ - "ginkgo_cuda" + debug_suffix] + self.cpp_info.components["ginkgo_cuda"].set_property( + "cmake_target_name", "Ginkgo::ginkgo_cuda" + ) + self.cpp_info.components["ginkgo_cuda"].libs = ["ginkgo_cuda" + debug_suffix] self.cpp_info.components["ginkgo_cuda"].requires = ["ginkgo_hip"] - self.cpp_info.components["ginkgo_omp"].set_property("cmake_target_name", "Ginkgo::ginkgo_omp") - self.cpp_info.components["ginkgo_omp"].libs = [ - "ginkgo_omp" + debug_suffix] - self.cpp_info.components["ginkgo_omp"].requires = [ - "ginkgo_cuda", "ginkgo_hip"] + self.cpp_info.components["ginkgo_omp"].set_property( + "cmake_target_name", "Ginkgo::ginkgo_omp" + ) + self.cpp_info.components["ginkgo_omp"].libs = ["ginkgo_omp" + debug_suffix] + self.cpp_info.components["ginkgo_omp"].requires = ["ginkgo_cuda", "ginkgo_hip"] - self.cpp_info.components["ginkgo_hip"].set_property("cmake_target_name", "Ginkgo::ginkgo_hip") - self.cpp_info.components["ginkgo_hip"].libs = [ - "ginkgo_hip" + debug_suffix] + self.cpp_info.components["ginkgo_hip"].set_property( + "cmake_target_name", "Ginkgo::ginkgo_hip" + ) + self.cpp_info.components["ginkgo_hip"].libs = ["ginkgo_hip" + debug_suffix] - self.cpp_info.components["ginkgo_reference"].set_property("cmake_target_name", "Ginkgo::ginkgo_reference") + self.cpp_info.components["ginkgo_reference"].set_property( + "cmake_target_name", "Ginkgo::ginkgo_reference" + ) self.cpp_info.components["ginkgo_reference"].libs = [ - "ginkgo_reference" + debug_suffix] + "ginkgo_reference" + debug_suffix + ] - if has_dpcpp_device: # Always add these components + if has_dpcpp_device: # Always add these components # See https://github.com/conan-io/conan-center-index/pull/7044#discussion_r698181588 self.cpp_info.components["ginkgo_core"].requires += ["ginkgo_dpcpp"] self.cpp_info.components["ginkgo_core"].requires += ["ginkgo_device"] - self.cpp_info.components["ginkgo_dpcpp"].set_property("cmake_target_name", "Ginkgo::ginkgo_dpcpp") + self.cpp_info.components["ginkgo_dpcpp"].set_property( + "cmake_target_name", "Ginkgo::ginkgo_dpcpp" + ) self.cpp_info.components["ginkgo_dpcpp"].libs = [ - "ginkgo_dpcpp" + debug_suffix] + "ginkgo_dpcpp" + debug_suffix + ] - self.cpp_info.components["ginkgo_device"].set_property("cmake_target_name", "Ginkgo::ginkgo_device") + self.cpp_info.components["ginkgo_device"].set_property( + "cmake_target_name", "Ginkgo::ginkgo_device" + ) self.cpp_info.components["ginkgo_device"].libs = [ - "ginkgo_device" + debug_suffix] + "ginkgo_device" + debug_suffix + ] self.cpp_info.components["ginkgo_omp"].requires += [ - "ginkgo_dpcpp", "ginkgo_device"] + "ginkgo_dpcpp", + "ginkgo_device", + ] self.cpp_info.components["ginkgo_reference"].requires += ["ginkgo_device"] self.cpp_info.components["ginkgo_hip"].requires += ["ginkgo_device"] self.cpp_info.components["ginkgo_cuda"].requires += ["ginkgo_device"] self.cpp_info.components["ginkgo_dpcpp"].requires += ["ginkgo_device"] + + if has_config_library: + self.cpp_info.components["ginkgo_core"].requires += ["ginkgo_config"] + + self.cpp_info.components["ginkgo_config"].set_property("cmake_target_name", "Ginkgo::ginkgo_core") + self.cpp_info.components["ginkgo_config"].libs = ["ginkgo_core" + debug_suffix] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "Ginkgo" self.cpp_info.names["cmake_find_package_multi"] = "Ginkgo" self.cpp_info.components["ginkgo_core"].names["cmake_find_package"] = "ginkgo" - self.cpp_info.components["ginkgo_core"].names["cmake_find_package_multi"] = "ginkgo" + self.cpp_info.components["ginkgo_core"].names[ + "cmake_find_package_multi" + ] = "ginkgo" diff --git a/recipes/ginkgo/config.yml b/recipes/ginkgo/config.yml index 4283c517286f9..ae16141456580 100644 --- a/recipes/ginkgo/config.yml +++ b/recipes/ginkgo/config.yml @@ -1,4 +1,6 @@ versions: + "1.8.0": + folder: all "1.7.0": folder: all "1.4.0": diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index cec95d7e33d7e..c11e5e4c425da 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,4 +1,23 @@ sources: + "3.3.4": + url: "https://github.com/stephenberry/glaze/archive/v3.3.4.tar.gz" + sha256: "7fe31c14e7ede69d937aa8f126894fef11ebf3156f25cb95446d3d6d38e9da9c" + "3.3.2": + url: "https://github.com/stephenberry/glaze/archive/v3.3.2.tar.gz" + sha256: "e492d3f662c3c096ce7abac86780af6c84f74c4f19b29223ad92fccc054aafad" + "3.3.1": + url: "https://github.com/stephenberry/glaze/archive/v3.3.1.tar.gz" + sha256: "edb16f7b75bf9a7c86a704c006a9859474e1d49467f8ddeabdc8c3a3d5a982a2" + "3.1.9": + url: "https://github.com/stephenberry/glaze/archive/v3.1.9.tar.gz" + sha256: "adfce5acc9d3d88525c006a525e8f21d2a4bb628b5f7022720625f052d88a73d" + "3.1.7": + url: "https://github.com/stephenberry/glaze/archive/v3.1.7.tar.gz" + sha256: "388483bb3dfa1fe25c1dfec24f0afd1651e0303833cfa1b7f51020a2569e992a" + # keep 2.9.5 for c++20 compilers + "2.9.5": + url: "https://github.com/stephenberry/glaze/archive/v2.9.5.tar.gz" + sha256: "67fda0fb0cc701451c261bb1e0c94d63bafaaba13390527521e02a034eff085e" "2.9.2": url: "https://github.com/stephenberry/glaze/archive/v2.9.2.tar.gz" sha256: "8dec57645517cd89631d965ad13888e49ccdb3c037a6bb099fcabadfb093d4fe" diff --git a/recipes/glaze/all/conanfile.py b/recipes/glaze/all/conanfile.py index 85bb474d8c75b..ab2848babbb5d 100644 --- a/recipes/glaze/all/conanfile.py +++ b/recipes/glaze/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc import os required_conan_version = ">=1.51.1" @@ -21,17 +22,26 @@ class GlazeConan(ConanFile): @property def _min_cppstd(self): - return 20 + return "20" if Version(self.version) < "3.0.0" else "23" @property def _compilers_minimum_version(self): return { - "Visual Studio": "17", - "msvc": "193", - "gcc": "11" if Version(self.version) < "2.6.3" else "12", - "clang": "14", - "apple-clang": "13.1", - } + "20": { + "Visual Studio": "17", + "msvc": "193", + "gcc": "11" if Version(self.version) < "2.6.3" else "12", + "clang": "14", + "apple-clang": "13.1", + }, + "23": { + "Visual Studio": "17", + "msvc": "193", + "gcc": "12", + "clang": "15", + "apple-clang": "14", + }, + }.get(self._min_cppstd, {}) def layout(self): basic_layout(self, src_folder="src") @@ -69,3 +79,5 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + if is_msvc(self): + self.cpp_info.cxxflags.append("/Zc:preprocessor") diff --git a/recipes/glaze/all/test_package/CMakeLists.txt b/recipes/glaze/all/test_package/CMakeLists.txt index 4811c5114c3c2..fc973c8b2b019 100644 --- a/recipes/glaze/all/test_package/CMakeLists.txt +++ b/recipes/glaze/all/test_package/CMakeLists.txt @@ -1,8 +1,12 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.20) project(test_package LANGUAGES CXX) find_package(glaze REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE glaze::glaze) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +if(glaze_VERSION VERSION_GREATER_EQUAL "3.0.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_23) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +endif() diff --git a/recipes/glaze/all/test_package/conanfile.py b/recipes/glaze/all/test_package/conanfile.py index a9fb96656f203..9fd1075c52a6b 100644 --- a/recipes/glaze/all/test_package/conanfile.py +++ b/recipes/glaze/all/test_package/conanfile.py @@ -15,6 +15,9 @@ def requirements(self): def layout(self): cmake_layout(self) + def build_requirements(self): + self.tool_requires("cmake/[>=3.20 <4]") + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index 38ee5a2a97729..6dffeb3a2ef50 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,4 +1,16 @@ versions: + "3.3.4": + folder: all + "3.3.2": + folder: all + "3.3.1": + folder: all + "3.1.9": + folder: all + "3.1.7": + folder: all + "2.9.5": + folder: all "2.9.2": folder: all "2.9.0": diff --git a/recipes/glib/all/conandata.yml b/recipes/glib/all/conandata.yml index 826e4f114106f..9723a1277a5c1 100644 --- a/recipes/glib/all/conandata.yml +++ b/recipes/glib/all/conandata.yml @@ -1,39 +1,33 @@ sources: + "2.81.0": + url: "https://download.gnome.org/sources/glib/2.81/glib-2.81.0.tar.xz" + sha256: "1665188ed9cc941c0a189dc6295e6859872523d1bfc84a5a84732a7ae87b02e4" "2.78.3": url: "https://download.gnome.org/sources/glib/2.78/glib-2.78.3.tar.xz" sha256: "609801dd373796e515972bf95fc0b2daa44545481ee2f465c4f204d224b2bc21" - "2.78.1": - url: "https://download.gnome.org/sources/glib/2.78/glib-2.78.1.tar.xz" - sha256: "915bc3d0f8507d650ead3832e2f8fb670fce59aac4d7754a7dab6f1e6fed78b2" - "2.78.0": - url: "https://download.gnome.org/sources/glib/2.78/glib-2.78.0.tar.xz" - sha256: "44eaab8b720877ce303c5540b657b126f12dc94972d9880b52959f43fb537b30" "2.77.3": url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.3.tar.xz" sha256: "1753f963bb680b28a83d6e2095f63d0d4b94244675bcd2603850b2ebc1ac6a61" - "2.77.2": - url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.2.tar.xz" - sha256: "16279739e4d30ec47be3e82909f5aeaaa41a8206bae3bead10a23fb2deff02a6" - "2.77.1": - url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.1.tar.xz" - sha256: "dce8d0c9e916d8c81a64436bd4ee4d6515a52dd3d157c994e1cdb9b3d6300a03" - "2.77.0": - url: "https://download.gnome.org/sources/glib/2.77/glib-2.77.0.tar.xz" - sha256: "1897fd8ad4ebb523c32fabe7508c3b0b039c089661ae1e7917df0956a320ac4d" "2.76.3": url: "https://download.gnome.org/sources/glib/2.76/glib-2.76.3.tar.xz" sha256: "c0be444e403d7c3184d1f394f89f0b644710b5e9331b54fa4e8b5037813ad32a" - "2.75.3": - url: "https://download.gnome.org/sources/glib/2.75/glib-2.75.3.tar.xz" - sha256: "7c517d0aff456c35a039bce8a8df7a08ce95a8285b09d1849f8865f633f7f871" patches: + "2.81.0": + - patch_file: "patches/dont-use-python-packaging-2.81.0.patch" + patch_type: bugfix + patch_description: replace package.version.Version by internal code + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3352 + "2.78.3": + - patch_file: "patches/remove-distutils-2.77.0.patch" + patch_type: bugfix + patch_description: remove distutils + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 "2.76.3": - patch_file: "patches/libintl-discovery.patch" patch_type: bugfix patch_description: fix libintl discovery patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3352 - "2.75.3": - - patch_file: "patches/libintl-discovery-2.75.3.patch" + - patch_file: "patches/remove-distutils.patch" patch_type: bugfix - patch_description: fix libintl discovery - patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3352 + patch_description: remove distutils + patch_source: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4133 diff --git a/recipes/glib/all/conanfile.py b/recipes/glib/all/conanfile.py index 6ccdcc81fb42a..491dcc7587018 100644 --- a/recipes/glib/all/conanfile.py +++ b/recipes/glib/all/conanfile.py @@ -54,6 +54,9 @@ def config_options(self): if is_msvc(self): del self.options.with_elf + if self.settings.os == "Neutrino": + del self.options.with_elf + def configure(self): if self.options.shared: self.options.rm_safe("fPIC") @@ -72,7 +75,7 @@ def requirements(self): if self.options.get_safe("with_mount"): self.requires("libmount/2.39") if self.options.get_safe("with_selinux"): - self.requires("libselinux/3.5") + self.requires("libselinux/3.6") if self.settings.os != "Linux": # for Linux, gettext is provided by libc self.requires("libgettext/0.22", transitive_headers=True, transitive_libs=True) @@ -81,7 +84,7 @@ def requirements(self): self.requires("libiconv/1.17") def build_requirements(self): - self.tool_requires("meson/1.2.2") + self.tool_requires("meson/[>=1.2.3 <2]") if not self.conf.get("tools.gnu:pkg_config", check_type=str): self.tool_requires("pkgconf/2.0.3") @@ -97,10 +100,16 @@ def generate(self): tc.project_options["selinux"] = "enabled" if self.options.get_safe("with_selinux") else "disabled" tc.project_options["libmount"] = "enabled" if self.options.get_safe("with_mount") else "disabled" - if self.settings.os == "FreeBSD": + if self.settings.os == "FreeBSD" or self.settings.os == "Neutrino": tc.project_options["xattr"] = "false" tc.project_options["tests"] = "false" tc.project_options["libelf"] = "enabled" if self.options.get_safe("with_elf") else "disabled" + + if self.settings.os == "Neutrino": + tc.cross_build["host"]["system"] = "qnx" + tc.c_link_args.append("-lm") + tc.c_link_args.append("-lsocket") + tc.generate() def _patch_sources(self): @@ -110,7 +119,7 @@ def _patch_sources(self): "subdir('fuzzing')", "#subdir('fuzzing')", ) # https://gitlab.gnome.org/GNOME/glib/-/issues/2152 - if self.settings.os != "Linux": + if self.settings.os != "Linux" and self.settings.os != "Neutrino": # allow to find gettext replace_in_file(self, os.path.join(self.source_folder, "meson.build"), @@ -197,6 +206,15 @@ def package_info(self): self.cpp_info.components["gthread-2.0"].system_libs.append("pthread") self.cpp_info.components["gio-2.0"].system_libs.append("dl") + if self.settings.os == "Neutrino": + self.cpp_info.components["gmodule-export-2.0"].sharedlinkflags.append("-Wl,--export-dynamic") + self.cpp_info.components["gmodule-2.0"].sharedlinkflags.append("-Wl,--export-dynamic") + self.cpp_info.components["glib-2.0"].system_libs.append("m") + self.cpp_info.components["glib-2.0"].system_libs.append("socket") + self.cpp_info.components["gmodule-no-export-2.0"].system_libs.append("c") + self.cpp_info.components["gio-2.0"].system_libs.append("c") + self.cpp_info.components["gio-2.0"].system_libs.append("socket") + if self.settings.os == "Windows": self.cpp_info.components["glib-2.0"].system_libs += ["ws2_32", "ole32", "shell32", "user32", "advapi32"] self.cpp_info.components["gio-2.0"].system_libs.extend(["iphlpapi", "dnsapi", "shlwapi"]) diff --git a/recipes/glib/all/patches/dont-use-python-packaging-2.81.0.patch b/recipes/glib/all/patches/dont-use-python-packaging-2.81.0.patch new file mode 100644 index 0000000000000..a97c9a79ae133 --- /dev/null +++ b/recipes/glib/all/patches/dont-use-python-packaging-2.81.0.patch @@ -0,0 +1,148 @@ +diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in +index 9c409e6..1913b6d 100755 +--- a/gio/gdbus-2.0/codegen/gdbus-codegen.in ++++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in +@@ -1,4 +1,4 @@ +-#!@PYTHON@ ++#!/usr/bin/env @PYTHON@ + + # GDBus - GLib D-Bus Library + # +diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build +index 67ea9f2..2ee1fc8 100644 +--- a/gio/gdbus-2.0/codegen/meson.build ++++ b/gio/gdbus-2.0/codegen/meson.build +@@ -31,7 +31,7 @@ gdbus_codegen_conf = configuration_data() + gdbus_codegen_conf.set('VERSION', glib_version) + gdbus_codegen_conf.set('MAJOR_VERSION', major_version) + gdbus_codegen_conf.set('MINOR_VERSION', minor_version) +-gdbus_codegen_conf.set('PYTHON', python.full_path()) ++gdbus_codegen_conf.set('PYTHON', python_name) + gdbus_codegen_conf.set('DATADIR', glib_datadir) + + # Install gdbus-codegen executable +diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py +index 6399945..86024d7 100644 +--- a/gio/gdbus-2.0/codegen/utils.py ++++ b/gio/gdbus-2.0/codegen/utils.py +@@ -21,10 +21,9 @@ + # + # Author: David Zeuthen + +-import packaging.version + import os + import sys +- ++import re + + # pylint: disable=too-few-public-methods + class Color: +@@ -161,11 +160,35 @@ def lookup_brief_docs(annotations): + def version_cmp_key(key): + # If the 'since' version is 'UNRELEASED', compare higher than anything else + # If it is empty put a 0 in its place as this will +- # allow LooseVersion to work and will always compare lower. ++ # allow _parse_version() to work and will always compare lower. + if key[0] == "UNRELEASED": + v = "9999" + elif key[0]: + v = str(key[0]) + else: + v = "0" +- return (packaging.version.Version(v), key[1]) ++ return (_parse_version(v), key[1]) ++ ++ ++def _parse_version(version): ++ """ ++ Parse a version string into a list of integers and strings. ++ ++ This function takes a version string and breaks it down into its component parts. ++ It separates numeric and non-numeric segments, converting numeric segments to integers. ++ ++ Args: ++ version (str): The version string to parse. ++ ++ Returns: ++ list: A list where each element is either an integer (for numeric parts) ++ or a string (for non-numeric parts). ++ ++ Example: ++ >>> parseversion("1.2.3a") ++ [1, 2, 3, 'a'] ++ >>> parseversion("2.0.0-rc1") ++ [2, 0, 0, 'rc1'] ++ """ ++ blocks = re.findall(r"(\d+|\w+)", version) ++ return [int(b) if b.isdigit() else b for b in blocks] +diff --git a/glib/gtester-report.in b/glib/gtester-report.in +index 0745d53..b8291d2 100644 +--- a/glib/gtester-report.in ++++ b/glib/gtester-report.in +@@ -1,4 +1,4 @@ +-#!@PYTHON@ ++#! /usr/bin/env @PYTHON@ + # GLib Testing Framework Utility -*- Mode: python; -*- + # Copyright (C) 2007 Imendio AB + # Authors: Tim Janik +diff --git a/glib/meson.build b/glib/meson.build +index b2dd569..5c29bb7 100644 +--- a/glib/meson.build ++++ b/glib/meson.build +@@ -502,7 +502,7 @@ endif + + report_conf = configuration_data() + report_conf.set('GLIB_VERSION', glib_version) +-report_conf.set('PYTHON', python.full_path()) ++report_conf.set('PYTHON', python_name) + configure_file( + input: 'gtester-report.in', + output: 'gtester-report', +diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in +index 0578b74..aa5af43 100755 +--- a/gobject/glib-genmarshal.in ++++ b/gobject/glib-genmarshal.in +@@ -1,4 +1,4 @@ +-#!@PYTHON@ ++#!/usr/bin/env @PYTHON@ + + # pylint: disable=too-many-lines, missing-docstring, invalid-name + +diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in +index 7e794e9..e10b910 100755 +--- a/gobject/glib-mkenums.in ++++ b/gobject/glib-mkenums.in +@@ -1,4 +1,4 @@ +-#!@PYTHON@ ++#!/usr/bin/env @PYTHON@ + + # If the code below looks horrible and unpythonic, do not panic. + # +diff --git a/gobject/meson.build b/gobject/meson.build +index 78b732b..2129aaf 100644 +--- a/gobject/meson.build ++++ b/gobject/meson.build +@@ -87,7 +87,7 @@ python_tools = [ + + python_tools_conf = configuration_data() + python_tools_conf.set('VERSION', glib_version) +-python_tools_conf.set('PYTHON', python.full_path()) ++python_tools_conf.set('PYTHON', python_name) + + foreach tool: python_tools + tool_bin = configure_file( +diff --git a/meson.build b/meson.build +index bcc2887..6cca73d 100644 +--- a/meson.build ++++ b/meson.build +@@ -2457,7 +2457,9 @@ endif + + glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline) + +-python = import('python').find_installation(modules: ['packaging']) ++python = import('python').find_installation() ++# used for '#!/usr/bin/env ' ++python_name = 'python3' + + python_version = python.language_version() + python_version_req = '>=3.7' diff --git a/recipes/glib/all/patches/libintl-discovery-2.75.3.patch b/recipes/glib/all/patches/libintl-discovery-2.75.3.patch deleted file mode 100644 index 0df94096d0615..0000000000000 --- a/recipes/glib/all/patches/libintl-discovery-2.75.3.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 32249a22fc39319651e7c23442d37ec837f05764 Mon Sep 17 00:00:00 2001 -From: Nirbheek Chauhan -Date: Thu, 8 Sep 2022 02:36:33 +0530 -Subject: [PATCH] meson: Fix detection of a system-provided proxy-libintl - -proxy-libintl defines ngettext() as a define in the header that points -to the actual symbol in the library which is g_libintl_ngettext(). -Same with bind_textdomain_codeset(). ---- - meson.build | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/meson.build b/meson.build -index 0cbc9689f5..de0bee5a39 100644 ---- a/meson.build -+++ b/meson.build -@@ -2088,6 +2088,7 @@ libz_dep = dependency('zlib') - # FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible - # implementations. This could be extended if issues are found in some platforms. - libintl_deps = [] -+libintl_prefix = '#include ' - libintl = dependency('intl', required: false, allow_fallback: false) - if libintl.found() - # libintl supports different threading APIs, which may not -@@ -2099,11 +2100,11 @@ if libintl.found() - # - # Meson's builtin dependency lookup as of 0.60.0 doesn't check for - # pthread, so we do this manually here. -- if cc.has_function('ngettext', dependencies : libintl) -+ if cc.has_function('ngettext', dependencies : libintl, prefix: libintl_prefix) - libintl_deps += [libintl] - else - libintl_pthread = cc.find_library('pthread', required : false) -- if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread]) -+ if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread], prefix: libintl_prefix) - libintl_deps += [libintl, libintl_pthread] - else - libintl = disabler() -@@ -2112,7 +2113,7 @@ if libintl.found() - endif - - if libintl.found() -- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', dependencies: libintl_deps) -+ have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', dependencies: libintl_deps, prefix: libintl_prefix) - else - libintl = dependency('intl', allow_fallback: true) - assert(libintl.type_name() == 'internal') --- -GitLab diff --git a/recipes/glib/all/patches/remove-distutils-2.77.0.patch b/recipes/glib/all/patches/remove-distutils-2.77.0.patch new file mode 100644 index 0000000000000..ba054b959ca4f --- /dev/null +++ b/recipes/glib/all/patches/remove-distutils-2.77.0.patch @@ -0,0 +1,51 @@ +diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py +index 0204610..f8d758c 100644 +--- a/gio/gdbus-2.0/codegen/utils.py ++++ b/gio/gdbus-2.0/codegen/utils.py +@@ -19,7 +19,7 @@ + # + # Author: David Zeuthen + +-import distutils.version ++import re + import os + import sys + +@@ -159,11 +159,35 @@ def lookup_brief_docs(annotations): + def version_cmp_key(key): + # If the 'since' version is 'UNRELEASED', compare higher than anything else + # If it is empty put a 0 in its place as this will +- # allow LooseVersion to work and will always compare lower. ++ # allow _parse_version() to work and will always compare lower. + if key[0] == "UNRELEASED": + v = "9999" + elif key[0]: + v = str(key[0]) + else: + v = "0" +- return (distutils.version.LooseVersion(v), key[1]) ++ return (_parse_version(v), key[1]) ++ ++ ++def _parse_version(version): ++ """ ++ Parse a version string into a list of integers and strings. ++ ++ This function takes a version string and breaks it down into its component parts. ++ It separates numeric and non-numeric segments, converting numeric segments to integers. ++ ++ Args: ++ version (str): The version string to parse. ++ ++ Returns: ++ list: A list where each element is either an integer (for numeric parts) ++ or a string (for non-numeric parts). ++ ++ Example: ++ >>> parseversion("1.2.3a") ++ [1, 2, 3, 'a'] ++ >>> parseversion("2.0.0-rc1") ++ [2, 0, 0, 'rc1'] ++ """ ++ blocks = re.findall(r"(\d+|\w+)", version) ++ return [int(b) if b.isdigit() else b for b in blocks] diff --git a/recipes/glib/all/patches/remove-distutils.patch b/recipes/glib/all/patches/remove-distutils.patch new file mode 100644 index 0000000000000..3096261030b0d --- /dev/null +++ b/recipes/glib/all/patches/remove-distutils.patch @@ -0,0 +1,51 @@ +diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py +index 95559d3..2b7a176 100644 +--- a/gio/gdbus-2.0/codegen/utils.py ++++ b/gio/gdbus-2.0/codegen/utils.py +@@ -19,7 +19,7 @@ + # + # Author: David Zeuthen + +-import distutils.version ++import re + import os + import sys + +@@ -155,11 +155,35 @@ def lookup_brief_docs(annotations): + def version_cmp_key(key): + # If the 'since' version is 'UNRELEASED', compare higher than anything else + # If it is empty put a 0 in its place as this will +- # allow LooseVersion to work and will always compare lower. ++ # allow _parse_version() to work and will always compare lower. + if key[0] == "UNRELEASED": + v = "9999" + elif key[0]: + v = str(key[0]) + else: + v = "0" +- return (distutils.version.LooseVersion(v), key[1]) ++ return (_parse_version(v), key[1]) ++ ++ ++def _parse_version(version): ++ """ ++ Parse a version string into a list of integers and strings. ++ ++ This function takes a version string and breaks it down into its component parts. ++ It separates numeric and non-numeric segments, converting numeric segments to integers. ++ ++ Args: ++ version (str): The version string to parse. ++ ++ Returns: ++ list: A list where each element is either an integer (for numeric parts) ++ or a string (for non-numeric parts). ++ ++ Example: ++ >>> parseversion("1.2.3a") ++ [1, 2, 3, 'a'] ++ >>> parseversion("2.0.0-rc1") ++ [2, 0, 0, 'rc1'] ++ """ ++ blocks = re.findall(r"(\d+|\w+)", version) ++ return [int(b) if b.isdigit() else b for b in blocks] diff --git a/recipes/glib/config.yml b/recipes/glib/config.yml index f0bd1289c0ca6..178cce999a640 100644 --- a/recipes/glib/config.yml +++ b/recipes/glib/config.yml @@ -1,19 +1,9 @@ versions: - "2.78.3": - folder: all - "2.78.1": + "2.81.0": folder: all - "2.78.0": + "2.78.3": folder: all "2.77.3": folder: all - "2.77.2": - folder: all - "2.77.1": - folder: all - "2.77.0": - folder: all "2.76.3": folder: all - "2.75.3": - folder: all diff --git a/recipes/glibmm/all/conandata.yml b/recipes/glibmm/all/conandata.yml index 171a01a50da60..830679f3678f2 100644 --- a/recipes/glibmm/all/conandata.yml +++ b/recipes/glibmm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.78.1": + url: "https://download.gnome.org/sources/glibmm/2.78/glibmm-2.78.1.tar.xz" + sha256: "f473f2975d26c3409e112ed11ed36406fb3843fa975df575c22d4cb843085f61" "2.75.0": url: "https://download.gnome.org/sources/glibmm/2.75/glibmm-2.75.0.tar.xz" sha256: "60bb12e66488aa8ce41f0eb2f3612f89f5ddc887e3e4d45498524bf60b266b3d" @@ -8,26 +11,3 @@ sources: "2.66.4": url: "https://download.gnome.org/sources/glibmm/2.66/glibmm-2.66.4.tar.xz" sha256: "199ace5682d81b15a1d565480b4a950682f2db6402c8aa5dd7217d71edff81d5" - -patches: - "2.75.0": - - patch_file: "patches/enable_static_libs_2_75_0.patch" - patch_type: portability - patch_description: enable static library build for msvc - - patch_file: "patches/fix_initialization_order_fiasco_2_75_0.patch" - patch_type: bugfix - patch_description: fix initialization order for static library - "2.72.1": - - patch_file: "patches/enable_static_libs_2_72_1.patch" - patch_type: portability - patch_description: enable static library build for msvc - - patch_file: "patches/fix_initialization_order_fiasco_2_72_1.patch" - patch_type: bugfix - patch_description: fix initialization order for static library - "2.66.4": - - patch_file: "patches/enable_static_libs_2_66_4.patch" - patch_type: portability - patch_description: enable static library build for msvc - - patch_file: "patches/fix_initialization_order_fiasco_2_66_4.patch" - patch_type: bugfix - patch_description: fix initialization order for static library diff --git a/recipes/glibmm/all/conanfile.py b/recipes/glibmm/all/conanfile.py index a6d3f4c904bd4..d36d4666df42d 100644 --- a/recipes/glibmm/all/conanfile.py +++ b/recipes/glibmm/all/conanfile.py @@ -1,22 +1,13 @@ -import os import glob +import os import shutil -from conan import ConanFile, conan_version +from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name from conan.tools.build import check_min_cppstd from conan.tools.env import VirtualBuildEnv -from conan.tools.files import ( - apply_conandata_patches, - copy, - export_conandata_patches, - get, - replace_in_file, - rename, - rm, - rmdir -) +from conan.tools.files import copy, get, replace_in_file, rm, rmdir from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain @@ -33,16 +24,8 @@ class GlibmmConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" description = "glibmm is a C++ API for parts of glib that are useful for C++." topics = ("giomm",) - package_type = "library" + package_type = "shared-library" settings = "os", "arch", "compiler", "build_type" - options = { - "shared": [True, False], - "fPIC": [True, False], - } - default_options = { - "shared": False, - "fPIC": True, - } short_paths = True @property @@ -57,25 +40,14 @@ def _glibmm_lib(self): def _giomm_lib(self): return f"giomm-{self._abi_version}" - def export_sources(self): - export_conandata_patches(self) - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - if self.options.shared: - wildcard = "" if Version(conan_version) < "2.0.0" else "/*" - self.options[f"glib{wildcard}"].shared = True + self.options["glib"].shared = True def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.78.0", transitive_headers=True) + self.requires("glib/2.78.3", transitive_headers=True) if self._abi_version == "2.68": self.requires("libsigcpp/3.0.7", transitive_headers=True) else: @@ -83,12 +55,12 @@ def requirements(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): - if self._abi_version == "2.68": + if Version(self._abi_version) >= "2.68": check_min_cppstd(self, 17) else: check_min_cppstd(self, 11) - if self.options.shared and not self.dependencies["glib"].options.shared: + if not self.dependencies["glib"].options.shared: raise ConanInvalidConfiguration( "Linking a shared library against static glib can cause unexpected behaviour." ) @@ -97,9 +69,9 @@ def validate(self): raise ConanInvalidConfiguration("Linking shared glib with the MSVC static runtime is not supported") def build_requirements(self): - self.tool_requires("meson/1.2.2") + self.tool_requires("meson/1.3.2") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -120,22 +92,9 @@ def generate(self): tc.generate() def _patch_sources(self): - apply_conandata_patches(self) meson_build = os.path.join(self.source_folder, "meson.build") replace_in_file(self, meson_build, "subdir('tests')", "") if is_msvc(self): - # GLiBMM_GEN_EXTRA_DEFS_STATIC is not defined anywhere and is not - # used anywhere except here - # when building a static build !defined(GLiBMM_GEN_EXTRA_DEFS_STATIC) - # evaluates to 0 - if not self.options.shared: - replace_in_file(self, - os.path.join(self.source_folder, "tools", - "extra_defs_gen", "generate_extra_defs.h"), - "#if defined (_MSC_VER) && !defined (GLIBMM_GEN_EXTRA_DEFS_STATIC)", - "#if 0", - ) - # when using cpp_std=c++NM the /permissive- flag is added which # attempts enforcing standard conformant c++ code # the problem is that older versions of Windows SDK is not standard @@ -150,15 +109,6 @@ def build(self): meson.build() def package(self): - def rename_msvc_static_libs(): - lib_folder = os.path.join(self.package_folder, "lib") - rename(self, os.path.join(lib_folder, f"libglibmm-{self._abi_version}.a"), - os.path.join(lib_folder, f"{self._glibmm_lib}.lib")) - rename(self, os.path.join(lib_folder, f"libgiomm-{self._abi_version}.a"), - os.path.join(lib_folder, f"{self._giomm_lib}.lib")) - rename(self, os.path.join(lib_folder, f"libglibmm_generate_extra_defs-{self._abi_version}.a"), - os.path.join(lib_folder, f"glibmm_generate_extra_defs-{self._abi_version}.lib")) - meson = Meson(self) meson.install() @@ -166,8 +116,6 @@ def rename_msvc_static_libs(): if is_msvc(self): rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) - if not self.options.shared: - rename_msvc_static_libs() for directory in [self._glibmm_lib, self._giomm_lib]: directory_path = os.path.join(self.package_folder, "lib", directory, "include", "*.h") diff --git a/recipes/glibmm/all/patches/enable_static_libs_2_66_4.patch b/recipes/glibmm/all/patches/enable_static_libs_2_66_4.patch deleted file mode 100644 index c94b5200949f7..0000000000000 --- a/recipes/glibmm/all/patches/enable_static_libs_2_66_4.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/glib/glibmmconfig.h.meson b/glib/glibmmconfig.h.meson -index e50dcccf..19e64a46 100644 ---- a/glib/glibmmconfig.h.meson -+++ b/glib/glibmmconfig.h.meson -@@ -47,7 +47,9 @@ - # if defined(_MSC_VER) - # define GLIBMM_MSC 1 - # define GLIBMM_WIN32 1 --# define GLIBMM_DLL 1 -+# ifndef GLIBMM_STATIC_LIB -+# define GLIBMM_DLL 1 -+# endif - # elif defined(__CYGWIN__) - # define GLIBMM_CONFIGURE 1 - # elif defined(__MINGW32__) -diff --git a/glib/meson.build b/glib/meson.build -index 4feee0fd..9382645a 100644 ---- a/glib/meson.build -+++ b/glib/meson.build -@@ -36,12 +36,6 @@ pkg_conf_data.set('MSVC_TOOLSET_VER', msvc14x_toolset_ver) - - library_build_type = get_option('default_library') - --if cpp_compiler.get_argument_syntax() == 'msvc' -- if library_build_type == 'static' or library_build_type == 'both' -- error('Static builds are not supported by MSVC-style builds') -- endif --endif -- - if library_build_type == 'static' - pkg_conf_data.set('GLIBMM_STATIC_LIB', 1) - pkg_conf_data.set('GIOMM_STATIC_LIB', 1) diff --git a/recipes/glibmm/all/patches/enable_static_libs_2_72_1.patch b/recipes/glibmm/all/patches/enable_static_libs_2_72_1.patch deleted file mode 100644 index b9ec412d84d2e..0000000000000 --- a/recipes/glibmm/all/patches/enable_static_libs_2_72_1.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/glib/glibmmconfig.h.meson b/glib/glibmmconfig.h.meson -index ef4753d..58b343c 100644 ---- a/glib/glibmmconfig.h.meson -+++ b/glib/glibmmconfig.h.meson -@@ -27,7 +27,9 @@ - # if defined(_MSC_VER) - # define GLIBMM_MSC 1 - # define GLIBMM_WIN32 1 --# define GLIBMM_DLL 1 -+# ifndef GLIBMM_STATIC_LIB -+# define GLIBMM_DLL 1 -+# endif - # elif defined(__CYGWIN__) - # define GLIBMM_CONFIGURE 1 - # elif defined(__MINGW32__) -diff --git a/glib/meson.build b/glib/meson.build -index 0c20a91..6b8baa0 100644 ---- a/glib/meson.build -+++ b/glib/meson.build -@@ -36,12 +36,6 @@ pkg_conf_data.set('MSVC_TOOLSET_VER', msvc14x_toolset_ver) - - library_build_type = get_option('default_library') - --if cpp_compiler.get_argument_syntax() == 'msvc' -- if library_build_type == 'static' or library_build_type == 'both' -- error('Static builds are not supported by MSVC-style builds') -- endif --endif -- - if library_build_type == 'static' - pkg_conf_data.set('GLIBMM_STATIC_LIB', 1) - pkg_conf_data.set('GIOMM_STATIC_LIB', 1) diff --git a/recipes/glibmm/all/patches/enable_static_libs_2_75_0.patch b/recipes/glibmm/all/patches/enable_static_libs_2_75_0.patch deleted file mode 100644 index f24c64bb5bd54..0000000000000 --- a/recipes/glibmm/all/patches/enable_static_libs_2_75_0.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/glib/glibmmconfig.h.meson b/glib/glibmmconfig.h.meson -index ef4753d7..b926720b 100644 ---- a/glib/glibmmconfig.h.meson -+++ b/glib/glibmmconfig.h.meson -@@ -27,7 +27,9 @@ - # if defined(_MSC_VER) - # define GLIBMM_MSC 1 - # define GLIBMM_WIN32 1 --# define GLIBMM_DLL 1 -+# ifndef GLIBMM_STATIC_LIB -+# define GLIBMM_DLL 1 -+# endif - # elif defined(__CYGWIN__) - # define GLIBMM_CONFIGURE 1 - # elif defined(__MINGW32__) -diff --git a/glib/meson.build b/glib/meson.build -index d16621e9..3eb8bc47 100644 ---- a/glib/meson.build -+++ b/glib/meson.build -@@ -37,12 +37,6 @@ pkg_conf_data.set('MSVC_TOOLSET_VER', msvc14x_toolset_ver) - - library_build_type = get_option('default_library') - --if cpp_compiler.get_argument_syntax() == 'msvc' -- if library_build_type == 'static' or library_build_type == 'both' -- error('Static builds are not supported by MSVC-style builds') -- endif --endif -- - if library_build_type == 'static' - pkg_conf_data.set('GLIBMM_STATIC_LIB', 1) - pkg_conf_data.set('GIOMM_STATIC_LIB', 1) diff --git a/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_66_4.patch b/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_66_4.patch deleted file mode 100644 index 3cf9f867ed1f0..0000000000000 --- a/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_66_4.patch +++ /dev/null @@ -1,163 +0,0 @@ -Author: Hesham -Date: Fri May 6 20:02:25 2022 +0000 - - Fix initialization order fiasco - - By default global static initialization with shared libraries begins down - the linking chain upwards, so that the deepest dependency initializes first - This is not guaranteed with static libraries, which might cause glibmm to - initialize before glib. This fix uses lazy initialization for static vars - in glibmm that depend on glib. - -diff --git a/glib/glibmm/class.cc b/glib/glibmm/class.cc -index 057abed..e51d01b 100644 ---- a/glib/glibmm/class.cc -+++ b/glib/glibmm/class.cc -@@ -170,7 +170,11 @@ Class::clone_custom_type( - } - - // Initialize the static quark to store/get custom type properties. -+#if GLIB_STATIC_COMPILATION -+GQuark Class::iface_properties_quark = 0; -+#else - GQuark Class::iface_properties_quark = g_quark_from_string("gtkmm_CustomObject_iface_properties"); -+#endif - - // static - void -diff --git a/glib/glibmm/init.cc b/glib/glibmm/init.cc -index ab96892..267a6c0 100644 ---- a/glib/glibmm/init.cc -+++ b/glib/glibmm/init.cc -@@ -14,15 +14,25 @@ - * License along with this library. If not, see . - */ - -+#include - #include - #include - -+#if GLIB_STATIC_COMPILATION -+#include -+#endif -+ - namespace Glib - { - - void - init() - { -+#if GLIB_STATIC_COMPILATION -+ Glib::Class::iface_properties_quark = -+ g_quark_from_string("gtkmm_CustomObject_iface_properties"); -+#endif -+ - // Also calls Glib::wrap_register_init() and Glib::wrap_init(). - Glib::Error::register_init(); - } -diff --git a/glib/glibmm/property.cc b/glib/glibmm/property.cc -index a2624e5..d9f1095 100644 ---- a/glib/glibmm/property.cc -+++ b/glib/glibmm/property.cc -@@ -89,8 +89,10 @@ struct custom_properties_type - }; - - // The quark used for storing/getting the custom properties of custom types. --static const GQuark custom_properties_quark = -- g_quark_from_string("gtkmm_CustomObject_custom_properties"); -+static const GQuark& custom_properties_quark() { -+ static const GQuark custom_properties_quark_ = g_quark_from_string("gtkmm_CustomObject_custom_properties"); -+ return custom_properties_quark_; -+} - - // Delete the custom properties data when an object of a custom type is finalized. - void destroy_notify_obj_custom_props(void* data) -@@ -111,12 +113,12 @@ custom_properties_type* - get_obj_custom_props(GObject* obj) - { - auto obj_custom_props = -- static_cast(g_object_get_qdata(obj, custom_properties_quark)); -+ static_cast(g_object_get_qdata(obj, custom_properties_quark())); - if (!obj_custom_props) - { - obj_custom_props = new custom_properties_type(); - g_object_set_qdata_full( -- obj, custom_properties_quark, obj_custom_props, destroy_notify_obj_custom_props); -+ obj, custom_properties_quark(), obj_custom_props, destroy_notify_obj_custom_props); - } - return obj_custom_props; - } -diff --git a/untracked/gio/giomm/application.cc b/untracked/gio/giomm/application.cc -index 43ae9df..0d12c9d 100644 ---- a/untracked/gio/giomm/application.cc -+++ b/untracked/gio/giomm/application.cc -@@ -51,8 +51,13 @@ struct ExtraApplicationData - } - }; - --GQuark quark_extra_application_data = -- g_quark_from_string("glibmm__Gio::Application::quark_extra_application_data"); -+static GQuark& -+quark_extra_application_data() -+{ -+ static GQuark quark_extra_application_data_ = -+ g_quark_from_string("glibmm__Gio::Application::quark_extra_application_data"); -+ return quark_extra_application_data_; -+} - - void - Application_delete_extra_application_data(gpointer data) -@@ -465,11 +470,11 @@ Application::add_main_option_entry_private(GOptionArg arg, const Glib::ustring& - gchar* arg_desc = arg_description.empty() ? nullptr : g_strdup(arg_description.c_str()); - - ExtraApplicationData* extra_application_data = -- static_cast(g_object_get_qdata(gobject_, quark_extra_application_data)); -+ static_cast(g_object_get_qdata(gobject_, quark_extra_application_data())); - if (!extra_application_data) - { - extra_application_data = new ExtraApplicationData(); -- g_object_set_qdata_full(gobject_, quark_extra_application_data, extra_application_data, -+ g_object_set_qdata_full(gobject_, quark_extra_application_data(), extra_application_data, - Application_delete_extra_application_data); - } - -@@ -1546,5 +1551,3 @@ void Gio::Application::run_mainloop_vfunc() - - - } // namespace Gio -- -- -diff --git a/untracked/glib/glibmm/binding.cc b/untracked/glib/glibmm/binding.cc -index d0d4f47..0528893 100644 ---- a/untracked/glib/glibmm/binding.cc -+++ b/untracked/glib/glibmm/binding.cc -@@ -29,7 +29,10 @@ - namespace - { - // TODO: When we can break ABI, replace this GQuark by a new data member in Glib::Binding. --GQuark quark_manage = g_quark_from_string("glibmm__Glib::Binding::manage"); -+GQuark& quark_manage() { -+ static GQuark quark_manage_ = g_quark_from_string("glibmm__Glib::Binding::manage"); -+ return quark_manage_; -+} - - struct BindingTransformSlots - { -@@ -150,7 +153,7 @@ Binding::unbind() - void - Binding::unreference() const - { -- if (!g_object_get_qdata(gobject_, quark_manage)) -+ if (!g_object_get_qdata(gobject_, quark_manage())) - { - GBinding* const binding = const_cast(gobj()); - -@@ -168,7 +171,7 @@ void - Binding::set_manage() - { - // Any pointer can be set, just not nullptr. -- g_object_set_qdata(gobject_, quark_manage, this); -+ g_object_set_qdata(gobject_, quark_manage(), this); - } - - const Glib::RefPtr& diff --git a/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_72_1.patch b/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_72_1.patch deleted file mode 100644 index e2f8e705abbe0..0000000000000 --- a/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_72_1.patch +++ /dev/null @@ -1,95 +0,0 @@ -Author: Hesham -Date: Fri May 6 19:37:32 2022 +0000 - - Fix initialization order fiasco - - By default global static initialization with shared libraries begins down - the linking chain upwards, so that the deepest dependency initializes first - This is not guaranteed with static libraries, which might cause glibmm to - initialize before glib. This fix uses lazy initialization for static vars - in glibmm that depend on glib. - -diff --git a/glib/glibmm/class.cc b/glib/glibmm/class.cc -index 36c3c4b..f735129 100644 ---- a/glib/glibmm/class.cc -+++ b/glib/glibmm/class.cc -@@ -157,7 +157,11 @@ Class::clone_custom_type( - } - - // Initialize the static quark to store/get custom type properties. -+#if GLIB_STATIC_COMPILATION -+GQuark Class::iface_properties_quark = 0; -+#else - GQuark Class::iface_properties_quark = g_quark_from_string("gtkmm_CustomObject_iface_properties"); -+#endif - - // static - void -diff --git a/glib/glibmm/init.cc b/glib/glibmm/init.cc -index 0b34447..6b70a4c 100644 ---- a/glib/glibmm/init.cc -+++ b/glib/glibmm/init.cc -@@ -14,12 +14,17 @@ - * License along with this library. If not, see . - */ - -+#include - #include - #include - #include - #include - #include - -+#if GLIB_STATIC_COMPILATION -+#include -+#endif -+ - namespace - { - bool init_to_users_preferred_locale = true; -@@ -45,6 +50,11 @@ void init() - if (is_initialized) - return; - -+#if GLIB_STATIC_COMPILATION -+ Glib::Class::iface_properties_quark = -+ g_quark_from_string("gtkmm_CustomObject_iface_properties"); -+#endif -+ - if (init_to_users_preferred_locale) - { - try -diff --git a/glib/glibmm/property.cc b/glib/glibmm/property.cc -index 56dad84..630b35b 100644 ---- a/glib/glibmm/property.cc -+++ b/glib/glibmm/property.cc -@@ -89,8 +89,12 @@ struct custom_properties_type - }; - - // The quark used for storing/getting the custom properties of custom types. --static const GQuark custom_properties_quark = -- g_quark_from_string("gtkmm_CustomObject_custom_properties"); -+static const GQuark& -+custom_properties_quark() -+{ -+ static GQuark custom_properties_quark_ = g_quark_from_string("gtkmm_CustomObject_custom_properties"); -+ return custom_properties_quark_; -+} - - // Delete the custom properties data when an object of a custom type is finalized. - void destroy_notify_obj_custom_props(void* data) -@@ -111,12 +115,12 @@ custom_properties_type* - get_obj_custom_props(GObject* obj) - { - auto obj_custom_props = -- static_cast(g_object_get_qdata(obj, custom_properties_quark)); -+ static_cast(g_object_get_qdata(obj, custom_properties_quark())); - if (!obj_custom_props) - { - obj_custom_props = new custom_properties_type(); - g_object_set_qdata_full( -- obj, custom_properties_quark, obj_custom_props, destroy_notify_obj_custom_props); -+ obj, custom_properties_quark(), obj_custom_props, destroy_notify_obj_custom_props); - } - return obj_custom_props; - } diff --git a/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_75_0.patch b/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_75_0.patch deleted file mode 100644 index 6a24ae04d3038..0000000000000 --- a/recipes/glibmm/all/patches/fix_initialization_order_fiasco_2_75_0.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff --git a/glib/glibmm/class.cc b/glib/glibmm/class.cc -index 31f92c61..f5befb2d 100644 ---- a/glib/glibmm/class.cc -+++ b/glib/glibmm/class.cc -@@ -166,7 +166,11 @@ Class::clone_custom_type( - } - - // Initialize the static quark to store/get custom type properties. -+#if GLIB_STATIC_COMPILATION -+GQuark Class::iface_properties_quark = 0; -+#else - GQuark Class::iface_properties_quark = g_quark_from_string("gtkmm_CustomObject_iface_properties"); -+#endif - - // static - void -diff --git a/glib/glibmm/init.cc b/glib/glibmm/init.cc -index 0b34447d..6b70a4c2 100644 ---- a/glib/glibmm/init.cc -+++ b/glib/glibmm/init.cc -@@ -14,12 +14,17 @@ - * License along with this library. If not, see . - */ - -+#include - #include - #include - #include - #include - #include - -+#if GLIB_STATIC_COMPILATION -+#include -+#endif -+ - namespace - { - bool init_to_users_preferred_locale = true; -@@ -45,6 +50,11 @@ void init() - if (is_initialized) - return; - -+#if GLIB_STATIC_COMPILATION -+ Glib::Class::iface_properties_quark = -+ g_quark_from_string("gtkmm_CustomObject_iface_properties"); -+#endif -+ - if (init_to_users_preferred_locale) - { - try -diff --git a/glib/glibmm/property.cc b/glib/glibmm/property.cc -index 56dad849..630b35b1 100644 ---- a/glib/glibmm/property.cc -+++ b/glib/glibmm/property.cc -@@ -89,8 +89,12 @@ struct custom_properties_type - }; - - // The quark used for storing/getting the custom properties of custom types. --static const GQuark custom_properties_quark = -- g_quark_from_string("gtkmm_CustomObject_custom_properties"); -+static const GQuark& -+custom_properties_quark() -+{ -+ static GQuark custom_properties_quark_ = g_quark_from_string("gtkmm_CustomObject_custom_properties"); -+ return custom_properties_quark_; -+} - - // Delete the custom properties data when an object of a custom type is finalized. - void destroy_notify_obj_custom_props(void* data) -@@ -111,12 +115,12 @@ custom_properties_type* - get_obj_custom_props(GObject* obj) - { - auto obj_custom_props = -- static_cast(g_object_get_qdata(obj, custom_properties_quark)); -+ static_cast(g_object_get_qdata(obj, custom_properties_quark())); - if (!obj_custom_props) - { - obj_custom_props = new custom_properties_type(); - g_object_set_qdata_full( -- obj, custom_properties_quark, obj_custom_props, destroy_notify_obj_custom_props); -+ obj, custom_properties_quark(), obj_custom_props, destroy_notify_obj_custom_props); - } - return obj_custom_props; - } diff --git a/recipes/glibmm/config.yml b/recipes/glibmm/config.yml index 6aaa4e9d859bb..c3ca69bc81afd 100644 --- a/recipes/glibmm/config.yml +++ b/recipes/glibmm/config.yml @@ -1,4 +1,6 @@ versions: + "2.78.1": + folder: "all" "2.75.0": folder: "all" "2.72.1": diff --git a/recipes/glslang/all/conanfile.py b/recipes/glslang/all/conanfile.py index 6582079e3edd8..2302eb69e2d87 100644 --- a/recipes/glslang/all/conanfile.py +++ b/recipes/glslang/all/conanfile.py @@ -233,3 +233,9 @@ def package_info(self): if self.options.build_executables: self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) + + if Version(self.version) >= "1.3.243": + self.cpp_info.components["glslang-default-resource-limits"].set_property("cmake_target_name", "glslang::glslang-default-resource-limits") + self.cpp_info.components["glslang-default-resource-limits"].names["cmake_find_package"] = "glslang-default-resource-limits" + self.cpp_info.components["glslang-default-resource-limits"].names["cmake_find_package_multi"] = "glslang-default-resource-limits" + self.cpp_info.components["glslang-default-resource-limits"].libs = [f"glslang-default-resource-limits{lib_suffix}"] diff --git a/recipes/gn/all/conandata.yml b/recipes/gn/all/conandata.yml index 171741d9a625a..7bda923d38021 100644 --- a/recipes/gn/all/conandata.yml +++ b/recipes/gn/all/conandata.yml @@ -1,3 +1,5 @@ sources: + "cci.20240611": + url: "https://gn.googlesource.com/gn/+archive/b2afae122eeb6ce09c52d63f67dc53fc517dbdc8.tar.gz" "cci.20210429": url: "https://gn.googlesource.com/gn/+archive/6771ce569fb4803dad7a427aa2e2c23e960b917e.tar.gz" diff --git a/recipes/gn/all/conanfile.py b/recipes/gn/all/conanfile.py index 2511e879a6bf4..4d70a7b853851 100644 --- a/recipes/gn/all/conanfile.py +++ b/recipes/gn/all/conanfile.py @@ -35,27 +35,37 @@ def package_id(self): del self.info.settings.compiler @property - def _minimum_compiler_version_supporting_cxx17(self): - return { - "Visual Studio": 15, - "msvc": 191, - "gcc": 7, - "clang": 4, - "apple-clang": 10, - }.get(str(self.settings.compiler)) + def _min_cppstd(self): + if self.version == "cci.20210429": + return 17 + else: + return 20 + + @property + def _minimum_compiler_version(self): + if self._min_cppstd == 17: + return { + "Visual Studio": 15, + "msvc": 191, + "gcc": 7, + "clang": 4, + "apple-clang": 10, + }.get(str(self.settings.compiler)) + else: + return { + "gcc": "11", + "clang": "12", + "apple-clang": "15", + "msvc": "192", + "Visual Studio": "16", + } def validate_build(self): if self.settings.compiler.cppstd: - check_min_cppstd(self, 17) - else: - if self._minimum_compiler_version_supporting_cxx17: - if Version(self.settings.compiler.version) < self._minimum_compiler_version_supporting_cxx17: - raise ConanInvalidConfiguration("gn requires a compiler supporting c++17") - else: - self.output.warning( - "gn recipe does not recognize the compiler. gn requires a compiler supporting c++17." - " Assuming it does." - ) + check_min_cppstd(self, self._min_cppstd) + if self._minimum_compiler_version and Version(self.settings.compiler.version) < self._minimum_compiler_version: + raise ConanInvalidConfiguration(f"gn requires a compiler supporting C++{self._min_cppstd}") + def build_requirements(self): # FIXME: add cpython build requirements for `build/gen.py`. diff --git a/recipes/gn/config.yml b/recipes/gn/config.yml index 7831e6ed51225..864345cea83ba 100644 --- a/recipes/gn/config.yml +++ b/recipes/gn/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20240611": + folder: all "cci.20210429": folder: all diff --git a/recipes/gobject-introspection/all/conandata.yml b/recipes/gobject-introspection/all/conandata.yml index 47eccc41d1faf..4203b61eacd08 100644 --- a/recipes/gobject-introspection/all/conandata.yml +++ b/recipes/gobject-introspection/all/conandata.yml @@ -1,19 +1,7 @@ sources: + "1.78.1": + url: "https://download.gnome.org/sources/gobject-introspection/1.78/gobject-introspection-1.78.1.tar.xz" + sha256: "bd7babd99af7258e76819e45ba4a6bc399608fe762d83fde3cac033c50841bb4" "1.72.0": - sha256: "02fe8e590861d88f83060dd39cda5ccaa60b2da1d21d0f95499301b186beaabc" url: "https://download.gnome.org/sources/gobject-introspection/1.72/gobject-introspection-1.72.0.tar.xz" - "1.70.0": - url: "https://download.gnome.org/sources/gobject-introspection/1.70/gobject-introspection-1.70.0.tar.xz" - sha256: "902b4906e3102d17aa2fcb6dad1c19971c70f2a82a159ddc4a94df73a3cafc4a" - "1.69.0": - url: "https://download.gnome.org/sources/gobject-introspection/1.69/gobject-introspection-1.69.0.tar.xz" - sha256: "c668cbe4a3aad7539e2cf669ab576ce7fbadac6890472f4095ca215dbbebee99" - "1.68.0": - url: "https://download.gnome.org/sources/gobject-introspection/1.68/gobject-introspection-1.68.0.tar.xz" - sha256: "d229242481a201b84a0c66716de1752bca41db4133672cfcfb37c93eb6e54a27" - "1.67.1": - url: "https://download.gnome.org/sources/gobject-introspection/1.67/gobject-introspection-1.67.1.tar.xz" - sha256: "9635184d668794609f9fe661c5bde11c106385d26c3babe291c24e3655987e47" - "1.66.1": - url: "https://download.gnome.org/sources/gobject-introspection/1.66/gobject-introspection-1.66.1.tar.xz" - sha256: "dd44a55ee5f426ea22b6b89624708f9e8d53f5cc94e5485c15c87cb30e06161d" + sha256: "02fe8e590861d88f83060dd39cda5ccaa60b2da1d21d0f95499301b186beaabc" diff --git a/recipes/gobject-introspection/all/conanfile.py b/recipes/gobject-introspection/all/conanfile.py index 4e30ffbb5f86f..74c5c3b60e338 100644 --- a/recipes/gobject-introspection/all/conanfile.py +++ b/recipes/gobject-introspection/all/conanfile.py @@ -1,129 +1,188 @@ -from conans import ConanFile, tools, Meson, VisualStudioBuildEnvironment -from conans.errors import ConanInvalidConfiguration import os -import shutil -import glob -required_conan_version = ">=1.36.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, replace_in_file, rm, rmdir +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import MesonToolchain, Meson +from conan.tools.env import Environment +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.scm import Version +from conan import conan_version + +required_conan_version = ">=1.60.0 <2.0 || >=2.0.5" + class GobjectIntrospectionConan(ConanFile): name = "gobject-introspection" - description = "GObject introspection is a middleware layer between C libraries (using GObject) and language bindings" - topics = ("conan", "gobject-instrospection") + description = ("GObject introspection is a middleware layer between " + "C libraries (using GObject) and language bindings") + license = "LGPL-2.1-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "https://gitlab.gnome.org/GNOME/gobject-introspection" - license = "LGPL-2.1" - settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - _source_subfolder = "source_subfolder" - _build_subfolder = "build_subfolder" - generators = "pkg_config" + topics = ("gobject-instrospection",) - @property - def _is_msvc(self): - return self.settings.compiler == "Visual Studio" - - def configure(self): - if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + package_type = "shared-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "fPIC": [True, False], + "build_introspection_data": [True, False], + } + default_options = { + "fPIC": True, + "build_introspection_data": True, + } + short_paths = True def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if self.settings.os == "Windows": - raise ConanInvalidConfiguration("%s recipe does not support windows. Contributions are welcome!" % self.name) + if self.settings.os in ["Windows", "Macos"] or cross_building(self): + # FIXME: tools/g-ir-scanner fails to load glib + self.options.build_introspection_data = False + + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + if self.options.get_safe("build_introspection_data"): + # INFO: g-ir-scanner looks for dynamic glib and gobject libraries when running + self.options["glib"].shared = True + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + # https://gitlab.gnome.org/GNOME/gobject-introspection/-/blob/1.76.1/meson.build?ref_type=tags#L127-131 + self.requires("glib/2.78.3", transitive_headers=True, transitive_libs=True) + # ffi.h is exposed by public header gobject-introspection-1.0/girffi.h + self.requires("libffi/3.4.4", transitive_headers=True) + + def validate(self): + if self.settings.os == "Windows" and self.settings.build_type == "Debug": + # fatal error LNK1104: cannot open file 'python37_d.lib' + raise ConanInvalidConfiguration( + f"{self.ref} debug build on Windows is disabled due to debug version of Python libs likely not being available. Contributions to fix this are welcome.") + if self.options.build_introspection_data and not self.dependencies["glib"].options.shared: + # FIXME: tools/g-ir-scanner fails to load glib + # tools/g-ir-scanner --output=gir/GLib-2.0.gir ... + # ERROR: can't resolve libraries to shared libraries: glib-2.0, gobject-2.0 + raise ConanInvalidConfiguration(f"{self.ref} requires shared glib to be built as shared. Use -o 'glib/*:shared=True'.") + if self.options.build_introspection_data and self.settings.os in ["Windows", "Macos"]: + # FIXME: tools/g-ir-scanner', '--output=gir/GLib-2.0.gir' ... ERROR: can't resolve libraries to shared libraries: glib-2.0, gobject-2.0 + # FIXME: g-ir-scanner fails to find libgnuintl + # giscanner/_giscanner.cpython-37m-darwin.so, 0x0002): Library not loaded: /lib/libgnuintl.8.dylib + raise ConanInvalidConfiguration(f"{self.ref} fails to run g-ir-scanner due glib loaded as shared. Use -o 'glib/*:shared=False'. Contributions to fix this are welcome.") + if self.options.build_introspection_data and cross_building(self): + raise ConanInvalidConfiguration(f"{self.ref} build_introspection_data is not supported when cross-building. Use '&:build_introspection_data=False'.") def build_requirements(self): - if tools.Version(self.version) >= "1.71.0": - self.build_requires("meson/0.62.2") - else: - # https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/414 - self.build_requires("meson/0.59.3") - self.build_requires("pkgconf/1.7.4") + self.tool_requires("meson/[>=1.2.3 <2]") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/[>=2.2 <3]") if self.settings.os == "Windows": - self.build_requires("winflexbison/2.5.24") + self.tool_requires("winflexbison/2.5.25") else: - self.build_requires("flex/2.6.4") - self.build_requires("bison/3.7.6") - - def requirements(self): - self.requires("glib/2.73.0") + self.tool_requires("flex/2.6.4") + self.tool_requires("bison/3.8.2") + self.tool_requires("glib/") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) - - def _configure_meson(self): - meson = Meson(self) - defs = dict() - defs["build_introspection_data"] = self.options["glib"].shared - defs["datadir"] = os.path.join(self.package_folder, "res") - - meson.configure( - source_folder=self._source_subfolder, - args=["--wrap-mode=nofallback"], - build_folder=self._build_subfolder, - defs=defs, - ) - return meson + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + tc = MesonToolchain(self) + if cross_building(self): + tc.project_options["gi_cross_use_prebuilt_gi"] = "false" + tc.project_options["build_introspection_data"] = self.options.build_introspection_data + tc.project_options["datadir"] = "res" + tc.generate() + deps = PkgConfigDeps(self) + deps.generate() + # INFO: g-ir-scanner uses PKG_CONFIG_PATH directly instead of pkg-config Meson module + env = Environment() + env.define_path("PKG_CONFIG_PATH", self.generators_folder) + envvars = env.vars(self) + envvars.save_script("pkg_config_env") + + def _patch_sources(self): + # Disable tests + replace_in_file(self, os.path.join(self.source_folder, "meson.build"), + "subdir('tests')", + "#subdir('tests')") + # Look for data files in res/ instead of share/ + replace_in_file(self, os.path.join(self.source_folder, "tools", "g-ir-tool-template.in"), + "os.path.join(filedir, '..', 'share')", + "os.path.join(filedir, '..', 'res')") + if Version(conan_version) < "2": + # INFO: Conan 1.x generates PkgConfigDeps with libdir1 and includedir1 variables only for glib due its modules + replace_in_file(self, os.path.join(self.source_folder, "gir", "meson.build"), + "glib_dep.get_variable(pkgconfig: 'libdir')", + "glib_dep.get_variable(pkgconfig: 'libdir1')") + replace_in_file(self, os.path.join(self.source_folder, "gir", "meson.build"), + "join_paths(glib_dep.get_variable(pkgconfig: 'includedir'), 'glib-2.0')", + "join_paths(glib_dep.get_variable(pkgconfig: 'includedir1'), 'glib-2.0')") + # gir/meson.build expects the gio-unix-2.0 includedir to be passed as a build flag. + # Patch this for glib from Conan. + replace_in_file(self, os.path.join(self.source_folder, "gir", "meson.build"), + "join_paths(giounix_dep.get_variable(pkgconfig: 'includedir'), 'gio-unix-2.0')", + "giounix_dep.get_variable(pkgconfig: 'includedir1')") + else: + # gir/meson.build expects the gio-unix-2.0 includedir to be passed as a build flag. + # Patch this for glib from Conan. + replace_in_file(self, os.path.join(self.source_folder, "gir", "meson.build"), + "join_paths(giounix_dep.get_variable(pkgconfig: 'includedir'), 'gio-unix-2.0')", + "giounix_dep.get_variable(pkgconfig: 'includedir')") def build(self): - tools.replace_in_file( - os.path.join(self._source_subfolder, "meson.build"), - "subdir('tests')", - "#subdir('tests')", - ) - tools.replace_in_file( - os.path.join(self._source_subfolder, "meson.build"), - "if meson.version().version_compare('>=0.54.0')", - "if false", - ) - - with tools.environment_append( - VisualStudioBuildEnvironment(self).vars - if self._is_msvc - else {"PKG_CONFIG_PATH": self.build_folder} - ): - meson = self._configure_meson() - meson.build() + self._patch_sources() + meson = Meson(self) + meson.configure() + meson.build() def package(self): - self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) - with tools.environment_append( - VisualStudioBuildEnvironment(self).vars - ) if self._is_msvc else tools.no_op(): - meson = self._configure_meson() - meson.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "share")) - for pdb_file in glob.glob(os.path.join(self.package_folder, "bin", "*.pdb")): - os.unlink(pdb_file) + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + meson = Meson(self) + meson.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.pdb", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.names["pkg_config"] = "gobject-introspection-1.0" + self.cpp_info.set_property("pkg_config_name", "gobject-introspection-1.0") self.cpp_info.libs = ["girepository-1.0"] - self.cpp_info.includedirs.append( - os.path.join("include", "gobject-introspection-1.0") - ) - - bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH env var with: {}".format(bin_path)) - self.env_info.PATH.append(bin_path) + self.cpp_info.includedirs.append(os.path.join("include", "gobject-introspection-1.0")) exe_ext = ".exe" if self.settings.os == "Windows" else "" pkgconfig_variables = { - 'datadir': '${prefix}/res', - 'bindir': '${prefix}/bin', - 'g_ir_scanner': '${bindir}/g-ir-scanner', - 'g_ir_compiler': '${bindir}/g-ir-compiler%s' % exe_ext, - 'g_ir_generate': '${bindir}/g-ir-generate%s' % exe_ext, - 'gidatadir': '${datadir}/gobject-introspection-1.0', - 'girdir': '${datadir}/gir-1.0', - 'typelibdir': '${libdir}/girepository-1.0', + "datadir": "${prefix}/res", + "bindir": "${prefix}/bin", + "libdir": "${prefix}/lib", + "g_ir_scanner": "${bindir}/g-ir-scanner", + "g_ir_compiler": "${bindir}/g-ir-compiler%s" % exe_ext, + "g_ir_generate": "${bindir}/g-ir-generate%s" % exe_ext, + "gidatadir": "${datadir}/gobject-introspection-1.0", + "girdir": "${datadir}/gir-1.0", + "typelibdir": "${libdir}/girepository-1.0", } self.cpp_info.set_property( "pkg_config_custom_content", - "\n".join("%s=%s" % (key, value) for key,value in pkgconfig_variables.items())) + "\n".join(f"{key}={value}" for key, value in pkgconfig_variables.items()), + ) + self.buildenv_info.define_path("GI_GIR_PATH", os.path.join(self.package_folder, "res", "gir-1.0")) + self.buildenv_info.define_path("GI_TYPELIB_PATH", os.path.join(self.package_folder, "lib", "girepository-1.0")) + + # TODO: remove in conan v2 + bin_path = os.path.join(self.package_folder, "bin") + self.env_info.PATH.append(bin_path) + self.env_info.GI_GIR_PATH = os.path.join(self.package_folder, "res", "gir-1.0") + self.env_info.GI_TYPELIB_PATH = os.path.join(self.package_folder, "lib", "girepository-1.0") diff --git a/recipes/gobject-introspection/all/test_package/CMakeLists.txt b/recipes/gobject-introspection/all/test_package/CMakeLists.txt index 7b9b613cbb24a..228388b92ebea 100644 --- a/recipes/gobject-introspection/all/test_package/CMakeLists.txt +++ b/recipes/gobject-introspection/all/test_package/CMakeLists.txt @@ -1,8 +1,12 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(gobject-introspection REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +add_executable(test_basic test_basic.c) +target_link_libraries(test_basic PRIVATE gobject-introspection::gobject-introspection) + +if(GLIB_INTROSPECTION_DATA_AVAILABLE) + add_executable(test_girepository test_girepository.c) + target_link_libraries(test_girepository PRIVATE gobject-introspection::gobject-introspection) +endif() diff --git a/recipes/gobject-introspection/all/test_package/conanfile.py b/recipes/gobject-introspection/all/test_package/conanfile.py index 32d4b65e5f11e..ec823a4f6e977 100644 --- a/recipes/gobject-introspection/all/test_package/conanfile.py +++ b/recipes/gobject-introspection/all/test_package/conanfile.py @@ -1,26 +1,57 @@ -from conans import ConanFile, CMake, tools import os +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain +from conan.tools.files import save, load +from conan.tools.apple import is_apple_os + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package", "pkg_config" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" - def build(self): - if self.settings.os != 'Windows': - with tools.environment_append({'PKG_CONFIG_PATH': "."}): - pkg_config = tools.PkgConfig("gobject-introspection-1.0") - for tool in ["g_ir_compiler", "g_ir_generate", "g_ir_scanner"]: - self.run('%s --version' % pkg_config.variables[tool], run_environment=True) - self.run('g-ir-annotation-tool --version', run_environment=True) - self.run('g-ir-inspect -h', run_environment=True) + def requirements(self): + self.requires(self.tested_reference_str, run=True) + + def layout(self): + cmake_layout(self) + def generate(self): + introspection_data = self.dependencies["glib"].options.shared and not is_apple_os(self) + tc = CMakeToolchain(self) + tc.variables["GLIB_INTROSPECTION_DATA_AVAILABLE"] = introspection_data + tc.generate() + save(self, os.path.join(self.build_folder, "gobject_introspection_data"), str(introspection_data)) + save(self, os.path.join(self.build_folder, "gobject_introspection_bin"), + self.dependencies["gobject-introspection"].cpp_info.bindirs[0]) + + def build(self): cmake = CMake(self) cmake.configure() cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + if self.settings.os != "Windows": + gobject_introspection_bin = load(self, os.path.join(self.build_folder, "gobject_introspection_bin")) + gobject_introspection_data = load(self, os.path.join(self.build_folder, "gobject_introspection_data")) == "True" + for tool in ["g-ir-compiler", "g-ir-generate", "g-ir-scanner", "g-ir-annotation-tool"]: + if not gobject_introspection_data and tool in ["g-ir-scanner", "g-ir-annotation-tool"]: + continue + tool_path = os.path.join(gobject_introspection_bin, tool) + if os.path.exists(tool_path): + self.run(f"{tool_path} --version", env="conanrun") + else: + raise Exception(f"Tool {tool} not found in {gobject_introspection_bin}") + tool_path = os.path.join(gobject_introspection_bin, "g-ir-inspect") + if os.path.exists(tool_path): + self.run(f"{tool_path} -h", env="conanrun") + + bin_path = os.path.join(self.cpp.build.bindir, "test_basic") + self.run(bin_path, env="conanrun") + bin_path = os.path.join(self.cpp.build.bindir, "test_girepository") + if os.path.exists(bin_path): + self.run(bin_path, env="conanrun") diff --git a/recipes/gobject-introspection/all/test_package/test_package.c b/recipes/gobject-introspection/all/test_package/test_basic.c similarity index 77% rename from recipes/gobject-introspection/all/test_package/test_package.c rename to recipes/gobject-introspection/all/test_package/test_basic.c index c1b18cd52e49e..44d8cd552ebdd 100644 --- a/recipes/gobject-introspection/all/test_package/test_package.c +++ b/recipes/gobject-introspection/all/test_package/test_basic.c @@ -1,12 +1,12 @@ +#include #include #include "girepository.h" -int main(int argc, char **argv) -{ +int main(void) { printf("gobject introspection version %d.%d.%d\n", gi_get_major_version(), gi_get_minor_version(), gi_get_micro_version()); - return 0; + return EXIT_SUCCESS; } diff --git a/recipes/gobject-introspection/all/test_package/test_girepository.c b/recipes/gobject-introspection/all/test_package/test_girepository.c new file mode 100644 index 0000000000000..d6994f8155c80 --- /dev/null +++ b/recipes/gobject-introspection/all/test_package/test_girepository.c @@ -0,0 +1,7 @@ +#include +#include "girepository.h" + +int main() { + GIRepository* repository = g_irepository_get_default(); + return EXIT_SUCCESS; +} diff --git a/recipes/gobject-introspection/all/test_v1_package/CMakeLists.txt b/recipes/gobject-introspection/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/gobject-introspection/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/gobject-introspection/all/test_v1_package/conanfile.py b/recipes/gobject-introspection/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..52695b0ce44eb --- /dev/null +++ b/recipes/gobject-introspection/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_basic") + self.run(bin_path, run_environment=True) diff --git a/recipes/gobject-introspection/config.yml b/recipes/gobject-introspection/config.yml index 06afabf3f5bc4..42a826aff4ed3 100644 --- a/recipes/gobject-introspection/config.yml +++ b/recipes/gobject-introspection/config.yml @@ -1,13 +1,5 @@ versions: - "1.72.0": - folder: all - "1.70.0": - folder: all - "1.69.0": + "1.78.1": folder: all - "1.68.0": - folder: all - "1.67.1": - folder: all - "1.66.1": + "1.72.0": folder: all diff --git a/recipes/google-cloud-cpp/2.x/components_2_12_0.py b/recipes/google-cloud-cpp/2.x/components_2_28_0.py similarity index 68% rename from recipes/google-cloud-cpp/2.x/components_2_12_0.py rename to recipes/google-cloud-cpp/2.x/components_2_28_0.py index 943f3345fcb41..dafa862192730 100644 --- a/recipes/google-cloud-cpp/2.x/components_2_12_0.py +++ b/recipes/google-cloud-cpp/2.x/components_2_28_0.py @@ -1,81 +1,100 @@ -# Automatically generated by /usr/local/google/home/coryan/cci-develop/recipes/google-cloud-cpp/2.x/extract_dependencies.py DO NOT EDIT +# Automatically generated by /usr/local/google/home/dbolduc/code/git/conan-center-index/recipes/google-cloud-cpp/2.x/extract_dependencies.py DO NOT EDIT DEPENDENCIES = { "accessapproval_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], "accesscontextmanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], "advisorynotifications_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "aiplatform_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_interval_protos', 'type_money_protos'], + "aiplatform_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_interval_protos', 'type_money_protos'], "alloydb_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], "apigateway_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "apigeeconnect_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], "apikeys_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "appengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "appengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "apphub_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "artifactregistry_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], "asset_protos": ['accesscontextmanager_protos', 'api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'osconfig_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_dayofweek_protos', 'type_expr_protos', 'type_timeofday_protos'], "assuredworkloads_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "automl_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "backupdr_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "baremetalsolution_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "batch_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "batch_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "beyondcorp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "cloud_bigquery_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_error_details_protos', 'rpc_status_protos', 'type_expr_protos'], - "bigtable_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "bigquery_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_error_details_protos', 'rpc_status_protos', 'type_expr_protos'], + "bigtable_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_expr_protos'], "billing_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_date_protos', 'type_expr_protos', 'type_money_protos'], "binaryauthorization_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grafeas_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], "certificatemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "channel_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_decimal_protos', 'type_money_protos', 'type_postal_address_protos'], - "cloudbuild_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "cloudbuild_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "cloudcontrolspartner_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'type_interval_protos'], + "cloudquotas_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "commerce_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "cloud_common_common_protos": ['api_field_behavior_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], "composer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], - "confidentialcomputing_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "confidentialcomputing_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "config_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "connectors_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "contactcenterinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "container_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos'], "containeranalysis_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grafeas_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], "contentwarehouse_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'documentai_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_date_protos', 'type_datetime_protos', 'type_expr_protos', 'type_interval_protos', 'type_money_protos', 'type_postal_address_protos'], "datacatalog_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "datafusion_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "datamigration_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], "dataplex_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "dataproc_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "dataproc_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_interval_protos'], + "datastore_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], "datastream_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "deploy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], - "cloud_dialogflow_v2_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], + "developerconnect_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "dialogflow_cx_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], + "dialogflow_es_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], + "discoveryengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], "dlp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], "documentai_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_date_protos', 'type_datetime_protos', 'type_money_protos', 'type_postal_address_protos'], "domains_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_money_protos', 'type_postal_address_protos'], "edgecontainer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "edgenetwork_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "essentialcontacts_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], "eventarc_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos'], "filestore_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'cloud_common_common_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "functions_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "gameservices_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "gkebackup_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "gkebackup_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], "gkehub_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "gkemulticloud_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "gkemulticloud_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], "grafeas_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], - "iam_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "iam_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], + "iam_v2_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], "iap_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], "ids_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "iot_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "kms_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "kms_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "language_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "logging_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "logging_type_type_protos": ['grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "logging_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "logging_type_protos": ['grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], "managedidentities_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "managedkafka_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "memcache_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], - "monitoring_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_calendar_period_protos'], + "metastore_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos'], + "migrationcenter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_money_protos'], + "monitoring_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_calendar_period_protos', 'type_interval_protos'], + "netapp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "networkconnectivity_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "networkmanagement_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "networkservices_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "networkmanagement_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "networksecurity_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "networkservices_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "notebooks_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "optimization_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], "orgpolicy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'type_expr_protos'], "osconfig_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], "oslogin_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "policytroubleshooter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], + "policysimulator_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_expr_protos'], + "policytroubleshooter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'iam_v2_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], "privateca_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "privilegedaccessmanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "profiler_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "publicca_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], "pubsub_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "recaptchaenterprise_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "rapidmigrationassessment_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "recaptchaenterprise_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], "recommender_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'type_money_protos'], "redis_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], "resourcemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], @@ -84,30 +103,36 @@ "run_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], "scheduler_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], "secretmanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], - "securitycenter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "servicecontrol_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_type_protos', 'protobuf::libprotobuf', 'rpc_context_attribute_context_protos', 'rpc_status_protos'], + "securesourcemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "securitycenter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "securitycentermanagement_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "servicecontrol_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_protos', 'protobuf::libprotobuf', 'rpc_context_attribute_context_protos', 'rpc_status_protos'], "servicedirectory_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], - "servicemanagement_protos": ['api_annotations_protos', 'api_auth_protos', 'api_backend_protos', 'api_billing_protos', 'api_client_protos', 'api_config_change_protos', 'api_context_protos', 'api_control_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_log_protos', 'api_logging_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_resource_protos', 'api_service_protos', 'api_source_info_protos', 'api_system_parameter_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "serviceusage_protos": ['api_annotations_protos', 'api_auth_protos', 'api_client_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "servicehealth_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "servicemanagement_protos": ['api_annotations_protos', 'api_auth_protos', 'api_backend_protos', 'api_billing_protos', 'api_client_protos', 'api_config_change_protos', 'api_context_protos', 'api_control_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_log_protos', 'api_logging_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_policy_protos', 'api_quota_protos', 'api_resource_protos', 'api_service_protos', 'api_source_info_protos', 'api_system_parameter_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "serviceusage_protos": ['api_annotations_protos', 'api_auth_protos', 'api_client_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_resource_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "shell_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "spanner_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "cloud_speech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "speech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "sql_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "storage_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_date_protos', 'type_expr_protos'], + "storagecontrol_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "storageinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos'], "storagetransfer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos', 'type_date_protos', 'type_timeofday_protos'], "support_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "talent_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos', 'type_money_protos', 'type_postal_address_protos', 'type_timeofday_protos'], "tasks_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "cloud_texttospeech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "telcoautomation_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "texttospeech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "timeseriesinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], "tpu_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "devtools_cloudtrace_v2_trace_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], - "translate_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "video_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_datetime_protos'], + "trace_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "translate_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "video_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_datetime_protos'], "videointelligence_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "vision_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_latlng_protos'], "vmmigration_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_error_details_protos', 'rpc_status_protos'], - "vmwareengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "vmwareengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_field_info_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "vpcaccess_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "webrisk_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], "websecurityscanner_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], @@ -127,7 +152,13 @@ "api_quota_protos": ['api_annotations_protos'], "api_service_protos": ['api_annotations_protos', 'api_auth_protos', 'api_backend_protos', 'api_billing_protos', 'api_client_protos', 'api_context_protos', 'api_control_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_http_protos', 'api_label_protos', 'api_log_protos', 'api_logging_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_resource_protos', 'api_source_info_protos', 'api_system_parameter_protos', 'api_usage_protos'], "api_usage_protos": ['api_annotations_protos', 'api_visibility_protos'], - "devtools_cloudtrace_v2_tracing_protos": ['api_client_protos', 'api_field_behavior_protos', 'devtools_cloudtrace_v2_trace_protos', 'devtools_cloudtrace_v2_trace_protos', 'rpc_status_protos'], + "iam_credentials_v1_common_protos": ['api_field_behavior_protos', 'api_resource_protos'], + "iam_credentials_v1_iamcredentials_protos": ['api_annotations_protos', 'api_client_protos', 'iam_credentials_v1_common_protos'], + "iam_v1_iam_policy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_resource_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos'], + "iam_v1_options_protos": ['api_annotations_protos'], + "iam_v1_policy_protos": ['api_annotations_protos', 'type_expr_protos'], + "cloud_extended_operations_protos": ["protobuf::libprotobuf"], + "compute_protos": ["cloud_extended_operations_protos", "protobuf::libprotobuf"], } PROTO_COMPONENTS = { @@ -148,6 +179,7 @@ "api_documentation_protos", "api_endpoint_protos", "api_field_behavior_protos", + "api_field_info_protos", "api_http_protos", "api_httpbody_protos", "api_label_protos", @@ -157,6 +189,7 @@ "api_metric_protos", "api_monitored_resource_protos", "api_monitoring_protos", + "api_policy_protos", "api_quota_protos", "api_resource_protos", "api_routing_protos", @@ -169,81 +202,99 @@ "apigeeconnect_protos", "apikeys_protos", "appengine_protos", + "apphub_protos", "artifactregistry_protos", "asset_protos", "assuredworkloads_protos", "automl_protos", + "backupdr_protos", "baremetalsolution_protos", "batch_protos", "beyondcorp_protos", + "bigquery_protos", "bigtable_protos", "billing_protos", "binaryauthorization_protos", "certificatemanager_protos", "channel_protos", - "cloud_bigquery_protos", "cloud_common_common_protos", - "cloud_dialogflow_v2_protos", - "cloud_speech_protos", - "cloud_texttospeech_protos", + "cloud_extended_operations_protos", "cloudbuild_protos", + "cloudcontrolspartner_protos", + "cloudquotas_protos", + "commerce_protos", "composer_protos", + "compute_protos", "confidentialcomputing_protos", + "config_protos", "connectors_protos", "contactcenterinsights_protos", "container_protos", "containeranalysis_protos", "contentwarehouse_protos", "datacatalog_protos", + "datafusion_protos", "datamigration_protos", "dataplex_protos", "dataproc_protos", + "datastore_protos", "datastream_protos", "deploy_protos", - "devtools_cloudtrace_v2_trace_protos", - "devtools_cloudtrace_v2_tracing_protos", - "devtools_source_v1_source_context_protos", + "developerconnect_protos", "dialogflow_cx_protos", + "dialogflow_es_protos", + "discoveryengine_protos", "dlp_protos", "documentai_protos", "domains_protos", "edgecontainer_protos", + "edgenetwork_protos", "essentialcontacts_protos", "eventarc_protos", "filestore_protos", "functions_protos", - "gameservices_protos", "gkebackup_protos", "gkehub_protos", "gkemulticloud_protos", "grafeas_protos", + "iam_credentials_v1_common_protos", + "iam_credentials_v1_iamcredentials_protos", "iam_protos", "iam_v1_iam_policy_protos", "iam_v1_options_protos", "iam_v1_policy_protos", + "iam_v2_protos", "iap_protos", "ids_protos", - "iot_protos", "kms_protos", "language_protos", "logging_protos", - "logging_type_type_protos", + "logging_type_protos", "longrunning_operations_protos", "managedidentities_protos", + "managedkafka_protos", "memcache_protos", + "metastore_protos", + "migrationcenter_protos", "monitoring_protos", + "netapp_protos", "networkconnectivity_protos", "networkmanagement_protos", + "networksecurity_protos", "networkservices_protos", "notebooks_protos", "optimization_protos", "orgpolicy_protos", "osconfig_protos", "oslogin_protos", + "policysimulator_protos", "policytroubleshooter_protos", "privateca_protos", + "privilegedaccessmanager_protos", "profiler_protos", + "publicca_protos", "pubsub_protos", + "rapidmigrationassessment_protos", "recaptchaenterprise_protos", "recommender_protos", "redis_protos", @@ -257,21 +308,30 @@ "run_protos", "scheduler_protos", "secretmanager_protos", + "securesourcemanager_protos", "securitycenter_protos", + "securitycentermanagement_protos", "servicecontrol_protos", "servicedirectory_protos", + "servicehealth_protos", "servicemanagement_protos", "serviceusage_protos", "shell_protos", "spanner_protos", + "speech_protos", + "sql_protos", "storage_protos", + "storagecontrol_protos", "storageinsights_protos", "storagetransfer_protos", "support_protos", "talent_protos", "tasks_protos", + "telcoautomation_protos", + "texttospeech_protos", "timeseriesinsights_protos", "tpu_protos", + "trace_protos", "translate_protos", "type_calendar_period_protos", "type_color_protos", @@ -307,10 +367,12 @@ "apigeeconnect", "apikeys", "appengine", + "apphub", "artifactregistry", "asset", "assuredworkloads", "automl", + "backupdr", "baremetalsolution", "batch", "beyondcorp", @@ -321,55 +383,149 @@ "certificatemanager", "channel", "cloudbuild", + "cloudcontrolspartner", + "cloudquotas", + "commerce", "composer", + "compute_accelerator_types", + "compute_addresses", + "compute_autoscalers", + "compute_backend_buckets", + "compute_backend_services", + "compute_disk_types", + "compute_disks", + "compute_external_vpn_gateways", + "compute_firewall_policies", + "compute_firewalls", + "compute_forwarding_rules", + "compute_global_addresses", + "compute_global_forwarding_rules", + "compute_global_network_endpoint_groups", + "compute_global_operations", + "compute_global_organization_operations", + "compute_global_public_delegated_prefixes", + "compute_health_checks", + "compute_http_health_checks", + "compute_https_health_checks", + "compute_image_family_views", + "compute_images", + "compute_instance_group_managers", + "compute_instance_groups", + "compute_instance_templates", + "compute_instances", + "compute_interconnect_attachments", + "compute_interconnect_locations", + "compute_interconnects", + "compute_license_codes", + "compute_licenses", + "compute_machine_images", + "compute_machine_types", + "compute_network_attachments", + "compute_network_edge_security_services", + "compute_network_endpoint_groups", + "compute_network_firewall_policies", + "compute_networks", + "compute_node_groups", + "compute_node_templates", + "compute_node_types", + "compute_packet_mirrorings", + "compute_projects", + "compute_public_advertised_prefixes", + "compute_public_delegated_prefixes", + "compute_region_autoscalers", + "compute_region_backend_services", + "compute_region_commitments", + "compute_region_disk_types", + "compute_region_disks", + "compute_region_health_check_services", + "compute_region_health_checks", + "compute_region_instance_group_managers", + "compute_region_instance_groups", + "compute_region_instance_templates", + "compute_region_instances", + "compute_region_network_endpoint_groups", + "compute_region_network_firewall_policies", + "compute_region_notification_endpoints", + "compute_region_operations", + "compute_region_security_policies", + "compute_region_ssl_certificates", + "compute_ssl_policies", + "compute_subnetworks", + "compute_target_grpc_proxies", + "compute_target_http_proxies", + "compute_target_https_proxies", + "compute_target_instances", + "compute_target_pools", + "compute_target_ssl_proxies", + "compute_target_tcp_proxies", + "compute_target_vpn_gateways", + "compute_url_maps", + "compute_vpn_gateways", + "compute_vpn_tunnels", + "compute_zone_operations", + "compute_zones", "confidentialcomputing", + "config", "connectors", "contactcenterinsights", "container", "containeranalysis", "contentwarehouse", "datacatalog", + "datafusion", "datamigration", "dataplex", "dataproc", + "datastore", "datastream", "deploy", + "developerconnect", "dialogflow_cx", "dialogflow_es", + "discoveryengine", "dlp", "documentai", "domains", "edgecontainer", + "edgenetwork", "essentialcontacts", "eventarc", "filestore", "functions", - "gameservices", "gkebackup", "gkehub", "gkemulticloud", "iam", "iap", "ids", - "iot", "kms", "language", "logging", "managedidentities", + "managedkafka", "memcache", + "metastore", + "migrationcenter", "monitoring", + "netapp", "networkconnectivity", "networkmanagement", + "networksecurity", "networkservices", "notebooks", + "oauth2", "optimization", "orgpolicy", "osconfig", "oslogin", + "policysimulator", "policytroubleshooter", "privateca", + "privilegedaccessmanager", "profiler", + "publicca", "pubsub", + "rapidmigrationassessment", "recaptchaenterprise", "recommender", "redis", @@ -379,20 +535,26 @@ "run", "scheduler", "secretmanager", + "securesourcemanager", "securitycenter", + "securitycentermanagement", "servicecontrol", "servicedirectory", + "servicehealth", "servicemanagement", "serviceusage", "shell", "spanner", "speech", + "sql", "storage", + "storagecontrol", "storageinsights", "storagetransfer", "support", "talent", "tasks", + "telcoautomation", "texttospeech", "timeseriesinsights", "tpu", diff --git a/recipes/google-cloud-cpp/2.x/conandata.yml b/recipes/google-cloud-cpp/2.x/conandata.yml index 79eb43c2b932d..65a9e8f5f8351 100644 --- a/recipes/google-cloud-cpp/2.x/conandata.yml +++ b/recipes/google-cloud-cpp/2.x/conandata.yml @@ -1,18 +1,14 @@ sources: - "2.12.0": - url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.12.0.tar.gz" - sha256: "8cda870803925c62de8716a765e03eb9d34249977e5cdb7d0d20367e997a55e2" "2.15.1": url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.15.1.tar.gz" sha256: "47a5c6beff48625fa1b65b1ddc575247def80c88d29062c66d463172280d3959" "2.19.0": url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.19.0.tar.gz" sha256: "63f009092afd900cb812050bcecf607e37d762ac911e0bcbf4af9a432da91890" + "2.28.0": + url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.28.0.tar.gz" + sha256: "1d51910cb4419f6100d8b9df6bccd33477d09f50e378f12b06dae0f137ed7bc6" patches: - "2.12.0": - - patch_file: "patches/2.12.0/001-use-conan-msvc-runtime.patch" - patch_description: "Let Conan select the MSVC runtime" - patch_type: conan "2.15.1": - patch_file: "patches/2.15.1/001-use-conan-msvc-runtime.patch" patch_description: "Let Conan select the MSVC runtime" @@ -24,3 +20,7 @@ patches: - patch_file: "patches/2.19.0/002-add-find-package-threads.patch" patch_description: "Missing find_package() in CMake files" patch_type: conan + "2.28.0": + - patch_file: "patches/2.28.0/001-add-find-package-threads.patch" + patch_description: "Missing find_package() in CMake files" + patch_type: conan diff --git a/recipes/google-cloud-cpp/2.x/conanfile.py b/recipes/google-cloud-cpp/2.x/conanfile.py index 18e1843526a3c..bf23faefd5366 100644 --- a/recipes/google-cloud-cpp/2.x/conanfile.py +++ b/recipes/google-cloud-cpp/2.x/conanfile.py @@ -19,9 +19,9 @@ # script will be used to generate a new file with the component dependency # information. The expectation is that maintaining this script will be easier # than writing long lists of dependencies by hand. -import components_2_12_0 import components_2_15_1 import components_2_19_0 +import components_2_28_0 required_conan_version = ">=1.56.0" @@ -45,27 +45,27 @@ class GoogleCloudCppConan(ConanFile): settings = "os", "arch", "compiler", "build_type" options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": False, "fPIC": True} - exports = ["components_2_12_0.py", - "components_2_15_1.py", + exports = ["components_2_15_1.py", "components_2_19_0.py", + "components_2_28_0.py", ] short_paths = True _GA_COMPONENTS = { - '2.12.0': components_2_12_0.COMPONENTS, '2.15.1': components_2_15_1.COMPONENTS, '2.19.0': components_2_19_0.COMPONENTS, + '2.28.0': components_2_28_0.COMPONENTS, } _PROTO_COMPONENTS = { - '2.12.0': components_2_12_0.PROTO_COMPONENTS, '2.15.1': components_2_15_1.PROTO_COMPONENTS, '2.19.0': components_2_19_0.PROTO_COMPONENTS, + '2.28.0': components_2_28_0.PROTO_COMPONENTS, } _PROTO_COMPONENT_DEPENDENCIES = { - "2.12.0": components_2_12_0.DEPENDENCIES, "2.15.1": components_2_15_1.DEPENDENCIES, "2.19.0": components_2_19_0.DEPENDENCIES, + "2.28.0": components_2_28_0.DEPENDENCIES, } # Some components require custom dependency definitions. _REQUIRES_CUSTOM_DEPENDENCIES = { @@ -150,7 +150,7 @@ def source(self): def requirements(self): # These must remain pinned in conan index. self.requires("protobuf/3.21.12", transitive_headers=True) - self.requires("abseil/20230125.3", transitive_headers=True) + self.requires("abseil/[>=20230125.3 <=20230802.1]", transitive_headers=True) self.requires("grpc/1.54.3", transitive_headers=True) self.requires("nlohmann_json/3.11.3") self.requires("crc32c/1.1.2") @@ -167,6 +167,7 @@ def build_requirements(self): def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_TESTING"] = False + tc.variables["GOOGLE_CLOUD_CPP_WITH_MOCKS"] = False tc.variables["GOOGLE_CLOUD_CPP_ENABLE_MACOS_OPENSSL_CHECK"] = False tc.variables["GOOGLE_CLOUD_CPP_ENABLE_WERROR"] = False tc.variables["GOOGLE_CLOUD_CPP_ENABLE"] = ",".join(self._components()) @@ -186,14 +187,9 @@ def _patch_sources(self): # https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/RuntimeProtections/RuntimeProtections.html settings_build = getattr(self, "settings_build", self.settings) if settings_build.os == "Macos": - if Version(self.version) < '2.12.0': - replace_in_file(self, os.path.join(self.source_folder, "cmake/CompileProtos.cmake"), - "$", - '${CMAKE_COMMAND} -E env "DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}" $') - else: - replace_in_file(self, os.path.join(self.source_folder, "cmake/CompileProtos.cmake"), - "${Protobuf_PROTOC_EXECUTABLE} ARGS", - '${CMAKE_COMMAND} -E env "DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}" ${Protobuf_PROTOC_EXECUTABLE} ARGS') + replace_in_file(self, os.path.join(self.source_folder, "cmake/CompileProtos.cmake"), + "${Protobuf_PROTOC_EXECUTABLE} ARGS", + '${CMAKE_COMMAND} -E env "DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}" ${Protobuf_PROTOC_EXECUTABLE} ARGS') def build(self): self._patch_sources() @@ -214,9 +210,6 @@ def _generate_proto_requires(self, component): 'asset', 'channel', 'storagetransfer', - # TODO - certificatemanager crashes the gRPC code generator. Add it back - # after gRPC >= 1.53.x - 'certificatemanager', } def _components(self): @@ -228,6 +221,8 @@ def _components(self): if self.settings.os == "Android": result.remove('accesscontextmanager') result.remove('talent') + if self.settings.os == "Windows" and Version(self.version) >= '2.28.0': + result.remove('securitycenter') return result def _proto_components(self): @@ -239,11 +234,14 @@ def _proto_components(self): if self.settings.os == "Android": result.remove('accesscontextmanager_protos') result.remove('talent_protos') - if Version(self.version) >= '2.15.1': - # This was converted to an interface library starting on 2.15.1 + if Version(self.version) <= '2.19.0': + # Handling of these proto libraries was simplified in the 2.28.0 + # `conanfile.py`. We prefer not to regenerate the old + # `components_*.py` files, so we manually skip the protos in here. result.remove('logging_type_type_protos') - # These were removed (as they are not used) starting on 2.15.1 result.remove('devtools_source_v1_source_context_protos') + if self.settings.os == "Windows" and Version(self.version) >= '2.28.0': + result.remove('securitycenter_protos') return result def package(self): @@ -293,21 +291,13 @@ def package_info(self): # A small number of gRPC-generated stubs are used directly in the common components # shared by all gRPC-based libraries. These must be defined without reference to `grpc_utils`. - if Version(self.version) >= '2.15.1': - GRPC_UTILS_REQUIRED_PROTOS = { - "iam_credentials_v1_iamcredentials_protos", - "iam_v1_policy_protos", - "longrunning_operations_protos", - "rpc_error_details_protos", - "rpc_status_protos", - } - else: - GRPC_UTILS_REQUIRED_PROTOS = { - "iam_protos", - "longrunning_operations_protos", - "rpc_error_details_protos", - "rpc_status_protos", - } + GRPC_UTILS_REQUIRED_PROTOS = { + "iam_credentials_v1_iamcredentials_protos", + "iam_v1_policy_protos", + "longrunning_operations_protos", + "rpc_error_details_protos", + "rpc_status_protos", + } for component in GRPC_UTILS_REQUIRED_PROTOS: self._add_proto_component(component) @@ -316,48 +306,31 @@ def package_info(self): self.cpp_info.components["grpc_utils"].names["pkg_config"] = "google_cloud_cpp_grpc_utils" for component in self._proto_components(): - if Version(self.version) >= '2.15.1' and component == 'storage_protos': - # Starting with v2.15.1 the `storage_protos` are compiled only - # when needed. They are not used in Conan because they are only - # needed for an experimental library, supporting an allow-listed - # service. + if component == 'storage_protos': + # The `storage_protos` are compiled only when needed. They are + # not used in Conan because they are only needed for an + # experimental library, supporting an allow-listed service. continue if component not in GRPC_UTILS_REQUIRED_PROTOS: self._add_proto_component(component) # Interface libraries for backwards compatibility - if Version(self.version) < '2.15.1': - self.cpp_info.components["dialogflow_es_protos"].requires = ["cloud_dialogflow_v2_protos"] - self.cpp_info.components["logging_type_protos"].requires = ["logging_type_type_protos"] - self.cpp_info.components["speech_protos"].requires = ["cloud_speech_protos"] - self.cpp_info.components["texttospeech_protos"].requires = ["cloud_texttospeech_protos"] - self.cpp_info.components["trace_protos"].requires = [ - "devtools_cloudtrace_v2_trace_protos", - "devtools_cloudtrace_v2_tracing_protos", - ] - self._add_grpc_component("bigquery", "cloud_bigquery_protos") - else: - self.cpp_info.components["cloud_bigquery_protos"].requires = ["bigquery_protos"] - self.cpp_info.components["cloud_dialogflow_v2_protos"].requires = ["dialogflow_es_protos"] - self.cpp_info.components["cloud_speech_protos"].requires = ["speech_protos"] - self.cpp_info.components["cloud_texttospeech_protos"].requires = ["texttospeech_protos"] - self.cpp_info.components["devtools_cloudtrace_v2_trace_protos"].requires = ["trace_protos"] - self.cpp_info.components["devtools_cloudtrace_v2_tracing_protos"].requires = ["trace_protos"] - self.cpp_info.components["logging_type_type_protos"].requires = ["logging_type_protos"] + self.cpp_info.components["cloud_bigquery_protos"].requires = ["bigquery_protos"] + self.cpp_info.components["cloud_dialogflow_v2_protos"].requires = ["dialogflow_es_protos"] + self.cpp_info.components["cloud_speech_protos"].requires = ["speech_protos"] + self.cpp_info.components["cloud_texttospeech_protos"].requires = ["texttospeech_protos"] + self.cpp_info.components["devtools_cloudtrace_v2_trace_protos"].requires = ["trace_protos"] + self.cpp_info.components["devtools_cloudtrace_v2_tracing_protos"].requires = ["trace_protos"] + self.cpp_info.components["logging_type_type_protos"].requires = ["logging_type_protos"] for component in self._components(): protos=f"{component}_protos" - # bigquery proto library predates the adoption of more consistent naming - if component == 'bigquery' and Version(self.version) < '2.15.1': - self._add_proto_component("cloud_bigquery_protos") - self._add_grpc_component(component, "cloud_bigquery_protos") - continue - if component == 'dialogflow_es' and Version(self.version) < '2.15.1': - self._add_proto_component("cloud_dialogflow_v2_protos") - self._add_grpc_component(component, "cloud_dialogflow_v2_protos") - continue # `compute` components do not depend on gRPC if component.startswith("compute_"): + # Individual compute proto libraries were replaced with a single + # `compute_protos` library. + if Version(self.version) >= '2.28.0': + protos = "compute_protos" self._add_compute_component(component, protos) continue # `storage` is the only component that does not depend on a matching `*_protos` library diff --git a/recipes/google-cloud-cpp/2.x/extract_dependencies.py b/recipes/google-cloud-cpp/2.x/extract_dependencies.py index 95720c57e7748..0235b7b50d130 100755 --- a/recipes/google-cloud-cpp/2.x/extract_dependencies.py +++ b/recipes/google-cloud-cpp/2.x/extract_dependencies.py @@ -25,6 +25,8 @@ # Used in _generate_proto_requires(): the *.deps files are generated from # Bazel and contain a few targets that do not exit (nor do they need to # exist) in CMake. +# +# This list maps onto google_cloud_cpp_load_protodeps()'s `targets_to_omit`. _PROTO_DEPS_REMOVED_TARGETS = { "cloud_kms_v1_kms_protos", "cloud_orgpolicy_v1_orgpolicy_protos", @@ -35,13 +37,15 @@ # Used in _generate_proto_requires(): the *.deps files are generated from # Bazel and contain a few targets that have incorrect names for CMake. +# +# This list maps onto google_cloud_cpp_load_protodeps()'s `targets_substitutions`. _PROTO_DEPS_REPLACED_TARGETS = { "grafeas_v1_grafeas_protos": "grafeas_protos", + "iam_v2_policy_protos": "iam_v2_protos", + "logging_type_type_protos": "logging_type_protos", "identity_accesscontextmanager_v1_accesscontextmanager_protos": "accesscontextmanager_protos", "cloud_osconfig_v1_osconfig_protos": "osconfig_protos", - "devtools_source_v1_source_protos": "devtools_source_v1_source_context_protos", "cloud_documentai_v1_documentai_protos": "documentai_protos", - "iam_v2_policy_protos": "iam_v2_protos", } # A few *.deps files use ad-hoc naming. @@ -77,7 +81,6 @@ "api_endpoint_protos", "api_launch_stage_protos", "api_documentation_protos", - "devtools_source_v1_source_context_protos", "type_color_protos", "api_distribution_protos", "api_config_change_protos", @@ -114,7 +117,7 @@ "pubsublite", } -# `google-cloud-cpp` managems these dependencies using CMake code. +# `google-cloud-cpp` manages these dependencies using CMake code. _HARD_CODED_DEPENDENCIES = { "api_annotations_protos": ["api_http_protos"], "api_auth_protos": ["api_annotations_protos"], @@ -264,15 +267,10 @@ def main(): proto_components.add(component) proto_components.update(deps) print(f' "{component}": {sorted(deps)},') - print(f' "compute_internal_protos": ["protobuf::libprotobuf"],') print(f' "cloud_extended_operations_protos": ["protobuf::libprotobuf"],') - proto_components.add("compute_internal_protos") + print(f' "compute_protos": ["cloud_extended_operations_protos", "protobuf::libprotobuf"],') proto_components.add("cloud_extended_operations_protos") - for component in sorted(components): - if not component.startswith("compute_"): - continue - proto_components.add(component + "_protos") - print(f' "{component}_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"],') + proto_components.add("compute_protos") print("}") proto_components = proto_components - _PROTO_DEPS_COMMON_REQUIRES names = ['"%s"' % c for c in proto_components] diff --git a/recipes/google-cloud-cpp/2.x/patches/2.12.0/001-use-conan-msvc-runtime.patch b/recipes/google-cloud-cpp/2.x/patches/2.12.0/001-use-conan-msvc-runtime.patch deleted file mode 100644 index bfefce3078428..0000000000000 --- a/recipes/google-cloud-cpp/2.x/patches/2.12.0/001-use-conan-msvc-runtime.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index faab325a..657abd4c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -53,7 +53,6 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - endif () - - list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) --include(SelectMSVCRuntime) - - option(GOOGLE_CLOUD_CPP_ENABLE_MACOS_OPENSSL_CHECK - "If enabled, check that the user has defined OPENSSL_ROOT_DIR on macOS" -diff --git a/cmake/GoogleCloudCppCommon.cmake b/cmake/GoogleCloudCppCommon.cmake -index b487a1bc..880c98fe 100644 ---- a/cmake/GoogleCloudCppCommon.cmake -+++ b/cmake/GoogleCloudCppCommon.cmake -@@ -17,9 +17,6 @@ - # Get the destination directories based on the GNU recommendations. - include(GNUInstallDirs) - --# Pick the right MSVC runtime libraries. --include(SelectMSVCRuntime) -- - # Enable Werror - include(EnableWerror) - -diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt -index 0cb7a9ae..d9016a0b 100644 ---- a/examples/CMakeLists.txt -+++ b/examples/CMakeLists.txt -@@ -14,9 +14,6 @@ - # limitations under the License. - # ~~~ - --# Pick the right MSVC runtime libraries. --include(SelectMSVCRuntime) -- - add_executable(gcs2cbt gcs2cbt.cc) - target_link_libraries(gcs2cbt google-cloud-cpp::bigtable - google-cloud-cpp::storage google-cloud-cpp::grpc_utils) -diff --git a/external/googleapis/CMakeLists.txt b/external/googleapis/CMakeLists.txt -index 03535ff8..2b05c214 100644 ---- a/external/googleapis/CMakeLists.txt -+++ b/external/googleapis/CMakeLists.txt -@@ -157,8 +157,6 @@ if (PROTO_INCLUDE_DIR) - list(INSERT PROTOBUF_IMPORT_DIRS 0 "${PROTO_INCLUDE_DIR}") - endif () - --include(SelectMSVCRuntime) -- - google_cloud_cpp_add_protos_property() - - function (external_googleapis_short_name var proto) diff --git a/recipes/google-cloud-cpp/2.x/patches/2.28.0/001-add-find-package-threads.patch b/recipes/google-cloud-cpp/2.x/patches/2.28.0/001-add-find-package-threads.patch new file mode 100644 index 0000000000000..00d1143424d10 --- /dev/null +++ b/recipes/google-cloud-cpp/2.x/patches/2.28.0/001-add-find-package-threads.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 96297b4a..f274a111 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -218,6 +218,7 @@ add_custom_target(google-cloud-cpp-protos) + add_custom_target(doxygen-docs) + add_custom_target(all-docfx) + ++find_package(Threads REQUIRED) + find_package(absl CONFIG REQUIRED) + if (GOOGLE_CLOUD_CPP_ENABLE_GRPC) + find_package(gRPC REQUIRED QUIET) diff --git a/recipes/google-cloud-cpp/config.yml b/recipes/google-cloud-cpp/config.yml index bb19be722c391..5960fb5919b52 100644 --- a/recipes/google-cloud-cpp/config.yml +++ b/recipes/google-cloud-cpp/config.yml @@ -9,9 +9,9 @@ versions: folder: "all" "1.40.1": folder: "all" - "2.12.0": - folder: "2.x" "2.15.1": folder: "2.x" "2.19.0": folder: "2.x" + "2.28.0": + folder: "2.x" diff --git a/recipes/grpc/all/conandata.yml b/recipes/grpc/all/conandata.yml index 4a85145efdbc0..bf4e54a525f42 100644 --- a/recipes/grpc/all/conandata.yml +++ b/recipes/grpc/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.65.0": + url: "https://github.com/grpc/grpc/archive/v1.65.0.tar.gz" + sha256: "ebc3acfde70cfae3f4f04b8dbb72259540cb1dc427be362569fbc2607dabfe39" "1.54.3": url: "https://github.com/grpc/grpc/archive/v1.54.3.tar.gz" sha256: "17e4e1b100657b88027721220cbfb694d86c4b807e9257eaf2fb2d273b41b1b1" @@ -8,9 +11,6 @@ sources: "1.50.0": url: "https://github.com/grpc/grpc/archive/v1.50.0.tar.gz" sha256: "76900ab068da86378395a8e125b5cc43dfae671e09ff6462ddfef18676e2165a" - "1.48.4": - url: "https://github.com/grpc/grpc/archive/v1.48.4.tar.gz" - sha256: "0c3faa83e39d4f1ab55fe1476362b9ac3b81632a46dce7fd4d50271bce816b53" patches: "1.54.3": - patch_file: "patches/v1.50.x/002-CMake-Add-gRPC_USE_SYSTEMD-option-34384.patch" @@ -20,7 +20,3 @@ patches: - patch_file: "patches/v1.50.x/001-disable-cppstd-override.patch" "1.50.0": - patch_file: "patches/v1.50.x/001-disable-cppstd-override.patch" - "1.48.4": - - patch_file: "patches/v1.48.x/001-disable-cppstd-override.patch" - patch_description: "disable cpp std override" - patch_type: "portability" diff --git a/recipes/grpc/all/conanfile.py b/recipes/grpc/all/conanfile.py index 0dc9dad8aa3db..846221d92beaf 100644 --- a/recipes/grpc/all/conanfile.py +++ b/recipes/grpc/all/conanfile.py @@ -1,4 +1,5 @@ import os +import yaml from conan import ConanFile from conan.errors import ConanInvalidConfiguration @@ -56,6 +57,7 @@ class GrpcConan(ConanFile): } short_paths = True + _target_info = None @property def _grpc_plugin_template(self): @@ -73,6 +75,9 @@ def _is_legacy_one_profile(self): def _supports_libsystemd(self): return self.settings.os in ["Linux", "FreeBSD"] and Version(self.version) >= "1.52" + def export(self): + copy(self, f"target_info/grpc_{self.version}.yml", src=self.recipe_folder, dst=self.export_folder) + def export_sources(self): copy(self, "conan_cmake_project_include.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) copy(self, f"cmake/{self._grpc_plugin_template}", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) @@ -96,17 +101,17 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - # abseil is public. See https://github.com/conan-io/conan-center-index/pull/17284#issuecomment-1526082638 - if Version(self.version) < "1.47": - if is_msvc(self): - self.requires("abseil/20211102.0", transitive_headers=True, transitive_libs=True) - else: - self.requires("abseil/20220623.1", transitive_headers=True, transitive_libs=True) + # abseil requires: + # transitive_headers=True because grpc headers include abseil headers + # transitive_libs=True because generated code (grpc_cpp_plugin) require symbols from abseil + if Version(self.version) >= "1.62.0": + self.requires("protobuf/5.27.0", transitive_headers=True) + self.requires("abseil/[>=20240116.1 <20240117.0]", transitive_headers=True, transitive_libs=True) else: - self.requires("abseil/20230125.3", transitive_headers=True, transitive_libs=True) - self.requires("c-ares/1.19.1") + self.requires("abseil/[>=20230125.3 <=20230802.1]", transitive_headers=True, transitive_libs=True) + self.requires("protobuf/3.21.12", transitive_headers=True) + self.requires("c-ares/[>=1.19.1 <2]") self.requires("openssl/[>=1.1 <4]") - self.requires("protobuf/3.21.12", transitive_headers=True, transitive_libs=True) self.requires("re2/20230301") self.requires("zlib/[>=1.2.11 <2]") if self.options.get_safe("with_libsystemd"): @@ -190,11 +195,11 @@ def generate(self): # workaround for: install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable tc.cache_variables["CMAKE_MACOSX_BUNDLE"] = False - if is_msvc(self) and Version(self.version) >= "1.48": - tc.cache_variables["CMAKE_SYSTEM_VERSION"] = "10.0.18362.0" - if self._supports_libsystemd: tc.cache_variables["gRPC_USE_SYSTEMD"] = self.options.with_libsystemd + + if Version(self.version) >= "1.62.0": + tc.cache_variables["gRPC_DOWNLOAD_ARCHIVES"] = False tc.generate() @@ -210,17 +215,42 @@ def _patch_sources(self): # - using `make` as the cmake generator # Make will run commands via `/bin/sh` which will strip all env vars that start with `DYLD*` # This workaround wraps the protoc command to be invoked by CMake with a modified environment + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") settings_build = getattr(self, "settings_build", self.settings) if settings_build.os == "Macos": - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + replace_in_file(self, cmakelists, "COMMAND ${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}", 'COMMAND ${CMAKE_COMMAND} -E env "DYLD_LIBRARY_PATH=$ENV{DYLD_LIBRARY_PATH}" ${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}') + elif not cross_building(self) and settings_build.os == "Linux": + # we are not cross-building, but protobuf or abseil may be shared + # so we need to set LD_LIBRARY_PATH to find them + # Note: if protobuf used RPATH instead of RUNPATH this is not needed + replace_in_file(self, cmakelists, + "COMMAND ${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}", + 'COMMAND ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=$:$ENV{LD_LIBRARY_PATH}" ${_gRPC_PROTOBUF_PROTOC_EXECUTABLE}') + if self.settings.os == "Macos" and Version(self.version) >= "1.64": + # See https://github.com/grpc/grpc/issues/36654#issuecomment-2228569158 + replace_in_file(self, cmakelists, "target_compile_features(upb_textformat_lib PUBLIC cxx_std_14)", + """target_compile_features(upb_textformat_lib PUBLIC cxx_std_14) + target_link_options(upb_textformat_lib PRIVATE -Wl,-undefined,dynamic_lookup) + target_link_options(upb_json_lib PRIVATE -Wl,-undefined,dynamic_lookup) + """) + def build(self): self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() + @property + def target_info(self): + if self._target_info: + return self._target_info + target_info_file = os.path.join(self.recipe_folder, "target_info", f"grpc_{self.version}.yml") + with open(target_info_file) as f: + self._target_info = yaml.safe_load(f) + return self._target_info + def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) cmake = CMake(self) @@ -230,46 +260,14 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) # Create one custom module file per executable in order to emulate - # CMake executables imported targets of grpc - for plugin_option, values in self._grpc_plugins.items(): - if self.options.get_safe(plugin_option): - target = values["target"] - executable = values["executable"] + # CMake executables imported targets of grpc plugins. + for plugin_info in self.target_info["grpc_plugins"]: + target = plugin_info["target"] + executable = plugin_info["executable"] + option_name = executable.replace("grpc_", "") + if self.options.get_safe(option_name): self._create_executable_module_file(target, executable) - @property - def _grpc_plugins(self): - return { - "cpp_plugin": { - "target": "gRPC::grpc_cpp_plugin", - "executable": "grpc_cpp_plugin", - }, - "csharp_plugin": { - "target": "gRPC::grpc_csharp_plugin", - "executable": "grpc_csharp_plugin", - }, - "node_plugin": { - "target": "gRPC::grpc_node_plugin", - "executable": "grpc_node_plugin", - }, - "objective_c_plugin": { - "target": "gRPC::grpc_objective_c_plugin", - "executable": "grpc_objective_c_plugin", - }, - "php_plugin": { - "target": "gRPC::grpc_php_plugin", - "executable": "grpc_php_plugin", - }, - "python_plugin": { - "target": "gRPC::grpc_python_plugin", - "executable": "grpc_python_plugin", - }, - "ruby_plugin": { - "target": "gRPC::grpc_ruby_plugin", - "executable": "grpc_ruby_plugin", - }, - } - def _create_executable_module_file(self, target, executable): module_abs_path = os.path.join(self.package_folder, self._module_path) @@ -316,96 +314,19 @@ def ws2_32(): def wsock32(): return ["wsock32"] if self.settings.os == "Windows" else [] - def corefoundation(): - return ["CoreFoundation"] if is_apple_os(self) else [] - - components = { - "address_sorting": { - "lib": "address_sorting", - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - "gpr": { - "lib": "gpr", - "requires": [ - "upb", "abseil::absl_base", "abseil::absl_memory", - "abseil::absl_status", "abseil::absl_str_format", - "abseil::absl_strings", "abseil::absl_synchronization", - "abseil::absl_time", "abseil::absl_optional", - "abseil::absl_flags" - ] + libsystemd(), - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - "_grpc": { - "lib": "grpc", - "requires": [ - "address_sorting", "gpr", "upb", "abseil::absl_bind_front", - "abseil::absl_flat_hash_map", "abseil::absl_inlined_vector", - "abseil::absl_statusor", "abseil::absl_random_random", - "c-ares::cares", "openssl::crypto", - "openssl::ssl", "re2::re2", "zlib::zlib", - ], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - "frameworks": corefoundation(), - }, - "grpc++": { - "lib": "grpc++", - "requires": ["_grpc", "protobuf::libprotobuf"], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - "grpc++_alts": { - "lib": "grpc++_alts", - "requires": ["grpc++", "protobuf::libprotobuf"], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - "grpc++_error_details": { - "lib": "grpc++_error_details", - "requires": ["grpc++", "protobuf::libprotobuf"], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - "upb": { - "lib": "upb", - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - "grpc_plugin_support": { - "lib": "grpc_plugin_support", - "requires": ["protobuf::libprotoc", "protobuf::libprotobuf"], + targets = self.target_info['grpc_targets'] + components = {} + for target in targets: + if self.options.secure and target['name'] in ["grpc_unsecure", "grpc++_unsecure"]: + continue + if not self.options.codegen and target['name'] in ["grpc++_reflection", "grpcpp_channelz"]: + continue + components[target['name']] = { + "lib": target['lib'], + "requires": target.get('requires', []) + libsystemd(), "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - } - - if not self.options.secure: - components.update({ - "grpc_unsecure": { - "lib": "grpc_unsecure", - "requires": [ - "address_sorting", "gpr", "upb", "abseil::absl_flat_hash_map", - "abseil::absl_inlined_vector", "abseil::absl_statusor", - "c-ares::cares", "re2::re2", "zlib::zlib", - "abseil::absl_random_random", - ], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - "frameworks": corefoundation(), - }, - "grpc++_unsecure": { - "lib": "grpc++_unsecure", - "requires": ["grpc_unsecure", "protobuf::libprotobuf"], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - }) - - if self.options.codegen: - components.update({ - "grpc++_reflection": { - "lib": "grpc++_reflection", - "requires": ["grpc++", "protobuf::libprotobuf"], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - "grpcpp_channelz": { - "lib": "grpcpp_channelz", - "requires": ["grpc++", "protobuf::libprotobuf"], - "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), - }, - }) + "frameworks": target.get('frameworks', []), + } return components @@ -433,9 +354,11 @@ def package_info(self): # Executable imported targets are added through custom CMake module files, # since conan generators don't know how to emulate these kind of targets. grpc_modules = [] - for plugin_option, values in self._grpc_plugins.items(): - if self.options.get_safe(plugin_option): - grpc_module_filename = "{}.cmake".format(values["executable"]) + for plugin_info in self.target_info["grpc_plugins"]: + executable = plugin_info["executable"] + option_name = executable.replace("grpc_", "") + if self.options.get_safe(option_name): + grpc_module_filename = "{}.cmake".format(executable) grpc_modules.append(os.path.join(self._module_path, grpc_module_filename)) self.cpp_info.set_property("cmake_build_modules", grpc_modules) @@ -446,5 +369,4 @@ def package_info(self): if grpc_modules: self.cpp_info.components["grpc_execs"].build_modules["cmake_find_package"] = grpc_modules self.cpp_info.components["grpc_execs"].build_modules["cmake_find_package_multi"] = grpc_modules - if any(self.options.get_safe(plugin_option) for plugin_option in self._grpc_plugins.keys()): self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/recipes/grpc/all/patches/v1.48.x/001-disable-cppstd-override.patch b/recipes/grpc/all/patches/v1.48.x/001-disable-cppstd-override.patch deleted file mode 100644 index dee7836ac518b..0000000000000 --- a/recipes/grpc/all/patches/v1.48.x/001-disable-cppstd-override.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1ecaea8eb7..0788b88177 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -226,21 +226,6 @@ if (NOT DEFINED CMAKE_C_STANDARD) - set(CMAKE_C_STANDARD 11) - endif() - --# Add c++14 flags --if (NOT DEFINED CMAKE_CXX_STANDARD) -- set(CMAKE_CXX_STANDARD 14) --else() -- if (CMAKE_CXX_STANDARD LESS 14) -- message(FATAL_ERROR "CMAKE_CXX_STANDARD is less than 14, please specify at least SET(CMAKE_CXX_STANDARD 14)") -- endif() --endif() --if (NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED) -- set(CMAKE_CXX_STANDARD_REQUIRED ON) --endif() --if (NOT DEFINED CMAKE_CXX_EXTENSIONS) -- set(CMAKE_CXX_EXTENSIONS OFF) --endif() -- - if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) - set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) - endif() -diff --git a/src/core/ext/xds/xds_http_fault_filter.cc b/src/core/ext/xds/xds_http_fault_filter.cc -index 2a10d2fd27..0900fedf61 100644 ---- a/src/core/ext/xds/xds_http_fault_filter.cc -+++ b/src/core/ext/xds/xds_http_fault_filter.cc -@@ -109,7 +109,7 @@ absl::StatusOr ParseHttpFaultIntoJson( - int abort_http_status_code = - envoy_extensions_filters_http_fault_v3_FaultAbort_http_status( - fault_abort); -- if (abort_http_status_code != 0 and abort_http_status_code != 200) { -+ if (abort_http_status_code != 0 && abort_http_status_code != 200) { - abort_grpc_status_code = - grpc_http2_status_to_grpc_status(abort_http_status_code); - } diff --git a/recipes/grpc/all/target_info/grpc_1.50.0.yml b/recipes/grpc/all/target_info/grpc_1.50.0.yml new file mode 100644 index 0000000000000..693b7c8e2a330 --- /dev/null +++ b/recipes/grpc/all/target_info/grpc_1.50.0.yml @@ -0,0 +1,120 @@ +grpc_version: 1.50.0 +grpc_targets: + - name: "address_sorting" + lib: "address_sorting" + - name: "gpr" + lib: "gpr" + requires: + - abseil::absl_base + - abseil::absl_core_headers + - abseil::absl_memory + - abseil::absl_random_random + - abseil::absl_status + - abseil::absl_cord + - abseil::absl_str_format + - abseil::absl_strings + - abseil::absl_synchronization + - abseil::absl_time + - abseil::absl_optional + - abseil::absl_variant + - name: "_grpc" + lib: "grpc" + requires: + - zlib::zlib + - c-ares::cares + - address_sorting + - re2::re2 + - upb + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_any_invocable + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - gpr + - openssl::ssl + - openssl::crypto + - address_sorting + - upb + frameworks: ['CoreFoundation'] + - name: "grpc_unsecure" + lib: "grpc_unsecure" + requires: + - zlib::zlib + - c-ares::cares + - address_sorting + - re2::re2 + - upb + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_any_invocable + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - gpr + - address_sorting + - upb + frameworks: ['CoreFoundation'] + - name: "grpc++" + lib: "grpc++" + requires: + - protobuf::libprotobuf + - abseil::absl_cleanup + - _grpc + - name: "grpc++_alts" + lib: "grpc++_alts" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "grpc++_error_details" + lib: "grpc++_error_details" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "grpc++_reflection" + lib: "grpc++_reflection" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "grpc++_unsecure" + lib: "grpc++_unsecure" + requires: + - protobuf::libprotobuf + - grpc_unsecure + - name: "grpc_plugin_support" + lib: "grpc_plugin_support" + requires: + - protobuf::libprotoc + - protobuf::libprotobuf + - name: "grpcpp_channelz" + lib: "grpcpp_channelz" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "upb" + lib: "upb" +grpc_plugins: + - target: "gRPC::grpc_cpp_plugin" + executable: "grpc_cpp_plugin" + - target: "gRPC::grpc_csharp_plugin" + executable: "grpc_csharp_plugin" + - target: "gRPC::grpc_node_plugin" + executable: "grpc_node_plugin" + - target: "gRPC::grpc_objective_c_plugin" + executable: "grpc_objective_c_plugin" + - target: "gRPC::grpc_php_plugin" + executable: "grpc_php_plugin" + - target: "gRPC::grpc_python_plugin" + executable: "grpc_python_plugin" + - target: "gRPC::grpc_ruby_plugin" + executable: "grpc_ruby_plugin" diff --git a/recipes/grpc/all/target_info/grpc_1.50.1.yml b/recipes/grpc/all/target_info/grpc_1.50.1.yml new file mode 100644 index 0000000000000..3bf059795e135 --- /dev/null +++ b/recipes/grpc/all/target_info/grpc_1.50.1.yml @@ -0,0 +1,120 @@ +grpc_version: 1.50.1 +grpc_targets: + - name: "address_sorting" + lib: "address_sorting" + - name: "gpr" + lib: "gpr" + requires: + - abseil::absl_base + - abseil::absl_core_headers + - abseil::absl_memory + - abseil::absl_random_random + - abseil::absl_status + - abseil::absl_cord + - abseil::absl_str_format + - abseil::absl_strings + - abseil::absl_synchronization + - abseil::absl_time + - abseil::absl_optional + - abseil::absl_variant + - name: "_grpc" + lib: "grpc" + requires: + - zlib::zlib + - c-ares::cares + - address_sorting + - re2::re2 + - upb + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_any_invocable + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - gpr + - openssl::ssl + - openssl::crypto + - address_sorting + - upb + frameworks: ['CoreFoundation'] + - name: "grpc_unsecure" + lib: "grpc_unsecure" + requires: + - zlib::zlib + - c-ares::cares + - address_sorting + - re2::re2 + - upb + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_any_invocable + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - gpr + - address_sorting + - upb + frameworks: ['CoreFoundation'] + - name: "grpc++" + lib: "grpc++" + requires: + - protobuf::libprotobuf + - abseil::absl_cleanup + - _grpc + - name: "grpc++_alts" + lib: "grpc++_alts" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "grpc++_error_details" + lib: "grpc++_error_details" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "grpc++_reflection" + lib: "grpc++_reflection" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "grpc++_unsecure" + lib: "grpc++_unsecure" + requires: + - protobuf::libprotobuf + - grpc_unsecure + - name: "grpc_plugin_support" + lib: "grpc_plugin_support" + requires: + - protobuf::libprotoc + - protobuf::libprotobuf + - name: "grpcpp_channelz" + lib: "grpcpp_channelz" + requires: + - protobuf::libprotobuf + - grpc++ + - name: "upb" + lib: "upb" +grpc_plugins: + - target: "gRPC::grpc_cpp_plugin" + executable: "grpc_cpp_plugin" + - target: "gRPC::grpc_csharp_plugin" + executable: "grpc_csharp_plugin" + - target: "gRPC::grpc_node_plugin" + executable: "grpc_node_plugin" + - target: "gRPC::grpc_objective_c_plugin" + executable: "grpc_objective_c_plugin" + - target: "gRPC::grpc_php_plugin" + executable: "grpc_php_plugin" + - target: "gRPC::grpc_python_plugin" + executable: "grpc_python_plugin" + - target: "gRPC::grpc_ruby_plugin" + executable: "grpc_ruby_plugin" diff --git a/recipes/grpc/all/target_info/grpc_1.54.3.yml b/recipes/grpc/all/target_info/grpc_1.54.3.yml new file mode 100644 index 0000000000000..a97cd9a17b217 --- /dev/null +++ b/recipes/grpc/all/target_info/grpc_1.54.3.yml @@ -0,0 +1,152 @@ +grpc_version: 1.54.3 +grpc_targets: + - name: "address_sorting" + lib: "address_sorting" + requires: + - zlib::zlib + - name: "gpr" + lib: "gpr" + requires: + - zlib::zlib + - abseil::absl_base + - abseil::absl_core_headers + - abseil::absl_flags + - abseil::absl_flags_marshalling + - abseil::absl_any_invocable + - abseil::absl_memory + - abseil::absl_random_random + - abseil::absl_status + - abseil::absl_cord + - abseil::absl_str_format + - abseil::absl_strings + - abseil::absl_synchronization + - abseil::absl_time + - abseil::absl_optional + - abseil::absl_variant + - name: "_grpc" + lib: "grpc" + requires: + - zlib::zlib + - c-ares::cares + - address_sorting + - re2::re2 + - upb + - abseil::absl_cleanup + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - gpr + - openssl::ssl + - openssl::crypto + - address_sorting + - upb + frameworks: ['CoreFoundation'] + - name: "grpc_unsecure" + lib: "grpc_unsecure" + requires: + - zlib::zlib + - c-ares::cares + - address_sorting + - re2::re2 + - upb + - abseil::absl_cleanup + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - gpr + - address_sorting + - upb + frameworks: ['CoreFoundation'] + - name: "grpc++" + lib: "grpc++" + requires: + - protobuf::libprotobuf + - zlib::zlib + - _grpc + - name: "grpc++_alts" + lib: "grpc++_alts" + requires: + - protobuf::libprotobuf + - zlib::zlib + - grpc++ + - name: "grpc++_error_details" + lib: "grpc++_error_details" + requires: + - protobuf::libprotobuf + - zlib::zlib + - grpc++ + - name: "grpc++_reflection" + lib: "grpc++_reflection" + requires: + - protobuf::libprotobuf + - zlib::zlib + - grpc++ + - name: "grpc++_unsecure" + lib: "grpc++_unsecure" + requires: + - protobuf::libprotobuf + - zlib::zlib + - grpc_unsecure + - name: "grpc_authorization_provider" + lib: "grpc_authorization_provider" + requires: + - protobuf::libprotobuf + - zlib::zlib + - re2::re2 + - abseil::absl_cleanup + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - gpr + - upb + - name: "grpc_plugin_support" + lib: "grpc_plugin_support" + requires: + - protobuf::libprotoc + - protobuf::libprotobuf + - zlib::zlib + - name: "grpcpp_channelz" + lib: "grpcpp_channelz" + requires: + - protobuf::libprotobuf + - zlib::zlib + - grpc++ + - name: "upb" + lib: "upb" + requires: + - zlib::zlib +grpc_plugins: + - target: "gRPC::grpc_cpp_plugin" + executable: "grpc_cpp_plugin" + - target: "gRPC::grpc_csharp_plugin" + executable: "grpc_csharp_plugin" + - target: "gRPC::grpc_node_plugin" + executable: "grpc_node_plugin" + - target: "gRPC::grpc_objective_c_plugin" + executable: "grpc_objective_c_plugin" + - target: "gRPC::grpc_php_plugin" + executable: "grpc_php_plugin" + - target: "gRPC::grpc_python_plugin" + executable: "grpc_python_plugin" + - target: "gRPC::grpc_ruby_plugin" + executable: "grpc_ruby_plugin" diff --git a/recipes/grpc/all/target_info/grpc_1.65.0.yml b/recipes/grpc/all/target_info/grpc_1.65.0.yml new file mode 100644 index 0000000000000..43591e8d36116 --- /dev/null +++ b/recipes/grpc/all/target_info/grpc_1.65.0.yml @@ -0,0 +1,174 @@ +grpc_version: 1.65.0 +grpc_targets: + - name: "address_sorting" + lib: "address_sorting" + - name: "gpr" + lib: "gpr" + requires: + - abseil::absl_base + - abseil::absl_core_headers + - abseil::absl_log_severity + - abseil::absl_flags + - abseil::absl_flags_marshalling + - abseil::absl_any_invocable + - abseil::absl_check + - abseil::absl_log_globals + - abseil::absl_log + - abseil::absl_memory + - abseil::absl_random_random + - abseil::absl_status + - abseil::absl_cord + - abseil::absl_str_format + - abseil::absl_strings + - abseil::absl_synchronization + - abseil::absl_time + - abseil::absl_optional + - abseil::absl_variant + - name: "_grpc" + lib: "grpc" + requires: + - upb_json_lib + - upb_textformat_lib + - re2::re2 + - zlib::zlib + - abseil::absl_algorithm_container + - abseil::absl_config + - abseil::absl_no_destructor + - abseil::absl_cleanup + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_random_bit_gen_ref + - abseil::absl_random_distributions + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - c-ares::cares + - gpr + - openssl::ssl + - openssl::crypto + - address_sorting + frameworks: ['CoreFoundation'] + - name: "grpc_unsecure" + lib: "grpc_unsecure" + requires: + - utf8_range_lib + - upb_message_lib + - zlib::zlib + - abseil::absl_algorithm_container + - abseil::absl_config + - abseil::absl_no_destructor + - abseil::absl_cleanup + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_bind_front + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_random_bit_gen_ref + - abseil::absl_random_distributions + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - c-ares::cares + - gpr + - address_sorting + frameworks: ['CoreFoundation'] + - name: "upb_base_lib" + lib: "upb_base_lib" + - name: "upb_json_lib" + lib: "upb_json_lib" + requires: + - utf8_range_lib + - upb_message_lib + - name: "upb_mem_lib" + lib: "upb_mem_lib" + - name: "upb_message_lib" + lib: "upb_message_lib" + requires: + - upb_base_lib + - upb_mem_lib + - name: "upb_textformat_lib" + lib: "upb_textformat_lib" + requires: + - utf8_range_lib + - upb_message_lib + - name: "utf8_range_lib" + lib: "utf8_range_lib" + - name: "grpc++" + lib: "grpc++" + requires: + - abseil::absl_absl_check + - abseil::absl_absl_log + - _grpc + - protobuf::libprotobuf + - name: "grpc++_alts" + lib: "grpc++_alts" + requires: + - grpc++ + - name: "grpc++_error_details" + lib: "grpc++_error_details" + requires: + - grpc++ + - name: "grpc++_reflection" + lib: "grpc++_reflection" + requires: + - grpc++ + - name: "grpc++_unsecure" + lib: "grpc++_unsecure" + requires: + - abseil::absl_absl_check + - abseil::absl_absl_log + - grpc_unsecure + - protobuf::libprotobuf + - name: "grpc_authorization_provider" + lib: "grpc_authorization_provider" + requires: + - utf8_range_lib + - upb_message_lib + - re2::re2 + - zlib::zlib + - abseil::absl_config + - abseil::absl_no_destructor + - abseil::absl_cleanup + - abseil::absl_flat_hash_map + - abseil::absl_flat_hash_set + - abseil::absl_inlined_vector + - abseil::absl_function_ref + - abseil::absl_hash + - abseil::absl_type_traits + - abseil::absl_statusor + - abseil::absl_span + - abseil::absl_utility + - c-ares::cares + - gpr + - address_sorting + - name: "grpc_plugin_support" + lib: "grpc_plugin_support" + requires: + - protobuf::libprotobuf + - protobuf::libprotoc + - name: "grpcpp_channelz" + lib: "grpcpp_channelz" + requires: + - grpc++ +grpc_plugins: + - target: "gRPC::grpc_cpp_plugin" + executable: "grpc_cpp_plugin" + - target: "gRPC::grpc_csharp_plugin" + executable: "grpc_csharp_plugin" + - target: "gRPC::grpc_node_plugin" + executable: "grpc_node_plugin" + - target: "gRPC::grpc_objective_c_plugin" + executable: "grpc_objective_c_plugin" + - target: "gRPC::grpc_php_plugin" + executable: "grpc_php_plugin" + - target: "gRPC::grpc_python_plugin" + executable: "grpc_python_plugin" + - target: "gRPC::grpc_ruby_plugin" + executable: "grpc_ruby_plugin" diff --git a/recipes/grpc/all/test_package/CMakeLists.txt b/recipes/grpc/all/test_package/CMakeLists.txt index 15a54da82cf76..9bdf7d4baad66 100644 --- a/recipes/grpc/all/test_package/CMakeLists.txt +++ b/recipes/grpc/all/test_package/CMakeLists.txt @@ -2,29 +2,22 @@ cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -find_package(protobuf CONFIG REQUIRED) find_package(gRPC CONFIG REQUIRED) -message("DYLD_LIBRARY_PATH from CMake: $ENV{DYLD_LIBRARY_PATH}") -add_executable(${PROJECT_NAME} test_package.cpp helloworld.proto) +add_executable(${PROJECT_NAME} test_package.cpp) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) # grpc 1.47.0 requires c++14 target_link_libraries(${PROJECT_NAME} PRIVATE - protobuf::libprotobuf $,gRPC::grpc++_unsecure,gRPC::grpc++> ) -target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) -if(TEST_ACTUAL_SERVER) - target_compile_definitions(${PROJECT_NAME} PRIVATE -DTEST_ACTUAL_SERVER) -endif() -protobuf_generate( - TARGET ${PROJECT_NAME} - LANGUAGE cpp -) -protobuf_generate( - TARGET ${PROJECT_NAME} - LANGUAGE grpc - GENERATE_EXTENSIONS .grpc.pb.h .grpc.pb.cc - PLUGIN protoc-gen-grpc=$ -) + +if(CHECK_GRPC_CPP_PLUGIN) + if(NOT GRPC_CPP_PLUGIN_PROGRAM) + message(FATAL_ERROR "grpc_cpp_plugin not found") + endif() + + if(NOT TARGET gRPC::grpc_cpp_plugin) + message(FATAL_ERROR "grpc_cpp_plugin target not defined, but expected") + endif() +endif() \ No newline at end of file diff --git a/recipes/grpc/all/test_package/conanfile.py b/recipes/grpc/all/test_package/conanfile.py index cb18d0a94bddb..3e5ae9905391e 100644 --- a/recipes/grpc/all/test_package/conanfile.py +++ b/recipes/grpc/all/test_package/conanfile.py @@ -1,57 +1,25 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.env import VirtualBuildEnv, VirtualRunEnv -from conan.tools.microsoft import is_msvc +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" - @property - def _is_legacy_one_profile(self): - return not hasattr(self, "settings_build") - def layout(self): cmake_layout(self) def requirements(self): self.requires(self.tested_reference_str) - self.requires("protobuf/3.21.12") - - def build_requirements(self): - if not self._is_legacy_one_profile: - # For the grpc-cpp-plugin executable at build time - self.tool_requires(self.tested_reference_str) - self.tool_requires("protobuf/") def generate(self): - # Set up environment so that we can run protoc & grpc-cpp-plugin at build time - if self._is_legacy_one_profile: - VirtualRunEnv(self).generate(scope="build") - else: - VirtualBuildEnv(self).generate() - - # Environment so that the compiled test executable can load shared libraries - runenv = VirtualRunEnv(self) - runenv.generate() - tc = CMakeToolchain(self) - tc.cache_variables["TEST_ACTUAL_SERVER"] = not (is_msvc(self) - and str(self.settings.compiler.version) in ("15", "191") - and self.settings.build_type == "Release") - - # Additional logic to override the make program on MacOS if /usr/bin/make is found by CMake - # which otherwise prevents the propagation of DYLD_LIBRARY_PATH as set by the VirtualBuildEnv - project_include = os.path.join(self.source_folder, "macos_make_override.cmake") - tc.cache_variables["CMAKE_PROJECT_test_package_INCLUDE"] = project_include + tc.cache_variables["CHECK_GRPC_CPP_PLUGIN"] = self.dependencies[self.tested_reference_str].options.cpp_plugin tc.generate() - deps = CMakeDeps(self) - deps.generate() - def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/grpc/all/test_package/helloworld.proto b/recipes/grpc/all/test_package/helloworld.proto deleted file mode 100644 index be878ce25fffc..0000000000000 --- a/recipes/grpc/all/test_package/helloworld.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2015 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -option java_multiple_files = true; -option java_package = "io.grpc.examples.helloworld"; -option java_outer_classname = "HelloWorldProto"; -option objc_class_prefix = "HLW"; - -package helloworld; - -// The greeting service definition. -service Greeter { - // Sends a greeting - rpc SayHello (HelloRequest) returns (HelloReply) {} -} - -// The request message containing the user's name. -message HelloRequest { - string name = 1; -} - -// The response message containing the greetings -message HelloReply { - string message = 1; -} diff --git a/recipes/grpc/all/test_package/macos_make_override.cmake b/recipes/grpc/all/test_package/macos_make_override.cmake deleted file mode 100644 index e7078c1b51419..0000000000000 --- a/recipes/grpc/all/test_package/macos_make_override.cmake +++ /dev/null @@ -1,13 +0,0 @@ -if (CMAKE_GENERATOR MATCHES "Unix Makefiles" AND CMAKE_HOST_APPLE AND CMAKE_MAKE_PROGRAM MATCHES "/usr/bin/make") - execute_process( - COMMAND xcrun --find make - OUTPUT_VARIABLE xcode_make OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE xcrun_error) - if(xcode_make) - #Override the value of `CMAKE_MAKE_PROGRAM` - set_property(CACHE CMAKE_MAKE_PROGRAM PROPERTY VALUE "${xcode_make}") - else() - message(WARNING "Using /usr/bin/make may prevent execution of Conan tool_requires that require DYLD_LIBRARY_PATH" - " to be set at build time.") - endif() -endif() diff --git a/recipes/grpc/all/test_package/test_package.cpp b/recipes/grpc/all/test_package/test_package.cpp index 18a37cf90692e..53d020094793e 100644 --- a/recipes/grpc/all/test_package/test_package.cpp +++ b/recipes/grpc/all/test_package/test_package.cpp @@ -1,122 +1,9 @@ -/* - * - * Copyright 2015 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - #include -#include -#include #include -#include - #include -#include "helloworld.grpc.pb.h" - -using grpc::Channel; -using grpc::ClientContext; -using grpc::Server; -using grpc::ServerBuilder; -using grpc::ServerContext; -using grpc::Status; -using helloworld::HelloRequest; -using helloworld::HelloReply; -using helloworld::Greeter; - -class GreeterClient { - public: - GreeterClient(std::shared_ptr channel) - : stub_(Greeter::NewStub(channel)) {} - - // Assembles the client's payload, sends it and presents the response back - // from the server. - std::string SayHello(const std::string& user) { - // Data we are sending to the server. - HelloRequest request; - request.set_name(user); - - // Container for the data we expect from the server. - HelloReply reply; - - // Context for the client. It could be used to convey extra information to - // the server and/or tweak certain RPC behaviors. - ClientContext context; - // The actual RPC. - Status status = stub_->SayHello(&context, request, &reply); - - // Act upon its status. - if (status.ok()) { - return reply.message(); - } else { - std::cout << status.error_code() << ": " << status.error_message() - << std::endl; - return "RPC failed"; - } - } - - private: - std::unique_ptr stub_; -}; - -// Logic and data behind the server's behavior. -class GreeterServiceImpl final : public Greeter::Service { - Status SayHello(ServerContext* context, const HelloRequest* request, - HelloReply* reply) override { - std::string prefix("Hello "); - reply->set_message(prefix + request->name()); - return Status::OK; - } -}; int main(int argc, char** argv) { - std::string server_address("127.0.0.1:0"); - GreeterServiceImpl service; - - ServerBuilder builder; - int selected_port = 0; - // Listen on the given address without any authentication mechanism. - builder.AddListeningPort(server_address, grpc::InsecureServerCredentials(), &selected_port); - // Register "service" as the instance through which we'll communicate with - // clients. In this case it corresponds to an *synchronous* service. - builder.RegisterService(&service); - - // Finally assemble the server. -#ifdef TEST_ACTUAL_SERVER - std::unique_ptr server(builder.BuildAndStart()); - std::thread serverThread([&](){ - std::cout << "Server listening on 127.0.0.1:" << selected_port << std::endl; - server->Wait(); - std::cout << "Server closed" << std::endl; - }); -#endif - - // Instantiate the client. It requires a channel, out of which the actual RPCs - // are created. This channel models a connection to an endpoint (in this case, - // localhost at the selected port). We indicate that the channel isn't - // authenticated (use of InsecureChannelCredentials()). - std::ostringstream addr; - addr << "localhost:" << selected_port; - GreeterClient greeter(grpc::CreateChannel(addr.str(), grpc::InsecureChannelCredentials())); - std::string user("world"); - std::string reply = greeter.SayHello(user); - std::cout << "Greeter received: " << reply << std::endl; - -#ifdef TEST_ACTUAL_SERVER - server->Shutdown(); - serverThread.join(); -#endif + std::cout << "gPRC version: " << grpc::Version() << "\n"; return 0; } diff --git a/recipes/grpc/all/test_v1_package/conanfile.py b/recipes/grpc/all/test_v1_package/conanfile.py deleted file mode 100644 index 5fbf37e412127..0000000000000 --- a/recipes/grpc/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,55 +0,0 @@ -from conans import ConanFile, CMake, tools -import contextlib -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build_requirements(self): - if hasattr(self, "settings_build"): - self.build_requires(str(self.requires["grpc"])) - - @contextlib.contextmanager - def _buildenv(self): - # TODO: conan v2: replace by VirtualBuildEnv and always add grpc to build requirements - if tools.cross_building(self): - yield - else: - with tools.run_environment(self): - yield - - @property - def macos_grpc_shared(self): - # Due to SIP limitations on newer macOS, `DYLD_LIBRARY_PATH`, which is set - # by `tools.run_environment`, will not be propagated properly, see - # https://stackoverflow.com/questions/35568122/why-isnt-dyld-library-path-being-propagated-here - return self.settings.os == "Macos" and self.options["grpc"].shared - - def build(self): - # TODO: always build in conan v2 - # this is a limitation of conan v1: - # at build time we want to inject PATH/LD_LIBRARY/DYLD_LIBRARY_PATH - # of build requirements so that gprc_cpp_plugin can find its - # shared dependencies (in build context as well) - # should be fixed by using: CMakeToolchain + VirtualBuildEnv - if (tools.cross_building(self) and self.options["grpc"].shared) or self.macos_grpc_shared: - self.output.warning("Skipping build of test_package due to limitation propagating " - "runtime environment when invoking protoc and grpc_cpp_plugin. " - "For a working example, please see the newer Conan 2.0 compatible " - "test package.") - return - with self._buildenv(): - cmake = CMake(self) - # FIXME: This combination of settings randomly fails in CI - cmake.definitions["TEST_ACTUAL_SERVER"] = not (self.settings.compiler == "Visual Studio" - and self.settings.compiler.version == "15" - and self.settings.build_type == "Release") - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self) and not self.macos_grpc_shared: - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/grpc/config.yml b/recipes/grpc/config.yml index 0e75e172635d2..eac63c2367c27 100644 --- a/recipes/grpc/config.yml +++ b/recipes/grpc/config.yml @@ -1,9 +1,9 @@ versions: + "1.65.0": + folder: "all" "1.54.3": folder: "all" "1.50.1": folder: "all" "1.50.0": folder: "all" - "1.48.4": - folder: "all" diff --git a/recipes/gstreamer/all/conandata.yml b/recipes/gstreamer/all/conandata.yml index b40d98596b59c..e9f1bbcb66bfb 100644 --- a/recipes/gstreamer/all/conandata.yml +++ b/recipes/gstreamer/all/conandata.yml @@ -1,10 +1,10 @@ sources: + "1.24.7": + url: "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.24.7.tar.xz" + sha256: "c0e75b124c52bb7a0c3dcdb734b2ad260ea7286a8745cf2ea629d4c849e6a958" "1.22.6": url: "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.22.6.tar.xz" sha256: "f500e6cfddff55908f937711fc26a0840de28a1e9ec49621c0b6f1adbd8f818e" - "1.22.3": - url: "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.22.3.tar.xz" - sha256: "9ffeab95053f9f6995eb3b3da225e88f21c129cd60da002d3f795db70d6d5974" "1.20.6": url: "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.20.6.tar.xz" sha256: "0545b030960680f71a95f9d39c95daae54b4d317d335e8f239d81138773c9b90" @@ -17,12 +17,6 @@ sources: "1.18.4": url: "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/1.18.4/gstreamer-1.18.4.tar.gz" sha256: "f0956c2056281f5909d030945a9896810e55084f29b6bcfc401b53e91ddf1c7f" - "1.18.3": - url: "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/1.18.3/gstreamer-1.18.3.tar.gz" - sha256: "d7e3917b5d3d9c3bd9bb70b7500314a5725377cff39bcd818df13c1fda0f60ba" - "1.18.0": - sha256: "f072da67b6dad9b4aecf2cb594aaaa66f86c22af9ba80503b90f957d47015ef8" - url: "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/1.18.0/gstreamer-1.18.0.tar.bz2" "1.16.2": - sha256: "dac037ab84d557f5d4e6e66e833f6bf8cf4f84671a311e0b2df99f9b30a9d693" url: "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/1.16.2/gstreamer-1.16.2.tar.bz2" + sha256: "dac037ab84d557f5d4e6e66e833f6bf8cf4f84671a311e0b2df99f9b30a9d693" diff --git a/recipes/gstreamer/all/conanfile.py b/recipes/gstreamer/all/conanfile.py index 5f3d9d604b6b9..71de230e0d57a 100644 --- a/recipes/gstreamer/all/conanfile.py +++ b/recipes/gstreamer/all/conanfile.py @@ -7,6 +7,7 @@ from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain from conan.tools.microsoft import is_msvc, check_min_vs +from conan.tools.scm import Version import glob import os @@ -63,13 +64,13 @@ def validate(self): raise ConanInvalidConfiguration("shared GStreamer cannot link to static GLib") def build_requirements(self): - self.tool_requires("meson/1.3.0") + self.tool_requires("meson/[>=1.2.3 <2]") # There used to be an issue with glib being shared by default but its dependencies being static # No longer the case, but see: https://github.com/conan-io/conan-center-index/pull/13400#issuecomment-1551565573 for context if not self._is_legacy_one_profile: self.tool_requires("glib/") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.1.0") + self.tool_requires("pkgconf/[>=2.2 <3]") if self.options.with_introspection: self.tool_requires("gobject-introspection/1.72.0") if self._settings_build.os == 'Windows': @@ -151,7 +152,7 @@ def package_info(self): self.cpp_info.components["gstreamer-1.0"].libs = ["gstreamer-1.0"] self.cpp_info.components["gstreamer-1.0"].includedirs = [os.path.join("include", "gstreamer-1.0")] if self.settings.os == "Linux": - self.cpp_info.components["gstreamer-1.0"].system_libs = ["m"] + self.cpp_info.components["gstreamer-1.0"].system_libs = ["m", "dl", "nsl"] self.cpp_info.components["gstreamer-1.0"].set_property("pkg_config_custom_content", pkgconfig_custom_content) self.cpp_info.components["gstreamer-base-1.0"].set_property("pkg_config_name", "gstreamer-base-1.0") @@ -173,6 +174,8 @@ def package_info(self): self.cpp_info.components["gstreamer-net-1.0"].set_property("pkg_config_name", "gstreamer-net-1.0") self.cpp_info.components["gstreamer-net-1.0"].names["pkg_config"] = "gstreamer-net-1.0" self.cpp_info.components["gstreamer-net-1.0"].requires = ["gstreamer-1.0", "glib::gio-2.0"] + if Version(self.version) >= "1.21.1" and self.settings.os != "Windows": + self.cpp_info.components["gstreamer-net-1.0"].requires.append("glib::gio-unix-2.0") self.cpp_info.components["gstreamer-net-1.0"].libs = ["gstnet-1.0"] self.cpp_info.components["gstreamer-net-1.0"].includedirs = [os.path.join("include", "gstreamer-1.0")] self.cpp_info.components["gstreamer-net-1.0"].set_property("pkg_config_custom_content", pkgconfig_custom_content) @@ -186,7 +189,7 @@ def package_info(self): self.cpp_info.components["gstreamer-check-1.0"].system_libs = ["rt", "m"] self.cpp_info.components["gstreamer-check-1.0"].set_property("pkg_config_custom_content", pkgconfig_custom_content) - # gstcoreelements and gstcoretracers are plugins which should be loaded dynamicaly, and not linked to directly + # gstcoreelements and gstcoretracers are plugins which should be loaded dynamically, and not linked to directly if not self.options.shared: self.cpp_info.components["gstcoreelements"].set_property("pkg_config_name", "gstcoreelements") self.cpp_info.components["gstcoreelements"].names["pkg_config"] = "gstcoreelements" diff --git a/recipes/gstreamer/config.yml b/recipes/gstreamer/config.yml index a3f838574c2f1..99cca4b40e56f 100644 --- a/recipes/gstreamer/config.yml +++ b/recipes/gstreamer/config.yml @@ -1,7 +1,7 @@ versions: - "1.22.6": + "1.24.7": folder: all - "1.22.3": + "1.22.6": folder: all "1.20.6": folder: all @@ -11,9 +11,5 @@ versions: folder: all "1.18.4": folder: all - "1.18.3": - folder: all - "1.18.0": - folder: all "1.16.2": folder: all diff --git a/recipes/gtest/all/conandata.yml b/recipes/gtest/all/conandata.yml index b22247dc8573d..7b9115d9da952 100644 --- a/recipes/gtest/all/conandata.yml +++ b/recipes/gtest/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.15.0": + url: "https://github.com/google/googletest/releases/download/v1.15.0/googletest-1.15.0.tar.gz" + sha256: "7315acb6bf10e99f332c8a43f00d5fbb1ee6ca48c52f6b936991b216c586aaad" "1.14.0": url: "https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz" sha256: "8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7" diff --git a/recipes/gtest/config.yml b/recipes/gtest/config.yml index fa66f2eb7d4d7..e0f7e6d533d7f 100644 --- a/recipes/gtest/config.yml +++ b/recipes/gtest/config.yml @@ -1,4 +1,6 @@ versions: + "1.15.0": + folder: all "1.14.0": folder: all "1.13.0": diff --git a/recipes/hdf5/all/conanfile.py b/recipes/hdf5/all/conanfile.py index 5a2f1eb605129..578e4cc1795c2 100644 --- a/recipes/hdf5/all/conanfile.py +++ b/recipes/hdf5/all/conanfile.py @@ -17,7 +17,7 @@ class Hdf5Conan(ConanFile): description = "HDF5 is a data model, library, and file format for storing and managing data." license = "BSD-3-Clause" topics = "hdf", "data" - homepage = "https://portal.hdfgroup.org/display/HDF5/HDF5" + homepage = "https://www.hdfgroup.org/solutions/hdf5/" url = "https://github.com/conan-io/conan-center-index" package_type = "library" settings = "os", "arch", "compiler", "build_type" diff --git a/recipes/highfive/all/conandata.yml b/recipes/highfive/all/conandata.yml index 890473cb50a68..b506775776cce 100644 --- a/recipes/highfive/all/conandata.yml +++ b/recipes/highfive/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.10.0": + url: "https://github.com/BlueBrain/HighFive/archive/refs/tags/v2.10.0.tar.gz" + sha256: "c29e8e1520e7298fabb26545f804e35bb3af257005c1c2df62e39986458d7c38" "2.9.0": url: "https://github.com/BlueBrain/HighFive/archive/refs/tags/v2.9.0.tar.gz" sha256: "6301def8ceb9f4d7a595988612db288b448a3c0546f6c83417dab38c64994d7e" diff --git a/recipes/highfive/all/conanfile.py b/recipes/highfive/all/conanfile.py index 75a077fc6305a..b502330e87c37 100644 --- a/recipes/highfive/all/conanfile.py +++ b/recipes/highfive/all/conanfile.py @@ -12,10 +12,10 @@ class HighFiveConan(ConanFile): name = "highfive" description = "HighFive is a modern header-only C++11 friendly interface for libhdf5." - license = "Boost Software License 1.0" - topics = ("hdf5", "hdf", "data") - homepage = "https://github.com/BlueBrain/HighFive" + license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/BlueBrain/HighFive" + topics = ("hdf5", "hdf", "data", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/highfive/config.yml b/recipes/highfive/config.yml index 4915edd8e2890..e2719579f8a54 100644 --- a/recipes/highfive/config.yml +++ b/recipes/highfive/config.yml @@ -1,4 +1,6 @@ versions: + "2.10.0": + folder: all "2.9.0": folder: all "2.8.0": diff --git a/recipes/highs/all/conandata.yml b/recipes/highs/all/conandata.yml index 412ffae12f185..006006dd92224 100644 --- a/recipes/highs/all/conandata.yml +++ b/recipes/highs/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.7.2": + url: "https://github.com/ERGO-Code/HiGHS/archive/refs/tags/v1.7.2.tar.gz" + sha256: "5ff96c14ae19592d3568e9ae107624cbaf3409d328fb1a586359f0adf9b34bf7" "1.7.0": url: "https://github.com/ERGO-Code/HiGHS/archive/refs/tags/v1.7.0.tar.gz" sha256: "D10175AD66E7F113AC5DC00C9D6650A620663A6884FBF2942D6EB7A3D854604F" diff --git a/recipes/highs/config.yml b/recipes/highs/config.yml index 2fc1c9523304b..bf38309e9bf30 100644 --- a/recipes/highs/config.yml +++ b/recipes/highs/config.yml @@ -1,4 +1,6 @@ versions: + "1.7.2": + folder: all "1.7.0": folder: all "1.6.0": diff --git a/recipes/hwdata/all/conandata.yml b/recipes/hwdata/all/conandata.yml index e9aebcb14c2d1..4dd2a08c35c6b 100644 --- a/recipes/hwdata/all/conandata.yml +++ b/recipes/hwdata/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.385": + url: "https://github.com/vcrhonek/hwdata/archive/v0.385.tar.gz" + sha256: "577219d44d9686e8177f6291adbff7bacdd785ad4e8a8d0c4b2a14dbf850d6ac" "0.382": url: "https://github.com/vcrhonek/hwdata/archive/v0.382.tar.gz" sha256: "5e25457b562a5227eb77eac21d5e4344bd1183c7d62b41e7d3e780ae33e053c1" diff --git a/recipes/hwdata/config.yml b/recipes/hwdata/config.yml index f134cf723e787..329f229df7ce9 100644 --- a/recipes/hwdata/config.yml +++ b/recipes/hwdata/config.yml @@ -1,4 +1,6 @@ versions: + "0.385": + folder: all "0.382": folder: all "0.378": diff --git a/recipes/hwloc/all/conandata.yml b/recipes/hwloc/all/conandata.yml index 1f50c80dd4055..98b2b2bec0fbe 100644 --- a/recipes/hwloc/all/conandata.yml +++ b/recipes/hwloc/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.11.1": + url: "https://download.open-mpi.org/release/hwloc/v2.11/hwloc-2.11.1.tar.bz2" + sha256: "04cdfbffad225ce15f66184f0f4141327dabf288d10a8b84d13f517acb7870c6" "2.10.0": url: "https://download.open-mpi.org/release/hwloc/v2.10/hwloc-2.10.0.tar.bz2" sha256: "0305dd60c9de2fbe6519fe2a4e8fdc6d3db8de574a0ca7812b92e80c05ae1392" diff --git a/recipes/hwloc/config.yml b/recipes/hwloc/config.yml index 2da6ef856dca9..c94edb0b5eb63 100644 --- a/recipes/hwloc/config.yml +++ b/recipes/hwloc/config.yml @@ -1,4 +1,6 @@ versions: + "2.11.1": + folder: all "2.10.0": folder: all "2.9.3": diff --git a/recipes/icu/all/conandata.yml b/recipes/icu/all/conandata.yml index 49d66d9be1d5a..2419b336ab78d 100644 --- a/recipes/icu/all/conandata.yml +++ b/recipes/icu/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "75.1": + url: "https://github.com/unicode-org/icu/releases/download/release-75-1/icu4c-75_1-src.tgz" + sha256: "cb968df3e4d2e87e8b11c49a5d01c787bd13b9545280fc6642f826527618caef" "74.2": url: "https://github.com/unicode-org/icu/releases/download/release-74-2/icu4c-74_2-src.tgz" sha256: "68db082212a96d6f53e35d60f47d38b962e9f9d207a74cfac78029ae8ff5e08c" @@ -11,42 +14,18 @@ sources: "73.1": url: "https://github.com/unicode-org/icu/releases/download/release-73-1/icu4c-73_1-src.tgz" sha256: "a457431de164b4aa7eca00ed134d00dfbf88a77c6986a10ae7774fc076bb8c45" - "72.1": - url: "https://github.com/unicode-org/icu/releases/download/release-72-1/icu4c-72_1-src.tgz" - sha256: "a2d2d38217092a7ed56635e34467f92f976b370e20182ad325edea6681a71d68" - "71.1": - url: "https://github.com/unicode-org/icu/releases/download/release-71-1/icu4c-71_1-src.tgz" - sha256: "67a7e6e51f61faf1306b6935333e13b2c48abd8da6d2f46ce6adca24b1e21ebf" - "70.1": - url: "https://github.com/unicode-org/icu/releases/download/release-70-1/icu4c-70_1-src.tgz" - sha256: "8d205428c17bf13bb535300669ed28b338a157b1c01ae66d31d0d3e2d47c3fd5" - "69.1": - url: "https://github.com/unicode-org/icu/releases/download/release-69-1/icu4c-69_1-src.tgz" - sha256: "4cba7b7acd1d3c42c44bb0c14be6637098c7faf2b330ce876bc5f3b915d09745" - "68.2": - url: "https://github.com/unicode-org/icu/releases/download/release-68-2/icu4c-68_2-src.tgz" - sha256: "c79193dee3907a2199b8296a93b52c5cb74332c26f3d167269487680d479d625" patches: + "75.1": + - patch_file: "patches/0001-69.1-fix-mingw.patch" "74.2": - patch_file: "patches/0001-69.1-fix-mingw.patch" + - patch_file: "patches/0002-74.2-fix-emscripten.patch" + patch_description: "Add config file for wasm-emscripten platform" + patch_type: "portability" + patch_source: "https://gerrit.libreoffice.org/c/core/+/111130/9/external/icu/icu4c-emscripten-cross.patch.1" "74.1": - patch_file: "patches/0001-69.1-fix-mingw.patch" "73.2": - patch_file: "patches/0001-69.1-fix-mingw.patch" "73.1": - patch_file: "patches/0001-69.1-fix-mingw.patch" - "72.1": - - patch_file: "patches/0001-69.1-fix-mingw.patch" - "71.1": - - patch_file: "patches/0001-69.1-fix-mingw.patch" - - patch_file: "patches/0001-71.1-fix-undef-strict-ansi.patch" - - patch_file: "patches/0001-71.1-fix-emscripten.patch" - patch_description: "Add config file for wasm-emscripten platform" - patch_type: "portability" - patch_source: "https://gerrit.libreoffice.org/c/core/+/111130/9/external/icu/icu4c-emscripten-cross.patch.1" - "70.1": - - patch_file: "patches/0001-69.1-fix-mingw.patch" - "69.1": - - patch_file: "patches/0001-69.1-fix-mingw.patch" - "68.2": - - patch_file: "patches/0001-67.1-fix-mingw.patch" diff --git a/recipes/icu/all/conanfile.py b/recipes/icu/all/conanfile.py index 9e343976b416b..2f4f7b8b725d0 100644 --- a/recipes/icu/all/conanfile.py +++ b/recipes/icu/all/conanfile.py @@ -6,7 +6,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os -from conan.tools.build import cross_building, stdcpp_library +from conan.tools.build import cross_building, stdcpp_library, check_min_cppstd from conan.tools.env import Environment, VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, mkdir, rename, replace_in_file, rm, rmdir, save from conan.tools.gnu import Autotools, AutotoolsToolchain @@ -46,6 +46,20 @@ class ICUConan(ConanFile): "with_extras": False, } + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + @property def _settings_build(self): return getattr(self, "settings_build", self.settings) @@ -69,11 +83,21 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + if Version(self.version) >= "74.1": + self.license = "Unicode-3.0" def validate(self): if self.options.dat_package_file: if not os.path.exists(str(self.options.dat_package_file)): raise ConanInvalidConfiguration("Non-existent dat_package_file specified") + if Version(self.version) >= "75.1": + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + 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." + ) def layout(self): basic_layout(self, src_folder="src") @@ -153,7 +177,10 @@ def generate(self): if is_msvc(self): env = Environment() env.define("CC", "cl -nologo") - env.define("CXX", "cl -nologo") + if Version(self.version) < "75.1": + env.define("CXX", "cl -nologo") + else: + env.define("CXX", "cl -nologo -std:c++17") if cross_building(self): env.define("icu_cv_host_frag", "mh-msys-msvc") env.vars(self).save_script("conanbuild_icu_msvc") diff --git a/recipes/icu/all/patches/0001-67.1-fix-mingw.patch b/recipes/icu/all/patches/0001-67.1-fix-mingw.patch deleted file mode 100644 index 93f5bd7f9ab8a..0000000000000 --- a/recipes/icu/all/patches/0001-67.1-fix-mingw.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- source/config/mh-mingw64 -+++ source/config/mh-mingw64 -@@ -94,7 +94,7 @@ - # This is also for backwards compatibility. - DATA_STUBNAME = dt - I18N_STUBNAME = in --LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) -+#LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) - - #SH### copied from Makefile.inc - #SH## for icu-config to test with -@@ -102,10 +102,10 @@ - #SH#ICULIBS_COMMON_LIB_NAME_A="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}.${A}" - - #SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" --ICULIBS_DT="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" --ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" --ICULIBS_IO="-l$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" --ICULIBS_UC="-l$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" -+#ICULIBS_DT="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" -+#ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" -+#ICULIBS_IO="-l$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" -+#ICULIBS_UC="-l$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" - #SH# - #SH## ICULIBS is the set of libraries your application should link - #SH## with usually. Many applications will want to add ${ICULIBS_I18N} as well. ---- source/data/Makefile.in -+++ source/data/Makefile.in -@@ -207,7 +207,7 @@ - ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES) - # For MinGW, do we want the DLL to go in the bin location? - ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES) -- $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(DESTDIR)$(bindir) -+ $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_DIR) - else - $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_DIR) - endif diff --git a/recipes/icu/all/patches/0001-71.1-fix-undef-strict-ansi.patch b/recipes/icu/all/patches/0001-71.1-fix-undef-strict-ansi.patch deleted file mode 100644 index 1e4386229387a..0000000000000 --- a/recipes/icu/all/patches/0001-71.1-fix-undef-strict-ansi.patch +++ /dev/null @@ -1,18 +0,0 @@ -Waiting on a fix for: https://unicode-org.atlassian.net/browse/ICU-22002 - ---- source/io/ufile.cpp 2022-04-08 06:41:55.000000000 +0800 -+++ source/io/ufile.cpp 2022-06-10 13:00:05.354655951 +0800 -@@ -21,13 +21,6 @@ - */ - - #include "unicode/platform.h" --#if defined(__GNUC__) && !defined(__clang__) && defined(__STRICT_ANSI__) --// g++, fileno isn't defined if __STRICT_ANSI__ is defined. --// clang fails to compile the header unless __STRICT_ANSI__ is defined. --// __GNUC__ is set by both gcc and clang. --#undef __STRICT_ANSI__ --#endif -- - #include "locmap.h" - #include "unicode/ustdio.h" - diff --git a/recipes/icu/all/patches/0001-71.1-fix-emscripten.patch b/recipes/icu/all/patches/0002-74.2-fix-emscripten.patch similarity index 88% rename from recipes/icu/all/patches/0001-71.1-fix-emscripten.patch rename to recipes/icu/all/patches/0002-74.2-fix-emscripten.patch index 5693ab70111d5..9c7748fc3e0f1 100644 --- a/recipes/icu/all/patches/0001-71.1-fix-emscripten.patch +++ b/recipes/icu/all/patches/0002-74.2-fix-emscripten.patch @@ -1,8 +1,6 @@ -diff --git a/source/acinclude.m4 b/source/acinclude.m4 -index 507f41f..2980ef1 100644 --- a/source/acinclude.m4 +++ b/source/acinclude.m4 -@@ -84,6 +84,7 @@ x86_64-*-cygwin) +@@ -85,6 +85,7 @@ powerpc*-apple-darwin*) icu_cv_host_frag=mh-darwin-ppc ;; *-dec-osf*) icu_cv_host_frag=mh-alpha-osf ;; *-*-nto*) icu_cv_host_frag=mh-qnx ;; *-ncr-*) icu_cv_host_frag=mh-mpras ;; @@ -10,9 +8,6 @@ index 507f41f..2980ef1 100644 *) icu_cv_host_frag=mh-unknown ;; esac ] -diff --git a/source/config/mh-emscripten b/source/config/mh-emscripten -new file mode 100644 -index 0000000..ee2b90b --- /dev/null +++ b/source/config/mh-emscripten @@ -0,0 +1,86 @@ @@ -22,7 +17,7 @@ index 0000000..ee2b90b +## Commands to generate dependency files +GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS) +GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -+ ++ +## Flags for position independent code +SHAREDLIBCFLAGS = -fPIC +SHAREDLIBCXXFLAGS = -fPIC @@ -102,12 +97,9 @@ index 0000000..ee2b90b + +## without assembly +PKGDATA_OPTS = -O $(top_builddir)/data/icupkg.inc -w -\ No newline at end of file -diff --git a/source/configure b/source/configure -index 71e1462..4a8140e 100644 --- a/source/configure +++ b/source/configure -@@ -5339,6 +5339,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +@@ -5342,6 +5342,7 @@ powerpc*-apple-darwin*) icu_cv_host_frag=mh-darwin-ppc ;; *-dec-osf*) icu_cv_host_frag=mh-alpha-osf ;; *-*-nto*) icu_cv_host_frag=mh-qnx ;; *-ncr-*) icu_cv_host_frag=mh-mpras ;; diff --git a/recipes/icu/all/test_package/CMakeLists.txt b/recipes/icu/all/test_package/CMakeLists.txt index 4275c0782ed46..56b6a86f5e653 100644 --- a/recipes/icu/all/test_package/CMakeLists.txt +++ b/recipes/icu/all/test_package/CMakeLists.txt @@ -5,4 +5,8 @@ find_package(ICU REQUIRED uc) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE ICU::uc) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +if(ICU_VERSION VERSION_LESS "75.1") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +endif() diff --git a/recipes/icu/config.yml b/recipes/icu/config.yml index bd6c5fcac524c..a0d8cc252fedd 100644 --- a/recipes/icu/config.yml +++ b/recipes/icu/config.yml @@ -1,4 +1,6 @@ versions: + "75.1": + folder: all "74.2": folder: all "74.1": @@ -7,13 +9,3 @@ versions: folder: all "73.1": folder: all - "72.1": - folder: all - "71.1": - folder: all - "70.1": - folder: all - "69.1": - folder: all - "68.2": - folder: all diff --git a/recipes/imath/all/conandata.yml b/recipes/imath/all/conandata.yml index 3f20468a0db96..afe9fa4328195 100644 --- a/recipes/imath/all/conandata.yml +++ b/recipes/imath/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.1.12": + url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.12.tar.gz" + sha256: "8a1bc258f3149b5729c2f4f8ffd337c0e57f09096e4ba9784329f40c4a9035da" "3.1.11": url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.11.tar.gz" sha256: "9057849585e49b8b85abe7cc1e76e22963b01bfdc3b6d83eac90c499cd760063" diff --git a/recipes/imath/config.yml b/recipes/imath/config.yml index 61b9f04e8a57f..299f457f6ad28 100644 --- a/recipes/imath/config.yml +++ b/recipes/imath/config.yml @@ -1,4 +1,6 @@ versions: + "3.1.12": + folder: all "3.1.11": folder: all "3.1.10": diff --git a/recipes/imgui/all/conandata.yml b/recipes/imgui/all/conandata.yml index 55555c5ba2a12..121bde17f2f83 100644 --- a/recipes/imgui/all/conandata.yml +++ b/recipes/imgui/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "1.91.0": + url: "https://github.com/ocornut/imgui/archive/v1.91.0.tar.gz" + sha256: "6e62c87252e6b3725ba478a1c04dc604aa0aaeec78fedcf4011f1e52548f4cc9" + "1.91.0-docking": + url: "https://github.com/ocornut/imgui/archive/v1.91.0-docking.tar.gz" + sha256: "b08a569eedcf2bf25e763e034754fdbe37dfcb035072310781c92fa6e6504bf7" + "1.90.9": + url: "https://github.com/ocornut/imgui/archive/v1.90.9.tar.gz" + sha256: "04943919721e874ac75a2f45e6eb6c0224395034667bf508923388afda5a50bf" + "1.90.9-docking": + url: "https://github.com/ocornut/imgui/archive/v1.90.9-docking.tar.gz" + sha256: "48e7e4e4f154ad98d0946126a84e2375f849f6a67792129a805817dd60a34330" "1.90.8": url: "https://github.com/ocornut/imgui/archive/v1.90.8.tar.gz" sha256: "f606b4fb406aa0f8dad36d4a9dd3d6f0fd39f5f0693e7468abc02d545fb505ae" @@ -23,69 +35,12 @@ sources: "1.90.5-docking": url: "https://github.com/ocornut/imgui/archive/v1.90.5-docking.tar.gz" sha256: "8a5e1e594d6c8552e46e4c1ba8dd9deb51262067f04937904babc04384533ccc" - "1.90.4": - url: "https://github.com/ocornut/imgui/archive/v1.90.4.tar.gz" - sha256: "5d9dc738af74efa357f2a9fc39fe4a28d29ef1dfc725dd2977ccf3f3194e996e" - "1.90.4-docking": - url: "https://github.com/ocornut/imgui/archive/v1.90.4-docking.tar.gz" - sha256: "91ac3c6fd83cc3bea38745af57665b13464ba235dc11373d0898ae6fe35a8a65" - "1.90.3": - url: "https://github.com/ocornut/imgui/archive/v1.90.3.tar.gz" - sha256: "40b302d01092c9393373b372fe07ea33ac69e9491893ebab3bf952b2c1f5fd23" - "1.90.3-docking": - url: "https://github.com/ocornut/imgui/archive/v1.90.3-docking.tar.gz" - sha256: "ebd1da0f76a95a7a690f8a0dfa119e1c6da4eee40383e582fb75374792be0891" - "1.90.2": - url: "https://github.com/ocornut/imgui/archive/v1.90.2.tar.gz" - sha256: "452d1c11e5c4b4dfcca272915644a65f1c076498e8318b141ca75cd30470dd68" - "1.90.2-docking": - url: "https://github.com/ocornut/imgui/archive/v1.90.2-docking.tar.gz" - sha256: "69f1cd78d49ec9cc847b7082d641434ea731f0be41c6930bea08a46a0794ac17" - "1.90.1": - url: "https://github.com/ocornut/imgui/archive/v1.90.1.tar.gz" - sha256: "21dcc985bb2ae8fe48047c86135dbc438d6980a8f2e08babbda5be820592f282" - "1.90.1-docking": - url: "https://github.com/ocornut/imgui/archive/v1.90.1-docking.tar.gz" - sha256: "6804c3d8dc6d83b892d3c5491d8164840079d9a795fb7c4cef2eaa1b04c86a0c" - "1.90": - url: "https://github.com/ocornut/imgui/archive/v1.90.tar.gz" - sha256: "170986e6a4b83d165bfc1d33c2c5a5bc2d67e5b97176287485c51a2299249296" - "1.90-docking": - url: "https://github.com/ocornut/imgui/archive/v1.90-docking.tar.gz" - sha256: "d4b7fd185443111a3a892d4625c85ab9666c6c9cb5484e3a447de6af419f8d2f" "1.89.9": url: "https://github.com/ocornut/imgui/archive/v1.89.9.tar.gz" sha256: "1acc27a778b71d859878121a3f7b287cd81c29d720893d2b2bf74455bf9d52d6" "1.89.9-docking": url: "https://github.com/ocornut/imgui/archive/v1.89.9-docking.tar.gz" sha256: "2481489ce9091239b3cab8a330d0409ffdd9ee607ad1f3fe3a0b0b751c27a8eb" - "1.89.8": - url: "https://github.com/ocornut/imgui/archive/v1.89.8.tar.gz" - sha256: "6680ccc32430009a8204291b1268b2367d964bd6d1b08a4e0358a017eb8e8c9e" - "1.89.8-docking": - url: "https://github.com/ocornut/imgui/archive/v1.89.8-docking.tar.gz" - sha256: "d48c4856e42a8fa3e6df3efae7eae86012fa65d9dceb03d1a2080a2386063635" - "1.89.7": - url: "https://github.com/ocornut/imgui/archive/v1.89.7.tar.gz" - sha256: "115ee9e242af98a884302ac0f6ca3b2b26b1f10c660205f5e7ad9f1d1c96d269" - "1.89.7-docking": - url: "https://github.com/ocornut/imgui/archive/v1.89.7-docking.tar.gz" - sha256: "28216ec07e87f075b63486d8d5212e4d89542b69bd10a482f1b4b7dc6f1613a0" - "1.89.5": - url: "https://github.com/ocornut/imgui/archive/v1.89.5.tar.gz" - sha256: "eab371005c86dd029523a0c4ba757840787163740d45c1f4e5a110eb21820546" - "1.89.4": - url: "https://github.com/ocornut/imgui/archive/v1.89.4.tar.gz" - sha256: "69f1e83adcab3fdd27b522f5075f407361b0d3875e3522b13d33bc2ae2c7d48c" - "1.89.3": - url: "https://github.com/ocornut/imgui/archive/v1.89.3.tar.gz" - sha256: "3b665fadd5580b7ef494d5d8bb1c12b2ec53ee723034caf43332956381f5d631" - "1.89.2": - url: "https://github.com/ocornut/imgui/archive/v1.89.2.tar.gz" - sha256: "e110beffda505e6954feb7b13541d35a7c12a176b9723290c853684713df6a67" - "1.89.1": - url: "https://github.com/ocornut/imgui/archive/v1.89.1.tar.gz" - sha256: "6d02a0079514d869e4b5f8f590f9060259385fcddd93a07ef21298b6a9610cbd" "1.88": url: "https://github.com/ocornut/imgui/archive/v1.88.tar.gz" sha256: "9f14c788aee15b777051e48f868c5d4d959bd679fc5050e3d2a29de80d8fd32e" @@ -98,16 +53,3 @@ sources: "1.85": url: "https://github.com/ocornut/imgui/archive/v1.85.tar.gz" sha256: "7ed49d1f4573004fa725a70642aaddd3e06bb57fcfe1c1a49ac6574a3e895a77" - - # These versions belong to the docking branch in ImGUI repository. This branch is declared stable and production ready, and - # it is synced with `master` regularly. These versions are taken from that branch using the commit where `master` was synced - # after a regular release - "cci.20230105+1.89.2.docking": - url: "https://github.com/ocornut/imgui/archive/d822c65317ba881798bed8fce9ffba267d27dada.zip" - sha256: "0d2c09ae4c450d4c74f62e66667809752c9d11438354fc331ed9da5d5e850071" - "cci.20220621+1.88.docking": - url: "https://github.com/ocornut/imgui/archive/9cd9c2eff99877a3f10a7f9c2a3a5b9c15ea36c6.tar.gz" - sha256: "61fb1ce5d48089bce1b4f92e9320fd234b2ce960f35f965b313c4842b3c8e440" - "cci.20220207+1.87.docking": - url: "https://github.com/ocornut/imgui/archive/1ee252772ae9c0a971d06257bb5c89f628fa696a.tar.gz" - sha256: "c50e263660e1deb6e85b10a0382bf8a6fc861645e44b7012bd32da5460829ae0" diff --git a/recipes/imgui/config.yml b/recipes/imgui/config.yml index b198d594c6e2e..25bef8f3ff274 100644 --- a/recipes/imgui/config.yml +++ b/recipes/imgui/config.yml @@ -1,4 +1,12 @@ versions: + "1.91.0": + folder: all + "1.91.0-docking": + folder: all + "1.90.9": + folder: all + "1.90.9-docking": + folder: all "1.90.8": folder: all "1.90.8-docking": @@ -15,48 +23,10 @@ versions: folder: all "1.90.5-docking": folder: all - "1.90.4": - folder: all - "1.90.4-docking": - folder: all - "1.90.3": - folder: all - "1.90.3-docking": - folder: all - "1.90.2": - folder: all - "1.90.2-docking": - folder: all - "1.90.1": - folder: all - "1.90.1-docking": - folder: all - "1.90": - folder: all - "1.90-docking": - folder: all "1.89.9": folder: all "1.89.9-docking": folder: all - "1.89.8": - folder: all - "1.89.8-docking": - folder: all - "1.89.7": - folder: all - "1.89.7-docking": - folder: all - "1.89.5": - folder: all - "1.89.4": - folder: all - "1.89.3": - folder: all - "1.89.2": - folder: all - "1.89.1": - folder: all "1.88": folder: all "1.87": @@ -66,12 +36,3 @@ versions: "1.85": folder: all - # These versions belong to the docking branch in ImGUI repository. This branch is declared stable and production ready, and - # it is synced with `master` regularly. These versions are taken from that branch using the commit where `master` was synced - # after a regular release - "cci.20230105+1.89.2.docking": - folder: all - "cci.20220621+1.88.docking": - folder: all - "cci.20220207+1.87.docking": - folder: all diff --git a/recipes/intx/all/conandata.yml b/recipes/intx/all/conandata.yml index 82ca4023ed3e5..5e7cb7a5f366d 100644 --- a/recipes/intx/all/conandata.yml +++ b/recipes/intx/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.12.0": + url: "https://github.com/chfast/intx/archive/v0.12.0.tar.gz" + sha256: "d68ff5dde9a2f340c73be67888f3f72bb18a2ad30aa16cd663ec3bc611afc9b4" + "0.11.0": + url: "https://github.com/chfast/intx/archive/v0.11.0.tar.gz" + sha256: "bff2a78e3a9a3b9bbabf50500feae65bc0ec50a2364f4a83768277d6eba7a844" "0.10.1": url: "https://github.com/chfast/intx/archive/v0.10.1.tar.gz" sha256: "4663073458b5e0564e92058e5aa1a7ce88634fc72827191856b17bd7335de29b" diff --git a/recipes/intx/all/conanfile.py b/recipes/intx/all/conanfile.py index fcbc0174dcfbb..813526a90e8a3 100644 --- a/recipes/intx/all/conanfile.py +++ b/recipes/intx/all/conanfile.py @@ -17,14 +17,12 @@ class IntxConan(ConanFile): topics = ("evm", "biginteger", "arbitrary-precision", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property def _min_cppstd(self): return 20 - def layout(self): - basic_layout(self, src_folder="src") - @property def _compilers_minimum_version(self): return { @@ -35,13 +33,15 @@ def _compilers_minimum_version(self): "apple-clang": "14.1", } + def layout(self): + basic_layout(self, src_folder="src") + def package_id(self): self.info.clear() def validate(self): - if self.settings.get_safe("compiler.cppstd"): + if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - 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( @@ -63,3 +63,6 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "intx") + self.cpp_info.set_property("cmake_target_name", "intx::intx") diff --git a/recipes/intx/config.yml b/recipes/intx/config.yml index 36cf695df0df6..85ca9aa067b7a 100644 --- a/recipes/intx/config.yml +++ b/recipes/intx/config.yml @@ -1,3 +1,7 @@ versions: + "0.12.0": + folder: all + "0.11.0": + folder: all "0.10.1": folder: all diff --git a/recipes/iphreeqc/all/conandata.yml b/recipes/iphreeqc/all/conandata.yml new file mode 100644 index 0000000000000..a249b379218dd --- /dev/null +++ b/recipes/iphreeqc/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "3.8.1": + url: "https://github.com/usgs-coupled/iphreeqc/releases/download/v3.8.1/iphreeqc-3.8.1-16963.tar.gz" + sha256: "15c47959a25e6c8b5d0c47214ea0c3f3626257dacc24a89d0f9c9635186c375c" +patches: + "3.8.1": + - patch_file: "patches/3.8.1-0001-dont-build-examples-doc-database.patch" + patch_description: "Don't build examples, doc and database" + patch_type: "conan" diff --git a/recipes/iphreeqc/all/conanfile.py b/recipes/iphreeqc/all/conanfile.py new file mode 100644 index 0000000000000..84c2b765e8d90 --- /dev/null +++ b/recipes/iphreeqc/all/conanfile.py @@ -0,0 +1,101 @@ +from conan import ConanFile +from conan.tools.build import stdcpp_library +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.microsoft import msvc_runtime_flag +import os + +required_conan_version = ">=1.54.0" + + +class IphreeqcConan(ConanFile): + name = "iphreeqc" + description = ( + "Library implementing the geochemical model PHREEQC. It is capable of " + "simulating a wide range of equilibrium reactions between water and " + "minerals, ion exchangers, surface complexes, solid solutions, and gases." + ) + license = "FSFUL" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.usgs.gov/software/phreeqc-version-3" + topics = ("geochemistry", "modeling") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _is_cl_like(self): + return self.settings.compiler.get_safe("runtime") is not None + + @property + def _is_cl_like_static_runtime(self): + return self._is_cl_like and "MT" in msvc_runtime_flag(self) + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def build_requirements(self): + self.tool_requires("cmake/[>=3.20 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + if self._is_cl_like: + tc.variables["IPHREEQC_STATIC_RUNTIME"] = self._is_cl_like_static_runtime + tc.variables["IPHREEQC_ENABLE_MODULE"] = False + tc.variables["IPHREEQC_FORTRAN_TESTING"] = False + tc.variables["BUILD_CLR_LIBS"] = False + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "INSTALL", 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", "cmake")) + rmdir(self, os.path.join(self.package_folder, "src")) + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "IPhreeqc") + self.cpp_info.set_property("cmake_target_name", "IPhreeqc::IPhreeqc") + postfix = "" + if self.settings.build_type == "Debug": + postfix += "d" + elif self.settings.build_type == "MinSizeRel": + postfix += "msr" + elif self.settings.build_type == "RelWithDebInfo": + postfix += "rwd" + self.cpp_info.libs = [f"IPhreeqc{postfix}"] + self.cpp_info.defines.append("IPHREEQC_NO_FORTRAN_MODULE") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + if not self.options.shared: + libcxx = stdcpp_library(self) + if libcxx: + self.cpp_info.system_libs.append(libcxx) diff --git a/recipes/iphreeqc/all/patches/3.8.1-0001-dont-build-examples-doc-database.patch b/recipes/iphreeqc/all/patches/3.8.1-0001-dont-build-examples-doc-database.patch new file mode 100644 index 0000000000000..3704fa470a6a6 --- /dev/null +++ b/recipes/iphreeqc/all/patches/3.8.1-0001-dont-build-examples-doc-database.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -400,7 +400,7 @@ endif() + + include (CTest) + +-if (STANDALONE_BUILD) ++if (0) + + add_subdirectory(database) + add_subdirectory(doc) diff --git a/recipes/iphreeqc/all/test_package/CMakeLists.txt b/recipes/iphreeqc/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..13618cfaf693e --- /dev/null +++ b/recipes/iphreeqc/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(IPhreeqc REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE IPhreeqc::IPhreeqc) diff --git a/recipes/iphreeqc/all/test_package/conanfile.py b/recipes/iphreeqc/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/iphreeqc/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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 = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + 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): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/iphreeqc/all/test_package/test_package.c b/recipes/iphreeqc/all/test_package/test_package.c new file mode 100644 index 0000000000000..f29ed23c37243 --- /dev/null +++ b/recipes/iphreeqc/all/test_package/test_package.c @@ -0,0 +1,8 @@ +#include + +int main() +{ + int id = CreateIPhreeqc(); + DestroyIPhreeqc(id); + return 0; +} diff --git a/recipes/iphreeqc/config.yml b/recipes/iphreeqc/config.yml new file mode 100644 index 0000000000000..f3cf585c380d6 --- /dev/null +++ b/recipes/iphreeqc/config.yml @@ -0,0 +1,3 @@ +versions: + "3.8.1": + folder: all diff --git a/recipes/itk/all/conandata.yml b/recipes/itk/all/conandata.yml index 9e7f86e6f5246..74a479bc9586a 100644 --- a/recipes/itk/all/conandata.yml +++ b/recipes/itk/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.3.0": + url: "https://github.com/InsightSoftwareConsortium/ITK/releases/download/v5.3.0/InsightToolkit-5.3.0.tar.gz" + sha256: "57a4471133dc8f76bde3d6eb45285c440bd40d113428884a1487472b7b71e383" "5.1.2": url: "https://github.com/InsightSoftwareConsortium/ITK/releases/download/v5.1.2/InsightToolkit-5.1.2.tar.gz" sha256: "f1e5a78e11125348f68f655c6b89b617c3a8b2c09f710081f621054811a70c98" @@ -6,6 +9,10 @@ sources: url: "https://github.com/InsightSoftwareConsortium/ITK/releases/download/v5.1.0/InsightToolkit-5.1.0.tar.gz" sha256: "121020a1611508cec8123eb5226215598cec07be627d843a2e6b6da891e61d13" patches: + "5.3.0": + - patch_file: "patches/0002-find-conan-packages.patch" + patch_description: "inject thirdparties from conan" + patch_type: "conan" "5.1.2": - patch_file: "patches/0001-find-conan-packages.patch" patch_description: "inject thirdparties from conan" diff --git a/recipes/itk/all/conanfile.py b/recipes/itk/all/conanfile.py index c9a9ded1e49f4..0ab11f37d60c6 100644 --- a/recipes/itk/all/conanfile.py +++ b/recipes/itk/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir, save from conan.tools.microsoft import check_min_vs, is_msvc from conan.tools.scm import Version @@ -69,17 +70,21 @@ def requirements(self): #self.requires("dcmtk/3.6.7") self.requires("double-conversion/3.3.0") self.requires("eigen/3.4.0") - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("fftw/3.3.10") - self.requires("gdcm/3.0.21") - self.requires("hdf5/1.14.1") + self.requires("gdcm/3.0.23") + self.requires("hdf5/1.14.3") self.requires("libjpeg/9e") - self.requires("libpng/1.6.40") - self.requires("libtiff/4.5.1") - self.requires("openjpeg/2.5.0") + self.requires("libpng/[>=1.6 <2]") + self.requires("libtiff/4.6.0") + self.requires("openjpeg/2.5.2") self.requires("onetbb/2021.9.0") self.requires("zlib/[>=1.2.11 <2]") + def build_requirements(self): + if Version(self.version) >= "5.3.0": + self.tool_requires("cmake/[>=3.16.3 <4]") + def validate(self): if self.options.shared and not self.dependencies["hdf5"].options.shared: raise ConanInvalidConfiguration("When building a shared itk, hdf5 needs to be shared too (or not linked to by the consumer).\n" @@ -93,6 +98,9 @@ def validate(self): raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + if Version(self.version) < "5.2" and self.settings.os == "Macos": + raise ConanInvalidConfiguration(f"{self.ref} fails to compile in {self.settings.os}, fixed in 5.2.0") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -104,6 +112,9 @@ def generate(self): tc.variables["BUILD_EXAMPLES"] = False tc.variables["BUILD_TESTING"] = False tc.variables["BUILD_DOCUMENTATION"] = False + tc.variables["DO_NOT_BUILD_ITK_TEST_DRIVER"] = True + tc.variables["DO_NOT_INSTALL_ITK_TEST_DRIVER"] = True + tc.variables["DISABLE_MODULE_TESTS"] = True tc.variables["ITK_SKIP_PATH_LENGTH_CHECKS"] = True tc.variables["ITK_USE_SYSTEM_LIBRARIES"] = True @@ -235,6 +246,9 @@ def generate(self): tc = CMakeDeps(self) tc.generate() + venv = VirtualBuildEnv(self) + venv.generate() + def _patch_sources(self): apply_conandata_patches(self) #The CMake policy CMP0091 must be NEW, but is '' @@ -258,6 +272,10 @@ def _itk_subdir(self): def _cmake_module_dir(self): return os.path.join("lib", "cmake", self._itk_subdir) + @property + def _module_variables_file_rel_path(self): + return os.path.join(self._cmake_module_dir, f"conan-official-{self.name}-variables.cmake") + @property def _module_file_rel_path(self): return os.path.join(self._cmake_module_dir, f"conan-official-{self.name}-targets.cmake") @@ -452,6 +470,10 @@ def libdl(): "ITKVideoCore": {"requires": ["ITKCommon"]}, } + def _create_cmake_module_variables(self): + content = 'set(ITK_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}")' + save(self, os.path.join(self.package_folder, self._module_variables_file_rel_path), content) + def _create_cmake_module_alias_targets(self): targets = {target:f"ITK::{target}" for target in self._itk_components.keys()} content = "" @@ -464,6 +486,14 @@ def _create_cmake_module_alias_targets(self): """) save(self, os.path.join(self.package_folder, self._module_file_rel_path), content) + @property + def _itk_modules_files(self): + cmake_files = [] + if Version(self.version) >= "5.3": + cmake_files.extend(["ITKFactoryRegistration.cmake", "ITKInitializeCXXStandard.cmake"]) + cmake_files.append("UseITK.cmake") + return cmake_files + def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) @@ -472,18 +502,23 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) rmdir(self, os.path.join(self.package_folder, self._cmake_module_dir, "Modules")) - # Do not remove UseITK.cmake and *.h.in files + + # Do not remove UseITK.cmake, ITKFactoryRegistration.cmake, ITKInitializeCXXStandard.cmake and *.h.in files for cmake_file in glob.glob(os.path.join(self.package_folder, self._cmake_module_dir, "*.cmake")): - if os.path.basename(cmake_file) != "UseITK.cmake": + file_name = os.path.basename(cmake_file) + if file_name not in self._itk_modules_files: os.remove(cmake_file) + + self._create_cmake_module_variables() self._create_cmake_module_alias_targets() def package_info(self): - self.cpp_info.set_property("cmake_file_name", "ITK") - self.cpp_info.set_property("cmake_build_modules", [os.path.join(self._cmake_module_dir, "UseITK.cmake")]) - itk_version = Version(self.version) lib_suffix = f"-{itk_version.major}.{itk_version.minor}" + build_modules = [self._module_variables_file_rel_path] + build_modules.extend([os.path.join(self._cmake_module_dir, f) for f in self._itk_modules_files]) + self.cpp_info.set_property("cmake_file_name", "ITK") + self.cpp_info.set_property("cmake_build_modules", build_modules) for name, values in self._itk_components.items(): is_header_only = values.get("header_only", False) @@ -501,8 +536,9 @@ def package_info(self): # TODO: to remove in conan v2 once cmake_find_package* generators removed for generator in ["cmake_find_package", "cmake_find_package_multi"]: self.cpp_info.components[name].names[generator] = name - self.cpp_info.components[name].build_modules[generator].append(self._module_file_rel_path) - self.cpp_info.components[name].build_modules[generator].append(os.path.join(self._cmake_module_dir, "UseITK.cmake")) + self.cpp_info.components[name].build_modules[generator].extend([self._module_file_rel_path, self._module_variables_file_rel_path]) + self.cpp_info.components[name].build_modules[generator].extend( + [os.path.join(self._cmake_module_dir, f) for f in self._itk_modules_files]) # TODO: to remove in conan v2 once cmake_find_package* generators removed for generator in ["cmake_find_package", "cmake_find_package_multi"]: diff --git a/recipes/itk/all/patches/0002-find-conan-packages.patch b/recipes/itk/all/patches/0002-find-conan-packages.patch new file mode 100644 index 0000000000000..34b81a5788250 --- /dev/null +++ b/recipes/itk/all/patches/0002-find-conan-packages.patch @@ -0,0 +1,189 @@ +--- Modules/ThirdParty/Eigen3/itk-module-init.cmake ++++ Modules/ThirdParty/Eigen3/itk-module-init.cmake +@@ -1,3 +1,3 @@ + if(ITK_USE_SYSTEM_EIGEN) +- find_package(Eigen3 REQUIRED CONFIG) ++ find_package(Eigen3 REQUIRED) + endif() +--- Modules/ThirdParty/DCMTK/itk-module-init.cmake ++++ Modules/ThirdParty/DCMTK/itk-module-init.cmake +@@ -24,7 +24,7 @@ + if(ITK_USE_SYSTEM_DCMTK) + # Use local FindDCMTK.cmake. + list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}/CMake") +- find_package(DCMTK REQUIRED NO_MODULE) ++ find_package(DCMTK REQUIRED) + else(ITK_USE_SYSTEM_DCMTK) + # Copied and mofified from DCMTK/CMake/3rdparty.cmake + if(NOT DEFINED DCMTK_USE_ICU) +--- Modules/ThirdParty/Eigen3/CMakeLists.txt ++++ Modules/ThirdParty/Eigen3/CMakeLists.txt +@@ -52,9 +52,9 @@ + + if(ITK_USE_SYSTEM_EIGEN) + set(_Eigen3_SYSTEM_OR_INTERNAL "Eigen3") +- find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED CONFIG) +- set(Eigen3_DIR_INSTALL ${Eigen3_DIR}) +- set(Eigen3_DIR_BUILD ${Eigen3_DIR}) ++ find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED) ++ set(Eigen3_DIR_INSTALL ${Eigen3_INCLUDE_DIR}) ++ set(Eigen3_DIR_BUILD ${Eigen3_INCLUDE_DIR}) + else() + set(_Eigen3_SYSTEM_OR_INTERNAL "ITKInternalEigen3") + find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED CONFIG) +@@ -66,7 +66,7 @@ + # Eigen3 is header only, but there are compile definitions that we want to provide + # to enforce use of MPL only code, and to disable warnings. + # We only need to add the location of the header itk_eigen.h used internally. +-get_target_property(Eigen_INCLUDE_DIRS ${_eigen_itk_target} INTERFACE_INCLUDE_DIRECTORIES) ++set(Eigen_INCLUDE_DIRS ${Eigen3_INCLUDE_DIRS}) + set(ITKEigen3_INCLUDE_DIRS + ${Eigen_INCLUDE_DIRS} + ${ITKEigen3_BINARY_DIR}/src # For the generated itk_eigen.h +@@ -75,14 +75,10 @@ + # When this module is loaded by an app, load Eigen too. + # Load ITKInternalEigen3 or Eigen3 depending on ITK_USE_SYSTEM_EIGEN + set(ITKEigen3_EXPORT_CODE_INSTALL " +-set(ITK_USE_SYSTEM_EIGEN \"${ITK_USE_SYSTEM_EIGEN}\") +-set(${_Eigen3_SYSTEM_OR_INTERNAL}_DIR \"${Eigen3_DIR_INSTALL}\") +-find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED CONFIG) ++find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED) + ") + set(ITKEigen3_EXPORT_CODE_BUILD " +-set(ITK_USE_SYSTEM_EIGEN \"${ITK_USE_SYSTEM_EIGEN}\") +-set(${_Eigen3_SYSTEM_OR_INTERNAL}_DIR \"${Eigen3_DIR_BUILD}\") +-find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED CONFIG) ++find_package(${_Eigen3_SYSTEM_OR_INTERNAL} ${_Eigen3_min_version} REQUIRED) + ") + + # Eigen3 targets are not installed if ITK_USE_SYSTEM_EIGEN==True +--- Modules/ThirdParty/Eigen3/src/itk_eigen.h.in ++++ Modules/ThirdParty/Eigen3/src/itk_eigen.h.in +@@ -43,10 +43,10 @@ + set(Eigen3_DIR ${ITKInternalEigen3_DIR}) + endif() + message(STATUS "From ITK: Eigen3_DIR: ${Eigen3_DIR}") +-find_package(Eigen3 REQUIRED CONFIG) ++find_package(Eigen3 REQUIRED) + add_executable(main main.cpp) + target_link_libraries(main PUBLIC ${ITK_LIBRARIES}) + target_link_libraries(main PUBLIC Eigen3::Eigen) + \endcode + * + * Then, the user can use Eigen3 as usual: +--- Modules/ThirdParty/JPEG/CMakeLists.txt ++++ Modules/ThirdParty/JPEG/CMakeLists.txt +@@ -6,13 +6,13 @@ + + if(ITK_USE_SYSTEM_JPEG) + find_package(JPEG REQUIRED) + set(ITKJPEG_INCLUDE_DIRS + ${ITKJPEG_BINARY_DIR}/src + ) + set(ITKJPEG_SYSTEM_INCLUDE_DIRS + ${JPEG_INCLUDE_DIR} + ) +- set(ITKJPEG_LIBRARIES "${JPEG_LIBRARIES}") ++ set(ITKJPEG_LIBRARIES JPEG::JPEG) + set(ITKJPEG_NO_SRC 1) + else() + set(ITKJPEG_INCLUDE_DIRS +--- Modules/ThirdParty/DoubleConversion/CMakeLists.txt ++++ Modules/ThirdParty/DoubleConversion/CMakeLists.txt +@@ -8,8 +8,8 @@ + + if(ITK_USE_SYSTEM_DOUBLECONVERSION) + find_package(double-conversion 3.1.6 REQUIRED) +- get_target_property(ITKDoubleConversion_INCLUDE_DIRS double-conversion::double-conversion INTERFACE_INCLUDE_DIRECTORIES) +- get_target_property(ITKDoubleConversion_LIBRARIES double-conversion::double-conversion LOCATION) ++ set(ITKDoubleConversion_INCLUDE_DIRS ${double-conversion_INCLUDE_DIRS}) ++ set(ITKDoubleConversion_LIBRARIES ${double-conversion_LIBRARIES}) + else() + set(ITKDoubleConversion_INCLUDE_DIRS + ${ITKDoubleConversion_SOURCE_DIR}/src +--- Modules/ThirdParty/Expat/CMakeLists.txt ++++ Modules/ThirdParty/Expat/CMakeLists.txt +@@ -6,9 +6,9 @@ + + if(ITK_USE_SYSTEM_EXPAT) + find_package(EXPAT REQUIRED) +- set(ITKExpat_INCLUDE_DIRS ${ITKExpat_BINARY_DIR}/src ) +- set(ITKExpat_SYSTEM_INCLUDE_DIRS "${EXPAT_INCLUDE_DIR}") +- set(ITKExpat_LIBRARIES "${EXPAT_LIBRARY}") ++ set(ITKExpat_INCLUDE_DIRS ${EXPAT_INCLUDE_DIRECTORIES}) ++ set(ITKExpat_SYSTEM_INCLUDE_DIRS ${EXPAT_INCLUDE_DIRECTORIES}) ++ set(ITKExpat_LIBRARIES EXPAT::EXPAT) + set(ITKExpat_NO_SRC 1) + else() + set(ITKExpat_INCLUDE_DIRS +--- Modules/ThirdParty/HDF5/CMakeLists.txt ++++ Modules/ThirdParty/HDF5/CMakeLists.txt +@@ -19,25 +19,9 @@ if(CMAKE_LINKER MATCHES "link.exe$") + endif() + + if(ITK_USE_SYSTEM_HDF5) +- +- if(HDF5_DIR) +- set(_HDF5_DIR_CODE "set(HDF5_DIR \"${HDF5_DIR}\")") +- endif() +- if(HDF5_NO_MODULE) +- set(_HDF5_NO_MODULE_ARG "NO_MODULE") +- endif() +- +- # When ITK's config is loaded, load HDF5 too. +- set(ITKHDF5_EXPORT_CODE_INSTALL " +-${_HDF5_DIR_CODE} +-find_package(HDF5 ${_HDF5_NO_MODULE_ARG} REQUIRED COMPONENTS CXX C HL) +-") +- set(ITKHDF5_EXPORT_CODE_BUILD " +-if(NOT ITK_BINARY_DIR) +- ${_HDF5_DIR_CODE} +- find_package(HDF5 ${_HDF5_NO_MODULE_ARG} REQUIRED COMPONENTS CXX C HL) +-endif() +-") ++ find_package(HDF5 REQUIRED) ++ set(HDF5_C_SHARED_LIBRARY HDF5::HDF5) ++ set(HDF5_C_STATIC_LIBRARY HDF5::HDF5) + + if(BUILD_SHARED_LIBS) + if (TARGET hdf5-shared) +--- Modules/ThirdParty/OpenJPEG/src/CMakeLists.txt ++++ Modules/ThirdParty/OpenJPEG/src/CMakeLists.txt +@@ -4,5 +4,8 @@ + set(ITK3P_INSTALL_RUNTIME_DIR "${ITKOpenJPEG_INSTALL_RUNTIME_DIR}") + set(ITK3P_INSTALL_LIBRARY_DIR "${ITKOpenJPEG_INSTALL_LIBRARY_DIR}") + set(ITK3P_INSTALL_ARCHIVE_DIR "${ITKOpenJPEG_INSTALL_ARCHIVE_DIR}") +-add_subdirectory(openjpeg) +-itk_module_target(itkopenjpeg NO_INSTALL) ++find_package(OpenJPEG REQUIRED) ++add_library(itkopenjpeg INTERFACE) ++set_property(TARGET itkopenjpeg PROPERTY INTERFACE_LINK_LIBRARIES openjp2) ++#target_compile_definitions(itkopenjpeg INTERFACE) ++install(TARGETS itkopenjpeg EXPORT ${ITK3P_INSTALL_EXPORT_NAME}) +--- Modules/ThirdParty/TBB/CMakeLists.txt ++++ Modules/ThirdParty/TBB/CMakeLists.txt +@@ -8,14 +8,14 @@ set(ITKTBB_NO_SRC 1) + # When this module is loaded by an app, load TBB too. + set(ITKTBB_EXPORT_CODE_INSTALL " + set(TBB_DIR \"${TBB_DIR}\") +-find_package(TBB REQUIRED CONFIG) ++find_package(TBB REQUIRED) + ") + + # When this module is configured by an app, configure TBB too. + set(ITKTBB_EXPORT_CODE_BUILD " + if(NOT ITK_BINARY_DIR) + set(TBB_DIR \"${TBB_DIR}\") +- find_package(TBB REQUIRED CONFIG) ++ find_package(TBB REQUIRED) + endif() + ") + +diff --git a/Modules/ThirdParty/TBB/itk-module-init.cmake b/Modules/ThirdParty/TBB/itk-module-init.cmake +index 1b7ee20a..0859ef33 100644 +--- a/Modules/ThirdParty/TBB/itk-module-init.cmake ++++ b/Modules/ThirdParty/TBB/itk-module-init.cmake +@@ -1,2 +1,2 @@ +-find_package(TBB REQUIRED CONFIG) # must have TBBConfig.cmake, provided since version tbb2017_20170604oss ++find_package(TBB REQUIRED) + get_target_property(TBB_INCLUDE_DIRS TBB::tbb INTERFACE_INCLUDE_DIRECTORIES) diff --git a/recipes/itk/config.yml b/recipes/itk/config.yml index 989b5ee90fe13..f362c6f4b0b84 100644 --- a/recipes/itk/config.yml +++ b/recipes/itk/config.yml @@ -1,4 +1,6 @@ versions: + "5.3.0": + folder: "all" "5.1.2": folder: "all" "5.1.0": diff --git a/recipes/itlib/all/conandata.yml b/recipes/itlib/all/conandata.yml index 4f1d604b9b789..0e171d0bc94a0 100644 --- a/recipes/itlib/all/conandata.yml +++ b/recipes/itlib/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.11.3": + url: "https://github.com/iboB/itlib/archive/v1.11.3.tar.gz" + sha256: "38999b3c4c2425ac3700529457fb2683d6fa5853752747c3afb97b2e688255b8" + "1.11.2": + url: "https://github.com/iboB/itlib/archive/v1.11.2.tar.gz" + sha256: "bbf734f6084af77a1e886e54e4efadab491ada242f5858afa561353db6a0a03f" + "1.11.1": + url: "https://github.com/iboB/itlib/archive/v1.11.1.tar.gz" + sha256: "2c60e02660ea63dfb7a39237e29b30a066670cef228d22e8d0908e1fff2fa7f1" "1.10.3": url: "https://github.com/iboB/itlib/archive/v1.10.3.tar.gz" sha256: "e533c44354d48b2251ca57f1502778033b38170d9d6aba6bb2bbad90f2bf9d27" diff --git a/recipes/itlib/config.yml b/recipes/itlib/config.yml index 09616d2e081cf..e096818e5b805 100644 --- a/recipes/itlib/config.yml +++ b/recipes/itlib/config.yml @@ -1,4 +1,10 @@ versions: + "1.11.3": + folder: all + "1.11.2": + folder: all + "1.11.1": + folder: all "1.10.3": folder: all "1.10.0": diff --git a/recipes/jinja2cpp/all/conandata.yml b/recipes/jinja2cpp/all/conandata.yml index 01898ea7a626a..ef96ec4edd10e 100644 --- a/recipes/jinja2cpp/all/conandata.yml +++ b/recipes/jinja2cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.2": + url: "https://github.com/jinja2cpp/Jinja2Cpp/archive/1.3.2.tar.gz" + sha256: "227afb9d16eb1a47c3f3ca10c2f589dd2791c5d8b4767c73e26a0b8997e4c03e" "1.2.1": url: "https://github.com/jinja2cpp/Jinja2Cpp/archive/1.2.1.tar.gz" sha256: "2e61516fd4fd77452c8dd7a6f958ad47c42990df9b7bdc62cf2deb8aa7819b6c" @@ -6,6 +9,10 @@ sources: url: "https://github.com/jinja2cpp/Jinja2Cpp/archive/1.1.0.tar.gz" sha256: "3d321a144f3774702d3a6252e3a6370cdaff9c96d8761d850bb79cdb45b372c5" patches: + "1.3.2": + - patch_file: "patches/fix-cmake-1.3.2.patch" + patch_description: "use cci package, fix compilation error on MSVC" + patch_type: "conan" "1.2.1": - patch_file: "patches/fix-cmake-1.2.1.patch" patch_description: "use cci package, fix compilation error on MSVC" diff --git a/recipes/jinja2cpp/all/conanfile.py b/recipes/jinja2cpp/all/conanfile.py index c95085d906413..a4f69271c3eb5 100644 --- a/recipes/jinja2cpp/all/conanfile.py +++ b/recipes/jinja2cpp/all/conanfile.py @@ -21,10 +21,12 @@ class Jinja2cppConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "with_regex": ["std", "boost"], } default_options = { "shared": False, "fPIC": True, + "with_regex": "boost", } @property @@ -47,6 +49,8 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "1.3.2": + del self.options.with_regex def configure(self): if self.options.shared: @@ -76,12 +80,20 @@ def validate(self): raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + if Version(self.version) >= "1.3.1" and self.dependencies["boost"].options.without_json: + raise ConanInvalidConfiguration(f"{self.ref} require Boost::json.") + + def build_requirements(self): + if Version(self.version) >= "1.3.1": + self.tool_requires("cmake/[>=3.23 <4]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) + if Version(self.version) >= "1.3.2": + tc.cache_variables["JINJA2CPP_USE_REGEX"] = self.options.with_regex tc.variables["JINJA2CPP_BUILD_TESTS"] = False tc.variables["JINJA2CPP_STRICT_WARNINGS"] = False tc.variables["JINJA2CPP_BUILD_SHARED"] = self.options.shared @@ -95,6 +107,7 @@ def generate(self): tc.variables["JINJA2CPP_MSVC_RUNTIME_TYPE"] = runtime tc.generate() deps = CMakeDeps(self) + deps.set_property("expected-lite", "cmake_target_name", "expected-lite::expected-lite") deps.generate() def _patch_sources(self): diff --git a/recipes/jinja2cpp/all/patches/fix-cmake-1.3.2.patch b/recipes/jinja2cpp/all/patches/fix-cmake-1.3.2.patch new file mode 100644 index 0000000000000..0484b48da6ca2 --- /dev/null +++ b/recipes/jinja2cpp/all/patches/fix-cmake-1.3.2.patch @@ -0,0 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4aabcff..9016742 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -312,7 +312,7 @@ if(JINJA2CPP_INSTALL) + InstallTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + FILE_SET HEADERS + ) + +@@ -353,4 +353,4 @@ if(JINJA2CPP_INSTALL) + DESTINATION + ${JINJA2CPP_INSTALL_CONFIG_DIR} + ) +-endif() +\ No newline at end of file ++endif() +diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt +index 57c8f8e..499f3c7 100644 +--- a/thirdparty/CMakeLists.txt ++++ b/thirdparty/CMakeLists.txt +@@ -70,8 +70,8 @@ endif() + + if (NOT DEFINED JINJA2_PRIVATE_LIBS_INT) + set(JINJA2CPP_PRIVATE_LIBS ${JINJA2CPP_PRIVATE_LIBS} +- Boost::variant Boost::filesystem Boost::algorithm Boost::lexical_cast Boost::json +- Boost::regex Boost::numeric_conversion fmt RapidJson) ++ Boost::headers Boost::filesystem Boost::json ++ Boost::regex fmt RapidJson) + else () + set (JINJA2CPP_PRIVATE_LIBS ${JINJA2_PRIVATE_LIBS_INT}) + endif () +diff --git a/thirdparty/thirdparty-conan-build.cmake b/thirdparty/thirdparty-conan-build.cmake +index e1bc3a4..fd30743 100644 +--- a/thirdparty/thirdparty-conan-build.cmake ++++ b/thirdparty/thirdparty-conan-build.cmake +@@ -10,6 +10,6 @@ find_package(Boost COMPONENTS algorithm filesystem numeric_conversion json optio + find_package(fmt REQUIRED) + find_package(RapidJSON REQUIRED) + +-set(JINJA2_PRIVATE_LIBS_INT Boost::headers Boost::filesystem Boost::numeric_conversion) ++set(JINJA2_PRIVATE_LIBS_INT Boost::headers Boost::filesystem) + set(JINJA2_PUBLIC_LIBS_INT Boost::json fmt::fmt rapidjson Boost::regex + nlohmann_json::nlohmann_json nonstd::expected-lite nonstd::variant-lite nonstd::optional-lite nonstd::string-view-lite) diff --git a/recipes/jinja2cpp/config.yml b/recipes/jinja2cpp/config.yml index 97294286ce46b..6f563b16b51e2 100644 --- a/recipes/jinja2cpp/config.yml +++ b/recipes/jinja2cpp/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.2": + folder: all "1.2.1": folder: all "1.1.0": diff --git a/recipes/json_dto/all/conandata.yml b/recipes/json_dto/all/conandata.yml index fd921713e43f5..504fe8367f255 100644 --- a/recipes/json_dto/all/conandata.yml +++ b/recipes/json_dto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.3.4": + url: "https://github.com/Stiffstream/json_dto/archive/refs/tags/v.0.3.4.tar.gz" + sha256: "1b9595dbd86fa90edf621b72f5f4dac43170339250e9e650ede5269ff6fa3f2e" "0.3.3": url: "https://github.com/Stiffstream/json_dto/archive/refs/tags/v.0.3.3.tar.gz" sha256: "c52857c074f4e204426a52160e2699694c45bb93e9297ca535e2d5fdf54ae187" diff --git a/recipes/json_dto/all/conanfile.py b/recipes/json_dto/all/conanfile.py index df618397bce1c..ce69026f02b64 100644 --- a/recipes/json_dto/all/conanfile.py +++ b/recipes/json_dto/all/conanfile.py @@ -12,13 +12,13 @@ class JsonDtoConan(ConanFile): name = "json_dto" + description = "A small header-only helper for converting data between json representation and c++ structs" license = "BSD-3-Clause" - homepage = "https://github.com/Stiffstream/json_dto" url = "https://github.com/conan-io/conan-center-index" - description = "A small header-only helper for converting data between json representation and c++ structs" - topics = ("json", "dto", "serialization") + homepage = "https://github.com/Stiffstream/json_dto" + topics = ("json", "dto", "serialization", "header-only") package_type = "header-library" - settings = "os", "compiler", "build_type", "arch" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True @property diff --git a/recipes/json_dto/config.yml b/recipes/json_dto/config.yml index 9421431ffbd78..78d5c217becaf 100644 --- a/recipes/json_dto/config.yml +++ b/recipes/json_dto/config.yml @@ -1,4 +1,6 @@ versions: + "0.3.4": + folder: all "0.3.3": folder: all "0.3.2": diff --git a/recipes/jsoncons/all/conandata.yml b/recipes/jsoncons/all/conandata.yml index aca299f96976a..488712d110383 100644 --- a/recipes/jsoncons/all/conandata.yml +++ b/recipes/jsoncons/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.177.0": + url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.177.0.tar.gz" + sha256: "a381d58489f143a3a515484f4ad6e32ae4d977033e1a455fecf8cdc4e2c9a49e" "0.176.0": url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.176.0.tar.gz" sha256: "2eb50b5cbe204265fef96c052511ed6e3b8808935c6e2c8d28e0aba7b08fda33" diff --git a/recipes/jsoncons/config.yml b/recipes/jsoncons/config.yml index 6025c4b0dd2aa..57cfc555c3f95 100644 --- a/recipes/jsoncons/config.yml +++ b/recipes/jsoncons/config.yml @@ -1,4 +1,6 @@ versions: + "0.177.0": + folder: "all" "0.176.0": folder: "all" "0.175.0": diff --git a/recipes/jsonifier/all/conandata.yml b/recipes/jsonifier/all/conandata.yml index 420de00c2d20c..d326552c7b2a5 100644 --- a/recipes/jsonifier/all/conandata.yml +++ b/recipes/jsonifier/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.9.97": + url: "https://github.com/RealTimeChris/Jsonifier/archive/refs/tags/v0.9.97.tar.gz" + sha256: "68828c982a994862b02bcee562ee4e6d7cc461013ac3d4dcb98c0f1581049924" + "0.9.96": + url: "https://github.com/RealTimeChris/Jsonifier/archive/refs/tags/v0.9.96.tar.gz" + sha256: "9f2658282f53680be0121091adacc8f82b2de5b95c31bc6eadb98802c0aa59f0" "0.9.95": url: "https://github.com/RealTimeChris/Jsonifier/archive/refs/tags/v0.9.95.tar.gz" sha256: "4db5fd2c4ae77bbd13e4f80fcc255edb39835cb5cf00d33468cb957af04d933b" diff --git a/recipes/jsonifier/all/test_package/test_package.cpp b/recipes/jsonifier/all/test_package/test_package.cpp index 8c27e29fb67c3..21035cf3ed4c1 100644 --- a/recipes/jsonifier/all/test_package/test_package.cpp +++ b/recipes/jsonifier/all/test_package/test_package.cpp @@ -17,7 +17,7 @@ int main() { MyObject obj("John", 30); jsonifier::jsonifier_core jsonifier{}; std::string jsonBuffer{}; - jsonifier.serializeJson(obj, jsonBuffer); + jsonifier.serializeJson(obj, jsonBuffer); std::cout << jsonBuffer << std::endl; diff --git a/recipes/jsonifier/config.yml b/recipes/jsonifier/config.yml index fb65fece59ef6..f8a1d2a6df61b 100644 --- a/recipes/jsonifier/config.yml +++ b/recipes/jsonifier/config.yml @@ -1,3 +1,7 @@ versions: + "0.9.97": + folder: all + "0.9.96": + folder: all "0.9.95": folder: all diff --git a/recipes/jwt-cpp/all/conanfile.py b/recipes/jwt-cpp/all/conanfile.py index 1e09b3d6625c7..9a7ee532d7797 100644 --- a/recipes/jwt-cpp/all/conanfile.py +++ b/recipes/jwt-cpp/all/conanfile.py @@ -16,9 +16,12 @@ class JwtCppConan(ConanFile): package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + options = { "with_picojson": [True, False] } + default_options = { "with_picojson" : False } + @property - def _supports_generic_json(self): - return Version(self.version) >= "0.5.0" + def _with_picojson(self): + return Version(self.version) < "0.5.0" or self.options.with_picojson def export_sources(self): export_conandata_patches(self) @@ -28,7 +31,7 @@ def layout(self): def requirements(self): self.requires("openssl/[>=1.1 <4]") - if not self._supports_generic_json: + if self._with_picojson: self.requires("picojson/1.3.0") def package_id(self): @@ -48,9 +51,11 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - + self.cpp_info.requires = ["openssl::openssl"] + if self._with_picojson: + self.cpp_info.requires.append("picojson::picojson") + else: + self.cpp_info.defines.append("JWT_DISABLE_PICOJSON") self.cpp_info.set_property("cmake_file_name", "jwt-cpp") self.cpp_info.set_property("cmake_target_name", "jwt-cpp::jwt-cpp") - if self._supports_generic_json: - self.cpp_info.defines.append("JWT_DISABLE_PICOJSON") diff --git a/recipes/keychain/all/conandata.yml b/recipes/keychain/all/conandata.yml index 1c93eb4e4837d..f10687c09e1bc 100644 --- a/recipes/keychain/all/conandata.yml +++ b/recipes/keychain/all/conandata.yml @@ -1,10 +1,10 @@ sources: - "1.2.0": - url: "https://github.com/hrantzsch/keychain/archive/v1.2.0.tar.gz" - sha256: "82cc66a7fa12af43f3e2efeb378bacb0a514056617e369430f252da2392acaae" - "1.2.1": - url: "https://github.com/hrantzsch/keychain/archive/v1.2.1.tar.gz" - sha256: "725cc30da0451403713dee648edd06686fdc31b5041e75e3350e6056c78de076" "1.3.0": url: "https://github.com/hrantzsch/keychain/archive/refs/tags/v1.3.0.tar.gz" sha256: "0e2eb3c6ca2c62253f7d28a478d0cb3eeb4b9656b33d2946e1a294361f72809c" + "1.2.1": + url: "https://github.com/hrantzsch/keychain/archive/v1.2.1.tar.gz" + sha256: "725cc30da0451403713dee648edd06686fdc31b5041e75e3350e6056c78de076" + "1.2.0": + url: "https://github.com/hrantzsch/keychain/archive/v1.2.0.tar.gz" + sha256: "82cc66a7fa12af43f3e2efeb378bacb0a514056617e369430f252da2392acaae" diff --git a/recipes/keychain/all/conanfile.py b/recipes/keychain/all/conanfile.py index 64b3ee8743d71..5a1130d8d16d6 100644 --- a/recipes/keychain/all/conanfile.py +++ b/recipes/keychain/all/conanfile.py @@ -1,53 +1,59 @@ +import os + from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import collect_libs, copy, get, replace_in_file from conan.tools.gnu import PkgConfigDeps -import os - class KeychainConan(ConanFile): name = "keychain" + description = ( + "A cross-platform wrapper for the operating system's credential storage" + ) + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/hrantzsch/keychain" - description = "A cross-platform wrapper for the operating system's credential storage" topics = ("keychain", "security", "credentials", "password", "cpp11") - url = "https://github.com/conan-io/conan-center-index" - license = "MIT" package_type = "library" settings = "os", "arch", "compiler", "build_type" - options = {'shared': [False, True], 'fPIC': [False, True]} + options = {"shared": [False, True], "fPIC": [False, True]} default_options = {"shared": False, "fPIC": True} def config_options(self): - if self.settings.os == 'Windows': + if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - def validate(self): - if self.settings.get_safe("compiler.cppstd"): - check_min_cppstd(self, 11) + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): if self.settings.os == "Linux": self.requires("libsecret/0.20.5") - self.requires("glib/2.78.1") + self.requires("glib/2.78.3") + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) def build_requirements(self): if self.settings.os == "Linux": self.tool_requires("pkgconf/2.0.3") - def layout(self): - cmake_layout(self, src_folder="src") - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) # Ensure .dll is installed on Windows - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - "TARGETS ${PROJECT_NAME}", "TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin") + replace_in_file( + self, + os.path.join(self.source_folder, "CMakeLists.txt"), + "TARGETS ${PROJECT_NAME}", + "TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin", + ) def generate(self): tc = CMakeToolchain(self) @@ -64,14 +70,21 @@ def build(self): cmake.build() def package(self): - copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder, + ) cmake = CMake(self) cmake.install() def package_info(self): self.cpp_info.libs = collect_libs(self) - if self.settings.os == 'Macos': - self.cpp_info.frameworks = ['Security', 'CoreFoundation'] + if self.settings.os == "Macos": + self.cpp_info.frameworks = ["Security", "CoreFoundation"] if self.settings.os == "Windows": - self.cpp_info.system_libs = ['crypt32'] + self.cpp_info.system_libs = ["crypt32"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m"] diff --git a/recipes/keychain/config.yml b/recipes/keychain/config.yml index fd230ff5e48d0..21c776e737e77 100644 --- a/recipes/keychain/config.yml +++ b/recipes/keychain/config.yml @@ -1,7 +1,7 @@ versions: - "1.2.0": + "1.3.0": folder: all "1.2.1": folder: all - "1.3.0": + "1.2.0": folder: all diff --git a/recipes/leptonica/all/conandata.yml b/recipes/leptonica/all/conandata.yml index 49782e81d8fcd..7c713eeaa4311 100644 --- a/recipes/leptonica/all/conandata.yml +++ b/recipes/leptonica/all/conandata.yml @@ -2,27 +2,9 @@ sources: "1.83.1": url: "https://github.com/DanBloomberg/leptonica/archive/1.83.1.tar.gz" sha256: "4289d0a4224b614010072253531c0455a33a4d7c7a0017fe7825ed382290c0da" - "1.83.0": - url: "https://github.com/DanBloomberg/leptonica/archive/1.83.0.tar.gz" - sha256: "14cf531c2219a1414e8e3c51a3caa5cf021a52e782c4a6561bf64d0ef2119282" "1.82.0": url: "https://github.com/DanBloomberg/leptonica/archive/1.82.0.tar.gz" sha256: "40fa9ac1e815b91e0fa73f0737e60c9eec433a95fa123f95f2573dd3127dd669" "1.81.0": url: "https://github.com/DanBloomberg/leptonica/archive/1.81.0.tar.gz" sha256: "70ebc04ff8b9684205bd1d01843c635a8521255b74813bf7cce9a33368f7952c" - "1.80.0": - url: "https://github.com/DanBloomberg/leptonica/archive/1.80.0.tar.gz" - sha256: "3952b974ec057d24267aae48c54bca68ead8275604bf084a73a4b953ff79196e" - "1.79.0": - url: "https://github.com/DanBloomberg/leptonica/archive/1.79.0.tar.gz" - sha256: "bf9716f91a4844c2682a07ef21eaf68b6f1077af1f63f27c438394fd66218e17" - "1.78.0": - url: "https://github.com/DanBloomberg/leptonica/archive/1.78.0.tar.gz" - sha256: "f8ac4d93cc76b524c2c81d27850bfc342e68b91368aa7a1f7d69e34ce13adbb4" -patches: - "1.78.0": - - patch_file: "patches/fix-find-modules-variables.patch" - patch_description: "CMake: robust handling of dependencies" - patch_type: "portability" - patch_source: "https://github.com/DanBloomberg/leptonica/pull/456" diff --git a/recipes/leptonica/all/conanfile.py b/recipes/leptonica/all/conanfile.py index 5541499f0e910..a937905bbcab5 100644 --- a/recipes/leptonica/all/conanfile.py +++ b/recipes/leptonica/all/conanfile.py @@ -72,15 +72,15 @@ def requirements(self): if self.options.with_jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.1") + self.requires("libjpeg-turbo/3.0.2") elif self.options.with_jpeg == "mozjpeg": self.requires("mozjpeg/4.1.5") if self.options.with_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.with_tiff: self.requires("libtiff/4.6.0") if self.options.with_openjpeg: - self.requires("openjpeg/2.5.0") + self.requires("openjpeg/2.5.2") if self.options.with_webp: self.requires("libwebp/1.3.2") @@ -94,8 +94,6 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - if Version(self.version) < "1.79.0": - tc.variables["STATIC"] = not self.options.shared tc.variables["BUILD_PROG"] = False tc.variables["SW_BUILD"] = False if Version(self.version) >= "1.83.0": @@ -150,10 +148,7 @@ def _patch_sources(self): replace_in_file(self, cmakelists_src, "${JP2K_LIBRARIES}", "openjp2") if Version(self.version) < "1.83.0": # pkgconfig is prefered to CMake. Disable pkgconfig so only CMake is used - if Version(self.version) <= "1.78.0": - replace_in_file(self, cmakelists, "pkg_check_modules(JP2K libopenjp2)", "") - else: - replace_in_file(self, cmakelists, "pkg_check_modules(JP2K libopenjp2>=2.0 QUIET)", "") + replace_in_file(self, cmakelists, "pkg_check_modules(JP2K libopenjp2>=2.0 QUIET)", "") # versions below 1.83.0 do not have an option toggle replace_in_file(self, cmakelists, "if(NOT JP2K)", "if(0)") if not self.options.with_openjpeg: @@ -168,8 +163,7 @@ def _patch_sources(self): if Version(self.version) < "1.83.0": # versions below 1.83.0 do not have an option toggle replace_in_file(self, cmakelists, "if(NOT WEBP)", "if(0)") - if Version(self.version) >= "1.79.0": - replace_in_file(self, cmakelists, "if(NOT WEBPMUX)", "if(0)") + replace_in_file(self, cmakelists, "if(NOT WEBPMUX)", "if(0)") if not self.options.with_webp: replace_in_file(self, cmakelists_src, "if (WEBP_FOUND)", "if(0)") replace_in_file(self, cmake_configure, "if (WEBP_FOUND)", "if(0)") diff --git a/recipes/leptonica/all/patches/fix-find-modules-variables.patch b/recipes/leptonica/all/patches/fix-find-modules-variables.patch deleted file mode 100644 index 3dc86df7e707e..0000000000000 --- a/recipes/leptonica/all/patches/fix-find-modules-variables.patch +++ /dev/null @@ -1,48 +0,0 @@ -see https://github.com/DanBloomberg/leptonica/pull/456 - ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -31,33 +31,33 @@ if (NOT STATIC) - target_compile_definitions (leptonica PRIVATE -DLIBLEPT_EXPORTS) - endif() - --if (GIF_LIBRARY) -+if (GIF_LIBRARIES) - target_include_directories (leptonica PUBLIC ${GIF_INCLUDE_DIR}) -- target_link_libraries (leptonica ${GIF_LIBRARY}) -+ target_link_libraries (leptonica ${GIF_LIBRARIES}) - endif() --if (JPEG_LIBRARY) -+if (JPEG_LIBRARIES) - target_include_directories (leptonica PUBLIC ${JPEG_INCLUDE_DIR}) -- target_link_libraries (leptonica ${JPEG_LIBRARY}) -+ target_link_libraries (leptonica ${JPEG_LIBRARIES}) - endif() - if (JP2K_FOUND) - target_include_directories (leptonica PUBLIC ${JP2K_INCLUDE_DIRS}) - target_link_libraries (leptonica ${JP2K_LIBRARIES}) - endif() --if (PNG_LIBRARY) -+if (PNG_LIBRARIES) - target_include_directories (leptonica PUBLIC ${PNG_INCLUDE_DIRS}) -- target_link_libraries (leptonica ${PNG_LIBRARY}) -+ target_link_libraries (leptonica ${PNG_LIBRARIES}) - endif() --if (TIFF_LIBRARY) -+if (TIFF_LIBRARIES) - target_include_directories (leptonica PUBLIC ${TIFF_INCLUDE_DIR}) -- target_link_libraries (leptonica ${TIFF_LIBRARY}) -+ target_link_libraries (leptonica ${TIFF_LIBRARIES}) - endif() - if (WEBP_FOUND) - target_include_directories (leptonica PUBLIC ${WEBP_INCLUDE_DIRS}) - target_link_libraries (leptonica ${WEBP_LIBRARIES}) - endif() --if (ZLIB_LIBRARY) -+if (ZLIB_LIBRARIES) - target_include_directories (leptonica PUBLIC ${ZLIB_INCLUDE_DIR}) -- target_link_libraries (leptonica ${ZLIB_LIBRARY}) -+ target_link_libraries (leptonica ${ZLIB_LIBRARIES}) - endif() - - if (UNIX) diff --git a/recipes/leptonica/config.yml b/recipes/leptonica/config.yml index 7de53a77a3916..38d6d07fba4c6 100644 --- a/recipes/leptonica/config.yml +++ b/recipes/leptonica/config.yml @@ -1,15 +1,7 @@ versions: "1.83.1": folder: all - "1.83.0": - folder: all "1.82.0": folder: all "1.81.0": folder: all - "1.80.0": - folder: all - "1.79.0": - folder: all - "1.78.0": - folder: all diff --git a/recipes/lerc/all/conandata.yml b/recipes/lerc/all/conandata.yml index 73b69372cf8f4..d53c3de3dfbc3 100644 --- a/recipes/lerc/all/conandata.yml +++ b/recipes/lerc/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.4": + url: "https://github.com/Esri/lerc/archive/js_v4.0.4.tar.gz" + sha256: "1dc090218387ab8ca615eefd844207be64454e37868b396f3e965ed0dcf83947" "4.0.1": url: "https://github.com/Esri/lerc/archive/js_v4.0.1.tar.gz" sha256: "d771f45b90dd033187d5fad2b99159d0a98d46878d88d3236147c3df297dd544" @@ -12,6 +15,14 @@ sources: url: "https://github.com/Esri/lerc/archive/v2.1.tar.gz" sha256: "7c48de40cd5f09319de4b39c417ff4eec4ad4b6aa5d6144f6ffa9b10d18ec94e" patches: + "4.0.4": + - patch_file: "patches/4.0.0-include-algorithm.patch" + patch_description: "include algorithm header for std::min/max" + patch_type: "portability" + - patch_file: "patches/4.0.4-add-missing-climits-include.patch" + patch_description: "add missing #include " + patch_type: "bugfix" + patch_source: "https://github.com/Esri/lerc/commit/1fc73694263f53cf029c8cac2e632170880f56d4" "4.0.1": - patch_file: "patches/4.0.0-include-algorithm.patch" patch_description: "include algorithm header for std::min/max" diff --git a/recipes/lerc/all/conanfile.py b/recipes/lerc/all/conanfile.py index c64435c5746f7..02e1f24f77f3f 100644 --- a/recipes/lerc/all/conanfile.py +++ b/recipes/lerc/all/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.build import check_min_cppstd +from conan.tools.build import check_min_cppstd, stdcpp_library from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import export_conandata_patches, apply_conandata_patches, copy, get, rmdir from conan.tools.scm import Version @@ -73,6 +73,8 @@ def package_info(self): self.cpp_info.libs = ["LercLib" if Version(self.version) < "4.0.0" else "Lerc"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("m") + if not self.options.shared and stdcpp_library(self): + self.cpp_info.system_libs.append(stdcpp_library(self)) if Version(self.version) >= "3.0": self.cpp_info.set_property("pkg_config_name", "Lerc") diff --git a/recipes/lerc/all/patches/4.0.4-add-missing-climits-include.patch b/recipes/lerc/all/patches/4.0.4-add-missing-climits-include.patch new file mode 100644 index 0000000000000..e65c9a909930e --- /dev/null +++ b/recipes/lerc/all/patches/4.0.4-add-missing-climits-include.patch @@ -0,0 +1,21 @@ +From 1fc73694263f53cf029c8cac2e632170880f56d4 Mon Sep 17 00:00:00 2001 +From: Thomas Maurer +Date: Wed, 8 Nov 2023 12:54:35 -0800 +Subject: [PATCH] add missing include + +--- + src/LercLib/fpl_Compression.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/LercLib/fpl_Compression.cpp b/src/LercLib/fpl_Compression.cpp +index bea9483..22773dd 100644 +--- a/src/LercLib/fpl_Compression.cpp ++++ b/src/LercLib/fpl_Compression.cpp +@@ -27,6 +27,7 @@ Original coding 2021 Yuriy Yakimenko + #include + #include + #include ++#include + + USING_NAMESPACE_LERC + diff --git a/recipes/lerc/all/test_package/CMakeLists.txt b/recipes/lerc/all/test_package/CMakeLists.txt index 50d07b3052d3e..e4ae3c108dbd4 100644 --- a/recipes/lerc/all/test_package/CMakeLists.txt +++ b/recipes/lerc/all/test_package/CMakeLists.txt @@ -1,12 +1,11 @@ cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +project(test_package LANGUAGES C CXX) find_package(lerc REQUIRED CONFIG) -add_executable(test_package test_package.cpp) -target_link_libraries(test_package PRIVATE lerc::lerc) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_executable(${PROJECT_NAME}_cxx test_package.cpp) +target_link_libraries(${PROJECT_NAME}_cxx PRIVATE lerc::lerc) +target_compile_features(${PROJECT_NAME}_cxx PRIVATE cxx_std_11) -if(lerc_VERSION VERSION_GREATER_EQUAL "3.0") - target_compile_definitions(${PROJECT_NAME} PRIVATE -DLERC_VER3_LATER) -endif() +add_executable(${PROJECT_NAME}_c test_package.c) +target_link_libraries(${PROJECT_NAME}_c PRIVATE lerc::lerc) diff --git a/recipes/lerc/all/test_package/conanfile.py b/recipes/lerc/all/test_package/conanfile.py index 0a6bc68712d90..f5c4345946223 100644 --- a/recipes/lerc/all/test_package/conanfile.py +++ b/recipes/lerc/all/test_package/conanfile.py @@ -22,5 +22,7 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package_cxx") + self.run(bin_path, env="conanrun") + bin_path = os.path.join(self.cpp.build.bindir, "test_package_c") self.run(bin_path, env="conanrun") diff --git a/recipes/lerc/all/test_package/test_package.c b/recipes/lerc/all/test_package/test_package.c new file mode 100644 index 0000000000000..193917ddd512b --- /dev/null +++ b/recipes/lerc/all/test_package/test_package.c @@ -0,0 +1,11 @@ +#include + +#include + +int main() { + const uint32_t numBytesBlob = 275714; + uint8_t pLercBlob[1000000]; + uint32_t infoArr[10]; + double dataRangeArr[3]; + lerc_getBlobInfo(&pLercBlob[0], numBytesBlob, infoArr, dataRangeArr, 10, 3); +} diff --git a/recipes/lerc/all/test_package/test_package.cpp b/recipes/lerc/all/test_package/test_package.cpp index c399abcf8d219..98eb0ea449f54 100644 --- a/recipes/lerc/all/test_package/test_package.cpp +++ b/recipes/lerc/all/test_package/test_package.cpp @@ -1,140 +1,12 @@ #include -#include -#include -#include -#include +#include #include -typedef unsigned char Byte; // convenience -typedef unsigned int uint32; - -enum lerc_DataType { dt_char = 0, dt_uchar, dt_short, dt_ushort, dt_int, dt_uint, dt_float, dt_double }; - -void BlobInfo_Print(const uint32* infoArr) -{ - const uint32* ia = infoArr; - printf("version = %d, dataType = %d, nDim = %d, nCols = %d, nRows = %d, nBands = %d, nValidPixels = %d, blobSize = %d\n", - ia[0], ia[1], ia[2], ia[3], ia[4], ia[5], ia[6], ia[7]); -} - -bool BlobInfo_Equal(const uint32* infoArr, uint32 nDim, uint32 nCols, uint32 nRows, uint32 nBands, uint32 dataType) -{ - const uint32* ia = infoArr; - return ia[1] == dataType && ia[2] == nDim && ia[3] == nCols && ia[4] == nRows && ia[5] == nBands; -} - -// Sample 1: float image, 1 band, with some pixels set to invalid / void, maxZError = 0.1 -void sample1() { - const int h = 512; - const int w = 512; - - std::vector zImg(w * h); - std::vector maskByteImg(w * h); - for (int k = 0, i = 0; i < h; ++i) { - for (int j = 0; j < w; ++j, ++k) { - zImg[k] = std::sqrt(static_cast(i * i + j * j)); // smooth surface - zImg[k] += std::rand() % 20; // add some small amplitude noise - - if (j % 100 == 0 || i % 100 == 0) // set some void points - maskByteImg[k] = 0; - else - maskByteImg[k] = 1; - } - } - - - // compress into byte arr - - double maxZErrorWanted = 0.1; - double eps = 0.0001; // safety margin (optional), to account for finite floating point accuracy - double maxZError = maxZErrorWanted - eps; - - uint32 numBytesNeeded = 0; - uint32 numBytesWritten = 0; - - lerc_status hr = lerc_computeCompressedSize(reinterpret_cast(&zImg[0]), // raw image data, row by row, band by band - static_cast(dt_float), 1, w, h, 1, -#ifdef LERC_VER3_LATER - 1, -#endif - maskByteImg.data(), // can give nullptr if all pixels are valid - maxZError, // max coding error per pixel, or precision - &numBytesNeeded); // size of outgoing Lerc blob - - if (hr) - std::cout << "lerc_computeCompressedSize(...) failed" << std::endl; - - uint32 numBytesBlob = numBytesNeeded; - std::vector pLercBlob(numBytesBlob); - - hr = lerc_encode(reinterpret_cast(&zImg[0]), // raw image data, row by row, band by band - static_cast(dt_float), 1, w, h, 1, -#ifdef LERC_VER3_LATER - 1, -#endif - maskByteImg.data(), // can give nullptr if all pixels are valid - maxZError, // max coding error per pixel, or precision - &pLercBlob[0], // buffer to write to, function will fail if buffer too small - numBytesBlob, // buffer size - &numBytesWritten); // num bytes written to buffer - - if (hr) - std::cout << "lerc_encode(...) failed" << std::endl; - - double ratio = w * h * (0.125 + sizeof(float)) / numBytesBlob; - std::cout << "sample 1 compression ratio = " << ratio << std::endl; - - - // decompress - - uint32 infoArr[10]; - double dataRangeArr[3]; - hr = lerc_getBlobInfo(&pLercBlob[0], numBytesBlob, infoArr, dataRangeArr, 10, 3); - if (hr) - std::cout << "lerc_getBlobInfo(...) failed" << std::endl; - - BlobInfo_Print(infoArr); - - if (!BlobInfo_Equal(infoArr, 1, w, h, 1, static_cast(dt_float))) - std::cout << "got wrong lerc info" << std::endl; - - // new empty data storage - std::vector zImg3(w * h); - - std::vector maskByteImg3(w * h); - -#ifdef LERC_VER3_LATER - hr = lerc_decode(&pLercBlob[0], numBytesBlob, 1, maskByteImg3.data(), 1, w, h, 1, static_cast(dt_float), reinterpret_cast(&zImg3[0])); -#else - hr = lerc_decode(&pLercBlob[0], numBytesBlob, &maskByteImg3[0], 1, w, h, 1, static_cast(dt_float), reinterpret_cast(&zImg3[0])); -#endif - if (hr) - std::cout << "lerc_decode(...) failed" << std::endl; - - // compare to orig - - double maxDelta = 0; - for (int k = 0, i = 0; i < h; i++) - { - for (int j = 0; j < w; j++, k++) - { - if (maskByteImg3[k] != maskByteImg[k]) - std::cout << "Error in main: decoded valid bytes differ from encoded valid bytes" << std::endl; - - if (maskByteImg3[k]) - { - double delta = std::fabs(zImg3[k] - zImg[k]); - if (delta > maxDelta) - maxDelta = delta; - } - } - } - - std::cout << "max z error per pixel = " << maxDelta << std::endl; -} - int main() { - sample1(); - return 0; + uint32_t numBytesBlob = 275714; + std::vector pLercBlob(numBytesBlob); + uint32_t infoArr[10]; + double dataRangeArr[3]; + lerc_getBlobInfo(&pLercBlob[0], numBytesBlob, infoArr, dataRangeArr, 10, 3); } diff --git a/recipes/lerc/all/test_v1_package/conanfile.py b/recipes/lerc/all/test_v1_package/conanfile.py index 38f4483872d47..b7e21a6312c34 100644 --- a/recipes/lerc/all/test_v1_package/conanfile.py +++ b/recipes/lerc/all/test_v1_package/conanfile.py @@ -1,3 +1,4 @@ +from conan.tools.microsoft import is_msvc from conans import ConanFile, CMake, tools import os @@ -13,5 +14,9 @@ def build(self): def test(self): if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") + bin_path = os.path.join("bin", "test_package_cxx") self.run(bin_path, run_environment=True) + if not is_msvc(self): + # lerc_computeCompressedSize() fails with a stack overflow on MSVC for some reason + bin_path = os.path.join("bin", "test_package_c") + self.run(bin_path, run_environment=True) diff --git a/recipes/lerc/config.yml b/recipes/lerc/config.yml index a09a8d0001ec6..471b2c25702d4 100644 --- a/recipes/lerc/config.yml +++ b/recipes/lerc/config.yml @@ -1,4 +1,6 @@ versions: + "4.0.4": + folder: all "4.0.1": folder: all "4.0.0": diff --git a/recipes/libaec/all/conandata.yml b/recipes/libaec/all/conandata.yml index f02aae783d14c..02f7c64ddfad5 100644 --- a/recipes/libaec/all/conandata.yml +++ b/recipes/libaec/all/conandata.yml @@ -1,22 +1,7 @@ sources: + "1.1.2": + url: "https://gitlab.dkrz.de/k202009/libaec/-/archive/v1.1.2/libaec-v1.1.2.tar.bz2" + sha256: "bdad8c7923537c3695327aa85afdcd714fb3d30a5f956a27ba2971ef98c043ac" "1.0.6": - url: "https://gitlab.dkrz.de/k202009/libaec/uploads/45b10e42123edd26ab7b3ad92bcf7be2/libaec-1.0.6.tar.gz" - sha256: "032961877231113bb094ef224085e6d66fd670f85a3e17f53d0f131abf24f2fd" - "1.0.4": - url: "https://gitlab.dkrz.de/k202009/libaec/uploads/ea0b7d197a950b0c110da8dfdecbb71f/libaec-1.0.4.tar.gz" - sha256: "f2b1b232083bd8beaf8a54a024225de3dd72a673a9bcdf8c3ba96c39483f4309" -patches: - "1.0.4": - - patch_file: "patches/1.0.4-0001-Fix-static-library-builds.patch" - patch_type: "conan" - patch_description: "Fix static library builds" - - patch_file: "patches/1.0.4-0002-fix-install-ios.patch" - patch_type: "conan" - patch_description: "Fix install iOS" - "1.0.6": - - patch_file: "patches/1.0.6-0001-fix-library-builds.patch" - patch_type: "conan" - patch_description: "Fix library builds" - - patch_file: "patches/1.0.6-0002-fix-cmake-build-with-ninja.patch" - patch_type: "conan" - patch_description: "Ninja needs 'aec' binary to be put in a separate folder to an imaginary 'aec' object output" + url: "https://gitlab.dkrz.de/k202009/libaec/-/archive/v1.0.6/libaec-v1.0.6.tar.bz2" + sha256: "31fb65b31e835e1a0f3b682d64920957b6e4407ee5bbf42ca49549438795a288" diff --git a/recipes/libaec/all/conanfile.py b/recipes/libaec/all/conanfile.py index e624f9f76f9b5..82b06f8697908 100644 --- a/recipes/libaec/all/conanfile.py +++ b/recipes/libaec/all/conanfile.py @@ -1,12 +1,12 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.microsoft import is_msvc -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir, replace_in_file -from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import get, copy, rm, rmdir, replace_in_file +from conan.tools.microsoft import is_msvc, check_min_vs +from conan.tools.scm import Version import os -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.53.0" class LibaecConan(ConanFile): @@ -16,6 +16,8 @@ class LibaecConan(ConanFile): homepage = "https://gitlab.dkrz.de/k202009/libaec" description = "Adaptive Entropy Coding library" topics = "dsp", "encoding", "decoding" + + package_type = "library" settings = "os", "compiler", "build_type", "arch" options = { "shared": [True, False], @@ -27,7 +29,7 @@ class LibaecConan(ConanFile): } def export_sources(self): - export_conandata_patches(self) + copy(self, "set_runtime_output_dir.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -35,72 +37,74 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass - try: - del self.settings.compiler.libcxx - except Exception: - pass - try: - del self.settings.compiler.cppstd - except Exception: - pass + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") def layout(self): cmake_layout(self, src_folder="src") def validate(self): - if Version(self.version) >= "1.0.6" and is_msvc(self): - # libaec/1.0.6 uses "restrict" keyword which seems to be supported since Visual Studio 16. - if Version(self.settings.compiler.version) < "16": - raise ConanInvalidConfiguration("{} does not support Visual Studio {}".format(self.name, self.settings.compiler.version)) - # In libaec/1.0.6, fail to build aec_client command with debug and shared settings in Visual Studio. - # Temporary, this recipe doesn't support these settings. - if self.options.shared and self.settings.build_type == "Debug": - raise ConanInvalidConfiguration("{} does not support debug and shared build in Visual Studio(currently)".format(self.name)) + # libaec/1.0.6 uses "restrict" keyword which seems to be supported since Visual Studio 16. + check_min_vs(self, 192) + # libaec/1.0.6 fails to build aec_client command with debug and shared settings in Visual Studio. + # Temporary, this recipe doesn't support these settings. + if is_msvc(self) and self.options.shared and self.settings.build_type == "Debug": + raise ConanInvalidConfiguration(f"{self.name} does not support debug and shared build in Visual Studio (currently)") def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - # Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840) - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.cache_variables["CMAKE_PROJECT_libaec_INCLUDE"] = "set_runtime_output_dir.cmake" + tc.cache_variables["CMAKE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) + tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared tc.generate() + def _patch_sources(self): + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + replace_in_file(self, cmakelists, "set(CMAKE_C_STANDARD 99)", "set(CMAKE_C_STANDARD 11)") + replace_in_file(self, cmakelists, "set(CMAKE_POSITION_INDEPENDENT_CODE ON)", "") + targets = "aec_shared sz_shared" if self.options.shared else "aec_static sz_static" + aec_client = " aec_client" if Version(self.version) < "1.1" else "" + replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), + f"install(TARGETS aec_static aec_shared sz_static sz_shared{aec_client})", + f"install(TARGETS {targets}{aec_client} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin)") + def build(self): - apply_conandata_patches(self) - if Version(self.version) < "1.0.6": - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - "add_subdirectory(tests)", "") + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() def package(self): - if Version(self.version) < "1.0.6": - copy(self, pattern="Copyright.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - else: - copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() + copy(self, "*.h", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include")) + copy(self, "libaec.h", os.path.join(self.build_folder, "include"), os.path.join(self.package_folder, "include")) rmdir(self, os.path.join(self.package_folder, "share")) rmdir(self, os.path.join(self.package_folder, "cmake")) rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) def package_info(self): + self.cpp_info.set_property("cmake_file_name", "libaec") + + # CMake targets are based on + # https://gitlab.dkrz.de/k202009/libaec/-/blob/master/cmake/libaec-config.cmake.in + self.cpp_info.components["aec"].set_property("cmake_target_name", "libaec::aec") aec_name = "aec" - if self.settings.os == "Windows" and Version(self.version) >= "1.0.6" and not self.options.shared: - aec_name = "aec_static" + if self.settings.os == "Windows" and not self.options.shared: + aec_name = "aec-static" + self.cpp_info.components["aec"].libs = [aec_name] + + self.cpp_info.components["sz"].set_property("cmake_target_name", "libaec::sz") szip_name = "sz" if self.settings.os == "Windows": - if Version(self.version) >= "1.0.6": - szip_name = "szip" if self.options.shared else "szip_static" - elif self.options.shared: - szip_name = "szip" - self.cpp_info.libs = [szip_name, aec_name] + szip_name = "szip" if self.options.shared else "szip-static" + self.cpp_info.components["sz"].libs = [szip_name] + + # TODO: Legacy, to be removed on Conan 2.0 bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path) diff --git a/recipes/libaec/all/patches/1.0.4-0001-Fix-static-library-builds.patch b/recipes/libaec/all/patches/1.0.4-0001-Fix-static-library-builds.patch deleted file mode 100644 index ba756f64d8e76..0000000000000 --- a/recipes/libaec/all/patches/1.0.4-0001-Fix-static-library-builds.patch +++ /dev/null @@ -1,135 +0,0 @@ -From 6df13969e6967dbed660271011e872c9c366037a Mon Sep 17 00:00:00 2001 -From: Brennan Ashton -Date: Tue, 28 Jan 2020 03:59:02 -0800 -Subject: [PATCH] Fix static library builds - -Signed-off-by: Brennan Ashton ---- - CMakeLists.txt | 3 --- - src/CMakeLists.txt | 10 +++++++++- - src/libaec.h | 28 ++++++++++------------------ - src/szlib.h | 6 +++--- - 4 files changed, 22 insertions(+), 25 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d71d26c..4f38618 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -43,9 +43,6 @@ option(BUILD_SHARED_LIBS "Build Shared Libraries" ON) - if(BUILD_SHARED_LIBS) - set (LIB_TYPE SHARED) - else(BUILD_SHARED_LIBS) -- if(WIN32) -- message(WARNING "You will have to modify libaec.h for static libs.") -- endif(WIN32) - set(LIB_TYPE STATIC) - endif(BUILD_SHARED_LIBS) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index ed6053e..93a78f2 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -1,5 +1,13 @@ -+include (GenerateExportHeader) - add_library(aec ${LIB_TYPE} ${libaec_SRCS}) - set_target_properties(aec PROPERTIES VERSION 0.0.10 SOVERSION 0) -+generate_export_header(aec -+ BASE_NAME libaec -+ EXPORT_MACRO_NAME libaec_EXPORT -+ EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/libaec_Export.h -+ STATIC_DEFINE libaec_BUILT_AS_STATIC -+) -+ - add_library(sz ${LIB_TYPE} sz_compat.c) - set_target_properties(sz PROPERTIES VERSION 2.0.1 SOVERSION 2) - -@@ -41,7 +49,7 @@ else(WIN32) - DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1 COMPONENT doc) - endif(WIN32) - --install(FILES libaec.h szlib.h -+install(FILES libaec.h szlib.h ${PROJECT_BINARY_DIR}/libaec_Export.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - COMPONENT headers) - install(TARGETS aec_client -diff --git a/src/libaec.h b/src/libaec.h -index bb43be9..44505e4 100644 ---- a/src/libaec.h -+++ b/src/libaec.h -@@ -52,20 +52,12 @@ - - #include - -+#include "libaec_Export.h" -+ - #ifdef __cplusplus - extern "C"{ - #endif - --#if BUILDING_LIBAEC && HAVE_VISIBILITY --# define LIBAEC_DLL_EXPORTED __attribute__((__visibility__("default"))) --#elif BUILDING_LIBAEC && defined _MSC_VER --# define LIBAEC_DLL_EXPORTED __declspec(dllexport) --#elif defined _MSC_VER --# define LIBAEC_DLL_EXPORTED __declspec(dllimport) --#else --# define LIBAEC_DLL_EXPORTED --#endif -- - struct internal_state; - - struct aec_stream { -@@ -155,19 +147,19 @@ struct aec_stream { - /*********************************************/ - /* Streaming encoding and decoding functions */ - /*********************************************/ --LIBAEC_DLL_EXPORTED int aec_encode_init(struct aec_stream *strm); --LIBAEC_DLL_EXPORTED int aec_encode(struct aec_stream *strm, int flush); --LIBAEC_DLL_EXPORTED int aec_encode_end(struct aec_stream *strm); -+libaec_EXPORT int aec_encode_init(struct aec_stream *strm); -+libaec_EXPORT int aec_encode(struct aec_stream *strm, int flush); -+libaec_EXPORT int aec_encode_end(struct aec_stream *strm); - --LIBAEC_DLL_EXPORTED int aec_decode_init(struct aec_stream *strm); --LIBAEC_DLL_EXPORTED int aec_decode(struct aec_stream *strm, int flush); --LIBAEC_DLL_EXPORTED int aec_decode_end(struct aec_stream *strm); -+libaec_EXPORT int aec_decode_init(struct aec_stream *strm); -+libaec_EXPORT int aec_decode(struct aec_stream *strm, int flush); -+libaec_EXPORT int aec_decode_end(struct aec_stream *strm); - - /***************************************************************/ - /* Utility functions for encoding or decoding a memory buffer. */ - /***************************************************************/ --LIBAEC_DLL_EXPORTED int aec_buffer_encode(struct aec_stream *strm); --LIBAEC_DLL_EXPORTED int aec_buffer_decode(struct aec_stream *strm); -+libaec_EXPORT int aec_buffer_encode(struct aec_stream *strm); -+libaec_EXPORT int aec_buffer_decode(struct aec_stream *strm); - - #ifdef __cplusplus - } -diff --git a/src/szlib.h b/src/szlib.h -index 1eaa577..18b6a3c 100644 ---- a/src/szlib.h -+++ b/src/szlib.h -@@ -80,15 +80,15 @@ typedef struct SZ_com_t_s - int pixels_per_scanline; - } SZ_com_t; - --LIBAEC_DLL_EXPORTED int SZ_BufftoBuffCompress( -+libaec_EXPORT int SZ_BufftoBuffCompress( - void *dest, size_t *destLen, - const void *source, size_t sourceLen, - SZ_com_t *param); --LIBAEC_DLL_EXPORTED int SZ_BufftoBuffDecompress( -+libaec_EXPORT int SZ_BufftoBuffDecompress( - void *dest, size_t *destLen, - const void *source, size_t sourceLen, - SZ_com_t *param); - --LIBAEC_DLL_EXPORTED int SZ_encoder_enabled(void); -+libaec_EXPORT int SZ_encoder_enabled(void); - - #endif /* SZLIB_H */ --- -2.24.1 - diff --git a/recipes/libaec/all/patches/1.0.4-0002-fix-install-ios.patch b/recipes/libaec/all/patches/1.0.4-0002-fix-install-ios.patch deleted file mode 100644 index 7d7d56d1f60b6..0000000000000 --- a/recipes/libaec/all/patches/1.0.4-0002-fix-install-ios.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -53,7 +53,6 @@ install(FILES libaec.h szlib.h ${PROJECT_BINARY_DIR}/libaec_Export.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - COMPONENT headers) - install(TARGETS aec_client -- RUNTIME - DESTINATION ${CMAKE_INSTALL_BINDIR} - COMPONENT applications) - diff --git a/recipes/libaec/all/patches/1.0.6-0001-fix-library-builds.patch b/recipes/libaec/all/patches/1.0.6-0001-fix-library-builds.patch deleted file mode 100644 index 500c20a889d8c..0000000000000 --- a/recipes/libaec/all/patches/1.0.6-0001-fix-library-builds.patch +++ /dev/null @@ -1,113 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6f75ead..c974cce 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -4,7 +4,7 @@ project(libaec LANGUAGES C VERSION 1.0.6) - # Automatically export symbols for Windows DLLs - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) - --set(CMAKE_C_STANDARD 99) -+set(CMAKE_C_STANDARD 11) - set(CMAKE_C_VISIBILITY_PRESET hidden) - set(CMAKE_POSITION_INDEPENDENT_CODE ON) - include(CTest) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index a26f9b7..3cd8f72 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -10,12 +10,17 @@ target_include_directories(aec - "$" - "$") - --# Create both static and shared aec library. -+if (NOT BUILD_SHARED_LIBS) -+ -+# Create aec library. - add_library(aec_static STATIC "$") - target_link_libraries(aec_static PUBLIC aec) - set_target_properties(aec_static - PROPERTIES -- OUTPUT_NAME $,aec_static,aec>) -+ OUTPUT_NAME $,aec_static,aec> -+ PUBLIC_HEADER ../include/libaec.h) -+ -+else() - - add_library(aec_shared SHARED "$") - target_link_libraries(aec_shared PUBLIC aec) -@@ -26,17 +31,24 @@ set_target_properties(aec_shared - OUTPUT_NAME aec - PUBLIC_HEADER ../include/libaec.h) - -+endif() -+ - # Wrapper for compatibility with szip - add_library(sz OBJECT sz_compat.c) - target_link_libraries(sz PUBLIC aec) - --# Create both static and shared szip library. -+# Create szip library. -+if (NOT BUILD_SHARED_LIBS) -+ - add_library(sz_static STATIC "$" "$") - set_target_properties(sz_static - PROPERTIES -- OUTPUT_NAME $,szip_static,sz>) -+ OUTPUT_NAME $,szip_static,sz> -+ PUBLIC_HEADER ../include/szlib.h) - target_link_libraries(sz_static PUBLIC sz) - -+else() -+ - add_library(sz_shared SHARED "$" "$") - target_link_libraries(sz_shared PUBLIC sz) - set_target_properties(sz_shared -@@ -46,11 +58,16 @@ set_target_properties(sz_shared - OUTPUT_NAME $,szip,sz> - PUBLIC_HEADER ../include/szlib.h) - -+endif() -+ - # Simple client for testing and benchmarking. - # Can also be used stand-alone - add_executable(aec_client aec.c) - set_target_properties(aec_client PROPERTIES OUTPUT_NAME aec) - target_link_libraries(aec_client PUBLIC aec) -+if (MSVC) -+ target_compile_options(aec_client PUBLIC /FS /Z7) -+endif() - - include(GNUInstallDirs) - if(UNIX) -@@ -61,23 +78,14 @@ if(UNIX) - PROPERTIES - COMPILE_DEFINITIONS - "HAVE_VISIBILITY=$;BUILDING_LIBAEC") -- -- # The shell scripts for benchmarking are supported on unix only -- add_executable(utime EXCLUDE_FROM_ALL utime.c) -- target_include_directories(utime PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/..") -- add_custom_target(bench -- COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/benc.sh -- ${CMAKE_CURRENT_SOURCE_DIR}/../data/typical.rz -- COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bdec.sh -- DEPENDS aec_client utime) - endif() - --if(UNIX OR MINGW) -- # Install manpage -- install( -- FILES aec.1 -- DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1 -- COMPONENT doc) --endif() -+if (NOT BUILD_SHARED_LIBS) - --install(TARGETS aec_static aec_shared sz_static sz_shared aec_client) -+install(TARGETS aec_static sz_static aec_client) -+ -+else() -+ -+install(TARGETS aec_shared sz_shared aec_client) -+ -+endif() diff --git a/recipes/libaec/all/patches/1.0.6-0002-fix-cmake-build-with-ninja.patch b/recipes/libaec/all/patches/1.0.6-0002-fix-cmake-build-with-ninja.patch deleted file mode 100644 index b3782f6654ad3..0000000000000 --- a/recipes/libaec/all/patches/1.0.6-0002-fix-cmake-build-with-ninja.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt 2021-09-17 19:28:01.000000000 +0800 -+++ b/CMakeLists.txt 2022-11-04 07:43:58.413439439 +0800 -@@ -12,6 +12,8 @@ - include(TestBigEndian) - test_big_endian(WORDS_BIGENDIAN) - -+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) -+ - # Check for __builtin_clzll for faster decoding - include(CheckCSourceCompiles) - check_c_source_compiles( diff --git a/recipes/libaec/all/set_runtime_output_dir.cmake b/recipes/libaec/all/set_runtime_output_dir.cmake new file mode 100644 index 0000000000000..d154a1133b327 --- /dev/null +++ b/recipes/libaec/all/set_runtime_output_dir.cmake @@ -0,0 +1,2 @@ +# Ninja needs 'aec' binary to be put in a separate folder to an imaginary 'aec' object output +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) diff --git a/recipes/libaec/all/test_package/CMakeLists.txt b/recipes/libaec/all/test_package/CMakeLists.txt index f87e0b5ca8eb9..957285057e22b 100644 --- a/recipes/libaec/all/test_package/CMakeLists.txt +++ b/recipes/libaec/all/test_package/CMakeLists.txt @@ -1,7 +1,8 @@ -cmake_minimum_required(VERSION 3.1.3) +cmake_minimum_required(VERSION 3.15) project(test_package C) find_package(libaec CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} libaec::libaec) +target_link_libraries(${PROJECT_NAME} libaec::aec) +target_compile_features(${PROJECT_NAME} PRIVATE c_std_11) diff --git a/recipes/libaec/all/test_package/conanfile.py b/recipes/libaec/all/test_package/conanfile.py index 75526b1d02b79..0c7c612cdc73e 100644 --- a/recipes/libaec/all/test_package/conanfile.py +++ b/recipes/libaec/all/test_package/conanfile.py @@ -1,8 +1,8 @@ +import os + from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.scm import Version -import os +from conan.tools.cmake import CMake, cmake_layout class TestPackageConan(ConanFile): @@ -16,12 +16,6 @@ def requirements(self): def layout(self): cmake_layout(self) - def generate(self): - tc = CMakeToolchain(self) - if Version(self.dependencies["libaec"].ref.version) >= "1.0.6": - tc.variables["CMAKE_C_STANDARD"] = "11" - tc.generate() - def build(self): cmake = CMake(self) cmake.configure() @@ -29,5 +23,5 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/libaec/config.yml b/recipes/libaec/config.yml index a41a7cbb0ffc2..e52184bafc974 100644 --- a/recipes/libaec/config.yml +++ b/recipes/libaec/config.yml @@ -1,5 +1,5 @@ versions: - "1.0.6": + "1.1.2": folder: all - "1.0.4": + "1.0.6": folder: all diff --git a/recipes/libalsa/all/conandata.yml b/recipes/libalsa/all/conandata.yml index c612ddb389783..3c307f42aa636 100644 --- a/recipes/libalsa/all/conandata.yml +++ b/recipes/libalsa/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.12": + url: "https://github.com/alsa-project/alsa-lib/archive/v1.2.12.tar.gz" + sha256: "f067dbba9376e5bbbb417b77751d2a9f2f277c54fb3a2b5c023cc2c7dfb4e3c1" "1.2.10": url: "https://github.com/alsa-project/alsa-lib/archive/v1.2.10.tar.gz" sha256: "f55749847fd98274501f4691a2d847e89280c07d40a43cdac43d6443f69fc939" diff --git a/recipes/libalsa/all/conanfile.py b/recipes/libalsa/all/conanfile.py index 8c3046d892f5a..eff1547ac38a9 100644 --- a/recipes/libalsa/all/conanfile.py +++ b/recipes/libalsa/all/conanfile.py @@ -12,12 +12,12 @@ class LibalsaConan(ConanFile): name = "libalsa" + description = "Library of ALSA: The Advanced Linux Sound Architecture, that provides audio " \ + "and MIDI functionality to the Linux operating system" license = "LGPL-2.1-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/alsa-project/alsa-lib" topics = ("alsa", "sound", "audio", "midi") - description = "Library of ALSA: The Advanced Linux Sound Architecture, that provides audio " \ - "and MIDI functionality to the Linux operating system" package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/libalsa/config.yml b/recipes/libalsa/config.yml index ce651c2f0d63a..a734abbf480ed 100644 --- a/recipes/libalsa/config.yml +++ b/recipes/libalsa/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.12": + folder: all "1.2.10": folder: all "1.2.7.2": diff --git a/recipes/libaom-av1/all/conandata.yml b/recipes/libaom-av1/all/conandata.yml index bb3a5a205cc9f..a094fca193ea9 100644 --- a/recipes/libaom-av1/all/conandata.yml +++ b/recipes/libaom-av1/all/conandata.yml @@ -1,34 +1,25 @@ sources: + "3.8.0": + url: "https://storage.googleapis.com/aom-releases/libaom-3.8.0.tar.gz" + sha256: "a768d3e54c7f00cd38b01208d1ae52d671be410cfc387ff7881ea71c855f3600" "3.6.1": url: "https://storage.googleapis.com/aom-releases/libaom-3.6.1.tar.gz" sha256: "42b862f58b3d00bd3902d2dc469526574f5b012e5b178e6a9652845a113d6887" - "3.6.0": - url: "https://storage.googleapis.com/aom-releases/libaom-3.6.0.tar.gz" - sha256: "a4a6c0fab685da743b796662a928fcdf7ae60594edc306efb73e78a17ea6cde6" "3.5.0": url: "https://storage.googleapis.com/aom-releases/libaom-3.5.0.tar.gz" sha256: "d37dbee372e2430a7efde813984ae6d78bdf1fc4080ebe32457c9115408b0738" "3.4.0": url: "https://storage.googleapis.com/aom-releases/libaom-3.4.0.tar.gz" sha256: "bd754b58c3fa69f3ffd29da77de591bd9c26970e3b18537951336d6c0252e354" - "3.3.0": - url: "https://storage.googleapis.com/aom-releases/libaom-3.3.0.tar.gz" - sha256: "1dafde32bc2237bf0570294661ae61db30e818840f77dc4e90d1ebf5a6286664" - "3.1.2": - url: "https://storage.googleapis.com/aom-releases/libaom-3.1.2.tar.gz" - sha256: "a295eb3779657fad7d34217091ee4c6257d02580a82012231afef72792330075" - "3.1.1": - url: "https://storage.googleapis.com/aom-releases/libaom-3.1.1.tar.gz" - sha256: "7cd5e8e469268c37241df93fe61557ea0dc46980ca21b37e786e92a3d0729276" "2.0.1": url: "https://storage.googleapis.com/aom-releases/libaom-2.0.1.tar.gz" sha256: "a0cff299621e2ef885aba219c498fa39a7d9a7ddf47585a118fd66c64ad1b312" patches: - "3.6.1": - - patch_file: "patches/0001-3.4.0-fix-install.patch" + "3.8.0": + - patch_file: "patches/0001-3.8.0-fix-install.patch" patch_type: conan patch_description: Install just aom library without aom_static. - "3.6.0": + "3.6.1": - patch_file: "patches/0001-3.4.0-fix-install.patch" patch_type: conan patch_description: Install just aom library without aom_static. @@ -40,18 +31,6 @@ patches: - patch_file: "patches/0001-3.4.0-fix-install.patch" patch_type: conan patch_description: Install just aom library without aom_static. - "3.3.0": - - patch_file: "patches/0001-3.3.0-fix-install.patch" - patch_type: conan - patch_description: Install just aom library without aom_static. - "3.1.2": - - patch_file: "patches/0001-3.1.1-fix-install.patch" - patch_type: conan - patch_description: Install just aom library without aom_static. - "3.1.1": - - patch_file: "patches/0001-3.1.1-fix-install.patch" - patch_type: conan - patch_description: Install just aom library without aom_static. "2.0.1": - patch_file: "patches/0001-2.0.1-fix-install.patch" patch_type: conan diff --git a/recipes/libaom-av1/all/conanfile.py b/recipes/libaom-av1/all/conanfile.py index 714ea1c7238dd..26d670c71d8c3 100644 --- a/recipes/libaom-av1/all/conanfile.py +++ b/recipes/libaom-av1/all/conanfile.py @@ -52,7 +52,7 @@ def build_requirements(self): if self.options.get_safe("assembly", False): self.tool_requires("nasm/2.15.05") if self._settings_build.os == "Windows": - self.tool_requires("strawberryperl/5.30.0.1") + self.tool_requires("strawberryperl/5.32.1.1") def layout(self): cmake_layout(self, src_folder="src") @@ -94,6 +94,9 @@ def package(self): def package_info(self): self.cpp_info.set_property("pkg_config_name", "aom") - self.cpp_info.libs = ["aom"] + lib = "aom" + if Version(self.version) >= "3.8.0" and self.settings.os == "Windows" and self.options.shared: + lib = "aom_dll" + self.cpp_info.libs = [lib] if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.system_libs = ["pthread", "m"] diff --git a/recipes/libaom-av1/all/patches/0001-3.1.1-fix-install.patch b/recipes/libaom-av1/all/patches/0001-3.1.1-fix-install.patch deleted file mode 100644 index af10132d05fe7..0000000000000 --- a/recipes/libaom-av1/all/patches/0001-3.1.1-fix-install.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/build/cmake/aom_install.cmake -+++ b/build/cmake/aom_install.cmake -@@ -26,7 +26,7 @@ endif() - # Note: aom.pc generation uses GNUInstallDirs: - # https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html - macro(setup_aom_install_targets) -- if(NOT (MSVC OR XCODE)) -+ if(1) - include("GNUInstallDirs") - set(AOM_PKG_CONFIG_FILE "${AOM_CONFIG_DIR}/aom.pc") - -@@ -76,7 +76,8 @@ macro(setup_aom_install_targets) - endif() - - if(BUILD_SHARED_LIBS) -- set(AOM_INSTALL_LIBS aom aom_static) -+ set_target_properties(aom_static PROPERTIES OUTPUT_NAME aom_static) -+ set(AOM_INSTALL_LIBS aom) - else() - set(AOM_INSTALL_LIBS aom) - endif() -@@ -88,8 +89,10 @@ macro(setup_aom_install_targets) - install( - FILES "${AOM_PKG_CONFIG_FILE}" - DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig") -- install(TARGETS ${AOM_INSTALL_LIBS} DESTINATION -- "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") -+ install(TARGETS ${AOM_INSTALL_LIBS} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - if(ENABLE_EXAMPLES) - install(TARGETS ${AOM_INSTALL_BINS} DESTINATION diff --git a/recipes/libaom-av1/all/patches/0001-3.3.0-fix-install.patch b/recipes/libaom-av1/all/patches/0001-3.8.0-fix-install.patch similarity index 77% rename from recipes/libaom-av1/all/patches/0001-3.3.0-fix-install.patch rename to recipes/libaom-av1/all/patches/0001-3.8.0-fix-install.patch index 0dc76d16fc7f5..1bb2cbdc3adb3 100644 --- a/recipes/libaom-av1/all/patches/0001-3.3.0-fix-install.patch +++ b/recipes/libaom-av1/all/patches/0001-3.8.0-fix-install.patch @@ -1,6 +1,6 @@ ---- a/build/cmake/aom_install.cmake -+++ b/build/cmake/aom_install.cmake -@@ -27,7 +27,7 @@ endif() +--- build/cmake/aom_install.cmake ++++ build/cmake/aom_install.cmake +@@ -27,7 +27,7 @@ # Note: aom.pc generation uses GNUInstallDirs: # https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html macro(setup_aom_install_targets) @@ -9,7 +9,7 @@ include("GNUInstallDirs") set(AOM_PKG_CONFIG_FILE "${AOM_CONFIG_DIR}/aom.pc") -@@ -77,7 +77,8 @@ macro(setup_aom_install_targets) +@@ -79,7 +79,8 @@ endif() if(BUILD_SHARED_LIBS) diff --git a/recipes/libaom-av1/config.yml b/recipes/libaom-av1/config.yml index 2ac5e2242b2d4..45dfabb3e4ed1 100644 --- a/recipes/libaom-av1/config.yml +++ b/recipes/libaom-av1/config.yml @@ -1,17 +1,11 @@ versions: - "3.6.1": + "3.8.0": folder: all - "3.6.0": + "3.6.1": folder: all "3.5.0": folder: all "3.4.0": folder: all - "3.3.0": - folder: all - "3.1.2": - folder: all - "3.1.1": - folder: all "2.0.1": folder: all diff --git a/recipes/libarchive/all/conanfile.py b/recipes/libarchive/all/conanfile.py index c68aabe657d31..ee0e26469819f 100644 --- a/recipes/libarchive/all/conanfile.py +++ b/recipes/libarchive/all/conanfile.py @@ -93,7 +93,7 @@ def requirements(self): if self.options.with_iconv: self.requires("libiconv/1.17") if self.options.with_pcreposix: - self.requires("pcre2/10.42") + self.requires("pcre/8.45") if self.options.with_nettle: self.requires("nettle/3.9.1") if self.options.with_openssl: @@ -105,11 +105,11 @@ def requirements(self): if self.options.with_lzo: self.requires("lzo/2.10") if self.options.with_lzma: - self.requires("xz_utils/5.4.5") + self.requires("xz_utils/[>=5.4.5 <6]") if self.options.with_zstd: - self.requires("zstd/1.5.5") + self.requires("zstd/[>=1.5 <1.6]") if self.options.get_safe("with_mbedtls"): - self.requires("mbedtls/3.5.1") + self.requires("mbedtls/3.6.1") if self.options.get_safe("with_pcre2"): self.requires("pcre2/10.43") diff --git a/recipes/libavif/all/conandata.yml b/recipes/libavif/all/conandata.yml index f4a45a5fbdb30..7d4af07ae59e6 100644 --- a/recipes/libavif/all/conandata.yml +++ b/recipes/libavif/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.1.1": + url: "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.1.1.tar.gz" + sha256: "914662e16245e062ed73f90112fbb4548241300843a7772d8d441bb6859de45b" + "1.1.0": + url: "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.1.0.tar.gz" + sha256: "edb31951005d7a143be1724f24825809599a4832073add50eaf987733defb5c8" "1.0.4": url: "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v1.0.4.tar.gz" sha256: "dc56708c83a4b934a8af2b78f67f866ba2fb568605c7cf94312acf51ee57d146" @@ -18,6 +24,14 @@ sources: url: "https://github.com/AOMediaCodec/libavif/archive/refs/tags/v0.9.3.tar.gz" sha256: "bcd9a1f57f982a9615eb7e2faf87236dc88eb1d0c886f3471c7440ead605060d" patches: + "1.1.1": + - patch_file: patches/1.1.1-0001-disable-developer-only-codepaths.patch + patch_description: "disable compiler options for develop" + patch_type: "portability" + "1.1.0": + - patch_file: patches/1.1.0-0001-disable-developer-only-codepaths.patch + patch_description: "disable compiler options for develop" + patch_type: "portability" "1.0.4": - patch_file: patches/1.0.1-0001-disable-developer-only-codepaths.patch patch_description: "disable compiler options for develop" diff --git a/recipes/libavif/all/conanfile.py b/recipes/libavif/all/conanfile.py index 49fe058e91455..f9c0bcaec2901 100644 --- a/recipes/libavif/all/conanfile.py +++ b/recipes/libavif/all/conanfile.py @@ -3,6 +3,7 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir, save from conan.tools.scm import Version +from conan.tools.env import VirtualBuildEnv import os import textwrap @@ -22,11 +23,19 @@ class LibAVIFConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "with_decoder": ["aom", "dav1d"], + "with_ycgco_r": [True, False], + "with_gain_map": [True, False], + "with_metav1": [True, False], + "with_sample_transform": [True, False], } default_options = { "shared": False, "fPIC": True, "with_decoder": "dav1d", + "with_ycgco_r": False, + "with_gain_map": False, + "with_metav1": False, + "with_sample_transform": False, } @property @@ -39,6 +48,12 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "1.0.0": + del self.options.with_ycgco_r + if Version(self.version) < "1.1.0": + del self.options.with_gain_map + del self.options.with_metav1 + del self.options.with_sample_transform def configure(self): if self.options.shared: @@ -65,6 +80,9 @@ def validate(self): if self._depends_on_sharpyuv and Version(self.dependencies["libwebp"].ref.version) < "1.3.0": raise ConanInvalidConfiguration(f"{self.ref} requires libwebp >= 1.3.0 in order to get libsharpyuv") + def build_requirements(self): + self.tool_requires("cmake/[>=3.19 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -75,19 +93,33 @@ def generate(self): tc.variables["AVIF_CODEC_DAV1D"] = self.options.with_decoder == "dav1d" tc.variables["AVIF_CODEC_AOM_DECODE"] = self.options.with_decoder == "aom" tc.variables["LIBYUV_VERSION"] = self.dependencies["libyuv"].ref.version + if "with_ycgco_r" in self.options: + tc.variables["AVIF_ENABLE_EXPERIMENTAL_YCGCO_R"] = self.options.with_ycgco_r + if "with_gain_map" in self.options: + tc.variables["AVIF_ENABLE_EXPERIMENTAL_GAIN_MAP"] = self.options.with_gain_map + if "with_metav1" in self.options: + tc.variables["AVIF_ENABLE_EXPERIMENTAL_METAV1"] = self.options.with_metav1 + if "with_sample_transform" in self.options: + tc.variables["AVIF_ENABLE_EXPERIMENTAL_SAMPLE_TRANSFORM"] = self.options.with_sample_transform tc.generate() deps = CMakeDeps(self) + if Version(self.version) >= "1.1.0": + deps.set_property("libyuv", "cmake_target_name", "yuv::yuv") deps.generate() + venv = VirtualBuildEnv(self) + venv.generate(scope="build") + def _patch_sources(self): apply_conandata_patches(self) cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") - replace_in_file(self, cmakelists, "find_package(libyuv QUIET)", "find_package(libyuv REQUIRED CONFIG)") - replace_in_file(self, cmakelists, "${LIBYUV_LIBRARY}", "libyuv::libyuv") - replace_in_file(self, cmakelists, "find_package(dav1d REQUIRED)", "find_package(dav1d REQUIRED CONFIG)") - replace_in_file(self, cmakelists, "${DAV1D_LIBRARY}", "dav1d::dav1d") - replace_in_file(self, cmakelists, "find_package(aom REQUIRED)", "find_package(libaom-av1 REQUIRED CONFIG)") - replace_in_file(self, cmakelists, "${AOM_LIBRARIES}", "libaom-av1::libaom-av1") + if Version(self.version) < "1.1.0": + replace_in_file(self, cmakelists, "find_package(libyuv QUIET)", "find_package(libyuv REQUIRED CONFIG)") + replace_in_file(self, cmakelists, "${LIBYUV_LIBRARY}", "libyuv::libyuv") + replace_in_file(self, cmakelists, "find_package(dav1d REQUIRED)", "find_package(dav1d REQUIRED CONFIG)") + replace_in_file(self, cmakelists, "${DAV1D_LIBRARY}", "dav1d::dav1d") + replace_in_file(self, cmakelists, "find_package(aom REQUIRED)", "find_package(libaom-av1 REQUIRED CONFIG)") + replace_in_file(self, cmakelists, "${AOM_LIBRARIES}", "libaom-av1::libaom-av1") def build(self): self._patch_sources() diff --git a/recipes/libavif/all/patches/1.1.0-0001-disable-developer-only-codepaths.patch b/recipes/libavif/all/patches/1.1.0-0001-disable-developer-only-codepaths.patch new file mode 100644 index 0000000000000..205b84f1dcbf0 --- /dev/null +++ b/recipes/libavif/all/patches/1.1.0-0001-disable-developer-only-codepaths.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bc478ae..1b2229d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -137,13 +137,13 @@ if(AVIF_BUILD_APPS + ) + set(AVIF_USE_CXX ON) + endif() +- ++if(0) + if(APPLE) + set(XCRUN xcrun) + else() + set(XCRUN) + endif() +- ++endif() + # This is also needed to get shared libraries (e.g. pixbufloader-avif) to compile against a static libavif. + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + if(BUILD_SHARED_LIBS) +@@ -260,7 +260,7 @@ if(AVIF_ENABLE_EXPERIMENTAL_GAIN_MAP) + check_avif_option(AVIF_LIBXML2 TARGET LibXml2::LibXml2 PKG_NAME LibXml2) + endif() + # --------------------------------------------------------------------------------------- +- ++if(0) + # Enable all warnings + include(CheckCCompilerFlag) + if(CMAKE_C_COMPILER_ID MATCHES "Clang") +@@ -290,7 +290,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC") + else() + message(FATAL_ERROR "libavif: Unknown compiler, bailing out") + endif() +- ++endif() + if(AVIF_ENABLE_WERROR) + # Warnings as errors + if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "GNU") diff --git a/recipes/libavif/all/patches/1.1.1-0001-disable-developer-only-codepaths.patch b/recipes/libavif/all/patches/1.1.1-0001-disable-developer-only-codepaths.patch new file mode 100644 index 0000000000000..00825d66fdb2c --- /dev/null +++ b/recipes/libavif/all/patches/1.1.1-0001-disable-developer-only-codepaths.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index baf5964..dc3704e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -147,13 +147,13 @@ option(AVIF_LOCAL_FUZZTEST + + # Whether the libavif library uses c++ indirectly (e.g. through linking to libyuv). + set(AVIF_LIB_USE_CXX OFF) +- ++if(0) + if(APPLE) + set(XCRUN xcrun) + else() + set(XCRUN) + endif() +- ++endif() + # This is also needed to get shared libraries (e.g. pixbufloader-avif) to compile against a static libavif. + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + if(BUILD_SHARED_LIBS) +@@ -269,7 +269,7 @@ if(AVIF_ENABLE_EXPERIMENTAL_GAIN_MAP) + check_avif_option(AVIF_LIBXML2 TARGET LibXml2::LibXml2 PKG_NAME LibXml2) + endif() + # --------------------------------------------------------------------------------------- +- ++if(0) + # Enable all warnings + include(CheckCCompilerFlag) + if(MSVC) +@@ -310,7 +310,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "GNU") + else() + message(FATAL_ERROR "libavif: Unknown compiler, bailing out") + endif() +- ++endif() + if(AVIF_ENABLE_WERROR) + # Warnings as errors + if(MSVC) diff --git a/recipes/libavif/config.yml b/recipes/libavif/config.yml index 0a86bfa38351a..d8cfe5a49c15a 100644 --- a/recipes/libavif/config.yml +++ b/recipes/libavif/config.yml @@ -1,4 +1,8 @@ versions: + "1.1.1": + folder: all + "1.1.0": + folder: all "1.0.4": folder: all "1.0.3": diff --git a/recipes/libavrocpp/all/conandata.yml b/recipes/libavrocpp/all/conandata.yml index 4db9766f42d9f..4431ba3942fec 100644 --- a/recipes/libavrocpp/all/conandata.yml +++ b/recipes/libavrocpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.11.3": + url: "https://github.com/apache/avro/archive/release-1.11.3.tar.gz" + sha256: "da377ac1cf8b91458bf702cbcfb214eecb5c399b267f0ca9c0aade6cabaf126e" "1.11.1": url: "https://github.com/apache/avro/archive/release-1.11.1.tar.gz" sha256: "599f96bb405f72a35154b2477caa6254d723bb4e3f6a0e54e9ae540664321752" @@ -12,6 +15,22 @@ sources: url: "https://github.com/apache/avro/archive/release-1.10.1.tar.gz" sha256: "8fd1f850ce37e60835e6d8335c0027a959aaa316773da8a9660f7d33a66ac142" patches: + "1.11.3": + - patch_file: "patches/0001-add-iterator-include-1-11-0.patch" + patch_description: "include iterator" + patch_type: "portability" + - patch_file: "patches/0002-disable-tests-1-11-1.patch" + patch_description: "disable tests" + patch_type: "conan" + - patch_file: "patches/0003-allow-static-boost-linkage-1-11-0.patch" + patch_description: "remove boost linkage definitions" + patch_type: "conan" + - patch_file: "patches/0004-fix-windows-shared-installation-1-11-1.patch" + patch_description: "fix runtime installation path" + patch_type: "portability" + - patch_file: "patches/0006-disable-warn-as-error-1-11-3.patch" + patch_description: "disable warn as error for boost c++14 breaking change" + patch_type: "portability" "1.11.1": - patch_file: "patches/0001-add-iterator-include-1-11-0.patch" patch_description: "include iterator" diff --git a/recipes/libavrocpp/all/conanfile.py b/recipes/libavrocpp/all/conanfile.py index d9c7f619040a6..e0658c9cdfa87 100644 --- a/recipes/libavrocpp/all/conanfile.py +++ b/recipes/libavrocpp/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, replace_in_file -from conan.tools.build import check_min_cppstd +from conan.tools.build import check_min_cppstd, valid_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout import os @@ -14,6 +14,7 @@ class LibavrocppConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://avro.apache.org/" topics = ("serialization", "deserialization","avro") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -42,9 +43,10 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") - + def requirements(self): - self.requires("boost/1.81.0") + # boost upper to 1.81.0 requires C++14 minimum + self.requires("boost/1.81.0", transitive_headers=True) self.requires("snappy/1.1.9") def validate(self): @@ -93,7 +95,7 @@ def package(self): rm(self, dll_pattern_to_remove, os.path.join(self.package_folder, "bin")) def package_info(self): - self.cpp_info.libs = ["avrocpp" if self.options.shared else "avrocpp_s"] + self.cpp_info.libs = ["avrocpp"] if self.options.shared else ["avrocpp_s"] if self.options.shared: self.cpp_info.defines.append("AVRO_DYN_LINK") if self.settings.os in ["Linux", "FreeBSD"]: diff --git a/recipes/libavrocpp/all/patches/0006-disable-warn-as-error-1-11-3.patch b/recipes/libavrocpp/all/patches/0006-disable-warn-as-error-1-11-3.patch new file mode 100644 index 0000000000000..711abad6d4b00 --- /dev/null +++ b/recipes/libavrocpp/all/patches/0006-disable-warn-as-error-1-11-3.patch @@ -0,0 +1,13 @@ +diff --git a/lang/c++/CMakeLists.txt b/lang/c++/CMakeLists.txt +index 52d6ac8a..26d8d146 100644 +--- a/lang/c++/CMakeLists.txt ++++ b/lang/c++/CMakeLists.txt +@@ -59,7 +59,7 @@ if (WIN32 AND NOT CYGWIN AND NOT MSYS) + endif() + + if (CMAKE_COMPILER_IS_GNUCXX) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic") + if (AVRO_ADD_PROTECTOR_FLAGS) + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fstack-protector-all -D_GLIBCXX_DEBUG") + # Unset _GLIBCXX_DEBUG for avrogencpp.cc because using Boost Program Options diff --git a/recipes/libavrocpp/config.yml b/recipes/libavrocpp/config.yml index 9fcb2d236146c..c159828f2eb37 100644 --- a/recipes/libavrocpp/config.yml +++ b/recipes/libavrocpp/config.yml @@ -1,4 +1,6 @@ versions: + 1.11.3: + folder: all 1.11.1: folder: all 1.11.0: diff --git a/recipes/libbacktrace/all/conandata.yml b/recipes/libbacktrace/all/conandata.yml index 56d79ce7402eb..7aec17549ec3c 100644 --- a/recipes/libbacktrace/all/conandata.yml +++ b/recipes/libbacktrace/all/conandata.yml @@ -1,8 +1,22 @@ sources: + "cci.20240730": + url: "https://github.com/ianlancetaylor/libbacktrace/archive/0dd27b95f9f2c11b4a89db5f185a888af912838e.tar.gz" + sha256: "dfbc52012846c57759eaaa5131c329c43f77695c808b3e1847ec2dacce238c35" "cci.20210118": url: "https://github.com/ianlancetaylor/libbacktrace/archive/dedbe13fda00253fe5d4f2fb812c909729ed5937.tar.gz" sha256: "dc8c167f48f3de5ae318c528b26b72f300edb6e33744e55394674fd4b7cdd21d" patches: + "cci.20240730": + - patch_file: "patches/cci.20240719-0001-pointer-arithmetic.patch" + patch_description: "casting pointer types for pointer arithmetics" + patch_type: "portability" + - patch_file: "patches/0002-msvc-unistd-alternative.patch" + patch_description: "support msvc for codes using unistd.h" + patch_type: "portability" "cci.20210118": - patch_file: "patches/0001-pointer-arithmetic.patch" + patch_description: "casting pointer types for pointer arithmetics" + patch_type: "portability" - patch_file: "patches/0002-msvc-unistd-alternative.patch" + patch_description: "support msvc for codes using unistd.h" + patch_type: "portability" diff --git a/recipes/libbacktrace/all/conanfile.py b/recipes/libbacktrace/all/conanfile.py index 2fa71b8e36228..fd0cc977d3ab2 100644 --- a/recipes/libbacktrace/all/conanfile.py +++ b/recipes/libbacktrace/all/conanfile.py @@ -14,9 +14,9 @@ class LibbacktraceConan(ConanFile): name = "libbacktrace" description = "A C library that may be linked into a C/C++ program to produce symbolic backtraces." + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/ianlancetaylor/libbacktrace" - license = "BSD-3-Clause" topics = ("backtrace", "stack-trace") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -52,7 +52,7 @@ def layout(self): def validate(self): check_min_vs(self, "180") if is_msvc(self) and self.options.shared: - raise ConanInvalidConfiguration("libbacktrace shared is not supported with Visual Studio") + raise ConanInvalidConfiguration(f"{self.ref} shared is not supported with Visual Studio") def build_requirements(self): if self._settings_build.os == "Windows": diff --git a/recipes/libbacktrace/all/patches/cci.20240719-0001-pointer-arithmetic.patch b/recipes/libbacktrace/all/patches/cci.20240719-0001-pointer-arithmetic.patch new file mode 100644 index 0000000000000..dbf4fb3485b67 --- /dev/null +++ b/recipes/libbacktrace/all/patches/cci.20240719-0001-pointer-arithmetic.patch @@ -0,0 +1,31 @@ +diff --git a/pecoff.c b/pecoff.c +index 636e1b1..975e417 100644 +--- a/pecoff.c ++++ b/pecoff.c +@@ -704,7 +704,7 @@ coff_add (struct backtrace_state *state, int descriptor, + magic_ok = memcmp (magic, "PE\0", 4) == 0; + fhdr_off += 4; + +- memcpy (&fhdr, fhdr_view.data + 4, sizeof fhdr); ++ memcpy (&fhdr, (char*)fhdr_view.data + 4, sizeof fhdr); + } + else + { +@@ -738,7 +738,7 @@ coff_add (struct backtrace_state *state, int descriptor, + sects_view_valid = 1; + opt_hdr = (const b_coff_optional_header *) sects_view.data; + sects = (const b_coff_section_header *) +- (sects_view.data + fhdr.size_of_optional_header); ++ ((b_coff_optional_header *)sects_view.data + fhdr.size_of_optional_header); + + is_64 = 0; + memset (&image_base, 0, sizeof image_base); +@@ -781,7 +781,7 @@ coff_add (struct backtrace_state *state, int descriptor, + goto fail; + syms_view_valid = 1; + +- str_size = coff_read4 (syms_view.data + syms_size); ++ str_size = coff_read4 ((const unsigned char *)((char *)syms_view.data + syms_size)); + + str_off = syms_off + syms_size; + diff --git a/recipes/libbacktrace/config.yml b/recipes/libbacktrace/config.yml index bc0e7ddecd921..952bd0433d7d5 100644 --- a/recipes/libbacktrace/config.yml +++ b/recipes/libbacktrace/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20240730": + folder: all "cci.20210118": folder: all diff --git a/recipes/libcap/all/conandata.yml b/recipes/libcap/all/conandata.yml index 16d2439fd2b12..213e20579f77b 100644 --- a/recipes/libcap/all/conandata.yml +++ b/recipes/libcap/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.70": + url: "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.70.tar.xz" + sha256: "23a6ef8aadaf1e3e875f633bb2d116cfef8952dba7bc7c569b13458e1952b30f" "2.69": url: "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.69.tar.xz" sha256: "f311f8f3dad84699d0566d1d6f7ec943a9298b28f714cae3c931dfd57492d7eb" @@ -33,6 +36,13 @@ sources: url: "https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.45.tar.xz" sha256: "d66639f765c0e10557666b00f519caf0bd07a95f867dddaee131cd284fac3286" patches: + "2.70": + - patch_file: "patches/2.57/0001-libcap-Remove-hardcoded-fPIC.patch" + patch_description: "allow to configure fPIC option from conan recipe" + patch_type: "conan" + - patch_file: "patches/2.57/0002-Make.Rules-Make-compile-tools-configurable.patch" + patch_description: "allow to override compiler via environment variables" + patch_type: "conan" "2.69": - patch_file: "patches/2.57/0001-libcap-Remove-hardcoded-fPIC.patch" patch_description: "allow to configure fPIC option from conan recipe" diff --git a/recipes/libcap/config.yml b/recipes/libcap/config.yml index 9ca623681ce66..e8abe4aef997c 100644 --- a/recipes/libcap/config.yml +++ b/recipes/libcap/config.yml @@ -1,4 +1,6 @@ versions: + "2.70": + folder: all "2.69": folder: all "2.68": diff --git a/recipes/libcoro/all/conandata.yml b/recipes/libcoro/all/conandata.yml index 1587140b431f7..08d3f083c5782 100644 --- a/recipes/libcoro/all/conandata.yml +++ b/recipes/libcoro/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.12.1": + url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.12.1.tar.gz" + sha256: "2cb6f45fc73dad6008cc930d92939785684835e03b12df422b98fcab9e393add" + "0.12": + url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.12.tar.gz" + sha256: "9a89f329e12fda7d6425523fb2cbd1ebaf41e0e1d41e210d93ad4f3a196333a2" "0.11.1": url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.11.1.tar.gz" sha256: "c7eb1bf133519ec0e0bc2e3e018ac4d1447a143e5e7385dab19204277d7c7671" diff --git a/recipes/libcoro/all/conanfile.py b/recipes/libcoro/all/conanfile.py index 60b120e4f9dc5..0e6a519c86124 100644 --- a/recipes/libcoro/all/conanfile.py +++ b/recipes/libcoro/all/conanfile.py @@ -13,10 +13,10 @@ class LibcoroConan(ConanFile): name = "libcoro" description = "C++20 coroutine library" - topics = ("coroutines", "concurrency", "tasks", "executors", "networking") license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/jbaldwin/libcoro" + topics = ("coroutines", "concurrency", "tasks", "executors", "networking") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/libcoro/config.yml b/recipes/libcoro/config.yml index a682e35c6d452..3e368a245af64 100644 --- a/recipes/libcoro/config.yml +++ b/recipes/libcoro/config.yml @@ -1,4 +1,8 @@ versions: + "0.12.1": + folder: all + "0.12": + folder: all "0.11.1": folder: all "0.10": diff --git a/recipes/libcurl/all/conandata.yml b/recipes/libcurl/all/conandata.yml index 612b8f0180798..cee1789ae6825 100644 --- a/recipes/libcurl/all/conandata.yml +++ b/recipes/libcurl/all/conandata.yml @@ -1,4 +1,14 @@ sources: + "8.10.0": + url: + - "https://curl.se/download/curl-8.10.0.tar.xz" + - "https://github.com/curl/curl/releases/download/curl-8_10_0/curl-8.10.0.tar.xz" + sha256: "e6b142f0e85e954759d37e26a3627e2278137595be80e3a860c4353e4335e5a0" + "8.9.1": + url: + - "https://curl.se/download/curl-8.9.1.tar.xz" + - "https://github.com/curl/curl/releases/download/curl-8_9_1/curl-8.9.1.tar.xz" + sha256: "f292f6cc051d5bbabf725ef85d432dfeacc8711dd717ea97612ae590643801e5" "8.8.0": url: - "https://curl.se/download/curl-8.8.0.tar.xz" diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index 81baf51c83f26..1eb13831e058b 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -339,33 +339,53 @@ def _patch_cmake(self): # Use upstream FindZstd.cmake because check_symbol_exists() is called # afterwards and it would fail with zstd_LIBRARIES generated by CMakeDeps replace_in_file(self, cmakelists, "find_package(Zstd REQUIRED)", "find_package(Zstd REQUIRED MODULE)") - replace_in_file(self, os.path.join(self.source_folder, "CMake", "FindZstd.cmake"), "if(UNIX)", "if(0)") + if Version(self.version) < "8.10.0": + replace_in_file(self, os.path.join(self.source_folder, "CMake", "FindZstd.cmake"), "if(UNIX)", "if(0)") # c-ares - replace_in_file(self, cmakelists, "find_package(CARES REQUIRED)", "find_package(c-ares REQUIRED CONFIG)") - replace_in_file(self, cmakelists, "${CARES_LIBRARY}", "c-ares::cares") + if Version(self.version) < "8.10.0": + replace_in_file(self, cmakelists, "find_package(CARES REQUIRED)", "find_package(c-ares REQUIRED CONFIG)") + replace_in_file(self, cmakelists, "${CARES_LIBRARY}", "c-ares::cares") + else: + replace_in_file(self, cmakelists, "find_package(Cares REQUIRED)", "find_package(c-ares REQUIRED CONFIG)") + replace_in_file(self, cmakelists, "${CARES_LIBRARIES}", "c-ares::cares") # libpsl - replace_in_file(self, cmakelists, "find_package(LibPSL)", "find_package(libpsl REQUIRED CONFIG)") + if Version(self.version) < "8.10.0": + replace_in_file(self, cmakelists, "find_package(LibPSL)", "find_package(libpsl REQUIRED CONFIG)") + replace_in_file(self, cmakelists, "${LIBPSL_LIBRARY}", "libpsl::libpsl") + replace_in_file(self, cmakelists, "${LIBPSL_INCLUDE_DIR}", "${libpsl_INCLUDE_DIRS}") + else: + replace_in_file(self, cmakelists, "${LIBPSL_LIBRARIES}", "libpsl::libpsl") + replace_in_file(self, cmakelists, "${LIBPSL_INCLUDE_DIRS}", "${libpsl_INCLUDE_DIRS}") replace_in_file(self, cmakelists, "if(LIBPSL_FOUND)", "if(libpsl_FOUND)") - replace_in_file(self, cmakelists, "${LIBPSL_LIBRARY}", "libpsl::libpsl") - replace_in_file(self, cmakelists, "${LIBPSL_INCLUDE_DIR}", "${libpsl_INCLUDE_DIRS}") # libssh2 - replace_in_file(self, cmakelists, "find_package(LibSSH2)", "find_package(Libssh2 REQUIRED CONFIG)") + if Version(self.version) < "8.10.0": + replace_in_file(self, cmakelists, "find_package(LibSSH2)", "find_package(Libssh2 REQUIRED CONFIG)") + replace_in_file(self, cmakelists, "${LIBSSH2_LIBRARY}", "Libssh2::libssh2") + replace_in_file(self, cmakelists, "${LIBSSH2_INCLUDE_DIR}", "${Libssh2_INCLUDE_DIRS}") + else: + replace_in_file(self, cmakelists, "${LIBSSH2_LIBRARIES}", "Libssh2::libssh2") + replace_in_file(self, cmakelists, "${LIBSSH2_INCLUDE_DIRS}", "${Libssh2_INCLUDE_DIRS}") replace_in_file(self, cmakelists, "if(LIBSSH2_FOUND)", "if(Libssh2_FOUND)") - replace_in_file(self, cmakelists, "${LIBSSH2_LIBRARY}", "Libssh2::libssh2") - replace_in_file(self, cmakelists, "${LIBSSH2_INCLUDE_DIR}", "${Libssh2_INCLUDE_DIRS}") # libnghttp2 - replace_in_file(self, cmakelists, "find_package(NGHTTP2 REQUIRED)", "find_package(libnghttp2 REQUIRED CONFIG)") + if Version(self.version) < "8.10.0": + replace_in_file(self, cmakelists, "find_package(NGHTTP2 REQUIRED)", "find_package(libnghttp2 REQUIRED CONFIG)") + else: + replace_in_file(self, cmakelists, "find_package(NGHTTP2)", "find_package(libnghttp2 REQUIRED CONFIG)") replace_in_file(self, cmakelists, "${NGHTTP2_INCLUDE_DIRS}", "${libnghttp2_INCLUDE_DIRS}") replace_in_file(self, cmakelists, "${NGHTTP2_LIBRARIES}", "libnghttp2::nghttp2") # wolfssl replace_in_file(self, cmakelists, "find_package(WolfSSL REQUIRED)", "find_package(wolfssl REQUIRED CONFIG)") - replace_in_file(self, cmakelists, "${WolfSSL_LIBRARIES}", "${wolfssl_LIBRARIES}") - replace_in_file(self, cmakelists, "${WolfSSL_INCLUDE_DIRS}", "${wolfssl_INCLUDE_DIRS}") + if Version(self.version) < "8.10.0": + replace_in_file(self, cmakelists, "${WolfSSL_LIBRARIES}", "${wolfssl_LIBRARIES}") + replace_in_file(self, cmakelists, "${WolfSSL_INCLUDE_DIRS}", "${wolfssl_INCLUDE_DIRS}") + else: + replace_in_file(self, cmakelists, "${WOLFSSL_LIBRARIES}", "${wolfssl_LIBRARIES}") + replace_in_file(self, cmakelists, "${WOLFSSL_INCLUDE_DIRS}", "${wolfssl_INCLUDE_DIRS}") # INTERFACE_LIBRARY (generated by the cmake_find_package generator) targets doesn't have the LOCATION property. # So skipp the LOCATION check in the CMakeLists.txt diff --git a/recipes/libcurl/config.yml b/recipes/libcurl/config.yml index 74fce7bdf4ef1..32555d9791ca0 100644 --- a/recipes/libcurl/config.yml +++ b/recipes/libcurl/config.yml @@ -1,4 +1,8 @@ versions: + "8.10.0": + folder: all + "8.9.1": + folder: all "8.8.0": folder: all "8.6.0": diff --git a/recipes/libcvd/all/conanfile.py b/recipes/libcvd/all/conanfile.py index a272a22ebfe97..da62d0fad1d30 100644 --- a/recipes/libcvd/all/conanfile.py +++ b/recipes/libcvd/all/conanfile.py @@ -71,13 +71,15 @@ def layout(self): def requirements(self): # https://github.com/edrosten/libcvd/blob/main/cmake/CVDFindAllDeps.cmake + # Used in a public header https://github.com/edrosten/libcvd/blob/RELEASE_2_5_0/cvd/canny.h#L4 + self.requires("toon/3.2", transitive_headers=True, transitive_libs=True) if self.options.with_ffmpeg: # FFMPEG v5.x+ are not supported self.requires("ffmpeg/4.4.4", transitive_libs=True) if self.options.with_libdc1394: - self.requires("libdc1394/2.2.7") # FIXME: libidc1394 seems to be missing raw1394 dependency # test_package fails with "undefined reference to `raw1394_new_handle'" etc + self.requires("libdc1394/2.2.7") if self.options.with_libjpeg == "libjpeg-turbo": self.requires("libjpeg-turbo/3.0.2") elif self.options.with_libjpeg == "libjpeg": @@ -90,14 +92,7 @@ def requirements(self): self.requires("libtiff/4.6.0") if self.options.get_safe("with_opengl", True): # https://github.com/edrosten/libcvd/blob/RELEASE_2_5_0/cvd/videodisplay.h#L18-L20 - if self.settings.os in ["Linux", "FreeBSD"]: - self.requires("libglvnd/1.7.0", transitive_headers=True, transitive_libs=True) - self.requires("xorg/system", transitive_headers=True, transitive_libs=True) - else: - self.requires("opengl/system", transitive_headers=True, transitive_libs=True) - # TODO: https://github.com/ankurhanda/TooN - # https://github.com/edrosten/libcvd/blob/RELEASE_2_5_0/cvd/canny.h#L4 - # self.requires("toon/3.1.1", transitive_headers=True, transitive_libs=True) + self.requires("opengl/system", transitive_headers=True, transitive_libs=True) def validate(self): if self.settings.compiler.cppstd: @@ -123,7 +118,6 @@ def generate(self): tc.variables["CMAKE_DISABLE_FIND_PACKAGE_TIFF"] = not self.options.with_libtiff tc.variables["CMAKE_DISABLE_FIND_PACKAGE_OpenGL"] = not self.options.get_safe("with_opengl", True) tc.variables["CMAKE_DISABLE_FIND_PACKAGE_X11"] = not self.options.get_safe("with_opengl", True) - tc.variables["CMAKE_DISABLE_FIND_PACKAGE_TooN"] = True tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() diff --git a/recipes/libdatrie/all/conandata.yml b/recipes/libdatrie/all/conandata.yml new file mode 100644 index 0000000000000..96b260a1cc4e3 --- /dev/null +++ b/recipes/libdatrie/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "0.2.13": + url: "https://linux.thai.net/pub/ThaiLinux/software/libthai/libdatrie-0.2.13.tar.xz" + sha256: "12231bb2be2581a7f0fb9904092d24b0ed2a271a16835071ed97bed65267f4be" +patches: + "0.2.13": + - patch_file: "patches/fix-exports.patch" + patch_type: "portability" + patch_description: "Fix .def exports for Windows" diff --git a/recipes/libdatrie/all/conanfile.py b/recipes/libdatrie/all/conanfile.py new file mode 100644 index 0000000000000..7ec417808f17c --- /dev/null +++ b/recipes/libdatrie/all/conanfile.py @@ -0,0 +1,138 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os +from conan.tools.build import cross_building +from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir, save, rename +from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, unix_path + +required_conan_version = ">=1.54.0" + + +class LibdatrieConan(ConanFile): + name = "libdatrie" + description = "Implementation of double-array structure for representing tries" + license = "LGPL-2.1-or-later" + homepage = "https://linux.thai.net/projects/datrie" + url = "https://github.com/conan-io/conan-center-index" + topics = ("trie", "double-array-trie", "datrie") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "tools": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "tools": False, + } + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def export_sources(self): + export_conandata_patches(self) + + def requirements(self): + self.requires("libiconv/1.17") + + def validate(self): + if is_apple_os(self) and self.options.shared: + # Fails due to build script bugs + raise ConanInvalidConfiguration("shared builds on Apple OS-s are not supported. Contributions are welcome!") + + def build_requirements(self): + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if is_msvc(self): + self.tool_requires("automake/1.16.5") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + + tc = AutotoolsToolchain(self) + tc.configure_args.extend([ + "--disable-doxygen-doc", + ]) + if is_msvc(self): + tc.extra_cflags.append("-FS") + tc.extra_cxxflags.append("-FS") + tc.generate() + + if is_msvc(self): + env = Environment() + iconv_info = self.dependencies["libiconv"].cpp_info + env.append("CPPFLAGS", [f"-I{unix_path(self, iconv_info.includedir)}"] + [f"-D{d}" for d in iconv_info.defines]) + env.append("_LINK_", [lib if lib.endswith(".lib") else f"{lib}.lib" for lib in iconv_info.libs]) + env.append("LDFLAGS", [f"-L{unix_path(self, iconv_info.libdir)}"]) + env.vars(self).save_script("conanautotoolsdeps_cl_workaround") + else: + tc = AutotoolsDeps(self) + tc.generate() + + if is_msvc(self): + env = Environment() + automake_conf = self.dependencies.build["automake"].conf_info + compile_wrapper = unix_path(self, automake_conf.get("user.automake:compile-wrapper", check_type=str)) + ar_wrapper = unix_path(self, automake_conf.get("user.automake:lib-wrapper", check_type=str)) + env.define("CC", f"{compile_wrapper} cl -nologo") + env.define("LD", "link -nologo") + env.define("AR", f"{ar_wrapper} lib") + env.vars(self).save_script("conanbuild_msvc") + + def build(self): + apply_conandata_patches(self) + autotools = Autotools(self) + autotools.configure() + if not self.options.tools: + save(self, os.path.join(self.build_folder, "tools", "Makefile"), "all:\n\t\ninstall:\n\t\n") + # Unnecessary and breaks MSVC build + save(self, os.path.join(self.build_folder, "man", "Makefile"), "all:\n\t\ninstall:\n\t\n") + autotools.make() + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install() + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + fix_apple_shared_install_name(self) + if is_msvc(self) and self.options.shared: + rename(self, os.path.join(self.package_folder, "lib", "datrie.dll.lib"), + os.path.join(self.package_folder, "lib", "datrie.lib")) + + def package_info(self): + self.cpp_info.set_property("pkg_config_name", "datrie-0.2") + self.cpp_info.libs = ["datrie"] diff --git a/recipes/libdatrie/all/patches/fix-exports.patch b/recipes/libdatrie/all/patches/fix-exports.patch new file mode 100644 index 0000000000000..70886973e7745 --- /dev/null +++ b/recipes/libdatrie/all/patches/fix-exports.patch @@ -0,0 +1,7 @@ +--- datrie/libdatrie.def ++++ datrie/libdatrie.def +@@ -1,3 +1,4 @@ ++EXPORTS + alpha_map_new + alpha_map_clone + alpha_map_free diff --git a/recipes/libdatrie/all/test_package/CMakeLists.txt b/recipes/libdatrie/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..baf1d9bc4e755 --- /dev/null +++ b/recipes/libdatrie/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(libdatrie REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE libdatrie::libdatrie) +target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) diff --git a/recipes/libdatrie/all/test_package/conanfile.py b/recipes/libdatrie/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/libdatrie/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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 = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + 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): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libdatrie/all/test_package/test_package.c b/recipes/libdatrie/all/test_package/test_package.c new file mode 100644 index 0000000000000..683c115b1b56f --- /dev/null +++ b/recipes/libdatrie/all/test_package/test_package.c @@ -0,0 +1,15 @@ +#include + +int main(void) { + AlphaMap *en_map = alpha_map_new(); + if (!en_map) + return 1; + if (alpha_map_add_range(en_map, 0x0061, 0x007a) != 0) + return 1; + Trie *test_trie = trie_new(en_map); + if (!test_trie) + return 1; + trie_free(test_trie); + alpha_map_free(en_map); + return 0; +} diff --git a/recipes/libdatrie/config.yml b/recipes/libdatrie/config.yml new file mode 100644 index 0000000000000..58b2f36b9fab3 --- /dev/null +++ b/recipes/libdatrie/config.yml @@ -0,0 +1,3 @@ +versions: + "0.2.13": + folder: all diff --git a/recipes/libdeflate/all/conandata.yml b/recipes/libdeflate/all/conandata.yml index 96cfe2bce2928..21a642dd647d6 100644 --- a/recipes/libdeflate/all/conandata.yml +++ b/recipes/libdeflate/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.21": + url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.21.tar.gz" + sha256: "50827d312c0413fbd41b0628590cd54d9ad7ebf88360cba7c0e70027942dbd01" "1.20": url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.20.tar.gz" sha256: "ed1454166ced78913ff3809870a4005b7170a6fd30767dc478a09b96847b9c2a" diff --git a/recipes/libdeflate/config.yml b/recipes/libdeflate/config.yml index 1214fb379a2c9..6cfddb7e0e6f2 100644 --- a/recipes/libdeflate/config.yml +++ b/recipes/libdeflate/config.yml @@ -1,4 +1,6 @@ versions: + "1.21": + folder: "all" "1.20": folder: "all" "1.19": diff --git a/recipes/libdivide/all/conandata.yml b/recipes/libdivide/all/conandata.yml index 6b1811615bec8..1cbb0260b35e7 100644 --- a/recipes/libdivide/all/conandata.yml +++ b/recipes/libdivide/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.1": + url: "https://github.com/ridiculousfish/libdivide/archive/refs/tags/v5.1.tar.gz" + sha256: "fec2e4141878c58eb92cfcd478accc3b7f34b39491c1e638566f083d378cc7d4" "5.0": url: "https://github.com/ridiculousfish/libdivide/archive/refs/tags/5.0.tar.gz" sha256: "01ffdf90bc475e42170741d381eb9cfb631d9d7ddac7337368bcd80df8c98356" diff --git a/recipes/libdivide/config.yml b/recipes/libdivide/config.yml index c374cc0645132..042bc67b62f0b 100644 --- a/recipes/libdivide/config.yml +++ b/recipes/libdivide/config.yml @@ -1,4 +1,6 @@ versions: + "5.1": + folder: all "5.0": folder: all "3.0": diff --git a/recipes/libdwarf/all/conandata.yml b/recipes/libdwarf/all/conandata.yml index 1a5e4c96d2caf..bdb4e53c187f7 100644 --- a/recipes/libdwarf/all/conandata.yml +++ b/recipes/libdwarf/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "0.11.0": + url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.11.0.tar.gz" + sha256: "5135af38dc202206538a3dcdc90675aa8b320e132156849c6855dea5ea0c0729" + "0.10.1": + url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.10.1.tar.gz" + sha256: "4ab8ae7b4b7aa42453725054b348f4fdb2460d5ba644199a1305311c718ff416" + "0.9.2": + url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.9.2.tar.gz" + sha256: "5371c68248c16a4a9cb071284c87c0cdb8f560d5277e0b86893fdc6576062f95" "0.9.1": url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.9.1.tar.gz" sha256: "6da3f46a9f92b4e284c97c733851879d9b91b16642bede90c7614860a946824e" @@ -15,6 +24,18 @@ sources: url: "https://www.prevanders.net/libdwarf-0.5.0.tar.xz" sha256: "11fa822c60317fa00e1a01a2ac9e8388f6693e8662ab72d352c5f50c7e0112a9" patches: + "0.11.0": + - patch_file: "patches/0.10.1-0001-fixes.patch" + patch_description: "fix DW_API definition and cmake" + patch_type: "portability" + "0.10.1": + - patch_file: "patches/0.10.1-0001-fixes.patch" + patch_description: "fix DW_API definition and cmake" + patch_type: "portability" + "0.9.2": + - patch_file: "patches/0.9.2-0001-fixes.patch" + patch_description: "fix DW_API definition and cmake" + patch_type: "portability" "0.9.1": - patch_file: "patches/0.9.1-0001-fixes.patch" patch_description: "fix DW_API definition and cmake" diff --git a/recipes/libdwarf/all/patches/0.10.1-0001-fixes.patch b/recipes/libdwarf/all/patches/0.10.1-0001-fixes.patch new file mode 100644 index 0000000000000..8b49c6af7451b --- /dev/null +++ b/recipes/libdwarf/all/patches/0.10.1-0001-fixes.patch @@ -0,0 +1,65 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f219f078..d8a78136 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -226,6 +226,12 @@ if (ENABLE_DECOMPRESSION) + set(HAVE_ZSTD_H TRUE) + set(BUILT_WITH_ZLIB_AND_ZSTD TRUE) + endif() ++ find_package(zstd CONFIG REQUIRED) ++ if(TARGET zstd::libzstd_shared) ++ set(ZSTD_LIB zstd::libzstd_shared) ++ else() ++ set(ZSTD_LIB zstd::libzstd_static) ++ endif() + endif () + + message(STATUS "CMAKE_SIZEOF_VOID_P ... " ${CMAKE_SIZEOF_VOID_P} ) +diff --git a/src/lib/libdwarf/CMakeLists.txt b/src/lib/libdwarf/CMakeLists.txt +index 02787555..862c97b8 100644 +--- a/src/lib/libdwarf/CMakeLists.txt ++++ b/src/lib/libdwarf/CMakeLists.txt +@@ -117,7 +117,7 @@ install(TARGETS dwarf + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ) + +-configure_file(libdwarf.pc.in libdwarf.pc @ONLY) ++# configure_file(libdwarf.pc.in libdwarf.pc @ONLY) + + # The install has to be here, not in + # another CMakeLists.txt to make install work properly +@@ -135,5 +135,5 @@ install(EXPORT libdwarfTargets + FILE libdwarf-targets.cmake + NAMESPACE libdwarf:: + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") +-install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++# install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + install(FILES "${PROJECT_SOURCE_DIR}/cmake/Findzstd.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") +index 380d2ef7..8c62ee7e 100644 +--- a/src/lib/libdwarf/libdwarf.h ++++ b/src/lib/libdwarf/libdwarf.h +@@ -51,7 +51,7 @@ + #endif /* DW_API */ + + #ifndef LIBDWARF_STATIC +-# if defined(_WIN32) || defined(__CYGWIN__) ++# if defined(LIBDWARF_SHARED) && (defined(_WIN32) || defined(__CYGWIN__)) + # ifdef LIBDWARF_BUILD + # define DW_API __declspec(dllexport) + # else /* !LIBDWARF_BUILD */ +diff --git a/src/lib/libdwarf/libdwarf_private.h b/src/lib/libdwarf/libdwarf_private.h +index b37ae994..7fa89256 100644 +--- a/src/lib/libdwarf/libdwarf_private.h ++++ b/src/lib/libdwarf/libdwarf_private.h +@@ -26,11 +26,7 @@ + #ifdef _MSC_VER /* Macro to select VS compiler */ + #include + typedef SSIZE_T ssize_t; +-#ifdef _WIN64 +-typedef long long off_t; +-#else + typedef long off_t; +-#endif + #endif /* _MSC_VER */ + + #ifndef TRUE diff --git a/recipes/libdwarf/all/patches/0.9.2-0001-fixes.patch b/recipes/libdwarf/all/patches/0.9.2-0001-fixes.patch new file mode 100644 index 0000000000000..937423ef0cfb3 --- /dev/null +++ b/recipes/libdwarf/all/patches/0.9.2-0001-fixes.patch @@ -0,0 +1,66 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f219f078..d8a78136 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -225,6 +225,12 @@ if (ENABLE_DECOMPRESSION) + set(HAVE_ZSTD_H TRUE) + set(BUILT_WITH_ZLIB_AND_ZSTD TRUE) + endif() ++ find_package(zstd CONFIG REQUIRED) ++ if(TARGET zstd::libzstd_shared) ++ set(ZSTD_LIB zstd::libzstd_shared) ++ else() ++ set(ZSTD_LIB zstd::libzstd_static) ++ endif() + endif () + + message(STATUS "CMAKE_SIZEOF_VOID_P ... " ${CMAKE_SIZEOF_VOID_P} ) +diff --git a/src/lib/libdwarf/CMakeLists.txt b/src/lib/libdwarf/CMakeLists.txt +index 6cb0b24e..069343ba 100644 +--- a/src/lib/libdwarf/CMakeLists.txt ++++ b/src/lib/libdwarf/CMakeLists.txt +@@ -117,7 +117,7 @@ install(TARGETS dwarf + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ) + +-configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY) ++# configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY) + + # The install has to be here, not in + # another CMakeLists.txt to make install work properly +@@ -135,5 +135,5 @@ install(EXPORT libdwarfTargets + FILE libdwarf-targets.cmake + NAMESPACE libdwarf:: + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") +-install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++# install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + install(FILES "${PROJECT_SOURCE_DIR}/cmake/Findzstd.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") +diff --git a/src/lib/libdwarf/libdwarf.h b/src/lib/libdwarf/libdwarf.h +index 380d2ef7..8c62ee7e 100644 +--- a/src/lib/libdwarf/libdwarf.h ++++ b/src/lib/libdwarf/libdwarf.h +@@ -51,7 +51,7 @@ + #endif /* DW_API */ + + #ifndef LIBDWARF_STATIC +-# if defined(_WIN32) || defined(__CYGWIN__) ++# if defined(LIBDWARF_SHARED) && (defined(_WIN32) || defined(__CYGWIN__)) + # ifdef LIBDWARF_BUILD + # define DW_API __declspec(dllexport) + # else /* !LIBDWARF_BUILD */ +diff --git a/src/lib/libdwarf/libdwarf_private.h b/src/lib/libdwarf/libdwarf_private.h +index b37ae994..7fa89256 100644 +--- a/src/lib/libdwarf/libdwarf_private.h ++++ b/src/lib/libdwarf/libdwarf_private.h +@@ -26,11 +26,7 @@ + #ifdef _MSC_VER /* Macro to select VS compiler */ + #include + typedef SSIZE_T ssize_t; +-#ifdef _WIN64 +-typedef long long off_t; +-#else + typedef long off_t; +-#endif + #endif /* _MSC_VER */ + + #ifndef TRUE diff --git a/recipes/libdwarf/config.yml b/recipes/libdwarf/config.yml index b5a49fc99b335..fcb658d2d4a9c 100644 --- a/recipes/libdwarf/config.yml +++ b/recipes/libdwarf/config.yml @@ -1,4 +1,10 @@ versions: + "0.11.0": + folder: all + "0.10.1": + folder: all + "0.9.2": + folder: all "0.9.1": folder: all "0.9.0": diff --git a/recipes/libfabric/all/conandata.yml b/recipes/libfabric/all/conandata.yml index 1eedb4da16c00..1488ae656448e 100644 --- a/recipes/libfabric/all/conandata.yml +++ b/recipes/libfabric/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "1.12.1": - url: https://github.com/ofiwg/libfabric/releases/download/v1.12.1/libfabric-1.12.1.tar.bz2 - sha256: db3c8e0a495e6e9da6a7436adab905468aedfbd4579ee3da5232a5c111ba642c + "1.21.0": + url: "https://github.com/ofiwg/libfabric/releases/download/v1.21.0/libfabric-1.21.0.tar.bz2" + sha256: "0c1b7b830d9147f661e5d7f359250b85b5a9885c330464cd3b5e5d35b86551c7" diff --git a/recipes/libfabric/all/conanfile.py b/recipes/libfabric/all/conanfile.py index 96dbea392e3a6..9d5b8417f1cbd 100644 --- a/recipes/libfabric/all/conanfile.py +++ b/recipes/libfabric/all/conanfile.py @@ -1,99 +1,195 @@ -from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.35.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" + class LibfabricConan(ConanFile): name = "libfabric" - description = "Open Fabric Interfaces" - topics = ("fabric", "communication", "framework", "service") + description = ("Libfabric, also known as Open Fabrics Interfaces (OFI), " + "defines a communication API for high-performance parallel and distributed applications.") + license = ("BSD-2-Clause", "GPL-2.0-or-later") url = "https://github.com/conan-io/conan-center-index" homepage = "http://libfabric.org" - license = "BSD-2-Clause", "GPL-2.0-or-later" + topics = ("fabric", "communication", "framework", "service") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" - _providers = ['gni', 'psm', 'psm2', 'psm3', 'rxm', 'sockets', 'tcp', 'udp', 'usnic', 'verbs', 'bgq'] + _providers = [ + "dmabuf_peer_mem", + "efa", + "hook_debug", + "hook_hmem", + "mrail", + "perf", + "profile", + "rxd", + "rxm", + "shm", + "sm2", + "sockets", + "tcp", + "trace", + "ucx", + "udp", + "usnic", + "verbs", + ] options = { - **{ p: "ANY" for p in _providers }, - **{ - "shared": [True, False], - "fPIC": [True, False], - "with_libnl": "ANY", - "with_bgq_progress": [None, "auto", "manual"], - "with_bgq_mr": [None, "basic", "scalable"] - } + "shared": [True, False], + "fPIC": [True, False], + **{ p: [None, "ANY"] for p in _providers }, } default_options = { - **{ p: "auto" for p in _providers }, - **{ - "shared": False, - "fPIC": True, - "with_libnl": None, - "with_bgq_progress": None, - "with_bgq_mr": None - } + "shared": False, + "fPIC": True, + "dmabuf_peer_mem": "yes", + "efa": "yes", + "hook_debug": "yes", + "hook_hmem": "yes", + "mrail": "yes", + "perf": "no", + "profile": "yes", + "rxd": "yes", + "rxm": "yes", + "shm": "yes", + "sm2": "yes", + "sockets": "yes", + "tcp": "yes", + "trace": "yes", + "ucx": "no", + "udp": "yes", + "usnic": "no", + "verbs": "yes" } - @property - def _source_subfolder(self): - return "source_subfolder" - - _autotools = None - def config_options(self): - if self.settings.os == 'Windows': - del self.options.fPIC + if is_apple_os(self): + # Requires libnl, which is not available on macOS + del self.options.usnic + # Require Linux-specific process_vm_readv syscall + del self.options.shm + del self.options.sm2 + # rdma-core is not available on macOS + del self.options.efa + del self.options.verbs def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def _is_enabled(self, opt): + return str(self.options.get_safe(opt)) == "yes" or str(self.options.get_safe(opt)).startswith("dl") + + def requirements(self): + if self._is_enabled("usnic"): + self.requires("libnl/3.8.0") + if self._is_enabled("efa") or self._is_enabled("usnic") or self._is_enabled("verbs"): + self.requires("rdma-core/52.0") + + def layout(self): + basic_layout(self, src_folder="src") def validate(self): - if self.settings.os not in ["Linux", "FreeBSD", "Macos"]: - raise ConanInvalidConfiguration("libfabric only builds on Linux, Macos, and FreeBSD.") - for p in self._providers: - if self.options.get_safe(p) not in ["auto", "yes", "no", "dl"] and not os.path.isdir(str(self.options.get_safe(p))): - raise ConanInvalidConfiguration("Option {} can only be one of 'auto', 'yes', 'no', 'dl' or a directory path") - if self.options.get_safe('with_libnl') and not os.path.isdir(str(self.options.with_libnl)): - raise ConanInvalidConfiguration("Value of with_libnl must be an existing directory") + if self.settings.os == "Windows": + # FIXME: libfabric provides msbuild project files. + raise ConanInvalidConfiguration(f"{self.ref} Conan recipes is not supported on Windows. Contributions are welcome.") + + for provider in self._providers: + provider = str(self.options.get_safe(provider)) + if provider.lower() not in ["yes", "no", "dl", "none"] and \ + not os.path.isdir(provider) and \ + (not provider.startswith("dl:") and not os.path.isdir(provider[3:])): + raise ConanInvalidConfiguration(f"{self.ref} provider option '{provider}' is not valid. It must be 'yes', 'no', 'dl', 'dl:' or a directory path.") + + if self._is_enabled("verbs"): + if not self.dependencies["rdma-core"].options.build_librdmacm: + raise ConanInvalidConfiguration(f"{self.ref} '-o rdma-core/*:build_librdmacm=True' is required when '-o &:verbs=True'") + + def build_requirements(self): + # Used in ./configure tests and build + self.tool_requires("libtool/2.4.7") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self) - args = [] + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) for p in self._providers: - args.append('--enable-{}={}'.format(p, self.options.get_safe(p))) - if self.options.with_libnl: - args.append('--with-libnl={}'.format(self.options.with_libnl)) - if self.options.with_bgq_progress: - args.append('--with-bgq-progress={}'.format(self.options.with_bgq_progress)) - if self.options.with_bgq_mr: - args.append('--with-bgq-mr={}'.format(self.options.with_bgq_mr)) - self._autotools.configure(args=args, configure_dir=self._source_subfolder) - return self._autotools + if p == "verbs" and self.options.get_safe(p, "no") != "no": + path = self.dependencies["rdma-core"].package_folder + if self.options.get_safe("verbs") == "dl": + tc.configure_args.append(f"--enable-verbs=dl:{path}") + else: + tc.configure_args.append(f"--enable-verbs={path}") + else: + tc.configure_args.append(f"--enable-{p}={self.options.get_safe(p, 'no')}") + if self.settings.build_type == "Debug": + tc.configure_args.append("--enable-debug") + tc.configure_args.append(f"--with-bgq-progress=no") + tc.configure_args.append(f"--with-bgq-mr=no") + tc.configure_args.append("--with-cassin-headers=no") + tc.configure_args.append("--with-cuda=no") # TODO + tc.configure_args.append("--with-curl=no") # TODO + tc.configure_args.append("--with-cxi-uapi-headers=no") + tc.configure_args.append("--with-dsa=no") + tc.configure_args.append("--with-gdrcopy=no") + tc.configure_args.append("--with-json-c=no") # TODO + if self._is_enabled("usnic"): + tc.configure_args.append(f"--with-libnl={self.dependencies['libnl'].package_folder}") + else: + tc.configure_args.append("--with-libnl=no") + tc.configure_args.append("--with-lttng=no") + tc.configure_args.append("--with-neuron=no") + tc.configure_args.append(f"--with-numa=no") + tc.configure_args.append("--with-psm2-src=no") + tc.configure_args.append("--with-psm3-rv=no") + tc.configure_args.append("--with-rocr=no") + tc.configure_args.append("--with-synapseai=no") + tc.configure_args.append("--with-uring=no") # TODO + tc.configure_args.append("--with-ze=no") + tc.configure_args.append("-enable-psm=no") + tc.configure_args.append("--enable-psm2=no") + tc.configure_args.append("--enable-psm3=no") + tc.configure_args.append("--enable-xpmem=no") + tc.configure_args.append("--enable-cxi=no") + tc.configure_args.append("--enable-opx=no") + tc.configure_args.append("--enable-bgq=no") + tc.generate() + + deps = AutotoolsDeps(self) + deps.generate() + + VirtualBuildEnv(self).generate() + VirtualRunEnv(self).generate(scope="build") def build(self): - autotools = self._configure_autotools() + autotools = Autotools(self) + autotools.configure() autotools.make() def package(self): - self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) - autotools = self._configure_autotools() + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + autotools = Autotools(self) autotools.install() - - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rm(self, "*.la", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.names["pkg_config"] = "libfabric" - self.cpp_info.libs = self.collect_libs() + self.cpp_info.set_property("pkg_config_name", "libfabric") + self.cpp_info.libs = ["fabric"] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs = ["pthread", "m"] + self.cpp_info.system_libs = ["pthread", "m", "rt", "dl"] + if self.settings.compiler in ["gcc", "clang"]: + self.cpp_info.system_libs.append("atomic") diff --git a/recipes/libfabric/all/test_package/CMakeLists.txt b/recipes/libfabric/all/test_package/CMakeLists.txt index 196188113685c..09b7943e0c2de 100644 --- a/recipes/libfabric/all/test_package/CMakeLists.txt +++ b/recipes/libfabric/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(libfabric REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE libfabric::libfabric) diff --git a/recipes/libfabric/all/test_package/conanfile.py b/recipes/libfabric/all/test_package/conanfile.py index bd7165a553cf4..ef5d7042163ec 100644 --- a/recipes/libfabric/all/test_package/conanfile.py +++ b/recipes/libfabric/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -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", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libfabric/all/test_v1_package/CMakeLists.txt b/recipes/libfabric/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libfabric/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/box2d/all/test_v1_package/conanfile.py b/recipes/libfabric/all/test_v1_package/conanfile.py similarity index 81% rename from recipes/box2d/all/test_v1_package/conanfile.py rename to recipes/libfabric/all/test_v1_package/conanfile.py index 133228fb54665..7e2dfe859bb27 100644 --- a/recipes/box2d/all/test_v1_package/conanfile.py +++ b/recipes/libfabric/all/test_v1_package/conanfile.py @@ -1,10 +1,10 @@ -import os from conans import ConanFile, CMake, tools +import os -class Box2DTestConan(ConanFile): +class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + generators = "cmake", "cmake_find_package_multi" def build(self): cmake = CMake(self) diff --git a/recipes/libfabric/config.yml b/recipes/libfabric/config.yml index daa3a213a56fa..09d8df06c28ff 100644 --- a/recipes/libfabric/config.yml +++ b/recipes/libfabric/config.yml @@ -1,3 +1,3 @@ versions: - "1.12.1": + "1.21.0": folder: all diff --git a/recipes/libfdk_aac/all/conanfile.py b/recipes/libfdk_aac/all/conanfile.py index ea032fb6c5ddd..63fd8a8038b15 100644 --- a/recipes/libfdk_aac/all/conanfile.py +++ b/recipes/libfdk_aac/all/conanfile.py @@ -6,7 +6,9 @@ from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc, NMakeToolchain +from conan.tools.build import cross_building from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.55.0" @@ -46,6 +48,12 @@ def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + def validate_build(self): + if cross_building(self) and self.settings.os == "Android": + # https://github.com/mstorsjo/fdk-aac/issues/124#issuecomment-653473956 + # INFO: It's possible to inject a log.h to fix the error, but there is no official support. + raise ConanInvalidConfiguration(f"{self.ref} cross-building for Android is not supported. Please, try native build.") + def layout(self): if self._use_cmake: cmake_layout(self, src_folder="src") diff --git a/recipes/libftp/all/conandata.yml b/recipes/libftp/all/conandata.yml index fa57f13e90da7..b6a96e96b90f5 100644 --- a/recipes/libftp/all/conandata.yml +++ b/recipes/libftp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/deniskovalchuk/libftp/archive/refs/tags/v1.1.0.tar.gz" + sha256: "8d9ff413436b17eef225c4b12539965cdea786d02bb2c688b153992d36f88f48" "0.5.1": url: "https://github.com/deniskovalchuk/libftp/archive/refs/tags/v0.5.1.tar.gz" sha256: "6cc6e80b50ba425b66175d3b0d22358db4ebeb4941edc33bba47d72442de5645" diff --git a/recipes/libftp/config.yml b/recipes/libftp/config.yml index 0c42204d47369..fe91f9493569b 100644 --- a/recipes/libftp/config.yml +++ b/recipes/libftp/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "0.5.1": folder: all "0.5.0": diff --git a/recipes/libheif/all/conandata.yml b/recipes/libheif/all/conandata.yml index e7a2fc9ba8c25..bd315fb8684b3 100644 --- a/recipes/libheif/all/conandata.yml +++ b/recipes/libheif/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.18.2": + url: "https://github.com/strukturag/libheif/releases/download/v1.18.2/libheif-1.18.2.tar.gz" + sha256: "c4002a622bec9f519f29d84bfdc6024e33fd67953a5fb4dc2c2f11f67d5e45bf" + "1.18.1": + url: "https://github.com/strukturag/libheif/releases/download/v1.18.1/libheif-1.18.1.tar.gz" + sha256: "8702564b0f288707ea72b260b3bf4ba9bf7abfa7dac01353def3a86acd6bbb76" "1.16.2": url: "https://github.com/strukturag/libheif/releases/download/v1.16.2/libheif-1.16.2.tar.gz" sha256: "7f97e4205c0bd9f9b8560536c8bd2e841d1c9a6d610401eb3eb87ed9cdfe78ea" @@ -15,6 +21,8 @@ sources: url: "https://github.com/strukturag/libheif/releases/download/v1.9.1/libheif-1.9.1.tar.gz" sha256: "5f65ca2bd2510eed4e13bdca123131c64067e9dd809213d7aef4dc5e37948bca" patches: + "1.18.1": + - patch_file: "patches/0001-cmake_1.18.1.patch" "1.16.2": - patch_file: "patches/0001-cmake_1.16.2.patch" - patch_file: "patches/0002-plugins_cmake_1.16.2.patch" diff --git a/recipes/libheif/all/conanfile.py b/recipes/libheif/all/conanfile.py index 912d662dba19e..c13632c993b86 100644 --- a/recipes/libheif/all/conanfile.py +++ b/recipes/libheif/all/conanfile.py @@ -2,6 +2,8 @@ from conan.tools.build import check_min_cppstd, stdcpp_library 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.scm import Version +from conan.tools.env import VirtualBuildEnv import os required_conan_version = ">=1.54.0" @@ -10,11 +12,10 @@ class LibheifConan(ConanFile): name = "libheif" description = "libheif is an HEIF and AVIF file format decoder and encoder." - topics = ("heif", "codec", "video") + license = ("LGPL-3.0-only", "GPL-3.0-or-later", "MIT") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/strukturag/libheif" - license = ("LGPL-3.0-only", "GPL-3.0-or-later", "MIT") - + topics = ("heif", "codec", "video") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -24,6 +25,8 @@ class LibheifConan(ConanFile): "with_x265": [True, False], "with_libaomav1": [True, False], "with_dav1d": [True, False], + "with_jpeg": [True, False], + "with_openjpeg": [True, False], } default_options = { "shared": False, @@ -32,6 +35,8 @@ class LibheifConan(ConanFile): "with_x265": False, "with_libaomav1": False, "with_dav1d": False, + "with_jpeg": False, + "with_openjpeg": False, } def export_sources(self): @@ -40,6 +45,9 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "1.17.0": + del self.options.with_jpeg + del self.options.with_openjpeg def configure(self): if self.options.shared: @@ -57,26 +65,47 @@ def requirements(self): self.requires("libaom-av1/3.6.1") if self.options.with_dav1d: self.requires("dav1d/1.2.1") + if self.options.get_safe("with_jpeg"): + self.requires("libjpeg/9f") + if self.options.get_safe("with_openjpeg"): + self.requires("openjpeg/2.5.2") def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) + def build_requirements(self): + if Version(self.version) >= "1.18.0": + self.tool_requires("cmake/[>=3.16 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) + tc.variables["WITH_LIBSHARPYUV"] = False tc.variables["WITH_LIBDE265"] = self.options.with_libde265 tc.variables["WITH_X265"] = self.options.with_x265 tc.variables["WITH_AOM"] = self.options.with_libaomav1 + tc.variables["WITH_AOM_DECODER"] = self.options.with_libaomav1 + tc.variables["WITH_AOM_ENCODER"] = self.options.with_libaomav1 tc.variables["WITH_RAV1E"] = False tc.variables["WITH_DAV1D"] = self.options.with_dav1d tc.variables["WITH_EXAMPLES"] = False tc.variables["WITH_GDK_PIXBUF"] = False + tc.variables["BUILD_TESTING"] = False + tc.variables["WITH_JPEG_DECODER"] = self.options.get_safe("with_jpeg", False) + tc.variables["WITH_JPEG_ENCODER"] = self.options.get_safe("with_jpeg", False) + tc.variables["WITH_OpenJPEG_DECODER"] = self.options.get_safe("with_openjpeg", False) + tc.variables["WITH_OpenJPEG_ENCODER"] = self.options.get_safe("with_openjpeg", False) tc.generate() deps = CMakeDeps(self) + if Version(self.version) >= "1.18.0": + deps.set_property("libde265", "cmake_file_name", "LIBDE265") deps.generate() + if Version(self.version) >= "1.18.0": + venv = VirtualBuildEnv(self) + venv.generate(scope="build") def build(self): apply_conandata_patches(self) @@ -101,6 +130,8 @@ def package_info(self): self.cpp_info.components["heif"].defines = ["LIBHEIF_STATIC_BUILD"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["heif"].system_libs.extend(["m", "pthread"]) + if Version(self.version) >= "1.18.0": + self.cpp_info.components["heif"].system_libs.append("dl") if not self.options.shared: libcxx = stdcpp_library(self) if libcxx: @@ -118,3 +149,7 @@ def package_info(self): self.cpp_info.components["heif"].requires.append("libaom-av1::libaom-av1") if self.options.with_dav1d: self.cpp_info.components["heif"].requires.append("dav1d::dav1d") + if self.options.get_safe("with_jpeg"): + self.cpp_info.components["heif"].requires.append("libjpeg::libjpeg") + if self.options.get_safe("with_openjpeg"): + self.cpp_info.components["heif"].requires.append("openjpeg::openjpeg") diff --git a/recipes/libheif/all/patches/0001-cmake_1.18.1.patch b/recipes/libheif/all/patches/0001-cmake_1.18.1.patch new file mode 100644 index 0000000000000..271d7b71513e3 --- /dev/null +++ b/recipes/libheif/all/patches/0001-cmake_1.18.1.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 12c4039..2ea1805 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -47,7 +47,7 @@ set(CMAKE_CXX_EXTENSIONS OFF) + + set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) + +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++# set(CMAKE_POSITION_INDEPENDENT_CODE ON) + + # Create the compile command database for clang by default + set(CMAKE_EXPORT_COMPILE_COMMANDS ON) diff --git a/recipes/libheif/config.yml b/recipes/libheif/config.yml index 887a8fb56ade3..7943f16d5196d 100644 --- a/recipes/libheif/config.yml +++ b/recipes/libheif/config.yml @@ -1,4 +1,8 @@ versions: + "1.18.2": + folder: all + "1.18.1": + folder: all "1.16.2": folder: all "1.13.0": diff --git a/recipes/libigl/all/conanfile.py b/recipes/libigl/all/conanfile.py index 354d3819dc46d..232115da3d96e 100644 --- a/recipes/libigl/all/conanfile.py +++ b/recipes/libigl/all/conanfile.py @@ -1,6 +1,6 @@ import os -from conan import ConanFile, conan_version +from conan import ConanFile from conan.errors import ConanInvalidConfiguration, ConanException from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout @@ -9,7 +9,7 @@ from conan.tools.microsoft import is_msvc_static_runtime from conan.tools.scm import Version -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.53.0" class LibiglConan(ConanFile): @@ -78,15 +78,19 @@ def package_id(self): if self.info.options.header_only: self.info.clear() + def validate_build(self): + if (os.getenv('CONAN_CENTER_BUILD_SERVICE') is not None and + Version(self.version) == "2.3.0" and self.settings.build_type == "Debug"): + raise ConanInvalidConfiguration("Debug build disabled from building in CCI due to excessive memory use in ConanCenter CI") + def validate(self): - if "arm" in self.settings.arch or self.settings.arch == "x86": - raise ConanInvalidConfiguration(f"Not available for arm. Requested arch: {self.settings.arch}") + if Version(self.version) < "2.4.0" and "arm" in self.settings.arch: + raise ConanInvalidConfiguration(f"Old versions of this library do not support {self.settings.arch} architecture") + if self.settings.arch == "x86": + raise ConanInvalidConfiguration(f"Architecture {self.settings.arch} is not supported") if is_msvc_static_runtime(self) and not self.options.header_only: raise ConanInvalidConfiguration("Visual Studio build with MT runtime is not supported") - if self.version == "2.3.0" and conan_version.major == 1 and self.settings.build_type == "Debug": - raise ConanInvalidConfiguration("Debug build disabled for Conan 1.x due to excessive memory use in ConanCenter CI") - def loose_lt_semver(v1, v2): return all(int(p1) < int(p2) for p1, p2 in zip(str(v1).split("."), str(v2).split("."))) diff --git a/recipes/libinterpolate/all/conandata.yml b/recipes/libinterpolate/all/conandata.yml index 7d38fb0462c3a..a64f016c933a3 100644 --- a/recipes/libinterpolate/all/conandata.yml +++ b/recipes/libinterpolate/all/conandata.yml @@ -1,13 +1,17 @@ sources: - "2.6.2": + "2.7": url: - - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.6.2.tar.gz" - sha256: "42f40c9b77fda6e0c52ed39b522458456e89fb4981d63f812aa158c6f4be8ab0" + - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.7.tar.gz" + sha256: "a502a00d6aee13e9b8ae9af6fafbcb783d5380835e353a0fc85a586ca7e31e43" + "2.6.4": + url: + - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.6.4.tar.gz" + sha256: "231a39fcc87ffc3e03936f7a21abc78ef309c2f1de79bd3ae72c24d78352d666" "2.6.3": url: - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.6.3.tar.gz" sha256: "bb2f253c27594b4e56ed9349630086665f529100eac2cd3cba63d198c3a84ff9" - "2.6.4": + "2.6.2": url: - - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.6.4.tar.gz" - sha256: "231a39fcc87ffc3e03936f7a21abc78ef309c2f1de79bd3ae72c24d78352d666" + - "https://github.com/CD3/libInterpolate/archive/refs/tags/2.6.2.tar.gz" + sha256: "42f40c9b77fda6e0c52ed39b522458456e89fb4981d63f812aa158c6f4be8ab0" diff --git a/recipes/libinterpolate/all/conanfile.py b/recipes/libinterpolate/all/conanfile.py index c6aadd8b682fe..711fe3eaa7335 100644 --- a/recipes/libinterpolate/all/conanfile.py +++ b/recipes/libinterpolate/all/conanfile.py @@ -39,8 +39,8 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.80.0", transitive_headers=True) - self.requires("eigen/3.3.7", transitive_headers=True) + self.requires("boost/1.85.0", transitive_headers=True) + self.requires("eigen/3.4.0", transitive_headers=True) def package_id(self): self.info.clear() @@ -48,7 +48,7 @@ def package_id(self): def validate(self): if Version(self.version) < "2.6.4" and self.settings.os != "Linux": raise ConanInvalidConfiguration(f"{self.ref} is not supported by {self.settings.os}; Try the version >= 2.6.4") - if Version(self.version) >= "2.6.4" and self.settings.os not in ["Linux", "Windows"]: + if Version(self.version) >= "2.6.4" and self.settings.os not in ["Linux", "Windows", "Macos"]: raise ConanInvalidConfiguration(f"{self.ref} is not supported by {self.settings.os}.") if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) diff --git a/recipes/libinterpolate/all/test_package/CMakeLists.txt b/recipes/libinterpolate/all/test_package/CMakeLists.txt index 05a0c0e049e56..711c61c005037 100644 --- a/recipes/libinterpolate/all/test_package/CMakeLists.txt +++ b/recipes/libinterpolate/all/test_package/CMakeLists.txt @@ -5,3 +5,4 @@ find_package(libInterpolate REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE libInterpolate::Interpolate) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/libinterpolate/all/test_package/conanfile.py b/recipes/libinterpolate/all/test_package/conanfile.py index 48499fa0989d9..e845ae751a301 100644 --- a/recipes/libinterpolate/all/test_package/conanfile.py +++ b/recipes/libinterpolate/all/test_package/conanfile.py @@ -4,7 +4,6 @@ import os -# It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" diff --git a/recipes/libinterpolate/config.yml b/recipes/libinterpolate/config.yml index 2f31497672d43..45546f7415b6d 100644 --- a/recipes/libinterpolate/config.yml +++ b/recipes/libinterpolate/config.yml @@ -1,7 +1,9 @@ versions: - "2.6.2": + "2.7": + folder: all + "2.6.4": folder: all "2.6.3": folder: all - "2.6.4": + "2.6.2": folder: all diff --git a/recipes/libjxl/all/CMakeLists.txt b/recipes/libjxl/all/CMakeLists.txt deleted file mode 100644 index c986d294c7547..0000000000000 --- a/recipes/libjxl/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/libjxl/all/conan_deps.cmake b/recipes/libjxl/all/conan_deps.cmake new file mode 100644 index 0000000000000..e62d6fec8071b --- /dev/null +++ b/recipes/libjxl/all/conan_deps.cmake @@ -0,0 +1,24 @@ +find_package(Brotli REQUIRED CONFIG) +find_package(HWY REQUIRED CONFIG) +find_package(LCMS2 REQUIRED CONFIG) + +# Add wrapper targets for the project to link against +add_library(brotlicommon INTERFACE) +target_link_libraries(brotlicommon INTERFACE brotli::brotli) +set_target_properties(brotlicommon PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Brotli_INCLUDE_DIRS}") +set_target_properties(brotlicommon PROPERTIES INCLUDE_DIRECTORIES "${Brotli_INCLUDE_DIRS}") +add_library(brotlidec ALIAS brotlicommon) +add_library(brotlienc ALIAS brotlicommon) +add_library(brotlicommon-static ALIAS brotlicommon) +add_library(brotlidec-static ALIAS brotlicommon) +add_library(brotlienc-static ALIAS brotlicommon) + +add_library(hwy INTERFACE) +target_link_libraries(hwy INTERFACE highway::highway) +set_target_properties(hwy PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${HWY_INCLUDE_DIRS}") +set_target_properties(hwy PROPERTIES INCLUDE_DIRECTORIES "${HWY_INCLUDE_DIRS}") + +add_library(lcms2 INTERFACE) +target_link_libraries(lcms2 INTERFACE lcms::lcms) +set_target_properties(lcms2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LCMS2_INCLUDE_DIRS}") +set_target_properties(lcms2 PROPERTIES INCLUDE_DIRECTORIES "${LCMS2_INCLUDE_DIRS}") diff --git a/recipes/libjxl/all/conandata.yml b/recipes/libjxl/all/conandata.yml index 8a3abcae1301c..bfe21c7baaca3 100644 --- a/recipes/libjxl/all/conandata.yml +++ b/recipes/libjxl/all/conandata.yml @@ -1,18 +1,10 @@ sources: - "0.5.0": - url: "https://github.com/libjxl/libjxl/archive/v0.5.zip" - sha256: "a208be41542c6f81f10a82c6bb4bc75d3eceb9d4f7ecb6ea0ad2f2d236694c4b" - "0.6.1": - url: "https://github.com/libjxl/libjxl/archive/v0.6.1.zip" - sha256: "3e4877daef07724aa6f490bf80c45ada804f35fe3cce59c27e89c5ae3099535a" -patches: - "0.5.0": - - patch_file: "patches/0001-clean-targets-v0.5.patch" - base_path: "source_subfolder" - - patch_file: "patches/0002-fix-dependencies-v0.5.patch" - base_path: "source_subfolder" - "0.6.1": - - patch_file: "patches/0001-clean-targets-v0.6.patch" - base_path: "source_subfolder" - - patch_file: "patches/0002-fix-dependencies-v0.6.patch" - base_path: "source_subfolder" + "0.10.3": + url: "https://github.com/libjxl/libjxl/archive/v0.10.3.zip" + sha256: "a9e2103f61ab79f5561b506ad03fcba33207263284b1a796eba3ca826ab0a75f" + "0.10.2": + url: "https://github.com/libjxl/libjxl/archive/v0.10.2.zip" + sha256: "910ab4245eebe0fba801a057f5fbc4fe96dad7c9979880bb49ad3e2623a911a2" + "0.8.2": + url: "https://github.com/libjxl/libjxl/archive/v0.8.2.zip" + sha256: "1f2ccc06f07c4f6cf4aa6c7763ba0598f12a7544d597f02beb07f615eb08ccf0" diff --git a/recipes/libjxl/all/conanfile.py b/recipes/libjxl/all/conanfile.py index a8d214a9a78ab..e7c69a5172e12 100644 --- a/recipes/libjxl/all/conanfile.py +++ b/recipes/libjxl/all/conanfile.py @@ -1,9 +1,16 @@ -from conans import ConanFile, CMake, tools import os -import shutil -import glob -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building, stdcpp_library, check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir, save, rm, replace_in_file +from conan.tools.gnu import PkgConfigDeps +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class LibjxlConan(ConanFile): @@ -14,114 +21,201 @@ class LibjxlConan(ConanFile): homepage = "https://github.com/libjxl/libjxl" topics = ("image", "jpeg-xl", "jxl", "jpeg") - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - - exports_sources = "CMakeLists.txt", "patches/**" - generators = "cmake" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "avx512": [True, False], + "avx512_spr": [True, False], + "avx512_zen4": [True, False], + "with_tcmalloc": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "avx512": False, + "avx512_spr": False, + "avx512_zen4": False, + "with_tcmalloc": False, + } + + def export_sources(self): + copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if self.settings.arch not in ["x86", "x86_64"] or Version(self.version) < "0.9": + del self.options.avx512 + del self.options.avx512_spr + del self.options.avx512_zen4 + # https://github.com/libjxl/libjxl/blob/v0.9.1/CMakeLists.txt#L52-L59 + if self.settings.os in ["Linux", "FreeBSD"] and self.settings.arch == "x86_64": + self.options.with_tcmalloc = True def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("brotli/1.0.9") - self.requires("highway/0.12.2") - self.requires("lcms/2.11") + self.requires("brotli/1.1.0") + self.requires("highway/1.1.0") + self.requires("lcms/2.16") + if self.options.with_tcmalloc: + self.requires("gperftools/2.15") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + + def build_requirements(self): + # Require newer CMake, which allows INCLUDE_DIRECTORIES to be set on INTERFACE targets + # Also, v0.9+ require CMake 3.16 + self.tool_requires("cmake/[>=3.19 <4]") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + VirtualBuildEnv(self).generate() + + tc = CMakeToolchain(self) + tc.variables["CMAKE_PROJECT_LIBJXL_INCLUDE"] = "conan_deps.cmake" + tc.variables["BUILD_TESTING"] = False + tc.variables["JPEGXL_STATIC"] = False + tc.variables["JPEGXL_BUNDLE_LIBPNG"] = False + tc.variables["JPEGXL_ENABLE_BENCHMARK"] = False + tc.variables["JPEGXL_ENABLE_DOXYGEN"] = False + tc.variables["JPEGXL_ENABLE_EXAMPLES"] = False + tc.variables["JPEGXL_ENABLE_JNI"] = False + tc.variables["JPEGXL_ENABLE_MANPAGES"] = False + tc.variables["JPEGXL_ENABLE_OPENEXR"] = False + tc.variables["JPEGXL_ENABLE_PLUGINS"] = False + tc.variables["JPEGXL_ENABLE_SJPEG"] = False + tc.variables["JPEGXL_ENABLE_SKCMS"] = False + tc.variables["JPEGXL_ENABLE_TCMALLOC"] = self.options.with_tcmalloc + tc.variables["JPEGXL_ENABLE_VIEWERS"] = False + tc.variables["JPEGXL_ENABLE_TOOLS"] = False + tc.variables["JPEGXL_FORCE_SYSTEM_BROTLI"] = True + tc.variables["JPEGXL_FORCE_SYSTEM_GTEST"] = True + tc.variables["JPEGXL_FORCE_SYSTEM_HWY"] = True + tc.variables["JPEGXL_FORCE_SYSTEM_LCMS2"] = True + tc.variables["JPEGXL_WARNINGS_AS_ERRORS"] = False + tc.variables["JPEGXL_FORCE_NEON"] = False + tc.variables["JPEGXL_ENABLE_AVX512"] = self.options.get_safe("avx512", False) + tc.variables["JPEGXL_ENABLE_AVX512_SPR"] = self.options.get_safe("avx512_spr", False) + tc.variables["JPEGXL_ENABLE_AVX512_ZEN4"] = self.options.get_safe("avx512_zen4", False) + if cross_building(self): + tc.variables["CMAKE_SYSTEM_PROCESSOR"] = str(self.settings.arch) + # Allow non-cache_variables to be used + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + # Skip the buggy custom FindAtomic and force the use of atomic library directly for libstdc++ + tc.variables["ATOMICS_LIBRARIES"] = "atomic" if self._atomic_required else "" + if Version(self.version) >= "0.8": + # TODO: add support for the jpegli JPEG encoder library + tc.variables["JPEGXL_ENABLE_JPEGLI"] = False + tc.variables["JPEGXL_ENABLE_JPEGLI_LIBJPEG"] = False + # TODO: can hopefully be removed in newer versions + # https://github.com/libjxl/libjxl/issues/3159 + if Version(self.version) >= "0.9" and self.settings.build_type == "Debug" and is_msvc(self): + tc.preprocessor_definitions["JXL_DEBUG_V_LEVEL"] = 1 + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("brotli", "cmake_file_name", "Brotli") + deps.set_property("highway", "cmake_file_name", "HWY") + deps.set_property("lcms", "cmake_file_name", "LCMS2") + deps.generate() + + # For tcmalloc + deps = PkgConfigDeps(self) + deps.generate() + + @property + def _atomic_required(self): + return self.settings.get_safe("compiler.libcxx") in ["libstdc++", "libstdc++11"] def _patch_sources(self): - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["BUILD_TESTING"] = False - self._cmake.definitions["JPEGXL_STATIC"] = not self.options.shared - self._cmake.definitions["JPEGXL_ENABLE_BENCHMARK"] = False - self._cmake.definitions["JPEGXL_ENABLE_EXAMPLES"] = False - self._cmake.definitions["JPEGXL_ENABLE_MANPAGES"] = False - self._cmake.definitions["JPEGXL_ENABLE_SJPEG"] = False - self._cmake.definitions["JPEGXL_ENABLE_OPENEXR"] = False - self._cmake.definitions["JPEGXL_ENABLE_SKCMS"] = False - self._cmake.definitions["JPEGXL_ENABLE_TCMALLOC"] = False - if tools.cross_building(self): - self._cmake.definitions["CMAKE_SYSTEM_PROCESSOR"] = \ - str(self.settings.arch) - self._cmake.configure() - return self._cmake + # Disable tools, extras and third_party + save(self, os.path.join(self.source_folder, "tools", "CMakeLists.txt"), "") + save(self, os.path.join(self.source_folder, "third_party", "CMakeLists.txt"), "") + # FindAtomics.cmake values are set by CMakeToolchain instead + save(self, os.path.join(self.source_folder, "cmake", "FindAtomics.cmake"), "") + + # Allow fPIC to be set by Conan + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)", "") + for cmake_file in ["jxl.cmake", "jxl_threads.cmake", "jxl_cms.cmake", "jpegli.cmake"]: + path = os.path.join(self.source_folder, "lib", cmake_file) + if os.path.exists(path): + fpic = "ON" if self.options.get_safe("fPIC", True) else "OFF" + replace_in_file(self, path, "POSITION_INDEPENDENT_CODE ON", f"POSITION_INDEPENDENT_CODE {fpic}") def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - cmake = self._configure_cmake() + cmake = CMake(self) cmake.install() - - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) if self.options.shared: - libs_dir = os.path.join(self.package_folder, "lib") - tools.remove_files_by_mask(libs_dir, "*.a") - tools.remove_files_by_mask(libs_dir, "*-static.lib") - - if self.settings.os == "Windows": - self.copy("jxl_dec.dll", src="bin", dst="bin") - self.copy("jxl_dec.lib", src="lib", dst="lib") - for dll_path in glob.glob(os.path.join(libs_dir, "*.dll")): - shutil.move(dll_path, os.path.join(self.package_folder, - "bin", os.path.basename(dll_path))) - else: - self.copy("libjxl_dec.*", src="lib", dst="lib") + rm(self, "*.a", os.path.join(self.package_folder, "lib")) + rm(self, "*-static.lib", os.path.join(self.package_folder, "lib")) def _lib_name(self, name): - if not self.options.shared and self.settings.os == "Windows": + if Version(self.version) < "0.9" and not self.options.shared and self.settings.os == "Windows": return name + "-static" return name def package_info(self): + libcxx = stdcpp_library(self) + # jxl - self.cpp_info.components["jxl"].names["pkg_config"] = "libjxl" + self.cpp_info.components["jxl"].set_property("pkg_config_name", "libjxl") self.cpp_info.components["jxl"].libs = [self._lib_name("jxl")] - self.cpp_info.components["jxl"].requires = ["brotli::brotli", - "highway::highway", - "lcms::lcms"] + self.cpp_info.components["jxl"].requires = ["brotli::brotli", "highway::highway", "lcms::lcms"] + if self.options.with_tcmalloc: + self.cpp_info.components["jxl"].requires.append("gperftools::tcmalloc_minimal") + if self._atomic_required: + self.cpp_info.components["jxl"].system_libs.append("atomic") + if not self.options.shared: + self.cpp_info.components["jxl"].defines.append("JXL_STATIC_DEFINE") + if libcxx: + self.cpp_info.components["jxl"].system_libs.append(libcxx) + + # jxl_cms + if Version(self.version) >= "0.9.0": + self.cpp_info.components["jxl_cms"].set_property("pkg_config_name", "libjxl_cms") + self.cpp_info.components["jxl_cms"].libs = [self._lib_name("jxl_cms")] + self.cpp_info.components["jxl_cms"].requires = ["lcms::lcms", "highway::highway"] + if not self.options.shared: + self.cpp_info.components["jxl"].defines.append("JXL_CMS_STATIC_DEFINE") + if libcxx: + self.cpp_info.components["jxl_cms"].system_libs.append(libcxx) + # jxl_dec - self.cpp_info.components["jxl_dec"].names["pkg_config"] = "libjxl_dec" - self.cpp_info.components["jxl_dec"].libs = [self._lib_name("jxl_dec")] - self.cpp_info.components["jxl_dec"].requires = ["brotli::brotli", - "highway::highway", - "lcms::lcms"] + if Version(self.version) < "0.9.0": + if not self.options.shared: + self.cpp_info.components["jxl_dec"].set_property("pkg_config_name", "libjxl_dec") + self.cpp_info.components["jxl_dec"].libs = [self._lib_name("jxl_dec")] + self.cpp_info.components["jxl_dec"].requires = ["brotli::brotli", "highway::highway", "lcms::lcms"] + if libcxx: + self.cpp_info.components["jxl_dec"].system_libs.append(libcxx) + # jxl_threads - self.cpp_info.components["jxl_threads"].names["pkg_config"] = \ - "libjxl_threads" - self.cpp_info.components["jxl_threads"].libs = \ - [self._lib_name("jxl_threads")] - if self.settings.os == "Linux": + self.cpp_info.components["jxl_threads"].set_property("pkg_config_name", "libjxl_threads") + self.cpp_info.components["jxl_threads"].libs = [self._lib_name("jxl_threads")] + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["jxl_threads"].system_libs = ["pthread"] - - if not self.options.shared and tools.stdcpp_library(self): - self.cpp_info.components["jxl"].system_libs.append( - tools.stdcpp_library(self)) - self.cpp_info.components["jxl_dec"].system_libs.append( - tools.stdcpp_library(self)) - self.cpp_info.components["jxl_threads"].system_libs.append( - tools.stdcpp_library(self)) + if not self.options.shared: + self.cpp_info.components["jxl_threads"].defines.append("JXL_THREADS_STATIC_DEFINE") + if libcxx: + self.cpp_info.components["jxl_threads"].system_libs.append(libcxx) diff --git a/recipes/libjxl/all/patches/0001-clean-targets-v0.5.patch b/recipes/libjxl/all/patches/0001-clean-targets-v0.5.patch deleted file mode 100644 index 1f47c925782ce..0000000000000 --- a/recipes/libjxl/all/patches/0001-clean-targets-v0.5.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -150,8 +150,6 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - if(JPEGXL_STATIC) - set(CMAKE_FIND_LIBRARY_SUFFIXES .a) - set(BUILD_SHARED_LIBS 0) -- set(CMAKE_EXE_LINKER_FLAGS -- "${CMAKE_EXE_LINKER_FLAGS} -static -static-libgcc -static-libstdc++") - if (MINGW) - # In MINGW libstdc++ uses pthreads directly. When building statically a - # program (regardless of whether the source code uses pthread or not) the -@@ -247,8 +245,6 @@ set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_EXTENSIONS OFF) - set(CMAKE_CXX_STANDARD_REQUIRED YES) - --add_subdirectory(third_party) -- - set(THREADS_PREFER_PTHREAD_FLAG YES) - find_package(Threads REQUIRED) - -@@ -331,6 +327,3 @@ endif () - if (${JPEGXL_ENABLE_PLUGINS}) - add_subdirectory(plugins) - endif () -- --# Binary tools --add_subdirectory(tools) - ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -119,7 +119,6 @@ endif() #!MSVC - include(jxl.cmake) - - # Other libraries outside the core jxl library. --include(jxl_extras.cmake) - include(jxl_threads.cmake) - - # Install all the library headers from the source and the generated ones. There diff --git a/recipes/libjxl/all/patches/0001-clean-targets-v0.6.patch b/recipes/libjxl/all/patches/0001-clean-targets-v0.6.patch deleted file mode 100644 index e59af39610354..0000000000000 --- a/recipes/libjxl/all/patches/0001-clean-targets-v0.6.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -161,6 +161,4 @@ # ourselves; for real use case we don't care about stdlib, as it is "granted", - # so just linking all other libraries is fine. - if (NOT APPLE) -- set(CMAKE_EXE_LINKER_FLAGS -- "${CMAKE_EXE_LINKER_FLAGS} -static -static-libgcc -static-libstdc++") - endif() - endif() # JPEGXL_STATIC -@@ -278,8 +277,6 @@ set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_EXTENSIONS OFF) - set(CMAKE_CXX_STANDARD_REQUIRED YES) - --add_subdirectory(third_party) -- - # Copy the JXL license file to the output build directory. - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" - ${PROJECT_BINARY_DIR}/LICENSE.jpeg-xl COPYONLY) -@@ -380,6 +376,3 @@ # Plugins for third-party software - if (${JPEGXL_ENABLE_PLUGINS}) - add_subdirectory(plugins) - endif () -- --# Binary tools --add_subdirectory(tools) - ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -132,7 +132,6 @@ # The jxl library definition. - include(jxl.cmake) - - # Other libraries outside the core jxl library. --include(jxl_extras.cmake) - include(jxl_threads.cmake) - - # Install all the library headers from the source and the generated ones. There diff --git a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.5.patch b/recipes/libjxl/all/patches/0002-fix-dependencies-v0.5.patch deleted file mode 100644 index 8ec6fc1cb0d9d..0000000000000 --- a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.5.patch +++ /dev/null @@ -1,106 +0,0 @@ ---- a/lib/jxl.cmake -+++ b/lib/jxl.cmake -@@ -328,7 +328,7 @@ if (JPEGXL_ENABLE_SKCMS) - list(APPEND JPEGXL_INTERNAL_FLAGS -DJPEGXL_ENABLE_SKCMS=1) - list(APPEND JPEGXL_INTERNAL_LIBS skcms) - else () -- list(APPEND JPEGXL_INTERNAL_LIBS lcms2) -+ list(APPEND JPEGXL_INTERNAL_LIBS ${CONAN_LIBS_LCMS}) - endif () - - if (NOT JPEGXL_ENABLE_TRANSCODE_JPEG) -@@ -353,8 +353,6 @@ set_property(TARGET jxl_dec-obj PROPERTY POSITION_INDEPENDENT_CODE ON) - target_include_directories(jxl_dec-obj PUBLIC - ${PROJECT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include -- $ -- $ - ) - target_compile_definitions(jxl_dec-obj PUBLIC - ${OBJ_COMPILE_DEFINITIONS} -@@ -371,8 +369,6 @@ set_property(TARGET jxl_enc-obj PROPERTY POSITION_INDEPENDENT_CODE ON) - target_include_directories(jxl_enc-obj PUBLIC - ${PROJECT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include -- $ -- $ - ) - target_compile_definitions(jxl_enc-obj PUBLIC - ${OBJ_COMPILE_DEFINITIONS} -@@ -381,23 +377,6 @@ if (JPEGXL_ENABLE_PROFILER) - target_link_libraries(jxl_enc-obj PUBLIC jxl_profiler) - endif() - --#TODO(lode): don't depend on CMS for the core library --if (JPEGXL_ENABLE_SKCMS) -- target_include_directories(jxl_enc-obj PRIVATE -- $ -- ) -- target_include_directories(jxl_dec-obj PRIVATE -- $ -- ) --else () -- target_include_directories(jxl_enc-obj PRIVATE -- $ -- ) -- target_include_directories(jxl_dec-obj PRIVATE -- $ -- ) --endif () -- - # Headers for exporting/importing public headers - include(GenerateExportHeader) - # TODO(deymo): Add these visibility properties to the static dependencies of -@@ -416,9 +395,6 @@ set_target_properties(jxl_enc-obj PROPERTIES - VISIBILITY_INLINES_HIDDEN 1 - DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD - ) --generate_export_header(jxl_enc-obj -- BASE_NAME JXL -- EXPORT_FILE_NAME include/jxl/jxl_export.h) - target_include_directories(jxl_enc-obj PUBLIC - ${CMAKE_CURRENT_BINARY_DIR}/include) - -@@ -496,9 +472,8 @@ if (((NOT DEFINED "${TARGET_SUPPORTS_SHARED_LIBS}") OR - add_library(jxl SHARED - $ - $) --strip_static(JPEGXL_INTERNAL_SHARED_LIBS JPEGXL_INTERNAL_LIBS) - target_link_libraries(jxl PUBLIC ${JPEGXL_COVERAGE_FLAGS}) --target_link_libraries(jxl PRIVATE ${JPEGXL_INTERNAL_SHARED_LIBS}) -+target_link_libraries(jxl PRIVATE ${JPEGXL_INTERNAL_LIBS}) - # Shared library include path contains only the "include/" paths. - target_include_directories(jxl PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}/include" -@@ -507,13 +482,13 @@ set_target_properties(jxl PROPERTIES - VERSION ${JPEGXL_LIBRARY_VERSION} - SOVERSION ${JPEGXL_LIBRARY_SOVERSION} - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" -- RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") -+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" -+ DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD) - - # Public shared decoder library. - add_library(jxl_dec SHARED $) --strip_static(JPEGXL_DEC_INTERNAL_SHARED_LIBS JPEGXL_DEC_INTERNAL_LIBS) - target_link_libraries(jxl_dec PUBLIC ${JPEGXL_COVERAGE_FLAGS}) --target_link_libraries(jxl_dec PRIVATE ${JPEGXL_DEC_INTERNAL_SHARED_LIBS}) -+target_link_libraries(jxl_dec PRIVATE ${JPEGXL_DEC_INTERNAL_LIBS}) - # Shared library include path contains only the "include/" paths. - target_include_directories(jxl_dec PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}/include" -@@ -549,8 +524,14 @@ install(TARGETS jxl - else() - add_library(jxl ALIAS jxl-static) - add_library(jxl_dec ALIAS jxl_dec-static) -+set_target_properties(jxl-static PROPERTIES -+ DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD) - endif() # TARGET_SUPPORTS_SHARED_LIBS AND NOT JPEGXL_STATIC - -+generate_export_header(jxl -+ BASE_NAME JXL -+ EXPORT_FILE_NAME include/jxl/jxl_export.h) -+ - # Add a pkg-config file for libjxl. - set(JPEGXL_LIBRARY_REQUIRES - "libhwy libbrotlicommon libbrotlienc libbrotlidec") diff --git a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.6.patch b/recipes/libjxl/all/patches/0002-fix-dependencies-v0.6.patch deleted file mode 100644 index b4ff403da499f..0000000000000 --- a/recipes/libjxl/all/patches/0002-fix-dependencies-v0.6.patch +++ /dev/null @@ -1,126 +0,0 @@ ---- a/lib/jxl.cmake -+++ b/lib/jxl.cmake -@@ -334,7 +334,7 @@ if (JPEGXL_ENABLE_SKCMS) - list(APPEND JPEGXL_INTERNAL_LIBS skcms) - endif () - else () -- list(APPEND JPEGXL_INTERNAL_LIBS lcms2) -+ list(APPEND JPEGXL_INTERNAL_LIBS ${CONAN_LIBS_LCMS}) - endif () - - if (NOT JPEGXL_ENABLE_TRANSCODE_JPEG) -@@ -359,8 +359,6 @@ set_property(TARGET jxl_dec-obj PROPERTY POSITION_INDEPENDENT_CODE ON) - target_include_directories(jxl_dec-obj PUBLIC - ${PROJECT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include -- $ -- $ - ) - target_compile_definitions(jxl_dec-obj PUBLIC - ${OBJ_COMPILE_DEFINITIONS} -@@ -377,8 +375,6 @@ set_property(TARGET jxl_enc-obj PROPERTY POSITION_INDEPENDENT_CODE ON) - target_include_directories(jxl_enc-obj PUBLIC - ${PROJECT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include -- $ -- $ - ) - target_compile_definitions(jxl_enc-obj PUBLIC - ${OBJ_COMPILE_DEFINITIONS} -@@ -387,17 +383,6 @@ if (JPEGXL_ENABLE_PROFILER) - target_link_libraries(jxl_enc-obj PUBLIC jxl_profiler) - endif() - --#TODO(lode): don't depend on CMS for the core library --if (JPEGXL_ENABLE_SKCMS) -- target_include_directories(jxl_enc-obj PRIVATE -- $ -- ) --else () -- target_include_directories(jxl_enc-obj PRIVATE -- $ -- ) --endif () -- - # Headers for exporting/importing public headers - include(GenerateExportHeader) - set_target_properties(jxl_dec-obj PROPERTIES -@@ -413,9 +398,6 @@ set_target_properties(jxl_enc-obj PROPERTIES - VISIBILITY_INLINES_HIDDEN 1 - DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD - ) --generate_export_header(jxl_enc-obj -- BASE_NAME JXL -- EXPORT_FILE_NAME include/jxl/jxl_export.h) - target_include_directories(jxl_enc-obj PUBLIC - ${CMAKE_CURRENT_BINARY_DIR}/include) - -@@ -495,9 +477,8 @@ if (((NOT DEFINED "${TARGET_SUPPORTS_SHARED_LIBS}") OR - - # Public shared library. - add_library(jxl SHARED ${JPEGXL_INTERNAL_OBJECTS}) --strip_static(JPEGXL_INTERNAL_SHARED_LIBS JPEGXL_INTERNAL_LIBS) - target_link_libraries(jxl PUBLIC ${JPEGXL_COVERAGE_FLAGS}) --target_link_libraries(jxl PRIVATE ${JPEGXL_INTERNAL_SHARED_LIBS}) -+target_link_libraries(jxl PRIVATE ${JPEGXL_INTERNAL_LIBS}) - # Shared library include path contains only the "include/" paths. - target_include_directories(jxl PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}/include" -@@ -506,13 +487,13 @@ set_target_properties(jxl PROPERTIES - VERSION ${JPEGXL_LIBRARY_VERSION} - SOVERSION ${JPEGXL_LIBRARY_SOVERSION} - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" -- RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") -+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" -+ DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD) - - # Public shared decoder library. - add_library(jxl_dec SHARED $) --strip_static(JPEGXL_DEC_INTERNAL_SHARED_LIBS JPEGXL_DEC_INTERNAL_LIBS) - target_link_libraries(jxl_dec PUBLIC ${JPEGXL_COVERAGE_FLAGS}) --target_link_libraries(jxl_dec PRIVATE ${JPEGXL_DEC_INTERNAL_SHARED_LIBS}) -+target_link_libraries(jxl_dec PRIVATE ${JPEGXL_DEC_INTERNAL_LIBS}) - # Shared library include path contains only the "include/" paths. - target_include_directories(jxl_dec PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}/include" -@@ -523,6 +504,12 @@ set_target_properties(jxl_dec PROPERTIES - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}") - -+set(LINKER_EXCLUDE_LIBS_FLAG "-Wl,--exclude-libs=ALL") -+include(CheckCSourceCompiles) -+list(APPEND CMAKE_EXE_LINKER_FLAGS ${LINKER_EXCLUDE_LIBS_FLAG}) -+check_c_source_compiles("int main(){return 0;}" LINKER_SUPPORT_EXCLUDE_LIBS) -+list(REMOVE_ITEM CMAKE_EXE_LINKER_FLAGS ${LINKER_EXCLUDE_LIBS_FLAG}) -+ - # Add a jxl.version file as a version script to tag symbols with the - # appropriate version number. This script is also used to limit what's exposed - # in the shared library from the static dependencies bundled here. -@@ -541,8 +528,10 @@ foreach(target IN ITEMS jxl jxl_dec) - # This hides the default visibility symbols from static libraries bundled into - # the shared library. In particular this prevents exposing symbols from hwy - # and skcms in the shared library. -- set_property(TARGET ${target} APPEND_STRING PROPERTY -- LINK_FLAGS " -Wl,--exclude-libs=ALL") -+ if(${LINKER_SUPPORT_EXCLUDE_LIBS}) -+ set_property(TARGET ${target} APPEND_STRING PROPERTY -+ LINK_FLAGS " ${LINKER_EXCLUDE_LIBS_FLAG}") -+ endif() - endforeach() - - # Only install libjxl shared library. The libjxl_dec is not installed since it -@@ -553,8 +542,14 @@ install(TARGETS jxl - else() - add_library(jxl ALIAS jxl-static) - add_library(jxl_dec ALIAS jxl_dec-static) -+set_target_properties(jxl-static PROPERTIES -+ DEFINE_SYMBOL JXL_INTERNAL_LIBRARY_BUILD) - endif() # TARGET_SUPPORTS_SHARED_LIBS AND NOT JPEGXL_STATIC - -+generate_export_header(jxl -+ BASE_NAME JXL -+ EXPORT_FILE_NAME include/jxl/jxl_export.h) -+ - # Add a pkg-config file for libjxl. - set(JPEGXL_LIBRARY_REQUIRES - "libhwy libbrotlicommon libbrotlienc libbrotlidec") diff --git a/recipes/libjxl/all/test_package/CMakeLists.txt b/recipes/libjxl/all/test_package/CMakeLists.txt index 7b9b613cbb24a..4cb796f1c09f2 100644 --- a/recipes/libjxl/all/test_package/CMakeLists.txt +++ b/recipes/libjxl/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(libjxl REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE libjxl::libjxl) diff --git a/recipes/libjxl/all/test_package/conanfile.py b/recipes/libjxl/all/test_package/conanfile.py index 138d4f5333429..ef5d7042163ec 100644 --- a/recipes/libjxl/all/test_package/conanfile.py +++ b/recipes/libjxl/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -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", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + 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) @@ -12,7 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - img_path = os.path.join(self.source_folder, "test.jxl") - self.run(bin_path + " " + img_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libjxl/all/test_package/test.jxl b/recipes/libjxl/all/test_package/test.jxl deleted file mode 100644 index a0f419a98a426..0000000000000 Binary files a/recipes/libjxl/all/test_package/test.jxl and /dev/null differ diff --git a/recipes/libjxl/all/test_package/test_package.c b/recipes/libjxl/all/test_package/test_package.c index 2cb652aa9249a..3b65dffc293ab 100644 --- a/recipes/libjxl/all/test_package/test_package.c +++ b/recipes/libjxl/all/test_package/test_package.c @@ -4,87 +4,15 @@ #include "jxl/decode.h" #include "jxl/thread_parallel_runner.h" -static int ReadFile(const char filename[], uint8_t *data[], size_t *size) +int main() { - FILE *fp = fopen(filename, "rb"); - if (!fp) - return 0; - - if (fseek(fp, 0, SEEK_END) != 0) { - fclose(fp); - return 0; - } - - *size = ftell(fp); - if (fseek(fp, 0, SEEK_SET) != 0) { - fclose(fp); - return 0; - } - - *data = malloc(*size); - if (!*data) { - fclose(fp); - return 0; - } - - if (fread(*data, sizeof(uint8_t), *size, fp) != *size) { - free(*data); - fclose(fp); - return 0; - } - - if (fclose(fp) != 0) { - free(*data); - return 0; - } - - return 1; -} - -int main(int argc, char *argv[]) -{ - int ret = EXIT_FAILURE; - - if (argc < 2) { - fprintf(stderr, "Need at least one argument\n"); - return ret; - } - - uint8_t *data; - size_t size; - if (!ReadFile(argv[1], &data, &size)) - return ret; - JxlDecoder *dec = NULL; void *runner = NULL; - dec = JxlDecoderCreate(NULL); - if (JxlDecoderSubscribeEvents(dec, JXL_DEC_BASIC_INFO) != JXL_DEC_SUCCESS) - goto Exit; - - runner = JxlThreadParallelRunnerCreate( - NULL, JxlThreadParallelRunnerDefaultNumWorkerThreads()); - if (JxlDecoderSetParallelRunner(dec, JxlThreadParallelRunner, runner) - != JXL_DEC_SUCCESS) - goto Exit; - if (JxlDecoderSetInput(dec, data, size) != JXL_DEC_SUCCESS) - goto Exit; - - if (JxlDecoderProcessInput(dec) != JXL_DEC_BASIC_INFO) - goto Exit; - - JxlBasicInfo info; - if (JxlDecoderGetBasicInfo(dec, &info) != JXL_DEC_SUCCESS) - goto Exit; - - printf("Image size: %d x %d pixels\n", info.xsize, info.ysize); - - ret = EXIT_SUCCESS; - -Exit: - free(data); - JxlThreadParallelRunnerDestroy(runner); - JxlDecoderDestroy(dec); - return ret; + // Allways True + if (JxlDecoderSubscribeEvents(dec, JXL_DEC_BASIC_INFO) == JXL_DEC_SUCCESS) + { + printf("Test"); + } } diff --git a/recipes/libjxl/all/test_v1_package/CMakeLists.txt b/recipes/libjxl/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/libjxl/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libjxl/all/test_v1_package/conanfile.py b/recipes/libjxl/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/libjxl/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/libjxl/config.yml b/recipes/libjxl/config.yml index c79a1af3be31f..040248cefb07f 100644 --- a/recipes/libjxl/config.yml +++ b/recipes/libjxl/config.yml @@ -1,5 +1,7 @@ versions: - "0.5.0": + "0.10.3": folder: all - "0.6.1": + "0.10.2": + folder: all + "0.8.2": folder: all diff --git a/recipes/liblqr/all/CMakeLists.txt b/recipes/liblqr/all/CMakeLists.txt new file mode 100644 index 0000000000000..303355e779e6b --- /dev/null +++ b/recipes/liblqr/all/CMakeLists.txt @@ -0,0 +1,44 @@ +cmake_minimum_required(VERSION 3.15) +project(liblqr LANGUAGES C) + +find_package(glib REQUIRED CONFIG) + +set(LQR_SRC_SUBDIR ${LQR_SRC_DIR}/lqr) + +file(GLOB LQR_SRCS_FILES ${LQR_SRC_SUBDIR}/*.c) + +add_library(lqr-1 ${LQR_SRCS_FILES}) +target_include_directories(lqr-1 PUBLIC ${LQR_SRC_DIR} ${LQR_SRC_SUBDIR}) +target_link_libraries(lqr-1 PUBLIC glib::glib-2.0) +if(WIN32) + if(BUILD_SHARED_LIBS) + target_compile_definitions(lqr-1 PRIVATE LQR_EXPORTS) + else() + target_compile_definitions(lqr-1 PUBLIC LQR_DISABLE_DECLSPEC) + endif() +endif() + +install(FILES ${LQR_SRC_SUBDIR}/lqr.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lqr-1) +install( + FILES + ${LQR_SRC_SUBDIR}/lqr_base.h + ${LQR_SRC_SUBDIR}/lqr_carver_bias_pub.h + ${LQR_SRC_SUBDIR}/lqr_carver_list_pub.h + ${LQR_SRC_SUBDIR}/lqr_carver_pub.h + ${LQR_SRC_SUBDIR}/lqr_carver_rigmask_pub.h + ${LQR_SRC_SUBDIR}/lqr_cursor_pub.h + ${LQR_SRC_SUBDIR}/lqr_energy_pub.h + ${LQR_SRC_SUBDIR}/lqr_gradient_pub.h + ${LQR_SRC_SUBDIR}/lqr_progress_pub.h + ${LQR_SRC_SUBDIR}/lqr_rwindow_pub.h + ${LQR_SRC_SUBDIR}/lqr_vmap_list_pub.h + ${LQR_SRC_SUBDIR}/lqr_vmap_pub.h + DESTINATION + ${CMAKE_INSTALL_INCLUDEDIR}/lqr-1/lqr +) +install( + TARGETS lqr-1 + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) diff --git a/recipes/liblqr/all/conandata.yml b/recipes/liblqr/all/conandata.yml new file mode 100644 index 0000000000000..d562db29a3a36 --- /dev/null +++ b/recipes/liblqr/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.4.3": + url: "http://liblqr.wdfiles.com/local--files/en:download-page/liblqr-1-0.4.3.tar.bz2" + sha256: "862fc5cecaa96d38d4d9279c8a6fbfc276393f0548909ee0912e41df59894471" diff --git a/recipes/liblqr/all/conanfile.py b/recipes/liblqr/all/conanfile.py new file mode 100644 index 0000000000000..56681e130e9e4 --- /dev/null +++ b/recipes/liblqr/all/conanfile.py @@ -0,0 +1,130 @@ +from conan import ConanFile +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain, PkgConfigDeps +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.54.0" + + +class LibLqrConan(ConanFile): + name = "liblqr" + description = ( + "The LiquidRescale (lqr) library provides a C/C++ API for performing " + "non-uniform resizing of images by the seam-carving technique." + ) + license = ("LGPL-3.0-or-later", "GPL-3.0-or-later") + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://liblqr.wikidot.com" + topics = ("image", "resizing", "seam-carving") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _is_cl_like(self): + return self.settings.compiler.get_safe("runtime") is not None + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + if self._is_cl_like: + cmake_layout(self, src_folder="src") + else: + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("glib/2.81.0", transitive_headers=True) + + def build_requirements(self): + if not self._is_cl_like: + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/[>=2.2 <3]") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + if self._is_cl_like: + tc = CMakeToolchain(self) + tc.variables["LQR_SRC_DIR"] = self.source_folder.replace("\\", "/") + tc.generate() + deps = CMakeDeps(self) + deps.generate() + else: + env = VirtualBuildEnv(self) + env.generate() + + tc = AutotoolsToolchain(self) + yes_no = lambda v: "yes" if v else "no" + tc.configure_args.append("--disable-install-man") + if self.settings.os == "Windows": + # This option in upstream configure.ac must be disabled for static + # windows build, to avoid adding __declspec(dllexport) in front + # of declarations during build. + tc.configure_args.append(f"--enable-declspec={yes_no(self.options.shared)}") + tc.generate() + + deps = PkgConfigDeps(self) + deps.generate() + + def build(self): + if self._is_cl_like: + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.build() + else: + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + copy(self, "COPYING*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + if self._is_cl_like: + cmake = CMake(self) + cmake.install() + else: + autotools = Autotools(self) + autotools.install() + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.set_property("pkg_config_name", "lqr-1") + self.cpp_info.includedirs = [os.path.join("include", "lqr-1")] + self.cpp_info.libs = ["lqr-1"] + self.cpp_info.requires = ["glib::glib-2.0"] + if self.settings.os == "Windows" and not self.options.shared: + self.cpp_info.defines.append("LQR_DISABLE_DECLSPEC") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/liblqr/all/test_package/CMakeLists.txt b/recipes/liblqr/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..fe1dadeb5b33a --- /dev/null +++ b/recipes/liblqr/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(liblqr REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE liblqr::liblqr) diff --git a/recipes/liblqr/all/test_package/conanfile.py b/recipes/liblqr/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/liblqr/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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 = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + 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): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/liblqr/all/test_package/test_package.c b/recipes/liblqr/all/test_package/test_package.c new file mode 100644 index 0000000000000..890b1df50ef9c --- /dev/null +++ b/recipes/liblqr/all/test_package/test_package.c @@ -0,0 +1,15 @@ +#include + +#include + +int main() { + gint channels = 3; + gint w = 100; + gint h = 100; + guchar *rgb_buffer = (guchar *) malloc(channels * w * h * sizeof(guchar)); + + LqrCarver *r = lqr_carver_new(rgb_buffer, w, h, channels); + lqr_carver_destroy(r); + + return 0; +} diff --git a/recipes/liblqr/config.yml b/recipes/liblqr/config.yml new file mode 100644 index 0000000000000..9be35d17501c4 --- /dev/null +++ b/recipes/liblqr/config.yml @@ -0,0 +1,3 @@ +versions: + "0.4.3": + folder: all diff --git a/recipes/libmeshb/all/conandata.yml b/recipes/libmeshb/all/conandata.yml new file mode 100644 index 0000000000000..dd9233505c3f3 --- /dev/null +++ b/recipes/libmeshb/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "7.80": + url: "https://github.com/LoicMarechal/libMeshb/archive/refs/tags/v7.80.tar.gz" + sha256: "3026e84fa7c5c14428b1e0d1484038b0cf24921814e9cd0b6e0f13a34b0f1248" diff --git a/recipes/libmeshb/all/conanfile.py b/recipes/libmeshb/all/conanfile.py new file mode 100644 index 0000000000000..4f0284a48ab3d --- /dev/null +++ b/recipes/libmeshb/all/conanfile.py @@ -0,0 +1,81 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, rmdir +import os + +required_conan_version = ">=1.53.0" + +class LibmeshbConan(ConanFile): + name = "libmeshb" + description = "A library to handle the *.meshb file format." + license = "MPL-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/LoicMarechal/libMeshb" + topics = ("3d", "mesh", "geometry") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_gmf_asio": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "with_gmf_asio": False + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + del self.options.with_gmf_asio + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def configure(self): + # Windows shared build doesn't seems supported because code doesn't include dllexport + # See https://www.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/ + if self.settings.os == "Windows": + del self.options.shared + self.package_type = "static-library" + if self.options.get_safe("shared"): + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["WITH_GMF_AIO"] = self.options.get_safe("with_gmf_asio", False) + tc.generate() + + def _patch_sources(self): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory (examples)", "") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "install (FILES LICENSE.txt copyright.txt DESTINATION share/libMeshb)", "") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "install (DIRECTORY sample_meshes DESTINATION share/libMeshb)", "") + replace_in_file(self, os.path.join(self.source_folder, "sources/CMakeLists.txt"), "install(DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/ DESTINATION include)", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "libMeshb") + self.cpp_info.set_property("cmake_target_name", "libMeshb::Meshb.7") + self.cpp_info.libs = ["Meshb.7"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("rt") + self.cpp_info.system_libs.append("m") \ No newline at end of file diff --git a/recipes/libmeshb/all/test_package/CMakeLists.txt b/recipes/libmeshb/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..5cc1c2f79e98d --- /dev/null +++ b/recipes/libmeshb/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES C) + +find_package(libMeshb REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE libMeshb::Meshb.7) diff --git a/recipes/libmeshb/all/test_package/conanfile.py b/recipes/libmeshb/all/test_package/conanfile.py new file mode 100644 index 0000000000000..f5cf204295e19 --- /dev/null +++ b/recipes/libmeshb/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +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 = "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): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libmeshb/all/test_package/test_package.c b/recipes/libmeshb/all/test_package/test_package.c new file mode 100644 index 0000000000000..ab27c830995fa --- /dev/null +++ b/recipes/libmeshb/all/test_package/test_package.c @@ -0,0 +1,7 @@ +#include + +int main() { + int ver, dim; + int64_t LibIdx = GmfOpenMesh("/dev/null", GmfRead, &ver, &dim); + return 0; +} diff --git a/recipes/libmeshb/config.yml b/recipes/libmeshb/config.yml new file mode 100644 index 0000000000000..d51cd95e8905e --- /dev/null +++ b/recipes/libmeshb/config.yml @@ -0,0 +1,3 @@ +versions: + "7.80": + folder: all diff --git a/recipes/libphonenumber/all/conandata.yml b/recipes/libphonenumber/all/conandata.yml new file mode 100644 index 0000000000000..11c4aae27deb2 --- /dev/null +++ b/recipes/libphonenumber/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "8.13.42": + url: "https://github.com/google/libphonenumber/archive/refs/tags/v8.13.42.tar.gz" + sha256: "7fac3a3c5f37607108ea2ca4c334000a6c29fe1cd6b30db31505cba73ab96c7d" diff --git a/recipes/libphonenumber/all/conanfile.py b/recipes/libphonenumber/all/conanfile.py new file mode 100644 index 0000000000000..9a88f82447a58 --- /dev/null +++ b/recipes/libphonenumber/all/conanfile.py @@ -0,0 +1,184 @@ +import os + +from conan import ConanFile, conan_version +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd, valid_min_cppstd, can_run +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rm, rmdir, replace_in_file +from conan.tools.gnu import PkgConfigDeps +from conan.tools.scm import Version + +required_conan_version = ">=1.56.0 <2 || >=2.0.6" + + +class LibphonenumberConan(ConanFile): + name = "libphonenumber" + description = "Google's common C++ library for parsing, formatting, and validating international phone numbers" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/google/libphonenumber" + topics = ("phone-numbers", "phone") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "build_geocoder": [True, False], + "use_alternate_formats": [True, False], + "use_boost": [True, False], + "use_icu_regexp": [True, False], + "use_lite_metadata": [True, False], + "use_posix_thread": [True, False], + "use_std_mutex": [True, False], + #re2 is not an option, because using it crashes + } + default_options = { + "shared": False, + "fPIC": True, + "build_geocoder": True, + "use_alternate_formats": True, + "use_boost": False, + "use_icu_regexp": True, + "use_lite_metadata": False, + "use_posix_thread": False, + "use_std_mutex": True, + } + options_description = { + "build_geocoder": "Build the offline phone number geocoder", + "use_alternate_formats": "Use alternate formats for the phone number matcher.", + "use_icu_regexp": "Use ICU regexp engine", + "use_lite_metadata": "Generates smaller metadata that doesn't include example numbers", + "use_posix_thread": "Use Posix thread for multi-threading", + "use_std_mutex": "use C++ 2011 std::mutex for multi-threading", + } + + @property + def _min_cppstd(self): + return 11 if Version(self.dependencies["abseil"].ref.version) < "20230125.0" else 14 + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + # TODO: could use pthread4w + del self.options.use_posix_thread + if not can_run(self): + # otherwise fails when trying to build and run generate_geocoding_data + del self.options.build_geocoder + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + # https://github.com/google/libphonenumber/blob/v8.13.35/cpp/src/phonenumbers/phonenumberutil.h#L33-L34 + self.requires("abseil/20240116.2", transitive_headers=True) + self.requires("protobuf/5.27.0", transitive_headers=True, transitive_libs=True) + if self.options.use_boost: + # https://github.com/google/libphonenumber/blob/v8.13.35/cpp/src/phonenumbers/base/synchronization/lock_boost.h + self.requires("boost/1.85.0", transitive_headers=True, transitive_libs=True) + if self.options.use_icu_regexp or self.options.get_safe("build_geocoder"): + # https://github.com/google/libphonenumber/blob/v8.13.35/cpp/src/phonenumbers/geocoding/phonenumber_offline_geocoder.h#L23 + self.requires("icu/75.1", transitive_headers=True, transitive_libs=True) + + def validate(self): + if self.settings.os == "Windows": + raise ConanInvalidConfiguration(f"{self.name} not supported in Windows yet, contributions welcome\n" + "https://github.com/google/libphonenumber/blob/master/FAQ.md#what-about-windows") + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + + if not self.options.use_std_mutex and not self.options.use_boost and not self.options.get_safe("use_posix_thread"): + raise ConanInvalidConfiguration("At least one of use_std_mutex, use_boost or use_posix_thread must be enabled") + + if not self.options.use_icu_regexp: + # Fails with 'undefined reference to `vtable for i18n::phonenumbers::ICURegExpFactory'' + raise ConanInvalidConfiguration("use_icu_regexp=False is not supported") + + if conan_version.major == 1: + raise ConanInvalidConfiguration("Conan 1.x is not supported. Contributions are welcome!") + + def build_requirements(self): + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/2.2.0") + self.tool_requires("protobuf/") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_SHARED_LIBS"] = self.options.shared + tc.variables["BUILD_STATIC_LIB"] = not self.options.shared + tc.variables["BUILD_GEOCODER"] = self.options.get_safe("build_geocoder", False) + tc.variables["USE_ALTERNATE_FORMATS"] = self.options.use_alternate_formats + tc.variables["USE_BOOST"] = self.options.use_boost + tc.variables["USE_ICU_REGEXP"] = self.options.use_icu_regexp + tc.variables["USE_LITE_METADATA"] = self.options.use_lite_metadata + tc.variables["USE_POSIX_THREAD"] = self.options.get_safe("use_posix_thread", False) + tc.variables["USE_PROTOBUF_LITE"] = self.dependencies["protobuf"].options.lite + tc.variables["USE_RE2"] = False # Hardcoded, attempt to use it crashed + tc.variables["USE_STDMUTEX"] = self.options.use_std_mutex + tc.variables["BUILD_TESTING"] = False + tc.variables["BUILD_TOOLS_ONLY"] = False + tc.variables["REGENERATE_METADATA"] = False # Requires a Java runtime + # Otherwise tries to use , and requires the recipe to export a define accordingly. + # The define can be set based only on a compilation test. + tc.variables["USE_STD_MAP"] = True + if not valid_min_cppstd(self, self._min_cppstd): + tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.cache_variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = str(self.settings.build_type) + tc.generate() + deps = CMakeDeps(self) + deps.generate() + deps = PkgConfigDeps(self) + deps.generate() + + def _patch_sources(self): + # (failed) attempt to make it work in windows/msvc, patching some build scripts + # https://github.com/conan-io/conan-center-index/pull/23689/commits/c5e7091d134174fb590218ed066c074f45274a93 + replace_in_file(self, os.path.join(self.source_folder, "cpp", "CMakeLists.txt"), " -Werror", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, "cpp")) + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rm(self, "*.pdb", self.package_folder, recursive=True) + + def package_info(self): + if self.options.shared: + self.cpp_info.components["phonenumber"].set_property("cmake_target_aliases", ["libphonenumber::phonenumber-shared"]) + self.cpp_info.components["phonenumber"].libs = ["phonenumber"] + if self.settings.os in ["Linux", "FreeBSD"] and self.options.use_posix_thread: + self.cpp_info.components["phonenumber"].system_libs.append("pthread") + elif is_apple_os(self): + self.cpp_info.components["phonenumber"].frameworks.extend(["CoreFoundation", "Foundation"]) + + requires = ["abseil::absl_node_hash_set", "abseil::absl_strings", "abseil::absl_synchronization"] + if self.dependencies["protobuf"].options.lite: + requires.append("protobuf::libprotobuf-lite") + else: + requires.append("protobuf::libprotobuf") + if self.options.use_boost: + requires.extend(["boost::headers", "boost::thread"]) + if self.options.use_icu_regexp: + requires.extend(["icu::icu-uc", "icu::icu-i18n"]) + self.cpp_info.components["phonenumber"].requires = requires + + if self.options.get_safe("build_geocoder"): + if self.options.shared: + self.cpp_info.components["geocoding"].set_property("cmake_target_aliases", ["libphonenumber::geocoding-shared"]) + self.cpp_info.components["geocoding"].libs.append("geocoding") + self.cpp_info.components["geocoding"].requires = ["abseil::absl_synchronization", "icu::icu-uc"] diff --git a/recipes/libphonenumber/all/test_package/CMakeLists.txt b/recipes/libphonenumber/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f3619ef8d61cf --- /dev/null +++ b/recipes/libphonenumber/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(libphonenumber REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE libphonenumber::libphonenumber) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/libphonenumber/all/test_package/conanfile.py b/recipes/libphonenumber/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/libphonenumber/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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 = "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): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libphonenumber/all/test_package/test_package.cpp b/recipes/libphonenumber/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..7bcbdb54c0b0f --- /dev/null +++ b/recipes/libphonenumber/all/test_package/test_package.cpp @@ -0,0 +1,11 @@ +#include +#include + +int main() { + using namespace i18n::phonenumbers; + PhoneNumber number; + number.set_country_code(1); + number.set_national_number(uint64{650}); + auto util = PhoneNumberUtil::GetInstance(); + util->GetLengthOfGeographicalAreaCode(number); +} diff --git a/recipes/libphonenumber/config.yml b/recipes/libphonenumber/config.yml new file mode 100644 index 0000000000000..2d7b667f12200 --- /dev/null +++ b/recipes/libphonenumber/config.yml @@ -0,0 +1,3 @@ +versions: + "8.13.42": + folder: all diff --git a/recipes/libpng/all/conandata.yml b/recipes/libpng/all/conandata.yml index 9d660e1b52521..0861bf8b1062b 100644 --- a/recipes/libpng/all/conandata.yml +++ b/recipes/libpng/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.6.44": + url: "https://sourceforge.net/projects/libpng/files/libpng16/1.6.44/libpng-1.6.44.tar.xz" + sha256: "60c4da1d5b7f0aa8d158da48e8f8afa9773c1c8baa5d21974df61f1886b8ce8e" "1.6.43": url: "https://sourceforge.net/projects/libpng/files/libpng16/1.6.43/libpng-1.6.43.tar.xz" sha256: "6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c" diff --git a/recipes/libpng/all/conanfile.py b/recipes/libpng/all/conanfile.py index a5aa7d7b88067..d41cc8f49d2bb 100644 --- a/recipes/libpng/all/conanfile.py +++ b/recipes/libpng/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os @@ -149,6 +149,7 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "libpng")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.cmake", os.path.join(self.package_folder, "lib", "cmake", "PNG")) def package_info(self): major_min_version = f"{Version(self.version).major}{Version(self.version).minor}" diff --git a/recipes/libpng/config.yml b/recipes/libpng/config.yml index 05a40beb2a7b3..72e85034a3407 100644 --- a/recipes/libpng/config.yml +++ b/recipes/libpng/config.yml @@ -1,4 +1,6 @@ versions: + "1.6.44": + folder: all "1.6.43": folder: all "1.6.42": diff --git a/recipes/libpointmatcher/all/conandata.yml b/recipes/libpointmatcher/all/conandata.yml index 448e7fdb12dff..90e42a2d1fa6b 100644 --- a/recipes/libpointmatcher/all/conandata.yml +++ b/recipes/libpointmatcher/all/conandata.yml @@ -1,9 +1,13 @@ sources: - "1.3.1": - url: "https://github.com/ethz-asl/libpointmatcher/archive/refs/tags/1.3.1.tar.gz" - sha256: "82f93d2e7689efeef8837b8e969919b51c51ad4a1d1fa921c4dd8df4811378ab" + "1.4.3": + url: "https://github.com/ethz-asl/libpointmatcher/archive/refs/tags/1.4.3.tar.gz" + sha256: "7f8f56d4e561206fb5720ece6fecf6d27e9fd214d4dd326d228fddbea8289cda" patches: - "1.3.1": - - patch_file: "patches/1.3.1-0001-fix-cmake.patch" + "1.4.3": + - patch_file: "patches/1.4.3-0001-fix-cmake.patch" patch_description: "Fix upstream CMakeLists" patch_type: "conan" + - patch_file: "patches/1.4.3-0002-fix-const-error.patch" + patch_description: "Fix ScalarType const_cast compile error" + patch_type: "bugfix" + patch_source: "https://github.com/norlab-ulaval/libpointmatcher/pull/580" diff --git a/recipes/libpointmatcher/all/conanfile.py b/recipes/libpointmatcher/all/conanfile.py index b189d68d9c79e..a55b2ee1013f1 100644 --- a/recipes/libpointmatcher/all/conanfile.py +++ b/recipes/libpointmatcher/all/conanfile.py @@ -1,15 +1,21 @@ +import os + from conan import ConanFile +from conan.errors import ConanInvalidConfiguration 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 -import os +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version required_conan_version = ">=1.53.0" class LibpointmatcherConan(ConanFile): name = "libpointmatcher" - description = "An Iterative Closest Point (ICP) library for 2D and 3D mapping in Robotics" + description = ( + "An Iterative Closest Point (ICP) library for 2D and 3D mapping in Robotics" + ) license = "BSD-3-Clause" topics = ("robotics", "lidar", "point-cloud") homepage = "https://github.com/ethz-asl/libpointmatcher" @@ -26,10 +32,22 @@ class LibpointmatcherConan(ConanFile): "fPIC": True, "with_openmp": False, } + short_paths = True @property def _min_cppstd(self): - return "11" + return "17" + + @property + def _compilers_minimum_version(self): + # https://github.com/norlab-ulaval/libpointmatcher/blob/1.4.3/CMakeLists.txt#L240 + return { + "gcc": "9", + "clang": "5", + "apple-clang": "7", + "msvc": "190", + "Visual Studio": "14", + } def export_sources(self): export_conandata_patches(self) @@ -41,19 +59,28 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + if is_msvc(self): + # Only static for msvc + del self.options.shared + self.package_type = "static-library" def layout(self): cmake_layout(self, src_folder="src") def requirements(self): self.requires("boost/1.81.0", transitive_headers=True) - # FIXME: eigen 3.4.0 is not compatible yet (see https://github.com/ethz-asl/libpointmatcher/issues/496) - self.requires("eigen/3.3.9", transitive_headers=True) + self.requires("eigen/3.4.0", transitive_headers=True) self.requires("libnabo/1.0.7") + self.requires("yaml-cpp/0.7.0", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) + 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." + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -62,9 +89,12 @@ def generate(self): tc = CMakeToolchain(self) tc.cache_variables["USE_OPEN_MP"] = self.options.with_openmp tc.cache_variables["USE_OPEN_CL"] = False - tc.cache_variables["SHARED_LIBS"] = self.options.shared - # TODO: to unvendor, but libpointmatcher depends on legacy API of yaml-cpp (0.3.x) - tc.variables["USE_SYSTEM_YAML_CPP"] = False + tc.cache_variables["SHARED_LIBS"] = self.options.get_safe("shared") + tc.cache_variables["BUILD_EXAMPLES"] = False + tc.cache_variables["BUILD_EVALUATIONS"] = False + tc.cache_variables["BUILD_TESTS"] = False + if not self.settings.compiler.cppstd: + tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd tc.generate() deps = CMakeDeps(self) deps.generate() @@ -76,8 +106,12 @@ def build(self): cmake.build() def package(self): - copy(self, "copyright", src=os.path.join(self.source_folder, "debian"), - dst=os.path.join(self.package_folder, "licenses")) + copy( + self, + "copyright", + src=os.path.join(self.source_folder, "debian"), + dst=os.path.join(self.package_folder, "licenses"), + ) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "share")) @@ -85,4 +119,8 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "libpointmatcher") self.cpp_info.set_property("pkg_config_name", "libpointmatcher") - self.cpp_info.libs = ["pointmatcher"] + sufix = "d" if self.settings.build_type == "Debug" else "" + self.cpp_info.libs = [f"pointmatcher{sufix}"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread", "m", "rt"] diff --git a/recipes/libpointmatcher/all/patches/1.3.1-0001-fix-cmake.patch b/recipes/libpointmatcher/all/patches/1.3.1-0001-fix-cmake.patch deleted file mode 100644 index bec21dac0c243..0000000000000 --- a/recipes/libpointmatcher/all/patches/1.3.1-0001-fix-cmake.patch +++ /dev/null @@ -1,208 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,4 +1,4 @@ --cmake_minimum_required(VERSION 2.8.11) -+cmake_minimum_required(VERSION 3.15) - - include(CheckSymbolExists) - -@@ -46,6 +46,7 @@ if( BUILD_32 ) - endif( BUILD_32 ) - - # Ensure proper build type -+if(0) - if (NOT CMAKE_BUILD_TYPE) - message("-- No build type specified; defaulting to CMAKE_BUILD_TYPE=Release.") - set(CMAKE_BUILD_TYPE Release CACHE STRING -@@ -65,12 +66,14 @@ endif (NOT CMAKE_BUILD_TYPE) - if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") - add_definitions(-O3) - endif(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") -+endif() - - # For Windows - if( MSVC ) - add_definitions( /D _VARIADIC_MAX=10 ) # VS2012 does not support tuples correctly yet - add_definitions( /D _USE_MATH_DEFINES) # defines M_PI for Visual Studio - add_definitions( /D _ENABLE_EXTENDED_ALIGNED_STORAGE) # this variable must be defined with VS2017 to acknowledge alignment changes of aligned_storage -+ add_compile_options(/bigobj) - endif() - - #======================= installation ===================================== -@@ -120,19 +123,16 @@ if (Boost_MINOR_VERSION GREATER 47) - find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono REQUIRED) - endif (Boost_MINOR_VERSION GREATER 47) - include_directories(${Boost_INCLUDE_DIRS}) --set(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${Boost_LIBRARIES}) -+set(EXTERNAL_LIBS ${EXTERNAL_LIBS} Boost::headers Boost::thread Boost::filesystem Boost::system Boost::program_options Boost::date_time Boost::chrono) - - - #-------------------- - # DEPENDENCY: eigen 3 - #-------------------- --find_path(EIGEN_INCLUDE_DIR Eigen/Core -- /usr/local/include/eigen3 -- /usr/include/eigen3 --) -+find_package(Eigen3 REQUIRED CONFIG) -+set(EXTERNAL_LIBS ${EXTERNAL_LIBS} Eigen3::Eigen ) - - # Suppress Eigen's warning by adding it to the system's library --include_directories(SYSTEM "${EIGEN_INCLUDE_DIR}") - - #TODO: this should be a more standard way - #find_package(Eigen3 REQUIRED) -@@ -143,10 +143,9 @@ include_directories(SYSTEM "${EIGEN_INCLUDE_DIR}") - #-------------------- - # DEPENDENCY: nabo - #-------------------- --find_package(libnabo REQUIRED PATHS ${LIBNABO_INSTALL_DIR}) -+find_package(libnabo REQUIRED CONFIG) - #include(libnaboConfig) --include_directories(${libnabo_INCLUDE_DIRS}) --set(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${libnabo_LIBRARIES}) -+set(EXTERNAL_LIBS ${EXTERNAL_LIBS} libnabo::nabo) - message(STATUS "libnabo found, version ${libnabo_VERSION} (include=${libnabo_INCLUDE_DIRS} libs=${libnabo_LIBRARIES})") - - #-------------------- -@@ -215,8 +214,7 @@ else(USE_SYSTEM_YAML_CPP) - #get_property(yaml-cpp-pm_INCLUDE TARGET yaml-cpp-pm PROPERTY INCLUDE_DIRECTORIES) - #include_directories(${yaml-cpp-pm_INCLUDE}) - -- get_property(yaml-cpp-pm_LIB TARGET yaml-cpp-pm PROPERTY LOCATION) -- set (EXTERNAL_LIBS ${EXTERNAL_LIBS} ${yaml-cpp-pm_LIB} ) -+ set (EXTERNAL_LIBS ${EXTERNAL_LIBS} yaml-cpp-pm ) - set (EXTRA_DEPS ${EXTRA_DEPS} yaml-cpp-pm) - set(yamlcpp_FOUND) - -@@ -241,6 +239,7 @@ endif (POSIX_TIMERS AND NOT APPLE) - #========================== libpointmatcher itself ============================== - - # Check the compiler version as we need full C++11 support. -+if(0) - if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - # using Clang - if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.3") -@@ -276,6 +275,7 @@ if (CMAKE_VERSION VERSION_LESS "3.1") - else () - set (CMAKE_CXX_STANDARD 11) - endif () -+endif() - - # SOURCE - -@@ -350,12 +350,12 @@ file(GLOB_RECURSE POINTMATCHER_HEADERS "pointmatcher/*.h") - - # MacOS and Windows deal with shared/dynamic library differently. For - # simplicity, we only authorize static library in those cases. --if(APPLE OR WIN32) -+if(0) - - add_library(pointmatcher ${POINTMATCHER_SRC} ${POINTMATCHER_HEADERS} ) - install(TARGETS pointmatcher ARCHIVE DESTINATION ${INSTALL_LIB_DIR}) - --else(APPLE OR WIN32) -+else() - set(SHARED_LIBS "true" CACHE BOOL "To build shared (true) or static (false) library") - - if (SHARED_LIBS) -@@ -369,14 +369,15 @@ else(APPLE OR WIN32) - add_library(pointmatcher ${POINTMATCHER_SRC} ${POINTMATCHER_HEADERS} ) - install(TARGETS pointmatcher ARCHIVE DESTINATION ${INSTALL_LIB_DIR}) - endif(SHARED_LIBS) --endif(APPLE OR WIN32) -+ set_target_properties(pointmatcher PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) -+ target_compile_features(pointmatcher PUBLIC cxx_std_11) -+endif() - - target_include_directories(pointmatcher PRIVATE ${CMAKE_SOURCE_DIR}/pointmatcher) - target_include_directories(pointmatcher PRIVATE ${CMAKE_SOURCE_DIR}/pointmatcher/DataPointsFilters) - target_include_directories(pointmatcher PRIVATE ${CMAKE_SOURCE_DIR}/pointmatcher/DataPointsFilters/utils) - - # link all libraries to libpointmatcher --add_definitions(-Wall) - #target_link_libraries(pointmatcher ${yaml-cpp_LIBRARIES} ${libnabo_LIBRARIES}) - target_link_libraries(pointmatcher ${EXTERNAL_LIBS}) - -@@ -432,11 +433,8 @@ endif(GENERATE_API_DOC) - #=============== trigger other makefile ====================== - - # Example programs --add_subdirectory(examples) - # Evaluation programs --add_subdirectory(evaluations) - # Unit testing --add_subdirectory(utest) - - - #=================== allow find_package() ========================= -@@ -451,6 +449,7 @@ add_subdirectory(utest) - # 1- local build # - - # Register the local build in case one doesn't use "make install" -+if(0) - export(PACKAGE libpointmatcher) - - # Create variable for the local build tree -@@ -537,3 +536,4 @@ configure_file( - - add_custom_target(uninstall - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) -+endif() ---- a/contrib/CMakeLists.txt -+++ b/contrib/CMakeLists.txt -@@ -1,8 +1,6 @@ - # External libraries packed with libpointmatcher - - # GTest --include_directories(${CMAKE_CURRENT_SOURCE_DIR}) --add_library(gtest gtest/gtest-all.cc) - - # Wrapped yaml-cpp - if(NOT USE_SYSTEM_YAML_CPP) ---- a/contrib/yaml-cpp-pm/CMakeLists.txt -+++ b/contrib/yaml-cpp-pm/CMakeLists.txt -@@ -19,7 +19,6 @@ set(YAML_CPP_BUILD_CONTRIB OFF) - # --> General - # see http://www.cmake.org/cmake/help/cmake2.6docs.html#variable:BUILD_SHARED_LIBS - # http://www.cmake.org/cmake/help/cmake2.6docs.html#command:add_library --set(BUILD_SHARED_LIBS OFF) - - # --> Apple - option(APPLE_UNIVERSAL_BIN "Apple: Build universal binary" OFF) -@@ -55,7 +54,6 @@ endif() - - if(WIN32) - if(BUILD_SHARED_LIBS) -- add_definitions(-D${PROJECT_NAME}_DLL) # use or build Windows DLL - endif() - if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "C:/") -@@ -63,7 +61,7 @@ if(WIN32) - endif() - - # GCC / Clang specialities --if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") -+if(0) - ### General stuff - if(WIN32) - set(CMAKE_SHARED_LIBRARY_PREFIX "") # DLLs do not have a "lib" prefix -@@ -105,7 +103,7 @@ endif() - ### - ### Library - ### --add_library(yaml-cpp-pm -+add_library(yaml-cpp-pm OBJECT - ${sources} - ${public_headers} - ${private_headers} -@@ -113,6 +111,9 @@ add_library(yaml-cpp-pm - ${contrib_public_headers} - ${contrib_private_headers} - ) -+if(BUILD_SHARED_LIBS) -+ set_target_properties(yaml-cpp-pm PROPERTIES POSITION_INDEPENDENT_CODE ON) -+endif() - - set_target_properties(yaml-cpp-pm PROPERTIES - VERSION "${YAML_CPP_VERSION}" diff --git a/recipes/libpointmatcher/all/patches/1.4.3-0001-fix-cmake.patch b/recipes/libpointmatcher/all/patches/1.4.3-0001-fix-cmake.patch new file mode 100644 index 0000000000000..50590958948df --- /dev/null +++ b/recipes/libpointmatcher/all/patches/1.4.3-0001-fix-cmake.patch @@ -0,0 +1,109 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0acebe3..b17f3d5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.10.2) ++cmake_minimum_required(VERSION 3.15) + + include(GNUInstallDirs) # populate CMAKE_INSTALL_{LIB,BIN}DIR + include(CheckSymbolExists) +@@ -9,8 +9,6 @@ include(CMakePackageConfigHelpers) + # Project details / setup + #======================== + +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) # add -fPIC as required +- + # Extract version from header, done first to satisfy CMP0048, + # see `cmake --help-policy CMP0048` for more information. + file( +@@ -51,6 +49,7 @@ if( BUILD_32 ) + endif() + + # Ensure proper build type ++if(0) + if (NOT CMAKE_BUILD_TYPE) + message("-- No build type specified; defaulting to CMAKE_BUILD_TYPE=Release.") + set(CMAKE_BUILD_TYPE Release CACHE STRING +@@ -64,6 +63,7 @@ else () + message("\n=================================================================================") + endif () + endif () ++endif() + + + #================= extra building definitions ============================== +@@ -110,9 +110,6 @@ endforeach() + # initially + set(EXTERNAL_LIBS "") + +-# compile local version of gtest +-add_subdirectory(contrib) +- + #--------------------------- + # DEPENDENCY: POSIX Threads + #--------------------------- +@@ -134,22 +131,10 @@ endif () + #-------------------- + # DEPENDENCY: eigen 3 + #-------------------- +-find_path(EIGEN_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library +- HINTS ENV EIGEN3_INC_DIR +- ENV EIGEN3_DIR +- PATHS Eigen/Core +- /usr/local/include +- /usr/include +- PATH_SUFFIXES include eigen3 eigen +- DOC "Directory containing the Eigen3 header files" +-) + + # Suppress Eigen's warning by adding it to the system's library +-include_directories(SYSTEM "${EIGEN_INCLUDE_DIR}") +- +-#TODO: this should be a more standard way +-#find_package(Eigen3 REQUIRED) +-#message("-- eigen3 , version ${EIGEN_VERSION}") ++find_package(Eigen3 REQUIRED) ++set(EXTERNAL_LIBS ${EXTERNAL_LIBS} Eigen3::Eigen ) + + + +@@ -158,7 +143,7 @@ include_directories(SYSTEM "${EIGEN_INCLUDE_DIR}") + #-------------------- + if (NOT TARGET nabo) + # Find libnabo: +- find_package(libnabo REQUIRED PATHS ${LIBNABO_INSTALL_DIR}) ++ find_package(libnabo REQUIRED PATHS) + if (TARGET libnabo::nabo) + set(libnabo_LIBRARIES libnabo::nabo) + message(STATUS "libnabo found, version ${libnabo_VERSION} (Config mode, libs=${libnabo_LIBRARIES})") +@@ -238,6 +223,7 @@ check_symbol_exists(_POSIX_TIMERS "unistd.h;time.h" POSIX_TIMERS) + #========================== libpointmatcher itself ============================== + + # Check the compiler version as we need full C++17 support. ++if(0) + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + # using Clang + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5") +@@ -273,6 +259,7 @@ if (CMAKE_VERSION VERSION_LESS "3.8") + else () + set (CMAKE_CXX_STANDARD 17) + endif () ++endif () + + # SOURCE + +@@ -483,7 +470,7 @@ endif() + # include_directories(${libpointmatcher_INCLUDE_DIRS}) + # target_link_libraries(executableName ${libpointmatcher_LIBRARIES}) + # ... +- ++if(0) + # 1- local build # + + # Install cmake config module +@@ -574,3 +561,4 @@ if (NOT TARGET uninstall) + add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) + endif() ++endif() diff --git a/recipes/libpointmatcher/all/patches/1.4.3-0002-fix-const-error.patch b/recipes/libpointmatcher/all/patches/1.4.3-0002-fix-const-error.patch new file mode 100644 index 0000000000000..1dd09a84875d2 --- /dev/null +++ b/recipes/libpointmatcher/all/patches/1.4.3-0002-fix-const-error.patch @@ -0,0 +1,13 @@ +diff --git a/pointmatcher/PointCloudGenerator.cpp b/pointmatcher/PointCloudGenerator.cpp +index d084dd2..739995b 100644 +--- a/pointmatcher/PointCloudGenerator.cpp ++++ b/pointmatcher/PointCloudGenerator.cpp +@@ -170,7 +170,7 @@ typename PointMatcher::DataPoints PointMatcher::PointCloudGenerator::gener + { + // Sample random values of theta and phi. + const ScalarType phi{ 2.0f * pi * uniformDistribution(randomNumberGenerator) }; +- const ScalarType radiusSample{ radius * sqrt(uniformDistribution(randomNumberGenerator)) }; ++ const ScalarType radiusSample{ static_cast(radius * sqrt(uniformDistribution(randomNumberGenerator))) }; + + // Pre-compute values, such as sine and cosine of phi and theta. + const ScalarType sinPhi{ std::sin(phi) }; diff --git a/recipes/libpointmatcher/config.yml b/recipes/libpointmatcher/config.yml index 59334d5077368..91b545dcd8ee8 100644 --- a/recipes/libpointmatcher/config.yml +++ b/recipes/libpointmatcher/config.yml @@ -1,3 +1,3 @@ versions: - "1.3.1": + "1.4.3": folder: all diff --git a/recipes/libpq/all/conanfile.py b/recipes/libpq/all/conanfile.py index 3980215f4b1d7..03fae8567c8cd 100644 --- a/recipes/libpq/all/conanfile.py +++ b/recipes/libpq/all/conanfile.py @@ -16,11 +16,12 @@ class LibpqConan(ConanFile): name = "libpq" description = "The library used by all the standard PostgreSQL tools." - topics = ("libpq", "postgresql", "database", "db") + topics = ("postgresql", "database", "db") url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.postgresql.org/docs/current/static/libpq.html" license = "PostgreSQL" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -243,7 +244,7 @@ def package(self): autotools.install() with chdir(self, os.path.join(self.source_folder, "src", "bin", "pg_config")): autotools.install() - copy(self, "*.h", src=os.path.join(self.build_folder, "src", "include", "catalog"), + copy(self, "*.h", src=os.path.join(self.source_folder, "src", "include", "catalog"), dst=os.path.join(self.package_folder, "include", "catalog")) rmdir(self, os.path.join(self.package_folder, "share")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) diff --git a/recipes/libpqxx/all/conandata.yml b/recipes/libpqxx/all/conandata.yml index 0a09eba2c892d..50ce1231a555d 100644 --- a/recipes/libpqxx/all/conandata.yml +++ b/recipes/libpqxx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.9.2": + url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.9.2.tar.gz" + sha256: "e37d5774c39f6c802e32d7f418e88b8e530404fb54758516e884fc0ebdee6da4" "7.9.1": url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.9.1.tar.gz" sha256: "4fafd63009b1d6c2b64b8c184c04ae4d1f7aa99d8585154832d28012bae5b0b6" @@ -30,6 +33,10 @@ sources: url: "https://github.com/jtv/libpqxx/archive/6.4.8.tar.gz" sha256: "3f7aba951822e01f1b9f9f353702954773323dd9f9dc376ffb57cb6bbd9a7a2f" patches: + "7.9.2": + - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" "7.9.1": - patch_file: "patches/0001-cmake-fix-module.patch" patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." diff --git a/recipes/libpqxx/config.yml b/recipes/libpqxx/config.yml index f6402ea576565..5c0e478232496 100644 --- a/recipes/libpqxx/config.yml +++ b/recipes/libpqxx/config.yml @@ -1,4 +1,6 @@ versions: + "7.9.2": + folder: all "7.9.1": folder: all "7.9.0": diff --git a/recipes/libqasm/all/conandata.yml b/recipes/libqasm/all/conandata.yml index 8ef190015c47b..11f0ecaaf3931 100644 --- a/recipes/libqasm/all/conandata.yml +++ b/recipes/libqasm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.6.7": + url: "https://github.com/QuTech-Delft/libqasm/archive/refs/tags/0.6.7.tar.gz" + sha256: "3e85be4f433b178b89e32bc738bd4f69266cd1c4ad0ed12b5367381ac6e44eb2" "0.6.6": url: "https://github.com/QuTech-Delft/libqasm/archive/refs/tags/0.6.6.tar.gz" sha256: "b3a2d1670f8865ce22bcc62c6a696ee7e0764a7b76901a4f082efa2287e0cbad" diff --git a/recipes/libqasm/all/conanfile.py b/recipes/libqasm/all/conanfile.py index 4eeedc606ece2..142f8f4210203 100644 --- a/recipes/libqasm/all/conanfile.py +++ b/recipes/libqasm/all/conanfile.py @@ -70,7 +70,7 @@ def build_requirements(self): if self.settings.arch == "wasm": self.tool_requires("emsdk/3.1.50") if self._should_build_test: - self.test_requires("gtest/1.14.0") + self.test_requires("gtest/1.15.0") if self.options.build_python: self.tool_requires("cpython/3.12.2") @@ -86,9 +86,13 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires antlr4-cppruntime to be built with the same shared option value.") def requirements(self): - self.requires("fmt/10.2.1", transitive_headers=True) + if Version(self.version) < "0.6.7": + self.requires("fmt/10.2.1", transitive_headers=True) + self.requires("tree-gen/1.0.7", transitive_headers=True, transitive_libs=True) + else: + self.requires("fmt/11.0.2", transitive_headers=True) + self.requires("tree-gen/1.0.8", transitive_headers=True, transitive_libs=True) self.requires("range-v3/0.12.0", transitive_headers=True) - self.requires("tree-gen/1.0.7", transitive_headers=True, transitive_libs=True) if not self.settings.arch == "wasm": self.requires("antlr4-cppruntime/4.13.1", transitive_headers=True) diff --git a/recipes/libqasm/config.yml b/recipes/libqasm/config.yml index 9948b2cad2840..70cd514abf1d8 100644 --- a/recipes/libqasm/config.yml +++ b/recipes/libqasm/config.yml @@ -1,4 +1,6 @@ versions: + "0.6.7": + folder: all "0.6.6": folder: all "0.6.5": diff --git a/recipes/librdkafka/all/conandata.yml b/recipes/librdkafka/all/conandata.yml index 5b70b2f07d19f..8eee4feaf9f9f 100644 --- a/recipes/librdkafka/all/conandata.yml +++ b/recipes/librdkafka/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.5.3": + url: "https://github.com/edenhill/librdkafka/archive/v2.5.3.tar.gz" + sha256: "eaa1213fdddf9c43e28834d9a832d9dd732377d35121e42f875966305f52b8ff" + "2.5.0": + url: "https://github.com/edenhill/librdkafka/archive/v2.5.0.tar.gz" + sha256: "3dc62de731fd516dfb1032861d9a580d4d0b5b0856beb0f185d06df8e6c26259" "2.4.0": url: "https://github.com/edenhill/librdkafka/archive/v2.4.0.tar.gz" sha256: "d645e47d961db47f1ead29652606a502bdd2a880c85c1e060e94eea040f1a19a" @@ -15,6 +21,24 @@ sources: url: "https://github.com/edenhill/librdkafka/archive/v1.9.2.tar.gz" sha256: "3fba157a9f80a0889c982acdd44608be8a46142270a389008b22d921be1198ad" patches: + "2.5.3": + - patch_file: patches/0001-Change-library-names-1-9-1.patch + patch_description: "find_package conan packages" + patch_type: "conan" + - patch_file: patches/0002-Change-library-targets-and-result-variables-2-5-0.patch + patch_description: "refer conan package names" + patch_type: "conan" + "2.5.0": + - patch_file: patches/0001-Change-library-names-1-9-1.patch + patch_description: "find_package conan packages" + patch_type: "conan" + - patch_file: patches/0002-Change-library-targets-and-result-variables-2-5-0.patch + patch_description: "refer conan package names" + patch_type: "conan" + - patch_file: patches/0003-add-forward-declaration-2-5-0.patch + patch_description: "add forward declarations to fix compilation without ssl" + patch_type: "official" + patch_source: "https://github.com/confluentinc/librdkafka/pull/4794/" "2.4.0": - patch_file: patches/0001-Change-library-names-1-9-1.patch patch_description: "find_package conan packages" diff --git a/recipes/librdkafka/all/conanfile.py b/recipes/librdkafka/all/conanfile.py index 90bfc657a8ab8..d7bc2435f6766 100644 --- a/recipes/librdkafka/all/conanfile.py +++ b/recipes/librdkafka/all/conanfile.py @@ -3,6 +3,8 @@ from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.gnu import PkgConfigDeps +from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc import os required_conan_version = ">=1.55.0" @@ -29,6 +31,7 @@ class LibrdkafkaConan(ConanFile): "ssl": [True, False], "sasl": [True, False], "curl": [True, False], + "syslog": [True, False], } default_options = { "shared": False, @@ -39,6 +42,7 @@ class LibrdkafkaConan(ConanFile): "ssl": False, "sasl": False, "curl": False, + "syslog": False, } @property @@ -51,6 +55,8 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if is_msvc(self): + del self.options.syslog def configure(self): if self.options.shared: @@ -98,6 +104,8 @@ def generate(self): tc.variables["WITH_SASL"] = self.options.sasl tc.variables["ENABLE_LZ4_EXT"] = True tc.variables["WITH_CURL"] = self.options.curl + tc.variables["WITH_SNAPPY"] = True + tc.preprocessor_definitions["WITH_SYSLOG"] = "1" if self.options.get_safe("syslog") else "0" tc.generate() cd = CMakeDeps(self) diff --git a/recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-2-5-0.patch b/recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-2-5-0.patch new file mode 100644 index 0000000000000..a862544f4da08 --- /dev/null +++ b/recipes/librdkafka/all/patches/0002-Change-library-targets-and-result-variables-2-5-0.patch @@ -0,0 +1,26 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index bbe63cf..44df7d1 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -224,9 +224,9 @@ if(WITH_ZLIB) + endif() + + if(WITH_ZSTD) +- target_link_libraries(rdkafka PRIVATE ${ZSTD_LIBRARY}) +- target_include_directories(rdkafka PRIVATE ${ZSTD_INCLUDE_DIR}) +- message(STATUS "Found ZSTD: ${ZSTD_LIBRARY}") ++ target_link_libraries(rdkafka PRIVATE $,zstd::libzstd_shared,zstd::libzstd_static>) ++# target_include_directories(rdkafka PRIVATE ${ZSTD_INCLUDE_DIR}) ++# message(STATUS "Found ZSTD: ${ZSTD_LIBRARY}") + endif() + + if(WITH_SSL) +@@ -266,7 +266,7 @@ endif() + + if(WITH_LZ4_EXT) + target_include_directories(rdkafka PRIVATE ${LZ4_INCLUDE_DIRS}) +- target_link_libraries(rdkafka PUBLIC LZ4::LZ4) ++ target_link_libraries(rdkafka PUBLIC lz4::lz4) + endif() + + if(WIN32) diff --git a/recipes/librdkafka/all/patches/0003-add-forward-declaration-2-5-0.patch b/recipes/librdkafka/all/patches/0003-add-forward-declaration-2-5-0.patch new file mode 100644 index 0000000000000..dbaef7d2d154f --- /dev/null +++ b/recipes/librdkafka/all/patches/0003-add-forward-declaration-2-5-0.patch @@ -0,0 +1,13 @@ +diff --git a/src/rdkafka_op.h b/src/rdkafka_op.h +index d79121e..d410a2b 100644 +--- a/src/rdkafka_op.h ++++ b/src/rdkafka_op.h +@@ -39,7 +39,7 @@ + typedef struct rd_kafka_q_s rd_kafka_q_t; + typedef struct rd_kafka_toppar_s rd_kafka_toppar_t; + typedef struct rd_kafka_op_s rd_kafka_op_t; +- ++typedef struct rd_kafka_broker_s rd_kafka_broker_t; + /* One-off reply queue + reply version. + * All APIs that take a rd_kafka_replyq_t makes a copy of the + * struct as-is and grabs hold of the existing .q refcount. diff --git a/recipes/librdkafka/config.yml b/recipes/librdkafka/config.yml index d9d5e85da2bcf..eeb9c91785a59 100644 --- a/recipes/librdkafka/config.yml +++ b/recipes/librdkafka/config.yml @@ -1,4 +1,8 @@ versions: + "2.5.3": + folder: all + "2.5.0": + folder: all "2.4.0": folder: all "2.3.0": diff --git a/recipes/libsndio/all/conandata.yml b/recipes/libsndio/all/conandata.yml new file mode 100644 index 0000000000000..17fe5ab522e62 --- /dev/null +++ b/recipes/libsndio/all/conandata.yml @@ -0,0 +1,8 @@ +sources: + "1.9.0": + "source": + url: "https://github.com/ratchov/sndio/archive/refs/tags/v1.9.0.tar.gz" + sha256: "4e8d77069b651d7c4bb2a50ba49004bd7fcfdfec1516f88a76457f831c17a546" + "license": + url: "https://raw.githubusercontent.com/ratchov/sndio/e10e4f836b88f8d5ea2864845e3712f560e6bed6/LICENSE" + sha256: "4ae392ab9cfbf2d6ac8522f5f4b025685d60c824979fad783aaf72d55165730f" diff --git a/recipes/libsndio/all/conanfile.py b/recipes/libsndio/all/conanfile.py new file mode 100644 index 0000000000000..adf05fa3505c4 --- /dev/null +++ b/recipes/libsndio/all/conanfile.py @@ -0,0 +1,157 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import chdir, copy, get, rmdir, replace_in_file, download +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.scm import Version +from conan.tools.build import cross_building +import os + +required_conan_version = ">=1.53.0" + + +class LibsndioConan(ConanFile): + name = "libsndio" + license = "ISC" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://sndio.org/" + topics = ("sndio", "sound", "audio", "midi") + description = ("A small audio and MIDI framework that provides a lightweight audio & MIDI server " + "and a user-space API to access either the server or the hardware directly in a uniform way.") + package_type = "shared-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "with_alsa": [True, False] + } + default_options = { + "with_alsa": True, + } + + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def validate(self): + if self.settings.os not in ["Linux", "FreeBSD"]: + raise ConanInvalidConfiguration(f"Unsupported OS for {self.ref}") + + if self.options.with_alsa and not self.dependencies["libalsa"].options.get_safe("shared", False): + raise ConanInvalidConfiguration(f"{self.ref} requires libalsa to be built as a shared library") + + def requirements(self): + if self.options.get_safe("with_alsa"): + self.requires("libalsa/1.2.10", options={"shared": True}) + + def build_requirements(self): + self.tool_requires("libtool/2.4.7") + + def source(self): + get(self, **self.conan_data["sources"][self.version]["source"], strip_root=True) + download(self, **self.conan_data["sources"][self.version]["license"], filename="LICENSE") + + # Remove all targets other than libsndio + lines = [ + "cd sndiod && ${MAKE} install", + "cd sndioctl && ${MAKE} install", + "cd aucat && ${MAKE} install", + "cd midicat && ${MAKE} install", + "cd sndiod && ${MAKE}", + "cd sndioctl && ${MAKE}", + "cd aucat && ${MAKE}", + "cd midicat && ${MAKE}" + ] + for line in lines: + replace_in_file(self, os.path.join(self.source_folder, "Makefile.in"), line, "") + + def generate(self): + virtual_build_env = VirtualBuildEnv(self) + virtual_build_env.generate() + + # Inject requires env vars in build scope + # It's required in case of native build when there is AutotoolsDeps & at least one dependency which might be shared, because configure tries to run a test executable + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + + tc = AutotoolsToolchain(self) + + # Set expected config + tc.configure_args.append("--datadir=${prefix}/res") + + # Bundled `configure` script does not support these options, so remove + exclusions = ["--enable-shared", "--disable-shared", "--disable-static", "--enable-static", "--sbindir", "--oldincludedir"] + tc.configure_args = [arg for arg in tc.configure_args if not any(exclusion in arg for exclusion in exclusions)] + + # Add alsa support + if self.options.get_safe("with_alsa"): + tc.configure_args.append("--enable-alsa") + else: + tc.configure_args.append("--disable-alsa") + + # The original project source has a hand-written `configure` script that does not expose + # many hooks for specifying additional build flags and library dependencies. Because the script is + # not auto-generated with Autotools, the standard Conan workflow of using AutoolsDeps is not possible. + # The one hook the script does provide is a command line arg: `CC=*|CFLAGS=*|LDFLAGS=*|AR=*)`. + # We use this to inject the various flags, paths, and libraries that the Conan dependency tree specifies. + dep_cflags = [] + dep_ldflags = [] + for dependency in reversed(self.dependencies.host.topological_sort.values()): + deps_cpp_info = dependency.cpp_info.aggregated_components() + + dep_cflags.extend(deps_cpp_info.cflags + deps_cpp_info.defines) + for path in deps_cpp_info.includedirs: + dep_cflags.append(f"-I{path}") + + dep_ldflags.extend(deps_cpp_info.sharedlinkflags + deps_cpp_info.exelinkflags) + for path in deps_cpp_info.libdirs: + dep_ldflags.append(f"-L{path}") + for lib in deps_cpp_info.libs + deps_cpp_info.system_libs: + dep_ldflags.append(f"-l{lib}") + + cflags = ' '.join([flag for flag in dep_cflags]) + ldflags = ' '.join([flag for flag in dep_ldflags]) + tc.configure_args.extend([ + f"CFLAGS={cflags}", + f"LDFLAGS={ldflags}" + ]) + + tc.generate() + + tc = AutotoolsDeps(self) + tc.generate() + + def build(self): + autotools = Autotools(self) + if Version(self.version) > "1.2.4": + autotools.configure() + autotools.make() + else: + with chdir(self, self.source_folder): + autotools.configure() + autotools.make() + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + if Version(self.version) > "1.2.4": + autotools = Autotools(self) + autotools.install() + else: + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "bin")) + + def package_info(self): + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "sndio") + self.cpp_info.set_property("cmake_target_name", "sndio::sndio") + self.cpp_info.set_property("pkg_config_name", "sndio") + self.cpp_info.libs = ["sndio"] + self.cpp_info.system_libs = ["dl", "m", "rt"] + + # TODO: to remove in conan v2? + self.cpp_info.names["cmake_find_package"] = "sndio" + self.cpp_info.names["cmake_find_package_multi"] = "sndio" + self.cpp_info.names["pkg_config"] = "sndio" diff --git a/recipes/plutovg/all/test_package/CMakeLists.txt b/recipes/libsndio/all/test_package/CMakeLists.txt similarity index 53% rename from recipes/plutovg/all/test_package/CMakeLists.txt rename to recipes/libsndio/all/test_package/CMakeLists.txt index 05f05dd40b2ba..29d5d52c61281 100644 --- a/recipes/plutovg/all/test_package/CMakeLists.txt +++ b/recipes/libsndio/all/test_package/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.1) project(test_package LANGUAGES C) -find_package(plutovg REQUIRED CONFIG) +find_package(sndio REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE plutovg::plutovg) +target_link_libraries(${PROJECT_NAME} PRIVATE sndio::sndio) diff --git a/recipes/libsndio/all/test_package/conanfile.py b/recipes/libsndio/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/libsndio/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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 = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + 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): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libsndio/all/test_package/test_package.c b/recipes/libsndio/all/test_package/test_package.c new file mode 100644 index 0000000000000..03387869c0a9d --- /dev/null +++ b/recipes/libsndio/all/test_package/test_package.c @@ -0,0 +1,24 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +int main(int argc, char *argv[]) { + int ch; + unsigned mode = SIO_PLAY | SIO_REC; + struct sio_hdl *hdl; + + hdl = sio_open(NULL, mode, 0); + if (hdl == NULL) { + fprintf(stderr, "sio_open() failed, but test is ok\n"); + exit(0); + } else { + printf("sio_open() success" ); + } + sio_close(hdl); + return 0; +} diff --git a/recipes/libsndio/config.yml b/recipes/libsndio/config.yml new file mode 100644 index 0000000000000..95efce85442dd --- /dev/null +++ b/recipes/libsndio/config.yml @@ -0,0 +1,3 @@ +versions: + "1.9.0": + folder: "all" diff --git a/recipes/libsvm/all/conandata.yml b/recipes/libsvm/all/conandata.yml index 4ce3fd15b7dba..0567d38d76228 100644 --- a/recipes/libsvm/all/conandata.yml +++ b/recipes/libsvm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "333": + url: "https://github.com/cjlin1/libsvm/archive/v333.tar.gz" + sha256: "ee898ca11cef85b09e059b278b3ab4ff58cd38f70169829e75b4a3cb9ddc5013" "332": url: "https://github.com/cjlin1/libsvm/archive/v332.tar.gz" sha256: "e1d7d316112d199ebd69c9695f79226d236b86e2c8d88e70cfe35fd383954ed8" diff --git a/recipes/libsvm/all/conanfile.py b/recipes/libsvm/all/conanfile.py index 5391a6c157e8a..3b312ef9f419c 100644 --- a/recipes/libsvm/all/conanfile.py +++ b/recipes/libsvm/all/conanfile.py @@ -12,19 +12,21 @@ class libsvmConan(ConanFile): name = "libsvm" description = "Libsvm is a simple, easy-to-use, and efficient software for SVM classification and regression" + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.csie.ntu.edu.tw/~cjlin/libsvm/" - license = "BSD-3-Clause" - topics = "svm", "vector" + topics = ("svm", "vector") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - } + } default_options = { "shared": False, "fPIC": True, - } + } def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) diff --git a/recipes/libsvm/config.yml b/recipes/libsvm/config.yml index c1b9e6f304394..c8909e199de65 100644 --- a/recipes/libsvm/config.yml +++ b/recipes/libsvm/config.yml @@ -1,4 +1,6 @@ versions: + "333": + folder: all "332": folder: all "330": diff --git a/recipes/libsvtav1/all/conandata.yml b/recipes/libsvtav1/all/conandata.yml index 6f34d5b9aab65..cef6d3411b8ae 100644 --- a/recipes/libsvtav1/all/conandata.yml +++ b/recipes/libsvtav1/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.2": + url: "https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v2.1.2/SVT-AV1-v2.1.2.tar.gz" + sha256: "65e90af18f31f8c8d2e9febf909a7d61f36172536abb25a7089f152210847cd9" "2.1.0": url: "https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v2.1.0/SVT-AV1-v2.1.0.tar.gz" sha256: "72a076807544f3b269518ab11656f77358284da7782cece497781ab64ed4cb8a" @@ -8,15 +11,6 @@ sources: "1.6.0": url: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.6.0/SVT-AV1-v1.6.0.tar.bz2 sha256: c6b49111a2d4c5113f1ada0c2f716d94bd4a8db704623d453066826401ecdab5 - "1.4.1": - url: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.4.1/SVT-AV1-v1.4.1.tar.bz2 - sha256: 0e988582f315fe76c909accf5e7f81b975c5bd2b850ee760d8e9fac297f70b5d - "1.3.0": - url: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.3.0/SVT-AV1-v1.3.0.tar.bz2 - sha256: f85fd13ef16880550e425797bdfdf1b0ba310c21d6b343f74ea79dd2fbb2336e - "1.2.1": - url: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.1/SVT-AV1-v1.2.1.tar.bz2 - sha256: 805827daa8aedec4f1362b959f377075e2a811680bfc76b6f4fbf2ef4e7101d4 patches: "1.7.0": - patch_file: "patches/external-cpuinfo-1.7.0.patch" @@ -28,30 +22,3 @@ patches: patch_type: "portability" patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 patch_description: "Allow compiling with external cpuinfo" - "1.4.1": - - patch_file: "patches/llvm-clang-macos.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2087 - patch_description: "Allow statically compiling on macos with llvm-clang" - - patch_file: "patches/external-cpuinfo-1.4.1.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 - patch_description: "Allow compiling with external cpuinfo" - "1.3.0": - - patch_file: "patches/llvm-clang-macos.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2087 - patch_description: "Allow statically compiling on macos with llvm-clang" - - patch_file: "patches/external-cpuinfo-1.3.0.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 - patch_description: "Allow compiling with external cpuinfo" - "1.2.1": - - patch_file: "patches/llvm-clang-macos.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2087 - patch_description: "Allow statically compiling on macos with llvm-clang" - - patch_file: "patches/external-cpuinfo-1.2.1.patch" - patch_type: "portability" - patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 - patch_description: "Allow compiling with external cpuinfo" diff --git a/recipes/libsvtav1/all/conanfile.py b/recipes/libsvtav1/all/conanfile.py index 93ab47914aaa4..4e96d05b0f57b 100644 --- a/recipes/libsvtav1/all/conanfile.py +++ b/recipes/libsvtav1/all/conanfile.py @@ -3,8 +3,9 @@ from conan.tools.cmake import cmake_layout, CMakeToolchain, CMakeDeps, CMake from conan.tools.files import copy, get, rmdir, apply_conandata_patches, export_conandata_patches from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.54.0" class SVTAV1Conan(ConanFile): @@ -39,6 +40,9 @@ def config_options(self): self.options.rm_safe("fPIC") if Version(self.version) < "2.0.0": del self.options.minimal_build + if Version(self.version) >= "2.1.1": + # https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/c949fe4f14fe288a9b2b47aa3e61335422a83645/CHANGELOG.md#211---2024-06-25 + del self.options.build_decoder def configure(self): if self.options.shared: @@ -50,11 +54,17 @@ def layout(self): def requirements(self): self.requires("cpuinfo/cci.20231129") + def validate(self): + # https://gitlab.com/AOMediaCodec/SVT-AV1/-/issues/2081 + # https://gitlab.com/AOMediaCodec/SVT-AV1/-/commit/800a81b09db1cf8c9c289ecf6f70381d7888b98c + if Version(self.version) < "1.9.0" and self.settings.os == "Android": + raise ConanInvalidConfiguration(f"{self.ref} does not support Android before version 1.9.0.") + def build_requirements(self): if Version(self.version) >= "1.3.0": self.tool_requires("cmake/[>=3.16 <4]") if self.settings.arch in ("x86", "x86_64"): - self.tool_requires("nasm/2.15.05") + self.tool_requires("nasm/2.16.01") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -62,7 +72,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_APPS"] = False - tc.variables["BUILD_DEC"] = self.options.build_decoder + if Version(self.version) < "2.1.1": + tc.variables["BUILD_DEC"] = self.options.build_decoder tc.variables["BUILD_ENC"] = self.options.build_encoder tc.variables["USE_EXTERNAL_CPUINFO"] = True if self.settings.arch in ("x86", "x86_64"): @@ -94,7 +105,7 @@ def package_info(self): self.cpp_info.components["encoder"].requires = ["cpuinfo::cpuinfo"] if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.components["encoder"].system_libs = ["pthread", "dl", "m"] - if self.options.build_decoder: + if self.options.get_safe("build_decoder"): self.cpp_info.components["decoder"].libs = ["SvtAv1Dec"] self.cpp_info.components["decoder"].includedirs = ["include/svt-av1"] self.cpp_info.components["decoder"].set_property("pkg_config_name", "SvtAv1Dec") diff --git a/recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch deleted file mode 100644 index 8e74085d78f88..0000000000000 --- a/recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9c8615541bd0a1db44ec36a761f30bd4dbb26cfb..6245acfe3e05098be57e8b1ad00126455b74e223 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -41,6 +41,11 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) - endif() - - option(COMPILE_C_ONLY "Compile only C code with no simds (autodetect, default off for x86)" OFF) -+option(USE_EXTERNAL_CPUINFO "Consume system cpuinfo library only" OFF) -+ -+if(USE_EXTERNAL_CPUINFO) -+ find_package(cpuinfo CONFIG REQUIRED) -+endif() - - include(CheckCSourceCompiles) - -@@ -542,7 +547,7 @@ endif() - - add_subdirectory(third_party/fastfeat) - --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(NOT USE_EXTERNAL_CPUINFO AND NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - add_subdirectory(third_party/cpuinfo) - endif() - -diff --git a/Source/Lib/Encoder/CMakeLists.txt b/Source/Lib/Encoder/CMakeLists.txt -index fa3e11c137638b8949faf00683233188653ddd4e..d4e8880309a9dac9e909b817e01cef31da4531b5 100644 ---- a/Source/Lib/Encoder/CMakeLists.txt -+++ b/Source/Lib/Encoder/CMakeLists.txt -@@ -131,7 +131,9 @@ set_target_properties(SvtAv1Enc PROPERTIES VERSION ${ENC_VERSION}) - set_target_properties(SvtAv1Enc PROPERTIES SOVERSION ${ENC_VERSION_MAJOR}) - set_target_properties(SvtAv1Enc PROPERTIES C_VISIBILITY_PRESET hidden) - target_link_libraries(SvtAv1Enc PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Enc PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Enc PRIVATE cpuinfo_public) - endif() - -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index 99a0bcfd62ac7f5f268d3527d0f65c688a44eb6c..d5a3ca47f948663a56dd731e457a4922677e1f78 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -85,7 +85,7 @@ set(lib_list - $ - $ - $ -- cpuinfo_public -+ $,cpuinfo::cpuinfo,cpuinfo_public> - gtest_all) - if(UNIX) - # App Source Files -diff --git a/Source/Lib/Decoder/CMakeLists.txt b/Source/Lib/Decoder/CMakeLists.txt -index ca7e51f2c2c1ec12695a0c1dd5ef90bc259edb1d..bdac723c418f619ceee2dbd7a52d9fc4ac395dc8 100644 ---- a/Source/Lib/Decoder/CMakeLists.txt -+++ b/Source/Lib/Decoder/CMakeLists.txt -@@ -100,7 +100,9 @@ set_target_properties(SvtAv1Dec PROPERTIES SOVERSION ${DEC_VERSION_MAJOR}) - set_target_properties(SvtAv1Dec PROPERTIES C_VISIBILITY_PRESET hidden) - add_dependencies(SvtAv1Dec EbVersionHeaderGen) - target_link_libraries(SvtAv1Dec PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Dec PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Dec PRIVATE cpuinfo_public) - endif() - diff --git a/recipes/libsvtav1/all/patches/external-cpuinfo-1.3.0.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.3.0.patch deleted file mode 100644 index 8540fba08ffe5..0000000000000 --- a/recipes/libsvtav1/all/patches/external-cpuinfo-1.3.0.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index f98c8675acc06b3c998f29fcc712ac8befcda129..f464ead3ea55bacd71451a24252cbaf33194292c 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -151,7 +151,7 @@ set(lib_list - $ - $ - $ -- cpuinfo_public -+ $,cpuinfo::cpuinfo,cpuinfo_public> - gtest_all) - if(UNIX) - # App Source Files -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2c7c8d67f6ce94e74b685a3494b0430b60f80105..f7f0dbe1f480060aebd5ccd9b62969ab4a69449a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -41,6 +41,11 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) - endif() - - option(COMPILE_C_ONLY "Compile only C code with no simds (autodetect, default off for x86)" OFF) -+option(USE_EXTERNAL_CPUINFO "Consume system cpuinfo library only" OFF) -+ -+if(USE_EXTERNAL_CPUINFO) -+ find_package(cpuinfo CONFIG REQUIRED) -+endif() - - include(CheckCSourceCompiles) - -@@ -542,7 +547,7 @@ endif() - - add_subdirectory(third_party/fastfeat) - --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(NOT USE_EXTERNAL_CPUINFO AND NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - add_subdirectory(third_party/cpuinfo) - endif() - -diff --git a/Source/Lib/Encoder/CMakeLists.txt b/Source/Lib/Encoder/CMakeLists.txt -index 2991364b7d12dd846ff981c86306d9d2b46cc934..0c0ee78b869c0c875eb36fce4706b6fd3f1c9b7c 100644 ---- a/Source/Lib/Encoder/CMakeLists.txt -+++ b/Source/Lib/Encoder/CMakeLists.txt -@@ -129,7 +129,9 @@ set_target_properties(SvtAv1Enc PROPERTIES VERSION ${ENC_VERSION}) - set_target_properties(SvtAv1Enc PROPERTIES SOVERSION ${ENC_VERSION_MAJOR}) - set_target_properties(SvtAv1Enc PROPERTIES C_VISIBILITY_PRESET hidden) - target_link_libraries(SvtAv1Enc PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Enc PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Enc PRIVATE cpuinfo_public) - endif() - -diff --git a/Source/Lib/Decoder/CMakeLists.txt b/Source/Lib/Decoder/CMakeLists.txt -index 0f220a78a6db783ef2b5d6dd6cc182766c4362a3..8fb88f1c958fa965bc8f9ed9c1d563ee3858baee 100644 ---- a/Source/Lib/Decoder/CMakeLists.txt -+++ b/Source/Lib/Decoder/CMakeLists.txt -@@ -147,7 +147,9 @@ set_target_properties(SvtAv1Dec PROPERTIES SOVERSION ${DEC_VERSION_MAJOR}) - set_target_properties(SvtAv1Dec PROPERTIES C_VISIBILITY_PRESET hidden) - add_dependencies(SvtAv1Dec EbVersionHeaderGen) - target_link_libraries(SvtAv1Dec PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Dec PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Dec PRIVATE cpuinfo_public) - endif() - diff --git a/recipes/libsvtav1/all/patches/external-cpuinfo-1.4.1.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.4.1.patch deleted file mode 100644 index 6673e558c5c3e..0000000000000 --- a/recipes/libsvtav1/all/patches/external-cpuinfo-1.4.1.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index f98c8675acc06b3c998f29fcc712ac8befcda129..f464ead3ea55bacd71451a24252cbaf33194292c 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -151,7 +151,7 @@ set(lib_list - $ - $ - $ -- cpuinfo_public -+ $,cpuinfo::cpuinfo,cpuinfo_public> - gtest_all) - if(UNIX) - # App Source Files -diff --git a/Source/Lib/Decoder/CMakeLists.txt b/Source/Lib/Decoder/CMakeLists.txt -index 0f220a78a6db783ef2b5d6dd6cc182766c4362a3..8fb88f1c958fa965bc8f9ed9c1d563ee3858baee 100644 ---- a/Source/Lib/Decoder/CMakeLists.txt -+++ b/Source/Lib/Decoder/CMakeLists.txt -@@ -147,7 +147,9 @@ set_target_properties(SvtAv1Dec PROPERTIES SOVERSION ${DEC_VERSION_MAJOR}) - set_target_properties(SvtAv1Dec PROPERTIES C_VISIBILITY_PRESET hidden) - add_dependencies(SvtAv1Dec EbVersionHeaderGen) - target_link_libraries(SvtAv1Dec PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Dec PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Dec PRIVATE cpuinfo_public) - endif() - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 48953de55693cd1f51a7260b84d4e9da1e463cd5..9899442e29eb5e8d3675de68ebfa296a9045f917 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -41,6 +41,11 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) - endif() - - option(COMPILE_C_ONLY "Compile only C code with no simds (autodetect, default off for x86)" OFF) -+option(USE_EXTERNAL_CPUINFO "Consume system cpuinfo library only" OFF) -+ -+if(USE_EXTERNAL_CPUINFO) -+ find_package(cpuinfo CONFIG REQUIRED) -+endif() - - include(CheckCSourceCompiles) - -@@ -590,7 +595,7 @@ endif() - - add_subdirectory(third_party/fastfeat) - --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(NOT USE_EXTERNAL_CPUINFO AND NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - add_subdirectory(third_party/cpuinfo) - endif() - -diff --git a/Source/Lib/Encoder/CMakeLists.txt b/Source/Lib/Encoder/CMakeLists.txt -index 12badfd32963989a0e6a7e181321c9a6b527706b..6ed1ca0cce8f13c536899fc16d6eaa3458f7de8c 100644 ---- a/Source/Lib/Encoder/CMakeLists.txt -+++ b/Source/Lib/Encoder/CMakeLists.txt -@@ -129,7 +129,9 @@ set_target_properties(SvtAv1Enc PROPERTIES VERSION ${ENC_VERSION}) - set_target_properties(SvtAv1Enc PROPERTIES SOVERSION ${ENC_VERSION_MAJOR}) - set_target_properties(SvtAv1Enc PROPERTIES C_VISIBILITY_PRESET hidden) - target_link_libraries(SvtAv1Enc PUBLIC ${PLATFORM_LIBS}) --if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) -+if(USE_EXTERNAL_CPUINFO) -+ target_link_libraries(SvtAv1Enc PRIVATE cpuinfo::cpuinfo) -+elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) - target_link_libraries(SvtAv1Enc PRIVATE cpuinfo_public) - endif() - diff --git a/recipes/libsvtav1/all/test_package/CMakeLists.txt b/recipes/libsvtav1/all/test_package/CMakeLists.txt index c3bbcf04d632f..9a816703844c2 100644 --- a/recipes/libsvtav1/all/test_package/CMakeLists.txt +++ b/recipes/libsvtav1/all/test_package/CMakeLists.txt @@ -1,8 +1,11 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) find_package(libsvtav1 REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE libsvtav1::encoder) -target_link_libraries(${PROJECT_NAME} PRIVATE libsvtav1::decoder) +if (TARGET libsvtav1::decoder) + target_link_libraries(${PROJECT_NAME} PRIVATE libsvtav1::decoder) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_DECODER) +endif() diff --git a/recipes/libsvtav1/all/test_package/test_package.cpp b/recipes/libsvtav1/all/test_package/test_package.cpp index cb808440d268e..bb98a869a2556 100644 --- a/recipes/libsvtav1/all/test_package/test_package.cpp +++ b/recipes/libsvtav1/all/test_package/test_package.cpp @@ -1,5 +1,7 @@ #include "EbSvtAv1Enc.h" -#include "EbSvtAv1Dec.h" +#ifdef HAVE_DECODER +# include "EbSvtAv1Dec.h" +#endif #include diff --git a/recipes/libsvtav1/config.yml b/recipes/libsvtav1/config.yml index efc6420082e04..510ab3b3cd3f2 100644 --- a/recipes/libsvtav1/config.yml +++ b/recipes/libsvtav1/config.yml @@ -1,13 +1,9 @@ versions: + "2.1.2": + folder: all "2.1.0": folder: all "1.7.0": folder: all "1.6.0": folder: all - "1.4.1": - folder: all - "1.3.0": - folder: all - "1.2.1": - folder: all diff --git a/recipes/libsystemd/all/conandata.yml b/recipes/libsystemd/all/conandata.yml index 28098a76fd075..ebdc4097aca58 100644 --- a/recipes/libsystemd/all/conandata.yml +++ b/recipes/libsystemd/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "255.10": + url: "https://github.com/systemd/systemd-stable/archive/v255.10.tar.gz" + sha256: "1747b848e68223597abb90ca2758b25230ac4c19e252e9ec77c8518750f621ed" "255.7": url: "https://github.com/systemd/systemd-stable/archive/v255.7.tar.gz" sha256: "da29f2490c192ca743511098b1d15e385b1b5e7744979661dc30514c1ac61f0e" @@ -18,6 +21,10 @@ sources: url: "https://github.com/systemd/systemd-stable/archive/v253.6.tar.gz" sha256: "a0aebcfaa2e001a4d846691631d1722c4cfa1a175e4ea62db6edca0ea3cf1e3e" patches: + "255.10": + - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" + patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" + patch_type: "conan" "255.7": - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" diff --git a/recipes/libsystemd/config.yml b/recipes/libsystemd/config.yml index 9218790a9e1ee..f9ba7f3698786 100644 --- a/recipes/libsystemd/config.yml +++ b/recipes/libsystemd/config.yml @@ -1,4 +1,6 @@ versions: + "255.10": + folder: all "255.7": folder: all "255.2": diff --git a/recipes/liburing/all/conandata.yml b/recipes/liburing/all/conandata.yml index f516fa5c32370..c4fd823c644aa 100644 --- a/recipes/liburing/all/conandata.yml +++ b/recipes/liburing/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.7": + url: "https://github.com/axboe/liburing/archive/liburing-2.7.tar.gz" + sha256: "56202ad443c50e684dde3692819be3b91bbe003e1c14bf5abfa11973669978c1" "2.6": url: "https://github.com/axboe/liburing/archive/liburing-2.6.tar.gz" sha256: "682f06733e6db6402c1f904cbbe12b94942a49effc872c9e01db3d7b180917cc" @@ -24,6 +27,10 @@ sources: url: "https://github.com/axboe/liburing/archive/liburing-0.7.tar.gz" sha256: "8e2842cfe947f3a443af301bdd6d034455536c38a455c7a700d0c1ad165a7543" patches: + "2.7": + - patch_file: "patches/liburing-2.4-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" "2.6": - patch_file: "patches/liburing-2.4-disable_samples_and_tests.patch" patch_description: "Disable tests and samples as it might not work while cross-compiling" diff --git a/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch b/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch index f3b6165682fd2..beb6f175e2861 100644 --- a/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch +++ b/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch @@ -2,12 +2,11 @@ diff --git a/Makefile b/Makefile index 73d021c..74aa8d7 100644 --- a/Makefile +++ b/Makefile -@@ -8,8 +8,6 @@ default: all +@@ -8,6 +8,4 @@ default: all all: @$(MAKE) -C src - @$(MAKE) -C test - @$(MAKE) -C examples - .PHONY: all install default clean test - .PHONY: FORCE cscope + \ No newline at end of file diff --git a/recipes/liburing/config.yml b/recipes/liburing/config.yml index 72a1f513df458..d8d4acd12f991 100644 --- a/recipes/liburing/config.yml +++ b/recipes/liburing/config.yml @@ -1,4 +1,6 @@ versions: + "2.7": + folder: all "2.6": folder: all "2.5": diff --git a/recipes/libvpx/all/conandata.yml b/recipes/libvpx/all/conandata.yml index a3d16e2c79679..556d9f33bcae4 100644 --- a/recipes/libvpx/all/conandata.yml +++ b/recipes/libvpx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.14.1": + url: "https://github.com/webmproject/libvpx/archive/refs/tags/v1.14.1.tar.gz" + sha256: "901747254d80a7937c933d03bd7c5d41e8e6c883e0665fadcb172542167c7977" "1.14.0": url: "https://github.com/webmproject/libvpx/archive/refs/tags/v1.14.0.tar.gz" sha256: "5f21d2db27071c8a46f1725928a10227ae45c5cd1cad3727e4aafbe476e321fa" @@ -11,9 +14,6 @@ sources: "1.10.0": url: "https://github.com/webmproject/libvpx/archive/refs/tags/v1.10.0.tar.gz" sha256: "85803ccbdbdd7a3b03d930187cb055f1353596969c1f92ebec2db839fa4f834a" - "1.9.0": - url: "https://github.com/webmproject/libvpx/archive/refs/tags/v1.9.0.tar.gz" - sha256: "d279c10e4b9316bf11a570ba16c3d55791e1ad6faa4404c67422eb631782c80a" patches: "1.11.0": - patch_file: "patches/0001-extended-support-1.10.0.patch" @@ -25,12 +25,3 @@ patches: patch_type: "portability" patch_description: "Add support for more compilers" patch_source: "https://github.com/webmproject/libvpx/commit/cafe7cc1f10cfea74edb2ded7c3df2d69fcf1eee" - "1.9.0": - - patch_file: "patches/0001-extended-support-1.9.0.patch" - patch_type: "portability" - patch_description: "Add support for more compilers" - patch_source: "https://github.com/webmproject/libvpx/commit/cafe7cc1f10cfea74edb2ded7c3df2d69fcf1eee" - - patch_file: "patches/0002-msvc_conan_build.patch" - patch_type: "portability" - patch_description: "Add support for more compilers" - patch_source: "https://github.com/webmproject/libvpx/commit/04086a30664d2a3e89d6a6e4e1c18f1a82c8f958" diff --git a/recipes/libvpx/all/conanfile.py b/recipes/libvpx/all/conanfile.py index 3752a16f55fa7..babc16fe80346 100644 --- a/recipes/libvpx/all/conanfile.py +++ b/recipes/libvpx/all/conanfile.py @@ -60,6 +60,9 @@ def configure(self): self.package_type = "static-library" if self.options.get_safe("shared"): self.options.rm_safe("fPIC") + if self.settings.os == "Android": + del self.options.shared + self.package_type = "static-library" def layout(self): basic_layout(self, src_folder="src") diff --git a/recipes/libvpx/all/patches/0001-extended-support-1.9.0.patch b/recipes/libvpx/all/patches/0001-extended-support-1.9.0.patch deleted file mode 100644 index 7e10a765c149c..0000000000000 --- a/recipes/libvpx/all/patches/0001-extended-support-1.9.0.patch +++ /dev/null @@ -1,58 +0,0 @@ ---- a/build/make/gen_msvs_sln.sh -+++ b/build/make/gen_msvs_sln.sh -@@ -219,6 +219,7 @@ for opt in "$@"; do - 14) vs_year=2015 ;; - 15) vs_year=2017 ;; - 16) vs_year=2019 ;; -+ 17) vs_year=2022 ;; - *) die Unrecognized Visual Studio Version in $opt ;; - esac - ;; -@@ -232,7 +233,7 @@ done - outfile=${outfile:-/dev/stdout} - mkoutfile=${mkoutfile:-/dev/stdout} - case "${vs_ver}" in -- 1[4-6]) -+ 1[4-7]) - # VS has used Format Version 12.00 continuously since vs11. - sln_vers="12.00" - sln_vers_str="Visual Studio ${vs_year}" ---- a/build/make/gen_msvs_vcxproj.sh -+++ b/build/make/gen_msvs_vcxproj.sh -@@ -168,7 +168,7 @@ for opt in "$@"; do - --ver=*) - vs_ver="$optval" - case "$optval" in -- 1[4-6]) -+ 1[4-7]) - ;; - *) die Unrecognized Visual Studio Version in $opt - ;; -@@ -342,6 +342,9 @@ generate_vcxproj() { - if [ "$vs_ver" = "16" ]; then - tag_content PlatformToolset v142 - fi -+ if [ "$vs_ver" = "17" ]; then -+ tag_content PlatformToolset v143 -+ fi - tag_content CharacterSet Unicode - if [ "$config" = "Release" ]; then - tag_content WholeProgramOptimization true ---- a/configure -+++ b/configure -@@ -138,6 +138,7 @@ all_platforms="${all_platforms} x86-win32-gcc" - all_platforms="${all_platforms} x86-win32-vs14" - all_platforms="${all_platforms} x86-win32-vs15" - all_platforms="${all_platforms} x86-win32-vs16" -+all_platforms="${all_platforms} x86-win32-vs17" - all_platforms="${all_platforms} x86_64-android-gcc" - all_platforms="${all_platforms} x86_64-darwin9-gcc" - all_platforms="${all_platforms} x86_64-darwin10-gcc" -@@ -158,6 +159,7 @@ all_platforms="${all_platforms} x86_64-win64-gcc" - all_platforms="${all_platforms} x86_64-win64-vs14" - all_platforms="${all_platforms} x86_64-win64-vs15" - all_platforms="${all_platforms} x86_64-win64-vs16" -+all_platforms="${all_platforms} x86_64-win64-vs17" - all_platforms="${all_platforms} generic-gnu" - - # all_targets is a list of all targets that can be configured diff --git a/recipes/libvpx/all/patches/0002-msvc_conan_build.patch b/recipes/libvpx/all/patches/0002-msvc_conan_build.patch deleted file mode 100644 index 28885c1c83394..0000000000000 --- a/recipes/libvpx/all/patches/0002-msvc_conan_build.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/build/make/msvs_common.sh b/build/make/msvs_common.sh -index 27ddf7f..da462ec 100644 ---- a/build/make/msvs_common.sh -+++ b/build/make/msvs_common.sh -@@ -9,7 +9,7 @@ - ## be found in the AUTHORS file in the root of the source tree. - ## - --if [ "$(uname -o 2>/dev/null)" = "Cygwin" ] \ -+if [ "$(uname -o 2>/dev/null)" = "Cygwin" ] || [ "$(uname -o 2>/dev/null)" = "Msys" ]\ - && cygpath --help >/dev/null 2>&1; then - FIXPATH='cygpath -m' - else diff --git a/recipes/libvpx/config.yml b/recipes/libvpx/config.yml index e7a6e4fc3010b..33ef774be6ba3 100644 --- a/recipes/libvpx/config.yml +++ b/recipes/libvpx/config.yml @@ -1,4 +1,6 @@ versions: + "1.14.1": + folder: all "1.14.0": folder: all "1.13.1": @@ -7,5 +9,3 @@ versions: folder: all "1.10.0": folder: all - "1.9.0": - folder: all diff --git a/recipes/libwebm/all/conandata.yml b/recipes/libwebm/all/conandata.yml index 18c5b099c2c71..db15e75e26a4f 100644 --- a/recipes/libwebm/all/conandata.yml +++ b/recipes/libwebm/all/conandata.yml @@ -1,5 +1,7 @@ sources: - '1.0.0.31': - url: 'https://chromium.googlesource.com/webm/libwebm/+archive/libwebm-1.0.0.31.tar.gz' - '1.0.0.30': - url: 'https://chromium.googlesource.com/webm/libwebm/+archive/libwebm-1.0.0.30.tar.gz' + "1.0.0.31": + url: "https://github.com/webmproject/libwebm/archive/refs/tags/libwebm-1.0.0.31.tar.gz" + sha256: "616cfdca1c869222dc60d5a49d112c1464040390e3876afca4d385347c6ce55e" + "1.0.0.30": + url: "https://github.com/webmproject/libwebm/archive/refs/tags/libwebm-1.0.0.30.tar.gz" + sha256: "6c1381fd1a66e86e095b76028ede696724e198ea0e39957c9649af5f0718b96a" diff --git a/recipes/libwebm/all/conanfile.py b/recipes/libwebm/all/conanfile.py index 7d2ceec33ba43..4fc3f3659a659 100644 --- a/recipes/libwebm/all/conanfile.py +++ b/recipes/libwebm/all/conanfile.py @@ -42,7 +42,7 @@ def layout(self): cmake_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version]) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/libwebm/config.yml b/recipes/libwebm/config.yml index 71746ecdc81bd..c6c0e669617aa 100644 --- a/recipes/libwebm/config.yml +++ b/recipes/libwebm/config.yml @@ -1,5 +1,5 @@ versions: - '1.0.0.31': + "1.0.0.31": folder: all - '1.0.0.30': + "1.0.0.30": folder: all diff --git a/recipes/libx264/all/conandata.yml b/recipes/libx264/all/conandata.yml index 394a54354a73d..f92af6ff75c03 100644 --- a/recipes/libx264/all/conandata.yml +++ b/recipes/libx264/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240224": + url: "https://code.videolan.org/videolan/x264/-/archive/7241d020118bb09cc0ad119d7bc9f630a1caad10/x264-7241d020118bb09cc0ad119d7bc9f630a1caad10.tar.bz2" + sha256: "5417c167a69cc19db044c227163f9b9b1dface9fca361a3e83d5417f8e304dd6" "cci.20220602": url: "https://code.videolan.org/videolan/x264/-/archive/baee400fa9ced6f5481a728138fed6e867b0ff7f/x264-baee400fa9ced6f5481a728138fed6e867b0ff7f.tar.bz2" sha256: "ce6623b8b289765daee04a297c2fd1a293cb2565a1749c76d66c8d72c7ddc1ab" diff --git a/recipes/libx264/all/conanfile.py b/recipes/libx264/all/conanfile.py index 3312e7972a7a4..87ce8800e9d4e 100644 --- a/recipes/libx264/all/conanfile.py +++ b/recipes/libx264/all/conanfile.py @@ -115,25 +115,29 @@ def generate(self): if cross_building(self): if self.settings.os == "Android": - # the as of ndk does not work well for building libx264 - env = Environment() + buildenv_vars = VirtualBuildEnv(self).vars() + ndk_root = self.conf.get("tools.android:ndk_path", buildenv_vars.get("NDK_ROOT")) + + # INFO: Conan package android-ndk does not expose toolchain path. Looks fragile but follows always same for Android NDK + build_os = {"Linux": "linux", "Macos": "darwin", "Windows": "windows"}.get(str(self._settings_build.os)) + toolchain = os.path.join(ndk_root, "toolchains", "llvm", "prebuilt", f"{build_os}-{self._settings_build.arch}") + + sysroot = self.conf.get("tools.build:sysroot", buildenv_vars.get("SYSROOT", f"{toolchain}/sysroot")) + # INFO: x264 will look for strings appended to the cross prefix + cross_prefix = os.path.join(toolchain, "bin", "llvm-") compilers_from_conf = self.conf.get("tools.build:compiler_executables", default={}, check_type=dict) - buildenv_vars = VirtualBuildEnv(self).vars() - cc = compilers_from_conf.get("c", buildenv_vars.get("CC", "clang-cl")) - env.define("AS", cc) - - ndk_root = self.conf.get("tools.android:ndk_path") - - arch = { - "armv7": "arm", - "armv8": "aarch64", - "x86": "i686", - "x86_64": "x86_64", - }.get(str(self.settings.arch)) - abi = "androideabi" if self.settings.arch == "armv7" else "android" - args["--cross-prefix"] = f"{ndk_root}/bin/{arch}-linux-{abi}-" - env.vars(self).save_script("conanbuild_android") + + args["--build"] = None # --build is not recognized + args["--cross-prefix"] = cross_prefix + args["--sysroot"] = sysroot + + # the as of ndk does not work well for building libx264 + env = Environment() + cc_as = compilers_from_conf.get("c", buildenv_vars.get("AS", "clang")) + env.define("AS", cc_as) + env_vars = env.vars(self, scope="build") + env_vars.save_script("conanbuild_android") if is_msvc(self): env = Environment() diff --git a/recipes/libx264/config.yml b/recipes/libx264/config.yml index be7607c4d1266..cce887c4b4859 100644 --- a/recipes/libx264/config.yml +++ b/recipes/libx264/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20240224": + folder: all "cci.20220602": folder: all "20191217": diff --git a/recipes/libx265/all/conanfile.py b/recipes/libx265/all/conanfile.py index 677f51dce82b0..313852081c905 100644 --- a/recipes/libx265/all/conanfile.py +++ b/recipes/libx265/all/conanfile.py @@ -49,7 +49,8 @@ def config_options(self): del self.options.with_numa # FIXME: Disable assembly by default if host is arm and compiler apple-clang for the moment. # Indeed, apple-clang is not able to understand some asm instructions of libx265 - if self.settings.compiler == "apple-clang" and "arm" in self.settings.arch: + # FIXME: Disable assembly by default if host is Android for the moment. It fails to build + if (self.settings.compiler == "apple-clang" and "arm" in self.settings.arch) or self.settings.os == "Android": self.options.assembly = False def configure(self): @@ -63,10 +64,27 @@ def requirements(self): if self.options.get_safe("with_numa", False): self.requires("libnuma/2.0.14") + def validate_build(self): + if cross_building(self) and self.settings.os == "Android" and self.options.assembly: + # FIXME: x265 uses custom command to invoke clang to compile assembly files. + # clang++ -fPIC -c src/source/common/aarch64/mc-a.S -o mc-a.S.o + # FAILED: mc-a.S.o libx2f309356bd8526/b/build/Release/mc-a.S.o + # clang++ -fPIC -c src/source/common/aarch64/mc-a.S -o mc-a.S.o + # :11:9: error: unknown directive + # .func x265_pixel_avg_pp_4x4_neon + raise ConanInvalidConfiguration(f"{self.ref} fails to build with '&:assembly=True' for Android. Contributions are welcome.") + def validate(self): if self.options.shared and is_msvc(self) and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("shared not supported with static runtime") + if self.settings.compiler == "apple-clang" and "arm" in self.settings.arch and self.options.assembly: + # Undefined symbols for architecture arm64: + # "x265::setupAssemblyPrimitives(x265::EncoderPrimitives&, int)", referenced from: + # x265::x265_setup_primitives(x265_param*) in libx265.a[20](primitives.cpp.o) + # ld: symbol(s) not found for architecture arm64 + raise ConanInvalidConfiguration(f"{self.ref} fails to build for Mac M1. Contributions are welcome.") + def build_requirements(self): if self.options.assembly: if self.settings.arch in ["x86", "x86_64"]: @@ -154,7 +172,10 @@ def package_info(self): if not self.options.shared: self.cpp_info.sharedlinkflags = ["-Wl,-Bsymbolic,-znoexecstack"] elif self.settings.os == "Android": - self.cpp_info.libs.extend(["dl", "m"]) - libcxx = stdcpp_library(self) - if libcxx: - self.cpp_info.system_libs.append(libcxx) + self.cpp_info.system_libs.extend(["dl", "m"]) + if not self.options.shared: + libcxx = stdcpp_library(self) + if libcxx: + if self.settings.os == "Android" and self.settings.compiler.libcxx == "c++_static": + self.cpp_info.system_libs.append("c++abi") + self.cpp_info.system_libs.append(libcxx) diff --git a/recipes/libxlsxwriter/all/conandata.yml b/recipes/libxlsxwriter/all/conandata.yml index 2cd855a6df663..da8b13009453a 100644 --- a/recipes/libxlsxwriter/all/conandata.yml +++ b/recipes/libxlsxwriter/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.8": + url: "https://github.com/jmcnamara/libxlsxwriter/archive/v1.1.8.tar.gz" + sha256: "122c98353e5b69284a1cd782be7ae67bdefde2146f8197ef89a1aaf886058e86" "1.1.7": url: "https://github.com/jmcnamara/libxlsxwriter/archive/RELEASE_1.1.7.tar.gz" sha256: "1f378e25d8bb5be258d3e04d3d24b8c23ff21bf206e6e206661844a96ca25eda" @@ -15,6 +18,10 @@ sources: url: "https://github.com/jmcnamara/libxlsxwriter/archive/RELEASE_1.0.0.tar.gz" sha256: "8b353379333c323d14a9d265cd2491d3a6c0032c8d6ec2141f10b82ab66a087c" patches: + "1.1.8": + - patch_file: "patches/1.1.7-0001-fix-cmake.patch" + patch_description: "Fix CMake: robust dependencies discovery & avoid some hardcoded flags" + patch_type: "conan" "1.1.7": - patch_file: "patches/1.1.7-0001-fix-cmake.patch" patch_description: "Fix CMake: robust dependencies discovery & avoid some hardcoded flags" diff --git a/recipes/libxlsxwriter/all/conanfile.py b/recipes/libxlsxwriter/all/conanfile.py index 1c65ddbb9e247..0435ae0e28bb1 100644 --- a/recipes/libxlsxwriter/all/conanfile.py +++ b/recipes/libxlsxwriter/all/conanfile.py @@ -11,11 +11,11 @@ class LibxlsxwriterConan(ConanFile): name = "libxlsxwriter" + description = "A C library for creating Excel XLSX files" license = "BSD-2-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/jmcnamara/libxlsxwriter" topics = ("excel", "xlsx") - description = "A C library for creating Excel XLSX files" package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -65,8 +65,7 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.name}:md5=openssl is not suppported in {self.ref}") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/libxlsxwriter/config.yml b/recipes/libxlsxwriter/config.yml index 5eb935f412b85..d944ed1b5f8d7 100644 --- a/recipes/libxlsxwriter/config.yml +++ b/recipes/libxlsxwriter/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.8": + folder: "all" "1.1.7": folder: "all" "1.1.5": diff --git a/recipes/libxml2/all/conanfile.py b/recipes/libxml2/all/conanfile.py index ec0a90e4ddd03..eedbacc3e1c75 100644 --- a/recipes/libxml2/all/conanfile.py +++ b/recipes/libxml2/all/conanfile.py @@ -346,8 +346,8 @@ def _create_cmake_module_variables(self, module_file): set(LIBXML2_INCLUDE_DIR ${{LibXml2_INCLUDE_DIRS}}) set(LIBXML2_INCLUDE_DIRS ${{LibXml2_INCLUDE_DIRS}}) elseif(DEFINED libxml2_INCLUDE_DIRS) - set(LIBXML2_LIBRARIES ${{libxml2_INCLUDE_DIRS}}) - set(LIBXML2_LIBRARY ${{libxml2_INCLUDE_DIRS}}) + set(LIBXML2_INCLUDE_DIR ${{libxml2_INCLUDE_DIRS}}) + set(LIBXML2_INCLUDE_DIRS ${{libxml2_INCLUDE_DIRS}}) endif() if(DEFINED LibXml2_LIBRARIES) set(LIBXML2_LIBRARIES ${{LibXml2_LIBRARIES}}) diff --git a/recipes/libxpm/all/CMakeLists.txt b/recipes/libxpm/all/CMakeLists.txt index 681dd5c613eec..94c9cd557b1f0 100644 --- a/recipes/libxpm/all/CMakeLists.txt +++ b/recipes/libxpm/all/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(libXpm VERSION "${CONAN_libXpm_VERSION}" LANGUAGES C) @@ -16,8 +16,7 @@ endif() # ---- Library ---- -add_library( - Xpm +add_library(Xpm src/Attrib.c src/CrBufFrI.c src/CrDatFrI.c @@ -41,15 +40,15 @@ add_library( src/WrFFrI.c ) -if(WIN32) - target_sources(Xpm PRIVATE windows/libXpm.def) - target_compile_definitions(Xpm PRIVATE FOR_MSW) -else() - target_sources( - Xpm PRIVATE +if(UNIX) + # Pixmap-related functions require X11 and are not available on Windows + target_sources(Xpm PRIVATE src/CrBufFrP.c src/CrDatFrP.c src/CrIFrP.c + src/CrPFrBuf.c + src/CrPFrDat.c + src/CrPFrI.c src/RdFToP.c src/WrFFrP.c ) @@ -57,6 +56,11 @@ else() target_link_libraries(Xpm PRIVATE "${X11_LIBRARY}") endif() +if(WIN32) + set_target_properties(Xpm PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + target_compile_definitions(Xpm PRIVATE FOR_MSW) +endif() + if(MSVC) target_compile_definitions( Xpm PRIVATE @@ -68,6 +72,14 @@ endif() target_include_directories(Xpm PRIVATE include/X11) +if(NOT WIN32) + target_compile_definitions(Xpm PRIVATE + # Build without the --enable-open-zfile option: + # https://gitlab.freedesktop.org/xorg/lib/libxpm/-/blob/libXpm-3.5.17/configure.ac?ref_type=tags#L67-88 + NO_ZPIPE + ) +endif() + set_target_properties( Xpm PROPERTIES VERSION "${PROJECT_VERSION}" diff --git a/recipes/libxpm/all/conandata.yml b/recipes/libxpm/all/conandata.yml index 3db82178c2eeb..0c9046c699ed9 100644 --- a/recipes/libxpm/all/conandata.yml +++ b/recipes/libxpm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.5.17": + url: "https://gitlab.freedesktop.org/xorg/lib/libxpm/-/archive/libXpm-3.5.17/libxpm-libXpm-3.5.17.tar.gz" + sha256: "c63123e2de511edac5df33425a3a3b292e06973198c94470c454a9c973f211f6" "3.5.13": + url: "https://gitlab.freedesktop.org/xorg/lib/libxpm/-/archive/libXpm-3.5.13/libxpm-libXpm-3.5.13.tar.gz" sha256: "516fcb7a3cc5b491ca2b95df29018b1643c40649d72473d3c62379d8fdc472ff" - url: https://gitlab.freedesktop.org/xorg/lib/libxpm/-/archive/libXpm-3.5.13/libxpm-libXpm-3.5.13.tar.gz diff --git a/recipes/libxpm/all/conanfile.py b/recipes/libxpm/all/conanfile.py index 0312deadc10a9..19a22b67425e0 100644 --- a/recipes/libxpm/all/conanfile.py +++ b/recipes/libxpm/all/conanfile.py @@ -26,15 +26,9 @@ class LibXpmConan(ConanFile): "shared": False, "fPIC": True, } - no_copy_source = True def export_sources(self): - copy(self, "CMakeLists.txt", - src=self.recipe_folder, - dst=os.path.join(self.export_sources_folder, "src")) - copy(self, "*", - src=os.path.join(self.recipe_folder, "windows"), - dst=os.path.join(self.export_sources_folder, "src", "windows")) + copy(self, "CMakeLists.txt", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -62,7 +56,7 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["CONAN_libXpm_VERSION"] = self.version + tc.cache_variables["CONAN_libXpm_VERSION"] = self.version tc.generate() def build(self): diff --git a/recipes/libxpm/all/windows/libXpm.def b/recipes/libxpm/all/windows/libXpm.def deleted file mode 100644 index 5381386ee75ee..0000000000000 --- a/recipes/libxpm/all/windows/libXpm.def +++ /dev/null @@ -1,29 +0,0 @@ -EXPORTS - -XpmCreateImageFromData -XpmCreateDataFromImage -XpmReadFileToImage -XpmWriteFileFromImage -XpmCreateImageFromBuffer -XpmReadFileToBuffer -XpmWriteFileFromBuffer -XpmReadFileToData -XpmWriteFileFromData -XpmAttributesSize -XpmFreeAttributes -XpmFreeExtensions -XpmFreeXpmImage -XpmFreeXpmInfo -XpmGetErrorString -XpmLibraryVersion - -XpmReadFileToXpmImage -XpmWriteFileFromXpmImage -XpmCreateImageFromXpmImage -XpmCreateXpmImageFromImage -XpmCreateDataFromXpmImage -XpmCreateXpmImageFromData -XpmCreateXpmImageFromBuffer -XpmCreateBufferFromXpmImage - -XpmFree diff --git a/recipes/libxpm/config.yml b/recipes/libxpm/config.yml index 96f25a4bd1d23..9876f21755330 100644 --- a/recipes/libxpm/config.yml +++ b/recipes/libxpm/config.yml @@ -1,3 +1,5 @@ versions: + "3.5.17": + folder: all "3.5.13": folder: all diff --git a/recipes/libxshmfence/all/conandata.yml b/recipes/libxshmfence/all/conandata.yml index 8c16f251fa486..21938ecba1296 100644 --- a/recipes/libxshmfence/all/conandata.yml +++ b/recipes/libxshmfence/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.2": + url: "https://www.x.org/archive/individual/lib/libxshmfence-1.3.2.tar.gz" + sha256: "e93a85099604beb244ee756dcaf70e18b08701c1ca84c4de0126cd71bd6c8181" "1.3": - url: "https://www.x.org/archive//individual/lib/libxshmfence-1.3.tar.gz" + url: "https://www.x.org/archive/individual/lib/libxshmfence-1.3.tar.gz" sha256: "7eb3d46ad91bab444f121d475b11b39273142d090f7e9ac43e6a87f4ff5f902c" diff --git a/recipes/libxshmfence/config.yml b/recipes/libxshmfence/config.yml index d2eb4ed4a511f..5fbc1fce7e8d6 100644 --- a/recipes/libxshmfence/config.yml +++ b/recipes/libxshmfence/config.yml @@ -1,3 +1,5 @@ versions: + "1.3.2": + folder: all "1.3": folder: all diff --git a/recipes/libxslt/all/conanfile.py b/recipes/libxslt/all/conanfile.py index ebed177675bb0..c90421153fff4 100644 --- a/recipes/libxslt/all/conanfile.py +++ b/recipes/libxslt/all/conanfile.py @@ -225,6 +225,8 @@ def package_info(self): self.cpp_info.components["exslt"].set_property("pkg_config_name", "libexslt") self.cpp_info.components["exslt"].libs = [f"{prefix}exslt{suffix}"] self.cpp_info.components["exslt"].requires = ["xslt"] + if not self.options.shared: + self.cpp_info.components["exslt"].defines = ["LIBEXSLT_STATIC"] # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed self.cpp_info.names["cmake_find_package"] = "LibXslt" diff --git a/recipes/libyuv/all/conandata.yml b/recipes/libyuv/all/conandata.yml index 3b9b5764537d0..f89be505198c3 100644 --- a/recipes/libyuv/all/conandata.yml +++ b/recipes/libyuv/all/conandata.yml @@ -1,6 +1,8 @@ # Versions from LIBYUV_VERSION definition in include/libyuv/version.h # Pay attention to package commits incrementing this definition sources: + "1892": + url: "https://chromium.googlesource.com/libyuv/libyuv/+archive/4cd90347e78ff76755df2107009e900374aee9cd.tar.gz" "1880": url: "https://chromium.googlesource.com/libyuv/libyuv/+archive/fb6341d326846fbbe669ad5173e520f66b339621.tar.gz" "1854": @@ -12,6 +14,13 @@ sources: "1768": url: "https://chromium.googlesource.com/libyuv/libyuv/+archive/dfaf7534e0e536f7e5ef8ddd7326797bd09b8622.tar.gz" patches: + "1892": + - patch_file: "patches/1892-0001-fix-cmake.patch" + patch_description: "Fix CMake to be more robust & predictable" + patch_type: "conan" + - patch_file: "patches/1892-0001-check-arm-sve.patch" + patch_description: "Check if -march=armv9-a+sve2 is supported" + patch_type: "conan" "1880": - patch_file: "patches/1880-0001-fix-cmake.patch" patch_description: "Fix CMake to be more robust & predictable" diff --git a/recipes/libyuv/all/conanfile.py b/recipes/libyuv/all/conanfile.py index 4d851737efc1b..2452cb8e27058 100644 --- a/recipes/libyuv/all/conanfile.py +++ b/recipes/libyuv/all/conanfile.py @@ -1,7 +1,8 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -50,9 +51,9 @@ def requirements(self): if self.options.with_jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.1") + self.requires("libjpeg-turbo/[>=3.0.3 <4]") elif self.options.with_jpeg == "mozjpeg": - self.requires("mozjpeg/4.1.3") + self.requires("mozjpeg/4.1.5") def source(self): get(self, **self.conan_data["sources"][self.version]) @@ -65,8 +66,21 @@ def generate(self): deps = CMakeDeps(self) deps.generate() - def build(self): + def _patch_sources(self): apply_conandata_patches(self) + + # remove default CMAKE_POSITION_INDEPENDENT_CODE if not requested + use_fpic = self.options.get_safe("fPIC") or self.options.get_safe("shared") + if Version(self.version) >= "1892" and not use_fpic: + replace_in_file( + self, + os.path.join(self.source_folder, "CMakeLists.txt"), + "SET(CMAKE_POSITION_INDEPENDENT_CODE ON)", + "", + ) + + def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/libyuv/all/patches/1892-0001-check-arm-sve.patch b/recipes/libyuv/all/patches/1892-0001-check-arm-sve.patch new file mode 100644 index 0000000000000..c5fe4176018fc --- /dev/null +++ b/recipes/libyuv/all/patches/1892-0001-check-arm-sve.patch @@ -0,0 +1,48 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -107,25 +107,38 @@ if(NOT MSVC) + TARGET_COMPILE_OPTIONS(${ly_lib_name}_neon64 PRIVATE -march=armv8-a+dotprod+i8mm) + LIST(APPEND ly_lib_parts $) + +- # Enable AArch64 SVE kernels. +- ADD_LIBRARY(${ly_lib_name}_sve OBJECT +- ${ly_src_dir}/row_sve.cc) +- TARGET_COMPILE_OPTIONS(${ly_lib_name}_sve PRIVATE -march=armv9-a+sve2) +- LIST(APPEND ly_lib_parts $) +- + set(OLD_CMAKE_REQURED_FLAGS ${CMAKE_REQUIRED_FLAGS}) + set(OLD_CMAKE_TRY_COMPILE_TARGET_TYPE ${CMAKE_TRY_COMPILE_TARGET_TYPE}) +- set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -march=armv9-a+sme") ++ ++ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQURED_FLAGS} -march=armv9-a+sve2") + set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) ++ # Check whether the compiler can compile SVE functions; this fails ++ # with Clang for macOS. ++ check_c_source_compiles(" ++int main(void) { return 0; } ++ " CAN_COMPILE_SVE) ++ ++ set(CMAKE_REQUIRED_FLAGS "${OLD_CMAKE_REQURED_FLAGS} -march=armv9-a+sme") + # Check whether the compiler can compile SME functions; this fails + # with Clang for Windows. + check_c_source_compiles(" + __arm_locally_streaming void func(void) { } + int main(void) { return 0; } + " CAN_COMPILE_SME) ++ + set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQURED_FLAGS}) + set(CMAKE_TRY_COMPILE_TARGET_TYPE ${OLD_CMAKE_TRY_COMPILE_TARGET_TYPE}) + ++ # Enable AArch64 SVE kernels. ++ if (CAN_COMPILE_SVE) ++ ADD_LIBRARY(${ly_lib_name}_sve OBJECT ++ ${ly_src_dir}/row_sve.cc) ++ TARGET_COMPILE_OPTIONS(${ly_lib_name}_sve PRIVATE -march=armv9-a+sve2) ++ LIST(APPEND ly_lib_parts $) ++ else() ++ ADD_DEFINITIONS(-DLIBYUV_DISABLE_SVE) ++ endif() ++ + if (CAN_COMPILE_SME) + # Enable AArch64 SME kernels. + ADD_LIBRARY(${ly_lib_name}_sme OBJECT diff --git a/recipes/libyuv/all/patches/1892-0001-fix-cmake.patch b/recipes/libyuv/all/patches/1892-0001-fix-cmake.patch new file mode 100644 index 0000000000000..9c6d556910436 --- /dev/null +++ b/recipes/libyuv/all/patches/1892-0001-fix-cmake.patch @@ -0,0 +1,67 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,8 +4,8 @@ + + include(CheckCSourceCompiles) + ++CMAKE_MINIMUM_REQUIRED( VERSION 3.8 ) + PROJECT ( YUV C CXX ) # "C" is required even for C++ projects +-CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12 ) + OPTION( UNIT_TEST "Built unit tests" OFF ) + + SET ( ly_base_dir ${PROJECT_SOURCE_DIR} ) +@@ -139,15 +139,10 @@ int main(void) { return 0; } + endif() + + # this creates the static library (.a) +-ADD_LIBRARY( ${ly_lib_static} STATIC ${ly_lib_parts}) ++ADD_LIBRARY( ${ly_lib_static} ${ly_lib_parts}) ++target_compile_features(${ly_lib_static} PUBLIC cxx_std_11) + + # this creates the shared library (.so) +-ADD_LIBRARY( ${ly_lib_shared} SHARED ${ly_lib_parts}) +-SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" ) +-SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES PREFIX "lib" ) +-if(WIN32) +- SET_TARGET_PROPERTIES( ${ly_lib_shared} PROPERTIES IMPORT_PREFIX "lib" ) +-endif() + + # this creates the cpuid tool + ADD_EXECUTABLE ( cpuid ${ly_base_dir}/util/cpuid.c ) +@@ -160,12 +155,18 @@ TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} ) + # this creates the yuvconstants tool + ADD_EXECUTABLE ( yuvconstants ${ly_base_dir}/util/yuvconstants.c ) + TARGET_LINK_LIBRARIES ( yuvconstants ${ly_lib_static} ) ++include(CheckFunctionExists) ++check_function_exists(round HAVE_MATH_SYSTEM) ++if(NOT HAVE_MATH_SYSTEM) ++ target_link_libraries(yuvconstants m) ++endif() + +-find_package ( JPEG ) +-if (JPEG_FOUND) +- include_directories( ${JPEG_INCLUDE_DIR} ) +- target_link_libraries( ${ly_lib_shared} ${JPEG_LIBRARY} ) +- add_definitions( -DHAVE_JPEG ) ++option(LIBYUV_WITH_JPEG "Build libyuv with jpeg" ON) ++if (LIBYUV_WITH_JPEG) ++ find_package(JPEG REQUIRED) ++ target_link_libraries(${ly_lib_static} JPEG::JPEG ) ++ target_compile_definitions(${ly_lib_static} PRIVATE HAVE_JPEG) ++ target_compile_definitions(yuvconvert PRIVATE HAVE_JPEG) + endif() + + if(UNIT_TEST) +@@ -211,10 +212,8 @@ endif() + + + # install the conversion tool, .so, .a, and all the header files +-INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin ) +-INSTALL ( TARGETS ${ly_lib_static} DESTINATION lib ) +-INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) ++INSTALL ( TARGETS yuvconvert yuvconstants DESTINATION bin) ++INSTALL ( TARGETS ${ly_lib_static} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) + INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include ) + + # create the .deb and .rpm packages using cpack +-INCLUDE ( CM_linux_packages.cmake ) diff --git a/recipes/libyuv/config.yml b/recipes/libyuv/config.yml index fe46d8f150b2c..9b10304af3038 100644 --- a/recipes/libyuv/config.yml +++ b/recipes/libyuv/config.yml @@ -1,4 +1,6 @@ versions: + "1892": + folder: all "1880": folder: all "1854": diff --git a/recipes/llama-cpp/all/cmake/llama-cpp-cuda-static.cmake b/recipes/llama-cpp/all/cmake/llama-cpp-cuda-static.cmake new file mode 100644 index 0000000000000..2e9b341b77e42 --- /dev/null +++ b/recipes/llama-cpp/all/cmake/llama-cpp-cuda-static.cmake @@ -0,0 +1,7 @@ +find_dependency(CUDAToolkit REQUIRED) +if (WIN32) + # As of 12.3.1 CUDA Toolkit for Windows does not offer a static cublas library + target_link_libraries(llama-cpp::common INTERFACE CUDA::cudart_static CUDA::cublas CUDA::cublasLt CUDA::cuda_driver) +else () + target_link_libraries(llama-cpp::common INTERFACE CUDA::cudart_static CUDA::cublas_static CUDA::cublasLt_static CUDA::cuda_driver) +endif() diff --git a/recipes/llama-cpp/all/conandata.yml b/recipes/llama-cpp/all/conandata.yml old mode 100644 new mode 100755 index 83cccb6e8a1a6..f31f9bb9e4c75 --- a/recipes/llama-cpp/all/conandata.yml +++ b/recipes/llama-cpp/all/conandata.yml @@ -1,7 +1,12 @@ sources: + "b3542": + url: "https://github.com/ggerganov/llama.cpp/archive/refs/tags/b3542.tar.gz" + sha256: "6f8b23d930400fce5708d2c85022ef33f1083af8f6ac395abefadacee0942e78" "b3040": url: "https://github.com/ggerganov/llama.cpp/archive/refs/tags/b3040.tar.gz" sha256: "020e040139660eb40113503bb1057d5387677d249b990e008e04821532f7cd62" - "b2038": - url: "https://github.com/ggerganov/llama.cpp/archive/refs/tags/b2038.tar.gz" - sha256: "a55bc75f5c76624cabfd9ea5e045f76597411231cb6fc231f2a0bff6287ab13b" +patches: + "b3542": + - patch_file: "patches/b3542-001-curl-patch-targets.patch" + "b3040": + - patch_file: "patches/b3040-001-curl-patch-targets.patch" diff --git a/recipes/llama-cpp/all/conanfile.py b/recipes/llama-cpp/all/conanfile.py old mode 100644 new mode 100755 index b39564c4e0974..06fe2b68724c2 --- a/recipes/llama-cpp/all/conanfile.py +++ b/recipes/llama-cpp/all/conanfile.py @@ -5,7 +5,7 @@ from conan.tools.apple import is_apple_os from conan.tools.build import check_min_cppstd, cross_building from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, rmdir +from conan.tools.files import copy, get, rmdir, apply_conandata_patches, export_conandata_patches from conan.tools.scm import Version @@ -20,16 +20,22 @@ class LlamaCppConan(ConanFile): homepage = "https://github.com/ggerganov/llama.cpp" license = "MIT" settings = "os", "arch", "compiler", "build_type" + package_type = "library" + options = { "shared": [True, False], "fPIC": [True, False], + "with_examples": [True, False], + "with_cuda": [True, False], + "with_curl": [True, False], } default_options = { "shared": False, "fPIC": True, + "with_examples": False, + "with_cuda": False, + "with_curl": False, } - - package_type = "library" @property def _min_cppstd(self): @@ -41,6 +47,10 @@ def _compilers_minimum_version(self): "gcc": "8" } + def export_sources(self): + export_conandata_patches(self) + copy(self, "cmake/*", dst=self.export_sources_folder, src=self.recipe_folder) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -61,6 +71,10 @@ def validate(self): def layout(self): cmake_layout(self, src_folder="src") + def requirements(self): + if self.options.with_curl: + self.requires("libcurl/[>=7.78 <9]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -71,13 +85,16 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["LLAMA_STANDALONE"] = False tc.variables["LLAMA_BUILD_TESTS"] = False - tc.variables["LLAMA_BUILD_EXAMPLES"] = False + tc.variables["LLAMA_BUILD_EXAMPLES"] = self.options.get_safe("with_examples") + tc.variables["LLAMA_CURL"] = self.options.get_safe("with_curl") tc.variables["BUILD_SHARED_LIBS"] = bool(self.options.shared) + tc.variables["GGML_CUDA"] = self.options.get_safe("with_cuda") if hasattr(self, "settings_build") and cross_building(self): tc.variables["LLAMA_NATIVE"] = False tc.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() @@ -87,6 +104,7 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) copy(self, "*", os.path.join(self.source_folder, "models"), os.path.join(self.package_folder, "res", "models")) copy(self, "*.h*", os.path.join(self.source_folder, "common"), os.path.join(self.package_folder, "include", "common")) copy(self, "*common*.lib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) @@ -94,19 +112,25 @@ def package(self): copy(self, "*common*.so", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) copy(self, "*common*.dylib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) copy(self, "*common*.a", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) - + copy(self, "*.cmake", src=os.path.join(self.export_sources_folder, "cmake"), dst=os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): + self.cpp_info.components["common"].includedirs = [os.path.join("include", "common")] + self.cpp_info.components["common"].libs = ["common"] + self.cpp_info.components["common"].libdirs = ["lib"] + if self.version >= Version("b3240"): + self.cpp_info.components["common"].libs.append("ggml") + self.cpp_info.components["llama"].libs = ["llama"] self.cpp_info.components["llama"].resdirs = ["res"] self.cpp_info.components["llama"].libdirs = ["lib"] + if self.options.with_cuda and not self.options.shared: + self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) + module_path = os.path.join("lib", "cmake", "llama-cpp-cuda-static.cmake") + self.cpp_info.set_property("cmake_build_modules", [module_path]) + if is_apple_os(self): - self.cpp_info.components["llama"].frameworks.extend(["Foundation", "Accelerate", "Metal"]) + self.cpp_info.components["common"].frameworks.extend(["Foundation", "Accelerate", "Metal"]) elif self.settings.os in ("Linux", "FreeBSD"): - self.cpp_info.components["llama"].system_libs.extend(["dl", "m", "pthread"]) - - self.cpp_info.components["common"].requires.append("llama") - self.cpp_info.components["common"].includedirs = [os.path.join("include", "common")] - self.cpp_info.components["common"].libs = ["common"] - + self.cpp_info.components["common"].system_libs.extend(["dl", "m", "pthread", "gomp"]) diff --git a/recipes/llama-cpp/all/patches/b3040-001-curl-patch-targets.patch b/recipes/llama-cpp/all/patches/b3040-001-curl-patch-targets.patch new file mode 100755 index 0000000000000..454fe46b32c1f --- /dev/null +++ b/recipes/llama-cpp/all/patches/b3040-001-curl-patch-targets.patch @@ -0,0 +1,15 @@ +diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt +index 0ec8d6d8..647ef30b 100644 +--- a/common/CMakeLists.txt ++++ b/common/CMakeLists.txt +@@ -77,9 +77,7 @@ set(LLAMA_COMMON_EXTRA_LIBS build_info) + if (LLAMA_CURL) + find_package(CURL REQUIRED) + add_definitions(-DLLAMA_USE_CURL) +- include_directories(${CURL_INCLUDE_DIRS}) +- find_library(CURL_LIBRARY curl REQUIRED) +- set(LLAMA_COMMON_EXTRA_LIBS ${LLAMA_COMMON_EXTRA_LIBS} ${CURL_LIBRARY}) ++ list(APPEND LLAMA_COMMON_EXTRA_LIBS CURL::libcurl) + endif () + + target_include_directories(${TARGET} PUBLIC .) diff --git a/recipes/llama-cpp/all/patches/b3542-001-curl-patch-targets.patch b/recipes/llama-cpp/all/patches/b3542-001-curl-patch-targets.patch new file mode 100755 index 0000000000000..dcb0f491566b5 --- /dev/null +++ b/recipes/llama-cpp/all/patches/b3542-001-curl-patch-targets.patch @@ -0,0 +1,26 @@ +diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt +index 761971d6..3afd9759 100644 +--- a/common/CMakeLists.txt ++++ b/common/CMakeLists.txt +@@ -66,7 +66,7 @@ add_library(${TARGET} STATIC + train.cpp + ngram-cache.h + ngram-cache.cpp +- ) ++) + + if (BUILD_SHARED_LIBS) + set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON) +@@ -78,10 +78,8 @@ set(LLAMA_COMMON_EXTRA_LIBS build_info) + if (LLAMA_CURL) + find_package(CURL REQUIRED) + add_definitions(-DLLAMA_USE_CURL) +- include_directories(${CURL_INCLUDE_DIRS}) +- find_library(CURL_LIBRARY curl REQUIRED) +- set(LLAMA_COMMON_EXTRA_LIBS ${LLAMA_COMMON_EXTRA_LIBS} ${CURL_LIBRARY}) +-endif () ++ list(APPEND LLAMA_COMMON_EXTRA_LIBS CURL::libcurl) ++endif() + + target_include_directories(${TARGET} PUBLIC .) + target_compile_features (${TARGET} PUBLIC cxx_std_11) diff --git a/recipes/llama-cpp/all/test_package/CMakeLists.txt b/recipes/llama-cpp/all/test_package/CMakeLists.txt old mode 100644 new mode 100755 index ebff8cc0707b3..fa2157e90aaa3 --- a/recipes/llama-cpp/all/test_package/CMakeLists.txt +++ b/recipes/llama-cpp/all/test_package/CMakeLists.txt @@ -7,8 +7,3 @@ find_package(llama-cpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE llama-cpp::llama llama-cpp::common) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) - -add_custom_command(TARGET test_package POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_directory - ${llama-cpp_INCLUDE_DIR}/../res/models - ${CMAKE_CURRENT_BINARY_DIR}/models) diff --git a/recipes/llama-cpp/config.yml b/recipes/llama-cpp/config.yml index 9893609aaeaea..80c3c72b8c4f3 100644 --- a/recipes/llama-cpp/config.yml +++ b/recipes/llama-cpp/config.yml @@ -1,5 +1,5 @@ versions: - "b3040": + "b3542": folder: "all" - "b2038": + "b3040": folder: "all" diff --git a/recipes/llnl-units/all/conandata.yml b/recipes/llnl-units/all/conandata.yml new file mode 100644 index 0000000000000..61314f6985693 --- /dev/null +++ b/recipes/llnl-units/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.9.1": + url: "https://github.com/LLNL/units/archive/refs/tags/v0.9.1.tar.gz" + sha256: "7edb83613a07cf55873f22d61c0062e46db6f8cb27d137866858811ec2e1ad4f" diff --git a/recipes/llnl-units/all/conanfile.py b/recipes/llnl-units/all/conanfile.py new file mode 100644 index 0000000000000..62478d1b6985f --- /dev/null +++ b/recipes/llnl-units/all/conanfile.py @@ -0,0 +1,103 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain +from conan.tools.files import copy, rm, rmdir, get + + +class UnitsConan(ConanFile): + name = "llnl-units" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://units.readthedocs.io" + description = ( + "A run-time C++ library for working with units " + "of measurement and conversions between them " + "and with string representations of units " + "and measurements" + ) + topics = ( + "units", + "dimensions", + "quantities", + "physical-units", + "dimensional-analysis", + "run-time", + ) + settings = "os", "compiler", "build_type", "arch" + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.preprocessor_definitions["UNITS_CMAKE_PROJECT_NAME"] = "LLNL-UNITS" + tc.preprocessor_definitions["UNITS_ENABLE_TESTS"] = "OFF" + tc.preprocessor_definitions["UNITS_BUILD_SHARED_LIBRARY"] = self.options.shared + tc.preprocessor_definitions[ + "UNITS_BUILD_STATIC_LIBRARY" + ] = not self.options.shared + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy( + self, + "LICENSE", + self.source_folder, + os.path.join(self.package_folder, "licenses"), + ) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + + def package_info(self): + self.cpp_info.libs = ["units"] + namespace = self.conf.get("user.llnl-units:namespace", check_type=str) + base_type = self.conf.get("user.llnl-units:base_type", check_type=str, default="uint32_t") + self.cpp_info.defines = [f"UNITS_BASE_TYPE={base_type}"] + if namespace: + self.cpp_info.defines.append(f"UNITS_NAMESPACE={units_namespace}") + + self.cpp_info.set_property("cmake_file_name", "units") + self.cpp_info.set_property("cmake_target_name", "units::units") diff --git a/recipes/llnl-units/all/test_package/CMakeLists.txt b/recipes/llnl-units/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..32484e5b71ec5 --- /dev/null +++ b/recipes/llnl-units/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) + +find_package(units REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) + +target_link_libraries(${PROJECT_NAME} PRIVATE units::units) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/llnl-units/all/test_package/conanfile.py b/recipes/llnl-units/all/test_package/conanfile.py new file mode 100644 index 0000000000000..02eb5ce439fb4 --- /dev/null +++ b/recipes/llnl-units/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + 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): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/llnl-units/all/test_package/test_package.cpp b/recipes/llnl-units/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..875f7bb1c1123 --- /dev/null +++ b/recipes/llnl-units/all/test_package/test_package.cpp @@ -0,0 +1,20 @@ +#include +#include +#include "units/units.hpp" +using namespace units; + +int main(void) { + auto new_unit=m/s; + auto another=new_unit*s; + bool test = another == m; + std::cout << test << std::endl; + + measurement length1=45.0*m; + measurement length2=20.0*m; + measurement result=900.0*m*m; + measurement area=length1*length2; + bool test2 = area == result; + std::cout << test2 << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/llnl-units/config.yml b/recipes/llnl-units/config.yml new file mode 100644 index 0000000000000..6895ae8f05494 --- /dev/null +++ b/recipes/llnl-units/config.yml @@ -0,0 +1,3 @@ +versions: + "0.9.1": + folder: all diff --git a/recipes/llvm-openmp/all/conanfile.py b/recipes/llvm-openmp/all/conanfile.py index a885645ea3471..c1412f45efbaa 100644 --- a/recipes/llvm-openmp/all/conanfile.py +++ b/recipes/llvm-openmp/all/conanfile.py @@ -16,12 +16,9 @@ class LLVMOpenMpConan(ConanFile): name = "llvm-openmp" - description = ("The OpenMP (Open Multi-Processing) specification " - "is a standard for a set of compiler directives, " - "library routines, and environment variables that " - "can be used to specify shared memory parallelism " - "in Fortran and C/C++ programs. This is the LLVM " - "implementation.") + description = ("The OpenMP (Open Multi-Processing) specification is a standard for a set of compiler directives, " + "library routines, and environment variables that can be used to specify shared memory parallelism " + "in Fortran and C/C++ programs. This is the LLVM implementation.") license = "Apache-2.0 WITH LLVM-exception" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/llvm/llvm-project/blob/main/openmp" diff --git a/recipes/luajit/all/conandata.yml b/recipes/luajit/all/conandata.yml index 1e7abff8db36b..0617a7db6d602 100644 --- a/recipes/luajit/all/conandata.yml +++ b/recipes/luajit/all/conandata.yml @@ -1,10 +1,11 @@ +# INFO: Upstream moved to rolling releases and removed all tarballs. +# The Github mirror (https://github.com/LuaJIT/LuaJIT) does not match the checksums and have missing header files. +# Conan will consume the backup sources from the Conan Center Artifactory instead, which are the original tarballs (same checksums). +# Read the issue https://github.com/conan-io/conan-center-index/issues/25032 for more information. sources: "2.1.0-beta3": - url: "https://luajit.org/download/LuaJIT-2.1.0-beta3.tar.gz" + url: "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3" sha256: "1ad2e34b111c802f9d0cdf019e986909123237a28c746b21295b63c9e785d9c3" - "2.0.5": - url: "http://luajit.org/download/LuaJIT-2.0.5.tar.gz" - sha256: "874b1f8297c697821f561f9b73b57ffd419ed8f4278c82e05b48806d30c1e979" patches: "2.1.0-beta3": - patch_file: "patches/2.1.0-beta3-0001-remove-mac-deploy.patch" diff --git a/recipes/luajit/all/conanfile.py b/recipes/luajit/all/conanfile.py index 47079e98290b1..1a87a46c223ac 100644 --- a/recipes/luajit/all/conanfile.py +++ b/recipes/luajit/all/conanfile.py @@ -48,7 +48,8 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} is not supported by Mac M1. Please, try any version >=2.1") def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + filename = f"LuaJIT-{self.version}.tar.gz" + get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, filename=filename, strip_root=True) def generate(self): if is_msvc(self): diff --git a/recipes/luajit/config.yml b/recipes/luajit/config.yml index f13e8f0f1a9ec..72c6723e528aa 100644 --- a/recipes/luajit/config.yml +++ b/recipes/luajit/config.yml @@ -1,5 +1,3 @@ versions: "2.1.0-beta3": folder: "all" - "2.0.5": - folder: "all" diff --git a/recipes/luau/all/conandata.yml b/recipes/luau/all/conandata.yml index d38eb7af87816..ef6921854b73e 100644 --- a/recipes/luau/all/conandata.yml +++ b/recipes/luau/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.640": + url: "https://github.com/Roblox/luau/archive/0.640.tar.gz" + sha256: "63ada3e4c8c17e5aff8964b16951bfd1b567329dd81c11ae1144b6e95f354762" + "0.635": + url: "https://github.com/Roblox/luau/archive/0.635.tar.gz" + sha256: "b2ec66070bb53ab9c26e41608dd75c9672c942cf0738c4b965c5eb956a954910" "0.630": url: "https://github.com/Roblox/luau/archive/0.630.tar.gz" sha256: "601938ebd428d37c2bb10697500bff4fe304f7c0651cf64721b9dc5600a30ed9" diff --git a/recipes/luau/config.yml b/recipes/luau/config.yml index 26cd13020e94c..a2ceac414c46b 100644 --- a/recipes/luau/config.yml +++ b/recipes/luau/config.yml @@ -1,4 +1,8 @@ versions: + "0.640": + folder: all + "0.635": + folder: all "0.630": folder: all "0.625": diff --git a/recipes/lunasvg/all/conandata.yml b/recipes/lunasvg/all/conandata.yml index 841dc89eb9587..c0096452d5b87 100644 --- a/recipes/lunasvg/all/conandata.yml +++ b/recipes/lunasvg/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.4.0": + url: "https://github.com/sammycage/lunasvg/archive/v2.4.0.tar.gz" + sha256: "0682c60501c91d75f4261d9c1a5cd44c2c9da8dba76f8402eab628448c9a4591" "2.3.9": url: "https://github.com/sammycage/lunasvg/archive/v2.3.9.tar.gz" sha256: "088bc9fd1191a004552c65bdcc260989b83da441b0bdaa965e79d984feba88fa" @@ -18,6 +21,10 @@ sources: url: "https://github.com/sammycage/lunasvg/archive/refs/tags/v2.3.1.tar.gz" sha256: "6492bf0f51982f5382f83f1a42f247bb1bbcbaef4a15963bbd53073cd4944a25" patches: + "2.4.0": + - patch_file: "patches/2.3.9-0001-fix-cmake.patch" + patch_description: "use external plutovg and fix installation path for conan" + patch_type: "conan" "2.3.9": - patch_file: "patches/2.3.9-0001-fix-cmake.patch" patch_description: "use external plutovg and fix installation path for conan" diff --git a/recipes/lunasvg/config.yml b/recipes/lunasvg/config.yml index 670758a7b8c7f..b01edffe69a57 100644 --- a/recipes/lunasvg/config.yml +++ b/recipes/lunasvg/config.yml @@ -1,4 +1,6 @@ versions: + "2.4.0": + folder: all "2.3.9": folder: all "2.3.8": diff --git a/recipes/lz4/all/conandata.yml b/recipes/lz4/all/conandata.yml index fc3f8472653fd..27dd4979a6d6f 100644 --- a/recipes/lz4/all/conandata.yml +++ b/recipes/lz4/all/conandata.yml @@ -1,13 +1,13 @@ sources: + "1.10.0": + url: "https://github.com/lz4/lz4/archive/v1.10.0.tar.gz" + sha256: "537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b" "1.9.4": - sha256: 0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b - url: https://github.com/lz4/lz4/archive/v1.9.4.tar.gz + url: "https://github.com/lz4/lz4/archive/v1.9.4.tar.gz" + sha256: "0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b" "1.9.3": - sha256: 030644df4611007ff7dc962d981f390361e6c97a34e5cbc393ddfbe019ffe2c1 - url: https://github.com/lz4/lz4/archive/v1.9.3.tar.gz - "1.9.2": - sha256: 658ba6191fa44c92280d4aa2c271b0f4fbc0e34d249578dd05e50e76d0e5efcc - url: https://github.com/lz4/lz4/archive/v1.9.2.tar.gz + url: "https://github.com/lz4/lz4/archive/v1.9.3.tar.gz" + sha256: "030644df4611007ff7dc962d981f390361e6c97a34e5cbc393ddfbe019ffe2c1" patches: "1.9.4": - patch_file: "patches/0004-Added-namespace-declaration-for-xxhash-in-CMake.patch" @@ -18,13 +18,3 @@ patches: - patch_file: "patches/0003-cmake-minimum-required-first-1.9.3.patch" patch_description: "Move cmake_minimum_required to the top of CMakeFile.txt" patch_type: conan - "1.9.2": - - patch_file: "patches/0001-cmake-add-shared-DEFINE_SYMBOL.patch" - patch_description: "Add LZ4_DLL_EXPORT to MSVC" - patch_type: portability - - patch_file: "patches/0002-cmake-optional-cli.patch" - patch_description: "Add ability not to compile the CLI" - patch_type: conan - - patch_file: "patches/0003-cmake-minimum-required-first-1.9.2.patch" - patch_description: "Move cmake_minimum_required to the top of CMakeFile.txt" - patch_type: conan diff --git a/recipes/lz4/all/conanfile.py b/recipes/lz4/all/conanfile.py index 00e8eb7116e69..ea0b3ac51007a 100644 --- a/recipes/lz4/all/conanfile.py +++ b/recipes/lz4/all/conanfile.py @@ -16,7 +16,7 @@ class LZ4Conan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/lz4/lz4" topics = ("compression") - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -50,7 +50,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["LZ4_BUILD_CLI"] = False - tc.variables["LZ4_BUILD_LEGACY_LZ4C"] = False + if Version(self.version) < "1.10.0": + tc.variables["LZ4_BUILD_LEGACY_LZ4C"] = False tc.variables["LZ4_BUNDLED_MODE"] = False tc.variables["LZ4_POSITION_INDEPENDENT_LIB"] = self.options.get_safe("fPIC", True) # Generate a relocatable shared lib on Macos @@ -61,10 +62,7 @@ def generate(self): @property def _cmakelists_folder(self): - if Version(self.version) < "1.9.3": - subfolder = os.path.join("contrib", "cmake_unofficial") - else: - subfolder = os.path.join("build", "cmake") + subfolder = os.path.join("build", "cmake") return os.path.join(self.source_folder, subfolder) def build(self): diff --git a/recipes/lz4/all/patches/0001-cmake-add-shared-DEFINE_SYMBOL.patch b/recipes/lz4/all/patches/0001-cmake-add-shared-DEFINE_SYMBOL.patch deleted file mode 100644 index 5de5fbc440858..0000000000000 --- a/recipes/lz4/all/patches/0001-cmake-add-shared-DEFINE_SYMBOL.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- contrib/cmake_unofficial/CMakeLists.txt -+++ contrib/cmake_unofficial/CMakeLists.txt -@@ -103,9 +103,13 @@ - if(BUILD_SHARED_LIBS) - add_library(lz4_shared SHARED ${LZ4_SOURCES}) - set_target_properties(lz4_shared PROPERTIES - OUTPUT_NAME lz4 - SOVERSION "${LZ4_VERSION_MAJOR}" - VERSION "${LZ4_VERSION_STRING}") - list(APPEND LZ4_LIBRARIES_BUILT lz4_shared) -+ if(MSVC) -+ set_target_properties(lz4_shared PROPERTIES -+ DEFINE_SYMBOL LZ4_DLL_EXPORT=1) -+ endif() - endif() - if(BUILD_STATIC_LIBS) diff --git a/recipes/lz4/all/patches/0002-cmake-optional-cli.patch b/recipes/lz4/all/patches/0002-cmake-optional-cli.patch deleted file mode 100644 index b2fe91a0e8bf9..0000000000000 --- a/recipes/lz4/all/patches/0002-cmake-optional-cli.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- a/contrib/cmake_unofficial/CMakeLists.txt -+++ b/contrib/cmake_unofficial/CMakeLists.txt -@@ -12,6 +12,7 @@ - - set(LZ4_TOP_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..") - -+option(LZ4_BUILD_CLI "Build lz4 program" ON) - option(LZ4_BUILD_LEGACY_LZ4C "Build lz4c progam with legacy argument support" ON) - - # Parse version information -@@ -128,10 +129,12 @@ else() - endif() - - # lz4 -+if(LZ4_BUILD_CLI) - set(LZ4_PROGRAMS_BUILT lz4cli) - add_executable(lz4cli ${LZ4_CLI_SOURCES}) - set_target_properties(lz4cli PROPERTIES OUTPUT_NAME lz4) - target_link_libraries(lz4cli ${LZ4_LINK_LIBRARY}) -+endif() - - # lz4c - if (LZ4_BUILD_LEGACY_LZ4C) -@@ -193,7 +196,7 @@ if(NOT LZ4_BUNDLED_MODE) - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") - - # install lz4cat and unlz4 symlinks on *nix -- if(UNIX) -+ if(UNIX AND LZ4_BUILD_CLI) - install(CODE " - foreach(f lz4cat unlz4) - set(dest \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/\${f}\") -@@ -209,7 +212,7 @@ if(NOT LZ4_BUNDLED_MODE) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${f}.1" - DESTINATION "${CMAKE_INSTALL_MANDIR}/man1") - endforeach() -- endif(UNIX) -+ endif(UNIX AND LZ4_BUILD_CLI) - endif(NOT LZ4_BUNDLED_MODE) - - # pkg-config diff --git a/recipes/lz4/all/patches/0003-cmake-minimum-required-first-1.9.2.patch b/recipes/lz4/all/patches/0003-cmake-minimum-required-first-1.9.2.patch deleted file mode 100644 index 2333a27871ed9..0000000000000 --- a/recipes/lz4/all/patches/0003-cmake-minimum-required-first-1.9.2.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/contrib/cmake_unofficial/CMakeLists.txt -+++ b/contrib/cmake_unofficial/CMakeLists.txt -@@ -9,11 +9,10 @@ - # - # LZ4's CMake support is maintained by Evan Nemerson; when filing - # bugs please mention @nemequ to make sure I see it. -+cmake_minimum_required (VERSION 2.8.6) - - set(LZ4_TOP_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..") - --option(LZ4_BUILD_CLI "Build lz4 program" ON) --option(LZ4_BUILD_LEGACY_LZ4C "Build lz4c progam with legacy argument support" ON) - - # Parse version information - file(STRINGS "${LZ4_TOP_SOURCE_DIR}/lib/lz4.h" LZ4_VERSION_MAJOR REGEX "^#define LZ4_VERSION_MAJOR +([0-9]+) +.*$") -@@ -34,7 +33,8 @@ else() - LANGUAGES C) - endif() - --cmake_minimum_required (VERSION 2.8.6) -+option(LZ4_BUILD_CLI "Build lz4 program" ON) -+option(LZ4_BUILD_LEGACY_LZ4C "Build lz4c progam with legacy argument support" ON) - - # If LZ4 is being bundled in another project, we don't want to - # install anything. However, we want to let people override this, so diff --git a/recipes/lz4/config.yml b/recipes/lz4/config.yml index f96920e268df8..7af8322c88129 100644 --- a/recipes/lz4/config.yml +++ b/recipes/lz4/config.yml @@ -1,7 +1,7 @@ versions: + "1.10.0": + folder: all "1.9.4": folder: all "1.9.3": folder: all - "1.9.2": - folder: all diff --git a/recipes/magic_enum/all/conandata.yml b/recipes/magic_enum/all/conandata.yml index 37be348e4f658..e3dccd6201a11 100644 --- a/recipes/magic_enum/all/conandata.yml +++ b/recipes/magic_enum/all/conandata.yml @@ -1,7 +1,7 @@ sources: "0.9.6": url: "https://github.com/Neargye/magic_enum/archive/v0.9.6.tar.gz" - sha256: "814791ff32218dc869845af7eb89f898ebbcfa18e8d81aa4d682d18961e13731" + sha256: "fcda8295256a2084f1f98a63b3d2c66b3d7140eea008e1ef94ea015b2f6d3034" "0.9.5": url: "https://github.com/Neargye/magic_enum/archive/v0.9.5.tar.gz" sha256: "44ad80db5a72f5047e01d90e18315751d9ac90c0ab42cbea7a6f9ec66a4cd679" diff --git a/recipes/magic_enum/all/conanfile.py b/recipes/magic_enum/all/conanfile.py index 5d4edee82bb6d..9b0f3868a9d81 100644 --- a/recipes/magic_enum/all/conanfile.py +++ b/recipes/magic_enum/all/conanfile.py @@ -1,8 +1,8 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd -from conan.tools.files import copy, get -from conan.tools.layout import basic_layout +from conan.tools.files import copy, get, mkdir, rmdir +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.scm import Version import os @@ -39,7 +39,7 @@ def _compilers_minimum_version(self): } def layout(self): - basic_layout(self, src_folder="src") + cmake_layout(self, src_folder="src") def package_id(self): self.info.clear() @@ -56,12 +56,25 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + def build(self): - pass + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): - copy(self, "*", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + cmake = CMake(self) + cmake.install() + if Version(self.version) >= "0.9.4" and Version(self.version) <= "0.9.6": + mkdir(self, os.path.join(self.package_folder, "include/magic_enum")) + copy(self, "*", src=os.path.join(self.package_folder, "include"), dst=os.path.join(self.package_folder, "include/magic_enum")) copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "magic_enum") diff --git a/recipes/magic_enum/all/test_package/CMakeLists.txt b/recipes/magic_enum/all/test_package/CMakeLists.txt index f5917740f5800..c185d76435a4f 100644 --- a/recipes/magic_enum/all/test_package/CMakeLists.txt +++ b/recipes/magic_enum/all/test_package/CMakeLists.txt @@ -6,7 +6,3 @@ find_package(magic_enum REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE magic_enum::magic_enum) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) - -if(magic_enum_VERSION VERSION_GREATER_EQUAL "0.9.4") - target_compile_definitions(${PROJECT_NAME} PRIVATE MAGIC_ENUM_INCLUDE_WITH_FOLDER) -endif() diff --git a/recipes/magic_enum/all/test_package/test_package.cpp b/recipes/magic_enum/all/test_package/test_package.cpp index 208a3dd5fc806..fcb911e1f966e 100644 --- a/recipes/magic_enum/all/test_package/test_package.cpp +++ b/recipes/magic_enum/all/test_package/test_package.cpp @@ -1,8 +1,4 @@ -#ifdef MAGIC_ENUM_INCLUDE_WITH_FOLDER -# include -#else -# include -#endif +#include #include #include diff --git a/recipes/mariadb-connector-c/all/conandata.yml b/recipes/mariadb-connector-c/all/conandata.yml index df3894df1372a..599405bd8a89f 100644 --- a/recipes/mariadb-connector-c/all/conandata.yml +++ b/recipes/mariadb-connector-c/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.3.8": + url: "https://downloads.mariadb.com/Connectors/c/connector-c-3.3.8/mariadb-connector-c-3.3.8-src.tar.gz" + sha256: "f9f076b4aa9fb22cc94b24f82c80f9ef063805ecd6533a2eb5d5060cf93833e8" "3.3.3": url: "https://downloads.mariadb.com/Connectors/c/connector-c-3.3.3/mariadb-connector-c-3.3.3-src.tar.gz" sha256: "d77630e2376fe08185b5354621c877b0a203a6b186a0694574d37b764aeb2874" @@ -12,16 +15,17 @@ sources: url: "https://downloads.mariadb.com/Connectors/c/connector-c-3.1.11/mariadb-connector-c-3.1.11-src.tar.gz" sha256: "3e6f6c399493fe90efdc21a3fe70c30434b7480e8195642a959f1dd7a0fa5b0f" patches: - "3.3.3": - - patch_file: "patches/3.3.3-0002-find-package-zstd.patch" - patch_description: "Use ZSTD cmake file from Conan" + "3.3.8": + - patch_file: "patches/3.3.8-0001-fix-install-and-static-or-shared.patch" + patch_description: "fix install path, separate static/shared build" patch_type: "conan" + - patch_file: "patches/3.1.11-0004-include-mysqld_error-header.patch" + patch_description: "always include mysqld_error.h" + patch_type: "portability" + "3.3.3": - patch_file: "patches/3.3.3-0001-fix-install-and-static-or-shared.patch" patch_description: "fix install path, separate static/shared build" patch_type: "conan" - - patch_file: "patches/3.1.19-0002-remove-wx-flag.patch" - patch_description: "remove WX flags in MSVC" - patch_type: "conan" - patch_file: "patches/3.1.11-0003-include-order-windows-winsock2.patch" patch_description: "fix include order for windows winsock2" patch_type: "portability" @@ -32,9 +36,6 @@ patches: - patch_file: "patches/3.1.19-0001-fix-install-and-static-or-shared.patch" patch_description: "fix install path, separate static/shared build" patch_type: "conan" - - patch_file: "patches/3.1.19-0002-remove-wx-flag.patch" - patch_description: "remove WX flags in MSVC" - patch_type: "conan" - patch_file: "patches/3.1.11-0003-include-order-windows-winsock2.patch" patch_description: "fix include order for windows winsock2" patch_type: "portability" diff --git a/recipes/mariadb-connector-c/all/conanfile.py b/recipes/mariadb-connector-c/all/conanfile.py index 576fa5d4f935e..28811d8017067 100644 --- a/recipes/mariadb-connector-c/all/conanfile.py +++ b/recipes/mariadb-connector-c/all/conanfile.py @@ -92,6 +92,7 @@ def generate(self): tc.variables["INSTALL_BINDIR"] = "bin" tc.variables["INSTALL_LIBDIR"] = "lib" tc.variables["INSTALL_PLUGINDIR"] = os.path.join("lib", "plugin").replace("\\", "/") + tc.variables["ZLIB_LIBRARY"] = "ZLIB::ZLIB" # To install relocatable shared libs on Macos tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" tc.generate() @@ -104,7 +105,7 @@ def _patch_sources(self): apply_conandata_patches(self) root_cmake = os.path.join(self.source_folder, "CMakeLists.txt") - replace_in_file(self, root_cmake, "${ZLIB_LIBRARY}", "${ZLIB_LIBRARIES}") + libmariadb_cmake = os.path.join(self.source_folder, "libmariadb", "CMakeLists.txt") replace_in_file(self, root_cmake, "SET(SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})", @@ -113,6 +114,14 @@ def _patch_sources(self): replace_in_file(self, root_cmake, "${CURL_LIBRARIES}", "CURL::libcurl") plugins_io_cmake = os.path.join(self.source_folder, "plugins", "io", "CMakeLists.txt") replace_in_file(self, plugins_io_cmake, "${CURL_LIBRARIES}", "CURL::libcurl") + if Version(self.version) >= "3.3.6": + replace_in_file(self, root_cmake, "${WARNING_AS_ERROR}", "") + elif Version(self.version) >= "3.1.18": + replace_in_file(self, root_cmake, " -WX", "") + if Version(self.version) >= "3.3": + replace_in_file(self, root_cmake, + "INCLUDE(${CC_SOURCE_DIR}/cmake/FindZStd.cmake)", + "find_package(ZSTD REQUIRED CONFIG)") def build(self): self._patch_sources() diff --git a/recipes/mariadb-connector-c/all/patches/3.1.19-0002-remove-wx-flag.patch b/recipes/mariadb-connector-c/all/patches/3.1.19-0002-remove-wx-flag.patch deleted file mode 100644 index 4dde44415f18b..0000000000000 --- a/recipes/mariadb-connector-c/all/patches/3.1.19-0002-remove-wx-flag.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f3b6cbd..f3e8993 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -100,7 +100,7 @@ IF(MSVC) - ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN) - IF (MSVC) - # Treat warnings as errors -- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -WX") -+ # SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -WX") - SET(CONFIG_TYPES "DEBUG" "RELEASE" "RELWITHDEBINFO") - FOREACH(BUILD_TYPE ${CONFIG_TYPES}) - FOREACH(COMPILER CXX C) diff --git a/recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch b/recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch index 8a6f9ad7f1f55..31844dd32529b 100644 --- a/recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch +++ b/recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch @@ -2,15 +2,6 @@ diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt index 070fdc9..77584e6 100644 --- a/libmariadb/CMakeLists.txt +++ b/libmariadb/CMakeLists.txt -@@ -288,7 +288,7 @@ SET(MARIADB_NONBLOCK_SYMBOLS - - # handle static plugins - SET(LIBMARIADB_SOURCES ${LIBMARIADB_SOURCES} ${LIBMARIADB_PLUGIN_SOURCES}) --SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${LIBMARIADB_PLUGIN_LIBS} ${ZSTD_LIBRARY} ${ZLIB_LIBRARY}) -+SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${LIBMARIADB_PLUGIN_LIBS} ${ZSTD_LIBRARY} ZLIB::ZLIB) - MESSAGE(STATUS "SYSTEM_LIBS: ${SYSTEM_LIBS}") - INCLUDE_DIRECTORIES(${LIBMARIADB_PLUGIN_INCLUDES}) - ADD_DEFINITIONS(${LIBMARIADB_PLUGIN_DEFS}) @@ -404,7 +404,7 @@ ELSE() ENDIF() diff --git a/recipes/mariadb-connector-c/all/patches/3.3.3-0002-find-package-zstd.patch b/recipes/mariadb-connector-c/all/patches/3.3.3-0002-find-package-zstd.patch deleted file mode 100644 index 19168ffa68018..0000000000000 --- a/recipes/mariadb-connector-c/all/patches/3.3.3-0002-find-package-zstd.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f3b6cbd..5a60394 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -221,7 +221,7 @@ INCLUDE(${CC_SOURCE_DIR}/cmake/SearchLibrary.cmake) - - # Compression plugins: ZSTD, ZLIB - --INCLUDE(${CC_SOURCE_DIR}/cmake/FindZStd.cmake) -+find_package(ZSTD REQUIRED CONFIG) - - IF(WITH_EXTERNAL_ZLIB) - IF(NOT ZLIB_FOUND) diff --git a/recipes/mariadb-connector-c/all/patches/3.3.8-0001-fix-install-and-static-or-shared.patch b/recipes/mariadb-connector-c/all/patches/3.3.8-0001-fix-install-and-static-or-shared.patch new file mode 100644 index 0000000000000..0dfadf76c0436 --- /dev/null +++ b/recipes/mariadb-connector-c/all/patches/3.3.8-0001-fix-install-and-static-or-shared.patch @@ -0,0 +1,117 @@ +--- libmariadb/CMakeLists.txt ++++ libmariadb/CMakeLists.txt +@@ -414,7 +414,7 @@ + ENDIF() + + +-IF(CMAKE_VERSION VERSION_GREATER 2.8.7) ++IF(FALSE) + # CREATE OBJECT LIBRARY + ADD_LIBRARY(mariadb_obj OBJECT ${LIBMARIADB_SOURCES}) + IF(UNIX) +@@ -443,21 +443,24 @@ + "FILE_DESCRIPTION:Dynamic lib for client/server communication") + ENDIF() + ++IF(NOT BUILD_SHARED_LIBS) + ADD_LIBRARY(mariadbclient STATIC ${MARIADB_OBJECTS} ${EMPTY_FILE}) + TARGET_LINK_LIBRARIES(mariadbclient ${SYSTEM_LIBS} ${CRYPTO_LIBS}) +- ++ELSE() + IF(UNIX) + ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE}) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}") + ELSE() +- ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} mariadbclient.def) ++ ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE} mariadbclient.def) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C) + ENDIF() + + TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE ${SYSTEM_LIBS} ${CRYPTO_LIBS}) + + SIGN_TARGET(libmariadb) +- ++ENDIF() ++ ++IF(BUILD_SHARED_LIBS) + IF(CMAKE_SYSTEM_NAME MATCHES "Linux" OR + CMAKE_SYSTEM_NAME MATCHES "kFreeBSD" OR + CMAKE_SYSTEM_NAME MATCHES "GNU") +@@ -466,11 +469,14 @@ + ENDIF() + SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINK_FLAGS "${CC_BINARY_DIR}/libmariadb/mariadbclient.def") + ENDIF() +- ++ELSE() + SET_TARGET_PROPERTIES(mariadbclient PROPERTIES IMPORTED_INTERFACE_LINK_LIBRARIES "${SYSTEM_LIBS}") ++ENDIF() ++IF(BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES IMPORTED_INTERFACE_LINK_LIBRARIES "${SYSTEM_LIBS}") + + SET_TARGET_PROPERTIES(libmariadb PROPERTIES PREFIX "") ++ENDIF() + + # + # Installation +@@ -490,11 +496,15 @@ + ENDIF() + ENDIF() + ++IF(NOT BUILD_SHARED_LIBS) + create_symlink(libmariadb${CMAKE_STATIC_LIBRARY_SUFFIX} mariadbclient ${INSTALL_LIBDIR}) +- ++ENDIF() ++ ++IF(BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES VERSION + ${CPACK_PACKAGE_VERSION_MAJOR} + SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}) ++ELSE() + + IF(NOT WIN32) + SET_TARGET_PROPERTIES(mariadbclient PROPERTIES OUTPUT_NAME "${LIBMARIADB_STATIC_NAME}") +@@ -502,20 +512,33 @@ + + INSTALL(TARGETS mariadbclient + COMPONENT Development +- DESTINATION ${INSTALL_LIBDIR}) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ENDIF() ++ ++IF(BUILD_SHARED_LIBS) + IF(WIN32) + INSTALL(TARGETS libmariadb + COMPONENT SharedLibraries +- DESTINATION ${INSTALL_LIBDIR}) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ELSE() + # in cmake 3.12+ we can use + #INSTALL(TARGETS libmariadb LIBRARY DESTINATION ${INSTALL_LIBDIR} + # COMPONENT SharedLibraries NAMELINK_COMPONENT Development) + # but as long as we build on CentOS 7 with its cmake 2.8.12.2 we have to use +-INSTALL(TARGETS libmariadb LIBRARY DESTINATION ${INSTALL_LIBDIR} +- COMPONENT SharedLibraries NAMELINK_SKIP) +-INSTALL(TARGETS libmariadb LIBRARY DESTINATION ${INSTALL_LIBDIR} +- COMPONENT Development NAMELINK_ONLY) ++INSTALL(TARGETS libmariadb LIBRARY ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ COMPONENT SharedLibraries) ++INSTALL(TARGETS libmariadb LIBRARY ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ COMPONENT Development) + ENDIF() + + IF(MSVC) +@@ -524,3 +547,4 @@ + CONFIGURATIONS Debug RelWithDebInfo + COMPONENT Development) + ENDIF() ++ENDIF() diff --git a/recipes/mariadb-connector-c/config.yml b/recipes/mariadb-connector-c/config.yml index c4757604b999d..4b9cbb0316174 100644 --- a/recipes/mariadb-connector-c/config.yml +++ b/recipes/mariadb-connector-c/config.yml @@ -1,4 +1,6 @@ versions: + "3.3.8": + folder: all "3.3.3": folder: all "3.1.19": diff --git a/recipes/materialx/all/conandata.yml b/recipes/materialx/all/conandata.yml index 833be07aa53a6..f0f8336613f73 100644 --- a/recipes/materialx/all/conandata.yml +++ b/recipes/materialx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.39.1": + url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/refs/tags/v1.39.1.tar.gz" + sha256: "a392fd0aa372bbea7a6f27d20160829ec9380a801976ff467949a90e6555258d" "1.38.10": url: "https://github.com/AcademySoftwareFoundation/MaterialX/archive/refs/tags/v1.38.10.tar.gz" sha256: "706f44100188bc283a135ad24b348e55b405ac9e70cb64b7457c381383cc2887" diff --git a/recipes/materialx/all/conanfile.py b/recipes/materialx/all/conanfile.py index 2c3fec3a18990..910d0145067ce 100644 --- a/recipes/materialx/all/conanfile.py +++ b/recipes/materialx/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy, export_conandata_patches, get, rm, rmdir +from conan.tools.files import copy, export_conandata_patches, get, rm, rmdir, replace_in_file from conan.tools.apple import is_apple_os from conan.tools.scm import Version import os @@ -35,7 +35,10 @@ class MaterialXConan(ConanFile): @property def _min_cppstd(self): - return 14 + if Version(self.version) >= "1.39.0": + return 17 + else: + return 14 @property def _compilers_minimum_version(self): @@ -59,12 +62,11 @@ def configure(self): self.options.rm_safe("fPIC") def layout(self): - # src_folder must use the same source folder name the project cmake_layout(self, src_folder="src") def requirements(self): if self.options.with_openimageio: - self.requires("openimageio/2.5.10.1") + self.requires("openimageio/2.5.14.0") if self.settings.os in ["Linux", "FreeBSD"]: self.requires("xorg/system") self.requires("opengl/system") @@ -80,7 +82,7 @@ def validate(self): ) def build_requirements(self): - self.tool_requires("cmake/[>=3.16 <4]") + self.tool_requires("cmake/[>=3.24 <4]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -91,12 +93,25 @@ def generate(self): tc.variables["MATERIALX_TEST_RENDER"] = False tc.variables["MATERIALX_BUILD_SHARED_LIBS"] = self.options.shared tc.variables["MATERIALX_BUILD_GEN_MSL"] = self.options.build_gen_msl and is_apple_os + # TODO: Remove when Conan 1 support is dropped + if not self.settings.compiler.cppstd: + tc.variables["MATERIALX_BUILD_USE_CCACHE"] = self._min_cppstd + tc.variables["MATERIALX_BUILD_USE_CCACHE"] = False tc.generate() tc = CMakeDeps(self) tc.generate() + def _patch_sources(self): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_CXX_STANDARD", + "# set(CMAKE_CXX_STANDARD") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_POSITION_INDEPENDENT_CODE", + "# set(CMAKE_POSITION_INDEPENDENT_CODE") + def build(self): + cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/materialx/config.yml b/recipes/materialx/config.yml index 88daea6e8239b..a0bedf2527f55 100644 --- a/recipes/materialx/config.yml +++ b/recipes/materialx/config.yml @@ -1,3 +1,5 @@ versions: + "1.39.1": + folder: all "1.38.10": folder: all diff --git a/recipes/mbedtls/all/conandata.yml b/recipes/mbedtls/all/conandata.yml index 59921058d7fdf..6f725eee986a6 100644 --- a/recipes/mbedtls/all/conandata.yml +++ b/recipes/mbedtls/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.6.1": + url: "https://github.com/Mbed-TLS/mbedtls/releases/download/mbedtls-3.6.1/mbedtls-3.6.1.tar.bz2" + sha256: "fc8bef0991b43629b7e5319de6f34f13359011105e08e3e16eed3a9fe6ffd3a3" "3.6.0": url: "https://github.com/Mbed-TLS/mbedtls/releases/download/v3.6.0/mbedtls-3.6.0.tar.bz2" sha256: "3ecf94fcfdaacafb757786a01b7538a61750ebd85c4b024f56ff8ba1490fcd38" diff --git a/recipes/mbedtls/all/conanfile.py b/recipes/mbedtls/all/conanfile.py index 4ccbcab9405bc..d2eb38dbb504c 100644 --- a/recipes/mbedtls/all/conanfile.py +++ b/recipes/mbedtls/all/conanfile.py @@ -15,10 +15,10 @@ class MBedTLSConan(ConanFile): "mbed TLS makes it trivially easy for developers to include " "cryptographic and SSL/TLS capabilities in their (embedded) products" ) - topics = ("polarssl", "tls", "security") + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://tls.mbed.org" - license = "Apache-2.0" + topics = ("polarssl", "tls", "security") package_type = "library" settings = "os", "arch", "compiler", "build_type" diff --git a/recipes/mbedtls/config.yml b/recipes/mbedtls/config.yml index b30565c2258dc..8637037975a2e 100644 --- a/recipes/mbedtls/config.yml +++ b/recipes/mbedtls/config.yml @@ -1,4 +1,6 @@ versions: + "3.6.1": + folder: all "3.6.0": folder: all "3.5.2": diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index e803e1133c2a4..c86a0ee7fa859 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.0.0": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/3.0.0.tar.gz" + sha256: "757f94ce1818123abe899729bba00aa1d99150d4cbe934ab57a95b308fd536dd" "2.8.2": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.8.2.tar.gz" sha256: "4f560d752ead3aba4983bd09d87e9e32a8313770d7fde0374988785d193b386a" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index 39e742c86f556..7d4bc0dc284de 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,6 @@ versions: + "3.0.0": + folder: all "2.8.2": folder: all "2.8.1": diff --git a/recipes/melon/all/conandata.yml b/recipes/melon/all/conandata.yml new file mode 100644 index 0000000000000..9550cdb9601e7 --- /dev/null +++ b/recipes/melon/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.0-alpha.1": + url: "https://github.com/fhamonic/melon/archive/refs/tags/v1.0.0-alpha.1.tar.gz" + sha256: "370f6bb1fddc68f1ab771c8b659fed6d9dc8da51290897ed72fd87589143220c" diff --git a/recipes/melon/all/conanfile.py b/recipes/melon/all/conanfile.py new file mode 100644 index 0000000000000..0d83d36ecc529 --- /dev/null +++ b/recipes/melon/all/conanfile.py @@ -0,0 +1,76 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.52.0" + +class PackageConan(ConanFile): + name = "melon" + description = "A modern and efficient graph library using C++20 ranges and concepts." + license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/fhamonic/melon" + topics = ("graph", "algorithm", "ranges", "c++20", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "14", + "clang": "17", + "gcc": "12", + "msvc": "192", + "Visual Studio": "17", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("range-v3/0.12.0") + self.requires("fmt/10.2.1") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + 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." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["pthread"]) diff --git a/recipes/melon/all/test_package/CMakeLists.txt b/recipes/melon/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..17e2b8206c6aa --- /dev/null +++ b/recipes/melon/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(melon REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE melon::melon) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/melon/all/test_package/conanfile.py b/recipes/melon/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a808db45f245 --- /dev/null +++ b/recipes/melon/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + 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): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/melon/all/test_package/test_package.cpp b/recipes/melon/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..f0417c2d7cc52 --- /dev/null +++ b/recipes/melon/all/test_package/test_package.cpp @@ -0,0 +1,47 @@ +#include "melon/algorithm/bidirectional_dijkstra.hpp" +#include "melon/utility/static_digraph_builder.hpp" +#include "melon/container/static_digraph.hpp" + +using namespace fhamonic::melon; + +// test_package with bidirectional dijkstra because it condenses range-v3 uses +// shown to overwhelm some compilers + +int main(int argc, char *argv[]) +{ + static_digraph_builder builder(6); + + builder.add_arc(0u, 1u, 7); // 0 + builder.add_arc(0u, 2u, 9); // 1 + builder.add_arc(0u, 5u, 14); // 2 + builder.add_arc(1u, 0u, 7); // 3 + builder.add_arc(1u, 2u, 10); // 4 + builder.add_arc(1u, 3u, 15); // 5 + builder.add_arc(2u, 0u, 9); // 6 + builder.add_arc(2u, 1u, 10); // 7 + builder.add_arc(2u, 3u, 12); // 8 + builder.add_arc(2u, 5u, 2); // 9 + builder.add_arc(3u, 1u, 15); // 10 + builder.add_arc(3u, 2u, 12); // 11 + builder.add_arc(3u, 4u, 6); // 12 + builder.add_arc(4u, 3u, 6); // 13 + builder.add_arc(4u, 5u, 9); // 14 + builder.add_arc(5u, 0u, 14); // 15 + builder.add_arc(5u, 2u, 2); // 16 + builder.add_arc(5u, 4u, 9); // 17 + + auto [graph, length_map] = builder.build(); + + bidirectional_dijkstra alg(graph, length_map, 0u, 3u); + + int dist = alg.run(); + if (dist != 21) return EXIT_FAILURE; + + if (!alg.path_found()) return EXIT_FAILURE; + auto path = alg.path(); + if (std::ranges::distance(path) != 2) return EXIT_FAILURE; + if (std::ranges::find(path, 1u) == path.end()) return EXIT_FAILURE; + if (std::ranges::find(path, 8u) == path.end()) return EXIT_FAILURE; + + return EXIT_SUCCESS; +} diff --git a/recipes/melon/config.yml b/recipes/melon/config.yml new file mode 100644 index 0000000000000..6aee52e82f90c --- /dev/null +++ b/recipes/melon/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.0-alpha.1": + folder: all diff --git a/recipes/meshoptimizer/all/conandata.yml b/recipes/meshoptimizer/all/conandata.yml index 123647cd81c5f..94a9a85900a6d 100644 --- a/recipes/meshoptimizer/all/conandata.yml +++ b/recipes/meshoptimizer/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.21": + url: "https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.21.tar.gz" + sha256: "050A5438E4644833FF69F35110FCF4E37038A89C5FDC8AED45D8CD848ECB3A20" "0.20": url: "https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.20.tar.gz" sha256: "CF1077A83958BED3D8DA28A841CA53A6A42D871E49023EDCE64E37002A0F5A48" diff --git a/recipes/meshoptimizer/config.yml b/recipes/meshoptimizer/config.yml index 31e2badfe4c2f..bb6c09f07b3de 100644 --- a/recipes/meshoptimizer/config.yml +++ b/recipes/meshoptimizer/config.yml @@ -1,4 +1,6 @@ versions: + "0.21": + folder: all "0.20": folder: all "0.17": diff --git a/recipes/meson/all/conandata.yml b/recipes/meson/all/conandata.yml index 57f4fedf15a32..1be722fba90a3 100644 --- a/recipes/meson/all/conandata.yml +++ b/recipes/meson/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.5.1": + url: "https://github.com/mesonbuild/meson/archive/1.5.1.tar.gz" + sha256: "55f6acd5bf72c14d4aa5a781993633f84a1d117bdf2c2057735902ced9b81390" + "1.5.0": + url: "https://github.com/mesonbuild/meson/archive/1.5.0.tar.gz" + sha256: "781913826fb6f478eb7d77e1942ab3df39444e4c90e9a3523737e215171db469" "1.4.1": url: "https://github.com/mesonbuild/meson/archive/1.4.1.tar.gz" sha256: "a7efc72ecb873c5a62031ade1921a7177b67cfdcb2e9410a7ab023f9e8192f4b" @@ -29,60 +35,23 @@ sources: "1.1.1": url: "https://github.com/mesonbuild/meson/releases/download/1.1.1/meson-1.1.1.tar.gz" sha256: "d04b541f97ca439fb82fab7d0d480988be4bd4e62563a5ca35fadb5400727b1c" + # qt requires 1.1.0 "1.1.0": url: "https://github.com/mesonbuild/meson/archive/1.1.0.tar.gz" sha256: "f29a3e14062043d75e82d16f1e41856e6b1ed7a7c016e10c7b13afa7ee6364cc" - "1.0.1": - url: "https://github.com/mesonbuild/meson/archive/1.0.1.tar.gz" - sha256: "4ab3a5c0060dc22bdefb04507efc6c38acb910e91bcd467a38e1fa211e5a6cfe" + # wayland-protocols requires 1.0.0 "1.0.0": url: "https://github.com/mesonbuild/meson/releases/download/1.0.0/meson-1.0.0.tar.gz" sha256: "aa50a4ba4557c25e7d48446abfde857957dcdf58385fffbe670ba0e8efacce05" - "0.64.1": - url: "https://github.com/mesonbuild/meson/archive/0.64.1.tar.gz" - sha256: "1d12a4bc1cf3ab18946d12cf0b6452e5254ada1ad50aacc97f87e2cccd7da315" - "0.64.0": - url: "https://github.com/mesonbuild/meson/archive/0.64.0.tar.gz" - sha256: "6477993d781b6efea93091616a6d6a0766c0e026076dbeb11249bf1c9b49a347" - "0.63.3": - url: "https://github.com/mesonbuild/meson/archive/0.63.3.tar.gz" - sha256: "7c516c2099b762203e8a0a22412aa465b7396e6f9b1ab728bad6e6db44dc2659" - "0.63.2": - url: "https://github.com/mesonbuild/meson/archive/0.63.2.tar.gz" - sha256: "023a3f7c74e68991154c3205a6975705861eedbf8130e013d15faa1df1af216e" - "0.63.1": - url: "https://github.com/mesonbuild/meson/archive/0.63.1.tar.gz" - sha256: "f355829f0e8c714423f03a06604c04c216d4cbe3586f3154cb2181076b19207a" - "0.63.0": - url: "https://github.com/mesonbuild/meson/archive/0.63.0.tar.gz" - sha256: "77808d47fa05875c2553d66cb6c6140c2f687b46256dc537eeb8a63889e0bea2" + # gtk requires 0.62.2 "0.62.2": url: "https://github.com/mesonbuild/meson/archive/0.62.2.tar.gz" sha256: "97108f4d9bb16bc758c44749bd25ec7d42c6a762961efbed8b7589a2a3551ea6" - "0.62.1": - url: "https://github.com/mesonbuild/meson/archive/0.62.1.tar.gz" - sha256: "9fb52e66dbc613479a5f70e46cc2e8faf5aa65e09313f2c71fa63b8afd018107" - "0.62.0": - url: "https://github.com/mesonbuild/meson/archive/0.62.0.tar.gz" - sha256: "72ac3bab701dfd597604de29cc74baaa1cc0ad8ca26ae23d5288de26abfe1c80" + # gst-plugins-base requires 0.61.2 "0.61.2": url: "https://github.com/mesonbuild/meson/archive/0.61.2.tar.gz" sha256: "33cd555314a94d52acfbb3f6f44d4e61c4ad0bfec7acf4301be7e40bb969b3a8" - "0.60.2": - url: "https://github.com/mesonbuild/meson/archive/0.60.2.tar.gz" - sha256: "fc7c2f315b5b63fee0414b0b94b5a7d0e9c71c8c9bb8487314eb5a9a33984b8d" + # gobject-introspection requires 0.59.3 "0.59.3": url: "https://github.com/mesonbuild/meson/archive/0.59.3.tar.gz" sha256: "b2c5bfd5032189a66cf6a32d98ba82d94d7d314577d8efe4d9dc159c4073f282" - "0.58.1": - url: "https://github.com/mesonbuild/meson/archive/0.58.1.tar.gz" - sha256: "78e0f553dd3bc632d5f96ab943b1bbccb599c2c84ff27c5fb7f7fff9c8a3f6b4" - "0.57.2": - url: "https://github.com/mesonbuild/meson/archive/0.57.2.tar.gz" - sha256: "cd3773625253df4fd1c380faf03ffae3d02198d6301e7c8bc7bba6c66af66096" - "0.56.2": - url: "https://github.com/mesonbuild/meson/archive/0.56.2.tar.gz" - sha256: "aaae961c3413033789248ffe6762589e80b6cf487c334d0b808e31a32c48f35f" - "0.55.3": - url: "https://github.com/mesonbuild/meson/archive/0.55.3.tar.gz" - sha256: "2b276df50c5b13ccdbfb14d3333141e9e7985aca31b60400b3f3e0be2ee6897e" diff --git a/recipes/meson/all/conanfile.py b/recipes/meson/all/conanfile.py index f11560d3a45d0..788b38338e98b 100644 --- a/recipes/meson/all/conanfile.py +++ b/recipes/meson/all/conanfile.py @@ -11,12 +11,12 @@ class MesonConan(ConanFile): name = "meson" - package_type = "application" - description = "Meson is a project to create the best possible next-generation build system" - topics = ("meson", "mesonbuild", "build-system") + description = "a project to create the best possible next-generation build system" + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/mesonbuild/meson" - license = "Apache-2.0" + topics = ("mesonbuild", "build-system") + package_type = "application" no_copy_source = True def layout(self): @@ -24,17 +24,15 @@ def layout(self): def requirements(self): if self.conf.get("tools.meson.mesontoolchain:backend", default="ninja", check_type=str) == "ninja": - self.requires("ninja/1.11.1") + # Meson requires >=1.8.2 as of 1.5 + # https://github.com/mesonbuild/meson/blob/b6b634ad33e5ca9ad4a9d6139dba4244847cc0e8/mesonbuild/backend/ninjabackend.py#L625 + self.requires("ninja/[>=1.10.2 <2]") def package_id(self): self.info.clear() def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) - - def build(self): - pass + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) diff --git a/recipes/meson/config.yml b/recipes/meson/config.yml index 7d388efa3e5ae..9b74b18776ede 100644 --- a/recipes/meson/config.yml +++ b/recipes/meson/config.yml @@ -1,4 +1,8 @@ versions: + "1.5.1": + folder: all + "1.5.0": + folder: all "1.4.1": folder: all "1.4.0": @@ -21,39 +25,11 @@ versions: folder: all "1.1.0": folder: all - "1.0.1": - folder: all "1.0.0": folder: all - "0.64.1": - folder: all - "0.64.0": - folder: all - "0.63.3": - folder: all - "0.63.2": - folder: all - "0.63.1": - folder: all - "0.63.0": - folder: all "0.62.2": folder: all - "0.62.1": - folder: all - "0.62.0": - folder: all "0.61.2": folder: all - "0.60.2": - folder: all "0.59.3": folder: all - "0.58.1": - folder: all - "0.57.2": - folder: all - "0.56.2": - folder: all - "0.55.3": - folder: all diff --git a/recipes/metal-cpp/all/conandata.yml b/recipes/metal-cpp/all/conandata.yml new file mode 100644 index 0000000000000..2fd6dd33feee7 --- /dev/null +++ b/recipes/metal-cpp/all/conandata.yml @@ -0,0 +1,30 @@ +sources: + "14.2": + url: "https://developer.apple.com/metal/cpp/files/metal-cpp_macOS14.2_iOS17.2.zip" + sha256: "d800ddbc3fccabce3a513f975eeafd4057e07a29e905ad5aaef8c1f4e12d9ada" + "14": + url: "https://developer.apple.com/metal/cpp/files/metal-cpp_macOS14_iOS17-beta.zip" + sha256: "2009a339ecbd56b36601435fe08c415749f8ad09145755472bb637b319003367" + "13.3": + url: "https://developer.apple.com/metal/cpp/files/metal-cpp_macOS13.3_iOS16.4.zip" + sha256: "0afd87ca851465191ae4e3980aa036c7e9e02fe32e7c760ac1a74244aae6023b" + "13": + url: "https://developer.apple.com/metal/cpp/files/metal-cpp_macOS13_iOS16.zip" + sha256: "6f741894229e9c750add1afc3797274fc008c7507e2ae726370c17c34b7c6a68" +minimum_os_version: + "14.2": + "Macos": "14.2" + "iOS": "17.2" + "tvOS": "17.2" + "14": + "Macos": "14" + "iOS": "17" + "tvOS": "17" + "13.3": + "Macos": "13.3" + "iOS": "16.4" + "tvOS": "16.4" + "13": + "Macos": "13" + "iOS": "16" + "tvOS": "16" diff --git a/recipes/metal-cpp/all/conanfile.py b/recipes/metal-cpp/all/conanfile.py new file mode 100644 index 0000000000000..2efbdaef9686f --- /dev/null +++ b/recipes/metal-cpp/all/conanfile.py @@ -0,0 +1,92 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import XCRun +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +import os +import platform + +required_conan_version = ">=1.53.0" + + +class MetalcppConan(ConanFile): + name = "metal-cpp" + description = ( + "Library for the usage of Apple Metal GPU programming in C++ applications - " + "Header-only library to wrap Metal in C++ classes" + ) + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://developer.apple.com/metal/cpp/" + topics = ("metal", "gpu", "apple", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + + no_copy_source = True + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def validate(self): + os_name = str(self.settings.os) + if not os_name in ["Macos", "iOS", "tvOS"]: + raise ConanInvalidConfiguration("Metal can only be used on an Macos, iOS or tvOS platform.") + + if self.settings.compiler.get_safe("cppstd"): + min_cppstd = "17" + check_min_cppstd(self, min_cppstd) + + minimum_os_version = self.conan_data["minimum_os_version"][self.version][os_name] + + xcrun = XCRun(self) + os_version = self.settings.get_safe("os.version") + sdk_version = self.settings.get_safe("os.sdk_version") + visible_sdk_version = xcrun.sdk_version if platform.system() == "Darwin" else None + + sdk_version = sdk_version or os_version or visible_sdk_version + + if sdk_version is None: + # Will raise when `os.version` or `os.sdk_version` are not defined + # and we are *NOT* running this on macOS + raise ConanInvalidConfiguration(f"metal-cpp {self.version} requires the os.version or sdk.version settings, but the are not defined") + + if sdk_version < Version(minimum_os_version): + raise ConanInvalidConfiguration(f"metal-cpp {self.version} requires {os_name} SDK version {minimum_os_version} but {sdk_version} is the target.") + + def package(self): + copy( + self, + pattern="LICENSE.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=os.path.join(self.source_folder) + ) + copy( + self, + pattern="**.hpp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder), + keep_path=True + ) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "metal-cpp") + self.cpp_info.set_property("cmake_target_name", "metal-cpp::metal-cpp") + self.cpp_info.set_property("pkg_config_name", "metal-cpp") + self.cpp_info.bindirs = [] + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + + self.cpp_info.frameworks = ["Foundation", "Metal", "MetalKit", "QuartzCore"] + if self.version >= Version('14'): + self.cpp_info.frameworks.append("MetalFX") diff --git a/recipes/metal-cpp/all/test_package/CMakeLists.txt b/recipes/metal-cpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..640984ec9c7f0 --- /dev/null +++ b/recipes/metal-cpp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.12) +project(test_package LANGUAGES CXX) + +find_package(metal-cpp REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE metal-cpp::metal-cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/metal-cpp/all/test_package/conanfile.py b/recipes/metal-cpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..e28de31d33b1c --- /dev/null +++ b/recipes/metal-cpp/all/test_package/conanfile.py @@ -0,0 +1,32 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +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 = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def validate(self): + if not is_apple_os(self): + raise ConanInvalidConfiguration("Metal can only be used on an Apple OS.") + + 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): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/metal-cpp/all/test_package/test_package.cpp b/recipes/metal-cpp/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..bb32b01f0db92 --- /dev/null +++ b/recipes/metal-cpp/all/test_package/test_package.cpp @@ -0,0 +1,18 @@ +#include + +#define NS_PRIVATE_IMPLEMENTATION +#define MTL_PRIVATE_IMPLEMENTATION + +#include +#include + + +int main() +{ + // Create a metal device to check the library functions + MTL::Device* metalDevice = MTL::CreateSystemDefaultDevice(); + + std::cout << "Metal device detected: " << metalDevice->name()->cString(NS::ASCIIStringEncoding) << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/metal-cpp/config.yml b/recipes/metal-cpp/config.yml new file mode 100644 index 0000000000000..1f484bca5aa17 --- /dev/null +++ b/recipes/metal-cpp/config.yml @@ -0,0 +1,9 @@ +versions: + "14.2": + folder: all + "14": + folder: all + "13.3": + folder: all + "13": + folder: all diff --git a/recipes/mgclient/all/conandata.yml b/recipes/mgclient/all/conandata.yml index a07869d5875d5..d3dddbce027d5 100644 --- a/recipes/mgclient/all/conandata.yml +++ b/recipes/mgclient/all/conandata.yml @@ -1,8 +1,15 @@ sources: + "1.4.3": + url: "https://github.com/memgraph/mgclient/archive/refs/tags/v1.4.3.tar.gz" + sha256: "f446b469532cd5154b8fb986ac57ca9880763e34c77e564d2c4c948989b0244e" "1.4.2": url: "https://github.com/memgraph/mgclient/archive/refs/tags/v1.4.2.tar.gz" sha256: "aa89422636b1e25b8f9f34453f331e15d32a5957a9b2381c3598fc3644dbc043" patches: + "1.4.3": + - patch_file: "patches/1.4.2-0001-static-shared.build.patch" + patch_description: "make static and shared build separated" + patch_type: "conan" "1.4.2": - patch_file: "patches/1.4.2-0001-static-shared.build.patch" patch_description: "make static and shared build separated" diff --git a/recipes/mgclient/config.yml b/recipes/mgclient/config.yml index ba127d382373b..af4203f05155e 100644 --- a/recipes/mgclient/config.yml +++ b/recipes/mgclient/config.yml @@ -1,3 +1,5 @@ versions: + "1.4.3": + folder: all "1.4.2": folder: all diff --git a/recipes/minhook/all/conandata.yml b/recipes/minhook/all/conandata.yml new file mode 100644 index 0000000000000..9fbac6aa78698 --- /dev/null +++ b/recipes/minhook/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.3.3.cci.20240629": + url: "https://github.com/TsudaKageyu/minhook/archive/91cc9466e383d13a43d7cf33c7c8fdccb27095d3.tar.gz" + sha256: "b84b2ff19afe5fb9430948680146bee2e198392ee6333a71f81e339c36a819f1" diff --git a/recipes/minhook/all/conanfile.py b/recipes/minhook/all/conanfile.py new file mode 100644 index 0000000000000..73c08a93a80d6 --- /dev/null +++ b/recipes/minhook/all/conanfile.py @@ -0,0 +1,69 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir + +required_conan_version = ">=1.53.0" + + +class PackageConan(ConanFile): + name = "minhook" + description = "The Minimalistic x86/x64 API Hooking Library for Windows" + license = "BSD-2-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/TsudaKageyu/minhook" + topics = ("hook", "windows") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + } + default_options = { + "shared": False, + } + + def configure(self): + # minhook is a plain C projects + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.os != "Windows": + raise ConanInvalidConfiguration(f"{self.ref} can only be built on Windows.") + + if self.settings.arch not in ["x86", "x86_64"]: + raise ConanInvalidConfiguration(f"{self.ref} can only be built on x86 or x86_64 architectures.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + tc = CMakeToolchain(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "minhook")) + + def package_info(self): + if self.settings.arch == "x86_64": + postfix = ".x64d" if self.settings.build_type == "Debug" else ".x64" + else: + postfix = ".x32d" if self.settings.build_type == "Debug" else ".x32" + + self.cpp_info.libs = [f"minhook{postfix}"] diff --git a/recipes/minhook/all/test_package/CMakeLists.txt b/recipes/minhook/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..a090c65f0323b --- /dev/null +++ b/recipes/minhook/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) + +find_package(minhook REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE minhook::minhook) diff --git a/recipes/minhook/all/test_package/conanfile.py b/recipes/minhook/all/test_package/conanfile.py new file mode 100644 index 0000000000000..d7de1f914ce42 --- /dev/null +++ b/recipes/minhook/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + 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): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/minhook/all/test_package/test_package.cpp b/recipes/minhook/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..95ccf7f207da6 --- /dev/null +++ b/recipes/minhook/all/test_package/test_package.cpp @@ -0,0 +1,75 @@ +#include + +#include + +#include "MinHook.h" + +typedef int(WINAPI *MESSAGEBOXW)(HWND, LPCWSTR, LPCWSTR, UINT); + +// Pointer for calling original MessageBoxW. +MESSAGEBOXW fpMessageBoxW = NULL; + +// Dummy MessageBox function for testing. +int WINAPI DummyMessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType) +{ + const int box_width = 40; + std::wstring text(lpText); + std::wstring caption(lpCaption); + + // Top border + std::wcout << "+" << std::wstring(box_width - 2, '-') << "+\n"; + + // Caption + std::wcout << "| " << caption << std::wstring(box_width - 3 - caption.size(), ' ') << "|\n"; + std::wcout << "| " << std::wstring(box_width - 4, '=') << " |\n"; + + // Text + std::wcout << "| " << text << std::wstring(box_width - 3 - text.size(), ' ') << "|\n"; + + // Bottom border + std::wcout << "+" << std::wstring(box_width - 2, '-') << "+\n"; + + return IDOK; // The OK button was selected. +} + +// Detour function which overrides MessageBoxW. +int WINAPI DetourMessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType) +{ + return fpMessageBoxW(hWnd, L"Hooked!", lpCaption, uType); +} + +int main() +{ + // Initialize MinHook. + if (MH_Initialize() != MH_OK) { + return 1; + } + + // Create a hook for MessageBoxW, in disabled state. + if (MH_CreateHook(&DummyMessageBoxW, &DetourMessageBoxW, reinterpret_cast(&fpMessageBoxW)) != MH_OK) { + return 1; + } + + // Enable the hook for MessageBoxW. + if (MH_EnableHook(&DummyMessageBoxW) != MH_OK) { + return 1; + } + + // Expected to tell "Hooked!". + DummyMessageBoxW(NULL, L"Not hooked...", L"MinHook Sample", MB_OK); + + // Disable the hook for MessageBoxW. + if (MH_DisableHook(&DummyMessageBoxW) != MH_OK) { + return 1; + } + + // Expected to tell "Not hooked...". + DummyMessageBoxW(NULL, L"Not hooked...", L"MinHook Sample", MB_OK); + + // Uninitialize MinHook. + if (MH_Uninitialize() != MH_OK) { + return 1; + } + + return 0; +} diff --git a/recipes/minhook/config.yml b/recipes/minhook/config.yml new file mode 100644 index 0000000000000..36b74a86356a1 --- /dev/null +++ b/recipes/minhook/config.yml @@ -0,0 +1,3 @@ +versions: + "1.3.3.cci.20240629": + folder: all diff --git a/recipes/mini/all/conandata.yml b/recipes/mini/all/conandata.yml index da5a086ee7d80..5c54e75793e6e 100644 --- a/recipes/mini/all/conandata.yml +++ b/recipes/mini/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.9.16": + url: "https://github.com/metayeti/mINI/archive/refs/tags/0.9.16.tar.gz" + sha256: "ce20e12b1e3bcd79d6eaa47bf8d4bb319e843dfa3585e069e73d581bdf0a81ec" "0.9.15": url: "https://github.com/metayeti/mINI/archive/refs/tags/0.9.15.tar.gz" sha256: "241e105ab074827ab8b40582aa7b04c6191f84b244603969965c0874ad4f942c" diff --git a/recipes/mini/config.yml b/recipes/mini/config.yml index 0382c3dda0836..8e233bb2eb4ca 100644 --- a/recipes/mini/config.yml +++ b/recipes/mini/config.yml @@ -1,3 +1,5 @@ versions: + "0.9.16": + folder: all "0.9.15": folder: all diff --git a/recipes/minmea/all/conandata.yml b/recipes/minmea/all/conandata.yml new file mode 100644 index 0000000000000..f6a2a3a0d5950 --- /dev/null +++ b/recipes/minmea/all/conandata.yml @@ -0,0 +1,12 @@ +sources: + "0.3.0.cci.20230620": + url: "https://github.com/kosma/minmea/archive/e368d847d75abd891c651f7d30ce5efb6681adb7.tar.gz" + sha256: "9b845dfc7f4475c17710a0ac0823b11a6946df7b20dfacd02b03921826eeab3a" +patches: + "0.3.0.cci.20230620": + - patch_file: "patches/001-disable-pkgconfig-libcheck.patch" + patch_description: "Do not search for libcheck - Exclusive for testing" + patch_type: "conan" + - patch_file: "patches/002-windows-support.patch" + patch_description: "Manage compat header file for Windows" + patch_type: "portability" diff --git a/recipes/minmea/all/conanfile.py b/recipes/minmea/all/conanfile.py new file mode 100644 index 0000000000000..30eb575863037 --- /dev/null +++ b/recipes/minmea/all/conanfile.py @@ -0,0 +1,82 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, apply_conandata_patches, export_conandata_patches +from conan.tools.microsoft import is_msvc +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.53.0" + +class MinmeaConan(ConanFile): + name = "minmea" + description = "a lightweight GPS NMEA 0183 parser library in pure C" + license = ("WTFPL", "MIT", "LGPL-3.0-or-later") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/kosma/minmea" + topics = ("gps", "NMEA", "parser") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + # INFO: Windows mingw supported: https://github.com/kosma/minmea?tab=readme-ov-file#compatibility + # INFO: MSVC fails with error C2011: 'timespec': 'struct' type redefinition + if is_msvc(self): + raise ConanInvalidConfiguration(f"{self.ref} can not be built on Visual Studio and msvc. Use mingw instead or similar.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + if self.settings.os == "Windows": + tc.preprocessor_definitions["MINMEA_INCLUDE_COMPAT"] = "1" + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build(target="minmea") + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSE.*", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "minmea.h", self.source_folder, os.path.join(self.package_folder, "include")) + copy(self, "libminmea.a", self.build_folder, os.path.join(self.package_folder, "lib")) + copy(self, "libminmea.so", self.build_folder, os.path.join(self.package_folder, "lib")) + copy(self, "libminmea.dylib", self.build_folder, os.path.join(self.package_folder, "lib")) + if self.settings.os == "Windows": + copy(self, "libminmea.dll.a", self.build_folder, os.path.join(self.package_folder, "lib")) + copy(self, "libminmea.dll", self.build_folder, os.path.join(self.package_folder, "bin")) + copy(self, "minmea_compat.h", self.source_folder, os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.libs = ["minmea"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m"] + if self.settings.os == "Windows": + self.cpp_info.defines = ["MINMEA_INCLUDE_COMPAT=1"] diff --git a/recipes/minmea/all/patches/001-disable-pkgconfig-libcheck.patch b/recipes/minmea/all/patches/001-disable-pkgconfig-libcheck.patch new file mode 100644 index 0000000000000..7e3f4636a811b --- /dev/null +++ b/recipes/minmea/all/patches/001-disable-pkgconfig-libcheck.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b96e1d7..4674f49 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,7 +6,6 @@ project(minmea) + + find_package(Threads REQUIRED) # Workaround for https://github.com/libcheck/check/issues/48#issuecomment-322965461 + find_package(PkgConfig) +-pkg_check_modules(CHECK REQUIRED check) + link_directories(${CHECK_LIBRARY_DIRS}) + + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wextra -Werror -std=c99") diff --git a/recipes/minmea/all/patches/002-windows-support.patch b/recipes/minmea/all/patches/002-windows-support.patch new file mode 100644 index 0000000000000..8f7360ca6288d --- /dev/null +++ b/recipes/minmea/all/patches/002-windows-support.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4674f49..895b835 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,6 +13,11 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -D_D + + set(minmea_SRCS minmea.c minmea.h) + add_library(minmea ${minmea_SRCS}) ++target_include_directories(minmea PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) ++if (WIN32) ++ configure_file(compat/minmea_compat_windows.h ${CMAKE_CURRENT_SOURCE_DIR}/minmea_compat.h COPYONLY) ++ target_compile_definitions(minmea PRIVATE MINMEA_INCLUDE_COMPAT) ++endif() + + add_executable(example example.c) + target_link_libraries(example minmea) diff --git a/recipes/minmea/all/test_package/CMakeLists.txt b/recipes/minmea/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..62bf6147b6fb5 --- /dev/null +++ b/recipes/minmea/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(minmea REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE minmea::minmea) +target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) diff --git a/recipes/minmea/all/test_package/conanfile.py b/recipes/minmea/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/minmea/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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 = "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): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/minmea/all/test_package/test_package.c b/recipes/minmea/all/test_package/test_package.c new file mode 100644 index 0000000000000..9c222e438c9ae --- /dev/null +++ b/recipes/minmea/all/test_package/test_package.c @@ -0,0 +1,16 @@ +#include +#include "minmea.h" + + +int main(void) { + char* nmea_data = "$GPGGA,155246.585,5231.171,N,01321.830,E,1,12,1.0,0.0,M,0.0,M,,*6F"; + + if (minmea_sentence_id(nmea_data, false) == MINMEA_SENTENCE_GGA) { + struct minmea_sentence_gga frame; + if (minmea_parse_gga(&frame, nmea_data)) { + printf("$GGA: fix quality: %d\n", frame.fix_quality); + } + } + + return 0; +} diff --git a/recipes/minmea/config.yml b/recipes/minmea/config.yml new file mode 100644 index 0000000000000..85c5d6a070371 --- /dev/null +++ b/recipes/minmea/config.yml @@ -0,0 +1,3 @@ +versions: + "0.3.0.cci.20230620": + folder: all diff --git a/recipes/mlpack/all/conandata.yml b/recipes/mlpack/all/conandata.yml index 1b7e9d933c958..13e81aa865d9c 100644 --- a/recipes/mlpack/all/conandata.yml +++ b/recipes/mlpack/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.4.0": + url: "https://github.com/mlpack/mlpack/archive/refs/tags/4.4.0.tar.gz" + sha256: "61c604026d05af26c244b0e47024698bbf150dfcc9d77b64057941d7d64d6cf6" "4.3.0": url: "https://github.com/mlpack/mlpack/archive/refs/tags/4.3.0.tar.gz" sha256: "08cd54f711fde66fc3b6c9db89dc26776f9abf1a6256c77cfa3556e2a56f1a3d" diff --git a/recipes/mlpack/all/conanfile.py b/recipes/mlpack/all/conanfile.py index bf8304a813b40..a09b0e5a3296c 100644 --- a/recipes/mlpack/all/conanfile.py +++ b/recipes/mlpack/all/conanfile.py @@ -24,6 +24,8 @@ class MlpackConan(ConanFile): @property def _min_cppstd(self): + if Version(self.version) >= "4.4.0": + return 17 if is_msvc(self): return 17 return 14 @@ -82,23 +84,6 @@ def package(self): excludes=["mlpack/bindings/*", "mlpack/tests/*", "mlpack/CMakeLists.txt"]) self._configure_headers() - @property - def _openmp_flags(self): - # Based on https://github.com/Kitware/CMake/blob/v3.28.1/Modules/FindOpenMP.cmake#L104-L135 - if self.settings.compiler == "clang": - return ["-fopenmp=libomp"] - elif self.settings.compiler == "apple-clang": - return ["-Xclang", "-fopenmp"] - elif self.settings.compiler == "gcc": - return ["-fopenmp"] - elif self.settings.compiler == "intel-cc": - return ["-Qopenmp"] - elif self.settings.compiler == "sun-cc": - return ["-xopenmp"] - elif is_msvc(self): - return ["-openmp:llvm"] - return None - def package_info(self): self.cpp_info.set_property("cmake_file_name", "mlpack") self.cpp_info.set_property("cmake_target_name", "mlpack::mlpack") @@ -113,12 +98,22 @@ def package_info(self): if self.settings.get_safe("compiler.libcxx") in ["libstdc++", "libstdc++11"]: self.cpp_info.system_libs.append("atomic") - self.cpp_info.cflags = self._openmp_flags - self.cpp_info.cxxflags = self._openmp_flags - + # FIXME: Review this flags assignment. LLVM-OpenMP is already defining these ones. + # Do we want to depend on llvm-openmp? Only for apple-clang? + # For more info, see this comment https://github.com/conan-io/conan-center-index/pull/22353#issuecomment-2214593855 + flags = [] + # Based on https://github.com/Kitware/CMake/blob/v3.28.1/Modules/FindOpenMP.cmake#L104-L135 + if self.settings.compiler == "clang": + flags = ["-fopenmp=libomp"] + elif self.settings.compiler == "gcc": + flags = ["-fopenmp"] + if self.settings.os == "Windows": + flags.append("-Wa,-mbig-obj") + elif self.settings.compiler == "sun-cc": + flags = ["-xopenmp"] + elif is_msvc(self): # https://github.com/mlpack/mlpack/blob/4.3.0/CMakeLists.txt#L164-L175 - if is_msvc(self): - self.cpp_info.cxxflags.extend(["/bigobj", "/Zm200", "/Zc:__cplusplus"]) - elif self.settings.os == "Windows" and self.settings.compiler == "gcc": - self.cpp_info.cflags.append("-Wa,-mbig-obj") - self.cpp_info.cxxflags.append("-Wa,-mbig-obj") + flags = ["-openmp:llvm", "/bigobj", "/Zm200", "/Zc:__cplusplus"] + if flags: + self.cpp_info.cflags = flags + self.cpp_info.cxxflags = flags diff --git a/recipes/mlpack/all/test_package/CMakeLists.txt b/recipes/mlpack/all/test_package/CMakeLists.txt index 8bdbe35c75acf..a68462fb67d65 100644 --- a/recipes/mlpack/all/test_package/CMakeLists.txt +++ b/recipes/mlpack/all/test_package/CMakeLists.txt @@ -5,7 +5,7 @@ find_package(mlpack REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE mlpack::mlpack) -if(MSVC) +if(MSVC OR mlpack_VERSION VERSION_GREATER_EQUAL 4.4.0) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) else() target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/mlpack/config.yml b/recipes/mlpack/config.yml index fefa3b794940e..e9bbd51f309ab 100644 --- a/recipes/mlpack/config.yml +++ b/recipes/mlpack/config.yml @@ -1,3 +1,5 @@ versions: + "4.4.0": + folder: all "4.3.0": folder: all diff --git a/recipes/modern-cpp-kafka/all/conandata.yml b/recipes/modern-cpp-kafka/all/conandata.yml index 11b37a50dbe81..9477b5d2f991b 100644 --- a/recipes/modern-cpp-kafka/all/conandata.yml +++ b/recipes/modern-cpp-kafka/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2024.07.03": + url: "https://github.com/morganstanley/modern-cpp-kafka/archive/v2024.07.03.tar.gz" + sha256: "06b89b5f2757d2107761d65869b98c3ec71e3c8c7e2cb2ab49277f3272044f02" "2023.03.07": url: "https://github.com/morganstanley/modern-cpp-kafka/archive/v2023.03.07.tar.gz" sha256: "4685527a9768d44ed769ec6e502c3edde0b5cf4d341d8f9b476474955c61bba4" diff --git a/recipes/modern-cpp-kafka/config.yml b/recipes/modern-cpp-kafka/config.yml index a01e300c4e30c..0f76703e92e08 100644 --- a/recipes/modern-cpp-kafka/config.yml +++ b/recipes/modern-cpp-kafka/config.yml @@ -1,4 +1,6 @@ versions: + "2024.07.03": + folder: all "2023.03.07": folder: all "2023.01.05": diff --git a/recipes/mold/README.md b/recipes/mold/README.md new file mode 100644 index 0000000000000..8a1ee68e8c4ed --- /dev/null +++ b/recipes/mold/README.md @@ -0,0 +1,22 @@ +# mold: A Modern Linker + +mold is a faster drop-in replacement for existing Unix linkers. It is several +times quicker than the LLVM lld linker, the second-fastest open-source linker. +mold aims to enhance developer productivity by minimizing build time, +particularly in rapid debug-edit-rebuild cycles. + +You can configure Conan to download the latest version of `mold` and use it as the linker +when building your dependencies and projects from source. Currently only supported +when targeting Linux as the platform. + +To use mold automatically as the linker, you can add the following section to your +_host_ profile that targets Linux. When using gcc, please note that the following +flags require gcc 12.1 or greater. + +``` +[tool_requires] +*:mold/[*] +[conf] +tools.build:exelinkflags=['-fuse-ld=mold'] +tools.build:sharedlinkflags=['-fuse-ld=mold'] +``` diff --git a/recipes/mold/all/conandata.yml b/recipes/mold/all/conandata.yml index 76bdbbd4a2351..2c5f346939e24 100644 --- a/recipes/mold/all/conandata.yml +++ b/recipes/mold/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.33.0": + url: "https://github.com/rui314/mold/archive/refs/tags/v2.33.0.tar.gz" + sha256: "37b3aacbd9b6accf581b92ba1a98ca418672ae330b78fe56ae542c2dcb10a155" "2.32.1": url: "https://github.com/rui314/mold/archive/refs/tags/v2.32.1.tar.gz" sha256: "f3c9a527d884c635834fe7d79b3de959b00783bf9446280ea274d996f0335825" diff --git a/recipes/mold/all/conanfile.py b/recipes/mold/all/conanfile.py index 68b6db435177a..c604d73299327 100644 --- a/recipes/mold/all/conanfile.py +++ b/recipes/mold/all/conanfile.py @@ -45,7 +45,7 @@ def requirements(self): self.requires("mimalloc/2.1.2") if Version(self.version) < "2.2.0": # Newer versions use vendored-in BLAKE3 - self.requires("openssl/[>=1.1 <4]") + self.requires("openssl/[>=1.1 <4]") def package_id(self): del self.info.settings.compiler @@ -65,6 +65,8 @@ def validate(self): raise ConanInvalidConfiguration("Clang version 12 or higher required") if self.settings.compiler == "apple-clang" and "armv8" == self.settings.arch : raise ConanInvalidConfiguration(f'{self.name} is still not supported by Mac M1.') + if Version(self.version) == "2.33.0" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "14": + raise ConanInvalidConfiguration(f'{self.ref} doesn\'t support Apple-Clang < 14.') def build_requirements(self): self.tool_requires("cmake/[>=3.18.0 <4]") diff --git a/recipes/mold/config.yml b/recipes/mold/config.yml index 096044e3278b2..e7c236baf0d22 100644 --- a/recipes/mold/config.yml +++ b/recipes/mold/config.yml @@ -1,4 +1,6 @@ versions: + "2.33.0": + folder: all "2.32.1": folder: all "2.32.0": diff --git a/recipes/mongo-c-driver/all/conandata.yml b/recipes/mongo-c-driver/all/conandata.yml index 2f74d581142e4..ad753c1d37bdd 100644 --- a/recipes/mongo-c-driver/all/conandata.yml +++ b/recipes/mongo-c-driver/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.27.6": + url: "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.27.6.tar.gz" + sha256: "7dee166dd106e3074582dd107f62815aa29311520149cda52efb69590b2cae7a" + "1.27.5": + url: "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.27.5.tar.gz" + sha256: "b90dab0856448c5919c1e04fe8d5a4d80d57779ccf8cf08e3981314a5961973d" + "1.27.4": + url: "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.27.4.tar.gz" + sha256: "37898440ebfd6fedfdb9cbbff7b0c5813f7e157b584a881538f124d086f880df" "1.27.3": url: "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/1.27.3.tar.gz" sha256: "2593048270f8426c3dc60f0a3c22c3da92ae00a3ef284da7e662a1348ca1685c" diff --git a/recipes/mongo-c-driver/all/conanfile.py b/recipes/mongo-c-driver/all/conanfile.py index cdbc84b964e85..d3e733eb6de05 100644 --- a/recipes/mongo-c-driver/all/conanfile.py +++ b/recipes/mongo-c-driver/all/conanfile.py @@ -76,7 +76,7 @@ def requirements(self): if self.options.with_zlib: self.requires("zlib/[>=1.2.11 <2]") if self.options.with_zstd: - self.requires("zstd/1.5.5") + self.requires("zstd/[^1.5]") if self.options.with_icu: self.requires("icu/74.2") diff --git a/recipes/mongo-c-driver/config.yml b/recipes/mongo-c-driver/config.yml index e4d32528df309..544d212a2ed90 100644 --- a/recipes/mongo-c-driver/config.yml +++ b/recipes/mongo-c-driver/config.yml @@ -1,4 +1,10 @@ versions: + "1.27.6": + folder: all + "1.27.5": + folder: all + "1.27.4": + folder: all "1.27.3": folder: all "1.27.2": diff --git a/recipes/mongo-cxx-driver/all/conandata.yml b/recipes/mongo-cxx-driver/all/conandata.yml index 58272018f4021..1e5afccbe9b49 100644 --- a/recipes/mongo-cxx-driver/all/conandata.yml +++ b/recipes/mongo-cxx-driver/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.10.2": + url: "https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.10.2/mongo-cxx-driver-r3.10.2.tar.gz" + sha256: "52b99b2866019b5ea25d15c5a39e2a88c70fe1259c40f1091deff8bfae0194be" + "3.10.1": + url: "https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.10.1/mongo-cxx-driver-r3.10.1.tar.gz" + sha256: "0297d9d1a513f09438cc05254b14baa49edd1fa64a6ce5d7a80a1eb7677cf2be" "3.8.1": url: "https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.8.1/mongo-cxx-driver-r3.8.1.tar.gz" sha256: "b12c96670e1e68bae1a6f5cb08541f3da52f5ddeb5def274d2cf5d662ef73160" @@ -24,6 +30,20 @@ sources: url: "https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.1/mongo-cxx-driver-r3.6.1.tar.gz" sha256: "83523e897ef18f7ce05d85d1632dd4ba486c264a1b89c09020163ab29e11eab7" patches: + "3.10.2": + - patch_file: "patches/3.10.2-0001-dirs.patch" + patch_description: "disable documentation features, fix directories" + patch_type: "conan" + - patch_file: "patches/3.10.1-0002-remove-abi-suffixes.patch" + patch_description: "remove abi suffixes for MSVC" + patch_type: "conan" + "3.10.1": + - patch_file: "patches/3.10.1-0001-dirs.patch" + patch_description: "disable documentation features, fix directories" + patch_type: "conan" + - patch_file: "patches/3.10.1-0002-remove-abi-suffixes.patch" + patch_description: "remove abi suffixes for MSVC" + patch_type: "conan" "3.8.1": - patch_file: "patches/3.8.1-0001-dirs.patch" patch_description: "disable documentation features, fix directories" diff --git a/recipes/mongo-cxx-driver/all/conanfile.py b/recipes/mongo-cxx-driver/all/conanfile.py index 26e997f666df1..f123921c3c4aa 100644 --- a/recipes/mongo-cxx-driver/all/conanfile.py +++ b/recipes/mongo-cxx-driver/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import export_conandata_patches, apply_conandata_patches, copy, get, rm, rmdir from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc import os import shutil @@ -12,10 +13,10 @@ class MongoCxxConan(ConanFile): name = "mongo-cxx-driver" + description = "C++ Driver for MongoDB" license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "http://mongocxx.org" - description = "C++ Driver for MongoDB" topics = ("libbsoncxx", "libmongocxx", "mongo", "mongodb", "database", "db") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -47,7 +48,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("mongo-c-driver/1.24.3") + self.requires("mongo-c-driver/1.27.1") if self.options.polyfill == "boost": self.requires("boost/1.82.0", transitive_headers=True) @@ -129,6 +130,8 @@ def generate(self): if not valid_min_cppstd(self, self._minimal_std_version): tc.variables["CMAKE_CXX_STANDARD"] = self._minimal_std_version tc.variables["ENABLE_TESTS"] = False + if Version(self.version) >= "3.10.1" and is_msvc(self): + tc.variables["ENABLE_ABI_TAG_IN_LIBRARY_FILENAMES"] = False tc.generate() deps = CMakeDeps(self) @@ -182,6 +185,8 @@ def package_info(self): if not self.options.shared: self.cpp_info.components["mongocxx"].defines.append("MONGOCXX_STATIC") self.cpp_info.components["mongocxx"].requires = ["mongo-c-driver::mongoc", "bsoncxx"] + if Version(self.version) >= "3.10.1": + self.cpp_info.components["mongocxx"].includedirs.append(os.path.join("include", "mongocxx", "v_noabi")) # bsoncxx bsoncxx_target = "bsoncxx_shared" if self.options.shared else "bsoncxx_static" @@ -197,3 +202,5 @@ def package_info(self): self.cpp_info.components["bsoncxx"].requires = ["mongo-c-driver::bson"] if self.options.polyfill == "boost": self.cpp_info.components["bsoncxx"].requires.append("boost::headers") + if Version(self.version) >= "3.10.1": + self.cpp_info.components["bsoncxx"].includedirs.append(os.path.join("include", "bsoncxx", "v_noabi")) diff --git a/recipes/mongo-cxx-driver/all/patches/3.10.1-0001-dirs.patch b/recipes/mongo-cxx-driver/all/patches/3.10.1-0001-dirs.patch new file mode 100644 index 0000000000000..41a672d93964e --- /dev/null +++ b/recipes/mongo-cxx-driver/all/patches/3.10.1-0001-dirs.patch @@ -0,0 +1,61 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2a960f7..f809b6c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -315,7 +315,7 @@ unset(dist_generated_depends CACHE) + set(BUILD_SOURCE_DIR ${CMAKE_BINARY_DIR}) + + include(MakeDistFiles) +- ++if(FALSE) + add_custom_target(hugo_dir + COMMAND ${CMAKE_COMMAND} -E make_directory hugo + ) +@@ -371,7 +371,7 @@ add_custom_target(format-lint + add_custom_target(docs + DEPENDS hugo doxygen-current + ) +- ++endif() + set(THIRD_PARTY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/third_party) + set(DATA_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data) + +@@ -381,13 +381,13 @@ option(ENABLE_MACRO_GUARD_TESTS "Enable targets for macro guard compile tests." + if(ENABLE_TESTS) + enable_testing() + endif() +- ++set(MONGO_CXX_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) ++set(MONGO_CXX_PROJECT_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}) + add_subdirectory(src) ++# add_subdirectory(examples EXCLUDE_FROM_ALL) + +-add_subdirectory(examples EXCLUDE_FROM_ALL) +- +-add_subdirectory(benchmark EXCLUDE_FROM_ALL) +- ++# add_subdirectory(benchmark EXCLUDE_FROM_ALL) ++if(FALSE) + # Implement 'dist' target + # + # CMake does not implement anything like 'dist' from autotools. +@@ -525,3 +525,4 @@ endif() + if(CMAKE_GENERATOR_TOOLSET) + message(STATUS "\tinstance: ${CMAKE_GENERATOR_TOOLSET}") + endif() ++endif() +diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt +index ce53a71..bcd0a61 100644 +--- a/src/bsoncxx/CMakeLists.txt ++++ b/src/bsoncxx/CMakeLists.txt +@@ -93,8 +93,8 @@ if(TARGET bson_shared OR TARGET bson_static) + set(BSONCXX_PKG_DEP "find_dependency(bson-${LIBBSON_REQUIRED_ABI_VERSION} REQUIRED)") + else() + # Attempt to find libbson by new package name (without lib). +- find_package(bson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} QUIET) +- ++ find_package(bson-${LIBBSON_REQUIRED_ABI_VERSION} REQUIRED) ++ set(bson-${LIBBSON_REQUIRED_ABI_VERSION}_FOUND TRUE) + if(bson-${LIBBSON_REQUIRED_ABI_VERSION}_FOUND) + message(STATUS "found libbson version ${bson-${LIBBSON_REQUIRED_ABI_VERSION}_VERSION}") + diff --git a/recipes/mongo-cxx-driver/all/patches/3.10.1-0002-remove-abi-suffixes.patch b/recipes/mongo-cxx-driver/all/patches/3.10.1-0002-remove-abi-suffixes.patch new file mode 100644 index 0000000000000..f1fdc639b41ea --- /dev/null +++ b/recipes/mongo-cxx-driver/all/patches/3.10.1-0002-remove-abi-suffixes.patch @@ -0,0 +1,26 @@ +diff --git a/cmake/BsoncxxUtil.cmake b/cmake/BsoncxxUtil.cmake +index c72f98e..5f977e1 100644 +--- a/cmake/BsoncxxUtil.cmake ++++ b/cmake/BsoncxxUtil.cmake +@@ -76,7 +76,7 @@ function(bsoncxx_add_library TARGET OUTPUT_NAME LINK_TYPE) + endif() + + # MSVC-specific ABI tag suffixes. +- if(MSVC) ++ if(0) + set(vs_suffix "") + + # Include the target architecture if applicable (Win32, x64, etc.). +diff --git a/cmake/MongocxxUtil.cmake b/cmake/MongocxxUtil.cmake +index de9210c..f9937f4 100644 +--- a/cmake/MongocxxUtil.cmake ++++ b/cmake/MongocxxUtil.cmake +@@ -63,7 +63,7 @@ function(mongocxx_add_library TARGET OUTPUT_NAME LINK_TYPE) + endif() + + # MSVC-specific ABI tag suffixes. Inherit from bsoncxx. +- if(MSVC) ++ if(0) + get_target_property(vs_suffix ${bsoncxx_target} BSONCXX_ABI_TAG_VS_SUFFIX) + set_target_properties(${TARGET} PROPERTIES + BSONCXX_ABI_TAG_VS_SUFFIX ${vs_suffix} diff --git a/recipes/mongo-cxx-driver/all/patches/3.10.2-0001-dirs.patch b/recipes/mongo-cxx-driver/all/patches/3.10.2-0001-dirs.patch new file mode 100644 index 0000000000000..360b25feaf147 --- /dev/null +++ b/recipes/mongo-cxx-driver/all/patches/3.10.2-0001-dirs.patch @@ -0,0 +1,57 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6d612a4..5b3f872 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -279,7 +279,7 @@ unset(dist_generated_depends CACHE) + set(BUILD_SOURCE_DIR ${CMAKE_BINARY_DIR}) + + include(MakeDistFiles) +- ++if(FALSE) + add_custom_target(hugo_dir + COMMAND ${CMAKE_COMMAND} -E make_directory hugo + ) +@@ -335,7 +335,7 @@ add_custom_target(format-lint + add_custom_target(docs + DEPENDS hugo doxygen-current + ) +- ++endif() + set(THIRD_PARTY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/third_party) + set(DATA_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data) + +@@ -348,10 +348,10 @@ endif() + + add_subdirectory(src) + +-add_subdirectory(examples EXCLUDE_FROM_ALL) +- +-add_subdirectory(benchmark EXCLUDE_FROM_ALL) ++# add_subdirectory(examples EXCLUDE_FROM_ALL) + ++# add_subdirectory(benchmark EXCLUDE_FROM_ALL) ++if(FALSE) + # Implement 'dist' target + # + # CMake does not implement anything like 'dist' from autotools. +@@ -489,3 +489,4 @@ endif() + if(CMAKE_GENERATOR_TOOLSET) + message(STATUS "\tinstance: ${CMAKE_GENERATOR_TOOLSET}") + endif() ++endif() +\ No newline at end of file +diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt +index ce53a71..90c4fd2 100644 +--- a/src/bsoncxx/CMakeLists.txt ++++ b/src/bsoncxx/CMakeLists.txt +@@ -93,8 +93,8 @@ if(TARGET bson_shared OR TARGET bson_static) + set(BSONCXX_PKG_DEP "find_dependency(bson-${LIBBSON_REQUIRED_ABI_VERSION} REQUIRED)") + else() + # Attempt to find libbson by new package name (without lib). +- find_package(bson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} QUIET) +- ++ find_package(bson-${LIBBSON_REQUIRED_ABI_VERSION} REQUIRED) ++ set(bson-${LIBBSON_REQUIRED_ABI_VERSION}_FOUND TRUE) + if(bson-${LIBBSON_REQUIRED_ABI_VERSION}_FOUND) + message(STATUS "found libbson version ${bson-${LIBBSON_REQUIRED_ABI_VERSION}_VERSION}") + diff --git a/recipes/mongo-cxx-driver/config.yml b/recipes/mongo-cxx-driver/config.yml index dfc6d8b54584e..488b018eaeca3 100644 --- a/recipes/mongo-cxx-driver/config.yml +++ b/recipes/mongo-cxx-driver/config.yml @@ -1,4 +1,8 @@ versions: + "3.10.2": + folder: all + "3.10.1": + folder: all "3.8.1": folder: all "3.8.0": diff --git a/recipes/mp-units/2.2.0/conandata.yml b/recipes/mp-units/2.2.0/conandata.yml new file mode 100644 index 0000000000000..2aee126e2e782 --- /dev/null +++ b/recipes/mp-units/2.2.0/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.2.1": + url: https://github.com/mpusz/units/archive/v2.2.1.tar.gz + sha256: ce5edb27fad9c54b388040341a03d7f2462d61dcedad85b4c983c0e648a91bac diff --git a/recipes/mp-units/2.2.0/conanfile.py b/recipes/mp-units/2.2.0/conanfile.py new file mode 100644 index 0000000000000..89060efea4041 --- /dev/null +++ b/recipes/mp-units/2.2.0/conanfile.py @@ -0,0 +1,274 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import default_cppstd, valid_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir +from conan.tools.scm import Version + +required_conan_version = ">=1.59.0" + + +def loose_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] + + +class MPUnitsConan(ConanFile): + name = "mp-units" + homepage = "https://github.com/mpusz/mp-units" + description = "The quantities and units library for C++" + topics = ( + "units", + "dimensions", + "quantities", + "dimensional-analysis", + "physical-quantities", + "physical-units", + "system-of-units", + "system-of-quantities", + "isq", + "si", + "library", + "quantity-manipulation", + ) + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + settings = "os", "arch", "compiler", "build_type" + options = { + "cxx_modules": [True, False], + "std_format": [True, False], + "string_view_ret": [True, False], + "no_crtp": [True, False], + "contracts": ["none", "gsl-lite", "ms-gsl"], + "freestanding": [True, False], + } + default_options = { + # "cxx_modules" default set in config_options() + # "std_format" default set in config_options() + # "string_view_ret" default set in config_options() + # "no_crtp" default set in config_options() + "contracts": "gsl-lite", + "freestanding": False, + } + package_type = "header-library" + no_copy_source = True + + @property + def _feature_compatibility(self): + return { + "minimum_support": { + "min_cppstd": "20", + "compiler": { + "gcc": "12", + "clang": "16", + "apple-clang": "15", + "msvc": "", + "Visual Studio": "", + }, + }, + "std_format": { + "min_cppstd": "20", + "compiler": { + "gcc": "13", + "clang": "17", + "apple-clang": "", + "msvc": "", + "Visual Studio": "", + }, + }, + "cxx_modules": { + "min_cppstd": "20", + "compiler": { + "gcc": "", + "clang": "17", + "apple-clang": "", + "msvc": "", + "Visual Studio": "", + }, + }, + "static_constexpr_vars_in_constexpr_func": { + "min_cppstd": "23", + "compiler": { + "gcc": "13", + "clang": "17", + "apple-clang": "", + "msvc": "", + "Visual Studio": "", + }, + }, + "explicit_this": { + "min_cppstd": "23", + "compiler": { + "gcc": "14", + "clang": "18", + "apple-clang": "", + "msvc": "", + "Visual Studio": "", + }, + }, + } + + @property + def _option_feature_map(self): + return { + "std_format": "std_format", + "cxx_modules": "cxx_modules", + "string_view_ret": "static_constexpr_vars_in_constexpr_func", + "no_crtp": "explicit_this", + } + + def _set_default_option(self, name): + compiler = self.settings.compiler + feature_name = self._option_feature_map[name] + feature = self._feature_compatibility[feature_name] + min_version = feature["compiler"].get(str(compiler)) + setattr( + self.options, + name, + bool( + min_version + and Version(compiler.version) >= min_version + and valid_min_cppstd(self, feature["min_cppstd"]) + ), + ) + + def _check_feature_supported(self, name, feature_name=name): + compiler = self.settings.compiler + cppstd = compiler.get_safe("cppstd") + feature = self._feature_compatibility[feature_name] + + # check C++ version + if cppstd and not valid_min_cppstd(self, feature["min_cppstd"]): + raise ConanInvalidConfiguration( + f"'{name}' requires at least cppstd={feature['min_cppstd']} ({cppstd} in use)", + ) + + # check compiler version + min_version = feature["compiler"].get(str(compiler)) + if min_version == None: + # not tested compiler being used - use at your own risk + return + if min_version == "": + raise ConanInvalidConfiguration( + f"'{name}' is not yet supported by any known {compiler} version" + ) + if loose_lt_semver(str(compiler.version), min_version): + raise ConanInvalidConfiguration( + f"'{name}' requires at least {compiler}-{min_version} ({compiler}-{compiler.version} in use)" + ) + + def config_options(self): + for key in self._option_feature_map.keys(): + self._set_default_option(key) + + def configure(self): + if self.options.freestanding: + self.options.rm_safe("std_format") + + def requirements(self): + if not self.options.freestanding: + if self.options.contracts == "gsl-lite": + self.requires("gsl-lite/0.41.0") + elif self.options.contracts == "ms-gsl": + self.requires("ms-gsl/4.0.0") + if not self.options.std_format: + self.requires("fmt/10.2.1") + + def build_requirements(self): + self.tool_requires("cmake/[>=3.29 <4]") + + def validate(self): + self._check_feature_supported("mp-units", "minimum_support") + for key, value in self._option_feature_map.items(): + if self.options.get_safe(key) == True: + self._check_feature_supported(key, value) + if self.options.freestanding and self.options.contracts != "none": + raise ConanInvalidConfiguration( + "'contracts' should be set to 'none' for a freestanding build" + ) + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + if self.options.cxx_modules: + tc.cache_variables["CMAKE_CXX_SCAN_FOR_MODULES"] = True + tc.cache_variables["MP_UNITS_BUILD_CXX_MODULES"] = self.options.cxx_modules + if self.options.freestanding: + tc.cache_variables["MP_UNITS_API_FREESTANDING"] = True + else: + tc.cache_variables["MP_UNITS_API_STD_FORMAT"] = self.options.std_format + tc.cache_variables["MP_UNITS_API_STRING_VIEW_RET"] = ( + self.options.string_view_ret + ) + tc.cache_variables["MP_UNITS_API_NO_CRTP"] = self.options.no_crtp + tc.cache_variables["MP_UNITS_API_CONTRACTS"] = str( + self.options.contracts + ).upper() + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure(build_script_folder="src") + if self.options.cxx_modules: + cmake.build() + + def package_id(self): + self.info.clear() + + def package(self): + copy( + self, + "LICENSE.md", + self.source_folder, + os.path.join(self.package_folder, "licenses"), + ) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + compiler = self.settings.compiler + + # handle contracts + if self.options.contracts == "none": + self.cpp_info.components["core"].defines.append("MP_UNITS_API_CONTRACTS=0") + elif self.options.contracts == "gsl-lite": + self.cpp_info.components["core"].requires.append("gsl-lite::gsl-lite") + self.cpp_info.components["core"].defines.append("MP_UNITS_API_CONTRACTS=2") + elif self.options.contracts == "ms-gsl": + self.cpp_info.components["core"].requires.append("ms-gsl::ms-gsl") + self.cpp_info.components["core"].defines.append("MP_UNITS_API_CONTRACTS=3") + + # handle API options + self.cpp_info.components["core"].defines.append( + "MP_UNITS_API_STRING_VIEW_RET=" + + str(int(self.options.string_view_ret == True)) + ) + self.cpp_info.components["core"].defines.append( + "MP_UNITS_API_NO_CRTP=" + str(int(self.options.no_crtp == True)) + ) + self.cpp_info.components["core"].defines.append( + "MP_UNITS_API_STD_FORMAT=" + str(int(self.options.std_format == True)) + ) + if not self.options.std_format: + self.cpp_info.components["core"].requires.append("fmt::fmt") + + # handle hosted configuration + if not self.options.freestanding: + self.cpp_info.components["core"].defines.append("MP_UNITS_HOSTED=1") + + if compiler == "msvc": + self.cpp_info.components["core"].cxxflags = ["/utf-8"] + + self.cpp_info.components["systems"].requires = ["core"] diff --git a/recipes/mp-units/2.2.0/test_package/CMakeLists.txt b/recipes/mp-units/2.2.0/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..07f3e7cd91e8a --- /dev/null +++ b/recipes/mp-units/2.2.0/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package + LANGUAGES CXX +) + +find_package(mp-units CONFIG REQUIRED) + +add_executable(test_package test_package.cpp) +target_link_libraries(test_package PRIVATE mp-units::mp-units) +target_compile_features(test_package PUBLIC cxx_std_20) diff --git a/recipes/box2d/2.4.x/test_package/conanfile.py b/recipes/mp-units/2.2.0/test_package/conanfile.py similarity index 87% rename from recipes/box2d/2.4.x/test_package/conanfile.py rename to recipes/mp-units/2.2.0/test_package/conanfile.py index d1ce1a2cbc477..e418ee7701960 100644 --- a/recipes/box2d/2.4.x/test_package/conanfile.py +++ b/recipes/mp-units/2.2.0/test_package/conanfile.py @@ -1,20 +1,21 @@ import os + from conan import ConanFile from conan.tools.build import can_run from conan.tools.cmake import CMake, cmake_layout -class Box2DTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" test_type = "explicit" - def layout(self): - cmake_layout(self) - def requirements(self): self.requires(self.tested_reference_str) + def layout(self): + cmake_layout(self) + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/mp-units/2.2.0/test_package/test_package.cpp b/recipes/mp-units/2.2.0/test_package/test_package.cpp new file mode 100644 index 0000000000000..1182e75d816e4 --- /dev/null +++ b/recipes/mp-units/2.2.0/test_package/test_package.cpp @@ -0,0 +1,16 @@ +#include +#include +#include + +using namespace mp_units; + +constexpr auto avg_speed(QuantityOf auto d, QuantityOf auto t) +{ + return d / t; +} + +int main() +{ + using namespace mp_units::si::unit_symbols; + std::cout << "Average speed = " << avg_speed(240 * km, 2 * h) << '\n'; +} diff --git a/recipes/mp-units/config.yml b/recipes/mp-units/config.yml index 0f81adb906b33..adf715f7230a3 100644 --- a/recipes/mp-units/config.yml +++ b/recipes/mp-units/config.yml @@ -1,4 +1,6 @@ versions: + "2.2.1": + folder: 2.2.0 "2.1.1": folder: 2.0.0 "2.1.0": diff --git a/recipes/mppp/all/conandata.yml b/recipes/mppp/all/conandata.yml index 5ecb23c111e1a..65c8b63bf0804 100644 --- a/recipes/mppp/all/conandata.yml +++ b/recipes/mppp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.3": + url: "https://github.com/bluescarni/mppp/archive/v1.0.3.tar.gz" + sha256: "d5beb0002910de4ea96dc15dc0d80d759afeb2c5e68716523d519d66a7dfe423" "1.0.2": url: "https://github.com/bluescarni/mppp/archive/v1.0.2.tar.gz" sha256: "2a537bc339726388fdda39905692d3df92fceee51d264e720e0e7ab7570bcdaf" @@ -12,6 +15,14 @@ sources: url: "https://github.com/bluescarni/mppp/archive/v0.26.tar.gz" sha256: "4dbfa68802d9a1365eda884f085418afc147d01b7a928e8333e4dcc1c3b3ce9e" patches: + "1.0.3": + - patch_file: "patches/1.0.3-0001-disable-warning-error.patch" + patch_description: "disable the flag for treats warning as errors" + patch_type: "portability" + - patch_file: "patches/1.0.3-0002-remove-fmt-version.patch" + # https://github.com/conan-io/conan/issues/14172 + patch_description: "remove fmt version number from find_package" + patch_type: "conan" "1.0.2": - patch_file: "patches/1.0.0-0001-disable-warning-error.patch" patch_description: "disable the flag for treats warning as errors" diff --git a/recipes/mppp/all/patches/1.0.3-0001-disable-warning-error.patch b/recipes/mppp/all/patches/1.0.3-0001-disable-warning-error.patch new file mode 100644 index 0000000000000..2bbd6313a54a7 --- /dev/null +++ b/recipes/mppp/all/patches/1.0.3-0001-disable-warning-error.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/yacma/YACMACompilerLinkerSettings.cmake b/cmake/yacma/YACMACompilerLinkerSettings.cmake +index 3d9cd9d..2b8cf7b 100644 +--- a/cmake/yacma/YACMACompilerLinkerSettings.cmake ++++ b/cmake/yacma/YACMACompilerLinkerSettings.cmake +@@ -96,7 +96,7 @@ if(NOT _YACMACompilerLinkerSettingsRun) + # NOTE: enable unconditionally, as it seems like the CMake + # machinery for detecting this fails. Perhaps the source code + # used for checking the flag emits warnings? +- list(APPEND _YACMA_CXX_FLAGS_DEBUG "-Werror") ++ # list(APPEND _YACMA_CXX_FLAGS_DEBUG "-Werror") + # New warnings in clang 8. + # NOTE: a few issues with macros here, let's disable for now. + # _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wextra-semi-stmt) +@@ -197,7 +197,7 @@ if(NOT _YACMACompilerLinkerSettingsRun) + # Enable higher warning level than usual. + _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/W4) + # Treat warnings as errors. +- _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/WX) ++ #_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/WX) + endif() + + # Set the cache variables. diff --git a/recipes/mppp/all/patches/1.0.3-0002-remove-fmt-version.patch b/recipes/mppp/all/patches/1.0.3-0002-remove-fmt-version.patch new file mode 100644 index 0000000000000..33106dff23d74 --- /dev/null +++ b/recipes/mppp/all/patches/1.0.3-0002-remove-fmt-version.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6fd31fe..503cedf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -430,7 +430,7 @@ endif() + # to print 128-bit integers. + set(_MPPP_MIN_FMT_VERSION "6.2") + if(MPPP_WITH_FMT) +- find_package(fmt ${_MPPP_MIN_FMT_VERSION} REQUIRED CONFIG) ++ find_package(fmt REQUIRED CONFIG) + message(STATUS "fmt version: ${fmt_VERSION}") + target_link_libraries(mp++ PUBLIC fmt::fmt) + endif() diff --git a/recipes/mppp/config.yml b/recipes/mppp/config.yml index 460a704f2241d..518666119a0f9 100644 --- a/recipes/mppp/config.yml +++ b/recipes/mppp/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.3": + folder: all "1.0.2": folder: all "1.0.0": diff --git a/recipes/msdf-atlas-gen/all/conandata.yml b/recipes/msdf-atlas-gen/all/conandata.yml index 1c3664b5df564..3ce2299e54ce1 100644 --- a/recipes/msdf-atlas-gen/all/conandata.yml +++ b/recipes/msdf-atlas-gen/all/conandata.yml @@ -1,9 +1,16 @@ sources: + "1.3": + url: "https://github.com/Chlumsky/msdf-atlas-gen/archive/refs/tags/v1.3.tar.gz" + sha256: "5d3d58e8bc92836baf23ce3a80ef79cc4c2d022fb86b7f160b11cc06cd62fe78" "1.2.2": url: "https://github.com/Chlumsky/msdf-atlas-gen/archive/refs/tags/v1.2.2.tar.gz" sha256: "7D2EA46F66E21AB9A205BF7703D520F209B9A035EE13CBB266A3B8322F62FA28" patches: + "1.3": + - patch_file: "patches/1.3.0-0001-fix-cmake.patch" + patch_description: "Fix CMakeLists.txt to get libraries from Conan and install in bin dir" + patch_type: "conan" "1.2.2": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/1.2.2-0001-fix-cmake.patch" patch_description: "Fix CMakeLists.txt to get libraries from Conan and install in bin dir" patch_type: "conan" diff --git a/recipes/msdf-atlas-gen/all/conanfile.py b/recipes/msdf-atlas-gen/all/conanfile.py index 51daed7b1f501..d26eb8ef19f91 100644 --- a/recipes/msdf-atlas-gen/all/conanfile.py +++ b/recipes/msdf-atlas-gen/all/conanfile.py @@ -1,27 +1,27 @@ +import os + from conan import ConanFile -from conan.tools.files import get, copy, apply_conandata_patches, export_conandata_patches +from conan.tools.files import get, copy, apply_conandata_patches, export_conandata_patches, rmdir from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -import os - +from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc required_conan_version = ">=1.53.0" class MsdfAtlasGenConan(ConanFile): name = "msdf-atlas-gen" + description = "MSDF font atlas generator" license = "MIT" - homepage = "https://github.com/Chlumsky/msdf-atlas-gen" url = "https://github.com/conan-io/conan-center-index" - description = "MSDF font atlas generator" + homepage = "https://github.com/Chlumsky/msdf-atlas-gen" topics = ("msdf-atlas-gen", "msdf", "font", "atlas") - settings = "os", "arch", "compiler", "build_type" package_type = "application" + settings = "os", "arch", "compiler", "build_type" - def requirements(self): - self.requires("artery-font-format/1.0") - self.requires("msdfgen/1.9.1") - self.requires("lodepng/cci.20200615") + def export_sources(self): + export_conandata_patches(self) def layout(self): cmake_layout(self, src_folder="src") @@ -30,25 +30,41 @@ def validate_build(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) + def requirements(self): + if Version(self.version) < "1.3": + self.requires("msdfgen/1.9.1") + self.requires("artery-font-format/1.0") + self.requires("lodepng/cci.20200615") + else: + self.requires("msdfgen/1.12") + self.requires("artery-font-format/1.1") + self.requires("libpng/[>=1.6 <2]") + def package_id(self): del self.info.settings.compiler del self.info.settings.build_type - def export_sources(self): - export_conandata_patches(self) - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - apply_conandata_patches(self) def generate(self): tc = CMakeToolchain(self) - tc.variables["MSDF_ATLAS_GEN_BUILD_STANDALONE"] = True + tc.cache_variables["MSDF_ATLAS_GEN_BUILD_STANDALONE"] = True + tc.cache_variables["MSDF_ATLAS_USE_VCPKG"] = False + tc.cache_variables["MSDF_ATLAS_USE_SKIA"] = False + tc.cache_variables["MSDF_ATLAS_NO_ARTERY_FONT"] = False + tc.cache_variables["MSDF_ATLAS_MSDFGEN_EXTERNAL"] = True + tc.cache_variables["MSDF_ATLAS_INSTALL"] = True + if Version(self.version) >= "1.3": + tc.preprocessor_definitions["MSDFGEN_USE_LIBPNG"] = 1 + if is_msvc(self): + tc.cache_variables["MSDF_ATLAS_DYNAMIC_RUNTIME"] = "dynamic" in str(self.settings.compiler.runtime) or "MD" in str(self.settings.compiler.runtime) tc.generate() tc = CMakeDeps(self) tc.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() @@ -57,6 +73,7 @@ def package(self): copy(self, pattern="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, "lib", "cmake")) def package_info(self): self.cpp_info.frameworkdirs = [] diff --git a/recipes/msdf-atlas-gen/all/patches/0001-fix-cmake.patch b/recipes/msdf-atlas-gen/all/patches/1.2.2-0001-fix-cmake.patch similarity index 71% rename from recipes/msdf-atlas-gen/all/patches/0001-fix-cmake.patch rename to recipes/msdf-atlas-gen/all/patches/1.2.2-0001-fix-cmake.patch index 356c6a09fe8be..f4f985352e174 100644 --- a/recipes/msdf-atlas-gen/all/patches/0001-fix-cmake.patch +++ b/recipes/msdf-atlas-gen/all/patches/1.2.2-0001-fix-cmake.patch @@ -1,19 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b1ec605..6b6277a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -7,9 +7,11 @@ +@@ -7,10 +7,11 @@ set(MSDFGEN_BUILD_MSDFGEN_STANDALONE OFF CACHE BOOL "Build the msdfgen standalon set(MSDFGEN_USE_OPENMP OFF CACHE INTERNAL "Build with OpenMP support for multithreaded code (disabled for atlas gen)" FORCE) set(MSDFGEN_USE_CPP11 ON CACHE INTERNAL "Build with C++11 enabled (always enabled for atlas gen)" FORCE) set(MSDFGEN_INSTALL OFF CACHE BOOL "Generate installation target for msdfgen") -add_subdirectory(msdfgen) - -+ +- ++# add_subdirectory(msdfgen) find_package(Threads REQUIRED) +- +find_package(msdfgen REQUIRED) +find_package(artery-font-format REQUIRED) - ++find_package(lodepng REQUIRED CONFIG) file(GLOB_RECURSE msdf-atlas-gen_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "msdf-atlas-gen/*.h" -@@ -24,19 +26,12 @@ + "msdf-atlas-gen/*.hpp" +@@ -24,19 +25,19 @@ file(GLOB_RECURSE msdf-atlas-gen_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} add_library(msdf-atlas-gen ${msdf-atlas-gen_SOURCES} ${msdf-atlas-gen_HEADERS}) add_library(msdf-atlas-gen::msdf-atlas-gen ALIAS msdf-atlas-gen) set_target_properties(msdf-atlas-gen PROPERTIES PUBLIC_HEADER "${msdf-atlas-gen_HEADERS}") @@ -24,17 +28,24 @@ - ${CMAKE_CURRENT_SOURCE_DIR}/msdfgen/include # for lodepng.h - ${CMAKE_CURRENT_SOURCE_DIR}/artery-font-format -) ++# target_include_directories(msdf-atlas-gen ++# INTERFACE ++# $ ++# PRIVATE ++# ${CMAKE_CURRENT_SOURCE_DIR}/msdfgen/include # for lodepng.h ++# ${CMAKE_CURRENT_SOURCE_DIR}/artery-font-format ++# ) if (MSVC) target_compile_definitions(msdf-atlas-gen PUBLIC _CRT_SECURE_NO_WARNINGS) endif() target_compile_features(msdf-atlas-gen PUBLIC cxx_std_11) -target_link_libraries(msdf-atlas-gen PUBLIC Threads::Threads msdfgen::msdfgen msdfgen::msdfgen-ext) -+target_link_libraries(msdf-atlas-gen PUBLIC Threads::Threads msdfgen::msdfgen msdfgen::msdfgen-ext artery-font-format::artery-font-format) ++target_link_libraries(msdf-atlas-gen PUBLIC Threads::Threads msdfgen::msdfgen msdfgen::msdfgen-ext artery-font-format::artery-font-format lodepng::lodepng) # TODO make these public in msdfgen so that this doesn't have to be repeated here if(FREETYPE_WITH_PNG) -@@ -58,3 +53,5 @@ +@@ -58,3 +59,5 @@ if(MSDF_ATLAS_GEN_BUILD_STANDALONE) target_compile_features(msdf-atlas-gen-standalone PUBLIC cxx_std_11) target_link_libraries(msdf-atlas-gen-standalone PUBLIC msdf-atlas-gen::msdf-atlas-gen) endif() diff --git a/recipes/msdf-atlas-gen/all/patches/1.3.0-0001-fix-cmake.patch b/recipes/msdf-atlas-gen/all/patches/1.3.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..80d3825982383 --- /dev/null +++ b/recipes/msdf-atlas-gen/all/patches/1.3.0-0001-fix-cmake.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5b7f6db..1936ca5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -109,7 +109,8 @@ target_include_directories(msdf-atlas-gen INTERFACE + if(MSDF_ATLAS_NO_ARTERY_FONT) + target_compile_definitions(msdf-atlas-gen PUBLIC MSDF_ATLAS_NO_ARTERY_FONT) + else() +- target_include_directories(msdf-atlas-gen PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/artery-font-format) ++ find_package(artery-font-format REQUIRED CONFIG) ++ target_link_libraries(msdf-atlas-gen PRIVATE artery-font-format::artery-font-format) + endif() + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT msdf-atlas-gen) + +@@ -118,7 +119,7 @@ target_link_libraries(msdf-atlas-gen PRIVATE Threads::Threads) + if(NOT MSDFGEN_DISABLE_PNG) + target_link_libraries(msdf-atlas-gen PRIVATE PNG::PNG) + endif() +-target_link_libraries(msdf-atlas-gen PUBLIC msdfgen::msdfgen) ++target_link_libraries(msdf-atlas-gen PUBLIC msdfgen::msdfgen msdfgen::msdfgen-ext) + + if(BUILD_SHARED_LIBS AND WIN32) + target_compile_definitions(msdf-atlas-gen PRIVATE "MSDF_ATLAS_PUBLIC=__declspec(dllexport)") diff --git a/recipes/msdf-atlas-gen/config.yml b/recipes/msdf-atlas-gen/config.yml index af40d9653a378..297a337077654 100644 --- a/recipes/msdf-atlas-gen/config.yml +++ b/recipes/msdf-atlas-gen/config.yml @@ -1,3 +1,5 @@ versions: + "1.3": + folder: all "1.2.2": folder: all diff --git a/recipes/msys2/all/conanfile.py b/recipes/msys2/all/conanfile.py index 2606f171ddcec..752c04acf11c3 100644 --- a/recipes/msys2/all/conanfile.py +++ b/recipes/msys2/all/conanfile.py @@ -156,8 +156,9 @@ def _do_build(self): os.utime(tmp_name, None) # Prepend the PKG_CONFIG_PATH environment variable with an eventual PKG_CONFIG_PATH environment variable + # Note: this is no longer needed when we exclusively support Conan 2 integrations replace_in_file(self, os.path.join(self._msys_dir, "etc", "profile"), - 'PKG_CONFIG_PATH="', 'PKG_CONFIG_PATH="$PKG_CONFIG_PATH:') + 'PKG_CONFIG_PATH="', 'PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}:}') def package(self): excludes = None diff --git a/recipes/mtfmt/all/conandata.yml b/recipes/mtfmt/all/conandata.yml new file mode 100644 index 0000000000000..479a84d9ef5a9 --- /dev/null +++ b/recipes/mtfmt/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + # Newer versions at the top + "0.1.3": + url: "https://github.com/MtFmT-Lib/mtfmt/archive/refs/tags/v0.1.3.tar.gz" + sha256: "767a9b85b79d915ce7f1e43f0d24dc14942c07af24d6e96f7ff60ee522f1c1ce" +patches: + "0.1.3": + - patch_file: "patches/0.1.3-0001-remove-hardcoded-stds.patch" + patch_description: "Remove hardcoded C/CXX standards" + patch_type: "conan" diff --git a/recipes/mtfmt/all/conanfile.py b/recipes/mtfmt/all/conanfile.py new file mode 100644 index 0000000000000..7f72f34a57527 --- /dev/null +++ b/recipes/mtfmt/all/conanfile.py @@ -0,0 +1,111 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir +from conan.tools.microsoft import is_msvc +import os + + +required_conan_version = ">=1.53.0" + + +class MtFmtConan(ConanFile): + name = "mtfmt" + description = "mtfmt (Mini template formatter) is a formatting library designed for embedded systems" + license = "LGPL-3.0-only" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/MtFmT-Lib/mtfmt" + topics = ("formatting", "embedded") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "use_div": [True, False], + "use_malloc": [True, False], + "use_stdout": [True, False], + "use_assert": [True, False], + "use_utf8": [True, False], + "use_fp32": [True, False], + "use_fp64": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "use_div": False, + "use_malloc": False, + "use_stdout": False, + "use_assert": False, + "use_utf8": True, + "use_fp32": False, + "use_fp64": False, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + # Windows always builds as release, debug is not supported + if is_msvc(self) and self.settings.build_type == "Debug": + raise ConanInvalidConfiguration(f"{self.ref} does not support MSVC debug builds") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["MTFMT_BUILD_SHARED"] = self.options.shared + tc.cache_variables["MTFMT_RT_USE_DIV"] = self.options.use_div + tc.cache_variables["MTFMT_RT_USE_MALLOC"] = self.options.use_malloc + tc.cache_variables["MTFMT_RT_USE_STDOUT"] = self.options.use_stdout + tc.cache_variables["MTFMT_RT_USE_ASSERT"] = self.options.use_assert + tc.cache_variables["MTFMT_RT_USE_UTF8"] = self.options.use_utf8 + tc.cache_variables["MTFMT_RT_USE_FP32"] = self.options.use_fp32 + tc.cache_variables["MTFMT_RT_USE_FP64"] = self.options.use_fp64 + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "mtfmt", "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "mtfmt", "share")) + rm(self, "*.la", os.path.join(self.package_folder, "mtfmt", "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "mtfmt", "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "mtfmt", "bin")) + + def package_info(self): + suffix = "_d" if self.settings.build_type == "Debug" else "" + self.cpp_info.libs = ["mtfmt" + suffix] + + libdir = os.path.join("mtfmt", "lib") + + if not self.options.shared or self.settings.os == "Windows": + libdir = os.path.join(libdir, "static") + + self.cpp_info.libdirs = [libdir] + self.cpp_info.includedirs = [os.path.join("mtfmt", "include")] + self.cpp_info.bindirs = [os.path.join("mtfmt", "bin")] diff --git a/recipes/mtfmt/all/patches/0.1.3-0001-remove-hardcoded-stds.patch b/recipes/mtfmt/all/patches/0.1.3-0001-remove-hardcoded-stds.patch new file mode 100644 index 0000000000000..272d9f3d83b9f --- /dev/null +++ b/recipes/mtfmt/all/patches/0.1.3-0001-remove-hardcoded-stds.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2d4ffcd..293cf7e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.10) + + project(mtfmt) + +-set(CMAKE_C_STANDARD 11) +-set(CMAKE_CXX_STANDARD 11) ++#set(CMAKE_C_STANDARD 11) ++#set(CMAKE_CXX_STANDARD 11) + + # debug版的后缀 + set(CMAKE_DEBUG_POSTFIX "_d") +@@ -50,6 +50,11 @@ endif() + # including path + target_include_directories(${TARGET_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc") + ++# Standards ++target_compile_features(${TARGET_NAME} PRIVATE cxx_std_11) ++target_compile_features(${TARGET_NAME} PRIVATE c_std_11) ++ ++ + # debug? + if(NOT MSVC) + if(NOT CMAKE_BUILD_TYPE) diff --git a/recipes/mtfmt/all/test_package/CMakeLists.txt b/recipes/mtfmt/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..db0d350d8ebe1 --- /dev/null +++ b/recipes/mtfmt/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES C) + +find_package(mtfmt REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE mtfmt::mtfmt) diff --git a/recipes/mtfmt/all/test_package/conanfile.py b/recipes/mtfmt/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/mtfmt/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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 = "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): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/mtfmt/all/test_package/test_package.c b/recipes/mtfmt/all/test_package/test_package.c new file mode 100644 index 0000000000000..29545fce88b63 --- /dev/null +++ b/recipes/mtfmt/all/test_package/test_package.c @@ -0,0 +1,97 @@ +// SPDX-License-Identifier: LGPL-3.0 +/** + * @file example_build_config.c + * @author 向阳 (hinata.hoshino@foxmail.com) + * @brief 不同对齐方式下的格式化的例子 + * @version 1.0 + * @date 2023-07-23 + * + * @copyright Copyright (c) 向阳, all rights reserved. + * + */ +#include "mtfmt.h" +#include +#include + +/** + * @brief 测试1个位是否被set + * + */ +#define BIT_TEST(v, b) (!!(((v) & (b)) == (b))) + +/** + * @brief 把boolean变成C字符串 + * + */ +#define BOOL2STR(b) ((b) ? "true" : "false") + +int main(void) +{ + uint32_t cfg = MSTR_CONFIGURE_CFG_VAL(mstr_configure()); + uint32_t compiler = MSTR_CONFIGURE_CC_VAL(cfg); + + puts("+-----------+--------------------------+-------+"); + + const char* compiler_name = "unknown"; + switch (compiler) { + case MSTR_BUILD_CC_MSVC: compiler_name = "msvc"; break; + case MSTR_BUILD_CC_GNUC: compiler_name = "gcc"; break; + case MSTR_BUILD_CC_ARMCC: compiler_name = "armcc"; break; + case MSTR_BUILD_CC_ARMCLANG: compiler_name = "armclang"; break; + case MSTR_BUILD_CC_EMSCRIPTEN: compiler_name = "emscripten"; break; + case MSTR_BUILD_CC_OTHER: compiler_name = "unknown"; break; + } + printf("| Compiler | %-24s | --- |\n", compiler_name); + + puts("+-----------+--------------------------+-------+"); + + printf( + "| Configure | %-24s | %5s |\n", + "_MSTR_USE_MALLOC", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_USE_MALLOC_BIT)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_BUILD_DLL", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_BUILD_DLL_BIT)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_USE_HARDWARE_DIV", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_BUILD_HARDWARE_DIV)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_USE_STD_IO", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_USE_STD_IO)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_USE_UTF_8", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_USE_UTF_8)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_USE_CPP_EXCEPTION", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_USE_CXX_EXCEPTION)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_USE_FP_FLOAT32", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_USE_FLOAT32)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_USE_FP_FLOAT64", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_USE_FLOAT64)) + ); + printf( + "| | %-24s | %5s |\n", + "_MSTR_USE_ALLOC", + BOOL2STR(BIT_TEST(cfg, MSTRCFG_USE_ALLOCATOR)) + ); + + puts("+-----------+--------------------------+-------+"); + + return 0; +} diff --git a/recipes/mtfmt/config.yml b/recipes/mtfmt/config.yml new file mode 100644 index 0000000000000..b7f57204004e4 --- /dev/null +++ b/recipes/mtfmt/config.yml @@ -0,0 +1,3 @@ +versions: + "0.1.3": + folder: all diff --git a/recipes/nanoflann/all/conandata.yml b/recipes/nanoflann/all/conandata.yml index f8c576a4749fe..9d51335bc5f52 100644 --- a/recipes/nanoflann/all/conandata.yml +++ b/recipes/nanoflann/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.6.0": + url: "https://github.com/jlblancoc/nanoflann/archive/v1.6.0.tar.gz" + sha256: "f889026fbcb241e1e9d71bab5dfb9cc35775bf18a6466a283e2cbcd60edb2705" "1.5.2": url: "https://github.com/jlblancoc/nanoflann/archive/v1.5.2.tar.gz" sha256: "2adcea7821445119a7a4f83c27abd56dba963e1e9c05a3f58bdb2273ae1b4698" diff --git a/recipes/nanoflann/all/conanfile.py b/recipes/nanoflann/all/conanfile.py index 47bfe18256ddd..90669ce351aaf 100644 --- a/recipes/nanoflann/all/conanfile.py +++ b/recipes/nanoflann/all/conanfile.py @@ -9,10 +9,9 @@ class NanoflannConan(ConanFile): name = "nanoflann" - description = """nanoflann is a C++11 header-only library for building KD-Trees - of datasets with different topologies: R2, R3 (point clouds), - SO(2) and SO(3) (2D and 3D rotation groups). - """ + description = ("nanoflann is a C++11 header-only library for building KD-Trees" + " of datasets with different topologies: R2, R3 (point clouds)," + " SO(2) and SO(3) (2D and 3D rotation groups).") topics = ("flann", "nearest-neighbor", "kd-trees") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/jlblancoc/nanoflann" @@ -48,3 +47,6 @@ def package_info(self): self.cpp_info.set_property("pkg_config_name", "nanoflann") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + if self.settings.os in ("Linux", "FreeBSD"): + # If we ever support NANOFLANN_NO_THREADS, there would be no need to add this if set + self.cpp_info.system_libs.append("pthread") diff --git a/recipes/nanoflann/config.yml b/recipes/nanoflann/config.yml index 42431fc83ed1e..43ca2b954f0dc 100644 --- a/recipes/nanoflann/config.yml +++ b/recipes/nanoflann/config.yml @@ -1,4 +1,6 @@ versions: + "1.6.0": + folder: "all" "1.5.2": folder: "all" "1.5.0": diff --git a/recipes/net-snmp/all/conandata.yml b/recipes/net-snmp/all/conandata.yml index 269a227ecf9b0..9ad5ce20f2145 100644 --- a/recipes/net-snmp/all/conandata.yml +++ b/recipes/net-snmp/all/conandata.yml @@ -1,14 +1,13 @@ sources: - "5.9.1": - sha256: "75b59d67e871aaaa31c8cef89ba7d06972782b97736b7e8c3399f36b50a8816f" - url: https://sourceforge.net/projects/net-snmp/files/net-snmp/5.9.1/net-snmp-5.9.1.zip/download + "5.9.4": + url: "https://sourceforge.net/projects/net-snmp/files/net-snmp/5.9.4/net-snmp-5.9.4.zip/download" + sha256: "ceea0c876f23b87731de2073e6a3a683ea610c66a5a67b5cabf4986b7813c22b" patches: - "5.9.1": + "5.9.4": - patch_file: patches/0001-fix-openssl-linking-msvc.patch - base_path: "" + patch_description: "Use Conan OpenSSL when linking on Windows" + patch_source: "https://github.com/net-snmp/net-snmp/commit/99332c80b68248cb60023d12297135dc9c6c8abf" - patch_file: patches/0002-install-only-libnetsnmp.patch - base_path: "" + patch_description: "Avoid install extra helper libraries" - patch_file: patches/0003-fix-perl-scripts-msvc.patch - base_path: "" - - patch_file: patches/0004-fix-apple-arm64-build.patch - base_path: "" + patch_description: "Avoid injecting extra flags when running perl" diff --git a/recipes/net-snmp/all/conanfile.py b/recipes/net-snmp/all/conanfile.py index cf81f5bab247a..68f4965c95152 100644 --- a/recipes/net-snmp/all/conanfile.py +++ b/recipes/net-snmp/all/conanfile.py @@ -1,11 +1,17 @@ -import functools import os import stat -from conans import AutoToolsBuildEnvironment, ConanFile, tools -from conans.errors import ConanInvalidConfiguration +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building +from conan.tools.env import VirtualRunEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir, chdir +from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, msvc_runtime_flag, NMakeToolchain +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name -required_conan_version = ">=1.43.0" +required_conan_version = ">=1.53.0" class NetSnmpConan(ConanFile): @@ -15,10 +21,12 @@ class NetSnmpConan(ConanFile): "for monitoring the health and welfare of network equipment " "(eg. routers), computer equipment and even devices like UPSs." ) + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "http://www.net-snmp.org/" topics = "snmp" - license = "BSD-3-Clause" + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -30,21 +38,9 @@ class NetSnmpConan(ConanFile): "fPIC": True, "with_ipv6": True, } - requires = "openssl/1.1.1m" - exports_sources = "patches/*" - @property - def _is_msvc(self): - return self.settings.compiler in ("Visual Studio", "msvc") - - def validate(self): - if self.settings.os == "Windows" and not self._is_msvc: - raise ConanInvalidConfiguration( - "net-snmp is setup to build only with MSVC on Windows" - ) - - def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True) + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -52,145 +48,174 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("openssl/[>=1.1 <4]") + self.requires("pcre/8.45") + self.requires("zlib/[>=1.2.11 <2]") + + def validate(self): + if is_msvc(self) and self.options.shared: + # FIXME: Linker errors against third-party dependencies: + # snmp_openssl.obj : error LNK2019: unresolved external symbol CRYPTO_free referenced in function _extract_oname + raise ConanInvalidConfiguration(f"{self.ref} fails when building as shared library, use -o '&:shared=False'. Contributions are welcome!") def build_requirements(self): - if self._is_msvc: - self.build_requires("strawberryperl/5.30.0.1") + if is_msvc(self): + self.tool_requires("strawberryperl/5.32.1.1") + else: + self.tool_requires("gnu-config/cci.20210814") + self.tool_requires("autoconf/2.71") + self.tool_requires("automake/1.16.5") + self.tool_requires("libtool/2.4.7") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.2.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) @property def _is_debug(self): return self.settings.build_type == "Debug" + def generate(self): + if is_msvc(self): + tc = NMakeToolchain(self) + tc.generate() + # Workaround for "unresolved external symbol" errors during shared build + env = VirtualRunEnv(self) + env.generate(scope="build") + else: + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + tc = AutotoolsToolchain(self) + debug_flag = "enable" if self._is_debug else "disable" + ipv6_flag = "enable" if self.options.with_ipv6 else "disable" + openssl_path = self.dependencies["openssl"].package_folder + zlib_path = self.dependencies["zlib"].package_folder + tc.configure_args += [ + f"--with-openssl={openssl_path}", + f"--with-zlib={zlib_path}", + f"--{debug_flag}-debugging", + f"--{ipv6_flag}-ipv6", + "--with-defaults", + "--without-rpm", + "--without-pcre", + "--disable-agent", + "--disable-applications", + "--disable-manuals", + "--disable-scripts", + "--disable-mibs", + "--disable-embedded-perl", + ] + if self.settings.os in ["Linux"]: + tc.extra_ldflags.append("-ldl") + tc.extra_ldflags.append("-lpthread") + tc.generate() + + deps = AutotoolsDeps(self) + deps.generate() + + deps = PkgConfigDeps(self) + deps.generate() + def _patch_msvc(self): - ssl_info = self.deps_cpp_info["openssl"] - openssl_root = ssl_info.rootpath.replace("\\", "/") + ssl_info = self.dependencies["openssl"] + openssl_root = ssl_info.package_folder.replace("\\", "/") search_replace = [ - ( - r'$default_openssldir . "\\include"', - f"'{openssl_root}/include'" - ), + (r'$default_openssldir . "\\include"', f"'{openssl_root}/include'"), (r'$default_openssldir . "\\lib\\VC"', f"'{openssl_root}/lib'"), - ("$openssl = false", "$openssl = true") + ("$openssl = false", "$openssl = true"), ] if self._is_debug: search_replace.append(("$debug = false", "$debug = true")) if self.options.shared: - search_replace.append(( - "$link_dynamic = false", - "$link_dynamic = true" - )) + search_replace.append(("$link_dynamic = false", "$link_dynamic = true")) if self.options.with_ipv6: search_replace.append(("$b_ipv6 = false", "$b_ipv6 = true")) for search, replace in search_replace: - tools.replace_in_file("win32\\build.pl", search, replace) - runtime = self.settings.compiler.runtime - tools.replace_in_file("win32\\Configure", '"/runtime', f'"/{runtime}') + replace_in_file(self, "build.pl", search, replace) + replace_in_file(self, "Configure", '"/runtime', f'"/{msvc_runtime_flag(self)}') link_lines = "\n".join( f'# pragma comment(lib, "{lib}.lib")' - for lib in ssl_info.libs + ssl_info.system_libs + for lib in ssl_info.cpp_info.libs + ssl_info.cpp_info.system_libs ) - config = r"win32\net-snmp\net-snmp-config.h.in" - tools.replace_in_file(config, "/* Conan: system_libs */", link_lines) - - def _build_msvc(self): - if self.should_configure: - self._patch_msvc() - self.run("perl build.pl", cwd="win32") - if self.should_build: - with tools.vcvars(self): - self.run("nmake /nologo libsnmp", cwd="win32") - - @functools.lru_cache(1) - def _configure_autotools(self): - disabled_link_type = "static" if self.options.shared else "shared" - debug_flag = "enable" if self._is_debug else "disable" - ipv6_flag = "enable" if self.options.with_ipv6 else "disable" - ssl_path = self.deps_cpp_info["openssl"].rootpath - args = [ - "--with-defaults", - "--without-rpm", - "--without-pcre", - "--disable-agent", - "--disable-applications", - "--disable-manuals", - "--disable-scripts", - "--disable-mibs", - "--disable-embedded-perl", - f"--disable-{disabled_link_type}", - f"--{debug_flag}-debugging", - f"--{ipv6_flag}-ipv6", - f"--with-openssl={ssl_path}", - ] - autotools = AutoToolsBuildEnvironment(self) - autotools.libs = [] - autotools.configure(args=args) - return autotools + config = r"net-snmp\net-snmp-config.h.in" + replace_in_file(self, config, "/* Conan: system_libs */", link_lines) def _patch_unix(self): - tools.replace_in_file( - "configure", - "-install_name \\$rpath/", - "-install_name @rpath/" - ) - crypto_libs = self.deps_cpp_info["openssl"].system_libs + for gnu_config in [ + self.conf.get("user.gnu-config:config_guess", check_type=str), + self.conf.get("user.gnu-config:config_sub", check_type=str), + ]: + if gnu_config: + copy(self, os.path.basename(gnu_config), src=os.path.dirname(gnu_config), dst=self.source_folder) + configure_path = os.path.join(self.source_folder, "configure") + replace_in_file(self, configure_path, + "-install_name \\$rpath/", + "-install_name @rpath/") + crypto_libs = self.dependencies["openssl"].cpp_info.system_libs if len(crypto_libs) != 0: crypto_link_flags = " -l".join(crypto_libs) - tools.replace_in_file( - "configure", + replace_in_file(self, configure_path, 'LIBCRYPTO="-l${CRYPTO}"', - 'LIBCRYPTO="-l${CRYPTO} -l%s"' % (crypto_link_flags,) - ) - tools.replace_in_file( - "configure", - 'LIBS="-lcrypto $LIBS"', - f'LIBS="-lcrypto -l{crypto_link_flags} $LIBS"' - ) + 'LIBCRYPTO="-l${CRYPTO} -l%s"' % (crypto_link_flags,)) + replace_in_file(self, configure_path, + 'LIBS="-lcrypto $LIBS"', + f'LIBS="-lcrypto -l{crypto_link_flags} $LIBS"') def build(self): - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - if self._is_msvc: - self._build_msvc() + apply_conandata_patches(self) + if is_msvc(self): + with chdir(self, os.path.join(self.source_folder, "win32")): + self._patch_msvc() + self.run("perl build.pl") + self.run("nmake /nologo libsnmp") else: self._patch_unix() - os.chmod("configure", os.stat("configure").st_mode | stat.S_IEXEC) - self._configure_autotools()\ - .make(target="snmplib", args=["NOAUTODEPS=1"]) - - def _package_msvc(self): - cfg = "debug" if self._is_debug else "release" - self.copy("netsnmp.dll", "bin", fr"win32\bin\{cfg}") - self.copy("netsnmp.lib", "lib", fr"win32\lib\{cfg}") - self.copy("include/net-snmp/*.h") - for directory in ["", "agent/", "library/"]: - self.copy(f"net-snmp/{directory}*.h", "include", "win32") - self.copy("COPYING", "licenses") - - def _remove(self, path): - if os.path.isdir(path): - tools.rmdir(path) - else: - os.remove(path) - - def _package_unix(self): - self._configure_autotools().install(args=["NOAUTODEPS=1"]) - tools.remove_files_by_mask(self.package_folder, "README") - tools.rmdir(os.path.join(self.package_folder, "bin")) - lib_dir = os.path.join(self.package_folder, "lib") - for entry in os.listdir(lib_dir): - if not entry.startswith("libnetsnmp.") or entry.endswith(".la"): - self._remove(os.path.join(lib_dir, entry)) - self.copy("COPYING", "licenses") + configure_path = os.path.join(self.source_folder, "configure") + os.chmod(configure_path, os.stat(configure_path).st_mode | stat.S_IEXEC) + autotools = Autotools(self) + autotools.autoreconf() + autotools.configure() + autotools.make(target="snmplib", args=["NOAUTODEPS=1"]) def package(self): - if self._is_msvc: - self._package_msvc() + copy(self, "COPYING", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + if is_msvc(self): + cfg = "debug" if self._is_debug else "release" + copy(self, "netsnmp.lib", + dst=os.path.join(self.package_folder, "lib"), + src=os.path.join(self.source_folder, rf"win32\lib\{cfg}")) + copy(self, "include/net-snmp/*.h", + dst=self.package_folder, + src=self.source_folder) + for directory in ["", "agent/", "library/"]: + copy(self, f"net-snmp/{directory}*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "win32")) else: - self._package_unix() + autotools = Autotools(self) + #only install with -j1 as parallel install will break dependencies. Probably a bug in the dependencies + #install specific targets instead of just everything as it will try to do perl stuff on you host machine + autotools.install(args=["-j1"], target="installsubdirs installlibs installprogs installheaders") + rm(self, "README", self.package_folder, recursive=True) + rmdir(self, os.path.join(self.package_folder, "bin")) + rm(self, "*.la", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): self.cpp_info.libs = ["netsnmp"] - self.cpp_info.requires = ["openssl::openssl"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["rt", "pthread", "m"]) + if is_apple_os(self): + self.cpp_info.frameworks.extend(["CoreFoundation", "DiskArbitration", "IOKit"]) diff --git a/recipes/net-snmp/all/patches/0003-fix-perl-scripts-msvc.patch b/recipes/net-snmp/all/patches/0003-fix-perl-scripts-msvc.patch index 992914c1a489c..5d1776394ec89 100644 --- a/recipes/net-snmp/all/patches/0003-fix-perl-scripts-msvc.patch +++ b/recipes/net-snmp/all/patches/0003-fix-perl-scripts-msvc.patch @@ -9,24 +9,25 @@ my $debug = false; my $configOpts; my $link_dynamic = false; -@@ -44,15 +44,7 @@ +@@ -44,7 +44,7 @@ # Path of this script (source tree path + "win32"). my $current_pwd = dirname(abs_path($0)); -if (!defined($ENV{MSVCDir}) && !defined($ENV{VCINSTALLDIR}) && -- !defined($ENV{TARGET_CPU})) { -- print "\nPlease run VCVARS32.BAT first to set up the Visual Studio build\n" . -- "environment.\n\n"; -- system("pause"); -- exit; --} -- ++if (0 && + !defined($ENV{TARGET_CPU})) { + print "\nPlease run VCVARS32.BAT first to set up the Visual Studio build\n" . + "environment.\n\n"; +@@ -52,7 +52,7 @@ + exit; + } + -while (1) { +while (0) { print "\n\nNet-SNMP build and install options\n"; print "==================================\n\n"; print "1. OpenSSL support: " . ($openssl ? "enabled" : "disabled"). "\n"; -@@ -192,6 +184,8 @@ +@@ -188,6 +188,8 @@ print "Running Configure...\n"; system("perl Configure $configOpts --linktype=$linktype --prefix=\"$install_base\"" . ($logging ? " > configure.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see configure.out)" : "Build error (see above)"); @@ -35,6 +36,7 @@ print "Cleaning...\n"; system("nmake /nologo clean" . ($logging ? " > clean.out 2>&1" : "")) == 0 || die ($logging ? "Build error (see clean.out)" : "Build error (see above)"); + --- win32/Configure +++ win32/Configure @@ -6,7 +6,6 @@ @@ -45,16 +47,16 @@ use Getopt::Long; my $version = "unknown"; -@@ -190,8 +189,6 @@ +@@ -190,7 +189,6 @@ my $perl_inc = $opensslincdir ? "/I $opensslincdir" : ""; -my $perl_cflags = ExtUtils::Embed::ccopts(); -- - my %makefile_subs = ( - "app" => [ "^APPS=", "APPS=" . join(" ", @apps) ], - "apc" => [ "^APPS_CLEAN=", "APPS_CLEAN=" . join(" ", @apps_clean)], -@@ -205,29 +202,23 @@ + # Do not use $perl_cflags if these come from a Perl executable built with gcc. +-$perl_cflags = "" if $perl_cflags =~ / -pipe/; ++ + +@@ -207,29 +205,24 @@ "sdk" => [ "^SDK=", $sdk == 1 ? "SDK=true" : "SDK=false" ], "pin" => [ "^PERL_DEFINE=","PERL_DEFINE=$perl_define" ], "pdf" => [ "^PERL_INC=", "PERL_INC=$perl_inc" ], @@ -62,7 +64,7 @@ + "pcf" => [ "^PERL_CFLAGS=","PERL_CFLAGS=" ], "cfl" => [ "^CFLAGS=", "CFLAGS=$perl_define " . "/D WIN32_LEAN_AND_MEAN " . -- "/EHsc " . + "/EHsc " . - "/FD " . - "/FR\$(INTDIR)\\ " . "/Fd\$(INTDIR)\\\$(PROGNAME).pdb " . @@ -89,7 +91,7 @@ ], "rsc" => [ "^RSCFLAGS=", "RSCFLAGS=/l 0x409 " . ($config eq "release" ? "/d NDEBUG" : -@@ -308,9 +299,3 @@ +@@ -310,9 +303,3 @@ print " Blumenthal AES: " . ($blumenthal_aes ? "enabled" : "disabled") . "\n"; print " IPv6 transport: " . ($b_ipv6 == 1 ? "enabled" : "disabled") . "\n"; print " winExtDLL agent: " . ($b_winextdll == 1 ? "enabled" : "disabled") . "\n"; diff --git a/recipes/net-snmp/all/patches/0004-fix-apple-arm64-build.patch b/recipes/net-snmp/all/patches/0004-fix-apple-arm64-build.patch deleted file mode 100644 index 018c49021fc87..0000000000000 --- a/recipes/net-snmp/all/patches/0004-fix-apple-arm64-build.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream suggests the just hardcode this value: -https://github.com/net-snmp/net-snmp/issues/295#issuecomment-1002631231 - ---- config.sub -+++ config.sub -@@ -120,6 +120,11 @@ - exit 1;; - esac - -+if [ "$1" = aarch64-apple-darwin ]; then -+ echo arm-apple-darwin -+ exit 0 -+fi -+ - # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` diff --git a/recipes/net-snmp/all/test_package/CMakeLists.txt b/recipes/net-snmp/all/test_package/CMakeLists.txt index bed2bf477f616..21569fa32fd1f 100644 --- a/recipes/net-snmp/all/test_package/CMakeLists.txt +++ b/recipes/net-snmp/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup(TARGETS KEEP_RPATHS) - find_package(net-snmp REQUIRED CONFIG) add_executable(test_package test_package.c) diff --git a/recipes/net-snmp/all/test_package/conanfile.py b/recipes/net-snmp/all/test_package/conanfile.py index 56657365795bd..ef5d7042163ec 100644 --- a/recipes/net-snmp/all/test_package/conanfile.py +++ b/recipes/net-snmp/all/test_package/conanfile.py @@ -1,19 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake, tools - 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 build_requirements(self): - if self.settings.os == "Macos" and self.settings.arch == "armv8": - # Attempting to use @rpath without - # CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being set. This could be - # because you are using a Mac OS X version less than 10.5 or - # because CMake's platform configuration is corrupt. - self.build_requires("cmake/3.20.1") + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -21,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/net-snmp/all/test_package/test_package.c b/recipes/net-snmp/all/test_package/test_package.c index db6d49e73a2f8..dbe79814204fe 100644 --- a/recipes/net-snmp/all/test_package/test_package.c +++ b/recipes/net-snmp/all/test_package/test_package.c @@ -2,12 +2,8 @@ #include #include -int main(int argc, char const* argv[]) +int main() { - (void)argc; - (void)argv; - netsnmp_free(NULL); - return 0; } diff --git a/recipes/net-snmp/all/test_v1_package/CMakeLists.txt b/recipes/net-snmp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/net-snmp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/plutovg/all/test_v1_package/conanfile.py b/recipes/net-snmp/all/test_v1_package/conanfile.py similarity index 69% rename from recipes/plutovg/all/test_v1_package/conanfile.py rename to recipes/net-snmp/all/test_v1_package/conanfile.py index 20d4d2e28d57e..a8c92dea63335 100644 --- a/recipes/plutovg/all/test_v1_package/conanfile.py +++ b/recipes/net-snmp/all/test_v1_package/conanfile.py @@ -1,8 +1,9 @@ -from conans import ConanFile, CMake -from conan.tools.build import cross_building import os -class TestPackageV1Conan(ConanFile): +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "cmake", "cmake_find_package_multi" @@ -12,6 +13,6 @@ def build(self): cmake.build() def test(self): - if not cross_building(self): + if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") self.run(bin_path, run_environment=True) diff --git a/recipes/net-snmp/config.yml b/recipes/net-snmp/config.yml index f15097f7b11ab..be87e4ef2a874 100644 --- a/recipes/net-snmp/config.yml +++ b/recipes/net-snmp/config.yml @@ -1,3 +1,3 @@ versions: - "5.9.1": + "5.9.4": folder: all diff --git a/recipes/nghttp3/all/conandata.yml b/recipes/nghttp3/all/conandata.yml index 44b63e4bfe7f1..b52e9aae32e70 100644 --- a/recipes/nghttp3/all/conandata.yml +++ b/recipes/nghttp3/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.5.0": + url: "https://github.com/ngtcp2/nghttp3/releases/download/v1.5.0/nghttp3-1.5.0.tar.bz2" + sha256: "4d89a3b84dbe2c6e0fe1367a2082f23b3c6e3279536e2436aed1a3785f6716c5" "1.4.0": url: "https://github.com/ngtcp2/nghttp3/releases/download/v1.4.0/nghttp3-1.4.0.tar.bz2" sha256: "bf8fbb4242cff0feb10b3e0d02545a8ad9a71d932f877a57a592bfde62a26019" diff --git a/recipes/nghttp3/config.yml b/recipes/nghttp3/config.yml index f9cd212790c2d..53ac3abeac23c 100644 --- a/recipes/nghttp3/config.yml +++ b/recipes/nghttp3/config.yml @@ -1,4 +1,6 @@ versions: + "1.5.0": + folder: all "1.4.0": folder: all "1.3.0": diff --git a/recipes/ninja/all/conanfile.py b/recipes/ninja/all/conanfile.py index 6fede8df5ba1b..5e97a00b8feff 100644 --- a/recipes/ninja/all/conanfile.py +++ b/recipes/ninja/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile, conan_version from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get +from conan.tools.files import copy, get, replace_in_file from conan.tools.scm import Version import os @@ -25,6 +25,10 @@ def package_id(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + + #prevent re2c (which is optional and not needed) from being used + replace_in_file(self, cmakelists, "if(RE2C)", "if(FALSE)") def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/nodejs/all/conandata.yml b/recipes/nodejs/all/conandata.yml index 56a1be535ef41..da170c70c328b 100644 --- a/recipes/nodejs/all/conandata.yml +++ b/recipes/nodejs/all/conandata.yml @@ -1,52 +1,51 @@ sources: - "12.14.1": - Windows: - "x86_64": - url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-win-x64.zip" - sha256: "1f96ccce3ba045ecea3f458e189500adb90b8bc1a34de5d82fc10a5bf66ce7e3" - Linux: - "x86_64": - url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-linux-x64.tar.xz" - sha256: "07cfcaa0aa9d0fcb6e99725408d9e0b07be03b844701588e3ab5dbc395b98e1b" - Macos: - "x86_64": - url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-darwin-x64.tar.gz" - sha256: "0be10a28737527a1e5e3784d3ad844d742fe8b0718acd701fd48f718fd3af78f" - "13.6.0": + "20.16.0": Windows: "x86_64": - url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-win-x64.zip" - sha256: "7fe37b34a4673a071bea52fcaf913ec422cf6fd79fd025bfb22de42ccc77f386" + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-win-x64.zip" + sha256: "4e88373ac5ae859ad4d50cc3c5fa86eb3178d089b72e64c4dbe6eeac5d7b5979" + "armv8": + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-win-arm64.zip" + sha256: "af5a85ea299fcebd34c3c726a47a926e73171f9b657a6eaa796c011597241bf8" Linux: "x86_64": - url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-linux-x64.tar.xz" - sha256: "00f01315a867da16d1638f7a02966c608e344ac6c5b7d04d1fdae3138fa9d798" + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-linux-x64.tar.xz" + sha256: "c30af7dfea46de7d8b9b370fa33b8b15440bc93f0a686af8601bbb48b82f16c0" + "armv7": + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-linux-armv7l.tar.xz" + sha256: "a23a49029e8c7788c701eb3ace553260b7676a5a2ea9965ba92e4817008fbefe" + "armv8": + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-linux-arm64.tar.xz" + sha256: "1d9929e72f692179f884cd676b2dfabd879cb77defa7869dc8cfc802619277fb" Macos: "x86_64": - url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-darwin-x64.tar.gz" - sha256: "da13adb864777b322dda7af20410a9b0c63aa69de4b5574008d1e6910768bf69" - "16.3.0": + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-darwin-x64.tar.gz" + sha256: "e18942cd706e4d69a4845ddacee2f1c17a72e853a229e3d2623d2edeb7efde72" + "armv8": + url: "https://nodejs.org/dist/v20.16.0/node-v20.16.0-darwin-arm64.tar.gz" + sha256: "fc7355e778b181575153b7dea4879e8021776eeb376c43c50f65893d2ea70aa3" + "18.15.0": Windows: "x86_64": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-win-x64.zip" - sha256: "3352e58d3603cf58964409d07f39f3816285317d638ddb0a0bf3af5deb2ff364" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-win-x64.zip" + sha256: "118fbcae58bc8c53cbe97a10c019734ed90685da8dda98aa0b0f4aeead42a647" Linux: "x86_64": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-x64.tar.xz" - sha256: "5347ece975747e4d9768d4ed3f8b2220c955ac01f8a695347cd7f71ff5efa318" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-x64.tar.xz" + sha256: "c8c5fa53ce0c0f248e45983e86368e0b1daf84b77e88b310f769c3cfc12682ef" "armv7": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-armv7l.tar.xz" - sha256: "c8817e30fb910476ec1f223de7eedd31f3d157ddf2003a3083d7f5662180e4de" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-armv7l.tar.xz" + sha256: "baad3cdf1365f46bf837635554b10bc3e320799e69ac26e07df1fcde0c1738c7" "armv8": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-arm64.tar.xz" - sha256: "67dd97e41aad1bc11736e99cba119525b4f3472b132c46730ba8cf03f7076e23" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-arm64.tar.xz" + sha256: "98ea6ed0a1ae55334ab2c03c34d5e52c6dc3dee8f236c0afc08ab1c964506633" Macos: "x86_64": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-darwin-x64.tar.gz" - sha256: "3e075bcfb6130dda84bfd04633cb228ec71e72d9a844c57efb7cfff130b4be89" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-darwin-x64.tar.gz" + sha256: "76add174d2d3f98da08907412e82add7352b8cb6f639324d352a65c084b99c7e" "armv8": - url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-darwin-arm64.tar.gz" - sha256: "aeac294dbe54a4dfd222eedfbae704b185c40702254810e2c5917f6dbc80e017" + url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-darwin-arm64.tar.gz" + sha256: "bd302a689c3c34e2b61d86b97de66d26a335881a17af09b6a0a4bb1019df56e4" "16.20.2": Windows: "x86_64": @@ -69,25 +68,51 @@ sources: "armv8": url: "https://nodejs.org/dist/v16.20.2/node-v16.20.2-darwin-arm64.tar.gz" sha256: "6a5c4108475871362d742b988566f3fe307f6a67ce14634eb3fbceb4f9eea88c" - "18.15.0": + "16.3.0": Windows: "x86_64": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-win-x64.zip" - sha256: "118fbcae58bc8c53cbe97a10c019734ed90685da8dda98aa0b0f4aeead42a647" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-win-x64.zip" + sha256: "3352e58d3603cf58964409d07f39f3816285317d638ddb0a0bf3af5deb2ff364" Linux: "x86_64": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-x64.tar.xz" - sha256: "c8c5fa53ce0c0f248e45983e86368e0b1daf84b77e88b310f769c3cfc12682ef" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-x64.tar.xz" + sha256: "5347ece975747e4d9768d4ed3f8b2220c955ac01f8a695347cd7f71ff5efa318" "armv7": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-armv7l.tar.xz" - sha256: "baad3cdf1365f46bf837635554b10bc3e320799e69ac26e07df1fcde0c1738c7" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-armv7l.tar.xz" + sha256: "c8817e30fb910476ec1f223de7eedd31f3d157ddf2003a3083d7f5662180e4de" "armv8": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-arm64.tar.xz" - sha256: "98ea6ed0a1ae55334ab2c03c34d5e52c6dc3dee8f236c0afc08ab1c964506633" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-arm64.tar.xz" + sha256: "67dd97e41aad1bc11736e99cba119525b4f3472b132c46730ba8cf03f7076e23" Macos: "x86_64": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-darwin-x64.tar.gz" - sha256: "76add174d2d3f98da08907412e82add7352b8cb6f639324d352a65c084b99c7e" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-darwin-x64.tar.gz" + sha256: "3e075bcfb6130dda84bfd04633cb228ec71e72d9a844c57efb7cfff130b4be89" "armv8": - url: "https://nodejs.org/dist/v18.15.0/node-v18.15.0-darwin-arm64.tar.gz" - sha256: "bd302a689c3c34e2b61d86b97de66d26a335881a17af09b6a0a4bb1019df56e4" + url: "https://nodejs.org/dist/v16.3.0/node-v16.3.0-darwin-arm64.tar.gz" + sha256: "aeac294dbe54a4dfd222eedfbae704b185c40702254810e2c5917f6dbc80e017" + "13.6.0": + Windows: + "x86_64": + url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-win-x64.zip" + sha256: "7fe37b34a4673a071bea52fcaf913ec422cf6fd79fd025bfb22de42ccc77f386" + Linux: + "x86_64": + url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-linux-x64.tar.xz" + sha256: "00f01315a867da16d1638f7a02966c608e344ac6c5b7d04d1fdae3138fa9d798" + Macos: + "x86_64": + url: "https://nodejs.org/dist/v13.6.0/node-v13.6.0-darwin-x64.tar.gz" + sha256: "da13adb864777b322dda7af20410a9b0c63aa69de4b5574008d1e6910768bf69" + "12.14.1": + Windows: + "x86_64": + url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-win-x64.zip" + sha256: "1f96ccce3ba045ecea3f458e189500adb90b8bc1a34de5d82fc10a5bf66ce7e3" + Linux: + "x86_64": + url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-linux-x64.tar.xz" + sha256: "07cfcaa0aa9d0fcb6e99725408d9e0b07be03b844701588e3ab5dbc395b98e1b" + Macos: + "x86_64": + url: "https://nodejs.org/dist/v12.14.1/node-v12.14.1-darwin-x64.tar.gz" + sha256: "0be10a28737527a1e5e3784d3ad844d742fe8b0718acd701fd48f718fd3af78f" diff --git a/recipes/nodejs/config.yml b/recipes/nodejs/config.yml index 78cc638a90e4d..7f37f049d8acc 100644 --- a/recipes/nodejs/config.yml +++ b/recipes/nodejs/config.yml @@ -1,11 +1,13 @@ versions: - "12.14.1": + "20.16.0": folder: all - "13.6.0": + "18.15.0": + folder: all + "16.20.2": folder: all "16.3.0": folder: all - "16.20.2": + "13.6.0": folder: all - "18.15.0": + "12.14.1": folder: all diff --git a/recipes/nsync/all/conandata.yml b/recipes/nsync/all/conandata.yml index d4253cb970850..2612b48d1ed17 100644 --- a/recipes/nsync/all/conandata.yml +++ b/recipes/nsync/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.29.2": + url: "https://github.com/google/nsync/archive/1.29.2.tar.gz" + sha256: "1d63e967973733d2c97e841e3c05fac4d3fa299f01d14c86f2695594c7a4a2ec" "1.29.1": url: "https://github.com/google/nsync/archive/1.29.1.tar.gz" sha256: "3045a8922171430426b695edf794053182d245f6a382ddcc59ef4a6190848e98" @@ -21,6 +24,8 @@ sources: sha256: "b7e75b17957c62bd02dd73890bde22da3a564903fcaad651b395453d41d3325b" url: "https://github.com/google/nsync/archive/refs/tags/1.23.0.tar.gz" patches: + "1.29.2": + - patch_file: "patches/0001-1.27.0-darwin-exclude_semaphore_mutex_c_from_nsync_cpp_lib.patch" "1.29.1": - patch_file: "patches/0001-1.27.0-darwin-exclude_semaphore_mutex_c_from_nsync_cpp_lib.patch" "1.28.0": diff --git a/recipes/nsync/config.yml b/recipes/nsync/config.yml index 0224903d9865b..b839a601be83a 100644 --- a/recipes/nsync/config.yml +++ b/recipes/nsync/config.yml @@ -1,4 +1,6 @@ versions: + "1.29.2": + folder: "all" "1.29.1": folder: "all" "1.28.0": diff --git a/recipes/octo-logger-cpp/all/conandata.yml b/recipes/octo-logger-cpp/all/conandata.yml index ad6e1f0b56004..47b30faf7d121 100644 --- a/recipes/octo-logger-cpp/all/conandata.yml +++ b/recipes/octo-logger-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.0": + url: "https://github.com/ofiriluz/octo-logger-cpp/archive/v2.0.0.tar.gz" + sha256: "2edad6d1cba27019f1f26e562d9d8ff8395fc9ada1e8fb0c226c603ec5e0ed15" "1.12.0": url: "https://github.com/ofiriluz/octo-logger-cpp/archive/v1.12.0.tar.gz" sha256: "b4140d31910af128e1d97ae44a564bbad7f7ca889410bbc885691c5e215c0d61" diff --git a/recipes/octo-logger-cpp/config.yml b/recipes/octo-logger-cpp/config.yml index d7616b7f25016..d8ff67e582f8b 100644 --- a/recipes/octo-logger-cpp/config.yml +++ b/recipes/octo-logger-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.0": + folder: "all" "1.12.0": folder: "all" "1.11.0": diff --git a/recipes/ohnet/all/conandata.yml b/recipes/ohnet/all/conandata.yml index 5ad399f8fa0f9..974392dab738f 100644 --- a/recipes/ohnet/all/conandata.yml +++ b/recipes/ohnet/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.37.5454": + url: "https://github.com/openhome/ohNet/archive/refs/tags/ohNet_1.37.5454.tar.gz" + sha256: "343c0f6b015e04195f5e7d937fa5e010a4d5a54782387d1c79259d3bb4ead0f0" "1.36.5344": url: "https://github.com/openhome/ohNet/archive/refs/tags/ohNet_1.36.5344.tar.gz" sha256: "4873504f8f98c5fdbd72537392d6e5d97ed0747d3ef0b9c2b7fe77f1a02aaeb6" @@ -6,6 +9,13 @@ sources: url: "https://github.com/openhome/ohNet/archive/refs/tags/ohNet_1.36.5182.tar.gz" sha256: "1489407b9bae13affa8f933a81fb5a43f16b29f5bf8048b68ea645afc0e53ced" patches: + "1.37.5454": + - patch_file: "patches/0001-makefile-1.37.5454.patch" + patch_description: "Reduce gcc-centricity in Makefile" + patch_type: "conan" + - patch_file: "patches/0001-common.mak-1.37.5454.patch" + patch_description: "Use proper flags for C++ file" + patch_type: "conan" "1.36.5344": - patch_file: "patches/0001-makefile-1.36.5344.patch" patch_description: "Reduce gcc-centricity in Makefile" diff --git a/recipes/ohnet/all/conanfile.py b/recipes/ohnet/all/conanfile.py index ad2031f5acf6b..e76982e6ef25b 100755 --- a/recipes/ohnet/all/conanfile.py +++ b/recipes/ohnet/all/conanfile.py @@ -29,7 +29,7 @@ class OhNetConan(ConanFile): } short_paths = True - def _get_openhome_architecture(self, args): + def _fill_openhome_architecture(self, args): if is_apple_os(self): if str(self.settings.arch).startswith("armv8"): openhome_architecture = "arm64" @@ -66,43 +66,48 @@ def generate(self): tc.make_args.append("-j1") tc.generate() + def _fill_ohnet_args(self, args): + if self.settings.build_type == "Debug": + args.append("debug=1") + + installlibdir = os.path.join(self.package_folder, "lib") + installincludedir = os.path.join(self.package_folder, "include") + + args.extend([f"prefix={self.package_folder}",f"installdir={self.package_folder}", f"installlibdir={installlibdir}", f"installincludedir={installincludedir}"]) + + if not is_msvc(self): + args = self._fill_openhome_architecture(args) + args.append("rsync=no") + if str(self.settings.compiler.libcxx) == "libc++": + args.extend(["CPPFLAGS=-stdlib=libc++", "LDFLAGS=-stdlib=libc++"]) + return args + def build(self): apply_conandata_patches(self) targets = "ohNetDll TestsNative proxies devices" - additional_options="" + args = [] + self._fill_ohnet_args(args) with chdir(self, self.source_folder): if is_msvc(self): - if self.settings.build_type == "Debug": - additional_options += " debug=1" - self.run(f"nmake /f OhNet.mak {targets} {additional_options}") + self.run(f"nmake /f OhNet.mak {targets} {' '.join(args)}") else: - args = [] - args = self._get_openhome_architecture(args) - args.append("rsync=no") - if str(self.settings.compiler.libcxx) == "libc++": - args.extend(["CPPFLAGS=-stdlib=libc++", "LDFLAGS=-stdlib=libc++"]) autotools = Autotools(self) autotools.make(args=args, target=targets) def package(self): - installlibdir = os.path.join(self.package_folder, "lib") - installincludedir = os.path.join(self.package_folder, "include") - additional_options="" - copy(self, "License.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*", src=os.path.join(self.source_folder, "OpenHome", "Net", "ServiceGen"), dst=os.path.join(self.package_folder, "lib", "ServiceGen")) mkdir(self, os.path.join(self.package_folder, "lib", "t4")) + args = [] + self._fill_ohnet_args(args) + with chdir(self, self.source_folder): if is_msvc(self): - if self.settings.build_type == "Debug": - additional_options += " debug=1" - self.run(f"nmake /f OhNet.mak install installdir={self.package_folder} installlibdir={installlibdir} installincludedir={installincludedir} {additional_options}") + self.run(f"nmake /f OhNet.mak install {' '.join(args)}") else: - args = [f"prefix={self.package_folder}", f"installlibdir={installlibdir}", f"installincludedir={installincludedir}", "rsync=no"] - args = self._get_openhome_architecture(args) autotools = Autotools(self) autotools.make(args=args, target="install-libs install-includes") if is_apple_os(self): @@ -143,6 +148,7 @@ def package_info(self): self.cpp_info.names["cmake_find_package"] = "ohNet" self.cpp_info.names["cmake_find_package_multi"] = "ohNet" self.cpp_info.names["pkg_config"] = "ohNet" + for component in ["ohNetCore", "OhNetDevices", "ohNetProxies", "TestFramework"]: self.cpp_info.components[component].names["cmake_find_package"] = component self.cpp_info.components[component].names["cmake_find_package_multi"] = component diff --git a/recipes/ohnet/all/patches/0001-common.mak-1.37.5454.patch b/recipes/ohnet/all/patches/0001-common.mak-1.37.5454.patch new file mode 100644 index 0000000000000..9b99e3972d230 --- /dev/null +++ b/recipes/ohnet/all/patches/0001-common.mak-1.37.5454.patch @@ -0,0 +1,27 @@ +diff --git a/Common.mak b/Common.mak +index a25489c2..7189c9dc 100644 +--- a/Common.mak ++++ b/Common.mak +@@ -385,21 +385,21 @@ $(objdir)nsec.$(objext) : $(mDNSdir)/nsec.c $(headers) + $(compiler)nsec.$(objext) -c $(cflags_third_party) $(includes) $(mDNSdir)/nsec.c + $(objdir)nsec3.$(objext) : $(mDNSdir)/nsec3.c $(headers) + $(compiler)nsec3.$(objext) -c $(cflags_third_party) $(includes) $(mDNSdir)/nsec3.c + $(objdir)uDNS.$(objext) : $(mDNSdir)/uDNS.c $(headers) + $(compiler)uDNS.$(objext) -c $(cflags_third_party) $(includes) $(mDNSdir)/uDNS.c + $(objdir)dnssd_clientshim.$(objext) : $(mDNSdir)/dnssd_clientshim.c $(headers) + $(compiler)dnssd_clientshim.$(objext) -c $(cflags_third_party) $(includes) $(mDNSdir)/dnssd_clientshim.c + $(objdir)dnssd_clientlib.$(objext) : $(mDNSdir)/dnssd_clientlib.c $(headers) + $(compiler)dnssd_clientlib.$(objext) -c $(cflags_third_party) $(includes) $(mDNSdir)/dnssd_clientlib.c + $(objdir)MdnsPlatform.$(objext) : OpenHome/Net/Device/Bonjour/MdnsPlatform.cpp $(headers) +- $(compiler)MdnsPlatform.$(objext) -c $(cflags_third_party) $(includes) OpenHome/Net/Device/Bonjour/MdnsPlatform.cpp ++ $(compiler)MdnsPlatform.$(objext) -c $(cflags_third_party) $(cppflags) $(includes) OpenHome/Net/Device/Bonjour/MdnsPlatform.cpp + $(objdir)MdnsProvider.$(objext) : OpenHome/Net/Device/Bonjour/MdnsProvider.cpp $(headers) + $(compiler)MdnsProvider.$(objext) -c $(cppflags) $(includes) OpenHome/Net/Device/Bonjour/MdnsProvider.cpp + $(objdir)Md5.$(objext) : OpenHome/md5.c $(headers) + $(compiler)Md5.$(objext) -c $(cflags_third_party) $(includes) OpenHome/md5.c + $(objdir)NetworkAdapterList.$(objext) : OpenHome/NetworkAdapterList.cpp $(headers) + $(compiler)NetworkAdapterList.$(objext) -c $(cppflags) $(includes) OpenHome/NetworkAdapterList.cpp + $(objdir)DnsChangeNotifier.$(objext) : OpenHome/DnsChangeNotifier.cpp $(headers) + $(compiler)DnsChangeNotifier.$(objext) -c $(cppflags) $(includes) OpenHome/DnsChangeNotifier.cpp + $(objdir)Network.$(objext) : OpenHome/Network.cpp $(headers) + $(compiler)Network.$(objext) -c $(cppflags) $(includes) OpenHome/Network.cpp diff --git a/recipes/ohnet/all/patches/0001-makefile-1.37.5454.patch b/recipes/ohnet/all/patches/0001-makefile-1.37.5454.patch new file mode 100644 index 0000000000000..b180a57e2d452 --- /dev/null +++ b/recipes/ohnet/all/patches/0001-makefile-1.37.5454.patch @@ -0,0 +1,336 @@ +diff --git a/Makefile b/Makefile +index 2f0cb07c..372a6765 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,44 +1,44 @@ + #Makefile for linux + # Could be extended to support Mac in future + + rsync ?= yes + + ifeq ($(rsync),yes) + cp = rsync -u + else +-cp = cp -u ++cp = cp + endif + + ifeq ($(debug),1) + debug_specific_cflags = -g -O0 + debug_csharp = /define:DEBUG /debug+ + build_dir = Debug + openhome_configuration = Debug + android_ndk_debug = 1 + else + debug_specific_cflags = -g -O2 + debug_csharp = /optimize+ /debug:pdbonly + build_dir = Release + openhome_configuration = Release + android_ndk_debug=0 + endif + + + + # Figure out platform, openhome_system and openhome_architecture + +-gcc_machine = $(shell ${CROSS_COMPILE}gcc -dumpmachine) ++cc_machine = $(shell ${CROSS_COMPILE}$(CC) -dumpmachine) + MACHINE = $(shell uname -s) + + $(info CROSS_COMPILE: ${CROSS_COMPILE}) +-$(info Machine reported by compiler is: ${gcc_machine}) ++$(info Machine reported by compiler is: ${cc_machine}) + $(info Machine reported by uname is: ${MACHINE}) + $(info PLATFORM: ${PLATFORM}) + + ifeq ($(MACHINE),Darwin) + ifeq ($(iOs-arm64),1) + platform = iOS + detected_openhome_system = iOs + detected_openhome_architecture = arm64 + else ifeq ($(iOs-x64),1) + platform = iOS +@@ -50,88 +50,88 @@ ifeq ($(MACHINE),Darwin) + detected_openhome_architecture = rpi + else + platform = Mac + detected_openhome_system = Mac + ifeq ($(Mac-arm64),1) + detected_openhome_architecture = arm64 + else + detected_openhome_architecture = x64 + endif + endif +-else ifneq (, $(findstring powerpc, $(gcc_machine))) ++else ifneq (, $(findstring powerpc, $(cc_machine))) + platform = Core-ppc32 + detected_openhome_system = Core + detected_openhome_architecture = ppc32 + else ifeq ($(Android-anycpu), 1) + platform = Android + detected_openhome_system = Android + detected_openhome_architecture = anycpu + else ifeq ($(freebsd), 1) + platform = FreeBSD + detected_openhome_system = FreeBSD + detected_openhome_architecture = x86 +- compiler = gcc -o $(objdir) +- link = ${CROSS_COMPILE}g++ $(platform_linkflags) ++ compiler = $(CC) -o $(objdir) ++ link = ${CROSS_COMPILE}$(CXX) $(platform_linkflags) + ar = ${CROSS_COMPILE}ar rc $(objdir) + else ifneq (,$(findstring Linux-x86,${PLATFORM})) +- ifneq (,$(findstring x86_64,$(gcc_machine))) ++ ifneq (,$(findstring x86_64,$(cc_machine))) + platform = Vanilla + detected_openhome_system = Linux + detected_openhome_architecture = x86 + CFLAGS = -m32 + LDFLAGS = -m32 + endif + else + # At present, platform == Vanilla is used for Kirkwood, x86 and x64 Posix builds. + platform ?= Vanilla + ifneq (,$(findstring Qnap,$(platform))) + detected_openhome_system = Qnap +- else ifneq (,$(findstring linux,$(gcc_machine))) ++ else ifneq (,$(findstring linux,$(cc_machine))) + detected_openhome_system = Linux + endif +- ifneq (,$(findstring arm,$(gcc_machine))) +- ifneq (,$(findstring linux-gnueabihf,$(gcc_machine))) ++ ifneq (,$(findstring arm,$(cc_machine))) ++ ifneq (,$(findstring linux-gnueabihf,$(cc_machine))) + detected_openhome_architecture = armhf + else ifeq (${detected_openhome_system},Qnap) + detected_openhome_architecture = x19 + else + detected_openhome_architecture = armel + endif + endif +- ifneq (,$(findstring i686,$(gcc_machine))) ++ ifneq (,$(findstring i686,$(cc_machine))) + detected_openhome_architecture = x86 + endif +- ifneq (,$(findstring i586,$(gcc_machine))) ++ ifneq (,$(findstring i586,$(cc_machine))) + detected_openhome_architecture = x86 + endif +- ifneq (,$(findstring i486,$(gcc_machine))) ++ ifneq (,$(findstring i486,$(cc_machine))) + detected_openhome_architecture = x86 + endif +- ifneq (,$(findstring i386,$(gcc_machine))) ++ ifneq (,$(findstring i386,$(cc_machine))) + detected_openhome_architecture = x86 + endif +- ifneq (,$(findstring amd64,$(gcc_machine))) ++ ifneq (,$(findstring amd64,$(cc_machine))) + detected_openhome_architecture = x64 + endif +- ifneq (,$(findstring x86_64,$(gcc_machine))) ++ ifneq (,$(findstring x86_64,$(cc_machine))) + detected_openhome_architecture = x64 + endif +- ifneq (,$(findstring mipsel,$(gcc_machine))) ++ ifneq (,$(findstring mipsel,$(cc_machine))) + detected_openhome_architecture = mipsel + endif +- ifneq (,$(findstring mips,$(gcc_machine))) ++ ifneq (,$(findstring mips,$(cc_machine))) + detected_openhome_architecture = mipsel + endif +- ifneq (,$(findstring aarch64,$(gcc_machine))) ++ ifneq (,$(findstring aarch64,$(cc_machine))) + detected_openhome_architecture = arm64 + endif +- ifneq (,$(findstring riscv64,$(gcc_machine))) ++ ifneq (,$(findstring riscv64,$(cc_machine))) + detected_openhome_architecture = riscv64 + endif + endif + + detected_openhome_system ?= Unknown + detected_openhome_architecture ?= Unknown + + ifneq (${openhome_system},) + ifneq (${openhome_system},${detected_openhome_system}) + $(warning Detected compiler is for system ${detected_openhome_system} but expected ${openhome_system}. Build will probably fail.) +@@ -208,83 +208,89 @@ ifeq ($(platform),Mac) + openhome_architecture = x64 + else + # building for arm64 + platform_cflags = -DPLATFORM_MACOSX_GNU -arch arm64 -mmacosx-version-min=11 + platform_linkflags = -arch arm64 -framework CoreFoundation -framework SystemConfiguration -framework IOKit + osbuilddir = Mac-arm64 + openhome_architecture = arm64 + endif + + objdir = Build/Obj/$(osbuilddir)/$(build_dir)/ +- compiler = clang -fPIC -stdlib=libc++ -o $(objdir) ++ compiler = clang -fPIC -Qunused-arguments -stdlib=libc++ -o $(objdir) + link = clang++ -pthread -stdlib=libc++ $(platform_linkflags) + ar = ar rc $(objdir) + openhome_system = Mac + + dotnetRuntime = osx-x64 + endif + + ifeq ($(platform), Core-ppc32) + # platform == Core1 + openhome_system = Core + openhome_architecture = ppc32 + endian = BIG + platform_cflags = -mcpu=405 + platform_linkflags = -mcpu=405 ${CROSS_LINKFLAGS} + linkopts_ohNet = + osdir = Core + osbuilddir = Core-ppc32 + objdir = Build/Obj/$(osbuilddir)/$(build_dir)/ + native_only = yes +- compiler = ${CROSS_COMPILE}gcc -o $(objdir) +- link = ${CROSS_COMPILE}g++ $(platform_linkflags) ++ compiler = ${CROSS_COMPILE}$(CC) -o $(objdir) ++ link = ${CROSS_COMPILE}$(CXX) $(platform_linkflags) + ar = ${CROSS_COMPILE}ar rc $(objdir) + endif + + ifeq ($(platform), Core-armv6) + # platform == Core2 + openhome_system = Core + openhome_architecture = armv6 + endian = LITTLE + platform_cflags = -mcpu=arm926ej-s -Wno-psabi + platform_linkflags = -mcpu=arm926ej-s ${CROSS_LINKFLAGS} + linkopts_ohNet = + osdir = Core + osbuilddir = Core-armv6 + objdir = Build/Obj/$(osbuilddir)/$(build_dir)/ + native_only = yes +- compiler = ${CROSS_COMPILE}gcc -o $(objdir) +- link = ${CROSS_COMPILE}g++ $(platform_linkflags) ++ compiler = ${CROSS_COMPILE}$(CC) -o $(objdir) ++ link = ${CROSS_COMPILE}$(CXX) $(platform_linkflags) + ar = ${CROSS_COMPILE}ar rc $(objdir) + endif + + ifneq (,$(findstring $(platform),Vanilla Qnap-x86 Qnap-x19 Linux-ppc32)) + ifeq ($(gcc4_1), yes) + version_specific_cflags = ${CROSS_COMPILE_CFLAGS} + version_specific_cflags_third_party = -Wno-non-virtual-dtor + version_specific_java_cflags = -Wstrict-aliasing=0 + else +- gcc_min_ver = $(shell ${CROSS_COMPILE}gcc -dumpversion | cut -f2 -d'.') +- version_specific_cflags = $(shell if [ $(gcc_min_ver) -ge 6 ]; then echo '-Wno-psabi'; fi) ++ version_specific_cflags = ++ ifeq ($(CC), gcc) ++ gcc_min_ver = $(shell ${CROSS_COMPILE}gcc -dumpversion | cut -f2 -d'.') ++ gcc_ge_6 = $(shell if [ $(gcc_min_ver) -ge 6 ]; then echo 'yes'; fi) ++ ifeq ($(gcc_ge_6), yes) ++ version_specific_cflags = '-Wno-psabi' ++ endif ++ endif + version_specific_cflags += ${CROSS_COMPILE_CFLAGS} + version_specific_cflags_third_party = + version_specific_java_cflags = + endif + + version_specific_linkflags = ${CROSS_COMPILE_LINKFLAGS} + version_specific_library_path = ${CROSS_COMPILE_LIBRARY_PATH} + version_specific_includes = ${CROSS_COMPILE_INCLUDES} + + # Continuing with the non-Darwin settings... + objdir = Build/Obj/$(osdir)/$(build_dir)/ +- compiler = ${CROSS_COMPILE}gcc -o $(objdir) +- link = $(version_specific_library_path) ${CROSS_COMPILE}g++ $(platform_linkflags) ++ compiler = ${CROSS_COMPILE}$(CC) -o $(objdir) ++ link = $(version_specific_library_path) ${CROSS_COMPILE}$(CXX) $(platform_linkflags) + ar = $(version_specific_library_path) ${CROSS_COMPILE}ar rc $(objdir) + endif + + ifeq ($(platform), FreeBSD) + platform_cflags = $(version_specific_cflags) -fPIC -DPLATFORM_FREEBSD + platform_linkflags = $(version_specific_linkflags) -pthread + linkopts_ohNet = -Wl,-soname,libohNet.so + osbuilddir = Posix + objdir = Build/Obj/$(osbuilddir)/$(build_dir)/ + osdir = Posix +@@ -351,25 +357,25 @@ $(info Building for system ${openhome_system} and architecture ${openhome_archit + + + # Macros used by Common.mak + native_only ?= no + managed_only ?= no + no_shared_objects ?= no + endian ?= LITTLE + cflags_base = $(CFLAGS) -fexceptions -Wall $(version_specific_cflags_third_party) -pipe -D_GNU_SOURCE -D_REENTRANT -DDEFINE_$(endian)_ENDIAN -DDEFINE_TRACE $(debug_specific_cflags) -fvisibility=hidden $(platform_cflags) + cflags_third_party = $(cflags_base) -Wno-int-to-pointer-cast + ifeq ($(nocpp11), yes) +- cppflags = $(cflags_base) -Werror ++ cppflags = $(CPPFLAGS) $(cflags_base) -Werror + else ifeq ($(platform),Mac) +- cppflags = $(cflags_base) -std=c++11 -Werror ++ cppflags = $(CPPFLAGS) $(cflags_base) -std=c++11 -Werror + else +- cppflags = $(cflags_base) -std=c++0x -Werror ++ cppflags = $(CPPFLAGS) $(cflags_base) -std=c++0x -Werror + endif + cflags = $(cflags_base) -Werror + inc_build = Build/Include + includes = -IBuild/Include/ $(version_specific_includes) + bundle_build = Build/Bundles + mDNSdir = Build/mDNS + osdir ?= Posix + objext = o + libprefix = lib + libext = a +@@ -383,21 +389,21 @@ else + endif + exeext = elf + linkoutput = -o + dllprefix = lib + ifeq ($(platform), iOS) + link_dll = $(toolroot)/clang++ -pthread -shared -stdlib=libc++ $(platform_linkflags) + else ifeq ($(MACHINE), Darwin) + link_dll = $(version_specific_library_path) clang++ -pthread $(platform_linkflags) -shared -stdlib=libc++ + else + CROSS_COMPILE_LIBGCC ?= -shared-libgcc +- link_dll = $(version_specific_library_path) ${CROSS_COMPILE}g++ -pthread $(platform_linkflags) -shared ${CROSS_COMPILE_LIBGCC} ++ link_dll = $(version_specific_library_path) ${CROSS_COMPILE}$(CXX) -pthread $(platform_linkflags) -shared ${CROSS_COMPILE_LIBGCC} + endif + + csharp = mcs /nologo $(debug_csharp) + + csharpdefines ?= + publicjavadir = OpenHome/Net/Bindings/Java/ + + ifeq ($(platform), Mac) + platform_java_cflags = -Wno-self-assign + # arm64 builds need JAVA_HOME to be set because the Mac SDK for arm64 doesn't contain Java includes or dylibs +@@ -409,24 +415,24 @@ ifeq ($(platform), Mac) + link_jvm = ${MACOSX_SDK}/System/Library/Frameworks/JavaVM.framework/JavaVM + endif + javac = /usr/bin/javac + jar = /usr/bin/jar + else + platform_java_cflags = + includes_jni = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux + ifeq ($(platform), Linux-ppc32) + libjvm_dir ?= $(JAVA_HOME)/jre/lib/ppc/server + else +- ifneq (,$(findstring arm,$(gcc_machine))) ++ ifneq (,$(findstring arm,$(cc_machine))) + libjvm_dir ?= $(JAVA_HOME)/jre/lib/arm/server + else +- ifneq (,$(findstring x64,$(gcc_machine))) ++ ifneq (,$(findstring x64,$(cc_machine))) + libjvm_dir ?= $(JAVA_HOME)/jre/lib/amd64/server + else + libjvm_dir ?= $(JAVA_HOME)/jre/lib/i386/server + endif + endif + endif + link_jvm = $(libjvm_dir)/libjvm.so + javac = $(JAVA_HOME)/bin/javac + jar = $(JAVA_HOME)/bin/jar + endif diff --git a/recipes/ohnet/all/test_package/conanfile.py b/recipes/ohnet/all/test_package/conanfile.py index a9fb96656f203..08478d9835129 100644 --- a/recipes/ohnet/all/test_package/conanfile.py +++ b/recipes/ohnet/all/test_package/conanfile.py @@ -9,6 +9,9 @@ class TestPackageConan(ConanFile): generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" test_type = "explicit" + def build_requirements(self): + self.tool_requires("cmake/[>3.23 <4]") + def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/ohnet/config.yml b/recipes/ohnet/config.yml index e45e8eaf9a346..89da0e2089324 100644 --- a/recipes/ohnet/config.yml +++ b/recipes/ohnet/config.yml @@ -3,3 +3,5 @@ versions: folder: all "1.36.5182": folder: all + "1.37.5454": + folder: all diff --git a/recipes/ohpipeline/all/conandata.yml b/recipes/ohpipeline/all/conandata.yml index 22671b2e2dbe7..a9fa8d1a7bd8f 100644 --- a/recipes/ohpipeline/all/conandata.yml +++ b/recipes/ohpipeline/all/conandata.yml @@ -6,8 +6,15 @@ sources: cmake: url: "https://raw.githubusercontent.com/merakiacoustic/ohPipeline/ohMediaPlayer_1.139.1000_meraki3/CMakeLists.txt" sha256: "4ebe83cf0419802f42d9d9c7ff36c666bd1094415eb29c77927273753019a202" + "1.155.1133": + source: + url: "https://github.com/openhome/ohPipeline/archive/refs/tags/ohMediaPlayer_1.155.1133.tar.gz" + sha256: "507bdf70fc6b9bf8e4605546a5c7ae99abbe537cce4b74b3e091764323939fae" + cmake: + url: "https://raw.githubusercontent.com/merakiacoustic/ohPipeline/ohMediaPlayer_1.155.1133_meraki2/CMakeLists.txt" + sha256: "0f8701552c2b3331edeedde4c3a1b8120dc419d493f6a2e05b21c9045729d6ff" patches: "1.139.1000": - - patch_file: "patches/001-missing-include.patch" + - patch_file: "patches/0001-missing-include.patch" patch_type: "portability" patch_description: "Add a missing stdlib include" diff --git a/recipes/ohpipeline/all/conanfile.py b/recipes/ohpipeline/all/conanfile.py index 556004392d827..d2314dfa54789 100755 --- a/recipes/ohpipeline/all/conanfile.py +++ b/recipes/ohpipeline/all/conanfile.py @@ -48,7 +48,7 @@ def build_requirements(self): self.tool_requires("cmake/[>3.23 <4]") def requirements(self): - self.requires("ohnet/1.36.5182", transitive_headers=True, transitive_libs=True) + self.requires("ohnet/1.37.5454", transitive_headers=True, transitive_libs=True) self.requires("openssl/[>=1.1 <4]") self.requires("libmad/0.15.1b") self.requires("alac/cci.20121212") diff --git a/recipes/ohpipeline/all/patches/001-missing-include.patch b/recipes/ohpipeline/all/patches/0001-missing-include.patch similarity index 100% rename from recipes/ohpipeline/all/patches/001-missing-include.patch rename to recipes/ohpipeline/all/patches/0001-missing-include.patch diff --git a/recipes/ohpipeline/config.yml b/recipes/ohpipeline/config.yml index 4948dbd895802..12fa634205705 100644 --- a/recipes/ohpipeline/config.yml +++ b/recipes/ohpipeline/config.yml @@ -1,3 +1,5 @@ versions: "1.139.1000": folder: all + "1.155.1133": + folder: all diff --git a/recipes/onnx/all/conandata.yml b/recipes/onnx/all/conandata.yml index 0ac824c98a00d..a143774132c75 100644 --- a/recipes/onnx/all/conandata.yml +++ b/recipes/onnx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.16.2": + url: "https://github.com/onnx/onnx/archive/v1.16.2.tar.gz" + sha256: "84fc1c3d6133417f8a13af6643ed50983c91dacde5ffba16cc8bb39b22c2acbb" "1.16.1": url: "https://github.com/onnx/onnx/archive/v1.16.1.tar.gz" sha256: "0e6aa2c0a59bb2d90858ad0040ea1807117cc2f05b97702170f18e6cd6b66fb3" diff --git a/recipes/onnx/all/conanfile.py b/recipes/onnx/all/conanfile.py index 02c220e3798ce..0032d4c6de8cd 100644 --- a/recipes/onnx/all/conanfile.py +++ b/recipes/onnx/all/conanfile.py @@ -32,7 +32,7 @@ class OnnxConan(ConanFile): default_options = { "shared": False, "fPIC": True, - "disable_static_registration": False, + "disable_static_registration": True, } @property diff --git a/recipes/onnx/config.yml b/recipes/onnx/config.yml index 9f508d50a4d4b..62dc832f13021 100644 --- a/recipes/onnx/config.yml +++ b/recipes/onnx/config.yml @@ -1,4 +1,6 @@ versions: + "1.16.2": + folder: all "1.16.1": folder: all "1.16.0": diff --git a/recipes/onnxruntime/all/cmake/onnxruntime_external_deps.cmake b/recipes/onnxruntime/all/cmake/onnxruntime_external_deps.cmake new file mode 100644 index 0000000000000..8cacf5636fe36 --- /dev/null +++ b/recipes/onnxruntime/all/cmake/onnxruntime_external_deps.cmake @@ -0,0 +1,112 @@ +# Replacement for https://github.com/microsoft/onnxruntime/blob/v1.16.1/cmake/external/onnxruntime_external_deps.cmake + +if(NOT onnxruntime_DISABLE_ABSEIL) + find_package(absl REQUIRED CONFIG) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES abseil::abseil) + include_directories(${absl_INCLUDE_DIRS}) +endif() + +find_package(re2 REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES re2::re2) + +#flatbuffers 1.11.0 does not have flatbuffers::IsOutRange, therefore we require 1.12.0+ +find_package(Flatbuffers REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES flatbuffers::flatbuffers) + +find_package(Protobuf REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES protobuf::libprotobuf) +set(ONNX_CUSTOM_PROTOC_EXECUTABLE protoc) +set(PROTOC_EXECUTABLE protoc) + +find_package(date REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES date::date) +include_directories(${date_INCLUDE_DIRS}) +add_library(date_interface INTERFACE) + +find_package(Boost REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES Boost::mp11) + +find_package(nlohmann_json REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES nlohmann_json::nlohmann_json) + +find_package(cpuinfo REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::cpuinfo) +if (TARGET cpuinfo::clog) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::clog) +endif() +set(CPUINFO_SUPPORTED ${cpuinfo_FOUND}) +# Add a dummy targets for onnxruntime CMakelists.txt to depend on +add_library(clog INTERFACE) +add_library(cpuinfo INTERFACE) + +if (NOT WIN32) + find_package(nsync REQUIRED CONFIG) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES nsync::nsync_cpp) + include_directories(${nsync_INCLUDE_DIRS}) + add_library(nsync_cpp INTERFACE) +endif() + +find_package(Microsoft.GSL 4.0 REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES Microsoft.GSL::GSL) +include_directories(${Microsoft.GSL_INCLUDE_DIRS}) + +find_package(safeint REQUIRED CONFIG) +include_directories(${safeint_INCLUDE_DIRS}) +add_library(safeint_interface INTERFACE) + +find_package(ONNX REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES onnx onnx_proto) + +find_package(Eigen3 REQUIRED CONFIG) +list(APPEND onnxruntime_EXTERNAL_LIBRARIES Eigen3::Eigen) +set(eigen_INCLUDE_DIRS ${Eigen3_INCLUDE_DIRS}) + +if(WIN32) + find_package(wil REQUIRED CONFIG) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES WIL::WIL) + include_directories(${wil_INCLUDE_DIRS}) +endif() + +# XNNPACK EP +if (onnxruntime_USE_XNNPACK) + if (onnxruntime_DISABLE_CONTRIB_OPS) + message(FATAL_ERROR "XNNPACK EP requires the internal NHWC contrib ops to be available " + "but onnxruntime_DISABLE_CONTRIB_OPS is ON") + endif() + find_package(xnnpack REQUIRED CONFIG) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES xnnpack::xnnpack) + add_library(XNNPACK INTERFACE) +endif() + +if (onnxruntime_USE_MIMALLOC) + find_package(mimalloc REQUIRED CONFIG) + add_definitions(-DUSE_MIMALLOC) +endif() + +# The source code of onnx_proto is generated, we must build this lib first before starting to compile the other source code that uses ONNX protobuf types. +# The other libs do not have the problem. All the sources are already there. We can compile them in any order. +set(onnxruntime_EXTERNAL_DEPENDENCIES + onnx_proto + flatbuffers::flatbuffers +) + +if (onnxruntime_RUN_ONNX_TESTS) + add_definitions(-DORT_RUN_EXTERNAL_ONNX_TESTS) +endif() + +if(onnxruntime_ENABLE_ATEN) + message("Aten fallback is enabled.") + find_package(dlpack REQUIRED CONFIG) +endif() + +if(onnxruntime_ENABLE_TRAINING OR (onnxruntime_ENABLE_TRAINING_APIS AND onnxruntime_BUILD_UNIT_TESTS)) + find_package(cxxopts REQUIRED CONFIG) +endif() + +if(onnxruntime_USE_SNPE) + include(external/find_snpe.cmake) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES ${SNPE_NN_LIBS}) +endif() + +file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} ORT_BINARY_DIR) +file(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} ORT_SOURCE_DIR) diff --git a/recipes/onnxruntime/all/conandata.yml b/recipes/onnxruntime/all/conandata.yml index b051b06768621..5ad665fd49f79 100644 --- a/recipes/onnxruntime/all/conandata.yml +++ b/recipes/onnxruntime/all/conandata.yml @@ -1,16 +1,13 @@ sources: + "1.18.1": + url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.18.1.tar.gz" + sha256: "480ff5d2450ff18d02db48908c9c0c6a602993942cb47866b8effe32d0469a2c" + "1.17.3": + url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.17.3.tar.gz" + sha256: "4112f6552c17216311be013b9a2621a3c1a17ed9e1268a1142599b6a494517c2" "1.16.3": url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.16.3.tar.gz" sha256: "d26b8a7eed1df4440aa3d8eac5049980cbe585514ccedfda809712051a4b1721" - "1.16.2": - url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.16.2.tar.gz" - sha256: "609a9d31fd9445eb2e737cbb6420100fa7d4e1180b594c1a62505b26f730bfd5" - "1.16.1": - url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.16.1.tar.gz" - sha256: "197c6ce4f2de9176402fb8a634c390e757b729ff48a30e8038a0f7d71ff1f1ae" - "1.16.0": - url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.16.0.tar.gz" - sha256: "3a4e57d454bce4349e11e2262fc47728a78b86ef1e0754514bbbc7d709e0a80d" "1.15.1": url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.15.1.tar.gz" sha256: "93a9b6f148639938ccbaa48d0f641d8f33312fdfcc69ee9466e11362b43917c4" @@ -18,49 +15,46 @@ sources: url: "https://github.com/microsoft/onnxruntime/archive/refs/tags/v1.14.1.tar.gz" sha256: "f998352b131bb89fa7dd1f1d87ddbafe647dfaddd11929b6b5168b3f4ef857de" patches: - "1.16.3": - - patch_file: "patches/1.16.0-0001-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" - - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" - patch_description: "allow to build with abseil built without c++17 support" + "1.18.1": + - patch_file: "patches/1.17.3-0002-missing-include.patch" + patch_description: "add missing '' include when abseil is built without c++17 support" patch_type: "portability" - "1.16.2": - - patch_file: "patches/1.16.0-0001-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" - - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" + - patch_file: "patches/1.18.0-0004-abseil-no-string-view.patch" patch_description: "allow to build with abseil built without c++17 support" patch_type: "portability" - "1.16.1": - - patch_file: "patches/1.16.0-0001-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" + - patch_file: "patches/1.18.1-0005-fix-cutlass-cuda-provider.patch" + patch_description: "use cutlass from Conan" + patch_type: "portability" + "1.17.3": + - patch_file: "patches/1.17.3-0001-patch-macos-cpp20-date-compat.patch" + patch_description: "allow to build with macos c++20 support" + patch_type: "portability" + patch_source: "https://github.com/microsoft/onnxruntime/commit/7303a90f4916dcf6f66236d40b8917344c27420a.patch" + - patch_file: "patches/1.17.3-0002-missing-include.patch" + patch_description: "add missing '' include when abseil is built without c++17 support" + patch_type: "portability" - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" patch_description: "allow to build with abseil built without c++17 support" patch_type: "portability" - "1.16.0": - - patch_file: "patches/1.16.0-0001-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" + - patch_file: "patches/1.17.3-0003-fix-cutlass-cuda-provider.patch" + patch_description: "use cutlass from Conan" + patch_type: "portability" + "1.16.3": - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" patch_description: "allow to build with abseil built without c++17 support" patch_type: "portability" "1.15.1": - - patch_file: "patches/1.15.1-0001-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" - patch_file: "patches/1.14.1-0004-abseil-no-string-view.patch" patch_description: "allow to build with abseil built without c++17 support" patch_type: "portability" + - patch_file: "patches/1.15.1-0002-fix-attention-15983.patch" + patch_description: "Fix attention.cc" + patch_source: "https://github.com/microsoft/onnxruntime/pull/15983" + patch_type: "backport" "1.14.1": - patch_file: "patches/1.14.1-0001-cmake-dependencies.patch" patch_description: "CMake: ensure conan dependencies are used (upstreamed future versions)" patch_type: "conan" - patch_source: "https://github.com/microsoft/onnxruntime/pull/15323" - - patch_file: "patches/1.14.1-0002-cmake-dependencies.patch" - patch_description: "CMake: ensure conan dependencies are used" - patch_type: "conan" - patch_file: "patches/1.14.1-0003-amx-gas-version.patch" patch_description: "Check GNU AS supports AMX before enabling it" patch_type: "portability" @@ -72,3 +66,12 @@ patches: patch_description: "Ensures the forward compatibility with the newest versions of re2 library." patch_type: "portability" patch_source: "https://github.com/microsoft/onnxruntime/commit/126e7bf15fa4af8621814b82a3f7bd0d786f0239.patch" + +# ONNX versions are based on the minor version used at +# https://github.com/microsoft/onnxruntime/tree/main/cmake/external +onnx_version_map: + "1.18.1": "1.16.2" + "1.17.3": "1.15.0" + "1.16.3": "1.14.1" + "1.15.1": "1.14.1" + "1.14.1": "1.13.1" diff --git a/recipes/onnxruntime/all/conanfile.py b/recipes/onnxruntime/all/conanfile.py index 45cbfde117d6f..ce3b31cb93581 100644 --- a/recipes/onnxruntime/all/conanfile.py +++ b/recipes/onnxruntime/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os 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.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.env import VirtualBuildEnv @@ -27,16 +27,20 @@ class OnnxRuntimeConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "with_xnnpack": [True, False], + "with_cuda": [True, False], } default_options = { "shared": False, "fPIC": True, "with_xnnpack": False, + "with_cuda": False, } short_paths = True @property def _min_cppstd(self): + if is_apple_os(self) and Version(self.version) >= "1.17.0": + return 20 # https://github.com/microsoft/onnxruntime/blob/8f5c79cb63f09ef1302e85081093a3fe4da1bc7d/cmake/CMakeLists.txt#L43-L47 return 17 @property @@ -59,6 +63,7 @@ def _compilers_minimum_version(self): def export_sources(self): export_conandata_patches(self) + copy(self, "cmake/*", src=self.recipe_folder, dst=self.export_sources_folder) def config_options(self): if self.settings.os == "Windows": @@ -67,38 +72,46 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + # onnxruntime forces this to be True + # https://github.com/microsoft/onnxruntime/blob/be76e1e1b8e2914e448d12a0cc683c00014c0490/cmake/external/onnxruntime_external_deps.cmake#L542 + self.options["onnx"].disable_static_registration = True def layout(self): cmake_layout(self, src_folder="src") - @property - def _onnx_version(self): - version = Version(self.version) - return { - "1.14": "1.13.1", - "1.15": "1.14.1", - "1.16": "1.14.1", - }[f"{version.major}.{version.minor}"] - def requirements(self): - self.requires("abseil/20230802.1") + required_onnx_version = self.conan_data["onnx_version_map"][self.version] + self.requires(f"onnx/{required_onnx_version}") + self.requires("abseil/20240116.1") self.requires("protobuf/3.21.12") self.requires("date/3.0.1") - self.requires("re2/20230901") - self.requires(f"onnx/{self._onnx_version}") - self.requires("flatbuffers/1.12.0") - self.requires("boost/1.83.0", headers=True, libs=False, run=False) # for mp11, header only, no need for libraries to link/run + self.requires("re2/20231101") + if Version(self.version) >= "1.18": + self.requires("flatbuffers/23.5.26") + else: + # v1.* is required, newer versions are not compatible + self.requires("flatbuffers/1.12.0") + # using 1.84.0+ fails on CCI as it prevents the cpp 17 version to be picked up when building with cpp 20 + self.requires("boost/1.83.0", headers=True, libs=False) # for mp11, header only, no need for libraries self.requires("safeint/3.0.28") self.requires("nlohmann_json/3.11.3") self.requires("eigen/3.4.0") self.requires("ms-gsl/4.0.0") - self.requires("cpuinfo/cci.20220618") + if Version(self.version) >= "1.17.0": + self.requires("cpuinfo/cci.20231129") + else: + self.requires("cpuinfo/cci.20220618") # Newer versions are not compatible if self.settings.os != "Windows": self.requires("nsync/1.26.0") else: - self.requires("wil/1.0.231216.1") + self.requires("wil/1.0.240803.1") if self.options.with_xnnpack: - self.requires("xnnpack/cci.20220801") + if Version(self.version) >= "1.17.0": + self.requires("xnnpack/cci.20230715") + else: + self.requires("xnnpack/cci.20220801") + if self.options.with_cuda: + self.requires("cutlass/3.5.0") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -108,17 +121,23 @@ def validate(self): raise ConanInvalidConfiguration( f"{self.ref} requires minimum compiler version {minimum_version}." ) + if not self.dependencies["onnx"].options.disable_static_registration: + raise ConanInvalidConfiguration( + f"{self.ref} requires onnx compiled with `-o onnx:disable_static_registration=True`." + ) def validate_build(self): if self.version >= Version("1.15.0") and self.options.shared and sys.version_info[:2] < (3, 8): # https://github.com/microsoft/onnxruntime/blob/638146b79ea52598ece514704d3f592c10fab2f1/cmake/CMakeLists.txt#LL500C12-L500C12 raise ConanInvalidConfiguration( - f"{self.ref} requires python 3.8+ to be built as shared." + f"{self.ref} requires Python 3.8+ to be built as shared." ) + if self.settings.os == "Windows" and self.dependencies["abseil"].options.shared: + raise ConanInvalidConfiguration("Using abseil shared on Windows leads to link errors.") def build_requirements(self): - # Required by upstream https://github.com/microsoft/onnxruntime/blob/v1.14.1/cmake/CMakeLists.txt#L5 - self.tool_requires("cmake/[>=3.24 <4]") + # Required by upstream https://github.com/microsoft/onnxruntime/blob/v1.16.1/cmake/CMakeLists.txt#L5 + self.tool_requires("cmake/[>=3.26 <4]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -128,102 +147,60 @@ def generate(self): # disable downloading dependencies to ensure conan ones are used tc.variables["FETCHCONTENT_FULLY_DISCONNECTED"] = True if self.version >= Version("1.15.0") and self.options.shared: - # Need to replace windows path seperators with linux path seperators to keep CMake from crashing + # Need to replace windows path separators with linux path separators to keep CMake from crashing tc.variables["Python_EXECUTABLE"] = sys.executable.replace("\\", "/") tc.variables["onnxruntime_BUILD_SHARED_LIB"] = self.options.shared tc.variables["onnxruntime_USE_FULL_PROTOBUF"] = not self.dependencies["protobuf"].options.lite tc.variables["onnxruntime_USE_XNNPACK"] = self.options.with_xnnpack + tc.variables["onnxruntime_USE_CUDA"] = self.options.with_cuda tc.variables["onnxruntime_BUILD_UNIT_TESTS"] = False - tc.variables["onnxruntime_RUN_ONNX_TESTS"] = False - tc.variables["onnxruntime_GENERATE_TEST_REPORTS"] = False - tc.variables["onnxruntime_USE_MIMALLOC"] = False - tc.variables["onnxruntime_ENABLE_PYTHON"] = False - tc.variables["onnxruntime_BUILD_CSHARP"] = False - tc.variables["onnxruntime_BUILD_JAVA"] = False - tc.variables["onnxruntime_BUILD_NODEJS"] = False - tc.variables["onnxruntime_BUILD_OBJC"] = False - tc.variables["onnxruntime_BUILD_APPLE_FRAMEWORK"] = False - tc.variables["onnxruntime_USE_DNNL"] = False - tc.variables["onnxruntime_USE_NNAPI_BUILTIN"] = False - tc.variables["onnxruntime_USE_RKNPU"] = False - tc.variables["onnxruntime_USE_LLVM"] = False - tc.variables["onnxruntime_ENABLE_MICROSOFT_INTERNAL"] = False - tc.variables["onnxruntime_USE_VITISAI"] = False - tc.variables["onnxruntime_USE_TENSORRT"] = False - tc.variables["onnxruntime_SKIP_AND_PERFORM_FILTERED_TENSORRT_TESTS"] = True - tc.variables["onnxruntime_USE_TENSORRT_BUILTIN_PARSER"] = False - tc.variables["onnxruntime_TENSORRT_PLACEHOLDER_BUILDER"] = False - tc.variables["onnxruntime_USE_TVM"] = False - tc.variables["onnxruntime_TVM_CUDA_RUNTIME"] = False - tc.variables["onnxruntime_TVM_USE_HASH"] = False - tc.variables["onnxruntime_CROSS_COMPILING"] = False tc.variables["onnxruntime_DISABLE_CONTRIB_OPS"] = False - tc.variables["onnxruntime_DISABLE_ML_OPS"] = False + tc.variables["onnxruntime_USE_FLASH_ATTENTION"] = False tc.variables["onnxruntime_DISABLE_RTTI"] = False tc.variables["onnxruntime_DISABLE_EXCEPTIONS"] = False - tc.variables["onnxruntime_MINIMAL_BUILD"] = False - tc.variables["onnxruntime_EXTENDED_MINIMAL_BUILD"] = False - tc.variables["onnxruntime_MINIMAL_BUILD_CUSTOM_OPS"] = False - tc.variables["onnxruntime_REDUCED_OPS_BUILD"] = False - tc.variables["onnxruntime_ENABLE_LANGUAGE_INTEROP_OPS"] = False - tc.variables["onnxruntime_USE_DML"] = False - tc.variables["onnxruntime_USE_WINML"] = False - tc.variables["onnxruntime_BUILD_MS_EXPERIMENTAL_OPS"] = False - tc.variables["onnxruntime_USE_TELEMETRY"] = False - tc.variables["onnxruntime_ENABLE_LTO"] = False - tc.variables["onnxruntime_USE_ACL"] = False - tc.variables["onnxruntime_USE_ACL_1902"] = False - tc.variables["onnxruntime_USE_ACL_1905"] = False - tc.variables["onnxruntime_USE_ACL_1908"] = False - tc.variables["onnxruntime_USE_ACL_2002"] = False - tc.variables["onnxruntime_USE_ARMNN"] = False + tc.variables["onnxruntime_ARMNN_RELU_USE_CPU"] = False tc.variables["onnxruntime_ARMNN_BN_USE_CPU"] = False - tc.variables["onnxruntime_ENABLE_NVTX_PROFILE"] = False - tc.variables["onnxruntime_ENABLE_TRAINING"] = False - tc.variables["onnxruntime_ENABLE_TRAINING_OPS"] = False - tc.variables["onnxruntime_ENABLE_TRAINING_APIS"] = False tc.variables["onnxruntime_ENABLE_CPU_FP16_OPS"] = False - tc.variables["onnxruntime_USE_NCCL"] = False - tc.variables["onnxruntime_BUILD_BENCHMARKS"] = False - tc.variables["onnxruntime_USE_ROCM"] = False - tc.variables["onnxruntime_GCOV_COVERAGE"] = False - tc.variables["onnxruntime_USE_MPI"] = False - tc.variables["onnxruntime_ENABLE_MEMORY_PROFILE"] = False - tc.variables["onnxruntime_ENABLE_CUDA_LINE_NUMBER_INFO"] = False - tc.variables["onnxruntime_BUILD_WEBASSEMBLY"] = False - tc.variables["onnxruntime_BUILD_WEBASSEMBLY_STATIC_LIB"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_CATCHING"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_API_EXCEPTION_CATCHING"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_THROWING"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_THREADS"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO"] = False - tc.variables["onnxruntime_ENABLE_WEBASSEMBLY_PROFILING"] = False tc.variables["onnxruntime_ENABLE_EAGER_MODE"] = False tc.variables["onnxruntime_ENABLE_LAZY_TENSOR"] = False - tc.variables["onnxruntime_ENABLE_EXTERNAL_CUSTOM_OP_SCHEMAS"] = False - tc.variables["onnxruntime_ENABLE_CUDA_PROFILING"] = False - tc.variables["onnxruntime_ENABLE_ROCM_PROFILING"] = False - tc.variables["onnxruntime_USE_CANN"] = False - tc.generate() - deps = CMakeDeps(self) - if self.dependencies["flatbuffers"].options.shared: - deps.set_property("flatbuffers", "cmake_target_name", "flatbuffers::flatbuffers") + if Version(self.version) >= "1.17": + tc.variables["onnxruntime_ENABLE_CUDA_EP_INTERNAL_TESTS"] = False + tc.variables["onnxruntime_USE_NEURAL_SPEED"] = False + tc.variables["onnxruntime_USE_MEMORY_EFFICIENT_ATTENTION"] = False - deps.set_property("boost::headers", "cmake_target_name", "Boost::mp11") - deps.set_property("date", "cmake_target_name", "date_interface") - deps.set_property("safeint", "cmake_target_name", "safeint_interface") - deps.set_property("xnnpack", "cmake_target_name", "XNNPACK") + # Disable a warning that gets converted to an error + tc.preprocessor_definitions["_SILENCE_ALL_CXX23_DEPRECATION_WARNINGS"] = "1" + tc.generate() + deps = CMakeDeps(self) + deps.set_property("boost::headers", "cmake_target_name", "Boost::mp11") + deps.set_property("flatbuffers", "cmake_target_name", "flatbuffers::flatbuffers") deps.generate() + vbe = VirtualBuildEnv(self) vbe.generate(scope="build") - def build(self): + def _patch_sources(self): apply_conandata_patches(self) + copy(self, "onnxruntime_external_deps.cmake", + src=os.path.join(self.export_sources_folder, "cmake"), + dst=os.path.join(self.source_folder, "cmake", "external")) + # Avoid parsing of git commit info + if Version(self.version) >= "15.0": + replace_in_file(self, os.path.join(self.source_folder, "cmake", "CMakeLists.txt"), + "if (Git_FOUND)", "if (FALSE)") + if Version(self.version) >= "1.17": + # https://github.com/microsoft/onnxruntime/commit/5bfca1dc576720627f3af8f65e25af408271079b + replace_in_file(self, os.path.join(self.source_folder, "cmake", "onnxruntime_providers_cuda.cmake"), + 'option(onnxruntime_NVCC_THREADS "Number of threads that NVCC can use for compilation." 1)', + 'set(onnxruntime_NVCC_THREADS "1" CACHE STRING "Number of threads that NVCC can use for compilation.")') + + def build(self): + self._patch_sources() cmake = CMake(self) # https://github.com/microsoft/onnxruntime/blob/v1.14.1/cmake/CMakeLists.txt#L792 # onnxruntime is builds its targets with COMPILE_WARNING_AS_ERROR ON @@ -293,6 +270,8 @@ def package_info(self): self.cpp_info.requires.append("wil::wil") if self.options.with_xnnpack: self.cpp_info.requires.append("xnnpack::xnnpack") + if self.options.with_cuda: + self.cpp_info.requires.append("cutlass::cutlass") # https://github.com/microsoft/onnxruntime/blob/v1.16.0/cmake/CMakeLists.txt#L1759-L1763 self.cpp_info.set_property("cmake_file_name", "onnxruntime") diff --git a/recipes/onnxruntime/all/patches/1.14.1-0001-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.14.1-0001-cmake-dependencies.patch index 4af8aa88fe662..f2d83eacd7844 100644 --- a/recipes/onnxruntime/all/patches/1.14.1-0001-cmake-dependencies.patch +++ b/recipes/onnxruntime/all/patches/1.14.1-0001-cmake-dependencies.patch @@ -1,72 +1,3 @@ ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -753,7 +753,7 @@ endif() - - function(onnxruntime_set_compile_flags target_name) - if (CPUINFO_SUPPORTED) -- onnxruntime_add_include_to_target(${target_name} cpuinfo) -+ onnxruntime_add_include_to_target(${target_name} cpuinfo::cpuinfo) - endif() - if(onnxruntime_ENABLE_EAGER_MODE) - target_compile_definitions(${target_name} PRIVATE ENABLE_EAGER_MODE) -@@ -837,7 +837,7 @@ function(onnxruntime_set_compile_flags target_name) - target_compile_options(${target_name} PRIVATE "-Wno-unused-parameter") - endif() - target_compile_definitions(${target_name} PUBLIC -DNSYNC_ATOMIC_CPP11) -- target_include_directories(${target_name} PRIVATE "${google_nsync_SOURCE_DIR}/public") -+ onnxruntime_add_include_to_target(${target_name} nsync::nsync_cpp) - endif() - foreach(ORT_FLAG ${ORT_PROVIDER_FLAGS}) - target_compile_definitions(${target_name} PRIVATE ${ORT_FLAG}) -@@ -1461,7 +1461,7 @@ if (WIN32) - list(APPEND onnxruntime_EXTERNAL_LIBRARIES ${SYS_PATH_LIB}) - list(APPEND onnxruntime_EXTERNAL_LIBRARIES debug Dbghelp) - else() -- list(APPEND onnxruntime_EXTERNAL_LIBRARIES nsync_cpp) -+ list(APPEND onnxruntime_EXTERNAL_LIBRARIES nsync::nsync_cpp) - list(APPEND onnxruntime_EXTERNAL_LIBRARIES ${CMAKE_DL_LIBS} Threads::Threads) - endif() - ---- a/cmake/external/onnxruntime_external_deps.cmake -+++ b/cmake/external/onnxruntime_external_deps.cmake -@@ -237,7 +237,10 @@ if (NOT WIN32) - #nsync tests failed on Mac Build - set(NSYNC_ENABLE_TESTS OFF CACHE BOOL "" FORCE) - onnxruntime_fetchcontent_makeavailable(google_nsync) -- set(nsync_SOURCE_DIR ${google_nsync_SOURCE_DIR}) -+ if(google_nsync_SOURCE_DIR) -+ add_library(nsync::nsync_cpp ALIAS nsync_cpp) -+ target_include_directories(nsync_cpp PUBLIC ${google_nsync_SOURCE_DIR}/public) -+ endif() - endif() - - if(onnxruntime_USE_CUDA) -@@ -361,6 +364,12 @@ FetchContent_Declare( - - if (CPUINFO_SUPPORTED) - onnxruntime_fetchcontent_makeavailable(pytorch_cpuinfo) -+ if(pytorch_cpuinfo_SOURCE_DIR) -+ # shouldn't need to define these aliases after we use a version of cpuinfo with this commit: -+ # https://github.com/pytorch/cpuinfo/commit/082deffc80ce517f81dc2f3aebe6ba671fcd09c9 -+ add_library(cpuinfo::cpuinfo ALIAS cpuinfo) -+ add_library(cpuinfo::clog ALIAS clog) -+ endif() - endif() - - ---- a/cmake/onnxruntime_common.cmake -+++ b/cmake/onnxruntime_common.cmake -@@ -194,8 +194,8 @@ if (ARM64 OR ARM OR X86 OR X64 OR X86_64) - # Using it mainly in ARM with Android. - # Its functionality in detecting x86 cpu features are lacking, so is support for Windows. - if (CPUINFO_SUPPORTED) -- onnxruntime_add_include_to_target(onnxruntime_common cpuinfo) -- list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo clog) -+ onnxruntime_add_include_to_target(onnxruntime_common cpuinfo::cpuinfo) -+ list(APPEND onnxruntime_EXTERNAL_LIBRARIES cpuinfo::cpuinfo cpuinfo::clog) - endif() - endif() - endif() --- a/cmake/onnxruntime_flatbuffers.cmake +++ b/cmake/onnxruntime_flatbuffers.cmake @@ -9,7 +9,7 @@ file(GLOB onnxruntime_flatbuffers_srcs CONFIGURE_DEPENDS @@ -78,170 +9,3 @@ if(onnxruntime_ENABLE_INSTRUMENT) target_compile_definitions(onnxruntime_flatbuffers PUBLIC ONNXRUNTIME_ENABLE_INSTRUMENT) endif() ---- a/cmake/onnxruntime_providers.cmake -+++ b/cmake/onnxruntime_providers.cmake -@@ -539,10 +539,10 @@ if (onnxruntime_USE_CUDA) - - if(APPLE) - set_property(TARGET onnxruntime_providers_cuda APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker -exported_symbols_list ${ONNXRUNTIME_ROOT}/core/providers/cuda/exported_symbols.lst") -- target_link_libraries(onnxruntime_providers_cuda PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_cuda PRIVATE nsync::nsync_cpp) - elseif(UNIX) - set_property(TARGET onnxruntime_providers_cuda APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/core/providers/cuda/version_script.lds -Xlinker --gc-sections") -- target_link_libraries(onnxruntime_providers_cuda PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_cuda PRIVATE nsync::nsync_cpp) - elseif(WIN32) - set_property(TARGET onnxruntime_providers_cuda APPEND_STRING PROPERTY LINK_FLAGS "-DEF:${ONNXRUNTIME_ROOT}/core/providers/cuda/symbols.def") - else() -@@ -595,10 +595,10 @@ if (onnxruntime_USE_DNNL) - INSTALL_RPATH "@loader_path" - BUILD_WITH_INSTALL_RPATH TRUE - INSTALL_RPATH_USE_LINK_PATH FALSE) -- target_link_libraries(onnxruntime_providers_dnnl PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_dnnl PRIVATE nsync::nsync_cpp) - elseif(UNIX) - set_property(TARGET onnxruntime_providers_dnnl APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/core/providers/dnnl/version_script.lds -Xlinker --gc-sections -Xlinker -rpath=\$ORIGIN") -- target_link_libraries(onnxruntime_providers_dnnl PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_dnnl PRIVATE nsync::nsync_cpp) - elseif(WIN32) - set_property(TARGET onnxruntime_providers_dnnl APPEND_STRING PROPERTY LINK_FLAGS "-DEF:${ONNXRUNTIME_ROOT}/core/providers/dnnl/symbols.def") - else() -@@ -728,11 +728,11 @@ if (onnxruntime_USE_TENSORRT) - - if(APPLE) - set_property(TARGET onnxruntime_providers_tensorrt APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker -exported_symbols_list ${ONNXRUNTIME_ROOT}/core/providers/tensorrt/exported_symbols.lst") -- target_link_libraries(onnxruntime_providers_tensorrt PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_tensorrt PRIVATE nsync::nsync_cpp) - elseif(UNIX) - set_property(TARGET onnxruntime_providers_tensorrt APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-deprecated-declarations") - set_property(TARGET onnxruntime_providers_tensorrt APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/core/providers/tensorrt/version_script.lds -Xlinker --gc-sections") -- target_link_libraries(onnxruntime_providers_tensorrt PRIVATE nsync_cpp stdc++fs) -+ target_link_libraries(onnxruntime_providers_tensorrt PRIVATE nsync::nsync_cpp stdc++fs) - elseif(WIN32) - set_property(TARGET onnxruntime_providers_tensorrt APPEND_STRING PROPERTY LINK_FLAGS "-DEF:${ONNXRUNTIME_ROOT}/core/providers/tensorrt/symbols.def") - else() -@@ -1224,7 +1224,7 @@ if (onnxruntime_USE_MIGRAPHX) - target_compile_options(onnxruntime_providers_migraphx PRIVATE -Wno-error=sign-compare) - set_property(TARGET onnxruntime_providers_migraphx APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-deprecated-declarations") - set_property(TARGET onnxruntime_providers_migraphx APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/core/providers/migraphx/version_script.lds -Xlinker --gc-sections") -- target_link_libraries(onnxruntime_providers_migraphx PRIVATE nsync_cpp stdc++fs) -+ target_link_libraries(onnxruntime_providers_migraphx PRIVATE nsync::nsync_cpp stdc++fs) - - include(CheckLibraryExists) - check_library_exists(migraphx::c "migraphx_program_run_async" "/opt/rocm/migraphx/lib" HAS_STREAM_SYNC) -@@ -1461,7 +1461,7 @@ if (onnxruntime_USE_ROCM) - - if(UNIX) - set_property(TARGET onnxruntime_providers_rocm APPEND_STRING PROPERTY LINK_FLAGS "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/core/providers/rocm/version_script.lds -Xlinker --gc-sections") -- target_link_libraries(onnxruntime_providers_rocm PRIVATE nsync_cpp) -+ target_link_libraries(onnxruntime_providers_rocm PRIVATE nsync::nsync_cpp) - else() - message(FATAL_ERROR "onnxruntime_providers_rocm unknown platform, need to specify shared library exports for it") - endif() -@@ -1597,7 +1597,7 @@ if (onnxruntime_USE_CANN) - onnxruntime_add_include_to_target(onnxruntime_providers_cann onnxruntime_common onnxruntime_framework onnx onnx_proto ${PROTOBUF_LIB} flatbuffers::flatbuffers Boost::mp11 safeint_interface) - - add_dependencies(onnxruntime_providers_cann onnxruntime_providers_shared ${onnxruntime_EXTERNAL_DEPENDENCIES}) -- target_link_libraries(onnxruntime_providers_cann PRIVATE ascendcl acl_op_compiler fmk_onnx_parser nsync_cpp ${ABSEIL_LIBS} ${ONNXRUNTIME_PROVIDERS_SHARED}) -+ target_link_libraries(onnxruntime_providers_cann PRIVATE ascendcl acl_op_compiler fmk_onnx_parser nsync::nsync_cpp ${ABSEIL_LIBS} ${ONNXRUNTIME_PROVIDERS_SHARED}) - target_link_directories(onnxruntime_providers_cann PRIVATE ${onnxruntime_CANN_HOME}/lib64) - target_include_directories(onnxruntime_providers_cann PRIVATE ${ONNXRUNTIME_ROOT} ${CMAKE_CURRENT_BINARY_DIR} ${eigen_INCLUDE_DIRS} ${onnxruntime_CANN_HOME} ${onnxruntime_CANN_HOME}/include) - -@@ -1619,7 +1619,7 @@ if (onnxruntime_USE_AZURE) - source_group(TREE ${ONNXRUNTIME_ROOT}/core FILES ${onnxruntime_providers_azure_src}) - onnxruntime_add_static_library(onnxruntime_providers_azure ${onnxruntime_providers_azure_src}) - add_dependencies(onnxruntime_providers_azure ${onnxruntime_EXTERNAL_DEPENDENCIES}) -- onnxruntime_add_include_to_target(onnxruntime_providers_azure onnxruntime_common onnxruntime_framework onnx onnx_proto ${PROTOBUF_LIB} flatbuffers Boost::mp11) -+ onnxruntime_add_include_to_target(onnxruntime_providers_azure onnxruntime_common onnxruntime_framework onnx onnx_proto ${PROTOBUF_LIB} flatbuffers::flatbuffers Boost::mp11) - target_link_libraries(onnxruntime_providers_azure PRIVATE onnx onnxruntime_common onnxruntime_framework) - set_target_properties(onnxruntime_providers_azure PROPERTIES FOLDER "ONNXRuntime") - set_target_properties(onnxruntime_providers_azure PROPERTIES LINKER_LANGUAGE CXX) ---- a/cmake/onnxruntime_unittests.cmake -+++ b/cmake/onnxruntime_unittests.cmake -@@ -631,8 +631,8 @@ if(MSVC) - "$<$>:/wd6326>") - else() - target_compile_definitions(onnxruntime_test_utils PUBLIC -DNSYNC_ATOMIC_CPP11) -- target_include_directories(onnxruntime_test_utils PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT} -- ${nsync_SOURCE_DIR}/public) -+ target_include_directories(onnxruntime_test_utils PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT}) -+ onnxruntime_add_include_to_target(onnxruntime_test_utils nsync::nsync_cpp) - endif() - if (onnxruntime_USE_NCCL) - target_include_directories(onnxruntime_test_utils PRIVATE ${NCCL_INCLUDE_DIRS}) -@@ -665,8 +665,8 @@ if(MSVC) - "$<$>:/utf-8>") - else() - target_compile_definitions(onnx_test_runner_common PUBLIC -DNSYNC_ATOMIC_CPP11) -- target_include_directories(onnx_test_runner_common PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT} -- ${nsync_SOURCE_DIR}/public) -+ target_include_directories(onnx_test_runner_common PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT}) -+ onnxruntime_add_include_to_target(onnx_test_runner_common nsync::nsync_cpp) - endif() - if (MSVC AND NOT CMAKE_SIZEOF_VOID_P EQUAL 8) - #TODO: fix the warnings, they are dangerous -@@ -995,7 +995,7 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) - # "Global initializer calls a non-constexpr function." BENCHMARK_CAPTURE macro needs this. - target_compile_options(onnxruntime_mlas_benchmark PRIVATE /wd26426) - else() -- target_link_libraries(onnxruntime_mlas_benchmark PRIVATE nsync_cpp ${CMAKE_DL_LIBS}) -+ target_link_libraries(onnxruntime_mlas_benchmark PRIVATE nsync::nsync_cpp ${CMAKE_DL_LIBS}) - endif() - if (CPUINFO_SUPPORTED AND NOT onnxruntime_BUILD_WEBASSEMBLY) - target_link_libraries(onnxruntime_mlas_benchmark PRIVATE cpuinfo) -@@ -1053,7 +1053,7 @@ if(onnxruntime_ENABLE_EAGER_MODE) - list(APPEND onnxruntime_eager_mode_libs onnxruntime_training tensorboard) - endif() - IF(NOT WIN32) -- list(APPEND onnxruntime_eager_mode_libs nsync_cpp) -+ list(APPEND onnxruntime_eager_mode_libs nsync::nsync_cpp) - endif() - target_link_libraries(onnxruntime_eager_mode_test PRIVATE ${onnxruntime_eager_mode_libs} Threads::Threads ${onnxruntime_EXTERNAL_LIBRARIES}) - if (onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) -@@ -1113,7 +1113,7 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) - ${onnxruntime_EXTERNAL_LIBRARIES} - ${GETOPT_LIB_WIDE} ${SYS_PATH_LIB} ${CMAKE_DL_LIBS}) - if(NOT WIN32) -- list(APPEND onnxruntime_perf_test_libs nsync_cpp) -+ list(APPEND onnxruntime_perf_test_libs nsync::nsync_cpp) - if(onnxruntime_USE_SNPE) - list(APPEND onnxruntime_perf_test_libs onnxruntime_providers_snpe) - endif() -@@ -1157,7 +1157,7 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) - # test inference using shared lib - set(onnxruntime_shared_lib_test_LIBS onnxruntime_mocked_allocator onnxruntime_test_utils onnxruntime_common onnx_proto) - if(NOT WIN32) -- list(APPEND onnxruntime_shared_lib_test_LIBS nsync_cpp) -+ list(APPEND onnxruntime_shared_lib_test_LIBS nsync::nsync_cpp) - if(onnxruntime_USE_SNPE) - list(APPEND onnxruntime_shared_lib_test_LIBS onnxruntime_providers_snpe) - endif() -@@ -1279,7 +1279,7 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) - target_link_libraries(onnxruntime_mlas_test PRIVATE cpuinfo) - endif() - if(NOT WIN32) -- target_link_libraries(onnxruntime_mlas_test PRIVATE nsync_cpp ${CMAKE_DL_LIBS}) -+ target_link_libraries(onnxruntime_mlas_test PRIVATE nsync::nsync_cpp ${CMAKE_DL_LIBS}) - endif() - if (CMAKE_SYSTEM_NAME STREQUAL "Android") - target_link_libraries(onnxruntime_mlas_test PRIVATE ${android_shared_libs}) ---- a/cmake/onnxruntime_webassembly.cmake -+++ b/cmake/onnxruntime_webassembly.cmake -@@ -97,7 +97,7 @@ target_compile_options(onnx PRIVATE -Wno-unused-parameter -Wno-unused-variable) - - if (onnxruntime_BUILD_WEBASSEMBLY_STATIC_LIB) - bundle_static_library(onnxruntime_webassembly -- nsync_cpp -+ nsync::nsync_cpp - ${PROTOBUF_LIB} - onnx - onnx_proto -@@ -172,7 +172,7 @@ else() - endif() - - target_link_libraries(onnxruntime_webassembly PRIVATE -- nsync_cpp -+ nsync::nsync_cpp - ${PROTOBUF_LIB} - onnx - onnx_proto diff --git a/recipes/onnxruntime/all/patches/1.14.1-0002-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.14.1-0002-cmake-dependencies.patch deleted file mode 100644 index 6dbbfc4af9df4..0000000000000 --- a/recipes/onnxruntime/all/patches/1.14.1-0002-cmake-dependencies.patch +++ /dev/null @@ -1,166 +0,0 @@ -diff --git a/cmake/external/abseil-cpp.cmake b/cmake/external/abseil-cpp.cmake -index 54d2f9c5c1..3195ef15a0 100644 ---- a/cmake/external/abseil-cpp.cmake -+++ b/cmake/external/abseil-cpp.cmake -@@ -22,6 +22,7 @@ FetchContent_Declare( - URL ${DEP_URL_abseil_cpp} - URL_HASH SHA1=${DEP_SHA1_abseil_cpp} - PATCH_COMMAND ${ABSL_PATCH_COMMAND} -+ FIND_PACKAGE_ARGS REQUIRED CONFIG NAMES absl - ) - - onnxruntime_fetchcontent_makeavailable(abseil_cpp) -diff --git a/cmake/external/eigen.cmake b/cmake/external/eigen.cmake -index 266dd534af..3c7cb77891 100644 ---- a/cmake/external/eigen.cmake -+++ b/cmake/external/eigen.cmake -@@ -14,8 +14,11 @@ else () - FetchContent_Declare( - eigen - URL https://gitlab.com/libeigen/eigen/-/archive/d10b27fe37736d2944630ecd7557cefa95cf87c9/eigen-d10b27fe37736d2944630ecd7557cefa95cf87c9.zip -+ FIND_PACKAGE_ARGS REQUIRED CONFIG NAMES Eigen3 - ) - endif() -- FetchContent_Populate(eigen) -- set(eigen_INCLUDE_DIRS "${eigen_SOURCE_DIR}") -+ # FetchContent_Populate(eigen) -+ # set(eigen_INCLUDE_DIRS "${eigen_SOURCE_DIR}") -+ onnxruntime_fetchcontent_makeavailable(eigen) -+ get_target_property(eigen_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES) - endif() -diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onnxruntime_external_deps.cmake -index f85336e8bb..b051ff0be1 100644 ---- a/cmake/external/onnxruntime_external_deps.cmake -+++ b/cmake/external/onnxruntime_external_deps.cmake -@@ -97,7 +97,7 @@ FetchContent_Declare( - flatbuffers - URL ${DEP_URL_flatbuffers} - URL_HASH SHA1=${DEP_SHA1_flatbuffers} -- FIND_PACKAGE_ARGS 1.12.0...<2.0.0 NAMES Flatbuffers -+ FIND_PACKAGE_ARGS NAMES flatbuffers - ) - - #Here we support two build mode: -@@ -136,6 +136,7 @@ FetchContent_Declare( - date - URL ${DEP_URL_date} - URL_HASH SHA1=${DEP_SHA1_date} -+ FIND_PACKAGE_ARGS NAMES date - ) - onnxruntime_fetchcontent_makeavailable(date) - -@@ -145,6 +146,7 @@ FetchContent_Declare( - mp11 - URL ${DEP_URL_mp11} - URL_HASH SHA1=${DEP_SHA1_mp11} -+ FIND_PACKAGE_ARGS NAMES Boost - ) - - set(JSON_BuildTests OFF CACHE INTERNAL "") -@@ -263,6 +265,7 @@ FetchContent_Declare( - safeint - URL ${DEP_URL_safeint} - URL_HASH SHA1=${DEP_SHA1_safeint} -+ FIND_PACKAGE_ARGS NAMES safeint - ) - - # The next line will generate an error message "fatal: not a git repository", but it is ok. It is from flatbuffers -@@ -359,6 +362,7 @@ FetchContent_Declare( - URL ${DEP_URL_onnx} - URL_HASH SHA1=${DEP_SHA1_onnx} - PATCH_COMMAND ${ONNXRUNTIME_ONNX_PATCH_COMMAND} -+ FIND_PACKAGE_ARGS NAMES onnx ONNX - ) - - -@@ -386,8 +390,6 @@ endif() - set(GSL_TARGET "Microsoft.GSL::GSL") - set(GSL_INCLUDE_DIR "$") - --add_library(safeint_interface INTERFACE) --target_include_directories(safeint_interface INTERFACE ${safeint_SOURCE_DIR}) - - # XNNPACK EP - if (onnxruntime_USE_XNNPACK) -@@ -416,9 +418,9 @@ set(onnxruntime_EXTERNAL_LIBRARIES ${onnxruntime_EXTERNAL_LIBRARIES_XNNPACK} WIL - # The other libs do not have the problem. All the sources are already there. We can compile them in any order. - set(onnxruntime_EXTERNAL_DEPENDENCIES onnx_proto flatbuffers::flatbuffers) - --target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") -+# target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") - if (NOT onnxruntime_USE_FULL_PROTOBUF) -- target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") -+ # target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") - endif() - - if (onnxruntime_RUN_ONNX_TESTS) -diff --git a/cmake/external/wil.cmake b/cmake/external/wil.cmake -index d38535c4a1..8b181871f9 100644 ---- a/cmake/external/wil.cmake -+++ b/cmake/external/wil.cmake -@@ -11,12 +11,18 @@ FetchContent_Declare( - ) - #We can not use FetchContent_MakeAvailable(microsoft_wil) at here, since their cmake file - #always executes install command without conditions. --FetchContent_Populate(microsoft_wil) --if(NOT wil_FOUND) -+#FetchContent_Populate(microsoft_wil) -+#if(NOT wil_FOUND) -+# add_library(WIL INTERFACE) -+# add_library(WIL::WIL ALIAS WIL) -+# -+# # The interface's include directory. -+# target_include_directories(WIL INTERFACE -+# $) -+#endif() -+if(WIN32) -+ FetchContent_MakeAvailable(microsoft_wil) -+else() - add_library(WIL INTERFACE) - add_library(WIL::WIL ALIAS WIL) -- -- # The interface's include directory. -- target_include_directories(WIL INTERFACE -- $) --endif() -\ No newline at end of file -+endif() -diff --git a/cmake/external/xnnpack.cmake b/cmake/external/xnnpack.cmake -index 1fc2c6ccdc..a2c28957f9 100644 ---- a/cmake/external/xnnpack.cmake -+++ b/cmake/external/xnnpack.cmake -@@ -25,12 +25,15 @@ set(FXDIV_SOURCE_DIR ${fxdiv_SOURCE_DIR}) - - FetchContent_Declare(pthreadpool URL ${DEP_URL_pthreadpool} URL_HASH SHA1=${DEP_SHA1_pthreadpool}) - onnxruntime_fetchcontent_makeavailable(pthreadpool) --FetchContent_Declare(googlexnnpack URL ${DEP_URL_googlexnnpack} URL_HASH SHA1=${DEP_SHA1_googlexnnpack} --PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch) -+FetchContent_Declare( -+ googlexnnpack -+ URL ${DEP_URL_googlexnnpack} -+ URL_HASH SHA1=${DEP_SHA1_googlexnnpack} -+ PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch -+ FIND_PACKAGE_ARGS NAMES xnnpack -+) - - onnxruntime_fetchcontent_makeavailable(googlexnnpack) --set(XNNPACK_DIR ${googlexnnpack_SOURCE_DIR}) --set(XNNPACK_INCLUDE_DIR ${XNNPACK_DIR}/include) - - set(onnxruntime_EXTERNAL_LIBRARIES_XNNPACK XNNPACK pthreadpool) - -diff --git a/cmake/onnxruntime_providers.cmake b/cmake/onnxruntime_providers.cmake -index 7a99bac233..bbf1955494 100644 ---- a/cmake/onnxruntime_providers.cmake -+++ b/cmake/onnxruntime_providers.cmake -@@ -1561,10 +1561,6 @@ if (onnxruntime_USE_XNNPACK) - add_dependencies(onnxruntime_providers_xnnpack onnx ${onnxruntime_EXTERNAL_DEPENDENCIES}) - set_target_properties(onnxruntime_providers_xnnpack PROPERTIES FOLDER "ONNXRuntime") - -- install(DIRECTORY ${ONNXRUNTIME_INCLUDE_DIR}/core/providers/xnnpack -- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/core/providers -- ) -- - set_target_properties(onnxruntime_providers_xnnpack PROPERTIES LINKER_LANGUAGE CXX) - - if (NOT onnxruntime_BUILD_SHARED_LIB) diff --git a/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch deleted file mode 100644 index 4ebc87b3a4ddc..0000000000000 --- a/recipes/onnxruntime/all/patches/1.15.1-0001-cmake-dependencies.patch +++ /dev/null @@ -1,150 +0,0 @@ -diff --git a/cmake/external/abseil-cpp.cmake b/cmake/external/abseil-cpp.cmake -index 54d2f9c5c1..3195ef15a0 100644 ---- a/cmake/external/abseil-cpp.cmake -+++ b/cmake/external/abseil-cpp.cmake -@@ -22,6 +22,7 @@ FetchContent_Declare( - URL ${DEP_URL_abseil_cpp} - URL_HASH SHA1=${DEP_SHA1_abseil_cpp} - PATCH_COMMAND ${ABSL_PATCH_COMMAND} -+ FIND_PACKAGE_ARGS REQUIRED CONFIG NAMES absl - ) - - onnxruntime_fetchcontent_makeavailable(abseil_cpp) -diff --git a/cmake/external/eigen.cmake b/cmake/external/eigen.cmake -index 266dd534af..12b1792862 100644 ---- a/cmake/external/eigen.cmake -+++ b/cmake/external/eigen.cmake -@@ -14,8 +14,9 @@ else () - FetchContent_Declare( - eigen - URL https://gitlab.com/libeigen/eigen/-/archive/d10b27fe37736d2944630ecd7557cefa95cf87c9/eigen-d10b27fe37736d2944630ecd7557cefa95cf87c9.zip -+ FIND_PACKAGE_ARGS REQUIRED CONFIG NAMES Eigen3 - ) - endif() -- FetchContent_Populate(eigen) -- set(eigen_INCLUDE_DIRS "${eigen_SOURCE_DIR}") -+ onnxruntime_fetchcontent_makeavailable(eigen) -+ get_target_property(eigen_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES) - endif() -diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onnxruntime_external_deps.cmake -index 9effd1a2db..a059c28e36 100644 ---- a/cmake/external/onnxruntime_external_deps.cmake -+++ b/cmake/external/onnxruntime_external_deps.cmake -@@ -173,6 +173,7 @@ FetchContent_Declare( - date - URL ${DEP_URL_date} - URL_HASH SHA1=${DEP_SHA1_date} -+ FIND_PACKAGE_ARGS NAMES date - ) - onnxruntime_fetchcontent_makeavailable(date) - -@@ -182,6 +183,7 @@ FetchContent_Declare( - mp11 - URL ${DEP_URL_mp11} - URL_HASH SHA1=${DEP_SHA1_mp11} -+ FIND_PACKAGE_ARGS NAMES Boost - ) - - set(JSON_BuildTests OFF CACHE INTERNAL "") -@@ -300,6 +302,7 @@ FetchContent_Declare( - safeint - URL ${DEP_URL_safeint} - URL_HASH SHA1=${DEP_SHA1_safeint} -+ FIND_PACKAGE_ARGS NAMES safeint - ) - - # The next line will generate an error message "fatal: not a git repository", but it is ok. It is from flatbuffers -@@ -396,6 +399,7 @@ FetchContent_Declare( - URL ${DEP_URL_onnx} - URL_HASH SHA1=${DEP_SHA1_onnx} - PATCH_COMMAND ${ONNXRUNTIME_ONNX_PATCH_COMMAND} -+ FIND_PACKAGE_ARGS NAMES onnx ONNX - ) - - -@@ -423,9 +427,6 @@ endif() - set(GSL_TARGET "Microsoft.GSL::GSL") - set(GSL_INCLUDE_DIR "$") - --add_library(safeint_interface INTERFACE) --target_include_directories(safeint_interface INTERFACE ${safeint_SOURCE_DIR}) -- - # XNNPACK EP - if (onnxruntime_USE_XNNPACK) - if (onnxruntime_DISABLE_CONTRIB_OPS) -@@ -453,9 +454,9 @@ set(onnxruntime_EXTERNAL_LIBRARIES ${onnxruntime_EXTERNAL_LIBRARIES_XNNPACK} WIL - # The other libs do not have the problem. All the sources are already there. We can compile them in any order. - set(onnxruntime_EXTERNAL_DEPENDENCIES onnx_proto flatbuffers::flatbuffers) - --target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") -+# target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") - if (NOT onnxruntime_USE_FULL_PROTOBUF) -- target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") -+ # target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") - endif() - - if (onnxruntime_RUN_ONNX_TESTS) -diff --git a/cmake/external/wil.cmake b/cmake/external/wil.cmake -index d38535c4a1..02d6dbd85d 100644 ---- a/cmake/external/wil.cmake -+++ b/cmake/external/wil.cmake -@@ -9,14 +9,10 @@ FetchContent_Declare( - URL_HASH SHA1=${DEP_SHA1_microsoft_wil} - FIND_PACKAGE_ARGS NAMES wil - ) --#We can not use FetchContent_MakeAvailable(microsoft_wil) at here, since their cmake file --#always executes install command without conditions. --FetchContent_Populate(microsoft_wil) --if(NOT wil_FOUND) -+ -+if(WIN32) -+ FetchContent_MakeAvailable(microsoft_wil) -+else() - add_library(WIL INTERFACE) - add_library(WIL::WIL ALIAS WIL) -- -- # The interface's include directory. -- target_include_directories(WIL INTERFACE -- $) --endif() -\ No newline at end of file -+endif() -diff --git a/cmake/external/xnnpack.cmake b/cmake/external/xnnpack.cmake -index 1fc2c6ccdc..a2c28957f9 100644 ---- a/cmake/external/xnnpack.cmake -+++ b/cmake/external/xnnpack.cmake -@@ -25,12 +25,15 @@ set(FXDIV_SOURCE_DIR ${fxdiv_SOURCE_DIR}) - - FetchContent_Declare(pthreadpool URL ${DEP_URL_pthreadpool} URL_HASH SHA1=${DEP_SHA1_pthreadpool}) - onnxruntime_fetchcontent_makeavailable(pthreadpool) --FetchContent_Declare(googlexnnpack URL ${DEP_URL_googlexnnpack} URL_HASH SHA1=${DEP_SHA1_googlexnnpack} --PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch) -+FetchContent_Declare( -+ googlexnnpack -+ URL ${DEP_URL_googlexnnpack} -+ URL_HASH SHA1=${DEP_SHA1_googlexnnpack} -+ PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch -+ FIND_PACKAGE_ARGS NAMES xnnpack -+) - - onnxruntime_fetchcontent_makeavailable(googlexnnpack) --set(XNNPACK_DIR ${googlexnnpack_SOURCE_DIR}) --set(XNNPACK_INCLUDE_DIR ${XNNPACK_DIR}/include) - - set(onnxruntime_EXTERNAL_LIBRARIES_XNNPACK XNNPACK pthreadpool) - -diff --git a/cmake/onnxruntime_providers.cmake b/cmake/onnxruntime_providers.cmake -index 0daa1b8a3d..1f25467a8c 100644 ---- a/cmake/onnxruntime_providers.cmake -+++ b/cmake/onnxruntime_providers.cmake -@@ -1711,10 +1711,6 @@ if (onnxruntime_USE_XNNPACK) - add_dependencies(onnxruntime_providers_xnnpack onnx ${onnxruntime_EXTERNAL_DEPENDENCIES}) - set_target_properties(onnxruntime_providers_xnnpack PROPERTIES FOLDER "ONNXRuntime") - -- install(DIRECTORY ${ONNXRUNTIME_INCLUDE_DIR}/core/providers/xnnpack -- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/core/providers -- ) -- - set_target_properties(onnxruntime_providers_xnnpack PROPERTIES LINKER_LANGUAGE CXX) - - if (NOT onnxruntime_BUILD_SHARED_LIB) diff --git a/recipes/onnxruntime/all/patches/1.15.1-0002-fix-attention-15983.patch b/recipes/onnxruntime/all/patches/1.15.1-0002-fix-attention-15983.patch new file mode 100644 index 0000000000000..512fe43577ad8 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.15.1-0002-fix-attention-15983.patch @@ -0,0 +1,11 @@ +--- a/onnxruntime/contrib_ops/cuda/bert/attention.cc ++++ b/onnxruntime/contrib_ops/cuda/bert/attention.cc +@@ -164,7 +164,7 @@ + has_memory_efficient_attention(sm, sizeof(T) == 2); + #else + constexpr bool use_memory_efficient_attention = false; +- ORT_UNUSED_VARIABLE(is_mask_1d_key_seq_len_start); ++ ORT_UNUSED_PARAMETER(is_mask_1d_key_seq_len_start); + #endif + + cublasHandle_t cublas = GetCublasHandle(context); diff --git a/recipes/onnxruntime/all/patches/1.16.0-0001-cmake-dependencies.patch b/recipes/onnxruntime/all/patches/1.16.0-0001-cmake-dependencies.patch deleted file mode 100644 index dacb2b9b27a86..0000000000000 --- a/recipes/onnxruntime/all/patches/1.16.0-0001-cmake-dependencies.patch +++ /dev/null @@ -1,129 +0,0 @@ -From a30759bc61768883302290d34efd6d0a5e09dc9f Mon Sep 17 00:00:00 2001 -From: mayeut -Date: Thu, 21 Sep 2023 23:20:46 +0200 -Subject: [PATCH] CMake: ensure conan dependencies are used - ---- - cmake/external/eigen.cmake | 5 +++-- - cmake/external/onnxruntime_external_deps.cmake | 15 ++++++++------- - cmake/external/xnnpack.cmake | 11 +++++++---- - cmake/onnxruntime_mlas.cmake | 2 +- - 4 files changed, 19 insertions(+), 14 deletions(-) - -diff --git a/cmake/external/eigen.cmake b/cmake/external/eigen.cmake -index c0f7ddc50e..a47de64cbd 100644 ---- a/cmake/external/eigen.cmake -+++ b/cmake/external/eigen.cmake -@@ -16,8 +16,9 @@ else () - eigen - URL ${DEP_URL_eigen} - URL_HASH SHA1=${DEP_SHA1_eigen} -+ FIND_PACKAGE_ARGS REQUIRED CONFIG NAMES Eigen3 - ) - endif() -- FetchContent_Populate(eigen) -- set(eigen_INCLUDE_DIRS "${eigen_SOURCE_DIR}") -+ onnxruntime_fetchcontent_makeavailable(eigen) -+ get_target_property(eigen_INCLUDE_DIRS Eigen3::Eigen INTERFACE_INCLUDE_DIRECTORIES) - endif() -diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onnxruntime_external_deps.cmake -index 8e412c7847..0e2482d7de 100644 ---- a/cmake/external/onnxruntime_external_deps.cmake -+++ b/cmake/external/onnxruntime_external_deps.cmake -@@ -187,6 +187,7 @@ FetchContent_Declare( - date - URL ${DEP_URL_date} - URL_HASH SHA1=${DEP_SHA1_date} -+ FIND_PACKAGE_ARGS NAMES date - ) - onnxruntime_fetchcontent_makeavailable(date) - -@@ -196,6 +197,7 @@ FetchContent_Declare( - mp11 - URL ${DEP_URL_mp11} - URL_HASH SHA1=${DEP_SHA1_mp11} -+ FIND_PACKAGE_ARGS NAMES Boost - ) - - set(JSON_BuildTests OFF CACHE INTERNAL "") -@@ -314,6 +316,7 @@ FetchContent_Declare( - safeint - URL ${DEP_URL_safeint} - URL_HASH SHA1=${DEP_SHA1_safeint} -+ FIND_PACKAGE_ARGS NAMES safeint - ) - - # The next line will generate an error message "fatal: not a git repository", but it is ok. It is from flatbuffers -@@ -410,6 +413,7 @@ FetchContent_Declare( - URL ${DEP_URL_onnx} - URL_HASH SHA1=${DEP_SHA1_onnx} - PATCH_COMMAND ${ONNXRUNTIME_ONNX_PATCH_COMMAND} -+ FIND_PACKAGE_ARGS NAMES ONNX - ) - - -@@ -437,9 +441,6 @@ endif() - set(GSL_TARGET "Microsoft.GSL::GSL") - set(GSL_INCLUDE_DIR "$") - --add_library(safeint_interface INTERFACE) --target_include_directories(safeint_interface INTERFACE ${safeint_SOURCE_DIR}) -- - # XNNPACK EP - if (onnxruntime_USE_XNNPACK) - if (onnxruntime_DISABLE_CONTRIB_OPS) -@@ -467,10 +468,10 @@ set(onnxruntime_EXTERNAL_LIBRARIES ${onnxruntime_EXTERNAL_LIBRARIES_XNNPACK} ${W - # The other libs do not have the problem. All the sources are already there. We can compile them in any order. - set(onnxruntime_EXTERNAL_DEPENDENCIES onnx_proto flatbuffers::flatbuffers) - --target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") --if (NOT onnxruntime_USE_FULL_PROTOBUF) -- target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") --endif() -+# target_compile_definitions(onnx PUBLIC $ PRIVATE "__ONNX_DISABLE_STATIC_REGISTRATION") -+# if (NOT onnxruntime_USE_FULL_PROTOBUF) -+# target_compile_definitions(onnx PUBLIC "__ONNX_NO_DOC_STRINGS") -+# endif() - - if (onnxruntime_RUN_ONNX_TESTS) - add_definitions(-DORT_RUN_EXTERNAL_ONNX_TESTS) -diff --git a/cmake/external/xnnpack.cmake b/cmake/external/xnnpack.cmake -index 7455584f1a..85d8177f45 100644 ---- a/cmake/external/xnnpack.cmake -+++ b/cmake/external/xnnpack.cmake -@@ -25,12 +25,15 @@ set(FXDIV_SOURCE_DIR ${fxdiv_SOURCE_DIR}) - - FetchContent_Declare(pthreadpool URL ${DEP_URL_pthreadpool} URL_HASH SHA1=${DEP_SHA1_pthreadpool}) - onnxruntime_fetchcontent_makeavailable(pthreadpool) --FetchContent_Declare(googlexnnpack URL ${DEP_URL_googlexnnpack} URL_HASH SHA1=${DEP_SHA1_googlexnnpack} --PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch) -+FetchContent_Declare( -+ googlexnnpack -+ URL ${DEP_URL_googlexnnpack} -+ URL_HASH SHA1=${DEP_SHA1_googlexnnpack} -+ PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/xnnpack/AddEmscriptenAndIosSupport.patch -+ FIND_PACKAGE_ARGS NAMES xnnpack -+) - - onnxruntime_fetchcontent_makeavailable(googlexnnpack) --set(XNNPACK_DIR ${googlexnnpack_SOURCE_DIR}) --set(XNNPACK_INCLUDE_DIR ${XNNPACK_DIR}/include) - - set(onnxruntime_EXTERNAL_LIBRARIES_XNNPACK XNNPACK pthreadpool) - -diff --git a/cmake/onnxruntime_mlas.cmake b/cmake/onnxruntime_mlas.cmake -index e0ccc504d7..819ffba884 100644 ---- a/cmake/onnxruntime_mlas.cmake -+++ b/cmake/onnxruntime_mlas.cmake -@@ -609,7 +609,7 @@ if (NOT onnxruntime_ORT_MINIMAL_BUILD) - - target_link_libraries(onnxruntime_mlas_q4dq PRIVATE ${ONNXRUNTIME_MLAS_LIBS} onnxruntime_common) - if (CPUINFO_SUPPORTED AND NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") -- target_link_libraries(onnxruntime_mlas_q4dq PRIVATE cpuinfo) -+ target_link_libraries(onnxruntime_mlas_q4dq PRIVATE cpuinfo::cpuinfo) - endif() - if(NOT WIN32) - target_link_libraries(onnxruntime_mlas_q4dq PRIVATE nsync::nsync_cpp ${CMAKE_DL_LIBS}) --- -2.39.2 (Apple Git-143) - diff --git a/recipes/onnxruntime/all/patches/1.17.3-0001-patch-macos-cpp20-date-compat.patch b/recipes/onnxruntime/all/patches/1.17.3-0001-patch-macos-cpp20-date-compat.patch new file mode 100644 index 0000000000000..4f206c34e7538 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.17.3-0001-patch-macos-cpp20-date-compat.patch @@ -0,0 +1,142 @@ +From 7303a90f4916dcf6f66236d40b8917344c27420a Mon Sep 17 00:00:00 2001 +From: Andrew Fantino <15876180+afantino951@users.noreply.github.com> +Date: Tue, 2 Apr 2024 22:10:25 -0700 +Subject: [PATCH] Fix build errors from date/date.h C++20 compatibility + (#20139) + +### Description +For C++ standards >= 20, use `std::chrono::operator<<` in place of +`date::operator<<` to fix ambiguous operator compile error. + +### Motivation and Context +The external dependency HowardHinnant/date has a conflict with +std::chrono for >=C++20. +Solves #20137 +--- + cmake/onnxruntime_common.cmake | 2 +- + include/onnxruntime/core/common/logging/logging.h | 11 +++++++++++ + onnxruntime/core/common/logging/sinks/ostream_sink.cc | 3 +-- + .../core/platform/apple/logging/apple_log_sink.mm | 2 +- + onnxruntime/test/common/logging/helpers.h | 3 +-- + onnxruntime/test/util/include/test/capturing_sink.h | 4 +--- + 6 files changed, 16 insertions(+), 9 deletions(-) + +diff --git a/cmake/onnxruntime_common.cmake b/cmake/onnxruntime_common.cmake +index fb56e3f3445d..69d8f5fa138c 100644 +--- a/cmake/onnxruntime_common.cmake ++++ b/cmake/onnxruntime_common.cmake +@@ -129,7 +129,7 @@ target_include_directories(onnxruntime_common + ${OPTIONAL_LITE_INCLUDE_DIR}) + + +-target_link_libraries(onnxruntime_common PUBLIC safeint_interface ${GSL_TARGET} ${ABSEIL_LIBS}) ++target_link_libraries(onnxruntime_common PUBLIC safeint_interface ${GSL_TARGET} ${ABSEIL_LIBS} date::date) + + add_dependencies(onnxruntime_common ${onnxruntime_EXTERNAL_DEPENDENCIES}) + +diff --git a/include/onnxruntime/core/common/logging/logging.h b/include/onnxruntime/core/common/logging/logging.h +index 2b9912ea7738..f62053a5e44a 100644 +--- a/include/onnxruntime/core/common/logging/logging.h ++++ b/include/onnxruntime/core/common/logging/logging.h +@@ -18,6 +18,8 @@ + + #include "core/common/logging/macros.h" + ++#include "date/date.h" ++ + /* + + Logging overview and expected usage: +@@ -56,6 +58,15 @@ namespace logging { + + using Timestamp = std::chrono::time_point; + ++// TODO: When other compilers support std::chrono::operator<<, update this. ++// TODO: Check support for other compilers' version before enable C++20 for other compilers. ++// Xcode added support for C++20's std::chrono::operator<< in SDK version 14.4. ++#if __cplusplus >= 202002L && __MAC_OS_X_VERSION_MAX_ALLOWED >= 140400L ++namespace timestamp_ns = std::chrono; ++#else ++namespace timestamp_ns = ::date; ++#endif ++ + #ifndef NDEBUG + ORT_ATTRIBUTE_UNUSED static bool vlog_enabled = true; // Set directly based on your needs. + #else +diff --git a/onnxruntime/core/common/logging/sinks/ostream_sink.cc b/onnxruntime/core/common/logging/sinks/ostream_sink.cc +index 0db3d8709d48..a120138d1d15 100644 +--- a/onnxruntime/core/common/logging/sinks/ostream_sink.cc ++++ b/onnxruntime/core/common/logging/sinks/ostream_sink.cc +@@ -2,7 +2,6 @@ + // Licensed under the MIT License. + + #include "core/common/logging/sinks/ostream_sink.h" +-#include "date/date.h" + + namespace onnxruntime { + namespace logging { +@@ -24,7 +23,7 @@ struct Color { + + void OStreamSink::SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) { + // operator for formatting of timestamp in ISO8601 format including microseconds +- using date::operator<<; ++ using timestamp_ns::operator<<; + + // Two options as there may be multiple calls attempting to write to the same sink at once: + // 1) Use mutex to synchronize access to the stream. +diff --git a/onnxruntime/core/platform/apple/logging/apple_log_sink.mm b/onnxruntime/core/platform/apple/logging/apple_log_sink.mm +index 8dbd8eecd0e7..78614ffd2819 100644 +--- a/onnxruntime/core/platform/apple/logging/apple_log_sink.mm ++++ b/onnxruntime/core/platform/apple/logging/apple_log_sink.mm +@@ -13,7 +13,7 @@ + namespace logging { + + void AppleLogSink::SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) { +- using date::operator<<; ++ using timestamp_ns::operator<<; + std::ostringstream msg; + msg << timestamp << " [" << message.SeverityPrefix() << ":" << message.Category() << ":" << logger_id << ", " + << message.Location().ToString() << "] " << message.Message(); +diff --git a/onnxruntime/test/common/logging/helpers.h b/onnxruntime/test/common/logging/helpers.h +index c8d027022850..7fd03b72e53a 100644 +--- a/onnxruntime/test/common/logging/helpers.h ++++ b/onnxruntime/test/common/logging/helpers.h +@@ -5,7 +5,6 @@ + + #include + +-#include "date/date.h" + #include "gmock/gmock.h" + #include "gtest/gtest.h" + +@@ -30,7 +29,7 @@ class MockSink : public ::onnxruntime::logging::ISink { + #endif + + ACTION(PrintArgs) { +- using date::operator<<; ++ using onnxruntime::logging::timestamp_ns::operator<<; + + // const Timestamp ×tamp, const std::string &logger_id, const Message &message + // arg0 arg1 arg2 +diff --git a/onnxruntime/test/util/include/test/capturing_sink.h b/onnxruntime/test/util/include/test/capturing_sink.h +index 39788947602d..7d978d1bd1e5 100644 +--- a/onnxruntime/test/util/include/test/capturing_sink.h ++++ b/onnxruntime/test/util/include/test/capturing_sink.h +@@ -6,8 +6,6 @@ + #include "core/common/logging/logging.h" + #include "core/common/logging/isink.h" + +-#include "date/date.h" +- + namespace onnxruntime { + namespace test { + +@@ -17,7 +15,7 @@ class CapturingSink : public logging::ISink { + public: + void SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) override { + // operator for formatting of timestamp in ISO8601 format including microseconds +- using date::operator<<; ++ using timestamp_ns::operator<<; + std::ostringstream msg; + + msg << timestamp << " [" << message.SeverityPrefix() << ":" << message.Category() << ":" << logger_id << ", " diff --git a/recipes/onnxruntime/all/patches/1.17.3-0002-missing-include.patch b/recipes/onnxruntime/all/patches/1.17.3-0002-missing-include.patch new file mode 100644 index 0000000000000..d3555681e4af9 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.17.3-0002-missing-include.patch @@ -0,0 +1,12 @@ +diff --git a/include/onnxruntime/core/graph/graph.h b/include/onnxruntime/core/graph/graph.h +index 22827d43b2..f9e5fd56d3 100644 +--- a/include/onnxruntime/core/graph/graph.h ++++ b/include/onnxruntime/core/graph/graph.h +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/recipes/onnxruntime/all/patches/1.17.3-0003-fix-cutlass-cuda-provider.patch b/recipes/onnxruntime/all/patches/1.17.3-0003-fix-cutlass-cuda-provider.patch new file mode 100644 index 0000000000000..8ea3d51071e51 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.17.3-0003-fix-cutlass-cuda-provider.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/onnxruntime_providers_cuda.cmake b/cmake/onnxruntime_providers_cuda.cmake +index b5c3100865..129c4f19f6 100644 +--- a/cmake/onnxruntime_providers_cuda.cmake ++++ b/cmake/onnxruntime_providers_cuda.cmake +@@ -180,8 +180,8 @@ + target_link_libraries(${target} PRIVATE CUDA::cuda_driver) + endif() + +- include(cutlass) +- target_include_directories(${target} PRIVATE ${cutlass_SOURCE_DIR}/include ${cutlass_SOURCE_DIR}/examples) ++ find_package(NvidiaCutlass) ++ target_link_libraries(${target} PRIVATE nvidia::cutlass::cutlass) + + target_include_directories(${target} PRIVATE ${ONNXRUNTIME_ROOT} ${CMAKE_CURRENT_BINARY_DIR} ${eigen_INCLUDE_DIRS} ${TVM_INCLUDES} + PUBLIC ${CUDAToolkit_INCLUDE_DIRS}) diff --git a/recipes/onnxruntime/all/patches/1.18.0-0004-abseil-no-string-view.patch b/recipes/onnxruntime/all/patches/1.18.0-0004-abseil-no-string-view.patch new file mode 100644 index 0000000000000..329024e7245ef --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.18.0-0004-abseil-no-string-view.patch @@ -0,0 +1,22 @@ +--- a/onnxruntime/core/framework/kernel_type_str_resolver.cc ++++ b/onnxruntime/core/framework/kernel_type_str_resolver.cc +@@ -46,7 +46,7 @@ + ORT_RETURN_IF(op_it == op_kernel_type_str_map_.end(), "Failed to find op_id: ", op_id); + const auto& type_str_map = op_it->second; + +-#ifdef DISABLE_ABSEIL ++#ifndef ABSL_USES_STD_STRING_VIEW + // TODO(edgchen1) maybe we can use transparent hash/eq to enable lookup with string_view + const auto type_str_it = type_str_map.find(std::string(kernel_type_str)); + #else +--- a/onnxruntime/core/framework/ort_value_name_idx_map.h ++++ b/onnxruntime/core/framework/ort_value_name_idx_map.h +@@ -33,7 +33,7 @@ class OrtValueNameIdxMap { + common::Status GetIdx(std::string_view name, int& idx) const { + idx = -1; + +-#ifdef DISABLE_ABSEIL ++#ifndef ABSL_USES_STD_STRING_VIEW + auto it = map_.find(std::string(name)); + #else + auto it = map_.find(name); diff --git a/recipes/onnxruntime/all/patches/1.18.1-0005-fix-cutlass-cuda-provider.patch b/recipes/onnxruntime/all/patches/1.18.1-0005-fix-cutlass-cuda-provider.patch new file mode 100644 index 0000000000000..3024bfb1f7bb6 --- /dev/null +++ b/recipes/onnxruntime/all/patches/1.18.1-0005-fix-cutlass-cuda-provider.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/onnxruntime_providers_cuda.cmake b/cmake/onnxruntime_providers_cuda.cmake +index 1346a9ce96..f40661d4bd 100644 +--- a/cmake/onnxruntime_providers_cuda.cmake ++++ b/cmake/onnxruntime_providers_cuda.cmake +@@ -211,8 +211,8 @@ + target_link_libraries(${target} PRIVATE CUDA::cuda_driver) + endif() + +- include(cutlass) +- target_include_directories(${target} PRIVATE ${cutlass_SOURCE_DIR}/include ${cutlass_SOURCE_DIR}/examples ${cutlass_SOURCE_DIR}/tools/util/include) ++ find_package(NvidiaCutlass) ++ target_link_libraries(${target} PRIVATE nvidia::cutlass::cutlass) + + target_include_directories(${target} PRIVATE ${ONNXRUNTIME_ROOT} ${CMAKE_CURRENT_BINARY_DIR} ${eigen_INCLUDE_DIRS} ${TVM_INCLUDES} + PUBLIC ${CUDAToolkit_INCLUDE_DIRS}) diff --git a/recipes/onnxruntime/all/test_package/CMakeLists.txt b/recipes/onnxruntime/all/test_package/CMakeLists.txt index b5d8ccbfcd52c..483ebf5ead1ee 100644 --- a/recipes/onnxruntime/all/test_package/CMakeLists.txt +++ b/recipes/onnxruntime/all/test_package/CMakeLists.txt @@ -5,5 +5,8 @@ project(test_package CXX) find_package(onnxruntime REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) +if(WITH_CUDA) + target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_CUDA) +endif() target_link_libraries(${PROJECT_NAME} PRIVATE onnxruntime::onnxruntime) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/onnxruntime/all/test_package/conanfile.py b/recipes/onnxruntime/all/test_package/conanfile.py index 18016812d8c7e..17284808fb050 100644 --- a/recipes/onnxruntime/all/test_package/conanfile.py +++ b/recipes/onnxruntime/all/test_package/conanfile.py @@ -1,13 +1,14 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain +from conan.tools.files import copy import os # It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def requirements(self): @@ -15,6 +16,15 @@ def requirements(self): def layout(self): cmake_layout(self, src_folder=".") + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["WITH_CUDA"] = self.dependencies["onnxruntime"].options.with_cuda + tc.generate() + if self.settings.os == "Windows": + # on windows the system dll C:\WINDOWS\system32\onnxruntime.dll may be loaded instead even if the conan lib is first in the PATH, see https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order + for bindir in self.dependencies[self.tested_reference_str].cpp_info.bindirs: + copy(self, "*.dll", bindir, os.path.join(self.build_folder, str(self.settings.build_type))) def build(self): cmake = CMake(self) @@ -23,5 +33,5 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/onnxruntime/all/test_package/test_package.cpp b/recipes/onnxruntime/all/test_package/test_package.cpp index a9cc6b11cef74..09281241c4ad8 100644 --- a/recipes/onnxruntime/all/test_package/test_package.cpp +++ b/recipes/onnxruntime/all/test_package/test_package.cpp @@ -2,8 +2,22 @@ #include #include +#ifdef WITH_CUDA +#include +#endif + int main() { const auto& api = Ort::GetApi(); - std::cout << OrtGetApiBase()->GetVersionString() << std::endl; + std::cout << "Version: " << OrtGetApiBase()->GetVersionString() << std::endl; + std::cout << "Providers: " << std::endl; + for(const auto& provider: Ort::GetAvailableProviders()) + std::cout << provider << ", " << std::endl; + +#ifdef WITH_CUDA + Ort::SessionOptions session_options; + OrtSessionOptionsAppendExecutionProvider_CUDA(session_options, 1); + std::cout << "with cuda!" << std::endl; +#endif + return 0; } diff --git a/recipes/onnxruntime/all/test_v1_package/CMakeLists.txt b/recipes/onnxruntime/all/test_v1_package/CMakeLists.txt index 0d20897301b68..691d35acd08dc 100644 --- a/recipes/onnxruntime/all/test_v1_package/CMakeLists.txt +++ b/recipes/onnxruntime/all/test_v1_package/CMakeLists.txt @@ -4,5 +4,19 @@ project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) +find_package(onnxruntime REQUIRED CONFIG) +add_executable(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/../test_package/test_package.cpp) +if(WITH_CUDA) + target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_CUDA) +endif() + +target_link_libraries(${PROJECT_NAME} PRIVATE onnxruntime::onnxruntime) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) + +if(WIN32 AND DEFINED CONAN_BIN_DIRS_ONNXRUNTIME AND EXISTS ${CONAN_BIN_DIRS_ONNXRUNTIME}) + add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory + ${CONAN_BIN_DIRS_ONNXRUNTIME} + $ + ) +endif() diff --git a/recipes/onnxruntime/config.yml b/recipes/onnxruntime/config.yml index 7dfea6fd99cd4..497cb76cea1d7 100644 --- a/recipes/onnxruntime/config.yml +++ b/recipes/onnxruntime/config.yml @@ -1,11 +1,9 @@ versions: - "1.16.3": - folder: all - "1.16.2": + "1.18.1": folder: all - "1.16.1": + "1.17.3": folder: all - "1.16.0": + "1.16.3": folder: all "1.15.1": folder: all diff --git a/recipes/openapi-generator/all/conandata.yml b/recipes/openapi-generator/all/conandata.yml index d977cc57e49bd..94d684c5ba1bc 100644 --- a/recipes/openapi-generator/all/conandata.yml +++ b/recipes/openapi-generator/all/conandata.yml @@ -1,13 +1,13 @@ sources: + "7.8.0": + url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.8.0/openapi-generator-cli-7.8.0.jar" + sha256: "d1879cf42da31f8cf61cf68798b8ef2418af0c6bd93a5c1870e1ff543fbb9365" "7.5.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.5.0/openapi-generator-cli-7.5.0.jar" sha256: "47ebbd1beddaf7dfbee523e7b87623c6ec1b1d42960fbe15f6cad2f6426c69bf" "7.4.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.4.0/openapi-generator-cli-7.4.0.jar" sha256: "e42769a98fef5634bee0f921e4b90786a6b3292aa11fe8d2f84c045ac435ab29" - "7.3.0": - url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.3.0/openapi-generator-cli-7.3.0.jar" - sha256: "879c15340a75a19a7e720efc242c3223e0e4207b0694d6d1cea5c7dd87cf1cce" "6.6.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.6.0/openapi-generator-cli-6.6.0.jar" sha256: "9718ff7844e89462c75dcd9b20a35136f6db257bfe1b874db1e3002e99de4609" diff --git a/recipes/openapi-generator/config.yml b/recipes/openapi-generator/config.yml index fd40653d9c013..f7485451c5674 100644 --- a/recipes/openapi-generator/config.yml +++ b/recipes/openapi-generator/config.yml @@ -1,9 +1,9 @@ versions: + "7.8.0": + folder: all "7.5.0": folder: all "7.4.0": folder: all - "7.3.0": - folder: all "6.6.0": folder: all diff --git a/recipes/opencv/4.x/conandata.yml b/recipes/opencv/4.x/conandata.yml index d536778d0cf88..8c1ffb58a9492 100644 --- a/recipes/opencv/4.x/conandata.yml +++ b/recipes/opencv/4.x/conandata.yml @@ -1,4 +1,9 @@ sources: + "4.10.0": + - url: "https://github.com/opencv/opencv/archive/refs/tags/4.10.0.tar.gz" + sha256: "b2171af5be6b26f7a06b1229948bbb2bdaa74fcf5cd097e0af6378fce50a6eb9" + - url: "https://github.com/opencv/opencv_contrib/archive/refs/tags/4.10.0.tar.gz" + sha256: "65597f8fb8dc2b876c1b45b928bbcc5f772ddbaf97539bf1b737623d0604cba1" "4.9.0": - url: "https://github.com/opencv/opencv/archive/refs/tags/4.9.0.tar.gz" sha256: "ddf76f9dffd322c7c3cb1f721d0887f62d747b82059342213138dc190f28bc6c" @@ -25,6 +30,28 @@ sources: - url: "https://github.com/opencv/opencv_contrib/archive/refs/tags/4.1.2.tar.gz" sha256: "0f6c3d30baa39e3e7611afb481ee86dea45dafb182cac87d570c95dccd83eb8b" patches: + "4.10.0": + - patch_file: "patches/4.5.5-0001-find-openexr.patch" + patch_description: "Robust discovery & injection of OpenEXR" + patch_type: "conan" + - patch_file: "patches/4.5.5-0003-find-quirc.patch" + patch_description: "Robust discovery & injection of quirc" + patch_type: "conan" + - patch_file: "patches/4.8.1-0001-find-ade.patch" + patch_description: "Robust discovery & injection of ade" + patch_type: "conan" + - patch_file: "patches/4.5.1-0001-tracking-no-plot-deps.patch" + patch_description: "Fix requirements of tracking module" + patch_type: "conan" + - patch_file: "patches/4.1.2-0006-hdf.patch" + patch_description: "Robust discovery of hdf" + patch_type: "conan" + - patch_file: "patches/4.10.0-0001-fix-zlib-static-android.patch" + patch_description: "Fix discovery of zlib static if Android" + patch_type: "conan" + - patch_file: "patches/4.1.2-0007-android-install-layout.patch" + patch_description: "Honor install layout from conan if Android" + patch_type: "conan" "4.9.0": - patch_file: "patches/4.5.5-0001-find-openexr.patch" patch_description: "Robust discovery & injection of OpenEXR" diff --git a/recipes/opencv/4.x/conanfile.py b/recipes/opencv/4.x/conanfile.py index 668c160992885..491ff108378e7 100644 --- a/recipes/opencv/4.x/conanfile.py +++ b/recipes/opencv/4.x/conanfile.py @@ -191,15 +191,15 @@ class OpenCVConan(ConanFile): "with_jpeg": "libjpeg", "with_png": True, "with_tiff": True, - "with_jpeg2000": "jasper", + "with_jpeg2000": "openjpeg", "with_openexr": True, "with_webp": True, "with_gdal": False, "with_gdcm": False, - "with_imgcodec_hdr": False, - "with_imgcodec_pfm": False, - "with_imgcodec_pxm": False, - "with_imgcodec_sunraster": False, + "with_imgcodec_hdr": True, + "with_imgcodec_pfm": True, + "with_imgcodec_pxm": True, + "with_imgcodec_sunraster": True, "with_msmf": True, "with_msmf_dxva": True, # objdetect module options @@ -319,10 +319,13 @@ def config_options(self): else: del self.options.with_ffmpeg - if "arm" not in self.settings.arch: - del self.options.neon if not self._has_with_jpeg2000_option: del self.options.with_jpeg2000 + elif Version(self.version) < "4.3.0": + self.options.with_jpeg2000 = "jasper" + + if "arm" not in self.settings.arch: + del self.options.neon if not self._has_with_tiff_option: del self.options.with_tiff if not self._has_superres_option: @@ -1212,6 +1215,9 @@ def validate(self): raise ConanInvalidConfiguration( "viz module can't be enabled yet. It requires VTK which is not available in conan-center." ) + if self.options.get_safe("with_jpeg2000") == "openjpeg" and Version(self.version) < "4.3.0": + raise ConanInvalidConfiguration("openjpeg is not available for OpenCV before 4.3.0") + def build_requirements(self): if self.options.get_safe("with_protobuf"): @@ -1486,6 +1492,15 @@ def generate(self): tc.variables["WITH_AVIF"] = self.options.get_safe("with_avif", False) tc.variables["WITH_FLATBUFFERS"] = self.options.get_safe("with_flatbuffers", False) + if Version(self.version) >= "4.10.0": + tc.variables["WITH_KLEIDICV"] = False + tc.variables["WITH_NDSRVP"] = False + tc.variables["OBSENSOR_USE_ORBBEC_SDK"] = False + if is_apple_os(self): + # default behavior for 4.9.0 + tc.variables["WITH_OBSENSOR"] = False + tc.variables["WITH_ZLIB_NG"] = False + # Special world option merging all enabled modules into one big library file tc.variables["BUILD_opencv_world"] = self.options.world diff --git a/recipes/opencv/4.x/patches/4.10.0-0001-fix-zlib-static-android.patch b/recipes/opencv/4.x/patches/4.10.0-0001-fix-zlib-static-android.patch new file mode 100644 index 0000000000000..aae16f037e565 --- /dev/null +++ b/recipes/opencv/4.x/patches/4.10.0-0001-fix-zlib-static-android.patch @@ -0,0 +1,17 @@ +--- a/cmake/OpenCVFindLibsGrfmt.cmake ++++ b/cmake/OpenCVFindLibsGrfmt.cmake +@@ -20,12 +20,12 @@ if(BUILD_ZLIB) + ocv_clear_vars(ZLIB_FOUND) + else() + ocv_clear_internal_cache_vars(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) +- if(ANDROID) ++ if(0) + set(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) + set(CMAKE_FIND_LIBRARY_SUFFIXES .so) + endif() + find_package(ZLIB "${MIN_VER_ZLIB}") +- if(ANDROID) ++ if(0) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) + unset(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES) + endif() diff --git a/recipes/opencv/config.yml b/recipes/opencv/config.yml index 42e7008ac9ec0..826190b23d258 100644 --- a/recipes/opencv/config.yml +++ b/recipes/opencv/config.yml @@ -1,4 +1,6 @@ versions: + "4.10.0": + folder: "4.x" "4.9.0": folder: "4.x" "4.8.1": diff --git a/recipes/openexr/2.x/conanfile.py b/recipes/openexr/2.x/conanfile.py index 564b19b00cd64..8cf1e63318981 100644 --- a/recipes/openexr/2.x/conanfile.py +++ b/recipes/openexr/2.x/conanfile.py @@ -141,6 +141,9 @@ def package_info(self): # waiting an implementation of https://github.com/conan-io/conan/issues/9000 self.cpp_info.set_property("cmake_file_name", "OpenEXR") + # Avoid conflict in PkgConfigDeps with OpenEXR.pc file coming from openexr_ilmimf component + self.cpp_info.set_property("pkg_config_name", "openexr_conan_full_package") + lib_suffix = "" if not self.options.shared or self.settings.os == "Windows": openexr_version = Version(self.version) diff --git a/recipes/opengl-registry/all/conandata.yml b/recipes/opengl-registry/all/conandata.yml index 1fa4f5c98ec9a..fad17557e62be 100644 --- a/recipes/opengl-registry/all/conandata.yml +++ b/recipes/opengl-registry/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20240721": + url: "https://github.com/KhronosGroup/OpenGL-Registry/archive/d2fe2072a3aecf3e9ef1568976e805531b50d959.tar.gz" + sha256: "0c8295a95e137b0dabd5ad138ad41d96b40e85bcca848b62a3e13378e425a08a" "cci.20220929": url: "https://github.com/KhronosGroup/OpenGL-Registry/archive/5bae8738b23d06968e7c3a41308568120943ae77.tar.gz" sha256: "e69eb5738a517737d91717c4f9bb8da1e1fac7a04afe0fc24532ca92df1da53d" diff --git a/recipes/opengl-registry/all/test_package/test_package.c b/recipes/opengl-registry/all/test_package/test_package.c index a9cb3640b85e1..947465a4a0c1c 100644 --- a/recipes/opengl-registry/all/test_package/test_package.c +++ b/recipes/opengl-registry/all/test_package/test_package.c @@ -4,6 +4,7 @@ #include int main() { + printf("GL_GLEXT_VERSION: %d\n", GL_GLEXT_VERSION); GLenum value = GL_UNSIGNED_BYTE_3_3_2; printf("GL_UNSIGNED_BYTE_3_3_2: %x\n", value); return EXIT_SUCCESS; diff --git a/recipes/opengl-registry/config.yml b/recipes/opengl-registry/config.yml index 0168ee0addf88..07c28129c1bb5 100644 --- a/recipes/opengl-registry/config.yml +++ b/recipes/opengl-registry/config.yml @@ -1,3 +1,5 @@ versions: + "20240721": + folder: all "cci.20220929": folder: all diff --git a/recipes/openh264/all/conandata.yml b/recipes/openh264/all/conandata.yml index bae40a3d0b27c..952b7e0034b6e 100644 --- a/recipes/openh264/all/conandata.yml +++ b/recipes/openh264/all/conandata.yml @@ -8,38 +8,3 @@ sources: "2.1.1": url: "https://github.com/cisco/openh264/archive/v2.1.1.tar.gz" sha256: "af173e90fce65f80722fa894e1af0d6b07572292e76de7b65273df4c0a8be678" - "1.7.0": - url: "https://github.com/cisco/openh264/archive/v1.7.0.tar.gz" - sha256: "9c07c38d7de00046c9c52b12c76a2af7648b70d05bd5460c8b67f6895738653f" -patches: - "2.4.1": - - patch_file: "patches/2.4.1-0001-platform-android.mk.patch" - patch_description: "Android Fix" - patch_type: "portability" - "2.3.1": - - patch_file: "patches/2.3.1-0001-platform-android.mk.patch" - patch_description: "Android Fix" - patch_type: "portability" - - patch_file: "patches/2.3.1-0002-macos-relocatable-shared.patch" - patch_description: "Macos relocatable shared fix" - patch_type: "portability" - "2.1.1": - - patch_file: "patches/2.1.1-0001-platform-android.mk.patch" - patch_description: "Android Fix" - patch_type: "portability" - - patch_file: "patches/2.1.1-0002-macos-relocatable-shared.patch" - patch_description: "Macos relocatable shared fix" - patch_type: "portability" - - patch_file: "patches/1.7.0-0004-mingw-override-CC-CXX-AR-from-env.patch" - patch_description: "Mingw Override CC CXX AR from env Fix" - patch_type: "portability" - "1.7.0": - - patch_file: "patches/1.7.0-0001-platform-android.mk.patch" - patch_description: "Android Fix" - patch_type: "portability" - - patch_file: "patches/1.7.0-0002-macos-relocatable-shared.patch" - patch_description: "Macos relocatable shared fix" - patch_type: "portability" - - patch_file: "patches/1.7.0-0004-mingw-override-CC-CXX-AR-from-env.patch" - patch_description: "Mingw Override CC CXX AR from env Fix" - patch_type: "portability" diff --git a/recipes/openh264/all/conanfile.py b/recipes/openh264/all/conanfile.py index 00cb4e7604b28..5b20e84d4fa4c 100644 --- a/recipes/openh264/all/conanfile.py +++ b/recipes/openh264/all/conanfile.py @@ -1,16 +1,18 @@ from conan import ConanFile from conan.tools.build import stdcpp_library from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file, chdir -from conan.tools.gnu import Autotools, AutotoolsToolchain -from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.files import copy, get, rmdir, rm, rename, replace_in_file from conan.tools.layout import basic_layout -from conan.tools.microsoft import check_min_vs, is_msvc, unix_path, msvc_runtime_flag +from conan.tools.microsoft import is_msvc +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.scm import Version +from conan.tools.meson import Meson, MesonToolchain +from conan.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.57.0" +required_conan_version = ">=1.54.0" class OpenH264Conan(ConanFile): @@ -31,16 +33,13 @@ class OpenH264Conan(ConanFile): "fPIC": True, } - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) - @property def _is_clang_cl(self): return self.settings.os == 'Windows' and self.settings.compiler == 'clang' - def export_sources(self): - export_conandata_patches(self) + @property + def _preserve_dll_name(self): + return (is_msvc(self) or self._is_clang_cl) and Version(self.version) <= "2.4.1" and self.options.shared def config_options(self): if self.settings.os == "Windows": @@ -54,137 +53,80 @@ def layout(self): basic_layout(self, src_folder="src") def build_requirements(self): - if self.settings.arch in ("x86", "x86_64"): - self.tool_requires("nasm/2.15.05") - if self._settings_build.os == "Windows": - self.win_bash = True - if not self.conf.get("tools.microsoft.bash:path", default=False, check_type=str): - self.tool_requires("msys2/cci.latest") - if is_msvc(self): - self.tool_requires("automake/1.16.5") + self.tool_requires("meson/1.4.1") + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/2.2.0") + if self.settings.arch in ["x86", "x86_64"]: + self.tool_requires("nasm/2.16.01") + + def validate(self): + if Version(self.version) <= "2.1.1" and self.settings.os in ["Android", "Macos"]: + # INFO: ../src/meson.build:86:2: ERROR: Problem encountered: FIXME: Unhandled system android + # INFO: ../src/meson.build:86:2: ERROR: Problem encountered: FIXME: Unhandled system darwin + raise ConanInvalidConfiguration(f"{self.ref} does not support {self.settings.os}. Try a newer version.") def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) - def _patch_sources(self): - if is_msvc(self): - replace_in_file(self, os.path.join(self.source_folder, "build", "platform-msvc.mk"), - "CFLAGS_OPT += -MT", - f"CFLAGS_OPT += -{msvc_runtime_flag(self)}") - replace_in_file(self, os.path.join(self.source_folder, "build", "platform-msvc.mk"), - "CFLAGS_DEBUG += -MTd -Gm", - f"CFLAGS_DEBUG += -{msvc_runtime_flag(self)} -Gm") - if self.settings.os == "Android": - replace_in_file(self, os.path.join(self.source_folder, "codec", "build", "android", "dec", "jni", "Application.mk"), - "APP_STL := stlport_shared", - f"APP_STL := {self.settings.compiler.libcxx}") - replace_in_file(self, os.path.join(self.source_folder, "codec", "build", "android", "dec", "jni", "Application.mk"), - "APP_PLATFORM := android-12", - f"APP_PLATFORM := {self._android_target}") - - @property - def _library_filename(self): - prefix = "" if (is_msvc(self) or self._is_clang_cl) else "lib" - if self.options.shared: - if is_apple_os(self): - suffix = ".dylib" - elif self.settings.os == "Windows": - suffix = ".dll" - else: - suffix = ".so" - else: - if is_msvc(self) or self._is_clang_cl: - suffix = ".lib" - else: - suffix = ".a" - return prefix + "openh264" + suffix - - @property - def _make_arch(self): - return { - "armv7": "arm", - "armv8": "arm64", - "x86": "i386", - }.get(str(self.settings.arch), str(self.settings.arch)) - - @property - def _android_target(self): - return f"android-{self.settings.os.api_level}" - - @property - def _make_args(self): - prefix = unix_path(self, os.path.abspath(self.package_folder)) - args = [ - f"ARCH={self._make_arch}", - f"PREFIX={prefix}" - ] - - if is_msvc(self) or self._is_clang_cl: - args.append("OS=msvc") - else: - if self.settings.os == "Windows": - args.append("OS=mingw_nt") - if self.settings.os == "Android": - libcxx = str(self.settings.compiler.libcxx) - stl_lib = f'$(NDKROOT)/sources/cxx-stl/llvm-libc++/libs/$(APP_ABI)/lib{"c++_static.a" if libcxx == "c++_static" else "c++_shared.so"}' \ - + "$(NDKROOT)/sources/cxx-stl/llvm-libc++/libs/$(APP_ABI)/libc++abi.a" - ndk_home = self.conf.get("tools.android:ndk_path") - args.extend([ - f"NDKLEVEL={self.settings.os.api_level}", - f"STL_LIB={stl_lib}", - "OS=android", - f"NDKROOT={ndk_home}", # not NDK_ROOT here - f"TARGET={self._android_target}", - "CCASFLAGS=$(CFLAGS) -fno-integrated-as", - ]) - - return args - def generate(self): env = VirtualBuildEnv(self) env.generate() - tc = AutotoolsToolchain(self) - tc.make_args.extend(self._make_args) - - if is_msvc(self): - tc.extra_cxxflags.append("-nologo") - if check_min_vs(self, "180", raise_invalid=False): - # https://github.com/conan-io/conan/issues/6514 - tc.extra_cxxflags.append("-FS") - # not needed during and after 2.3.1 - elif self.settings.compiler in ("apple-clang",): - if self.settings.arch in ("armv8",): - tc.extra_ldflags.append("-arch arm64") + tc = MesonToolchain(self) + tc.project_options["tests"] = "disabled" tc.generate() + def _patch_sources(self): + if self._preserve_dll_name: + # INFO: When generating with Meson, the library name is openh264-7.dll. This change preserves the old name openh264.dll + replace_in_file(self, os.path.join(self.source_folder, "meson.build"), "soversion: major_version,", "soversion: '',") + def build(self): - apply_conandata_patches(self) self._patch_sources() - autotools = Autotools(self) - with chdir(self, self.source_folder): - autotools.make(target=self._library_filename) + meson = Meson(self) + meson.configure() + meson.build() def package(self): - copy(self, pattern="LICENSE", dst=os.path.join( - self.package_folder, "licenses"), src=self.source_folder) - autotools = Autotools(self) - with chdir(self, self.source_folder): - autotools.make( - target=f'install-{"shared" if self.options.shared else "static-lib"}') + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + meson = Meson(self) + meson.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + # INFO: Version 2.1.1 installs both static and shared libraries using same target name + if Version(self.version) <= "2.1.1": + if self.options.shared: + rm(self, "*.a", os.path.join(self.package_folder, "lib")) + else: + rm(self, "*.so*", os.path.join(self.package_folder, "lib")) + rm(self, "*.dylib*", os.path.join(self.package_folder, "lib")) + rm(self, "*.dll", os.path.join(self.package_folder, "bin")) + rm(self, "openh264.lib", os.path.join(self.package_folder, "lib")) + + if is_msvc(self) or self._is_clang_cl: + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + if self._preserve_dll_name: + # INFO: Preserve same old library name as when building with Make on Windows but using Meson + rename(self, os.path.join(self.package_folder, "lib", "openh264.lib"), + os.path.join(self.package_folder, "lib", "openh264_dll.lib")) + else: + rename(self, os.path.join(self.package_folder, "lib", "libopenh264.a"), + os.path.join(self.package_folder, "lib", "openh264.lib")) fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.set_property("pkg_config_name", "openh264") - suffix = "_dll" if ( - is_msvc(self) or self._is_clang_cl) and self.options.shared else "" + suffix = "_dll" if self._preserve_dll_name else "" self.cpp_info.libs = [f"openh264{suffix}"] if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.system_libs.extend(["m", "pthread"]) if self.settings.os == "Android": self.cpp_info.system_libs.append("m") - libcxx = stdcpp_library(self) - if libcxx: - self.cpp_info.system_libs.append(libcxx) + if not self.options.shared: + libcxx = stdcpp_library(self) + if libcxx: + if self.settings.os == "Android" and libcxx == "c++_static": + # INFO: When builing for Android, need to link against c++abi too. Otherwise will get linkage errors: + # ld.lld: error: undefined symbol: operator new(unsigned long) + # >>> referenced by welsEncoderExt.cpp + self.cpp_info.system_libs.append("c++abi") + self.cpp_info.system_libs.append(libcxx) diff --git a/recipes/openh264/all/patches/1.7.0-0001-platform-android.mk.patch b/recipes/openh264/all/patches/1.7.0-0001-platform-android.mk.patch deleted file mode 100644 index 512d9a7cdfe3f..0000000000000 --- a/recipes/openh264/all/patches/1.7.0-0001-platform-android.mk.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- build/platform-android.mk -+++ build/platform-android.mk -@@ -38,23 +38,12 @@ - - TOOLCHAINPREFIX = $(shell NDK_PROJECT_PATH=$(SRC_PATH)/codec/build/android/dec make --no-print-dir -f $(NDKROOT)/build/core/build-local.mk DUMP_TOOLCHAIN_PREFIX APP_ABI=$(APP_ABI)) - --SYSROOT = $(NDKROOT)/platforms/android-$(NDKLEVEL)/arch-$(ARCH) --CXX = $(TOOLCHAINPREFIX)g++ --CC = $(TOOLCHAINPREFIX)gcc --AR = $(TOOLCHAINPREFIX)ar --CFLAGS += -DANDROID_NDK -fpic --sysroot=$(SYSROOT) -MMD -MP -+CFLAGS += -DANDROID_NDK -fpic -MMD -MP - CXXFLAGS += -fno-rtti -fno-exceptions --LDFLAGS += --sysroot=$(SYSROOT) - SHLDFLAGS = -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-soname,lib$(PROJECT_NAME).so - --ifneq ($(CXX),$(wildcard $(CXX))) --ifneq ($(CXX).exe,$(wildcard $(CXX).exe)) --$(error Compiler not found, bad NDKROOT or ARCH?) --endif --endif -- - STL_INCLUDES = \ -- -I$(NDKROOT)/sources/cxx-stl/stlport/stlport -+ -I$(NDKROOT)/sources/cxx-stl/llvm-libc++/include - STL_LIB = \ - $(NDKROOT)/sources/cxx-stl/stlport/libs/$(APP_ABI)/libstlport_static.a - diff --git a/recipes/openh264/all/patches/1.7.0-0002-macos-relocatable-shared.patch b/recipes/openh264/all/patches/1.7.0-0002-macos-relocatable-shared.patch deleted file mode 100644 index dc10d42f2255e..0000000000000 --- a/recipes/openh264/all/patches/1.7.0-0002-macos-relocatable-shared.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/build/platform-darwin.mk -+++ b/build/platform-darwin.mk -@@ -7,7 +7,7 @@ CURRENT_VERSION := 1.7.0 - COMPATIBILITY_VERSION := 1.7.0 - SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \ - -fno-common -headerpad_max_install_names -install_name \ -- $(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) -+ @rpath/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) - SHARED = -dynamiclib - SHARED += -current_version $(CURRENT_VERSION) -compatibility_version $(COMPATIBILITY_VERSION) - CFLAGS += -Wall -fPIC -MMD -MP diff --git a/recipes/openh264/all/patches/1.7.0-0004-mingw-override-CC-CXX-AR-from-env.patch b/recipes/openh264/all/patches/1.7.0-0004-mingw-override-CC-CXX-AR-from-env.patch deleted file mode 100644 index fd092924362ea..0000000000000 --- a/recipes/openh264/all/patches/1.7.0-0004-mingw-override-CC-CXX-AR-from-env.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- build/platform-mingw_nt.mk -+++ build/platform-mingw_nt.mk -@@ -13,3 +13,3 @@ --CC = x86_64-w64-mingw32-gcc --CXX = x86_64-w64-mingw32-g++ --AR = x86_64-w64-mingw32-ar -+CC ?= x86_64-w64-mingw32-gcc -+CXX ?= x86_64-w64-mingw32-g++ -+AR ?= x86_64-w64-mingw32-ar diff --git a/recipes/openh264/all/patches/2.1.1-0001-platform-android.mk.patch b/recipes/openh264/all/patches/2.1.1-0001-platform-android.mk.patch deleted file mode 100644 index 2fbaccb65a3c9..0000000000000 --- a/recipes/openh264/all/patches/2.1.1-0001-platform-android.mk.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- build/platform-android.mk -+++ build/platform-android.mk -@@ -40,14 +40,9 @@ - TOOLCHAIN_NAME = $(shell NDK_TOOLCHAIN_VERSION= NDK_PROJECT_PATH=$(SRC_PATH)/codec/build/android/dec make --no-print-dir -f $(NDKROOT)/build/core/build-local.mk DUMP_TOOLCHAIN_NAME APP_ABI=$(APP_ABI)) - GCC_TOOLCHAIN_PATH = $(shell dirname $(TOOLCHAINPREFIX) | xargs dirname ) - --SYSROOT = $(NDKROOT)/platforms/android-$(NDKLEVEL)/arch-$(ARCH) --CXX = $(TOOLCHAINPREFIX)g++ --CC = $(TOOLCHAINPREFIX)gcc --AR = $(TOOLCHAINPREFIX)ar --CFLAGS += -DANDROID_NDK -fpic --sysroot=$(SYSROOT) -MMD -MP -fstack-protector-all -+CFLAGS += -DANDROID_NDK -fpic -MMD -MP -fstack-protector-all - CFLAGS += -isystem $(NDKROOT)/sysroot/usr/include -isystem $(NDKROOT)/sysroot/usr/include/$(TOOLCHAIN_NAME) -D__ANDROID_API__=$(NDKLEVEL) - CXXFLAGS += -fno-rtti -fno-exceptions --LDFLAGS += --sysroot=$(SYSROOT) - SHLDFLAGS = -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-soname,lib$(PROJECT_NAME).so - UTSHLDFLAGS = -Wl,-soname,libut.so - diff --git a/recipes/openh264/all/patches/2.1.1-0002-macos-relocatable-shared.patch b/recipes/openh264/all/patches/2.1.1-0002-macos-relocatable-shared.patch deleted file mode 100644 index ae1867902a4ea..0000000000000 --- a/recipes/openh264/all/patches/2.1.1-0002-macos-relocatable-shared.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/build/platform-darwin.mk -+++ b/build/platform-darwin.mk -@@ -7,7 +7,7 @@ CURRENT_VERSION := 2.1.1 - COMPATIBILITY_VERSION := 2.1.0 - SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \ - -fno-common -headerpad_max_install_names -install_name \ -- $(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) -+ @rpath/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) - SHARED = -dynamiclib - SHARED += -current_version $(CURRENT_VERSION) -compatibility_version $(COMPATIBILITY_VERSION) - CFLAGS += -Wall -fPIC -MMD -MP -fstack-protector-all diff --git a/recipes/openh264/all/patches/2.3.1-0001-platform-android.mk.patch b/recipes/openh264/all/patches/2.3.1-0001-platform-android.mk.patch deleted file mode 100644 index 7b4564ae8dded..0000000000000 --- a/recipes/openh264/all/patches/2.3.1-0001-platform-android.mk.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- build/platform-android.mk -+++ build/platform-android.mk -@@ -40,14 +40,9 @@ - TOOLCHAIN_NAME = $(shell NDK_TOOLCHAIN_VERSION= NDK_PROJECT_PATH=$(SRC_PATH)/codec/build/android/dec make --no-print-dir -f $(NDKROOT)/build/core/build-local.mk DUMP_TOOLCHAIN_NAME APP_ABI=$(APP_ABI)) - GCC_TOOLCHAIN_PATH = $(shell dirname $(TOOLCHAINPREFIX) | xargs dirname ) - --SYSROOT = $(NDKROOT)/platforms/android-$(NDKLEVEL)/arch-$(ARCH) --CXX = $(TOOLCHAINPREFIX)g++ --CC = $(TOOLCHAINPREFIX)gcc --AR = $(TOOLCHAINPREFIX)ar --CFLAGS += -DANDROID_NDK -fpic --sysroot=$(SYSROOT) -MMD -MP -+CFLAGS += -DANDROID_NDK -fpic -MMD -MP - ifeq ($(USE_STACK_PROTECTOR), Yes) - CFLAGS += -fstack-protector-all - endif - CFLAGS += -isystem $(NDKROOT)/sysroot/usr/include -isystem $(NDKROOT)/sysroot/usr/include/$(TOOLCHAIN_NAME) -D__ANDROID_API__=$(NDKLEVEL) - CXXFLAGS += -fno-rtti -fno-exceptions --LDFLAGS += --sysroot=$(SYSROOT) - SHLDFLAGS = -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-soname,lib$(PROJECT_NAME).so - UTSHLDFLAGS = -Wl,-soname,libut.so - diff --git a/recipes/openh264/all/patches/2.3.1-0002-macos-relocatable-shared.patch b/recipes/openh264/all/patches/2.3.1-0002-macos-relocatable-shared.patch deleted file mode 100644 index 7b9b27ea4570a..0000000000000 --- a/recipes/openh264/all/patches/2.3.1-0002-macos-relocatable-shared.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/build/platform-darwin.mk -+++ b/build/platform-darwin.mk -@@ -7,7 +7,7 @@ CURRENT_VERSION := 2.3.1 - COMPATIBILITY_VERSION := 2.3.1 - SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \ - -fno-common -headerpad_max_install_names -install_name \ -- $(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) -+ @rpath/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) - SHARED = -dynamiclib - SHARED += -current_version $(CURRENT_VERSION) -compatibility_version $(COMPATIBILITY_VERSION) - CFLAGS += -Wall -fPIC -MMD -MP -stdlib=libc++ diff --git a/recipes/openh264/all/patches/2.4.1-0001-platform-android.mk.patch b/recipes/openh264/all/patches/2.4.1-0001-platform-android.mk.patch deleted file mode 100644 index 36191dbc4b074..0000000000000 --- a/recipes/openh264/all/patches/2.4.1-0001-platform-android.mk.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/build/platform-darwin.mk b/build/platform-darwin.mk -index 4c7dac6..f15fdb9 100644 ---- a/build/platform-darwin.mk -+++ b/build/platform-darwin.mk -@@ -7,7 +7,7 @@ CURRENT_VERSION := 2.4.1 - COMPATIBILITY_VERSION := 2.4.0 - SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \ - -fno-common -headerpad_max_install_names -install_name \ -- $(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) -+ @rpath/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER) - SHARED = -dynamiclib - SHARED += -current_version $(CURRENT_VERSION) -compatibility_version $(COMPATIBILITY_VERSION) - CFLAGS += -Wall -fPIC -MMD -MP diff --git a/recipes/openh264/all/test_package/conanfile.py b/recipes/openh264/all/test_package/conanfile.py index 1a1d9c4ff58f1..e845ae751a301 100644 --- a/recipes/openh264/all/test_package/conanfile.py +++ b/recipes/openh264/all/test_package/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.build import cross_building +from conan.tools.build import can_run from conan.tools.cmake import cmake_layout, CMake import os @@ -21,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not cross_building(self, skip_x64_x86=True): + if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/openh264/config.yml b/recipes/openh264/config.yml index 6c0919f84307e..db64052e6d83c 100644 --- a/recipes/openh264/config.yml +++ b/recipes/openh264/config.yml @@ -5,5 +5,3 @@ versions: folder: all "2.1.1": folder: all - "1.7.0": - folder: all diff --git a/recipes/openimageio/all/conandata.yml b/recipes/openimageio/all/conandata.yml index 4e74c06626a1e..7a399cb02ec7e 100644 --- a/recipes/openimageio/all/conandata.yml +++ b/recipes/openimageio/all/conandata.yml @@ -5,21 +5,21 @@ sources: "2.4.17.0": url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.4.17.0.tar.gz" sha256: "7fe81d8e5bce30cc4a212f020ac3cc4344e6b7c1c0842475e3a048515099c65c" - "2.5.6.0": - url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.6.0.tar.gz" - sha256: "bcfced40a25ef8576383b44d8bbe3732aa2b8efc7b8614482783d6f90378d307" - "2.5.9.0": - url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.9.0.tar.gz" - sha256: "b6a68e369bc475525eb843bdc0cb8adc910cc71000825f8db9b5e136166cdc78" "2.5.10.1": url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.10.1.tar.gz" sha256: "8f6a547f6a5d510737ba436f867043db537def65f0fdb14ec30e5a185b619f93" - "2.5.11.0": - url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.11.0.tar.gz" - sha256: "ebf1945e36679be55519d9f42a8f029c4a53d4efb4aaee3b10af6cdc93fb614b" "2.5.12.0": url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.12.0.tar.gz" sha256: "51ea3c309bad7381fd0d7ef793e93a72d8e0edaeff4ff329f4f21fb5de3d90bd" + "2.5.13.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.13.0.tar.gz" + sha256: "663d712e4623e5e083b4ad5c5046c7b8ba65dc73a5380e7cfc12f9950c90d217" + "2.5.13.1": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.13.1.tar.gz" + sha256: "0fbaec6c15215e11cf4545128c4d64eaa97b461cb9b5fb8a76f9a7d35c99e3df" + "2.5.14.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.14.0.tar.gz" + sha256: "0e74372c658f083820872311d126867f10d59b526a856672746de7b2c772034d" patches: "2.4.7.1": - patch_file: "patches/2.4.7.1-cmake-targets.patch" @@ -32,23 +32,23 @@ patches: - patch_file: "patches/2.4.17.0-cmake-targets.patch" patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" patch_type: "conan" - "2.5.6.0": - - patch_file: "patches/2.5.6.0-cmake-targets.patch" + "2.5.10.1": + - patch_file: "patches/2.5.10.1-cmake-targets.patch" patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" patch_type: "conan" - "2.5.9.0": - - patch_file: "patches/2.5.9.0-cmake-targets.patch" + "2.5.12.0": + - patch_file: "patches/2.5.12.0-cmake-targets.patch" patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" patch_type: "conan" - "2.5.10.1": - - patch_file: "patches/2.5.10.1-cmake-targets.patch" + "2.5.13.0": + - patch_file: "patches/2.5.12.0-cmake-targets.patch" patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" patch_type: "conan" - "2.5.11.0": - - patch_file: "patches/2.5.10.1-cmake-targets.patch" + "2.5.13.1": + - patch_file: "patches/2.5.12.0-cmake-targets.patch" patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" patch_type: "conan" - "2.5.12.0": - - patch_file: "patches/2.5.12.0-cmake-targets.patch" + "2.5.14.0": + - patch_file: "patches/2.5.14.0-cmake-targets.patch" patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" patch_type: "conan" diff --git a/recipes/openimageio/all/conanfile.py b/recipes/openimageio/all/conanfile.py index 6794e7f732e57..9c644aaaec97b 100644 --- a/recipes/openimageio/all/conanfile.py +++ b/recipes/openimageio/all/conanfile.py @@ -120,7 +120,7 @@ def requirements(self): if self.options.with_raw: self.requires("libraw/0.21.2") if self.options.with_openjpeg: - self.requires("openjpeg/2.5.0") + self.requires("openjpeg/2.5.2") if self.options.with_openvdb: self.requires("openvdb/8.0.1") if self.options.with_ptex: diff --git a/recipes/openimageio/all/patches/2.5.9.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.5.14.0-cmake-targets.patch similarity index 95% rename from recipes/openimageio/all/patches/2.5.9.0-cmake-targets.patch rename to recipes/openimageio/all/patches/2.5.14.0-cmake-targets.patch index 747b79bc8b544..859c8562899a5 100644 --- a/recipes/openimageio/all/patches/2.5.9.0-cmake-targets.patch +++ b/recipes/openimageio/all/patches/2.5.14.0-cmake-targets.patch @@ -1,5 +1,5 @@ diff --git CMakeLists.txt CMakeLists.txt -index 8125716a3..dd83c588f 100644 +index 3ff009229..d38941db0 100644 --- CMakeLists.txt +++ CMakeLists.txt @@ -154,7 +154,7 @@ endif () @@ -21,10 +21,10 @@ index 8125716a3..dd83c588f 100644 endif () diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake -index 3f73cd266..d03c906d1 100644 +index fe581e723..ab2fbb7f5 100644 --- src/cmake/externalpackages.cmake +++ src/cmake/externalpackages.cmake -@@ -45,14 +45,14 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) +@@ -48,14 +48,14 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) set (Boost_USE_STATIC_LIBS "${LINKSTATIC}") endif () @@ -47,7 +47,7 @@ index 3f73cd266..d03c906d1 100644 if (NOT USE_STD_FILESYSTEM) list (APPEND Boost_COMPONENTS filesystem) endif () -@@ -108,9 +108,9 @@ checked_find_package (OpenEXR REQUIRED +@@ -111,9 +111,9 @@ checked_find_package (OpenEXR REQUIRED # building against Imath/OpenEXR 3.x when there is still a system-level # install version of 2.x. include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) @@ -60,7 +60,7 @@ index 3f73cd266..d03c906d1 100644 if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) set (OIIO_USING_IMATH 3) else () -@@ -137,11 +137,15 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL +@@ -140,11 +140,15 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") # JPEG -- prefer JPEG-Turbo to regular libjpeg @@ -80,7 +80,7 @@ index 3f73cd266..d03c906d1 100644 endif () # Pugixml setup. Normally we just use the version bundled with oiio, but -@@ -157,7 +161,7 @@ else () +@@ -160,7 +164,7 @@ else () endif() # From pythonutils.cmake @@ -89,7 +89,7 @@ index 3f73cd266..d03c906d1 100644 if (USE_PYTHON) checked_find_package (pybind11 REQUIRED VERSION_MIN 2.4.2) endif () -@@ -167,110 +171,105 @@ endif () +@@ -170,111 +174,107 @@ endif () # Dependencies for optional formats and features. If these are not found, # we will continue building, but the related functionality will be disabled. @@ -172,8 +172,8 @@ index 3f73cd266..d03c906d1 100644 # For HEIF/HEIC/AVIF formats -checked_find_package (Libheif VERSION_MIN 1.3 -- RECOMMEND_MIN 1.7 -- RECOMMEND_MIN_REASON "for AVIF support") +- RECOMMEND_MIN 1.16 +- RECOMMEND_MIN_REASON "for orientation support") -if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) - message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") - set (Libheif_FOUND 0) @@ -214,7 +214,8 @@ index 3f73cd266..d03c906d1 100644 - DEFINITIONS -DUSE_OPENVDB=1) -if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) - message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") -- set (OpeVDB_FOUND 0) +- set (OpenVDB_FOUND 0) +- add_compile_definitions(DISABLE_OPENVDB=1) -endif () +if (USE_OPENJPEG) + checked_find_package (OpenJPEG REQUIRED @@ -237,6 +238,8 @@ index 3f73cd266..d03c906d1 100644 + VERSION_MIN 5.0 + DEPS TBB + DEFINITIONS -DUSE_OPENVDB=1) ++ # Upstream contains a version check to ensure that CXX 17 or newer is used with ++ # OpenVDB >= 10.1. This is ensured by the conanfile for openvdb +endif() -checked_find_package (WebP) @@ -275,7 +278,7 @@ index 3f73cd266..d03c906d1 100644 checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets) if (NOT Qt6_FOUND) checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL) -@@ -294,13 +293,13 @@ macro (find_or_download_robin_map) +@@ -298,13 +298,13 @@ macro (find_or_download_robin_map) # for an installed version. Still prefer a copy that seems to be # locally installed in this tree. if (NOT BUILD_ROBINMAP_FORCE) @@ -291,7 +294,7 @@ index 3f73cd266..d03c906d1 100644 message (STATUS "Downloading local Tessil/robin-map") set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") -@@ -318,7 +317,7 @@ macro (find_or_download_robin_map) +@@ -322,7 +322,7 @@ macro (find_or_download_robin_map) endif () set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") endif () @@ -300,7 +303,7 @@ index 3f73cd266..d03c906d1 100644 endmacro() find_or_download_robin_map () -@@ -337,7 +336,7 @@ macro (find_or_download_fmt) +@@ -341,7 +341,7 @@ macro (find_or_download_fmt) # for an installed version. Still prefer a copy that seems to be # locally installed in this tree. if (NOT BUILD_FMT_FORCE) @@ -309,7 +312,7 @@ index 3f73cd266..d03c906d1 100644 endif () # If an external copy wasn't found and we requested that missing # packages be built, or we we are forcing a local copy to be built, then -@@ -372,7 +371,7 @@ macro (find_or_download_fmt) +@@ -376,7 +376,7 @@ macro (find_or_download_fmt) set (fmt_VERSION "${FMT_VERSION_MAJOR}.${FMT_VERSION_MINOR}.${FMT_VERSION_PATCH}") list (APPEND CFP_ALL_BUILD_DEPS_FOUND "${pkgname} ${${pkgname}_VERSION}") else () @@ -404,7 +407,7 @@ index 5b6c30a85..e5bc55ef1 100644 else () message (WARNING "heif plugin will not be built") diff --git src/include/CMakeLists.txt src/include/CMakeLists.txt -index 7bec09739..3db17086f 100644 +index 18b7632a3..c558c4780 100644 --- src/include/CMakeLists.txt +++ src/include/CMakeLists.txt @@ -64,7 +64,8 @@ install (FILES ${detail_headers} diff --git a/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch deleted file mode 100644 index 7d45a41ba65a6..0000000000000 --- a/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch +++ /dev/null @@ -1,515 +0,0 @@ -diff --git CMakeLists.txt CMakeLists.txt -index 1ae61f6ae..5c4202395 100644 ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -154,7 +154,7 @@ endif () - add_definitions (-DOIIO_INTERNAL=1) - - list (APPEND CMAKE_MODULE_PATH -- "${PROJECT_SOURCE_DIR}/src/cmake/modules" -+ #"${PROJECT_SOURCE_DIR}/src/cmake/modules" - "${PROJECT_SOURCE_DIR}/src/cmake") - - include (GNUInstallDirs) -@@ -234,7 +234,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) - add_subdirectory (src/iinfo) - add_subdirectory (src/maketx) - add_subdirectory (src/oiiotool) -- add_subdirectory (src/testtex) -+ #add_subdirectory (src/testtex) - add_subdirectory (src/iv) - endif () - -diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake -index 3cfaedd57..f75fee7a3 100644 ---- src/cmake/externalpackages.cmake -+++ src/cmake/externalpackages.cmake -@@ -45,14 +45,14 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) - set (Boost_USE_STATIC_LIBS "${LINKSTATIC}") - endif () - --if (MSVC) -- # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: -- if (NOT Boost_USE_STATIC_LIBS) -- add_definitions (-DBOOST_ALL_DYN_LINK=1) -- endif () --endif () -- --set (Boost_COMPONENTS thread) -+#if (MSVC) -+# # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: -+# if (NOT Boost_USE_STATIC_LIBS) -+# add_definitions (-DBOOST_ALL_DYN_LINK=1) -+# endif () -+#endif () -+ -+set (Boost_COMPONENTS filesystem system thread container) - if (NOT USE_STD_FILESYSTEM) - list (APPEND Boost_COMPONENTS filesystem) - endif () -@@ -108,9 +108,9 @@ checked_find_package (OpenEXR REQUIRED - # building against Imath/OpenEXR 3.x when there is still a system-level - # install version of 2.x. - include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) --if (MSVC AND NOT LINKSTATIC) -- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? --endif () -+#if (MSVC AND NOT LINKSTATIC) -+# add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? -+#endif () - if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) - set (OIIO_USING_IMATH 3) - else () -@@ -137,11 +137,15 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL - "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") - - # JPEG -- prefer JPEG-Turbo to regular libjpeg --checked_find_package (libjpeg-turbo -- VERSION_MIN 2.1 -- DEFINITIONS -DUSE_JPEG_TURBO=1) --if (NOT TARGET libjpeg-turbo::jpeg) # Try to find the non-turbo version -+if (USE_JPEGTURBO) -+ checked_find_package (libjpeg-turbo REQUIRED -+ DEFINITIONS -DUSE_JPEG_TURBO=1 -+ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) -+ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) -+elseif (USE_JPEG) # Try to find the non-turbo version - checked_find_package (JPEG REQUIRED) -+else () -+ message(FATAL_ERROR "JPEG library was not found!") - endif () - - # Pugixml setup. Normally we just use the version bundled with oiio, but -@@ -157,112 +161,110 @@ else () - endif() - - # From pythonutils.cmake --find_python() -+#find_python() - - - ########################################################################### - # Dependencies for optional formats and features. If these are not found, - # we will continue building, but the related functionality will be disabled. - --checked_find_package (PNG) -+if (USE_LIBPNG) -+ checked_find_package (PNG REQUIRED) -+endif() - --checked_find_package (BZip2) # Used by ffmpeg and freetype --if (NOT BZIP2_FOUND) -- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? --endif () -+if (USE_FREETYPE) -+ checked_find_package (Freetype -+ DEFINITIONS -DUSE_FREETYPE=1 ) -+endif() - --checked_find_package (Freetype -- DEFINITIONS -DUSE_FREETYPE=1 ) -- --checked_find_package (OpenColorIO -- DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 -- # PREFER_CONFIG -- ) --if (OpenColorIO_FOUND) -- option (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS -- "For deveoper debugging/testing ONLY! Disable OCIO 2.2 builtin configs." OFF) -- if (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS OR "$ENV{OIIO_DISABLE_BUILTIN_OCIO_CONFIGS}") -- add_compile_definitions(OIIO_DISABLE_BUILTIN_OCIO_CONFIGS) -+if (USE_OPENCOLORIO) -+ checked_find_package (OpenColorIO -+ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 -+ # PREFER_CONFIG -+ ) -+ if (NOT OpenColorIO_FOUND) -+ set (OpenColorIO_FOUND 0) - endif () --else () -- set (OpenColorIO_FOUND 0) --endif () -- --checked_find_package (OpenCV 3.0 -- DEFINITIONS -DUSE_OPENCV=1) -+endif() -+if (USE_OPENCV) -+ checked_find_package (OpenCV 3.0 -+ DEFINITIONS -DUSE_OPENCV=1) -+endif() - - # Intel TBB --set (TBB_USE_DEBUG_BUILD OFF) --checked_find_package (TBB 2017 -- SETVARIABLES OIIO_TBB -- PREFER_CONFIG) -- --checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images --checked_find_package (FFmpeg VERSION_MIN 3.0) --checked_find_package (GIF -- VERSION_MIN 4 -- RECOMMEND_MIN 5.0 -- RECOMMEND_MIN_REASON "for stability and thread safety") -+if (USE_TBB)# Intel TBB -+ set (TBB_USE_DEBUG_BUILD OFF) -+ checked_find_package (TBB 2017 -+ SETVARIABLES OIIO_TBB -+ PREFER_CONFIG) -+endif() -+if (USE_DCMTK) -+ checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images -+endif() -+if (USE_FFMPEG) -+ checked_find_package (ffmpeg VERSION_MIN 3.0) -+endif() -+if (USE_GIF) -+ checked_find_package (GIF -+ VERSION_MIN 4 -+ RECOMMEND_MIN 5.0 -+ RECOMMEND_MIN_REASON "for stability and thread safety") -+endif() - - # For HEIF/HEIC/AVIF formats --checked_find_package (Libheif VERSION_MIN 1.3 -- RECOMMEND_MIN 1.7 -- RECOMMEND_MIN_REASON "for AVIF support") --if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) -- message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") -- set (Libheif_FOUND 0) --endif () -- --checked_find_package (LibRaw -- VERSION_MIN 0.18 -- PRINT LibRaw_r_LIBRARIES) --if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) -- message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") -- # Currently, we issue the above warning and let them take their chances. -- # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, -- # just uncomment the following two lines. -- # set (LibRaw_FOUND 0) -- # set (LIBRAW_FOUND 0) --endif () -+if (USE_LIBHEIF) -+ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 -+ RECOMMEND_MIN 1.7 -+ RECOMMEND_MIN_REASON "for AVIF support") -+endif() - --checked_find_package (OpenJPEG VERSION_MIN 2.0 -- RECOMMEND_MIN 2.2 -- RECOMMEND_MIN_REASON "for multithreading support") --# Note: Recent OpenJPEG versions have exported cmake configs, but we don't --# find them reliable at all, so we stick to our FindOpenJPEG.cmake module. -- --checked_find_package (OpenVDB -- VERSION_MIN 5.0 -- DEPS TBB -- DEFINITIONS -DUSE_OPENVDB=1) --if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) -- message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") -- set (OpeVDB_FOUND 0) --endif () -+if (USE_LIBRAW) -+ checked_find_package (LibRaw -+ RECOMMEND_MIN 0.18 -+ RECOMMEND_MIN_REASON "for ACES support and better camera metadata" -+ PRINT LibRaw_r_LIBRARIES) -+endif() - --checked_find_package (Ptex PREFER_CONFIG) --if (NOT Ptex_FOUND OR NOT Ptex_VERSION) -- # Fallback for inadequate Ptex exported configs. This will eventually -- # disappear when we can 100% trust Ptex's exports. -- unset (Ptex_FOUND) -- checked_find_package (Ptex) --endif () -+if (USE_OPENJPEG) -+ checked_find_package (OpenJPEG REQUIRED -+ VERSION_MIN 2.0 -+ RECOMMEND_MIN 2.2 -+ RECOMMEND_MIN_REASON "for multithreading support") -+ # Note: Recent OpenJPEG versions have exported cmake configs, but we don't -+ # find them reliable at all, so we stick to our FindOpenJPEG.cmake module. -+endif() -+if (USE_OPENVDB) -+ checked_find_package (OpenVDB REQUIRED -+ VERSION_MIN 5.0 -+ DEPS TBB -+ DEFINITIONS -DUSE_OPENVDB=1) -+endif() - --checked_find_package (WebP) -+if (USE_PTEX) -+ checked_find_package (ptex PREFER_CONFIG) -+endif() -+ -+if (USE_LIBWEBP) -+ checked_find_package (WebP REQUIRED) -+endif() - - option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) --checked_find_package (R3DSDK) # RED camera -+if (USE_R3DSDK) -+ checked_find_package (R3DSDK REQUIRED) # RED camera -+endif () - - set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") --checked_find_package (Nuke) -+if (USE_NUKE) -+ checked_find_package (Nuke REQUIRED) -+endif () - - - # Qt -- used for iv - option (USE_QT "Use Qt if found" ON) --if (USE_QT) -- checked_find_package (OpenGL) # used for iv -+if (USE_OPENGL) -+ checked_find_package (OpenGL REQUIRED) # used for iv - endif () --if (USE_QT AND OPENGL_FOUND) -+if (USE_QT AND USE_OPENGL) - checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets) - if (NOT Qt6_FOUND) - checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL) -@@ -286,13 +288,13 @@ macro (find_or_download_robin_map) - # for an installed version. Still prefer a copy that seems to be - # locally installed in this tree. - if (NOT BUILD_ROBINMAP_FORCE) -- find_package (Robinmap QUIET) -+ find_package (tsl-robin-map REQUIRED) - endif () - # If an external copy wasn't found and we requested that missing - # packages be built, or we we are forcing a local copy to be built, then - # download and build it. - # Download the headers from github -- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) -+ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) - message (STATUS "Downloading local Tessil/robin-map") - set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") - set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") -@@ -310,7 +312,7 @@ macro (find_or_download_robin_map) - endif () - set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") - endif () -- checked_find_package (Robinmap REQUIRED) -+ checked_find_package (tsl-robin-map REQUIRED) - endmacro() - - -@@ -332,7 +334,7 @@ macro (find_or_download_fmt) - # If an external copy wasn't found and we requested that missing - # packages be built, or we we are forcing a local copy to be built, then - # download and build it. -- if ((BUILD_MISSING_FMT AND NOT FMT_FOUND) OR BUILD_FMT_FORCE) -+ if ((BUILD_MISSING_FMT AND NOT fmt_FOUND) OR BUILD_FMT_FORCE) - message (STATUS "Downloading local fmtlib/fmt") - set (FMT_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/fmt") - set (FMT_GIT_REPOSITORY "https://github.com/fmtlib/fmt") -diff --git src/ffmpeg.imageio/CMakeLists.txt src/ffmpeg.imageio/CMakeLists.txt -index 8e47a8443..e1a1987fe 100644 ---- src/ffmpeg.imageio/CMakeLists.txt -+++ src/ffmpeg.imageio/CMakeLists.txt -@@ -2,7 +2,7 @@ - # SPDX-License-Identifier: Apache-2.0 - # https://github.com/AcademySoftwareFoundation/OpenImageIO - --if (FFmpeg_FOUND) -+if (USE_FFMPEG) - if (LINKSTATIC) - set (_static_suffixes .lib .a) - set (_static_libraries_found 0) -@@ -26,11 +26,9 @@ if (FFmpeg_FOUND) - endif() - - add_oiio_plugin (ffmpeginput.cpp -- INCLUDE_DIRS ${FFMPEG_INCLUDES} -- LINK_LIBRARIES ${FFMPEG_LIBRARIES} -- ${BZIP2_LIBRARIES} -+ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale - DEFINITIONS "-DUSE_FFMPEG" -- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") -+ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") - else() - message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") - endif() -diff --git src/heif.imageio/CMakeLists.txt src/heif.imageio/CMakeLists.txt -index 5b6c30a85..17b0243a1 100644 ---- src/heif.imageio/CMakeLists.txt -+++ src/heif.imageio/CMakeLists.txt -@@ -2,32 +2,32 @@ - # SPDX-License-Identifier: Apache-2.0 - # https://github.com/AcademySoftwareFoundation/OpenImageIO - --if (Libheif_FOUND) -- if (LINKSTATIC) -- set (_static_suffixes .lib .a) -- set (_static_libraries_found 0) -+if (USE_LIBHEIF) -+ # if (LINKSTATIC) -+ # set (_static_suffixes .lib .a) -+ # set (_static_libraries_found 0) - -- foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) -- get_filename_component (_ext ${_libeheif_library} LAST_EXT) -- list (FIND _static_suffixes ${_ext} _index) -- if (${_index} GREATER -1) -- MATH (EXPR _static_libraries_found "${static_libraries_found}+1") -- endif() -- endforeach() -+ # foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) -+ # get_filename_component (_ext ${_libeheif_library} LAST_EXT) -+ # list (FIND _static_suffixes ${_ext} _index) -+ # if (${_index} GREATER -1) -+ # MATH (EXPR _static_libraries_found "${static_libraries_found}+1") -+ # endif() -+ # endforeach() - -- if (${_static_libraries_found} GREATER 0) -- message (STATUS "${ColorYellow}") -- message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") -- message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") -- message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") -- message (STATUS "dynamically-linked libheif.") -- message ("${ColorReset}") -- endif() -- endif() -+ # if (${_static_libraries_found} GREATER 0) -+ # message (STATUS "${ColorYellow}") -+ # message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") -+ # message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") -+ # message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") -+ # message (STATUS "dynamically-linked libheif.") -+ # message ("${ColorReset}") -+ # endif() -+ # endif() - - add_oiio_plugin (heifinput.cpp heifoutput.cpp -- INCLUDE_DIRS ${LIBHEIF_INCLUDES} -- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} -+ #INCLUDE_DIRS ${LIBHEIF_INCLUDES} -+ LINK_LIBRARIES libheif::heif - DEFINITIONS "-DUSE_HEIF=1") - else () - message (WARNING "heif plugin will not be built") -diff --git src/include/CMakeLists.txt src/include/CMakeLists.txt -index 006cb65a7..a4ecf23c7 100644 ---- src/include/CMakeLists.txt -+++ src/include/CMakeLists.txt -@@ -65,6 +65,7 @@ install (FILES ${detail_headers} - COMPONENT developer) - - if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) -+ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") - set (fmt_headers - ${FMT_INCLUDES}/fmt/core.h - ${FMT_INCLUDES}/fmt/format-inl.h -@@ -74,8 +75,8 @@ if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) - if (fmt_VERSION VERSION_GREATER_EQUAL 90000) - list (APPEND fmt_headers ${FMT_INCLUDES}/fmt/std.h) - endif () -- file (COPY ${fmt_headers} -- DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) -+ #file (COPY ${fmt_headers} -+ # DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) - else () - set (fmt_headers - ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt/format.h -diff --git src/include/OpenImageIO/detail/fmt.h src/include/OpenImageIO/detail/fmt.h -index b4f5e7da4..a990f83d4 100644 ---- src/include/OpenImageIO/detail/fmt.h -+++ src/include/OpenImageIO/detail/fmt.h -@@ -58,9 +58,9 @@ OIIO_PRAGMA_WARNING_PUSH - # pragma GCC diagnostic ignored "-Wtautological-constant-compare" - #endif - --#include --#include --#include -+#include -+#include -+#include - - OIIO_PRAGMA_WARNING_POP - -diff --git src/jpeg2000.imageio/CMakeLists.txt src/jpeg2000.imageio/CMakeLists.txt -index 560e8d486..402d4adad 100644 ---- src/jpeg2000.imageio/CMakeLists.txt -+++ src/jpeg2000.imageio/CMakeLists.txt -@@ -4,8 +4,7 @@ - - if (OPENJPEG_FOUND) - add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp -- INCLUDE_DIRS ${OPENJPEG_INCLUDES} -- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} -+ LINK_LIBRARIES openjp2 - DEFINITIONS "-DUSE_OPENJPEG") - else() - message (WARNING "Jpeg-2000 plugin will not be built") -diff --git src/libOpenImageIO/CMakeLists.txt src/libOpenImageIO/CMakeLists.txt -index 9972a7150..683a66238 100644 ---- src/libOpenImageIO/CMakeLists.txt -+++ src/libOpenImageIO/CMakeLists.txt -@@ -145,7 +145,6 @@ target_link_libraries (OpenImageIO - ${OPENIMAGEIO_IMATH_TARGETS} - PRIVATE - ${OPENIMAGEIO_OPENEXR_TARGETS} -- ${OpenCV_LIBRARIES} - ${format_plugin_libs} # Add all the target link libraries from the plugins - $ - $ -@@ -153,12 +152,19 @@ target_link_libraries (OpenImageIO - $ - ${BZIP2_LIBRARIES} - ZLIB::ZLIB -- $ -+ tsl::robin_map -+ Boost::filesystem Boost::thread Boost::system Boost::container - ${CMAKE_DL_LIBS} - ) - --if (FREETYPE_FOUND) -- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) -+if (USE_OPENCV) -+ target_link_libraries (OpenImageIO PRIVATE opencv::opencv_core -+ opencv::opencv_imgproc -+ opencv::opencv_videoio) -+endif () -+ -+if (USE_FREETYPE) -+ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) - endif() - - if (WIN32) -diff --git src/libutil/CMakeLists.txt src/libutil/CMakeLists.txt -index 10cc4b0c4..bb632d99a 100644 ---- src/libutil/CMakeLists.txt -+++ src/libutil/CMakeLists.txt -@@ -20,9 +20,9 @@ target_link_libraries (OpenImageIO_Util - ${GCC_ATOMIC_LIBRARIES} - ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} - ${OPENIMAGEIO_IMATH_TARGETS} -+ fmt::fmt - PRIVATE -- $ -- $ -+ Boost::filesystem Boost::thread Boost::system - $ - ${CMAKE_DL_LIBS} - ) -diff --git src/ptex.imageio/CMakeLists.txt src/ptex.imageio/CMakeLists.txt -index ed42f1c94..82d2b9770 100644 ---- src/ptex.imageio/CMakeLists.txt -+++ src/ptex.imageio/CMakeLists.txt -@@ -2,8 +2,9 @@ - # SPDX-License-Identifier: Apache-2.0 - # https://github.com/AcademySoftwareFoundation/OpenImageIO - --if (Ptex_FOUND) -+if (USE_PTEX) - add_oiio_plugin (ptexinput.cpp -- LINK_LIBRARIES Ptex::Ptex_dynamic ZLIB::ZLIB -+ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB -+ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} - DEFINITIONS "-DUSE_PTEX") - endif () diff --git a/recipes/openimageio/config.yml b/recipes/openimageio/config.yml index ec42f230247fb..66bdf8b724be0 100644 --- a/recipes/openimageio/config.yml +++ b/recipes/openimageio/config.yml @@ -3,13 +3,13 @@ versions: folder: all "2.4.17.0": folder: all - "2.5.6.0": + "2.5.10.1": folder: all - "2.5.9.0": + "2.5.12.0": folder: all - "2.5.10.1": + "2.5.13.0": folder: all - "2.5.11.0": + "2.5.13.1": folder: all - "2.5.12.0": + "2.5.14.0": folder: all diff --git a/recipes/openjdk/all/conanfile.py b/recipes/openjdk/all/conanfile.py index 33d8977b70cc4..6e6220a975840 100644 --- a/recipes/openjdk/all/conanfile.py +++ b/recipes/openjdk/all/conanfile.py @@ -16,6 +16,8 @@ class OpenJDK(ConanFile): license = "GPL-2.0-only WITH Classpath-exception-2.0", "GPL-2.0-only WITH OpenJDK-assembly-exception-1.0" topics = ("java", "jdk", "openjdk") settings = "os", "arch", "compiler", "build_type" + upload_policy = "skip" + build_policy = "missing" def package_id(self): del self.info.settings.compiler @@ -23,7 +25,7 @@ def package_id(self): def configure(self): self.settings.rm_safe("os.version") - + def validate(self): if Version(self.version) < "19.0.2" and self.settings.arch != "x86_64": raise ConanInvalidConfiguration("Unsupported Architecture. This package currently only supports x86_64.") diff --git a/recipes/openmesh/all/conandata.yml b/recipes/openmesh/all/conandata.yml index a2b42f64b8c89..118a4fc6160df 100644 --- a/recipes/openmesh/all/conandata.yml +++ b/recipes/openmesh/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "11.0": + url: "https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/11.0/OpenMesh-11.0.0.tar.bz2" + sha256: "9d22e65bdd6a125ac2043350a019ec4346ea83922cafdf47e125a03c16f6fa07" "10.0": url: "https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/10.0/OpenMesh-10.0.0.tar.bz2" sha256: "af22520a474bb6a3b355eb0867449c6b995126f97632d1ee5ff9c7ebd322fedb" @@ -9,6 +12,8 @@ sources: url: "https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/8.1/OpenMesh-8.1.tar.gz" sha256: "0953777f483d47ea9fa00c329838443a7a09dde8be77bf7de188001cb9e768a7" patches: + "11.0": + - patch_file: "patches/cmake-install_9.0.patch" "10.0": - patch_file: "patches/cmake-install_9.0.patch" - patch_file: "patches/restore-cxx11-compatibility.patch" diff --git a/recipes/openmesh/config.yml b/recipes/openmesh/config.yml index a5f8255a5ed2a..bc3b698019ee1 100644 --- a/recipes/openmesh/config.yml +++ b/recipes/openmesh/config.yml @@ -1,4 +1,6 @@ versions: + "11.0": + folder: all "10.0": folder: all "9.0": diff --git a/recipes/openmpi/all/conandata.yml b/recipes/openmpi/all/conandata.yml index 4580e17ba76a3..7211bc311a719 100644 --- a/recipes/openmpi/all/conandata.yml +++ b/recipes/openmpi/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.1.6": + url: "https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.6.tar.bz2" + sha256: "f740994485516deb63b5311af122c265179f5328a0d857a567b85db00b11e415" "4.1.0": - sha256: 73866fb77090819b6a8c85cb8539638d37d6877455825b74e289d647a39fd5b5 - url: https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.0.tar.bz2 + url: "https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.0.tar.bz2" + sha256: "73866fb77090819b6a8c85cb8539638d37d6877455825b74e289d647a39fd5b5" diff --git a/recipes/openmpi/all/conanfile.py b/recipes/openmpi/all/conanfile.py index 26cc0e027159c..785217bcba3dc 100644 --- a/recipes/openmpi/all/conanfile.py +++ b/recipes/openmpi/all/conanfile.py @@ -1,97 +1,259 @@ -from conans import ConanFile, tools, AutoToolsBuildEnvironment -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.29.1" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.env import VirtualRunEnv +from conan.tools.files import copy, get, rm, rmdir, save, replace_in_file +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import unix_path + +required_conan_version = ">=1.53.0" class OpenMPIConan(ConanFile): name = "openmpi" - homepage = "https://www.open-mpi.org" - url = "https://github.com/conan-io/conan-center-index" - topics = ("conan", "mpi", "openmpi") description = "A High Performance Message Passing Library" license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.open-mpi.org" + topics = ("mpi", "openmpi") + provides = "mpi" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - "fortran": ["yes", "mpifh", "usempi", "usempi80", "no"] + "fortran": ["yes", "mpifh", "usempi", "usempi80", "no"], + "enable_cxx": [True, False], + "enable_cxx_exceptions": [True, False], + "with_verbs": [True, False], } default_options = { "shared": False, "fPIC": True, - "fortran": "no" + "fortran": "no", + "enable_cxx": False, + "enable_cxx_exceptions": False, + "with_verbs": False, } - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + if not self.options.enable_cxx: + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + del self.options.enable_cxx_exceptions + if is_apple_os(self): + # Unavailable due to dependency on libnl + del self.options.with_verbs + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + # OpenMPI public headers don't include anything besides stddef.h. + # transitive_headers=True is not needed for any dependencies. + self.requires("hwloc/2.10.0") + self.requires("zlib/[>=1.2.11 <2]") + if self.settings.os == "Linux": + self.requires("libnl/3.8.0") + if self.options.get_safe("with_verbs"): + self.requires("rdma-core/52.0") + + def validate(self): if self.settings.os == "Windows": + # Requires Cygwin or WSL raise ConanInvalidConfiguration("OpenMPI doesn't support Windows") - def requirements(self): - # FIXME : self.requires("libevent/2.1.12") - try to use libevent from conan - self.requires("zlib/1.2.11") + if self.version == "4.1.0" and is_apple_os(self) and self.settings.arch == "armv8": + # INFO: https://github.com/open-mpi/ompi/issues/8410 + raise ConanInvalidConfiguration(f"{self.ref} is not supported in Mac M1. Use a newer version.") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version - os.rename(extracted_dir, self._source_subfolder) - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self) - args = ["--disable-wrapper-rpath", "--disable-wrapper-runpath"] - if self.settings.build_type == "Debug": - args.append("--enable-debug") - if self.options.shared: - args.extend(["--enable-shared", "--disable-static"]) - else: - args.extend(["--enable-static", "--disable-shared"]) - args.append("--with-pic" if self.options.get_safe("fPIC", True) else "--without-pic") - args.append("--enable-mpi-fortran={}".format(str(self.options.fortran))) - args.append("--with-zlib={}".format(self.deps_cpp_info["zlib"].rootpath)) - args.append("--with-zlib-libdir={}".format(self.deps_cpp_info["zlib"].lib_paths[0])) - args.append("--datarootdir=${prefix}/res") - self._autotools.configure(args=args) - return self._autotools + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + def root(pkg): + return unix_path(self, self.dependencies[pkg].package_folder) + + def yes_no(v): + return "yes" if v else "no" + + tc = AutotoolsToolchain(self) + tc.configure_args += [ + f"--enable-mpi-fortran={self.options.fortran}", + f"--enable-mpi-cxx={yes_no(self.options.enable_cxx)}", + f"--enable-cxx-exceptions={yes_no(self.options.get_safe('enable_cxx_exceptions'))}", + f"--with-hwloc={root('hwloc')}", + f"--with-libnl={root('libnl') if not is_apple_os(self) else 'no'}", + f"--with-verbs={root('rdma-core') if self.options.get_safe('with_verbs') else 'no'}", + f"--with-zlib={root('zlib')}", + "--with-pic" if self.options.get_safe("fPIC", True) else "--without-pic", + "--disable-wrapper-rpath", + "--disable-wrapper-runpath", + "--exec-prefix=/", + "--datarootdir=${prefix}/res", + # Disable other external libraries explicitly + "--with-alps=no", # ALPS + "--with-cuda=no", # CUDA + "--with-fca=no", # FCA + "--with-gpfs=no", # Gpfs + "--with-hcoll=no", # hcoll + "--with-ime=no", # IME + "--with-lsf=no", # LSF + "--with-lustre=no", # Lustre + "--with-memkind=no", # memkind + "--with-moab=no", # Moab + "--with-mxm=no", # Mellanox MXM + "--with-ofi=no", # libfabric, TODO: enable once libfabric is available + "--with-pmi=no", # PMI + "--with-pmix=internal", # PMIx + "--with-portals4=no", # Portals4 + "--with-psm2=no", # PSM2 + "--with-psm=no", # PSM + "--with-pvfs2=no", # Pvfs2 + "--with-treematch=no", # TreeMatch + "--with-ucx=no", # UCX + "--with-valgrind=no", # Valgrind + "--with-x=no", # X11 + "--with-xpmem=no", # XPMEM + ] + if is_apple_os(self): + if self.settings.arch == "armv8": + tc.configure_args.append("--host=aarch64-apple-darwin") + tc.extra_ldflags.append("-arch arm64") + # macOS has no libnl + tc.configure_args.append("--enable-mca-no-build=reachable-netlink") + # libtool's libltdl is not really needed, OpenMPI provides its own equivalent. + # Not adding it as it fails to be detected by ./configure in some cases. + # https://github.com/open-mpi/ompi/blob/v4.1.6/opal/mca/dl/dl.h#L20-L25 + tc.configure_args.append("--with-libltdl=no") + tc.generate() + + deps = AutotoolsDeps(self) + deps.generate() + + # Needed for ./configure to find libhwloc.so and libibnetdisc.so + VirtualRunEnv(self).generate(scope="build") + + # TODO: might want to enable reproducible builds by setting + # $SOURCE_DATE_EPOCH, $USER and $HOSTNAME + + def _patch_sources(self): + # Not needed and fails with v5.0 due to additional Python dependencies + save(self, os.path.join(self.source_folder, "docs", "Makefile.in"), "all:\ninstall:\n") + # Workaround for trying to include VERSION from source dir due to a case-insensitive filesystem on macOS + # Based on https://github.com/macports/macports-ports/blob/22dded99ae76a287f04a9685bbc820ecaa397fea/science/openmpi/files/patch-configure.diff + replace_in_file(self, os.path.join(self.source_folder, "configure"), + "-I$(top_srcdir) ", "-idirafter$(top_srcdir) ") def build(self): - with tools.chdir(self._source_subfolder): - autotools = self._configure_autotools() - autotools.make() + self._patch_sources() + autotools = Autotools(self) + autotools.configure() + autotools.make() def package(self): - self.copy(pattern="LICENSE", src=self._source_subfolder, dst="licenses") - with tools.chdir(self._source_subfolder): - autotools = self._configure_autotools() - autotools.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.rmdir(os.path.join(self.package_folder, "etc")) - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "etc")) + rmdir(self, os.path.join(self.package_folder, "res", "man")) + rm(self, "*.la", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.libs = ['mpi', 'open-rte', 'open-pal'] + # Based on https://cmake.org/cmake/help/latest/module/FindMPI.html#variables-for-using-mpi + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "MPI") + # TODO: Use None when available as Conan feature. + self.cpp_info.set_property("pkg_config_name", "_ompi-do-not-use") + # TODO: export a .cmake module to correctly set all variables set by CMake's FindMPI.cmake + + requires = [ + "hwloc::hwloc", + "zlib::zlib", + ] if self.settings.os == "Linux": - self.cpp_info.system_libs = ["dl", "pthread", "rt", "util"] + requires.append("libnl::libnl") + if self.options.get_safe("with_verbs"): + requires.extend(["rdma-core::libibverbs", "rdma-core::librdmacm"]) + + # The components are modelled based on OpenMPI's pkg-config files - self.output.info("Creating MPI_HOME environment variable: {}".format(self.package_folder)) + # Run-time environment library + self.cpp_info.components["orte"].set_property("pkg_config_name", "orte") + self.cpp_info.components["orte"].libs = ["open-rte", "open-pal"] + self.cpp_info.components["orte"].includedirs.append(os.path.join("include", "openmpi")) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["orte"].system_libs = ["dl", "pthread", "rt", "util"] + self.cpp_info.components["orte"].cflags = ["-pthread"] + if self.options.get_safe("enable_cxx_exceptions"): + self.cpp_info.components["orte"].cflags.append("-fexceptions") + self.cpp_info.components["orte"].requires = requires + + self.cpp_info.components["ompi"].set_property("pkg_config_name", "ompi") + self.cpp_info.components["ompi"].libs = ["mpi"] + self.cpp_info.components["ompi"].requires = ["orte"] + + self.cpp_info.components["ompi-c"].set_property("pkg_config_name", "ompi-c") + self.cpp_info.components["ompi-c"].set_property("cmake_target_name", "MPI::MPI_C") + self.cpp_info.components["ompi-c"].requires = ["ompi"] + + self.cpp_info.components["ompitrace"].set_property("pkg_config_name", "ompitrace") + self.cpp_info.components["ompitrace"].libs = ["ompitrace"] + self.cpp_info.components["ompitrace"].requires = ["ompi"] + + if self.options.enable_cxx: + self.cpp_info.components["ompi-cxx"].set_property("pkg_config_name", "ompi-cxx") + self.cpp_info.components["ompi-cxx"].set_property("cmake_target_name", "MPI::MPI_CXX") + self.cpp_info.components["ompi-cxx"].libs = ["mpi_cxx"] + self.cpp_info.components["ompi-cxx"].requires = ["ompi"] + + if self.options.fortran != "no": + self.cpp_info.components["ompi-fort"].set_property("pkg_config_name", "ompi-fort") + self.cpp_info.components["ompi-fort"].set_property("cmake_target_name", "MPI::MPI_Fortran") + self.cpp_info.components["ompi-fort"].libs = ["mpi_mpifh"] + self.cpp_info.components["ompi-fort"].requires = ["ompi"] + # Aliases + self.cpp_info.components["ompi-f77"].set_property("pkg_config_name", "ompi-f77") + self.cpp_info.components["ompi-f77"].requires = ["ompi-fort"] + self.cpp_info.components["ompi-f90"].set_property("pkg_config_name", "ompi-f90") + self.cpp_info.components["ompi-f90"].requires = ["ompi-fort"] + + bin_folder = os.path.join(self.package_folder, "bin") + # Prepend to PATH to avoid a conflict with system MPI + self.runenv_info.prepend_path("PATH", bin_folder) + self.runenv_info.define_path("MPI_BIN", bin_folder) + self.runenv_info.define_path("MPI_HOME", self.package_folder) + self.runenv_info.define_path("OPAL_PREFIX", self.package_folder) + self.runenv_info.define_path("OPAL_EXEC_PREFIX", self.package_folder) + self.runenv_info.define_path("OPAL_LIBDIR", os.path.join(self.package_folder, "lib")) + self.runenv_info.define_path("OPAL_DATADIR", os.path.join(self.package_folder, "res")) + self.runenv_info.define_path("OPAL_DATAROOTDIR", os.path.join(self.package_folder, "res")) + + # TODO: Legacy, to be removed on Conan 2.0 + self.env_info.PATH.append(bin_folder) + self.env_info.MPI_BIN = bin_folder self.env_info.MPI_HOME = self.package_folder - self.output.info("Creating OPAL_PREFIX environment variable: {}".format(self.package_folder)) self.env_info.OPAL_PREFIX = self.package_folder - mpi_bin = os.path.join(self.package_folder, 'bin') - self.output.info("Creating MPI_BIN environment variable: {}".format(mpi_bin)) - self.env_info.MPI_BIN = mpi_bin - self.output.info("Appending PATH environment variable: {}".format(mpi_bin)) - self.env_info.PATH.append(mpi_bin) + self.env_info.OPAL_EXEC_PREFIX = self.package_folder + self.env_info.OPAL_LIBDIR = os.path.join(self.package_folder, "lib") + self.env_info.OPAL_DATADIR = os.path.join(self.package_folder, "res") + self.env_info.OPAL_DATAROOTDIR = os.path.join(self.package_folder, "res") + + self.cpp_info.names["cmake_find_package"] = "MPI" + self.cpp_info.names["cmake_find_package_multi"] = "MPI" + self.cpp_info.components["ompi-c"].names["cmake_find_package"] = "MPI_C" + if self.options.enable_cxx: + self.cpp_info.components["ompi-cxx"].names["cmake_find_package"] = "MPI_CXX" + if self.options.fortran != "no": + self.cpp_info.components["ompi-fort"].names["cmake_find_package"] = "MPI_Fortran" diff --git a/recipes/openmpi/all/test_package/CMakeLists.txt b/recipes/openmpi/all/test_package/CMakeLists.txt index d61f3c4bef33a..a166065f8b662 100644 --- a/recipes/openmpi/all/test_package/CMakeLists.txt +++ b/recipes/openmpi/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(MPI REQUIRED CONFIG) -find_package(MPI REQUIRED) - -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE MPI::MPI_C) diff --git a/recipes/openmpi/all/test_package/conanfile.py b/recipes/openmpi/all/test_package/conanfile.py index c63b947b1cb95..09ff6fcc3cc71 100644 --- a/recipes/openmpi/all/test_package/conanfile.py +++ b/recipes/openmpi/all/test_package/conanfile.py @@ -1,10 +1,20 @@ -from conans import ConanFile, CMake, tools import os +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + 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) @@ -12,7 +22,7 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - mpiexec = os.path.join(os.environ['MPI_BIN'], 'mpiexec') - command = '%s -mca plm_rsh_agent yes -np 2 %s' % (mpiexec, os.path.join("bin", "test_package")) - self.run(command, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + command = f"mpiexec -mca plm_rsh_agent yes {bin_path}" + self.run(command, env="conanrun") diff --git a/recipes/openmpi/all/test_package/test_package.c b/recipes/openmpi/all/test_package/test_package.c new file mode 100644 index 0000000000000..540ba2f9beacc --- /dev/null +++ b/recipes/openmpi/all/test_package/test_package.c @@ -0,0 +1,13 @@ +#include +#include + +#include + +int main(int argc, char* argv[]) +{ + char version[MPI_MAX_LIBRARY_VERSION_STRING] = {0}; + int len = 0; + MPI_Get_library_version(version, &len); + printf("MPI version: %s\n", version); + return EXIT_SUCCESS; +} diff --git a/recipes/openmpi/all/test_package/test_package.cpp b/recipes/openmpi/all/test_package/test_package.cpp deleted file mode 100644 index d6fa9065fdf2a..0000000000000 --- a/recipes/openmpi/all/test_package/test_package.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include - -int main(int argc, char* argv[]) -{ - MPI_Init(&argc, &argv); - - int rank; - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - if (rank == 0) { - int value = 17; - int result = MPI_Send(&value, 1, MPI_INT, 1, 0, MPI_COMM_WORLD); - if (result == MPI_SUCCESS) - std::cout << "Rank 0 OK!" << std::endl; - } else if (rank == 1) { - int value; - int result = MPI_Recv(&value, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE); - if (result == MPI_SUCCESS && value == 17) - std::cout << "Rank 1 OK!" << std::endl; - } - MPI_Finalize(); - return 0; -} diff --git a/recipes/openmpi/config.yml b/recipes/openmpi/config.yml index 702888c159594..b6ed9888d0176 100644 --- a/recipes/openmpi/config.yml +++ b/recipes/openmpi/config.yml @@ -1,3 +1,5 @@ versions: + "4.1.6": + folder: all "4.1.0": folder: all diff --git a/recipes/openslide/all/conandata.yml b/recipes/openslide/all/conandata.yml new file mode 100644 index 0000000000000..ca29cdf478653 --- /dev/null +++ b/recipes/openslide/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "4.0.0": + url: "https://github.com/openslide/openslide/releases/download/v4.0.0/openslide-4.0.0.tar.xz" + sha256: "cc227c44316abb65fb28f1c967706eb7254f91dbfab31e9ae6a48db6cf4ae562" +patches: + "4.0.0": + - patch_file: "patches/0001-no-openslide-poison.patch" + patch_description: "Fix 'error__use__openslide_fclose_instead' compilation error" + patch_type: "backport" + patch_source: "https://github.com/openslide/openslide/commit/048865a3b61e9bc2b61219168d434b61e784d355" diff --git a/recipes/openslide/all/conanfile.py b/recipes/openslide/all/conanfile.py new file mode 100644 index 0000000000000..0557d9913ef70 --- /dev/null +++ b/recipes/openslide/all/conanfile.py @@ -0,0 +1,138 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rm, rmdir, export_conandata_patches, apply_conandata_patches +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 is_msvc + +required_conan_version = ">=1.53.0" + + +class OpenSlideConan(ConanFile): + name = "openslide" + description = "OpenSlide is a C library for reading whole slide image files (also known as virtual slides)" + license = "LGPL-2.1" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://openslide.org/" + topics = ("image", "pathology", "whole-slide-imaging", "slide-image", + # supported formats + "bif", "dicom", "dcm", "mrxs", "ndpi", "scn", "svs", "svslide", "tiff", "vms", "vmu") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "jpeg": ["libjpeg", "libjpeg-turbo", "mozjpeg"], + } + default_options = { + "shared": False, + "fPIC": True, + "jpeg": "libjpeg", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("cairo/1.18.0") + self.requires("gdk-pixbuf/2.42.10") + self.requires("glib/2.78.3") + self.requires("libdicom/1.0.5") + self.requires("libpng/[>=1.6 <2]") + self.requires("libtiff/4.6.0") + self.requires("libxml2/[>=2.12.5 <3]") + self.requires("openjpeg/2.5.2") + self.requires("sqlite3/3.45.3") + self.requires("zlib/[>=1.2.11 <2]") + if self.options.jpeg == "libjpeg": + self.requires("libjpeg/9e") + elif self.options.jpeg == "libjpeg-turbo": + self.requires("libjpeg-turbo/3.0.2") + elif self.options.jpeg == "mozjpeg": + self.requires("mozjpeg/4.1.5") + + def validate(self): + if is_msvc(self): + raise ConanInvalidConfiguration("OpenSlide requires GNU C extensions support and is not compatible with MSVC") + + def build_requirements(self): + self.tool_requires("meson/[>=1.2.3 <2]") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/[>=2.2 <3]") + self.tool_requires("glib/") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + venv = VirtualBuildEnv(self) + venv.generate() + tc = MesonToolchain(self) + tc.project_options["test"] = "disabled" + tc.project_options["doc"] = "disabled" + tc.generate() + deps = PkgConfigDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + meson = Meson(self) + meson.configure() + meson.build() + + def package(self): + copy(self, "COPYING.LESSER", self.source_folder, os.path.join(self.package_folder, "licenses")) + meson = Meson(self) + meson.install() + 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")) + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.libs = ["openslide"] + self.cpp_info.includedirs.append(os.path.join("include", "openslide")) + + if self.settings.os == "Macos": + self.cpp_info.frameworks = ["CoreText"] + + self.cpp_info.requires = [ + "cairo::cairo_", + "gdk-pixbuf::gdk-pixbuf", + "glib::gio-2.0", + "glib::glib-2.0", + "glib::gobject-2.0", + "libdicom::libdicom", + "libpng::libpng", + "libtiff::libtiff", + "libxml2::libxml2", + "openjpeg::openjpeg", + "sqlite3::sqlite3", + "zlib::zlib", + ] + if self.options.jpeg == "libjpeg": + self.cpp_info.requires.append("libjpeg::libjpeg") + elif self.options.jpeg == "libjpeg-turbo": + self.cpp_info.requires.append("libjpeg-turbo::jpeg") + elif self.options.jpeg == "mozjpeg": + self.cpp_info.requires.append("mozjpeg::libjpeg") diff --git a/recipes/openslide/all/patches/0001-no-openslide-poison.patch b/recipes/openslide/all/patches/0001-no-openslide-poison.patch new file mode 100644 index 0000000000000..00a38642d6421 --- /dev/null +++ b/recipes/openslide/all/patches/0001-no-openslide-poison.patch @@ -0,0 +1,308 @@ +From 048865a3b61e9bc2b61219168d434b61e784d355 Mon Sep 17 00:00:00 2001 +From: Benjamin Gilbert +Date: Mon, 12 Feb 2024 20:44:45 +0900 +Subject: [PATCH] Replace _OPENSLIDE_POISON() with pre-commit check + +Preprocessor macros are somewhat clunky as a way to prevent use of +forbidden functions. Now that we have pre-commit checks, use those +instead. Allow forbidden function calls in wrapper implementations by +ignoring call sites with "ci-allow" in a comment on the same line. + +Signed-off-by: Benjamin Gilbert +--- + .pre-commit-config.yaml | 29 +++++++++++++++++++++++++++++ + src/openslide-decode-sqlite.c | 10 +++------- + src/openslide-decode-tiff.c | 8 ++------ + src/openslide-file.c | 20 +++++++------------- + src/openslide-jdatasrc.c | 2 +- + src/openslide-private.h | 27 --------------------------- + src/openslide-util.c | 4 +--- + src/openslide-vendor-synthetic.c | 7 +++---- + 8 files changed, 46 insertions(+), 61 deletions(-) + +diff --git a/src/openslide-decode-sqlite.c b/src/openslide-decode-sqlite.c +index f75083df5..119b71b5a 100644 +--- a/src/openslide-decode-sqlite.c ++++ b/src/openslide-decode-sqlite.c +@@ -44,7 +44,6 @@ static int profile_callback(unsigned trace_type G_GNUC_UNUSED, + return 0; + } + +-#undef sqlite3_open_v2 + static sqlite3 *do_open(const char *filename, int flags, GError **err) { + sqlite3 *db; + +@@ -55,7 +54,7 @@ static sqlite3 *do_open(const char *filename, int flags, GError **err) { + return NULL; + } + +- ret = sqlite3_open_v2(filename, &db, flags, NULL); ++ ret = sqlite3_open_v2(filename, &db, flags, NULL); // ci-allow + + if (ret) { + if (db) { +@@ -76,7 +75,6 @@ static sqlite3 *do_open(const char *filename, int flags, GError **err) { + + return db; + } +-#define sqlite3_open_v2 _OPENSLIDE_POISON(_openslide_sqlite_open) + + sqlite3 *_openslide_sqlite_open(const char *filename, GError **err) { + // ":" filename prefix is reserved. +@@ -131,12 +129,10 @@ void _openslide_sqlite_propagate_stmt_error(sqlite3_stmt *stmt, GError **err) { + _openslide_sqlite_propagate_error(sqlite3_db_handle(stmt), err); + } + +-#undef sqlite3_close + void _openslide_sqlite_close(sqlite3 *db) { +- // sqlite3_close() failures indicate a leaked resource, probably a ++ // sqlite3_close failures indicate a leaked resource, probably a + // prepared statement. +- if (sqlite3_close(db)) { ++ if (sqlite3_close(db)) { // ci-allow + g_warning("SQLite error: %s", sqlite3_errmsg(db)); + } + } +-#define sqlite3_close _OPENSLIDE_POISON(_openslide_sqlite_close) +diff --git a/src/openslide-decode-tiff.c b/src/openslide-decode-tiff.c +index 0af196479..ed294f18f 100644 +--- a/src/openslide-decode-tiff.c ++++ b/src/openslide-decode-tiff.c +@@ -74,7 +74,6 @@ struct associated_image { + result = tmp; \ + } while (0) + +-#undef TIFFSetDirectory + bool _openslide_tiff_set_dir(TIFF *tiff, + tdir_t dir, + GError **err) { +@@ -82,14 +81,13 @@ bool _openslide_tiff_set_dir(TIFF *tiff, + // avoid libtiff unnecessarily rereading directory contents + return true; + } +- if (!TIFFSetDirectory(tiff, dir)) { ++ if (!TIFFSetDirectory(tiff, dir)) { // ci-allow + g_set_error(err, OPENSLIDE_ERROR, OPENSLIDE_ERROR_FAILED, + "Cannot set TIFF directory %d", dir); + return false; + } + return true; + } +-#define TIFFSetDirectory _OPENSLIDE_POISON(_openslide_tiff_set_dir) + + bool _openslide_tiff_level_init(TIFF *tiff, + tdir_t dir, +@@ -587,7 +585,6 @@ static toff_t tiff_do_size(thandle_t th) { + return hdl->size; + } + +-#undef TIFFClientOpen + static TIFF *tiff_open(struct _openslide_tiffcache *tc, GError **err) { + // open + g_autoptr(_openslide_file) f = _openslide_fopen(tc->filename, err); +@@ -646,7 +643,7 @@ static TIFF *tiff_open(struct _openslide_tiffcache *tc, GError **err) { + + // TIFFOpen + // mode: m disables mmap to avoid sigbus and other mmap fragility +- TIFF *tiff = TIFFClientOpen(tc->filename, "rm", hdl, ++ TIFF *tiff = TIFFClientOpen(tc->filename, "rm", hdl, // ci-allow + tiff_do_read, tiff_do_write, tiff_do_seek, + tiff_do_close, tiff_do_size, NULL, NULL); + if (tiff == NULL) { +@@ -656,7 +653,6 @@ static TIFF *tiff_open(struct _openslide_tiffcache *tc, GError **err) { + } + return tiff; + } +-#define TIFFClientOpen _OPENSLIDE_POISON(_openslide_tiffcache_get) + + struct _openslide_tiffcache *_openslide_tiffcache_create(const char *filename) { + struct _openslide_tiffcache *tc = g_new0(struct _openslide_tiffcache, 1); +diff --git a/src/openslide-file.c b/src/openslide-file.c +index 2763f3807..9eb9b1039 100644 +--- a/src/openslide-file.c ++++ b/src/openslide-file.c +@@ -22,7 +22,6 @@ + + #include + +-#define NO_POISON_FSEEKO + #include "openslide-private.h" + + #include +@@ -44,13 +43,8 @@ struct _openslide_dir { + GDir *dir; + }; + +-#undef fopen +-#undef fread +-#undef fclose +-#undef g_file_test +- + static void wrap_fclose(FILE *fp) { +- fclose(fp); ++ fclose(fp); // ci-allow + } + G_DEFINE_AUTOPTR_CLEANUP_FUNC(FILE, wrap_fclose) + +@@ -87,7 +81,7 @@ static FILE *do_fopen(const char *path, const char *mode, GError **err) { + io_error(err, "Couldn't open %s", path); + } + #else +- f = fopen(path, mode); ++ f = fopen(path, mode); // ci-allow + if (f == NULL) { + io_error(err, "Couldn't open %s", path); + } +@@ -132,7 +126,7 @@ size_t _openslide_fread(struct _openslide_file *file, void *buf, size_t size) { + char *bufp = buf; + size_t total = 0; + while (total < size) { +- size_t count = fread(bufp + total, 1, size - total, file->fp); ++ size_t count = fread(bufp + total, 1, size - total, file->fp); // ci-allow + if (count == 0) { + return total; + } +@@ -143,7 +137,7 @@ size_t _openslide_fread(struct _openslide_file *file, void *buf, size_t size) { + + bool _openslide_fseek(struct _openslide_file *file, off_t offset, int whence, + GError **err) { +- if (fseeko(file->fp, offset, whence)) { ++ if (fseeko(file->fp, offset, whence)) { // ci-allow + g_set_error(err, G_FILE_ERROR, g_file_error_from_errno(errno), + "%s", g_strerror(errno)); + return false; +@@ -152,7 +146,7 @@ bool _openslide_fseek(struct _openslide_file *file, off_t offset, int whence, + } + + off_t _openslide_ftell(struct _openslide_file *file, GError **err) { +- off_t ret = ftello(file->fp); ++ off_t ret = ftello(file->fp); // ci-allow + if (ret == -1) { + g_set_error(err, G_FILE_ERROR, g_file_error_from_errno(errno), + "%s", g_strerror(errno)); +@@ -179,12 +173,12 @@ off_t _openslide_fsize(struct _openslide_file *file, GError **err) { + } + + void _openslide_fclose(struct _openslide_file *file) { +- fclose(file->fp); ++ fclose(file->fp); // ci-allow + g_free(file); + } + + bool _openslide_fexists(const char *path, GError **err G_GNUC_UNUSED) { +- return g_file_test(path, G_FILE_TEST_EXISTS); ++ return g_file_test(path, G_FILE_TEST_EXISTS); // ci-allow + } + + struct _openslide_dir *_openslide_dir_open(const char *dirname, GError **err) { +diff --git a/src/openslide-jdatasrc.c b/src/openslide-jdatasrc.c +index 2ad068818..4de54eddf 100644 +--- a/src/openslide-jdatasrc.c ++++ b/src/openslide-jdatasrc.c +@@ -158,7 +158,7 @@ static void skip_input_data (j_decompress_ptr cinfo, long num_bytes) + { + struct jpeg_source_mgr * src = cinfo->src; + +- /* Just a dumb implementation for now. Could use fseek() except ++ /* Just a dumb implementation for now. Could use fseek except + * it doesn't work on pipes. Not clear that being smart is worth + * any trouble anyway --- large skips are infrequent. + */ +diff --git a/src/openslide-private.h b/src/openslide-private.h +index 5ae36939b..ed08f5ed7 100644 +--- a/src/openslide-private.h ++++ b/src/openslide-private.h +@@ -383,33 +383,6 @@ extern const int32_t _openslide_G_Cb[256]; + extern const int32_t _openslide_G_Cr[256]; + extern const int16_t _openslide_B_Cb[256]; + +-/* Prevent use of dangerous functions and functions with mandatory wrappers. +- Every @p replacement must be unique to avoid conflicting-type errors. */ +-#define _OPENSLIDE_POISON(replacement) error__use_ ## replacement ## _instead +-#define fopen _OPENSLIDE_POISON(_openslide_fopen) +-#define fread _OPENSLIDE_POISON(_openslide_fread) +-#define fseek _OPENSLIDE_POISON(_openslide_fseek) +-#define ftell _OPENSLIDE_POISON(_openslide_ftell) +-#define fclose _OPENSLIDE_POISON(_openslide_fclose) +-#define g_file_test _OPENSLIDE_POISON(_openslide_fexists) +-#define strtod _OPENSLIDE_POISON(_openslide_parse_double) +-#define g_ascii_strtod _OPENSLIDE_POISON(_openslide_parse_double_) +-#define sqlite3_open _OPENSLIDE_POISON(_openslide_sqlite_open) +-#define sqlite3_open_v2 _OPENSLIDE_POISON(_openslide_sqlite_open_) +-#define sqlite3_close _OPENSLIDE_POISON(_openslide_sqlite_close) +-#define TIFFClientOpen _OPENSLIDE_POISON(_openslide_tiffcache_get) +-#define TIFFFdOpen _OPENSLIDE_POISON(_openslide_tiffcache_get_) +-#define TIFFOpen _OPENSLIDE_POISON(_openslide_tiffcache_get__) +-#define TIFFSetDirectory _OPENSLIDE_POISON(_openslide_tiff_set_dir) +- +-#ifndef NO_POISON_FSEEKO +-// openslide-file.c needs the original macros +-#undef fseeko +-#undef ftello +-#define fseeko _OPENSLIDE_POISON(_openslide_fseek_) +-#define ftello _OPENSLIDE_POISON(_openslide_ftell_) +-#endif +- + #ifdef _WIN32 + // Prevent windows.h from defining the IN/OUT macro + #define _NO_W32_PSEUDO_MODIFIERS +diff --git a/src/openslide-util.c b/src/openslide-util.c +index 719953274..b85f9afa3 100644 +--- a/src/openslide-util.c ++++ b/src/openslide-util.c +@@ -170,7 +170,6 @@ void *_openslide_inflate_buffer(const void *src, int64_t src_len, + return g_steal_pointer(&dst); + } + +-#undef g_ascii_strtod + double _openslide_parse_double(const char *value) { + // Canonicalize comma to decimal point, since the locale of the + // originating system sometimes leaks into slide files. +@@ -180,14 +179,13 @@ double _openslide_parse_double(const char *value) { + + char *endptr; + errno = 0; +- double result = g_ascii_strtod(canonical, &endptr); ++ double result = g_ascii_strtod(canonical, &endptr); // ci-allow + // fail on overflow/underflow + if (canonical[0] == 0 || endptr[0] != 0 || errno == ERANGE) { + return NAN; + } + return result; + } +-#define g_ascii_strtod _OPENSLIDE_POISON(_openslide_parse_double) + + char *_openslide_format_double(double d) { + char buf[G_ASCII_DTOSTR_BUF_SIZE]; +diff --git a/src/openslide-vendor-synthetic.c b/src/openslide-vendor-synthetic.c +index e3a440569..79938a597 100644 +--- a/src/openslide-vendor-synthetic.c ++++ b/src/openslide-vendor-synthetic.c +@@ -204,7 +204,6 @@ static toff_t mem_tiff_size(thandle_t th) { + return mem->size; + } + +-#undef TIFFClientOpen + static bool decode_tiff(const void *data, uint32_t len, + uint32_t *dest, GError **err) { + // there's no reason for OpenSlide as a whole to support reading entire +@@ -216,8 +215,9 @@ static bool decode_tiff(const void *data, uint32_t len, + }; + // mode: m disables mmap to avoid sigbus and other mmap fragility + g_autoptr(TIFF) tiff = +- TIFFClientOpen("tiff", "rm", &mem, mem_tiff_read, mem_tiff_write, +- mem_tiff_seek, mem_tiff_close, mem_tiff_size, NULL, NULL); ++ TIFFClientOpen("tiff", "rm", &mem, mem_tiff_read, // ci-allow ++ mem_tiff_write, mem_tiff_seek, mem_tiff_close, ++ mem_tiff_size, NULL, NULL); + if (tiff == NULL) { + g_set_error(err, OPENSLIDE_ERROR, OPENSLIDE_ERROR_FAILED, + "Couldn't open TIFF"); +@@ -238,7 +238,6 @@ static bool decode_tiff(const void *data, uint32_t len, + + return _openslide_tiff_read_tile(&tiffl, tiff, dest, 0, 0, err); + } +-#define TIFFClientOpen _OPENSLIDE_POISON(_openslide_tiffcache_get) + + static bool decode_xml(const void *data, uint32_t len, + uint32_t *dest, GError **err) { diff --git a/recipes/openslide/all/test_package/conanfile.py b/recipes/openslide/all/test_package/conanfile.py new file mode 100644 index 0000000000000..2e3df45816e5a --- /dev/null +++ b/recipes/openslide/all/test_package/conanfile.py @@ -0,0 +1,32 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "PkgConfigDeps", "MesonToolchain", "VirtualRunEnv", "VirtualBuildEnv" + test_type = "explicit" + + def layout(self): + basic_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build_requirements(self): + self.tool_requires("meson/1.2.3") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.0.3") + + def build(self): + meson = Meson(self) + meson.configure() + meson.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/openslide/all/test_package/meson.build b/recipes/openslide/all/test_package/meson.build new file mode 100644 index 0000000000000..b22a34bfa7460 --- /dev/null +++ b/recipes/openslide/all/test_package/meson.build @@ -0,0 +1,5 @@ +project('test_package', 'c') +package_dep = dependency('openslide') +executable('test_package', + sources : ['test_package.c'], + dependencies : [package_dep]) diff --git a/recipes/openslide/all/test_package/test_package.c b/recipes/openslide/all/test_package/test_package.c new file mode 100644 index 0000000000000..ea806b718030d --- /dev/null +++ b/recipes/openslide/all/test_package/test_package.c @@ -0,0 +1,7 @@ +#include +#include + +int main() { + printf("OpenSlide version: %s\n", openslide_get_version()); + return 0; +} diff --git a/recipes/openslide/config.yml b/recipes/openslide/config.yml new file mode 100644 index 0000000000000..d2be8f453d7c0 --- /dev/null +++ b/recipes/openslide/config.yml @@ -0,0 +1,3 @@ +versions: + "4.0.0": + folder: all diff --git a/recipes/openssl/3.x.x/conandata.yml b/recipes/openssl/3.x.x/conandata.yml index 0e6fcf58a8a23..10986e398a3f8 100644 --- a/recipes/openssl/3.x.x/conandata.yml +++ b/recipes/openssl/3.x.x/conandata.yml @@ -1,16 +1,31 @@ sources: + 3.3.2: + url: "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz" + sha256: 2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281 + 3.3.1: + url: "https://github.com/openssl/openssl/releases/download/openssl-3.3.1/openssl-3.3.1.tar.gz" + sha256: 777cd596284c883375a2a7a11bf5d2786fc5413255efab20c50d6ffe6d020b7e + 3.2.3: + url: "https://github.com/openssl/openssl/releases/download/openssl-3.2.3/openssl-3.2.3.tar.gz" + sha256: 52b5f1c6b8022bc5868c308c54fb77705e702d6c6f4594f99a0df216acf46239 3.2.2: url: "https://github.com/openssl/openssl/releases/download/openssl-3.2.2/openssl-3.2.2.tar.gz" sha256: 197149c18d9e9f292c43f0400acaba12e5f52cacfe050f3d199277ea738ec2e7 3.2.1: url: "https://github.com/openssl/openssl/releases/download/openssl-3.2.1/openssl-3.2.1.tar.gz" sha256: 83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39 + 3.1.7: + url: "https://github.com/openssl/openssl/releases/download/openssl-3.1.7/openssl-3.1.7.tar.gz" + sha256: 053a31fa80cf4aebe1068c987d2ef1e44ce418881427c4464751ae800c31d06c 3.1.6: url: "https://github.com/openssl/openssl/releases/download/openssl-3.1.6/openssl-3.1.6.tar.gz" sha256: 5d2be4036b478ef3cb0a854ca9b353072c3a0e26d8a56f8f0ab9fb6ed32d38d7 3.1.5: url: "https://github.com/openssl/openssl/releases/download/openssl-3.1.5/openssl-3.1.5.tar.gz" sha256: 6ae015467dabf0469b139ada93319327be24b98251ffaeceda0221848dc09262 + 3.0.15: + url: "https://github.com/openssl/openssl/releases/download/openssl-3.0.15/openssl-3.0.15.tar.gz" + sha256: 23c666d0edf20f14249b3d8f0368acaee9ab585b09e1de82107c66e1f3ec9533 3.0.14: url: "https://github.com/openssl/openssl/releases/download/openssl-3.0.14/openssl-3.0.14.tar.gz" sha256: eeca035d4dd4e84fc25846d952da6297484afa0650a6f84c682e39df3a4123ca diff --git a/recipes/openssl/3.x.x/conanfile.py b/recipes/openssl/3.x.x/conanfile.py index 6b88374a14b20..711e03e2c27a9 100644 --- a/recipes/openssl/3.x.x/conanfile.py +++ b/recipes/openssl/3.x.x/conanfile.py @@ -6,6 +6,7 @@ from conan.tools.gnu import AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc, msvc_runtime_flag, unix_path +from conan.tools.scm import Version import fnmatch import os @@ -515,6 +516,14 @@ def _make(self): # When `--prefix=/`, the scripts derive `\` without escaping, which # causes issues on Windows replace_in_file(self, "Makefile", "INSTALLTOP_dir=\\", "INSTALLTOP_dir=\\\\") + if Version(self.version) >= "3.3.0": + # replace backslashes in paths with forward slashes + mkinstallvars_pl = os.path.join(self.source_folder, "util", "mkinstallvars.pl") + if Version(self.version) >= "3.3.2": + replace_in_file(self, mkinstallvars_pl, "push @{$values{$k}}, $v;", """$v =~ s|\\\\|/|g; push @{$values{$k}}, $v;""") + replace_in_file(self, mkinstallvars_pl, "$values{$k} = $v;", """$v->[0] =~ s|\\\\|/|g; $values{$k} = $v;""") + else: + replace_in_file(self, mkinstallvars_pl, "$ENV{$k} = $v;", """$v =~ s|\\\\|/|g; $ENV{$k} = $v;""") self._run_make() def _make_install(self): diff --git a/recipes/openssl/config.yml b/recipes/openssl/config.yml index 1ab48b68f1e65..9ada8cd7b7467 100644 --- a/recipes/openssl/config.yml +++ b/recipes/openssl/config.yml @@ -1,12 +1,22 @@ versions: + "3.3.2": + folder: "3.x.x" + "3.3.1": + folder: "3.x.x" + "3.2.3": + folder: "3.x.x" "3.2.2": folder: "3.x.x" "3.2.1": folder: "3.x.x" + "3.1.7": + folder: "3.x.x" "3.1.6": folder: "3.x.x" "3.1.5": folder: "3.x.x" + "3.0.15": + folder: "3.x.x" "3.0.14": folder: "3.x.x" "3.0.13": diff --git a/recipes/opentelemetry-cpp/all/conanfile.py b/recipes/opentelemetry-cpp/all/conanfile.py index 60940dcfcab3b..7d46d7427d052 100644 --- a/recipes/opentelemetry-cpp/all/conanfile.py +++ b/recipes/opentelemetry-cpp/all/conanfile.py @@ -110,7 +110,7 @@ def requirements(self): self.requires("ms-gsl/4.0.0") if self.options.with_abseil: - self.requires("abseil/20230125.3", transitive_headers=True) + self.requires("abseil/20230802.1", transitive_headers=True) if self.options.with_otlp_grpc or self.options.with_otlp_http: self.requires("protobuf/3.21.12", transitive_headers=True, transitive_libs=True) @@ -137,7 +137,7 @@ def requirements(self): if self.options.get_safe("with_jaeger"): self.requires("thrift/0.17.0") - self.requires("boost/1.84.0") + self.requires("boost/1.85.0") @property def _required_boost_components(self): diff --git a/recipes/openvino/all/conandata.yml b/recipes/openvino/all/conandata.yml index a47bfa540ad57..e7a253f3fb89e 100644 --- a/recipes/openvino/all/conandata.yml +++ b/recipes/openvino/all/conandata.yml @@ -1,4 +1,36 @@ sources: + "2024.3.0": + "openvino": + url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2024.3.0.tar.gz" + sha256: "53fccad05279d0975eca84ec75517a7c360be9b0f7bcd822da29a7949c12ce70" + "arm_compute": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v24.06.tar.gz" + sha256: "68e24589905638e406a98ad48236097ab30112f2849b35e196b7b1efb0ce74e6" + "onednn_cpu": + url: "https://github.com/openvinotoolkit/oneDNN/archive/f0f8defe2dff5058391f2a66e775e20b5de33b08.tar.gz" + sha256: "13bee5b8522177f297e095e3eba5948c1a7ee7a816d19d5a59ce0f717f82cedc" + "mlas": + url: "https://github.com/openvinotoolkit/mlas/archive/d1bc25ec4660cddd87804fcf03b2411b5dfb2e94.tar.gz" + sha256: "0a44fbfd4b13e8609d66ddac4b11a27c90c1074cde5244c91ad197901666004c" + "onednn_gpu": + url: "https://github.com/oneapi-src/oneDNN/archive/7ab8ee9adda866d675edeee7a3a6a29b2d0a1572.tar.gz" + sha256: "66363988363744e49fff55f4fcdb72318ff3f35fba6da68302c1662c837c22ac" + "2024.2.0": + "openvino": + url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2024.2.0.tar.gz" + sha256: "b624481efb7814cf2d98a29163c3b914fa2f23c1417289b13561d0b5e32fc67c" + "arm_compute": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v24.04.tar.gz" + sha256: "6d7aebfa9be74d29ecd2dbeb17f69e00c667c36292401f210121bf26a30b38a5" + "onednn_cpu": + url: "https://github.com/openvinotoolkit/oneDNN/archive/373e65b660c0ba274631cf30c422f10606de1618.tar.gz" + sha256: "c205b81f9024952c742e765090556a18c9463fff245753a2afa42c344bd6379d" + "mlas": + url: "https://github.com/openvinotoolkit/mlas/archive/d1bc25ec4660cddd87804fcf03b2411b5dfb2e94.tar.gz" + sha256: "0a44fbfd4b13e8609d66ddac4b11a27c90c1074cde5244c91ad197901666004c" + "onednn_gpu": + url: "https://github.com/oneapi-src/oneDNN/archive/37f48519b87cf8b5e5ef2209340a1948c3e87d72.tar.gz" + sha256: "58131e094408460f88bf941977b5206232dc2bc8dbf227250d1e2236b43153a5" "2024.1.0": "openvino": url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2024.1.0.tar.gz" diff --git a/recipes/openvino/all/conanfile.py b/recipes/openvino/all/conanfile.py index fca46b7f10736..0a4c1e9f4440b 100644 --- a/recipes/openvino/all/conanfile.py +++ b/recipes/openvino/all/conanfile.py @@ -270,10 +270,9 @@ def validate_build(self): if self.settings.os == "Emscripten": raise ConanInvalidConfiguration(f"{self.ref} does not support Emscripten") - # TODO: resolve it later, since it is not critical for now - # Conan Center CI fails with our of memory error when building OpenVINO - if self.settings.build_type == "Debug": - raise ConanInvalidConfiguration(f"{self.ref} does not support Debug build type") + # Failing on Conan Center CI due to memory usage + if os.getenv("CONAN_CENTER_BUILD_SERVICE") and self.settings.build_type == "Debug": + raise ConanInvalidConfiguration(f"{self.ref} does not support Debug build type on Conan Center CI") def validate(self): if self.options.get_safe("enable_gpu") and not self.options.shared and self.options.enable_cpu: @@ -349,11 +348,13 @@ def package_info(self): openvino_runtime.libs.extend(["openvino_onnx_frontend", "openvino_onnx_common"]) openvino_runtime.requires.extend(["protobuf::libprotobuf", "onnx::onnx"]) if self.options.enable_tf_frontend: - openvino_runtime.libs.extend(["openvino_tensorflow_frontend", "openvino_tensorflow_common"]) + openvino_runtime.libs.extend(["openvino_tensorflow_frontend"]) openvino_runtime.requires.extend(["protobuf::libprotobuf", "snappy::snappy"]) if self.options.enable_tf_lite_frontend: - openvino_runtime.libs.extend(["openvino_tensorflow_lite_frontend", "openvino_tensorflow_common"]) + openvino_runtime.libs.extend(["openvino_tensorflow_lite_frontend"]) openvino_runtime.requires.extend(["flatbuffers::flatbuffers"]) + if self.options.enable_tf_frontend or self.options.enable_tf_lite_frontend: + openvino_runtime.libs.extend(["openvino_tensorflow_common"]) if self.options.enable_paddle_frontend: openvino_runtime.libs.append("openvino_paddle_frontend") openvino_runtime.requires.append("protobuf::libprotobuf") diff --git a/recipes/openvino/all/dependencies/dependencies-2024.2.0.yml b/recipes/openvino/all/dependencies/dependencies-2024.2.0.yml new file mode 100644 index 0000000000000..f99604741682a --- /dev/null +++ b/recipes/openvino/all/dependencies/dependencies-2024.2.0.yml @@ -0,0 +1 @@ +onnx: "1.15.0" diff --git a/recipes/openvino/all/dependencies/dependencies-2024.3.0.yml b/recipes/openvino/all/dependencies/dependencies-2024.3.0.yml new file mode 100644 index 0000000000000..f99604741682a --- /dev/null +++ b/recipes/openvino/all/dependencies/dependencies-2024.3.0.yml @@ -0,0 +1 @@ +onnx: "1.15.0" diff --git a/recipes/openvino/config.yml b/recipes/openvino/config.yml index 511bd030e9af6..6e20b31cea112 100644 --- a/recipes/openvino/config.yml +++ b/recipes/openvino/config.yml @@ -1,4 +1,8 @@ versions: + "2024.3.0": + folder: "all" + "2024.2.0": + folder: "all" "2024.1.0": folder: "all" "2024.0.0": diff --git a/recipes/opus/all/conandata.yml b/recipes/opus/all/conandata.yml index 5ac1b419900e1..a7288d00d394f 100644 --- a/recipes/opus/all/conandata.yml +++ b/recipes/opus/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.5.2": + url: "https://gitlab.xiph.org/xiph/opus/-/archive/v1.5.2/opus-v1.5.2.tar.gz" + sha256: "5cf92b5b577d8ed203424f1e0f618f30bc6b6e42a26eae88bdb649ea63961cc9" "1.4": url: "https://github.com/xiph/opus/releases/download/v1.4/opus-1.4.tar.gz" sha256: "c9b32b4253be5ae63d1ff16eea06b94b5f0f2951b7a02aceef58e3a3ce49c51f" @@ -8,3 +11,5 @@ sources: patches: "1.3.1": - patch_file: "patches/1.3.1-add-opus_buildtype-cmake.patch" + patch_description: "Set a default build type if none was specified" + patch_type: "portability" diff --git a/recipes/opus/all/conanfile.py b/recipes/opus/all/conanfile.py index 2dfefae5f4332..f1ca41949ac83 100644 --- a/recipes/opus/all/conanfile.py +++ b/recipes/opus/all/conanfile.py @@ -1,7 +1,10 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir -from conan.tools.microsoft import check_min_vs +from conan.tools.microsoft import check_min_vs, is_msvc, is_msvc_static_runtime +from conan.tools.env import VirtualBuildEnv +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -14,7 +17,7 @@ class OpusConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://opus-codec.org" license = "BSD-3-Clause" - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -29,6 +32,10 @@ class OpusConan(ConanFile): "stack_protector": True, } + def build_requirements(self): + if Version(self.version) >= "1.5.2": + self.tool_requires("cmake/[>=3.16 <4]") + def export_sources(self): export_conandata_patches(self) @@ -47,15 +54,23 @@ def layout(self): def validate(self): check_min_vs(self, 190) + if Version(self.version) >= "1.5.2" and self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "8": + raise ConanInvalidConfiguration(f"{self.ref} GCC-{self.settings.compiler.version} not supported due to lack of AVX2 support. Use GCC >=8.") def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) def generate(self): + if Version(self.version) >= "1.5.2": + env = VirtualBuildEnv(self) + env.generate() tc = CMakeToolchain(self) - tc.variables["OPUS_FIXED_POINT"] = self.options.fixed_point - tc.variables["OPUS_STACK_PROTECTOR"] = self.options.stack_protector + tc.cache_variables["OPUS_BUILD_SHARED_LIBRARY"] = self.options.shared + tc.cache_variables["OPUS_FIXED_POINT"] = self.options.fixed_point + tc.cache_variables["OPUS_STACK_PROTECTOR"] = self.options.stack_protector + if Version(self.version) >= "1.5.2" and is_msvc(self): + tc.cache_variables["OPUS_STATIC_RUNTIME"] = is_msvc_static_runtime(self) tc.generate() def build(self): diff --git a/recipes/opus/config.yml b/recipes/opus/config.yml index 3360afdd0ecab..e9cd861cf2166 100644 --- a/recipes/opus/config.yml +++ b/recipes/opus/config.yml @@ -1,4 +1,6 @@ versions: + "1.5.2": + folder: all "1.4": folder: all "1.3.1": diff --git a/recipes/ouster_sdk/all/conandata.yml b/recipes/ouster_sdk/all/conandata.yml index 42f0c9762b0b9..ba54e961b9268 100644 --- a/recipes/ouster_sdk/all/conandata.yml +++ b/recipes/ouster_sdk/all/conandata.yml @@ -1,5 +1,8 @@ sources: # The C++ library uses a separate versioning scheme from the overall releases + "0.12.0": + url: "https://github.com/ouster-lidar/ouster_example/archive/refs/tags/20240703.tar.gz" + sha256: "aac9f82d8b8376bd11366204a57ab4e2a27e92a1a758238f2d3859e570be4914" "0.11.0": url: "https://github.com/ouster-lidar/ouster_example/archive/refs/tags/20240425.tar.gz" sha256: "f4f38f6787021e697633f2c290c95b544af81d388a18cb9f790234d4f592caf0" diff --git a/recipes/ouster_sdk/config.yml b/recipes/ouster_sdk/config.yml index 9f9994bf80db1..d87e034bb9160 100644 --- a/recipes/ouster_sdk/config.yml +++ b/recipes/ouster_sdk/config.yml @@ -1,4 +1,6 @@ versions: + "0.12.0": + folder: all "0.11.0": folder: all "0.10.0": diff --git a/recipes/pagmo2/all/CMakeLists.txt b/recipes/pagmo2/all/CMakeLists.txt deleted file mode 100644 index b71c882d9d33f..0000000000000 --- a/recipes/pagmo2/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory(source_subfolder) diff --git a/recipes/pagmo2/all/conandata.yml b/recipes/pagmo2/all/conandata.yml index a610a9ffc5a7b..26d2bd85a3ccc 100644 --- a/recipes/pagmo2/all/conandata.yml +++ b/recipes/pagmo2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.19.0": + url: "https://github.com/esa/pagmo2/archive/refs/tags/v2.19.0.tar.gz" + sha256: "701ada528de7d454201e92a5d88903dd1c22ea64f43861d9694195ddfef82a70" "2.17.0": url: "https://github.com/esa/pagmo2/archive/refs/tags/v2.17.0.tar.gz" sha256: "1b95b036f75e6fa0b21082ab228dbd63cd18ca10d9622ac53629245e0f95c35c" diff --git a/recipes/pagmo2/all/conanfile.py b/recipes/pagmo2/all/conanfile.py index 08b268962bb1c..b0c859b99c54f 100644 --- a/recipes/pagmo2/all/conanfile.py +++ b/recipes/pagmo2/all/conanfile.py @@ -1,19 +1,25 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration -import functools import os -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.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class Pagmo2Conan(ConanFile): name = "pagmo2" description = "pagmo is a C++ scientific library for massively parallel optimization." license = ("LGPL-3.0-or-later", "GPL-3.0-or-later") - topics = ("pagmo", "optimization", "parallel-computing", "genetic-algorithm", "metaheuristics") - homepage = "https://esa.github.io/pagmo2" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://esa.github.io/pagmo2" + topics = ("pagmo", "optimization", "parallel-computing", "genetic-algorithm", "metaheuristics") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -30,12 +36,15 @@ class Pagmo2Conan(ConanFile): "with_ipopt": False, } - exports_sources = "CMakeLists.txt" - generators = "cmake", "cmake_find_package", "cmake_find_package_multi" - @property - def _source_subfolder(self): - return "source_subfolder" + def _compilers_minimum_version(self): + return { + "Visual Studio": "15.7", + "msvc": "191", + "gcc": "7", + "clang": "5.0", + "apple-clang": "9", + } def config_options(self): if self.settings.os == "Windows": @@ -43,24 +52,18 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.78.0") - self.requires("onetbb/2020.3") + self.requires("boost/1.85.0", transitive_headers=True) + self.requires("onetbb/2021.12.0") if self.options.with_eigen: - self.requires("eigen/3.4.0") + self.requires("eigen/3.4.0", transitive_headers=True) if self.options.with_nlopt: - self.requires("nlopt/2.7.1") - - @property - def _compilers_minimum_version(self): - return { - "Visual Studio": "15.7", - "gcc": "7", - "clang": "5.0", - "apple-clang": "9.1" - } + self.requires("nlopt/2.7.1", transitive_headers=True, transitive_libs=True) @property def _required_boost_components(self): @@ -68,86 +71,95 @@ def _required_boost_components(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 17) - - 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] + check_min_cppstd(self, 17) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if not minimum_version: - self.output.warn("{} {} requires C++17. Your compiler is unknown. Assuming it supports C++17.".format(self.name, self.version)) - elif lazy_lt_semver(str(self.settings.compiler.version), minimum_version): - raise ConanInvalidConfiguration("{} {} requires C++17, which your compiler does not support.".format(self.name, self.version)) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.name} {self.version} requires C++17, which your compiler does not support." + ) # TODO: add ipopt support if self.options.with_ipopt: raise ConanInvalidConfiguration("ipopt recipe not available yet in CCI") - miss_boost_required_comp = any(getattr(self.options["boost"], "without_{}".format(boost_comp), True) for boost_comp in self._required_boost_components) - if self.options["boost"].header_only or miss_boost_required_comp: - raise ConanInvalidConfiguration("{0} requires non header-only boost with these components: {1}".format(self.name, ", ".join(self._required_boost_components))) + miss_boost_required_comp = any( + self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) + for boost_comp in self._required_boost_components + ) + if self.dependencies["boost"].options.header_only or miss_boost_required_comp: + raise ConanInvalidConfiguration( + "{0} requires non header-only boost with these components: {1}".format( + self.name, ", ".join(self._required_boost_components) + ) + ) + + if is_msvc(self) and self.options.shared: + # test_package.obj : error LNK2019: unresolved external symbol "public: __cdecl boost::archive::codecvt_null::codecvt_null(unsigned __int64)" + # https://github.com/boostorg/serialization/issues/232 + # https://github.com/conda-forge/scipoptsuite-feedstock/pull/44 + raise ConanInvalidConfiguration("Shared builds are currently broken on MSVC") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["PAGMO_BUILD_TESTS"] = False + tc.variables["PAGMO_BUILD_BENCHMARKS"] = False + tc.variables["PAGMO_BUILD_TUTORIALS"] = False + tc.variables["PAGMO_WITH_EIGEN3"] = self.options.with_eigen + tc.variables["PAGMO_WITH_NLOPT"] = self.options.with_nlopt + tc.variables["PAGMO_WITH_IPOPT"] = self.options.with_ipopt + tc.variables["PAGMO_ENABLE_IPO"] = False + tc.variables["PAGMO_BUILD_STATIC_LIBRARY"] = not self.options.shared + tc.generate() + tc = CMakeDeps(self) + tc.generate() def _patch_sources(self): # do not force MT runtime for static lib - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), - "if(YACMA_COMPILER_IS_MSVC AND PAGMO_BUILD_STATIC_LIBRARY)", - "if(0)") + if Version(self.version) < "2.18": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "if(YACMA_COMPILER_IS_MSVC AND PAGMO_BUILD_STATIC_LIBRARY)", "if(0)") # No warnings as errors - yacma_cmake = os.path.join(self._source_subfolder, "cmake_modules", "yacma", "YACMACompilerLinkerSettings.cmake") - tools.replace_in_file(yacma_cmake, "list(APPEND _YACMA_CXX_FLAGS_DEBUG \"-Werror\")", "") - tools.replace_in_file(yacma_cmake, "_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/W4)", "") - tools.replace_in_file(yacma_cmake, "_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/WX)", "") - - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["PAGMO_BUILD_TESTS"] = False - cmake.definitions["PAGMO_BUILD_BENCHMARKS"] = False - cmake.definitions["PAGMO_BUILD_TUTORIALS"] = False - cmake.definitions["PAGMO_WITH_EIGEN3"] = self.options.with_eigen - cmake.definitions["PAGMO_WITH_NLOPT"] = self.options.with_nlopt - cmake.definitions["PAGMO_WITH_IPOPT"] = self.options.with_ipopt - cmake.definitions["PAGMO_ENABLE_IPO"] = False - cmake.definitions["PAGMO_BUILD_STATIC_LIBRARY"] = not self.options.shared - cmake.configure() - return cmake + yacma_cmake = os.path.join(self.source_folder, "cmake_modules", "yacma", "YACMACompilerLinkerSettings.cmake") + replace_in_file(self, yacma_cmake, 'list(APPEND _YACMA_CXX_FLAGS_DEBUG "-Werror")', "") + replace_in_file(self, yacma_cmake, "_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/W4)", "") + replace_in_file(self, yacma_cmake, "_YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/WX)", "") def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy(pattern="COPYING.*", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "COPYING.*", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): - self.cpp_info.set_property("cmake_file_name", "pagmo") + # https://esa.github.io/pagmo2/quickstart.html#using-pagmo-with-cmake + self.cpp_info.set_property("cmake_file_name", "Pagmo") self.cpp_info.set_property("cmake_target_name", "Pagmo::pagmo") - # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed + self.cpp_info.components["_pagmo"].libs = ["pagmo"] - self.cpp_info.components["_pagmo"].requires = ["boost::headers", "boost::serialization", "onetbb::onetbb"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["_pagmo"].system_libs.append("pthread") + + # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed + self.cpp_info.components["_pagmo"].requires = ["boost::boost", "onetbb::onetbb"] if self.options.with_eigen: self.cpp_info.components["_pagmo"].requires.append("eigen::eigen") if self.options.with_nlopt: self.cpp_info.components["_pagmo"].requires.append("nlopt::nlopt") - if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["_pagmo"].system_libs.append("pthread") - - # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "pagmo" self.cpp_info.filenames["cmake_find_package_multi"] = "pagmo" self.cpp_info.names["cmake_find_package"] = "Pagmo" self.cpp_info.names["cmake_find_package_multi"] = "Pagmo" self.cpp_info.components["_pagmo"].names["cmake_find_package"] = "pagmo" self.cpp_info.components["_pagmo"].names["cmake_find_package_multi"] = "pagmo" - self.cpp_info.components["_pagmo"].set_property("cmake_target_name", "Pagmo::pagmo") diff --git a/recipes/pagmo2/all/test_package/CMakeLists.txt b/recipes/pagmo2/all/test_package/CMakeLists.txt index e512e2207b158..73aa85822f44b 100644 --- a/recipes/pagmo2/all/test_package/CMakeLists.txt +++ b/recipes/pagmo2/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(pagmo REQUIRED CONFIG) +find_package(Pagmo REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} Pagmo::pagmo) diff --git a/recipes/pagmo2/all/test_package/conanfile.py b/recipes/pagmo2/all/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/pagmo2/all/test_package/conanfile.py +++ b/recipes/pagmo2/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/pagmo2/all/test_v1_package/CMakeLists.txt b/recipes/pagmo2/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/pagmo2/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/flecs/all/test_v1_package/conanfile.py b/recipes/pagmo2/all/test_v1_package/conanfile.py similarity index 100% rename from recipes/flecs/all/test_v1_package/conanfile.py rename to recipes/pagmo2/all/test_v1_package/conanfile.py diff --git a/recipes/pagmo2/config.yml b/recipes/pagmo2/config.yml index 0daf1d812658e..4d9124762cc74 100644 --- a/recipes/pagmo2/config.yml +++ b/recipes/pagmo2/config.yml @@ -1,4 +1,6 @@ versions: + "2.19.0": + folder: all "2.17.0": folder: all "2.10": diff --git a/recipes/pagmo2/pre_2.11/CMakeLists.txt b/recipes/pagmo2/pre_2.11/CMakeLists.txt deleted file mode 100644 index 361b35d4c17d9..0000000000000 --- a/recipes/pagmo2/pre_2.11/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8.11) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/pagmo2/pre_2.11/conandata.yml b/recipes/pagmo2/pre_2.11/conandata.yml index fb48c3245b653..9bb70cc4e5a27 100644 --- a/recipes/pagmo2/pre_2.11/conandata.yml +++ b/recipes/pagmo2/pre_2.11/conandata.yml @@ -5,4 +5,3 @@ sources: patches: "2.10": - patch_file: "patches/0001-fix-cmake-module-path-2-10.patch" - base_path: "source_subfolder" diff --git a/recipes/pagmo2/pre_2.11/conanfile.py b/recipes/pagmo2/pre_2.11/conanfile.py index eeacc0b3752d5..485b29614940a 100644 --- a/recipes/pagmo2/pre_2.11/conanfile.py +++ b/recipes/pagmo2/pre_2.11/conanfile.py @@ -1,18 +1,23 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -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.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir + +required_conan_version = ">=1.53.0" class Pagmo2Conan(ConanFile): name = "pagmo2" description = "pagmo is a C++ scientific library for massively parallel optimization." license = ("LGPL-3.0-or-later", "GPL-3.0-or-later") - topics = ("pagmo", "optimization", "parallel-computing", "genetic-algorithm", "metaheuristics") - homepage = "https://esa.github.io/pagmo2" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://esa.github.io/pagmo2" + topics = ("pagmo", "optimization", "parallel-computing", "genetic-algorithm", "metaheuristics", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" options = { "with_eigen": [True, False], @@ -25,25 +30,22 @@ class Pagmo2Conan(ConanFile): "with_ipopt": False, } - generators = "cmake", "cmake_find_package", "cmake_find_package_multi" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.78.0") - self.requires("onetbb/2020.3") + self.requires("boost/1.83.0", transitive_headers=True) + self.requires("onetbb/2021.10.0") if self.options.with_eigen: - self.requires("eigen/3.4.0") + self.requires("eigen/3.4.0", transitive_headers=True) if self.options.with_nlopt: - self.requires("nlopt/2.7.1") + self.requires("nlopt/2.7.1", transitive_headers=True, transitive_libs=True) + + def package_id(self): + self.info.settings.clear() @property def _required_boost_components(self): @@ -51,61 +53,69 @@ def _required_boost_components(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 11) + check_min_cppstd(self, 11) # TODO: add ipopt support if self.options.with_ipopt: raise ConanInvalidConfiguration("ipopt recipe not available yet in CCI") - miss_boost_required_comp = any(getattr(self.options["boost"], "without_{}".format(boost_comp), True) for boost_comp in self._required_boost_components) - if self.options["boost"].header_only or miss_boost_required_comp: - raise ConanInvalidConfiguration("{0} requires non header-only boost with these components: {1}".format(self.name, ", ".join(self._required_boost_components))) - - def package_id(self): - self.info.settings.clear() + miss_boost_required_comp = any( + self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) + for boost_comp in self._required_boost_components + ) + if self.dependencies["boost"].options.header_only or miss_boost_required_comp: + raise ConanInvalidConfiguration( + "{0} requires non header-only boost with these components: {1}".format( + self.name, ", ".join(self._required_boost_components) + ) + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["PAGMO_BUILD_TESTS"] = False - self._cmake.definitions["PAGMO_BUILD_TUTORIALS"] = False - self._cmake.definitions["PAGMO_WITH_EIGEN3"] = self.options.with_eigen - self._cmake.definitions["PAGMO_WITH_NLOPT"] = self.options.with_nlopt - self._cmake.definitions["PAGMO_WITH_IPOPT"] = self.options.with_ipopt - self._cmake.configure() - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["PAGMO_BUILD_TESTS"] = False + tc.variables["PAGMO_BUILD_TUTORIALS"] = False + tc.variables["PAGMO_WITH_EIGEN3"] = self.options.with_eigen + tc.variables["PAGMO_WITH_NLOPT"] = self.options.with_nlopt + tc.variables["PAGMO_WITH_IPOPT"] = self.options.with_ipopt + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): - self.copy(pattern="COPYING.*", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy( + self, + pattern="COPYING.*", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder, + ) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "pagmo") self.cpp_info.set_property("cmake_target_name", "Pagmo::pagmo") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["_pagmo"].system_libs.append("pthread") + # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed - self.cpp_info.components["_pagmo"].requires = ["boost::headers", "boost::serialization", "onetbb::onetbb"] + self.cpp_info.components["_pagmo"].requires = ["boost::boost", "onetbb::onetbb"] if self.options.with_eigen: self.cpp_info.components["_pagmo"].requires.append("eigen::eigen") if self.options.with_nlopt: self.cpp_info.components["_pagmo"].requires.append("nlopt::nlopt") - if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["_pagmo"].system_libs.append("pthread") - - # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "pagmo" self.cpp_info.filenames["cmake_find_package_multi"] = "pagmo" self.cpp_info.names["cmake_find_package"] = "Pagmo" self.cpp_info.names["cmake_find_package_multi"] = "Pagmo" self.cpp_info.components["_pagmo"].names["cmake_find_package"] = "pagmo" self.cpp_info.components["_pagmo"].names["cmake_find_package_multi"] = "pagmo" - self.cpp_info.components["_pagmo"].set_property("cmake_target_name", "Pagmo::pagmo") diff --git a/recipes/pagmo2/pre_2.11/test_package/CMakeLists.txt b/recipes/pagmo2/pre_2.11/test_package/CMakeLists.txt index 7439694a33876..de018735ec0b2 100644 --- a/recipes/pagmo2/pre_2.11/test_package/CMakeLists.txt +++ b/recipes/pagmo2/pre_2.11/test_package/CMakeLists.txt @@ -1,8 +1,5 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(pagmo REQUIRED CONFIG) diff --git a/recipes/pagmo2/pre_2.11/test_package/conanfile.py b/recipes/pagmo2/pre_2.11/test_package/conanfile.py index 38f4483872d47..ef5d7042163ec 100644 --- a/recipes/pagmo2/pre_2.11/test_package/conanfile.py +++ b/recipes/pagmo2/pre_2.11/test_package/conanfile.py @@ -1,10 +1,19 @@ -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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/pagmo2/pre_2.11/test_v1_package/CMakeLists.txt b/recipes/pagmo2/pre_2.11/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/pagmo2/pre_2.11/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/pagmo2/pre_2.11/test_v1_package/conanfile.py b/recipes/pagmo2/pre_2.11/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..38f4483872d47 --- /dev/null +++ b/recipes/pagmo2/pre_2.11/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/paho-mqtt-cpp/all/conandata.yml b/recipes/paho-mqtt-cpp/all/conandata.yml index b3a853f5872bf..33f16cd0bbad8 100644 --- a/recipes/paho-mqtt-cpp/all/conandata.yml +++ b/recipes/paho-mqtt-cpp/all/conandata.yml @@ -1,11 +1,18 @@ sources: + "1.4.0": + url: "https://github.com/eclipse/paho.mqtt.cpp/archive/v1.4.0.tar.gz" + sha256: "758c504b585402fbeb47822e52897239bbd53b4236ac3908cc040e09d2a8d8e1" "1.3.2": - sha256: c271d521287f417102b447b3d1e8d17be0e0f6a3b0b653334ebcd2ccd20d1e46 - url: https://github.com/eclipse/paho.mqtt.cpp/archive/v1.3.2.tar.gz + url: "https://github.com/eclipse/paho.mqtt.cpp/archive/v1.3.2.tar.gz" + sha256: "c271d521287f417102b447b3d1e8d17be0e0f6a3b0b653334ebcd2ccd20d1e46" "1.2.0": - sha256: 435e97e4d5b1da13daa26cadd3e83fe9d154930abaa78b8ff1b8c854b5345d8b - url: https://github.com/eclipse/paho.mqtt.cpp/archive/v1.2.0.tar.gz + url: "https://github.com/eclipse/paho.mqtt.cpp/archive/v1.2.0.tar.gz" + sha256: "435e97e4d5b1da13daa26cadd3e83fe9d154930abaa78b8ff1b8c854b5345d8b" patches: + "1.4.0": + - patch_file: "patches/1.4.0-0001-fix-cmake.patch" + patch_description: "CMake: Honor fPIC option" + patch_type: "conan" "1.3.2": - patch_file: "patches/1.3.2-0001-fix-cmake.patch" patch_description: "CMake: Honor fPIC option and properly link paho-mqtt-c to object target" diff --git a/recipes/paho-mqtt-cpp/all/conanfile.py b/recipes/paho-mqtt-cpp/all/conanfile.py index 226f6d62472cd..29c655cc42b87 100644 --- a/recipes/paho-mqtt-cpp/all/conanfile.py +++ b/recipes/paho-mqtt-cpp/all/conanfile.py @@ -72,8 +72,9 @@ def generate(self): tc.variables["PAHO_WITH_SSL"] = self.dependencies["paho-mqtt-c"].options.ssl tc.generate() deps = CMakeDeps(self) - deps.set_property("paho-mqtt-c", "cmake_file_name", "PahoMqttC") - deps.set_property("paho-mqtt-c", "cmake_target_name", "PahoMqttC::PahoMqttC") + if Version(self.version) < "1.4.0": + deps.set_property("paho-mqtt-c", "cmake_file_name", "PahoMqttC") + deps.set_property("paho-mqtt-c", "cmake_target_name", "PahoMqttC::PahoMqttC") deps.generate() def build(self): diff --git a/recipes/paho-mqtt-cpp/all/patches/1.4.0-0001-fix-cmake.patch b/recipes/paho-mqtt-cpp/all/patches/1.4.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..3a9eac127ef96 --- /dev/null +++ b/recipes/paho-mqtt-cpp/all/patches/1.4.0-0001-fix-cmake.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1155844..ace2e61 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -107,7 +107,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + + # Generate position-independent code (-fPIC on UNIX) +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++# set(CMAKE_POSITION_INDEPENDENT_CODE ON) + + # --- System Details --- + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index c8b213d..2898972 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -68,6 +68,7 @@ if(PAHO_BUILD_SHARED) + set_target_properties(paho-mqttpp3 PROPERTIES + VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_VERSION_MAJOR} ++ POSITION_INDEPENDENT_CODE ON + ) + endif() + diff --git a/recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt b/recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt index 92c59048e3a2f..ff0d0d7fdb39c 100644 --- a/recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt +++ b/recipes/paho-mqtt-cpp/all/test_package/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.15) -project(test_package CXX) +project(test_package LANGUAGES CXX) find_package(PahoMqttCpp REQUIRED CONFIG) diff --git a/recipes/paho-mqtt-cpp/config.yml b/recipes/paho-mqtt-cpp/config.yml index 01476444007d2..4866c5bc21cde 100644 --- a/recipes/paho-mqtt-cpp/config.yml +++ b/recipes/paho-mqtt-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.0": + folder: "all" "1.3.2": folder: "all" "1.2.0": diff --git a/recipes/pdf-writer/all/conandata.yml b/recipes/pdf-writer/all/conandata.yml index 2cb2a341032b8..0d800cc7a7750 100644 --- a/recipes/pdf-writer/all/conandata.yml +++ b/recipes/pdf-writer/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "4.6.7": + url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.6.7.tar.gz" + sha256: "735c65d4685c5156f0876635f3bc1565700d0f648fbb1f384e46d186796c8bae" + "4.6.6": + url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.6.6.tar.gz" + sha256: "8343820313e553052df68c75fe2bf35353da2719106e81eb2a8b026ff96c7d7c" "4.6.4": url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.6.4.tar.gz" sha256: "93b5f1dc88fd67fdebde409e927e828dfbae02efa44936e89728622411c6a047" @@ -15,6 +21,14 @@ sources: url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.5.12.tar.gz" sha256: "40fcbaa66fc46fcb588ceda119ba8839ff6d2c886191ac5e68ed702475c7336e" patches: + "4.6.7": + - patch_file: "patches/4.6.6-0001-fix-cmake.patch" + patch_description: "disable cpack" + patch_type: "conan" + "4.6.6": + - patch_file: "patches/4.6.6-0001-fix-cmake.patch" + patch_description: "disable cpack" + patch_type: "conan" "4.6.4": - patch_file: "patches/4.6.2-0001-fix-cmake.patch" patch_description: "disable cpack" diff --git a/recipes/pdf-writer/all/patches/4.6.6-0001-fix-cmake.patch b/recipes/pdf-writer/all/patches/4.6.6-0001-fix-cmake.patch new file mode 100644 index 0000000000000..0f818e64d81ab --- /dev/null +++ b/recipes/pdf-writer/all/patches/4.6.6-0001-fix-cmake.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 956c730..a7d809b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -165,13 +165,13 @@ if(PROJECT_IS_TOP_LEVEL AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/PDFWriterTesting) + ADD_SUBDIRECTORY(PDFWriterTesting) + endif() + +-include(InstallRequiredSystemLibraries) +-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") +-set(CPACK_PACKAGE_VERSION_MAJOR "${PDFHummus_VERSION_MAJOR}") +-set(CPACK_PACKAGE_VERSION_MINOR "${PDFHummus_VERSION_MINOR}") +-set(CPACK_SOURCE_GENERATOR "ZIP") +-set(CPACK_GENERATOR "ZIP") +-include(CPack) ++# include(InstallRequiredSystemLibraries) ++# set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") ++# set(CPACK_PACKAGE_VERSION_MAJOR "${PDFHummus_VERSION_MAJOR}") ++# set(CPACK_PACKAGE_VERSION_MINOR "${PDFHummus_VERSION_MINOR}") ++# set(CPACK_SOURCE_GENERATOR "ZIP") ++# set(CPACK_GENERATOR "ZIP") ++# include(CPack) + + install(EXPORT PDFHummusTargets + FILE PDFHummusTargets.cmake +@@ -200,4 +200,4 @@ install(FILES + export(EXPORT PDFHummusTargets + FILE "${CMAKE_CURRENT_BINARY_DIR}/PDFHummusTargets.cmake" + NAMESPACE PDFHummus:: +-) +\ No newline at end of file ++) diff --git a/recipes/pdf-writer/config.yml b/recipes/pdf-writer/config.yml index c19efc7d2c70e..36e4d583c87ad 100644 --- a/recipes/pdf-writer/config.yml +++ b/recipes/pdf-writer/config.yml @@ -1,4 +1,8 @@ versions: + "4.6.7": + folder: all + "4.6.6": + folder: all "4.6.4": folder: all "4.6.3": diff --git a/recipes/perfetto/all/conandata.yml b/recipes/perfetto/all/conandata.yml index e5a1529e55186..ba5f88c572d8d 100644 --- a/recipes/perfetto/all/conandata.yml +++ b/recipes/perfetto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "47.0": + url: "https://github.com/google/perfetto/archive/refs/tags/v47.0.tar.gz" + sha256: "9bbd38a0f074038bde6ccbcf5f2ff32587eb60faec254932268ecb6f17f18186" "45.0": url: "https://github.com/google/perfetto/archive/refs/tags/v45.0.tar.gz" sha256: "dcb815fb54370fa20a657552288016cb66e7a98237c1a1d47e7645a4325ac75e" diff --git a/recipes/perfetto/config.yml b/recipes/perfetto/config.yml index fd321949678ec..3e962804da06e 100644 --- a/recipes/perfetto/config.yml +++ b/recipes/perfetto/config.yml @@ -1,4 +1,6 @@ versions: + "47.0": + folder: all "45.0": folder: all "44.0": diff --git a/recipes/plutovg/all/conandata.yml b/recipes/plutovg/all/conandata.yml index caee6f61d4f89..fa45839bc7646 100644 --- a/recipes/plutovg/all/conandata.yml +++ b/recipes/plutovg/all/conandata.yml @@ -1,10 +1,12 @@ sources: - "cci.20230205": - url: "https://github.com/sammycage/plutovg/archive/ccaa687ac6092ef548b840144820a757c24e718b.tar.gz" - sha256: "e7cb644a76612bcbaeb26f401adf7eff9cc45fbef69aadc7a9d0f84416f0ea98" - "cci.20221030": - url: "https://github.com/sammycage/plutovg/archive/4d0eee77ce7d1850aac4d90e20ddaaa313d83e6a.tar.gz" - sha256: "bb44b1107d1cd41032fecdf3e16cff59a1a06f15a92527029aacb73c5c4d059e" - "cci.20220103": - url: "https://github.com/sammycage/plutovg/archive/51f1a79e04fbb42ec9e93499a18869eea06f3054.tar.gz" - sha256: "c2ce39b8085e0a8795263666f62af15239c36964330865fd54b9db25c67e063b" + "0.0.4": + url: "https://github.com/sammycage/plutovg/archive/refs/tags/v0.0.4.tar.gz" + sha256: "6d7c6ad1ef3cf0085e0a375b770590a8cea79d4754b732e892635639c5546076" + "0.0.1": + url: "https://github.com/sammycage/plutovg/archive/refs/tags/v0.0.1.tar.gz" + sha256: "593653d226dd54dc322bc0874c19bd0a80314b5471ae4da6b9cd9e12211e3261" +patches: + "0.0.1": + - patch_file: "patches/0.0.1-0001-include-stdint.patch" + patch_description: "include stdint.h" + patch_type: "portability" diff --git a/recipes/plutovg/all/conanfile.py b/recipes/plutovg/all/conanfile.py index ac581e3e79204..be43bdb8956f4 100644 --- a/recipes/plutovg/all/conanfile.py +++ b/recipes/plutovg/all/conanfile.py @@ -1,7 +1,11 @@ from conan import ConanFile -from conan.tools.files import get, copy, replace_in_file -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout - +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir, rename +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 is_msvc import os required_conan_version = ">=1.53.0" @@ -24,6 +28,9 @@ class PlutoVGConan(ConanFile): "fPIC": True, } + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -31,39 +38,55 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") def layout(self): - cmake_layout(self, src_folder="src") + basic_layout(self, src_folder="src") + + def build_requirements(self): + self.tool_requires("meson/[>=1.2.3 <2]") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.0.3") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): - tc = CMakeToolchain(self) - tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc = MesonToolchain(self) + tc.project_options["examples"] = "disabled" + tc.project_options["tests"] = "disabled" + tc.generate() + tc = PkgConfigDeps(self) + tc.generate() + tc = VirtualBuildEnv(self) tc.generate() def build(self): - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - "add_library(plutovg STATIC)", "add_library(plutovg)") - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - "add_subdirectory(example)", "") - cmake = CMake(self) - cmake.configure() - cmake.build() + apply_conandata_patches(self) + meson = Meson(self) + meson.configure() + meson.build() def package(self): - copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) - copy(self, pattern="*.a", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) - copy(self, pattern="*.so", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) - copy(self, pattern="*.lib", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) - copy(self, pattern="*.dll", dst=os.path.join(self.package_folder, "bin"), src=self.build_folder, keep_path=False) - copy(self, pattern="*.dylib", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) + 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")) + + fix_apple_shared_install_name(self) + + if is_msvc(self) and not self.options.shared: + rename(self, os.path.join(self.package_folder, "lib", "libplutovg.a"), os.path.join(self.package_folder, "lib", "plutovg.lib")) def package_info(self): self.cpp_info.libs = ["plutovg"] if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.system_libs = ["m"] + if is_msvc(self) and not self.options.shared: + self.cpp_info.defines.append("PLUTOVG_BUILD_STATIC") diff --git a/recipes/plutovg/all/patches/0.0.1-0001-include-stdint.patch b/recipes/plutovg/all/patches/0.0.1-0001-include-stdint.patch new file mode 100644 index 0000000000000..38089ef589d9a --- /dev/null +++ b/recipes/plutovg/all/patches/0.0.1-0001-include-stdint.patch @@ -0,0 +1,12 @@ +diff --git a/source/plutovg-surface.c b/source/plutovg-surface.c +index f81a51b..70be9e2 100644 +--- a/source/plutovg-surface.c ++++ b/source/plutovg-surface.c +@@ -1,5 +1,7 @@ + #include "plutovg-private.h" + ++#include ++ + #define STB_IMAGE_IMPLEMENTATION + #define STB_IMAGE_WRITE_IMPLEMENTATION + diff --git a/recipes/plutovg/all/test_package/conanfile.py b/recipes/plutovg/all/test_package/conanfile.py index a9fbb7f543162..7433710099642 100644 --- a/recipes/plutovg/all/test_package/conanfile.py +++ b/recipes/plutovg/all/test_package/conanfile.py @@ -1,25 +1,31 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + generators = "PkgConfigDeps", "MesonToolchain", "VirtualRunEnv", "VirtualBuildEnv" test_type = "explicit" + def layout(self): + basic_layout(self) + def requirements(self): self.requires(self.tested_reference_str) - def layout(self): - cmake_layout(self) + def build_requirements(self): + self.tool_requires("meson/1.2.3") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.0.3") def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() + meson = Meson(self) + meson.configure() + meson.build() def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/plutovg/all/test_package/meson.build b/recipes/plutovg/all/test_package/meson.build new file mode 100644 index 0000000000000..af5cd82ec83dc --- /dev/null +++ b/recipes/plutovg/all/test_package/meson.build @@ -0,0 +1,5 @@ +project('test_package', 'c') +package_dep = dependency('plutovg') +executable('test_package', + sources : ['test_package.c'], + dependencies : [package_dep]) diff --git a/recipes/plutovg/all/test_package/test_package.c b/recipes/plutovg/all/test_package/test_package.c index 528e8031367ec..50be3a04fdea9 100644 --- a/recipes/plutovg/all/test_package/test_package.c +++ b/recipes/plutovg/all/test_package/test_package.c @@ -1,14 +1,26 @@ -#include "plutovg.h" +#include -int main(void) { +int main(void) +{ const int width = 150; const int height = 150; plutovg_surface_t* surface = plutovg_surface_create(width, height); - plutovg_t* pluto = plutovg_create(surface); + plutovg_canvas_t* canvas = plutovg_canvas_create(surface); - plutovg_surface_destroy(surface); - plutovg_destroy(pluto); + float center_x = width * 0.5; + float center_y = height * 0.5; + float face_radius = 70; + float eye_radius = 10; + float mouth_radius = 50; + float eye_offset_x = 25; + float eye_offset_y = 20; + float eye_x = center_x - eye_offset_x; + float eye_y = center_y - eye_offset_y; + + const float pi = 3.14159265358979323846; + plutovg_surface_destroy(surface); + plutovg_canvas_destroy(canvas); return 0; } diff --git a/recipes/plutovg/config.yml b/recipes/plutovg/config.yml index 2d50305e8506d..e1a4f8d935403 100644 --- a/recipes/plutovg/config.yml +++ b/recipes/plutovg/config.yml @@ -1,7 +1,5 @@ versions: - "cci.20230205": + "0.0.4": folder: all - "cci.20221030": - folder: all - "cci.20220103": + "0.0.1": folder: all diff --git a/recipes/pocketfft/all/conandata.yml b/recipes/pocketfft/all/conandata.yml new file mode 100644 index 0000000000000..afc3604e9585d --- /dev/null +++ b/recipes/pocketfft/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.0.0.cci.20240801": + url: "https://github.com/mreineck/pocketfft/archive/bb87ca50df0478415a12d9011dc374eeed4e9d93.tar.gz" + sha256: "434d6cfd38613fb17db2c006cd64991947bdf88fb3f750cf6bfbaa86083c5bbd" diff --git a/recipes/pocketfft/all/conanfile.py b/recipes/pocketfft/all/conanfile.py new file mode 100644 index 0000000000000..75e19754616a6 --- /dev/null +++ b/recipes/pocketfft/all/conanfile.py @@ -0,0 +1,82 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.52.0" + + +class PocketfftConan(ConanFile): + name = "pocketfft" + description = "PocketFFT: a heavily modified implementation of FFTPack" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/mreineck/pocketfft" + topics = ("fft", "fast-fourier-transform", "fftpack", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + options = { + "cache_size": ["ANY"], + "multithreading": [True, False], + "pthread": [True, False], + "vectorization": [True, False], + } + default_options = { + "cache_size": 0, + "multithreading": True, + "pthread": False, + "vectorization": True, + } + + def configure(self): + if not self.options.multithreading: + del self.options.pthread + + def requirements(self): + if self.options.get_safe("pthread") and self.settings.os == "Windows": + self.requires("pthreads4w/3.0.0") + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) + + if not str(self.options.cache_size).isdigit() or int(str(self.options.cache_size)) < 0: + raise ConanInvalidConfiguration("cache_size option must be greater or equal to 0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE.md", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*.h", self.source_folder, os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.defines.append(f"POCKETFFT_CACHE_SIZE={self.options.cache_size}") + if not self.options.multithreading: + self.cpp_info.defines.append("POCKETFFT_NO_MULTITHREADING") + if self.options.get_safe("pthread"): + self.cpp_info.defines.append("POCKETFFT_PTHREADS") + if not self.options.vectorization: + self.cpp_info.defines.append("POCKETFFT_NO_VECTORS") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + if self.options.multithreading: + self.cpp_info.system_libs.append("pthread") + + if self.options.get_safe("pthread") and self.settings.os == "Windows": + self.cpp_info.system_libs.append("pthreads4w::pthreads4w") diff --git a/recipes/pocketfft/all/test_package/CMakeLists.txt b/recipes/pocketfft/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..5d277cd110bf2 --- /dev/null +++ b/recipes/pocketfft/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(pocketfft REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE pocketfft::pocketfft) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/pocketfft/all/test_package/conanfile.py b/recipes/pocketfft/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/pocketfft/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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 = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + 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): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/pocketfft/all/test_package/test_package.cpp b/recipes/pocketfft/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..04d8a1970ebf2 --- /dev/null +++ b/recipes/pocketfft/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#include + +#include +#include + +using namespace pocketfft; + +int main() { + const int len = 16; + shape_t shape{len}; + stride_t stride{sizeof(std::complex)}; + shape_t axes = {0}; + std::vector> data(len), res(len); + c2c(shape, stride, stride, axes, FORWARD, data.data(), res.data(), 1.f); +} diff --git a/recipes/pocketfft/config.yml b/recipes/pocketfft/config.yml new file mode 100644 index 0000000000000..cecbc61c9639e --- /dev/null +++ b/recipes/pocketfft/config.yml @@ -0,0 +1,3 @@ +versions: + "0.0.0.cci.20240801": + folder: all diff --git a/recipes/podofo/all/conandata.yml b/recipes/podofo/all/conandata.yml index 2735fdd5d425b..016e63cd90df6 100644 --- a/recipes/podofo/all/conandata.yml +++ b/recipes/podofo/all/conandata.yml @@ -2,15 +2,8 @@ sources: "0.9.7": url: "https://netcologne.dl.sourceforge.net/project/podofo/podofo/0.9.7/podofo-0.9.7.tar.gz" sha256: "7cf2e716daaef89647c54ffcd08940492fd40c385ef040ce7529396bfadc1eb8" - "0.9.6": - url: "https://netcologne.dl.sourceforge.net/project/podofo/podofo/0.9.6/podofo-0.9.6.tar.gz" - sha256: "e9163650955ab8e4b9532e7aa43b841bac45701f7b0f9b793a98c8ca3ef14072" patches: "0.9.7": - patch_file: "patches/0001-fix-cmake-0.9.7.patch" patch_description: "Link to conan libs and allow to build the tools without the tests and the examples" patch_type: "conan" - "0.9.6": - - patch_file: "patches/0001-fix-cmake-0.9.6.patch" - patch_description: "Link to conan libs and allow to build the tools without the tests and the examples" - patch_type: "conan" diff --git a/recipes/podofo/all/conanfile.py b/recipes/podofo/all/conanfile.py index 87fbb60fe26b7..365ade4380f35 100644 --- a/recipes/podofo/all/conanfile.py +++ b/recipes/podofo/all/conanfile.py @@ -1,4 +1,4 @@ -from conan import ConanFile +from conan import ConanFile, conan_version from conan.tools.build import check_min_cppstd, valid_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 @@ -62,26 +62,33 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("freetype/2.13.0") + self.requires("freetype/2.13.2") self.requires("zlib/[>=1.2.11 <2]") if self.settings.os != "Windows": - self.requires("fontconfig/2.14.2") + self.requires("fontconfig/2.15.0") if self.options.with_openssl: - self.requires("openssl/1.1.1u") + self.requires("openssl/[>=1.1 <4]") if self.options.with_libidn: self.requires("libidn/1.36") if self.options.with_jpeg: self.requires("libjpeg/9e") if self.options.with_tiff: - self.requires("libtiff/4.5.1") + self.requires("libtiff/4.6.0") if self.options.with_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.with_unistring: self.requires("libunistring/0.9.10") def validate(self): if self.info.settings.compiler.get_safe("cppstd") and Version(self.version) >= "0.9.7": check_min_cppstd(self, 11) + if conan_version.major >= 2 and Version(self.version) < "0.9.7": + # FIXME: linter complains, but function is there + # https://docs.conan.io/2.0/reference/tools/build.html?highlight=check_min_cppstd#conan-tools-build-check-max-cppstd + import sys + check_max_cppstd = getattr(sys.modules['conan.tools.build'], 'check_max_cppstd') + # INFO: error: no template named 'auto_ptr' in namespace 'std'. Removed in C++17. + check_max_cppstd(self, 14) def source(self): get(self, **self.conan_data["sources"][self.version], diff --git a/recipes/podofo/config.yml b/recipes/podofo/config.yml index ca2128b57488a..a6cc81e2fb933 100644 --- a/recipes/podofo/config.yml +++ b/recipes/podofo/config.yml @@ -1,5 +1,3 @@ versions: "0.9.7": folder: all - "0.9.6": - folder: all diff --git a/recipes/popt/1.19/conanfile.py b/recipes/popt/1.19/conanfile.py index a8a39dc69c064..77c06c30fce86 100755 --- a/recipes/popt/1.19/conanfile.py +++ b/recipes/popt/1.19/conanfile.py @@ -35,7 +35,7 @@ def config_options(self): def requirements(self): if self.settings.os == "Neutrino": - self.requires("libiconv/1.15") + self.requires("libiconv/1.17") def configure(self): if self.options.shared: diff --git a/recipes/poselib/all/conandata.yml b/recipes/poselib/all/conandata.yml new file mode 100644 index 0000000000000..32b5efa0b3081 --- /dev/null +++ b/recipes/poselib/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "2.0.4": + url: "https://github.com/PoseLib/PoseLib/archive/refs/tags/v2.0.4.tar.gz" + sha256: "caa0c1c9b882f6e36b5ced6f781406ed97d4c1f0f61aa31345ebe54633d67c16" + "2.0.3": + url: "https://github.com/PoseLib/PoseLib/archive/refs/tags/v2.0.3.tar.gz" + sha256: "ec52fe738a803e53c4cedc27f393a38b2dced63da6c73148e98965b338ca0efc" diff --git a/recipes/poselib/all/conanfile.py b/recipes/poselib/all/conanfile.py new file mode 100644 index 0000000000000..0282ec6f8bfdb --- /dev/null +++ b/recipes/poselib/all/conanfile.py @@ -0,0 +1,110 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + + +class PoselibConan(ConanFile): + name = "poselib" + description = "PoseLib: minimal solvers for calibrated camera pose estimation" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/PoseLib/PoseLib" + topics = ("pose", "camera", "estimation", "solver") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "6", + "apple-clang": "10", + "msvc": "192", + "Visual Studio": "16", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("eigen/3.4.0", transitive_headers=True, transitive_libs=True) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + 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." + ) + + if self.settings.os == "Windows" and self.options.shared: + raise ConanInvalidConfiguration( + f"{self.ref} does not export symbols on Windows for a shared library build." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["MARCH_NATIVE"] = False + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + replace_in_file(self, cmakelists, "-march=native -Wall -Werror -fPIC", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "PoseLib") + self.cpp_info.set_property("cmake_target_name", "PoseLib::PoseLib") + + suffix = "d" if self.settings.build_type == "Debug" else "" + self.cpp_info.libs = ["PoseLib" + suffix] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/poselib/all/test_package/CMakeLists.txt b/recipes/poselib/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..ea7248e1ec70c --- /dev/null +++ b/recipes/poselib/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(PoseLib REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE PoseLib::PoseLib) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/poselib/all/test_package/conanfile.py b/recipes/poselib/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/poselib/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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 = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + 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): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/poselib/all/test_package/test_package.cpp b/recipes/poselib/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..613b02cd52fa4 --- /dev/null +++ b/recipes/poselib/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include + +#include + +int main() { + std::vector x1(10, Eigen::Vector3d{}); + std::vector x2(10, Eigen::Vector3d{}); + Eigen::Matrix3d h; + int res = poselib::homography_4pt(x1, x2, &h); +} diff --git a/recipes/poselib/config.yml b/recipes/poselib/config.yml new file mode 100644 index 0000000000000..7776ab2d30335 --- /dev/null +++ b/recipes/poselib/config.yml @@ -0,0 +1,5 @@ +versions: + "2.0.4": + folder: all + "2.0.3": + folder: all diff --git a/recipes/premake/5.x/conanfile.py b/recipes/premake/5.x/conanfile.py index d4fa461153f3c..0a761c061731a 100644 --- a/recipes/premake/5.x/conanfile.py +++ b/recipes/premake/5.x/conanfile.py @@ -3,7 +3,7 @@ import re import shutil -from conan import ConanFile, conan_version +from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import cross_building from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, replace_in_file @@ -55,10 +55,6 @@ def requirements(self): def validate(self): if hasattr(self, "settings_build") and cross_building(self, skip_x64_x86=True): raise ConanInvalidConfiguration("Cross-building not implemented") - if conan_version.major == 1 and self.settings.build_type == "Debug": - # This configuration fails without any error messages in C3I. - # https://c3i.jfrog.io/artifactory/misc/logs/pr/18844/15-linux-clang/premake/5.0.0-alpha15/ - raise ConanInvalidConfiguration("Debug build not supported with Conan 1.x") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/premake/5.x/test_package/conanfile.py b/recipes/premake/5.x/test_package/conanfile.py index d2d508976967c..0cbf9e48678a6 100644 --- a/recipes/premake/5.x/test_package/conanfile.py +++ b/recipes/premake/5.x/test_package/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.cmake import cmake_layout +from conan.tools.build import can_run class TestPackageConan(ConanFile): @@ -10,8 +10,6 @@ class TestPackageConan(ConanFile): def build_requirements(self): self.tool_requires(self.tested_reference_str) - def layout(self): - cmake_layout(self) - def test(self): - self.run("premake5 --version") + if can_run(self): + self.run("premake5 --version") diff --git a/recipes/prometheus-cpp/all/conandata.yml b/recipes/prometheus-cpp/all/conandata.yml index a1e0c249c424c..0aa86dd0d07dd 100644 --- a/recipes/prometheus-cpp/all/conandata.yml +++ b/recipes/prometheus-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.4": + url: "https://github.com/jupp0r/prometheus-cpp/archive/v1.2.4.tar.gz" + sha256: "48dbad454d314b836cc667ec4def93ec4a6e4255fc8387c20cacb3b8b6faee30" "1.1.0": url: "https://github.com/jupp0r/prometheus-cpp/archive/v1.1.0.tar.gz" sha256: "397544fe91e183029120b4eebcfab24ed9ec833d15850aae78fd5db19062d13a" diff --git a/recipes/prometheus-cpp/all/conanfile.py b/recipes/prometheus-cpp/all/conanfile.py index 10a8edf3a1e5e..09bc0c369ee74 100644 --- a/recipes/prometheus-cpp/all/conanfile.py +++ b/recipes/prometheus-cpp/all/conanfile.py @@ -4,7 +4,6 @@ from conan.tools.build import check_min_cppstd, valid_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.scm import Version -from conan.tools.microsoft import is_msvc, check_min_vs import os @@ -36,15 +35,19 @@ class PrometheusCppConan(ConanFile): @property def _min_cppstd(self): - return 11 if Version(self.version) < "1.1.0" else 14 + return "14" if Version(self.version) == "1.1.0" else "11" @property def _compilers_minimum_version(self): return { - "gcc": "7", - "clang": "7", - "apple-clang": "10", - } + "14": { + "gcc": "7", + "clang": "7", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + }, + }.get(self._min_cppstd, {}) def export_sources(self): export_conandata_patches(self) @@ -73,18 +76,14 @@ def requirements(self): def validate(self): if self.info.settings.compiler.cppstd: check_min_cppstd(self, self._min_cppstd) - if Version(self.version) < "1.1.0": - return - check_min_vs(self, 191) - if not is_msvc(self): - minimum_version = self._compilers_minimum_version.get(str(self.info.settings.compiler), False) - if minimum_version and Version(self.info.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." + ) def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/prometheus-cpp/all/test_package/CMakeLists.txt b/recipes/prometheus-cpp/all/test_package/CMakeLists.txt index 0df7da5ba0a1f..f9aa39a0fc4fd 100644 --- a/recipes/prometheus-cpp/all/test_package/CMakeLists.txt +++ b/recipes/prometheus-cpp/all/test_package/CMakeLists.txt @@ -5,8 +5,8 @@ find_package(prometheus-cpp CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE prometheus-cpp::push prometheus-cpp::pull) -if(${prometheus-cpp_VERSION} VERSION_LESS "1.1.0") - target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) -else() +if(${prometheus-cpp_VERSION} VERSION_EQUAL "1.1.0") target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) endif() diff --git a/recipes/prometheus-cpp/config.yml b/recipes/prometheus-cpp/config.yml index 3bfa3902dafa5..11d3240cb85c5 100644 --- a/recipes/prometheus-cpp/config.yml +++ b/recipes/prometheus-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.4": + folder: all "1.1.0": folder: all "1.0.1": diff --git a/recipes/protobuf/all/conanfile.py b/recipes/protobuf/all/conanfile.py index 2b0003b1adc84..d36546a97d0f6 100644 --- a/recipes/protobuf/all/conanfile.py +++ b/recipes/protobuf/all/conanfile.py @@ -3,7 +3,7 @@ from conan.tools.apple import is_apple_os from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy, rename, get, apply_conandata_patches, export_conandata_patches, replace_in_file, rmdir, rm +from conan.tools.files import copy, rename, get, apply_conandata_patches, export_conandata_patches, replace_in_file, rmdir, rm, save from conan.tools.microsoft import check_min_vs, msvc_runtime_flag, is_msvc, is_msvc_static_runtime from conan.tools.scm import Version @@ -146,6 +146,19 @@ def generate(self): if is_apple_os(self) and self.options.shared: # Workaround against SIP on macOS for consumers while invoking protoc when protobuf lib is shared tc.variables["CMAKE_INSTALL_RPATH"] = "@loader_path/../lib" + + if self.settings.os == "Linux": + # Use RPATH instead of RUNPATH to help with specific case + # in the grpc recipe when grpc_cpp_plugin is run with protoc + # in the same build. RPATH ensures that the rpath in the binary + # is respected for transitive dependencies too + project_include = os.path.join(self.generators_folder, "protobuf_project_include.cmake") + save(self, project_include, "add_link_options(-Wl,--disable-new-dtags)") + tc.variables["CMAKE_PROJECT_INCLUDE"] = project_include + # Note: conan2 only could be: + # tc.extra_exelinkflags.append("-Wl,--disable-new-dtags") + # tc.extra_sharedlinkflags.append("-Wl,--disable-new-dtags") + tc.generate() deps = CMakeDeps(self) diff --git a/recipes/pybind11/all/conandata.yml b/recipes/pybind11/all/conandata.yml index ad2c426df1a16..5901aae7c96f6 100644 --- a/recipes/pybind11/all/conandata.yml +++ b/recipes/pybind11/all/conandata.yml @@ -1,28 +1,43 @@ sources: - "2.7.1": - url: "https://github.com/pybind/pybind11/archive/v2.7.1.tar.gz" - sha256: "616d1c42e4cf14fa27b2a4ff759d7d7b33006fdc5ad8fd603bb2c22622f27020" - "2.8.1": - url: "https://github.com/pybind/pybind11/archive/v2.8.1.tar.gz" - sha256: "f1bcc07caa568eb312411dde5308b1e250bd0e1bc020fae855bf9f43209940cc" - "2.9.1": - url: "https://github.com/pybind/pybind11/archive/v2.9.1.tar.gz" - sha256: "c6160321dc98e6e1184cc791fbeadd2907bb4a0ce0e447f2ea4ff8ab56550913" - "2.9.2": - url: "https://github.com/pybind/pybind11/archive/v2.9.2.tar.gz" - sha256: "6bd528c4dbe2276635dc787b6b1f2e5316cf6b49ee3e150264e455a0d68d19c1" - "2.10.0": - url: "https://github.com/pybind/pybind11/archive/v2.10.0.tar.gz" - sha256: "eacf582fa8f696227988d08cfc46121770823839fe9e301a20fbce67e7cd70ec" - "2.10.1": - url: "https://github.com/pybind/pybind11/archive/v2.10.1.tar.gz" - sha256: "111014b516b625083bef701df7880f78c2243835abdb263065b6b59b960b6bad" - "2.10.4": - url: "https://github.com/pybind/pybind11/archive/v2.10.4.tar.gz" - sha256: "832e2f309c57da9c1e6d4542dedd34b24e4192ecb4d62f6f4866a737454c9970" - "2.11.1": - url: "https://github.com/pybind/pybind11/archive/v2.11.1.tar.gz" - sha256: "d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c" + "2.13.6": + url: "https://github.com/pybind/pybind11/archive/v2.13.6.tar.gz" + sha256: "e08cb87f4773da97fa7b5f035de8763abc656d87d5773e62f6da0587d1f0ec20" + "2.13.5": + url: "https://github.com/pybind/pybind11/archive/v2.13.5.tar.gz" + sha256: "b1e209c42b3a9ed74da3e0b25a4f4cd478d89d5efbb48f04b277df427faf6252" + "2.13.4": + url: "https://github.com/pybind/pybind11/archive/v2.13.4.tar.gz" + sha256: "efc901aa0aab439a3fea6efeaf930b5a349fb06394bf845c64ce15a9cf8f0240" + "2.13.2": + url: "https://github.com/pybind/pybind11/archive/v2.13.2.tar.gz" + sha256: "50eebef369d28f07ce1fe1797f38149e5928817be8e539239f2aadfd95b227f3" + "2.13.1": + url: "https://github.com/pybind/pybind11/archive/v2.13.1.tar.gz" + sha256: "51631e88960a8856f9c497027f55c9f2f9115cafb08c0005439838a05ba17bfc" "2.12.0": url: "https://github.com/pybind/pybind11/archive/v2.12.0.tar.gz" sha256: "bf8f242abd1abcd375d516a7067490fb71abd79519a282d22b6e4d19282185a7" + "2.11.1": + url: "https://github.com/pybind/pybind11/archive/v2.11.1.tar.gz" + sha256: "d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c" + "2.10.4": + url: "https://github.com/pybind/pybind11/archive/v2.10.4.tar.gz" + sha256: "832e2f309c57da9c1e6d4542dedd34b24e4192ecb4d62f6f4866a737454c9970" + "2.10.1": + url: "https://github.com/pybind/pybind11/archive/v2.10.1.tar.gz" + sha256: "111014b516b625083bef701df7880f78c2243835abdb263065b6b59b960b6bad" + "2.10.0": + url: "https://github.com/pybind/pybind11/archive/v2.10.0.tar.gz" + sha256: "eacf582fa8f696227988d08cfc46121770823839fe9e301a20fbce67e7cd70ec" + "2.9.2": + url: "https://github.com/pybind/pybind11/archive/v2.9.2.tar.gz" + sha256: "6bd528c4dbe2276635dc787b6b1f2e5316cf6b49ee3e150264e455a0d68d19c1" + "2.9.1": + url: "https://github.com/pybind/pybind11/archive/v2.9.1.tar.gz" + sha256: "c6160321dc98e6e1184cc791fbeadd2907bb4a0ce0e447f2ea4ff8ab56550913" + "2.8.1": + url: "https://github.com/pybind/pybind11/archive/v2.8.1.tar.gz" + sha256: "f1bcc07caa568eb312411dde5308b1e250bd0e1bc020fae855bf9f43209940cc" + "2.7.1": + url: "https://github.com/pybind/pybind11/archive/v2.7.1.tar.gz" + sha256: "616d1c42e4cf14fa27b2a4ff759d7d7b33006fdc5ad8fd603bb2c22622f27020" diff --git a/recipes/pybind11/all/conanfile.py b/recipes/pybind11/all/conanfile.py index aa098ee90ec20..8dc874bff4b37 100644 --- a/recipes/pybind11/all/conanfile.py +++ b/recipes/pybind11/all/conanfile.py @@ -12,18 +12,22 @@ class PyBind11Conan(ConanFile): name = "pybind11" description = "Seamless operability between C++11 and Python" - topics = "pybind11", "python", "binding" - homepage = "https://github.com/pybind/pybind11" license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/pybind/pybind11" + topics = ("pybind11", "python", "binding", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True def layout(self): basic_layout(self, src_folder="src") + def package_id(self): + self.info.clear() + def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) @@ -54,9 +58,6 @@ def package(self): "add_library(", "# add_library(") - def package_id(self): - self.info.clear() - def package_info(self): cmake_base_path = os.path.join("lib", "cmake", "pybind11") self.cpp_info.set_property("cmake_target_name", "pybind11_all_do_not_use") diff --git a/recipes/pybind11/all/test_package/CMakeLists.txt b/recipes/pybind11/all/test_package/CMakeLists.txt index e8d17d781285f..a0ddd8851c031 100644 --- a/recipes/pybind11/all/test_package/CMakeLists.txt +++ b/recipes/pybind11/all/test_package/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.15) -project(test_package CXX) +project(test_package LANGUAGES CXX) + find_package(pybind11 REQUIRED CONFIG) + pybind11_add_module(test_package MODULE test_package.cpp) set_property(TARGET test_package PROPERTY CXX_STANDARD 11) diff --git a/recipes/pybind11/config.yml b/recipes/pybind11/config.yml index adf07a18a08dd..cb2960aa24b66 100644 --- a/recipes/pybind11/config.yml +++ b/recipes/pybind11/config.yml @@ -1,19 +1,29 @@ versions: - "2.7.1": + "2.13.6": folder: all - "2.8.1": + "2.13.5": folder: all - "2.9.1": + "2.13.4": folder: all - "2.9.2": + "2.13.2": folder: all - "2.10.0": + "2.13.1": folder: all - "2.10.1": + "2.12.0": + folder: all + "2.11.1": folder: all "2.10.4": folder: all - "2.11.1": + "2.10.1": folder: all - "2.12.0": + "2.10.0": + folder: all + "2.9.2": + folder: all + "2.9.1": + folder: all + "2.8.1": + folder: all + "2.7.1": folder: all diff --git a/recipes/qcbor/all/conandata.yml b/recipes/qcbor/all/conandata.yml index 50bed9fddeba6..4df224b3ac475 100644 --- a/recipes/qcbor/all/conandata.yml +++ b/recipes/qcbor/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.1": + url: "https://github.com/laurencelundblade/QCBOR/archive/refs/tags/v1.4.1.tar.gz" + sha256: "c7ef031b60b23bf8ede47c66c9713982bba2608668b144280a65665bfcc94470" "1.3": url: "https://github.com/laurencelundblade/QCBOR/archive/refs/tags/v1.3.tar.gz" sha256: "5acd3f3e7b19aad074813736a8776e71859d57c4dec9bfb85cd1dc6c219c8033" @@ -12,6 +15,10 @@ sources: url: "https://github.com/laurencelundblade/QCBOR/archive/refs/tags/v1.0.tar.gz" sha256: "961a46eb5a599cc040bfce4f4fade4427e046f1748f37ba4ebbc097fb9cdf1d3" patches: + "1.4.1": + - patch_file: "patches/1.4.1-0001-fix-cmake.patch" + patch_description: "disable fix fPIC and add installation" + patch_type: "conan" "1.3": - patch_file: "patches/1.2-0001-fix-cmake.patch" patch_description: "disable fix fPIC and add installation" diff --git a/recipes/qcbor/all/conanfile.py b/recipes/qcbor/all/conanfile.py index 7d87de4445169..6c8cca49e3526 100644 --- a/recipes/qcbor/all/conanfile.py +++ b/recipes/qcbor/all/conanfile.py @@ -15,6 +15,7 @@ class QCBORConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/laurencelundblade/QCBOR" topics = ("serialization", "cbor", "rfc-7049", "rfc-8949") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -38,20 +39,23 @@ def config_options(self): del self.options.disable_float def configure(self): - if self.options.shared: + if self.settings.os == "Windows": + self.package_type = "static-library" + del self.options.shared + if self.options.get_safe("shared"): self.options.rm_safe("fPIC") self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") - def layout(self): cmake_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) + tc.variables["BUILD_QCBOR_TEST"] = False if Version(self.version) >= "1.2": tc.variables["QCBOR_OPT_DISABLE_FLOAT_HW_USE"] = self.options.disable_float in ["HW_USE", "PREFERRED", "ALL"] tc.variables["QCBOR_OPT_DISABLE_FLOAT_PREFERRED"] = self.options.disable_float in ["PREFERRED", "ALL"] diff --git a/recipes/qcbor/all/patches/1.0-0001-fix-cmake.patch b/recipes/qcbor/all/patches/1.0-0001-fix-cmake.patch index d5f6fcb7e4dba..87fc6cae3601f 100644 --- a/recipes/qcbor/all/patches/1.0-0001-fix-cmake.patch +++ b/recipes/qcbor/all/patches/1.0-0001-fix-cmake.patch @@ -2,14 +2,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a5bcd0..744662e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -17,3 +17,18 @@ set(SOURCE +@@ -17,3 +17,14 @@ set(SOURCE ) add_library(qcbor ${SOURCE}) -+set_target_properties(qcbor PROPERTIES -+ WINDOWS_EXPORT_ALL_SYMBOLS ON -+) -+ +find_library(LIBM m) +target_link_libraries(qcbor PRIVATE $<$:${LIBM}>) + diff --git a/recipes/qcbor/all/patches/1.1-0001-fix-cmake.patch b/recipes/qcbor/all/patches/1.1-0001-fix-cmake.patch index e5969488c2420..ca95e01302dce 100644 --- a/recipes/qcbor/all/patches/1.1-0001-fix-cmake.patch +++ b/recipes/qcbor/all/patches/1.1-0001-fix-cmake.patch @@ -2,15 +2,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index f0b67b9..4b00b8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -17,3 +17,19 @@ set(SOURCE +@@ -17,3 +17,14 @@ set(SOURCE add_library(qcbor ${SOURCE}) target_include_directories(qcbor PUBLIC inc) -+ -+set_target_properties(qcbor PROPERTIES -+ WINDOWS_EXPORT_ALL_SYMBOLS ON -+) -+ +find_library(LIBM m) +target_link_libraries(qcbor PRIVATE $<$:${LIBM}>) + diff --git a/recipes/qcbor/all/patches/1.2-0001-fix-cmake.patch b/recipes/qcbor/all/patches/1.2-0001-fix-cmake.patch index 8b659e24ca0a3..f50844b0bec9a 100644 --- a/recipes/qcbor/all/patches/1.2-0001-fix-cmake.patch +++ b/recipes/qcbor/all/patches/1.2-0001-fix-cmake.patch @@ -2,7 +2,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 486946c..4234a59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -58,10 +58,14 @@ target_compile_definitions(qcbor +@@ -58,10 +58,10 @@ target_compile_definitions(qcbor $<$:USEFULBUF_DISABLE_ALL_FLOAT> ) @@ -11,14 +11,10 @@ index 486946c..4234a59 100644 target_compile_options(qcbor PRIVATE -Os -fPIC) endif() -+set_target_properties(qcbor PROPERTIES -+ WINDOWS_EXPORT_ALL_SYMBOLS ON -+) -+ # The math library is needed for floating-point support. # To avoid need for it #define QCBOR_DISABLE_FLOAT_HW_USE if (CMAKE_C_COMPILER_ID STREQUAL "GNU") -@@ -75,3 +79,12 @@ endif() +@@ -75,3 +75,12 @@ endif() if (NOT BUILD_QCBOR_TEST STREQUAL "OFF") add_subdirectory(test) endif() diff --git a/recipes/qcbor/all/patches/1.4.1-0001-fix-cmake.patch b/recipes/qcbor/all/patches/1.4.1-0001-fix-cmake.patch new file mode 100644 index 0000000000000..81b3950d82ca7 --- /dev/null +++ b/recipes/qcbor/all/patches/1.4.1-0001-fix-cmake.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e4aa83f..4878a31 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,10 +58,10 @@ target_compile_definitions(qcbor + $<$:USEFULBUF_DISABLE_ALL_FLOAT> + ) + +-if (BUILD_SHARED_LIBS) ++if (0) + target_compile_options(qcbor PRIVATE -Os -fPIC) + endif() + + # The math library is needed for floating-point support. + # To avoid need for it #define QCBOR_DISABLE_FLOAT_HW_USE + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") +@@ -88,6 +88,9 @@ set_target_properties( + include(GNUInstallDirs) + install( + TARGETS qcbor ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/qcbor" + ) + diff --git a/recipes/qcbor/config.yml b/recipes/qcbor/config.yml index 2bbd629f9a807..92a8a4234a53e 100644 --- a/recipes/qcbor/config.yml +++ b/recipes/qcbor/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.1": + folder: all "1.3": folder: all "1.2": diff --git a/recipes/qr-code-generator/all/CMakeLists.txt b/recipes/qr-code-generator/all/CMakeLists.txt index 60ddaa9f6b380..7629857f9b79e 100644 --- a/recipes/qr-code-generator/all/CMakeLists.txt +++ b/recipes/qr-code-generator/all/CMakeLists.txt @@ -1,9 +1,16 @@ cmake_minimum_required(VERSION 3.15) project(QR-Code-Generator) -include(src/files.cmake) -add_library(${LIBRARY_NAME} ${SRC}) +set(SRC_C ${CMAKE_SOURCE_DIR}/src/c/qrcodegen.c) +set(LIBRARY_NAME_C qrcodegenc) +set(HEADERS_C ${CMAKE_SOURCE_DIR}/src/c/qrcodegen.h) + +add_library(${LIBRARY_NAME_C} ${SRC_C}) +set_target_properties(${LIBRARY_NAME_C} PROPERTIES PUBLIC_HEADER "${HEADERS_C}") +install(TARGETS ${LIBRARY_NAME_C} RUNTIME LIBRARY ARCHIVE PUBLIC_HEADER DESTINATION include/qrcodegenc) +include(src/files.cmake) +add_library(${LIBRARY_NAME} ${SRC}) set_target_properties(${LIBRARY_NAME} PROPERTIES PUBLIC_HEADER "${HEADERS}") install(TARGETS ${LIBRARY_NAME} RUNTIME LIBRARY ARCHIVE PUBLIC_HEADER DESTINATION include/qrcodegen) diff --git a/recipes/qr-code-generator/all/conanfile.py b/recipes/qr-code-generator/all/conanfile.py index 84430d69ae1d0..656603b7ba557 100644 --- a/recipes/qr-code-generator/all/conanfile.py +++ b/recipes/qr-code-generator/all/conanfile.py @@ -101,8 +101,9 @@ def package(self): cmake.install() def package_info(self): - self.cpp_info.libs = [ - "qrcodegen" if Version(self.version) < "1.7.0" else "qrcodegencpp" - ] + self.cpp_info.components["qrcodegencpp"].set_property("cmake_target_name", "qr-code-generator::qrcodegencpp") + self.cpp_info.components["qrcodegencpp"].libs = ["qrcodegen" if Version(self.version) < "1.7.0" else "qrcodegencpp"] + self.cpp_info.components["qrcodegenc"].set_property("cmake_target_name", "qr-code-generator::qrcodegenc") + self.cpp_info.components["qrcodegenc"].libs = ["qrcodegenc"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("m") diff --git a/recipes/qt/5.x.x/conandata.yml b/recipes/qt/5.x.x/conandata.yml index b12be53bf6b58..16b0489abd752 100644 --- a/recipes/qt/5.x.x/conandata.yml +++ b/recipes/qt/5.x.x/conandata.yml @@ -32,6 +32,9 @@ patches: "patch_file": "patches/fix-macdeployqt.diff" - "base_path": "qt5/qtwebengine/src/3rdparty" "patch_file": "patches/0001-Find-fontconfig-using-pkg-config.patch" + - "base_path": "qt5/qtwebengine/src/3rdparty" + "patch_file": "patches/Fix-errors-and-warnings-for-perfetto.patch" + "patch_description": "Fix qtwebengine build issues for vs 2022 (backport QTBUG-117073)" - "base_path": "qt5/qtbase" "patch_file": "patches/android-openssl.diff" - "base_path": "qt5/qtbase" @@ -45,3 +48,20 @@ patches: "patch_file": "patches/5.15.12-fix-macos-cpp-lib-memory-resource.patch" "patch_source": "https://codereview.qt-project.org/c/qt/qtbase/+/482392" "patch_type": "portability" + - "base_path": "qt5/qtwebengine" + "patch_description": "qtwebengine don't use rpath-link on macOS" + "patch_file": "patches/5.15.14-macos-qtwebengine-rpath-link.patch" + - "base_path": "qt5/qtlocation" + "patch_description": "qtlocation missing utility header" + "patch_file": "patches/5.15.14-macos-qtlocation-utility-header.patch" + - "base_path": "qt5/qtwebengine/src/3rdparty" + "patch_description": "qtwebengine fix missing headers" + "patch_file": "patches/5.15.14-qtwebengine-missing-deps.patch" + - "base_path": "qt5/qtwebengine/src/3rdparty" + "patch_description": "macos fix chromium build in newer macos SDKs" + "patch_file": "patches/5.15.14-macos-chromium-newer-sdks.patch" + - "patch_file": "patches/ffmpeg-x86-optimization.patch" + "base_path": "qt5/qtwebengine" + "patch_description": "Fix build error with binutils >= 2.41" + "patch_type": "portability" + "patch_source": "https://packages.ubuntu.com/source/focal-updates/qtwebengine-opensource-src" diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index f2324d805d008..0ad50b6ce723c 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -1,4 +1,4 @@ -from conan import ConanFile +from conan import ConanFile, conan_version from conan.errors import ConanException, ConanInvalidConfiguration from conan.tools.android import android_abi from conan.tools.apple import is_apple_os @@ -10,6 +10,7 @@ from conan.tools.scm import Version import configparser import glob +from io import StringIO import itertools import os import textwrap @@ -122,9 +123,10 @@ class QtConan(ConanFile): "sysroot": None, "config": None, "multiconfiguration": False, - "essential_modules": not os.getenv('CONAN_CENTER_BUILD_SERVICE') } - default_options.update({f"{status}_modules": False for status in _module_statuses if status != "essential"}) + # essential_modules, addon_modules, deprecated_modules, preview_modules: + # these are only provided for convenience, set to False by default + default_options.update({f"{status}_modules": False for status in _module_statuses}) no_copy_source = True short_paths = True @@ -154,20 +156,17 @@ def validate_build(self): raise ConanInvalidConfiguration(msg) # In any case, check its actual version for compatibility - from six import StringIO # Python 2 and 3 compatible - mybuf = StringIO() - cmd_v = f"\"{python_exe}\" --version" - self.run(cmd_v, mybuf) - verstr = mybuf.getvalue().strip().split("Python ")[1] - if verstr.endswith("+"): - verstr = verstr[:-1] + command_output = StringIO() + cmd_v = f"\"{python_exe}\" -c \"import platform;print(platform.python_version())\"" + self.run(cmd_v, command_output) + verstr = command_output.getvalue().strip() version = Version(verstr) # >= 2.7.5 & < 3 v_min = "2.7.5" v_max = "3.0.0" if (version >= v_min) and (version < v_max): msg = ("Found valid Python 2 required for QtWebengine:" - f" version={mybuf.getvalue()}, path={python_exe}") + f" version={verstr}, path={python_exe}") self.output.success(msg) else: msg = (f"Found Python 2 in path, but with invalid version {verstr}" @@ -209,23 +208,27 @@ def config_options(self): if self.settings.os != "Android": del self.options.android_sdk + def _debug_output(self, message): + if Version(conan_version) >= "2": + self.output.debug(message) + def configure(self): # if self.settings.os != "Linux": # self.options.with_libiconv = False # QTBUG-84708 if not self.options.gui: - del self.options.opengl - del self.options.with_vulkan - del self.options.with_freetype - del self.options.with_fontconfig - del self.options.with_harfbuzz - del self.options.with_libjpeg - del self.options.with_libpng - del self.options.with_md4c - del self.options.with_x11 + self.options.rm_safe("opengl") + self.options.rm_safe("with_vulkan") + self.options.rm_safe("with_freetype") + self.options.rm_safe("with_fontconfig") + self.options.rm_safe("with_harfbuzz") + self.options.rm_safe("with_libjpeg") + self.options.rm_safe("with_libpng") + self.options.rm_safe("with_md4c") + self.options.rm_safe("with_x11") if not self.options.with_dbus: - del self.options.with_atspi + self.options.rm_safe("with_atspi") if self.options.multiconfiguration: del self.settings.build_type @@ -251,25 +254,50 @@ def configure(self): for m in submodules_tree: assert m in ["qtbase", "qtqa", "qtrepotools"] or m in self._submodules, "module %s is not present in recipe options : (%s)" % (m, ",".join(self._submodules)) - for m in self._submodules: - if m not in submodules_tree: - delattr(self.options, m) + for module in self._submodules: + if module not in submodules_tree: + self._debug_output(f"qt5: removing {module} from options as it is not an option for this version, or it is ignored or obsolete") + self.options.rm_safe(module) + + # Requested modules: + # - any module for non-removed options that have 'True' value + # - any enabled via `xxx_modules` that does not have a 'False' value + # Note that at this point, the submodule options dont have a value unless one is given externally + # to the recipe (e.g. via the command line, a profile, or a consumer) + requested_modules = set([module for module in self._submodules if self.options.get_safe(module)]) + for module in [m for m in self._submodules if m in submodules_tree]: + status = submodules_tree[module]['status'] + is_disabled = self.options.get_safe(module) == False + if self.options.get_safe(f"{status}_modules"): + if not is_disabled: + requested_modules.add(module) + else: + self.output.warning(f"qt5: {module} requested because {status}_modules=True" + f" but it has been explicitly disabled with {module}=False") + + self.output.info(f"qt5: requested modules {list(requested_modules)}") - def _enablemodule(mod): - if mod != "qtbase": - setattr(self.options, mod, True) - for req in submodules_tree[mod]["depends"]: - _enablemodule(req) + required_modules = {} + for module in requested_modules: + deps = submodules_tree[module]["depends"] + for dep in deps: + required_modules.setdefault(dep,[]).append(module) - for module in self._submodules: - if self.options.get_safe(module): - _enablemodule(module) - else: - if module in submodules_tree: - for status in self._module_statuses: - if getattr(self.options, f"{status}_modules") and submodules_tree[module]['status'] == status: - _enablemodule(module) - break + required_but_disabled = [m for m in required_modules.keys() if self.options.get_safe(m) == False] + if required_modules: + self._debug_output(f"qt5: required_modules modules {list(required_modules.keys())}") + if required_but_disabled: + required_by = set() + for m in required_but_disabled: + required_by.update(required_modules[m]) + raise ConanInvalidConfiguration(f"Modules {required_but_disabled} are explicitly disabled, " + f"but are required by {list(required_by)}, enabled by other options") + + enabled_modules = requested_modules.union(set(required_modules.keys())) + enabled_modules.discard("qtbase") + + for module in list(enabled_modules): + setattr(self.options, module, True) for module in self._submodules: if module in self.options and not self.options.get_safe(module): @@ -285,6 +313,16 @@ def _enablemodule(mod): if self.options.qtwebengine: self.options.with_fontconfig = True + for status in self._module_statuses: + # These are convenience only, should not affect package_id + option_name = f"{status}_modules" + self._debug_output(f"qt5 removing convenience option: {option_name}," + f" see individual module options") + self.options.rm_safe(option_name) + + for option in self.options.items(): + self._debug_output(f"qt5 option {option[0]}={option[1]}") + def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, "11") @@ -377,13 +415,13 @@ def requirements(self): self.requires("harfbuzz/8.3.0") if self.options.get_safe("with_libjpeg", False) and not self.options.multiconfiguration: if self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.1") + self.requires("libjpeg-turbo/[>=3.0 <3.1]") else: self.requires("libjpeg/9e") if self.options.get_safe("with_libpng", False) and not self.options.multiconfiguration: - self.requires("libpng/1.6.42") + self.requires("libpng/[>=1.6 <2]") if self.options.with_sqlite3 and not self.options.multiconfiguration: - self.requires("sqlite3/3.45.0") + self.requires("sqlite3/[>=3.45.0 <4]") if self.options.get_safe("with_mysql", False): self.requires("libmysqlclient/8.1.0") if self.options.with_pq: @@ -404,7 +442,7 @@ def requirements(self): if self.options.with_zstd: self.requires("zstd/1.5.5") if self.options.qtwebengine and self.settings.os in ["Linux", "FreeBSD"]: - self.requires("expat/2.6.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("opus/1.4") if not self.options.qtwayland: self.requires("xorg-proto/2022.2") @@ -440,14 +478,12 @@ def package_id(self): self.info.settings.compiler.runtime_type = "Release/Debug" if self.info.settings.os == "Android": del self.info.options.android_sdk - for status in self._module_statuses: - delattr(self.info.options, f"{status}_modules") def build_requirements(self): if self._settings_build.os == "Windows" and is_msvc(self): - self.tool_requires("jom/1.1.3") + self.tool_requires("jom/[>=1.1 <2]") if self.options.qtwebengine: - self.tool_requires("ninja/1.11.1") + self.tool_requires("ninja/[>=1.12 <2]") self.tool_requires("nodejs/18.15.0") self.tool_requires("gperf/3.1") # gperf, bison, flex, python >= 2.7.5 & < 3 @@ -823,6 +859,13 @@ def _getenvpath(var): # see https://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-rpathdir args += [f"QMAKE_RPATHDIR+=\"{libpath}\""] + if self.settings.compiler == "apple-clang" and self.options.qtmultimedia: + # XCode 14.3 finally removes std::unary_function, so compilation fails + # when using newer SDKs when using C++17 or higher. + # This macro re-enables them. Should be safe to pass this macro even + # in earlier versions, as it would have no effect. + args += ['QMAKE_CXXFLAGS+="-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION=1"'] + if self.options.qtwebengine and self.settings.os in ["Linux", "FreeBSD"]: args += ["-qt-webengine-ffmpeg", "-system-webengine-opus", @@ -964,6 +1007,8 @@ def _create_private_module(module, dependencies=[]): if self.options.qtdeclarative: _create_private_module("Qml", ["CorePrivate", "Qml"]) + if self.options.gui: + _create_private_module("Quick", ["CorePrivate", "GuiPrivate", "QmlPrivate", "Quick"]) def package_info(self): self.cpp_info.set_property("cmake_file_name", "Qt5") @@ -1233,6 +1278,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): self.cpp_info.components["qtQmlImportScanner"].requires = _get_corrected_reqs(["Qml"]) if self.options.gui: _create_module("Quick", ["Gui", "Qml", "QmlModels"]) + _add_build_module("qtQuick", self._cmake_qt5_private_file("Quick")) if self.options.widgets: _create_module("QuickWidgets", ["Gui", "Qml", "Quick", "Widgets"]) _create_module("QuickShapes", ["Gui", "Qml", "Quick"]) @@ -1378,8 +1424,10 @@ def _create_plugin(pluginname, libname, plugintype, requires): _create_plugin("QGstreamerCaptureServicePlugin", "gstmediacapture", "mediaservice", []) _create_plugin("QGstreamerPlayerServicePlugin", "gstmediaplayer", "mediaservice", []) if self.settings.os == "Linux": - _create_plugin("CameraBinServicePlugin", "gstcamerabin", "mediaservice", []) - _create_plugin("QAlsaPlugin", "qtaudio_alsa", "audio", []) + if self.options.with_gstreamer: + _create_plugin("CameraBinServicePlugin", "gstcamerabin", "mediaservice", []) + if self.options.get_safe("with_libalsa", False): + _create_plugin("QAlsaPlugin", "qtaudio_alsa", "audio", []) if self.settings.os == "Windows": _create_plugin("AudioCaptureServicePlugin", "qtmedia_audioengine", "mediaservice", []) _create_plugin("DSServicePlugin", "dsengine", "mediaservice", []) diff --git a/recipes/qt/5.x.x/patches/5.15.14-macos-chromium-newer-sdks.patch b/recipes/qt/5.x.x/patches/5.15.14-macos-chromium-newer-sdks.patch new file mode 100644 index 0000000000000..cb5ec1fca2189 --- /dev/null +++ b/recipes/qt/5.x.x/patches/5.15.14-macos-chromium-newer-sdks.patch @@ -0,0 +1,13 @@ +diff --git a/chromium/base/strings/utf_string_conversions.cc b/chromium/base/strings/utf_string_conversions.cc +index 12ed1f3e0..004ac6855 100644 +--- a/chromium/base/strings/utf_string_conversions.cc ++++ b/chromium/base/strings/utf_string_conversions.cc +@@ -15,7 +15,7 @@ + #include "base/third_party/icu/icu_utf.h" + #include "build/build_config.h" + +-#if defined(OS_MAC) ++#if defined(OS_MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 120300 + namespace std { + inline namespace __1 { + template class basic_string; diff --git a/recipes/qt/5.x.x/patches/5.15.14-macos-qtlocation-utility-header.patch b/recipes/qt/5.x.x/patches/5.15.14-macos-qtlocation-utility-header.patch new file mode 100644 index 0000000000000..000965fda4346 --- /dev/null +++ b/recipes/qt/5.x.x/patches/5.15.14-macos-qtlocation-utility-header.patch @@ -0,0 +1,13 @@ +diff --git a/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp b/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp +index c7dc8b38e..d9e3709b1 100644 +--- a/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp ++++ b/src/3rdparty/mapbox-gl-native/include/mbgl/util/unique_any.hpp +@@ -3,6 +3,8 @@ + #include + #include + #include ++#include ++ + namespace mbgl { + namespace util { + \ No newline at end of file diff --git a/recipes/qt/5.x.x/patches/5.15.14-macos-qtwebengine-rpath-link.patch b/recipes/qt/5.x.x/patches/5.15.14-macos-qtwebengine-rpath-link.patch new file mode 100644 index 0000000000000..2fb28c93ca411 --- /dev/null +++ b/recipes/qt/5.x.x/patches/5.15.14-macos-qtwebengine-rpath-link.patch @@ -0,0 +1,13 @@ +diff --git a/mkspecs/features/gn_generator.prf b/mkspecs/features/gn_generator.prf +index 306e58db1..a42059e82 100644 +--- a/mkspecs/features/gn_generator.prf ++++ b/mkspecs/features/gn_generator.prf +@@ -166,7 +166,7 @@ for (flag, GN_FLAGS): GN_CONTENTS += " \"$$flag\"," + unix:!macos: GN_CONTENTS += " \"-Wl,-rpath=$${rpath}\"," + } + } +-!isEmpty(QMAKE_RPATHLINKDIR): GN_CONTENTS += " \"-Wl,-rpath-link=$${QMAKE_RPATHLINKDIR}\"," ++!isEmpty(QMAKE_LFLAGS_RPATHLINK):!isEmpty(QMAKE_RPATHLINKDIR): GN_CONTENTS += " \"-Wl,-rpath-link=$${QMAKE_RPATHLINKDIR}\"," + GN_CONTENTS += " ]" + + GN_CONTENTS += " lib_dirs = [" diff --git a/recipes/qt/5.x.x/patches/5.15.14-qtwebengine-missing-deps.patch b/recipes/qt/5.x.x/patches/5.15.14-qtwebengine-missing-deps.patch new file mode 100644 index 0000000000000..fafd46513f4b8 --- /dev/null +++ b/recipes/qt/5.x.x/patches/5.15.14-qtwebengine-missing-deps.patch @@ -0,0 +1,12 @@ +diff --git a/chromium/content/public/browser/BUILD.gn b/chromium/content/public/browser/BUILD.gn +index 7cf82a4..0e0dda2 100644 +--- a/chromium/content/public/browser/BUILD.gn ++++ b/chromium/content/public/browser/BUILD.gn +@@ -469,6 +469,7 @@ jumbo_source_set("browser_sources") { + "//build:chromeos_buildflags", + "//cc", + "//components/viz/host", ++ "//components/spellcheck:buildflags", + "//content/browser", # Must not be public_deps! + "//device/fido", + "//gpu", diff --git a/recipes/qt/5.x.x/patches/Fix-errors-and-warnings-for-perfetto.patch b/recipes/qt/5.x.x/patches/Fix-errors-and-warnings-for-perfetto.patch new file mode 100644 index 0000000000000..abd82e1674e40 --- /dev/null +++ b/recipes/qt/5.x.x/patches/Fix-errors-and-warnings-for-perfetto.patch @@ -0,0 +1,101 @@ +From 851cd7c7a079fa5da63770c49724036e8338e813 Mon Sep 17 00:00:00 2001 +From: Michal Klocek +Date: Wed, 20 Sep 2023 07:45:29 +0200 +Subject: [PATCH] Fix errors and warnings for perfetto +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf8 +Content-Transfer-Encoding: 8bit + +It seems newest msvc compiler does not like perfetto circualar queue +const iterator, which ends in issues with std::swap of std::sort. +Make sure it is non const. + +Fix warnings. + +Deals with: "error C2672: 'swap': no matching overloaded function +found." + +Fixes: QTBUG-117073 +Change-Id: I02901e61a1bb8863d72ca02a0ccd841e54309d6e +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/505412 +Reviewed-by: Martin Negyokru +Reviewed-by: Michael Brüning +--- + .../perfetto/include/perfetto/ext/base/circular_queue.h | 9 ++------- + .../third_party/perfetto/src/trace_processor/storage/metadata.h | 2 ++ + .../third_party/perfetto/src/trace_processor/storage/stats.h | 2 ++ + .../perfetto/src/trace_processor/tables/macros_internal.h | 2 ++ + 4 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h b/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h +index 18ca7702614..ec46e69f817 100644 +--- a/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h ++++ b/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h +@@ -67,19 +67,14 @@ class CircularQueue { + ignore_result(generation); + } + +- T* operator->() { ++ T* operator->() const { + #if PERFETTO_DCHECK_IS_ON() + PERFETTO_DCHECK(generation_ == queue_->generation()); + #endif + return queue_->Get(pos_); + } + +- const T* operator->() const { +- return const_cast::Iterator*>(this)->operator->(); +- } +- +- T& operator*() { return *(operator->()); } +- const T& operator*() const { return *(operator->()); } ++ T& operator*() const { return *(operator->()); } + + value_type& operator[](difference_type i) { return *(*this + i); } + +diff --git a/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h b/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h +index 4796ae4edcd..30e534b216b 100644 +--- a/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h ++++ b/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h +@@ -59,8 +59,10 @@ namespace metadata { + F(kMulti, "multi") + // clang-format + ++#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) + // Ignore GCC warning about a missing argument for a variadic macro parameter. + #pragma GCC system_header ++#endif + + #define PERFETTO_TP_META_TYPE_ENUM(varname, ...) varname + enum class KeyType : size_t { +diff --git a/chromium/third_party/perfetto/src/trace_processor/storage/stats.h b/chromium/third_party/perfetto/src/trace_processor/storage/stats.h +index 7f14803244e..30b56c62544 100644 +--- a/chromium/third_party/perfetto/src/trace_processor/storage/stats.h ++++ b/chromium/third_party/perfetto/src/trace_processor/storage/stats.h +@@ -189,7 +189,9 @@ enum Source { + }; + + // Ignore GCC warning about a missing argument for a variadic macro parameter. ++#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) + #pragma GCC system_header ++#endif + + // Declares an enum of literals (one for each stat). The enum values of each + // literal corresponds to the string index in the arrays below. +diff --git a/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h b/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h +index 875efd62e0d..1ca5068cc32 100644 +--- a/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h ++++ b/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h +@@ -140,7 +140,9 @@ class MacroTable : public Table { + } // namespace macros_internal + + // Ignore GCC warning about a missing argument for a variadic macro parameter. ++#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) + #pragma GCC system_header ++#endif + + // Basic helper macros. + #define PERFETTO_TP_NOOP(...) +-- +2.16.3 + diff --git a/recipes/qt/5.x.x/patches/ffmpeg-x86-optimization.patch b/recipes/qt/5.x.x/patches/ffmpeg-x86-optimization.patch new file mode 100644 index 0000000000000..cff8df9a43395 --- /dev/null +++ b/recipes/qt/5.x.x/patches/ffmpeg-x86-optimization.patch @@ -0,0 +1,64 @@ +Description: avcodec/x86/mathops: clip constants used with shift instructions within inline assembly + Fixes assembling with gas from binutils >= 2.41. +Origin: upstream, https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/effadce6c756247e +Bug: https://bugs.debian.org/1038132 +Last-Update: 2023-07-21 + +--- a/src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/mathops.h ++++ b/src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/mathops.h +@@ -35,12 +35,20 @@ + static av_always_inline av_const int MULL(int a, int b, unsigned shift) + { + int rt, dummy; ++ if (__builtin_constant_p(shift)) + __asm__ ( + "imull %3 \n\t" + "shrdl %4, %%edx, %%eax \n\t" + :"=a"(rt), "=d"(dummy) +- :"a"(a), "rm"(b), "ci"((uint8_t)shift) ++ :"a"(a), "rm"(b), "i"(shift & 0x1F) + ); ++ else ++ __asm__ ( ++ "imull %3 \n\t" ++ "shrdl %4, %%edx, %%eax \n\t" ++ :"=a"(rt), "=d"(dummy) ++ :"a"(a), "rm"(b), "c"((uint8_t)shift) ++ ); + return rt; + } + +@@ -113,19 +121,31 @@ __asm__ volatile(\ + // avoid +32 for shift optimization (gcc should do that ...) + #define NEG_SSR32 NEG_SSR32 + static inline int32_t NEG_SSR32( int32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("sarl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("sarl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + + #define NEG_USR32 NEG_USR32 + static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("shrl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("shrl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + diff --git a/recipes/qt/5.x.x/test_package/CMakeLists.txt b/recipes/qt/5.x.x/test_package/CMakeLists.txt index 0d11db68fc293..6c9a4ef2b991c 100644 --- a/recipes/qt/5.x.x/test_package/CMakeLists.txt +++ b/recipes/qt/5.x.x/test_package/CMakeLists.txt @@ -3,7 +3,7 @@ project(test_package LANGUAGES CXX) find_package(Qt5 COMPONENTS Core Network Sql Concurrent Xml REQUIRED CONFIG) -add_executable(${PROJECT_NAME} WIN32 test_package.cpp greeter.h example.qrc) +add_executable(${PROJECT_NAME} test_package.cpp greeter.h example.qrc) target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Network Qt5::Sql Qt5::Concurrent Qt5::Xml) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) set_target_properties(${PROJECT_NAME} PROPERTIES AUTOMOC ON AUTORCC ON) diff --git a/recipes/qt/5.x.x/test_v1_package/CMakeLists.txt b/recipes/qt/5.x.x/test_v1_package/CMakeLists.txt index d5866335fec6a..a56d8c5c4fe51 100644 --- a/recipes/qt/5.x.x/test_v1_package/CMakeLists.txt +++ b/recipes/qt/5.x.x/test_v1_package/CMakeLists.txt @@ -18,6 +18,6 @@ set(CMAKE_AUTORCC ON) set(SOURCES ../test_package/test_package.cpp ../test_package/greeter.h ../test_package/example.qrc) -add_executable(${PROJECT_NAME} WIN32 ${SOURCES}) +add_executable(${PROJECT_NAME} ${SOURCES}) target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Network Qt5::Sql Qt5::Concurrent Qt5::Xml) diff --git a/recipes/qt/6.x.x/conandata.yml b/recipes/qt/6.x.x/conandata.yml index 8467da32623a7..547a052a46a96 100644 --- a/recipes/qt/6.x.x/conandata.yml +++ b/recipes/qt/6.x.x/conandata.yml @@ -21,21 +21,6 @@ sources: - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.7/6.7.1/single/qt-everywhere-src-6.7.1.tar.xz" - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.7/6.7.1/single/qt-everywhere-src-6.7.1.tar.xz" sha256: "38dbf2768776e875ed5cdea8cccf1a240512a29769768084430914c4a33bedc4" - "6.7.0": - url: - - "https://download.qt.io/official_releases/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://download.qt.io/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://qt.mirror.constant.com/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://mirrors.20i.com/pub/qt.io/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://ftp.nluug.nl/languages/qt/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://mirror.netcologne.de/qtproject/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://qtproject.mirror.liquidtelecom.com/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" - sha256: "bf5089912364f99cf9baf6c109de76a3172eec6267f148c69800575c47f90087" "6.6.3": url: - "https://download.qt.io/official_releases/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" @@ -59,55 +44,6 @@ sources: - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" sha256: "69d0348fef415da98aa890a34651e9cfb232f1bffcee289b7b4e21386bf36104" - "6.6.2": - url: - - "https://download.qt.io/official_releases/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://download.qt.io/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirrors.20i.com/pub/qt.io/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://ftp.nluug.nl/languages/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirror.netcologne.de/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirrors.dotsrc.org/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://qtproject.mirror.liquidtelecom.com/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://qt.mirror.constant.com/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirrors.sau.edu.cn/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirrors.cloud.tencent.com/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" - sha256: "3c1e42b3073ade1f7adbf06863c01e2c59521b7cc2349df2f74ecd7ebfcb922d" - "6.6.1": - url: - - "https://download.qt.io/official_releases/qt/6.6/6.6.1/single/qt-everywhere-src-6.6.1.tar.xz" - - "https://download.qt.io/archive/qt/6.6/6.6.1/single/qt-everywhere-src-6.6.1.tar.xz" - - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.6/6.6.1/single/qt-everywhere-src-6.6.1.tar.xz" - sha256: "dd3668f65645fe270bc615d748bd4dc048bd17b9dc297025106e6ecc419ab95d" - "6.6.0": - url: - - "https://download.qt.io/official_releases/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://download.qt.io/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://qt.mirror.constant.com/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://mirrors.20i.com/pub/qt.io/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://ftp.nluug.nl/languages/qt/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://mirror.netcologne.de/qtproject/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://mirror.web4africa.ng/qt/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://mirrors.dotsrc.org/qtproject/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://ftp.icm.edu.pl/packages/qt/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://qtproject.mirror.liquidtelecom.com/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.6/6.6.0/single/qt-everywhere-src-6.6.0.tar.xz" - sha256: "652538fcb5d175d8f8176c84c847b79177c87847b7273dccaec1897d80b50002" "6.5.3": url: - "https://download.qt.io/official_releases/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" @@ -128,22 +64,6 @@ sources: - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.5/6.5.3/single/qt-everywhere-src-6.5.3.tar.xz" sha256: "7cda4d119aad27a3887329cfc285f2aba5da85601212bcb0aea27bd6b7b544cb" - "6.4.2": - url: - - "https://download.qt.io/archive/qt/6.4/6.4.2/single/qt-everywhere-src-6.4.2.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/6.4/6.4.2/single/qt-everywhere-src-6.4.2.tar.xz" - - "https://www.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.4/6.4.2/single/qt-everywhere-src-6.4.2.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/6.4/6.4.2/single/qt-everywhere-src-6.4.2.tar.xz" - - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/6.4/6.4.2/single/qt-everywhere-src-6.4.2.tar.xz" - sha256: "689f53e6652da82fccf7c2ab58066787487339f28d1ec66a8765ad357f4976be" - "6.3.2": - url: - - "https://download.qt.io/archive/qt/6.3/6.3.2/single/qt-everywhere-src-6.3.2.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/6.3/6.3.2/single/qt-everywhere-src-6.3.2.tar.xz" - - "https://www.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.3/6.3.2/single/qt-everywhere-src-6.3.2.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/6.3/6.3.2/single/qt-everywhere-src-6.3.2.tar.xz" - - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/6.3/6.3.2/single/qt-everywhere-src-6.3.2.tar.xz" - sha256: "b90524f686224a0e5a945c1d65307e16a375348dbe275c9ac11de171fe31374a" patches: "6.7.1": - "base_path": "qtwebengine" @@ -151,56 +71,12 @@ patches: "patch_file": "patches/c72097e_6.6.0.diff" "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" "patch_type": "bugfix" - "6.7.0": - - "base_path": "qtwebengine" - "patch_description": "Workaround for too long .rps file name" - "patch_file": "patches/c72097e_6.6.0.diff" - "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" - "patch_type": "bugfix" "6.6.3": - "base_path": "qtwebengine" "patch_description": "Workaround for too long .rps file name" "patch_file": "patches/c72097e_6.6.0.diff" "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" "patch_type": "bugfix" - "6.6.2": - - "base_path": "qtwebengine" - "patch_description": "Workaround for too long .rps file name" - "patch_file": "patches/c72097e_6.6.0.diff" - "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" - "patch_type": "bugfix" - "6.6.1": - - "base_path": "qtwebengine" - "patch_description": "Workaround for too long .rps file name" - "patch_file": "patches/c72097e_6.6.0.diff" - "patch_type": "bugfix" - "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" - - "base_path": "qtbase" - "patch_description": "Fix build error with lambda on GCC 9.2" - "patch_file": "patches/32fa63f.patch" - "patch_type": "bugfix" - "patch_source": "https://bugreports.qt.io/browse/QTBUG-112920" - - "base_path": "qtbase" - "patch_description": "Use absolute path in the generated header files to avoid relative path longer than 250 characters (not supported on by msvc compiler)" - "patch_file": "patches/fix-long-path-on-windows_6.6.1.patch" - "patch_type": "bugfix" - "patch_source": "https://code.qt.io/cgit/qt/qtbase.git/commit/?id=b4246a5c28472de3c4b6a85a3daf4a1d578894ab" - "6.6.0": - - "base_path": "qtwebengine" - "patch_description": "Workaround for too long .rps file name" - "patch_file": "patches/c72097e_6.6.0.diff" - "patch_type": "bugfix" - "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" - - "base_path": "qtbase" - "patch_description": "Fix build error with lambda on GCC 9.2" - "patch_file": "patches/32fa63f.patch" - "patch_type": "bugfix" - "patch_source": "https://bugreports.qt.io/browse/QTBUG-112920" - - "base_path": "qtbase" - "patch_description": "Use absolute path in the generated header files to avoid relative path longer than 250 characters (not supported on by msvc compiler)" - "patch_file": "patches/fix-long-path-on-windows_6.6.0.patch" - "patch_type": "bugfix" - "patch_source": "https://code.qt.io/cgit/qt/qtbase.git/commit/?id=b4246a5c28472de3c4b6a85a3daf4a1d578894ab" "6.5.3": - "base_path": "qtwebengine" "patch_description": "Workaround for too long .rps file name" @@ -217,45 +93,3 @@ patches: "patch_file": "patches/fix-long-path-on-windows_6.5.3.patch" "patch_type": "bugfix" "patch_source": "https://code.qt.io/cgit/qt/qtbase.git/commit/?id=b4246a5c28472de3c4b6a85a3daf4a1d578894ab" - "6.4.2": - - base_path: "qtbase/cmake" - patch_description: "Fix pri helpers" - patch_file: "patches/qt6-pri-helpers-fix.diff" - patch_type: "bugfix" - patch_source: "https://bugreports.qt.io/browse/QTBUG-95569" - - patch_file: "patches/c72097e.diff" - base_path: "qtwebengine" - patch_description: "Workaround for too long .rps file name" - patch_type: "bugfix" - patch_source: "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" - - patch_file: "patches/d13958d.diff" - base_path: "qtbase" - patch_description: "Fix PCRE2 detection" - patch_type: "bugfix" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/445885" - - patch_file: "patches/fix_cmake3.28.patch" - base_path: "qtbase" - patch_description: "CMake: Fix build with CMake 3.28 on macOS" - patch_source: "https://github.com/qt/qtbase/commit/0efea8020c1d221635aaa0a71529edb392cfe3cc" - patch_type: "bugfix" - "6.3.2": - - base_path: "qtbase/cmake" - patch_description: "Fix pri helpers" - patch_file: "patches/qt6-pri-helpers-fix.diff" - patch_type: "bugfix" - patch_source: "https://bugreports.qt.io/browse/QTBUG-95569" - - patch_file: "patches/c72097e.diff" - base_path: "qtwebengine" - patch_description: "Workaround for too long .rps file name" - patch_type: "bugfix" - patch_source: "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" - - patch_file: "patches/d13958d.diff" - base_path: "qtbase" - patch_description: "Fix PCRE2 detection" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/445885" - patch_type: "bugfix" - - patch_file: "patches/fix_cmake3.28.patch" - base_path: "qtbase" - patch_description: "CMake: Fix build with CMake 3.28 on macOS" - patch_source: "https://github.com/qt/qtbase/commit/0efea8020c1d221635aaa0a71529edb392cfe3cc" - patch_type: "bugfix" diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index 60bff7fddfd16..508b43c683f44 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -4,7 +4,7 @@ import platform import textwrap -from conan import ConanFile +from conan import ConanFile, conan_version from conan.tools.apple import is_apple_os from conan.tools.build import cross_building, check_min_cppstd, default_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout @@ -122,9 +122,10 @@ class QtConan(ConanFile): "sysroot": None, "multiconfiguration": False, "disabled_features": "", - "essential_modules": not os.getenv('CONAN_CENTER_BUILD_SERVICE') } - default_options.update({f"{status}_modules": False for status in _module_statuses if status != "essential"}) + # essential_modules, addon_modules, deprecated_modules, preview_modules: + # these are only provided for convenience, set to False by default + default_options.update({f"{status}_modules": False for status in _module_statuses}) short_paths = True @@ -182,9 +183,10 @@ def config_options(self): if self.settings.os != "Linux": self.options.qtwayland = False - for m in self._submodules: - if m not in self._get_module_tree: - delattr(self.options, m) + for submodule in self._submodules: + if submodule not in self._get_module_tree: + self._debug_output(f"Qt6: Removing {submodule} option as it is not in the module tree for this version, or is marked as obsolete or ignore") + self.options.rm_safe(submodule) @property def _minimum_compilers_version(self): @@ -197,6 +199,10 @@ def _minimum_compilers_version(self): "apple-clang": "12" if Version(self.version) >= "6.5.0" else "11" } + def _debug_output(self, message): + if Version(conan_version) >= "2": + self.output.debug(message) + def configure(self): if not self.options.gui: del self.options.opengl @@ -213,28 +219,48 @@ def configure(self): if self.options.multiconfiguration: del self.settings.build_type - def _enablemodule(mod): - if mod != "qtbase": - setattr(self.options, mod, True) - for req in self._get_module_tree[mod]["depends"]: - _enablemodule(req) - - # enable all modules which are - # - required by a module explicitely enabled by the consumer - for module_name, module in self._get_module_tree.items(): - if getattr(self.options, module_name): - _enablemodule(module_name) - else: - for status in self._module_statuses: - if getattr(self.options, f"{status}_modules") and module['status'] == status: - _enablemodule(module_name) - break - - # disable all modules which are: - # - not explicitely enabled by the consumer and - # - not required by a module explicitely enabled by the consumer - for module in self._get_module_tree: - if getattr(self.options, module).value is None: + # Requested modules: + # - any module for non-removed options that have 'True' value + # - any enabled via `xxx_modules` that does not have a 'False' value + # Note that at this point, the submodule options dont have a value unless one is given externally + # to the recipe (e.g. via the command line, a profile, or a consumer) + requested_modules = set([module for module in self._submodules if self.options.get_safe(module)]) + for module in [m for m in self._submodules if m in self._get_module_tree]: + status = self._get_module_tree[module]['status'] + is_disabled = self.options.get_safe(module) == False + if self.options.get_safe(f"{status}_modules"): + if not is_disabled: + requested_modules.add(module) + else: + self.output.warning(f"qt6: {module} requested because {status}_modules=True" + f" but it has been explicitly disabled with {module}=False") + + self.output.info(f"qt6: requested modules {list(requested_modules)}") + + required_modules = {} + for module in requested_modules: + deps = self._get_module_tree[module]["depends"] + for dep in deps: + required_modules.setdefault(dep,[]).append(module) + + required_but_disabled = [m for m in required_modules.keys() if self.options.get_safe(m) == False] + if required_modules: + self._debug_output(f"qt6: required_modules modules {list(required_modules.keys())}") + if required_but_disabled: + required_by = set() + for m in required_but_disabled: + required_by.update(required_modules[m]) + raise ConanInvalidConfiguration(f"Modules {required_but_disabled} are explicitly disabled, " + f"but are required by {list(required_by)}, enabled by other options") + + enabled_modules = requested_modules.union(set(required_modules.keys())) + enabled_modules.discard("qtbase") + + for module in list(enabled_modules): + setattr(self.options, module, True) + + for module in self._submodules: + if module in self.options and not self.options.get_safe(module): setattr(self.options, module, False) if not self.options.get_safe("qtmultimedia"): @@ -247,6 +273,16 @@ def _enablemodule(mod): if self.options.get_safe("qtwebengine"): self.options.with_fontconfig = True + for status in self._module_statuses: + # These are convenience only, should not affect package_id + option_name = f"{status}_modules" + self._debug_output(f"qt6 removing convenience option: {option_name}," + f" see individual module options") + self.options.rm_safe(option_name) + + for option in self.options.items(): + self._debug_output(f"qt6 option: {option}") + def validate(self): if os.getenv('CONAN_CENTER_BUILD_SERVICE') is not None: if self.info.settings.compiler == "gcc" and Version(self.info.settings.compiler.version) >= "11" or \ @@ -268,9 +304,6 @@ def validate(self): if Version(self.version) >= "6.6.1" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "13.1": raise ConanInvalidConfiguration("apple-clang >= 13.1 is required by qt >= 6.6.1 cf QTBUG-119490") - if self.settings.os == "Macos" and self.dependencies["double-conversion"].options.shared: - raise ConanInvalidConfiguration("Test recipe fails because of Macos' SIP. Contributions are welcome.") - if self.options.get_safe("qtwebengine"): if not self.options.shared: raise ConanInvalidConfiguration("Static builds of Qt WebEngine are not supported") @@ -330,7 +363,12 @@ def requirements(self): if self.options.with_pcre2: self.requires("pcre2/10.42") if self.options.get_safe("with_vulkan"): - self.requires("vulkan-loader/1.3.268.0") + # Note: the versions of vulkan-loader and moltenvk + # must be exactly part of the same Vulkan SDK version + # do not update either without checking both + # require exactly the same version of vulkan-headers + self.requires("vulkan-loader/1.3.239.0") + self.requires("vulkan-headers/1.3.239.0", transitive_headers=True) if is_apple_os(self): self.requires("moltenvk/1.2.2") if self.options.with_glib: @@ -347,13 +385,13 @@ def requirements(self): self.requires("harfbuzz/8.3.0") if self.options.get_safe("with_libjpeg", False) and not self.options.multiconfiguration: if self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.1") + self.requires("libjpeg-turbo/[>=3.0 <3.1]") else: self.requires("libjpeg/9e") if self.options.get_safe("with_libpng", False) and not self.options.multiconfiguration: - self.requires("libpng/1.6.42") + self.requires("libpng/[>=1.6 <2]") if self.options.with_sqlite3 and not self.options.multiconfiguration: - self.requires("sqlite3/3.45.0") + self.requires("sqlite3/[>=3.45.0 <4]") if self.options.get_safe("with_mysql", False): self.requires("libmysqlclient/8.1.0") if self.options.with_pq: @@ -380,7 +418,7 @@ def requirements(self): if self.options.with_brotli: self.requires("brotli/1.1.0") if self.options.get_safe("qtwebengine") and self.settings.os == "Linux": - self.requires("expat/2.6.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("opus/1.4") self.requires("xorg-proto/2022.2") self.requires("libxshmfence/1.3") @@ -400,9 +438,9 @@ def requirements(self): def build_requirements(self): self.tool_requires("cmake/[>=3.21.1 <4]") - self.tool_requires("ninja/1.11.1") + self.tool_requires("ninja/[>=1.12 <2]") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.1.0") + self.tool_requires("pkgconf/[>=2.2 <3]") if self.settings.os == "Windows": self.tool_requires('strawberryperl/5.32.1.1') @@ -521,6 +559,16 @@ def generate(self): tc.variables["FEATURE_dbus"] = "OFF" tc.variables["CMAKE_FIND_DEBUG_MODE"] = "FALSE" + if not self.options.with_zstd: + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_WrapZSTD"] = "ON" + + if not self.options.get_safe("with_vulkan"): + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_WrapVulkanHeaders"] = "ON" + + # Prevent finding LibClang from the system + # this is needed by the QDoc tool inside Qt Tools + # See: https://github.com/conan-io/conan-center-index/issues/24729#issuecomment-2255291495 + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_WrapLibClang"] = "ON" for opt, conf_arg in [("with_glib", "glib"), ("with_icu", "icu"), @@ -642,8 +690,6 @@ def package_id(self): self.info.settings.compiler.runtime_type = "Release/Debug" if self.info.settings.os == "Android": del self.info.options.android_sdk - for status in self._module_statuses: - delattr(self.info.options, f"{status}_modules") def source(self): destination = self.source_folder @@ -680,6 +726,13 @@ def source(self): "qt_auto_detect_vcpkg()", "# qt_auto_detect_vcpkg()") + # Handle locating moltenvk headers when vulkan is enabled on macOS + replace_in_file(self, os.path.join(self.source_folder, "qtbase", "cmake", "FindWrapVulkanHeaders.cmake"), + "if(APPLE)", "if(APPLE)\n" + " find_package(moltenvk REQUIRED QUIET)\n" + " target_include_directories(WrapVulkanHeaders::WrapVulkanHeaders INTERFACE ${moltenvk_INCLUDE_DIR})" + ) + def _xplatform(self): if self.settings.os == "Linux": if self.settings.compiler == "gcc": @@ -835,6 +888,8 @@ def package(self): filecontents += f"set(QT_VERSION_MAJOR {ver.major})\n" filecontents += f"set(QT_VERSION_MINOR {ver.minor})\n" filecontents += f"set(QT_VERSION_PATCH {ver.patch})\n" + if self.settings.os == "Macos": + filecontents += 'set(__qt_internal_cmake_apple_support_files_path "${CMAKE_CURRENT_LIST_DIR}/../../../lib/cmake/Qt6/macos")\n' targets = ["moc", "rcc", "tracegen", "cmake_automoc_parser", "qlalr", "qmake"] if self.options.with_dbus: targets.extend(["qdbuscpp2xml", "qdbusxml2cpp"]) @@ -919,6 +974,8 @@ def _create_private_module(module, dependencies): save(self, os.path.join(self.package_folder, "lib", "cmake", "Qt6Qml", "conan_qt_qt6_policies.cmake"), textwrap.dedent("""\ set(QT_KNOWN_POLICY_QTP0001 TRUE) """)) + if self.options.gui and self.options.qtshadertools: + _create_private_module("Quick", ["CorePrivate", "GuiPrivate", "QmlPrivate", "Quick"]) if self.settings.os in ["Windows", "iOS"]: contents = textwrap.dedent("""\ @@ -1071,6 +1128,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): gui_reqs.append("opengl::opengl") if self.options.get_safe("with_vulkan", False): gui_reqs.append("vulkan-loader::vulkan-loader") + gui_reqs.append("vulkan-headers::vulkan-headers") if is_apple_os(self): gui_reqs.append("moltenvk::moltenvk") if self.options.with_harfbuzz: @@ -1220,6 +1278,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): self.cpp_info.components["qtQmlImportScanner"].requires = _get_corrected_reqs(["Qml"]) if qt_quick_enabled: _create_module("Quick", ["Gui", "Qml", "QmlModels"]) + _add_build_module("qtQuick", self._cmake_qt6_private_file("Quick")) if self.options.widgets: _create_module("QuickWidgets", ["Gui", "Qml", "Quick", "Widgets"]) _create_module("QuickShapes", ["Gui", "Qml", "Quick"]) diff --git a/recipes/qt/6.x.x/test_package/CMakeLists.txt b/recipes/qt/6.x.x/test_package/CMakeLists.txt index d12764c12f1eb..45e4bb9ec9ab7 100644 --- a/recipes/qt/6.x.x/test_package/CMakeLists.txt +++ b/recipes/qt/6.x.x/test_package/CMakeLists.txt @@ -3,7 +3,16 @@ project(test_package LANGUAGES CXX) find_package(Qt6 COMPONENTS Core Network Sql Concurrent Xml REQUIRED CONFIG) -add_executable(${PROJECT_NAME} WIN32 test_package.cpp greeter.h example.qrc) +add_executable(${PROJECT_NAME} test_package.cpp greeter.h example.qrc) target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Network Qt6::Sql Qt6::Concurrent Qt6::Xml Qt6::Widgets) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) set_target_properties(${PROJECT_NAME} PROPERTIES AUTOMOC ON AUTORCC ON) + +# Only running this Qt macros in macOS +if (APPLE) + # Related to https://github.com/conan-io/conan-center-index/issues/20574 + qt_standard_project_setup() + qt_add_executable(test_macos_bundle MACOSX_BUNDLE test_macos_bundle.cpp) + target_link_libraries(test_macos_bundle PRIVATE Qt6::Core) + target_compile_features(test_macos_bundle PRIVATE cxx_std_17) +endif() diff --git a/recipes/qt/6.x.x/test_package/conanfile.py b/recipes/qt/6.x.x/test_package/conanfile.py index 01ccf4f452670..11efc3f08b07a 100644 --- a/recipes/qt/6.x.x/test_package/conanfile.py +++ b/recipes/qt/6.x.x/test_package/conanfile.py @@ -41,3 +41,7 @@ def test(self): copy(self, "qt.conf", src=self.generators_folder, dst=os.path.join(self.cpp.build.bindirs[0])) bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") self.run(bin_path, env="conanrun") + # Related to https://github.com/conan-io/conan-center-index/issues/20574 + if self.settings.os == "Macos": + bin_macos_path = os.path.join(self.cpp.build.bindirs[0], "test_macos_bundle.app", "Contents", "MacOS", "test_macos_bundle") + self.run(bin_macos_path, env="conanrun") diff --git a/recipes/qt/6.x.x/test_package/test_macos_bundle.cpp b/recipes/qt/6.x.x/test_package/test_macos_bundle.cpp new file mode 100644 index 0000000000000..fb10bbf49cdff --- /dev/null +++ b/recipes/qt/6.x.x/test_package/test_macos_bundle.cpp @@ -0,0 +1,7 @@ +#include + +int main(int argc, char *argv[]) +{ + QCoreApplication app(argc, argv); + return 0; + } diff --git a/recipes/qt/config.yml b/recipes/qt/config.yml index 5eef7e23a9317..c138b7fd62011 100644 --- a/recipes/qt/config.yml +++ b/recipes/qt/config.yml @@ -1,21 +1,9 @@ versions: "6.7.1": folder: 6.x.x - "6.7.0": - folder: 6.x.x "6.6.3": folder: 6.x.x - "6.6.2": - folder: 6.x.x - "6.6.1": - folder: 6.x.x - "6.6.0": - folder: 6.x.x "6.5.3": folder: 6.x.x - "6.4.2": - folder: 6.x.x - "6.3.2": - folder: 6.x.x "5.15.14": folder: 5.x.x diff --git a/recipes/quill/all/conandata.yml b/recipes/quill/all/conandata.yml index e3bb4f4c9035b..39843805b4dcf 100644 --- a/recipes/quill/all/conandata.yml +++ b/recipes/quill/all/conandata.yml @@ -1,10 +1,19 @@ sources: + "7.1.0": + url: "https://github.com/odygrd/quill/releases/download/v7.1.0/quill-7.1.0.zip" + sha256: "3edd1e142ae1a5b6d548c8af5bcf4339bf5889e49ade0806a4269c9587b954ae" + "6.1.0": + url: "https://github.com/odygrd/quill/releases/download/v6.1.0/quill-6.1.0.zip" + sha256: "114bea9d3e4f1ef06a3c48c4e5554a1a3cba182731495e229f2d28f8aef04467" + "6.0.0": + url: "https://github.com/odygrd/quill/releases/download/v6.0.0/quill-6.0.0.zip" + sha256: "912de8486ce781d06e3f03c4267d112a0c7f20f93f0470f6ac66a52774c08283" "4.5.0": - url: "https://github.com/odygrd/quill/archive/v4.5.0.tar.gz" - sha256: "70e8f4a76fd8a83b60d378f31b70dd09a9381686ebafdcd0db08fe099f518309" + url: "https://github.com/odygrd/quill/releases/download/v4.5.0/quill-4.5.0.zip" + sha256: "cfd579e58c71f884835079287fb0212278de56c0fbbb1484a8e8b26a5e73642e" "4.4.1": - url: "https://github.com/odygrd/quill/archive/v4.4.1.tar.gz" - sha256: "c5e0c829096f81364fd55ac1358fe72b27785839474caa9c904b12a9e95c0e88" + url: "https://github.com/odygrd/quill/releases/download/v4.4.1/quill-v4.4.1.zip" + sha256: "56587af304f152445bc3594c328521666e04e580200f7a4bbc5e842fc0d7868f" "4.4.0": url: "https://github.com/odygrd/quill/archive/v4.4.0.tar.gz" sha256: "be166da93210df53aab34ece1bddd14b08506588186723b504ffeeec651bbf7c" diff --git a/recipes/quill/all/conanfile.py b/recipes/quill/all/conanfile.py index a696da22a6a0a..bb47bc324e691 100644 --- a/recipes/quill/all/conanfile.py +++ b/recipes/quill/all/conanfile.py @@ -70,13 +70,20 @@ def build(self): def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - copy( - self, - "*.h", - os.path.join(self.source_folder, "quill", "include"), - os.path.join(self.package_folder, "include"), - ) - + if Version(self.version) < "7.0.0": + copy( + self, + "*.h", + os.path.join(self.source_folder, "quill", "include"), + os.path.join(self.package_folder, "include"), + ) + else: + copy( + self, + "*.h", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) def package_info(self): self.cpp_info.bindirs = [] @@ -84,5 +91,7 @@ def package_info(self): if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("pthread") + if Version(self.version) >= "4.4.0": + self.cpp_info.system_libs.append("rt") if self.settings.compiler == "gcc" and Version(self.settings.compiler.version).major == "8": self.cpp_info.system_libs.append("stdc++fs") diff --git a/recipes/quill/all/test_package/CMakeLists.txt b/recipes/quill/all/test_package/CMakeLists.txt index 4d5e7a7566fab..a6b5b0e801c6c 100644 --- a/recipes/quill/all/test_package/CMakeLists.txt +++ b/recipes/quill/all/test_package/CMakeLists.txt @@ -8,4 +8,3 @@ add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE quill::quill) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) target_compile_definitions(${PROJECT_NAME} PRIVATE QUILL_FILE_HANDLERS_API_V3_3) - diff --git a/recipes/quill/all/test_package/test_package.cpp b/recipes/quill/all/test_package/test_package.cpp index 3c984618a5cd0..f3e9e28471bde 100644 --- a/recipes/quill/all/test_package/test_package.cpp +++ b/recipes/quill/all/test_package/test_package.cpp @@ -41,19 +41,5 @@ int main() LOG_INFO(logger, "Positional arguments {1} {2} {0} ", "too", "are", "supported"); LOG_INFO(logger, "Support for precision {:.4f}", 1.23456); - // To log with a different format to the same sink, just create another logger - auto console_sink_2 = quill::Frontend::get_sink("sink_id_1"); // get the created sink - quill::Logger* logger_2 = quill::Frontend::create_or_get_logger( - "logger_2", std::move(console_sink_2), "%(time) %(log_level:<9) %(logger:<12) %(message)"); - - logger_2->set_log_level(quill::LogLevel::TraceL3); - - LOG_TRACE_L3(logger_2, "This is a log trace l3 example {}", 1); - LOG_TRACE_L2(logger_2, "This is a log trace l2 example {} {}", 2, 2.3); - LOG_TRACE_L1(logger_2, "This is a log trace l1 {} example", "string"); - LOG_DEBUG(logger_2, "This is a log debug example {}", 4); - LOG_INFO(logger_2, "This is a log info example {}", sizeof(std::string)); - LOG_WARNING(logger_2, "This is a log warning example {}", sizeof(std::string)); - LOG_ERROR(logger_2, "This is a log error example {}", sizeof(std::string)); - LOG_CRITICAL(logger_2, "This is a log critical example {}", sizeof(std::string)); + return 0; } diff --git a/recipes/quill/config.yml b/recipes/quill/config.yml index 5fc71b60926cd..7abb554e88e04 100644 --- a/recipes/quill/config.yml +++ b/recipes/quill/config.yml @@ -1,4 +1,10 @@ versions: + "7.1.0": + folder: "all" + "6.1.0": + folder: "all" + "6.0.0": + folder: "all" "4.5.0": folder: "all" "4.4.1": diff --git a/recipes/quill/old/conanfile.py b/recipes/quill/old/conanfile.py index a45f9d7d13297..1450559554d50 100644 --- a/recipes/quill/old/conanfile.py +++ b/recipes/quill/old/conanfile.py @@ -49,7 +49,7 @@ def _compilers_minimum_versions(self): def config_options(self): if self.settings.os == "Windows": - del self.options.fPIC + del self.options.fPIC def layout(self): cmake_layout(self, src_folder="src") diff --git a/recipes/rapidyaml/all/conandata.yml b/recipes/rapidyaml/all/conandata.yml index 70ade977aaed0..42ba70633e2ac 100644 --- a/recipes/rapidyaml/all/conandata.yml +++ b/recipes/rapidyaml/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.7.1": + url: "https://github.com/biojppm/rapidyaml/releases/download/v0.7.1/rapidyaml-0.7.1-src.tgz" + sha256: "9f7c0df2117c09ea409afef38f27605f79f4455dd73b6b9d6afaed099a627c8a" "0.7.0": url: "https://github.com/biojppm/rapidyaml/releases/download/v0.7.0/rapidyaml-0.7.0-src.tgz" sha256: "ef9f89b68de711c561720f1e70d1594e953356a07d297d36b8ccd3ded0589715" @@ -15,6 +18,10 @@ sources: url: "https://github.com/biojppm/rapidyaml/releases/download/v0.3.0/rapidyaml-0.3.0-src.tgz" sha256: "38854b8359eaf42cc27352f4b7321f509f6775445a3e2746cc8cd1e468a52aa9" patches: + "0.7.1": + - patch_file: "patches/0.7.1-001-remove-internal-c4core.patch" + patch_description: "disable using internal c4core" + patch_type: "conan" "0.7.0": - patch_file: "patches/0.7.0-001-remove-internal-c4core.patch" patch_description: "disable using internal c4core" diff --git a/recipes/rapidyaml/all/patches/0.7.1-001-remove-internal-c4core.patch b/recipes/rapidyaml/all/patches/0.7.1-001-remove-internal-c4core.patch new file mode 100644 index 0000000000000..e110ab49f9654 --- /dev/null +++ b/recipes/rapidyaml/all/patches/0.7.1-001-remove-internal-c4core.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c3841a2..affaa56 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,7 +6,7 @@ project(ryml + LANGUAGES CXX) + include(./compat.cmake) + +-c4_project(VERSION 0.7.1 STANDALONE ++c4_project(VERSION 0.7.1 + AUTHOR "Joao Paulo Magalhaes ") + + +@@ -27,11 +27,11 @@ option(RYML_INSTALL "Enable install target" ON) + + #------------------------------------------------------- + +-c4_require_subproject(c4core INCORPORATE +- SUBDIRECTORY ${RYML_EXT_DIR}/c4core +- OVERRIDE C4CORE_INSTALL ${RYML_INSTALL} +-) +- ++# c4_require_subproject(c4core INCORPORATE ++# SUBDIRECTORY ${RYML_EXT_DIR}/c4core ++# OVERRIDE C4CORE_INSTALL ${RYML_INSTALL} ++# ) ++find_package(c4core REQUIRED CONFIG) + c4_add_library(ryml + SOURCES + ryml.hpp +@@ -77,8 +77,8 @@ c4_add_library(ryml + INC_DIRS + $ + $ +- LIBS c4core +- INCORPORATE c4core ++ LIBS c4core::c4core ++# INCORPORATE c4core + ) + + if(RYML_WITH_TAB_TOKENS) +@@ -113,7 +113,7 @@ endif() + + if(RYML_INSTALL) + c4_install_target(ryml) +- c4_install_exports(DEPENDENCIES c4core) ++# c4_install_exports(DEPENDENCIES c4core) + c4_pack_project() + endif() + diff --git a/recipes/rapidyaml/config.yml b/recipes/rapidyaml/config.yml index 23d421955a48a..5345cf4f908f1 100644 --- a/recipes/rapidyaml/config.yml +++ b/recipes/rapidyaml/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.1": + folder: all "0.7.0": folder: all "0.5.0": diff --git a/recipes/rdma-core/all/conandata.yml b/recipes/rdma-core/all/conandata.yml index 30eaf3a7cd31f..2871466545995 100644 --- a/recipes/rdma-core/all/conandata.yml +++ b/recipes/rdma-core/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "52.0": + url: "https://github.com/linux-rdma/rdma-core/releases/download/v52.0/rdma-core-52.0.tar.gz" + sha256: "1f0ce5f2462c982b20d21156707076278807a7adf4d10e9142f3be4bec1b2b83" "51.0": url: "https://github.com/linux-rdma/rdma-core/releases/download/v51.0/rdma-core-51.0.tar.gz" sha256: "0a4a55b1351356c2750f26ec9010e8c7370402a13c95799cb8b447cf0134dd61" diff --git a/recipes/rdma-core/all/conanfile.py b/recipes/rdma-core/all/conanfile.py index c2a42528f2835..b7c0f7ab5ef82 100644 --- a/recipes/rdma-core/all/conanfile.py +++ b/recipes/rdma-core/all/conanfile.py @@ -36,8 +36,8 @@ class PackageConan(ConanFile): "build_libibnetdisc": True, "build_libmana": True, "build_libmlx4": True, - "build_libmlx5": False, - "build_librdmacm": False, + "build_libmlx5": True, + "build_librdmacm": True, } def configure(self): @@ -49,8 +49,7 @@ def layout(self): def requirements(self): self.requires("libnl/3.8.0") - if self.settings.os in ["Linux", "FreeBSD"]: - self.requires("libudev/system") + self.requires("libudev/system") def validate(self): if self.settings.os not in ["Linux", "FreeBSD"]: @@ -73,6 +72,11 @@ def generate(self): # tc.variables["ENABLE_STATIC"] = not self.options.shared tc.variables["NO_PYVERBS"] = True tc.variables["NO_MAN_PAGES"] = True + # Otherwise get set to ${install_prefix}/car/run and the paths in + # https://github.com/linux-rdma/rdma-core/blob/v52.0/buildlib/config.h.in + # can exceed the 108-character limit for socket paths on Linux + if "CMAKE_INSTALL_RUNDIR" not in self.conf.get("tools.cmake.cmaketoolchain:extra_variables", check_type=dict, default={}): + tc.variables["CMAKE_INSTALL_RUNDIR"] = "/var/run" tc.generate() deps = CMakeDeps(self) deps.generate() diff --git a/recipes/rdma-core/config.yml b/recipes/rdma-core/config.yml index bc069e4d0ced3..4e3149e77dd3c 100644 --- a/recipes/rdma-core/config.yml +++ b/recipes/rdma-core/config.yml @@ -1,4 +1,6 @@ versions: + "52.0": + folder: all "51.0": folder: all "49.0": diff --git a/recipes/re2/all/conandata.yml b/recipes/re2/all/conandata.yml index 0b89d06d1aa6f..718ca942e6960 100644 --- a/recipes/re2/all/conandata.yml +++ b/recipes/re2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "20240702": + url: "https://github.com/google/re2/releases/download/2024-07-02/re2-2024-07-02.tar.gz" + sha256: "eb2df807c781601c14a260a507a5bb4509be1ee626024cb45acbd57cb9d4032b" "20240301": url: "https://github.com/google/re2/releases/download/2024-03-01/re2-2024-03-01.tar.gz" sha256: "7b2b3aa8241eac25f674e5b5b2e23d4ac4f0a8891418a2661869f736f03f57f4" diff --git a/recipes/re2/config.yml b/recipes/re2/config.yml index dde5fd31b3ec4..bfce54f7e636d 100644 --- a/recipes/re2/config.yml +++ b/recipes/re2/config.yml @@ -1,4 +1,6 @@ versions: + "20240702": + folder: all "20240301": folder: all "20231101": diff --git a/recipes/rebound/all/conandata.yml b/recipes/rebound/all/conandata.yml new file mode 100644 index 0000000000000..9c806c1b5b5a5 --- /dev/null +++ b/recipes/rebound/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "4.4.1": + url: "https://github.com/hannorein/rebound/archive/refs/tags/4.4.1.tar.gz" + sha256: "0ae7bdf20750cd0a83c4905a66c3cde211f09ac732ffb4cba9887e68aba5273b" +patches: + "4.4.1": + - patch_file: "patches/0001-4.4.1-stdio-legacy-fix.patch" + patch_description: "Link to legacy_stdio only when MSVC" + patch_type: "backport" + patch_source: "https://github.com/hannorein/rebound/pull/777" diff --git a/recipes/rebound/all/conanfile.py b/recipes/rebound/all/conanfile.py new file mode 100644 index 0000000000000..eb8767e10950a --- /dev/null +++ b/recipes/rebound/all/conanfile.py @@ -0,0 +1,78 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.build import cross_building +from conan.tools.files import chdir, copy, get, rm, rmdir, export_conandata_patches, apply_conandata_patches +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +import os + + +required_conan_version = ">=1.54.0" + + +class ReboundConan(ConanFile): + name = "rebound" + description = "REBOUND is an N-body integrator, i.e. a software package that can integrate the motion of particles under the influence of gravity." + license = "GPL-3.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/hannorein/rebound" + topics = ("physics", "simulation", "n-body", "gravity", "integrator") + package_type = "shared-library" + # Scripts always compile with optimizations enabled + settings = "os", "arch", "compiler" + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def export_sources(self): + export_conandata_patches(self) + + def configure(self): + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def validate(self): + if self.settings.os in ["Windows", "Macos"]: + raise ConanInvalidConfiguration(f"{self.ref} recipe does not support {self.settings.os}, contributions welcomed!") + + def validate_build(self): + if cross_building(self): + raise ConanInvalidConfiguration(f"{self.ref} cross-building is not supported yet, contributions welcomed!") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + tc.generate() + + def build(self): + apply_conandata_patches(self) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.make(target="librebound") + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "librebound.so", os.path.join(self.source_folder, "src"), os.path.join(self.package_folder, "lib")) + + copy(self, "*.h", os.path.join(self.source_folder, "src"), os.path.join(self.package_folder, "include")) + + # some files extensions and folders are not allowed. Please, read the FAQs to get informed. + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + + # In shared lib/executable files, autotools set install_name (macOS) to lib dir absolute path instead of @rpath, it's not relocatable, so fix it + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.libs = ["rebound"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("pthread") diff --git a/recipes/rebound/all/patches/0001-4.4.1-stdio-legacy-fix.patch b/recipes/rebound/all/patches/0001-4.4.1-stdio-legacy-fix.patch new file mode 100644 index 0000000000000..9fe5511878c30 --- /dev/null +++ b/recipes/rebound/all/patches/0001-4.4.1-stdio-legacy-fix.patch @@ -0,0 +1,24 @@ +From e775c5c070093facb17a732c3b509bfe0ca8ade7 Mon Sep 17 00:00:00 2001 +From: Uilian Ries +Date: Tue, 18 Jun 2024 11:39:22 +0200 +Subject: [PATCH] Link to legacy_stdio only when MSVC + +Signed-off-by: Uilian Ries +--- + src/rebound.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/rebound.c b/src/rebound.c +index 18267206b..40afe76f4 100644 +--- a/src/rebound.c ++++ b/src/rebound.c +@@ -23,7 +23,9 @@ + * + */ + #define _NO_CRT_STDIO_INLINE // WIN32 to use _vsprintf_s ++#if defined(_WIN32) && defined(_MSC_VER) + #pragma comment(lib, "legacy_stdio_definitions.lib") ++#endif + #include + #include + #include // for offsetof() diff --git a/recipes/rebound/all/test_package/CMakeLists.txt b/recipes/rebound/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f16f7cf26d671 --- /dev/null +++ b/recipes/rebound/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(rebound REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE rebound::rebound) diff --git a/recipes/rebound/all/test_package/conanfile.py b/recipes/rebound/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a808db45f245 --- /dev/null +++ b/recipes/rebound/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + 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): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/rebound/all/test_package/test_package.c b/recipes/rebound/all/test_package/test_package.c new file mode 100644 index 0000000000000..1cf6ab75b9e69 --- /dev/null +++ b/recipes/rebound/all/test_package/test_package.c @@ -0,0 +1,31 @@ +#include "rebound.h" +#include +#include + + +// Simplified from the simplest.c example in the REBOUND source code. +int main(int argc, char* argv[]) { + struct reb_simulation* r = reb_simulation_create(); + + reb_simulation_add_fmt(r, "m", 1.); // Central object + reb_simulation_add_fmt(r, "m a e", 1e-3, 1., 0.1); // Jupiter mass planet + reb_simulation_add_fmt(r, "a e", 1.4, 0.1); // Massless test particle + + // First integrate for 1 time units. + reb_simulation_integrate(r, 1.); + + // Then output some coordinates and orbital elements. + for (int i=0; iN; i++){ + struct reb_particle p = r->particles[i]; + printf("%f %f %f\n", p.x, p.y, p.z); + } + struct reb_particle primary = r->particles[0]; + for (int i=1; iN; i++){ + struct reb_particle p = r->particles[i]; + struct reb_orbit o = reb_orbit_from_particle(r->G, p, primary); + printf("%f %f %f\n", o.a, o.e, o.f); + } + + // Cleanup + reb_simulation_free(r); +} diff --git a/recipes/rebound/config.yml b/recipes/rebound/config.yml new file mode 100644 index 0000000000000..695144f0acbc9 --- /dev/null +++ b/recipes/rebound/config.yml @@ -0,0 +1,3 @@ +versions: + "4.4.1": + folder: "all" diff --git a/recipes/rectanglebinpack/all/conandata.yml b/recipes/rectanglebinpack/all/conandata.yml index e93b6ba1b6012..d50cf8d87d51a 100644 --- a/recipes/rectanglebinpack/all/conandata.yml +++ b/recipes/rectanglebinpack/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20230923": + - url: "https://github.com/juj/RectangleBinPack/archive/83e7e1132d93777e3732dfaae26b0f3703be2036.zip" + sha256: "ec8f20227fc79467cf7c5b5656e3e520712ee446fb9e449d42e1e5b4565f6bdc" "cci.20210901": - url: "https://github.com/juj/RectangleBinPack/archive/a40fcaf3871da57b0f6a080655b3387374840877.zip" sha256: "88cec105ca8d90d09e9e81f9862caa0cc1cdb851560fb701555eb58b29515748" diff --git a/recipes/rectanglebinpack/config.yml b/recipes/rectanglebinpack/config.yml index 610b8f5b3b81f..b499d3b7e32dc 100644 --- a/recipes/rectanglebinpack/config.yml +++ b/recipes/rectanglebinpack/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20230923": + folder: "all" "cci.20210901": folder: "all" diff --git a/recipes/roaring/all/conandata.yml b/recipes/roaring/all/conandata.yml index cd3b4764b4daf..cc860b4e0343e 100644 --- a/recipes/roaring/all/conandata.yml +++ b/recipes/roaring/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "4.1.2": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.1.2.tar.gz" + sha256: "dd9e9d9a28dcf9ba1622fb4a3a7b4d7f5e12732bb35e99a7cb028b7512731a7b" + "4.1.1": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.1.1.tar.gz" + sha256: "42804cc2bb5c9279ec4fcaa56d2d6b389da934634abcce8dbc4e4c1d60e1468d" + "4.1.0": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.1.0.tar.gz" + sha256: "0596c6e22bcccb56f38260142b435f1f72aef7721fa370fd9f2b88380245fc1d" "4.0.0": url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v4.0.0.tar.gz" sha256: "a8b98db3800cd10979561a1388e4e970886a24015bd6cfabb08ba7917f541b0d" @@ -8,39 +17,15 @@ sources: "2.1.2": url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v2.1.2.tar.gz" sha256: "a53d2f540f78ddae31e30c573b1b7fd41d7257d6a090507ba35d9c398712e5ad" - "2.1.1": - url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v2.1.1.tar.gz" - sha256: "40a1c04e220bb2305c3adb5347f42b6b435c4bb4ac89dd0047ba8e73a7388dfb" - "2.1.0": - url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v2.1.0.tar.gz" - sha256: "75e2c106bf3c035f92560017b56b01602744b643a3fef08d69255c138c6c6f5c" "2.0.4": url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v2.0.4.tar.gz" sha256: "3c962c196ba28abf2639067f2e2fd25879744ba98152a4e0e74556ca515eda33" - "2.0.2": - url: "https://github.com/RoaringBitmap/CRoaring/archive/v2.0.2.tar.gz" - sha256: "92636a931f8a7bf36ce5a96d3039db128afd0e075f5aa7936fa1685dd2bbc75b" "1.3.0": url: "https://github.com/RoaringBitmap/CRoaring/archive/v1.3.0.tar.gz" sha256: "c4fccf6a8cfa6f15f47d0e6f6b202940c2305e3078eb745d25fe9e2739ae5278" "1.1.5": url: "https://github.com/RoaringBitmap/CRoaring/archive/v1.1.5.tar.gz" sha256: "5210a277ce83c3099dfee41d494c28aec61bdbc9160b3b124cb5afeab49cd123" - "1.1.2": - url: "https://github.com/RoaringBitmap/CRoaring/archive/v1.1.2.tar.gz" - sha256: "545fab4f00d946000743c563b3c315c1a11cee1f19c6ba4fb9493824a4e68b9a" - "1.1.0": - url: "https://github.com/RoaringBitmap/CRoaring/archive/v1.1.0.tar.gz" - sha256: "b59495578e3e4790a216420ce70578d22c1b6d1987232fc2bf46463a03fb1c06" "1.0.0": url: "https://github.com/RoaringBitmap/CRoaring/archive/v1.0.0.tar.gz" sha256: "08f884cd2790fcfba69b63443442034702f5d4865514fb09ac6ff05e048bf230" - "0.9.9": - url: "https://github.com/RoaringBitmap/CRoaring/archive/v0.9.9.tar.gz" - sha256: "3083bcbc37e43403111c482ddf317a710972256c23bc83abc8925803a02bdf60" - "0.8.1": - url: "https://github.com/RoaringBitmap/CRoaring/archive/v0.8.1.tar.gz" - sha256: "5359f2a051f10e42cea5edc3cb3650fd272e9125e6a0538901cf30619939d4f8" - "0.7.3": - url: "https://github.com/RoaringBitmap/CRoaring/archive/v0.7.3.tar.gz" - sha256: "e3f8115ba44ef0e1eb7b982dc3c3233f08f5f95ec1260169c2ad0ca50e56b656" diff --git a/recipes/roaring/config.yml b/recipes/roaring/config.yml index 772c0b4d996a1..6265b94ca9cbf 100644 --- a/recipes/roaring/config.yml +++ b/recipes/roaring/config.yml @@ -1,31 +1,21 @@ versions: + "4.1.2": + folder: all + "4.1.1": + folder: all + "4.1.0": + folder: all "4.0.0": folder: all "3.0.0": folder: all "2.1.2": folder: all - "2.1.1": - folder: all - "2.1.0": - folder: all "2.0.4": folder: all - "2.0.2": - folder: all "1.3.0": folder: all "1.1.5": folder: all - "1.1.2": - folder: all - "1.1.0": - folder: all "1.0.0": folder: all - "0.9.9": - folder: all - "0.8.1": - folder: all - "0.7.3": - folder: all diff --git a/recipes/rocksdb/all/conandata.yml b/recipes/rocksdb/all/conandata.yml index 9311e262a5a90..074302cce72fd 100644 --- a/recipes/rocksdb/all/conandata.yml +++ b/recipes/rocksdb/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "9.5.2": + url: "https://github.com/facebook/rocksdb/archive/refs/tags/v9.5.2.tar.gz" + sha256: "B20780586D3DF4A3C5BCBDE341A2C1946B03D18237960BDA5BC5E9538F42AF40" + "9.4.0": + url: "https://github.com/facebook/rocksdb/archive/refs/tags/v9.4.0.tar.gz" + sha256: "1f829976aa24b8ba432e156f52c9e0f0bd89c46dc0cc5a9a628ea70571c1551c" "9.2.1": url: "https://github.com/facebook/rocksdb/archive/refs/tags/v9.2.1.tar.gz" sha256: "bb20fd9a07624e0dc1849a8e65833e5421960184f9c469d508b58ed8f40a780f" diff --git a/recipes/rocksdb/all/conanfile.py b/recipes/rocksdb/all/conanfile.py index f9abafa35f177..605a6adf2d073 100644 --- a/recipes/rocksdb/all/conanfile.py +++ b/recipes/rocksdb/all/conanfile.py @@ -15,10 +15,10 @@ class RocksDBConan(ConanFile): name = "rocksdb" - homepage = "https://github.com/facebook/rocksdb" + description = "A library that provides an embeddable, persistent key-value store for fast storage" license = ("GPL-2.0-only", "Apache-2.0") url = "https://github.com/conan-io/conan-center-index" - description = "A library that provides an embeddable, persistent key-value store for fast storage" + homepage = "https://github.com/facebook/rocksdb" topics = ("database", "leveldb", "facebook", "key-value") package_type = "library" settings = "os", "arch", "compiler", "build_type" diff --git a/recipes/rocksdb/config.yml b/recipes/rocksdb/config.yml index 1e0d22057397b..8044f69736f9c 100644 --- a/recipes/rocksdb/config.yml +++ b/recipes/rocksdb/config.yml @@ -1,4 +1,8 @@ versions: + "9.5.2": + folder: all + "9.4.0": + folder: all "9.2.1": folder: all "9.1.0": diff --git a/recipes/s2n/all/conandata.yml b/recipes/s2n/all/conandata.yml index 5b8f0f1c01b2c..b9eb147f98b56 100644 --- a/recipes/s2n/all/conandata.yml +++ b/recipes/s2n/all/conandata.yml @@ -1,7 +1,16 @@ sources: + "1.5.2": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.5.2.tar.gz" + sha256: "896d9f8f8e9bd2fdcb9a21b18aede4f7afc65bde279afabc60abf97fa5069dd1" + "1.5.1": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.5.1.tar.gz" + sha256: "d79710d6ef089097a3b84fc1e5cec2f08d1ec46e93b1d400df59fcfc859e15a3" + "1.5.0": + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.5.0.tar.gz" + sha256: "5e86d97d8f24653ef3dff3abe6165169f0ba59cdf52b5264987125bba070174d" "1.4.16": - url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.4.1.tar.gz" - sha256: "d8c1d8e1142441412434feacb4947ce6430a244dcd8f58921af79b29bd901731" + url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.4.16.tar.gz" + sha256: "84fdbaa894c722bf13cac87b8579f494c1c2d66de642e5e6104638fddea76ad9" "1.4.13": url: "https://github.com/aws/s2n-tls/archive/refs/tags/v1.4.13.tar.gz" sha256: "8b0b36697963d6752e5a1b49e28e393605990d348edf1aef6f39c33164d45edb" diff --git a/recipes/s2n/all/conanfile.py b/recipes/s2n/all/conanfile.py index 34d4cbcae2b9f..a112b40965f87 100644 --- a/recipes/s2n/all/conanfile.py +++ b/recipes/s2n/all/conanfile.py @@ -11,10 +11,10 @@ class S2nConan(ConanFile): name = "s2n" description = "An implementation of the TLS/SSL protocols" - topics = ("aws", "amazon", "cloud", ) + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/aws/s2n-tls" - license = "Apache-2.0" + topics = ("aws", "amazon", "cloud", ) package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/s2n/config.yml b/recipes/s2n/config.yml index c02d8ff3f44d9..760e55c793225 100644 --- a/recipes/s2n/config.yml +++ b/recipes/s2n/config.yml @@ -1,4 +1,10 @@ versions: + "1.5.2": + folder: all + "1.5.1": + folder: all + "1.5.0": + folder: all "1.4.16": folder: all "1.4.13": diff --git a/recipes/samurai/all/conandata.yml b/recipes/samurai/all/conandata.yml index a3cf7b7eb4b88..39739edcf25df 100644 --- a/recipes/samurai/all/conandata.yml +++ b/recipes/samurai/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.16.0": + url: "https://github.com/hpc-maths/samurai/archive/v0.16.0.tar.gz" + sha256: "61616de42557e5cd5e9483103fd640f94f3235354e42a22a0ec76520196059a5" "0.13.0": url: "https://github.com/hpc-maths/samurai/archive/v0.13.0.tar.gz" sha256: "f38e379218b1206fc5c5e157ee5e80687721a896f70b892623d9f30280529448" diff --git a/recipes/samurai/config.yml b/recipes/samurai/config.yml index e6692765cde8a..87628f14bd6dd 100644 --- a/recipes/samurai/config.yml +++ b/recipes/samurai/config.yml @@ -1,4 +1,6 @@ versions: + "0.16.0": + folder: all "0.13.0": folder: all "0.9.0": diff --git a/recipes/sbepp/all/conandata.yml b/recipes/sbepp/all/conandata.yml index 8308d9f0765f6..e2b77352008d8 100644 --- a/recipes/sbepp/all/conandata.yml +++ b/recipes/sbepp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.0": + url: "https://github.com/OleksandrKvl/sbepp/archive/refs/tags/1.4.0.tar.gz" + sha256: "64112ed22d6c82debc70a4c097f3fcd05a4bd280dca7e2013edbd6bebfd1da56" "1.3.0": url: "https://github.com/OleksandrKvl/sbepp/archive/refs/tags/1.3.0.tar.gz" sha256: "44caa61681c7f94c840a2f2a247a0385e9e61c6e8639b9f7561c9d62125f9486" diff --git a/recipes/sbepp/config.yml b/recipes/sbepp/config.yml index 2fb2f4162d6a3..60f8f892f1bc0 100644 --- a/recipes/sbepp/config.yml +++ b/recipes/sbepp/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.0": + folder: all "1.3.0": folder: all "1.2.0": diff --git a/recipes/scc/all/CMakeLists.txt b/recipes/scc/all/CMakeLists.txt deleted file mode 100644 index 19bdb7e7f5fb7..0000000000000 --- a/recipes/scc/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(scc C) - -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS KEEP_RPATHS) - -add_subdirectory(source_subfolder) diff --git a/recipes/scc/all/conandata.yml b/recipes/scc/all/conandata.yml index bd7433056072d..a492e239a4b1c 100644 --- a/recipes/scc/all/conandata.yml +++ b/recipes/scc/all/conandata.yml @@ -1,4 +1,13 @@ sources: - "2022.08": - url: "https://github.com/Minres/SystemC-Components/releases/download/2022.08/systemc-components.tar.gz" - sha256: "825dfc38e7b00df34330f01ba38f5913e1a88c5002344e433b972faf0e6c4501" + "2023.06": + url: "https://github.com/Minres/SystemC-Components/releases/download/2023.06/SCC-2023.06-full.tar.gz" + sha256: "6d1a842f474daa512030d61526e83182f9289b977a3a7cb88ed151050c33c4e9" +patches: + "2023.06": + - patch_file: "patches/2023.06-fix-conan-targets.patch" + patch_description: "add find_package()-s and disable automatic Conan setup" + patch_type: "conan" + - patch_file: "patches/2023.06-add-fmt-10-support.patch" + patch_description: "fix incompatibility with fmt 10.x and newer" + patch_type: "portability" + patch_source: "https://github.com/Minres/SystemC-Components/pull/51" diff --git a/recipes/scc/all/conanfile.py b/recipes/scc/all/conanfile.py index c95474718f1dd..5f82f6e023588 100644 --- a/recipes/scc/all/conanfile.py +++ b/recipes/scc/all/conanfile.py @@ -1,89 +1,166 @@ +import os + from conan import ConanFile -from conan.tools.scm import Version -from conan.tools.files import get -from conans import tools, CMake from conan.errors import ConanInvalidConfiguration -import functools +from conan.tools.apple import is_apple_os +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps +from conan.tools.files import copy, get, export_conandata_patches, apply_conandata_patches, replace_in_file, rmdir +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" -required_conan_version = ">=1.50.0" class SystemcComponentsConan(ConanFile): name = "scc" - description = """A light weight productivity library for SystemC and TLM 2.0""" - homepage = "https://minres.github.io/SystemC-Components" - url = "https://github.com/conan-io/conan-center-index" + description = "A light-weight productivity library for SystemC and TLM 2.0" license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://minres.github.io/SystemC-Components" topics = ("systemc", "modeling", "tlm", "scc") - settings = "os", "compiler", "build_type", "arch" + + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" options = { "fPIC": [True, False], "enable_phase_callbacks": [True, False], - "enable_phase_callbacks_tracing": [True, False] + "enable_phase_callbacks_tracing": [True, False], } default_options = { "fPIC": True, "enable_phase_callbacks": False, - "enable_phase_callbacks_tracing": False + "enable_phase_callbacks_tracing": False, } - generators = "cmake" - - @property - def _source_subfolder(self): - return "source_subfolder" - @property - def _build_subfolder(self): - return "build_subfolder" - - # no exports_sources attribute, but export_sources(self) method instead - # this allows finer grain exportation of patches per version def export_sources(self): - self.copy("CMakeLists.txt") - + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + # https://github.com/Minres/SystemC-Components/blob/2023.06/src/sysc/scc/perf_estimator.h#L20 + self.requires("boost/1.83.0", transitive_headers=True, transitive_libs=True) + # https://github.com/Minres/SystemC-Components/blob/2023.06/src/sysc/scc/trace/vcd_trace.hh#L28 + self.requires("fmt/10.2.1", transitive_headers=True, transitive_libs=True) + # https://github.com/Minres/SystemC-Components/blob/2023.06/src/common/util/lz4_streambuf.h#L13 + self.requires("lz4/1.9.4", transitive_headers=True, transitive_libs=True) + self.requires("rapidjson/cci.20220822") + self.requires("spdlog/1.13.0") + # https://github.com/Minres/SystemC-Components/blob/2023.06/src/sysc/tlm/scc/lwtr/tlm2_lwtr.h + self.requires("systemc-cci/1.0.0", transitive_headers=True, transitive_libs=True) + self.requires("systemc/2.3.4", transitive_headers=True, transitive_libs=True) + # https://github.com/Minres/SystemC-Components/blob/2023.06/src/sysc/scc/trace/gz_writer.hh#L18 + self.requires("zlib/[>=1.2.11 <2]", transitive_headers=True, transitive_libs=True) + self.requires("yaml-cpp/0.8.0") + def validate(self): + if is_apple_os(self): + raise ConanInvalidConfiguration(f"{self.name} is not supported on {self.settings.os}.") + if is_msvc(self): + # Fails with + # src\sysc\tlm\scc\tlm_mm.h(116,114): error C2259: 'tlm::scc::tlm_gp_mm_t<16,false>': cannot instantiate abstract class + # (compiling source file '../../../src/src/sysc/tlm/scc/lwtr/tlm2_lwtr.cpp') + # src\sysc\tlm\scc\tlm_mm.h(116,48): + # see declaration of 'tlm::scc::tlm_gp_mm_t<16,false>' + # src\sysc\tlm\scc\tlm_mm.h(116,114): + # due to following members: + # src\sysc\tlm\scc\tlm_mm.h(116,114): + # 'void tlm::tlm_extension::copy_from(const tlm::tlm_extension_base &)': is abstract + # systemc-2.3.4\p\include\tlm_core\tlm_2\tlm_generic_payload\tlm_gp.h(78,18): + # see declaration of 'tlm::tlm_extension::copy_from' + # and + # src\sysc\tlm\scc\tlm_mm.h(31,20): error C2061: syntax error: identifier '__attribute__' + raise ConanInvalidConfiguration(f"{self.ref} recipe is not supported on MSVC. Contributions are welcome!") if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 11) - if self.settings.os == "Macos": - raise ConanInvalidConfiguration(f"{self.name} is not suppported on {self.settings.os}.") + check_min_cppstd(self, 11) if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "7": raise ConanInvalidConfiguration("GCC < version 7 is not supported") - def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - def build_requirements(self): - self.tool_requires("cmake/3.24.0") + self.tool_requires("cmake/[>=3.24 <4]") - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["SC_WITH_PHASE_CALLBACKS"] = self.options.enable_phase_callbacks - cmake.definitions["SC_WITH_PHASE_CALLBACK_TRACING"] = self.options.enable_phase_callbacks_tracing - cmake.definitions["BUILD_SCC_DOCUMENTATION"] = False - cmake.definitions["SCC_LIB_ONLY"] = True + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["SC_WITH_PHASE_CALLBACKS"] = self.options.enable_phase_callbacks + tc.cache_variables["SC_WITH_PHASE_CALLBACK_TRACING"] = self.options.enable_phase_callbacks_tracing + tc.cache_variables["BUILD_SCC_DOCUMENTATION"] = False + tc.cache_variables["SCC_LIB_ONLY"] = True + tc.cache_variables["ENABLE_CONAN"] = False if self.settings.os == "Windows": - cmake.definitions["SCC_LIMIT_TRACE_TYPE_LIST"] = True - cmake.configure(build_folder=self._build_subfolder) - return cmake + tc.cache_variables["SCC_LIMIT_TRACE_TYPE_LIST"] = True + # Used at https://github.com/Minres/SystemC-Components/blob/2023.06/src/common/util/pool_allocator.h#L110 + # but is not set anywhere + tc.preprocessor_definitions["_GLIBCXX_USE_NOEXCEPT"] = "noexcept" + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("systemc", "cmake_file_name", "SystemC") + deps.set_property("systemc-cci", "cmake_target_name", "systemc-cci::systemc-cci") + deps.set_property("yaml-cpp", "cmake_target_name", "yaml-cpp::yaml-cpp") + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + replace_in_file(self, os.path.join(self.source_folder, "third_party", "axi_chi", "CMakeLists.txt"), + " STATIC", "") def build(self): - cmake = self._configure_cmake() + self._patch_sources() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy(pattern="LICENSE", dst="licenses", - src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", + 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.components["busses"].libs = ["busses"] self.cpp_info.components["scc-sysc"].libs = ["scc-sysc"] + self.cpp_info.components["scc-sysc"].requires = [ + "fstapi", + "lwtr", + "scc-util", + "scv-tr", + "boost::date_time", + "fmt::fmt", + "lz4::lz4", + "rapidjson::rapidjson", + "spdlog::spdlog", + "systemc-cci::systemc-cci", + "systemc::systemc", + "yaml-cpp::yaml-cpp", + "zlib::zlib", + ] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["scc-sysc"].system_libs = ["pthread", "dl"] + + self.cpp_info.components["busses"].libs = ["busses"] + self.cpp_info.components["busses"].requires = ["tlm-interfaces", "scc-sysc"] + + self.cpp_info.components["fstapi"].libs = ["fstapi"] + self.cpp_info.components["fstapi"].requires = ["zlib::zlib", "lz4::lz4"] + + self.cpp_info.components["lwtr"].libs = ["lwtr"] + self.cpp_info.components["lwtr"].requires = ["zlib::zlib", "lz4::lz4", "systemc::systemc", "fmt::fmt"] + self.cpp_info.components["scc-util"].libs = ["scc-util"] + self.cpp_info.components["scc-util"].requires = ["lz4::lz4"] + self.cpp_info.components["scv-tr"].libs = ["scv-tr"] + self.cpp_info.components["scv-tr"].requires = ["fmt::fmt", "systemc::systemc"] + self.cpp_info.components["tlm-interfaces"].libs = ["tlm-interfaces"] + self.cpp_info.components["tlm-interfaces"].requires = ["scc-sysc", "systemc::systemc"] diff --git a/recipes/scc/all/patches/2023.06-add-fmt-10-support.patch b/recipes/scc/all/patches/2023.06-add-fmt-10-support.patch new file mode 100644 index 0000000000000..e07a125098cc9 --- /dev/null +++ b/recipes/scc/all/patches/2023.06-add-fmt-10-support.patch @@ -0,0 +1,11 @@ +--- src/sysc/scc/trace/vcd_trace.hh ++++ src/sysc/scc/trace/vcd_trace.hh +@@ -53,7 +53,7 @@ + + template + inline void vcdEmitValueChangeReal(FPTR os, std::string const& handle, unsigned bits, T val){ +- auto buf = fmt::format("r{:.16g} {}\n", val, handle); ++ auto buf = fmt::format("r{:.16g} {}\n", static_cast(val), handle); + FWRITE(buf.c_str(), 1, buf.size(), os); + } + diff --git a/recipes/scc/all/patches/2023.06-fix-conan-targets.patch b/recipes/scc/all/patches/2023.06-fix-conan-targets.patch new file mode 100644 index 0000000000000..052ef97ffbc9f --- /dev/null +++ b/recipes/scc/all/patches/2023.06-fix-conan-targets.patch @@ -0,0 +1,17 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -24,5 +24,13 @@ + include(Common) + +-if(CMAKE_PROJECT_NAME STREQUAL "scc") ++find_package(SystemC REQUIRED CONFIG) ++find_package(systemc-cci REQUIRED CONFIG) ++find_package(fmt REQUIRED CONFIG) ++find_package(spdlog REQUIRED CONFIG) ++find_package(Boost REQUIRED CONFIG) ++find_package(yaml-cpp REQUIRED CONFIG) ++find_package(lz4 REQUIRED CONFIG) ++if(TRUE) ++elseif(CMAKE_PROJECT_NAME STREQUAL "scc") + message(STATUS "Building SCC in standalone mode") + include(GNUInstallDirs) diff --git a/recipes/scc/all/test_package/CMakeLists.txt b/recipes/scc/all/test_package/CMakeLists.txt index b74b2d8e566a6..32a369fbfeb6a 100644 --- a/recipes/scc/all/test_package/CMakeLists.txt +++ b/recipes/scc/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(scc REQUIRED CONFIG) add_executable(${PROJECT_NAME} example.cpp) diff --git a/recipes/scc/all/test_package/conanfile.py b/recipes/scc/all/test_package/conanfile.py index 48f7a8523a636..ef5d7042163ec 100644 --- a/recipes/scc/all/test_package/conanfile.py +++ b/recipes/scc/all/test_package/conanfile.py @@ -1,18 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -from conans import ConanFile, CMake -from conan.tools.build import cross_building -class SystemcComponentsTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" - +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + 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): - if not cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/scc/all/test_package/example.cpp b/recipes/scc/all/test_package/example.cpp index 2de9f26d9f75d..4f5ccf21b1e5c 100644 --- a/recipes/scc/all/test_package/example.cpp +++ b/recipes/scc/all/test_package/example.cpp @@ -1,7 +1,9 @@ +#include #include #include -int main(int argc, char* argv[]) { +int main() { + util::IoRedirector::get(); std::cout << "scc loaded successfully. Mini test: util::ilog2(32) = " << util::ilog2(32) << std::endl; return 0; } diff --git a/recipes/scc/config.yml b/recipes/scc/config.yml index f8b19962361c1..f334fc74322ea 100644 --- a/recipes/scc/config.yml +++ b/recipes/scc/config.yml @@ -1,3 +1,3 @@ versions: - "2022.08": - folder: "all" + "2023.06": + folder: all diff --git a/recipes/sdbus-cpp/all/conandata.yml b/recipes/sdbus-cpp/all/conandata.yml index c7ec57d1ada42..ad223afb6b24c 100644 --- a/recipes/sdbus-cpp/all/conandata.yml +++ b/recipes/sdbus-cpp/all/conandata.yml @@ -35,3 +35,6 @@ patches: patch_description: "fix build error by adding missing headers" patch_type: "bugfix" patch_source: "https://github.com/Kistler-Group/sdbus-cpp/commit/fb008445b15b452f461c34667f4991f5ce06e481" + "2.0.0": + - patch_file: "patches/0003-fix-expat-casing-and-library-linkage.patch" + patch_type: "conan" diff --git a/recipes/sdbus-cpp/all/conanfile.py b/recipes/sdbus-cpp/all/conanfile.py index 4f55c042c482c..7733d1b0759bc 100644 --- a/recipes/sdbus-cpp/all/conanfile.py +++ b/recipes/sdbus-cpp/all/conanfile.py @@ -106,7 +106,10 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["BUILD_CODE_GEN"] = self.options.with_code_gen + if Version(self.version) >= "2.0.0": + tc.variables["SDBUSCPP_BUILD_CODEGEN"] = self.options.with_code_gen + else: + tc.variables["BUILD_CODE_GEN"] = self.options.with_code_gen tc.variables["BUILD_DOC"] = False tc.variables["BUILD_TESTS"] = False tc.variables["BUILD_LIBSYSTEMD"] = False diff --git a/recipes/sdbus-cpp/all/patches/0003-fix-expat-casing-and-library-linkage.patch b/recipes/sdbus-cpp/all/patches/0003-fix-expat-casing-and-library-linkage.patch new file mode 100644 index 0000000000000..6fcd6cd1fd255 --- /dev/null +++ b/recipes/sdbus-cpp/all/patches/0003-fix-expat-casing-and-library-linkage.patch @@ -0,0 +1,22 @@ +diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt +index c025e36..ef3f6ce 100644 +--- a/tools/CMakeLists.txt ++++ b/tools/CMakeLists.txt +@@ -12,7 +12,7 @@ include(GNUInstallDirs) + # PERFORMING CHECKS + #------------------------------- + +-find_package(EXPAT REQUIRED) ++find_package(expat REQUIRED) + + #------------------------------- + # SOURCE FILES CONFIGURATION +@@ -42,7 +42,7 @@ set(CMAKE_CXX_STANDARD 14) + #---------------------------------- + + add_executable(sdbus-c++-xml2cpp ${SDBUSCPP_XML2CPP_SRCS}) +-target_link_libraries (sdbus-c++-xml2cpp ${EXPAT_LIBRARIES}) ++target_link_libraries (sdbus-c++-xml2cpp expat::expat) + target_include_directories(sdbus-c++-xml2cpp PRIVATE ${EXPAT_INCLUDE_DIRS}) + + #---------------------------------- diff --git a/recipes/sdl/all/conandata.yml b/recipes/sdl/all/conandata.yml index 3e85e9082c824..9c6746b76929a 100644 --- a/recipes/sdl/all/conandata.yml +++ b/recipes/sdl/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "2.30.7": + url: "https://www.libsdl.org/release/SDL2-2.30.7.tar.gz" + sha256: "2508c80438cd5ff3bbeb8fe36b8f3ce7805018ff30303010b61b03bb83ab9694" + "2.30.6": + url: "https://www.libsdl.org/release/SDL2-2.30.6.tar.gz" + sha256: "c6ef64ca18a19d13df6eb22df9aff19fb0db65610a74cc81dae33a82235cacd4" + "2.30.5": + url: "https://www.libsdl.org/release/SDL2-2.30.5.tar.gz" + sha256: "f374f3fa29c37dfcc20822d4a7d7dc57e58924d1a5f2ad511bfab4c8193de63b" "2.30.4": url: "https://www.libsdl.org/release/SDL2-2.30.4.tar.gz" sha256: "59c89d0ed40d4efb23b7318aa29fe7039dbbc098334b14f17f1e7e561da31a26" diff --git a/recipes/sdl/all/conanfile.py b/recipes/sdl/all/conanfile.py index cd55e0ceb1b78..5a843281891dc 100644 --- a/recipes/sdl/all/conanfile.py +++ b/recipes/sdl/all/conanfile.py @@ -15,10 +15,10 @@ class SDLConan(ConanFile): name = "sdl" description = "Access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL, Direct3D and Vulkan" - topics = ("sdl2", "audio", "keyboard", "graphics", "opengl") + license = "Zlib" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.libsdl.org" - license = "Zlib" + topics = ("sdl2", "audio", "keyboard", "graphics", "opengl") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -186,8 +186,7 @@ def build_requirements(self): self.build_requires("wayland/1.22.0") # Provides wayland-scanner def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True, - destination=self.source_folder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def _patch_sources(self): apply_conandata_patches(self) @@ -217,6 +216,8 @@ def _patch_sources(self): "find_program(WAYLAND_SCANNER NAMES wayland-scanner REQUIRED)", 'find_program(WAYLAND_SCANNER NAMES wayland-scanner REQUIRED PATHS "${WAYLAND_BIN_DIR}" NO_DEFAULT_PATH)', ) + if Version(self.version) >= "2.30.6" and not self.options.shared: + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "list(APPEND targets SDL2-static)", "set(targets SDL2-static)") def define_toolchain(self): tc = CMakeToolchain(self) diff --git a/recipes/sdl/all/test_package/conanfile.py b/recipes/sdl/all/test_package/conanfile.py index 956346bb80854..c21bd201e65b8 100644 --- a/recipes/sdl/all/test_package/conanfile.py +++ b/recipes/sdl/all/test_package/conanfile.py @@ -4,7 +4,6 @@ import os -# It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "VirtualRunEnv" diff --git a/recipes/sdl/config.yml b/recipes/sdl/config.yml index 667ee74808b99..70833b6fd8399 100644 --- a/recipes/sdl/config.yml +++ b/recipes/sdl/config.yml @@ -1,4 +1,10 @@ versions: + "2.30.7": + folder: all + "2.30.6": + folder: all + "2.30.5": + folder: all "2.30.4": folder: all "2.30.3": diff --git a/recipes/sdl_image/all/conanfile.py b/recipes/sdl_image/all/conanfile.py index bca15363d987d..15095b9589cff 100644 --- a/recipes/sdl_image/all/conanfile.py +++ b/recipes/sdl_image/all/conanfile.py @@ -102,7 +102,7 @@ def requirements(self): if self.options.with_libjpeg: self.requires("libjpeg/9e") if self.options.with_libpng: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.with_libwebp: self.requires("libwebp/1.3.2") if self.options.get_safe("with_avif"): diff --git a/recipes/sdl_mixer/all/CMakeLists.txt b/recipes/sdl_mixer/all/CMakeLists.txt index fa206e6c5d5c7..2dfb3ecfdb114 100644 --- a/recipes/sdl_mixer/all/CMakeLists.txt +++ b/recipes/sdl_mixer/all/CMakeLists.txt @@ -1,19 +1,13 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.15) project(sdl2_mixer) -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - include(CheckTypeSize) macro(add_music_option type) option(${type} "${type} music support" OFF) message(STATUS "${type} ${${type}}") - if(${${type}}) + if(${type}) add_definitions("-DMUSIC_${type}") - if(${${type}_DYNAMIC}) - add_definitions("-D${type}_DYNAMIC") - endif() endif() endmacro() @@ -30,73 +24,78 @@ add_music_option(MID_NATIVE) add_music_option(MID_FLUIDSYNTH) add_music_option(MID_TINYMIDI) -if(${MID_NATIVE}) - -set(NATIVE_MIDI_SOURCES -source_subfolder/native_midi/native_midi_common.c -source_subfolder/native_midi/native_midi_common.h -source_subfolder/native_midi/native_midi_haiku.cpp -source_subfolder/native_midi/native_midi_mac.c -source_subfolder/native_midi/native_midi_macosx.c -source_subfolder/native_midi/native_midi_win32.c -) - -set(NATIVE_MIDI_HEADERS -source_subfolder/native_midi/native_midi.h -) - +if(MIDI_NATIVE) + set(NATIVE_MIDI_SOURCES + src/native_midi/native_midi_common.c + src/native_midi/native_midi_common.h + src/native_midi/native_midi_haiku.cpp + src/native_midi/native_midi_mac.c + src/native_midi/native_midi_macosx.c + src/native_midi/native_midi_win32.c + ) + + set(NATIVE_MIDI_HEADERS + src/native_midi/native_midi.h + ) endif() set(SOURCES -source_subfolder/effect_position.c -source_subfolder/effect_stereoreverse.c -source_subfolder/effects_internal.c -source_subfolder/load_aiff.c -source_subfolder/load_voc.c -source_subfolder/mixer.c -source_subfolder/music.c -source_subfolder/music_cmd.c -source_subfolder/music_flac.c -source_subfolder/music_fluidsynth.c -source_subfolder/music_mad.c -source_subfolder/music_mikmod.c -source_subfolder/music_modplug.c -source_subfolder/music_mpg123.c -source_subfolder/music_nativemidi.c -source_subfolder/music_ogg.c -source_subfolder/music_opus.c -source_subfolder/music_timidity.c -source_subfolder/music_wav.c -${NATIVE_MIDI_SOURCES} + src/effect_position.c + src/effect_stereoreverse.c + src/effects_internal.c + src/load_aiff.c + src/load_voc.c + src/mixer.c + src/music.c + src/music_cmd.c + src/music_flac.c + src/music_fluidsynth.c + src/music_mad.c + src/music_mikmod.c + src/music_modplug.c + src/music_mpg123.c + src/music_nativemidi.c + src/music_ogg.c + src/music_opus.c + src/music_timidity.c + src/music_wav.c + ${NATIVE_MIDI_SOURCES} ) set(HEADERS -source_subfolder/effects_internal.h -source_subfolder/load_aiff.h -source_subfolder/load_voc.h -source_subfolder/mixer.h -source_subfolder/music.h -source_subfolder/music_cmd.h -source_subfolder/music_flac.h -source_subfolder/music_fluidsynth.h -source_subfolder/music_mad.h -source_subfolder/music_mikmod.h -source_subfolder/music_modplug.h -source_subfolder/music_mpg123.h -source_subfolder/music_nativemidi.h -source_subfolder/music_ogg.h -source_subfolder/music_opus.h -source_subfolder/music_timidity.h -source_subfolder/music_wav.h -${NATIVE_MIDI_HEADERS} + src/effects_internal.h + src/load_aiff.h + src/load_voc.h + src/mixer.h + src/music.h + src/music_cmd.h + src/music_flac.h + src/music_fluidsynth.h + src/music_mad.h + src/music_mikmod.h + src/music_modplug.h + src/music_mpg123.h + src/music_nativemidi.h + src/music_ogg.h + src/music_opus.h + src/music_timidity.h + src/music_wav.h + ${NATIVE_MIDI_HEADERS} ) add_library(${PROJECT_NAME} ${SOURCES} ${HEADERS}) -target_include_directories(${PROJECT_NAME} PRIVATE "source_subfolder") +target_include_directories(${PROJECT_NAME} PRIVATE "src") -if(${MID_NATIVE}) - target_include_directories(${PROJECT_NAME} PRIVATE "source_subfolder/native_midi") +if(MIDI_NATIVE) + target_include_directories(${PROJECT_NAME} PRIVATE "src/native_midi") + if(APPLE) + # https://github.com/libsdl-org/SDL_mixer/blob/release-2.0.4/configure.in#L380 + target_link_libraries(${PROJECT_NAME} PRIVATE "-framework AudioToolbox" "-framework AudioUnit" "-framework CoreServices") + elseif(WIN32) + # https://github.com/libsdl-org/SDL_mixer/blob/release-2.0.4/configure.in#L376 + target_link_libraries(${PROJECT_NAME} PRIVATE winmm) + endif() endif() find_package(SDL2 CONFIG REQUIRED) @@ -146,9 +145,9 @@ if(MID_TINYMIDI) target_link_libraries(${PROJECT_NAME} PRIVATE tinymidi::tinymidi) endif() -set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER source_subfolder/SDL_mixer.h) +set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER src/SDL_mixer.h) -if(${BUILD_SHARED_LIBS}) +if(BUILD_SHARED_LIBS) target_compile_definitions(${PROJECT_NAME} PRIVATE DLL_EXPORT) endif() @@ -160,8 +159,8 @@ if(SSIZE_T STREQUAL "") endif() install(TARGETS ${PROJECT_NAME} - ARCHIVE DESTINATION "lib" - LIBRARY DESTINATION "lib" - RUNTIME DESTINATION "bin" - PUBLIC_HEADER DESTINATION "include/SDL2" + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + PUBLIC_HEADER DESTINATION include/SDL2 ) diff --git a/recipes/sdl_mixer/all/conanfile.py b/recipes/sdl_mixer/all/conanfile.py index 7139d07a2b4ea..d2133052c545d 100644 --- a/recipes/sdl_mixer/all/conanfile.py +++ b/recipes/sdl_mixer/all/conanfile.py @@ -1,144 +1,155 @@ -from conans import CMake, tools +import os + from conan import ConanFile +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy from conan.tools.files import get, rmdir -import os -import functools + +required_conan_version = ">=1.57.0" class SDLMixerConan(ConanFile): name = "sdl_mixer" description = "SDL_mixer is a sample multi-channel audio mixer library" - topics = ("sdl_mixer", "sdl2", "sdl", "mixer", "audio", "multimedia", "sound", "music") + license = "Zlib" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.libsdl.org/projects/SDL_mixer/" - license = "Zlib" - exports_sources = ["CMakeLists.txt"] - generators = "cmake", "cmake_find_package_multi" + topics = ("sdl2", "sdl", "mixer", "audio", "multimedia", "sound", "music") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" - options = {"shared": [True, False], - "fPIC": [True, False], - "cmd": [True, False], - "wav": [True, False], - "flac": [True, False], - "mpg123": [True, False], - "mad": [True, False], - "ogg": [True, False], - "opus": [True, False], - "mikmod": [True, False], - "modplug": [True, False], - "fluidsynth": [True, False], - "nativemidi": [True, False], - "tinymidi": [True, False]} - default_options = {"shared": False, - "fPIC": True, - "cmd": False, # needs sys/wait.h - "wav": True, - "flac": True, - "mpg123": True, - "mad": True, - "ogg": True, - "opus": True, - "mikmod": True, - "modplug": True, - "fluidsynth": False, # TODO: add fluidsynth to Conan Center - "nativemidi": True, - "tinymidi": True} - _source_subfolder = "source_subfolder" - _build_subfolder = "build_subfolder" + options = { + "shared": [True, False], + "fPIC": [True, False], + "cmd": [True, False], + "wav": [True, False], + "flac": [True, False], + "mpg123": [True, False], + "mad": [True, False], + "ogg": [True, False], + "opus": [True, False], + "mikmod": [True, False], + "modplug": [True, False], + "nativemidi": [True, False], + "tinymidi": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "cmd": False, + "wav": True, + "flac": True, + "mpg123": True, + "mad": True, + "ogg": True, + "opus": True, + "mikmod": True, + "modplug": True, + "nativemidi": True, + "tinymidi": True, + } + + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if self.settings.os != "Linux": - del self.options.tinymidi + if self.settings.os in ["Linux", "FreeBSD"]: + self.options.rm_safe("nativemidi") else: - del self.options.nativemidi + self.options.rm_safe("tinymidi") def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("sdl/2.0.20") + self.requires("sdl/2.30.5", transitive_headers=True, transitive_libs=True) if self.options.flac: - self.requires("flac/1.3.3") + self.requires("flac/1.4.2") if self.options.mpg123: - self.requires("mpg123/1.29.3") + self.requires("mpg123/1.31.2") if self.options.mad: self.requires("libmad/0.15.1b") if self.options.ogg: self.requires("ogg/1.3.5") self.requires("vorbis/1.3.7") if self.options.opus: - self.requires("openssl/1.1.1q") - self.requires("opus/1.3.1") + self.requires("openssl/[>=1.1 <4]") + self.requires("opus/1.4") self.requires("opusfile/0.12") if self.options.mikmod: self.requires("libmikmod/3.3.11.1") if self.options.modplug: self.requires("libmodplug/0.8.9.0") - if self.options.fluidsynth: - self.requires("fluidsynth/2.2") # TODO: this package is missing on the conan-center-index - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: if self.options.tinymidi: self.requires("tinymidi/cci.20130325") def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + rmdir(self, os.path.join(self.source_folder, "external")) - rmdir(self, os.path.join(self._source_subfolder, "external")) - - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["CMD"] = self.options.cmd - cmake.definitions["WAV"] = self.options.wav - cmake.definitions["FLAC"] = self.options.flac - cmake.definitions["MP3_MPG123"] = self.options.mpg123 - cmake.definitions["MP3_MAD"] = self.options.mad - cmake.definitions["OGG"] = self.options.ogg - cmake.definitions["OPUS"] = self.options.opus - cmake.definitions["MOD_MIKMOD"] = self.options.mikmod - cmake.definitions["MOD_MODPLUG"] = self.options.modplug - cmake.definitions["MID_FLUIDSYNTH"] = self.options.fluidsynth - if self.settings.os == "Linux": - cmake.definitions["MID_TINYMIDI"] = self.options.tinymidi - cmake.definitions["MID_NATIVE"] = False + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMD"] = self.options.cmd + tc.variables["WAV"] = self.options.wav + tc.variables["FLAC"] = self.options.flac + tc.variables["MP3_MPG123"] = self.options.mpg123 + tc.variables["MP3_MAD"] = self.options.mad + tc.variables["OGG"] = self.options.ogg + tc.variables["OPUS"] = self.options.opus + tc.variables["MOD_MIKMOD"] = self.options.mikmod + tc.variables["MOD_MODPLUG"] = self.options.modplug + tc.variables["MID_FLUIDSYNTH"] = False + if self.settings.os in ["Linux", "FreeBSD"]: + tc.variables["MID_TINYMIDI"] = self.options.tinymidi + tc.variables["MIDI_NATIVE"] = False else: - cmake.definitions["MID_TINYMIDI"] = False - cmake.definitions["MID_NATIVE"] = self.options.nativemidi - - cmake.definitions["FLAC_DYNAMIC"] = self.options["flac"].shared if self.options.flac else False - cmake.definitions["MP3_MPG123_DYNAMIC"] = self.options["mpg123"].shared if self.options.mpg123 else False - cmake.definitions["OGG_DYNAMIC"] = self.options["ogg"].shared if self.options.ogg else False - cmake.definitions["OPUS_DYNAMIC"] = self.options["opus"].shared if self.options.opus else False - cmake.definitions["MOD_MIKMOD_DYNAMIC"] = self.options["libmikmod"].shared if self.options.mikmod else False - cmake.definitions["MOD_MODPLUG_DYNAMIC"] = self.options["libmodplug"].shared if self.options.modplug else False - - cmake.configure(build_folder=self._build_subfolder) - - return cmake + tc.variables["MID_TINYMIDI"] = False + tc.variables["MIDI_NATIVE"] = self.options.nativemidi + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure(build_script_folder=self.source_path.parent) cmake.build() def package(self): - self.copy(pattern="COPYING.txt", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "COPYING.txt", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): - self.cpp_info.set_property("pkg_config_name", "SDL2_mixer") self.cpp_info.set_property("cmake_file_name", "SDL2_mixer") self.cpp_info.set_property("cmake_target_name", "SDL2_mixer::SDL2_mixer") self.cpp_info.set_property("pkg_config_name", "SDL2_mixer") + self.cpp_info.libs = ["SDL2_mixer"] self.cpp_info.includedirs.append(os.path.join("include", "SDL2")) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m"] + + if self.options.get_safe("nativemidi"): + if is_apple_os(self): + # https://github.com/libsdl-org/SDL_mixer/blob/release-2.0.4/configure.in#L380 + self.cpp_info.frameworks.extend(["AudioToolbox", "AudioUnit", "CoreServices"]) + elif self.settings.os == "Windows": + # https://github.com/libsdl-org/SDL_mixer/blob/release-2.0.4/configure.in#L376 + self.cpp_info.system_libs.extend(["winmm"]) self.cpp_info.names["cmake_find_package"] = "SDL2_mixer" self.cpp_info.names["cmake_find_package_multi"] = "SDL2_mixer" diff --git a/recipes/sdl_mixer/all/test_package/CMakeLists.txt b/recipes/sdl_mixer/all/test_package/CMakeLists.txt index cbb6dbc11043a..d1c846300657f 100644 --- a/recipes/sdl_mixer/all/test_package/CMakeLists.txt +++ b/recipes/sdl_mixer/all/test_package/CMakeLists.txt @@ -1,11 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(SDL2_mixer CONFIG REQUIRED) +find_package(SDL2_mixer REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} PRIVATE SDL2_mixer::SDL2_mixer) diff --git a/recipes/sdl_mixer/all/test_package/conanfile.py b/recipes/sdl_mixer/all/test_package/conanfile.py index 49a3a66ea5bad..ef5d7042163ec 100644 --- a/recipes/sdl_mixer/all/test_package/conanfile.py +++ b/recipes/sdl_mixer/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/sdl_mixer/all/test_v1_package/CMakeLists.txt b/recipes/sdl_mixer/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/sdl_mixer/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/sdl_mixer/all/test_v1_package/conanfile.py b/recipes/sdl_mixer/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..49a3a66ea5bad --- /dev/null +++ b/recipes/sdl_mixer/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/sentry-native/all/conandata.yml b/recipes/sentry-native/all/conandata.yml index 9e305b2ec5e67..12d9363d69381 100644 --- a/recipes/sentry-native/all/conandata.yml +++ b/recipes/sentry-native/all/conandata.yml @@ -1,13 +1,13 @@ sources: + "0.7.8": + url: "https://github.com/getsentry/sentry-native/releases/download/0.7.8/sentry-native.zip" + sha256: "7cfde453866edf4ae7991f4300fc08a5cb4e6d679d31011ff93b4cfe5e3e5d8a" "0.7.6": url: "https://github.com/getsentry/sentry-native/releases/download/0.7.6/sentry-native.zip" sha256: "42180ad933a3a2bd86a1649ed0f1a41df20e783ce17c5cb1f86775f7caf06bc1" "0.7.5": url: "https://github.com/getsentry/sentry-native/releases/download/0.7.5/sentry-native.zip" sha256: "d9f1b44753fae3e9462aa1e6fd3021cb0ff2f51c1a1fa02b34510e3bc311f429" - "0.7.4": - url: "https://github.com/getsentry/sentry-native/releases/download/0.7.4/sentry-native.zip" - sha256: "9d17961d91c845ad8eb6f5106b2f5930f24a6e64077d7432013d4b379a8db7ac" "0.6.6": url: "https://github.com/getsentry/sentry-native/releases/download/0.6.6/sentry-native.zip" sha256: "7a98467c0b2571380a3afc5e681cb13aa406a709529be12d74610b0015ccde0c" diff --git a/recipes/sentry-native/all/conanfile.py b/recipes/sentry-native/all/conanfile.py index 2f31f5efdc35b..569658beb597f 100644 --- a/recipes/sentry-native/all/conanfile.py +++ b/recipes/sentry-native/all/conanfile.py @@ -1,3 +1,5 @@ +import os + from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os @@ -5,9 +7,7 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv from conan.tools.files import copy, get, rm, rmdir -from conan.tools.microsoft import is_msvc from conan.tools.scm import Version -import os required_conan_version = ">=1.55.0" @@ -35,7 +35,7 @@ class SentryNativeConan(ConanFile): "with_crashpad": ["google", "sentry"], "crashpad_with_tls": ["openssl", False], "with_breakpad": ["google", "sentry"], - "wer" : [True, False], + "wer": [True, False], } default_options = { "shared": False, @@ -46,15 +46,28 @@ class SentryNativeConan(ConanFile): "with_crashpad": "sentry", "crashpad_with_tls": "openssl", "with_breakpad": "sentry", - "wer": False + "wer": False, } @property def _min_cppstd(self): - return "17" + if Version(self.version) >= "0.7.8" and self.options.get_safe("with_crashpad") == "sentry": + return "20" + else: + return "17" @property def _minimum_compilers_version(self): + if Version(self.version) >= "0.7.8" and self.options.get_safe("with_crashpad") == "sentry": + # Sentry-native 0.7.8 requires C++20: Concepts and bit_cast + # https://github.com/chromium/mini_chromium/blob/e49947ad445c4ed4bc1bb4ed60bbe0fe17efe6ec/base/numerics/byte_conversions.h#L88 + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "11", + "clang": "14", + "apple-clang": "14", + } minimum_gcc_version = "5" if self.options.get_safe("backend") == "breakpad" or self.options.get_safe("backend") == "crashpad": minimum_gcc_version = "7" diff --git a/recipes/sentry-native/config.yml b/recipes/sentry-native/config.yml index 5e508311ba38c..4abee834d6ecf 100644 --- a/recipes/sentry-native/config.yml +++ b/recipes/sentry-native/config.yml @@ -1,10 +1,10 @@ versions: + "0.7.8": + folder: all "0.7.6": folder: all "0.7.5": folder: all - "0.7.4": - folder: all "0.6.6": folder: all "0.5.4": diff --git a/recipes/seqan3/all/conandata.yml b/recipes/seqan3/all/conandata.yml index 7b4ddfdc76fc6..ee19f74eeca81 100644 --- a/recipes/seqan3/all/conandata.yml +++ b/recipes/seqan3/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.3.0": + url: "https://github.com/seqan/seqan3/releases/download/3.3.0/seqan3-3.3.0-Source.tar.xz" + sha256: "da2fb621268ebc52b9cc26087e96f4a94109db1f4f28d363d19c7c9cdbd788b1" "3.1.0": - url: https://github.com/seqan/seqan3/releases/download/3.1.0/seqan3-3.1.0-Source.tar.xz - sha256: 0b37b1c3450e19c0ebe42c052c3f87babb8074bd772f10a553949c312c285726 + url: "https://github.com/seqan/seqan3/releases/download/3.1.0/seqan3-3.1.0-Source.tar.xz" + sha256: "0b37b1c3450e19c0ebe42c052c3f87babb8074bd772f10a553949c312c285726" diff --git a/recipes/seqan3/all/conanfile.py b/recipes/seqan3/all/conanfile.py index 10b57ed42fdf7..9ea0680d5bf45 100644 --- a/recipes/seqan3/all/conanfile.py +++ b/recipes/seqan3/all/conanfile.py @@ -28,7 +28,9 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): - return {"gcc": "10"} + if Version(self.version) < "3.3.0": + return {"gcc": "10"} + return {"gcc": "11"} def layout(self): basic_layout(self, src_folder="src") @@ -44,11 +46,8 @@ def validate(self): check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version: - if Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration("SeqAn3 requires C++20, which your compiler does not fully support.") - else: - self.output.warning("SeqAn3 requires C++20. Your compiler is unknown. Assuming it supports C++20.") + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration("SeqAn3 requires C++20, which your compiler does not fully support.") if self.settings.compiler == "gcc" and self.settings.compiler.libcxx != "libstdc++11": self.output.warning("SeqAn3 does not actively support libstdc++, consider using libstdc++11 instead.") diff --git a/recipes/seqan3/config.yml b/recipes/seqan3/config.yml index 9370babb6565a..8d4de7c167625 100644 --- a/recipes/seqan3/config.yml +++ b/recipes/seqan3/config.yml @@ -1,3 +1,5 @@ versions: + "3.3.0": + folder: "all" "3.1.0": folder: "all" diff --git a/recipes/sfl/all/conandata.yml b/recipes/sfl/all/conandata.yml index 915488f13fa26..93608ba5ad222 100644 --- a/recipes/sfl/all/conandata.yml +++ b/recipes/sfl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.8.0": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.8.0.tar.gz" + sha256: "bb473a8e0b46ecff957c06112593b9a4104e0d1ec8e9d5840ff33c20ad3a243e" "1.7.0": url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.7.0.tar.gz" sha256: "9e09bacc51cfb085c4a6030f90cbea45685de608900d6b7b3c0a9f4971682652" diff --git a/recipes/sfl/config.yml b/recipes/sfl/config.yml index 1001b75a17a81..e2decd2fe802d 100644 --- a/recipes/sfl/config.yml +++ b/recipes/sfl/config.yml @@ -1,4 +1,6 @@ versions: + "1.8.0": + folder: "all" "1.7.0": folder: "all" "1.6.0": diff --git a/recipes/shaderc/all/conandata.yml b/recipes/shaderc/all/conandata.yml index f866b68a84277..25858ddef7954 100644 --- a/recipes/shaderc/all/conandata.yml +++ b/recipes/shaderc/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2024.1": + url: "https://github.com/google/shaderc/archive/refs/tags/v2024.1.tar.gz" + sha256: "eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528" "2023.6": url: "https://github.com/google/shaderc/archive/refs/tags/v2023.6.tar.gz" sha256: "e40fd4a87a56f6610e223122179f086d5c4f11a7e0e2aa461f0325c3a0acc6ae" @@ -6,6 +9,16 @@ sources: url: "https://github.com/google/shaderc/archive/v2021.1.tar.gz" sha256: "047113bc4628da164a3cb845efc20d442728873f6054a68ab56d04a053f2c32b" patches: + "2024.1": + - patch_file: "patches/2023.6/use-conan-dependencies.patch" + patch_description: "Replace third_party with Conan dependencies" + patch_type: "conan" + - patch_file: "patches/2021.1/adapt-update_build_version.py.patch" + patch_description: "Adapt update_build_version.py for Conan" + patch_type: "conan" + - patch_file: "patches/2021.1/install-shaderc_util.patch" + patch_description: "install() shaderc_util" + patch_type: "conan" "2023.6": - patch_file: "patches/2023.6/use-conan-dependencies.patch" patch_description: "Replace third_party with Conan dependencies" @@ -26,3 +39,9 @@ patches: - patch_file: "patches/2021.1/install-shaderc_util.patch" patch_description: "install() shaderc_util" patch_type: "conan" +siprv_mapping: + # TODO: bump me once newer versions are available on CCI + "2024.1": "1.3.261.1" + # "2023.6": "1.3.261.1" + "2023.6": "1.3.239.0" + "2021.1": "1.3.224.0" diff --git a/recipes/shaderc/all/conanfile.py b/recipes/shaderc/all/conanfile.py index 80efeb3ed4b4e..309b53f6cb235 100644 --- a/recipes/shaderc/all/conanfile.py +++ b/recipes/shaderc/all/conanfile.py @@ -6,6 +6,7 @@ from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.apple import fix_apple_shared_install_name required_conan_version = ">=1.53.0" @@ -45,12 +46,7 @@ def layout(self): @property def _spirv_version(self): - return { - # TODO: bump me once newer versions are available on CCI - # "2023.6": "1.3.261.1", - "2023.6": "1.3.239.0", - "2021.1": "1.3.224.0", - }[str(self.version)] + return self.conan_data.get("siprv_mapping")[self.version] def requirements(self): # transitive_headers=True is not required for any of the dependencies @@ -104,6 +100,7 @@ def package(self): copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) cmake.install() + fix_apple_shared_install_name(self) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): diff --git a/recipes/shaderc/config.yml b/recipes/shaderc/config.yml index 272340ffeadfd..7b4ff24649925 100644 --- a/recipes/shaderc/config.yml +++ b/recipes/shaderc/config.yml @@ -1,4 +1,6 @@ versions: + "2024.1": + folder: all "2023.6": folder: all "2021.1": diff --git a/recipes/shapelib/all/conandata.yml b/recipes/shapelib/all/conandata.yml index 1c122519c5ede..b4cae11fb3a97 100644 --- a/recipes/shapelib/all/conandata.yml +++ b/recipes/shapelib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.6.1": + url: "https://github.com/OSGeo/shapelib/archive/v1.6.1.tar.gz" + sha256: "72a30ed408edee0dc9eaa81255e634af6706f9192b5ed5b536013f1cc4b327c4" "1.6.0": url: "https://github.com/OSGeo/shapelib/archive/v1.6.0.tar.gz" sha256: "0bfd1eab9616ca3c420a5ad674b0d07c7c5018620d6ab6ae43917daa18ff0d1e" diff --git a/recipes/shapelib/all/conanfile.py b/recipes/shapelib/all/conanfile.py index e4deabe7afba9..56012aa251125 100644 --- a/recipes/shapelib/all/conanfile.py +++ b/recipes/shapelib/all/conanfile.py @@ -63,6 +63,7 @@ def package(self): cmake.install() rm(self, "*.exe", os.path.join(self.package_folder, "bin")) rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "shapelib") diff --git a/recipes/shapelib/config.yml b/recipes/shapelib/config.yml index 04ffd79e144a1..7da8bd84259cd 100644 --- a/recipes/shapelib/config.yml +++ b/recipes/shapelib/config.yml @@ -1,4 +1,6 @@ versions: + "1.6.1": + folder: all "1.6.0": folder: all "1.5.0": diff --git a/recipes/simdjson/all/conandata.yml b/recipes/simdjson/all/conandata.yml index b9b9a0dfe167a..ce05f59a5be18 100644 --- a/recipes/simdjson/all/conandata.yml +++ b/recipes/simdjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.10.0": + url: "https://github.com/simdjson/simdjson/archive/v3.10.0.tar.gz" + sha256: "9c30552f1dd0ee3d0832bb1c6b7b97d813b18d5ef294c10dcb6fc242e5947de8" "3.9.3": url: "https://github.com/simdjson/simdjson/archive/v3.9.3.tar.gz" sha256: "2e3d10abcde543d3dd8eba9297522cafdcebdd1db4f51b28f3bc95bf1d6ad23c" diff --git a/recipes/simdjson/config.yml b/recipes/simdjson/config.yml index a10abda6a7a1a..884caaae676a0 100644 --- a/recipes/simdjson/config.yml +++ b/recipes/simdjson/config.yml @@ -1,4 +1,6 @@ versions: + "3.10.0": + folder: all "3.9.3": folder: all "3.9.2": diff --git a/recipes/simdutf/all/conandata.yml b/recipes/simdutf/all/conandata.yml index fe77b0830484e..b7901ec89c9c1 100644 --- a/recipes/simdutf/all/conandata.yml +++ b/recipes/simdutf/all/conandata.yml @@ -1,4 +1,22 @@ sources: + "5.5.0": + url: "https://github.com/simdutf/simdutf/archive/v5.5.0.tar.gz" + sha256: "47090a770b8eecf610ac4d1fafadde60bb7ba3c9d576d2a3a545aba989a3d749" + "5.4.15": + url: "https://github.com/simdutf/simdutf/archive/v5.4.15.tar.gz" + sha256: "188a9516ee208659cab9a1e5063c1b8385d63d171c2381e9ce18af97936d9879" + "5.3.7": + url: "https://github.com/simdutf/simdutf/archive/v5.3.7.tar.gz" + sha256: "731fb29c8c0b05c77b0a29dc37ab8eabe09533f000864a7c55e1ed2e1d33d1e7" + "5.3.5": + url: "https://github.com/simdutf/simdutf/archive/v5.3.5.tar.gz" + sha256: "e6706d7fc68f6e1541414dcf45abe6190d591505d08bff3cc53f55642568f28d" + "5.3.2": + url: "https://github.com/simdutf/simdutf/archive/v5.3.2.tar.gz" + sha256: "3c146fb80d775b869ae9b132f41981dc3266f616f589b5f45045d6a22fdabdca" + "5.3.1": + url: "https://github.com/simdutf/simdutf/archive/v5.3.1.tar.gz" + sha256: "373e1e66a1c245817f0aa08ae8693b71d1703f9355d364e0d9d002929738ddcc" "5.2.8": url: "https://github.com/simdutf/simdutf/archive/v5.2.8.tar.gz" sha256: "2706f1bef85a6d8598f82defd3848f1c5100e2e065c5d416d993118b53ea8d77" @@ -17,20 +35,7 @@ sources: "4.0.9": url: "https://github.com/simdutf/simdutf/archive/v4.0.9.tar.gz" sha256: "599E6558FC8D06F8346E5F210564F8B18751C93D83BCE1A40A0E6A326C57B61E" + # 4.0.5 is required by scnlib "4.0.5": url: "https://github.com/simdutf/simdutf/archive/v4.0.5.tar.gz" sha256: "040d80ff4321f89ea9739ccc7f468ece9c4bc2630f3d4762b6d829000d2ec625" - "4.0.4": - url: "https://github.com/simdutf/simdutf/archive/v4.0.4.tar.gz" - sha256: "fd24bab9754e24f42e6cd2c9d336accb2674c306f9221c00fb095fe95cfe9247" - "4.0.3": - url: "https://github.com/simdutf/simdutf/archive/v4.0.3.tar.gz" - sha256: "00429eca296f00d9b93939d2561538bad601602ad02fd01ba9ad366268773751" - "3.2.17": - url: "https://github.com/simdutf/simdutf/archive/v3.2.17.tar.gz" - sha256: "c24e3eec1e08522a09b33e603352e574f26d367a7701bf069a65881f64acd519" -patches: - "3.2.17": - - patch_file: "patches/3.2.17-0001-fix-cmake.patch" - patch_description: "remove static build, enable rpath on macOS" - patch_type: "conan" diff --git a/recipes/simdutf/all/conanfile.py b/recipes/simdutf/all/conanfile.py index 69d83bcb2ced4..7f4c06e0624c0 100644 --- a/recipes/simdutf/all/conanfile.py +++ b/recipes/simdutf/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir +from conan.tools.files import get, copy, rmdir from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.scm import Version @@ -31,9 +31,6 @@ class SimdutfConan(ConanFile): def _min_cppstd(self): return 11 - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -48,13 +45,11 @@ def layout(self): def validate(self): if self.info.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - ## simdutf >= 4.0.0 requires _mm_storeu_si64 - if Version(self.version) >= "4.0.0": - if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "9.0": - raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < 9.") - if self.settings.compiler == "gcc" and self.settings.build_type == "Debug" and \ - Version(self.settings.compiler.version) < "10.0": - raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < 10 with debug build") + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "9.0": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < 9.") + if self.settings.compiler == "gcc" and self.settings.build_type == "Debug" and \ + Version(self.settings.compiler.version) < "10.0": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < 10 with debug build") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -71,7 +66,6 @@ def generate(self): deps.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/simdutf/all/patches/3.2.17-0001-fix-cmake.patch b/recipes/simdutf/all/patches/3.2.17-0001-fix-cmake.patch deleted file mode 100644 index 6f1f0aa23c231..0000000000000 --- a/recipes/simdutf/all/patches/3.2.17-0001-fix-cmake.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/cmake/simdutf-flags.cmake b/cmake/simdutf-flags.cmake -index d1e9bcd..2ff37c0 100644 ---- a/cmake/simdutf-flags.cmake -+++ b/cmake/simdutf-flags.cmake -@@ -22,4 +22,3 @@ set(SIMDUTF_CXX_STANDARD 11 CACHE STRING "the C++ standard to use for simdutf") - set(CMAKE_CXX_STANDARD ${SIMDUTF_CXX_STANDARD}) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) --set(CMAKE_MACOSX_RPATH OFF) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index ed6be55..0b649c6 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -3,7 +3,7 @@ target_include_directories(simdutf-include-source INTERFACE $/simdutf.cpp) - target_link_libraries(simdutf-source INTERFACE simdutf-include-source) --add_library(simdutf STATIC simdutf.cpp) -+add_library(simdutf simdutf.cpp) - target_include_directories(simdutf PRIVATE $ ) - target_include_directories(simdutf PUBLIC "$") - diff --git a/recipes/simdutf/config.yml b/recipes/simdutf/config.yml index 5931b0efb2f62..f002a2c442833 100644 --- a/recipes/simdutf/config.yml +++ b/recipes/simdutf/config.yml @@ -1,4 +1,16 @@ versions: + "5.5.0": + folder: all + "5.4.15": + folder: all + "5.3.7": + folder: all + "5.3.5": + folder: all + "5.3.2": + folder: all + "5.3.1": + folder: all "5.2.8": folder: all "5.2.6": @@ -13,9 +25,3 @@ versions: folder: all "4.0.5": folder: all - "4.0.4": - folder: all - "4.0.3": - folder: all - "3.2.17": - folder: all diff --git a/recipes/simfil/all/conandata.yml b/recipes/simfil/all/conandata.yml index 322f4f504eca0..d5a01b392c11c 100644 --- a/recipes/simfil/all/conandata.yml +++ b/recipes/simfil/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "0.3.2": + url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.3.2.tar.gz" + sha256: "b8357db1d46058bb5b02eee4945801fc96cf06736c15195235a4b35da72e2ac2" + "0.3.1": + url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.3.1.tar.gz" + sha256: "caddee2e338041ae5ec56c6a92f14e79ee3d5a0f7eaf327d6b8418fe06dd484e" + "0.3.0": + url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.3.0.tar.gz" + sha256: "dea7b063f3f062772fcb49b368954814fc04d66c55db327a53ea008d698cd171" "0.2.1": url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.2.1.tar.gz" sha256: "d3114900f121013cbffe42b0a70c66a47846c9326f6327d2ce0dd2e841919fd9" diff --git a/recipes/simfil/all/conanfile.py b/recipes/simfil/all/conanfile.py index 66a16c329cfe6..55dad5c2c07b1 100644 --- a/recipes/simfil/all/conanfile.py +++ b/recipes/simfil/all/conanfile.py @@ -65,7 +65,7 @@ def requirements(self): self.requires("fmt/10.0.0", transitive_headers=True) self.requires("bitsery/5.2.3", transitive_headers=True) if self.options.with_json: - self.requires("nlohmann_json/3.11.2") + self.requires("nlohmann_json/3.11.2", transitive_headers=True) def config_options(self): if self.settings.os == "Windows": @@ -102,3 +102,5 @@ def package(self): def package_info(self): self.cpp_info.libs = ["simfil"] + if self.options.with_json: + self.cpp_info.defines = ["SIMFIL_WITH_MODEL_JSON=1"] diff --git a/recipes/simfil/config.yml b/recipes/simfil/config.yml index c6da95529c7e5..1dab437cf32dd 100644 --- a/recipes/simfil/config.yml +++ b/recipes/simfil/config.yml @@ -1,4 +1,10 @@ versions: + "0.3.2": + folder: all + "0.3.1": + folder: all + "0.3.0": + folder: all "0.2.1": folder: all "0.1.3": diff --git a/recipes/simple_enum/all/conandata.yml b/recipes/simple_enum/all/conandata.yml new file mode 100644 index 0000000000000..6c936b9324135 --- /dev/null +++ b/recipes/simple_enum/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.8.0": + url: "https://github.com/arturbac/simple_enum/archive/refs/tags/v0.8.0.tar.gz" + sha256: "b32e723ddb29b6cb2ab93f2376157ee6fd7a4f3c170edddb6a3fb7186068e6ee" diff --git a/recipes/simple_enum/all/conanfile.py b/recipes/simple_enum/all/conanfile.py new file mode 100644 index 0000000000000..6be80c9e19d4d --- /dev/null +++ b/recipes/simple_enum/all/conanfile.py @@ -0,0 +1,74 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, export_conandata_patches, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.52.0" + +class SimpleEnumConan(ConanFile): + name = "simple_enum" + description = "An Fast, Intuitive and Type-Safe C++ Enumeration Support Library" + license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/arturbac/simple_enum" + topics = ("serialization", "type-safe", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "11", + "clang": "12", + "apple-clang": "14", # apple-clang/13 doesn't support std::convertible_to + "Visual Studio": "16", + "msvc": "192", + } + + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + 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." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + copy( + self, + "*.h", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/simple_enum/all/test_package/CMakeLists.txt b/recipes/simple_enum/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..6835a49d78e83 --- /dev/null +++ b/recipes/simple_enum/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(simple_enum REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE simple_enum::simple_enum) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/simple_enum/all/test_package/conanfile.py b/recipes/simple_enum/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/simple_enum/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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 = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + 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): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/simple_enum/all/test_package/test_package.cpp b/recipes/simple_enum/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..694699608c7ba --- /dev/null +++ b/recipes/simple_enum/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include + +int main() { + enum struct enum_bounded { v1 = 1, v2, v3, first = v1, last = v3 }; + static_assert(simple_enum::enum_name(enum_bounded::v2) == "v2"); + + return 0; +} diff --git a/recipes/simple_enum/config.yml b/recipes/simple_enum/config.yml new file mode 100644 index 0000000000000..675f954f2770e --- /dev/null +++ b/recipes/simple_enum/config.yml @@ -0,0 +1,3 @@ +versions: + "0.8.0": + folder: all diff --git a/recipes/soplex/all/conandata.yml b/recipes/soplex/all/conandata.yml index 2d496e06ac50e..082b7e8e0f6dc 100644 --- a/recipes/soplex/all/conandata.yml +++ b/recipes/soplex/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "7.1.1": + url: "https://github.com/scipopt/soplex/archive/refs/tags/release-711.tar.gz" + sha256: "75752dca395e219e350f3b462f1f4c08e9d3c2deb2782414862f546a9489cdeb" + "7.1.0": + url: "https://github.com/scipopt/soplex/archive/refs/tags/release-710.tar.gz" + sha256: "ec177fdb688346287d5f211dd7ec4a0195c8ec9b3a5314d38aca383b6fa1418e" "7.0.1": url: "https://github.com/scipopt/soplex/archive/refs/tags/release-701.tar.gz" sha256: "80cce994dcbe45fd52b60e31a3aeb5d2c60a7ddbaae495e0ce6bf58481675696" diff --git a/recipes/soplex/config.yml b/recipes/soplex/config.yml index d7c20aab60f9f..d583730ab48c3 100644 --- a/recipes/soplex/config.yml +++ b/recipes/soplex/config.yml @@ -1,4 +1,8 @@ versions: + "7.1.1": + folder: all + "7.1.0": + folder: all "7.0.1": folder: all "7.0.0": diff --git a/recipes/spy/all/conandata.yml b/recipes/spy/all/conandata.yml index a03c066af9192..a6f3a70ed4537 100644 --- a/recipes/spy/all/conandata.yml +++ b/recipes/spy/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/jfalcou/spy/archive/1.1.0.tar.gz" + sha256: "35e15dfe7bebcb03fb28c249d2c2c4ed302dadafbfd5f81e71c31b95d1e3b2dd" "1.0.0": url: "https://github.com/jfalcou/spy/archive/1.0.0.tar.gz" sha256: "ae2f508460b3b21436a652e281e1cf44370da5871a9d13086daa04a9e2bd7d1b" diff --git a/recipes/spy/all/conanfile.py b/recipes/spy/all/conanfile.py index 4e3adabd43a05..5d68cfa807921 100644 --- a/recipes/spy/all/conanfile.py +++ b/recipes/spy/all/conanfile.py @@ -10,11 +10,12 @@ class SpyConan(ConanFile): name = "spy" + description = "C++ 17 for constexpr-proof detection and classification of informations about OS, compiler, etc..." license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://jfalcou.github.io/spy/" - description = "C++ 17 for constexpr-proof detection and classification of informations about OS, compiler, etc..." - topics = ("c++17", "config", "metaprogramming") + topics = ("config", "metaprogramming", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -27,6 +28,7 @@ def _compilers_minimum_version(self): return { "gcc": "7.4", "Visual Studio": "15.7", + "msvc": "191", "clang": "6", "apple-clang": "10", } @@ -54,11 +56,7 @@ def layout(self): basic_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) - - def build(self): - pass + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) @@ -66,6 +64,4 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] - self.cpp_info.frameworkdirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] diff --git a/recipes/spy/all/test_package/conanfile.py b/recipes/spy/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/spy/all/test_package/conanfile.py +++ b/recipes/spy/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/spy/config.yml b/recipes/spy/config.yml index 1d92b70b7b274..cab874d2d97fa 100644 --- a/recipes/spy/config.yml +++ b/recipes/spy/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "1.0.0": folder: all "0.0.4": diff --git a/recipes/sqlcipher/all/conandata.yml b/recipes/sqlcipher/all/conandata.yml index 3d9822ef95d64..5d877e92e6fb1 100644 --- a/recipes/sqlcipher/all/conandata.yml +++ b/recipes/sqlcipher/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.6.1": + url: "https://github.com/sqlcipher/sqlcipher/archive/v4.6.1.zip" + sha256: "93a7475183d47e2d33f85aefa7518e8730796f103612d36ae191ae56209104e0" "4.6.0": url: "https://github.com/sqlcipher/sqlcipher/archive/v4.6.0.zip" sha256: "2d41ba2bf09c74a488f546551f65f0fa8517413307a0509dd2c87d66df6bff95" @@ -27,6 +30,10 @@ sources: url: "https://github.com/sqlcipher/sqlcipher/archive/v4.3.0.zip" sha256: "41e1408465488e9c478ca5b7c5f8410405a10caa73b82db60ac115a76c563c05" patches: + "4.6.1": + - patch_file: patches/Makefile.in-v4.6.1.patch + - patch_file: patches/Makefile.msc-v4.6.1.patch + - patch_file: patches/fix_configure-v4.5.7.patch "4.6.0": - patch_file: patches/Makefile.in-v4.5.7.patch - patch_file: patches/Makefile.msc-v4.5.7.patch diff --git a/recipes/sqlcipher/all/patches/Makefile.in-v4.5.7.patch b/recipes/sqlcipher/all/patches/Makefile.in-v4.5.7.patch index 63b0b52972962..8c0ff8f52c2da 100644 --- a/recipes/sqlcipher/all/patches/Makefile.in-v4.5.7.patch +++ b/recipes/sqlcipher/all/patches/Makefile.in-v4.5.7.patch @@ -12,15 +12,6 @@ index ce2617c..77242fc 100644 Makefile: $(TOP)/Makefile.in ./config.status -@@ -1367,7 +1366,7 @@ fulltestonly: $(TESTPROGS) fuzztest - # Fuzz testing - # - # WARNING: When the "fuzztest" target is run by the testrunner.tcl script, --# it does not actually run this code. Instead, it schedules equivalent -+# it does not actually run this code. Instead, it schedules equivalent - # commands. Therefore, if this target is updated, then code in - # testrunner_data.tcl (search for "trd_fuzztest_data") must also be updated. - # @@ -1579,9 +1578,8 @@ lib_install: libsqlcipher.la $(INSTALL) -d $(DESTDIR)$(libdir) $(LTINSTALL) libsqlcipher.la $(DESTDIR)$(libdir) @@ -32,12 +23,3 @@ index ce2617c..77242fc 100644 $(INSTALL) -d $(DESTDIR)$(includedir) $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(includedir) $(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(includedir) -@@ -1596,7 +1594,7 @@ tcl_install: lib_install libtclsqlite3.la pkgIndex.tcl - rm -f $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.a - $(INSTALL) -m 0644 pkgIndex.tcl $(DESTDIR)$(TCLLIBDIR) - --clean: -+clean: - rm -f *.lo *.la *.o sqlcipher$(TEXE) libsqlcipher.la - rm -f sqlite3.h opcodes.* - rm -rf .libs .deps diff --git a/recipes/sqlcipher/all/patches/Makefile.in-v4.6.1.patch b/recipes/sqlcipher/all/patches/Makefile.in-v4.6.1.patch new file mode 100644 index 0000000000000..318c717c81e5a --- /dev/null +++ b/recipes/sqlcipher/all/patches/Makefile.in-v4.6.1.patch @@ -0,0 +1,27 @@ +diff --git a/Makefile.in b/Makefile.in +index 8431c25..2c1d4fd 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -676,8 +676,8 @@ SQLITE3_SHELL_TARGET = $(SQLITE3_SHELL_TARGET_@HAVE_WASI_SDK@) + # This is the default Makefile target. The objects listed here + # are what get build when you type just "make" with no arguments. + # +-all: sqlite3.h libsqlcipher.la $(SQLITE3_SHELL_TARGET) \ +- $(HAVE_TCL:1=libtclsqlite3.la) ++all: sqlite3.h libsqlcipher.la ++ + + Makefile: $(TOP)/Makefile.in + ./config.status +@@ -1578,9 +1578,9 @@ lib_install: libsqlcipher.la + $(INSTALL) -d $(DESTDIR)$(libdir) + $(LTINSTALL) libsqlcipher.la $(DESTDIR)$(libdir) + +-install: sqlcipher$(TEXE) lib_install sqlite3.h sqlcipher.pc ${HAVE_TCL:1=tcl_install} ++install: lib_install sqlite3.h sqlcipher.pc + $(INSTALL) -d $(DESTDIR)$(bindir) +- $(LTINSTALL) sqlcipher$(TEXE) $(DESTDIR)$(bindir) ++# $(LTINSTALL) sqlcipher$(TEXE) $(DESTDIR)$(bindir) + $(INSTALL) -d $(DESTDIR)$(includedir) + $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(includedir) + $(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(includedir) diff --git a/recipes/sqlcipher/all/patches/Makefile.msc-v4.6.1.patch b/recipes/sqlcipher/all/patches/Makefile.msc-v4.6.1.patch new file mode 100644 index 0000000000000..7edea48493167 --- /dev/null +++ b/recipes/sqlcipher/all/patches/Makefile.msc-v4.6.1.patch @@ -0,0 +1,160 @@ +diff --git a/Makefile.msc b/Makefile.msc +index d46cee1..899ce6a 100644 +--- a/Makefile.msc ++++ b/Makefile.msc +@@ -306,9 +306,9 @@ SQLITE3H = sqlite3.h + # + !IFNDEF SQLITE3DLL + !IF $(FOR_WIN10)!=0 +-SQLITE3DLL = winsqlite3.dll ++SQLITE3DLL = sqlcipher.dll + !ELSE +-SQLITE3DLL = sqlite3.dll ++SQLITE3DLL = sqlcipher.dll + !ENDIF + !ENDIF + +@@ -316,9 +316,9 @@ SQLITE3DLL = sqlite3.dll + # + !IFNDEF SQLITE3LIB + !IF $(FOR_WIN10)!=0 +-SQLITE3LIB = winsqlite3.lib ++SQLITE3LIB = sqlcipher.lib + !ELSE +-SQLITE3LIB = sqlite3.lib ++SQLITE3LIB = sqlcipher.lib + !ENDIF + !ENDIF + +@@ -703,7 +703,7 @@ SHELL_CORE_SRC = $(SQLITE3C) + SHELL_CORE_DEP = $(SQLITE3DLL) + # <> + !ELSEIF $(USE_AMALGAMATION)==0 +-SHELL_CORE_DEP = libsqlite3.lib ++SHELL_CORE_DEP = sqlcipher.lib + # <> + !ELSE + SHELL_CORE_DEP = +@@ -726,7 +726,7 @@ TESTFIXTURE_DEP = zlib $(TESTFIXTURE_DEP) + SHELL_CORE_LIB = $(SQLITE3LIB) + # <> + !ELSEIF $(USE_AMALGAMATION)==0 +-SHELL_CORE_LIB = libsqlite3.lib ++SHELL_CORE_LIB = sqlcipher.lib + # <> + !ELSE + SHELL_CORE_LIB = +@@ -761,8 +761,9 @@ RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP + # C compiler options for the Windows 10 platform (needs MSVC 2015). + # + !IF $(FOR_WIN10)!=0 +-TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE +-BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE ++# /d2guard4 requires /guard:cf to be present as well, but it doesn't work with /Zi (Debug builds) ++TCC = $(TCC) -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE ++BCC = $(BCC) -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE + !ENDIF + + # Also, we need to dynamically link to the correct MSVC runtime +@@ -1046,8 +1047,9 @@ TLIBS = + # default to file, 2 to default to memory, and 3 to force temporary + # tables to always be in memory. + # +-TCC = $(TCC) -DSQLITE_TEMP_STORE=1 +-RCC = $(RCC) -DSQLITE_TEMP_STORE=1 ++# Allow overriding the value ++TCC = $(TCC) -DSQLITE_TEMP_STORE=$(SQLITE_TEMP_STORE) ++RCC = $(RCC) -DSQLITE_TEMP_STORE=$(SQLITE_TEMP_STORE) + + # Enable/disable loadable extensions, and other optional features + # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*). +@@ -1213,14 +1215,15 @@ LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)" + !ENDIF + LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE + LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib +-LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib ++# Remove /NODEFAULTLIB:kernel32.lib, required by OpenSSL + !ENDIF + + # When compiling for UWP or the Windows 10 platform, some extra linker + # options are also required. + # + !IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0 +-LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib ++# Remove /NODEFAULTLIB:kernel32.lib, required by OpenSSL ++LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE + LTLINKOPTS = $(LTLINKOPTS) mincore.lib + !IFDEF PSDKLIBPATH + LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)" +@@ -1275,7 +1278,7 @@ LTLIBS = $(LTLIBS) $(LIBICU) + # + LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \ + backup.lo bitvec.lo btmutex.lo btree.lo build.lo \ +- callback.lo complete.lo ctime.lo \ ++ callback.lo complete.lo crypto.lo crypto_impl.lo crypto_openssl.lo ctime.lo \ + date.lo dbpage.lo dbstat.lo delete.lo \ + expr.lo fault.lo fkey.lo \ + fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \ +@@ -1786,7 +1789,7 @@ ALL_TCL_TARGETS = + # This is the default Makefile target. The objects listed here + # are what get build when you type just "make" with no arguments. + # +-core: dll libsqlite3.lib shell ++core: dll sqlcipher.lib shell + + # Targets that require the Tcl library. + # +@@ -1805,11 +1808,12 @@ dll: $(SQLITE3DLL) + shell: $(SQLITE3EXE) + + # <> +-libsqlite3.lib: $(LIBOBJ) +- $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) ++# LTLIBPATHS is required to find the openssl/libressl libs ++sqlcipher.lib: $(LIBOBJ) ++ $(LTLIB) $(LTLIBPATHS) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) + +-libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib +- $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS) ++libtclsqlite3.lib: tclsqlite.lo sqlcipher.lib ++ $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo sqlcipher.lib $(LIBTCLSTUB) $(TLIBS) + + tclsqlite3.def: tclsqlite.lo + echo EXPORTS > tclsqlite3.def +@@ -1831,9 +1835,9 @@ $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP) + $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS) + + # <> +-sqlite3.def: libsqlite3.lib ++sqlite3.def: sqlcipher.lib + echo EXPORTS > sqlite3.def +- dumpbin /all libsqlite3.lib \ ++ dumpbin /all sqlcipher.lib \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@]*)(?:@\d+)?$$" \1 \ + | sort >> sqlite3.def + # <> +@@ -2020,6 +2024,15 @@ callback.lo: $(TOP)\src\callback.c $(HDR) + complete.lo: $(TOP)\src\complete.c $(HDR) + $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c + ++crypto.lo: $(TOP)\src\crypto.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto.c ++ ++crypto_impl.lo: $(TOP)\src\crypto_impl.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto_impl.c ++ ++crypto_openssl.lo: $(TOP)\src\crypto_openssl.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto_openssl.c ++ + ctime.lo: $(TOP)\src\ctime.c $(HDR) + $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c + +@@ -2444,7 +2457,7 @@ sqlite3rbu.lo: $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR) + # Rules to build the 'testfixture' application. + # + # If using the amalgamation, use sqlite3.c directly to build the test +-# fixture. Otherwise link against libsqlite3.lib. (This distinction is ++# fixture. Otherwise link against sqlcipher.lib. (This distinction is + # necessary because the test fixture requires non-API symbols which are + # hidden when the library is built via the amalgamation). + # diff --git a/recipes/sqlcipher/config.yml b/recipes/sqlcipher/config.yml index 05e71e5640551..b3abcbf305759 100644 --- a/recipes/sqlcipher/config.yml +++ b/recipes/sqlcipher/config.yml @@ -1,4 +1,6 @@ versions: + "4.6.1": + folder: all "4.6.0": folder: all "4.5.7": diff --git a/recipes/sqlite3/all/conandata.yml b/recipes/sqlite3/all/conandata.yml index ac208fb3cac3a..cc14778b41f4c 100644 --- a/recipes/sqlite3/all/conandata.yml +++ b/recipes/sqlite3/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.46.1": + url: "https://sqlite.org/2024/sqlite-amalgamation-3460100.zip" + sha256: "77823cb110929c2bcb0f5d48e4833b5c59a8a6e40cdea3936b99e199dbbe5784" "3.46.0": url: "https://sqlite.org/2024/sqlite-amalgamation-3460000.zip" sha256: "712a7d09d2a22652fb06a49af516e051979a3984adb067da86760e60ed51a7f5" diff --git a/recipes/sqlite3/config.yml b/recipes/sqlite3/config.yml index 8482b7cd3dae3..379a6a6a50b9a 100644 --- a/recipes/sqlite3/config.yml +++ b/recipes/sqlite3/config.yml @@ -1,4 +1,6 @@ versions: + "3.46.1": + folder: all "3.46.0": folder: all "3.45.3": diff --git a/recipes/sqlite_orm/all/conandata.yml b/recipes/sqlite_orm/all/conandata.yml index b99589eb8062e..a5275f45fe034 100644 --- a/recipes/sqlite_orm/all/conandata.yml +++ b/recipes/sqlite_orm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.9": + url: "https://github.com/fnc12/sqlite_orm/archive/refs/tags/v1.9.tar.gz" + sha256: "a2fa433e24f6873a9e8cd9dd7e49d2d12640b458f3f6f941163cf60f6673b8a2" "1.8.2": url: "https://github.com/fnc12/sqlite_orm/archive/refs/tags/v1.8.2.tar.gz" sha256: "56e0c7729800637a8061658d0fdad4424d2cdde77b063d23cc1b76aa20339072" diff --git a/recipes/sqlite_orm/all/conanfile.py b/recipes/sqlite_orm/all/conanfile.py index 056b8b5414928..4c411ee943206 100644 --- a/recipes/sqlite_orm/all/conanfile.py +++ b/recipes/sqlite_orm/all/conanfile.py @@ -3,6 +3,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get from conan.tools.layout import basic_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.52.0" @@ -12,9 +13,9 @@ class SqliteOrmConan(ConanFile): name = "sqlite_orm" description = "SQLite ORM light header only library for modern C++." license = "BSD-3-Clause" - topics = ("sqlite", "sql", "database", "orm") - homepage = "https://github.com/fnc12/sqlite_orm" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/fnc12/sqlite_orm" + topics = ("sqlite", "sql", "database", "orm", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" @@ -25,7 +26,7 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): return { - "gcc": "5", + "gcc": "5" if Version(self.version) < "1.9" else "8", "Visual Studio": "14", "msvc": "190", "clang": "3.4", diff --git a/recipes/sqlite_orm/config.yml b/recipes/sqlite_orm/config.yml index ab20df18e03f0..62ef26b962237 100644 --- a/recipes/sqlite_orm/config.yml +++ b/recipes/sqlite_orm/config.yml @@ -1,4 +1,6 @@ versions: + "1.9": + folder: all "1.8.2": folder: all "1.8.1": diff --git a/recipes/sqlitecpp/all/conandata.yml b/recipes/sqlitecpp/all/conandata.yml index a10675f041108..d52b243030764 100644 --- a/recipes/sqlitecpp/all/conandata.yml +++ b/recipes/sqlitecpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.3.2": + url: "https://github.com/SRombauts/SQLiteCpp/archive/3.3.2.tar.gz" + sha256: "5aa8eda130d0689bd5ed9b2074714c2dbc610f710483c61ba6cf944cebfe03af" "3.3.1": url: "https://github.com/SRombauts/SQLiteCpp/archive/3.3.1.tar.gz" sha256: "71f990f9fb4b004533b6859ce40729af823b87fe691dd99ca084a7fd40db54b9" diff --git a/recipes/sqlitecpp/config.yml b/recipes/sqlitecpp/config.yml index b3381f7005ac8..98605ec73a785 100644 --- a/recipes/sqlitecpp/config.yml +++ b/recipes/sqlitecpp/config.yml @@ -1,4 +1,6 @@ versions: + "3.3.2": + folder: all "3.3.1": folder: all "3.3.0": diff --git a/recipes/status-code/all/conandata.yml b/recipes/status-code/all/conandata.yml index 49b0985bc39b6..70939803c28aa 100644 --- a/recipes/status-code/all/conandata.yml +++ b/recipes/status-code/all/conandata.yml @@ -2,3 +2,6 @@ sources: "cci.20220616": url: "https://github.com/ned14/status-code/archive/38e1e862386cb38d577664fd681ef829b0e03fba.tar.gz" sha256: "faf112df1633a1ee1f58c8b056130154b7c0dbf12e7f006a04dc376500d271c3" + "cci.20240614": + url: "https://github.com/ned14/status-code/archive/a6689afceb19ed127ec4a828dcf1597102e6c02d.tar.gz" + sha256: "f9725675f9d124d2223f9554f11a7f9dcb4893ea2b8a73bd3f7b182f23ba26ca" diff --git a/recipes/status-code/all/conanfile.py b/recipes/status-code/all/conanfile.py index ba9f0306e38c0..9e9d6e1e369a2 100644 --- a/recipes/status-code/all/conanfile.py +++ b/recipes/status-code/all/conanfile.py @@ -53,3 +53,7 @@ def package_info(self): # See https://github.com/ned14/status-code/blob/38e1e862386cb38d577664fd681ef829b0e03fba/CMakeLists.txt#L126 self.cpp_info.set_property("cmake_file_name", "status-code") self.cpp_info.set_property("cmake_target_name", "status-code::hl") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.components["hl"].names["cmake_find_package"] = "hl" + self.cpp_info.components["hl"].names["cmake_find_package_multi"] = "hl" diff --git a/recipes/status-code/all/test_package/test_package.cpp b/recipes/status-code/all/test_package/test_package.cpp index a2a617bc7f941..ac3726f0591c8 100644 --- a/recipes/status-code/all/test_package/test_package.cpp +++ b/recipes/status-code/all/test_package/test_package.cpp @@ -1,4 +1,8 @@ -#include +#if __has_include() +# include +#else +# include +#endif int main() { system_error2::system_code sc; diff --git a/recipes/status-code/all/test_v1_package/CMakeLists.txt b/recipes/status-code/all/test_v1_package/CMakeLists.txt index 378dd67690afd..54d2c07bb9d41 100644 --- a/recipes/status-code/all/test_v1_package/CMakeLists.txt +++ b/recipes/status-code/all/test_v1_package/CMakeLists.txt @@ -4,9 +4,5 @@ project(test_package LANGUAGES CXX) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -# Just a workaround to not supprt the deprecated generators while passing the 1.x hooks -find_package(status-code CONFIG REQUIRED) -add_library(status-code::hl ALIAS status-code::status-code) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/status-code/config.yml b/recipes/status-code/config.yml index 484ac289f9edf..9cd6d00352fb6 100644 --- a/recipes/status-code/config.yml +++ b/recipes/status-code/config.yml @@ -1,3 +1,5 @@ versions: "cci.20220616": folder: all + "cci.20240614": + folder: all diff --git a/recipes/stb/all/conandata.yml b/recipes/stb/all/conandata.yml index 475c92e1a56fd..1fad76276ca33 100644 --- a/recipes/stb/all/conandata.yml +++ b/recipes/stb/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240531": + url: "https://github.com/nothings/stb/archive/013ac3beddff3dbffafd5177e7972067cd2b5083.zip" + sha256: "b7f476902bbef1b30f8ecc2d9d95c459c32302c8b559d09b589b5955463b7af8" "cci.20240213": url: "https://github.com/nothings/stb/archive/ae721c50eaf761660b4f90cc590453cdb0c2acd0.zip" sha256: "5d075769721e676746d0c25b698a0f00741f68252f9ab4b7ee245c513aeec3de" @@ -8,12 +11,3 @@ sources: "cci.20220909": url: "https://github.com/nothings/stb/archive/8b5f1f37b5b75829fc72d38e7b5d4bcbf8a26d55.zip" sha256: "93a16ee3e866e719feec459f6f132cce932c5ec751eb38e3ec1975f911353d2e" - "cci.20210910": - url: "https://github.com/nothings/stb/archive/af1a5bc352164740c1cc1354942b1c6b72eacb8a.zip" - sha256: "e3d0edbecd356506d3d69b87419de2f9d180a98099134c6343177885f6c2cbef" - "cci.20210713": - url: "https://github.com/nothings/stb/archive/3a1174060a7dd4eb652d4e6854bc4cd98c159200.zip" - sha256: "9313f6871195b97771ce7da1feae0b3d92c7936456f13099edb54a78096ca93c" - "cci.20200203": - url: "https://github.com/nothings/stb/archive/0224a44a10564a214595797b4c88323f79a5f934.zip" - sha256: "5dd9cf8a9a8c0f253fad3e9904923b2dfc740eddbc86415c3f76152bd534f23a" diff --git a/recipes/stb/all/conanfile.py b/recipes/stb/all/conanfile.py index 7c777ca96ad4c..c1669e45a6c47 100644 --- a/recipes/stb/all/conanfile.py +++ b/recipes/stb/all/conanfile.py @@ -10,10 +10,10 @@ class StbConan(ConanFile): name = "stb" description = "single-file public domain libraries for C/C++" - topics = ("stb", "single-file") + license = ("Unlicense", "MIT") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/nothings/stb" - license = ("Unlicense", "MIT") + topics = ("stb", "single-file", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -51,9 +51,6 @@ def package_id(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*.h", src=self.source_folder, dst=os.path.join(self.package_folder, "include")) diff --git a/recipes/stb/config.yml b/recipes/stb/config.yml index 6df647ee3d6a7..ea0f41f79734d 100644 --- a/recipes/stb/config.yml +++ b/recipes/stb/config.yml @@ -1,13 +1,9 @@ versions: + "cci.20240531": + folder: all "cci.20240213": folder: all "cci.20230920": folder: all "cci.20220909": folder: all - "cci.20210910": - folder: all - "cci.20210713": - folder: all - "cci.20200203": - folder: all diff --git a/recipes/stringzilla/all/conandata.yml b/recipes/stringzilla/all/conandata.yml index 9a0f2b597bc71..c4ca6e70109b7 100644 --- a/recipes/stringzilla/all/conandata.yml +++ b/recipes/stringzilla/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "3.9.6": + url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v3.9.6.tar.gz" + sha256: "21577e967d79155f5bcbe9bfd885dd817a79666f384fb2a955c0ac5dbf0657a3" + "3.9.3": + url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v3.9.3.tar.gz" + sha256: "7d24a2fc0e426a85eac0a2be965f64e0eee794d89a895c2b5dcb614b038af580" + "3.9.0": + url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v3.9.0.tar.gz" + sha256: "26d282b7d5ba307de7fa80c41821526babf6c6cb8e808253af8bff7664275d5c" "3.8.4": url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v3.8.4.tar.gz" sha256: "4132957633d28ce2651e587f2ab736cdf174e61b8ab1bcef453b21d40a2d872e" diff --git a/recipes/stringzilla/config.yml b/recipes/stringzilla/config.yml index 1873ea240511d..c6b356c693aac 100644 --- a/recipes/stringzilla/config.yml +++ b/recipes/stringzilla/config.yml @@ -1,4 +1,10 @@ versions: + "3.9.6": + folder: all + "3.9.3": + folder: all + "3.9.0": + folder: all "3.8.4": folder: all "2.0.4": diff --git a/recipes/strong_type/all/conandata.yml b/recipes/strong_type/all/conandata.yml index 33e85e480c828..f9c56ef18c867 100644 --- a/recipes/strong_type/all/conandata.yml +++ b/recipes/strong_type/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "v15": + url: "https://github.com/rollbear/strong_type/archive/refs/tags/v15.tar.gz" + sha256: "d445398d4c4d6795060ac2b60be146b3cd7e6039985244b2d56f9bc333f20bae" "v14": url: "https://github.com/rollbear/strong_type/archive/refs/tags/v14.tar.gz" sha256: "6cc5a6f8de5b52e6c9e4c8b246b6052b5943d6de9b314660009e092af522d2fc" diff --git a/recipes/strong_type/config.yml b/recipes/strong_type/config.yml index 5469ad726c024..b91eac17af3a4 100644 --- a/recipes/strong_type/config.yml +++ b/recipes/strong_type/config.yml @@ -1,4 +1,6 @@ versions: + "v15": + folder: all "v14": folder: all "v13": diff --git a/recipes/swig/all/cmake/conan-official-swig-targets.cmake b/recipes/swig/all/cmake/conan-official-swig-targets.cmake deleted file mode 100644 index 8740b23580975..0000000000000 --- a/recipes/swig/all/cmake/conan-official-swig-targets.cmake +++ /dev/null @@ -1,7 +0,0 @@ -find_program(SWIG_EXECUTABLE swig) -if(NOT SWIG_DIR) - execute_process(COMMAND ${SWIG_EXECUTABLE} -swiglib - OUTPUT_VARIABLE SWIG_lib_output OUTPUT_STRIP_TRAILING_WHITESPACE) - set(SWIG_DIR ${SWIG_lib_output} CACHE STRING "Location of SWIG library" FORCE) -endif() -mark_as_advanced(SWIG_DIR SWIG_EXECUTABLE) diff --git a/recipes/swig/all/cmake/conan-swig-variables.cmake b/recipes/swig/all/cmake/conan-swig-variables.cmake new file mode 100644 index 0000000000000..3421127d0076f --- /dev/null +++ b/recipes/swig/all/cmake/conan-swig-variables.cmake @@ -0,0 +1,3 @@ +find_program(SWIG_EXECUTABLE swig) +# CMakeDeps sets SWIG_DIR to the generators folder, override it to the correct value +get_filename_component(SWIG_DIR "${SWIG_EXECUTABLE}/../swiglib" ABSOLUTE) diff --git a/recipes/swig/all/conandata.yml b/recipes/swig/all/conandata.yml index 7c4f531b134a3..dbb625e2ee27c 100644 --- a/recipes/swig/all/conandata.yml +++ b/recipes/swig/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "4.2.1": + url: "https://github.com/swig/swig/archive/refs/tags/v4.2.1.tar.gz" + sha256: "8895878b9215612e73611203dc8f5232c626e4d07ffc4532922f375518f067ca" + "4.1.1": + url: "https://github.com/swig/swig/archive/refs/tags/v4.1.1.tar.gz" + sha256: "4d97f9528dda8ced8b762e405dff2da38cc4603ef5f868f7287c94872f693265" "4.1.0": url: "https://github.com/swig/swig/archive/refs/tags/v4.1.0.tar.gz" sha256: "5b9313b1af5edfcea158a389520be266f013bc9be4ce933d79a30c5659ba99fe" @@ -9,18 +15,38 @@ sources: url: "https://github.com/swig/swig/archive/rel-4.0.1.tar.gz" sha256: "2eaf6fb89d071d1be280bf995c63360b3729860c0da64948123b5d7e4cfb6cb7" patches: + "4.2.1": + - patch_file: "patches/0001-4.2.1-swig-linux-library-path.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + - patch_file: "patches/0002-4.2.1-do-not-define-SWIG_LIB_WIN_UNIX.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + "4.1.1": + - patch_file: "patches/0001-4.1.0-swig-linux-library-path.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + - patch_file: "patches/0002-4.1.0-do-not-define-SWIG_LIB_WIN_UNIX.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" "4.1.0": - - base_path: "source_subfolder" - patch_file: "patches/0001-4.1.0-swig-linux-library-path.patch" - - base_path: "source_subfolder" - patch_file: "patches/0002-4.1.0-do-not-define-SWIG_LIB_WIN_UNIX.patch" + - patch_file: "patches/0001-4.1.0-swig-linux-library-path.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + - patch_file: "patches/0002-4.1.0-do-not-define-SWIG_LIB_WIN_UNIX.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" "4.0.2": - - base_path: "source_subfolder" - patch_file: "patches/0001-swig-linux-library-path.patch" - - base_path: "source_subfolder" - patch_file: "patches/0002-4.0.2-do-not-define-SWIG_LIB_WIN_UNIX.patch" + - patch_file: "patches/0001-swig-linux-library-path.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + - patch_file: "patches/0002-4.0.2-do-not-define-SWIG_LIB_WIN_UNIX.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" "4.0.1": - - base_path: "source_subfolder" - patch_file: "patches/0001-swig-linux-library-path.patch" - - base_path: "source_subfolder" - patch_file: "patches/0002-4.0.1-do-not-define-SWIG_LIB_WIN_UNIX.patch" + - patch_file: "patches/0001-swig-linux-library-path.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" + - patch_file: "patches/0002-4.0.1-do-not-define-SWIG_LIB_WIN_UNIX.patch" + patch_type: "portability" + patch_description: "swig -swiglib should return the correct path next to the binary even when relocated" diff --git a/recipes/swig/all/conanfile.py b/recipes/swig/all/conanfile.py index 432bfb37aeca5..fc0ddef14c147 100644 --- a/recipes/swig/all/conanfile.py +++ b/recipes/swig/all/conanfile.py @@ -1,170 +1,199 @@ -from conan import ConanFile -from conan.tools.files import get -from conans import AutoToolsBuildEnvironment, tools -import contextlib -import functools import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.apple import is_apple_os, to_apple_arch +from conan.tools.env import VirtualBuildEnv, Environment +from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, rmdir, replace_in_file +from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, unix_path +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class SwigConan(ConanFile): name = "swig" description = "SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages." + license = "GPL-3.0-or-later" url = "https://github.com/conan-io/conan-center-index" homepage = "http://www.swig.org" - license = "GPL-3.0-or-later" - topics = ("swig", "python", "java", "wrapper") - exports_sources = "patches/**", "cmake/*" - settings = "os", "arch", "compiler", "build_type" + topics = ("python", "java", "wrapper") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" @property def _settings_build(self): return getattr(self, "settings_build", self.settings) + def configure(self): + # SWIG prefers static linking + self.options["pcre"].shared = False + self.options["pcre2"].shared = False + self.options["libgettext"].shared = False + + def export_sources(self): + copy(self, "cmake/*", src=self.recipe_folder, dst=self.export_sources_folder) + export_conandata_patches(self) + + def layout(self): + basic_layout(self, src_folder="src") + @property def _use_pcre2(self): - return self.version not in ['4.0.1', '4.0.2'] - + return Version(self.version) >= "4.1" def requirements(self): if self._use_pcre2: - self.requires("pcre2/10.40") + self.requires("pcre2/10.43") else: self.requires("pcre/8.45") - - def build_requirements(self): - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") - if self.settings.compiler == "Visual Studio": - self.build_requires("winflexbison/2.5.24") - else: - self.build_requires("bison/3.8.2") - self.build_requires("automake/1.16.5") + if is_apple_os(self): + self.requires("libgettext/0.22") def package_id(self): del self.info.settings.compiler - def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - @property - def _user_info_build(self): - # If using the experimental feature with different context for host and - # build, the 'user_info' attributes of the 'build_requires' packages - # will be located into the 'user_info_build' object. In other cases they - # will be located into the 'deps_user_info' object. - return getattr(self, "user_info_build", self.deps_user_info) - - @contextlib.contextmanager - def _build_context(self): - env = {} - if self.settings.compiler != "Visual Studio": - env["YACC"] = self._user_info_build["bison"].YACC - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self): - env.update({ - "CC": "{} cl -nologo".format(tools.unix_path(self._user_info_build["automake"].compile)), - "CXX": "{} cl -nologo".format(tools.unix_path(self._user_info_build["automake"].compile)), - "AR": "{} link".format(self._user_info_build["automake"].ar_lib), - "LD": "link", - }) - with tools.environment_append(env): - yield + def build_requirements(self): + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if is_msvc(self): + self.tool_requires("cccl/1.3") + if Version(self.version) >= "4.2": + if is_msvc(self): + # bison 3.8.2 is not ready for msvc + self.tool_requires("bison/3.7.6") + else: + self.tool_requires("bison/3.8.2") else: - with tools.environment_append(env): - yield - - @functools.lru_cache(1) - def _configure_autotools(self): - autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - deps_libpaths = autotools.library_paths - deps_libs = autotools.libs - deps_defines = autotools.defines - if self.settings.os == "Windows" and self.settings.compiler != "Visual Studio": - autotools.link_flags.append("-static") - - libargs = list("-L\"{}\"".format(p) for p in deps_libpaths) + list("-l\"{}\"".format(l) for l in deps_libs) - args = [ - "{}_LIBS={}".format("PCRE2" if self._use_pcre2 else "PCRE", " ".join(libargs)), - "{}_CPPFLAGS={}".format("PCRE2" if self._use_pcre2 else "PCRE", " ".join("-D{}".format(define) for define in deps_defines)), - "--host={}".format(self.settings.arch), - "--with-swiglibdir={}".format(self._swiglibdir), - ] - if self.settings.os == "Linux": - args.append("LIBS=-ldl") - - host, build = None, None + if is_msvc(self): + self.tool_requires("winflexbison/2.5.25") + else: + self.tool_requires("bison/3.8.2") + self.tool_requires("automake/1.16.5") - if self.settings.compiler == "Visual Studio": - self.output.warn("Visual Studio compiler cannot create ccache-swig. Disabling ccache-swig.") - args.append("--disable-ccache") - autotools.flags.append("-FS") - # MSVC canonical names aren't understood - host, build = False, False - - if self.settings.os == "Macos" and self.settings.arch == "armv8": - # FIXME: Apple ARM should be handled by build helpers - autotools.flags.append("-arch arm64") - autotools.link_flags.append("-arch arm64") + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) - autotools.libs = [] - autotools.library_paths = [] + def generate(self): + build_env = VirtualBuildEnv(self) + build_env.generate() - if self.settings.os == "Windows" and self.settings.compiler != "Visual Studio": - autotools.libs.extend(["mingwex", "ssp"]) + tc = AutotoolsToolchain(self) + env = tc.environment() - autotools.configure(args=args, configure_dir=self._source_subfolder, - host=host, build=build) - return autotools + pcre = "pcre2" if self._use_pcre2 else "pcre" + tc.configure_args += [ + f"--host={self.settings.arch}", + "--with-swiglibdir=${prefix}/bin/swiglib", + f"--with-{pcre}-prefix={self.dependencies[pcre].package_folder}", + ] + tc.extra_cflags.append("-DHAVE_PCRE=1") + if self._use_pcre2: + env.define("PCRE2_LIBS", " ".join("-l" + lib for lib in self.dependencies["pcre2"].cpp_info.libs)) + + if self.settings.os in ["Linux", "FreeBSD"]: + tc.configure_args.append("LIBS=-ldl") + tc.extra_defines.append("HAVE_UNISTD_H=1") + elif self.settings.os == "Windows": + if is_msvc(self): + env.define("CC", "cccl -FS") + env.define("CXX", "cccl -FS") + tc.configure_args.append("--disable-ccache") + else: + tc.extra_ldflags.append("-static") + tc.configure_args.append("LIBS=-lmingwex -lssp") + elif is_apple_os(self): + tc.extra_cflags.append(f"-arch {to_apple_arch(self)}") + tc.extra_cxxflags.append(f"-arch {to_apple_arch(self)}") + tc.extra_ldflags.append(f"-arch {to_apple_arch(self)}") + tc.generate(env) + + if is_msvc(self): + # Custom AutotoolsDeps for cl-like compilers + # workaround for https://github.com/conan-io/conan/issues/12784 + includedirs = [] + defines = [] + libs = [] + libdirs = [] + linkflags = [] + cxxflags = [] + cflags = [] + for dependency in self.dependencies.values(): + deps_cpp_info = dependency.cpp_info.aggregated_components() + includedirs.extend(deps_cpp_info.includedirs) + defines.extend(deps_cpp_info.defines) + libs.extend(deps_cpp_info.libs + deps_cpp_info.system_libs) + libdirs.extend(deps_cpp_info.libdirs) + linkflags.extend(deps_cpp_info.sharedlinkflags + deps_cpp_info.exelinkflags) + cxxflags.extend(deps_cpp_info.cxxflags) + cflags.extend(deps_cpp_info.cflags) + + env = Environment() + env.append("CPPFLAGS", [f"-I{unix_path(self, p)}" for p in includedirs] + [f"-D{d}" for d in defines]) + env.append("_LINK_", [lib if lib.endswith(".lib") else f"{lib}.lib" for lib in libs]) + env.append("LDFLAGS", [f"-L{unix_path(self, p)}" for p in libdirs] + linkflags) + env.append("CXXFLAGS", cxxflags) + env.append("CFLAGS", cflags) + env.vars(self).save_script("conanautotoolsdeps_cl_workaround") + else: + deps = AutotoolsDeps(self) + deps.generate() def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) + apply_conandata_patches(self) + # Rely on AutotoolsDeps instead of pcre2-config + # https://github.com/swig/swig/blob/v4.1.1/configure.ac#L70-L92 + # https://github.com/swig/swig/blob/v4.0.2/configure.ac#L65-L86 + replace_in_file(self, os.path.join(self.source_folder, "configure.ac"), + 'AS_IF([test "x$with_pcre" != xno],', 'AS_IF([false],') def build(self): self._patch_sources() - with tools.chdir(os.path.join(self._source_subfolder)): - self.run("./autogen.sh", win_bash=tools.os_info.is_windows) - with self._build_context(): - autotools = self._configure_autotools() + with chdir(self, self.source_folder): + autotools = Autotools(self) + self.run("./autogen.sh") + autotools.configure() autotools.make() def package(self): - self.copy(pattern="LICENSE*", dst="licenses", src=self._source_subfolder) - self.copy(pattern="COPYRIGHT", dst="licenses", src=self._source_subfolder) - self.copy("*", src="cmake", dst=self._module_subfolder) - with self._build_context(): - autotools = self._configure_autotools() + copy(self, "LICENSE*", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "COPYRIGHT", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "*.cmake", + dst=os.path.join(self.package_folder, self._module_subfolder), + src=os.path.join(self.export_sources_folder, "cmake")) + with chdir(self, self.source_folder): + autotools = Autotools(self) autotools.install() - - @property - def _swiglibdir(self): - return os.path.join(self.package_folder, "bin", "swiglib").replace("\\", "/") + for path in self.package_path.iterdir(): + if path.is_dir() and path.name not in ["bin", "lib", "licenses"]: + rmdir(self, path) @property def _module_subfolder(self): return os.path.join("lib", "cmake") @property - def _module_file(self): - return "conan-official-{}-targets.cmake".format(self.name) + def _cmake_module_rel_path(self): + return os.path.join(self._module_subfolder, "conan-swig-variables.cmake") def package_info(self): - self.cpp_info.includedirs=[] + self.cpp_info.includedirs = [] + self.cpp_info.set_property("cmake_file_name", "SWIG") + self.cpp_info.set_property("cmake_target_name", "SWIG::SWIG") + self.cpp_info.set_property("cmake_build_modules", [self._cmake_module_rel_path]) + + self.buildenv_info.define_path("SWIG_LIB", os.path.join(self.package_folder, "bin", "swiglib")) + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.names["cmake_find_package"] = "SWIG" self.cpp_info.names["cmake_find_package_multi"] = "SWIG" - self.cpp_info.builddirs = [self._module_subfolder] - self.cpp_info.build_modules["cmake_find_package"] = \ - [os.path.join(self._module_subfolder, self._module_file)] - self.cpp_info.build_modules["cmake_find_package_multi"] = \ - [os.path.join(self._module_subfolder, self._module_file)] + self.cpp_info.build_modules["cmake_find_package"] = [self._cmake_module_rel_path] + self.cpp_info.build_modules["cmake_find_package_multi"] = [self._cmake_module_rel_path] bindir = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bindir)) self.env_info.PATH.append(bindir) + self.env_info.SWIG_LIB = os.path.join(self.package_folder, "bin", "swiglib") diff --git a/recipes/swig/all/patches/0001-4.2.1-swig-linux-library-path.patch b/recipes/swig/all/patches/0001-4.2.1-swig-linux-library-path.patch new file mode 100644 index 0000000000000..f3c40eb7eab79 --- /dev/null +++ b/recipes/swig/all/patches/0001-4.2.1-swig-linux-library-path.patch @@ -0,0 +1,51 @@ +--- Source/Modules/main.cxx ++++ Source/Modules/main.cxx +@@ -861,6 +861,32 @@ + + static void SWIG_exit_handler(int status); + ++#if defined(HAVE_UNISTD_H) && !defined(_WIN32) ++#include ++#include ++#include ++ ++static String *get_exe_path(void) { ++ Dl_info info; ++ if (dladdr("main", &info)) { ++ char realp_buffer[PATH_MAX]; ++ char* res = NULL; ++ ++ res = realpath(info.dli_fname, realp_buffer); ++ if (!res) { ++ return NewString(SWIG_LIB); ++ } ++ ++ const char* dir = dirname(realp_buffer); ++ char dest_buf[PATH_MAX]; ++ strcpy(dest_buf, dir); ++ strcat(dest_buf, "/swiglib"); ++ return NewStringWithSize(dest_buf, strlen(dest_buf)); ++ } ++ return NewString(SWIG_LIB); ++} ++#endif ++ + int SWIG_main(int argc, char *argv[], const TargetLanguageModule *tlm) { + char *c; + +@@ -900,12 +926,14 @@ + char *p; + if (!(GetModuleFileName(0, buf, MAX_PATH) == 0 || (p = strrchr(buf, '\\')) == 0)) { + *(p + 1) = '\0'; +- SwigLib = NewStringf("%sLib", buf); // Native windows installation path ++ SwigLib = NewStringf("%sswiglib", buf); // Native windows installation path + } else { + SwigLib = NewStringf(""); // Unexpected error + } + if (Len(SWIG_LIB_WIN_UNIX) > 0) + SwigLibWinUnix = NewString(SWIG_LIB_WIN_UNIX); // Unix installation path using a drive letter (for msys/mingw) ++#elif defined(HAVE_UNISTD_H) && !defined(_WIN32) ++ SwigLib = get_exe_path(); + #else + SwigLib = NewString(SWIG_LIB); + #endif diff --git a/recipes/swig/all/patches/0002-4.2.1-do-not-define-SWIG_LIB_WIN_UNIX.patch b/recipes/swig/all/patches/0002-4.2.1-do-not-define-SWIG_LIB_WIN_UNIX.patch new file mode 100644 index 0000000000000..a58da257a1aef --- /dev/null +++ b/recipes/swig/all/patches/0002-4.2.1-do-not-define-SWIG_LIB_WIN_UNIX.patch @@ -0,0 +1,11 @@ +--- configure.ac ++++ configure.ac +@@ -2803,7 +2803,7 @@ + *-*-cygwin*) SWIG_LIB_WIN_UNIX=`cygpath --mixed "$SWIG_LIB"`;; + *) SWIG_LIB_WIN_UNIX="";; + esac +-AC_DEFINE_UNQUOTED(SWIG_LIB_WIN_UNIX, ["$SWIG_LIB_WIN_UNIX"], [Directory for SWIG system-independent libraries (Unix install on native Windows)]) ++AC_DEFINE_UNQUOTED(SWIG_LIB_WIN_UNIX, [""], [Directory for SWIG system-independent libraries (Unix install on native Windows)]) + + SWIG_LIB_PREINST=$ABS_SRCDIR/Lib + AC_SUBST(SWIG_LIB_PREINST) diff --git a/recipes/swig/all/test_package/CMakeLists.txt b/recipes/swig/all/test_package/CMakeLists.txt index 3f3a1aa9d1821..767943c116cee 100644 --- a/recipes/swig/all/test_package/CMakeLists.txt +++ b/recipes/swig/all/test_package/CMakeLists.txt @@ -1,51 +1,20 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS NO_OUTPUT_DIRS) - -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}>) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}>) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}>) - -find_package(SWIG REQUIRED) +find_package(SWIG REQUIRED CONFIG) include(UseSWIG) -set(Python_ADDITIONAL_VERSIONS 3) -find_package(PythonInterp) -find_package(PythonLibs 3) - -enable_testing() - -if(PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND) - swig_add_library(${PROJECT_NAME} - LANGUAGE python - SOURCES - test.i - test_package.c - ) - - get_filename_component(PYTHON_LIBRARY_DIR "${PYTHON_LIBRARIES}" DIRECTORY) - - message(STATUS "PYTHON_INCLUDE_DIRS: ${PYTHON_INCLUDE_DIRS}") - message(STATUS "PYTHON_LIBRARIES: ${PYTHON_LIBRARIES}") - message(STATUS "PYTHON_LIBRARY_DIR: ${PYTHON_LIBRARY_DIR}") +find_package(Python REQUIRED COMPONENTS Interpreter Development) - #target_compile_definitions(_${PROJECT_NAME} PRIVATE MS_NO_COREDLL) - target_include_directories(_${PROJECT_NAME} PRIVATE ${PYTHON_INCLUDE_DIRS}) - target_link_directories(_${PROJECT_NAME} PRIVATE ${PYTHON_LIBRARY_DIR}) - target_link_libraries(_${PROJECT_NAME} PRIVATE ${PYTHON_LIBRARIES}) +swig_add_library(${PROJECT_NAME} + LANGUAGE python + SOURCES test.i test_package.c + OUTPUT_DIR ${CMAKE_BINARY_DIR} +) +target_link_libraries(${PROJECT_NAME} PRIVATE Python::Python) - add_test( - NAME gcd_test - COMMAND ${PYTHON_EXECUTABLE} -c "import PackageTest; assert PackageTest.gcd(12, 16) == 4" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - ) - add_test( - NAME foo_test - COMMAND ${PYTHON_EXECUTABLE} -c "import PackageTest; assert PackageTest.cvar.foo == 3.14159265359" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - ) -else() - message(STATUS "Not building swig python module") -endif() +# Note: this does not copy the generated *.py file +install(TARGETS ${PROJECT_NAME} + LIBRARY DESTINATION ${CMAKE_BINARY_DIR} + RUNTIME DESTINATION ${CMAKE_BINARY_DIR} +) diff --git a/recipes/swig/all/test_package/conanfile.py b/recipes/swig/all/test_package/conanfile.py index 5059612e70e16..f305f9b713d22 100644 --- a/recipes/swig/all/test_package/conanfile.py +++ b/recipes/swig/all/test_package/conanfile.py @@ -1,27 +1,73 @@ -from conans import CMake, ConanFile, tools +import importlib +import os +import sys +from pathlib import PurePath + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain, CMakeDeps +from conan.tools.env import VirtualRunEnv +from conan.tools.microsoft import is_msvc class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str, visible=False, run=True) + + def layout(self): + cmake_layout(self) @property def _can_build(self): # FIXME: Python does not distribute debug libraries (use cci CPython recipe) - return not (self.settings.compiler == "Visual Studio" and self.settings.build_type == "Debug") + if is_msvc(self) and self.settings.build_type == "Debug": + return False + # FIXME: apple-clang fails with 'ld: library not found for -lintl' in CI, despite working ok locally + if self.settings.compiler == "apple-clang": + return False + return True + + @property + def _python_interpreter(self): + if getattr(sys, "frozen", False): + return "python" + return sys.executable + + def generate(self): + venv = VirtualRunEnv(self) + venv.generate(scope="build") + venv.generate(scope="run") + tc = CMakeToolchain(self) + tc.variables["Python_EXECUTABLE"] = PurePath(self._python_interpreter).as_posix() + tc.generate() + deps = CMakeDeps(self) + deps.generate() def build(self): - if not tools.cross_building(self, skip_x64_x86=True): - self.run("swig -swiglib", run_environment=True) + if can_run(self): + self.run("swig -swiglib") if self._can_build: cmake = CMake(self) - cmake.verbose = True cmake.configure() cmake.build() + def _test_swig_module(self): + sys.path.append(self.build_folder) + sys.path.append(os.path.join(self.build_folder, str(self.settings.build_type))) + # Could also simply use 'import PackageTest' but this makes pylint angry + PackageTest = importlib.import_module("PackageTest") + assert PackageTest.gcd(12, 16) == 4 + self.output.info("PackageTest.gcd(12, 16) ran successfully") + assert PackageTest.cvar.foo == 3.14159265359 + self.output.info("PackageTest.cvar.foo == 3.14159265359 ran successfully") + sys.path.pop() + def test(self): - if not tools.cross_building(self): + if can_run(self): if self._can_build: - cmake = CMake(self) - cmake.test(output_on_failure=True) - self.run("swig -version", run_environment=True) + self._test_swig_module() + self.run("swig -version") + self.run("swig -swiglib") diff --git a/recipes/swig/all/test_v1_package/CMakeLists.txt b/recipes/swig/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..91630d79f4abb --- /dev/null +++ b/recipes/swig/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/swig/all/test_v1_package/conanfile.py b/recipes/swig/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..e7dbf9e47271c --- /dev/null +++ b/recipes/swig/all/test_v1_package/conanfile.py @@ -0,0 +1,53 @@ +import importlib +import sys +from pathlib import PurePath + +from conans import CMake, ConanFile, tools + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + @property + def _can_build(self): + # FIXME: Python does not distribute debug libraries (use cci CPython recipe) + if self.settings.compiler == "Visual Studio" and self.settings.build_type == "Debug": + return False + # FIXME: apple-clang fails with 'ld: library not found for -lintl' in CI, despite working ok locally + if self.settings.compiler == "apple-clang": + return False + return True + + @property + def _python_interpreter(self): + if getattr(sys, "frozen", False): + return "python" + return sys.executable + + def build(self): + if not tools.cross_building(self, skip_x64_x86=True): + self.run("swig -swiglib", run_environment=True) + if self._can_build: + cmake = CMake(self) + cmake.verbose = True + cmake.definitions["Python_EXECUTABLE"] = PurePath(self._python_interpreter).as_posix() + cmake.configure() + cmake.build() + cmake.install() + + def _test_swig_module(self): + sys.path.append(self.build_folder) + # Could also simply use 'import PackageTest' but this makes pylint angry + PackageTest = importlib.import_module("PackageTest") + assert PackageTest.gcd(12, 16) == 4 + self.output.info("PackageTest.gcd(12, 16) ran successfully") + assert PackageTest.cvar.foo == 3.14159265359 + self.output.info("PackageTest.cvar.foo == 3.14159265359 ran successfully") + sys.path.pop() + + def test(self): + if not tools.cross_building(self): + if self._can_build: + self._test_swig_module() + self.run("swig -version", run_environment=True) diff --git a/recipes/swig/config.yml b/recipes/swig/config.yml index 543f01b80f536..5a11eaadfdc07 100644 --- a/recipes/swig/config.yml +++ b/recipes/swig/config.yml @@ -1,4 +1,8 @@ versions: + "4.2.1": + folder: "all" + "4.1.1": + folder: "all" "4.1.0": folder: "all" "4.0.2": diff --git a/recipes/systemc/all/conanfile.py b/recipes/systemc/all/conanfile.py index 60fb8e631adf2..a6161b53eeb5f 100644 --- a/recipes/systemc/all/conanfile.py +++ b/recipes/systemc/all/conanfile.py @@ -1,10 +1,9 @@ -from conan import ConanFile, conan_version +from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.microsoft import is_msvc -from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -70,15 +69,6 @@ def validate(self): "Building SystemC as a shared library on Windows is currently not supported" ) - if ( - conan_version.major == 1 - and self.settings.compiler == "gcc" - and Version(self.settings.compiler.version) <= "5" - ): - raise ConanInvalidConfiguration( - f"GCC {self.settings.compiler.version} is not supported by SystemC on Conan v1" - ) - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/tensorflow-lite/all/conandata.yml b/recipes/tensorflow-lite/all/conandata.yml index c5076017657c5..ab25e5805cf91 100644 --- a/recipes/tensorflow-lite/all/conandata.yml +++ b/recipes/tensorflow-lite/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.15.0": + url: "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.15.0.tar.gz" + sha256: "9cec5acb0ecf2d47b16891f8bc5bc6fbfdffe1700bdadc0d9ebe27ea34f0c220" "2.12.0": url: "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.12.0.tar.gz" sha256: "c030cb1905bff1d2446615992aad8d8d85cbe90c4fb625cee458c63bf466bc8e" @@ -6,6 +9,17 @@ sources: url: "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.10.0.tar.gz" sha256: "b5a1bb04c84b6fe1538377e5a1f649bb5d5f0b2e3625a3c526ff3a8af88633e8" patches: + "2.15.0": + - patch_file: "patches/2.15.0-0001-disable-fetch-content.patch" + patch_description: "Fail if the CMake build script tries to fetch external dependencies" + patch_type: "conan" + - patch_file: "patches/2.15.0-0002-windows-mmap.patch" + patch_description: "Disable mmap on Windows." + patch_type: "bugfix" + patch_source: "https://github.com/tensorflow/tensorflow/pull/62636" + - patch_file: "patches/2.15.0-0003-use-cci-dependencies.patch" + patch_description: "Dependency compatibility: Patch CMakeLists.txt, updating package names, target names, etc" + patch_type: "conan" "2.12.0": - patch_file: "patches/2.12.0-0001-remove_simple_memory_arena_debug_dump.patch" patch_description: "Shared build fails on Windows with error LNK2005. Resolve the conflict by removing the conflicting implementation for now." @@ -16,6 +30,10 @@ patches: - patch_file: "patches/2.12.0-0003-use-cci-dependencies.patch" patch_description: "Dependency compatibility: Patch CMakeLists.txt, updating package names, target names, etc" patch_type: "conan" + - patch_file: "patches/2.12.0-0004-use-add-stdint-for-int-types.patch" + patch_description: "Add stdint.h for int types in internal::Spectrogram" + patch_type: "bugfix" + patch_source: "https://github.com/tensorflow/tensorflow/pull/60299" "2.10.0": - patch_file: "patches/2.10.0-0001-remove_simple_memory_arena_debug_dump.patch" patch_description: "Shared build fails on Windows with error LNK2005. Resolve the conflict by removing the conflicting implementation for now." @@ -25,3 +43,7 @@ patches: - patch_file: "patches/2.10.0-0003-use-cci-dependencies.patch" patch_description: "Dependency compatibility: Patch CMakeLists.txt, updating package names, target names, etc" patch_type: "conan" + - patch_file: "patches/2.10.0-0004-use-add-stdint-for-int-types.patch" + patch_description: "Add stdint.h for int types in internal::Spectrogram" + patch_type: "bugfix" + patch_source: "https://github.com/tensorflow/tensorflow/pull/60299" diff --git a/recipes/tensorflow-lite/all/conanfile.py b/recipes/tensorflow-lite/all/conanfile.py index 1fe43f9524e5d..dd383c7b99b3e 100644 --- a/recipes/tensorflow-lite/all/conanfile.py +++ b/recipes/tensorflow-lite/all/conanfile.py @@ -81,9 +81,12 @@ def requirements(self): self.requires("eigen/3.4.0") self.requires("farmhash/cci.20190513") self.requires("fft/cci.20061228") - self.requires("flatbuffers/23.3.3", transitive_headers=True) + if Version(self.version) < "2.15.0": + self.requires("flatbuffers/23.3.3", transitive_headers=True) + else: + self.requires("flatbuffers/23.5.26", transitive_headers=True) self.requires("gemmlowp/cci.20210928") - self.requires("ruy/cci.20220628") + self.requires("ruy/cci.20231129") if self.settings.arch in ("x86", "x86_64"): self.requires("intel-neon2sse/cci.20210225") if self.options.with_xnnpack: @@ -123,6 +126,7 @@ def generate(self): "TFLITE_ENABLE_XNNPACK": self.options.with_xnnpack, "TFLITE_ENABLE_MMAP": self.options.get_safe("with_mmap", False), "FETCHCONTENT_FULLY_DISCONNECTED": True, + "SYSTEM_PTHREADPOOL": True, "clog_POPULATED": True, }) if self.settings.arch == "armv8": @@ -158,9 +162,9 @@ def package(self): copy(self, "LICENSE", self.source_folder, join(self.package_folder, "licenses")) copy(self, "*.h", join(self.source_folder, "tensorflow", "lite"), join(self.package_folder, "include", "tensorflow", "lite")) copy(self, "version.h", join(self.source_folder, "tensorflow", "core", "public"), join(self.package_folder, "include", "tensorflow", "core", "public")) - copy(self, "*.a", self.build_folder, join(self.package_folder, "lib")) - copy(self, "*.so", self.build_folder, join(self.package_folder, "lib")) - copy(self, "*.dylib", self.build_folder, join(self.package_folder, "lib")) + copy(self, "*.a", self.build_folder, join(self.package_folder, "lib"), keep_path=False) + copy(self, "*.so", self.build_folder, join(self.package_folder, "lib"), keep_path=False) + copy(self, "*.dylib", self.build_folder, join(self.package_folder, "lib"), keep_path=False) copy(self, "*.lib", self.build_folder, join(self.package_folder, "lib"), keep_path=False) copy(self, "*.dll", self.build_folder, join(self.package_folder, "bin"), keep_path=False) self._create_cmake_module_alias_target(self, join(self.package_folder, self._module_file)) diff --git a/recipes/tensorflow-lite/all/patches/2.10.0-0004-use-add-stdint-for-int-types.patch b/recipes/tensorflow-lite/all/patches/2.10.0-0004-use-add-stdint-for-int-types.patch new file mode 100644 index 0000000000000..b57b09d18bd58 --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.10.0-0004-use-add-stdint-for-int-types.patch @@ -0,0 +1,12 @@ +diff --git a/tensorflow/lite/kernels/internal/spectrogram.cc b/tensorflow/lite/kernels/internal/spectrogram.cc +index a832962a..919eebeb 100644 +--- a/tensorflow/lite/kernels/internal/spectrogram.cc ++++ b/tensorflow/lite/kernels/internal/spectrogram.cc +@@ -17,6 +17,7 @@ limitations under the License. + + #include + #include ++#include + + #include "third_party/fft2d/fft.h" + diff --git a/recipes/tensorflow-lite/all/patches/2.12.0-0004-use-add-stdint-for-int-types.patch b/recipes/tensorflow-lite/all/patches/2.12.0-0004-use-add-stdint-for-int-types.patch new file mode 100644 index 0000000000000..b57b09d18bd58 --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.12.0-0004-use-add-stdint-for-int-types.patch @@ -0,0 +1,12 @@ +diff --git a/tensorflow/lite/kernels/internal/spectrogram.cc b/tensorflow/lite/kernels/internal/spectrogram.cc +index a832962a..919eebeb 100644 +--- a/tensorflow/lite/kernels/internal/spectrogram.cc ++++ b/tensorflow/lite/kernels/internal/spectrogram.cc +@@ -17,6 +17,7 @@ limitations under the License. + + #include + #include ++#include + + #include "third_party/fft2d/fft.h" + diff --git a/recipes/tensorflow-lite/all/patches/2.15.0-0001-disable-fetch-content.patch b/recipes/tensorflow-lite/all/patches/2.15.0-0001-disable-fetch-content.patch new file mode 100644 index 0000000000000..adc6f0561afef --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.15.0-0001-disable-fetch-content.patch @@ -0,0 +1,12 @@ +diff --git a/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake b/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake +index 9ed95109ba9..4ddf322b95f 100644 +--- a/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake ++++ b/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake +@@ -244,6 +244,7 @@ endfunction() + # All content names passed to this method are added to the global property + # OVERRIDABLE_FETCH_CONTENT_LIST. + function(OverridableFetchContent_Declare CONTENT_NAME) ++ message(FATAL_ERROR "OverridableFetchContent_Declare called by ${CONTENT_NAME}! Failing build.") + set(OVERRIDABLE_ARGS + GIT_REPOSITORY + GIT_TAG diff --git a/recipes/tensorflow-lite/all/patches/2.15.0-0002-windows-mmap.patch b/recipes/tensorflow-lite/all/patches/2.15.0-0002-windows-mmap.patch new file mode 100644 index 0000000000000..1305e34c37c6d --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.15.0-0002-windows-mmap.patch @@ -0,0 +1,20 @@ +commit 77056b1ab930c36c8066446615577be4d121e3ea +Author: talyz +Date: Thu Dec 14 11:43:16 2023 +0100 + + cmake: Disable the use of mmap on Windows + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index 83bc7629004..0958ed1b9ce 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -202,7 +202,8 @@ if(CMAKE_SYSTEM_NAME MATCHES "Windows") + # Use NOMINMAX to disable the min / max macros in windows.h as they break + # use of std::min std::max. + # Use NOGDI to ERROR macro which breaks TensorFlow logging. +- list(APPEND TFLITE_TARGET_PRIVATE_OPTIONS "-DNOMINMAX" "-DNOGDI") ++ # Disable mmap, which is not available on Windows. ++ list(APPEND TFLITE_TARGET_PRIVATE_OPTIONS "-DNOMINMAX" "-DNOGDI" "-DTFLITE_MMAP_DISABLED") + # lite/kernels/conv.cc has more than 64k sections so enable /bigobj to + # support compilation with MSVC2015. + if(MSVC) diff --git a/recipes/tensorflow-lite/all/patches/2.15.0-0003-use-cci-dependencies.patch b/recipes/tensorflow-lite/all/patches/2.15.0-0003-use-cci-dependencies.patch new file mode 100644 index 0000000000000..2c7c5965e2927 --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.15.0-0003-use-cci-dependencies.patch @@ -0,0 +1,68 @@ +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index 0958ed1b9ce..13d06f12ca6 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -147,7 +147,7 @@ set(TFLITE_TARGET_DEPENDENCIES "") + find_package(absl REQUIRED) + find_package(Eigen3 REQUIRED) + find_package(farmhash REQUIRED) +-find_package(fft2d REQUIRED) ++find_package(fft REQUIRED) + find_package(FlatBuffers REQUIRED) + find_package(gemmlowp REQUIRED) + if (NOT CMAKE_SYSTEM_PROCESSOR OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86") +@@ -155,7 +155,6 @@ if (NOT CMAKE_SYSTEM_PROCESSOR OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86") + list(APPEND TFLITE_TARGET_DEPENDENCIES NEON_2_SSE::NEON_2_SSE) + endif() + find_package(cpuinfo REQUIRED) #CPUINFO is used by XNNPACK and RUY library +-find_package(ml_dtypes REQUIRED) + find_package(ruy REQUIRED) + # Include TSL, which is in tensorflow/third_party + include_directories( +@@ -183,6 +182,11 @@ if(NOT SYSTEM_PTHREADPOOL AND NOT TARGET pthreadpool) + "${PTHREADPOOL_SOURCE_DIR}" + "${CMAKE_BINARY_DIR}/pthreadpool") + endif() ++if(TARGET flatbuffers::flatbuffers_shared) ++ set(FLATBUFFERS_TARGET flatbuffers::flatbuffers_shared) ++else() ++ set(FLATBUFFERS_TARGET flatbuffers::flatbuffers) ++endif() + set(TF_TARGET_PRIVATE_OPTIONS "") + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang$") + # TensorFlow uses a heap of deprecated proto fields so surpress these +@@ -483,13 +487,13 @@ else() + endif() + if(TFLITE_ENABLE_XNNPACK) + find_package(fp16_headers REQUIRED) +- find_package(XNNPACK REQUIRED) ++ find_package(xnnpack REQUIRED) + populate_tflite_source_vars("delegates/xnnpack" + TFLITE_DELEGATES_XNNPACK_SRCS + FILTER ".*(_test|_tester)\\.(cc|h)" + ) + list(APPEND TFLITE_TARGET_DEPENDENCIES +- XNNPACK ++ xnnpack::xnnpack + ) + list(APPEND TFLITE_TARGET_PUBLIC_OPTIONS "-DTFLITE_BUILD_WITH_XNNPACK_DELEGATE") + endif() +@@ -633,13 +637,12 @@ target_link_libraries(tensorflow-lite + absl::strings + absl::synchronization + absl::variant +- farmhash +- fft2d_fftsg2d +- flatbuffers::flatbuffers +- gemmlowp::gemmlowp +- ml_dtypes ++ farmhash::farmhash ++ fft::fft ++ ${FLATBUFFERS_TARGET} ++ gemmlowp::eight_bit_int_gemm + ruy::ruy +- pthreadpool ++ pthreadpool::pthreadpool + ${CMAKE_DL_LIBS} + ${TFLITE_TARGET_DEPENDENCIES} + ) diff --git a/recipes/tensorflow-lite/config.yml b/recipes/tensorflow-lite/config.yml index cabc9e91cd30c..7e71186249830 100644 --- a/recipes/tensorflow-lite/config.yml +++ b/recipes/tensorflow-lite/config.yml @@ -1,4 +1,6 @@ versions: + "2.15.0": + folder: all "2.12.0": folder: all "2.10.0": diff --git a/recipes/tgbot/all/conandata.yml b/recipes/tgbot/all/conandata.yml index 1279fcb4b2148..c1de261e9fcc7 100644 --- a/recipes/tgbot/all/conandata.yml +++ b/recipes/tgbot/all/conandata.yml @@ -1,4 +1,8 @@ sources: + "1.8": + url: "https://github.com/reo7sp/tgbot-cpp/archive/v1.8.tar.gz" + sha256: "43ff1a359b8db026e58e517703e616accaae33e01ebc7e87613632b7e4653467" + # This is the last version for C++11. "1.7.2": url: "https://github.com/reo7sp/tgbot-cpp/archive/v1.7.2.tar.gz" sha256: "3a41c25c5e4b60bda3f278550a380f1c7c382fd50ea1ab1801edc837d1535462" diff --git a/recipes/tgbot/all/conanfile.py b/recipes/tgbot/all/conanfile.py index 1fb99e68206f6..9d54fa2902dee 100644 --- a/recipes/tgbot/all/conanfile.py +++ b/recipes/tgbot/all/conanfile.py @@ -5,7 +5,8 @@ from conan.tools.apple import fix_apple_shared_install_name from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, replace_in_file +from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -29,6 +30,32 @@ class TgbotConan(ConanFile): "fPIC": True, } + @property + def _min_cppstd(self): + # tgbot requiroes C++17 since 1.7.3 + return "14" if Version(self.version) < "1.7.3" else "17" + + @property + def _compilers_minimum_version(self): + return { + "17": { + # tgbot/>= 1.7.3 require C++17 filesystem + "gcc": "9", + "clang": "9", + "apple-clang": "13", + "Visual Studio": "16", + "msvc": "192", + }, + "14": { + "gcc": "5", + "clang": "3", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + }.get(self._min_cppstd, {}) + + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -53,7 +80,13 @@ def _required_boost_components(self): def validate(self): if self.settings.compiler.cppstd: - check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) + 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." + ) + miss_boost_required_comp = any( self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) for boost_comp in self._required_boost_components @@ -70,6 +103,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["ENABLE_TESTS"] = False + if not self.settings.compiler.cppstd: + tc.cache_variables["CMAKE_CXX_STANDARD"] = self._min_cppstd tc.generate() tc = CMakeDeps(self) tc.generate() @@ -82,6 +117,11 @@ def _patch_sources(self): "set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)", "", ) + # Don't force CMAKE_CXX_STANDARD + replace_in_file(self, + os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_CXX_STANDARD", + "#") def build(self): self._patch_sources() @@ -96,7 +136,11 @@ def package(self): dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) fix_apple_shared_install_name(self) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): self.cpp_info.libs = ["TgBot"] self.cpp_info.defines = ["HAVE_CURL=1"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/tgbot/all/test_package/CMakeLists.txt b/recipes/tgbot/all/test_package/CMakeLists.txt index ebe398c29035c..766207d11a696 100644 --- a/recipes/tgbot/all/test_package/CMakeLists.txt +++ b/recipes/tgbot/all/test_package/CMakeLists.txt @@ -1,8 +1,12 @@ cmake_minimum_required(VERSION 3.15) -project(test_package CXX) +project(test_package LANGUAGES CXX) find_package(tgbot REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) -target_link_libraries(${PROJECT_NAME} tgbot::tgbot) +target_link_libraries(${PROJECT_NAME} PRIVATE tgbot::tgbot) +if(tvbot_VERSION VERSION_LESS "1.7.3") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +endif() diff --git a/recipes/tgbot/config.yml b/recipes/tgbot/config.yml index 02741b3fbce3e..e9249e18493da 100644 --- a/recipes/tgbot/config.yml +++ b/recipes/tgbot/config.yml @@ -1,4 +1,6 @@ versions: + "1.8": + folder: all "1.7.2": folder: all "1.5": diff --git a/recipes/thorvg/all/conandata.yml b/recipes/thorvg/all/conandata.yml index fb71a96afc631..54a4d7a98be69 100644 --- a/recipes/thorvg/all/conandata.yml +++ b/recipes/thorvg/all/conandata.yml @@ -1,22 +1,25 @@ sources: + "0.14.6": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.6.tar.gz" + sha256: "13d7778968ce10f4f7dd1ea1f66861d4ee8ff22f669566992b4ac00e050496cf" + "0.14.5": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.5.tar.gz" + sha256: "a007c548e39b0fad5d66ce9cf71244d3d219d9188fd80ccc049a5fa1b7f7aac2" + "0.14.4": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.4.tar.gz" + sha256: "0adabdb61395d9ad126c49ac80aa9c971ad7a37268a77a9712790a556df32838" + "0.14.2": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.2.tar.gz" + sha256: "04202e8f5e17b427c3b16ae3b3d4be5d3f3cdac96d5c64ed3efd7b6db3ad731f" + "0.14.1": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.1.tar.gz" + sha256: "9c0346fda8b62a3b13a764dda5784e0465c8cab54fb5342d0240c7fb40e415bd" + "0.14.0": + url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.14.0.tar.gz" + sha256: "6f186b53be3a0bd971dabde7a58022f43303467794e89e3641c774f38cdc2664" "0.13.8": url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.13.8.tar.gz" sha256: "ce49929a94d1686d4f1436da6ef5fa7a8439901c22b5fa0879d7d5879b8ba2bd" "0.13.7": url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.13.7.tar.gz" sha256: "972c84e5670a7138eec24062d4ccc243d161158ecd9c53788300a8ca6aaf3426" - "0.13.6": - url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.13.6.tar.gz" - sha256: "f24fd3647e1a309dec00f6455b32258c0dd0e0dbd1133233169467571f188bad" - "0.13.5": - url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.13.5.tar.gz" - sha256: "977ed74c3846c9a6acd5765aff776745d40e3c91507b22e51177d59c69afd198" - "0.13.4": - url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.13.4.tar.gz" - sha256: "2521adf99fb04ae543f5c14bb5fafd5ba7df0ea2e2a9e61351105c27059fc9e6" - "0.13.2": - url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.13.2.tar.gz" - sha256: "03b5dbb4c73ff221a4bd7243cc0ad377aecff4c3077f5a57ee2902e4122d3218" - "0.13.0": - url: "https://github.com/thorvg/thorvg/archive/refs/tags/v0.13.0.tar.gz" - sha256: "4245c401fa637452c8526c0c4448d8c7915f09a6a2e1fa85d6e9032ee610b454" diff --git a/recipes/thorvg/all/conanfile.py b/recipes/thorvg/all/conanfile.py index 41c5d63ea4a2d..922751fa36250 100644 --- a/recipes/thorvg/all/conanfile.py +++ b/recipes/thorvg/all/conanfile.py @@ -27,7 +27,7 @@ class ThorvgConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], - "with_engines": ['sw', 'gl_beta', 'wg_beta'], + "with_engines": ['sw', 'gl_beta', 'wg_beta', "gl"], "with_loaders": [False, 'tvg', 'svg', 'png', 'jpg', 'lottie', 'ttf', 'webp', 'all'], "with_savers": [False, 'tvg', 'gif', 'all'], "with_bindings": [False, 'capi', 'wasm_beta'], @@ -113,6 +113,11 @@ def validate(self): f"{self.ref} doesn't support debug build on MSVC." ) + if Version(self.version) < "0.14.0" and self.options.with_engines in ["gl"]: + raise ConanInvalidConfiguration(f"{self.ref} doesn't support with_engines=gl, use with_engines=gl_beta instead") + if Version(self.version) >= "0.14.0" and self.options.with_engines in ["gl_beta"]: + raise ConanInvalidConfiguration(f"{self.ref} doesn't support with_engines=gl_beta, use with_engines=gl instead") + def requirements(self): loaders_opt = str(self.options.with_loaders) if loaders_opt in ("all", "jpg"): @@ -121,6 +126,9 @@ def requirements(self): self.requires("libpng/1.6.43") if loaders_opt in ("all", "webp"): self.requires("libwebp/1.4.0") + if self.settings.os == "Linux": + if self.options.with_engines in ["gl", "gl_beta"]: + self.requires("opengl/system") def build_requirements(self): self.tool_requires("meson/1.4.0") diff --git a/recipes/thorvg/config.yml b/recipes/thorvg/config.yml index f1459ae7bee4f..d575fd184ff22 100644 --- a/recipes/thorvg/config.yml +++ b/recipes/thorvg/config.yml @@ -1,15 +1,17 @@ versions: - "0.13.8": + "0.14.6": folder: all - "0.13.7": + "0.14.5": folder: all - "0.13.6": + "0.14.4": folder: all - "0.13.5": + "0.14.2": folder: all - "0.13.4": + "0.14.1": folder: all - "0.13.2": + "0.14.0": folder: all - "0.13.0": + "0.13.8": + folder: all + "0.13.7": folder: all diff --git a/recipes/thrift/all/conanfile.py b/recipes/thrift/all/conanfile.py index 4239d05bfd5e2..97debbded3cd9 100644 --- a/recipes/thrift/all/conanfile.py +++ b/recipes/thrift/all/conanfile.py @@ -175,7 +175,6 @@ def package_info(self): self.cpp_info.components["libthrift"].set_property("pkg_config_name", "thrift") self.cpp_info.components["libthrift"].libs = [f"thrift{libsuffix}"] if self.settings.os == "Windows": - self.cpp_info.components["libthrift"].defines.append("NOMINMAX") if Version(self.version) >= "0.15.0": self.cpp_info.components["libthrift"].system_libs.append("shlwapi") elif self.settings.os in ["Linux", "FreeBSD"]: diff --git a/recipes/tinygltf/all/conandata.yml b/recipes/tinygltf/all/conandata.yml index fb20b704f6ed3..105809b76f50e 100644 --- a/recipes/tinygltf/all/conandata.yml +++ b/recipes/tinygltf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.9.0": + url: "https://github.com/syoyo/tinygltf/archive/v2.9.0.tar.gz" + sha256: "76c4da3fcd664ccf1b3d35f1d934dd19820141c8705c4966d841176c4c10a2e9" "2.8.19": url: "https://github.com/syoyo/tinygltf/archive/v2.8.19.tar.gz" sha256: "9e3f6206c6e922c7482e1b4612b62c5cddb7e053b6690fa20edfa5d97805053b" diff --git a/recipes/tinygltf/config.yml b/recipes/tinygltf/config.yml index 0589bcf5301f7..3eba51a5b7276 100644 --- a/recipes/tinygltf/config.yml +++ b/recipes/tinygltf/config.yml @@ -1,4 +1,6 @@ versions: + "2.9.0": + folder: all "2.8.19": folder: all "2.8.13": diff --git a/recipes/toml11/all/conandata.yml b/recipes/toml11/all/conandata.yml index f0280c626a44d..20b0be495cd07 100644 --- a/recipes/toml11/all/conandata.yml +++ b/recipes/toml11/all/conandata.yml @@ -1,31 +1,16 @@ sources: + "4.2.0": + url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v4.2.0.tar.gz" + sha256: "9287971cd4a1a3992ef37e7b95a3972d1ae56410e7f8e3f300727ab1d6c79c2c" + "4.1.0": + url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v4.1.0.tar.gz" + sha256: "fb4c02cc708ae28e6fc3496514e3625e4b6738ed4ce40897710ca4d7a29de4f7" + "4.0.3": + url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v4.0.3.tar.gz" + sha256: "c8cbc7839cb3f235153045ce550e559f55a04554dfcab8743ba8a1e8ef6a54bf" "4.0.1": url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v4.0.1.tar.gz" sha256: "96965cb00ca7757c611c169cd5a6fb15736eab1cd1c1a88aaa62ad9851d926aa" "3.8.1": url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.8.1.tar.gz" sha256: "6a3d20080ecca5ea42102c078d3415bef80920f6c4ea2258e87572876af77849" - "3.8.0": - url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.8.0.tar.gz" - sha256: "36ce64b09f9151b57ba1970f12a591006fcae17b751ba011314c1f5518e77bc7" - "3.7.1": - url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.7.1.tar.gz" - sha256: "afeaa9aa0416d4b6b2cd3897ca55d9317084103077b32a852247d8efd4cf6068" - "3.7.0": - url: "https://github.com/ToruNiina/toml11/archive/v3.7.0.tar.gz" - sha256: "a0b6bec77c0e418eea7d270a4437510884f2fe8f61e7ab121729624f04c4b58e" - "3.6.1": - url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.6.1.tar.gz" - sha256: "ca4c390ed8da0d77ae6eca30e70ab0bf5cc92adfc1bc2f71a2066bc5656d8d96" - "3.6.0": - url: "https://github.com/ToruNiina/toml11/archive/v3.6.0.tar.gz" - sha256: "39e8d651db346ae8c7e3b39d6338a37232b9af3bba36ade45b241bf105c2226c" - "3.5.0": - url: "https://github.com/ToruNiina/toml11/archive/v3.5.0.tar.gz" - sha256: "fc613874c6e80dc740134a7353cf23c7f834b59cd601af84ab535ee16a53b1c3" - "3.4.0": - url: "https://github.com/ToruNiina/toml11/archive/v3.4.0.tar.gz" - sha256: "bc6d733efd9216af8c119d8ac64a805578c79cc82b813e4d1d880ca128bd154d" - "3.1.0": - url: "https://github.com/ToruNiina/toml11/archive/v3.1.0.tar.gz" - sha256: "3a118f32e5343998f37be9807c72fd11c3168fe12a5b1abfdc0f1e60de6380a4" diff --git a/recipes/toml11/all/conanfile.py b/recipes/toml11/all/conanfile.py index 6ba04d6746f11..a610df26ea139 100644 --- a/recipes/toml11/all/conanfile.py +++ b/recipes/toml11/all/conanfile.py @@ -42,8 +42,10 @@ def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.set_property("cmake_file_name", "toml11") self.cpp_info.set_property("cmake_target_name", "toml11::toml11") - self.cpp_info.bindirs = [] + self.cpp_info.includedirs.append(os.path.join("include", "toml11")) - self.cpp_info.libdirs = [] diff --git a/recipes/toml11/config.yml b/recipes/toml11/config.yml index 08179ee564b31..43dd6c9456dcb 100644 --- a/recipes/toml11/config.yml +++ b/recipes/toml11/config.yml @@ -1,21 +1,11 @@ versions: - "4.0.1": - folder: all - "3.8.1": - folder: all - "3.8.0": - folder: all - "3.7.1": + "4.2.0": folder: all - "3.7.0": + "4.1.0": folder: all - "3.6.1": + "4.0.3": folder: all - "3.6.0": - folder: all - "3.5.0": - folder: all - "3.4.0": + "4.0.1": folder: all - "3.1.0": + "3.8.1": folder: all diff --git a/recipes/tracy/all/conandata.yml b/recipes/tracy/all/conandata.yml index de70002df8416..d32d6dc01cb9f 100644 --- a/recipes/tracy/all/conandata.yml +++ b/recipes/tracy/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.11.0": + url: "https://github.com/wolfpld/tracy/archive/refs/tags/v0.11.0.tar.gz" + sha256: "b591ef2820c5575ccbf17e2e7a1dc1f6b9a2708f65bfd00f4ebefad2a1ccf830" "0.10": url: "https://github.com/wolfpld/tracy/archive/refs/tags/v0.10.tar.gz" sha256: "a76017d928f3f2727540fb950edd3b736caa97b12dbb4e5edce66542cbea6600" diff --git a/recipes/tracy/all/conanfile.py b/recipes/tracy/all/conanfile.py index a056814ff0165..dd2a2bdace141 100644 --- a/recipes/tracy/all/conanfile.py +++ b/recipes/tracy/all/conanfile.py @@ -3,6 +3,7 @@ from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, rmdir from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.53.0" @@ -11,10 +12,11 @@ class TracyConan(ConanFile): name = "tracy" description = "C++ frame profiler" - topics = ("profiler", "performance", "gamedev") - homepage = "https://github.com/wolfpld/tracy" - url = "https://github.com/conan-io/conan-center-index" license = ["BSD-3-Clause"] + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/wolfpld/tracy" + topics = ("profiler", "performance", "gamedev") + package_type = "library" settings = "os", "arch", "compiler", "build_type" # Existing CMake tracy options with default value @@ -40,6 +42,9 @@ class TracyConan(ConanFile): "fibers": ([True, False], False), "no_crash_handler": ([True, False], False), "timer_fallback": ([True, False], False), + "libunwind_backtrace": ([True, False], False), + "symbol_offline_resolve": ([True, False], False), + "libbacktrace_elf_dynload_support": ([True, False], False), } options = { "shared": [True, False], @@ -67,6 +72,15 @@ def config_options(self): del self._tracy_options["no_crash_handler"] del self._tracy_options["timer_fallback"] + if Version(self.version) < "0.11.0": + self.options.rm_safe("libunwind_backtrace") + self.options.rm_safe("symbol_offline_resolve") + self.options.rm_safe("libbacktrace_elf_dynload_support") + + del self._tracy_options["libunwind_backtrace"] + del self._tracy_options["symbol_offline_resolve"] + del self._tracy_options["libbacktrace_elf_dynload_support"] + def configure(self): if self.options.shared: self.options.rm_safe("fPIC") @@ -78,6 +92,10 @@ def validate(self): if self.info.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) + # libunwind_backtrace is not supported in 0.11.0. https://github.com/wolfpld/tracy/pull/841 + if Version(self.version) == "0.11.0" and self.options.get_safe("libunwind_backtrace"): + raise ConanInvalidConfiguration(f"libunwind_backtrace is not supported in {self.ref}") + def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) @@ -113,10 +131,17 @@ def package_info(self): self.cpp_info.components["tracyclient"].defines.append( "TRACY_IMPORTS") if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["tracyclient"].system_libs.append( - "pthread") + self.cpp_info.components["tracyclient"].system_libs.extend([ + "pthread", + "m" + ]) if self.settings.os == "Linux": self.cpp_info.components["tracyclient"].system_libs.append("dl") + if self.settings.os == "Windows": + self.cpp_info.components["tracyclient"].system_libs.extend([ + "dbghelp", + "ws2_32" + ]) # Tracy CMake adds options set to ON as public for opt in self._tracy_options.keys(): diff --git a/recipes/tracy/config.yml b/recipes/tracy/config.yml index 7f42fe99a398a..45ba8e874f0e1 100644 --- a/recipes/tracy/config.yml +++ b/recipes/tracy/config.yml @@ -1,4 +1,6 @@ versions: + "0.11.0": + folder: all "0.10": folder: all "0.9.1": diff --git a/recipes/trantor/all/conandata.yml b/recipes/trantor/all/conandata.yml index 62488c1cd1518..5a4f49b13641d 100644 --- a/recipes/trantor/all/conandata.yml +++ b/recipes/trantor/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.5.21": + url: "https://github.com/an-tao/trantor/archive/v1.5.21.tar.gz" + sha256: "c267e8d3657a85751554a6877efd1199f6766a9fd6418d2c72839ad0a8943988" + "1.5.20": + url: "https://github.com/an-tao/trantor/archive/v1.5.20.tar.gz" + sha256: "4d3b98c228aafde1001cff581cf8d1a4a9f71f7b2a85a28978b560aefc21c038" "1.5.19": url: "https://github.com/an-tao/trantor/archive/v1.5.19.tar.gz" sha256: "a2f55a98fd4b0737ba0e2cd77d2f237253e607b2047071be04a9ea76587bb608" @@ -14,22 +20,15 @@ sources: "1.5.13": url: "https://github.com/an-tao/trantor/archive/v1.5.13.tar.gz" sha256: "36f02302bff3ffa8d2b1bff29f451d7a11d215a43963fb95aa543b555de2f9bf" - "1.5.12": - url: "https://github.com/an-tao/trantor/archive/v1.5.12.tar.gz" - sha256: "3389a2ace83fdc0df7e3e7f9cd9fa9b774f8054889a13a73777c71e2d8e2f364" - "1.5.11": - url: "https://github.com/an-tao/trantor/archive/v1.5.11.tar.gz" - sha256: "3cff9653380f65acaa6ffa191620a2783e866a4552c3408a6919759ce4cfc1dc" - "1.5.10": - url: "https://github.com/an-tao/trantor/archive/v1.5.10.tar.gz" - sha256: "2d47775b3091a1a103bea46f5da017dc03c39883f8d717cf6ba24bdcdf01a15d" - "1.5.8": - url: "https://github.com/an-tao/trantor/archive/v1.5.8.tar.gz" - sha256: "705ec0176681be5c99fcc7af37416ece9d65ff4d907bca764cb11471b104fbf8" - "1.5.7": - url: "https://github.com/an-tao/trantor/archive/v1.5.7.tar.gz" - sha256: "42576563afbf1e58c7d68f758cf3fca4d193496d4e3f82c80069d8389a7839d5" patches: + "1.5.21": + - patch_file: "patches/1.5.19-0001-disable-werror.patch" + patch_description: "disable -Werror for gcc5" + patch_type: "portability" + "1.5.20": + - patch_file: "patches/1.5.19-0001-disable-werror.patch" + patch_description: "disable -Werror for gcc5" + patch_type: "portability" "1.5.19": - patch_file: "patches/1.5.19-0001-disable-werror.patch" patch_description: "disable -Werror for gcc5" @@ -50,27 +49,3 @@ patches: - patch_file: "patches/1.5.12-0001-disable-werror.patch" patch_description: "disable -Werror for gcc5" patch_type: "portability" - "1.5.12": - - patch_file: "patches/1.5.12-0001-disable-werror.patch" - patch_description: "disable -Werror for gcc5" - patch_type: "portability" - "1.5.11": - - patch_file: "patches/1.5.6-0001-include-cstdint.patch" - patch_description: "include cstdint for uint8_t, intmax_t" - patch_type: "portability" - patch_source: "https://github.com/an-tao/trantor/commit/e8e3887435dcfb310263c588743be1b3746193be" - "1.5.10": - - patch_file: "patches/1.5.6-0001-include-cstdint.patch" - patch_description: "include cstdint for uint8_t, intmax_t" - patch_type: "portability" - patch_source: "https://github.com/an-tao/trantor/commit/e8e3887435dcfb310263c588743be1b3746193be" - "1.5.8": - - patch_file: "patches/1.5.6-0001-include-cstdint.patch" - patch_description: "include cstdint for uint8_t, intmax_t" - patch_type: "portability" - patch_source: "https://github.com/an-tao/trantor/commit/e8e3887435dcfb310263c588743be1b3746193be" - "1.5.7": - - patch_file: "patches/1.5.6-0001-include-cstdint.patch" - patch_description: "include cstdint for uint8_t, intmax_t" - patch_type: "portability" - patch_source: "https://github.com/an-tao/trantor/commit/e8e3887435dcfb310263c588743be1b3746193be" diff --git a/recipes/trantor/all/conanfile.py b/recipes/trantor/all/conanfile.py index 7b8288e622c8a..0f9e11378b1a8 100644 --- a/recipes/trantor/all/conanfile.py +++ b/recipes/trantor/all/conanfile.py @@ -93,8 +93,7 @@ def source(self): def generate(self): tc = CMakeToolchain(self) # TODO: support other tls providers - if Version(self.version) >= "1.5.12": - tc.variables["TRANTOR_USE_TLS"] = "openssl" + tc.variables["TRANTOR_USE_TLS"] = "openssl" tc.variables["BUILD_C-ARES"] = self.options.with_c_ares tc.variables["USE_SPDLOG"] = self.options.get_safe("with_spdlog") tc.generate() diff --git a/recipes/trantor/all/patches/1.5.6-0001-include-cstdint.patch b/recipes/trantor/all/patches/1.5.6-0001-include-cstdint.patch deleted file mode 100644 index f910402545ffa..0000000000000 --- a/recipes/trantor/all/patches/1.5.6-0001-include-cstdint.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/trantor/utils/MsgBuffer.h b/trantor/utils/MsgBuffer.h -index 29817f6..f1d677e 100644 ---- a/trantor/utils/MsgBuffer.h -+++ b/trantor/utils/MsgBuffer.h -@@ -18,6 +18,7 @@ - #include - #include - #include -+#include - #include - #include - #include -diff --git a/trantor/utils/Utilities.cc b/trantor/utils/Utilities.cc -index 978dac8..0611e20 100644 ---- a/trantor/utils/Utilities.cc -+++ b/trantor/utils/Utilities.cc -@@ -25,6 +25,7 @@ - #include - #endif // __cplusplus - #endif // _WIN32 -+#include - - namespace trantor - { diff --git a/recipes/trantor/config.yml b/recipes/trantor/config.yml index a5621cf2bc6f8..ab1925b20e516 100644 --- a/recipes/trantor/config.yml +++ b/recipes/trantor/config.yml @@ -1,4 +1,8 @@ versions: + "1.5.21": + folder: "all" + "1.5.20": + folder: "all" "1.5.19": folder: "all" "1.5.16": @@ -9,13 +13,3 @@ versions: folder: "all" "1.5.13": folder: "all" - "1.5.12": - folder: "all" - "1.5.11": - folder: "all" - "1.5.10": - folder: "all" - "1.5.8": - folder: "all" - "1.5.7": - folder: "all" diff --git a/recipes/tree-gen/all/conandata.yml b/recipes/tree-gen/all/conandata.yml index 71aa893da1723..2ecf4e1d6e143 100644 --- a/recipes/tree-gen/all/conandata.yml +++ b/recipes/tree-gen/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.8": + url: "https://github.com/QuTech-Delft/tree-gen/archive/refs/tags/1.0.8.tar.gz" + sha256: "a840f1da2fa377d2d791885d83b95dc15f081b308208d3497c395721488a4130" "1.0.7": url: "https://github.com/QuTech-Delft/tree-gen/archive/refs/tags/1.0.7.tar.gz" sha256: "bd27c88d789efe1d187846d3b819fbaa1ba3a520d6d4181d1216c4a2e73e4e85" diff --git a/recipes/tree-gen/all/conanfile.py b/recipes/tree-gen/all/conanfile.py index e2afb05918b37..7c2572f700bf5 100644 --- a/recipes/tree-gen/all/conanfile.py +++ b/recipes/tree-gen/all/conanfile.py @@ -60,7 +60,7 @@ def layout(self): def build_requirements(self): if self._should_build_test: - self.test_requires("gtest/1.14.0") + self.test_requires("gtest/1.15.0") self.tool_requires("m4/1.4.19") if self.settings.os == "Windows": self.tool_requires("winflexbison/2.5.24") @@ -76,7 +76,10 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") def requirements(self): - self.requires("fmt/10.2.1", transitive_headers=True) + if Version(self.version) < "1.0.8": + self.requires("fmt/10.2.1", transitive_headers=True) + else: + self.requires("fmt/11.0.2", transitive_headers=True) self.requires("range-v3/0.12.0", transitive_headers=True) def source(self): diff --git a/recipes/tree-gen/config.yml b/recipes/tree-gen/config.yml index 4028d61266d40..89fc823a7d6b8 100644 --- a/recipes/tree-gen/config.yml +++ b/recipes/tree-gen/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.8": + folder: all "1.0.7": folder: all "1.0.6": diff --git a/recipes/tree-sitter/all/conandata.yml b/recipes/tree-sitter/all/conandata.yml index 3ddeeffd1d3bc..fcc659c5b1ecb 100644 --- a/recipes/tree-sitter/all/conandata.yml +++ b/recipes/tree-sitter/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.23.0": + url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.23.0.tar.gz" + sha256: "6403b361b0014999e96f61b9c84d6950d42f0c7d6e806be79382e0232e48a11b" "0.22.6": url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.22.6.tar.gz" sha256: "e2b687f74358ab6404730b7fb1a1ced7ddb3780202d37595ecd7b20a8f41861f" diff --git a/recipes/tree-sitter/all/conanfile.py b/recipes/tree-sitter/all/conanfile.py index a0c425765146a..a3ccebe4f64da 100644 --- a/recipes/tree-sitter/all/conanfile.py +++ b/recipes/tree-sitter/all/conanfile.py @@ -10,10 +10,10 @@ class TreeSitterConan(ConanFile): name = "tree-sitter" description = "Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited." - topics = ("parser", "incremental", "rust") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://tree-sitter.github.io/tree-sitter" - license = "MIT" + topics = ("parser", "incremental", "rust") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/tree-sitter/config.yml b/recipes/tree-sitter/config.yml index 7357ec5c57b73..27314a988e804 100644 --- a/recipes/tree-sitter/config.yml +++ b/recipes/tree-sitter/config.yml @@ -1,4 +1,6 @@ versions: + "0.23.0": + folder: all "0.22.6": folder: all "0.22.5": diff --git a/recipes/trompeloeil/all/conandata.yml b/recipes/trompeloeil/all/conandata.yml index ba2243425c538..5d3ef4f707e9a 100644 --- a/recipes/trompeloeil/all/conandata.yml +++ b/recipes/trompeloeil/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "48": + url: "https://github.com/rollbear/trompeloeil/archive/v48.tar.gz" + sha256: "eebd18456975251ea3450b815e241cccfefba5b883e4a36bd309f9cf629bdec6" "47": url: "https://github.com/rollbear/trompeloeil/archive/v47.tar.gz" sha256: "4a1d79260c1e49e065efe0817c8b9646098ba27eed1802b0c3ba7d959e4e5e84" diff --git a/recipes/trompeloeil/config.yml b/recipes/trompeloeil/config.yml index b8ee3e687f441..db787f96cb936 100644 --- a/recipes/trompeloeil/config.yml +++ b/recipes/trompeloeil/config.yml @@ -1,4 +1,6 @@ versions: + "48": + folder: all "47": folder: all "46": diff --git a/recipes/utfcpp/all/conandata.yml b/recipes/utfcpp/all/conandata.yml index 03f2a95423481..d1a732d445794 100644 --- a/recipes/utfcpp/all/conandata.yml +++ b/recipes/utfcpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.5": + url: "https://github.com/nemtrif/utfcpp/archive/v4.0.5.tar.gz" + sha256: "ffc668a310e77607d393f3c18b32715f223da1eac4c4d6e0579a11df8e6b59cf" "4.0.4": url: "https://github.com/nemtrif/utfcpp/archive/v4.0.4.tar.gz" sha256: "7c8a403d0c575d52473c8644cd9eb46c6ba028d2549bc3e0cdc2d45f5cfd78a0" @@ -11,27 +14,9 @@ sources: "3.2.5": url: "https://github.com/nemtrif/utfcpp/archive/v3.2.5.tar.gz" sha256: "14fd1b3c466814cb4c40771b7f207b61d2c7a0aa6a5e620ca05c00df27f25afd" - "3.2.4": - url: "https://github.com/nemtrif/utfcpp/archive/refs/tags/v3.2.4.tar.gz" - sha256: "fde21a4c519eed25f095a1cd8490167409cc70d7b5e9c38756142e588ccb7c7e" "3.2.3": url: "https://github.com/nemtrif/utfcpp/archive/v3.2.3.tar.gz" sha256: "3ba9b0dbbff08767bdffe8f03b10e596ca351228862722e4c9d4d126d2865250" - "3.2.2": - url: "https://github.com/nemtrif/utfcpp/archive/v3.2.2.tar.gz" - sha256: "6f81e7cb2be2a6a9109a8a0cb7dc39ec947f1bcdb5dfa4a660e11a23face19f5" - "3.2.1": - url: "https://github.com/nemtrif/utfcpp/archive/refs/tags/v3.2.1.tar.gz" - sha256: "8d6aa7d77ad0abb35bb6139cb9a33597ac4c5b33da6a004ae42429b8598c9605" - "3.2": - url: "https://github.com/nemtrif/utfcpp/archive/v3.2.tar.gz" - sha256: "cd4f9a66d23dc385bd7ea11bc0abfda8ea1ad1dcf5cd6d3a27bc551e86436364" "3.1.2": url: "https://github.com/nemtrif/utfcpp/archive/v3.1.2.tar.gz" sha256: "fea3bfa39fb8bd7368077ea5e1e0db9a8951f7e6fb6d9400b00ab3d92b807c6d" - "3.1.1": - url: "https://github.com/nemtrif/utfcpp/archive/v3.1.1.tar.gz" - sha256: "33496a4c3cc2de80e9809c4997052331af5fb32079f43ab4d667cd48c3a36e88" - "3.1": - url: "https://github.com/nemtrif/utfcpp/archive/v3.1.tar.gz" - sha256: "ab531c3fd5d275150430bfaca01d7d15e017a188183be932322f2f651506b096" diff --git a/recipes/utfcpp/all/conanfile.py b/recipes/utfcpp/all/conanfile.py index 247b54396ade2..23b9e402630b2 100644 --- a/recipes/utfcpp/all/conanfile.py +++ b/recipes/utfcpp/all/conanfile.py @@ -9,27 +9,24 @@ class UtfCppConan(ConanFile): name = "utfcpp" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/nemtrif/utfcpp" description = "UTF-8 with C++ in a Portable Way" - topics = ("utf", "utf8", "unicode", "text") license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/nemtrif/utfcpp" + topics = ("utf", "utf8", "unicode", "text", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True - def package_id(self): - self.info.clear() - def layout(self): basic_layout(self, src_folder="src") + def package_id(self): + self.info.clear() + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*.h", src=os.path.join(self.source_folder, "source"), diff --git a/recipes/utfcpp/all/test_package/conanfile.py b/recipes/utfcpp/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/utfcpp/all/test_package/conanfile.py +++ b/recipes/utfcpp/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/utfcpp/config.yml b/recipes/utfcpp/config.yml index 46e4658742975..93af14ff8ed78 100644 --- a/recipes/utfcpp/config.yml +++ b/recipes/utfcpp/config.yml @@ -1,4 +1,6 @@ versions: + "4.0.5": + folder: all "4.0.4": folder: all "4.0.1": @@ -7,19 +9,7 @@ versions: folder: all "3.2.5": folder: all - "3.2.4": - folder: all "3.2.3": folder: all - "3.2.2": - folder: all - "3.2.1": - folder: all - "3.2": - folder: all "3.1.2": folder: all - "3.1.1": - folder: all - "3.1": - folder: all diff --git a/recipes/uwebsockets/all/conandata.yml b/recipes/uwebsockets/all/conandata.yml index 250993d144ada..aee0683603d8b 100644 --- a/recipes/uwebsockets/all/conandata.yml +++ b/recipes/uwebsockets/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "20.66.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.66.0.tar.gz" + sha256: "54d1a8cfb46e1814e1525e9bc72a4652aa708f352e55f35ef4b55804c98bfee1" + "20.65.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.65.0.tar.gz" + sha256: "e261f7c124b3b9e217fc766d6e51d4fdc4b227aa52c7a0ca5952a9e65cea4213" + "20.64.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.64.0.tar.gz" + sha256: "bb81fa773dcbd6bc738904ad496554fd131a33269570e0e86fa09213d82ba9ef" "20.63.0": url: "https://github.com/uNetworking/uWebSockets/archive/v20.63.0.tar.gz" sha256: "3bcb3fab4242d312e227b05f34e21d8468960e5eea59e12799aa21a94f1b2b1f" diff --git a/recipes/uwebsockets/config.yml b/recipes/uwebsockets/config.yml index cb040d420b481..ef42fd1e163d6 100644 --- a/recipes/uwebsockets/config.yml +++ b/recipes/uwebsockets/config.yml @@ -1,4 +1,10 @@ versions: + "20.66.0": + folder: all + "20.65.0": + folder: all + "20.64.0": + folder: all "20.63.0": folder: all "20.62.0": diff --git a/recipes/valijson/all/conandata.yml b/recipes/valijson/all/conandata.yml index 9c69d92d45720..3db6eca065b46 100644 --- a/recipes/valijson/all/conandata.yml +++ b/recipes/valijson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.3": + url: "https://github.com/tristanpenman/valijson/archive/v1.0.3.tar.gz" + sha256: "0fbd3cd2312b441c6373ee116e9a162c400f9e3cd79f6b32665cdd22fa11ac3f" "1.0.2": url: "https://github.com/tristanpenman/valijson/archive/v1.0.2.tar.gz" sha256: "35d86e54fc727f1265226434dc996e33000a570f833537a25c8b702b0b824431" diff --git a/recipes/valijson/config.yml b/recipes/valijson/config.yml index 2244034e46866..b8be269bc2d5e 100644 --- a/recipes/valijson/config.yml +++ b/recipes/valijson/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.3": + folder: "all" "1.0.2": folder: "all" "1.0.1": diff --git a/recipes/vulkan-headers/all/conandata.yml b/recipes/vulkan-headers/all/conandata.yml index a2e54aa68230e..707195d109331 100644 --- a/recipes/vulkan-headers/all/conandata.yml +++ b/recipes/vulkan-headers/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.290.0": + url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.3.290.0.tar.gz" + sha256: "5b186e1492d97c44102fe858fb9f222b55524a8b6da940a8795c9e326ae6d722" "1.3.268.0": url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz" sha256: "94993cbe2b1a604c0d5d9ea37a767e1aba4d771d2bfd4ddceefd66243095164f" diff --git a/recipes/vulkan-headers/config.yml b/recipes/vulkan-headers/config.yml index 34a8efbe22307..dc699b4e5ec0f 100644 --- a/recipes/vulkan-headers/config.yml +++ b/recipes/vulkan-headers/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.290.0": + folder: all "1.3.268.0": folder: all "1.3.261.1": diff --git a/recipes/vulkan-loader/all/conandata.yml b/recipes/vulkan-loader/all/conandata.yml index b31ce6fd5b07a..ad7d56b8cab7b 100644 --- a/recipes/vulkan-loader/all/conandata.yml +++ b/recipes/vulkan-loader/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.290.0": + url: "https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/v1.3.290.tar.gz" + sha256: "a1f0d80c4ee448d4fa37d1d4a4c4cf1d6d0f5873d3ca6dffe2a9498e6e654142" "1.3.268.0": url: "https://github.com/KhronosGroup/Vulkan-Loader/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz" sha256: "404fa621f1ab2731bcc68bcbff64d8c6de322faad2d87f9198641bd37255fd39" diff --git a/recipes/vulkan-loader/all/conanfile.py b/recipes/vulkan-loader/all/conanfile.py index d1e31f8184d88..27aeb7d2928a6 100644 --- a/recipes/vulkan-loader/all/conanfile.py +++ b/recipes/vulkan-loader/all/conanfile.py @@ -132,12 +132,13 @@ def _patch_sources(self): "if(${configuration} MATCHES \"/MD\")", "if(FALSE)") else: - replace_in_file( - self, - cmakelists, - "set(TESTS_STANDARD_CXX_PROPERTIES ${LOADER_STANDARD_CXX_PROPERTIES} MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$:Debug>DLL\")", - "set(TESTS_STANDARD_CXX_PROPERTIES ${LOADER_STANDARD_CXX_PROPERTIES})", - ) + if Version(self.version) < "1.3.275": + replace_in_file( + self, + cmakelists, + "set(TESTS_STANDARD_CXX_PROPERTIES ${LOADER_STANDARD_CXX_PROPERTIES} MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$:Debug>DLL\")", + "set(TESTS_STANDARD_CXX_PROPERTIES ${LOADER_STANDARD_CXX_PROPERTIES})", + ) replace_in_file( self, cmakelists, diff --git a/recipes/vulkan-loader/config.yml b/recipes/vulkan-loader/config.yml index a9f30cdd286b9..0254c0a572bb2 100644 --- a/recipes/vulkan-loader/config.yml +++ b/recipes/vulkan-loader/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.290.0": + folder: all "1.3.268.0": folder: all "1.3.250.0": diff --git a/recipes/vulkan-validationlayers/all/conanfile.py b/recipes/vulkan-validationlayers/all/conanfile.py index efbf031896a94..bc700d3572aa8 100644 --- a/recipes/vulkan-validationlayers/all/conanfile.py +++ b/recipes/vulkan-validationlayers/all/conanfile.py @@ -22,15 +22,16 @@ class VulkanValidationLayersConan(ConanFile): topics = ("vulkan", "validation-layers") homepage = "https://github.com/KhronosGroup/Vulkan-ValidationLayers" url = "https://github.com/conan-io/conan-center-index" - package_type = "application" settings = "os", "arch", "compiler", "build_type" options = { + "fPIC": [True, False], "with_wsi_xcb": [True, False], "with_wsi_xlib": [True, False], "with_wsi_wayland": [True, False], } default_options = { + "fPIC": True, "with_wsi_xcb": True, "with_wsi_xlib": True, "with_wsi_wayland": True, @@ -62,6 +63,8 @@ def config_options(self): del self.options.with_wsi_xcb del self.options.with_wsi_xlib del self.options.with_wsi_wayland + if self.settings.os == "Windows": + del self.options.fPIC def layout(self): cmake_layout(self, src_folder="src") @@ -106,7 +109,7 @@ def loose_lt_semver(v1, v2): def build_requirements(self): if self._needs_pkg_config and not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.1.0") + self.tool_requires("pkgconf/[>=2.2 <3]") if Version(self.version) >= "1.3.239": self.tool_requires("cmake/[>=3.17.2 <4]") @@ -120,9 +123,13 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["USE_CCACHE"] = False if self.settings.os in ["Linux", "FreeBSD"]: - tc.variables["BUILD_WSI_XCB_SUPPORT"] = self.options.with_wsi_xcb - tc.variables["BUILD_WSI_XLIB_SUPPORT"] = self.options.with_wsi_xlib - tc.variables["BUILD_WSI_WAYLAND_SUPPORT"] = self.options.with_wsi_wayland + tc.variables["BUILD_WSI_XCB_SUPPORT"] = self.options.get_safe("with_wsi_xcb") + tc.variables["BUILD_WSI_XLIB_SUPPORT"] = self.options.get_safe("with_wsi_xlib") + tc.variables["BUILD_WSI_WAYLAND_SUPPORT"] = self.options.get_safe("with_wsi_wayland") + elif self.settings.os == "Android": + tc.variables["BUILD_WSI_XCB_SUPPORT"] = False + tc.variables["BUILD_WSI_XLIB_SUPPORT"] = False + tc.variables["BUILD_WSI_WAYLAND_SUPPORT"] = False tc.variables["BUILD_WERROR"] = False tc.variables["BUILD_TESTS"] = False tc.variables["INSTALL_TESTS"] = False @@ -147,6 +154,14 @@ def _patch_sources(self): os.path.join(self.generators_folder, "SPIRV-ToolsConfig.cmake"), os.path.join(self.generators_folder, "SPIRV-Tools-optConfig.cmake"), ) + if self.settings.os == "Android": + # INFO: libVkLayer_utils.a: error: undefined symbol: __android_log_print + # https://github.com/KhronosGroup/Vulkan-ValidationLayers/commit/a26638ae9fdd8c40b56d4c7b72859a5b9a0952c9 + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "VkLayer_utils PUBLIC Vulkan::Headers", "VkLayer_utils PUBLIC Vulkan::Headers -landroid -llog") + if not self.options.get_safe("fPIC"): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "CMAKE_POSITION_INDEPENDENT_CODE ON", "CMAKE_POSITION_INDEPENDENT_CODE OFF") if Version(self.version) < "1.3.250.0": replace_in_file(self, os.path.join(self.source_folder, "layers", "CMakeLists.txt"), "find_package(PythonInterp 3 QUIET)", "") @@ -214,3 +229,6 @@ def package_info(self): # TODO: to remove after conan v2, it allows to not break consumers still relying on virtualenv generator self.env_info.VK_LAYER_PATH.append(vk_layer_path) + + if self.settings.os == "Android": + self.cpp_info.system_libs.extend(["android", "log"]) diff --git a/recipes/vvenc/all/conandata.yml b/recipes/vvenc/all/conandata.yml index 96a4c747a1a95..cab7ae30015bb 100644 --- a/recipes/vvenc/all/conandata.yml +++ b/recipes/vvenc/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.12.0": + url: "https://github.com/fraunhoferhhi/vvenc/archive/refs/tags/v1.12.0.tar.gz" + sha256: "e7311ffcc87d8fcc4b839807061cca1b89be017ae7c449a69436dc2dd07615c2" "1.11.1": url: "https://github.com/fraunhoferhhi/vvenc/archive/refs/tags/v1.11.1.tar.gz" sha256: "4f0c8ac3f03eb970bee7a0cacc57a886ac511d58f081bb08ba4bce6f547d92fa" diff --git a/recipes/vvenc/all/conanfile.py b/recipes/vvenc/all/conanfile.py index ebfcf9dec9aca..c1b3ae45e3f99 100644 --- a/recipes/vvenc/all/conanfile.py +++ b/recipes/vvenc/all/conanfile.py @@ -8,6 +8,7 @@ from conan.tools.build import stdcpp_library, check_min_cppstd from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps from conan.tools.files import get, copy, rmdir, rm +from conan.tools.scm import Version required_conan_version = ">=1.60.1" @@ -22,11 +23,11 @@ class vvencRecipe(ConanFile): package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { - "shared": [True, False], + "shared": [True, False], "fPIC": [True, False], } default_options = { - "shared": False, + "shared": False, "fPIC": True, } @@ -59,10 +60,11 @@ def _validate_build2(self): # and it cannot be built with newer C++ standard # because they have existing C++ features removed check_min_cppstd(self, 14) - # FIXME: linter complains, but function is there - # https://docs.conan.io/2.0/reference/tools/build.html?highlight=check_min_cppstd#conan-tools-build-check-max-cppstd - check_max_cppstd = getattr(sys.modules['conan.tools.build'], 'check_max_cppstd') - check_max_cppstd(self, 14) + if Version(self.version) < "1.10.0": + # FIXME: linter complains, but function is there + # https://docs.conan.io/2.0/reference/tools/build.html?highlight=check_min_cppstd#conan-tools-build-check-max-cppstd + check_max_cppstd = getattr(sys.modules['conan.tools.build'], 'check_max_cppstd') + check_max_cppstd(self, 14) def config_options(self): if self.settings.os == "Windows": @@ -80,7 +82,7 @@ def package_id(self): # object files created with newer binutils, # thus linker cannot find any valid object and therefore symbols # (fails to find `vvenc_get_version`, which is obviously always there) - # this is not exactly modeled by conan right now, + # this is not exactly modeled by conan right now, # so "compiler" setting is closest thing to avoid an issue # (while technically it's not a compiler, but linker and archiver) # del self.info.settings.compiler diff --git a/recipes/vvenc/config.yml b/recipes/vvenc/config.yml index 7674f2d958229..dcf5ab8c72631 100644 --- a/recipes/vvenc/config.yml +++ b/recipes/vvenc/config.yml @@ -1,4 +1,6 @@ versions: + "1.12.0": + folder: "all" "1.11.1": folder: "all" "1.10.0": diff --git a/recipes/wasmer/all/conandata.yml b/recipes/wasmer/all/conandata.yml index 040e9390af6ee..8cdd0665cc1d3 100644 --- a/recipes/wasmer/all/conandata.yml +++ b/recipes/wasmer/all/conandata.yml @@ -1,4 +1,35 @@ sources: + "4.3.3": + Windows: + "x86_64": + "Visual Studio": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.3/wasmer-windows-amd64.tar.gz" + sha256: "63239253e7dc5373a421941aaa9ac8ee2ddb2f34e3d94b12ea739319d7929bd4" + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.3/wasmer-windows-gnu64.tar.gz" + sha256: "6180ddaed4b758ddc563be493001204f067667406994b4a05bfeb8f7948d9898" + Linux: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.3/wasmer-linux-amd64.tar.gz" + sha256: "817ce5b0ba0a97989fe390b16e76352632a3185ebd0ef3e5bfbaf0dbda73cd13" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.3/wasmer-linux-aarch64.tar.gz" + sha256: "d15b8170911b1dca69923844bd31f2ea8a73d6ac9ebe7de0d5a30f0cab4cc1b4" + "riscv64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.3/wasmer-linux-riscv64.tar.gz" + sha256: "b0ddc5ed34506f2c2674d3d09996b4c3da500644bc65880e8eede0a149dfaeae" + Macos: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.3/wasmer-darwin-amd64.tar.gz" + sha256: "cf49f6d421b0e8f00f3c4e96ac3ed1ee674b64e0e28f503ff46938cbf831c303" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.3.3/wasmer-darwin-arm64.tar.gz" + sha256: "4b6bc3fc10e22c5347e240df6be7d2ac8db4c930768d7ed7a3d99b086cad4ba0" "4.3.0": Windows: "x86_64": diff --git a/recipes/wasmer/all/conanfile.py b/recipes/wasmer/all/conanfile.py index 402e36fdcca0f..06ec3aa8052ea 100644 --- a/recipes/wasmer/all/conanfile.py +++ b/recipes/wasmer/all/conanfile.py @@ -60,18 +60,18 @@ def package_id(self): del self.info.settings.compiler.version self.info.settings.compiler = self._compiler_alias - def source(self): + def build(self): get( self, - **self.conan_data["sources"][self.version][str(self.info.settings.os)][str(self.info.settings.arch)][self._compiler_alias] + **self.conan_data["sources"][self.version][str(self.settings.os)][str(self.settings.arch)][self._compiler_alias] ) def package(self): - copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.build_folder) - copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) + copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.build_folder, "include")) - srclibdir = os.path.join(self.source_folder, "lib") + srclibdir = os.path.join(self.build_folder, "lib") dstlibdir = os.path.join(self.package_folder, "lib") dstbindir = os.path.join(self.package_folder, "bin") if self.options.shared: diff --git a/recipes/wasmer/config.yml b/recipes/wasmer/config.yml index 3738345af4fbf..faad7585c3845 100644 --- a/recipes/wasmer/config.yml +++ b/recipes/wasmer/config.yml @@ -1,4 +1,6 @@ versions: + "4.3.3": + folder: "all" "4.3.0": folder: "all" "4.2.7": diff --git a/recipes/watcher/all/conandata.yml b/recipes/watcher/all/conandata.yml index b164bc68a1b90..bda0c9f5ba9f9 100644 --- a/recipes/watcher/all/conandata.yml +++ b/recipes/watcher/all/conandata.yml @@ -1,7 +1,10 @@ sources: + "0.11.0": + url: "https://github.com/e-dant/watcher/archive/release/0.11.0.tar.gz" + sha256: "dd92496d77b6bc27e27ed28253faae4d81bc58b19407d154bb49504b2af73664" "0.10.1": - url: "https://github.com/e-dant/watcher/archive/release/0.10..tar.gz" - sha256: "3c2d3318f64d79437b1305a83382aa26e5054444ac4aed1821937cb97fedc03a" + url: "https://github.com/e-dant/watcher/archive/release/0.10.1.tar.gz" + sha256: "cc14b0adfc23ae90390cf8b4f20291abbc5bf0e358b5d12fa73f7e21d021ccd0" "0.10.0": url: "https://github.com/e-dant/watcher/archive/release/0.10.0.tar.gz" sha256: "c15f088ddc41b58100921ea0b630bcbde83c9960aefecf82221da997f4d4b4ec" @@ -17,26 +20,3 @@ sources: "0.8.7": url: "https://github.com/e-dant/watcher/archive/release/0.8.7.tar.gz" sha256: "e83eaf097f8ebe9b87bee2962e6e18f6f2597ae4e76d8d0258adc2c62fa545d2" - "0.8.0": - url: "https://github.com/e-dant/watcher/archive/release/0.8.0.tar.gz" - sha256: "74530f5f6c083ec0348ec41938ae43b02bed1d125125623394f31038fec6f9d1" - "0.6.0": - url: "https://github.com/e-dant/watcher/archive/release/0.6.0.tar.gz" - sha256: "156669c92f9119d658954e124fcd9fc640999fb8a45e2bd915ea8b05e15b925a" - "0.5.5": - url: "https://github.com/e-dant/watcher/archive/release/0.5.5.tar.gz" - sha256: "55da2b7a22cbdba836a405d5cab31a461e84e4e686a117f06399a806d33b2d09" - "0.5.4": - url: "https://github.com/e-dant/watcher/archive/release/0.5.4.tar.gz" - sha256: "0dac1d89886252bb0b999c2dad85aff283022a2b4393922a993459b180b8c663" - "0.5.2": - url: "https://github.com/e-dant/watcher/archive/release/0.5.2.tar.gz" - sha256: "e18e663f9a72a59fca3e7a9e125ca77823b03a3388aa569398965777c5671173" - "0.4.3": - url: "https://github.com/e-dant/watcher/archive/release/0.4.3.tar.gz" - sha256: "8603b45edfa5023752d9e2fdd731efe5a556a542aaf03f6be0e69c68f552b25a" -patches: - "0.5.5": - - patch_file: "patches/0.5.5-fix-limits_max.patch" - patch_description: "fix max macro error in windows" - patch_type: "portability" diff --git a/recipes/watcher/all/conanfile.py b/recipes/watcher/all/conanfile.py index e70c9cb544fb1..167c9652d196e 100644 --- a/recipes/watcher/all/conanfile.py +++ b/recipes/watcher/all/conanfile.py @@ -1,11 +1,10 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import export_conandata_patches, apply_conandata_patches, get, copy +from conan.tools.files import get, copy from conan.tools.build import check_min_cppstd from conan.tools.apple import is_apple_os from conan.tools.layout import basic_layout from conan.tools.scm import Version -from conan.tools.microsoft import is_msvc import os required_conan_version = ">=1.49.0" @@ -19,6 +18,7 @@ class WatcherConan(ConanFile): topics = ("watch", "filesystem", "event", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property def _min_cppstd(self): @@ -43,9 +43,6 @@ def _compilers_minimum_version(self): }, }.get(self._min_cppstd, {}) - def export_sources(self): - export_conandata_patches(self) - def layout(self): basic_layout(self, src_folder="src") @@ -71,9 +68,6 @@ def loose_lt_semver(v1, v2): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - apply_conandata_patches(self) - def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy( diff --git a/recipes/watcher/all/patches/0.5.5-fix-limits_max.patch b/recipes/watcher/all/patches/0.5.5-fix-limits_max.patch deleted file mode 100644 index aeed151aa95e0..0000000000000 --- a/recipes/watcher/all/patches/0.5.5-fix-limits_max.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/watcher/detail/adapter/adapter.hpp b/include/watcher/detail/adapter/adapter.hpp -index 3d43bb8..597c0bc 100644 ---- a/include/watcher/detail/adapter/adapter.hpp -+++ b/include/watcher/detail/adapter/adapter.hpp -@@ -23,7 +23,7 @@ namespace adapter { - - namespace { - inline constexpr size_t watch_count_max -- = std::numeric_limits::max() - 1; -+ = (std::numeric_limits::max)() - 1; - } /* namespace */ - - /* @brief wtr/watcher/detail/adapter/message diff --git a/recipes/watcher/config.yml b/recipes/watcher/config.yml index 573bce3b91e25..ed37614dda7ca 100644 --- a/recipes/watcher/config.yml +++ b/recipes/watcher/config.yml @@ -1,4 +1,6 @@ versions: + "0.11.0": + folder: all "0.10.1": folder: all "0.10.0": @@ -11,15 +13,3 @@ versions: folder: all "0.8.7": folder: all - "0.8.0": - folder: all - "0.6.0": - folder: all - "0.5.5": - folder: all - "0.5.4": - folder: all - "0.5.2": - folder: all - "0.4.3": - folder: all diff --git a/recipes/wil/all/conandata.yml b/recipes/wil/all/conandata.yml index 50c0114259eca..4dda604c7c75a 100644 --- a/recipes/wil/all/conandata.yml +++ b/recipes/wil/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.240803.1": + url: "https://github.com/microsoft/wil/archive/refs/tags/v1.0.240803.1.tar.gz" + sha256: "39910ab105c6df345e4018a2b61dfbc909a8816c971a3d2cebbefa1f8c481cc6" "1.0.240122.1": url: "https://github.com/microsoft/wil/archive/refs/tags/v1.0.240122.1.tar.gz" sha256: "e599f2843c01b9e4827e46f11d3651180675c8ecdbba8bdae735f533672989d3" diff --git a/recipes/wil/config.yml b/recipes/wil/config.yml index f3a417272a35c..67c36e1a1f315 100644 --- a/recipes/wil/config.yml +++ b/recipes/wil/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.240803.1": + folder: "all" "1.0.240122.1": folder: "all" "1.0.231216.1": diff --git a/recipes/wiringpi/all/conandata.yml b/recipes/wiringpi/all/conandata.yml index 9b3f6dc4c04db..01a4914b9830b 100644 --- a/recipes/wiringpi/all/conandata.yml +++ b/recipes/wiringpi/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.10": + url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/3.10.tar.gz" + sha256: "d0a7b182154e763b4baff1a57a5e0fca093fcf081f663cb2fb17f5ada564e016" + "3.8": + url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/3.8.tar.gz" + sha256: "6159764d3d036486f0a110cd5393b1413c1f334d464b7337117fece59ea04bc9" "3.6": url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/3.6.tar.gz" sha256: "bec180a14ccd2d6b4eb5248d6553593511e7881348f56f8c98515a6d5d5444ee" diff --git a/recipes/wiringpi/config.yml b/recipes/wiringpi/config.yml index 64b1ec70829ae..36ce1b9437329 100644 --- a/recipes/wiringpi/config.yml +++ b/recipes/wiringpi/config.yml @@ -1,4 +1,8 @@ versions: + "3.10": + folder: "all" + "3.8": + folder: "all" "3.6": folder: "all" "3.4": diff --git a/recipes/wolfssl/all/conanfile.py b/recipes/wolfssl/all/conanfile.py index 3ec9c448508a0..af1ac29b52447 100644 --- a/recipes/wolfssl/all/conanfile.py +++ b/recipes/wolfssl/all/conanfile.py @@ -40,6 +40,7 @@ class WolfSSLConan(ConanFile): "sni": [True, False], "testcert": [True, False], "with_curl": [True, False], + "with_quic": [True, False], "with_experimental": [True, False], } default_options = { @@ -58,6 +59,7 @@ class WolfSSLConan(ConanFile): "sni": False, "testcert": False, "with_curl": False, + "with_quic": False, "with_experimental": False, } @@ -70,6 +72,8 @@ def config_options(self): del self.options.fPIC if Version(self.version) < "5.2.0": del self.options.with_curl + if Version(self.version) < "5.5.0": + del self.options.with_quic if Version(self.version) < "5.7.0": del self.options.with_experimental @@ -112,7 +116,7 @@ def generate(self): "--enable-sslv3={}".format(yes_no(self.options.sslv3)), "--enable-alpn={}".format(yes_no(self.options.alpn)), "--enable-des3={}".format(yes_no(self.options.des3)), - "--enable-tls13={}".format(yes_no(self.options.tls13)), + "--enable-tls13={}".format(yes_no(self.options.tls13 or self.options.get_safe("with_quic"))), "--enable-certgen={}".format(yes_no(self.options.certgen)), "--enable-dsa={}".format(yes_no(self.options.dsa)), "--enable-ripemd={}".format(yes_no(self.options.ripemd)), @@ -124,6 +128,8 @@ def generate(self): ]) if self.options.get_safe("with_curl"): tc.configure_args.append("--enable-curl") + if self.options.get_safe("with_quic"): + tc.configure_args.append("--enable-quic") if self.options.get_safe("with_experimental"): tc.configure_args.append("--enable-experimental") if is_msvc(self): diff --git a/recipes/wxwidgets/all/conandata.yml b/recipes/wxwidgets/all/conandata.yml new file mode 100644 index 0000000000000..0b2357cd4a254 --- /dev/null +++ b/recipes/wxwidgets/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "3.2.6": + url: "https://github.com/wxWidgets/wxWidgets/archive/v3.2.6.tar.gz" + sha256: "46372b2dbf976521e1d7cca22afc3d3542d171a488b391444cf89aba87ea7d16" + "3.2.5": + url: "https://github.com/wxWidgets/wxWidgets/archive/v3.2.5.tar.gz" + sha256: "c3a54d1c5dc3feefc2893c28923fd722c990c572253d5ad353eec99386ba11eb" diff --git a/recipes/wxwidgets/all/conanfile.py b/recipes/wxwidgets/all/conanfile.py new file mode 100644 index 0000000000000..59a1e6e30d3ee --- /dev/null +++ b/recipes/wxwidgets/all/conanfile.py @@ -0,0 +1,477 @@ +from conan import ConanFile +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version +from conan.tools.system import package_manager +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.60.0 <2.0 || >=2.0.6" + + +class wxWidgetsConan(ConanFile): + name = "wxwidgets" + description = "wxWidgets is a C++ library that lets developers create applications for Windows, macOS, " \ + "Linux and other platforms with a single code base." + topics = ("wxwidgets", "gui", "ui") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.wxwidgets.org" + license = "wxWidgets" + settings = "os", "arch", "compiler", "build_type" + + options = {"shared": [True, False], + "fPIC": [True, False], + "jpeg": ["libjpeg", "libjpeg-turbo", "mozjpeg"], + "secretstore": [True, False], + "aui": [True, False], + "opengl": [True, False], + "html": [True, False], + "mediactrl": [True, False], + "propgrid": [True, False], + "debugreport": [True, False], + "ribbon": [True, False], + "richtext": [True, False], + "sockets": [True, False], + "stc": [True, False], + "webview": [True, False], + "xml": [True, False], + "xrc": [True, False], + "cairo": [True, False], + "help": [True, False], + "html_help": [True, False], + "url": [True, False], + "protocol": [True, False], + "fs_inet": [True, False], + "custom_enables": ["ANY"], # comma splitted list + "custom_disables": ["ANY"]} + default_options = { + "shared": False, + "fPIC": True, + "jpeg": "libjpeg", + "secretstore": True, + "aui": True, + "opengl": True, + "html": True, + "mediactrl": False, + "propgrid": True, + "debugreport": True, + "ribbon": True, + "richtext": True, + "sockets": True, + "stc": True, + # WebKitGTK for GTK2 is not available as a system dependency on modern distros. + # When gtk/system defaults to GTK3, turn this back on. + "webview": False, + "xml": True, + "xrc": True, + "cairo": True, + "help": True, + "html_help": True, + "url": True, + "protocol": True, + "fs_inet": True, + "custom_enables": "", + "custom_disables": "" + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + self.options.rm_safe("fPIC") + if self.settings.os != "Linux": + self.options.rm_safe("secretstore") + self.options.rm_safe("cairo") + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + @property + def _gtk_version(self): + return f"gtk{self.dependencies['gtk'].options.version}" + + def system_requirements(self): + apt = package_manager.Apt(self) + packages = [] + if self.options.get_safe("secretstore"): + packages.append("libsecret-1-dev") + if self.options.webview: + if self._gtk_version == "gtk2": + packages.extend(["libsoup2.4-dev", + "libwebkitgtk-dev"]) + else: + packages.extend(["libsoup3.0-dev", + "libwebkit2gtk-4.0-dev"]) + if self.options.get_safe("cairo"): + packages.append("libcairo2-dev") + apt.install(packages) + + yum = package_manager.Yum(self) + packages = [] + if self.options.get_safe("secretstore"): + packages.append("libsecret-devel") + if self.options.webview: + packages.extend(["libsoup3-devel", + "webkit2gtk4.1-devel"]) + if self.options.get_safe("cairo"): + packages.append("cairo-devel") + yum.install(packages) + + def build_requirements(self): + self.tool_requires("ninja/1.11.1") + self.tool_requires("cmake/[>=3.17]") + + # TODO: add support for gtk non system version when it's ready for Conan 2 + def requirements(self): + if self.settings.os == "Linux": + self.requires("xorg/system") + self.requires("gtk/system") + if self.options.get_safe("opengl", default=False): + self.requires("opengl/system") + self.requires("xkbcommon/1.6.0", options={"with_x11": True}) + # TODO: Does not work right now + # if self.options.get_safe("cairo"): + # self.requires("cairo/1.18.0") + if self.options.mediactrl: + self.requires("gstreamer/1.22.3") + self.requires("gst-plugins-base/1.19.2") + self.requires("libcurl/[>=7.78.0 <9]") + + if self.options.jpeg == "libjpeg": + self.requires("libjpeg/9e") + elif self.options.jpeg == "libjpeg-turbo": + self.requires("libjpeg-turbo/3.0.2") + elif self.options.jpeg == "mozjpeg": + self.requires("mozjpeg/4.1.5") + + self.requires("libpng/[>=1.6 <2]") + self.requires("libtiff/4.6.0") + self.requires("zlib/[>=1.2.11 <2]") + self.requires("expat/[>=2.6.2 <3]") + self.requires("pcre2/10.42") + self.requires("nanosvg/cci.20231025") + + def validate(self): + if self.settings.os == "Linux": + if not self.dependencies.direct_host["xkbcommon"].options.with_x11: + raise ConanInvalidConfiguration("The 'with_x11' option for the 'xkbcommon' package must be enabled") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def _patch_sources(self): + apply_conandata_patches(self) + # Don't change library names when cross-compiling + replace_in_file(self, os.path.join(self.source_folder, "build", "cmake", "functions.cmake"), + 'set(cross_target "-${CMAKE_SYSTEM_NAME}")', + 'set(cross_target)') + # Don't override Conan's toolchain + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "CMAKE_OSX_DEPLOYMENT_TARGET", + "CMAKE_OSX_DEPLOYMENT_TARGET_IGNORED") + # Fix for strcpy_s (fix upstream?) + if is_apple_os(self): + cmake_version = "3.0" + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + f'cmake_minimum_required(VERSION {cmake_version})', + f'cmake_minimum_required(VERSION {cmake_version})\nadd_definitions(-D__STDC_WANT_LIB_EXT1__)') + + def generate(self): + tc = CMakeToolchain(self) + + # generic build options + tc.variables["wxBUILD_SHARED"] = self.options.shared + tc.variables["wxBUILD_SAMPLES"] = "OFF" + tc.variables["wxBUILD_TESTS"] = "OFF" + tc.variables["wxBUILD_DEMOS"] = "OFF" + tc.variables["wxBUILD_INSTALL"] = True + if self.settings.compiler == "clang": + tc.variables["wxBUILD_PRECOMP"] = "OFF" + + # platform-specific options + if is_msvc(self): + tc.variables["wxBUILD_USE_STATIC_RUNTIME"] = "MT" in str(self.settings.compiler.runtime) + tc.variables["wxBUILD_MSVC_MULTIPROC"] = True + if self.settings.os == "Linux": + tc.variables["wxBUILD_TOOLKIT"] = self._gtk_version + tc.variables["wxUSE_CAIRO"] = self.options.cairo + # Disable some optional libraries that will otherwise lead to non-deterministic builds + if self.settings.os != "Windows": + tc.variables["wxUSE_LIBSDL"] = "OFF" + tc.variables["wxUSE_LIBICONV"] = "OFF" + tc.variables["wxUSE_LIBNOTIFY"] = "OFF" + tc.variables["wxUSE_LIBMSPACK"] = "OFF" + tc.variables["wxUSE_LIBGNOMEVFS"] = "OFF" + + tc.variables["wxUSE_LIBPNG"] = "sys" + tc.variables["wxUSE_LIBJPEG"] = "sys" + tc.variables["wxUSE_LIBTIFF"] = "sys" + tc.variables["wxUSE_ZLIB"] = "sys" + tc.variables["wxUSE_EXPAT"] = "sys" + tc.variables["wxUSE_REGEX"] = "sys" + tc.variables["wxUSE_NANOSVG"] = "sys" + + # wxWidgets features + tc.variables["wxUSE_SECRETSTORE"] = self.options.get_safe("secretstore") + + # wxWidgets libraries + tc.variables["wxUSE_AUI"] = self.options.aui + tc.variables["wxUSE_OPENGL"] = self.options.get_safe("opengl", default=False) + tc.variables["wxUSE_HTML"] = self.options.html + tc.variables["wxUSE_MEDIACTRL"] = self.options.mediactrl + tc.variables["wxUSE_PROPGRID"] = self.options.propgrid + tc.variables["wxUSE_DEBUGREPORT"] = self.options.debugreport + tc.variables["wxUSE_RIBBON"] = self.options.ribbon + tc.variables["wxUSE_RICHTEXT"] = self.options.richtext + tc.variables["wxUSE_SOCKETS"] = self.options.sockets + tc.variables["wxUSE_STC"] = self.options.stc + tc.variables["wxUSE_WEBVIEW"] = self.options.webview + tc.variables["wxUSE_XML"] = self.options.xml + tc.variables["wxUSE_XRC"] = self.options.xrc + tc.variables["wxUSE_HELP"] = self.options.help + tc.variables["wxUSE_WXHTML_HELP"] = self.options.html_help + tc.variables["wxUSE_URL"] = self.options.protocol + tc.variables["wxUSE_PROTOCOL"] = self.options.protocol + tc.variables["wxUSE_FS_INET"] = self.options.fs_inet + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + + for item in str(self.options.custom_enables).split(","): + if len(item) > 0: + tc.variables[item] = True + for item in str(self.options.custom_disables).split(","): + if len(item) > 0: + tc.variables[item] = False + + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("expat", "cmake_file_name", "EXPAT") + deps.set_property("expat", "cmake_target_name", "EXPAT") + deps.set_property("nanosvg", "cmake_file_name", "NanoSVG") + deps.set_property("nanosvg", "cmake_target_name", "NanoSVG::nanosvg") + deps.generate() + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="licence.txt", + src=os.path.join(self.source_folder, "docs"), + dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + # remove cmake files + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + # copy setup.h + copy(self, pattern="*setup.h", + src=os.path.join(self.build_folder, "lib"), + dst=os.path.join(self.package_folder, "include", "wx"), + keep_path=False) + + if self.settings.os == "Windows": + # copy wxrc.exe + copy(self, pattern="*", + src=os.path.join(self.build_folder, "bin"), + dst=os.path.join(self.package_folder, "bin"), + keep_path=False) + else: + # make relative symlink + bin_dir = os.path.join(self.package_folder, "bin") + for x in os.listdir(bin_dir): + filename = os.path.join(bin_dir, x) + if os.path.islink(filename): + target = os.readlink(filename) + if os.path.isabs(target): + rel = os.path.relpath(target, bin_dir) + os.remove(filename) + os.symlink(rel, filename) + + def package_info(self): + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "wxWidgets") + self.cpp_info.set_property("cmake_target_name", "wxWidgets::wxWidgets") + self.cpp_info.set_property("pkg_config_name", "wxwidgets") + + _version = Version(self.version) + version_suffix_major_minor = f"-{_version.major}.{_version.minor}" + + # wx no longer uses a debug suffix for non-windows platforms from 3.1.3 onwards + use_debug_suffix = False + if self.settings.build_type == "Debug" and self.settings.os == "Windows": + use_debug_suffix = True + + debug = "d" if use_debug_suffix else "" + + if self.settings.os == "Linux": + prefix = "wx_" + toolkit = self._gtk_version + version = "" + suffix = version_suffix_major_minor + elif self.settings.os == "Macos": + prefix = "wx_" + toolkit = "osx_cocoa" + version = "" + suffix = version_suffix_major_minor + elif self.settings.os == "Windows": + toolkit = "msw" + if is_msvc(self): + prefix = "wx" + version = f"{_version.major}{_version.minor}" + suffix = "" + else: + prefix = "wx_" + version = "" + suffix = version_suffix_major_minor + + def base_library_pattern(library): + return "{prefix}base{version}u{debug}_%s{suffix}" % library + + def library_pattern(library): + return "{prefix}{toolkit}{version}u{debug}_%s{suffix}" % library + + libs = [] + libs.append("{prefix}base{version}u{debug}{suffix}") + libs.append(library_pattern("core")) + libs.append(library_pattern("adv")) + if self.options.sockets: + libs.append(base_library_pattern("net")) + if self.options.xml: + libs.append(base_library_pattern("xml")) + if self.options.aui: + libs.append(library_pattern("aui")) + if self.options.get_safe("opengl", default=False): + libs.append(library_pattern("gl")) + if self.options.html: + libs.append(library_pattern("html")) + if self.options.mediactrl: + libs.append(library_pattern("media")) + if self.options.propgrid: + libs.append(library_pattern("propgrid")) + if self.options.debugreport: + libs.append(library_pattern("qa")) + if self.options.ribbon: + libs.append(library_pattern("ribbon")) + if self.options.richtext: + libs.append(library_pattern("richtext")) + if self.options.stc: + if not self.options.shared: + scintilla_suffix = "{debug}" if self.settings.os == "Windows" else "{suffix}" + libs.append("wxscintilla" + scintilla_suffix) + libs.append(library_pattern("stc")) + if self.options.webview: + libs.append(library_pattern("webview")) + if self.options.xrc: + libs.append(library_pattern("xrc")) + for lib in reversed(libs): + self.cpp_info.libs.append(lib.format(prefix=prefix, + toolkit=toolkit, + version=version, + debug=debug, + suffix=suffix)) + + self.cpp_info.defines.append("wxUSE_GUI=1") + if self.settings.build_type == "Debug": + self.cpp_info.defines.append("__WXDEBUG__") + if self.options.shared: + self.cpp_info.defines.append("WXUSINGDLL") + if self.settings.os == "Linux": + self.cpp_info.defines.append("__WXGTK__") + self.cpp_info.system_libs.extend(["dl", "pthread", "SM"]) + elif self.settings.os == "Macos": + self.cpp_info.defines.extend(["__WXMAC__", "__WXOSX__", "__WXOSX_COCOA__"]) + for framework in ["Carbon", + "Cocoa", + "AudioToolbox", + "OpenGL", + "AppKit", + "AVKit", + "AVFoundation", + "Foundation", + "IOKit", + "ApplicationServices", + "CoreFoundation", + "CoreText", + "CoreGraphics", + "CoreServices", + "CoreMedia", + "CFNetwork", + "Security", + "ImageIO", + "System", + "WebKit", + "QuartzCore"]: + self.cpp_info.frameworks.append(framework) + elif self.settings.os == "Windows": + # see cmake/init.cmake + compiler_prefix = {"Visual Studio": "vc", + "msvc": "vc", + "gcc": "gcc", + "clang": "clang"}.get(str(self.settings.compiler)) + + arch_suffix = "_x64" if self.settings.arch == "x86_64" else "" + lib_suffix = "_dll" if self.options.shared else "_lib" + libdir = f"{compiler_prefix}{arch_suffix}{lib_suffix}" + libdir = os.path.join("lib", libdir) + self.cpp_info.bindirs.append(libdir) + self.cpp_info.libdirs.append(libdir) + self.cpp_info.defines.append("__WXMSW__") + # disable annoying auto-linking + self.cpp_info.defines.extend(["wxNO_NET_LIB", + "wxNO_XML_LIB", + "wxNO_REGEX_LIB", + "wxNO_ZLIB_LIB", + "wxNO_JPEG_LIB", + "wxNO_PNG_LIB", + "wxNO_TIFF_LIB", + "wxNO_ADV_LIB", + "wxNO_HTML_LIB", + "wxNO_GL_LIB", + "wxNO_QA_LIB", + "wxNO_XRC_LIB", + "wxNO_AUI_LIB", + "wxNO_PROPGRID_LIB", + "wxNO_RIBBON_LIB", + "wxNO_RICHTEXT_LIB", + "wxNO_MEDIA_LIB", + "wxNO_STC_LIB", + "wxNO_WEBVIEW_LIB"]) + self.cpp_info.system_libs.extend(["kernel32", + "user32", + "gdi32", + "comdlg32", + "winspool", + "shell32", + "comctl32", + "ole32", + "oleaut32", + "imm32", + "uuid", + "wininet", + "rpcrt4", + "winmm", + "advapi32", + "msimg32", + "opengl32", + "ws2_32", + "wsock32"]) + # Link a few libraries that are needed when using gcc on windows + if self.settings.compiler == "gcc": + self.cpp_info.system_libs.extend(["uxtheme", + "version", + "shlwapi", + "oleacc"]) + if is_msvc(self): + self.cpp_info.includedirs.append(os.path.join("include", "msvc")) + else: + include_path = os.path.join("include", f"wx{version_suffix_major_minor}") + self.cpp_info.includedirs = [include_path] + self.cpp_info.includedirs diff --git a/recipes/wxwidgets/all/test_package/CMakeLists.txt b/recipes/wxwidgets/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..c4d40ad29eb0f --- /dev/null +++ b/recipes/wxwidgets/all/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package) + +find_package(wxWidgets REQUIRED) + +if(MSVC) + add_definitions("-DUNICODE") + add_definitions("-D_UNICODE") + add_definitions("-D_CRT_SECURE_NO_WARNINGS") +endif() + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} wxWidgets::wxWidgets) diff --git a/recipes/wxwidgets/all/test_package/conanfile.py b/recipes/wxwidgets/all/test_package/conanfile.py new file mode 100644 index 0000000000000..91817d9f2df17 --- /dev/null +++ b/recipes/wxwidgets/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +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", "compiler", "build_type", "arch" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + 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): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/wxwidgets/all/test_package/test_package.cpp b/recipes/wxwidgets/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..40a8f99c42fac --- /dev/null +++ b/recipes/wxwidgets/all/test_package/test_package.cpp @@ -0,0 +1,27 @@ +#include +#include +#include +#include +#if wxUSE_STC +#include +#endif + +int main() +{ + int argc = 0; + wxChar * argv[] = {NULL}; + if (!wxEntryStart(argc, argv)) { + std::cerr << "wxEntryStart failed!" << std::endl; + return EXIT_FAILURE; + } + wxVersionInfo vi = wxGetLibraryVersionInfo(); + std::cout << "wxWidgets version: "; + std::cout << vi.GetMajor() << "."; + std::cout << vi.GetMinor() << "."; + std::cout << vi.GetMicro() << std::endl; +#if wxUSE_STC + wxStyledTextCtrl * stc = new wxStyledTextCtrl(); +#endif + wxEntryCleanup(); + return EXIT_SUCCESS; +} diff --git a/recipes/wxwidgets/config.yml b/recipes/wxwidgets/config.yml new file mode 100644 index 0000000000000..f849d473251f2 --- /dev/null +++ b/recipes/wxwidgets/config.yml @@ -0,0 +1,5 @@ +versions: + "3.2.6": + folder: "all" + "3.2.5": + folder: "all" diff --git a/recipes/xapian-core/all/conandata.yml b/recipes/xapian-core/all/conandata.yml index 4514bc0f40509..18806738cffac 100644 --- a/recipes/xapian-core/all/conandata.yml +++ b/recipes/xapian-core/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.24": + url: "https://oligarchy.co.uk/xapian/1.4.24/xapian-core-1.4.24.tar.xz" + sha256: "eda5ae6dcf6b0553a8676af64b1fd304e998cd20f779031ccaaf7ab9a373531a" "1.4.19": url: "https://oligarchy.co.uk/xapian/1.4.19/xapian-core-1.4.19.tar.xz" sha256: "1fca48fca6cc3526cc4ba93dd194fe9c1326857b78edcfb37e68d086d714a9c3" @@ -6,6 +9,8 @@ sources: url: "https://oligarchy.co.uk/xapian/1.4.18/xapian-core-1.4.18.tar.xz" sha256: "196ddbb4ad10450100f0991a599e4ed944cbad92e4a6fe813be6dce160244b77" patches: + "1.4.24": + - patch_file: "patches/0001-add-msvc-cl-sh.patch" "1.4.19": - patch_file: "patches/0001-add-msvc-cl-sh.patch" "1.4.18": diff --git a/recipes/xapian-core/all/conanfile.py b/recipes/xapian-core/all/conanfile.py index e5d0241981b9f..fd5b09b5d2d5d 100644 --- a/recipes/xapian-core/all/conanfile.py +++ b/recipes/xapian-core/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os from conan.tools.build import cross_building from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, rm, rmdir, save @@ -101,6 +101,12 @@ def generate(self): env.define("OBJDUMP", ":") env.define("RANLIB", ":") env.define("STRIP", ":") + + if is_apple_os(self) and self.settings.arch == "armv8": + # A fix for ./configure issues on armv8 + tc.configure_args.append("--host=aarch64-apple-darwin") + tc.extra_ldflags.append("-arch arm64") + tc.generate(env) if is_msvc(self): diff --git a/recipes/xapian-core/config.yml b/recipes/xapian-core/config.yml index bc4d571521f81..9a97cca323477 100644 --- a/recipes/xapian-core/config.yml +++ b/recipes/xapian-core/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.24": + folder: "all" "1.4.19": folder: "all" "1.4.18": diff --git a/recipes/xbyak/all/conandata.yml b/recipes/xbyak/all/conandata.yml index ef1003499edb9..ea15bf45963b8 100644 --- a/recipes/xbyak/all/conandata.yml +++ b/recipes/xbyak/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.07.1": + url: "https://github.com/herumi/xbyak/archive/v7.07.1.tar.gz" + sha256: "9f2a1215ed0511e421895d57e2681981f9f9f8fb952655919a9cf859cfe474ae" "7.07": url: "https://github.com/herumi/xbyak/archive/v7.07.tar.gz" sha256: "7bd603fb8de9e605b86c1996a20111df66707c916a2ac0397424080cc0ad7bde" diff --git a/recipes/xbyak/all/test_package/conanfile.py b/recipes/xbyak/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/xbyak/all/test_package/conanfile.py +++ b/recipes/xbyak/all/test_package/conanfile.py @@ -7,6 +7,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/xbyak/config.yml b/recipes/xbyak/config.yml index 6b9a060b1e92a..6b2757b9d33b2 100644 --- a/recipes/xbyak/config.yml +++ b/recipes/xbyak/config.yml @@ -1,4 +1,6 @@ versions: + "7.07.1": + folder: all "7.07": folder: all "7.06": diff --git a/recipes/xerces-c/all/conandata.yml b/recipes/xerces-c/all/conandata.yml index 42c60fa48a45e..7c2baf54d287f 100644 --- a/recipes/xerces-c/all/conandata.yml +++ b/recipes/xerces-c/all/conandata.yml @@ -14,9 +14,17 @@ sources: patches: "3.2.5": - patch_file: "patches/0002-find-icu-programs.patch" + patch_description: "Find ICU programs on environment" + patch_type: "conan" "3.2.4": - patch_file: "patches/0002-find-icu-programs.patch" + patch_description: "Find ICU programs on environment" + patch_type: "conan" "3.2.3": - patch_file: "patches/0002-find-icu-programs.patch" + patch_description: "Find ICU programs on environment" + patch_type: "conan" "3.2.2": - patch_file: "patches/0002-find-icu-programs.patch" + patch_description: "Find ICU programs on environment" + patch_type: "conan" diff --git a/recipes/xerces-c/all/conanfile.py b/recipes/xerces-c/all/conanfile.py index 88a28ee036fe6..057e07e361250 100644 --- a/recipes/xerces-c/all/conanfile.py +++ b/recipes/xerces-c/all/conanfile.py @@ -131,6 +131,12 @@ def generate(self): # avoid picking up system dependency tc.variables["CMAKE_DISABLE_FIND_PACKAGE_CURL"] = self.options.get_safe("network_accessor") != "curl" tc.variables["CMAKE_DISABLE_FIND_PACKAGE_ICU"] = "icu" not in (self.options.transcoder, self.options.message_loader) + + # Fix compatibility with Clang on Windows + # https://issues.apache.org/jira/browse/XERCESC-2252 + if self.settings.os == "Windows" and self.settings.compiler == "clang": + tc.cache_variables["CMAKE_RC_FLAGS"] = "-C 1252" + tc.generate() deps = CMakeDeps(self) deps.generate() @@ -166,7 +172,7 @@ def package_info(self): if self.settings.os == "Macos": self.cpp_info.frameworks = ["CoreFoundation", "CoreServices"] elif self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs.append("pthread") + self.cpp_info.system_libs.extend(["pthread", "nsl"]) if Version(conan_version).major < 2: self.cpp_info.names["cmake_find_package"] = "XercesC" diff --git a/recipes/xnnpack/all/conandata.yml b/recipes/xnnpack/all/conandata.yml index 347edb5af1787..94f6829c40eea 100644 --- a/recipes/xnnpack/all/conandata.yml +++ b/recipes/xnnpack/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240229": + url: "https://github.com/google/XNNPACK/archive/fcbf55af6cf28a4627bcd1f703ab7ad843f0f3a2.tar.gz" + sha256: "96b2800652a605f0bd289faa09865792d139cadde89f681c79e1b2a08a7e0498" "cci.20231026": url: "https://github.com/google/XNNPACK/archive/ab16a544c1cbc5ee4ec105a2f35f8adca22e94c1.tar.gz" sha256: "11c7e0555d2c2c14d812b3fba2a277d59121cfb898dcc99de1c76477ff2055a0" diff --git a/recipes/xnnpack/config.yml b/recipes/xnnpack/config.yml index 5e502dd6fac1c..5557e99d09d21 100644 --- a/recipes/xnnpack/config.yml +++ b/recipes/xnnpack/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20240229": + folder: all "cci.20231026": folder: all "cci.20230715": diff --git a/recipes/xorg-proto/all/conandata.yml b/recipes/xorg-proto/all/conandata.yml index a78c2d2c2da43..31aa321346999 100644 --- a/recipes/xorg-proto/all/conandata.yml +++ b/recipes/xorg-proto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2024.1": + url: "https://www.x.org/releases/individual/proto/xorgproto-2024.1.tar.gz" + sha256: "4f6b9b4faf91e5df8265b71843a91fc73dc895be6210c84117a996545df296ce" "2022.2": url: "https://www.x.org/releases/individual/proto/xorgproto-2022.2.tar.gz" sha256: "da351a403d07a7006d7bdc8dcfc14ddc1b588b38fb81adab9989a8eef605757b" diff --git a/recipes/xorg-proto/all/conanfile.py b/recipes/xorg-proto/all/conanfile.py index f20cc54f7acb5..b6a780899bca5 100644 --- a/recipes/xorg-proto/all/conanfile.py +++ b/recipes/xorg-proto/all/conanfile.py @@ -45,10 +45,7 @@ def requirements(self): self.requires("xorg-macros/1.19.3") def package_id(self): - # self.info.clear() would be fine too, but keep the os to add c3i test coverage for Windows. - del self.info.settings.arch - del self.info.settings.build_type - del self.info.settings.compiler + self.info.clear() def export_sources(self): export_conandata_patches(self) diff --git a/recipes/xorg-proto/config.yml b/recipes/xorg-proto/config.yml index 2928e57dc1b28..0af5118e3b73a 100644 --- a/recipes/xorg-proto/config.yml +++ b/recipes/xorg-proto/config.yml @@ -1,4 +1,6 @@ versions: + "2024.1": + folder: "all" "2022.2": folder: "all" "2021.4": diff --git a/recipes/xorg/all/conanfile.py b/recipes/xorg/all/conanfile.py index 4b5a1dfb54844..18c7f048404e4 100644 --- a/recipes/xorg/all/conanfile.py +++ b/recipes/xorg/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.gnu import PkgConfig from conan.tools.system import package_manager from conan.errors import ConanInvalidConfiguration +from conan.tools.scm import Version required_conan_version = ">=1.50.0" @@ -73,8 +74,17 @@ def system_requirements(self): "libXScrnSaver", "xcb-util-wm", "xcb-util-image", "xcb-util-keysyms", "xcb-util-renderutil", "libxxf86vm", "libxv", "xkeyboard-config", "xcb-util", "xcb-util-cursor"], update=True, check=True) + if Version(conan_version) >= "2.0.10": + alpine = package_manager.Apk(self) + alpine.install(["libx11-dev", " libxcb-dev", "libfontenc-dev", "libice-dev", "libsm-dev", " libxau-dev", "libxaw-dev", + "libxcomposite-dev", "libxcursor-dev", "libxdamage-dev", "libxdmcp-dev", " libxext-dev", "libxfixes-dev", "libxi-dev", + "libxinerama-dev", "libxkbfile-dev", " libxmu-dev", "libxpm-dev", "libxrandr-dev", "libxrender-dev", "libxres-dev", + "libxscrnsaver-dev", "libxt-dev", "libxtst-dev", "libxv-dev", "libxxf86vm-dev", + "xcb-util-wm-dev", "xcb-util-image-dev", "xcb-util-keysyms-dev", "xcb-util-renderutil-dev", + "libxinerama-dev", "libxcb-dev", "xcb-util-dev", "xcb-util-cursor-dev"], update=True, check=True) + def package_info(self): - if conan_version.major >= 2: + if Version(conan_version) >= 2: self.cpp_info.bindirs = [] self.cpp_info.includedirs = [] self.cpp_info.libdirs = [] diff --git a/recipes/xsimd/all/conanfile.py b/recipes/xsimd/all/conanfile.py index ac136a09b4f10..b22729f3e5ce1 100644 --- a/recipes/xsimd/all/conanfile.py +++ b/recipes/xsimd/all/conanfile.py @@ -56,12 +56,6 @@ def validate(self): if Version(self.version) < "8.0.0" and is_apple_os(self) and self.settings.arch in ["armv8", "armv8_32", "armv8.3"]: raise ConanInvalidConfiguration(f"{self.ref} doesn't support macOS M1") - # TODO: There are compilation errors on apple-clang/13.0.0 with cppstd=17 - if self.settings.compiler == "apple-clang" and \ - Version(self.settings.compiler.version).major <= "13" and \ - self.settings.compiler.get_safe("cppstd") in ["17", "gnu17", "20", "gnu20",]: - raise ConanInvalidConfiguration(f"{self.ref} doesn't support apple-clang 13 with cppstd=17 or later") - if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) diff --git a/recipes/xsimd/all/test_package/test_package.cpp b/recipes/xsimd/all/test_package/test_package.cpp index be0d55dea1818..ed1e514c89b74 100644 --- a/recipes/xsimd/all/test_package/test_package.cpp +++ b/recipes/xsimd/all/test_package/test_package.cpp @@ -1,27 +1,17 @@ #include "xsimd/xsimd.hpp" #include -namespace xs = xsimd; - -#if XSIMD_VERSION_MAJOR >= 9 && (XSIMD_WITH_NEON64 || XSIMD_WITH_NEON) -using number_type = float; -#else -using number_type = double; -#endif - int main(int argc, char *argv[]) { + namespace xs = xsimd; #if XSIMD_VERSION_MAJOR < 8 - xs::batch a(1.5, 2.5, 3.5, 4.5); - xs::batch b(2.5, 3.5, 4.5, 5.5); -#elif XSIMD_VERSION_MAJOR < 9 - xs::batch a({1.5, 2.5, 3.5, 4.5}); - xs::batch b({2.5, 3.5, 4.5, 5.5}); + xs::batch a(1., 1.); + xs::batch b(2., 2.); #else - xs::batch a{1.5, 2.5, 3.5, 4.5}; - xs::batch b{2.5, 3.5, 4.5, 5.5}; + auto a = xs::broadcast(1.); + auto b = xs::broadcast(2.); #endif - auto mean = (a + b) / 2; - std::cout << mean << std::endl; + auto mean = (a + b) / 2.; + std::cout << "Mean: " << mean << std::endl; return 0; } diff --git a/recipes/xz_utils/all/conanfile.py b/recipes/xz_utils/all/conanfile.py index 388fe0cf2e851..212eb51f593cc 100644 --- a/recipes/xz_utils/all/conanfile.py +++ b/recipes/xz_utils/all/conanfile.py @@ -50,6 +50,13 @@ def _effective_msbuild_type(self): @property def _msbuild_target(self): return "liblzma_dll" if self.options.shared else "liblzma" + + @property + def _use_msbuild(self): + assume_clang_cl = (self.settings.os == "Windows" + and self.settings.compiler == "clang" + and self.settings.get_safe("compiler.runtime") is not None) + return is_msvc(self) or assume_clang_cl def export_sources(self): export_conandata_patches(self) @@ -68,7 +75,7 @@ def layout(self): basic_layout(self, src_folder="src") def build_requirements(self): - if self._settings_build.os == "Windows" and not is_msvc(self): + if self._settings_build.os == "Windows" and not self._use_msbuild: self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): self.tool_requires("msys2/cci.latest") @@ -77,7 +84,7 @@ def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): - if is_msvc(self): + if self._use_msbuild: tc = MSBuildToolchain(self) tc.configuration = self._effective_msbuild_type tc.generate() @@ -124,16 +131,24 @@ def _build_msvc(self): "", f"", ) + + if self.settings.arch == "armv8": + replace_in_file(self, vcxproj_file, "x64", "ARM64") + + solution_file = os.path.join(build_script_folder, "xz_win.sln") + if self.settings.arch == "armv8": + replace_in_file(self, solution_file, "x64", "ARM64") + #============================== msbuild = MSBuild(self) msbuild.build_type = self._effective_msbuild_type msbuild.platform = "Win32" if self.settings.arch == "x86" else msbuild.platform - msbuild.build(os.path.join(build_script_folder, "xz_win.sln"), targets=[self._msbuild_target]) + msbuild.build(os.path.join(build_script_folder, solution_file), targets=[self._msbuild_target]) def build(self): apply_conandata_patches(self) - if is_msvc(self): + if self._use_msbuild: self._build_msvc() else: autotools = Autotools(self) @@ -142,7 +157,7 @@ def build(self): def package(self): copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - if is_msvc(self): + if self._use_msbuild: inc_dir = os.path.join(self.source_folder, "src", "liblzma", "api") copy(self, "*.h", src=inc_dir, dst=os.path.join(self.package_folder, "include")) output_dir = os.path.join(self.source_folder, "windows") diff --git a/recipes/yoga/all/conandata.yml b/recipes/yoga/all/conandata.yml index 18301d4af4ddb..beedad9ab39c3 100644 --- a/recipes/yoga/all/conandata.yml +++ b/recipes/yoga/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.1.0": + url: "https://github.com/facebook/yoga/archive/refs/tags/v3.1.0.tar.gz" + sha256: "06ff9e6df9b2388a0c6ef8db55ba9bc2ae75e716e967cd12cf18785f6379159e" "3.0.4": url: "https://github.com/facebook/yoga/archive/refs/tags/v3.0.4.tar.gz" sha256: "ef3ce5106eed03ab2e40dcfe5b868936a647c5f02b7ffd89ffaa5882dca3ef7f" @@ -12,6 +15,10 @@ sources: url: "https://github.com/facebook/yoga/archive/refs/tags/v2.0.0.tar.gz" sha256: "29eaf05191dd857f76b6db97c77cce66db3c0067c88bd5e052909386ea66b8c5" patches: + "3.1.0": + - patch_file: "patches/0001-delete-tests.patch" + patch_description: "Delete test targets from cmake" + patch_type: "conan" "3.0.4": - patch_file: "patches/0001-delete-tests.patch" patch_description: "Delete test targets from cmake" diff --git a/recipes/yoga/config.yml b/recipes/yoga/config.yml index cc6badfba1fcc..542519cbca0f4 100644 --- a/recipes/yoga/config.yml +++ b/recipes/yoga/config.yml @@ -1,4 +1,6 @@ versions: + "3.1.0": + folder: all "3.0.4": folder: all "3.0.2": diff --git a/recipes/yyjson/all/conandata.yml b/recipes/yyjson/all/conandata.yml index 856586629c80e..bd4149d822688 100644 --- a/recipes/yyjson/all/conandata.yml +++ b/recipes/yyjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.10.0": + url: "https://github.com/ibireme/yyjson/archive/refs/tags/0.10.0.tar.gz" + sha256: "0d901cb2c45c5586e3f3a4245e58c2252d6b24bf4b402723f6179523d389b165" "0.9.0": url: "https://github.com/ibireme/yyjson/archive/refs/tags/0.9.0.tar.gz" sha256: "59902bea55585d870fd7681eabe6091fbfd1a8776d1950f859d2dbbd510c74bd" diff --git a/recipes/yyjson/config.yml b/recipes/yyjson/config.yml index b8cc90950df51..b53dac867c374 100644 --- a/recipes/yyjson/config.yml +++ b/recipes/yyjson/config.yml @@ -1,4 +1,6 @@ versions: + "0.10.0": + folder: all "0.9.0": folder: all "0.8.0": diff --git a/recipes/zlib-ng/all/conandata.yml b/recipes/zlib-ng/all/conandata.yml index 381191af68011..3d65b1bcb2280 100644 --- a/recipes/zlib-ng/all/conandata.yml +++ b/recipes/zlib-ng/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.1": + url: "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.2.1.tar.gz" + sha256: "ec6a76169d4214e2e8b737e0850ba4acb806c69eeace6240ed4481b9f5c57cdf" "2.1.7": url: "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.1.7.tar.gz" sha256: "59e68f67cbb16999842daeb517cdd86fc25b177b4affd335cd72b76ddc2a46d8" diff --git a/recipes/zlib-ng/all/conanfile.py b/recipes/zlib-ng/all/conanfile.py index 542293ad6b5d0..bee52f1ca8321 100644 --- a/recipes/zlib-ng/all/conanfile.py +++ b/recipes/zlib-ng/all/conanfile.py @@ -28,6 +28,7 @@ class ZlibNgConan(ConanFile): "with_new_strategies": [True, False], "with_native_instructions": [True, False], "with_reduced_mem": [True, False], + "with_runtime_cpu_detection": [True, False], } default_options = { "shared": False, @@ -38,6 +39,7 @@ class ZlibNgConan(ConanFile): "with_new_strategies": True, "with_native_instructions": False, "with_reduced_mem": False, + "with_runtime_cpu_detection": True, } def config_options(self): @@ -45,6 +47,8 @@ def config_options(self): del self.options.fPIC if Version(self.version) < "2.1.0": del self.options.with_reduced_mem + if Version(self.version) < "2.2.1": + del self.options.with_runtime_cpu_detection def configure(self): if self.options.shared: @@ -76,6 +80,8 @@ def generate(self): tc.variables["WITH_NATIVE_INSTRUCTIONS"] = self.options.with_native_instructions if Version(self.version) >= "2.1.0": tc.variables["WITH_REDUCED_MEM"] = self.options.with_reduced_mem + if Version(self.version) >= "2.2.1": + tc.variables["WITH_RUNTIME_CPU_DETECTION"] = self.options.with_runtime_cpu_detection tc.generate() def build(self): diff --git a/recipes/zlib-ng/config.yml b/recipes/zlib-ng/config.yml index fb2bcda46ea96..ff1fc8adbb40a 100644 --- a/recipes/zlib-ng/config.yml +++ b/recipes/zlib-ng/config.yml @@ -1,4 +1,6 @@ versions: + "2.2.1": + folder: all "2.1.7": folder: all "2.1.6": diff --git a/recipes/zookeeper-client-c/all/conandata.yml b/recipes/zookeeper-client-c/all/conandata.yml index 0487be945d8c9..30c4962751575 100644 --- a/recipes/zookeeper-client-c/all/conandata.yml +++ b/recipes/zookeeper-client-c/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.9.1": + url: "https://archive.apache.org/dist/zookeeper/zookeeper-3.9.1/apache-zookeeper-3.9.1.tar.gz" + sha256: "918f0fcf4ca8c53c2cccb97237ea72d2ccba978233ca85eff08f8ba077a8dadf" "3.9.0": url: "https://archive.apache.org/dist/zookeeper/zookeeper-3.9.0/apache-zookeeper-3.9.0.tar.gz" sha256: "c7af07e7411c798398bb8cd50f47780d8e014831666c41df6ec6540c143c0da2" @@ -6,6 +9,10 @@ sources: url: "https://archive.apache.org/dist/zookeeper/zookeeper-3.8.1/apache-zookeeper-3.8.1.tar.gz" sha256: "ccc16850c8ab2553583583234d11c813061b5ea5f3b8ff1d740cde6c1fd1e219" patches: + "3.9.1": + - patch_file: "patches/3.8.1-0001-add-install.patch" + patch_description: "add installer, disable cli program" + patch_type: "conan" "3.9.0": - patch_file: "patches/3.8.1-0001-add-install.patch" patch_description: "add installer, disable cli program" diff --git a/recipes/zookeeper-client-c/all/conanfile.py b/recipes/zookeeper-client-c/all/conanfile.py index ec48f11ba450f..020e3c8246146 100644 --- a/recipes/zookeeper-client-c/all/conanfile.py +++ b/recipes/zookeeper-client-c/all/conanfile.py @@ -44,12 +44,12 @@ def layout(self): def requirements(self): if self.options.with_cyrus_sasl: - self.requires("cyrus-sasl/2.1.27") + self.requires("cyrus-sasl/2.1.28") if self.options.with_openssl: self.requires("openssl/[>=1.1 <4]") def build_requirements(self): - self.tool_requires("maven/3.9.2") + self.tool_requires("maven/3.9.4") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -69,7 +69,9 @@ def build(self): apply_conandata_patches(self) # We have to install maven to generate jute files which are required by zookeeper-client - self.run("mvn compile", cwd=os.path.join(self.source_folder, "zookeeper-jute")) + # Override maven.repo.local to avoid writing to ~/.m2 + m2_repository = os.path.join(self.build_folder, "m2", "repository") + self.run(f'mvn compile -Dmaven.repo.local="{m2_repository}"', cwd=os.path.join(self.source_folder, "zookeeper-jute")) cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, "zookeeper-client", "zookeeper-client-c")) diff --git a/recipes/zookeeper-client-c/config.yml b/recipes/zookeeper-client-c/config.yml index 31b8685d6b74a..2bc00633d1dbc 100644 --- a/recipes/zookeeper-client-c/config.yml +++ b/recipes/zookeeper-client-c/config.yml @@ -1,4 +1,6 @@ versions: + "3.9.1": + folder: all "3.9.0": folder: all "3.8.1": diff --git a/recipes/zserio/all/conandata.yml b/recipes/zserio/all/conandata.yml index 252e1a38c700d..3d6ead71c8ec8 100644 --- a/recipes/zserio/all/conandata.yml +++ b/recipes/zserio/all/conandata.yml @@ -1,4 +1,14 @@ sources: + "2.14.1": + runtime: + url: "https://github.com/ndsev/zserio/releases/download/v2.14.1/zserio-2.14.1-runtime-libs.zip" + sha256: "ae3d7660ed3dd02fc77f535d7c7c721d9f03179c441efd0f4d09dc889da929fc" + compiler: + url: "https://github.com/ndsev/zserio/releases/download/v2.14.1/zserio-2.14.1-bin.zip" + sha256: "3280d620b2c23e01cc2e73bae9b60c93f94b23859c68edb1f105ba499b377049" + license: + url: "https://raw.githubusercontent.com/ndsev/zserio/v2.14.1/LICENSE" + sha256: "8fd7b040fc223bb07551dfed490df0d55d6af25e331e58bc7c7599163ed1bb5a" "2.14.0": runtime: url: "https://github.com/ndsev/zserio/releases/download/v2.14.0/zserio-2.14.0-runtime-libs.zip" diff --git a/recipes/zserio/config.yml b/recipes/zserio/config.yml index 24ddb8ef2b935..3c2e35ec8e993 100644 --- a/recipes/zserio/config.yml +++ b/recipes/zserio/config.yml @@ -1,4 +1,6 @@ versions: + "2.14.1": + folder: all "2.14.0": folder: all "2.13.0": diff --git a/recipes/zulu-openjdk/all/conandata.yml b/recipes/zulu-openjdk/all/conandata.yml index 9e14b09c940cf..79b65fbdb247a 100644 --- a/recipes/zulu-openjdk/all/conandata.yml +++ b/recipes/zulu-openjdk/all/conandata.yml @@ -1,4 +1,26 @@ sources: + "21.0.4": + "Windows": + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-win_x64.zip" + sha256: "d771dad10d3f0b440c3686d1f3d2b68b320802ac97b212d87671af3f2eef8848" + "armv8": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-win_aarch64.zip" + sha256: "9f873eccf030b1d3dc879ec1eb0ff5e11bf76002dc81c5c644c3462bf6c5146b" + "Linux": + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-linux_x64.tar.gz" + sha256: "318d0c2ed3c876fb7ea2c952945cdcf7decfb5264ca51aece159e635ac53d544" + "armv8": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-linux_aarch64.tar.gz" + sha256: "da3c2d7db33670bcf66532441aeb7f33dcf0d227c8dafe7ce35cee67f6829c4c" + "Macos": + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-macosx_x64.tar.gz" + sha256: "5ce75a6a247c7029b74c4ca7cf6f60fd2b2d68ce1e8956fb448d2984316b5fea" + "armv8": + url: "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-jdk21.0.4-macosx_aarch64.tar.gz" + sha256: "bc2750f81a166cc6e9c30ae8aaba54f253a8c8ec9d8cfc04a555fe20712c7bff" "21.0.1": "Windows": "x86_64": @@ -37,6 +59,38 @@ sources: "armv8": url: "https://cdn.azul.com/zulu/bin/zulu17.46.19-ca-jdk17.0.9-macosx_aarch64.tar.gz" sha256: "d6837676e55b97772b6512e253fdaf8ab282bb216c0f8366b6c5905cd02b5056" + "11.0.24": + "Linux": + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-linux_x64.tar.gz" + sha256: "a7aac0e69a99bf64a1a3ec96f08149ac069a5bbdaaefae922ee3a7465fd918b3" + "armv8": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-linux_aarch64.tar.gz" + sha256: "4f473e6307c465c037889981ae2cb3c4133648409c7331b6e57540a4896033e1" + "x86": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-linux_i686.tar.gz" + sha256: "d6e9f14562b6a6b89e37bc740e0700de8f831e81a64ce701ab0c5d6ba4fc1b71" + "Macos": + "armv8": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-macosx_aarch64.tar.gz" + sha256: "f8ac458076c10f13753b7342033aaa073b715ef798023acf155ba814bff67514" + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-macosx_x64.tar.gz" + sha256: "087ea956e8b43c89c732df8024e1344f686b02611c2c5449be6478299b9a9dac" + "SunOS": + "sparcv9": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-solaris_sparcv9.zip" + sha256: "82e8eb5887592f290cec095c6c8466a576c8d8049c1c5eb8987822fba3bfdbb7" + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-solaris_x64.zip" + sha256: "60b67de2325b7041e2495c5ae10574c960542fd7ad7eee1fef0d9bcaf63ce514" + "Windows": + "x86": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-win_i686.zip" + sha256: "bae034bc5075e31123f76980f3f3234150f68cbe96e48d288291b8ea6c5124f4" + "x86_64": + url: "https://cdn.azul.com/zulu/bin/zulu11.74.15-ca-jdk11.0.24-win_x64.zip" + sha256: "1b1870eb161076dcadf2c6f85855969484d907f44f11c1483d86e964dc946323" "11.0.19": "Windows": "x86_64": diff --git a/recipes/zulu-openjdk/config.yml b/recipes/zulu-openjdk/config.yml index d9b1272d1abe9..0ef2c791e311c 100644 --- a/recipes/zulu-openjdk/config.yml +++ b/recipes/zulu-openjdk/config.yml @@ -1,8 +1,12 @@ versions: + "21.0.4": + folder: all "21.0.1": folder: all "17.0.9": folder: all + "11.0.24": + folder: all "11.0.19": folder: all "11.0.15":