diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 3782948d20054..01c6e38a8a648 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -7,7 +7,6 @@ authorized_users: - Croydon - Johnnyxy - solvingj -- ericLemanissier - tru - sztomi - theodelrieu @@ -967,7 +966,7 @@ authorized_users: - kletoz - agilemapper - ZXfkSIE -- RubenRBS +- AbrilRBS - Alex-PLACET - antekone - ambroff @@ -1336,3 +1335,95 @@ authorized_users: - pierricgimmig - laci-aura - BenBudr +- PLeVasseur +- datalogics-staylor +- soroosh-sdi +- TheHugeManatee +- FannoFlow1 +- nayakche +- psi-func +- deniskovalchuk +- zarvox +- ErniGH +- culhatsker +- lubomirjurukov +- jmdaly +- inPhraZ +- nikolay-pv +- Julianiolo +- ErikHons +- enzo-pellegrini +- BLumia +- ydcpp +- tttapa +- zeeshancs07 +- jll63 +- Jie-Cheng +- jjardina +- soonick +- Mercotui +- sunbubble +- praetorian20 +- phbasler +- gsantner +- qihao727 +- qmfrederik +- NukeBird +- vijaiaeroastro +- xoorath +- mike919192 +- ScarletEmanu +- josephbirkner +- 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 +- joda01 +- raplonu +- mattkretz +- DannyLihard +- stevenwdv diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 6994382f1a936..db87d1261d8c9 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -23,6 +23,8 @@ required_for_references: - andreasbuhr-cppcoro - android-ndk - angelscript +- ann +- annoy - antlr4 - antlr4-cppruntime - any-lite @@ -42,6 +44,7 @@ required_for_references: - args-parser - argtable2 - argtable3 +- argz - armadillo - arrow - arsenalgear @@ -56,11 +59,14 @@ required_for_references: - async_simple - asyncly - asyncplusplus +- asyncpp +- atomic_queue - audiofile - autoconf - autoconf-archive - automake - avahi +- avcpp - avir - aws-c-auth - aws-c-cal @@ -78,6 +84,8 @@ required_for_references: - aws-lambda-cpp - aws-libfabric - aws-sdk-cpp +- azure-sdk-for-cpp +- azure-storage-cpp - b2 - b64 - backport-cpp @@ -86,6 +94,8 @@ required_for_references: - baical-p7 - bandit - base64 +- basu +- battery-embed - bazel - bdwgc - bear @@ -107,6 +117,7 @@ required_for_references: - blaze - blend2d - bliss +- bmx - boolean-lite - boolinq - boost @@ -116,6 +127,7 @@ required_for_references: - botan - box2d - breakpad +- bredis - brigand - brotli - brunsli @@ -136,6 +148,7 @@ required_for_references: - c-dbg-macro - c4core - caf +- cairo - cairomm - cajun-jsonapi - calceph @@ -150,6 +163,7 @@ required_for_references: - ccache - cccl - ccfits +- cctag - cctz - cd3-boost-unit-definitions - celero @@ -169,6 +183,7 @@ required_for_references: - chipmunk2d - choc - chunkio +- cigi-ccl - cimg - circularbuffer - cista @@ -199,6 +214,7 @@ required_for_references: - coin-osi - coin-utils - commata +- compute_library - concurrencpp - concurrentqueue - console_bridge @@ -210,6 +226,7 @@ required_for_references: - cotila - coz - cpp-channel +- cpp-dump - cpp-httplib - cpp-ipc - cpp-jwt @@ -218,6 +235,7 @@ required_for_references: - cpp-peglib - cpp-sort - cpp-validator +- cpp-yyjson - cpp_project_framework - cppbenchmark - cppcheck @@ -240,6 +258,8 @@ required_for_references: - cpuinfo - cpython - cqrlib +- cr +- crashpad - crc32c - crc_cpp - crcpp @@ -256,6 +276,7 @@ required_for_references: - csvmonkey - ctml - ctpg +- ctrack - ctre - cub - cubicinterpolation @@ -264,8 +285,10 @@ required_for_references: - cuda-samples - cunit - cute_headers +- cutlass - cvplot - cwalk +- cxxgraph - cxxopts - cyclonedds - cyclonedds-cxx @@ -283,6 +306,7 @@ required_for_references: - dbg-macro - dbus - dcmtk +- dd-opentracing-cpp - debug_assert - decimal_for_cpp - deco @@ -292,13 +316,16 @@ required_for_references: - dfp - di - dice-template-library +- diligent-core - dime - directshowbaseclasses - directx-headers - dirent - discount +- dispenso - djinni-generator - djinni-support-lib +- djvulibre - dlib - dlpack - dnet @@ -341,6 +368,7 @@ required_for_references: - embag - embedded_ringbuf_cpp - embree3 +- emhash - emio - emsdk - enchant @@ -353,6 +381,7 @@ required_for_references: - entityx - entt - enum-flags +- enumbitmask - erikzenker-hsm - erkir - etc2comp @@ -371,6 +400,7 @@ required_for_references: - ezc3d - faac - fakeit +- faker-cxx - farmhash - fast-cdr - fast-cpp-csv-parser @@ -389,6 +419,7 @@ required_for_references: - fftw - fire-hpp - fixed-containers +- fixed_math - flac - flann - flatbuffers @@ -404,6 +435,7 @@ required_for_references: - fmi3 - fmt - fmtlog +- folly - fontconfig - foonathan-lexy - foonathan-memory @@ -431,9 +463,11 @@ required_for_references: - fusepp - fxdiv - g3log +- gaia-ecs - gainput - gamenetworkingsockets - gamma +- gcc - gcem - gdal - gdbm @@ -445,6 +479,7 @@ required_for_references: - geographiclib - geos - geotrans +- getdns - getopt-for-visual-studio - gettext - gf-complete @@ -471,9 +506,11 @@ required_for_references: - glu - gm2calc - gmp +- gn - gnu-config - gnulib - gnutls +- gobject-introspection - godot-cpp - godot_headers - googleapis @@ -492,6 +529,7 @@ required_for_references: - gtest - gtk - gtk-doc-stub +- gtlab-logging - gtsam - guetzli - gumbo-parser @@ -553,12 +591,15 @@ required_for_references: - influxdb-cpp - influxdb-cxx - inih +- inipp - inja - intel-ipsec-mb - intel-neon2sse - intx - inversify-cpp - iowow +- ipaddress +- iphreeqc - iqa - irrxml - isa-l @@ -576,6 +617,7 @@ required_for_references: - jerryscript - jfalcou-eve - jinja2cpp +- jnk0le_ringbuffer - joltphysics - jom - jpcre2 @@ -587,6 +629,7 @@ required_for_references: - json_dto - jsoncons - jsoncpp +- jsonifier - jsonnet - jthread-lite - jungle @@ -596,16 +639,20 @@ required_for_references: - kainjow-mustache - kaitai_struct_cpp_stl_runtime - kangaru +- kcov - kcp - kdbindings +- kealib - keychain - khrplatform - kickcat - kissfft - kitten - kmod +- krb5 - ktx - kuba-zip +- kuliya - lager - laslib - laszip @@ -615,11 +662,13 @@ required_for_references: - lefticus-tools - lely-core - lemon +- leopard - leptonica - lerc - lest - leveldb - lexbor +- libaec - libaesgm - libaio - libalsa @@ -629,6 +678,7 @@ required_for_references: - libatomic_ops - libattr - libavif +- libavrocpp - libb2 - libbacktrace - libbasisu @@ -651,6 +701,7 @@ required_for_references: - libcurl - libcvd - libdaemon +- libdatrie - libdb - libdc1394 - libde265 @@ -674,6 +725,7 @@ required_for_references: - libevdev - libevent - libexif +- libfabric - libfdk_aac - libffi - libfork @@ -686,6 +738,7 @@ required_for_references: - libgd - libgeotiff - libgettext +- libgit2 - libglvnd - libgpg-error - libgphoto2 @@ -698,13 +751,18 @@ required_for_references: - libiberty - libiconv - libid3tag +- libidn +- libidn2 +- libigl - libinput - libinterpolate - libipt - libjpeg - libjpeg-turbo +- libjxl - libkml - libliftoff +- liblqr - liblsl - libltc - liblzf @@ -712,8 +770,10 @@ required_for_references: - libmagic - libmaxminddb - libmbus +- libmd - libmediainfo - libmemcached +- libmeshb - libmetalink - libmicrohttpd - libmikmod @@ -743,17 +803,22 @@ required_for_references: - libpcap - libpciaccess - libpfm4 +- libphonenumber - libpng +- libpointmatcher - libpq - libpqxx - libproperties +- libprotobuf-mutator - libpsl +- libqasm - libqrencode - librasterlite - libraw - librdkafka - librealsense - libressl +- librhash - librttopo - libsafec - libsamplerate @@ -769,6 +834,7 @@ required_for_references: - libslz - libsmacker - libsndfile +- libsndio - libsodium - libsolace - libspatialindex @@ -820,26 +886,31 @@ required_for_references: - libxshmfence - libxslt - libyaml +- libyang - libyuv - libzen - libzip - libzippp - lief +- lielab - lightgbm - lightpcapng - linmath.h - linux-headers-generic - linux-syscall-support +- liquid-dsp - litehtml - lksctp-tools - llama-cpp - llhttp +- llnl-units - llvm-openmp - lmdb - lodepng - log.c - log4cplus - log4cxx +- logfault - logr - loguru - ls-qpack @@ -862,12 +933,15 @@ required_for_references: - magic_enum - mailio - make +- makefile-project-workspace-creator +- manif - mapbox-geometry - mapbox-variant - mapbox-wagyu - mariadb-connector-c - marisa - matchit +- materialx - mathfu - mathter - matio @@ -887,6 +961,7 @@ required_for_references: - mdns - mdnsresponder - mdspan +- melon - mesa-glu - meshoptimizer - meson @@ -903,6 +978,8 @@ required_for_references: - mimalloc - mingw-builds - mingw-w64 +- minhook +- mini - miniaudio - minicoro - minimp3 @@ -913,7 +990,9 @@ required_for_references: - miniz - minizip - minizip-ng +- minmea - mio +- mlpack - mm_file - mocknetworkaccessmanager - modern-cpp-kafka @@ -931,6 +1010,7 @@ required_for_references: - mpdecimal - mpfr - mpg123 +- mpir - mpmcqueue - mppp - ms-gsl @@ -938,8 +1018,10 @@ required_for_references: - msdfgen - msgpack-c - msgpack-cxx +- msix - msys2 - mtdev +- mtfmt - mujs - muparser - muparserx @@ -957,12 +1039,14 @@ required_for_references: - nasm - ncurses - neargye-semver +- net-snmp - netcdf - nettle - newmat - nextsilicon-cpp-subprocess - nfrechette-acl - nghttp3 +- nifti_clib - ninja - nlohmann_json - nlopt @@ -1003,6 +1087,7 @@ required_for_references: - ogdf - ogg - ohnet +- ohpipeline - ois - onedpl - onetbb @@ -1037,9 +1122,13 @@ required_for_references: - openimageio - openjdk - openjpeg +- openldap - openmesh +- openmpi - openmvg - openpam +- openscenegraph +- openslide - openssh - openssl - opensubdiv @@ -1064,6 +1153,7 @@ required_for_references: - ozz-animation - p-ranav-glob - p7zip +- pagmo2 - paho-mqtt-c - paho-mqtt-cpp - pango @@ -1073,6 +1163,7 @@ required_for_references: - parson - patchelf - pathie-cpp +- pbc - pbtools - pcapplusplus - pcg-cpp @@ -1107,6 +1198,7 @@ required_for_references: - platform.exceptions - platform.hashing - platform.interfaces +- platformfolders - playrho - plf_colony - plf_indiesort @@ -1118,20 +1210,25 @@ required_for_references: - plusaes - plutovg - pngpp +- pocketfft - poco +- podofo - poly2tri - polylabel - polylineencoder - polymorphic_value +- popl - poppler-data - popt - portable-file-dialogs +- poselib - poshlib - pprint - pranav-csv2 - premake - pretty-name - primesieve +- pro-mdnsd - procxx-boost-ext-simd - proj - prometheus-cpp @@ -1161,15 +1258,18 @@ required_for_references: - qr-code-generator - qt - qtawesome +- qtxlsxwriter - quantlib - quaternions - quazip - quickcpplib +- quickfast - quickfix - quickjs - quill - quirc - qwt +- qxmpp - r8brain-free-src - rabbitmq-c - ragel @@ -1192,6 +1292,7 @@ required_for_references: - readerwriterqueue - readline - readosm +- rebound - recastnavigation - reckless - rectanglebinpack @@ -1202,6 +1303,7 @@ required_for_references: - refl-cpp - reflect-cpp - replxx +- resiprocate - resource_pool - restbed - restinio @@ -1211,6 +1313,7 @@ required_for_references: - rmm - roaring - robin-hood-hashing +- rocket - rocksdb - rotor - rpclib @@ -1224,6 +1327,7 @@ required_for_references: - rvo2 - rxcpp - s2geometry +- s2let - s2n - safe - safeint @@ -1232,6 +1336,7 @@ required_for_references: - sassc - sbepp - sbp +- scc - scdoc - scip - scippp @@ -1243,6 +1348,7 @@ required_for_references: - sdf - sdl - sdl_image +- sdl_mixer - sdl_net - sdl_ttf - seadex-essentials @@ -1260,17 +1366,21 @@ required_for_references: - serial - sfl - sfml +- shaderc - shapelib - shield - si - signals-light - sigslot +- simd - simde - simdjson - simdutf - simfil - simple-websocket-server - simple-yaml +- simple_enum +- sioclient - sjson-cpp - skyr-url - sleef @@ -1297,6 +1407,7 @@ required_for_references: - spirv-cross - spirv-headers - spirv-tools +- splunk-opentelemetry-cpp - spscqueue - spy - sqlcipher @@ -1311,6 +1422,7 @@ required_for_references: - ssht - ssp - st_tree +- statistic - statslib - status-code - status-value-lite @@ -1318,8 +1430,10 @@ required_for_references: - stc - stdgpu - stduuid +- stella-cv-fbow - stlab - strawberryperl +- streaming-percentiles - streamvbyte - string-view-lite - stringtoolbox @@ -1333,6 +1447,7 @@ required_for_references: - svector - svgpp - svgwrite +- swig - symengine - systemc - systemc-cci @@ -1363,9 +1478,11 @@ required_for_references: - tgbot - tgc - thelink2012-any +- thorvg - threadpool - thrift - thrust +- tidwall-neco - tidy-html5 - timsort - tinkerforge-bindings @@ -1376,6 +1493,7 @@ required_for_references: - tiny-utf8 - tinyalsa - tinycbor +- tinycolormap - tinycthread - tinycthreadpool - tinydir @@ -1437,12 +1555,14 @@ required_for_references: - units - unity - univalue +- unleash-client-cpp - unordered_dense - unqlite - upx - urdfdom - urdfdom_headers - uriparser +- userspace-rcu - usockets - usrsctp - utf8.h @@ -1464,6 +1584,7 @@ required_for_references: - velodyne_decoder - veque - very-simple-smtps +- vigra - vincentlaucsb-csv-parser - vir-simd - visit_struct @@ -1498,6 +1619,7 @@ required_for_references: - wil - wildcards - wildmidi +- wineditline - winflexbison - winmd - winreg @@ -1507,6 +1629,7 @@ required_for_references: - wslay - wt - wtl +- wxwidgets - wyhash - xapian-core - xbyak @@ -1543,12 +1666,15 @@ required_for_references: - yandex-ozo - yas - yasm +- ydcpp-tcpcat - yder - yoga +- yomm2 - yyjson - z3 - zbar - zeromq +- zeus_expected - zfp - zimg - zint diff --git a/.c3i/config_v1.yml b/.c3i/config_v1.yml index 68c6f4fbb39ea..b670d616b36d2 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.0 + version: 1.65.0 artifactory: url: "https://c3i.jfrog.io/c3i" @@ -36,8 +36,6 @@ tasks: # Requirements to merge a given pull-request: # * check_runs refers to notifications from GH actions # * status_checks refers to notifications coming from external tools (Jenkins, CLA,...) - check_runs: - - name: "Lint changed files (YAML files)" status_checks: - name: "license/cla" - name: "continuous-integration/jenkins/pr-merge" @@ -52,9 +50,8 @@ tasks: - llvm parallel_strategy: unlimited cci: - conan_v2_run_export: false write_comments: true - detailed_status_checks: true + detailed_status_checks: false update_labels: true build_bump_deps_pr: false description_bump_deps_pr: ":vertical_traffic_light: Thank for your Bump dependencies PR. The build service will be triggered soon by a Conan team member." @@ -163,6 +160,7 @@ pod_size: large: - "duckdb" - "ceres-solver" + - "simd" xlarge: - "llvm" - "opengv" diff --git a/.c3i/config_v2.yml b/.c3i/config_v2.yml index c4ac212386ed7..5eb6c2e1d2d9c 100644 --- a/.c3i/config_v2.yml +++ b/.c3i/config_v2.yml @@ -3,7 +3,7 @@ id: 'conan-io/conan-center-index' conan: - version: 2.2.2 + 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/" @@ -45,8 +45,7 @@ tasks: - gstreamer parallel_strategy: unlimited cci: - conan_v2_run_export: false - detailed_status_checks: false + detailed_status_checks: true write_comments: false update_labels: false build_bump_deps_pr: false @@ -56,10 +55,12 @@ tasks: regression: "> **Regression**: Conan v2 builds are mandatory and they are required for the PR to be merged, because this recipe worked with Conan v2 previously." text_on_failure: "The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping `@conan-io/barbarians` on the PR and we will help you." collapse_on_success: false - collapse_on_failure: true + collapse_on_failure: false 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 a5e7a155eee13..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 @@ -33,9 +57,6 @@ reviewers: - user: "theirix" type: "community" request_reviews: false - - user: "ericLemanissier" - type: "community" - request_reviews: false - user: "prince-chrismc" type: "community" request_reviews: false @@ -57,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 @@ -81,12 +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 diff --git a/.c3i/waitlist_users.yml b/.c3i/waitlist_users.yml index ead4b94c37882..4be8317a18a4b 100644 --- a/.c3i/waitlist_users.yml +++ b/.c3i/waitlist_users.yml @@ -2,3 +2,11 @@ waitlist_users: - Mike-Solar - retroandchill - refactorTractor +- jjbel +- synaptics-lspintzyk +- wer14 +- connor-i-clark +- NeXuS4Developer +- sabapathim +- pixelsoba +- liss-h diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3f6e08d2479e9..80d0ac7cd4153 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,10 +1,15 @@ -Specify library name and version: **lib/1.0** - +### Summary +Changes to recipe: **lib/[version]** +#### Motivation + + +#### Details + ---- -- [ ] I've read the [contributing guidelines](https://github.com/conan-io/conan-center-index/blob/master/CONTRIBUTING.md). -- [ ] I've used a [recent](https://github.com/conan-io/conan/releases/latest) Conan client version close to the [currently deployed](https://github.com/conan-io/conan-center-index/blob/master/.c3i/config_v1.yml#L6). -- [ ] I've tried at least one configuration locally with the [conan-center hook](https://github.com/conan-io/hooks.git) activated. +--- +- [ ] Read the [contributing guidelines](https://github.com/conan-io/conan-center-index/blob/master/CONTRIBUTING.md) +- [ ] Checked that this PR is not a duplicate: [list of PRs by recipe](https://github.com/conan-io/conan-center-index/discussions/24240) +- [ ] Tested locally with at least one configuration using a recent version of Conan diff --git a/.github/actions/alert-community/action.yml b/.github/actions/alert-community/action.yml deleted file mode 100644 index ca390cd38b4e7..0000000000000 --- a/.github/actions/alert-community/action.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "Alert Community" -description: "Comment on pull request if certain files changes" -author: "prince-chrismc" -inputs: - files: - description: "Check for changes using only this list of files (Defaults to the entire repo)" - required: true - default: "" - reviewers: - description: "List of users to mention (make sure to include the @)" - required: true - default: "" - -runs: - using: "composite" - steps: - # Assume the repo checked out the code since this is running - - uses: ./.github/actions/pr_changed_files - id: changed_files - with: - files: ${{ inputs.files }} - - if: always() && steps.changed_files.outputs.any_changed == 'true' - uses: actions/github-script@v6 - with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `:robot: **Beep Boop**! This pull request is making changes to '${{ inputs.files }}'.\n\n:wave: ${{ inputs.reviewers }} you might be interested. :wink:` - }) diff --git a/.github/workflows/alert-community.yml b/.github/workflows/alert-community.yml deleted file mode 100644 index 76a1a4165dd49..0000000000000 --- a/.github/workflows/alert-community.yml +++ /dev/null @@ -1,472 +0,0 @@ -name: "[service] Alert Community" - -on: - pull_request_target: - types: [opened] - -env: - PYVER: "3.10" - -jobs: - comment: - if: github.repository == 'conan-io/conan-center-index' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: master - - - uses: ./.github/actions/alert-community - with: - files: "docs/*/*" - reviewers: "@prince-chrismc @MartinDelille @Croydon" - - - uses: ./.github/actions/alert-community - with: - files: ".github/*/*" - reviewers: "@ericLemanissier @Croydon" - - - uses: ./.github/actions/alert-community - with: - files: "linter/*/*" - reviewers: "@ericLemanissier @Croydon" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/aaf/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/abseil/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/armadillo/*/*" - reviewers: "@samuel-emrys" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/avahi/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/b2/*/*" - reviewers: "@grafikrobot" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/bandit/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/benchmark/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/boost/*/*" - reviewers: "@grafikrobot @Hopobcn @jwillikers @paulharris" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/boost-ext-ut/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/bzip2/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/cereal/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/cmake/*/*" - reviewers: "@Croydon" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/cppcheck/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/create-dmg/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/dbus/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/double-conversion/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/eigen/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/elfio/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/ffmpeg/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/fmt/*/*" - reviewers: "@Hopobcn @jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/folly/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/foxi/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/fp16/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/g3log/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/gcc/*/*" - reviewers: "@samuel-emrys" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/geotrans/*/*" - reviewers: "@samuel-emrys" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/gflags/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/glew/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/glfw/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/glog/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/gtest/*/*" - reviewers: "@Hopobcn @jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/imath/*/*" - reviewers: "@irieger" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/imgui/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/implot/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/jemalloc/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libalsa/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libarchive/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libbacktrace/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libcap/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libcurl/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libdwarf/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libelf/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libevent/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libffi/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libiberty/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libiconv/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libltc/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libpng/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libraw/*/*" - reviewers: "@irieger" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libsodium/*/*" - reviewers: "@Hopobcn @paulharris" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libspatialite/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libunwind/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libuuid/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libxml2/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/llvm-core/*/*" - reviewers: "@Hopobcn @paulharris" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/lyra/*/*" - reviewers: "@grafikrobot" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/lz4/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/mocknetworkaccessmanager/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/ms-gsl/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/nlohmann_json/*/*" - reviewers: "@Hopobcn @jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/onnx/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/openapi-generator/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/opencolorio/*/*" - reviewers: "@irieger" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/openexr/*/*" - reviewers: "@irieger" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/opengl/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/opengl-registry/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/openimageio/*/*" - reviewers: "@irieger" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/openssl/*/*" - reviewers: "@Hopobcn @Croydon" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/protobuf/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/psimd/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/qtawesome/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/qt/*/*" - reviewers: "@ericLemanissier @jwillikers @MartinDelille @paulharris" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/quazip/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/rtmidi/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/sentry-*/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/shapelib/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/snappy/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/snowhouse/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/uncrustify/*/*" - reviewers: "@MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/wayland/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/wayland-protocols/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/xkbcommon/*/*" - reviewers: "@jwillikers" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/xorg/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/yaml-cpp/*/*" - reviewers: "@jwillikers @MartinDelille" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/xz_utils/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/zlib/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/zstd/*/*" - reviewers: "@Hopobcn" - - - uses: ./.github/actions/alert-community - with: - files: "recipes/libhal/*/*" - reviewers: "@kammce" diff --git a/.github/workflows/linter-conan-v2.yml b/.github/workflows/linter-conan-v2.yml deleted file mode 100644 index 9b437a26e46d8..0000000000000 --- a/.github/workflows/linter-conan-v2.yml +++ /dev/null @@ -1,124 +0,0 @@ -name: "[linter] Conan v2 migration" - -on: - pull_request: - -env: - PYTHONPATH: ${{github.workspace}} - PYVER: "3.8" - REQUIREMENTS: "pylint==2.14" - -jobs: - test_linter: - name: Test linter changes (v2 migration) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Get changed files - uses: ./.github/actions/pr_changed_files - id: changed_files - with: - files: | - linter/** - .github/workflows/linter-conan-v2.yml - - - name: Get Conan v1 version - id: parse_conan_v1_version - if: steps.changed_files.outputs.any_changed == 'true' - uses: mikefarah/yq@master - with: - cmd: yq '.conan.version' '.c3i/config_v1.yml' - - - uses: actions/setup-python@v4 - if: steps.changed_files.outputs.any_changed == 'true' - with: - python-version: ${{ env.PYVER }} - - - name: Install requirements - if: steps.changed_files.outputs.any_changed == 'true' - run: | - pip install ${{ env.REQUIREMENTS }} conan==${{ steps.parse_conan_v1_version.outputs.result }} - - - name: Execute linter over all recipes in the repository - id: linter_recipes - if: steps.changed_files.outputs.any_changed == 'true' - run: | - echo '## Linter summary (recipes)' >> $GITHUB_STEP_SUMMARY - pylint --rcfile=linter/pylintrc_recipe `ls recipes/*/*/conanfile.py | shuf -n 500` --output-format=json --output=recipes.json --score=y --exit-zero - jq '[map( select(.type=="error")) | group_by (.message)[] | {message: .[0].message, length: length}] | sort_by(.length) | reverse' recipes.json > recipes2.json - jq -r '.[] | " * \(.message): \(.length)"' recipes2.json >> $GITHUB_STEP_SUMMARY - - - name: Execute linter over all test_package/recipes in the repository - id: linter_test_package - if: steps.changed_files.outputs.any_changed == 'true' - run: | - echo '## Linter summary (test_package)' >> $GITHUB_STEP_SUMMARY - pylint --rcfile=linter/pylintrc_testpackage `ls recipes/*/*/test_package/conanfile.py | shuf -n 500` --output-format=json --output=recipes.json --exit-zero - jq '[map( select(.type=="error")) | group_by (.message)[] | {message: .[0].message, length: length}] | sort_by(.length) | reverse' recipes.json > recipes2.json - jq -r '.[] | " * \(.message): \(.length)"' recipes2.json >> $GITHUB_STEP_SUMMARY - - conanfile_recipe: - name: Lint changed conanfile.py (v2 migration) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Get changed files - id: changed-files - uses: ./.github/actions/pr_changed_files - with: - files: | - recipes/*/*/conanfile.py - - name: Get Conan v1 version - id: parse_conan_v1_version - if: steps.changed-files.outputs.any_changed == 'true' - uses: mikefarah/yq@master - with: - cmd: yq '.conan.version' '.c3i/config_v1.yml' - - uses: actions/setup-python@v4 - if: steps.changed-files.outputs.any_changed == 'true' - with: - python-version: ${{ env.PYVER }} - - name: Install dependencies - if: steps.changed-files.outputs.any_changed == 'true' - run: | - pip install ${{ env.REQUIREMENTS }} conan==${{ steps.parse_conan_v1_version.outputs.result }} - - name: Run linter - if: steps.changed-files.outputs.any_changed == 'true' - run: | - echo "::add-matcher::linter/recipe_linter.json" - for file in ${{ steps.changed-files.outputs.all_changed_files }}; do - pylint --rcfile=linter/pylintrc_recipe --output-format=parseable ${file} - done - - conanfile_test_package: - name: Lint changed test_package/conanfile.py (v2 migration) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Get changed files - id: changed-files - uses: ./.github/actions/pr_changed_files - with: - files: | - recipes/*/*/test_*/conanfile.py - - name: Get Conan v1 version - id: parse_conan_v1_version - if: steps.changed-files.outputs.any_changed == 'true' - uses: mikefarah/yq@master - with: - cmd: yq '.conan.version' '.c3i/config_v1.yml' - - uses: actions/setup-python@v4 - if: steps.changed-files.outputs.any_changed == 'true' - with: - python-version: ${{ env.PYVER }} - - name: Install dependencies - if: steps.changed-files.outputs.any_changed == 'true' - run: | - pip install ${{ env.REQUIREMENTS }} conan==${{ steps.parse_conan_v1_version.outputs.result }} - - name: Run linter - if: steps.changed-files.outputs.any_changed == 'true' - run: | - echo "::add-matcher::linter/recipe_linter.json" - for file in ${{ steps.changed-files.outputs.all_changed_files }}; do - pylint --rcfile=linter/pylintrc_testpackage --ignore-paths="recipes/[^/]*/[^/]*/test_v1[^/]*/conanfile.py" --output-format=parseable ${file} - done 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/CONTRIBUTING.md b/CONTRIBUTING.md index 6e24832e93e98..e947909b42988 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ To contribute follow the next steps: got everything working or even if you need help. Add the text to the issue body (besides other comments): "fixes #IssueNumber" in the body of the PR, referring to the issue of step 1. -The Conan Community works hard to review all the pull requests and provided assistance where need. +The Conan Community works hard to review all the pull requests and provide assistance where need. The [Review Process](docs/review_process.md) is partially automated with the help of @conan-center-index-bot :rocket: ## Issues diff --git a/README.md b/README.md index 3206926309aed..61da8cef3d1e9 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ You can open issues in the [issue tracker](https://github.com/conan-io/conan-cen - Specify the name and version (`zlib/1.2.11`) and any relevant details about the fail configuration: Applied profile, building machine... * :bulb: Request a **new library** to be added: - - Use the `[request]` label to search the library in the issue tracker in case the it was already requested. + - Use the `[request]` label to search the library in the issue tracker in case it was already requested. - If not, use the same `[request]` tag in the title of the issue to help identifying them. - Indicate the name and the version of the library you would like to have in the repository. Also links to the project's website, source download/repository and in general any relevant information that helps creating a recipe for it. 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 80a83e5335fbf..3a93fcb8bad12 100644 --- a/docs/adding_packages/dependencies.md +++ b/docs/adding_packages/dependencies.md @@ -178,14 +178,29 @@ 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: + +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 version range only when a requirement for a newer version is needed. -* Libcurl: `[>=X.YY <9]`, where `X.YY` is the minimum version of Libcurl required, starting from `7.78` -* Zlib: `[>=1.2.11 <2]` expect if the recipe needs a newer lower version for specific reasons -* Libpng: `[>=1.6 <2]` expect if the recipe needs a newer lower version for specific reasons +* Libcurl: `[>=7.78 <9]` +* Zlib: `[>=1.2.11 <2]` +* Libpng: `[>=1.6 <2]` +* Expat: `[>=2.6.2 <3]` +* Libxml2: `[>=2.12.5 <3]` +* Libuv: `[>=1 <2]` +* 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 @@ -196,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 3d6b985571d20..ecdf3c49ada2f 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,20 @@ # 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 +- [feature] Add support for Conan 1.64.1 in the CI + ### 03-April-2024 - 13:53 CEST - [feature] Add support for Conan 2.2.2 in the CI diff --git a/docs/community_resources.md b/docs/community_resources.md index 06aa0558a52f3..4600ca89ac451 100644 --- a/docs/community_resources.md +++ b/docs/community_resources.md @@ -19,19 +19,12 @@ If you are looking to stay up to date with the last Conan news, follow us on Twi - [Updatable Recipes](https://github.com/qchateau/conan-center-bot): Automatically scans available recipes and checked for new upstream releases and tests one configuration - The results can be found here: https://qchateau.github.io/conan-center-bot/#/updatable -- [Conflicting Pull Requests](https://github.com/ericLemanissier/conan-center-conflicting-prs): Checks all the open pull requests for those which edit the same -recipe files and posts a message. - - The results can be found here: https://ericlemanissier.github.io/conan-center-conflicting-prs/ - [Pending Review](https://github.com/prince-chrismc/conan-center-index-pending-review) - The results can be found here: https://prince-chrismc.github.io/conan-center-index-pending-review/ -- [Pull Request In Progress Status](https://ericlemanissier.github.io/conan-center-pr-status/in_progress_jobs) - [System Package Checks](https://github.com/bincrafters/system-packages-checks): Builds automatically all `system` versions of recipes merged on CCI and being pull requested on a selection of Linux distributions and FreeBSD - The results can be found here: https://bincrafters.github.io/system-packages-checks/ ## Tools -- [FreeBSD Testing](https://github.com/ericLemanissier/conan-center-index/tree/freebsd): Detects pull requests with `FreeBSD` in the description and runs a test for -one configuration on that platform - - The results can be found here: https://github.com/ericLemanissier/conan-center-index/actions?query=workflow%3ACI - [Bincrafters Conventions](https://github.com/bincrafters/bincrafters-conventions): Automatically updates Conan recipes to the latest conventions and rules diff --git a/docs/consuming_recipes.md b/docs/consuming_recipes.md index a777e97d08e79..c7f4c917b6788 100644 --- a/docs/consuming_recipes.md +++ b/docs/consuming_recipes.md @@ -51,7 +51,7 @@ Using your own ArtifactoryCE instance is easy. You can [deploy it on-premise](ht [use only this remote](https://docs.conan.io/1/reference/commands/misc/remote.html?highlight=add%20new) and new recipe revisions are only pushed to your Artifactory after they have been validated in your project. -The minimum solution, if still choosing to rely on ConanCenter directly, involves small changes to your client configuration by pinning the revision of every reference you consume in your project using using: +The minimum solution, if still choosing to rely on ConanCenter directly, involves small changes to your client configuration by pinning the revision of every reference you consume in your project using the following: - [recipe revision (RREV)](https://docs.conan.io/1/versioning/revisions.html) can be added to each requirement. Instead of `fmt/9.1.0` you can add a pound (or hashtag) to the end followed by the revision `fmt/9.1.0#c93359fba9fd21359d8db6f875d8a233`. diff --git a/docs/developing_recipes_locally.md b/docs/developing_recipes_locally.md index 2d101facc3b5e..6a82d992574ed 100644 --- a/docs/developing_recipes_locally.md +++ b/docs/developing_recipes_locally.md @@ -76,12 +76,12 @@ We recommend working from the `recipes/project` folder itself. You can learn abo > **Note**: You can only change one recipe per pull request, and working from the [_recipe folder_](adding_packages/README.md#the-recipe-folder-conanfilepy) will help prevent making a few mistakes. The default for this folder is `all`, follow the link above to learn more. -The [entire workflow of a recipe](https://docs.conan.io/1/developing_packages/package_dev_flow.html) can be execute with the [`conan create`](https://docs.conan.io/1/reference/commands/creator/create.html). This should look like: +The [entire workflow of a recipe](https://docs.conan.io/1/developing_packages/package_dev_flow.html) can be executed with the [`conan create`](https://docs.conan.io/1/reference/commands/creator/create.html). This should look like: * `conan create all/conanfile.py 0.0.0@ -pr:b=default -pr:h=default` ConanCenter also has a few [support settings and options](supported_platforms_and_configurations.md) which highly recommend to test. For example -`conan create all/conanfile.py 0.0.0@ -o project:shared=True -s build_type=Debug` is a easy way to test more configurations ensuring the package is correct. +`conan create all/conanfile.py 0.0.0@ -o project:shared=True -s build_type=Debug` is an easy way to test more configurations ensuring the package is correct. ### Try it yourself @@ -165,7 +165,7 @@ schema validation. There's are to encourage the best possible quality of recipes ### Yamlschema * (Recommended) Use a dedicated Python virtualenv. -* Ensure you have required tools installed: `strictyaml` and `argparse` (better to uses fixed versions) +* Ensure you have required tools installed: `strictyaml` and `argparse` (better to use fixed versions) ```sh pip install strictyaml==1.16 argparse==1.4 diff --git a/docs/linters.md b/docs/linters.md index c108d63beb5a0..075f373f209ef 100644 --- a/docs/linters.md +++ b/docs/linters.md @@ -14,17 +14,7 @@ to configure plugins, warnings and errors which should be enabled or disabled. * [Understanding the different linters](#understanding-the-different-linters) * [Running the linters locally](#running-the-linters-locally) - * [Pylint configuration files](#pylint-configuration-files) - * [Linter Warning and Errors](#linter-warning-and-errors) - * [E9006 - conan-import-conanfile: ConanFile should be imported from conan](#e9006---conan-import-conanfile-conanfile-should-be-imported-from-conan) - * [E9005 - conan-missing-name: Every conan recipe must contain the attribute name](#e9005---conan-missing-name-every-conan-recipe-must-contain-the-attribute-name) - * [E9004 - conan-package-name: Conan package names must be lower-case](#e9004---conan-package-name-conan-package-names-must-be-lower-case) - * [E9007 - conan-test-no-name: Do not add name attribute in test package recipes](#e9007---conan-test-no-name-do-not-add-name-attribute-in-test-package-recipes) - * [E9008 - conan-import-errors: Deprecated imports should be replaced by new imports](#e9008---conan-import-errors-deprecated-imports-should-be-replaced-by-new-imports) - * [E9009 - conan-import-error-conanexception: conans.errors is deprecated and conan.errors should be used instead](#e9009---conan-import-error-conanexception-conanserrors-is-deprecated-and-conanerrors-should-be-used-instead) - * [E9010 - conan-import-error-conaninvalidconfiguration: conans.errors is deprecated and conan.errors should be used instead](#e9010---conan-import-error-conaninvalidconfiguration-conanserrors-is-deprecated-and-conanerrors-should-be-used-instead) - * [E9011 - conan-import-tools: Importing conan.tools or conan.tools.xxx.zzz.yyy should be considered as private](#e9011---conan-import-tools-importing-conantools-or-conantoolsxxxzzzyyy-should-be-considered-as-private) - * [E9012 - conan-attr-version: Recipe should not contain version attribute](#e9012---conan-attr-version-recipe-should-not-contain-version-attribute) + * [Pylint configuration files](#pylint-configuration-files) ## Understanding the different linters @@ -42,149 +32,3 @@ Check the [Developing Recipes](developing_recipes_locally.md) for more informati - [Pylint Recipe](../linter/pylintrc_recipe): This `rcfile` lists plugins and rules to be executed over all recipes (not test package) and validate them. - [Pylint Test Package Recipe](../linter/pylintrc_testpackage): This `rcfile` lists plugins and rules to be executed over all recipes in test package folders only: - -## Linter Warning and Errors - -Here is the list of current warning and errors provided by pylint, when using CCI configuration. - -### E9006 - conan-import-conanfile: ConanFile should be imported from conan - -```python -from conans import ConanFile -``` - -Should be replaced by: - -```python -from conan import Conanfile -``` - -### E9005 - conan-missing-name: Every conan recipe must contain the attribute name - -The attribute `name` is always expected. On the other hand, `version` should not be listed. - -```python -def BazConanfile(ConanFile): - name = "baz" -``` - -### E9004 - conan-package-name: Conan package names must be lower-case - -The package name is always lower-case, even when the upstream uses another format - -```python -def FoobarConanfile(ConanFile): - name = "foobar" -``` - -### E9007 - conan-test-no-name: Do not add name attribute in test package recipes - -The test package is not a recipe, thus, it should not have a name - -```python -def TestPackageConanFile(ConanFile): - name = "test_package" # Wrong! -``` - -### E9008 - conan-import-errors: Deprecated imports should be replaced by new imports - -Read [v2_linter](v2_linter.md) for a list of mappings of v1 to v2. -Regular imports from `conans.tools` are now updated: - -```python -from conans import tools -... - -tools.rmdir(os.path.join(self.package_folder, "shared")) -``` - -Should be replaced by specialized tools, prepared for Conan 2.0 - -```python -from conan.tools.files import rmdir -... - -rmdir(self, os.path.join(self.package_folder, "shared")) -``` - -### E9009 - conan-import-error-conanexception: conans.errors is deprecated and conan.errors should be used instead - -```python -from conans.errors import ConanException -``` - -Should be replaced by: - -```python -from conan.errors import ConanException -``` - -Only the namespace `conans` has been replaced by `conan`. - -### E9010 - conan-import-error-conaninvalidconfiguration: conans.errors is deprecated and conan.errors should be used instead - -```python -from conans.errors import ConanInvalidConfiguration -``` - -Should be replaced by: - -```python -from conan.errors import ConanInvalidConfiguration -``` - -Only the namespace `conans` has been replaced by `conan`. - -### E9011 - conan-import-tools: Importing conan.tools or conan.tools.xxx.zzz.yyy should be considered as private - -Documented on [conanfile.tools](https://docs.conan.io/1/reference/conanfile/tools.html): -It's not allowed to use `tools.xxx` directly: - -```python -from conan import tools -... - -tools.scm.Version(self.version) -``` - -Neither sub modules: - -```python -from conan.tools.apple.apple import is_apple_os -``` - -Only modules under `conan.tools` and `conan.tools.xxx` are allowed: - -```python -from conan.tools.files import rmdir -from conan.tools import scm -``` - -### E9012 - conan-attr-version: Recipe should not contain version attribute - -All recipes on CCI should be generic enough to support as many versions as possible, so enforcing a specific -version as attribute will not allow to re-use the same recipe for multiple release versions. - -```python -from conan import ConanFile - -class FooConanFile(ConanFile): - version = "1.0.0" # Wrong! -``` - -The package version should be passed as command argument, e.g: - - conan create all/ 1.0.0@ -pr:h=default -pr:b=default - -Or, if you are running Conan 2.0: - - conan create all/ --version=1.0.0 -pr:h=default -pr:b=default - -The only exception is when providing ``system`` packages, which are allowed. - -```python -from conan import ConanFile - -class FooConanFile(ConanFile): - version = "system" # Okay! -``` diff --git a/docs/package_templates/README.md b/docs/package_templates/README.md index 76d696e57b0a0..1ea369a63a8ee 100644 --- a/docs/package_templates/README.md +++ b/docs/package_templates/README.md @@ -12,7 +12,7 @@ It's listed under [cmake_package](cmake_package) folder. It fits projects which #### Header only -It's listed under [header_only](header_only) folder. It fits projects which only copy header and have the same package ID always. +It's listed under [header_only](header_only) folder. It fits projects which only copy header and have the same package ID always. Please note that if the library in question does have a build system (e.g. CMake, Meson, Autotools) that contains install logic - that should be the preferred starting point for the recipe. Copying files directly into the package folder should be reserved for header only libraries where the upstream project does not provide this functionality. #### MSBuild package diff --git a/docs/package_templates/autotools_package/all/conanfile.py b/docs/package_templates/autotools_package/all/conanfile.py index 2bd1c8b1bd5e9..199bd122132bc 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/[>=2.2 <3]") # 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/docs/v2_migration.md b/docs/v2_migration.md deleted file mode 100644 index 9139fefbde135..0000000000000 --- a/docs/v2_migration.md +++ /dev/null @@ -1,147 +0,0 @@ -# Preparing recipes for Conan 2.0 - -This is expected for recipes to be updates in each pull request. - -- Updated helpers are expected, this is enforced by the [v2_linter](v2_linter.md) -- Once a recipe publishes v2 packages, it must pass the v2 pipeline -- The v2 pipeline with **shortly be required** for changes to be merged. - - -## Contents - - * [Using Layout](#using-layout) - * [With New Generators](#with-new-generators) - * [With Multiple Build Helpers](#with-multiple-build-helpers) - * [CMakeToolchain](#cmaketoolchain) - * [New conf_info properties](#new-conf_info-properties) - * [New cpp_info set_property model](#new-cpp_info-set_property-model) - * [Translating .names information to cmake_target_name, cmake_module_target_name and cmake_file_name](#translating-names-information-to-cmake_target_name-cmake_module_target_name-and-cmake_file_name) - * [Translating .filenames information to cmake_file_name, cmake_module_file_name and cmake_find_mode](#translating-filenames-information-to-cmake_file_name-cmake_module_file_name-and-cmake_find_mode) - * [Translating .build_modules to cmake_build_modules](#translating-build_modules-to-cmake_build_modules) - * [PkgConfigDeps](#pkgconfigdeps) - -> **Note**: Read about the [linter in pull requests](v2_linter.md) to learn how this is being enforced. - -It's time to start thinking seriously about Conan v2 and prepare recipes -for the incoming changes. Conan v2 comes with many -changes and improvements, you can read about them in the -[Conan documentation](https://docs.conan.io/1/conan_v2.html). - -This document is a practical guide, offering extended information particular to Conan -Center Index recipes to get them ready to upgrade to Conan 2.0. - -## Using Layout - -All recipes should use a layout. Without one, more manual configuration of folders (e.g. source, build, etc) -and package structure will be required. - -### With New Generators - -When doing this there is no need to manually define `self._subfolder_[...]` in a recipe. -Simply use `self.source_folder` and `self.build_folder` instead of "subfolder properties" that used to be the norm. - -### With Multiple Build Helpers - -When different build tools are use, at least one layout needs to be set. - -```python - def layout(self): - if self._use_cmake(): - cmake_layout(self) - else: # using autotools - basic_layout(self) -``` - -The `src_folder` must be the same when using different layouts and should -not depend on settings or options. - -## CMakeToolchain - -The old `CMake.definition` should be replaced by `CMakeToolchain.variables` and moved to the `generate` method. -However, certain options need to be passed as `cache_variables`. You'll need to check project's `CMakeLists.txt` -as there are a few cases to look out for: - -- When an `option` is configured before `project()` is called. - - ```cmake - cmake_minimum_required(3.1) - option(BUILD_EXAMPLES "Build examples using foorbar") - project(foobar) - ``` - -- When an variable is declared with `CACHE`. - - ```cmake - cmake_minimum_required(3.1) - project(foobar) - set(USE_JPEG ON CACHE BOOL "include jpeg support?") - ``` - -For more information refere to the [CMakeToolchain docs](https://docs.conan.io/1/reference/conanfile/tools/cmake/cmaketoolchain.html) -or check out the converstaion in conan-io/conan#11937 for the brave. - -## New conf_info properties - -As described in the documentation `self.user_info` has been depreated and you are now required to use -`self.conf_info` to define individual properties to expose to downstream recipes. -The [2.0 migrations docs](https://docs.conan.io/1/migrating_to_2.0/recipes.html#removed-self-user-info) -should cover the technical details, however for ConanCenterIndex we need to make sure there are no collisions -`conf_info` must be named `user.:`. - -For usage options of `conf_info`, the [documenation](https://docs.conan.io/1/reference/config_files/global_conf.html?highlight=conf_info#configuration-in-your-recipes) - -In ConanCenterIndex this will typically looks like: - -- defining a value - ```py - def package_info(self): - tool_path = os.path.join(self.package_folder, "bin", "tool") - self.conf_info.define("user.pkg:tool", tool_path) - ``` -- using a value - ```py - #generators = "VirtualBuildEnv", "VirtualRunEnv" - - def build_requirements(self): - self.tool_requires("tool/0.1") - - def build(self): - tool_path = self.conf_info.get("user.pkg:tool") - self.run(f"{tool_path} --build") - ``` - -> **Note**: This should only be used when absolutely required. In the vast majority of cases, the new -> ["Environments"](https://docs.conan.io/1/reference/conanfile/tools/env/environment.html?highlight=Virtual) -> will include the `self.cpp_info.bindirs` which will provide access to the tools in the correct scopes. - -## New cpp_info set_property model - -New Conan generators like -[CMakeDeps](https://docs.conan.io/1/reference/conanfile/tools/cmake/cmakedeps.html) -and -[PkgConfigDeps](https://docs.conan.io/1/reference/conanfile/tools/gnu/pkgconfigdeps.html), -don't listen to `cpp_info`'s ``.names``, ``.filenames`` or ``.build_modules`` attributes. -There is a new way of setting the `cpp_info` information with these -generators using the ``set_property(property_name, value)`` method. - -Both of these two models **will live together in recipes** to make -recipes compatible for both 1.x and 2.0 users. Deprecated feilds are not to be removed at this time. - -To understand the impact of these and the relation between different generates, refer to the -[migrating properties](https://docs.conan.io/1/migrating_to_2.0/properties.html) documentation. - -### Translating .names information to cmake_target_name, cmake_module_target_name and cmake_file_name - -The variation of `names` is covered by the [Conan documentation](https://docs.conan.io/1/migrating_to_2.0/properties.html#migrating-from-names-to-cmake-target-name). - -### Translating .filenames information to cmake_file_name, cmake_module_file_name and cmake_find_mode - -As for `filenames`, refer to [this section](https://docs.conan.io/1/migrating_to_2.0/properties.html#migrating-from-filenames-to-cmake-file-name). - -### Translating .build_modules to cmake_build_modules - -The variation of `build_modules` is covered by the [Conan documentation](https://docs.conan.io/1/migrating_to_2.0/properties.html#translating-build-modules-to-cmake-build-modules). - -### PkgConfigDeps - -For migrating, `names` used with `pkg_config`, see [Conan documentation](https://docs.conan.io/1/migrating_to_2.0/properties.html#migration-from-names-to-pkg-config-name) diff --git a/linter/check_import_conanfile.py b/linter/check_import_conanfile.py deleted file mode 100644 index bd5a90391b096..0000000000000 --- a/linter/check_import_conanfile.py +++ /dev/null @@ -1,28 +0,0 @@ - -from pylint.checkers import BaseChecker -from pylint.interfaces import IAstroidChecker -from astroid import nodes, Const, AssignName - - -class ImportConanFile(BaseChecker): - """ - Import ConanFile from new 'conan' module - """ - - __implements__ = IAstroidChecker - - name = "conan-import-conanfile" - msgs = { - "E9006": ( - "Import ConanFile from new module: `from conan import ConanFile`. Old import is deprecated in Conan v2.", - "conan-import-conanfile", - "Import ConanFile from new module: `from conan import ConanFile`. Old import is deprecated in Conan v2.", - ), - } - - def visit_importfrom(self, node: nodes.ImportFrom) -> None: - basename = node.modname - if basename == 'conans': - names = [name for name, _ in node.names] - if 'ConanFile' in names: - self.add_message("conan-import-conanfile", node=node) diff --git a/linter/check_import_errors.py b/linter/check_import_errors.py deleted file mode 100644 index b6a0ac1aa9973..0000000000000 --- a/linter/check_import_errors.py +++ /dev/null @@ -1,77 +0,0 @@ - -from pylint.checkers import BaseChecker -from pylint.interfaces import IAstroidChecker -from astroid import nodes, Const, AssignName - - -class ImportErrors(BaseChecker): - """ - Import errors from new 'conan' module - """ - - __implements__ = IAstroidChecker - - name = "conan-import-errors" - msgs = { - "E9008": ( - "Import errors from new module: `from conan import errors`. Old import is deprecated in Conan v2.", - "conan-import-errors", - "Import errors from new module: `from conan import errors`. Old import is deprecated in Conan v2.", - ), - } - - def visit_importfrom(self, node: nodes.ImportFrom) -> None: - basename = node.modname - if basename == 'conans': - names = [name for name, _ in node.names] - if 'errors' in names: - self.add_message("conan-import-errors", node=node) - - -class ImportErrorsConanException(BaseChecker): - """ - Import errors from new 'conan' module - """ - - __implements__ = IAstroidChecker - - name = "conan-import-error-conanexception" - msgs = { - "E9009": ( - "Import ConanException from new module: `from conan.errors import ConanException`. Old import is deprecated in Conan v2.", - "conan-import-error-conanexception", - "Import ConanException from new module: `from conan.errors import ConanException`. Old import is deprecated in Conan v2.", - ), - } - - def visit_importfrom(self, node: nodes.ImportFrom) -> None: - basename = node.modname - if basename == 'conans.errors': - names = [name for name, _ in node.names] - if 'ConanException' in names: - self.add_message("conan-import-error-conanexception", node=node) - - -class ImportErrorsConanInvalidConfiguration(BaseChecker): - """ - Import errors from new 'conan' module - """ - - __implements__ = IAstroidChecker - - name = "conan-import-error-conaninvalidconfiguration" - msgs = { - "E9010": ( - "Import ConanInvalidConfiguration from new module: `from conan.errors import ConanInvalidConfiguration`. Old import is deprecated in Conan v2.", - "conan-import-error-conaninvalidconfiguration", - "Import ConanInvalidConfiguration from new module: `from conan.errors import ConanInvalidConfiguration`. Old import is deprecated in Conan v2.", - ), - } - - def visit_importfrom(self, node: nodes.ImportFrom) -> None: - basename = node.modname - if basename == 'conans.errors': - names = [name for name, _ in node.names] - if 'ConanInvalidConfiguration' in names: - self.add_message("conan-import-error-conaninvalidconfiguration", node=node) - diff --git a/linter/check_import_tools.py b/linter/check_import_tools.py deleted file mode 100644 index 1621c7b3dfd2a..0000000000000 --- a/linter/check_import_tools.py +++ /dev/null @@ -1,30 +0,0 @@ -import re -from email.mime import base -from pylint.checkers import BaseChecker -from pylint.interfaces import IAstroidChecker -from astroid import nodes, Const, AssignName - - -class ImportTools(BaseChecker): - """ - Import tools following pattern 'from conan.tools.xxxx import yyyyy' - """ - - __implements__ = IAstroidChecker - - name = "conan-import-tools" - msgs = { - "E9011": ( - "Import tools following pattern 'from conan.tools.xxxx import yyyyy' (https://docs.conan.io/en/latest/reference/conanfile/tools.html).", - "conan-import-tools", - "Import tools following pattern 'from conan.tools.xxxx import yyyyy' (https://docs.conan.io/en/latest/reference/conanfile/tools.html).", - ), - } - - def visit_importfrom(self, node: nodes.ImportFrom) -> None: - basename = node.modname - names = [name for name, _ in node.names] - if basename == 'conan' and 'tools' in names: - self.add_message("conan-import-tools", node=node) - elif re.match(r'conan\.tools\.[^.]+\..+', basename): - self.add_message("conan-import-tools", node=node) diff --git a/linter/check_layout_src_folder.py b/linter/check_layout_src_folder.py deleted file mode 100644 index b7d418884ca45..0000000000000 --- a/linter/check_layout_src_folder.py +++ /dev/null @@ -1,44 +0,0 @@ -from pylint.checkers import BaseChecker -from pylint.interfaces import IAstroidChecker -from astroid import nodes - -WHY_SRC_FOLDER = "Setting the `src_folder` for layouts will help keep an organized and clean workspace when developing recipes locally. " \ - "The extra folder will help ensure there are no collisions between the upstream sources and recipe's exports - which " \ - "also extends to what happens in the cache when creating packages" - - -class LayoutSrcFolder(BaseChecker): - """ - Ensure `src_folder=src` when using built-in layouts - """ - - __implements__ = IAstroidChecker - - name = "conan-layout-src-folder" - msgs = { - "E9012": ( - "layout is missing `src_folder` argument which should be to `src`", - "conan-missing-layout-src-folder", - WHY_SRC_FOLDER, - ), - "E9013": ( - "layout should set `src_folder` to `src`", - "conan-layout-src-folder-is-src", - WHY_SRC_FOLDER, - ), - } - - def visit_call(self, node: nodes.Call) -> None: - if not isinstance(node.func, nodes.Name): - return - - if node.func.name in ["cmake_layout", "bazel_layout", "basic_layout"]: - for kw in node.keywords: - if kw.arg == "src_folder": - if not kw.value or kw.value.as_string().strip("\"'") != "src": - self.add_message( - "conan-layout-src-folder-is-src", node=node, line=node.lineno - ) - break - else: - self.add_message("conan-missing-layout-src-folder", node=node, line=node.lineno) diff --git a/linter/check_package_name.py b/linter/check_package_name.py deleted file mode 100644 index 4c302243ff26c..0000000000000 --- a/linter/check_package_name.py +++ /dev/null @@ -1,52 +0,0 @@ -from pylint.checkers import BaseChecker -from pylint.interfaces import IAstroidChecker -from astroid import nodes, Const, AssignName -from pathlib import Path - - -class PackageName(BaseChecker): - """ - All packages must have a lower-case name - """ - - __implements__ = IAstroidChecker - - name = "conan-package-name" - msgs = { - "E9004": ( - "Reference name should be all lowercase", - "conan-bad-name", - "Use only lower-case on the package name: `name = 'foobar'`." - ), - "E9005": ( - "Missing name attribute", - "conan-missing-name", - "The member attribute `name` must be declared: `name = 'foobar'`." - ), - "E9007": ( - "No 'name' attribute in test_package conanfile", - "conan-test-no-name", - "No 'name' attribute in test_package conanfile." - ), - } - - def visit_classdef(self, node: nodes) -> None: - filename = Path(node.root().file) - is_test = filename.match('test_*/*.py') - - if node.basenames == ['ConanFile']: - for attr in node.body: - children = list(attr.get_children()) - if len(children) == 2 and \ - isinstance(children[0], AssignName) and \ - children[0].name == "name" and \ - isinstance(children[1], Const): - if is_test: - self.add_message("conan-test-no-name", node=attr, line=attr.lineno) - return - value = children[1].as_string() - if value.lower() != value: - self.add_message("conan-bad-name", node=attr, line=attr.lineno) - return - if not is_test: - self.add_message("conan-missing-name", node=node) diff --git a/linter/check_version_attribute.py b/linter/check_version_attribute.py deleted file mode 100644 index 66e61f47ef183..0000000000000 --- a/linter/check_version_attribute.py +++ /dev/null @@ -1,33 +0,0 @@ -from pylint.checkers import BaseChecker -from pylint.interfaces import IAstroidChecker -from astroid import nodes, Const, AssignName - - -class VersionAttribute(BaseChecker): - """ - All packages should not enforce a specific version in the recipe - """ - - __implements__ = IAstroidChecker - - name = "conan-attr-version" - msgs = { - "E9014": ( - "Recipe should not contain version attribute", - "conan-forced-version", - "Do not enforce a specific version in your recipe. Keep it generic for any version." - ), - } - - def visit_classdef(self, node: nodes) -> None: - if node.basenames == ['ConanFile']: - for attr in node.body: - children = list(attr.get_children()) - if len(children) == 2 and \ - isinstance(children[0], AssignName) and \ - children[0].name == "version" and \ - isinstance(children[1], Const): - value = children[1].as_string().replace('"', "").replace("'", "") - if value and value != "system": - self.add_message("conan-forced-version", node=attr, line=attr.lineno) - return diff --git a/linter/conandata_yaml_linter.py b/linter/conandata_yaml_linter.py index 51d27b850beec..ac9cc25487e7a 100644 --- a/linter/conandata_yaml_linter.py +++ b/linter/conandata_yaml_linter.py @@ -1,7 +1,7 @@ import argparse from strictyaml import ( - load, - Map, + dirty_load, + MapCombined, Str, YAMLValidationError, MapPattern, @@ -28,30 +28,34 @@ def main(): ) args = parser.parse_args() - patch_fields = Map( + patch_fields = MapCombined( { "patch_file": Str(), - "patch_description": Str(), - "patch_type": Enum( + Optional("patch_description"): Str(), + Optional("patch_type"): Enum( ["official", "conan", "portability", "bugfix", "vulnerability"] ), Optional("patch_source"): Str(), # No longer required for v2 recipes with layouts Optional("base_path"): Str(), - } + }, + Str(), + Any() ) - schema = Map( + schema = MapCombined( { "sources": MapPattern(Str(), Any(), minimum_keys=1), Optional("patches"): MapPattern(Str(), Seq(Any()), minimum_keys=1), - } + }, + Str(), + Any(), ) with open(args.path, encoding="utf-8") as f: content = f.read() try: - parsed = load(content, schema) + parsed = dirty_load(content, schema, allow_flow_style=True) except YAMLValidationError as error: pretty_print_yaml_validate_error(args, error) # Error when "source" is missing or when "patches" has no versions return @@ -78,19 +82,6 @@ def main(): pretty_print_yaml_validate_warning(args, error) # Warning when patch fields are not followed continue - # Make sure `patch_source` exists where it's encouraged - type = parsed["patches"][version][i]["patch_type"] - if ( - type in ["official", "bugfix", "vulnerability"] - and not "patch_source" in patch - ): - print( - f"::warning file={args.path},line={type.start_line},endline={type.end_line}," - f"title=conandata.yml schema warning" - f"::'patch_type' should have 'patch_source' as per {CONANDATA_YAML_URL}#patch_type" - " it is expected to have a source (e.g. a URL) to where it originates from to help with" - " reviewing and consumers to evaluate patches" - ) def pretty_print_yaml_validate_error(args, error): diff --git a/linter/conanv2_transition.py b/linter/conanv2_transition.py deleted file mode 100644 index e330ff1d44590..0000000000000 --- a/linter/conanv2_transition.py +++ /dev/null @@ -1,24 +0,0 @@ -""" - -Pylint plugin/rules for conanfiles in Conan Center Index - -""" - -from pylint.lint import PyLinter -from linter.check_package_name import PackageName -from linter.check_import_conanfile import ImportConanFile -from linter.check_import_errors import ImportErrorsConanException, ImportErrorsConanInvalidConfiguration, ImportErrors -from linter.check_import_tools import ImportTools -from linter.check_layout_src_folder import LayoutSrcFolder -from linter.check_version_attribute import VersionAttribute - - -def register(linter: PyLinter) -> None: - linter.register_checker(PackageName(linter)) - linter.register_checker(ImportConanFile(linter)) - linter.register_checker(ImportErrors(linter)) - linter.register_checker(ImportErrorsConanException(linter)) - linter.register_checker(ImportErrorsConanInvalidConfiguration(linter)) - linter.register_checker(ImportTools(linter)) - linter.register_checker(LayoutSrcFolder(linter)) - linter.register_checker(VersionAttribute(linter)) diff --git a/linter/yamllint_rules.yml b/linter/yamllint_rules.yml index 7c0ce102ddc36..73ceb7e5ad923 100644 --- a/linter/yamllint_rules.yml +++ b/linter/yamllint_rules.yml @@ -1,25 +1,22 @@ extends: default rules: + colons: disable document-start: level: error present: false document-end: level: error present: false + empty-lines: disable empty-values: forbid-in-block-mappings: true forbid-in-flow-mappings: true line-length: disable - indentation: - level: error - new-line-at-end-of-file: - level: error - trailing-spaces: - level: error - comments: - level: error - comments-indentation: - level: error + indentation: disable + new-line-at-end-of-file: disable + trailing-spaces: disable + comments: disable + comments-indentation: disable new-lines: type: unix key-duplicates: diff --git a/recipes/7bitdi/all/conandata.yml b/recipes/7bitdi/all/conandata.yml index a38a06daf64fb..ad96c33d43330 100644 --- a/recipes/7bitdi/all/conandata.yml +++ b/recipes/7bitdi/all/conandata.yml @@ -1,4 +1,13 @@ 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" + "3.2.0": + url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v3.2.0.tar.gz" + sha256: "4549b651a28b309a31cb3b879b7f31069cbca041cfb9ffad82ccc26f78b8e5e0" "3.1.0": url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v3.1.0.tar.gz" sha256: "345bf91e2a33cfe98628cac98c75488ddd55232b8c4bcfeba9b5001fec8d4f7c" diff --git a/recipes/7bitdi/all/conanfile.py b/recipes/7bitdi/all/conanfile.py index 3bdbdc03629c3..6709e44476413 100644 --- a/recipes/7bitdi/all/conanfile.py +++ b/recipes/7bitdi/all/conanfile.py @@ -1,21 +1,20 @@ 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 required_conan_version = ">=1.53.0" - class SevenBitDIConan(ConanFile): name = "7bitdi" + description = "a simple C++ dependency injection library." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/7bitcoder/7bitDI" - description = "7bitDI is a simple C++ dependency injection library." topics = ("cpp17", "dependency-injector", "injector", "header-only") - url = "https://github.com/conan-io/conan-center-index" - license = "MIT" package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -29,6 +28,10 @@ class SevenBitDIConan(ConanFile): "fPIC": True, } + @property + def _min_cppstd(self): + return 17 + @property def _minimum_compilers_version(self): return { @@ -61,12 +64,11 @@ def validate(self): compiler_name = str(compiler) if compiler.get_safe("cppstd"): - check_min_cppstd(self, 17) - + check_min_cppstd(self, self._min_cppstd) minimum_version = self._minimum_compilers_version.get(compiler_name, False) if minimum_version and Version(compiler.version) < minimum_version: raise ConanInvalidConfiguration( - f"Requires compiler {compiler_name} minimum version: {minimum_version} with C++17 support." + f"{self.ref} requires compiler {compiler_name} minimum version: {minimum_version} with C++{self._min_cppstd} support." ) def source(self): diff --git a/recipes/7bitdi/config.yml b/recipes/7bitdi/config.yml index 9a995179e264f..3fbfbf1ec3bc5 100644 --- a/recipes/7bitdi/config.yml +++ b/recipes/7bitdi/config.yml @@ -1,4 +1,10 @@ versions: + "3.4.0": + folder: all + "3.3.0": + folder: all + "3.2.0": + folder: all "3.1.0": folder: all "3.0.0": diff --git a/recipes/aaf/all/conanfile.py b/recipes/aaf/all/conanfile.py index ee7906ff05936..471ea8132e2ce 100644 --- a/recipes/aaf/all/conanfile.py +++ b/recipes/aaf/all/conanfile.py @@ -35,7 +35,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("libjpeg/9e") if self.settings.os in ("FreeBSD", "Linux"): self.requires("util-linux-libuuid/2.39") diff --git a/recipes/abseil/all/conandata.yml b/recipes/abseil/all/conandata.yml index c6bc5198c7de0..fa078f9fc7138 100644 --- a/recipes/abseil/all/conandata.yml +++ b/recipes/abseil/all/conandata.yml @@ -1,4 +1,10 @@ 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" "20240116.1": url: "https://github.com/abseil/abseil-cpp/archive/20240116.1.tar.gz" sha256: "3c743204df78366ad2eaf236d6631d83f6bc928d1705dd0000b872e53b73dc6a" @@ -15,6 +21,24 @@ 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" + patch_type: "portability" + patch_source: "https://github.com/abseil/abseil-cpp/issues/1100" + - patch_file: "patches/20240116.1-0001-fix-filesystem-include.patch" + 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" @@ -24,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 bcfa3c446e426..55ae607eb9d58 100644 --- a/recipes/abseil/all/conanfile.py +++ b/recipes/abseil/all/conanfile.py @@ -70,9 +70,14 @@ def validate(self): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) - if self.options.shared and is_msvc(self): + if self.options.shared and is_msvc(self) and Version(self.version) < "20230802.1": # 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 (yet)") + 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") @@ -161,7 +166,7 @@ def _load_components_from_cmake_target_file(self, absl_target_file_path): if cmake_function_name == "add_library": cmake_imported_target_type = cmake_function_args[1] if cmake_imported_target_type in ["STATIC", "SHARED"]: - components[potential_lib_name]["libs"] = [potential_lib_name] if cmake_target_nonamespace != "abseil_dll" else [] + components[potential_lib_name]["libs"] = [potential_lib_name] if cmake_target_nonamespace != "abseil_dll" else ['abseil_dll'] elif cmake_function_name == "set_target_properties": target_properties = re.findall(r"(?PINTERFACE_COMPILE_DEFINITIONS|INTERFACE_INCLUDE_DIRECTORIES|INTERFACE_LINK_LIBRARIES)[\n|\s]+(?P.+)", cmake_function_args[2]) for target_property in target_properties: 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 4db2fe8f16b71..d29c717557868 100644 --- a/recipes/abseil/config.yml +++ b/recipes/abseil/config.yml @@ -1,4 +1,8 @@ versions: + "20240722.0": + folder: all + "20240116.2": + folder: all "20240116.1": folder: all "20230802.1": diff --git a/recipes/ada/all/conandata.yml b/recipes/ada/all/conandata.yml index 235136d4b7acf..d02f03916e176 100644 --- a/recipes/ada/all/conandata.yml +++ b/recipes/ada/all/conandata.yml @@ -1,46 +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 50d72ec6cb8b6..29ab8232ac483 100644 --- a/recipes/ada/config.yml +++ b/recipes/ada/config.yml @@ -1,31 +1,15 @@ versions: - "2.7.8": - folder: all - "2.7.7": - folder: all - "2.7.5": + "2.9.2": folder: all - "2.7.4": + "2.9.1": folder: all - "2.7.3": + "2.9.0": 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 0a73cd9fc973b..28d9619ab0124 100644 --- a/recipes/android-ndk/all/conandata.yml +++ b/recipes/android-ndk/all/conandata.yml @@ -1,4 +1,30 @@ 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": + url: "https://dl.google.com/android/repository/android-ndk-r26d-windows.zip" + sha256: "9b285da57a36818cb65ea5b93ec74f8138f48a40182ff2994f6aade4580ed597" + "Linux": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r26d-linux.zip" + sha256: "eefeafe7ccf177de7cc57158da585e7af119bb7504a63604ad719e4b2a328b54" + "Macos": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r26d-darwin.zip" + sha256: "ee2d0531685a69164fc0a66705d3a30109223f6fc01f1008ca5d8bc3a32d628d" "r26c": "Windows": "x86_64": diff --git a/recipes/android-ndk/all/conanfile.py b/recipes/android-ndk/all/conanfile.py index ecf241f5b5a1a..76b9a2ead193a 100644 --- a/recipes/android-ndk/all/conanfile.py +++ b/recipes/android-ndk/all/conanfile.py @@ -300,12 +300,13 @@ def package_info(self): self.conf_info.update("tools.build:compiler_executables", compiler_executables) self.buildenv_info.define_path("CC", compiler_executables["c"]) self.buildenv_info.define_path("CXX", compiler_executables["cpp"]) + self.buildenv_info.define_path("AS", compiler_executables["c"]) + self.buildenv_info.define_path("LD", compiler_executables["cpp"]) # Versions greater than 23 had the naming convention # changed to no longer include the triplet. bare = self._ndk_version_major >= 23 self.buildenv_info.define_path("AR", self._define_tool_var("AR", "ar", bare)) - self.buildenv_info.define_path("AS", self._define_tool_var("AS", "as", bare)) self.buildenv_info.define_path("RANLIB", self._define_tool_var("RANLIB", "ranlib", bare)) self.buildenv_info.define_path("STRIP", self._define_tool_var("STRIP", "strip", bare)) self.buildenv_info.define_path("ADDR2LINE", self._define_tool_var("ADDR2LINE", "addr2line", bare)) @@ -317,12 +318,6 @@ def package_info(self): if self._ndk_version_major < 23: self.buildenv_info.define_path("ELFEDIT", self._define_tool_var("ELFEDIT", "elfedit", bare)) - # The `ld` tool changed naming conventions earlier than others - if self._ndk_version_major >= 22: - self.buildenv_info.define_path("LD", self._define_tool_var_naked("LD", "ld")) - else: - self.buildenv_info.define_path("LD", self._define_tool_var("LD", "ld")) - self.buildenv_info.define("ANDROID_PLATFORM", f"android-{self.settings_target.os.api_level}") self.buildenv_info.define("ANDROID_TOOLCHAIN", "clang") self.buildenv_info.define("ANDROID_ABI", self._android_abi) diff --git a/recipes/android-ndk/all/test_package/conanfile.py b/recipes/android-ndk/all/test_package/conanfile.py index db186fc2c369f..1c03586bc651b 100644 --- a/recipes/android-ndk/all/test_package/conanfile.py +++ b/recipes/android-ndk/all/test_package/conanfile.py @@ -1,6 +1,8 @@ from conan import ConanFile from conan.tools.cmake import CMake, cmake_layout +from conan.tools.scm import Version import os +import platform class TestPackgeConan(ConanFile): @@ -22,10 +24,14 @@ def build(self): cmake.build() def test(self): - if self.settings.os == "Windows": - self.run("ndk-build.cmd --version") + ndk_build = "ndk-build.cmd" if self.settings.os == "Windows" else "ndk-build" + ndk_version = Version(self.tested_reference_str.split('/')[1]) + skip_run = platform.system() == "Darwin" and "arm" in platform.processor() and ndk_version < "r23c" + if not skip_run: + self.run(f"{ndk_build} --version", env="conanbuild") else: - self.run("ndk-build --version") + self.output.warning("Skipped running ndk-build on macOS Apple Silicon in arm64 mode, please use a newer" + " version of the Android NDK") # INFO: Run the project that was built using Android NDK if self.settings.os == "Android": diff --git a/recipes/android-ndk/all/test_v1_package/conanfile.py b/recipes/android-ndk/all/test_v1_package/conanfile.py deleted file mode 100644 index d61cc4e4da75e..0000000000000 --- a/recipes/android-ndk/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,32 +0,0 @@ -import os -from conan import ConanFile -from conans import CMake -from conan.tools.build import cross_building - - -class TestPackgeConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - test_type = "explicit" - generators = "cmake", "cmake_find_package_multi" - - def build_requirements(self): - self.build_requires(self.tested_reference_str) - - def build(self): - # It only makes sense to build a library, if the target os is Android - if self.settings.os == "Android": - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not cross_building(self): - if self.settings.os == "Windows": - self.run("ndk-build.cmd --version", run_environment=True) - else: - self.run("ndk-build --version", run_environment=True) - - # Run the project that was built using Android NDK - if self.settings.os == "Android": - test_file = os.path.join("bin", "test_package") - assert os.path.exists(test_file) diff --git a/recipes/android-ndk/config.yml b/recipes/android-ndk/config.yml index 2f8b2364c9c1c..5a16edd20d5af 100644 --- a/recipes/android-ndk/config.yml +++ b/recipes/android-ndk/config.yml @@ -1,4 +1,8 @@ versions: + "r27": + folder: all + "r26d": + folder: all "r26c": folder: all "r26b": 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/ann/all/CMakeLists.txt b/recipes/ann/all/CMakeLists.txt new file mode 100644 index 0000000000000..869e7fed035ec --- /dev/null +++ b/recipes/ann/all/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 3.15) +project(ANN LANGUAGES CXX) + +include(GNUInstallDirs) + +file(GLOB ANN_SRC_FILES ${ANN_SRC_DIR}/src/*.cpp) + +add_library(ANN ${ANN_SRC_FILES}) +target_include_directories(ANN PUBLIC ${ANN_SRC_DIR}/include) + +if(WIN32) + if(BUILD_SHARED_LIBS) + set_target_properties(ANN PROPERTIES + CXX_VISIBILITY_PRESET hidden + VISIBILITY_INLINES_HIDDEN TRUE + ) + target_compile_definitions(ANN PRIVATE DLL_EXPORTS) + else() + target_compile_definitions(ANN PUBLIC ANN_STATIC) + endif() +endif() + +install(DIRECTORY ${ANN_SRC_DIR}/include/ANN DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install( + TARGETS ANN + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) diff --git a/recipes/ann/all/conandata.yml b/recipes/ann/all/conandata.yml new file mode 100644 index 0000000000000..664adc9ca8f3c --- /dev/null +++ b/recipes/ann/all/conandata.yml @@ -0,0 +1,12 @@ +sources: + "1.1.2": + url: "https://www.cs.umd.edu/~mount/ANN/Files/1.1.2/ann_1.1.2.tar.gz" + sha256: "eea03f2e224b66813226d775053316675375dcec45bd263674c052d9324a49a5" +patches: + "1.1.2": + - patch_file: "patches/1.1.2-0001-fix-windows-static.patch" + patch_description: "Fix windows static" + patch_type: "portability" + - patch_file: "patches/1.1.2-0002-fix-cppstd17+-register-keyword.patch" + patch_description: "Fix compilation with C++17 (or above) standard, by removing register keyword" + patch_type: "portability" diff --git a/recipes/ann/all/conanfile.py b/recipes/ann/all/conanfile.py new file mode 100644 index 0000000000000..01aac4245f259 --- /dev/null +++ b/recipes/ann/all/conanfile.py @@ -0,0 +1,71 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +import os + +required_conan_version = ">=1.53.0" + + +class AnnConan(ConanFile): + name = "ann" + description = ( + "ANN is a library written in C++, which supports data structures and " + "algorithms for both exact and approximate nearest neighbor searching " + "in arbitrarily high dimensions." + ) + license = "LGPL-2.1-or-later" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.cs.umd.edu/~mount/ANN" + topics = ("nns", "nearest-neighbor-search") + 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", src=self.recipe_folder, dst=self.export_sources_folder) + 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 source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ANN_SRC_DIR"] = self.source_folder.replace("\\", "/") + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.build() + + def package(self): + for license_file in ("Copyright.txt", "License.txt"): + copy(self, license_file, src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["ANN"] + if self.settings.os == "Windows" and not self.options.shared: + self.cpp_info.defines.append("ANN_STATIC") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/ann/all/patches/1.1.2-0001-fix-windows-static.patch b/recipes/ann/all/patches/1.1.2-0001-fix-windows-static.patch new file mode 100644 index 0000000000000..7e027ada50bbb --- /dev/null +++ b/recipes/ann/all/patches/1.1.2-0001-fix-windows-static.patch @@ -0,0 +1,11 @@ +--- a/include/ANN/ANN.h ++++ b/include/ANN/ANN.h +@@ -59,7 +59,7 @@ + #ifndef ANN_H + #define ANN_H + +-#ifdef WIN32 ++#if defined(_WIN32) && !defined(ANN_STATIC) + //---------------------------------------------------------------------- + // For Microsoft Visual C++, externally accessible symbols must be + // explicitly indicated with DLL_API, which is somewhat like "extern." diff --git a/recipes/ann/all/patches/1.1.2-0002-fix-cppstd17+-register-keyword.patch b/recipes/ann/all/patches/1.1.2-0002-fix-cppstd17+-register-keyword.patch new file mode 100644 index 0000000000000..b7ccbe07fc3a4 --- /dev/null +++ b/recipes/ann/all/patches/1.1.2-0002-fix-cppstd17+-register-keyword.patch @@ -0,0 +1,141 @@ +--- a/src/ANN.cpp ++++ b/src/ANN.cpp +@@ -48,9 +48,9 @@ ANNdist annDist( // interpoint squared distance + ANNpoint p, + ANNpoint q) + { +- register int d; +- register ANNcoord diff; +- register ANNcoord dist; ++ int d; ++ ANNcoord diff; ++ ANNcoord dist; + + dist = 0; + for (d = 0; d < dim; d++) { +--- a/src/kd_fix_rad_search.cpp ++++ b/src/kd_fix_rad_search.cpp +@@ -147,11 +147,11 @@ void ANNkd_split::ann_FR_search(ANNdist box_dist) + + void ANNkd_leaf::ann_FR_search(ANNdist box_dist) + { +- register ANNdist dist; // distance to data point +- register ANNcoord* pp; // data coordinate pointer +- register ANNcoord* qq; // query coordinate pointer +- register ANNcoord t; +- register int d; ++ ANNdist dist; // distance to data point ++ ANNcoord* pp; // data coordinate pointer ++ ANNcoord* qq; // query coordinate pointer ++ ANNcoord t; ++ int d; + + for (int i = 0; i < n_pts; i++) { // check points in bucket + +--- a/src/kd_pr_search.cpp ++++ b/src/kd_pr_search.cpp +@@ -180,12 +180,12 @@ void ANNkd_split::ann_pri_search(ANNdist box_dist) + + void ANNkd_leaf::ann_pri_search(ANNdist box_dist) + { +- register ANNdist dist; // distance to data point +- register ANNcoord* pp; // data coordinate pointer +- register ANNcoord* qq; // query coordinate pointer +- register ANNdist min_dist; // distance to k-th closest point +- register ANNcoord t; +- register int d; ++ ANNdist dist; // distance to data point ++ ANNcoord* pp; // data coordinate pointer ++ ANNcoord* qq; // query coordinate pointer ++ ANNdist min_dist; // distance to k-th closest point ++ ANNcoord t; ++ int d; + + min_dist = ANNprPointMK->max_key(); // k-th smallest distance so far + +--- a/src/kd_search.cpp ++++ b/src/kd_search.cpp +@@ -171,12 +171,12 @@ void ANNkd_split::ann_search(ANNdist box_dist) + + void ANNkd_leaf::ann_search(ANNdist box_dist) + { +- register ANNdist dist; // distance to data point +- register ANNcoord* pp; // data coordinate pointer +- register ANNcoord* qq; // query coordinate pointer +- register ANNdist min_dist; // distance to k-th closest point +- register ANNcoord t; +- register int d; ++ ANNdist dist; // distance to data point ++ ANNcoord* pp; // data coordinate pointer ++ ANNcoord* qq; // query coordinate pointer ++ ANNdist min_dist; // distance to k-th closest point ++ ANNcoord t; ++ int d; + + min_dist = ANNkdPointMK->max_key(); // k-th smallest distance so far + +--- a/src/kd_util.cpp ++++ b/src/kd_util.cpp +@@ -127,10 +127,10 @@ ANNdist annBoxDistance( // compute distance from point to box + const ANNpoint hi, // high point of box + int dim) // dimension of space + { +- register ANNdist dist = 0.0; // sum of squared distances +- register ANNdist t; ++ ANNdist dist = 0.0; // sum of squared distances ++ ANNdist t; + +- for (register int d = 0; d < dim; d++) { ++ for (int d = 0; d < dim; d++) { + if (q[d] < lo[d]) { // q is left of box + t = ANNdist(lo[d]) - ANNdist(q[d]); + dist = ANN_SUM(dist, ANN_POW(t)); +@@ -238,8 +238,8 @@ void annMedianSplit( + int l = 0; // left end of current subarray + int r = n-1; // right end of current subarray + while (l < r) { +- register int i = (r+l)/2; // select middle as pivot +- register int k; ++ int i = (r+l)/2; // select middle as pivot ++ int k; + + if (PA(i,d) > PA(r,d)) // make sure last > pivot + PASWAP(i,r) +--- a/src/pr_queue.h ++++ b/src/pr_queue.h +@@ -86,9 +86,9 @@ public: + PQinfo inf) // item info + { + if (++n > max_size) annError("Priority queue overflow.", ANNabort); +- register int r = n; ++ int r = n; + while (r > 1) { // sift up new item +- register int p = r/2; ++ int p = r/2; + ANN_FLOP(1) // increment floating ops + if (pq[p].key <= kv) // in proper order + break; +@@ -105,9 +105,9 @@ public: + { + kv = pq[1].key; // key of min item + inf = pq[1].info; // information of min item +- register PQkey kn = pq[n--].key;// last item in queue +- register int p = 1; // p points to item out of position +- register int r = p<<1; // left child of p ++ PQkey kn = pq[n--].key;// last item in queue ++ int p = 1; // p points to item out of position ++ int r = p<<1; // left child of p + while (r <= n) { // while r is still within the heap + ANN_FLOP(2) // increment floating ops + // set r to smaller child of p +--- a/src/pr_queue_k.h ++++ b/src/pr_queue_k.h +@@ -100,7 +100,7 @@ public: + PQKkey kv, // key value + PQKinfo inf) // item info + { +- register int i; ++ int i; + // slide larger values up + for (i = n; i > 0; i--) { + if (mk[i-1].key > kv) diff --git a/recipes/ann/all/test_package/CMakeLists.txt b/recipes/ann/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..fe5808fbfdff7 --- /dev/null +++ b/recipes/ann/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(ann REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE ann::ann) diff --git a/recipes/ann/all/test_package/conanfile.py b/recipes/ann/all/test_package/conanfile.py new file mode 100644 index 0000000000000..0a6bc68712d90 --- /dev/null +++ b/recipes/ann/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/ann/all/test_package/test_package.cpp b/recipes/ann/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..8a2ab526c32b2 --- /dev/null +++ b/recipes/ann/all/test_package/test_package.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + ANNpoint queryPt = annAllocPt(2); + return 0; +} diff --git a/recipes/ann/config.yml b/recipes/ann/config.yml new file mode 100644 index 0000000000000..8d13aefb6b4fb --- /dev/null +++ b/recipes/ann/config.yml @@ -0,0 +1,3 @@ +versions: + "1.1.2": + folder: all diff --git a/recipes/annoy/all/conandata.yml b/recipes/annoy/all/conandata.yml new file mode 100644 index 0000000000000..540727dc55607 --- /dev/null +++ b/recipes/annoy/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.17.3": + url: "https://github.com/spotify/annoy/archive/refs/tags/v1.17.3.tar.gz" + sha256: "c121d38cacd98f5103b24ca4e94ca097f18179eed3037e9eb93ad70ec1e6356e" diff --git a/recipes/annoy/all/conanfile.py b/recipes/annoy/all/conanfile.py new file mode 100644 index 0000000000000..a583978167f26 --- /dev/null +++ b/recipes/annoy/all/conanfile.py @@ -0,0 +1,44 @@ +import os + +from conan import ConanFile +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" + +class AnnoyConan(ConanFile): + name = "annoy" + description = "Approximate Nearest Neighbors optimized for memory usage and loading/saving to disk" + license = "Apache-2.0" + homepage = "https://github.com/spotify/annoy" + url = "https://github.com/conan-io/conan-center-index" + topics = ("approximate-nearest-neighbors", "machine-learning", "nearest-neighbors", "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 package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + for header in ["annoylib.h", "kissrandom.h", "mman.h"]: + copy(self, header, os.path.join(self.source_folder, "src"), os.path.join(self.package_folder, "include", "annoy")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "Annoy") + self.cpp_info.set_property("cmake_target_name", "Annoy::Annoy") + + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.names["cmake_find_package"] = "Annoy" + self.cpp_info.names["cmake_find_package_multi"] = "Annoy" diff --git a/recipes/annoy/all/test_package/CMakeLists.txt b/recipes/annoy/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..33d34348b2425 --- /dev/null +++ b/recipes/annoy/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(Annoy REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE Annoy::Annoy) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/annoy/all/test_package/conanfile.py b/recipes/annoy/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/annoy/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/annoy/all/test_package/test_package.cpp b/recipes/annoy/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..ee5f4538042ea --- /dev/null +++ b/recipes/annoy/all/test_package/test_package.cpp @@ -0,0 +1,27 @@ +#include +#include + +#include +#include + +int main() { + const int n = 3; + Annoy::AnnoyIndex index(n); + + double x[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}; + double needle[3] = {0.1, 0.1, 0.8}; + + for (int i = 0; i < n; i++) { + index.add_item(i, x[i]); + } + index.build(-1); + + std::vector result; + index.get_nns_by_vector(needle, 1, -1, &result, nullptr); + std::cout << "Nearest neighbor to vector [1.0, 0.5, 0.5]: "; + for (int i : result) { + std::cout << i << " "; + } + std::cout << std::endl; + return 0; +} diff --git a/recipes/annoy/config.yml b/recipes/annoy/config.yml new file mode 100644 index 0000000000000..a138b582eaf2e --- /dev/null +++ b/recipes/annoy/config.yml @@ -0,0 +1,3 @@ +versions: + "1.17.3": + folder: all diff --git a/recipes/approvaltests.cpp/all/conandata.yml b/recipes/approvaltests.cpp/all/conandata.yml index b3f371f3d0cdd..f5f47fc15d2ea 100644 --- a/recipes/approvaltests.cpp/all/conandata.yml +++ b/recipes/approvaltests.cpp/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "10.13.0": + - url: https://github.com/approvals/ApprovalTests.cpp/releases/download/v.10.13.0/ApprovalTests.v.10.13.0.hpp + sha256: c00f6390b81d9924dc646e9d32b61e1e09abda106c13704f714ac349241bb9ff + - url: "https://raw.githubusercontent.com/approvals/ApprovalTests.cpp/v.10.13.0/LICENSE" + sha256: c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 "10.12.2": - url: https://github.com/approvals/ApprovalTests.cpp/releases/download/v.10.12.2/ApprovalTests.v.10.12.2.hpp sha256: 4c43d0ea98669e3d6fbb5810cc47b19adaf88cabb1421b488aa306b08c434131 diff --git a/recipes/approvaltests.cpp/all/conanfile.py b/recipes/approvaltests.cpp/all/conanfile.py index 167d80165bb6d..1bfdff95cf245 100644 --- a/recipes/approvaltests.cpp/all/conanfile.py +++ b/recipes/approvaltests.cpp/all/conanfile.py @@ -1,11 +1,12 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd from conan.tools.files import copy, download, rename from conan.tools.layout import basic_layout from conan.tools.scm import Version import os -required_conan_version = ">=1.51.1" +required_conan_version = ">=1.53" class ApprovalTestsCppConan(ConanFile): @@ -38,6 +39,10 @@ class ApprovalTestsCppConan(ConanFile): @property def _header_file(self): return "ApprovalTests.hpp" + + @property + def _min_cppstd(self): + return 11 def config_options(self): if Version(self.version) < "10.4.0": @@ -62,6 +67,9 @@ def package_id(self): self.info.clear() def validate(self): + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, self._min_cppstd) + if Version(self.version) >= "10.2.0": if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": raise ConanInvalidConfiguration(f"{self.ref} with compiler gcc requires at least compiler version 5") diff --git a/recipes/approvaltests.cpp/config.yml b/recipes/approvaltests.cpp/config.yml index caf3f177e07c7..6e7a92b2ed85a 100644 --- a/recipes/approvaltests.cpp/config.yml +++ b/recipes/approvaltests.cpp/config.yml @@ -1,4 +1,6 @@ versions: + "10.13.0": + folder: all "10.12.2": folder: all "10.12.1": diff --git a/recipes/apr-util/all/conanfile.py b/recipes/apr-util/all/conanfile.py index ed635923b1c3a..92e0be4b1f040 100644 --- a/recipes/apr-util/all/conanfile.py +++ b/recipes/apr-util/all/conanfile.py @@ -90,7 +90,7 @@ def requirements(self): if self.options.with_sqlite3: self.requires("sqlite3/3.45.0") if self.options.with_expat: - self.requires("expat/2.5.0") + self.requires("expat/[>=2.6.2 <3]") if self.options.with_postgresql: self.requires("libpq/15.4") diff --git a/recipes/apr/all/conanfile.py b/recipes/apr/all/conanfile.py index 932bac9dcf2ea..2f5b13dc054ed 100644 --- a/recipes/apr/all/conanfile.py +++ b/recipes/apr/all/conanfile.py @@ -1,3 +1,6 @@ +import os +import re + from conan import ConanFile from conan.errors import ConanException, ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name @@ -9,8 +12,6 @@ from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc from conan.tools.scm import Version -import os -import re required_conan_version = ">=1.54.0" @@ -69,7 +70,20 @@ def layout(self): def validate_build(self): if cross_building(self) and not is_msvc(self): - raise ConanInvalidConfiguration("apr recipe doesn't support cross-build yet due to runtime checks in autoconf") + msg = ("apr recipe doesn't support cross-build for all the platforms" + " due to runtime checks in autoconf. You can provide" + " a pre-built cached file as an user Conan conf variable to try it.\n\n" + "Via host profile:\n" + "[conf]\nuser.apr:cache_file=/path/to/cache_file\n\n" + "Via CLI: \n" + "-c \"user.apr:cache_file='/path/to/cache_file'\"") + # Cross-building for apr < 1.7.4 is not supported without a pre-built cached file + if Version(self.version) < "1.7.4" and self.conf.get("user.apr:cache_file") is None: + raise ConanInvalidConfiguration(msg) + # Conan provides for apr >= 1.7.4 and Linux some configuration flags to avoid + # entering a pre-built cached file + if self.settings.os != "Linux" and self.conf.get("user.apr:cache_file") is None: + raise ConanInvalidConfiguration(msg) def build_requirements(self): if not is_msvc(self): @@ -83,6 +97,47 @@ def build_requirements(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + def _get_cross_building_configure_args(self): + """ + The vast majority of projects that use autotools and make use of the AC_TRY_RUN macro, + do provide a default fallback when cross-compiling, as per the documentation here: + + * https://ftp.gnu.org/old-gnu/Manuals/autoconf-2.53/html_node/Test-Programs.html + + In that regard, APR cannot be cross-compiled by traditional means, and the only fallback + is to use a cache file. Indeed, the only way to cross-compile that is documented by upstream + is by pre-empting the configuration checks with a cache file that needs to be generated on + the target system: + + ./configure --cache-file={gnu_host_triplet}.cache + + The generated cache file can be repeatedly used to cross-compile to the targeted host system + by including it with the recipe data. + + This recipe is reading this custom user conf variable: + + [conf] + user.apr:cache_file=/path/to/{gnu_host_triplet}.cache + + So you can use it to cross-compile on your system. + """ + configure_args = [] + user_cache_file = self.conf.get("user.apr:cache_file", check_type=str) + if user_cache_file: + configure_args.append(f"--cache-file={user_cache_file}") + return configure_args + + self.output.warning("Trying to set some configuration arguments, but it" + " could fail. The best approach is to provide a" + " pre-built cached file.") + if self.settings.os == "Linux": + # Mandatory cross-building configuration flags (tested on Linux ARM and Intel) + configure_args.extend(["apr_cv_mutex_robust_shared=yes", + "ac_cv_file__dev_zero=yes", + "apr_cv_process_shared_works=yes", + "apr_cv_tcp_nodelay_with_cork=yes"]) + return configure_args + def generate(self): if is_msvc(self): tc = CMakeToolchain(self) @@ -95,7 +150,7 @@ def generate(self): tc = AutotoolsToolchain(self) tc.configure_args.append("--with-installbuilddir=${prefix}/res/build-1") if cross_building(self): - tc.configure_args.append("apr_cv_mutex_robust_shared=yes") + tc.configure_args.extend(self._get_cross_building_configure_args()) tc.generate() def _patch_sources(self): 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-0001-fix-cmake.patch deleted file mode 100644 index ba813f1dc3969..0000000000000 --- a/recipes/apriltag/all/patches/3.1.4-0001-fix-cmake.patch +++ /dev/null @@ -1,69 +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 ${PROJECT_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} PUBLIC 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) -@@ -33,6 +37,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC - - # install library - install(TARGETS ${PROJECT_NAME} EXPORT apriltagTargets -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) -@@ -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) diff --git a/recipes/apriltag/all/patches/3.1.4-0002-fix-cmake.patch b/recipes/apriltag/all/patches/3.1.4-0002-fix-cmake.patch new file mode 100644 index 0000000000000..7baec487b4ea0 --- /dev/null +++ b/recipes/apriltag/all/patches/3.1.4-0002-fix-cmake.patch @@ -0,0 +1,50 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,26 +1,31 @@ +-cmake_minimum_required(VERSION 3.1) +-project(apriltag) ++cmake_minimum_required(VERSION 3.15) ++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 ${PROJECT_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} PUBLIC 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) +@@ -35,6 +30,7 @@ + install(TARGETS ${PROJECT_NAME} EXPORT apriltagTargets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ) + + # 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/arcus/all/conanfile.py b/recipes/arcus/all/conanfile.py index 8f6e301a39313..38ae3416bb350 100644 --- a/recipes/arcus/all/conanfile.py +++ b/recipes/arcus/all/conanfile.py @@ -45,7 +45,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("protobuf/3.21.9") + self.requires("protobuf/3.21.12") def validate(self): if self.settings.compiler.get_safe("cppstd"): 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/args-parser/all/conandata.yml b/recipes/args-parser/all/conandata.yml index 427c4c05d81dd..5a22686895e16 100644 --- a/recipes/args-parser/all/conandata.yml +++ b/recipes/args-parser/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "6.3.4": + url: "https://github.com/igormironchik/args-parser/archive/refs/tags/6.3.4.tar.gz" + sha256: "874be94baac622e16045b958539e91347f18fc0803356fb500757c0060222aa2" "6.3.3": url: "https://github.com/igormironchik/args-parser/archive/refs/tags/6.3.3.tar.gz" sha256: "67867d7ab624a8c2f391230c54c37830e6127f7f5c716ff634165f674d876b64" diff --git a/recipes/args-parser/all/conanfile.py b/recipes/args-parser/all/conanfile.py index f4ea312819ef0..45b750c9e57c9 100644 --- a/recipes/args-parser/all/conanfile.py +++ b/recipes/args-parser/all/conanfile.py @@ -56,7 +56,10 @@ def build(self): pass def package(self): - copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + if Version(self.version) <= "6.3.3": + copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + else: + copy(self, "MIT.txt", src=os.path.join(self.source_folder, "LICENSES"), dst=os.path.join(self.package_folder, "licenses")) copy(self, "*.hpp", src=os.path.join(self.source_folder, "args-parser"), dst=os.path.join(self.package_folder, "include", "args-parser")) def package_info(self): diff --git a/recipes/args-parser/config.yml b/recipes/args-parser/config.yml index b67bad0e21e0f..9b0a8042dbf5e 100644 --- a/recipes/args-parser/config.yml +++ b/recipes/args-parser/config.yml @@ -1,4 +1,6 @@ versions: + "6.3.4": + folder: all "6.3.3": folder: all "6.3.2": 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/armadillo/all/conanfile.py b/recipes/armadillo/all/conanfile.py index d37ca846e702e..4735e4fcda303 100644 --- a/recipes/armadillo/all/conanfile.py +++ b/recipes/armadillo/all/conanfile.py @@ -1,13 +1,14 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout -from conan.tools.files import copy, get, rmdir, apply_conandata_patches, export_conandata_patches +from conan.tools.files import copy, get, rmdir, apply_conandata_patches, export_conandata_patches, save from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.build import cross_building from conan.errors import ConanInvalidConfiguration import os +import textwrap -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.55.0" class ArmadilloConan(ConanFile): @@ -258,6 +259,40 @@ def build(self): cmake.configure() cmake.build() + @property + def _get_arma_version_name(self): + version_file = os.path.join(self.source_folder, "include", "armadillo_bits", "arma_version.hpp") + with open(version_file, "r") as f: + for line in f: + if "ARMA_VERSION_NAME" in line: + return line.split("\"")[-2].strip() + return "" + + @property + def _module_vars_rel_path(self): + return os.path.join("lib", "cmake", f"conan-official-{self.name}-variables.cmake") + + def _create_cmake_module_variables(self, module_file): + content = textwrap.dedent(f"""\ + set(ARMADILLO_FOUND TRUE) + if(DEFINED Armadillo_INCLUDE_DIRS) + set(ARMADILLO_INCLUDE_DIRS ${{Armadillo_INCLUDE_DIRS}}) + endif() + if(DEFINED Armadillo_LIBRARIES) + set(ARMADILLO_LIBRARIES ${{Armadillo_LIBRARIES}}) + endif() + set(ARMADILLO_VERSION_MAJOR "{Version(self.version).major}") + set(ARMADILLO_VERSION_MINOR "{Version(self.version).minor}") + set(ARMADILLO_VERSION_PATCH "{Version(self.version).patch}") + if(DEFINED Armadillo_VERSION_STRING) + set(ARMADILLO_VERSION_STRING ${{Armadillo_VERSION_STRING}}) + else() + set(ARMADILLO_VERSION_STRING "${{ARMADILLO_VERSION_MAJOR}}.${{ARMADILLO_VERSION_MINOR}}.${{ARMADILLO_VERSION_PATCH}}") + endif() + set(ARMADILLO_VERSION_NAME "{self._get_arma_version_name}") + """) + save(self, module_file, content) + def package(self): cmake = CMake(self) cmake.install() @@ -266,10 +301,25 @@ def package(self): copy(self, "NOTICE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) + self._create_cmake_module_variables(os.path.join(self.package_folder, self._module_vars_rel_path)) + def package_info(self): self.cpp_info.libs = ["armadillo"] self.cpp_info.set_property("pkg_config_name", "armadillo") + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "Armadillo") + self.cpp_info.set_property("cmake_target_name", "Armadillo::Armadillo") + self.cpp_info.set_property("cmake_target_aliases", ["armadillo", "armadillo::armadillo"]) + self.cpp_info.set_property("cmake_build_modules", [self._module_vars_rel_path]) + + # Remove when cmake_find_package and pkg_config generators are no + # longer supported + self.cpp_info.names["pkg_config"] = "armadillo" + self.cpp_info.names["cmake_find_package"] = "Armadillo" + self.cpp_info.names["cmake_find_package_multi"] = "Armadillo" + self.cpp_info.build_modules["cmake_find_package"] = [self._module_vars_rel_path] + self.cpp_info.build_modules["cmake_find_package_multi"] = [self._module_vars_rel_path] if self.options.get_safe("use_extern_rng"): self.cpp_info.defines.append("ARMA_USE_EXTERN_RNG") diff --git a/recipes/armadillo/all/test_package/CMakeLists.txt b/recipes/armadillo/all/test_package/CMakeLists.txt index da38c2d4cf348..7f0a114a2e9e8 100644 --- a/recipes/armadillo/all/test_package/CMakeLists.txt +++ b/recipes/armadillo/all/test_package/CMakeLists.txt @@ -1,12 +1,32 @@ cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) -find_package(armadillo CONFIG REQUIRED) +find_package(Armadillo CONFIG REQUIRED) if (LINK_HDF5) find_package(HDF5) set(HDF5_TARGETS HDF5::HDF5) endif() add_executable(example src/example.cpp) -target_link_libraries(example armadillo::armadillo ${HDF5_TARGETS}) +target_link_libraries(example Armadillo::Armadillo ${HDF5_TARGETS}) set_property(TARGET example PROPERTY CXX_STANDARD 11) + +# Test whether variables from https://cmake.org/cmake/help/latest/module/FindArmadillo.html are properly defined + +set(_custom_vars + ARMADILLO_FOUND + ARMADILLO_INCLUDE_DIRS + ARMADILLO_LIBRARIES + ARMADILLO_VERSION_MAJOR + ARMADILLO_VERSION_MINOR + ARMADILLO_VERSION_PATCH + ARMADILLO_VERSION_STRING + ARMADILLO_VERSION_NAME +) +foreach(_custom_var ${_custom_vars}) + if(DEFINED ${_custom_var}) + message(STATUS "${_custom_var}: ${${_custom_var}}") + else() + message(FATAL_ERROR "${_custom_var} not defined") + endif() +endforeach() diff --git a/recipes/armadillo/all/test_v1_package/CMakeLists.txt b/recipes/armadillo/all/test_v1_package/CMakeLists.txt index 3ac69a9731274..30cc31a24a3d1 100644 --- a/recipes/armadillo/all/test_v1_package/CMakeLists.txt +++ b/recipes/armadillo/all/test_v1_package/CMakeLists.txt @@ -4,8 +4,28 @@ project(PackageTest CXX) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(armadillo REQUIRED) +find_package(Armadillo REQUIRED) add_executable(example ../test_package/src/example.cpp) -target_link_libraries(example armadillo::armadillo) +target_link_libraries(example Armadillo::Armadillo) set_property(TARGET example PROPERTY CXX_STANDARD 11) + +# Test whether variables from https://cmake.org/cmake/help/latest/module/FindArmadillo.html are properly defined + +set(_custom_vars + ARMADILLO_FOUND + ARMADILLO_INCLUDE_DIRS + ARMADILLO_LIBRARIES + ARMADILLO_VERSION_MAJOR + ARMADILLO_VERSION_MINOR + ARMADILLO_VERSION_PATCH + ARMADILLO_VERSION_STRING + ARMADILLO_VERSION_NAME +) +foreach(_custom_var ${_custom_vars}) + if(DEFINED ${_custom_var}) + message(STATUS "${_custom_var}: ${${_custom_var}}") + else() + message(FATAL_ERROR "${_custom_var} not defined") + endif() +endforeach() diff --git a/recipes/arrow/all/conandata.yml b/recipes/arrow/all/conandata.yml index 7579743855f0f..aa96940081481 100644 --- a/recipes/arrow/all/conandata.yml +++ b/recipes/arrow/all/conandata.yml @@ -1,4 +1,13 @@ 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" + "16.0.0": + url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-16.0.0/apache-arrow-16.0.0.tar.gz?action=download" + sha256: "9f4051ae9473c97991d9af801e2f94ae3455067719ca7f90b8137f9e9a700b8d" "15.0.0": url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-15.0.0/apache-arrow-15.0.0.tar.gz?action=download" sha256: "01dd3f70e85d9b5b933ec92c0db8a4ef504a5105f78d2d8622e84279fb45c25d" diff --git a/recipes/arrow/all/conanfile.py b/recipes/arrow/all/conanfile.py index a94962ec1298d..1af7642b14652 100644 --- a/recipes/arrow/all/conanfile.py +++ b/recipes/arrow/all/conanfile.py @@ -2,12 +2,13 @@ from conan.errors import ConanInvalidConfiguration, ConanException 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 apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version import os import glob +import textwrap required_conan_version = ">=1.53.0" @@ -169,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: @@ -409,28 +410,74 @@ def _patch_sources(self): def build(self): self._patch_sources() - cmake =CMake(self) + cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, "cpp")) cmake.build() def package(self): copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy(self, pattern="NOTICE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - cmake =CMake(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")) rmdir(self, os.path.join(self.package_folder, "share")) + cmake_suffix = "shared" if self.options.shared else "static" + + alias_map = { f"Arrow::arrow_{cmake_suffix}": f"arrow::arrow_{cmake_suffix}" } + + if self.options.parquet: + alias_map[f"Parquet::parquet_{cmake_suffix}"] = f"arrow::parquet_{cmake_suffix}" + + if self.options.get_safe("substrait"): + alias_map[f"Arrow::arrow_substrait_{cmake_suffix}"] = f"arrow::arrow_substrait_{cmake_suffix}" + + if self.options.acero: + alias_map[f"Arrow::arrow_acero_{cmake_suffix}"] = f"arrow::arrow_acero_{cmake_suffix}" + + if self.options.gandiva: + alias_map[f"Gandiva::gandiva_{cmake_suffix}"] = f"arrow::gandiva_{cmake_suffix}" + + if self.options.with_flight_rpc: + alias_map[f"ArrowFlight::arrow_flight_sql_{cmake_suffix}"] = f"arrow::arrow_flight_sql_{cmake_suffix}" + + + self._create_cmake_module_alias_targets( + os.path.join(self.package_folder, self._module_file_rel_path), alias_map + ) + + def _create_cmake_module_alias_targets(self, module_file, targets): + content = "" + for alias, aliased in targets.items(): + content += textwrap.dedent("""\ + if(TARGET {aliased} AND NOT TARGET {alias}) + add_library({alias} INTERFACE IMPORTED) + set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) + endif() + """.format(alias=alias, aliased=aliased)) + save(self, module_file, content) + + @property + def _module_subfolder(self): + return os.path.join("lib", "cmake") + + @property + def _module_file_rel_path(self): + return os.path.join(self._module_subfolder, + f"conan-official-{self.name}-targets.cmake") + def package_info(self): # FIXME: fix CMake targets of components self.cpp_info.set_property("cmake_file_name", "Arrow") suffix = "_static" if is_msvc(self) and not self.options.shared else "" + cmake_suffix = "shared" if self.options.shared else "static" self.cpp_info.components["libarrow"].set_property("pkg_config_name", "arrow") + self.cpp_info.components["libarrow"].set_property("cmake_target_name", f"Arrow::arrow_{cmake_suffix}") self.cpp_info.components["libarrow"].libs = [f"arrow{suffix}"] if not self.options.shared: self.cpp_info.components["libarrow"].defines = ["ARROW_STATIC"] @@ -439,6 +486,7 @@ def package_info(self): if self.options.parquet: self.cpp_info.components["libparquet"].set_property("pkg_config_name", "parquet") + self.cpp_info.components["libparquet"].set_property("cmake_target_name", f"Parquet::parquet_{cmake_suffix}") self.cpp_info.components["libparquet"].libs = [f"parquet{suffix}"] self.cpp_info.components["libparquet"].requires = ["libarrow"] if not self.options.shared: @@ -446,6 +494,7 @@ def package_info(self): if self.options.get_safe("substrait"): self.cpp_info.components["libarrow_substrait"].set_property("pkg_config_name", "arrow_substrait") + self.cpp_info.components["libarrow_substrait"].set_property("cmake_target_name", f"Arrow::arrow_substrait_{cmake_suffix}") self.cpp_info.components["libarrow_substrait"].libs = [f"arrow_substrait{suffix}"] self.cpp_info.components["libarrow_substrait"].requires = ["libparquet", "dataset"] @@ -453,6 +502,8 @@ def package_info(self): del self.options.plasma if self.options.acero: + self.cpp_info.components["libacero"].set_property("pkg_config_name", "acero") + self.cpp_info.components["libacero"].set_property("cmake_target_name", f"Acero::arrow_acero_{cmake_suffix}") self.cpp_info.components["libacero"].libs = [f"arrow_acero{suffix}"] self.cpp_info.components["libacero"].names["cmake_find_package"] = "acero" self.cpp_info.components["libacero"].names["cmake_find_package_multi"] = "acero" @@ -461,6 +512,7 @@ def package_info(self): if self.options.gandiva: self.cpp_info.components["libgandiva"].set_property("pkg_config_name", "gandiva") + self.cpp_info.components["libgandiva"].set_property("cmake_target_name", f"Gandiva::gandiva_{cmake_suffix}") self.cpp_info.components["libgandiva"].libs = [f"gandiva{suffix}"] self.cpp_info.components["libgandiva"].requires = ["libarrow"] if not self.options.shared: @@ -468,11 +520,13 @@ def package_info(self): if self.options.with_flight_rpc: self.cpp_info.components["libarrow_flight"].set_property("pkg_config_name", "flight_rpc") + self.cpp_info.components["libarrow_flight"].set_property("cmake_target_name", f"ArrowFlight::arrow_flight_{cmake_suffix}") self.cpp_info.components["libarrow_flight"].libs = [f"arrow_flight{suffix}"] self.cpp_info.components["libarrow_flight"].requires = ["libarrow"] if self.options.get_safe("with_flight_sql"): self.cpp_info.components["libarrow_flight_sql"].set_property("pkg_config_name", "flight_sql") + self.cpp_info.components["libarrow_flight_sql"].set_property("cmake_target_name", f"ArrowFlightSql::arrow_flight_sql_{cmake_suffix}") self.cpp_info.components["libarrow_flight_sql"].libs = [f"arrow_flight_sql{suffix}"] self.cpp_info.components["libarrow_flight_sql"].requires = ["libarrow", "libarrow_flight"] @@ -525,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: @@ -546,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: @@ -556,22 +609,34 @@ def package_info(self): # TODO: to remove in conan v2 self.cpp_info.filenames["cmake_find_package"] = "Arrow" self.cpp_info.filenames["cmake_find_package_multi"] = "Arrow" - self.cpp_info.components["libarrow"].names["cmake_find_package"] = "arrow" - self.cpp_info.components["libarrow"].names["cmake_find_package_multi"] = "arrow" + self.cpp_info.components["libarrow"].names["cmake_find_package"] = f"arrow_{cmake_suffix}" + self.cpp_info.components["libarrow"].names["cmake_find_package_multi"] = f"arrow_{cmake_suffix}" + self.cpp_info.components["libarrow"].build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.components["libarrow"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] if self.options.parquet: - self.cpp_info.components["libparquet"].names["cmake_find_package"] = "parquet" - self.cpp_info.components["libparquet"].names["cmake_find_package_multi"] = "parquet" + self.cpp_info.components["libparquet"].names["cmake_find_package"] = f"parquet_{cmake_suffix}" + self.cpp_info.components["libparquet"].names["cmake_find_package_multi"] = f"parquet_{cmake_suffix}" + self.cpp_info.components["libparquet"].build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.components["libparquet"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] if self.options.get_safe("substrait"): - self.cpp_info.components["libarrow_substrait"].names["cmake_find_package"] = "arrow_substrait" - self.cpp_info.components["libarrow_substrait"].names["cmake_find_package_multi"] = "arrow_substrait" + self.cpp_info.components["libarrow_substrait"].names["cmake_find_package"] = f"arrow_substrait_{cmake_suffix}" + self.cpp_info.components["libarrow_substrait"].names["cmake_find_package_multi"] = f"arrow_substrait_{cmake_suffix}" + self.cpp_info.components["libarrow_substrait"].build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.components["libarrow_substrait"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] if self.options.gandiva: self.cpp_info.components["libgandiva"].names["cmake_find_package"] = "gandiva" self.cpp_info.components["libgandiva"].names["cmake_find_package_multi"] = "gandiva" + self.cpp_info.components["libgandiva"].build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.components["libgandiva"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] if self.options.with_flight_rpc: self.cpp_info.components["libarrow_flight"].names["cmake_find_package"] = "flight_rpc" self.cpp_info.components["libarrow_flight"].names["cmake_find_package_multi"] = "flight_rpc" + self.cpp_info.components["libarrow_flight"].build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.components["libarrow_flight"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] if self.options.get_safe("with_flight_sql"): self.cpp_info.components["libarrow_flight_sql"].names["cmake_find_package"] = "flight_sql" self.cpp_info.components["libarrow_flight_sql"].names["cmake_find_package_multi"] = "flight_sql" + self.cpp_info.components["libarrow_flight_sql"].build_modules["cmake_find_package"] = [self._module_file_rel_path] + self.cpp_info.components["libarrow_flight_sql"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] if self.options.cli and (self.options.with_cuda or self.options.with_flight_rpc or self.options.parquet): self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/recipes/arrow/all/test_package/CMakeLists.txt b/recipes/arrow/all/test_package/CMakeLists.txt index 9b721bbe6a17c..bd890a4dd57e5 100644 --- a/recipes/arrow/all/test_package/CMakeLists.txt +++ b/recipes/arrow/all/test_package/CMakeLists.txt @@ -4,7 +4,13 @@ project(test_package LANGUAGES CXX) find_package(Arrow REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE arrow::arrow) + +if (TARGET Arrow::arrow_shared) + target_link_libraries(${PROJECT_NAME} PRIVATE Arrow::arrow_shared) +else() + target_link_libraries(${PROJECT_NAME} PRIVATE Arrow::arrow_static) +endif() + if (${Arrow_VERSION} VERSION_LESS "10.0.0") target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) else() diff --git a/recipes/arrow/config.yml b/recipes/arrow/config.yml index 316731612eda2..6d012719cd8e2 100644 --- a/recipes/arrow/config.yml +++ b/recipes/arrow/config.yml @@ -1,4 +1,10 @@ versions: + "17.0.0": + folder: all + "16.1.0": + folder: all + "16.0.0": + folder: all "15.0.0": folder: all "14.0.2": 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 26110ca175735..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" @@ -24,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindir, "test_package") - arfont = os.path.join(self.source_folder, "example.arfont") - self.run(f"{bin_path} {arfont}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/artery-font-format/all/test_package/example.arfont b/recipes/artery-font-format/all/test_package/example.arfont deleted file mode 100644 index a1530434762b6..0000000000000 Binary files a/recipes/artery-font-format/all/test_package/example.arfont and /dev/null differ diff --git a/recipes/artery-font-format/all/test_package/test_package.cpp b/recipes/artery-font-format/all/test_package/test_package.cpp index 8e85c6f96e501..ff1d420aff0b0 100644 --- a/recipes/artery-font-format/all/test_package/test_package.cpp +++ b/recipes/artery-font-format/all/test_package/test_package.cpp @@ -1,32 +1,9 @@ -#include -#include #include #include -#include int main(int argc, char *argv[]) { - if (argc < 2) { - std::cerr << "usage: test_package \n"; - return EXIT_FAILURE; - } - - FILE *const font_file = fopen(argv[1], "rb"); - if (font_file == nullptr) { - std::cerr << "couldn't open font file" << std::endl; - return EXIT_FAILURE; - } - - artery_font::StdArteryFont font; - if (!artery_font::read(font, font_file)) { - std::cerr << "couldn't read artery font" << std::endl; - return EXIT_FAILURE; - } - - if (fclose(font_file) != 0) { - std::cerr << "an error occured when closing font file" << std::endl; - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; + auto list = artery_font::StdList(5); + std::cout << "There are " << list.length() << " elements in the list" << std::endl; + return EXIT_SUCCESS; } 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 7484b2d50e440..bf7c7ab528f44 100644 --- a/recipes/asio/all/conandata.yml +++ b/recipes/asio/all/conandata.yml @@ -1,4 +1,10 @@ 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" "1.30.1": url: "https://github.com/chriskohlhoff/asio/archive/asio-1-30-1.tar.gz" sha256: "94b121cc2016680f2314ef58eadf169c2d34fff97fba01df325a192d502d3a58" diff --git a/recipes/asio/config.yml b/recipes/asio/config.yml index 1a239b697b8da..0f4a1ba23b387 100644 --- a/recipes/asio/config.yml +++ b/recipes/asio/config.yml @@ -1,4 +1,8 @@ versions: + "1.31.0": + folder: all + "1.30.2": + folder: all "1.30.1": folder: all "1.29.0": diff --git a/recipes/asmjit/all/conandata.yml b/recipes/asmjit/all/conandata.yml index c714f763c3707..0e6689d1ee9fc 100644 --- a/recipes/asmjit/all/conandata.yml +++ b/recipes/asmjit/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240531": + url: "https://github.com/asmjit/asmjit/archive/d6c5be2212b9a50ba56ec6d1e9b68693c62136c1.zip" + sha256: "678549712d4708d0513fb0017d03211df415387aea4c031923d4dd5c07b43db6" "cci.20230325": url: "https://github.com/asmjit/asmjit/archive/51b10b19b6631434d3f9ad536a6fb140944a36d2.zip" sha256: "4f62b1b6247864417fb50a2928d541ccf8e9273b0c3ce36ccd443c9d6ca7bc9a" diff --git a/recipes/asmjit/all/conanfile.py b/recipes/asmjit/all/conanfile.py index ad8cb46dcf24d..5461e75517fb2 100644 --- a/recipes/asmjit/all/conanfile.py +++ b/recipes/asmjit/all/conanfile.py @@ -2,20 +2,20 @@ 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.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.53.0" - class AsmjitConan(ConanFile): name = "asmjit" description = "AsmJit is a lightweight library for machine code " \ "generation written in C++ language." license = "Zlib" topics = ("asmjit", "compiler", "assembler", "jit") - homepage = "https://asmjit.com" url = "https://github.com/conan-io/conan-center-index" - + homepage = "https://asmjit.com" package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -27,6 +27,16 @@ class AsmjitConan(ConanFile): "fPIC": True, } + @property + def _min_cppstd(self): + return 11 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + } + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -40,7 +50,14 @@ def layout(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) + + if self.version >= "cci.20240531": + 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} does not support {self.settings.compiler}/{self.settings.compiler.version}." + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/asmjit/all/test_package/CMakeLists.txt b/recipes/asmjit/all/test_package/CMakeLists.txt index 39640d23a5929..f8fba8f71f0a1 100644 --- a/recipes/asmjit/all/test_package/CMakeLists.txt +++ b/recipes/asmjit/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) find_package(asmjit REQUIRED CONFIG) diff --git a/recipes/asmjit/all/test_package/test_package.cpp b/recipes/asmjit/all/test_package/test_package.cpp index 4b85962e0942d..f6d920ca6d627 100644 --- a/recipes/asmjit/all/test_package/test_package.cpp +++ b/recipes/asmjit/all/test_package/test_package.cpp @@ -1,27 +1,16 @@ -#include +#include -#include - -typedef int (*Func)(void); +#include "asmjit/asmjit.h" int main(int argc, char* argv[]) { asmjit::JitRuntime rt; - asmjit::CodeHolder code; code.init(rt.environment()); - asmjit::x86::Assembler a(&code); - a.mov(asmjit::x86::eax, 1); - a.ret(); - - Func fn; - asmjit::Error err = rt.add(&fn, &code); - if (err) return 1; - - int result = fn(); - printf("%d\n", result); - - rt.release(fn); + std::cout << + unsigned((ASMJIT_LIBRARY_VERSION >> 16)) << "." << + unsigned((ASMJIT_LIBRARY_VERSION >> 8) & 0xFF) << "." << + unsigned((ASMJIT_LIBRARY_VERSION ) & 0xFF) << "\n"; return 0; } diff --git a/recipes/asmjit/config.yml b/recipes/asmjit/config.yml index ea0049ba18227..03449364f4128 100644 --- a/recipes/asmjit/config.yml +++ b/recipes/asmjit/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20240531": + folder: all "cci.20230325": folder: all "cci.20221111": diff --git a/recipes/assimp/5.x/conandata.yml b/recipes/assimp/5.x/conandata.yml index 42aa3dd3fee85..e267d49bf4f17 100644 --- a/recipes/assimp/5.x/conandata.yml +++ b/recipes/assimp/5.x/conandata.yml @@ -1,18 +1,19 @@ 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" "5.3.1": url: "https://github.com/assimp/assimp/archive/refs/tags/v5.3.1.tar.gz" sha256: "a07666be71afe1ad4bc008c2336b7c688aca391271188eb9108d0c6db1be53f1" "5.2.5": url: "https://github.com/assimp/assimp/archive/refs/tags/v5.2.5.tar.gz" sha256: "b5219e63ae31d895d60d98001ee5bb809fb2c7b2de1e7f78ceeb600063641e1a" - "5.2.2": - url: "https://github.com/assimp/assimp/archive/refs/tags/v5.2.2.tar.gz" - sha256: "ad76c5d86c380af65a9d9f64e8fc57af692ffd80a90f613dfc6bd945d0b80bb4" "5.1.6": url: "https://github.com/assimp/assimp/archive/refs/tags/v5.1.6.tar.gz" sha256: "52ad3a3776ce320c8add531dbcb2d3b93f2e1f10fcff5ac30178b09ba934d084" patches: - "5.2.2": - - patch_file: "patches/0005-fix-unzip.patch" "5.1.6": - patch_file: "patches/0005-fix-unzip.patch" diff --git a/recipes/assimp/5.x/conanfile.py b/recipes/assimp/5.x/conanfile.py index 9d8d654edce03..67b7cd93c924b 100644 --- a/recipes/assimp/5.x/conanfile.py +++ b/recipes/assimp/5.x/conanfile.py @@ -2,8 +2,9 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import 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 apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, replace_in_file, rmdir, save -from conan.tools.microsoft import is_msvc +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version import os @@ -205,31 +206,47 @@ def validate(self): if Version(self.version) < "5.3.0" and self._depends_on_clipper and Version(self.dependencies["clipper"].ref.version).major != "4": raise ConanInvalidConfiguration("Only 'clipper/4.x' is supported") + def build_requirements(self): + if Version(self.version) >= "5.4.0": + self.tool_requires("cmake/[>=3.22 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - tc.variables["ASSIMP_HUNTER_ENABLED"] = False - tc.variables["ASSIMP_IGNORE_GIT_HASH"] = True - tc.variables["ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR"] = False tc.variables["ASSIMP_ANDROID_JNIIOSYSTEM"] = False tc.variables["ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT"] = False tc.variables["ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT"] = False tc.variables["ASSIMP_BUILD_ASSIMP_TOOLS"] = False + tc.variables["ASSIMP_BUILD_DOCS"] = False + tc.variables["ASSIMP_BUILD_DRACO"] = False + tc.variables["ASSIMP_BUILD_FRAMEWORK"] = False + tc.variables["ASSIMP_BUILD_MINIZIP"] = False tc.variables["ASSIMP_BUILD_SAMPLES"] = False tc.variables["ASSIMP_BUILD_TESTS"] = False + tc.variables["ASSIMP_BUILD_ZLIB"] = False tc.variables["ASSIMP_DOUBLE_PRECISION"] = self.options.double_precision + tc.variables["ASSIMP_HUNTER_ENABLED"] = False + tc.variables["ASSIMP_IGNORE_GIT_HASH"] = True + tc.variables["ASSIMP_INJECT_DEBUG_POSTFIX"] = False + tc.variables["ASSIMP_INSTALL"] = True tc.variables["ASSIMP_INSTALL_PDB"] = False tc.variables["ASSIMP_NO_EXPORT"] = False - tc.variables["ASSIMP_BUILD_MINIZIP"] = False + tc.variables["ASSIMP_OPT_BUILD_PACKAGES"] = False + tc.variables["ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR"] = False + tc.variables["ASSIMP_UBSAN"] = False + tc.variables["ASSIMP_WARNINGS_AS_ERRORS"] = False + tc.variables["USE_STATIC_CRT"] = is_msvc_static_runtime(self) + for option, (definition, _) in self._format_option_map.items(): value = self.options.get_safe(option) if value is not None: tc.variables[definition] = value if self.settings.os == "Windows": tc.preprocessor_definitions["NOMINMAX"] = 1 - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" # to avoid warnings + if Version(self.version) < "5.4.0": + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.cache_variables["CMAKE_PROJECT_Assimp_INCLUDE"] = "conan_deps.cmake" tc.cache_variables["WITH_CLIPPER"] = self._depends_on_clipper @@ -246,24 +263,25 @@ def generate(self): cd.set_property("utfcpp", "cmake_target_name", "utf8cpp::utf8cpp") cd.generate() + venv = VirtualBuildEnv(self) + venv.generate() + def _patch_sources(self): apply_conandata_patches(self) # Don't force several compiler and linker flags - replace_mapping = [ - ("-fPIC", ""), - ("-g ", ""), - ("/WX", ""), - ("-Werror", ""), - ("SET(CMAKE_POSITION_INDEPENDENT_CODE ON)", ""), - ('SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MDd /Ob2 /DEBUG:FULL /Zi")', ""), - ('SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")', ""), - ('SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")', ""), - ('SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /PDBALTPATH:%_PDB% /OPT:REF /OPT:ICF")', ""), - ] - for before, after in replace_mapping: - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), before, after, strict=False) - replace_in_file(self, os.path.join(self.source_folder, "code", "CMakeLists.txt"), before, after, strict=False) + for pattern in [ + "-fPIC", + "-g ", + "SET(CMAKE_POSITION_INDEPENDENT_CODE ON)", + 'SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")', + 'SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /PDBALTPATH:%_PDB% /OPT:REF /OPT:ICF")', + ]: + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), pattern, "") + + for pattern in ["-Werror", "/WX"]: + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), pattern, "") + replace_in_file(self, os.path.join(self.source_folder, "code", "CMakeLists.txt"), pattern, "") # Make sure vendored libs are not used by accident by removing their subdirs allow_vendored = ["Open3DGC"] @@ -298,6 +316,8 @@ def _patch_sources(self): ]: save(self, os.path.join(self.source_folder, "contrib", contrib_header), f"#include <{include}>\n") + if Version(self.version) >= "5.4.0": + rmdir(self, self.source_path.joinpath("contrib", "utf8cpp")) # minizip is provided via conan_deps.cmake, no need to use pkgconfig replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), diff --git a/recipes/assimp/config.yml b/recipes/assimp/config.yml index c3337bd62baf1..e0bd8dc212a2c 100644 --- a/recipes/assimp/config.yml +++ b/recipes/assimp/config.yml @@ -1,9 +1,11 @@ versions: + "5.4.2": + folder: "5.x" + "5.4.1": + folder: "5.x" "5.3.1": folder: "5.x" "5.2.5": folder: "5.x" - "5.2.2": - folder: "5.x" "5.1.6": folder: "5.x" diff --git a/recipes/astc-codec/all/test_package/atlas_small_4x4.astc b/recipes/astc-codec/all/test_package/atlas_small_4x4.astc deleted file mode 100644 index 0dd080b12d23f..0000000000000 Binary files a/recipes/astc-codec/all/test_package/atlas_small_4x4.astc and /dev/null differ diff --git a/recipes/astc-codec/all/test_package/conanfile.py b/recipes/astc-codec/all/test_package/conanfile.py index 9f50bbe4c73b2..98ab55852ad56 100644 --- a/recipes/astc-codec/all/test_package/conanfile.py +++ b/recipes/astc-codec/all/test_package/conanfile.py @@ -23,5 +23,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - bees = os.path.join(self.source_folder, "atlas_small_4x4.astc") - self.run(f"{bin_path} {bees} 256 256", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/astc-codec/all/test_package/test_package.cpp b/recipes/astc-codec/all/test_package/test_package.cpp index ec0a2e3ad6195..266f4473a5391 100644 --- a/recipes/astc-codec/all/test_package/test_package.cpp +++ b/recipes/astc-codec/all/test_package/test_package.cpp @@ -8,21 +8,13 @@ int main(int argc, char **argv) { - if (argc < 4) { - std::cerr << "Need at least three argument\n"; - } - std::ifstream stream(argv[1], std::ios::in | std::ios::binary); + std::ifstream stream("fake-file.astc", std::ios::in | std::ios::binary); std::vector astc_data((std::istreambuf_iterator(stream)), std::istreambuf_iterator()); - const size_t width = std::stoi(argv[2]); - const size_t height = std::stoi(argv[3]); - - std::vector result; - result.resize(width * height * 4); - bool success = astc_codec::ASTCDecompressToRGBA( - astc_data.data(), astc_data.size(), width, height, astc_codec::FootprintType::k4x4, - result.data(), result.size(), /* stride */ width * 4); + astc_data.data(), 100, 100, 100, astc_codec::FootprintType::k4x4, NULL, 100, 100); + + std::cout << "Test: " << success << std::endl; stream.close(); diff --git a/recipes/astc-codec/all/test_v1_package/conanfile.py b/recipes/astc-codec/all/test_v1_package/conanfile.py index 3605ef5403092..38f4483872d47 100644 --- a/recipes/astc-codec/all/test_v1_package/conanfile.py +++ b/recipes/astc-codec/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - bees = os.path.join(self.source_folder, os.pardir, "test_package", "atlas_small_4x4.astc") - self.run(f"{bin_path} {bees} 256 256", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/async_simple/all/conandata.yml b/recipes/async_simple/all/conandata.yml index 884ed02955ab2..4befe3006ae91 100644 --- a/recipes/async_simple/all/conandata.yml +++ b/recipes/async_simple/all/conandata.yml @@ -1,7 +1,16 @@ sources: + "1.3": + url: "https://github.com/alibaba/async_simple/archive/refs/tags/v1.3.tar.gz" + sha256: "0BA0DC3397882611B538D04B8EE6668B1A04CE046128599205184C598B718743" "1.2": url: "https://github.com/alibaba/async_simple/archive/refs/tags/1.2.tar.gz" sha256: "a59a2674ac2b0a3997b90873b2bf0fbe4d96fdedbe6a2628c16c92a65a3fa39a" "1.0.0": url: "https://github.com/alibaba/async_simple/archive/refs/tags/1.0.tar.gz" sha256: "b243fb7af5d61b534fe18b662d16498392bbce1deffdc68e58829aa31db7badf" +patches: + "1.0.0": + - patch_file: "patches/disable-asan-1.0.patch" + patch_description: "Add option for disabling address sanitizer in root CMakeLists" + patch_type: "portability" + patch_source: "https://github.com/alibaba/async_simple/commit/ccb760356b9d7481ca73f0c58d15928bf8b0aa0b" diff --git a/recipes/async_simple/all/conanfile.py b/recipes/async_simple/all/conanfile.py index 52e7c0ae4b223..f0da3ed24785b 100644 --- a/recipes/async_simple/all/conanfile.py +++ b/recipes/async_simple/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.microsoft import check_min_vs, is_msvc -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rename, replace_in_file from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.layout import basic_layout @@ -18,9 +18,18 @@ class AsyncSimpleConan(ConanFile): homepage = "https://github.com/alibaba/async_simple" topics = ("modules", "asynchronous", "coroutines", "cpp20", "header-only") - package_type = "header-library" + package_type = "library" settings = "os", "arch", "compiler", "build_type" - no_copy_source = True + options = { + "shared": [True, False], + "fPIC": [True, False], + "header_only": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "header_only": True + } @property def _min_cppstd(self): @@ -29,6 +38,8 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): return { + "Visual Studio": "17", + "msvc": "193", "gcc": "10.3", "clang": "13", "apple-clang": "14", @@ -37,59 +48,111 @@ def _compilers_minimum_version(self): def export_sources(self): export_conandata_patches(self) - def layout(self): - basic_layout(self, src_folder="src") + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.header_only: + self.options.rm_safe("fPIC") + self.options.rm_safe("shared") + elif self.options.shared: + self.options.rm_safe("fPIC") - def requirements(self): - pass + 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): - self.info.clear() + if self.info.options.header_only: + self.info.clear() def validate(self): - if self.settings.compiler.cppstd: + if self.settings.get_safe("compiler.cppstd"): check_min_cppstd(self, self._min_cppstd) - if not is_msvc(self): - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." - ) - else: - raise ConanInvalidConfiguration("msvc not supported now") - - def build_requirements(self): - pass + 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 not self.options.header_only and self.settings.os == "Windows": + raise ConanInvalidConfiguration(f'{self.ref} cannot use uthread on Windows, and therefore it\'s only supported as a header-only library in this configuration with "{self.name}/*:header_only=True"') def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + def generate(self): + if not self.options.header_only: + tc = CMakeToolchain(self) + tc.cache_variables["ASYNC_SIMPLE_BUILD_DEMO_EXAMPLE"] = False + tc.cache_variables["ASYNC_SIMPLE_ENABLE_TESTS"] = False + tc.cache_variables["ASYNC_SIMPLE_ENABLE_ASAN"] = False + #libaio is only used in SimpleIOExecutor which is only used in executor tests and not meant for end users + tc.cache_variables["ASYNC_SIMPLE_DISABLE_AIO"] = True + tc.generate() + def build(self): apply_conandata_patches(self) + if not self.options.header_only: + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), '-D_GLIBCXX_USE_CXX11_ABI=1', '') + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - copy( - self, - pattern="*.h", + + if self.options.header_only: + hCopyExcludes = ("test", "uthread", "executors") + if not self.options.header_only: + hCopyExcludes = ("test", "executors") + if self.options.shared: + if self.settings.os == "Macos": + sharedLibExt = "*.dylib*" + else: + sharedLibExt = "*.so*" + copy(self, pattern=sharedLibExt, + dst=os.path.join(self.package_folder, "lib"), + src=os.path.join(self.build_folder, "async_simple") + ) + else: + copy(self, pattern="*.a", + dst=os.path.join(self.package_folder, "lib"), + src=os.path.join(self.build_folder, "async_simple") + ) + libTarget = os.path.join(self.package_folder, "lib", "libasync_simple.a") + if not os.path.isfile(libTarget): + rename(self, os.path.join(self.package_folder, "lib", "libasync_simple_static.a"), + libTarget) + + copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include/async_simple"), src=os.path.join(self.source_folder, "async_simple"), - excludes=("test", "executors", "uthread") + excludes=hCopyExcludes ) def package_info(self): - self.cpp_info.bindirs = [] - self.cpp_info.frameworkdirs = [] - self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] + if not self.options.header_only: + self.cpp_info.libs = ["async_simple"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m", "pthread"] self.cpp_info.set_property("cmake_file_name", "async_simple") - self.cpp_info.set_property("cmake_target_name", "async_simple::async_simple") + if self.options.header_only: + self.cpp_info.set_property("cmake_target_name", "async_simple::async_simple_header_only") + + self.cpp_info.components["_async_simple"].names["cmake_find_package"] = "async_simple_header_only" + self.cpp_info.components["_async_simple"].names["cmake_find_package_multi"] = "async_simple_header_only" + self.cpp_info.components["_async_simple"].set_property("cmake_target_name", "async_simple::async_simple_header_only") + else: + self.cpp_info.set_property("cmake_target_name", "async_simple::async_simple") + + self.cpp_info.components["_async_simple"].names["cmake_find_package"] = "async_simple" + self.cpp_info.components["_async_simple"].names["cmake_find_package_multi"] = "async_simple" + self.cpp_info.components["_async_simple"].set_property("cmake_target_name", "async_simple::async_simple") self.cpp_info.filenames["cmake_find_package"] = "async_simple" self.cpp_info.filenames["cmake_find_package_multi"] = "async_simple" self.cpp_info.names["cmake_find_package"] = "async_simple" self.cpp_info.names["cmake_find_package_multi"] = "async_simple" - self.cpp_info.components["_async_simple"].names["cmake_find_package"] = "async_simple_header_only" - self.cpp_info.components["_async_simple"].names["cmake_find_package_multi"] = "async_simple_header_only" - self.cpp_info.components["_async_simple"].set_property("cmake_target_name", "async_simple::async_simple_header_only") diff --git a/recipes/async_simple/all/patches/disable-asan-1.0.patch b/recipes/async_simple/all/patches/disable-asan-1.0.patch new file mode 100644 index 0000000000000..ce18632f1b35d --- /dev/null +++ b/recipes/async_simple/all/patches/disable-asan-1.0.patch @@ -0,0 +1,21 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -106,11 +106,13 @@ + #list(APPEND deplibs "-m64") + endif() + endif() +- +-if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC") +- if (CMAKE_BUILD_TYPE STREQUAL "Debug") +- message("-- Use flag -fsanitize=address") +- list(APPEND CXX_FLAGS "-fsanitize=address") ++option(ASYNC_SIMPLE_ENABLE_ASAN "enable asan in debug when compiler is not msvc" ON) ++if (ASYNC_SIMPLE_ENABLE_ASAN) ++ if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC") ++ if (CMAKE_BUILD_TYPE STREQUAL "Debug") ++ message("-- Use flag -fsanitize=address") ++ list(APPEND CXX_FLAGS "-fsanitize=address") ++ endif() + endif() + endif() + diff --git a/recipes/async_simple/all/test_package/CMakeLists.txt b/recipes/async_simple/all/test_package/CMakeLists.txt index 8b854aa258e40..ccb7b85dadd81 100644 --- a/recipes/async_simple/all/test_package/CMakeLists.txt +++ b/recipes/async_simple/all/test_package/CMakeLists.txt @@ -7,4 +7,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(async_simple REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE async_simple::async_simple_header_only) +if(ASYNC_SIMPLE_HEADER_ONLY) + target_link_libraries(test_package PRIVATE async_simple::async_simple_header_only) +else() + target_link_libraries(test_package PRIVATE async_simple::async_simple) +endif() diff --git a/recipes/async_simple/all/test_package/conanfile.py b/recipes/async_simple/all/test_package/conanfile.py index 1111583fea732..be622ed71cf62 100644 --- a/recipes/async_simple/all/test_package/conanfile.py +++ b/recipes/async_simple/all/test_package/conanfile.py @@ -1,13 +1,13 @@ 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, CMakeToolchain, cmake_layout 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,7 +15,12 @@ def requirements(self): def layout(self): cmake_layout(self) - + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ASYNC_SIMPLE_HEADER_ONLY"] = self.dependencies[self.tested_reference_str].options.header_only + tc.generate() + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/async_simple/config.yml b/recipes/async_simple/config.yml index 0b3d8acdb470b..e526b1e8db52a 100644 --- a/recipes/async_simple/config.yml +++ b/recipes/async_simple/config.yml @@ -1,4 +1,7 @@ versions: + # Newer versions at the top + "1.3": + folder: all "1.2": folder: all "1.0.0": diff --git a/recipes/asyncpp/all/conandata.yml b/recipes/asyncpp/all/conandata.yml new file mode 100644 index 0000000000000..4b083e872c16b --- /dev/null +++ b/recipes/asyncpp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.2.4": + url: "https://github.com/petiaccja/asyncpp/archive/refs/tags/v0.2.4.tar.gz" + sha256: "58138FF5801D3A547EAAD9ADC2C30FE7A0D506C0E41DC56071CEAAD5747210B5" diff --git a/recipes/asyncpp/all/conanfile.py b/recipes/asyncpp/all/conanfile.py new file mode 100644 index 0000000000000..c8bb4abd89547 --- /dev/null +++ b/recipes/asyncpp/all/conanfile.py @@ -0,0 +1,102 @@ +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.env import VirtualBuildEnv +from conan.tools.files import copy, get, rm, rmdir +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.53.0" + + +class AsyncppRecipe(ConanFile): + name = "asyncpp" + description = "A C++20 coroutine library for asynchronous and parallel programming." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/project/package" + topics = ("coroutine", "c++20", "async", "parallel", "concurrency") + + 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 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "13", + "clang": "17", + "msvc": "193", + "Visual Studio": "17", + } + + 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): + # src_folder must use the same source folder name the project + cmake_layout(self, src_folder="src") + + def validate(self): + # validate the minimum cpp standard supported. For C++ projects only + 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.compiler == "apple-clang": + # As per https://en.cppreference.com/w/cpp/compiler_support, apple-clang 14.0.0 partially supports C++20 but not jthread + raise ConanInvalidConfiguration(f"{self.ref} does not support apple-clang compiler, as it lacks jthread support.") + + def build_requirements(self): + self.tool_requires("cmake/[>=3.25 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ASYNCPP_BUILD_TESTS"] = "OFF" + tc.variables["ASYNCPP_BUILD_BENCHMARKS"] = "OFF" + tc.generate() + venv = VirtualBuildEnv(self) + venv.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.md", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["asyncpp"] + if self.settings.os == "Windows" and self.options.shared: + self.cpp_info.bindirs = ["libs"] + + if self.settings.os in ("Linux", "FreeBSD"): + self.cpp_info.system_libs = ["pthread"] diff --git a/recipes/asyncpp/all/test_package/CMakeLists.txt b/recipes/asyncpp/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..5a4068e0dbcf7 --- /dev/null +++ b/recipes/asyncpp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(TestPackage CXX) + +add_executable(test_package test_package.cpp) + +find_package(asyncpp CONFIG REQUIRED) +target_link_libraries(test_package asyncpp::asyncpp) +target_compile_features(test_package PUBLIC cxx_std_20) diff --git a/recipes/asyncpp/all/test_package/conanfile.py b/recipes/asyncpp/all/test_package/conanfile.py new file mode 100644 index 0000000000000..58dfdc09f139b --- /dev/null +++ b/recipes/asyncpp/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run + + +class AsyncppTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + + 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/asyncpp/all/test_package/test_package.cpp b/recipes/asyncpp/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..070acd2fe6b83 --- /dev/null +++ b/recipes/asyncpp/all/test_package/test_package.cpp @@ -0,0 +1,18 @@ +#include +#include + +#include +#include + +using namespace asyncpp; + + +task message() { + co_return std::string("async++ installation works."); +} + + +int main() { + std::cout << join(message()) << std::endl; + return 0; +} diff --git a/recipes/asyncpp/config.yml b/recipes/asyncpp/config.yml new file mode 100644 index 0000000000000..a718e51b057ea --- /dev/null +++ b/recipes/asyncpp/config.yml @@ -0,0 +1,3 @@ +versions: + "0.2.4": + folder: all 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/audiofile/all/test_package/conanfile.py b/recipes/audiofile/all/test_package/conanfile.py index fb1d035fc5b12..d120a992c06a6 100644 --- a/recipes/audiofile/all/test_package/conanfile.py +++ b/recipes/audiofile/all/test_package/conanfile.py @@ -22,5 +22,4 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - wav_path = os.path.join(self.source_folder, "sine.wav") - self.run(f"{bin_path} {wav_path}", env="conanrun") + self.run(bin_path, env="conanrun") diff --git a/recipes/audiofile/all/test_package/sine.wav b/recipes/audiofile/all/test_package/sine.wav deleted file mode 100644 index a3225d12bf297..0000000000000 Binary files a/recipes/audiofile/all/test_package/sine.wav and /dev/null differ diff --git a/recipes/audiofile/all/test_package/test_package.cpp b/recipes/audiofile/all/test_package/test_package.cpp index d95bc64031cda..906aa9efa0327 100644 --- a/recipes/audiofile/all/test_package/test_package.cpp +++ b/recipes/audiofile/all/test_package/test_package.cpp @@ -1,18 +1,15 @@ // workaround for a missing include in v1.0.9 and earlier +#include +#include #include - #include -#include + int main(int argc, char **argv) { - if (argc < 2) { - std::cerr << "Need at least one argument" << std::endl; - return 1; - } AudioFile audioFile; - audioFile.load(argv[1]); + audioFile.load("fake-file.wav"); audioFile.printSummary(); return 0; } diff --git a/recipes/audiofile/all/test_v1_package/conanfile.py b/recipes/audiofile/all/test_v1_package/conanfile.py index 21642db6ce1ba..38f4483872d47 100644 --- a/recipes/audiofile/all/test_v1_package/conanfile.py +++ b/recipes/audiofile/all/test_v1_package/conanfile.py @@ -14,5 +14,4 @@ def build(self): def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "test_package") - wav_path = os.path.join(self.source_folder, os.pardir, "test_package", "sine.wav") - self.run(f"{bin_path} {wav_path}", run_environment=True) + self.run(bin_path, run_environment=True) diff --git a/recipes/audiowaveform/all/conandata.yml b/recipes/audiowaveform/all/conandata.yml new file mode 100644 index 0000000000000..2e2ba28ceca12 --- /dev/null +++ b/recipes/audiowaveform/all/conandata.yml @@ -0,0 +1,15 @@ +sources: + "1.10.1": + url: "https://github.com/bbc/audiowaveform/archive/refs/tags/1.10.1.tar.gz" + sha256: "bd283d84dc84fda84f4090fddde9a5bef924c588dd7bf6acaa8f7b946efb42a4" +patches: + "1.10.1": + - patch_file: "patches/0001-1.10.1_find_packages.patch" + patch_description: "Inject thirdparties from conan" + patch_type: "conan" + - patch_file: "patches/0002-1.10.1_remove_flags.patch" + patch_description: "Remove custom compile flags" + patch_type: "conan" + - patch_file: "patches/0003-1.10.1_remove_documentation.patch" + patch_description: "Remove documenation" + patch_type: "conan" diff --git a/recipes/audiowaveform/all/conanfile.py b/recipes/audiowaveform/all/conanfile.py new file mode 100644 index 0000000000000..4d5e42ee98a02 --- /dev/null +++ b/recipes/audiowaveform/all/conanfile.py @@ -0,0 +1,94 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd, valid_min_cppstd +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.microsoft import is_msvc +import os + + +required_conan_version = ">=1.53.0" + + +class AudiowaveformConan(ConanFile): + name = "audiowaveform" + description = "C++ program to generate waveform data and render waveform images from audio files" + license = "GPL-3.0-or-later" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://waveform.prototyping.bbc.co.uk/" + topics = ("audio", "c-plus-plus") + package_type = "application" + settings = "os", "arch", "compiler", "build_type" + + @property + def _min_cppstd(self): + return 11 + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + pass + + def configure(self): + pass + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("libgd/2.3.3") + self.requires("libid3tag/0.15.1b") + self.requires("libmad/0.15.1b") + self.requires("libsndfile/1.2.2") + self.requires("boost/1.85.0") + + def package_id(self): + del self.info.settings.compiler + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + if is_msvc(self): + raise ConanInvalidConfiguration(f"{self.ref} can not be built on Visual Studio and msvc.") + + def build_requirements(self): + pass + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ENABLE_TESTS"] = False + if not valid_min_cppstd(self, self._min_cppstd): + tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + rm(self, "Find*.cmake", os.path.join(self.source_folder, "CMake")) + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="COPYING", 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.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + self.cpp_info.includedirs = [] + + # TODO: Legacy, to be removed on Conan 2.0 + bin_folder = os.path.join(self.package_folder, "bin") + self.env_info.PATH.append(bin_folder) diff --git a/recipes/audiowaveform/all/patches/0001-1.10.1_find_packages.patch b/recipes/audiowaveform/all/patches/0001-1.10.1_find_packages.patch new file mode 100644 index 0000000000000..e4f3afcf4da27 --- /dev/null +++ b/recipes/audiowaveform/all/patches/0001-1.10.1_find_packages.patch @@ -0,0 +1,66 @@ +Use packages that are provided by conan +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -88,40 +88,11 @@ if(BUILD_STATIC) + endif() + endif(BUILD_STATIC) + +-find_package(LibGD REQUIRED) +-if(LIBGD_FOUND) +- message(STATUS "LIBGD_INCLUDE_DIRS='${LIBGD_INCLUDE_DIRS}'") +- message(STATUS "LIBGD_LIBRARIES=${LIBGD_LIBRARIES}") +- include_directories(${LIBGD_INCLUDE_DIRS}) +-endif(LIBGD_FOUND) +- +-find_package(LibSndFile REQUIRED) +-if(LIBSNDFILE_FOUND) +- message(STATUS "LIBSNDFILE_INCLUDE_DIRS='${LIBSNDFILE_INCLUDE_DIRS}'") +- message(STATUS "LIBSNDFILE_LIBRARIES=${LIBSNDFILE_LIBRARIES}") +- include_directories(${LIBSNDFILE_INCLUDE_DIRS}) +-endif(LIBSNDFILE_FOUND) +- +-find_package(LibMad REQUIRED) +-if(LIBMAD_FOUND) +- message(STATUS "LIBMAD_INCLUDE_DIRS='${LIBMAD_INCLUDE_DIRS}'") +- message(STATUS "LIBMAD_LIBRARIES=${LIBMAD_LIBRARIES}") +- include_directories(${LIBMAD_INCLUDE_DIRS}) +-endif(LIBMAD_FOUND) +- +-find_package(LibId3Tag REQUIRED) +-if(LIBID3TAG_FOUND) +- message(STATUS "LIBID3TAG_INCLUDE_DIRS='${LIBID3TAG_INCLUDE_DIRS}'") +- message(STATUS "LIBID3TAG_LIBRARIES=${LIBID3TAG_LIBRARIES}") +- include_directories(${LIBID3TAG_INCLUDE_DIRS}) +-endif(LIBID3TAG_FOUND) +- +-find_package(Boost 1.46.0 COMPONENTS program_options filesystem regex system REQUIRED) +-if(Boost_FOUND) +- message(STATUS "Boost_INCLUDE_DIRS='${Boost_INCLUDE_DIRS}'") +- message(STATUS "Boost_LIBRARIES='${Boost_LIBRARIES}'") +- include_directories(${Boost_INCLUDE_DIRS}) +-endif(Boost_FOUND) ++find_package(libgd REQUIRED CONFIG) ++find_package(SndFile REQUIRED CONFIG) ++find_package(libmad REQUIRED CONFIG) ++find_package(libid3tag REQUIRED CONFIG) ++find_package(Boost COMPONENTS program_options filesystem regex REQUIRED) + + #------------------------------------------------------------------------------- + # +@@ -278,11 +249,11 @@ add_executable(audiowaveform ${SRCS}) + + # Specify libraries to link against. + set(LIBS +- ${LIBSNDFILE_LIBRARIES} +- ${LIBGD_LIBRARIES} +- ${LIBMAD_LIBRARIES} +- ${LIBID3TAG_LIBRARIES} +- ${Boost_LIBRARIES} ++ SndFile::sndfile ++ libgd::libgd ++ libmad::libmad ++ libid3tag::libid3tag ++ Boost::program_options Boost::filesystem Boost::regex + ) + + target_link_libraries(audiowaveform ${LIBS}) diff --git a/recipes/audiowaveform/all/patches/0002-1.10.1_remove_flags.patch b/recipes/audiowaveform/all/patches/0002-1.10.1_remove_flags.patch new file mode 100644 index 0000000000000..ac2bac6bbfe1a --- /dev/null +++ b/recipes/audiowaveform/all/patches/0002-1.10.1_remove_flags.patch @@ -0,0 +1,19 @@ +Remove custom compile flags +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -162,6 +162,7 @@ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.6.3") + message(FATAL_ERROR "g++ 4.6.3 or later required") + endif() + ++if(0) + if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.7") + set(CMAKE_CXX_FLAGS "-std=c++11") + else() +@@ -178,6 +179,7 @@ if(APPLE AND BUILD_STATIC) + set(CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") + endif() ++endif() + + message(STATUS "CMAKE_CXX_COMPILER_VERSION='${CMAKE_CXX_COMPILER_VERSION}'") + message(STATUS "CMAKE_CXX_FLAGS='${CMAKE_CXX_FLAGS}'") diff --git a/recipes/audiowaveform/all/patches/0003-1.10.1_remove_documentation.patch b/recipes/audiowaveform/all/patches/0003-1.10.1_remove_documentation.patch new file mode 100644 index 0000000000000..c8cc66eaa8a38 --- /dev/null +++ b/recipes/audiowaveform/all/patches/0003-1.10.1_remove_documentation.patch @@ -0,0 +1,34 @@ +Remove documentation target +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -314,6 +314,7 @@ endif() + # + #------------------------------------------------------------------------------- + ++if(0) + file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/doc) + + add_custom_command( +@@ -334,6 +335,7 @@ add_custom_target(doc + ) + + add_dependencies(audiowaveform doc) ++endif() + + #------------------------------------------------------------------------------- + # +@@ -347,6 +349,7 @@ message(STATUS "CMAKE_INSTALL_PREFIX='${CMAKE_INSTALL_PREFIX}'") + install(TARGETS audiowaveform DESTINATION bin) + + # Install man pages ++if(0) + install( + FILES ${PROJECT_BINARY_DIR}/doc/audiowaveform.1.gz + DESTINATION share/man/man1 +@@ -356,5 +359,6 @@ install( + FILES ${PROJECT_BINARY_DIR}/doc/audiowaveform.5.gz + DESTINATION share/man/man5 + ) ++endif() + + #------------------------------------------------------------------------------- diff --git a/recipes/audiowaveform/all/test_package/conanfile.py b/recipes/audiowaveform/all/test_package/conanfile.py new file mode 100644 index 0000000000000..5b8eaa02f81b6 --- /dev/null +++ b/recipes/audiowaveform/all/test_package/conanfile.py @@ -0,0 +1,13 @@ +from conan import ConanFile + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "VirtualBuildEnv" + test_type = "explicit" + + def build_requirements(self): + self.tool_requires(self.tested_reference_str) + + def test(self): + self.run("audiowaveform --version") diff --git a/recipes/audiowaveform/config.yml b/recipes/audiowaveform/config.yml new file mode 100644 index 0000000000000..5492c2a9aab5c --- /dev/null +++ b/recipes/audiowaveform/config.yml @@ -0,0 +1,3 @@ +versions: + "1.10.1": + folder: all diff --git a/recipes/avahi/all/conanfile.py b/recipes/avahi/all/conanfile.py index 7c5e4d7f868ae..2920eabb9e448 100644 --- a/recipes/avahi/all/conanfile.py +++ b/recipes/avahi/all/conanfile.py @@ -46,7 +46,7 @@ def layout(self): def requirements(self): self.requires("glib/2.78.3") - self.requires("expat/2.6.0") + self.requires("expat/[>=2.6.2 <3]") self.requires("libdaemon/0.14") self.requires("dbus/1.15.8") self.requires("gdbm/1.23") diff --git a/recipes/avcpp/all/conandata.yml b/recipes/avcpp/all/conandata.yml index 1ba5e69f511c2..59d5eecbaffc4 100644 --- a/recipes/avcpp/all/conandata.yml +++ b/recipes/avcpp/all/conandata.yml @@ -1,17 +1,24 @@ sources: + "2.3.2": + url: "https://github.com/h4tr3d/avcpp/archive/refs/tags/v2.3.2.tar.gz" + sha256: "ce1a7296e6b1bf808ad4f9f486723c88e4cd12d80a96e226635ce3316ca73733" + "2.3.0": + url: "https://github.com/h4tr3d/avcpp/archive/refs/tags/v2.3.0.tar.gz" + sha256: "8ecb98caa9640a21772562c326f7c1f6ad99cd7f15d7ea40fe37d114fabbe2b5" "2.1.0": url: "https://github.com/h4tr3d/avcpp/archive/refs/tags/v2.1.0.tar.gz" sha256: "8398217dccb9f5b4cbb41e5bf4f73f47b461ed3ba8c3aefdda9f9dd714649855" - "cci.20220301": - url: "https://github.com/h4tr3d/avcpp/archive/fd4bc4662eb39853de8fcac4a663bebd0eea30b8.tar.gz" - sha256: "e48eae2ec154bc69aed16159c8b18c9ffb4925ba672b022e94a3c9b96782a4bf" patches: - "2.1.0": - - patch_file: "patches/2.1.0-fix-ffmpeg.patch" + "2.3.2": + - patch_file: "patches/2.3.0-fix-ffmpeg.patch" + patch_description: "fix ffmpeg package name and remove ffmpeg from install targets" + patch_type: "conan" + "2.3.0": + - patch_file: "patches/2.3.0-fix-ffmpeg.patch" patch_description: "fix ffmpeg package name and remove ffmpeg from install targets" patch_type: "conan" - "cci.20220301": - - patch_file: "patches/cci.20220301-fix-ffmpeg.patch" + "2.1.0": + - patch_file: "patches/2.1.0-fix-ffmpeg.patch" patch_description: "fix ffmpeg package name and remove ffmpeg from install targets" patch_type: "conan" diff --git a/recipes/avcpp/all/conanfile.py b/recipes/avcpp/all/conanfile.py index e1479bc47146c..dfef33000726b 100644 --- a/recipes/avcpp/all/conanfile.py +++ b/recipes/avcpp/all/conanfile.py @@ -56,7 +56,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("ffmpeg/5.0") + self.requires("ffmpeg/6.1", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -68,6 +68,10 @@ def validate(self): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + def build_requirements(self): + if Version(self.version) >= "2.2.0": + self.tool_requires("cmake/[>=3.19 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/avcpp/all/patches/2.3.0-fix-ffmpeg.patch b/recipes/avcpp/all/patches/2.3.0-fix-ffmpeg.patch new file mode 100644 index 0000000000000..e316cd9d624ba --- /dev/null +++ b/recipes/avcpp/all/patches/2.3.0-fix-ffmpeg.patch @@ -0,0 +1,46 @@ +diff --git CMakeLists.txt CMakeLists.txt +index b086352..91d3165 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -9,8 +9,6 @@ endif() + + project(AvCpp LANGUAGES CXX VERSION ${AVCPP_VERSION}) + +-set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) +- + set(FFMPEG_PKG_CONFIG_SUFFIX "" CACHE STRING "This suffix uses for FFmpeg component names searches by pkg-config") + set(AV_ENABLE_STATIC On CACHE BOOL "Enable static library build (On)") + set(AV_ENABLE_SHARED On CACHE BOOL "Enable shared library build (On)") +@@ -31,8 +29,8 @@ set (AVCPP_WARNING_OPTIONS + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads) + +-find_package(FFmpeg +- COMPONENTS AVCODEC AVFORMAT AVUTIL AVDEVICE AVFILTER SWSCALE SWRESAMPLE REQUIRED) ++find_package(ffmpeg ++ COMPONENTS avcodec avformat avutil avdevice avfilter swscale swresample REQUIRED) + + add_subdirectory(src) + +diff --git src/CMakeLists.txt src/CMakeLists.txt +index 3c00150..c3818cf 100644 +--- src/CMakeLists.txt ++++ src/CMakeLists.txt +@@ -29,7 +29,7 @@ foreach(TARGET ${AV_TARGETS}) + + target_compile_options(${TARGET} PRIVATE ${AVCPP_WARNING_OPTIONS}) + target_compile_definitions(${TARGET} PUBLIC __STDC_CONSTANT_MACROS) +- target_link_libraries(${TARGET} PRIVATE Threads::Threads PUBLIC FFmpeg::FFmpeg) ++ target_link_libraries(${TARGET} PRIVATE Threads::Threads PUBLIC ffmpeg::ffmpeg) + target_include_directories(${TARGET} + PUBLIC + $ +@@ -58,7 +58,7 @@ if (AVCPP_NOT_SUBPROJECT) + # APPEND + # FILE ${CMAKE_CURRENT_BINARY_DIR}/avcpp-targets.cmake) + +- install(TARGETS ${AV_TARGETS} FFmpeg ++ install(TARGETS ${AV_TARGETS} + EXPORT avcpp-targets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/recipes/avcpp/all/patches/cci.20220301-fix-ffmpeg.patch b/recipes/avcpp/all/patches/cci.20220301-fix-ffmpeg.patch deleted file mode 100644 index 3207ead4b4610..0000000000000 --- a/recipes/avcpp/all/patches/cci.20220301-fix-ffmpeg.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a5fed05..d077b96 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -6,7 +6,7 @@ endif() - - project(AvCpp LANGUAGES CXX VERSION 2.0.99) - --set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) -+# set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) - - set(FFMPEG_PKG_CONFIG_SUFFIX "" CACHE STRING "This suffix uses for FFmpeg component names searches by pkg-config") - set(AV_ENABLE_STATIC On CACHE BOOL "Enable static library build (On)") -@@ -28,8 +28,8 @@ set (AVCPP_WARNING_OPTIONS - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads) - --find_package(FFmpeg -- COMPONENTS AVCODEC AVFORMAT AVUTIL AVDEVICE AVFILTER SWSCALE SWRESAMPLE REQUIRED) -+find_package(ffmpeg -+ COMPONENTS avcodec avformat avutil avdevice avfilter swscale swresample REQUIRED) - - add_subdirectory(src) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 80c6faa..262c16c 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -24,7 +24,7 @@ foreach(TARGET ${AV_TARGETS}) - add_library(${TARGET} ${TYPE} ${AV_SOURCES} ${AV_HEADERS}) - - target_compile_options(${TARGET} PRIVATE ${AVCPP_WARNING_OPTIONS}) -- target_link_libraries(${TARGET} PRIVATE Threads::Threads PUBLIC FFmpeg::FFmpeg) -+ target_link_libraries(${TARGET} PRIVATE Threads::Threads PUBLIC ffmpeg::ffmpeg) - target_include_directories(${TARGET} - PUBLIC - $ -@@ -53,7 +53,7 @@ if (AVCPP_NOT_SUBPROJECT) - # APPEND - # FILE ${CMAKE_CURRENT_BINARY_DIR}/avcpp-targets.cmake) - -- install(TARGETS ${AV_TARGETS} FFmpeg -+ install(TARGETS ${AV_TARGETS} - EXPORT avcpp-targets - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/recipes/avcpp/config.yml b/recipes/avcpp/config.yml index deb0eb011c7ea..38cdb450f8142 100644 --- a/recipes/avcpp/config.yml +++ b/recipes/avcpp/config.yml @@ -1,5 +1,7 @@ versions: - "2.1.0": + "2.3.2": + folder: all + "2.3.0": folder: all - "cci.20220301": + "2.1.0": 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 de7ce7d5e222d..c0ea74e4902c8 100644 --- a/recipes/aws-c-cal/all/conanfile.py +++ b/recipes/aws-c-cal/all/conanfile.py @@ -48,10 +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) - else: - self.requires("aws-c-common/0.9.6", 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..3bc22662e6f6c 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,18 @@ 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") + # These versions come from aws-sdl-cpp prefetch_crt_dependency.sh file, + # dont bump them independently, check the file and update all the dependencies at once + 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.16") # 1.4.11 not available, using next available version + 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.15") 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-kvs-pic/all/conandata.yml b/recipes/aws-kvs-pic/all/conandata.yml index 4be3843841ab1..5e5052a1a9680 100644 --- a/recipes/aws-kvs-pic/all/conandata.yml +++ b/recipes/aws-kvs-pic/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/awslabs/amazon-kinesis-video-streams-pic/archive/refs/tags/v1.1.0.tar.gz" + sha256: "ef45723cd439f855bae2304d9488b68cd6d1e0dc3203c97ebd1cbb26197edb55" "1.0.1": url: "https://github.com/awslabs/amazon-kinesis-video-streams-pic/archive/refs/tags/v1.0.1.tar.gz" sha256: "d04732217c74687c5498665b353cb089d725ca7f5b5da61a3f984f7fbefb2ac9" diff --git a/recipes/aws-kvs-pic/all/conanfile.py b/recipes/aws-kvs-pic/all/conanfile.py index a0653e082edea..e8a1073232807 100644 --- a/recipes/aws-kvs-pic/all/conanfile.py +++ b/recipes/aws-kvs-pic/all/conanfile.py @@ -4,6 +4,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, rmdir, replace_in_file +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -72,6 +73,10 @@ def package_info(self): self.cpp_info.components["kvspic"].set_property("pkg_config_name", "libkvspic") if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["kvspic"].system_libs = ["dl", "rt", "pthread"] + + if Version(self.version) >= "1.1.0": + if self.settings.build_type == "Debug": + self.cpp_info.components["kvspic"].defines = ["DEBUG_BUILD"] self.cpp_info.components["kvspicClient"].libs = ["kvspicClient"] self.cpp_info.components["kvspicClient"].set_property("pkg_config_name", "libkvspicClient") diff --git a/recipes/aws-kvs-pic/config.yml b/recipes/aws-kvs-pic/config.yml index 42adf0e62a4df..f7630e1054b00 100644 --- a/recipes/aws-kvs-pic/config.yml +++ b/recipes/aws-kvs-pic/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "1.0.1": folder: all "cci.20210812": 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..36f76d76bbf97 100644 --- a/recipes/aws-sdk-cpp/all/conandata.yml +++ b/recipes/aws-sdk-cpp/all/conandata.yml @@ -1,28 +1,19 @@ sources: + "1.11.352": + url: "https://github.com/aws/aws-sdk-cpp/archive/1.11.352.tar.gz" + sha256: "999583df108a5363ff33563f86ea23a528761ebea3577348867932ba7eeacae2" "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.11.352": + - patch_file: patches/1.11.352-0001-pulseaudio.patch + patch_description: Use pulseaudio from conan + patch_type: conan + - patch_file: patches/1.11.352-0002-disable-sort-links.patch + - patch_file: patches/1.9.100-0002-aws-plugin-conf.patch "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..7e075ddde0985 100644 --- a/recipes/aws-sdk-cpp/all/conanfile.py +++ b/recipes/aws-sdk-cpp/all/conanfile.py @@ -20,274 +20,408 @@ class AwsSdkCppConan(ConanFile): topics = ("aws", "cpp", "cross-platform", "amazon", "cloud") package_type = "library" settings = "os", "arch", "compiler", "build_type" + # This list comes from tools/code-generation/api-description, which then generates the sdk sources + # To generate for a new one, run the build once and check src/generated/src inside your build_folder, remove the common aws-sdk-cpp prefix + # and that's the list of sdks. The join it to the below one _sdks = ( - "access-management", - "accessanalyzer", - "acm", - "acm-pca", - "alexaforbusiness", - "amp", - "amplify", - "amplifybackend", - "apigateway", - "apigatewaymanagementapi", - "apigatewayv2", - "appconfig", - "appflow", - "appintegrations", - "application-autoscaling", - "application-insights", - "appmesh", - "appstream", - "appsync", - "athena", - "auditmanager", - "autoscaling", - "autoscaling-plans", - "awstransfer", - "backup", - "batch", - "braket", - "budgets", - "ce", - "chime", - "cloud9", - "clouddirectory", - "cloudformation", - "cloudfront", - "cloudhsm", - "cloudhsmv2", - "cloudsearch", - "cloudsearchdomain", - "cloudtrail", - "codeartifact", - "codebuild", - "codecommit", - "codedeploy", - "codeguru-reviewer", - "codeguruprofiler", - "codepipeline", - "codestar", - "codestar-connections", - "codestar-notifications", - "cognito-identity", - "cognito-idp", - "cognito-sync", - "comprehend", - "comprehendmedical", - "compute-optimizer", - "config", - "connect", - "connect-contact-lens", - "connectparticipant", - "cur", - "customer-profiles", - "databrew", - "dataexchange", - "datapipeline", - "datasync", - "dax", - "detective", - "devicefarm", - "devops-guru", - "directconnect", - "discovery", - "dlm", - "dms", - "docdb", - "ds", - "dynamodb", - "dynamodbstreams", - "ebs", - "ec2", - "ec2-instance-connect", - "ecr", - "ecr-public", - "ecs", - "eks", - "elastic-inference", - "elasticache", - "elasticbeanstalk", - "elasticfilesystem", - "elasticloadbalancing", - "elasticloadbalancingv2", - "elasticmapreduce", - "elastictranscoder", - "email", - "emr-containers", - "es", - "eventbridge", - "events", - "firehose", - "fms", - "forecast", - "forecastquery", - "frauddetector", - "fsx", - "gamelift", - "glacier", - "globalaccelerator", - "glue", - "greengrass", - "greengrassv2", - "groundstation", - "guardduty", - "health", - "healthlake", - "honeycode", - "iam", - "identity-management", - "identitystore", - "imagebuilder", - "importexport", - "inspector", - "iot", - "iot-data", - "iot-jobs-data", - "iot1click-devices", - "iot1click-projects", - "iotanalytics", - "iotdeviceadvisor", - "iotevents", - "iotevents-data", - "iotfleethub", - "iotsecuretunneling", - "iotsitewise", - "iotthingsgraph", - "iotwireless", - "ivs", - "kafka", - "kendra", - "kinesis", - "kinesis-video-archived-media", - "kinesis-video-media", - "kinesis-video-signaling", - "kinesisanalytics", - "kinesisanalyticsv2", - "kinesisvideo", - "kms", - "lakeformation", - "lambda", - "lex", - "lex-models", - "lexv2-models", - "lexv2-runtime", - "license-manager", - "lightsail", - "location", - "logs", - "lookoutvision", - "machinelearning", - "macie", - "macie2", - "managedblockchain", - "marketplace-catalog", - "marketplace-entitlement", - "marketplacecommerceanalytics", - "mediaconnect", - "mediaconvert", - "medialive", - "mediapackage", - "mediapackage-vod", - "mediastore", - "mediastore-data", - "mediatailor", - "meteringmarketplace", - "migrationhub-config", - "mobile", - "mobileanalytics", - "monitoring", - "mq", - "mturk-requester", - "mwaa", - "neptune", - "network-firewall", - "networkmanager", - "opsworks", - "opsworkscm", - "organizations", - "outposts", - "personalize", - "personalize-events", - "personalize-runtime", - "pi", - "pinpoint", - "pinpoint-email", - "polly", - "polly-sample", - "pricing", - "qldb", - "qldb-session", - "queues", - "quicksight", - "ram", - "rds", - "rds-data", - "redshift", - "redshift-data", - "rekognition", - "resource-groups", - "resourcegroupstaggingapi", - "robomaker", - "route53", - "route53domains", - "route53resolver", - "s3", - "s3-crt", - "s3-encryption", - "s3control", - "s3outposts", - "sagemaker", - "sagemaker-a2i-runtime", - "sagemaker-edge", - "sagemaker-featurestore-runtime", - "sagemaker-runtime", - "savingsplans", - "schemas", - "sdb", - "secretsmanager", - "securityhub", - "serverlessrepo", - "service-quotas", - "servicecatalog", - "servicecatalog-appregistry", - "servicediscovery", - "sesv2", - "shield", - "signer", - "sms", - "sms-voice", - "snowball", - "sns", - "sqs", - "ssm", - "sso", - "sso-admin", - "sso-oidc", - "states", - "storagegateway", - "sts", - "support", - "swf", - "synthetics", - "text-to-speech", - "textract", - "timestream-query", - "timestream-write", - "transcribe", - "transcribestreaming", - "transfer", - "translate", - "waf", - "waf-regional", - "wafv2", - "wellarchitected", - "workdocs", - "worklink", - "workmail", - "workmailmessageflow", - "workspaces", - "xray", + ('AWSMigrationHub', ['1.11.352']), + ('access-management', ['1.9.234', '1.11.352']), + ('accessanalyzer', ['1.9.234', '1.11.352']), + ('account', ['1.11.352']), + ('acm', ['1.9.234', '1.11.352']), + ('acm-pca', ['1.9.234', '1.11.352']), + ('alexaforbusiness', ['1.9.234']), + ('amp', ['1.9.234', '1.11.352']), + ('amplify', ['1.9.234', '1.11.352']), + ('amplifybackend', ['1.9.234', '1.11.352']), + ('amplifyuibuilder', ['1.11.352']), + ('apigateway', ['1.9.234', '1.11.352']), + ('apigatewaymanagementapi', ['1.9.234', '1.11.352']), + ('apigatewayv2', ['1.9.234', '1.11.352']), + ('appconfig', ['1.9.234', '1.11.352']), + ('appconfigdata', ['1.11.352']), + ('appfabric', ['1.11.352']), + ('appflow', ['1.9.234', '1.11.352']), + ('appintegrations', ['1.9.234', '1.11.352']), + ('application-autoscaling', ['1.9.234', '1.11.352']), + ('application-insights', ['1.9.234', '1.11.352']), + ('application-signals', ['1.11.352']), + ('applicationcostprofiler', ['1.11.352']), + ('appmesh', ['1.9.234', '1.11.352']), + ('apprunner', ['1.11.352']), + ('appstream', ['1.9.234', '1.11.352']), + ('appsync', ['1.9.234', '1.11.352']), + ('apptest', ['1.11.352']), + ('arc-zonal-shift', ['1.11.352']), + ('artifact', ['1.11.352']), + ('athena', ['1.9.234', '1.11.352']), + ('auditmanager', ['1.9.234', '1.11.352']), + ('autoscaling', ['1.9.234', '1.11.352']), + ('autoscaling-plans', ['1.9.234', '1.11.352']), + ('awstransfer', ['1.9.234', '1.11.352']), + ('b2bi', ['1.11.352']), + ('backup', ['1.9.234', '1.11.352']), + ('backup-gateway', ['1.11.352']), + ('batch', ['1.9.234', '1.11.352']), + ('bcm-data-exports', ['1.11.352']), + ('bedrock', ['1.11.352']), + ('bedrock-agent', ['1.11.352']), + ('bedrock-agent-runtime', ['1.11.352']), + ('bedrock-runtime', ['1.11.352']), + ('billingconductor', ['1.11.352']), + ('braket', ['1.9.234', '1.11.352']), + ('budgets', ['1.9.234', '1.11.352']), + ('ce', ['1.9.234', '1.11.352']), + ('chatbot', ['1.11.352']), + ('chime', ['1.9.234', '1.11.352']), + ('chime-sdk-identity', ['1.11.352']), + ('chime-sdk-media-pipelines', ['1.11.352']), + ('chime-sdk-meetings', ['1.11.352']), + ('chime-sdk-messaging', ['1.11.352']), + ('chime-sdk-voice', ['1.11.352']), + ('cleanrooms', ['1.11.352']), + ('cleanroomsml', ['1.11.352']), + ('cloud9', ['1.9.234', '1.11.352']), + ('cloudcontrol', ['1.11.352']), + ('clouddirectory', ['1.9.234', '1.11.352']), + ('cloudformation', ['1.9.234', '1.11.352']), + ('cloudfront', ['1.9.234', '1.11.352']), + ('cloudfront-keyvaluestore', ['1.11.352']), + ('cloudhsm', ['1.9.234', '1.11.352']), + ('cloudhsmv2', ['1.9.234', '1.11.352']), + ('cloudsearch', ['1.9.234', '1.11.352']), + ('cloudsearchdomain', ['1.9.234', '1.11.352']), + ('cloudtrail', ['1.9.234', '1.11.352']), + ('cloudtrail-data', ['1.11.352']), + ('codeartifact', ['1.9.234', '1.11.352']), + ('codebuild', ['1.9.234', '1.11.352']), + ('codecatalyst', ['1.11.352']), + ('codecommit', ['1.9.234', '1.11.352']), + ('codeconnections', ['1.11.352']), + ('codedeploy', ['1.9.234', '1.11.352']), + ('codeguru-reviewer', ['1.9.234', '1.11.352']), + ('codeguru-security', ['1.11.352']), + ('codeguruprofiler', ['1.9.234', '1.11.352']), + ('codepipeline', ['1.9.234', '1.11.352']), + ('codestar', ['1.9.234', '1.11.352']), + ('codestar-connections', ['1.9.234', '1.11.352']), + ('codestar-notifications', ['1.9.234', '1.11.352']), + ('cognito-identity', ['1.9.234', '1.11.352']), + ('cognito-idp', ['1.9.234', '1.11.352']), + ('cognito-sync', ['1.9.234', '1.11.352']), + ('comprehend', ['1.9.234', '1.11.352']), + ('comprehendmedical', ['1.9.234', '1.11.352']), + ('compute-optimizer', ['1.9.234', '1.11.352']), + ('config', ['1.9.234', '1.11.352']), + ('connect', ['1.9.234', '1.11.352']), + ('connect-contact-lens', ['1.9.234', '1.11.352']), + ('connectcampaigns', ['1.11.352']), + ('connectcases', ['1.11.352']), + ('connectparticipant', ['1.9.234', '1.11.352']), + ('controlcatalog', ['1.11.352']), + ('controltower', ['1.11.352']), + ('cost-optimization-hub', ['1.11.352']), + ('cur', ['1.9.234', '1.11.352']), + ('customer-profiles', ['1.9.234', '1.11.352']), + ('databrew', ['1.9.234', '1.11.352']), + ('dataexchange', ['1.9.234', '1.11.352']), + ('datapipeline', ['1.9.234', '1.11.352']), + ('datasync', ['1.9.234', '1.11.352']), + ('datazone', ['1.11.352']), + ('dax', ['1.9.234', '1.11.352']), + ('deadline', ['1.11.352']), + ('detective', ['1.9.234', '1.11.352']), + ('devicefarm', ['1.9.234', '1.11.352']), + ('devops-guru', ['1.9.234', '1.11.352']), + ('directconnect', ['1.9.234', '1.11.352']), + ('discovery', ['1.9.234', '1.11.352']), + ('dlm', ['1.9.234', '1.11.352']), + ('dms', ['1.9.234', '1.11.352']), + ('docdb', ['1.9.234', '1.11.352']), + ('docdb-elastic', ['1.11.352']), + ('drs', ['1.11.352']), + ('ds', ['1.9.234', '1.11.352']), + ('dynamodb', ['1.9.234', '1.11.352']), + ('dynamodbstreams', ['1.9.234', '1.11.352']), + ('ebs', ['1.9.234', '1.11.352']), + ('ec2', ['1.9.234', '1.11.352']), + ('ec2-instance-connect', ['1.9.234', '1.11.352']), + ('ecr', ['1.9.234', '1.11.352']), + ('ecr-public', ['1.9.234', '1.11.352']), + ('ecs', ['1.9.234', '1.11.352']), + ('eks', ['1.9.234', '1.11.352']), + ('eks-auth', ['1.11.352']), + ('elastic-inference', ['1.9.234', '1.11.352']), + ('elasticache', ['1.9.234', '1.11.352']), + ('elasticbeanstalk', ['1.9.234', '1.11.352']), + ('elasticfilesystem', ['1.9.234', '1.11.352']), + ('elasticloadbalancing', ['1.9.234', '1.11.352']), + ('elasticloadbalancingv2', ['1.9.234', '1.11.352']), + ('elasticmapreduce', ['1.9.234', '1.11.352']), + ('elastictranscoder', ['1.9.234', '1.11.352']), + ('email', ['1.9.234', '1.11.352']), + ('emr-containers', ['1.9.234', '1.11.352']), + ('emr-serverless', ['1.11.352']), + ('entityresolution', ['1.11.352']), + ('es', ['1.9.234', '1.11.352']), + ('eventbridge', ['1.9.234', '1.11.352']), + ('events', ['1.9.234', '1.11.352']), + ('evidently', ['1.11.352']), + ('finspace', ['1.11.352']), + ('finspace-data', ['1.11.352']), + ('firehose', ['1.9.234', '1.11.352']), + ('fis', ['1.11.352']), + ('fms', ['1.9.234', '1.11.352']), + ('forecast', ['1.9.234', '1.11.352']), + ('forecastquery', ['1.9.234', '1.11.352']), + ('frauddetector', ['1.9.234', '1.11.352']), + ('freetier', ['1.11.352']), + ('fsx', ['1.9.234', '1.11.352']), + ('gamelift', ['1.9.234', '1.11.352']), + ('glacier', ['1.9.234', '1.11.352']), + ('globalaccelerator', ['1.9.234', '1.11.352']), + ('glue', ['1.9.234', '1.11.352']), + ('grafana', ['1.11.352']), + ('greengrass', ['1.9.234', '1.11.352']), + ('greengrassv2', ['1.9.234', '1.11.352']), + ('groundstation', ['1.9.234', '1.11.352']), + ('guardduty', ['1.9.234', '1.11.352']), + ('health', ['1.9.234', '1.11.352']), + ('healthlake', ['1.9.234', '1.11.352']), + ('honeycode', ['1.9.234']), + ('iam', ['1.9.234', '1.11.352']), + ('identity-management', ['1.9.234', '1.11.352']), + ('identitystore', ['1.9.234', '1.11.352']), + ('imagebuilder', ['1.9.234', '1.11.352']), + ('importexport', ['1.9.234', '1.11.352']), + ('inspector', ['1.9.234', '1.11.352']), + ('inspector-scan', ['1.11.352']), + ('inspector2', ['1.11.352']), + ('internetmonitor', ['1.11.352']), + ('iot', ['1.9.234', '1.11.352']), + ('iot-data', ['1.9.234', '1.11.352']), + ('iot-jobs-data', ['1.9.234', '1.11.352']), + ('iot1click-devices', ['1.9.234', '1.11.352']), + ('iot1click-projects', ['1.9.234', '1.11.352']), + ('iotanalytics', ['1.9.234', '1.11.352']), + ('iotdeviceadvisor', ['1.9.234', '1.11.352']), + ('iotevents', ['1.9.234', '1.11.352']), + ('iotevents-data', ['1.9.234', '1.11.352']), + ('iotfleethub', ['1.9.234', '1.11.352']), + ('iotfleetwise', ['1.11.352']), + ('iotsecuretunneling', ['1.9.234', '1.11.352']), + ('iotsitewise', ['1.9.234', '1.11.352']), + ('iotthingsgraph', ['1.9.234', '1.11.352']), + ('iottwinmaker', ['1.11.352']), + ('iotwireless', ['1.9.234', '1.11.352']), + ('ivs', ['1.9.234', '1.11.352']), + ('ivs-realtime', ['1.11.352']), + ('ivschat', ['1.11.352']), + ('kafka', ['1.9.234', '1.11.352']), + ('kafkaconnect', ['1.11.352']), + ('kendra', ['1.9.234', '1.11.352']), + ('kendra-ranking', ['1.11.352']), + ('keyspaces', ['1.11.352']), + ('kinesis', ['1.9.234', '1.11.352']), + ('kinesis-video-archived-media', ['1.9.234', '1.11.352']), + ('kinesis-video-media', ['1.9.234', '1.11.352']), + ('kinesis-video-signaling', ['1.9.234', '1.11.352']), + ('kinesis-video-webrtc-storage', ['1.11.352']), + ('kinesisanalytics', ['1.9.234', '1.11.352']), + ('kinesisanalyticsv2', ['1.9.234', '1.11.352']), + ('kinesisvideo', ['1.9.234', '1.11.352']), + ('kms', ['1.9.234', '1.11.352']), + ('lakeformation', ['1.9.234', '1.11.352']), + ('lambda', ['1.9.234', '1.11.352']), + ('launch-wizard', ['1.11.352']), + ('lex', ['1.9.234', '1.11.352']), + ('lex-models', ['1.9.234', '1.11.352']), + ('lexv2-models', ['1.9.234', '1.11.352']), + ('lexv2-runtime', ['1.9.234', '1.11.352']), + ('license-manager', ['1.9.234', '1.11.352']), + ('license-manager-linux-subscriptions', ['1.11.352']), + ('license-manager-user-subscriptions', ['1.11.352']), + ('lightsail', ['1.9.234', '1.11.352']), + ('location', ['1.9.234', '1.11.352']), + ('logs', ['1.9.234', '1.11.352']), + ('lookoutequipment', ['1.11.352']), + ('lookoutmetrics', ['1.11.352']), + ('lookoutvision', ['1.9.234', '1.11.352']), + ('m2', ['1.11.352']), + ('machinelearning', ['1.9.234', '1.11.352']), + ('macie', ['1.9.234']), + ('macie2', ['1.9.234', '1.11.352']), + ('mailmanager', ['1.11.352']), + ('managedblockchain', ['1.9.234', '1.11.352']), + ('managedblockchain-query', ['1.11.352']), + ('marketplace-agreement', ['1.11.352']), + ('marketplace-catalog', ['1.9.234', '1.11.352']), + ('marketplace-deployment', ['1.11.352']), + ('marketplace-entitlement', ['1.9.234', '1.11.352']), + ('marketplacecommerceanalytics', ['1.9.234', '1.11.352']), + ('mediaconnect', ['1.9.234', '1.11.352']), + ('mediaconvert', ['1.9.234', '1.11.352']), + ('medialive', ['1.9.234', '1.11.352']), + ('mediapackage', ['1.9.234', '1.11.352']), + ('mediapackage-vod', ['1.9.234', '1.11.352']), + ('mediapackagev2', ['1.11.352']), + ('mediastore', ['1.9.234', '1.11.352']), + ('mediastore-data', ['1.9.234', '1.11.352']), + ('mediatailor', ['1.9.234', '1.11.352']), + ('medical-imaging', ['1.11.352']), + ('memorydb', ['1.11.352']), + ('meteringmarketplace', ['1.9.234', '1.11.352']), + ('mgn', ['1.11.352']), + ('migration-hub-refactor-spaces', ['1.11.352']), + ('migrationhub-config', ['1.9.234', '1.11.352']), + ('migrationhuborchestrator', ['1.11.352']), + ('migrationhubstrategy', ['1.11.352']), + ('mobile', ['1.9.234', '1.11.352']), + ('mobileanalytics', ['1.9.234']), + ('monitoring', ['1.9.234', '1.11.352']), + ('mq', ['1.9.234', '1.11.352']), + ('mturk-requester', ['1.9.234', '1.11.352']), + ('mwaa', ['1.9.234', '1.11.352']), + ('neptune', ['1.9.234', '1.11.352']), + ('neptune-graph', ['1.11.352']), + ('neptunedata', ['1.11.352']), + ('network-firewall', ['1.9.234', '1.11.352']), + ('networkmanager', ['1.9.234', '1.11.352']), + ('networkmonitor', ['1.11.352']), + ('nimble', ['1.11.352']), + ('oam', ['1.11.352']), + ('omics', ['1.11.352']), + ('opensearch', ['1.11.352']), + ('opensearchserverless', ['1.11.352']), + ('opsworks', ['1.9.234', '1.11.352']), + ('opsworkscm', ['1.9.234', '1.11.352']), + ('organizations', ['1.9.234', '1.11.352']), + ('osis', ['1.11.352']), + ('outposts', ['1.9.234', '1.11.352']), + ('panorama', ['1.11.352']), + ('payment-cryptography', ['1.11.352']), + ('payment-cryptography-data', ['1.11.352']), + ('pca-connector-ad', ['1.11.352']), + ('pca-connector-scep', ['1.11.352']), + ('personalize', ['1.9.234', '1.11.352']), + ('personalize-events', ['1.9.234', '1.11.352']), + ('personalize-runtime', ['1.9.234', '1.11.352']), + ('pi', ['1.9.234', '1.11.352']), + ('pinpoint', ['1.9.234', '1.11.352']), + ('pinpoint-email', ['1.9.234', '1.11.352']), + ('pinpoint-sms-voice-v2', ['1.11.352']), + ('pipes', ['1.11.352']), + ('polly', ['1.9.234', '1.11.352']), + # ('polly-sample', ['1.9.234']), # This gets generated, but is only sample code + ('pricing', ['1.9.234', '1.11.352']), + ('privatenetworks', ['1.11.352']), + ('proton', ['1.11.352']), + ('qbusiness', ['1.11.352']), + ('qconnect', ['1.11.352']), + ('qldb', ['1.9.234', '1.11.352']), + ('qldb-session', ['1.9.234', '1.11.352']), + ('queues', ['1.9.234', '1.11.352']), + ('quicksight', ['1.9.234', '1.11.352']), + ('ram', ['1.9.234', '1.11.352']), + ('rbin', ['1.11.352']), + ('rds', ['1.9.234', '1.11.352']), + ('rds-data', ['1.9.234', '1.11.352']), + ('redshift', ['1.9.234', '1.11.352']), + ('redshift-data', ['1.9.234', '1.11.352']), + ('redshift-serverless', ['1.11.352']), + ('rekognition', ['1.9.234', '1.11.352']), + ('repostspace', ['1.11.352']), + ('resiliencehub', ['1.11.352']), + ('resource-explorer-2', ['1.11.352']), + ('resource-groups', ['1.9.234', '1.11.352']), + ('resourcegroupstaggingapi', ['1.9.234', '1.11.352']), + ('robomaker', ['1.9.234', '1.11.352']), + ('rolesanywhere', ['1.11.352']), + ('route53', ['1.9.234', '1.11.352']), + ('route53-recovery-cluster', ['1.11.352']), + ('route53-recovery-control-config', ['1.11.352']), + ('route53-recovery-readiness', ['1.11.352']), + ('route53domains', ['1.9.234', '1.11.352']), + ('route53profiles', ['1.11.352']), + ('route53resolver', ['1.9.234', '1.11.352']), + ('rum', ['1.11.352']), + ('s3', ['1.9.234', '1.11.352']), + ('s3-crt', ['1.9.234', '1.11.352']), + ('s3-encryption', ['1.9.234', '1.11.352']), + ('s3control', ['1.9.234', '1.11.352']), + ('s3outposts', ['1.9.234', '1.11.352']), + ('sagemaker', ['1.9.234', '1.11.352']), + ('sagemaker-a2i-runtime', ['1.9.234', '1.11.352']), + ('sagemaker-edge', ['1.9.234', '1.11.352']), + ('sagemaker-featurestore-runtime', ['1.9.234', '1.11.352']), + ('sagemaker-geospatial', ['1.11.352']), + ('sagemaker-metrics', ['1.11.352']), + ('sagemaker-runtime', ['1.9.234', '1.11.352']), + ('savingsplans', ['1.9.234', '1.11.352']), + ('scheduler', ['1.11.352']), + ('schemas', ['1.9.234', '1.11.352']), + ('sdb', ['1.9.234', '1.11.352']), + ('secretsmanager', ['1.9.234', '1.11.352']), + ('securityhub', ['1.9.234', '1.11.352']), + ('securitylake', ['1.11.352']), + ('serverlessrepo', ['1.9.234', '1.11.352']), + ('service-quotas', ['1.9.234', '1.11.352']), + ('servicecatalog', ['1.9.234', '1.11.352']), + ('servicecatalog-appregistry', ['1.9.234', '1.11.352']), + ('servicediscovery', ['1.9.234', '1.11.352']), + ('sesv2', ['1.9.234', '1.11.352']), + ('shield', ['1.9.234', '1.11.352']), + ('signer', ['1.9.234', '1.11.352']), + ('simspaceweaver', ['1.11.352']), + ('sms', ['1.9.234', '1.11.352']), + ('sms-voice', ['1.9.234', '1.11.352']), + ('snow-device-management', ['1.11.352']), + ('snowball', ['1.9.234', '1.11.352']), + ('sns', ['1.9.234', '1.11.352']), + ('sqs', ['1.9.234', '1.11.352']), + ('ssm', ['1.9.234', '1.11.352']), + ('ssm-contacts', ['1.11.352']), + ('ssm-incidents', ['1.11.352']), + ('ssm-sap', ['1.11.352']), + ('sso', ['1.9.234', '1.11.352']), + ('sso-admin', ['1.9.234', '1.11.352']), + ('sso-oidc', ['1.9.234', '1.11.352']), + ('states', ['1.9.234', '1.11.352']), + ('storagegateway', ['1.9.234', '1.11.352']), + ('sts', ['1.9.234', '1.11.352']), + ('supplychain', ['1.11.352']), + ('support', ['1.9.234', '1.11.352']), + ('support-app', ['1.11.352']), + ('swf', ['1.9.234', '1.11.352']), + ('synthetics', ['1.9.234', '1.11.352']), + ('taxsettings', ['1.11.352']), + ('text-to-speech', ['1.9.234', '1.11.352']), + ('textract', ['1.9.234', '1.11.352']), + ('timestream-influxdb', ['1.11.352']), + ('timestream-query', ['1.9.234', '1.11.352']), + ('timestream-write', ['1.9.234', '1.11.352']), + ('tnb', ['1.11.352']), + ('transcribe', ['1.9.234', '1.11.352']), + ('transcribestreaming', ['1.9.234', '1.11.352']), + ('transfer', ['1.9.234', '1.11.352']), + ('translate', ['1.9.234', '1.11.352']), + ('trustedadvisor', ['1.11.352']), + ('verifiedpermissions', ['1.11.352']), + ('voice-id', ['1.11.352']), + ('vpc-lattice', ['1.11.352']), + ('waf', ['1.9.234', '1.11.352']), + ('waf-regional', ['1.9.234', '1.11.352']), + ('wafv2', ['1.9.234', '1.11.352']), + ('wellarchitected', ['1.9.234', '1.11.352']), + ('wisdom', ['1.11.352']), + ('workdocs', ['1.9.234', '1.11.352']), + ('worklink', ['1.9.234', '1.11.352']), + ('workmail', ['1.9.234', '1.11.352']), + ('workmailmessageflow', ['1.9.234', '1.11.352']), + ('workspaces', ['1.9.234', '1.11.352']), + ('workspaces-thin-client', ['1.11.352']), + ('workspaces-web', ['1.11.352']), + ('xray', ['1.9.234', '1.11.352']) ) options = { **{ @@ -295,22 +429,24 @@ class AwsSdkCppConan(ConanFile): "fPIC": [True, False], "min_size": [True, False], }, - **{ x: [True, False] for x in _sdks}, + **{sdk_name: [None, True, False] for sdk_name, _ in _sdks}, + } + default_options = { + **{ + "shared": False, + "fPIC": True, + "min_size": False + }, + **{sdk_name: None for sdk_name, _ in _sdks}, + # Overrides + "monitoring": True # TODO: Clarify why monitoring is True by default } - default_options = {key: False for key in options.keys()} - default_options["fPIC"] = True - default_options["access-management"] = True - default_options["identity-management"] = True - default_options["monitoring"] = True - default_options["queues"] = True - default_options["s3-encryption"] = True - default_options["transfer"] = True - default_options["text-to-speech"] = True short_paths = True @property def _internal_requirements(self): + # These modules and dependencies come from https://github.com/aws/aws-sdk-cpp/blob/1.11.352/cmake/sdksCommon.cmake#L147 and below return { "access-management": ["iam", "cognito-identity"], "identity-management": ["cognito-identity", "sts"], @@ -320,86 +456,144 @@ 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") + + # Main modules are true by default, but the user can set them to false + for module in self._internal_requirements: + setattr(self.options, module, True) + + # Remove all sdk options not belonging to the current version + for sdk_name, sdk_versions in self._sdks: + if self.version not in sdk_versions: + self.options.rm_safe(sdk_name) def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + # If the user does not specify a value for a specific sdk: + # - Set it to True if it's a dependency of a main module that is set to True + for module, dependencies in self._internal_requirements.items(): + if self.options.get_safe(module): + for dependency in dependencies: + # Don't listen to the linter, get_safe should be compared like this to None + # TODO: Remove str comparison when Conan 1 is disabled + if str(self.options.get_safe(dependency)) == "None": + setattr(self.options, dependency, True) + + # - Otherwise set it to False + # This way there are no None options past this method, and we can control default values + # of the dependencies of the main modules but still give the user control over them + for sdk_name, sdk_versions in self._sdks: + # == None is true for both "was deleted" and "was not set by the user", + # ensure we only try to set the value to false for the latter + if self.version in sdk_versions and self.options.get_safe(sdk_name) == None: + setattr(self.options, sdk_name, False) + 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) + # These versions come from prefetch_crt_dependency.sh, + # dont bump them independently, check the file + if self.version == "1.11.352": + self.requires("aws-crt-cpp/0.26.9", transitive_headers=True) + self.requires("aws-c-auth/0.7.16") + self.requires("aws-c-cal/0.6.14") + self.requires("aws-c-common/0.9.15") + self.requires("aws-c-compression/0.2.18") # No mention of this in the code + self.requires("aws-c-event-stream/0.4.2") + self.requires("aws-c-http/0.8.1") + self.requires("aws-c-io/0.14.7") + self.requires("aws-c-mqtt/0.10.3") + if self.options.get_safe("s3-crt"): + self.requires("aws-c-s3/0.5.5") + self.requires("aws-c-sdkutils/0.1.15") # No mention of this in the code + self.requires("aws-checksums/0.1.18") + # missing aws-lc, but only needed as openssl replacement if USE_OPENSSL is OFF + if self.settings.os in ["Linux", "FreeBSD", "Android"]: + self.requires("s2n/1.4.16") # No mention of this in the code, we might be overlinking + if self.version == "1.9.234": + self.requires("aws-crt-cpp/0.17.1a", transitive_headers=True) + self.requires("aws-c-auth/0.6.4") + self.requires("aws-c-cal/0.5.12") + self.requires("aws-c-common/0.6.11") + self.requires("aws-c-compression/0.2.14") + self.requires("aws-c-event-stream/0.2.7") + self.requires("aws-c-http/0.6.7") + self.requires("aws-c-io/0.10.9") + self.requires("aws-c-mqtt/0.7.8") + if self.options.get_safe("s3-crt"): + self.requires("aws-c-s3/0.1.26") + self.requires("aws-checksums/0.1.12") + if self.settings.os in ["Linux", "FreeBSD", "Android"]: + self.requires("s2n/1.3.15") # No mention of this in the code, we might be overlinking if self.settings.os != "Windows": - self.requires("openssl/[>=1.1 <4]") - self.requires("libcurl/[>=7.78.0 <9]") - if self.settings.os in ["Linux", "FreeBSD"]: + # Used transitively in core/utils/crypto/openssl/CryptoImpl.h public header + self.requires("openssl/[>=1.1 <4]", transitive_headers=True) + # Used transitively in core/http/curl/CurlHandleContainer.h public header + self.requires("libcurl/[>=7.78.0 <9]", transitive_headers=True) + if self.settings.os == "Linux": + # Pulseaudio -> libcap, libalsa only support linux, don't use pulseaudio on other platforms if self.options.get_safe("text-to-speech"): - self.requires("pulseaudio/14.2") + # Used transitively in text-to-speech/PulseAudioPCMOutputDriver.h public header + self.requires("pulseaudio/14.2", transitive_headers=True, transitive_libs=True) + # zlib is used if ENABLE_ZLIB_REQUEST_COMPRESSION is enabled, set ot ON by default + self.requires("zlib/[>=1.2.11 <2]") - def validate(self): + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def validate_build(self): + if self._settings_build.os == "Windows" and self.settings.os == "Android": + raise ConanInvalidConfiguration("Cross-building from Windows to Android is not supported") + + def validate_build(self): if (self.options.shared - and self.settings.compiler == "gcc" - and Version(self.settings.compiler.version) < "6.0"): + and self.settings.compiler == "gcc" + and Version(self.settings.compiler.version) < "6.0"): raise ConanInvalidConfiguration( "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") - else: - if self.settings.os == "Macos" and self.settings.arch == "armv8": - raise ConanInvalidConfiguration( - "This version doesn't support arm8. " - "See https://github.com/aws/aws-sdk-cpp/issues/1542" - ) - - def package_id(self): - for hl_comp in self._internal_requirements.keys(): - if getattr(self.info.options, hl_comp): - for internal_requirement in self._internal_requirements[hl_comp]: - setattr(self.info.options, internal_requirement, True) + + def validate(self): + 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 self.options.shared + and not self.dependencies["aws-c-common"].options.shared): + raise ConanInvalidConfiguration(f"{self.ref} with shared is not supported with aws-c-common static") + + # If the user has explicitly set a main module dependency to False, + # error out if the main module itself is not also disabled + for main_module, dependencies in self._internal_requirements.items(): + if self.options.get_safe(main_module): + for internal_requirement in dependencies: + if not self.options.get_safe(internal_requirement): + raise ConanInvalidConfiguration(f"-o={self.ref}:{main_module}=True requires -o={self.ref}:{internal_requirement}=True") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + def _enabled_sdks(self): + for sdk in self._sdks: + if self.options.get_safe(sdk[0]): + yield sdk + def generate(self): tc = CMakeToolchain(self) # All option() are defined before project() in upstream CMakeLists, # therefore we must use cache_variables build_only = ["core"] - for sdk in self._sdks: - if self.options.get_safe(sdk): - build_only.append(sdk) + for sdk_name, _ in self._enabled_sdks(): + build_only.append(sdk_name) tc.cache_variables["BUILD_ONLY"] = ";".join(build_only) tc.cache_variables["ENABLE_UNITY_BUILD"] = True @@ -407,10 +601,11 @@ def generate(self): tc.cache_variables["AUTORUN_UNIT_TESTS"] = False tc.cache_variables["BUILD_DEPS"] = False if self.settings.os != "Windows": + tc.cache_variables["USE_OPENSSL"] = True 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 +624,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() @@ -446,15 +642,19 @@ def _res_folder(self): def _create_project_cmake_module(self): # package files needed to build other components (e.g. aws-cdi-sdk) with this SDK - for file in [ + dependant_files = [ "cmake/compiler_settings.cmake", "cmake/initialize_project_version.cmake", "cmake/utilities.cmake", "cmake/sdk_plugin_conf.cmake", "toolchains/cmakeProjectConfig.cmake", - "toolchains/pkg-config.pc.in", - "aws-cpp-sdk-core/include/aws/core/VersionConfig.h" - ]: + "toolchains/pkg-config.pc.in" + ] + if Version(self.version) >= "1.11.352": + dependant_files.append("src/aws-cpp-sdk-core/include/aws/core/VersionConfig.h") + else: + dependant_files.append("aws-cpp-sdk-core/include/aws/core/VersionConfig.h") + for file in dependant_files: copy(self, file, src=self.source_folder, dst=os.path.join(self.package_folder, self._res_folder)) replace_in_file( self, os.path.join(self.package_folder, self._res_folder, file), @@ -464,7 +664,7 @@ def _create_project_cmake_module(self): # avoid getting error from hook rename(self, os.path.join(self.package_folder, self._res_folder, "toolchains", "cmakeProjectConfig.cmake"), - os.path.join(self.package_folder, self._res_folder, "toolchains", "cmakeProjectConf.cmake")) + os.path.join(self.package_folder, self._res_folder, "toolchains", "cmakeProjectConf.cmake")) replace_in_file( self, os.path.join(self.package_folder, self._res_folder, "cmake", "utilities.cmake"), "cmakeProjectConfig.cmake", "cmakeProjectConf.cmake", @@ -494,27 +694,28 @@ def package_info(self): self.cpp_info.components["core"].set_property("pkg_config_name", "aws-sdk-cpp-core") self.cpp_info.components["core"].libs = ["aws-cpp-sdk-core"] self.cpp_info.components["core"].requires = [ + "aws-crt-cpp::aws-crt-cpp", + "aws-c-auth::aws-c-auth", + "aws-c-cal::aws-c-cal", "aws-c-common::aws-c-common", + "aws-c-compression::aws-c-compression", "aws-c-event-stream::aws-c-event-stream", + "aws-c-http::aws-c-http", + "aws-c-io::aws-c-io", + "aws-c-mqtt::aws-c-mqtt", "aws-checksums::aws-checksums", + "zlib::zlib" ] - if self._use_aws_crt_cpp: + + if self.settings.os in ["Linux", "FreeBSD", "Android"]: + self.cpp_info.components["core"].requires.append("s2n::s2n") + + if Version(self.version) >= "1.11.352": 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", + "aws-c-sdkutils::aws-c-sdkutils", ]) - # other components - enabled_sdks = [sdk for sdk in self._sdks if self.options.get_safe(sdk)] - for hl_comp in self._internal_requirements.keys(): - if getattr(self.options, hl_comp): - for internal_requirement in self._internal_requirements[hl_comp]: - if internal_requirement not in enabled_sdks: - enabled_sdks.append(internal_requirement) - - for sdk in enabled_sdks: + for sdk, _ in self._enabled_sdks(): # TODO: there is no way to properly emulate COMPONENTS names for # find_package(AWSSDK COMPONENTS ) in set_property() # right now: see https://github.com/conan-io/conan/issues/10258 @@ -528,7 +729,7 @@ def package_info(self): # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.components[sdk].names["cmake_find_package"] = "aws-sdk-cpp-" + sdk self.cpp_info.components[sdk].names["cmake_find_package_multi"] = "aws-sdk-cpp-" + sdk - component_alias = f"aws-sdk-cpp-{sdk}_alias" # to emulate COMPONENTS names for find_package() + component_alias = f"aws-sdk-cpp-{sdk}_alias" # to emulate COMPONENTS names for find_package() self.cpp_info.components[component_alias].names["cmake_find_package"] = sdk self.cpp_info.components[component_alias].names["cmake_find_package_multi"] = sdk self.cpp_info.components[component_alias].requires = [sdk] @@ -543,14 +744,19 @@ def package_info(self): else: self.cpp_info.components["core"].requires.extend(["libcurl::curl", "openssl::openssl"]) - if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["core"].system_libs.append("atomic") + if self.settings.os == "Linux": if self.options.get_safe("text-to-speech"): self.cpp_info.components["text-to-speech"].requires.append("pulseaudio::pulseaudio") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["core"].system_libs.append("atomic") + + 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") + self.cpp_info.components["text-to-speech"].frameworks.extend(["CoreAudio", "AudioToolbox"]) libcxx = stdcpp_library(self) if libcxx: diff --git a/recipes/aws-sdk-cpp/all/patches/1.11.352-0001-pulseaudio.patch b/recipes/aws-sdk-cpp/all/patches/1.11.352-0001-pulseaudio.patch new file mode 100644 index 0000000000000..c2a64d3dd0446 --- /dev/null +++ b/recipes/aws-sdk-cpp/all/patches/1.11.352-0001-pulseaudio.patch @@ -0,0 +1,32 @@ +diff --git a/src/aws-cpp-sdk-text-to-speech/CMakeLists.txt b/src/aws-cpp-sdk-text-to-speech/CMakeLists.txt +index 5a40f1906..4136a4690 100644 +--- a/src/aws-cpp-sdk-text-to-speech/CMakeLists.txt ++++ b/src/aws-cpp-sdk-text-to-speech/CMakeLists.txt +@@ -9,8 +9,6 @@ file( GLOB TEXT_TO_SPEECH_HEADERS "include/aws/text-to-speech/*.h" ) + + set(PLATFORM_LIBS "") + +-check_include_files("pulse/simple.h" HAVE_PULSE) +- + if(PLATFORM_WINDOWS) + file( GLOB TEXT_TO_SPEECH_PLATFORM_HEADERS "include/aws/text-to-speech/windows/*.h" ) + file( GLOB TEXT_TO_SPEECH_PLATFORM_SOURCE "source/text-to-speech/windows/*.cpp" ) +@@ -19,14 +17,15 @@ if(PLATFORM_WINDOWS) + set(PLATFORM_LIBS ${PLATFORM_LIBS} Winmm) + endif() + +-if (PLATFORM_LINUX) +- if(HAVE_PULSE) ++if (CMAKE_SYSTEM_NAME STREQUAL "Linux") ++ find_package(pulseaudio) ++ if(pulseaudio_FOUND) + file( GLOB TEXT_TO_SPEECH_PLATFORM_HEADERS "include/aws/text-to-speech/linux/*.h" ) + file( GLOB TEXT_TO_SPEECH_PLATFORM_SOURCE "source/text-to-speech/linux/*.cpp" ) + + message(STATUS "Pulse audio header files have been detected, included pulse audio as a possible sound driver implementation.") + add_definitions("-DPULSE") +- set(PLATFORM_LIBS ${PLATFORM_LIBS} pulse pulse-simple) ++ set(PLATFORM_LIBS ${PLATFORM_LIBS} "pulseaudio::pulseaudio") + else() + message(WARNING "We've detected that you are building on linux, but the header files for pulseaudio are not available.\ + If you are providing your own audio implementation or you will not be using the text-to-speech library, this is fine.\ diff --git a/recipes/aws-sdk-cpp/all/patches/1.11.352-0002-disable-sort-links.patch b/recipes/aws-sdk-cpp/all/patches/1.11.352-0002-disable-sort-links.patch new file mode 100644 index 0000000000000..9ba1170c20c17 --- /dev/null +++ b/recipes/aws-sdk-cpp/all/patches/1.11.352-0002-disable-sort-links.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/sdks.cmake b/cmake/sdks.cmake +index 1b1ada7fc..606f5db18 100644 +--- a/cmake/sdks.cmake ++++ b/cmake/sdks.cmake +@@ -271,7 +271,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 "") \ No newline at end of file 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-0004-improve-pulseaudio-detection.patch b/recipes/aws-sdk-cpp/all/patches/1.8.130-0004-improve-pulseaudio-detection.patch index 9930b981211f6..84537aa466936 100644 --- a/recipes/aws-sdk-cpp/all/patches/1.8.130-0004-improve-pulseaudio-detection.patch +++ b/recipes/aws-sdk-cpp/all/patches/1.8.130-0004-improve-pulseaudio-detection.patch @@ -1,5 +1,5 @@ diff --git a/aws-cpp-sdk-text-to-speech/CMakeLists.txt b/aws-cpp-sdk-text-to-speech/CMakeLists.txt -index b1054515d5..d1a34ddfc5 100644 +index b105451..7de9367 100644 --- a/aws-cpp-sdk-text-to-speech/CMakeLists.txt +++ b/aws-cpp-sdk-text-to-speech/CMakeLists.txt @@ -9,8 +9,6 @@ file( GLOB TEXT_TO_SPEECH_HEADERS "include/aws/text-to-speech/*.h" ) @@ -11,13 +11,15 @@ index b1054515d5..d1a34ddfc5 100644 if(PLATFORM_WINDOWS) file( GLOB TEXT_TO_SPEECH_PLATFORM_HEADERS "include/aws/text-to-speech/windows/*.h" ) file( GLOB TEXT_TO_SPEECH_PLATFORM_SOURCE "source/text-to-speech/windows/*.cpp" ) -@@ -20,13 +18,14 @@ if(PLATFORM_WINDOWS) +@@ -19,14 +17,15 @@ if(PLATFORM_WINDOWS) + set(PLATFORM_LIBS ${PLATFORM_LIBS} Winmm) endif() - if (PLATFORM_LINUX) +-if (PLATFORM_LINUX) - if(HAVE_PULSE) ++if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + find_package(pulseaudio) -+ if (1) ++ if (pulseaudio_FOUND) file( GLOB TEXT_TO_SPEECH_PLATFORM_HEADERS "include/aws/text-to-speech/linux/*.h" ) file( GLOB TEXT_TO_SPEECH_PLATFORM_SOURCE "source/text-to-speech/linux/*.cpp" ) 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..15dd4365a90bb 100644 --- a/recipes/aws-sdk-cpp/config.yml +++ b/recipes/aws-sdk-cpp/config.yml @@ -1,7 +1,5 @@ versions: - "1.9.234": - folder: "all" - "1.9.100": + "1.11.352": folder: "all" - "1.8.130": + "1.9.234": 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..b86e79067f57c 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,10 @@ 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" + # Use azure-sdk-for-cpp::azure-storage-blobs-cpp instead + # https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/storage/MigrationGuide.md + deprecated = "azure-sdk-for-cpp" @property def _minimum_cpp_standard(self): @@ -40,41 +42,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 +59,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/android-ndk/all/test_v1_package/CMakeLists.txt b/recipes/azure-storage-cpp/all/test_v1_package/CMakeLists.txt similarity index 100% rename from recipes/android-ndk/all/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/b2/config.yml b/recipes/b2/config.yml index fc7ada07a386e..0e3bbe203df45 100644 --- a/recipes/b2/config.yml +++ b/recipes/b2/config.yml @@ -9,3 +9,9 @@ versions: folder: portable "5.0.0": folder: portable + "5.1.0": + folder: portable + "5.2.0": + folder: portable + "5.2.1": + folder: portable diff --git a/recipes/b2/portable/conandata.yml b/recipes/b2/portable/conandata.yml index 4bd954865dc3a..18e6c7ae29c82 100644 --- a/recipes/b2/portable/conandata.yml +++ b/recipes/b2/portable/conandata.yml @@ -14,3 +14,12 @@ sources: "5.0.0": url: "https://github.com/bfgroup/b2/releases/download/5.0.0/b2-5.0.0.tar.bz2" sha256: "1ef867f7d374345a948baca025ed277dadda05a68439aa383a06aceb9911f7d3" + "5.1.0": + url: "https://github.com/bfgroup/b2/releases/download/5.1.0/b2-5.1.0.tar.bz2" + sha256: "8429a2e7c9c4484f6a4bd7fb18743f0ea1dba41eb024479a9b23381bcb813623" + "5.2.0": + url: "https://github.com/bfgroup/b2/releases/download/5.2.0/b2-5.2.0.tar.bz2" + sha256: "c27adfb4e667d748bb7d3e18657938fa8bcf185b74a29bf091113299f532ed6d" + "5.2.1": + url: "https://github.com/bfgroup/b2/releases/download/5.2.1/b2-5.2.1.tar.bz2" + sha256: "6428edec31731aa479b4e7d8f83898831a0919352ec7d7f9874145abe165a578" diff --git a/recipes/b2/portable/conanfile.py b/recipes/b2/portable/conanfile.py index eb45936017eef..68803d254a16d 100644 --- a/recipes/b2/portable/conanfile.py +++ b/recipes/b2/portable/conanfile.py @@ -21,6 +21,8 @@ class B2Conan(ConanFile): url = "https://github.com/conan-io/conan-center-index" settings = "os", "arch" + package_type = "application" + ''' * use_cxx_env: False, True @@ -193,6 +195,7 @@ def build(self): def package(self): copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*.LICENSE", src=self._b2_engine_dir, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*b2", dst=self._pkg_bin_dir, src=self._b2_output_dir) copy(self, "*b2.exe", dst=self._pkg_bin_dir, src=self._b2_output_dir) copy(self, "*.jam", dst=self._pkg_bin_dir, src=self._b2_output_dir) diff --git a/recipes/b2/portable/test_package/.gitignore b/recipes/b2/portable/test_package/.gitignore new file mode 100644 index 0000000000000..c97f963b3da62 --- /dev/null +++ b/recipes/b2/portable/test_package/.gitignore @@ -0,0 +1 @@ +*.sh 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/beauty/all/conandata.yml b/recipes/beauty/all/conandata.yml index ba365a8d82861..42c96b3a5b488 100644 --- a/recipes/beauty/all/conandata.yml +++ b/recipes/beauty/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.4": + url: "https://github.com/dfleury2/beauty/archive/refs/tags/1.0.4.tar.gz" + sha256: "8bfd3718470bdbed05b6b9253543d6ab9b33e21e25028e53fa513c67893a39f3" "1.0.3": url: "https://github.com/dfleury2/beauty/archive/refs/tags/1.0.3.tar.gz" sha256: "1707b0974537cfd8d1d2fd0b5accd5a662c0b408042aa01384cf5840ecc43594" @@ -6,8 +9,19 @@ sources: url: "https://github.com/dfleury2/beauty/archive/refs/tags/1.0.2.tar.gz" sha256: "627294d04a91c85e14d9c29475d539da5172c6d7306a48dca7c72413e47eebd6" patches: + "1.0.4": + - patch_file: "patches/0002-remove-openssl-target.patch" + patch_description: "Avoid defining openssl::openssl target when defined by Conan" + patch_type: "conan" + "1.0.3": + - patch_file: "patches/0002-remove-openssl-target.patch" + patch_description: "Avoid defining openssl::openssl target when defined by Conan" + patch_type: "conan" "1.0.2": - patch_file: "patches/0001-apple-compatibility.patch" patch_description: "Handle pthread_setname_np not being defined on macOS" patch_type: "portability" patch_source: "https://github.com/dfleury2/beauty/pull/28" + - patch_file: "patches/0002-remove-openssl-target.patch" + patch_description: "Avoid defining openssl::openssl target when defined by Conan" + patch_type: "conan" diff --git a/recipes/beauty/all/conanfile.py b/recipes/beauty/all/conanfile.py index cb6e4434731c3..f8b9acb4c99ef 100644 --- a/recipes/beauty/all/conanfile.py +++ b/recipes/beauty/all/conanfile.py @@ -23,23 +23,26 @@ class BeautyConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "with_openssl": [True, False], } default_options = { "shared": False, "fPIC": True, + "with_openssl": True, } @property def _min_cppstd(self): - return "20" + return "17" @property def _compilers_minimum_version(self): return { "gcc": "8", - "clang": "11", + "clang": "7", "Visual Studio": "16", "msvc": "192", + "apple-clang": "10" } def export_sources(self): @@ -59,9 +62,14 @@ def layout(self): def requirements(self): # beauty public headers include some boost headers. # For example beauty/application.hpp includes boost/asio.hpp - self.requires("boost/1.83.0", transitive_headers=True) - # dependency of asio in boost, exposed in boost/asio/ssl/detail/openssl_types.hpp - self.requires("openssl/[>=1.1 <4]", transitive_headers=True, transitive_libs=True) + if Version(self.version) >= "1.0.4": + # https://github.com/dfleury2/beauty/issues/30 + self.requires("boost/1.85.0", transitive_headers=True) + else: + self.requires("boost/1.84.0", transitive_headers=True) + if self.options.with_openssl: + # dependency of asio in boost, exposed in boost/asio/ssl/detail/openssl_types.hpp + self.requires("openssl/[>=1.1 <4]", transitive_headers=True, transitive_libs=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -74,13 +82,13 @@ def validate(self): ) if self.settings.compiler == "clang" and self.settings.compiler.libcxx != "libc++": - raise ConanInvalidConfiguration("Only libc++ is supported for clang") + raise ConanInvalidConfiguration(f"{self.ref} clang compiler requires -s compiler.libcxx=libc++") if self.settings.compiler == "apple-clang" and self.options.shared: - raise ConanInvalidConfiguration("shared is not supported on apple-clang") + raise ConanInvalidConfiguration(f"The option {self.ref}:shared=True is not supported on Apple Clang. Use static instead.") if is_msvc(self) and self.options.shared: - raise ConanInvalidConfiguration("shared is not supported on Visual Studio") + raise ConanInvalidConfiguration(f"{self.ref} shared=True is not supported with {self.settings.compiler}") def build_requirements(self): self.tool_requires("cmake/[>=3.21 <4]") @@ -92,6 +100,7 @@ def generate(self): VirtualBuildEnv(self).generate() tc = CMakeToolchain(self) tc.variables["CONAN"] = False + tc.variables["BEAUTY_ENABLE_OPENSSL"] = self.options.with_openssl tc.generate() deps = CMakeDeps(self) deps.generate() @@ -112,6 +121,12 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "beauty") self.cpp_info.set_property("cmake_target_name", "beauty::beauty") self.cpp_info.libs = ["beauty"] - self.cpp_info.requires = ["boost::headers", "openssl::openssl"] + self.cpp_info.requires = ["boost::headers"] + if self.options.with_openssl: + self.cpp_info.requires.append("openssl::ssl") if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs = ["m"] + self.cpp_info.system_libs = ["m", "pthread"] + elif self.settings.os == "Windows": + self.cpp_info.system_libs = ["crypt32"] + if self.options.with_openssl: + self.cpp_info.defines = ["BEAUTY_ENABLE_OPENSSL"] diff --git a/recipes/beauty/all/patches/0002-remove-openssl-target.patch b/recipes/beauty/all/patches/0002-remove-openssl-target.patch new file mode 100644 index 0000000000000..28cfd66f4489f --- /dev/null +++ b/recipes/beauty/all/patches/0002-remove-openssl-target.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7cc5bda..12a5e71 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,7 +27,6 @@ else() + + if (BEAUTY_ENABLE_OPENSSL) + find_package(OpenSSL REQUIRED) +- add_library(openssl::openssl ALIAS OpenSSL::SSL) + endif() + endif() + diff --git a/recipes/beauty/all/test_package/CMakeLists.txt b/recipes/beauty/all/test_package/CMakeLists.txt index 8673671fd5aab..485e39c140276 100644 --- a/recipes/beauty/all/test_package/CMakeLists.txt +++ b/recipes/beauty/all/test_package/CMakeLists.txt @@ -5,4 +5,4 @@ find_package(beauty REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE beauty::beauty) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/beauty/config.yml b/recipes/beauty/config.yml index f625d5d2b747f..55b20570619c0 100644 --- a/recipes/beauty/config.yml +++ b/recipes/beauty/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.4": + folder: all "1.0.3": folder: all "1.0.2": diff --git a/recipes/behaviortree.cpp/all/conandata.yml b/recipes/behaviortree.cpp/all/conandata.yml index e0d26c089d74f..38e09ddf41730 100644 --- a/recipes/behaviortree.cpp/all/conandata.yml +++ b/recipes/behaviortree.cpp/all/conandata.yml @@ -1,4 +1,13 @@ 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" + "4.6.0": + url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.6.0.tar.gz" + sha256: "b24fed4f51212ea40bc492f7d4a310b1672bc05df6a83f2341c41ccf233307a9" "4.5.2": url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.5.2.tar.gz" sha256: "1aaac034fc6a2f03d9347934e3baf3cabd5edc8bb416b9d7f5d944598019aeb9" @@ -11,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 abd62b04171b4..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 @@ -17,6 +18,7 @@ class BehaviorTreeCPPConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/BehaviorTree/BehaviorTree.CPP" topics = ("ai", "robotics", "games", "coordination") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -73,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): @@ -215,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", "") @@ -225,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 f6b53df246238..12e603c7e2db2 100644 --- a/recipes/behaviortree.cpp/config.yml +++ b/recipes/behaviortree.cpp/config.yml @@ -1,4 +1,10 @@ versions: + "4.6.2": + folder: all + "4.6.1": + folder: all + "4.6.0": + folder: all "4.5.2": folder: all "4.0.1": diff --git a/recipes/benchmark/all/conandata.yml b/recipes/benchmark/all/conandata.yml index 8a3c24a77b927..fac51279a430d 100644 --- a/recipes/benchmark/all/conandata.yml +++ b/recipes/benchmark/all/conandata.yml @@ -1,4 +1,14 @@ 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" "1.8.3": url: "https://github.com/google/benchmark/archive/refs/tags/v1.8.3.tar.gz" sha256: "6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce" diff --git a/recipes/benchmark/all/conanfile.py b/recipes/benchmark/all/conanfile.py index 4143dd1a1d5dd..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() @@ -113,7 +152,6 @@ def package_info(self): self.cpp_info.components["_benchmark"].system_libs.append("kstat") if self.options.get_safe("enable_libpfm"): self.cpp_info.components["_benchmark"].requires.append("libpfm4::libpfm4") - self.cpp_info.components["benchmark_main"].set_property("cmake_target_name", "benchmark::benchmark_main") self.cpp_info.components["benchmark_main"].libs = ["benchmark_main"] diff --git a/recipes/benchmark/config.yml b/recipes/benchmark/config.yml index f3ed1f1e95743..f5694a4c32d21 100644 --- a/recipes/benchmark/config.yml +++ b/recipes/benchmark/config.yml @@ -1,4 +1,10 @@ versions: + "1.9.0": + folder: all + "1.8.5": + folder: all + "1.8.4": + folder: all "1.8.3": folder: all "1.8.2": diff --git a/recipes/bitserializer/all/conandata.yml b/recipes/bitserializer/all/conandata.yml index 1571f9c56284c..26d9d94803f91 100644 --- a/recipes/bitserializer/all/conandata.yml +++ b/recipes/bitserializer/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.70": + url: "https://github.com/PavelKisliak/BitSerializer/archive/v0.70.tar.gz" + sha256: "094b12c729b35bf2cede8b55e8193db7793482646f0307c17bcc736de6cce7c9" "0.65": url: "https://github.com/PavelKisliak/BitSerializer/archive/v0.65.tar.gz" sha256: "b4d90f13dd424faebe3ee57ee0cb86ff304e893990afd259c6a29d1f8533b2ef" diff --git a/recipes/bitserializer/all/conanfile.py b/recipes/bitserializer/all/conanfile.py index 5acbd3659a4cb..183dc170d9b0f 100644 --- a/recipes/bitserializer/all/conanfile.py +++ b/recipes/bitserializer/all/conanfile.py @@ -12,8 +12,8 @@ class BitserializerConan(ConanFile): name = "bitserializer" - description = "C++ 17 library for serialization to multiple output formats (JSON, XML, YAML, CSV)" - topics = ("serialization", "json", "xml", "yaml", "csv") + description = "C++ 17 library for serialization to multiple output formats (JSON, XML, YAML, CSV, MsgPack)" + topics = ("serialization", "json", "xml", "yaml", "csv", "msgpack") url = "https://github.com/conan-io/conan-center-index" homepage = "https://bitbucket.org/Pavel_Kisliak/bitserializer" license = "MIT" @@ -26,6 +26,7 @@ class BitserializerConan(ConanFile): "with_pugixml": [True, False], "with_rapidyaml": [True, False], "with_csv": [True, False], + "with_msgpack": [True, False], } default_options = { "fPIC": True, @@ -34,6 +35,7 @@ class BitserializerConan(ConanFile): "with_pugixml": False, "with_rapidyaml": False, "with_csv": False, + "with_msgpack": False, } no_copy_source = True @@ -55,9 +57,9 @@ def _compilers_minimum_version(self): def _is_header_only(self, info=False): if Version(self.version) < "0.50": return True - # All components of library are header-only except csv-archive + # All components of library are header-only except csv-archive and msgpack-archive options = self.info.options if info else self.options - return not options.with_csv + return not (options.with_csv or options.get_safe("with_msgpack")) def config_options(self): if self.settings.os == "Windows" or Version(self.version) < "0.50": @@ -65,6 +67,8 @@ def config_options(self): if Version(self.version) < "0.50": del self.options.with_rapidyaml del self.options.with_csv + if Version(self.version) < "0.70": + del self.options.with_msgpack def configure(self): if self._is_header_only(): @@ -80,13 +84,13 @@ def layout(self): def requirements(self): if self.options.with_cpprestsdk: - self.requires("cpprestsdk/2.10.18", transitive_headers=True, transitive_libs=True) + self.requires("cpprestsdk/2.10.19", transitive_headers=True, transitive_libs=True) if self.options.with_rapidjson: - self.requires("rapidjson/cci.20220822", transitive_headers=True, transitive_libs=True) + self.requires("rapidjson/1.1.0", transitive_headers=True, transitive_libs=True) if self.options.with_pugixml: - self.requires("pugixml/1.13", transitive_headers=True, transitive_libs=True) + self.requires("pugixml/1.14", transitive_headers=True, transitive_libs=True) if self.options.get_safe("with_rapidyaml"): - self.requires("rapidyaml/0.4.1", transitive_headers=True, transitive_libs=True) + self.requires("rapidyaml/0.5.0", transitive_headers=True, transitive_libs=True) def package_id(self): if self._is_header_only(info=True): @@ -121,6 +125,7 @@ def generate(self): tc.variables["BUILD_PUGIXML_ARCHIVE"] = self.options.with_pugixml tc.variables["BUILD_RAPIDYAML_ARCHIVE"] = self.options.with_rapidyaml tc.variables["BUILD_CSV_ARCHIVE"] = self.options.with_csv + tc.variables["BUILD_MSGPACK_ARCHIVE"] = self.options.get_safe("with_msgpack") tc.generate() deps = CMakeDeps(self) deps.generate() @@ -197,6 +202,13 @@ def package_info(self): self.cpp_info.components["bitserializer-csv"].bindirs = [] self.cpp_info.components["bitserializer-csv"].libs = [f"csv-archive{lib_suffix}"] + # msgpack-archive + if self.options.get_safe("with_msgpack"): + self.cpp_info.components["bitserializer-msgpack"].set_property("cmake_target_name", "BitSerializer::msgpack-archive") + self.cpp_info.components["bitserializer-msgpack"].requires = ["bitserializer-core"] + self.cpp_info.components["bitserializer-msgpack"].bindirs = [] + self.cpp_info.components["bitserializer-msgpack"].libs = [f"msgpack-archive{lib_suffix}"] + # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.filenames["cmake_find_package"] = "bitserializer" self.cpp_info.filenames["cmake_find_package_multi"] = "bitserializer" @@ -219,3 +231,6 @@ def package_info(self): if self.options.get_safe("with_csv"): self.cpp_info.components["bitserializer-csv"].names["cmake_find_package"] = "csv-archive" self.cpp_info.components["bitserializer-csv"].names["cmake_find_package_multi"] = "csv-archive" + if self.options.get_safe("with_msgpack"): + self.cpp_info.components["bitserializer-msgpack"].names["cmake_find_package"] = "msgpack-archive" + self.cpp_info.components["bitserializer-msgpack"].names["cmake_find_package_multi"] = "msgpack-archive" diff --git a/recipes/bitserializer/all/test_package/CMakeLists.txt b/recipes/bitserializer/all/test_package/CMakeLists.txt index b092458d1e2ae..d09d8d9b17554 100644 --- a/recipes/bitserializer/all/test_package/CMakeLists.txt +++ b/recipes/bitserializer/all/test_package/CMakeLists.txt @@ -17,6 +17,9 @@ endif() if(WITH_CSV) list(APPEND BITSERIALIZER_COMPONENTS csv-archive) endif() +if(WITH_MSGPACK) + list(APPEND BITSERIALIZER_COMPONENTS msgpack-archive) +endif() find_package(bitserializer CONFIG REQUIRED COMPONENTS ${BITSERIALIZER_COMPONENTS} @@ -31,6 +34,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE $<$:BitSerializer::pugixml-archive> $<$:BitSerializer::rapidyaml-archive> $<$:BitSerializer::csv-archive> + $<$:BitSerializer::msgpack-archive> ) target_compile_definitions(${PROJECT_NAME} PRIVATE $<$:"WITH_CPPRESTSDK"> @@ -38,4 +42,5 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE $<$:"WITH_PUGIXML"> $<$:"WITH_RAPIDYAML"> $<$:"WITH_CSV"> + $<$:"WITH_MSGPACK"> ) diff --git a/recipes/bitserializer/all/test_package/conanfile.py b/recipes/bitserializer/all/test_package/conanfile.py index abab9f750547c..86588bf359b36 100644 --- a/recipes/bitserializer/all/test_package/conanfile.py +++ b/recipes/bitserializer/all/test_package/conanfile.py @@ -23,6 +23,7 @@ def generate(self): tc.variables["WITH_PUGIXML"] = bitserializerOptions.with_pugixml tc.variables["WITH_RAPIDYAML"] = bitserializerOptions.get_safe("with_rapidyaml", False) tc.variables["WITH_CSV"] = bitserializerOptions.get_safe("with_csv", False) + tc.variables["WITH_MSGPACK"] = bitserializerOptions.get_safe("with_msgpack", False) tc.generate() def build(self): diff --git a/recipes/bitserializer/all/test_package/test_package.cpp b/recipes/bitserializer/all/test_package/test_package.cpp index aba11c808ba19..e3fd28d5e32b4 100644 --- a/recipes/bitserializer/all/test_package/test_package.cpp +++ b/recipes/bitserializer/all/test_package/test_package.cpp @@ -18,6 +18,9 @@ #ifdef WITH_CSV #include #endif +#ifdef WITH_MSGPACK +#include +#endif #include #include @@ -33,12 +36,28 @@ class CTest template void Serialize(TArchive& archive) { +#if BITSERIALIZER_VERSION >= 7000 + archive << BitSerializer::KeyValue("Message", mMessage); +#else archive << BitSerializer::MakeAutoKeyValue("Message", mMessage); +#endif } std::string mMessage; }; +std::string PrintAsHexString(const std::string& data) +{ + constexpr char hexChars[] = "0123456789ABCDEF"; + std::string result; + for (const char ch : data) + { + if (!result.empty()) result.push_back(' '); + result.append({ hexChars[(ch & 0xF0) >> 4], hexChars[(ch & 0x0F) >> 0] }); + } + return result; +} + template void TestArchive(const std::string& message) { @@ -47,21 +66,34 @@ void TestArchive(const std::string& message) BitSerializer::SerializationOptions serializationOptions; serializationOptions.streamOptions.writeBom = false; - CTest testObj[1] = { message }; + CTest testObj[1] = { message }; std::stringstream outputStream; BitSerializer::SaveObject(testObj, outputStream, serializationOptions); - std::cout << outputStream.str() << std::endl; +#if BITSERIALIZER_VERSION >= 7000 + const std::string result = TArchive::is_binary ? PrintAsHexString(outputStream.str()) : outputStream.str(); +#else + const std::string result = outputStream.str(); +#endif + std::cout << result<< std::endl; } int main() { std::cout << "BitSerializer version: " +#ifdef BITSERIALIZER_VERSION + << BitSerializer::Convert::To(BITSERIALIZER_VERSION_MAJOR) << "." + << BitSerializer::Convert::To(BITSERIALIZER_VERSION_MINOR) << "." + << BitSerializer::Convert::To(BITSERIALIZER_VERSION_PATCH) +#else << BitSerializer::Convert::To(BitSerializer::Version::Major) << "." << BitSerializer::Convert::To(BitSerializer::Version::Minor) << "." << BitSerializer::Convert::To(BitSerializer::Version::Maintenance) +#endif << std::endl; +#if !defined BITSERIALIZER_VERSION || BITSERIALIZER_HAS_FILESYSTEM // Some compilers does not link filesystem automatically std::cout << "Testing the link of C++17 filesystem: " << std::filesystem::temp_directory_path() << std::endl; +#endif #ifdef WITH_CPPRESTSDK TestArchive("Implementation based on cpprestsdk"); @@ -78,4 +110,7 @@ int main() { #ifdef WITH_CSV TestArchive("CSV archive (built-in implementation)"); #endif +#ifdef WITH_MSGPACK + TestArchive("MsgPack archive (built-in implementation)"); +#endif } diff --git a/recipes/bitserializer/all/test_v1_package/conanfile.py b/recipes/bitserializer/all/test_v1_package/conanfile.py index 599ba5557b9dc..cc693be1ab4b9 100644 --- a/recipes/bitserializer/all/test_v1_package/conanfile.py +++ b/recipes/bitserializer/all/test_v1_package/conanfile.py @@ -20,6 +20,7 @@ def build(self): cmake.definitions["WITH_PUGIXML"] = self.options["bitserializer"].with_pugixml cmake.definitions["WITH_RAPIDYAML"] = self._bitserializer_option("with_rapidyaml", False) cmake.definitions["WITH_CSV"] = self._bitserializer_option("with_csv", False) + cmake.definitions["WITH_MSGPACK"] = self._bitserializer_option("with_msgpack", False) cmake.configure() cmake.build() diff --git a/recipes/bitserializer/config.yml b/recipes/bitserializer/config.yml index 7319ee088f906..a645049195724 100644 --- a/recipes/bitserializer/config.yml +++ b/recipes/bitserializer/config.yml @@ -1,4 +1,6 @@ versions: + "0.70": + folder: "all" "0.65": folder: "all" "0.50": diff --git a/recipes/bitsery/all/conandata.yml b/recipes/bitsery/all/conandata.yml index 6d53e1633d5bf..fd5e93d076949 100644 --- a/recipes/bitsery/all/conandata.yml +++ b/recipes/bitsery/all/conandata.yml @@ -1,16 +1,10 @@ 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" "5.2.2": url: "https://github.com/fraillt/bitsery/archive/v5.2.2.tar.gz" sha256: "5e932c463f16db15228b2546632a5851a502c68e605a1e313b0f1a35c061e4ae" - "5.2.1": - url: "https://github.com/fraillt/bitsery/archive/v5.2.1.tar.gz" - sha256: "1e2ee66827c55ef82eaf6ef4c87a2c5b3a010dfe6c770eb0feeb3f0c35254d00" - "5.2.0": - url: "https://github.com/fraillt/bitsery/archive/v5.2.0.tar.gz" - sha256: "99f47bca227abb6b9e8030703dcc402ab930ff3bf0a87c89c3f0fb9536cad448" - "5.1.0": - url: "https://github.com/fraillt/bitsery/archive/v5.1.0.tar.gz" - sha256: "8f46667db5d0b62fdaab33612108498bcbcbe9cfa48d2cd220b2129734440a8d" diff --git a/recipes/bitsery/all/conanfile.py b/recipes/bitsery/all/conanfile.py index dd2f676b3757f..26bcf9c123505 100644 --- a/recipes/bitsery/all/conanfile.py +++ b/recipes/bitsery/all/conanfile.py @@ -13,13 +13,17 @@ 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 + def layout(self): + basic_layout(self, src_folder="src") + def package_id(self): self.info.clear() @@ -27,12 +31,8 @@ def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) - 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) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -44,11 +44,8 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "Bitsery") self.cpp_info.set_property("cmake_target_name", "Bitsery::bitsery") - # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed - self.cpp_info.components["bitserylib"].bindirs = [] - self.cpp_info.components["bitserylib"].frameworkdirs = [] - self.cpp_info.components["bitserylib"].libdirs = [] - self.cpp_info.components["bitserylib"].resdirs = [] + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "Bitsery" @@ -56,3 +53,5 @@ def package_info(self): self.cpp_info.components["bitserylib"].names["cmake_find_package"] = "bitsery" self.cpp_info.components["bitserylib"].names["cmake_find_package_multi"] = "bitsery" self.cpp_info.components["bitserylib"].set_property("cmake_target_name", "Bitsery::bitsery") + self.cpp_info.components["bitserylib"].bindirs = [] + self.cpp_info.components["bitserylib"].libdirs = [] diff --git a/recipes/bitsery/config.yml b/recipes/bitsery/config.yml index 07e67c2710fe5..ef54c243e956f 100644 --- a/recipes/bitsery/config.yml +++ b/recipes/bitsery/config.yml @@ -1,11 +1,7 @@ versions: + "5.2.4": + folder: all "5.2.3": folder: all "5.2.2": folder: all - "5.2.1": - folder: all - "5.2.0": - folder: all - "5.1.0": - folder: all diff --git a/recipes/blend2d/all/conandata.yml b/recipes/blend2d/all/conandata.yml index 06ef79b273e89..54dc0ba094e18 100644 --- a/recipes/blend2d/all/conandata.yml +++ b/recipes/blend2d/all/conandata.yml @@ -1,28 +1,33 @@ 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" + # When upstream will have new release, tarball may be deleted. + # Use following url: https://github.com/blend2d/blend2d/archive/a7f947677e85441abe1769586d3bb935b4086a07.tar.gz "0.10.6": - url: "https://blend2d.com/download/blend2d-0.10.6.tar.xz" - sha256: "0377f747b76d5602874351501bbbd648ba73b486273a5dcabfd6dc85c4d289b4" + url: "https://github.com/blend2d/blend2d/archive/df124784fd3e9765251c74d412d88c625e3587e9.tar.gz" + sha256: "d8a91745c79beeab29d781357308b49ef51d009237b342ce50304ea618e977ad" "0.10.5": - url: "https://blend2d.com/download/blend2d-0.10.5.tar.xz" - sha256: "fff5a7b1a6b16c986f3d02052a9a030f138fbae3a9c16bf07915416515d6b9cd" + url: "https://github.com/blend2d/blend2d/archive/99fc3aa9a1d113e913df67166d40d2a81bef1dcb.tar.gz" + sha256: "cb7426a483156721c02b28cf65969bdeeb13ffed6cf9bc4a9493d7ec4d5de8c3" "0.10.4": - url: "https://blend2d.com/download/blend2d-0.10.4.tar.xz" - sha256: "6363e5c13c1c9e4709f949585a6af772ee13a16f75b0084f91b3918dece2fff3" + url: "https://github.com/blend2d/blend2d/archive/d60f62b9d008be096daff329dfe9b8409c344651.tar.gz" + sha256: "ce197422ae8ec0d0310895bebed396091e0144ec09482439d24040196957e740" "0.10": - url: "https://blend2d.com/download/blend2d-0.10.tar.xz" - sha256: "eaed6cc5f1fc33061a99d70cf166836994d952f75762bfacb397ee388e13ccc9" + url: "https://github.com/blend2d/blend2d/archive/000d55c75994fa88efcb7a31ae32be9ec8435f7d.tar.gz" + sha256: "7a986e14d08d687bfc7510bd762a29f01b1c2449b4e60f85268dd0072c65b698" "0.9": - url: "https://blend2d.com/download/blend2d-0.9.tar.xz" - sha256: "a70a2a57c67017afa1067a11807fef9808788c69b4012ba4d56a5c47a5ba87c3" + url: "https://github.com/blend2d/blend2d/archive/346555924752f085a2a06265858bc63c8987bf98.tar.gz" + sha256: "89639d60320e8d684c3708b849ede9ac660cbd2acc33de6baa846ee7fbed24b8" "0.8": - url: "https://blend2d.com/download/blend2d-0.8.zip" - sha256: "0c1e2cc94cd4aa054c527b2dc51d533c8783a8e31779de3ba7bb49f8bd9afca1" - "0.0.18": - url: "https://blend2d.com/download/blend2d-beta18.zip" - sha256: "02d23b185183705215241d7b161937bbda5b427c54cc5aa4c03238ef8dd1e60b" - "0.0.17": - url: "https://blend2d.com/download/blend2d-beta17.zip" - sha256: "06ee8fb0bea281d09291e498900093139426501a1a7f09dba0ec801dd340635e" + url: "https://github.com/blend2d/blend2d/archive/2910c87c5e8ddedcf80bbf4871bb59d70e1170c1.tar.gz" + sha256: "34ff6f0f2dd10b39e1e6a3b07c5f76844b38f780c6849a65a34351e76e36cd3d" patches: "0.10.6": - patch_file: "patches/0.10.6-0001-disable-embed-asmjit.patch" @@ -48,15 +53,3 @@ patches: - patch_file: "patches/0.8-0001-disable-embed-asmjit.patch" patch_description: "use asmjit cci package" patch_type: "conan" - "0.0.18": - - patch_file: "patches/0.0.17-0001-disable-embed-asmjit.patch" - patch_description: "use asmjit cci package" - patch_type: "conan" - - patch_file: "patches/0.0.18-0002-fix-gcc12-compilationerror.patch" - patch_description: "fix gcc12 compilation error, backport from upstream" - patch_type: "portability" - patch_source: "https://github.com/blend2d/blend2d/commit/2574d90ebc61b5195491cc79bfa6da162084242b" - "0.0.17": - - patch_file: "patches/0.0.17-0001-disable-embed-asmjit.patch" - patch_description: "use asmjit cci package" - patch_type: "conan" diff --git a/recipes/blend2d/all/conanfile.py b/recipes/blend2d/all/conanfile.py index adbef317cace4..5663998a64f81 100644 --- a/recipes/blend2d/all/conanfile.py +++ b/recipes/blend2d/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.scm import Version from conan.tools.microsoft import check_min_vs +from conan.tools.env import VirtualBuildEnv import os required_conan_version = ">=1.53.0" @@ -45,7 +46,7 @@ def layout(self): def requirements(self): if self.options.with_jit: - self.requires("asmjit/cci.20230325") + self.requires("asmjit/cci.20240531") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -56,6 +57,10 @@ def validate(self): # https://github.com/blend2d/blend2d/commit/63db360c7eb2c1c3ca9cd92a867dbb23dc95ca7d check_min_vs(self, 192) + def build_requirements(self): + if Version(self.version) >= "0.11.1": + self.tool_requires("cmake/[>=3.18 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -67,15 +72,17 @@ def generate(self): tc.variables["BLEND2D_STATIC"] = not self.options.shared tc.variables["BLEND2D_NO_STDCXX"] = False tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.variables["BLEND2D_EXTERNAL_ASMJIT"] = True if not valid_min_cppstd(self, 11): tc.variables["CMAKE_CXX_STANDARD"] = 11 if not self.options.shared: tc.preprocessor_definitions["BL_STATIC"] = "1" tc.variables["BLEND2D_NO_JIT"] = not self.options.with_jit tc.generate() - deps = CMakeDeps(self) deps.generate() + venv = VirtualBuildEnv(self) + venv.generate(scope="build") def build(self): apply_conandata_patches(self) diff --git a/recipes/blend2d/all/patches/0.0.17-0001-disable-embed-asmjit.patch b/recipes/blend2d/all/patches/0.0.17-0001-disable-embed-asmjit.patch deleted file mode 100644 index 6a3ccd1e255b1..0000000000000 --- a/recipes/blend2d/all/patches/0.0.17-0001-disable-embed-asmjit.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 52d295a..b1a78a5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -398,10 +398,10 @@ if (NOT BLEND2D_NO_JIT) - set(ASMJIT_EMBED TRUE CACHE BOOL "") - endif() - -- include("${ASMJIT_DIR}/CMakeLists.txt") -- list(APPEND BLEND2D_DEPS ${ASMJIT_LIBS}) -- list(APPEND BLEND2D_PRIVATE_CFLAGS ${ASMJIT_CFLAGS}) -- list(APPEND BLEND2D_PRIVATE_CFLAGS -DASMJIT_NO_STDCXX) -+ find_package(asmjit CONFIG REQUIRED) -+ list(APPEND BLEND2D_DEPS asmjit::asmjit) -+ list(APPEND BLEND2D_PRIVATE_CFLAGS ${asmjit_DEFINITIONS_DEBUG}${asmjit_DEFINITIONS_RELEASE}) -+ - - # A possibility to reduce the resulting binary size by disabling asmjit logging. - if (BLEND2D_NO_JIT_LOGGING) diff --git a/recipes/blend2d/all/patches/0.0.18-0002-fix-gcc12-compilationerror.patch b/recipes/blend2d/all/patches/0.0.18-0002-fix-gcc12-compilationerror.patch deleted file mode 100644 index b089c5a2e867f..0000000000000 --- a/recipes/blend2d/all/patches/0.0.18-0002-fix-gcc12-compilationerror.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/src/blend2d/support/arenaallocator_p.h b/src/blend2d/support/arenaallocator_p.h -index d09b6da..eebd854 100644 ---- a/src/blend2d/support/arenaallocator_p.h -+++ b/src/blend2d/support/arenaallocator_p.h -@@ -445,7 +445,7 @@ public: - template - class BLArenaAllocatorTmp : public BLArenaAllocator { - public: -- BL_NONCOPYABLE(BLArenaAllocatorTmp) -+ BL_NONCOPYABLE(BLArenaAllocatorTmp) - - BL_INLINE explicit BLArenaAllocatorTmp(size_t blockSize, size_t blockAlignment = 1) noexcept - : BLArenaAllocator(blockSize, blockAlignment, _storage.data, N) {} -diff --git a/src/blend2d/support/arenahashmap_p.h b/src/blend2d/support/arenahashmap_p.h -index 29882e1..911d985 100644 ---- a/src/blend2d/support/arenahashmap_p.h -+++ b/src/blend2d/support/arenahashmap_p.h -@@ -185,7 +185,7 @@ public: - template - class BLArenaHashMap : public BLArenaHashMapBase { - public: -- BL_NONCOPYABLE(BLArenaHashMap) -+ BL_NONCOPYABLE(BLArenaHashMap) - - typedef NodeT Node; - -diff --git a/src/blend2d/support/scopedbuffer_p.h b/src/blend2d/support/scopedbuffer_p.h -index e14df50..379f519 100644 ---- a/src/blend2d/support/scopedbuffer_p.h -+++ b/src/blend2d/support/scopedbuffer_p.h -@@ -82,7 +82,7 @@ public: - template - class BLScopedBufferTmp : public BLScopedBuffer { - public: -- BL_NONCOPYABLE(BLScopedBufferTmp) -+ BL_NONCOPYABLE(BLScopedBufferTmp) - - uint8_t _storage[N]; - diff --git a/recipes/blend2d/config.yml b/recipes/blend2d/config.yml index 219f4d22f536c..b62e83e2e1cd2 100644 --- a/recipes/blend2d/config.yml +++ b/recipes/blend2d/config.yml @@ -1,4 +1,10 @@ versions: + "0.11.4": + folder: all + "0.11.3": + folder: all + "0.11.1": + folder: all "0.10.6": folder: all "0.10.5": @@ -11,7 +17,3 @@ versions: folder: all "0.8": folder: all - "0.0.18": - folder: all - "0.0.17": - folder: all diff --git a/recipes/bmx/all/conandata.yml b/recipes/bmx/all/conandata.yml new file mode 100644 index 0000000000000..0b6f6445f92a3 --- /dev/null +++ b/recipes/bmx/all/conandata.yml @@ -0,0 +1,20 @@ +sources: + "1.2": + url: "https://github.com/bbc/bmx/archive/refs/tags/v1.2.tar.gz" + sha256: "e64d91b2d27478d6b892d72183e1ecf79c99880b079ce04442432f3caed1e259" + "cci.20240517": + url: "https://github.com/bbc/bmx/archive/52c7517923dde6e4de881fe1e47fbae5e60df731.tar.gz" + sha256: "b4a0545e2fa33bd7c25adce3b61fd4b06a68a192d037dd0e5eb14defd0b2c936" +patches: + "1.2": + - patch_file: "patches/1.2-cmake-fixes.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" + - patch_file: "patches/1.2-fix-cpp20.patch" + patch_description: "Fix a compilation problem with C++20" + patch_type: "portability" + patch_source: "https://github.com/bbc/bmx/pull/69" + "cci.20240517": + - patch_file: "patches/cci.20240517-cmake-fixes.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/bmx/all/conanfile.py b/recipes/bmx/all/conanfile.py new file mode 100644 index 0000000000000..2a7415f432502 --- /dev/null +++ b/recipes/bmx/all/conanfile.py @@ -0,0 +1,140 @@ +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, export_conandata_patches, copy, get, rmdir +import os + +required_conan_version = ">=1.53.0" + + +class BmxConan(ConanFile): + name = "bmx" + description = ( + "Library for handling broadcast/production oriented media file formats. " + "Allows reading, modifying and writing media metadata and file essences." + ) + topics = ("vfx", "image", "picture", "video", "multimedia", "mxf") + license = "BSD-3-Clause" + homepage = "https://github.com/bbc/bmx" + url = "https://github.com/conan-io/conan-center-index" + + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_libcurl": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_libcurl": 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") + + def requirements(self): + # Required libraries + self.requires("uriparser/0.9.8") + self.requires("expat/[>=2.6.2 <3]") + + if not (self.settings.os == 'Windows' or self.settings.os == 'Macos'): + self.requires('libuuid/1.0.3') + + # Configuration dependent requirements + if self.options.with_libcurl: + self.requires("libcurl/[>=7.78.0 <9]") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + + # Symbol export is currently not working properly on Windows so shared + # libraries are currently deactivated. This can later be revisited based + # on https://github.com/bbc/bmx/issues/80 + if self.settings.os == "Windows" and self.options.shared: + raise ConanInvalidConfiguration( + "Building as a shared library currently not supported on Windows!" + ) + + 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["BMX_BUILD_WITH_LIBCURL"] = self.options.with_libcurl + tc.generate() + + cd = CMakeDeps(self) + cd.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "COPYING", 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", "pkgconfig")) + + @staticmethod + def _conan_comp(name): + return f"bmx_{name.lower()}" + + def _add_component(self, name): + component = self.cpp_info.components[self._conan_comp(name)] + component.set_property("cmake_target_name", f"bmx::{name}") + component.names["cmake_find_package"] = name + component.names["cmake_find_package_multi"] = name + return component + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "bmx") + self.cpp_info.set_property("pkg_config_name", "bmx") + + self.cpp_info.names["cmake_find_package"] = "bmx" + self.cpp_info.names["cmake_find_package_multi"] = "bmx" + + # bbc-bmx::MXF + libmxf = self._add_component("MXF") + libmxf.libs = ["MXF"] + libmxf.requires = [] + if not (self.settings.os == 'Windows' or self.settings.os == 'Macos'): + libmxf.requires.append("libuuid::libuuid") + + # bbc-bmx::MXF++ + libmxfpp = self._add_component("MXF++") + libmxfpp.libs = ["MXF++"] + libmxfpp.requires = [ + "bmx_mxf" + ] + + # bbc-bmx::bmx + libbmx = self._add_component("bmx") + libbmx.libs = ["bmx"] + libbmx.requires = [ + "bmx_mxf", + "bmx_mxf++", + "expat::expat", + "uriparser::uriparser", + ] + if not (self.settings.os == 'Windows' or self.settings.os == 'Macos'): + libbmx.requires.append("libuuid::libuuid") + + if self.options.with_libcurl: + libbmx.requires.append("libcurl::libcurl") diff --git a/recipes/bmx/all/patches/1.2-cmake-fixes.patch b/recipes/bmx/all/patches/1.2-cmake-fixes.patch new file mode 100644 index 0000000000000..29a8742dbedbb --- /dev/null +++ b/recipes/bmx/all/patches/1.2-cmake-fixes.patch @@ -0,0 +1,141 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 6fe9540e7..8b2578852 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -34,7 +34,7 @@ if(BUILD_SHARED_LIBS OR NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + endif() + +-set(CMAKE_CXX_STANDARD 11) ++#set(CMAKE_CXX_STANDARD 11) + + # Set the test samples output directory + if(BMX_TEST_SAMPLES_DIR STREQUAL "") +@@ -75,7 +75,7 @@ if(MSVC) + endforeach() + endif() + else() +- add_compile_options(-W -Wall -O2) ++ add_compile_options(-W -Wall) + + # Enable large file support on 32-bit systems. + add_definitions( +@@ -93,11 +93,25 @@ add_custom_target(bmx_test_data) + + include("${PROJECT_SOURCE_DIR}/cmake/libmxf.cmake") + include("${PROJECT_SOURCE_DIR}/cmake/libmxfpp.cmake") +-include("${PROJECT_SOURCE_DIR}/cmake/ext_uuid.cmake") +-include("${PROJECT_SOURCE_DIR}/cmake/ext_expat.cmake") +-include("${PROJECT_SOURCE_DIR}/cmake/ext_uriparser.cmake") ++#include("${PROJECT_SOURCE_DIR}/cmake/ext_uuid.cmake") ++#include("${PROJECT_SOURCE_DIR}/cmake/ext_expat.cmake") ++#include("${PROJECT_SOURCE_DIR}/cmake/ext_uriparser.cmake") ++#if(BMX_BUILD_WITH_LIBCURL) ++# include("${PROJECT_SOURCE_DIR}/cmake/ext_libcurl.cmake") ++#endif() ++ ++find_package(expat REQUIRED) ++find_package(uriparser REQUIRED) ++if(UNIX AND NOT APPLE) ++ find_package(libuuid REQUIRED) ++ set(uuid_link_lib libuuid::libuuid) ++else() ++ # MSVC: "ole" will already be linked in ++ # APPLE: doesn't require uuid library ++ set(uuid_link_lib) ++endif() + if(BMX_BUILD_WITH_LIBCURL) +- include("${PROJECT_SOURCE_DIR}/cmake/ext_libcurl.cmake") ++ find_package(CURL REQUIRED) + endif() + + configure_file(config.h.in config.h) +diff --git deps/libMXF/CMakeLists.txt deps/libMXF/CMakeLists.txt +index d36fde6c0..6a1af100b 100644 +--- deps/libMXF/CMakeLists.txt ++++ deps/libMXF/CMakeLists.txt +@@ -35,7 +35,7 @@ if(BUILD_SHARED_LIBS OR NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + endif() + +-set(CMAKE_CXX_STANDARD 11) ++#set(CMAKE_CXX_STANDARD 11) + + # Set the test samples output directory + if(LIBMXF_TEST_SAMPLES_DIR STREQUAL "") +@@ -76,7 +76,7 @@ if(MSVC) + endforeach() + endif() + else() +- add_compile_options(-W -Wall -O2) ++ add_compile_options(-W -Wall) + + # Enable large file support on 32-bit systems. + add_definitions( +diff --git deps/libMXFpp/CMakeLists.txt deps/libMXFpp/CMakeLists.txt +index 2272a2709..924fdf770 100644 +--- deps/libMXFpp/CMakeLists.txt ++++ deps/libMXFpp/CMakeLists.txt +@@ -35,7 +35,7 @@ if(BUILD_SHARED_LIBS OR NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + endif() + +-set(CMAKE_CXX_STANDARD 11) ++#set(CMAKE_CXX_STANDARD 11) + + if(MSVC) + add_compile_options(/W3 /EHsc) +@@ -61,7 +61,7 @@ if(MSVC) + endforeach() + endif() + else() +- add_compile_options(-W -Wall -O2) ++ add_compile_options(-W -Wall) + + # Enable large file support on 32-bit systems. + add_definitions( +diff --git deps/libMXFpp/libMXF++/CMakeLists.txt deps/libMXFpp/libMXF++/CMakeLists.txt +index 94d48c905..e6c6a63f9 100644 +--- deps/libMXFpp/libMXF++/CMakeLists.txt ++++ deps/libMXFpp/libMXF++/CMakeLists.txt +@@ -32,6 +32,8 @@ add_library(MXFpp + ${MXFpp_sources} + ) + ++target_compile_features(MXFpp PUBLIC cxx_std_11) ++ + target_include_directories(MXFpp PUBLIC + ${PROJECT_SOURCE_DIR} + ) +diff --git src/CMakeLists.txt src/CMakeLists.txt +index 1c0824d8a..94f9c00d6 100644 +--- src/CMakeLists.txt ++++ src/CMakeLists.txt +@@ -26,6 +26,8 @@ target_include_directories(bmx PUBLIC + ${PROJECT_SOURCE_DIR}/include + ) + ++target_compile_features(bmx PUBLIC cxx_std_11) ++ + # Add path to header files if not included in MSVC distribution + if(MSVC) + include(CheckIncludeFile) +@@ -65,13 +67,14 @@ target_link_libraries(bmx + ${MXFpp_link_lib} + PRIVATE + ${uuid_link_lib} +- ${expat_link_lib} +- ${uriparser_link_lib} ++ expat::expat ++ uriparser::uriparser + ) + + if(BMX_BUILD_WITH_LIBCURL) +- target_link_libraries(bmx PRIVATE +- ${libcurl_link_lib} ++ # Linking public to see if the shared library for curls dependencies correctly link ++ target_link_libraries(bmx PUBLIC ++ CURL::libcurl + ) + endif() + diff --git a/recipes/bmx/all/patches/1.2-fix-cpp20.patch b/recipes/bmx/all/patches/1.2-fix-cpp20.patch new file mode 100644 index 0000000000000..862806a6a30d2 --- /dev/null +++ b/recipes/bmx/all/patches/1.2-fix-cpp20.patch @@ -0,0 +1,26 @@ +diff --git deps/libMXFpp/libMXF++/MXFVersion.cpp deps/libMXFpp/libMXF++/MXFVersion.cpp +index 333d5871..bb247a32 100644 +--- deps/libMXFpp/libMXF++/MXFVersion.cpp ++++ deps/libMXFpp/libMXF++/MXFVersion.cpp +@@ -33,6 +33,8 @@ + #include "config.h" + #endif + ++#include ++ + #include "git.h" + #include "fallback_git_version.h" + +diff --git src/common/Version.cpp src/common/Version.cpp +index a4f00e14..d51da64a 100644 +--- src/common/Version.cpp ++++ src/common/Version.cpp +@@ -219,7 +219,7 @@ mxfProductVersion bmx::get_bmx_mxf_product_version() + // Set the patch version value to the commit offset from the release tag. + // The commit offset is part of the git describe tag string which has the + // format "--g" +- string describe = bmx_git::DescribeTag(); ++ string describe = std::string(bmx_git::DescribeTag()); + #ifdef PACKAGE_GIT_VERSION_STRING + if (describe.empty() || describe == "unknown") + describe = PACKAGE_GIT_VERSION_STRING; diff --git a/recipes/bmx/all/patches/cci.20240517-cmake-fixes.patch b/recipes/bmx/all/patches/cci.20240517-cmake-fixes.patch new file mode 100644 index 0000000000000..51915e0cc5aa0 --- /dev/null +++ b/recipes/bmx/all/patches/cci.20240517-cmake-fixes.patch @@ -0,0 +1,57 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 3139ef78e..a08fbb589 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -91,11 +91,26 @@ add_custom_target(bmx_test_data) + + include("${PROJECT_SOURCE_DIR}/cmake/libmxf.cmake") + include("${PROJECT_SOURCE_DIR}/cmake/libmxfpp.cmake") +-include("${PROJECT_SOURCE_DIR}/cmake/ext_uuid.cmake") +-include("${PROJECT_SOURCE_DIR}/cmake/ext_expat.cmake") +-include("${PROJECT_SOURCE_DIR}/cmake/ext_uriparser.cmake") ++#include("${PROJECT_SOURCE_DIR}/cmake/ext_uuid.cmake") ++#include("${PROJECT_SOURCE_DIR}/cmake/ext_expat.cmake") ++#include("${PROJECT_SOURCE_DIR}/cmake/ext_uriparser.cmake") ++#if(BMX_BUILD_WITH_LIBCURL) ++# include("${PROJECT_SOURCE_DIR}/cmake/ext_libcurl.cmake") ++#endif() ++ ++find_package(expat REQUIRED) ++find_package(uriparser REQUIRED) ++if(UNIX AND NOT APPLE) ++ find_package(libuuid REQUIRED) ++ set(uuid_link_lib libuuid::libuuid) ++else() ++ # MSVC: "ole" will already be linked in ++ # APPLE: doesn't require uuid library ++ set(uuid_link_lib) ++endif() + if(BMX_BUILD_WITH_LIBCURL) + include("${PROJECT_SOURCE_DIR}/cmake/ext_libcurl.cmake") ++ find_package(CURL REQUIRED) + endif() + + configure_file(config.h.in config.h) +diff --git src/CMakeLists.txt src/CMakeLists.txt +index 59c94b8b9..94f9c00d6 100644 +--- src/CMakeLists.txt ++++ src/CMakeLists.txt +@@ -67,13 +67,14 @@ target_link_libraries(bmx + ${MXFpp_link_lib} + PRIVATE + ${uuid_link_lib} +- ${expat_link_lib} +- ${uriparser_link_lib} ++ expat::expat ++ uriparser::uriparser + ) + + if(BMX_BUILD_WITH_LIBCURL) +- target_link_libraries(bmx PRIVATE +- ${libcurl_link_lib} ++ # Linking public to see if the shared library for curls dependencies correctly link ++ target_link_libraries(bmx PUBLIC ++ CURL::libcurl + ) + endif() + diff --git a/recipes/bmx/all/test_package/CMakeLists.txt b/recipes/bmx/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..e178912ec45f8 --- /dev/null +++ b/recipes/bmx/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(bmx REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11) +target_link_libraries(${PROJECT_NAME} PRIVATE bmx::bmx) diff --git a/recipes/bmx/all/test_package/conanfile.py b/recipes/bmx/all/test_package/conanfile.py new file mode 100644 index 0000000000000..a9fb96656f203 --- /dev/null +++ b/recipes/bmx/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.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/bmx/all/test_package/test_package.cpp b/recipes/bmx/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..708a858acfc27 --- /dev/null +++ b/recipes/bmx/all/test_package/test_package.cpp @@ -0,0 +1,14 @@ +#include +#include + +#include + +int main() { + std::cout << bmx::get_bmx_library_name() << " library version " << bmx::get_bmx_version_string() << std::endl; + + const auto mxf_version = mxf_get_version(); + std::cout << "MXF library version " + << mxf_version->major << '.' << mxf_version->minor << '.' << mxf_version->patch << std::endl; + + return 0; +} diff --git a/recipes/bmx/config.yml b/recipes/bmx/config.yml new file mode 100644 index 0000000000000..67c5069aa3fb3 --- /dev/null +++ b/recipes/bmx/config.yml @@ -0,0 +1,5 @@ +versions: + "1.2": + folder: all + "cci.20240517": + folder: all 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 f0c416fba2531..9a49b404141c2 100644 --- a/recipes/boost/all/conandata.yml +++ b/recipes/boost/all/conandata.yml @@ -1,4 +1,14 @@ 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" + - "https://sourceforge.net/projects/boost/files/boost/1.85.0/boost_1_85_0.tar.bz2" + sha256: "7009fe1faa1697476bdc7027703a2badb84e849b7b0baad5086b087b971f8617" "1.84.0": url: - "https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.bz2" @@ -68,6 +78,18 @@ 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" + patch_type: "conan" + - patch_file: "patches/1.85.0-container-aliasing-violation-fix.patch" + patch_description: "Fix aliasing violation in boost::container" + patch_type: "official" + patch_source: "https://github.com/boostorg/container/commit/20ad12f20e661978e90dc7f36d8ab8ac05e5a5a9" "1.84.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 25b060af95c59..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, @@ -23,11 +23,11 @@ required_conan_version = ">=1.53.0" - # When adding (or removing) an option, also add this option to the list in # `rebuild-dependencies.yml` and re-run that script. CONFIGURE_OPTIONS = ( "atomic", + "charconv", "chrono", "cobalt", "container", @@ -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 @@ -233,6 +233,21 @@ def _min_compiler_version_default_cxx11(self): "msvc": 190, # guess }.get(str(self.settings.compiler)) + @property + def _min_compiler_version_default_cxx14(self): + """ Minimum compiler version having c++ standard >= 14 + https://gcc.gnu.org/gcc-6/changes.html + https://releases.llvm.org/6.0.0/tools/clang/docs/ReleaseNotes.html#id9 + https://learn.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=msvc-150#remarks + """ + return { + "gcc": 6, + "clang": 6, + "apple-clang": 99, # still uses C++98 by default. XCode does not reflect apple-clang + "Visual Studio": 15, # guess + "msvc": 191, # guess + }.get(str(self.settings.compiler)) + @property def _min_compiler_version_default_cxx20(self): return { @@ -252,11 +267,61 @@ def _has_cppstd_11_supported(self): if compiler_version: return (Version(self.settings.compiler.version) >= compiler_version) or "11" in supported_cppstd(self) + @property + def _has_cppstd_14_supported(self): + cppstd = self.settings.compiler.get_safe("cppstd") + if cppstd: + return valid_min_cppstd(self, 14) + required_compiler_version = self._min_compiler_version_default_cxx14 + if required_compiler_version: + msvc_versions = {14: 190, 15: 191, 16: 192, 17: 193} + compiler_version = Version(self.settings.compiler.version) + is_visual_studio = str(self.settings.compiler) == "Visual Studio" + # supported_cppstd only supports msvc, but not Visual Studio as compiler + supported_cxx14 = "14" in supported_cppstd(self, "msvc", msvc_versions.get(compiler_version)) if is_visual_studio else "14" in supported_cppstd(self) + # supported_cppstd: lists GCC 5 due partial support for C++14, but not enough for Boost + return (compiler_version >= required_compiler_version) and supported_cxx14 + + @property + def _has_cppstd_20_supported(self): + cppstd = self.settings.compiler.get_safe("cppstd") + if cppstd: + return valid_min_cppstd(self, 20) + required_compiler_version = self._min_compiler_version_default_cxx20 + if required_compiler_version: + msvc_versions = {14: 190, 15: 191, 16: 192, 17: 193} + compiler_version = Version(self.settings.compiler.version) + is_visual_studio = str(self.settings.compiler) == "Visual Studio" + # supported_cppstd only supports msvc, but not Visual Studio as compiler + supported_cxx20 = "20" in supported_cppstd(self, "msvc", msvc_versions.get(compiler_version)) if is_visual_studio else "20" in supported_cppstd(self) + # We still dont have a compiler using C++20 by default + return (compiler_version >= required_compiler_version) or supported_cxx20 + + @property + def _has_coroutine_supported(self): + cppstd = self.settings.compiler.get_safe("cppstd") + cppstd_20_supported = True + if cppstd: + cppstd_20_supported = valid_min_cppstd(self, 20) + # https://en.cppreference.com/w/cpp/compiler_support#cpp20 + # https://releases.llvm.org/14.0.0/tools/clang/docs/ReleaseNotes.html#clang-format: before is experimental header + # https://gcc.gnu.org/gcc-10/changes.html: requires -fcoroutines + min_compiler_versions = { + "apple-clang": "12", + "clang": "14", + "gcc": "10", + "msvc": "192", + "Visual Studio": "16",} + required_compiler_version = min_compiler_versions.get(str(self.settings.compiler)) + if not required_compiler_version: + return cppstd_20_supported + return cppstd_20_supported and Version(self.settings.compiler.version) >= required_compiler_version + @property def _min_compiler_version_nowide(self): # Nowide needs c++11 + swappable std::fstream return { - "gcc": 5, + "gcc": 4.8, "clang": 5, "Visual Studio": 14, # guess "msvc": 190, # guess @@ -365,6 +430,10 @@ def config_options(self): self.options.without_json = True self.options.without_nowide = True 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": @@ -382,18 +451,25 @@ def config_options(self): if dep_name not in self._configure_options: delattr(self.options, f"without_{dep_name}") + def disable_math(): + super_modules = self._all_super_modules("math") + for smod in super_modules: + try: + setattr(self.options, f"without_{smod}", True) + 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 - - def disable_math(): - super_modules = self._all_super_modules("math") - for smod in super_modules: - try: - setattr(self.options, f"without_{smod}", True) - except ConanException: - pass - if self.settings.compiler.get_safe("cppstd"): if not valid_min_cppstd(self, 11): disable_math() @@ -403,6 +479,9 @@ def disable_math(): self.output.warning("Assuming the compiler supports c++11 by default") elif not self._has_cppstd_11_supported: disable_math() + # Boost.Math is not built when the compiler is GCC < 5 and uses C++11 + elif self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": + disable_math() if Version(self.version) >= "1.79.0": # Starting from 1.79.0, Boost.Wave requires a c++11 capable compiler @@ -425,6 +504,9 @@ def disable_wave(): self.output.warning("Assuming the compiler supports c++11 by default") elif not self._has_cppstd_11_supported: disable_wave() + # Boost.Wave is not built when the compiler is GCC < 5 and uses C++11 + elif self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": + disable_wave() if Version(self.version) >= "1.81.0": # Starting from 1.81.0, Boost.Locale requires a c++11 capable compiler @@ -447,6 +529,9 @@ def disable_locale(): self.output.warning("Assuming the compiler supports c++11 by default") elif not self._has_cppstd_11_supported: disable_locale() + # Boost.Locale is not built when the compiler is GCC < 5 and uses C++11 + elif self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": + disable_locale() if Version(self.version) >= "1.84.0": # Starting from 1.84.0, Boost.Cobalt requires a c++20 capable compiler @@ -460,7 +545,9 @@ def disable_cobalt(): except ConanException: pass - if self.settings.compiler.get_safe("cppstd"): + if not self._has_coroutine_supported: + disable_cobalt() + elif self.settings.compiler.get_safe("cppstd"): if not valid_min_cppstd(self, 20): disable_cobalt() else: @@ -474,6 +561,33 @@ def disable_cobalt(): if is_msvc(self): self.options.without_fiber = True + if Version(self.version) >= "1.85.0": + # Starting from 1.85.0, Boost.Math requires a c++14 capable compiler + # https://github.com/boostorg/math/blob/boost-1.85.0/README.md + # ==> disable it by default for older compilers or c++ standards + if self.settings.compiler.get_safe("cppstd"): + if not valid_min_cppstd(self, 14): + disable_math() + 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_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): return self._dependencies["configure_options"] @@ -493,6 +607,15 @@ def _stacktrace_addr2line_available(self): return False return not self.options.header_only and not self.options.without_stacktrace and self.settings.os != "Windows" + @property + def _stacktrace_from_exception_available(self): + 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: self.options.rm_safe("shared") @@ -528,12 +651,14 @@ 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") + # Use verbosity from [conf] if specified + verbosity = self.conf.get("tools.build:verbosity", default="quiet") + if verbosity == "verbose" and int(self.options.debug_level) < 2: + self.options.debug_level.value = 2 + def layout(self): basic_layout(self, src_folder="src") @@ -554,8 +679,28 @@ def _cxx11_boost_libraries(self): libraries.append("stacktrace") libraries.append("test") libraries.append("thread") + if Version(self.version) >= "1.85.0": + libraries.append("system") libraries.sort() - return filter(lambda library: f"without_{library}" in self.options, libraries) + return list(filter(lambda library: f"without_{library}" in self.options, libraries)) + + @property + def _cxx14_boost_libraries(self): + libraries = [] + if Version(self.version) >= "1.85.0": + # https://github.com/boostorg/math/blob/develop/README.md#boost-math-library + libraries.append("math") + libraries.sort() + return list(filter(lambda library: f"without_{library}" in self.options, libraries)) + + @property + def _cxx20_boost_libraries(self): + libraries = [] + if Version(self.version) >= "1.84.0": + # https://github.com/boostorg/cobalt/blob/boost-1.84.0/build/Jamfile#L54 + libraries.append("cobalt") + libraries.sort() + return list(filter(lambda library: f"without_{library}" in self.options, libraries)) def validate(self): if not self.options.multithreading: @@ -597,15 +742,20 @@ def validate(self): if mincompiler_version and Version(self.settings.compiler.version) < mincompiler_version: raise ConanInvalidConfiguration("This compiler is too old to build Boost.nowide.") - if any([not self.options.get_safe(f"without_{library}", True) for library in self._cxx11_boost_libraries]): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) - else: - if not self._has_cppstd_11_supported: + for cxx_standard, boost_libraries, has_cppstd_supported in [ + (11, self._cxx11_boost_libraries, self._has_cppstd_11_supported), + (14, self._cxx14_boost_libraries, self._has_cppstd_14_supported), + (20, self._cxx20_boost_libraries, self._has_cppstd_20_supported)]: + if any([not self.options.get_safe(f"without_{library}", True) for library in boost_libraries]): + if (self.settings.compiler.get_safe("cppstd") and not valid_min_cppstd(self, cxx_standard)) or \ + not has_cppstd_supported: raise ConanInvalidConfiguration( - f"Boost.{{{','.join(self._cxx11_boost_libraries)}}} requires a c++11 compiler " - "(please set compiler.cppstd or use a newer compiler)" + f"Boost libraries {', '.join(boost_libraries)} requires a C++{cxx_standard} compiler. " + "Please, set compiler.cppstd or use a newer compiler version or disable from building." ) + if not self.options.get_safe("without_cobalt", True) and not self._has_coroutine_supported: + raise ConanInvalidConfiguration("Boost.Cobalt requires a C++20 capable compiler. " + "Please, set compiler.cppstd and use a newer compiler version, or disable from building.") def _with_dependency(self, dependency): """ @@ -651,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") @@ -677,7 +827,7 @@ def package_id(self): def build_requirements(self): if not self.options.header_only: - self.tool_requires("b2/4.10.1") + self.tool_requires("b2/[>=5.2 <6]") def source(self): get(self, **self.conan_data["sources"][self.version], @@ -1172,6 +1322,9 @@ def add_defines(library): flags.append(f"cxxstd={cppstd_version}") if "gnu" in safe_cppstd: flags.append("cxxstd-dialect=gnu") + elif Version(self.version) >= "1.85.0" and self._has_cppstd_14_supported: + cppstd_version = self._cppstd_flag("14") + flags.append(f"cxxstd={cppstd_version}") elif self._has_cppstd_11_supported: cppstd_version = self._cppstd_flag("11") flags.append(f"cxxstd={cppstd_version}") @@ -1241,6 +1394,10 @@ def add_defines(library): cxx_flags.append("-fembed-bitcode") if self._with_stacktrace_backtrace: flags.append(f"-sLIBBACKTRACE_PATH={self.dependencies['libbacktrace'].package_folder}") + if self._stacktrace_from_exception_available and "x86" not in str(self.settings.arch): + # https://github.com/boostorg/stacktrace/blob/boost-1.85.0/src/from_exception.cpp#L29 + # This feature is guarded by BOOST_STACKTRACE_ALWAYS_STORE_IN_PADDING, but that is only enabled on x86. + flags.append("define=BOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK=1") if self._with_iconv: flags.append(f"-sICONV_PATH={self.dependencies['libiconv'].package_folder}") if self._with_icu: @@ -1260,6 +1417,10 @@ def add_defines(library): if self.options.get_safe("addr2line_location"): cxx_flags.append(f"-DBOOST_STACKTRACE_ADDR2LINE_LOCATION={self.options.addr2line_location}") + if not self.options.get_safe('without_cobalt', True) and \ + (self.settings.compiler == "gcc" and Version(self.settings.compiler.version) == "10"): + cxx_flags.append("-fcoroutines") + cxx_flags = f'cxxflags="{" ".join(cxx_flags)}"' flags.append(cxx_flags) @@ -1344,6 +1505,9 @@ def _create_user_config_jam(self, folder): def create_library_config(deps_name, name): aggregated_cpp_info = self.dependencies[deps_name].cpp_info.aggregated_components() + if len(aggregated_cpp_info.libs) == 0: + return "" + includedir = aggregated_cpp_info.includedirs[0].replace("\\", "/") includedir = f"\"{includedir}\"" libdir = aggregated_cpp_info.libdirs[0].replace("\\", "/") @@ -1460,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", @@ -1738,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)) @@ -1751,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",) 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 @@ -1835,6 +2003,8 @@ def filter_transform_module_libraries(names): self.cpp_info.components["stacktrace_addr2line"].system_libs.append("dl") if self._with_stacktrace_backtrace: self.cpp_info.components["stacktrace_backtrace"].system_libs.append("dl") + if self._stacktrace_from_exception_available: + self.cpp_info.components["stacktrace_from_exception"].system_libs.append("dl") if self._stacktrace_addr2line_available: self.cpp_info.components["stacktrace_addr2line"].defines.extend([ @@ -1893,6 +2063,11 @@ def filter_transform_module_libraries(names): self.cpp_info.components["headers"].defines.append("BOOST_SP_USE_SPINLOCK") else: self.cpp_info.components["headers"].defines.extend(["BOOST_AC_DISABLE_THREADS", "BOOST_SP_DISABLE_THREADS"]) + + if not self.options.get_safe('without_cobalt', True) and \ + (self.settings.compiler == "gcc" and Version(self.settings.compiler.version) == "10"): + self.cpp_info.components["cobalt"].cxxflags.append("-fcoroutines") + #TODO: remove in the future, user_info deprecated in conan2, but kept for compatibility while recipe is cross-compatible. self.user_info.stacktrace_addr2line_available = self._stacktrace_addr2line_available self.conf_info.define("user.boost:stacktrace_addr2line_available", self._stacktrace_addr2line_available) diff --git a/recipes/boost/all/dependencies/dependencies-1.85.0.yml b/recipes/boost/all/dependencies/dependencies-1.85.0.yml new file mode 100644 index 0000000000000..2306346f43372 --- /dev/null +++ b/recipes/boost/all/dependencies/dependencies-1.85.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_from_exception: + - stacktrace + stacktrace_noop: + - stacktrace + stacktrace_windbg: + - stacktrace + stacktrace_windbg_cached: + - 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.85.0 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/all/patches/1.85.0-container-aliasing-violation-fix.patch b/recipes/boost/all/patches/1.85.0-container-aliasing-violation-fix.patch new file mode 100644 index 0000000000000..aa3c821fde524 --- /dev/null +++ b/recipes/boost/all/patches/1.85.0-container-aliasing-violation-fix.patch @@ -0,0 +1,417 @@ +From a92131b34b78f7f010881750ecb8b4ce274511d2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= +Date: Sun, 28 Apr 2024 23:29:59 +0200 +Subject: [PATCH 1/1] Remove UB in flat_map implementation when the + implementation has a movable std::pair + +--- + boost/container/allocator_traits.hpp | 144 +++++++++++++++++- + boost/container/detail/construct_in_place.hpp | 36 ++++- + boost/container/flat_map.hpp | 67 ++++++-- + 3 files changed, 229 insertions(+), 18 deletions(-) + +diff --git a/boost/container/allocator_traits.hpp b/boost/container/allocator_traits.hpp +index cdb6683e8..8e2fafa7f 100644 +--- a/boost/container/allocator_traits.hpp ++++ b/boost/container/allocator_traits.hpp +@@ -32,6 +32,8 @@ + #include + #include //is_empty + #include ++#include ++#include + #ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP + #include + #endif +@@ -81,6 +83,144 @@ + + namespace boost { + namespace container { ++namespace dtl { ++ ++#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) ++ ++template ++BOOST_CONTAINER_FORCEINLINE void construct_type(T *p, BOOST_FWD_REF(Args) ...args) ++{ ++ ::new((void*)p, boost_container_new_t()) T(::boost::forward(args)...); ++} ++ ++template < class Pair, class KeyType, class ... Args> ++typename dtl::enable_if< dtl::is_pair, void >::type ++construct_type ++ (Pair* p, try_emplace_t, BOOST_FWD_REF(KeyType) k, BOOST_FWD_REF(Args) ...args) ++{ ++ construct_type(dtl::addressof(p->first), ::boost::forward(k)); ++ BOOST_CONTAINER_TRY{ ++ construct_type(dtl::addressof(p->second), ::boost::forward(args)...); ++ } ++ BOOST_CONTAINER_CATCH(...) { ++ typedef typename Pair::first_type first_type; ++ dtl::addressof(p->first)->~first_type(); ++ BOOST_CONTAINER_RETHROW ++ } ++ BOOST_CONTAINER_CATCH_END ++} ++ ++#else ++ ++#define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPEJ(N) \ ++template\ ++BOOST_CONTAINER_FORCEINLINE \ ++ typename dtl::disable_if_c::value, void >::type \ ++construct_type(T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ ++{\ ++ ::new((void*)p, boost_container_new_t()) T( BOOST_MOVE_FWD##N );\ ++}\ ++// ++BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPEJ) ++#undef BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPEJ ++ ++#define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPE(N) \ ++template < class Pair, class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N>\ ++typename dtl::enable_if< dtl::is_pair, void >::type construct_type\ ++ (Pair* p, try_emplace_t, BOOST_FWD_REF(KeyType) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ ++{\ ++ construct_type(dtl::addressof(p->first), ::boost::forward(k));\ ++ BOOST_CONTAINER_TRY{\ ++ construct_type(dtl::addressof(p->second) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ ++ }\ ++ BOOST_CONTAINER_CATCH(...) {\ ++ typedef typename Pair::first_type first_type;\ ++ dtl::addressof(p->first)->~first_type();\ ++ BOOST_CONTAINER_RETHROW\ ++ }\ ++ BOOST_CONTAINER_CATCH_END\ ++}\ ++// ++BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPE) ++#undef BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_TYPE ++ ++#endif ++ ++template ++inline ++typename dtl::enable_if, void >::type ++construct_type(T* p) ++{ ++ dtl::construct_type(dtl::addressof(p->first)); ++ BOOST_CONTAINER_TRY{ ++ dtl::construct_type(dtl::addressof(p->second)); ++ } ++ BOOST_CONTAINER_CATCH(...) { ++ typedef typename T::first_type first_type; ++ dtl::addressof(p->first)->~first_type(); ++ BOOST_CONTAINER_RETHROW ++ } ++ BOOST_CONTAINER_CATCH_END ++} ++ ++ ++template ++inline ++typename dtl::enable_if_c ++ < dtl::is_pair::value ++ , void >::type ++construct_type(T* p, U &u) ++{ ++ dtl::construct_type(dtl::addressof(p->first), u.first); ++ BOOST_CONTAINER_TRY{ ++ dtl::construct_type(dtl::addressof(p->second), u.second); ++ } ++ BOOST_CONTAINER_CATCH(...) { ++ typedef typename T::first_type first_type; ++ dtl::addressof(p->first)->~first_type(); ++ BOOST_CONTAINER_RETHROW ++ } ++ BOOST_CONTAINER_CATCH_END ++} ++ ++template ++inline ++typename dtl::enable_if_c ++ < dtl::is_pair::type>::value && ++ !boost::move_detail::is_reference::value //This is needed for MSVC10 and ambiguous overloads ++ , void >::type ++construct_type(T* p, BOOST_RV_REF(U) u) ++{ ++ dtl::construct_type(dtl::addressof(p->first), ::boost::move(u.first)); ++ BOOST_CONTAINER_TRY{ ++ dtl::construct_type(dtl::addressof(p->second), ::boost::move(u.second)); ++ } ++ BOOST_CONTAINER_CATCH(...) { ++ typedef typename T::first_type first_type; ++ dtl::addressof(p->first)->~first_type(); ++ BOOST_CONTAINER_RETHROW ++ } ++ BOOST_CONTAINER_CATCH_END ++} ++ ++template ++inline ++typename dtl::enable_if, void >::type ++construct_type(T* p, BOOST_FWD_REF(U) x, BOOST_FWD_REF(V) y) ++{ ++ dtl::construct_type(dtl::addressof(p->first), ::boost::forward(x)); ++ BOOST_CONTAINER_TRY{ ++ dtl::construct_type(dtl::addressof(p->second), ::boost::forward(y)); ++ } ++ BOOST_CONTAINER_CATCH(...) { ++ typedef typename T::first_type first_type; ++ dtl::addressof(p->first)->~first_type(); ++ BOOST_CONTAINER_RETHROW ++ } ++ BOOST_CONTAINER_CATCH_END ++} ++ ++} //namespace dtl + + #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + +@@ -419,7 +559,7 @@ struct allocator_traits + + template + inline static void priv_construct(dtl::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args) +- { ::new((void*)p, boost_container_new_t()) T(::boost::forward(args)...); } ++ { dtl::construct_type(p, ::boost::forward(args)...); } + #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + public: + +@@ -450,7 +590,7 @@ struct allocator_traits + \ + template\ + inline static void priv_construct(dtl::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ +- { ::new((void*)p, boost_container_new_t()) T(BOOST_MOVE_FWD##N); }\ ++ { dtl::construct_type(p BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ + // + BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL) + #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL +diff --git a/boost/container/detail/construct_in_place.hpp b/boost/container/detail/construct_in_place.hpp +index d824d814a..bfdf05c2e 100644 +--- a/boost/container/detail/construct_in_place.hpp ++++ b/boost/container/detail/construct_in_place.hpp +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + namespace boost { + namespace container { +@@ -62,9 +63,42 @@ BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, empla + + //Assignment + ++template ++BOOST_CONTAINER_FORCEINLINE ++ typename dtl::disable_if_c ++ < dtl::is_pair::type>::value ++ && dtl::is_pair::type>::value ++ , void>::type ++assign_in_place_ref(T &t, BOOST_FWD_REF(U) u) ++{ t = ::boost::forward(u); } ++ ++template ++BOOST_CONTAINER_FORCEINLINE ++ typename dtl::enable_if_c ++ < dtl::is_pair::type>::value ++ && dtl::is_pair::type>::value ++ , void>::type ++assign_in_place_ref(T &t, const U &u) ++{ ++ assign_in_place_ref(t.first, u.first); ++ assign_in_place_ref(t.second, u.second); ++} ++ ++template ++BOOST_CONTAINER_FORCEINLINE ++ typename dtl::enable_if_c ++ < dtl::is_pair::type>::value ++ && dtl::is_pair::type>::value ++ , void>::type ++assign_in_place_ref(T &t, BOOST_RV_REF(U) u) ++{ ++ assign_in_place_ref(t.first, ::boost::move(u.first)); ++ assign_in_place_ref(t.second, ::boost::move(u.second)); ++} ++ + template + BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, InpIt source) +-{ *dest = *source; } ++{ assign_in_place_ref(*dest, *source); } + + template + BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, value_init_construct_iterator) +diff --git a/boost/container/flat_map.hpp b/boost/container/flat_map.hpp +index b092fb212..e4843f566 100644 +--- a/boost/container/flat_map.hpp ++++ b/boost/container/flat_map.hpp +@@ -48,6 +48,11 @@ + #include + #endif + ++#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) ++#define BOOST_CONTAINER_STD_PAIR_IS_MOVABLE ++#endif ++ ++ + namespace boost { + namespace container { + +@@ -58,21 +63,37 @@ class flat_multimap; + + namespace dtl{ + ++#if defined(BOOST_CONTAINER_STD_PAIR_IS_MOVABLE) + template + BOOST_CONTAINER_FORCEINLINE static D &force(S &s) +-{ return *move_detail::force_ptr(&s); } ++{ return s; } + + template + BOOST_CONTAINER_FORCEINLINE static const D &force(const S &s) +-{ return *move_detail::force_ptr(&s); } ++{ return s; } ++ ++template ++BOOST_CONTAINER_FORCEINLINE static D force_copy(D s) ++{ return s; } ++ ++#else //!BOOST_CONTAINER_DOXYGEN_INVOKED ++ ++template ++BOOST_CONTAINER_FORCEINLINE static D &force(S &s) ++{ return *move_detail::launder_cast(&s); } ++ ++template ++BOOST_CONTAINER_FORCEINLINE static const D &force(const S &s) ++{ return *move_detail::launder_cast(&s); } + + template + BOOST_CONTAINER_FORCEINLINE static D force_copy(const S &s) + { +- const D *const vp = move_detail::force_ptr(&s); ++ const D *const vp = move_detail::launder_cast(&s); + D ret_val(*vp); + return ret_val; + } ++#endif //BOOST_CONTAINER_DOXYGEN_INVOKED + + } //namespace dtl{ + +@@ -118,18 +139,27 @@ class flat_map + private: + BOOST_COPYABLE_AND_MOVABLE(flat_map) + //This is the tree that we should store if pair was movable ++ typedef std::pair std_pair_t; + typedef dtl::flat_tree< +- std::pair, ++ std_pair_t, + dtl::select1st, + Compare, + AllocatorOrContainer> tree_t; + + //This is the real tree stored here. It's based on a movable pair ++ typedef dtl::pair dtl_pair_t; ++ ++ #ifdef BOOST_CONTAINER_STD_PAIR_IS_MOVABLE ++ typedef std_pair_t impl_pair_t; ++ #else ++ typedef dtl_pair_t impl_pair_t; ++ #endif ++ + typedef dtl::flat_tree< +- dtl::pair, ++ impl_pair_t, + dtl::select1st, + Compare, +- typename dtl::container_or_allocator_rebind >::type ++ typename dtl::container_or_allocator_rebind::type + > impl_tree_t; + impl_tree_t m_flat_tree; // flat tree representing flat_map + +@@ -851,7 +881,7 @@ class flat_map + //! @copydoc ::boost::container::flat_set::nth(size_type) const + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline + const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW +- { return dtl::force_copy(m_flat_tree.nth(n)); } ++ { return dtl::force_copy(m_flat_tree.nth(n)); } + + //! @copydoc ::boost::container::flat_set::index_of(iterator) + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline +@@ -1099,7 +1129,7 @@ class flat_map + template + inline BOOST_CONTAINER_DOC1ST + ( std::pair +- , typename dtl::enable_if_c::value ++ , typename dtl::enable_if_c::value + BOOST_MOVE_I std::pair >::type) + insert(BOOST_FWD_REF(Pair) x) + { +@@ -1153,7 +1183,7 @@ class flat_map + template + inline BOOST_CONTAINER_DOC1ST + ( iterator +- , typename dtl::enable_if_c::value ++ , typename dtl::enable_if_c::value + BOOST_MOVE_I iterator>::type) + insert(const_iterator p, BOOST_FWD_REF(Pair) x) + { +@@ -1777,17 +1807,24 @@ class flat_multimap + #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + private: + BOOST_COPYABLE_AND_MOVABLE(flat_multimap) ++ typedef std::pair std_pair_t; + typedef dtl::flat_tree< +- std::pair, ++ std_pair_t, + dtl::select1st, + Compare, + AllocatorOrContainer> tree_t; + //This is the real tree stored here. It's based on a movable pair ++ typedef dtl::pair dtl_pair_t; ++ #ifdef BOOST_CONTAINER_STD_PAIR_IS_MOVABLE ++ typedef std_pair_t impl_pair_t; ++ #else ++ typedef dtl_pair_t impl_pair_t; ++ #endif + typedef dtl::flat_tree< +- dtl::pair, ++ impl_pair_t, + dtl::select1st, + Compare, +- typename dtl::container_or_allocator_rebind >::type ++ typename dtl::container_or_allocator_rebind::type + > impl_tree_t; + impl_tree_t m_flat_tree; // flat tree representing flat_map + +@@ -2388,7 +2425,7 @@ class flat_multimap + //! @copydoc ::boost::container::flat_set::nth(size_type) const + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline + const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW +- { return dtl::force_copy(m_flat_tree.nth(n)); } ++ { return dtl::force_copy(m_flat_tree.nth(n)); } + + //! @copydoc ::boost::container::flat_set::index_of(iterator) + BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline +@@ -2477,7 +2514,7 @@ class flat_multimap + template + inline BOOST_CONTAINER_DOC1ST + ( iterator +- , typename dtl::enable_if_c::value ++ , typename dtl::enable_if_c::value + BOOST_MOVE_I iterator >::type) + insert(BOOST_FWD_REF(Pair) x) + { return dtl::force_copy(m_flat_tree.emplace_equal(boost::forward(x))); } +@@ -2514,7 +2551,7 @@ class flat_multimap + template + inline BOOST_CONTAINER_DOC1ST + ( iterator +- , typename dtl::enable_if_c::value ++ , typename dtl::enable_if_c::value + BOOST_MOVE_I iterator>::type) + insert(const_iterator p, BOOST_FWD_REF(Pair) x) + { +-- +2.31.1 + diff --git a/recipes/boost/all/rebuild-dependencies.py b/recipes/boost/all/rebuild-dependencies.py index 8bbfc5c8280fa..d9f286b2135d6 100755 --- a/recipes/boost/all/rebuild-dependencies.py +++ b/recipes/boost/all/rebuild-dependencies.py @@ -25,6 +25,7 @@ # `conanfile.py` and re-run this script. CONFIGURE_OPTIONS = ( "atomic", + "charconv", "chrono", "cobalt", "container", diff --git a/recipes/boost/all/test_package/CMakeLists.txt b/recipes/boost/all/test_package/CMakeLists.txt index 5311cfc4c17e7..07afcb4019d69 100644 --- a/recipes/boost/all/test_package/CMakeLists.txt +++ b/recipes/boost/all/test_package/CMakeLists.txt @@ -34,6 +34,7 @@ if(NOT HEADER_ONLY) find_package(Boost COMPONENTS unit_test_framework REQUIRED) add_executable(test_exe test.cpp) target_link_libraries(test_exe PRIVATE Boost::unit_test_framework) + set_property(TARGET test_exe PROPERTY CXX_STANDARD 11) add_test(NAME boost_test COMMAND test_exe) endif() @@ -41,6 +42,7 @@ if(NOT HEADER_ONLY) find_package(Boost COMPONENTS coroutine REQUIRED) add_executable(coroutine_exe coroutine.cpp) target_link_libraries(coroutine_exe PRIVATE Boost::coroutine) + set_property(TARGET coroutine_exe PROPERTY CXX_STANDARD 11) add_test(NAME coroutine_test COMMAND coroutine_exe) endif() diff --git a/recipes/boost/config.yml b/recipes/boost/config.yml index 0b6963fec8f23..2cac249885115 100644 --- a/recipes/boost/config.yml +++ b/recipes/boost/config.yml @@ -1,4 +1,8 @@ versions: + "1.86.0": + folder: all + "1.85.0": + folder: all "1.84.0": folder: all "1.83.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 d211b39ca041f..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, } @@ -193,7 +197,7 @@ def validate(self): minimum_version = self._compilers_minimum_version.get(compiler_name, 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." + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support (minimum {compiler_name} {minimum_version})." ) if not minimum_version: self.output.warning(f"{self.name} recipe lacks information about the {compiler_name} compiler support.") @@ -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)) @@ -457,7 +475,7 @@ def _configure_cmd(self): ' --extra-cxxflags="{cxxflags}"' ' --cc={compiler}' ' --cpu={cpu}' - ' --prefix={prefix}' + ' --prefix="{prefix}"' ' --os={os}' ' {build_flags}').format( python_call=call_python, @@ -516,6 +534,8 @@ def _is_glibc_older_than_2_25_on_linux(self): # https://github.com/conan-io/conan-center-index/pull/18079#issuecomment-1919206949 # https://github.com/conan-io/conan-center-index/pull/18079#issuecomment-1919486839 + if self.settings.os != 'Linux': + return False libver = platform.libc_ver() return ( self.settings.os == 'Linux' and 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 ae09ce435deda..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.52.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") - 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": - try: - del self.options.fPIC - except Exception: - pass - - def configure(self): - if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass - - 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/conanfile.py b/recipes/box2d/2.4.x/test_package/conanfile.py deleted file mode 100644 index d1ce1a2cbc477..0000000000000 --- a/recipes/box2d/2.4.x/test_package/conanfile.py +++ /dev/null @@ -1,26 +0,0 @@ -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" - 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.bindirs[0], "test_package") - self.run(bin_path, env="conanrun") 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/conanfile.py b/recipes/box2d/2.4.x/test_v1_package/conanfile.py deleted file mode 100644 index 7513484720425..0000000000000 --- a/recipes/box2d/2.4.x/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -import os -from conans import ConanFile, CMake, tools - - -class Box2DTestConan(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.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) 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..28c5a38b19b94 100644 --- a/recipes/box2d/all/conandata.yml +++ b/recipes/box2d/all/conandata.yml @@ -1,4 +1,25 @@ sources: - "2.3.1": - url: "https://github.com/erincatto/Box2D/archive/v2.3.1.zip" - sha256: "8ddd947400c59bcf09774bd75787e6253098a0bd337f5c61dae38b91aea678cf" + "3.0.0": + url: "https://github.com/erincatto/box2d/archive/refs/tags/v3.0.0.tar.gz" + sha256: "64ad759006cd2377c99367f51fb36942b57f0e9ad690ed41548dd620e6f6c8b1" + "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: + "3.0.0": + - patch_file: "patches/3.0.0-0001-fix-cmake.patch" + patch_description: "fix installer" + patch_type: "conan" + - patch_file: "patches/3.0.0-0002-use-cci.patch" + patch_description: "use cci package" + patch_type: "conan" + "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..1f7923c5d4d0d 100644 --- a/recipes/box2d/all/conanfile.py +++ b/recipes/box2d/all/conanfile.py @@ -1,68 +1,116 @@ import os -from conan import ConanFile, tools -from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, rm, rmdir, copy +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.microsoft import is_msvc +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 + } + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "8", + "msvc": "193", + "Visual Studio": "17", + } + + 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") + if Version(self.version) >= "3.0.0": + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") def layout(self): - cmake_layout(self, src_folder="Box2D") + cmake_layout(self, src_folder="src") + + def requirements(self): + if Version(self.version) >= "3.0.0": + self.requires("simde/0.8.2") + + def validate(self): + if Version(self.version) < "3.0.0": + return + + 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 C17, which your compiler does not support." + ) + + def build_requirements(self): + if Version(self.version) >= "3.0.0": + self.tool_requires("cmake/[>=3.22 <4]") 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" + if Version(self.version) < "3.0.0": + tc.variables["BOX2D_BUILD_TESTBED"] = False + tc.variables["BOX2D_BUILD_UNIT_TESTS"] = False + else: + tc.variables["BOX2D_SAMPLES"] = False + tc.variables["BOX2D_VALIDATE"] = False + tc.variables["BOX2D_UNIT_TESTS"] = False tc.generate() + if Version(self.version) >= "3.0.0": + deps = CMakeDeps(self) + deps.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) >= "3.0.0" and is_msvc(self) and self.options.shared: + self.cpp_info.defines.append("BOX2D_DLL") + elif 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/patches/3.0.0-0001-fix-cmake.patch b/recipes/box2d/all/patches/3.0.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..156dff0943ae2 --- /dev/null +++ b/recipes/box2d/all/patches/3.0.0-0001-fix-cmake.patch @@ -0,0 +1,17 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 5078d14..7ec17bc 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -180,4 +180,11 @@ endif() + source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "src" FILES ${BOX2D_SOURCE_FILES}) + source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}/../include" PREFIX "include" FILES ${BOX2D_API_FILES}) + +-install(TARGETS box2d) ++include(GNUInstallDirs) ++ ++install(TARGETS box2d ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++) ++install(FILES ${BOX2D_API_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/box2d) diff --git a/recipes/box2d/all/patches/3.0.0-0002-use-cci.patch b/recipes/box2d/all/patches/3.0.0-0002-use-cci.patch new file mode 100644 index 0000000000000..b9d850f931bb8 --- /dev/null +++ b/recipes/box2d/all/patches/3.0.0-0002-use-cci.patch @@ -0,0 +1,76 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8c1390e..d6590d7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,7 +53,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) + set(CMAKE_VERBOSE_MAKEFILE ON) + + # The Box2D library uses simde https://github.com/simd-everywhere/simde +-add_subdirectory(extern/simde) ++# add_subdirectory(extern/simde) + add_subdirectory(src) + + # This hides samples, test, and doxygen from apps that use box2d via FetchContent +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 5078d14..7ec17bc 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -78,7 +78,7 @@ add_library(box2d ${BOX2D_SOURCE_FILES} ${BOX2D_API_FILES}) + # turned this off to make Box2D easier to use without cmake + # include(GenerateExportHeader) + # generate_export_header(box2d) +- ++find_package(simde REQUIRED CONFIG) + target_include_directories(box2d + PUBLIC + $ +@@ -89,7 +89,7 @@ target_include_directories(box2d + ) + + # SIMDE is used to support SIMD math on multiple platforms +-target_link_libraries(box2d PRIVATE simde) ++target_link_libraries(box2d PRIVATE simde::simde) + + # Box2D uses C17 + set_target_properties(box2d PROPERTIES +diff --git a/src/contact_solver.c b/src/contact_solver.c +index b190501..c61e250 100644 +--- a/src/contact_solver.c ++++ b/src/contact_solver.c +@@ -9,8 +9,8 @@ + #include "core.h" + #include "solver_set.h" + #include "world.h" +-#include "x86/avx2.h" +-#include "x86/fma.h" ++#include "simde/x86/avx2.h" ++#include "simde/x86/fma.h" + + // Soft contact constraints with sub-stepping support + // http://mmacklin.com/smallsteps.pdf +diff --git a/src/contact_solver.h b/src/contact_solver.h +index e265e93..dcdc1fb 100644 +--- a/src/contact_solver.h ++++ b/src/contact_solver.h +@@ -4,7 +4,7 @@ + #pragma once + + #include "solver.h" +-#include "x86/avx.h" ++#include "simde/x86/avx.h" + + typedef struct b2ContactSim b2ContactSim; + +diff --git a/src/solver.c b/src/solver.c +index d83a471..a115417 100644 +--- a/src/solver.c ++++ b/src/solver.c +@@ -17,7 +17,7 @@ + #include "world.h" + + // for mm_pause +-#include "x86/sse2.h" ++#include "simde/x86/sse2.h" + + #include + #include diff --git a/recipes/box2d/all/test_package/CMakeLists.txt b/recipes/box2d/all/test_package/CMakeLists.txt index 22c1118333f4f..4648d77c658ec 100644 --- a/recipes/box2d/all/test_package/CMakeLists.txt +++ b/recipes/box2d/all/test_package/CMakeLists.txt @@ -1,7 +1,13 @@ -cmake_minimum_required(VERSION 3.4) -project(test_package) +cmake_minimum_required(VERSION 3.21) +project(test_package LANGUAGES C CXX) -find_package(box2d) +find_package(box2d REQUIRED CONFIG) -add_executable(test_package test_package.cpp) -target_link_libraries(test_package box2d::box2d) +if(box2d_VERSION VERSION_LESS "3.0.0") + add_executable(${PROJECT_NAME} test_package.cpp) + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +else() + add_executable(${PROJECT_NAME} test_package3.c) + target_compile_features(${PROJECT_NAME} PRIVATE c_std_17) +endif() +target_link_libraries(${PROJECT_NAME} PRIVATE box2d::box2d) diff --git a/recipes/box2d/all/test_package/conanfile.py b/recipes/box2d/all/test_package/conanfile.py index a3a0294a68898..3526395bd33d5 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 - +from conan.tools.scm import Version class Box2DTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" def layout(self): cmake_layout(self) @@ -13,12 +15,15 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) + 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 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_package/test_package3.c b/recipes/box2d/all/test_package/test_package3.c new file mode 100644 index 0000000000000..abad79d1a39be --- /dev/null +++ b/recipes/box2d/all/test_package/test_package3.c @@ -0,0 +1,13 @@ +#include "box2d/box2d.h" + +int main() { + b2WorldDef worldDef = b2DefaultWorldDef(); + + worldDef.gravity = (b2Vec2){0.0f, -10.0f}; + b2WorldId worldId = b2CreateWorld(&worldDef); + + b2BodyDef groundBodyDef = b2DefaultBodyDef(); + groundBodyDef.position = (b2Vec2){0.0f, -10.0f}; + + 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/all/test_v1_package/conanfile.py b/recipes/box2d/all/test_v1_package/conanfile.py deleted file mode 100644 index 133228fb54665..0000000000000 --- a/recipes/box2d/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -import os -from conans import ConanFile, CMake, tools - - -class Box2DTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" - - def build(self): - cmake = CMake(self) - cmake.configure() - 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) diff --git a/recipes/box2d/config.yml b/recipes/box2d/config.yml index 1922ed59d887d..476a7f5aa4a7c 100644 --- a/recipes/box2d/config.yml +++ b/recipes/box2d/config.yml @@ -1,7 +1,9 @@ versions: - "2.3.1": + "3.0.0": + folder: "all" + "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/bredis/all/conandata.yml b/recipes/bredis/all/conandata.yml new file mode 100644 index 0000000000000..b75947b37ddc5 --- /dev/null +++ b/recipes/bredis/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.12": + url: "https://github.com/basiliscos/cpp-bredis/archive/refs/tags/v0.12.tar.gz" + sha256: "c5a6aa58835d5ef8cd97c4ae7e677f6237ef4ee01ae4a609293e2351c01db6cc" diff --git a/recipes/bredis/all/conanfile.py b/recipes/bredis/all/conanfile.py new file mode 100644 index 0000000000000..c73f99338488a --- /dev/null +++ b/recipes/bredis/all/conanfile.py @@ -0,0 +1,57 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.52.0" + +class BredisConan(ConanFile): + name = "bredis" + description = "Boost::ASIO low-level redis client (connector)" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/basiliscos/cpp-bredis" + topics = ("redis", "network", "asio", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("boost/1.85.0") + + 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 package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + copy( + self, + pattern="*.ipp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/bredis/all/test_package/CMakeLists.txt b/recipes/bredis/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..ede594d5b149f --- /dev/null +++ b/recipes/bredis/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(bredis REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE bredis::bredis) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/bredis/all/test_package/conanfile.py b/recipes/bredis/all/test_package/conanfile.py new file mode 100644 index 0000000000000..b9d7f11e89dcd --- /dev/null +++ b/recipes/bredis/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 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/bredis/all/test_package/test_package.cpp b/recipes/bredis/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..9a85a98f4bd7f --- /dev/null +++ b/recipes/bredis/all/test_package/test_package.cpp @@ -0,0 +1,12 @@ +#include +#include + +#include "bredis/Connection.hpp" +#include "bredis/MarkerHelpers.hpp" + +int main(int argc, const char **argv) { + // Basic test avoiding any kind of access to network layer + bredis::bredis_category category; + std::cout << category.name() << '\n'; + return 0; +} diff --git a/recipes/bredis/config.yml b/recipes/bredis/config.yml new file mode 100644 index 0000000000000..f30ab3fc58bb9 --- /dev/null +++ b/recipes/bredis/config.yml @@ -0,0 +1,3 @@ +versions: + "0.12": + folder: all diff --git a/recipes/bvdberg-ctest/all/conandata.yml b/recipes/bvdberg-ctest/all/conandata.yml index c756f17b12c18..31bd2b82ba362 100644 --- a/recipes/bvdberg-ctest/all/conandata.yml +++ b/recipes/bvdberg-ctest/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/bvdberg/ctest/archive/1.1.0.tar.gz" + sha256: "6792d7a21f62ec9caa64fc5106c8c8eed9201f1d98571917d370d0b5af721f49" "1.0.0": - sha256: 80c5899f529dc57c1eb44113fe452cd90fd69cd1ab3a0431635282f56837205c - url: https://github.com/bvdberg/ctest/archive/1.0.0.tar.gz + url: "https://github.com/bvdberg/ctest/archive/1.0.0.tar.gz" + sha256: "80c5899f529dc57c1eb44113fe452cd90fd69cd1ab3a0431635282f56837205c" diff --git a/recipes/bvdberg-ctest/all/conanfile.py b/recipes/bvdberg-ctest/all/conanfile.py index 7786a8fb5c6c8..28b74d733c02a 100644 --- a/recipes/bvdberg-ctest/all/conanfile.py +++ b/recipes/bvdberg-ctest/all/conanfile.py @@ -6,14 +6,13 @@ required_conan_version = ">=1.50.0" - class BvdbergCtestConan(ConanFile): name = "bvdberg-ctest" + description = "ctest is a unit test framework for software written in C." license = "Apache-2.0" - homepage = "https://github.com/bvdberg/ctest" url = "https://github.com/conan-io/conan-center-index" - description = "ctest is a unit test framework for software written in C." - topics = ("testing", "testing-framework", "unit-testing") + homepage = "https://github.com/bvdberg/ctest" + topics = ("testing", "testing-framework", "unit-testing", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -26,14 +25,11 @@ def package_id(self): def validate(self): if self.settings.os == "Windows": - raise ConanInvalidConfiguration("Windows not supported") + raise ConanInvalidConfiguration(f"{self.ref} does not support Windows.") 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/bvdberg-ctest/all/test_package/conanfile.py b/recipes/bvdberg-ctest/all/test_package/conanfile.py index d120a992c06a6..8a5bb47f50c4c 100644 --- a/recipes/bvdberg-ctest/all/test_package/conanfile.py +++ b/recipes/bvdberg-ctest/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/bvdberg-ctest/all/test_v1_package/CMakeLists.txt b/recipes/bvdberg-ctest/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index fd0d83ce8ad41..0000000000000 --- a/recipes/bvdberg-ctest/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES C) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(bvdberg-ctest REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE bvdberg-ctest::bvdberg-ctest) diff --git a/recipes/bvdberg-ctest/all/test_v1_package/conanfile.py b/recipes/bvdberg-ctest/all/test_v1_package/conanfile.py deleted file mode 100644 index f2243371b7f1d..0000000000000 --- a/recipes/bvdberg-ctest/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -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") - bin_path = self.run(bin_path, run_environment=True) diff --git a/recipes/bvdberg-ctest/config.yml b/recipes/bvdberg-ctest/config.yml index c7f13630776fb..fcbfca5b9011e 100644 --- a/recipes/bvdberg-ctest/config.yml +++ b/recipes/bvdberg-ctest/config.yml @@ -1,3 +1,5 @@ versions: + "1.1.0": + folder: "all" "1.0.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 3a07eb4a811b8..a67dccf1e1ee5 100644 --- a/recipes/c-ares/all/conandata.yml +++ b/recipes/c-ares/all/conandata.yml @@ -1,4 +1,25 @@ 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" + "1.30.0": + url: "https://github.com/c-ares/c-ares/releases/download/v1.30.0/c-ares-1.30.0.tar.gz" + sha256: "4fea312112021bcef081203b1ea020109842feb58cd8a36a3d3f7e0d8bc1138c" "1.28.1": url: "https://github.com/c-ares/c-ares/releases/download/cares-1_28_1/c-ares-1.28.1.tar.gz" sha256: "675a69fc54ddbf42e6830bc671eeb6cd89eeca43828eb413243fd2c0a760809d" @@ -8,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 48b02d5029162..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 @@ -10,12 +10,11 @@ class CAresConan(ConanFile): name = "c-ares" + description = "A C library for asynchronous DNS requests" license = "MIT" url = "https://github.com/conan-io/conan-center-index" - description = "A C library for asynchronous DNS requests" - topics = ("dns", "resolver", "async") homepage = "https://c-ares.haxx.se/" - + topics = ("dns", "resolver", "async") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -29,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 @@ -55,6 +57,7 @@ def generate(self): tc.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() @@ -83,8 +86,7 @@ def package_info(self): self.cpp_info.components["cares"].system_libs.append("pthread") elif self.settings.os == "Windows": self.cpp_info.components["cares"].system_libs.extend(["ws2_32", "advapi32"]) - if Version(self.version) >= "1.18.0": - self.cpp_info.components["cares"].system_libs.append("iphlpapi") + self.cpp_info.components["cares"].system_libs.append("iphlpapi") elif is_apple_os(self): self.cpp_info.components["cares"].system_libs.append("resolv") 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/all/test_package/test_package.c b/recipes/c-ares/all/test_package/test_package.c index 0023e9dae2282..0636b1f4dce35 100644 --- a/recipes/c-ares/all/test_package/test_package.c +++ b/recipes/c-ares/all/test_package/test_package.c @@ -103,7 +103,6 @@ main(void) return 1; } - ares_gethostbyname(channel, "google.com", AF_INET, callback, NULL); wait_ares(channel); ares_destroy(channel); ares_library_cleanup(); diff --git a/recipes/c-ares/config.yml b/recipes/c-ares/config.yml index 78e892e1326a4..16fb0dfe22209 100644 --- a/recipes/c-ares/config.yml +++ b/recipes/c-ares/config.yml @@ -1,23 +1,25 @@ versions: - "1.28.1": + "1.33.1": folder: all - "1.27.0": + "1.33.0": folder: all - "1.26.0": + "1.32.3": folder: all - "1.25.0": + "1.32.2": folder: all - "1.22.1": + "1.32.1": folder: all - "1.22.0": + "1.31.0": folder: all - "1.21.0": + "1.30.0": folder: all - "1.20.1": + "1.28.1": folder: all - "1.19.1": + "1.27.0": folder: all - "1.19.0": + "1.26.0": folder: all - "1.18.1": + "1.25.0": + folder: all + "1.19.1": folder: all diff --git a/recipes/c-blosc2/all/conandata.yml b/recipes/c-blosc2/all/conandata.yml index 6975b1d26667a..5b441b6002794 100644 --- a/recipes/c-blosc2/all/conandata.yml +++ b/recipes/c-blosc2/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.15.0": + url: "https://github.com/Blosc/c-blosc2/archive/v2.15.0.tar.gz" + sha256: "1e7d9d099963ad0123ddd76b2b715b5aa1ea4b95c491d3a11508e487ebab7307" + "2.14.4": + url: "https://github.com/Blosc/c-blosc2/archive/v2.14.4.tar.gz" + sha256: "b5533c79aacc9ac152c80760ed1295a6608938780c3e1eecd7e53ea72ad986b0" "2.13.1": url: "https://github.com/Blosc/c-blosc2/archive/v2.13.1.tar.gz" sha256: "6e7f5940269acd54d8dfe87c2102a442ad0407b1a62266a6f916134bae234399" @@ -14,38 +20,32 @@ sources: "2.10.5": url: "https://github.com/Blosc/c-blosc2/archive/v2.10.5.tar.gz" sha256: "a88f94bf839c1371aab8207a6a43698ceb92c72f65d0d7fe5b6e59f24c138b4d" - "2.8.0": - url: "https://github.com/Blosc/c-blosc2/archive/v2.8.0.tar.gz" - sha256: "be608cdf68deb02e0d3ee62e183942a0fe5d5d3185375b9b6566e2ae35a9bdbd" - "2.6.1": - url: "https://github.com/Blosc/c-blosc2/archive/v2.6.1.tar.gz" - sha256: "514a793368093893c1a7cae030f7e31faca7f86465ae69dd576f256d8bf28c08" patches: + "2.15.0": + - patch_file: "patches/2.10.5-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" + "2.14.4": + - patch_file: "patches/2.10.5-0001-fix-cmake.patch" + patch_description: "use cci package" + patch_type: "conan" "2.13.1": - - patch_file: "patches/2.11.1-0001-fix-cmake.patch" + - patch_file: "patches/2.10.5-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" "2.13.0": - - patch_file: "patches/2.11.1-0001-fix-cmake.patch" + - patch_file: "patches/2.10.5-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" "2.12.0": - - patch_file: "patches/2.11.1-0001-fix-cmake.patch" + - patch_file: "patches/2.10.5-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" "2.11.3": - - patch_file: "patches/2.11.1-0001-fix-cmake.patch" + - patch_file: "patches/2.10.5-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" "2.10.5": - patch_file: "patches/2.10.5-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" - "2.8.0": - - patch_file: "patches/2.8.0-0001-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" - "2.6.1": - - patch_file: "patches/2.6.0-0001-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" diff --git a/recipes/c-blosc2/all/conanfile.py b/recipes/c-blosc2/all/conanfile.py index 33223628423bf..f3c1a5b0b470f 100644 --- a/recipes/c-blosc2/all/conanfile.py +++ b/recipes/c-blosc2/all/conanfile.py @@ -2,7 +2,7 @@ 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 export_conandata_patches, apply_conandata_patches, get, copy, rm, rmdir +from conan.tools.files import get, copy, rm, rmdir, export_conandata_patches, apply_conandata_patches from conan.tools.microsoft import is_msvc from conan.tools.scm import Version @@ -114,6 +114,13 @@ def generate(self): tc.generate() deps = CMakeDeps(self) + if self.options.with_lz4: + deps.set_property("lz4", "cmake_file_name", "LZ4") + if self.options.with_zlib =="zlib-ng": + deps.set_property("zlib-ng", "cmake_file_name", "ZLIB_NG") + deps.set_property("zlib-ng", "cmake_target_name", "ZLIB_NG::ZLIB_NG") + if self.options.with_zstd: + deps.set_property("zstd", "cmake_file_name", "ZSTD") deps.generate() def _patch_sources(self): diff --git a/recipes/c-blosc2/all/patches/2.10.5-0001-fix-cmake.patch b/recipes/c-blosc2/all/patches/2.10.5-0001-fix-cmake.patch index 743a69c503d24..7b59364e4a949 100644 --- a/recipes/c-blosc2/all/patches/2.10.5-0001-fix-cmake.patch +++ b/recipes/c-blosc2/all/patches/2.10.5-0001-fix-cmake.patch @@ -1,138 +1,54 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 19e203a..aa6ccdd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -167,26 +167,26 @@ else() - endif() - - if(PREFER_EXTERNAL_LZ4) -- find_package(LZ4) -+ find_package(lz4) - else() - message(STATUS "Using LZ4 internal sources.") - endif() - - if(NOT DEACTIVATE_ZLIB) - if(PREFER_EXTERNAL_ZLIB) -- find_package(ZLIB_NG) -- if(ZLIB_NG_FOUND) -+ find_package(zlib-ng) -+ if(zlib-ng_FOUND) - set(HAVE_ZLIB_NG TRUE) - else() - find_package(ZLIB) - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(NOT (zlib-ng_FOUND OR ZLIB_FOUND)) - message(STATUS "No ZLIB found. Using ZLIB-NG internal sources.") - endif() - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(0) - message(STATUS "Using ZLIB-NG internal sources for ZLIB support.") - set(HAVE_ZLIB_NG TRUE) - add_definitions(-DZLIB_COMPAT) -@@ -207,8 +207,8 @@ endif() - - if(NOT DEACTIVATE_ZSTD) - if(PREFER_EXTERNAL_ZSTD) -- find_package(ZSTD) -- if(NOT ZSTD_FOUND) -+ find_package(zstd) -+ if(NOT zstd_FOUND) - message(STATUS "No ZSTD library found. Using internal sources.") - endif() - else() diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt index 8c7cf90..f7efbf5 100644 --- a/blosc/CMakeLists.txt +++ b/blosc/CMakeLists.txt -@@ -79,15 +79,15 @@ set(INTERNAL_LIBS ${PROJECT_SOURCE_DIR}/internal-complibs) +@@ -79,8 +79,8 @@ set(INTERNAL_LIBS ${PROJECT_SOURCE_DIR}/internal-complibs) # link dependencies # "link" dependent targets via target_link_libraries (preferred) and # manually add includes / libs for others -if(LZ4_FOUND) +if(lz4_FOUND) if(BUILD_SHARED) -- target_include_directories(blosc2_shared PUBLIC ${LZ4_INCLUDE_DIR}) -+ target_include_directories(blosc2_shared PUBLIC ${lz4_INCLUDE_DIR}) + target_include_directories(blosc2_shared PUBLIC ${LZ4_INCLUDE_DIR}) endif() if(BUILD_STATIC) -- target_include_directories(blosc2_static PUBLIC ${LZ4_INCLUDE_DIR}) -+ target_include_directories(blosc2_static PUBLIC ${lz4_INCLUDE_DIR}) - endif() - if(BUILD_TESTS) -- target_include_directories(blosc_testing PUBLIC ${LZ4_INCLUDE_DIR}) -+ target_include_directories(blosc_testing PUBLIC ${lz4_INCLUDE_DIR}) - endif() - else() - set(LZ4_LOCAL_DIR ${INTERNAL_LIBS}/lz4-1.9.4) -@@ -138,18 +138,18 @@ if(NOT DEACTIVATE_ZLIB) +@@ -138,8 +138,8 @@ if(NOT DEACTIVATE_ZLIB) endif() - + if(NOT DEACTIVATE_ZSTD) - if(ZSTD_FOUND) + if(zstd_FOUND) if(BUILD_SHARED) -- target_include_directories(blosc2_shared PUBLIC ${ZSTD_INCLUDE_DIR}) -- target_link_libraries(blosc2_shared PUBLIC ${ZSTD_LIBRARY}) -+ target_include_directories(blosc2_shared PUBLIC ${zstd_INCLUDE_DIR}) -+ target_link_libraries(blosc2_shared PUBLIC ${zstd_LIBRARY}) - endif() - if(BUILD_STATIC) - target_include_directories(blosc2_static PUBLIC ${ZSTD_INCLUDE_DIR}) -- target_link_libraries(blosc2_static PUBLIC ${ZSTD_LIBRARY}) -+ target_link_libraries(blosc2_static PUBLIC ${zstd_LIBRARY}) + target_include_directories(blosc2_shared PUBLIC ${ZSTD_INCLUDE_DIR}) + target_link_libraries(blosc2_shared PUBLIC ${ZSTD_LIBRARY}) endif() - if(BUILD_TESTS) -- target_include_directories(blosc_testing PUBLIC ${ZSTD_INCLUDE_DIR}) -- target_link_libraries(blosc_testing PUBLIC ${ZSTD_LIBRARY}) -+ target_include_directories(blosc_testing PUBLIC ${zstd_INCLUDE_DIR}) -+ target_link_libraries(blosc_testing PUBLIC ${zstd_LIBRARY}) - endif() - else() - set(ZSTD_LOCAL_DIR ${INTERNAL_LIBS}/zstd-1.5.5) @@ -184,8 +184,8 @@ if(NOT WIN32) set(LIBS ${LIBS} ${CMAKE_DL_LIBS}) endif() - + -if(LZ4_FOUND) -- set(LIBS ${LIBS} ${LZ4_LIBRARY}) +if(lz4_FOUND) -+ set(LIBS ${LIBS} ${lz4_LIBRARIES}) + set(LIBS ${LIBS} ${LZ4_LIBRARY}) else() file(GLOB LZ4_FILES ${LZ4_LOCAL_DIR}/*.c) list(APPEND SOURCES ${LZ4_FILES}) @@ -193,8 +193,8 @@ else() endif() - + if(NOT DEACTIVATE_ZLIB) - if(ZLIB_NG_FOUND) -- set(LIBS ${LIBS} ${ZLIB_NG_LIBRARY}) + if(zlib-ng_FOUND) -+ set(LIBS ${LIBS} ${zlib-ng_LIBRARIES}) + set(LIBS ${LIBS} ${ZLIB_NG_LIBRARY}) elseif(ZLIB_FOUND) set(LIBS ${LIBS} ${ZLIB_LIBRARIES}) else() @@ -206,8 +206,8 @@ if(NOT DEACTIVATE_ZLIB) endif() - + if(NOT DEACTIVATE_ZSTD) - if(ZSTD_FOUND) -- set(LIBS ${LIBS} ${ZSTD_LIBRARY}) + if(zstd_FOUND) -+ set(LIBS ${LIBS} ${zstd_LIBRARIES}) + set(LIBS ${LIBS} ${ZSTD_LIBRARY}) else() # Enable assembly code only when not using MSVC *and* x86 is there if((NOT MSVC) AND COMPILER_SUPPORT_SSE2) # if SSE2 is here, this is an x86 platform -@@ -262,7 +262,7 @@ list(APPEND SOURCES - blosc/directories.c - blosc/blosc2-stdio.c - blosc/b2nd.c -- blosc/b2nd_utils.c -+ blosc/b2nd_utils.c - ) - if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL arm64) - if(COMPILER_SUPPORT_SSE2) diff --git a/recipes/c-blosc2/all/patches/2.11.1-0001-fix-cmake.patch b/recipes/c-blosc2/all/patches/2.11.1-0001-fix-cmake.patch deleted file mode 100644 index 5a88b5696c4af..0000000000000 --- a/recipes/c-blosc2/all/patches/2.11.1-0001-fix-cmake.patch +++ /dev/null @@ -1,124 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index bff2f36..581f189 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -171,26 +171,26 @@ else() - endif() - - if(PREFER_EXTERNAL_LZ4) -- find_package(LZ4) -+ find_package(lz4) - else() - message(STATUS "Using LZ4 internal sources.") - endif() - - if(NOT DEACTIVATE_ZLIB) - if(PREFER_EXTERNAL_ZLIB) -- find_package(ZLIB_NG) -- if(ZLIB_NG_FOUND) -+ find_package(zlib-ng) -+ if(zlib-ng_FOUND) - set(HAVE_ZLIB_NG TRUE) - else() - find_package(ZLIB) - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(NOT (zlib-ng_FOUND OR ZLIB_FOUND)) - message(STATUS "No ZLIB found. Using ZLIB-NG internal sources.") - endif() - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(0) - message(STATUS "Using ZLIB-NG internal sources for ZLIB support.") - set(HAVE_ZLIB_NG TRUE) - add_definitions(-DZLIB_COMPAT) -@@ -211,8 +211,8 @@ endif() - - if(NOT DEACTIVATE_ZSTD) - if(PREFER_EXTERNAL_ZSTD) -- find_package(ZSTD) -- if(NOT ZSTD_FOUND) -+ find_package(zstd) -+ if(NOT zstd_FOUND) - message(STATUS "No ZSTD library found. Using internal sources.") - endif() - else() -diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt -index bf8527d..d467346 100644 ---- a/blosc/CMakeLists.txt -+++ b/blosc/CMakeLists.txt -@@ -79,15 +79,15 @@ set(INTERNAL_LIBS ${PROJECT_SOURCE_DIR}/internal-complibs) - # link dependencies - # "link" dependent targets via target_link_libraries (preferred) and - # manually add includes / libs for others --if(LZ4_FOUND) -+if(lz4_FOUND) - if(BUILD_SHARED) -- target_include_directories(blosc2_shared PUBLIC ${LZ4_INCLUDE_DIR}) -+ target_include_directories(blosc2_shared PUBLIC ${lz4_INCLUDE_DIR}) - endif() - if(BUILD_STATIC) -- target_include_directories(blosc2_static PUBLIC ${LZ4_INCLUDE_DIR}) -+ target_include_directories(blosc2_static PUBLIC ${lz4_INCLUDE_DIR}) - endif() - if(BUILD_TESTS) -- target_include_directories(blosc_testing PUBLIC ${LZ4_INCLUDE_DIR}) -+ target_include_directories(blosc_testing PUBLIC ${lz4_INCLUDE_DIR}) - endif() - else() - set(LZ4_LOCAL_DIR ${INTERNAL_LIBS}/lz4-1.9.4) -@@ -138,14 +138,14 @@ if(NOT DEACTIVATE_ZLIB) - endif() - - if(NOT DEACTIVATE_ZSTD) -- if(ZSTD_FOUND) -+ if(zstd_FOUND) - if(BUILD_SHARED) -- target_include_directories(blosc2_shared PUBLIC ${ZSTD_INCLUDE_DIR}) -- target_link_libraries(blosc2_shared PUBLIC ${ZSTD_LIBRARY}) -+ target_include_directories(blosc2_shared PUBLIC ${zstd_INCLUDE_DIR}) -+ target_link_libraries(blosc2_shared PUBLIC ${zstd_LIBRARIES}) - endif() - if(BUILD_STATIC) -- target_include_directories(blosc2_static PUBLIC ${ZSTD_INCLUDE_DIR}) -- target_link_libraries(blosc2_static PUBLIC ${ZSTD_LIBRARY}) -+ target_include_directories(blosc2_static PUBLIC ${zstd_INCLUDE_DIR}) -+ target_link_libraries(blosc2_static PUBLIC ${zstd_LIBRARIES}) - endif() - if(BUILD_TESTS) - target_include_directories(blosc_testing PUBLIC ${ZSTD_INCLUDE_DIR}) -@@ -184,8 +184,8 @@ if(NOT WIN32) - set(LIBS ${LIBS} ${CMAKE_DL_LIBS}) - endif() - --if(LZ4_FOUND) -- set(LIBS ${LIBS} ${LZ4_LIBRARY}) -+if(lz4_FOUND) -+ set(LIBS ${LIBS} ${lz4_LIBRARIES}) - else() - file(GLOB LZ4_FILES ${LZ4_LOCAL_DIR}/*.c) - list(APPEND SOURCES ${LZ4_FILES}) -@@ -193,8 +193,8 @@ else() - endif() - - if(NOT DEACTIVATE_ZLIB) -- if(ZLIB_NG_FOUND) -- set(LIBS ${LIBS} ${ZLIB_NG_LIBRARY}) -+ if(zlib-ng_FOUND) -+ set(LIBS ${LIBS} ${zlib-ng_LIBRARIES}) - elseif(ZLIB_FOUND) - set(LIBS ${LIBS} ${ZLIB_LIBRARIES}) - else() -@@ -206,8 +206,8 @@ if(NOT DEACTIVATE_ZLIB) - endif() - - if(NOT DEACTIVATE_ZSTD) -- if(ZSTD_FOUND) -- set(LIBS ${LIBS} ${ZSTD_LIBRARY}) -+ if(zstd_FOUND) -+ set(LIBS ${LIBS} ${zstd_LIBRARIES}) - else() - # Enable assembly code only when not using MSVC *and* x86 is there - if((NOT MSVC) AND COMPILER_SUPPORT_SSE2) # if SSE2 is here, this is an x86 platform diff --git a/recipes/c-blosc2/all/patches/2.6.0-0001-fix-cmake.patch b/recipes/c-blosc2/all/patches/2.6.0-0001-fix-cmake.patch deleted file mode 100644 index 5c30c1a180c48..0000000000000 --- a/recipes/c-blosc2/all/patches/2.6.0-0001-fix-cmake.patch +++ /dev/null @@ -1,122 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 43910d1..199ef1d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -144,26 +144,26 @@ if(BUILD_LITE) - endif() - - if(PREFER_EXTERNAL_LZ4) -- find_package(LZ4) -+ find_package(lz4) - else() - message(STATUS "Using LZ4 internal sources.") - endif() - - if(NOT DEACTIVATE_ZLIB) - if(PREFER_EXTERNAL_ZLIB) -- find_package(ZLIB_NG) -- if(ZLIB_NG_FOUND) -- set(HAVE_ZLIB_NG TRUE) -+ find_package(zlib-ng) -+ if (zlib-ng_FOUND) -+ set(HAVE_ZLIB_NG TRUE) - else() - find_package(ZLIB) - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(NOT (zlib-ng_FOUND OR ZLIB_FOUND)) - message(STATUS "No ZLIB found. Using ZLIB-NG internal sources.") - endif() - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(0) - message(STATUS "Using ZLIB-NG internal sources for ZLIB support.") - set(HAVE_ZLIB_NG TRUE) - add_definitions(-DZLIB_COMPAT) -@@ -184,9 +184,9 @@ endif() - - if(NOT DEACTIVATE_ZSTD) - if(PREFER_EXTERNAL_ZSTD) -- find_package(ZSTD) -- if(NOT ZSTD_FOUND) -- message(STATUS "No ZSTD library found. Using internal sources.") -+ find_package(zstd) -+ if(NOT zstd_FOUND) -+ message(STATUS "No ZSTD library found. Using internal sources.") - endif() - else() - message(STATUS "Using ZSTD internal sources.") -diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt -index 441bab6..f17e467 100644 ---- a/blosc/CMakeLists.txt -+++ b/blosc/CMakeLists.txt -@@ -10,16 +10,16 @@ set(CMAKE_C_VISIBILITY_PRESET hidden) - - # includes - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}) --if(LZ4_FOUND) -- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${LZ4_INCLUDE_DIR}) -+if(lz4_FOUND) -+ set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${lz4_INCLUDE_DIR}) - else() - set(LZ4_LOCAL_DIR ${INTERNAL_LIBS}/lz4-1.9.4) - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${LZ4_LOCAL_DIR}) - endif() - - if(NOT DEACTIVATE_ZLIB) -- if(ZLIB_NG_FOUND) -- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZLIB_NG_INCLUDE_DIR}) -+ if(zlib-ng_FOUND) -+ set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${zlib-ng_INCLUDE_DIR}) - elseif(ZLIB_FOUND) - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}) - else() -@@ -29,8 +29,8 @@ if(NOT DEACTIVATE_ZLIB) - endif() - - if(NOT DEACTIVATE_ZSTD) -- if(ZSTD_FOUND) -- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZSTD_INCLUDE_DIR}) -+ if(zstd_FOUND) -+ set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${zstd_INCLUDE_DIR}) - else() - set(ZSTD_LOCAL_DIR ${INTERNAL_LIBS}/zstd-1.5.2) - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZSTD_LOCAL_DIR} -@@ -90,8 +90,8 @@ else() - endif() - endif() - --if(LZ4_FOUND) -- set(LIBS ${LIBS} ${LZ4_LIBRARY}) -+if(lz4_FOUND) -+ set(LIBS ${LIBS} ${lz4_LIBRARIES}) - else() - file(GLOB LZ4_FILES ${LZ4_LOCAL_DIR}/*.c) - set(SOURCES ${SOURCES} ${LZ4_FILES}) -@@ -99,10 +99,10 @@ else() - endif() - - if(NOT DEACTIVATE_ZLIB) -- if(ZLIB_NG_FOUND) -- set(LIBS ${LIBS} ${ZLIB_NG_LIBRARY}) -+ if(zlib-ng_FOUND) -+ set(LIBS ${LIBS} ${zlib-ng_LIBRARIES}) - elseif(ZLIB_FOUND) -- set(LIBS ${LIBS} ${ZLIB_LIBRARY}) -+ set(LIBS ${LIBS} ${ZLIB_LIBRARIES}) - else() - set(ZLIB_LOCAL_DIR ${INTERNAL_LIBS}/${ZLIB_NG_DIR}) - file(GLOB ZLIB_FILES ${ZLIB_LOCAL_DIR}/*.c) -@@ -112,8 +112,8 @@ if(NOT DEACTIVATE_ZLIB) - endif() - - if(NOT DEACTIVATE_ZSTD) -- if(ZSTD_FOUND) -- set(LIBS ${LIBS} ${ZSTD_LIBRARY}) -+ if(zstd_FOUND) -+ set(LIBS ${LIBS} ${zstd_LIBRARIES}) - else() - # Enable assembly code only when not using MSVC *and* x86 is there - if((NOT MSVC) AND COMPILER_SUPPORT_SSE2) # if SSE2 is here, this is an x86 platform diff --git a/recipes/c-blosc2/all/patches/2.8.0-0001-fix-cmake.patch b/recipes/c-blosc2/all/patches/2.8.0-0001-fix-cmake.patch deleted file mode 100644 index a0812cb90ffab..0000000000000 --- a/recipes/c-blosc2/all/patches/2.8.0-0001-fix-cmake.patch +++ /dev/null @@ -1,119 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index bb7882f..92ac61c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -152,26 +152,26 @@ if(BUILD_LITE) - endif() - - if(PREFER_EXTERNAL_LZ4) -- find_package(LZ4) -+ find_package(lz4) - else() - message(STATUS "Using LZ4 internal sources.") - endif() - - if(NOT DEACTIVATE_ZLIB) - if(PREFER_EXTERNAL_ZLIB) -- find_package(ZLIB_NG) -- if(ZLIB_NG_FOUND) -+ find_package(zlib-ng) -+ if(zlib-ng_FOUND) - set(HAVE_ZLIB_NG TRUE) - else() - find_package(ZLIB) - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(NOT (zlib-ng_FOUND OR ZLIB_FOUND)) - message(STATUS "No ZLIB found. Using ZLIB-NG internal sources.") - endif() - endif() - -- if(NOT (ZLIB_NG_FOUND OR ZLIB_FOUND)) -+ if(0) - message(STATUS "Using ZLIB-NG internal sources for ZLIB support.") - set(HAVE_ZLIB_NG TRUE) - add_definitions(-DZLIB_COMPAT) -@@ -192,8 +192,8 @@ endif() - - if(NOT DEACTIVATE_ZSTD) - if(PREFER_EXTERNAL_ZSTD) -- find_package(ZSTD) -- if(NOT ZSTD_FOUND) -+ find_package(zstd) -+ if(NOT zstd_FOUND) - message(STATUS "No ZSTD library found. Using internal sources.") - endif() - else() -diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt -index 365de33..74ed32e 100644 ---- a/blosc/CMakeLists.txt -+++ b/blosc/CMakeLists.txt -@@ -18,16 +18,16 @@ set(CMAKE_C_VISIBILITY_PRESET hidden) - - # includes - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}) --if(LZ4_FOUND) -- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${LZ4_INCLUDE_DIR}) -+if(lz4_FOUND) -+ set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${lz4_INCLUDE_DIR}) - else() - set(LZ4_LOCAL_DIR ${INTERNAL_LIBS}/lz4-1.9.4) - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${LZ4_LOCAL_DIR}) - endif() - - if(NOT DEACTIVATE_ZLIB) -- if(ZLIB_NG_FOUND) -- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZLIB_NG_INCLUDE_DIR}) -+ if(zlib-ng_FOUND) -+ set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${zlib-ng_INCLUDE_DIR}) - elseif(ZLIB_FOUND) - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}) - else() -@@ -37,8 +37,8 @@ if(NOT DEACTIVATE_ZLIB) - endif() - - if(NOT DEACTIVATE_ZSTD) -- if(ZSTD_FOUND) -- set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZSTD_INCLUDE_DIR}) -+ if(zstd_FOUND) -+ set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${zstd_INCLUDE_DIR}) - else() - set(ZSTD_LOCAL_DIR ${INTERNAL_LIBS}/zstd-1.5.4) - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZSTD_LOCAL_DIR} -@@ -99,8 +99,8 @@ else() - endif() - endif() - --if(LZ4_FOUND) -- set(LIBS ${LIBS} ${LZ4_LIBRARY}) -+if(lz4_FOUND) -+ set(LIBS ${LIBS} ${lz4_LIBRARIES}) - else() - file(GLOB LZ4_FILES ${LZ4_LOCAL_DIR}/*.c) - set(SOURCES ${SOURCES} ${LZ4_FILES}) -@@ -108,10 +108,10 @@ else() - endif() - - if(NOT DEACTIVATE_ZLIB) -- if(ZLIB_NG_FOUND) -- set(LIBS ${LIBS} ${ZLIB_NG_LIBRARY}) -+ if(zlib-ng_FOUND) -+ set(LIBS ${LIBS} ${zlib-ng_LIBRARY}) - elseif(ZLIB_FOUND) -- set(LIBS ${LIBS} ${ZLIB_LIBRARY}) -+ set(LIBS ${LIBS} ${ZLIB_LIBRARIES}) - else() - set(ZLIB_LOCAL_DIR ${INTERNAL_LIBS}/${ZLIB_NG_DIR}) - file(GLOB ZLIB_FILES ${ZLIB_LOCAL_DIR}/*.c) -@@ -121,8 +121,8 @@ if(NOT DEACTIVATE_ZLIB) - endif() - - if(NOT DEACTIVATE_ZSTD) -- if(ZSTD_FOUND) -- set(LIBS ${LIBS} ${ZSTD_LIBRARY}) -+ if(zstd_FOUND) -+ set(LIBS ${LIBS} ${zstd_LIBRARIES}) - else() - # Enable assembly code only when not using MSVC *and* x86 is there - if((NOT MSVC) AND COMPILER_SUPPORT_SSE2) # if SSE2 is here, this is an x86 platform diff --git a/recipes/c-blosc2/config.yml b/recipes/c-blosc2/config.yml index 44d877a4a4290..7d50a7f518889 100644 --- a/recipes/c-blosc2/config.yml +++ b/recipes/c-blosc2/config.yml @@ -1,4 +1,8 @@ versions: + "2.15.0": + folder: all + "2.14.4": + folder: all "2.13.1": folder: all "2.13.0": @@ -9,7 +13,3 @@ versions: folder: all "2.10.5": folder: all - "2.8.0": - folder: all - "2.6.1": - folder: all diff --git a/recipes/c4core/all/conandata.yml b/recipes/c4core/all/conandata.yml index ab9592ebfbdbe..8abc810fc0588 100644 --- a/recipes/c4core/all/conandata.yml +++ b/recipes/c4core/all/conandata.yml @@ -1,4 +1,13 @@ 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" + "0.2.0": + url: "https://github.com/biojppm/c4core/releases/download/v0.2.0/c4core-0.2.0-src.tgz" + sha256: "7843e6fb41c200fff69fc71105dbbf56bb410bdbab6b330e02cbe18430fe23bd" "0.1.11": url: "https://github.com/biojppm/c4core/releases/download/v0.1.11/c4core-0.1.11-src.tgz" sha256: "67f4443f3742424f42453594e26e656f616dddfcf225a1d810e00473a741408c" @@ -12,6 +21,18 @@ 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" + patch_type: "conan" + "0.2.0": + - patch_file: "patches/0.2.0-0001-make-fast_float-external.patch" + patch_description: "use cci's fast_float recipe" + patch_type: "conan" "0.1.11": - patch_file: "patches/0.1.11-0001-make-fast_float-external.patch" patch_description: "use cci's fast_float recipe" diff --git a/recipes/c4core/all/conanfile.py b/recipes/c4core/all/conanfile.py index d4620ffd7f7a8..91680b53adcd5 100644 --- a/recipes/c4core/all/conanfile.py +++ b/recipes/c4core/all/conanfile.py @@ -82,7 +82,7 @@ def package(self): cmake.install() rmdir(self, os.path.join(self.package_folder, "cmake")) rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - rm(self, "*.natvis", os.path.join(self.package_folder, "include")) + rm(self, "*.natvis", os.path.join(self.package_folder, "include"), recursive=True) def package_info(self): self.cpp_info.libs = ["c4core"] diff --git a/recipes/c4core/all/patches/0.2.0-0001-make-fast_float-external.patch b/recipes/c4core/all/patches/0.2.0-0001-make-fast_float-external.patch new file mode 100644 index 0000000000000..2fbe458a72084 --- /dev/null +++ b/recipes/c4core/all/patches/0.2.0-0001-make-fast_float-external.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f1d62be..cda061c 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 77fac4f..db14534 100644 +--- a/src/c4/ext/fast_float.hpp ++++ b/src/c4/ext/fast_float.hpp +@@ -18,7 +18,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/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 b3f909b6c9664..6368871bf45ae 100644 --- a/recipes/c4core/config.yml +++ b/recipes/c4core/config.yml @@ -1,4 +1,10 @@ versions: + "0.2.2": + folder: all + "0.2.1": + folder: all + "0.2.0": + folder: all "0.1.11": folder: all "0.1.10": 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/all/conandata.yml b/recipes/cairo/all/conandata.yml new file mode 100644 index 0000000000000..ab830d86cca25 --- /dev/null +++ b/recipes/cairo/all/conandata.yml @@ -0,0 +1,45 @@ +sources: + "1.18.0": + sha256: "abf8fba4d510086a492783c3e0828e90b32734738fd80906595617d229d02bab" + url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.18.0/cairo-1.18.0.tar.bz2" + "1.17.8": + url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.17.8/cairo-1.17.8.tar.bz2" + sha256: "ead4724423eb969f98b456fe1e3ee1e1741fe1c8dfb1a41ca12afa81a6c1665f" + "1.17.6": + url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.17.6/cairo-1.17.6.tar.bz2" + sha256: "90496d135c9ef7612c98f8ee358390cdec0825534573778a896ea021155599d2" + "1.17.4": + url: + - "https://www.cairographics.org/snapshots/cairo-1.17.4.tar.xz" + - "https://mirror.koddos.net/blfs/conglomeration/cairo/cairo-1.17.4.tar.xz" + sha256: "74b24c1ed436bbe87499179a3b27c43f4143b8676d8ad237a6fa787401959705" +patches: + "1.18.0": + - patch_file: "patches/1.18.0-msvc-alloca.patch" + patch_type: "backport" + patch_description: "Fix alloca undefined with MSVC" + patch_source: "https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/520" + "1.17.4": + - patch_file: "patches/binutils-2.34-libbfd-fix.patch" + patch_type: "backport" + patch_description: "fix build with newer versions of bfd" + patch_source: "https://gitlab.freedesktop.org/cairo/cairo/-/commit/e30259f6237571c61992433c110bc6e1ef900244" + base_path: "util/cairo-trace" + - patch_file: "patches/cairo-1.17.4-trace-cflags-fix.patch" + patch_type: "conan" + patch_description: | + Add missing 'PACKAGE' and 'PACKAGE_VERSION' defines for libbfd headers included by 'lookup-symbol.c'. + base_path: "util/cairo-trace" + - patch_file: "patches/cairo-1.17.4-xlib-xrender-option.patch" + patch_type: "conan" + patch_description: >- + This patch adds option to enable or disable xlib-xrender component. + Without it 'xrender' is always required when 'xlib' option is enabled. @sh0 + - patch_file: "patches/cairo-1.17.4-symbol-lookup-backport.patch" + patch_type: "backport" + patch_description: "add symbol-lookup option to allow disabling bfd/libiberty usage" + patch_source: "https://gitlab.freedesktop.org/cairo/cairo/-/commit/e0cf7b869fb1c6b73cf4a9aad2fc8aea4ff1f6ee" + - patch_file: "patches/cairo-1.17.4-encoding-backport.patch" + patch_type: "backport" + patch_description: "use encoding=utf-8 when reading/writing files in helper script" + patch_source: "https://gitlab.freedesktop.org/cairo/cairo/-/commit/9732f4e80f906fab85b97ae55ee44bfd3ee4945e" 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/all/patches/1.18.0-msvc-alloca.patch b/recipes/cairo/all/patches/1.18.0-msvc-alloca.patch new file mode 100644 index 0000000000000..3be0a4002a73e --- /dev/null +++ b/recipes/cairo/all/patches/1.18.0-msvc-alloca.patch @@ -0,0 +1,28 @@ +From 27cdee5e4cf19e7959b80fe1a39e61188de1b654 Mon Sep 17 00:00:00 2001 +From: Dan Yeaw +Date: Sat, 30 Sep 2023 13:30:51 -0400 +Subject: [PATCH] Fix alloca undefined with MSVC + +Conditionally includes malloc.h when compiling with +MSVC so that alloca is defined. +--- + src/cairo-colr-glyph-render.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/cairo-colr-glyph-render.c b/src/cairo-colr-glyph-render.c +index 28254fd51..a9ad84bbf 100644 +--- a/src/cairo-colr-glyph-render.c ++++ b/src/cairo-colr-glyph-render.c +@@ -43,6 +43,10 @@ + #include + #include + ++#ifdef _MSC_VER ++#include ++#endif ++ + #if HAVE_FT_COLR_V1 + + #include +-- +GitLab 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/cairo/meson/test_v1_package/CMakeLists.txt b/recipes/cairo/all/test_v1_package/CMakeLists.txt similarity index 100% rename from recipes/cairo/meson/test_v1_package/CMakeLists.txt rename to recipes/cairo/all/test_v1_package/CMakeLists.txt 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/cairo/meson/conandata.yml b/recipes/cairo/meson/conandata.yml deleted file mode 100644 index 278a3653016c5..0000000000000 --- a/recipes/cairo/meson/conandata.yml +++ /dev/null @@ -1,40 +0,0 @@ -sources: - "1.18.0": - sha256: "abf8fba4d510086a492783c3e0828e90b32734738fd80906595617d229d02bab" - url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.18.0/cairo-1.18.0.tar.bz2" - "1.17.8": - url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.17.8/cairo-1.17.8.tar.bz2" - sha256: "ead4724423eb969f98b456fe1e3ee1e1741fe1c8dfb1a41ca12afa81a6c1665f" - "1.17.6": - url: "https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.17.6/cairo-1.17.6.tar.bz2" - sha256: "90496d135c9ef7612c98f8ee358390cdec0825534573778a896ea021155599d2" - "1.17.4": - url: - - "https://www.cairographics.org/snapshots/cairo-1.17.4.tar.xz" - - "https://mirror.koddos.net/blfs/conglomeration/cairo/cairo-1.17.4.tar.xz" - sha256: "74b24c1ed436bbe87499179a3b27c43f4143b8676d8ad237a6fa787401959705" -patches: - "1.17.4": - - patch_file: "patches/binutils-2.34-libbfd-fix.patch" - patch_type: "backport" - patch_description: "fix build with newer versions of bfd" - patch_source: "https://gitlab.freedesktop.org/cairo/cairo/-/commit/e30259f6237571c61992433c110bc6e1ef900244" - base_path: "util/cairo-trace" - - patch_file: "patches/cairo-1.17.4-trace-cflags-fix.patch" - patch_type: "conan" - patch_description: | - Add missing 'PACKAGE' and 'PACKAGE_VERSION' defines for libbfd headers included by 'lookup-symbol.c'. - base_path: "util/cairo-trace" - - patch_file: "patches/cairo-1.17.4-xlib-xrender-option.patch" - patch_type: "conan" - patch_description: >- - This patch adds option to enable or disable xlib-xrender component. - Without it 'xrender' is always required when 'xlib' option is enabled. @sh0 - - patch_file: "patches/cairo-1.17.4-symbol-lookup-backport.patch" - patch_type: "backport" - patch_description: "add symbol-lookup option to allow disabling bfd/libiberty usage" - patch_source: "https://gitlab.freedesktop.org/cairo/cairo/-/commit/e0cf7b869fb1c6b73cf4a9aad2fc8aea4ff1f6ee" - - patch_file: "patches/cairo-1.17.4-encoding-backport.patch" - patch_type: "backport" - patch_description: "use encoding=utf-8 when reading/writing files in helper script" - patch_source: "https://gitlab.freedesktop.org/cairo/cairo/-/commit/9732f4e80f906fab85b97ae55ee44bfd3ee4945e" diff --git a/recipes/cairomm/all/conanfile.py b/recipes/cairomm/all/conanfile.py index 3b77adb9dbed4..4380e40cd818e 100644 --- a/recipes/cairomm/all/conanfile.py +++ b/recipes/cairomm/all/conanfile.py @@ -58,7 +58,7 @@ def layout(self): def requirements(self): self.requires("cairo/1.18.0", transitive_headers=True, transitive_libs=True) - self.requires("fontconfig/2.14.2", transitive_headers=True, transitive_libs=True) + self.requires("fontconfig/2.15.0", transitive_headers=True, transitive_libs=True) if self._abi_version == "1.16": self.requires("libsigcpp/3.0.7", transitive_headers=True, transitive_libs=True) else: @@ -76,9 +76,9 @@ def validate(self): ) def build_requirements(self): - self.tool_requires("meson/1.2.3") + self.tool_requires("meson/1.4.0") 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.1.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/capnproto/all/conandata.yml b/recipes/capnproto/all/conandata.yml index e635b41da8f05..6ecc4845785b6 100644 --- a/recipes/capnproto/all/conandata.yml +++ b/recipes/capnproto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.2": + url: "https://github.com/capnproto/capnproto/archive/v1.0.2.tar.gz" + sha256: "3cfd0ed58080d78b3a3381305489f2175cdaf1ef1cb55425d8fc8246a76bdff3" "1.0.1": url: "https://github.com/capnproto/capnproto/archive/v1.0.1.tar.gz" sha256: "5bdb16f6b389a9e29b04214b9bae1759e8b7fe2b45049d7e3f1f286ba050a200" @@ -27,6 +30,10 @@ sources: url: "https://github.com/capnproto/capnproto/archive/v0.7.0.tar.gz" sha256: "76c7114a3d142ad08b7208b3964a26e72a6320ee81331d3f0b87569fc9c47a28" patches: + "1.0.2": + - patch_file: "patches/0015-disable-tests-for-1.0.0.patch" + patch_description: "disable test build" + patch_type: "conan" "1.0.1": - patch_file: "patches/0015-disable-tests-for-1.0.0.patch" patch_description: "disable test build" diff --git a/recipes/capnproto/config.yml b/recipes/capnproto/config.yml index 887e41e533af8..7439163d18050 100644 --- a/recipes/capnproto/config.yml +++ b/recipes/capnproto/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.2": + folder: all "1.0.1": folder: all "1.0.0": diff --git a/recipes/cargs/all/conandata.yml b/recipes/cargs/all/conandata.yml index 01238c00f6a56..4947b6c17c0a0 100644 --- a/recipes/cargs/all/conandata.yml +++ b/recipes/cargs/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.0": + url: "https://github.com/likle/cargs/archive/v1.2.0.tar.gz" + sha256: "0b33379e3d3c8cb3e22f33d3e1a260adcd366970868bc9b7c47237f24188ff25" "1.1.0": url: "https://github.com/likle/cargs/archive/v1.1.0.tar.gz" sha256: "87e7da5b539f574d48529870cb0620ef5a244a5ee2eac73cc7559dedc04128ca" diff --git a/recipes/cargs/config.yml b/recipes/cargs/config.yml index 24b8d6fbb0acc..f86b56ea8cf6a 100644 --- a/recipes/cargs/config.yml +++ b/recipes/cargs/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.0": folder: all "1.0.3": diff --git a/recipes/catch2/3.x.x/conandata.yml b/recipes/catch2/3.x.x/conandata.yml index 1b3f439405dee..21b5c183917cb 100644 --- a/recipes/catch2/3.x.x/conandata.yml +++ b/recipes/catch2/3.x.x/conandata.yml @@ -1,4 +1,13 @@ sources: + "3.7.1": + url: "https://github.com/catchorg/Catch2/archive/v3.7.1.tar.gz" + sha256: "c991b247a1a0d7bb9c39aa35faf0fe9e19764213f28ffba3109388e62ee0269c" + "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" "3.5.4": url: "https://github.com/catchorg/Catch2/archive/v3.5.4.tar.gz" sha256: "b7754b711242c167d8f60b890695347f90a1ebc95949a045385114165d606dbb" diff --git a/recipes/catch2/3.x.x/conanfile.py b/recipes/catch2/3.x.x/conanfile.py index 6f59c5ce8e188..5bc8657f4ad30 100644 --- a/recipes/catch2/3.x.x/conanfile.py +++ b/recipes/catch2/3.x.x/conanfile.py @@ -7,16 +7,16 @@ import os import textwrap -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.54.0" class Catch2Conan(ConanFile): name = "catch2" description = "A modern, C++-native, header-only, framework for unit-tests, TDD and BDD" - topics = ("catch2", "unit-test", "tdd", "bdd") license = "BSL-1.0" - homepage = "https://github.com/catchorg/Catch2" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/catchorg/Catch2" + topics = ("catch2", "unit-test", "tdd", "bdd") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -35,6 +35,9 @@ class Catch2Conan(ConanFile): "console_width": "80", "no_posix_signals": False, } + # disallow cppstd compatibility, as it affects the ABI in this library + # see https://github.com/conan-io/conan-center-index/issues/19008 + extension_properties = {"compatibility_cppstd": False} @property def _min_cppstd(self): diff --git a/recipes/catch2/config.yml b/recipes/catch2/config.yml index d67eb0bdcc6a4..0c81c16ccdbcb 100644 --- a/recipes/catch2/config.yml +++ b/recipes/catch2/config.yml @@ -1,4 +1,10 @@ versions: + "3.7.1": + folder: 3.x.x + "3.7.0": + folder: 3.x.x + "3.6.0": + folder: 3.x.x "3.5.4": folder: 3.x.x "3.5.3": diff --git a/recipes/ccache/all/conandata.yml b/recipes/ccache/all/conandata.yml index 5c1cbd2adcc93..ff430e4765316 100644 --- a/recipes/ccache/all/conandata.yml +++ b/recipes/ccache/all/conandata.yml @@ -1,63 +1,10 @@ sources: + "4.10": + url: "https://github.com/ccache/ccache/releases/download/v4.10/ccache-4.10.tar.gz" + sha256: "16972ba62c8499045edc3ae7d7b8a0b419a961567f5ff0f01bf5a44194204775" "4.9.1": url: "https://github.com/ccache/ccache/releases/download/v4.9.1/ccache-4.9.1.tar.xz" sha256: "4c03bc840699127d16c3f0e6112e3f40ce6a230d5873daa78c60a59c7ef59d25" - "4.9": - url: "https://github.com/ccache/ccache/releases/download/v4.9/ccache-4.9.tar.xz" - sha256: "1ebc72324e3ab52af0b562bf54189d108e85eef6478d6304a345a3c2dc4018e0" "4.8.3": url: "https://github.com/ccache/ccache/releases/download/v4.8.3/ccache-4.8.3.tar.xz" sha256: "e47374c810b248cfca3665ee1d86c7c763ffd68d9944bc422d9c1872611f2b11" - "4.8.2": - url: "https://github.com/ccache/ccache/releases/download/v4.8.2/ccache-4.8.2.tar.xz" - sha256: "3d3fb3f888a5b16c4fa7ee5214cca76348afd6130e8443de5f6f2424f2076a49" - "4.8.1": - url: "https://github.com/ccache/ccache/releases/download/v4.8.1/ccache-4.8.1.tar.xz" - sha256: "87959b6819530b3dcaeb39992f585b9fc2c7120302809741378097774919fb6f" - "4.8": - url: "https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8.tar.xz" - sha256: "b963ee3bf88d7266b8a0565e4ba685d5666357f0a7e364ed98adb0dc1191fcbb" - "4.7.4": - url: "https://github.com/ccache/ccache/releases/download/v4.7.4/ccache-4.7.4.tar.xz" - sha256: "df0c64d15d3efaf0b4f6837dd6b1467e40eeaaa807db25ce79c3a08a46a84e36" -patches: - "4.9.1": - - patch_file: "patches/4.9-cmake-msvc-runtime.patch" - patch_description: "fixup MSVC runtime" - patch_type: "conan" - "4.9": - - patch_file: "patches/4.9-cmake-msvc-runtime.patch" - patch_description: "fixup MSVC runtime" - patch_type: "conan" - "4.8.3": - - patch_file: "patches/4.8-cmake-msvc-runtime.patch" - patch_description: "fixup MSVC runtime" - patch_type: "conan" - "4.8.2": - - patch_file: "patches/4.8-cmake-msvc-runtime.patch" - patch_description: "fixup MSVC runtime" - patch_type: "conan" - "4.8.1": - - patch_file: "patches/4.8-cmake-msvc-runtime.patch" - patch_description: "fixup MSVC runtime" - patch_type: "conan" - - patch_file: "patches/4.7.4-use-intrinsics-if-msbuild.patch" - patch_description: "fix build issue when using Visual Studio generator" - patch_type: "backport" - patch_source: "https://github.com/ccache/ccache/commit/350787245e7e894c8a472b176545f59a10e9dadb" - "4.8": - - patch_file: "patches/4.8-cmake-msvc-runtime.patch" - patch_description: "fixup MSVC runtime" - patch_type: "conan" - - patch_file: "patches/4.7.4-use-intrinsics-if-msbuild.patch" - patch_description: "fix build issue when using Visual Studio generator" - patch_type: "backport" - patch_source: "https://github.com/ccache/ccache/commit/350787245e7e894c8a472b176545f59a10e9dadb" - "4.7.4": - - patch_file: "patches/4.7.4-cmake-msvc-runtime.patch" - patch_description: "fixup MSVC runtime" - patch_type: "conan" - - patch_file: "patches/4.7.4-use-intrinsics-if-msbuild.patch" - patch_description: "fix build issue when using Visual Studio generator" - patch_type: "backport" - patch_source: "https://github.com/ccache/ccache/commit/350787245e7e894c8a472b176545f59a10e9dadb" diff --git a/recipes/ccache/all/conanfile.py b/recipes/ccache/all/conanfile.py index 8234bde469ffe..8eb6bcbaa6c38 100644 --- a/recipes/ccache/all/conanfile.py +++ b/recipes/ccache/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain, CMakeDeps from conan.errors import ConanInvalidConfiguration -from conan.tools.files import copy, get, apply_conandata_patches, export_conandata_patches +from conan.tools.files import copy, get from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.microsoft import check_min_vs, is_msvc @@ -12,6 +12,7 @@ class CcacheConan(ConanFile): name = "ccache" + package_type = "application" description = ( "Ccache (or “ccache”) is a compiler cache. It speeds up recompilation " "by caching previous compilations and detecting when the same " @@ -41,9 +42,6 @@ def _compilers_minimum_version(self): "apple-clang": "11", } - def export_sources(self): - export_conandata_patches(self) - def layout(self): cmake_layout(self, src_folder="src") @@ -52,6 +50,10 @@ def requirements(self): if self.options.redis_storage_backend: self.requires("hiredis/1.1.0") + if Version(self.version) >= "4.10": + self.requires("fmt/10.2.1") + self.requires("xxhash/[~0.8]") + def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, self._min_cppstd) @@ -66,12 +68,15 @@ def validate(self): self.settings.compiler.libcxx == "libstdc++": raise ConanInvalidConfiguration(f"{self.ref} requires C++ filesystem library, that is not supported by Clang 11 + libstdc++.") + if self.settings.os == "Windows" and self.settings.arch == "armv8" and Version(self.version) < "4.10": + raise ConanInvalidConfiguration("ccache does not support ARMv8 on Windows before version 4.10") + def build_requirements(self): self.tool_requires("cmake/[>=3.15 <4]") 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], destination=self.source_folder, + strip_root=True) def generate(self): tc = CMakeToolchain(self) @@ -80,17 +85,26 @@ def generate(self): tc.variables["ZSTD_FROM_INTERNET"] = False tc.variables["ENABLE_DOCUMENTATION"] = False tc.variables["ENABLE_TESTING"] = False + tc.variables["STATIC_LINK"] = False # Don't link static runtimes and let Conan handle it tc.generate() deps = CMakeDeps(self) - deps.set_property("hiredis", "cmake_target_name", "HIREDIS::HIREDIS") - deps.set_property("hiredis", "cmake_find_mode", "module") - deps.set_property("zstd", "cmake_target_name", "ZSTD::ZSTD") + if Version(self.version) >= "4.10": + deps.set_property("fmt", "cmake_file_name", "Fmt") + deps.set_property("fmt", "cmake_find_mode", "module") + deps.set_property("fmt", "cmake_target_name", "dep_fmt") + deps.set_property("zstd", "cmake_file_name", "Zstd") + deps.set_property("zstd", "cmake_target_name", "dep_zstd") + deps.set_property("hiredis", "cmake_file_name", "Hiredis") + deps.set_property("hiredis", "cmake_target_name", "dep_hiredis") + else: + deps.set_property("hiredis", "cmake_target_name", "HIREDIS::HIREDIS") + deps.set_property("zstd", "cmake_target_name", "ZSTD::ZSTD") deps.set_property("zstd", "cmake_find_mode", "module") + deps.set_property("hiredis", "cmake_find_mode", "module") deps.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() @@ -101,7 +115,9 @@ def package(self): cmake.install() def package_info(self): + self.cpp_info.libdirs = [] + self.cpp_info.includedirs = [] + 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) - self.cpp_info.includedirs = [] diff --git a/recipes/ccache/all/patches/4.7.4-cmake-msvc-runtime.patch b/recipes/ccache/all/patches/4.7.4-cmake-msvc-runtime.patch deleted file mode 100644 index 0bc4c5ce8f995..0000000000000 --- a/recipes/ccache/all/patches/4.7.4-cmake-msvc-runtime.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -97,7 +97,7 @@ - - # Link MSVC runtime statically. - if(MSVC) -- set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") -+ - # Link MINGW runtime statically. - elseif(WIN32) - if((CMAKE_CXX_COMPILER_ID STREQUAL GNU) OR (CMAKE_CXX_COMPILER_ID STREQUAL Clang)) diff --git a/recipes/ccache/all/patches/4.7.4-use-intrinsics-if-msbuild.patch b/recipes/ccache/all/patches/4.7.4-use-intrinsics-if-msbuild.patch deleted file mode 100644 index f55e169ebc167..0000000000000 --- a/recipes/ccache/all/patches/4.7.4-use-intrinsics-if-msbuild.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 350787245e7e894c8a472b176545f59a10e9dadb Mon Sep 17 00:00:00 2001 -From: Rafael Kitover -Date: Mon, 22 May 2023 22:13:19 +0000 -Subject: [PATCH] fix: Disable masm on msbuild for blake3 with VS - -Because of some bug with either msbuild or the cmake generator, the C -compiler flags are passed to the masm assembler making it fail. - -Use the C intrinsic versions for blake3 when msbuild is in use. - -Fix #1278 - -Signed-off-by: Rafael Kitover ---- - src/third_party/blake3/CMakeLists.txt | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/third_party/blake3/CMakeLists.txt b/src/third_party/blake3/CMakeLists.txt -index a30342d5d3..1e30eb3cfe 100644 ---- a/src/third_party/blake3/CMakeLists.txt -+++ b/src/third_party/blake3/CMakeLists.txt -@@ -27,7 +27,11 @@ function(add_source_if_enabled feature msvc_flags others_flags intrinsic) - - # First check if it's possible to use the assembler variant for the feature. - string(TOUPPER "have_asm_${feature}" have_feature) -- if(NOT DEFINED "${have_feature}" AND CMAKE_SIZEOF_VOID_P EQUAL 8) -+ if(NOT DEFINED "${have_feature}" AND CMAKE_SIZEOF_VOID_P EQUAL 8 -+# Force intrinsic version for msbuild because of a bug in the cmake generator -+# or msbuild itself with masm flags. -+ AND NOT CMAKE_GENERATOR MATCHES "Visual Studio") -+ - if(NOT CMAKE_REQUIRED_QUIET) - message(STATUS "Performing Test ${have_feature}") - endif() diff --git a/recipes/ccache/all/patches/4.8-cmake-msvc-runtime.patch b/recipes/ccache/all/patches/4.8-cmake-msvc-runtime.patch deleted file mode 100644 index 0bc4c5ce8f995..0000000000000 --- a/recipes/ccache/all/patches/4.8-cmake-msvc-runtime.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -97,7 +97,7 @@ - - # Link MSVC runtime statically. - if(MSVC) -- set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") -+ - # Link MINGW runtime statically. - elseif(WIN32) - if((CMAKE_CXX_COMPILER_ID STREQUAL GNU) OR (CMAKE_CXX_COMPILER_ID STREQUAL Clang)) diff --git a/recipes/ccache/all/patches/4.9-cmake-msvc-runtime.patch b/recipes/ccache/all/patches/4.9-cmake-msvc-runtime.patch deleted file mode 100644 index c0aa5be876cb8..0000000000000 --- a/recipes/ccache/all/patches/4.9-cmake-msvc-runtime.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- cmake/StaticLinkSupport.cmake -+++ cmake/StaticLinkSupport.cmake -@@ -18,7 +18,7 @@ - if(WIN32) - # Link MSVC runtime statically. - if(MSVC) -- set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") -+ - # Link MINGW runtime statically. - else() - if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Clang)\$") diff --git a/recipes/ccache/config.yml b/recipes/ccache/config.yml index c3b3ce18a0b2b..5a505084d4b8c 100644 --- a/recipes/ccache/config.yml +++ b/recipes/ccache/config.yml @@ -1,15 +1,7 @@ versions: - "4.9.1": + "4.10": folder: all - "4.9": + "4.9.1": folder: all "4.8.3": folder: all - "4.8.2": - folder: all - "4.8.1": - folder: all - "4.8": - folder: all - "4.7.4": - folder: all 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/cfitsio/all/conandata.yml b/recipes/cfitsio/all/conandata.yml index 6b0480fb20585..63cc622faf8bc 100644 --- a/recipes/cfitsio/all/conandata.yml +++ b/recipes/cfitsio/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.4.0": + url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.4.0.tar.gz" + sha256: "c42bd609151c0b0d7c4f3578d425ae7aaa9afa4828cab35c0accea588e290c29" "4.3.1": url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.3.1.tar.gz" sha256: "2332b965d327a15c103a7d31d6d1afaf775d00e9785dd25332ae76b9725351e4" @@ -17,13 +20,10 @@ sources: "3.490": url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-3.49.tar.gz" sha256: "8cc4beddd0ff389fb81bde9c181e0e3c419c15ec8a66df201ff4619a93715558" - "3.480": - url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-3.48.tar.gz" - sha256: "fc369363616753fa4dbe9bf28fa7e49cc1b057081229d89b52087d85ef303314" - "3.470": - url: "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-3.47.tar.gz" - sha256: "985606e058403c073a68d95be74e9696f0ded9414520784457a1d4cba8cca7e2" patches: + "4.4.0": + - patch_file: "patches/windows-use-strtok_s.patch" + - patch_file: "patches/fix-cmake-4.2.0.patch" "4.3.1": - patch_file: "patches/windows-use-strtok_s.patch" - patch_file: "patches/fix-cmake-4.2.0.patch" @@ -42,9 +42,3 @@ patches: "3.490": - patch_file: "patches/windows-use-strtok_s.patch" - patch_file: "patches/fix-cmake-3.490.patch" - "3.480": - - patch_file: "patches/windows-use-strtok_s.patch" - - patch_file: "patches/fix-cmake-3.470.patch" - "3.470": - - patch_file: "patches/windows-use-strtok_s.patch" - - patch_file: "patches/fix-cmake-3.470.patch" diff --git a/recipes/cfitsio/all/conanfile.py b/recipes/cfitsio/all/conanfile.py index 782f21cb2a73b..e2f5688059f62 100644 --- a/recipes/cfitsio/all/conanfile.py +++ b/recipes/cfitsio/all/conanfile.py @@ -1,9 +1,10 @@ +import glob +import os + 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, rmdir from conan.tools.scm import Version -import glob -import os required_conan_version = ">=1.54.0" @@ -12,7 +13,7 @@ class CfitsioConan(ConanFile): name = "cfitsio" description = "C library for reading and writing data files in FITS " \ "(Flexible Image Transport System) data format" - license = "CFITSIO" + license = ("CFITSIO", "NASA-1.3") topics = ("fits", "image", "nasa", "astronomy", "astrophysics", "space") homepage = "https://heasarc.gsfc.nasa.gov/fitsio/" url = "https://github.com/conan-io/conan-center-index" @@ -104,7 +105,11 @@ def build(self): cmake.build() def package(self): - copy(self, "License.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + if Version(self.version) >= "4.4.0": + copy(self, "NASA*", src=os.path.join(self.source_folder, "licenses"), + dst=os.path.join(self.package_folder, "licenses")) + else: + copy(self, "License.txt", 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", "pkgconfig")) diff --git a/recipes/cfitsio/all/patches/fix-cmake-3.470.patch b/recipes/cfitsio/all/patches/fix-cmake-3.470.patch deleted file mode 100644 index 46df9c1140c70..0000000000000 --- a/recipes/cfitsio/all/patches/fix-cmake-3.470.patch +++ /dev/null @@ -1,223 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -3,8 +3,8 @@ - # Suppress warning about WIN32 no longer being defined on Cygwin: - SET(CMAKE_LEGACY_CYGWIN_WIN32 0) - -+CMAKE_MINIMUM_REQUIRED(VERSION 3.1) - PROJECT(CFITSIO) --CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) - - # Allow @rpath token in target install name on Macs. - # See "cmake --help-policy CMP0042" for more information. -@@ -12,12 +12,14 @@ IF(POLICY CMP0042) - CMAKE_POLICY(SET CMP0042 NEW) - ENDIF() - --INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) --INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) -+INCLUDE(CheckSymbolExists) -+INCLUDE(CheckCSourceCompiles) - - # Allow the developer to select if Dynamic or Static libraries are built - OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" ON) - OPTION (USE_PTHREADS "Thread-safe build (using pthreads)" OFF) -+OPTION(CFITSIO_USE_SSE2 "Enable use of instructions in the SSE2 extended instruction set" OFF) -+OPTION(CFITSIO_USE_SSSE3 "Enable use of instructions in the SSSE3 extended instruction set" OFF) - - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}") - set (LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") -@@ -55,12 +57,19 @@ IF (BUILD_SHARED_LIBS) - ENDIF (BUILD_SHARED_LIBS) - - --FILE(GLOB H_FILES "*.h") -+SET(H_FILES fitsio.h fitsio2.h longnam.h) -+SET(LINK_LIBS "") - - IF (USE_PTHREADS) -- FIND_PACKAGE(pthreads REQUIRED) -- INCLUDE_DIRECTORIES(${PTHREADS_INCLUDE_DIR}) -- ADD_DEFINITIONS(-D_REENTRANT) -+ SET(CMAKE_THREAD_PREFER_PTHREAD TRUE) -+ SET(THREADS_PREFER_PTHREAD_FLAG TRUE) -+ FIND_PACKAGE(Threads REQUIRED) -+ IF(CMAKE_USE_PTHREADS_INIT) -+ LIST(APPEND LINK_LIBS "Threads::Threads") -+ ELSE() -+ find_package(pthreads4w REQUIRED CONFIG) -+ LIST(APPEND LINK_LIBS "pthreads4w::pthreads4w") -+ ENDIF() - ENDIF() - - # Math library (not available in MSVC or MINGW) -@@ -71,35 +80,36 @@ ELSE() - ENDIF() - - # Support for remote file drivers is not implemented for native Windows: --IF (NOT MSVC) -+IF (NOT WIN32) - # Find library needed for gethostbyname: -- CHECK_FUNCTION_EXISTS("gethostbyname" CMAKE_HAVE_GETHOSTBYNAME) -- IF(NOT CMAKE_HAVE_GETHOSTBYNAME) -- CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" CMAKE_HAVE_GETHOSTBYNAME) -- ENDIF() -+ CHECK_SYMBOL_EXISTS(gethostbyname "netdb.h" CMAKE_HAVE_GETHOSTBYNAME) - - # Find library needed for connect: -- CHECK_FUNCTION_EXISTS("connect" CMAKE_HAVE_CONNECT) -- IF(NOT CMAKE_HAVE_CONNECT) -- CHECK_LIBRARY_EXISTS("socket" "connect" "" CMAKE_HAVE_CONNECT) -- ENDIF() -+ CHECK_SYMBOL_EXISTS(connect "sys/types.h;sys/socket.h" CMAKE_HAVE_CONNECT) - - # Define HAVE_NET_SERVICES if gethostbyname & connect were found: - IF (CMAKE_HAVE_GETHOSTBYNAME AND CMAKE_HAVE_CONNECT) - ADD_DEFINITIONS(-DHAVE_NET_SERVICES) -+ CHECK_SYMBOL_EXISTS(fmemopen "stdio.h" HAVE_FMEMOPEN) -+ IF(HAVE_FMEMOPEN) -+ ADD_DEFINITIONS(-DHAVE_FMEMOPEN) -+ ENDIF() - ENDIF () - - # Find curl library, for HTTPS support: -- FIND_PACKAGE(CURL) -- IF (CURL_FOUND) -- INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR}) -- ADD_DEFINITIONS(-DCFITSIO_HAVE_CURL) -+ OPTION(UseCurl "UseCurl" ON) -+ IF (UseCurl) -+ FIND_PACKAGE(CURL) -+ IF (CURL_FOUND) -+ LIST(APPEND LINK_LIBS "CURL::libcurl") -+ ADD_DEFINITIONS(-DCFITSIO_HAVE_CURL) -+ ENDIF() - ENDIF() - ENDIF() - - SET(SRC_FILES - buffers.c cfileio.c checksum.c -- drvrfile.c drvrmem.c drvrnet.c -+ drvrfile.c drvrmem.c drvrnet.c drvrsmem.c - editcol.c edithdu.c eval_f.c eval_l.c eval_y.c - f77_wrap1.c f77_wrap2.c f77_wrap3.c f77_wrap4.c - fits_hcompress.c fits_hdecompress.c fitscore.c -@@ -123,27 +133,99 @@ SET(SRC_FILES - - # Only include zlib source files if we are building a shared library. - # Users will need to link their executable with zlib independently. --IF (BUILD_SHARED_LIBS) -- set(SRC_FILES ${SRC_FILES} -- zlib/adler32.c zlib/crc32.c zlib/deflate.c zlib/infback.c -- zlib/inffast.c zlib/inflate.c zlib/inftrees.c zlib/trees.c -- zlib/uncompr.c zlib/zutil.c -- ) -+find_package(ZLIB REQUIRED) -+LIST(APPEND LINK_LIBS "ZLIB::ZLIB") -+ -+IF(CFITSIO_USE_SSE2) -+ IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR -+ "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR -+ "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") -+ ADD_COMPILE_OPTIONS(-msse2) -+ ENDIF() -+ IF(MSVC) -+ ADD_DEFINITIONS(-D__SSE2__=1) -+ ENDIF() -+ENDIF() -+ -+IF(CFITSIO_USE_SSSE3) -+ IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR -+ "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR -+ "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") -+ ADD_COMPILE_OPTIONS(-mssse3) -+ ENDIF() -+ IF(MSVC) -+ ADD_DEFINITIONS(-D__SSE2__=1 -D__SSSE3__=1) -+ ENDIF() -+ENDIF() -+ -+OPTION(CFITSIO_USE_BZIP2 "Enable bzip2 support" OFF) -+IF(CFITSIO_USE_BZIP2) -+ FIND_PACKAGE(BZip2 REQUIRED) -+ LIST(APPEND LINK_LIBS "BZip2::BZip2") -+ ADD_DEFINITIONS(-DHAVE_BZIP2=1) -+ENDIF() -+ -+# Test for the unix ftruncate function -+CHECK_SYMBOL_EXISTS(ftruncate "unistd.h" HAVE_FTRUNCATE) -+IF(HAVE_FTRUNCATE) -+ ADD_DEFINITIONS(-DHAVE_FTRUNCATE) -+ENDIF() -+ -+# Check is System V IPC is supported on this machine -+CHECK_C_SOURCE_COMPILES(" -+#include -+#include -+#include -+int main() { -+ shmat(0,0,0); -+ shmdt(0); -+ shmget(0, 0, 0); -+ semget(0, 0, 0); -+ return 0; -+}" HAVE_SHMEM_SERVICES) -+IF(HAVE_SHMEM_SERVICES) -+ ADD_DEFINITIONS(-DHAVE_SHMEM_SERVICES) -+ -+ # Some systems define flock_t, for others we have to define it ourselves -+ CHECK_C_SOURCE_COMPILES(" -+ #include -+ int main() { -+ flock_t filler; -+ return 0; -+ }" HAVE_FLOCK_T) -+ IF(HAVE_FLOCK_T) -+ ADD_DEFINITIONS(-DHAVE_FLOCK_T) -+ ENDIF() -+ -+ # Check union semun -+ CHECK_C_SOURCE_COMPILES(" -+ #include -+ #include -+ #include -+ int main() { -+ union semun filler; -+ return 0; -+ }" HAVE_UNION_SEMUN) -+ IF(HAVE_UNION_SEMUN) -+ ADD_DEFINITIONS(-DHAVE_UNION_SEMUN) -+ ENDIF() - ENDIF() - - ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${H_FILES} ${SRC_FILES}) --TARGET_LINK_LIBRARIES(${LIB_NAME} ${PTHREADS_LIBRARY} ${M_LIB} ${CURL_LIBRARIES}) -+TARGET_LINK_LIBRARIES(${LIB_NAME} ${LINK_LIBS} ${M_LIB}) -+if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "12") -+ TARGET_COMPILE_OPTIONS(${LIB_NAME} PRIVATE -Wno-error=implicit-function-declaration) -+endif() - - SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION} SOVERSION ${${PROJECT_NAME}_MAJOR_VERSION}) --install(TARGETS ${LIB_NAME} DESTINATION ${LIB_DESTINATION}) - install(TARGETS ${LIB_NAME} - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) - install(FILES ${H_FILES} DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) - --# Only build test code and executables if building a shared library: --IF (BUILD_SHARED_LIBS) -+# Do not build test code and executables: -+IF (FALSE) - - ENABLE_TESTING() - -@@ -173,7 +255,7 @@ IF (BUILD_SHARED_LIBS) - set_target_properties(FPack Funpack PROPERTIES LINK_FLAGS "setargv.obj") - endif(MSVC) - --ENDIF(BUILD_SHARED_LIBS) -+ENDIF() - - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cfitsio.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/cfitsio.pc @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cfitsio.pc DESTINATION lib/pkgconfig/) diff --git a/recipes/cfitsio/config.yml b/recipes/cfitsio/config.yml index 644678fbd04e4..bfb174dc329f7 100644 --- a/recipes/cfitsio/config.yml +++ b/recipes/cfitsio/config.yml @@ -1,4 +1,6 @@ versions: + "4.4.0": + folder: all "4.3.1": folder: all "4.3.0": @@ -11,7 +13,3 @@ versions: folder: all "3.490": folder: all - "3.480": - folder: all - "3.470": - folder: all 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/civetweb/all/conanfile.py b/recipes/civetweb/all/conanfile.py index b393da542821b..d7ccad2b88226 100644 --- a/recipes/civetweb/all/conanfile.py +++ b/recipes/civetweb/all/conanfile.py @@ -22,6 +22,7 @@ class CivetwebConan(ConanFile): "fPIC": [True, False], "shared": [True, False], "ssl_dynamic_loading": [True, False], + "thread_stack_size": [None, "ANY"], "with_caching": [True, False], "with_cgi": [True, False], "with_cxx": [True, False], @@ -39,6 +40,7 @@ class CivetwebConan(ConanFile): "fPIC": True, "shared": False, "ssl_dynamic_loading": False, + "thread_stack_size": None, "with_caching": True, "with_cgi": True, "with_cxx": True, @@ -92,6 +94,8 @@ def requirements(self): def validate(self): if self.options.get_safe("ssl_dynamic_loading") and not self.dependencies["openssl"].options.shared: raise ConanInvalidConfiguration("ssl_dynamic_loading requires shared openssl") + if self.options.thread_stack_size and not str(self.options.thread_stack_size).isdigit(): + raise ConanInvalidConfiguration("-o='civetweb/*:thread_stack_size' should be a positive integer") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -122,6 +126,8 @@ def generate(self): tc.variables["CIVETWEB_ENABLE_THIRD_PARTY_OUTPUT"] = self.options.with_third_party_output tc.variables["CIVETWEB_ENABLE_WEBSOCKETS"] = self.options.with_websockets tc.variables["CIVETWEB_SERVE_NO_FILES"] = not self.options.with_static_files + if self.options.thread_stack_size: + tc.variables["CIVETWEB_THREAD_STACK_SIZE"] = self.options.thread_stack_size if self._has_zlib_option: tc.variables["CIVETWEB_ENABLE_ZLIB"] = self.options.with_zlib diff --git a/recipes/cjson/all/conandata.yml b/recipes/cjson/all/conandata.yml index 98903aa382fd7..32c4ecff90851 100644 --- a/recipes/cjson/all/conandata.yml +++ b/recipes/cjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.7.18": + url: "https://github.com/DaveGamble/cJSON/archive/v1.7.18.tar.gz" + sha256: "3aa806844a03442c00769b83e99970be70fbef03735ff898f4811dd03b9f5ee5" "1.7.17": url: "https://github.com/DaveGamble/cJSON/archive/v1.7.17.tar.gz" sha256: "c91d1eeb7175c50d49f6ba2a25e69b46bd05cffb798382c19bfb202e467ec51c" diff --git a/recipes/cjson/all/conanfile.py b/recipes/cjson/all/conanfile.py index e715bfc8ad197..84820348d6401 100644 --- a/recipes/cjson/all/conanfile.py +++ b/recipes/cjson/all/conanfile.py @@ -13,12 +13,11 @@ class CjsonConan(ConanFile): name = "cjson" description = "Ultralightweight JSON parser in ANSI C." license = "MIT" - topics = ("json", "parser") - homepage = "https://github.com/DaveGamble/cJSON" url = "https://github.com/conan-io/conan-center-index" - - package_type = "library" + homepage = "https://github.com/DaveGamble/cJSON" + topics = ("json", "parser") settings = "os", "arch", "compiler", "build_type" + package_type = "library" options = { "shared": [True, False], "fPIC": [True, False], diff --git a/recipes/cjson/config.yml b/recipes/cjson/config.yml index 8dc9df22965bb..08843263806b5 100644 --- a/recipes/cjson/config.yml +++ b/recipes/cjson/config.yml @@ -1,4 +1,6 @@ versions: + "1.7.18": + folder: all "1.7.17": folder: all "1.7.16": diff --git a/recipes/cli11/all/conandata.yml b/recipes/cli11/all/conandata.yml index f6711af51ec3a..0202c83c31a52 100644 --- a/recipes/cli11/all/conandata.yml +++ b/recipes/cli11/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.4.2": + url: "https://github.com/CLIUtils/CLI11/archive/v2.4.2.tar.gz" + sha256: "f2d893a65c3b1324c50d4e682c0cdc021dd0477ae2c048544f39eed6654b699a" "2.4.1": url: "https://github.com/CLIUtils/CLI11/archive/v2.4.1.tar.gz" sha256: "73b7ec52261ce8fe980a29df6b4ceb66243bb0b779451dbd3d014cfec9fdbb58" diff --git a/recipes/cli11/config.yml b/recipes/cli11/config.yml index 29883272197c4..fc84730ec9afc 100644 --- a/recipes/cli11/config.yml +++ b/recipes/cli11/config.yml @@ -1,4 +1,6 @@ versions: + "2.4.2": + folder: all "2.4.1": folder: all "2.4.0": 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/clove-unit/all/conandata.yml b/recipes/clove-unit/all/conandata.yml index b80516fa1a975..1377a0bac8c05 100644 --- a/recipes/clove-unit/all/conandata.yml +++ b/recipes/clove-unit/all/conandata.yml @@ -1,16 +1,22 @@ sources: + "2.4.5": + url: "https://github.com/fdefelici/clove-unit/archive/v2.4.5.tar.gz" + sha256: "e4db72612adf00d7c7c9512cb9990768f5f3e62a72039929b78ba17d5a6f4308" + "2.4.4": + url: "https://github.com/fdefelici/clove-unit/archive/v2.4.4.tar.gz" + sha256: "25e611e1d4286c73d9cce7bbc99f83e00629551602351fec1edcbb669243e047" "2.4.1": url: "https://github.com/fdefelici/clove-unit/archive/v2.4.1.tar.gz" - sha256: ede833e361b5b62052bd0976386307d1d962c7ab20a0e24eb6e970d409c726fe + sha256: "ede833e361b5b62052bd0976386307d1d962c7ab20a0e24eb6e970d409c726fe" "2.4.0": url: "https://github.com/fdefelici/clove-unit/archive/v2.4.0.tar.gz" - sha256: d5005854d7b3b6ed1b470c2df353fadd80a2ed5a80bb85efc074b9d55315e78d + sha256: "d5005854d7b3b6ed1b470c2df353fadd80a2ed5a80bb85efc074b9d55315e78d" "2.3.0": url: "https://github.com/fdefelici/clove-unit/archive/v2.3.0.tar.gz" - sha256: ca94d33643bbe1ff2205f7e6405f3e9c5a95d2f3a076a126814e64b46e3cce8e + sha256: "ca94d33643bbe1ff2205f7e6405f3e9c5a95d2f3a076a126814e64b46e3cce8e" "2.2.4": url: "https://github.com/fdefelici/clove-unit/archive/v2.2.4.tar.gz" - sha256: 0341f13b3e897952f1643eea2ca70cf014c4a086cf83375270980ac05f9d51aa + sha256: "0341f13b3e897952f1643eea2ca70cf014c4a086cf83375270980ac05f9d51aa" "2.2.3": url: "https://github.com/fdefelici/clove-unit/archive/v2.2.3.tar.gz" - sha256: 65f80d600ddec35f7ba70370f10e2df268d68c589e5cddbdcad815b6dbb61dfd + sha256: "65f80d600ddec35f7ba70370f10e2df268d68c589e5cddbdcad815b6dbb61dfd" diff --git a/recipes/clove-unit/all/conanfile.py b/recipes/clove-unit/all/conanfile.py index 630528ab512d9..3e530c191a833 100644 --- a/recipes/clove-unit/all/conanfile.py +++ b/recipes/clove-unit/all/conanfile.py @@ -8,13 +8,14 @@ class CloveUnitConan(ConanFile): name = "clove-unit" description = "Single-header Unit Testing framework for C (interoperable with C++) with test autodiscovery feature" - topics = ("unit-testing", "testing", "unit testing", "test") + license = "MIT" homepage = "https://github.com/fdefelici/clove-unit" url = "https://github.com/conan-io/conan-center-index" - license = "MIT" + topics = ("unit-testing", "testing", "unit testing", "test", "header-only") no_copy_source = True package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + no_copy_source = True def layout(self): basic_layout(self, src_folder="src") diff --git a/recipes/clove-unit/config.yml b/recipes/clove-unit/config.yml index e5228fd78f381..fd769a0869f29 100644 --- a/recipes/clove-unit/config.yml +++ b/recipes/clove-unit/config.yml @@ -1,4 +1,8 @@ versions: + "2.4.5": + folder: "all" + "2.4.4": + folder: "all" "2.4.1": folder: "all" "2.4.0": diff --git a/recipes/cmake/3.x.x/conanfile.py b/recipes/cmake/3.x.x/conanfile.py index f6de583315097..042191e304bd0 100644 --- a/recipes/cmake/3.x.x/conanfile.py +++ b/recipes/cmake/3.x.x/conanfile.py @@ -37,8 +37,8 @@ def config_options(self): self.options.with_openssl = False def requirements(self): - if self.options.with_openssl: - self.requires("openssl/1.1.1t") + if self.options.get_safe("with_openssl", default=False): + self.requires("openssl/[>=1.1 <4]") def validate_build(self): if self.settings.os == "Windows" and self.options.bootstrap: diff --git a/recipes/cmake/binary/conandata.yml b/recipes/cmake/binary/conandata.yml index 25e592bef0ec8..7959b73239b48 100644 --- a/recipes/cmake/binary/conandata.yml +++ b/recipes/cmake/binary/conandata.yml @@ -1,4 +1,156 @@ 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: + url: "https://cmake.org/files/v3.29/cmake-3.29.6-linux-aarch64.tar.gz" + sha256: "4d6b0a551db9da7a034a09372f716cf2094413d7fd8a787051854154b0b3b343" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.6-linux-x86_64.tar.gz" + sha256: "28fef61e64840b784da6db35218fd3ae179ff8bf0be1c8a9d075d6185a0e4fdc" + Macos: + universal: + url: "https://cmake.org/files/v3.29/cmake-3.29.6-macos10.10-universal.tar.gz" + sha256: "a65f9e66c63bb79f3b6f00e4b67367b6f6c40030ee41cf06580818a74a84b3e9" + Windows: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.6-windows-arm64.zip" + sha256: "8f0df498d8b1a076fc9305dde5a06427262a0476e89d4c670a49147b0bc30761" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.6-windows-x86_64.zip" + sha256: "5c648eac06c33477e510bae14ce1f969e9abb38992b71f245633b182fccb474d" + "3.29.5": + Linux: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.5-linux-aarch64.tar.gz" + sha256: "6eb655ee89c50611f2370c5a3293bd2fe1920b73dff50b71fb3357d56a9d28d8" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.5-linux-x86_64.tar.gz" + sha256: "92629f95e15e7c2e88726c57a984ffdc5cf248e354f7ab791bc86d2ad513903e" + Macos: + universal: + url: "https://cmake.org/files/v3.29/cmake-3.29.5-macos10.10-universal.tar.gz" + sha256: "a110d173ab839854fc0b19b9f29f213c1112106e2858c1a1fe7973d4bb13a536" + Windows: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.5-windows-arm64.zip" + sha256: "9c67d16560125ebf1278ef1b3072914a60bff780522b28c0096f364f775a8e55" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.5-windows-x86_64.zip" + sha256: "f85db8361cb7eb11ceb6b2f1ee42bec7234bb8d9e487ea78c00de64771768d92" + "3.29.4": + Linux: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.4-linux-aarch64.tar.gz" + sha256: "9210619e7907b14858178743d5b7ba70ce846d98a6a65bcdbd83c08b932ba6a5" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.4-linux-x86_64.tar.gz" + sha256: "64e5473169dd43055fbf2c138cae6e5ec10f30a0606d24f12078e68466320cf4" + Macos: + universal: + url: "https://cmake.org/files/v3.29/cmake-3.29.4-macos10.10-universal.tar.gz" + sha256: "44a59c584122676463bf5bdd2c7dee2ac02944e065a71cc30c57541a20d3465c" + Windows: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.4-windows-arm64.zip" + sha256: "16ce291dd34189a60d7add96b4148adfdbb46b6b2478086cb43abe2e5ff34ad3" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.4-windows-x86_64.zip" + sha256: "1c8bfbc5537553edccded62f8f03475a161280c1b64f54c887824c6eb4e773ff" + "3.29.3": + Linux: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.3-linux-aarch64.tar.gz" + sha256: "ae61d262b2771ba9cbdf1eeac288e64d6510d2f0417d2d92e27807d269ac90fa" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.3-linux-x86_64.tar.gz" + sha256: "90b543a30220401db0e08347af067545be158ce89ffb09b7df1516cda8617329" + Macos: + universal: + url: "https://cmake.org/files/v3.29/cmake-3.29.3-macos10.10-universal.tar.gz" + sha256: "1a7ecdd1dc8baaede55d1011f60b5871ff908fa640f7e96ab5520f38ef97bba0" + Windows: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.3-windows-arm64.zip" + sha256: "8d7d65e46a45bdbf8b4416d29ef6ad9a80f0b26afb5d6afab358e34b1b30a556" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.3-windows-x86_64.zip" + sha256: "6423ed300e6aa1b15c4aeae9a7399157f53fc84a2fb7242ca64c8dfd83e5f8a6" + "3.29.2": + Linux: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.2-linux-aarch64.tar.gz" + sha256: "ca883c6dc3ce9eebd833804f0f940ecbbff603520cfd169ee58916dbbc23c2b8" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.2-linux-x86_64.tar.gz" + sha256: "0416c70cf88e8f92efcbfe292e181bc09ead7d70e29ab37b697522c01121eab5" + Macos: + universal: + url: "https://cmake.org/files/v3.29/cmake-3.29.2-macos10.10-universal.tar.gz" + sha256: "0b542389345b28d2f73122b72ec9b899947e643fd86cf8f42bae2718884d2ad3" + Windows: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.2-windows-arm64.zip" + sha256: "5b16a0db4966c04582c40131038de49d5b0161fcd950dc9e955753dfab858882" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.2-windows-x86_64.zip" + sha256: "86b5de51f60a0e9d62be4d8ca76ea467d154083d356fcc9af1409606be341cd8" "3.29.0": Linux: armv8: @@ -18,6 +170,44 @@ sources: x86_64: url: "https://cmake.org/files/v3.29/cmake-3.29.0-windows-x86_64.zip" sha256: "9ab28eba1ab7911a0e57ab274f5990a283fffa1d22eb711792d5562e5869f9ef" + "3.28.6": + Linux: + armv8: + url: "https://cmake.org/files/v3.28/cmake-3.28.6-linux-aarch64.tar.gz" + sha256: "7909cc2128ce9442c63ce674a0bfb0e4f4ce04cef667d887e15ad5670d594ba7" + x86_64: + url: "https://cmake.org/files/v3.28/cmake-3.28.6-linux-x86_64.tar.gz" + sha256: "931e3c0d546ee03ca72bb147ccd9b49e3b6252f765f66bf21b9d165519940458" + Macos: + universal: + url: "https://cmake.org/files/v3.28/cmake-3.28.6-macos10.10-universal.tar.gz" + sha256: "cbda8e719b3239e304b339cdd90e946c09dac5ad2d57c93bf1b1d3914685d9a7" + Windows: + armv8: + url: "https://cmake.org/files/v3.28/cmake-3.28.6-windows-arm64.zip" + sha256: "63e4ebd2dadb5ad63faaf4ed38db40d3fec92d1b050d2a4e69011ea3ee699d29" + x86_64: + url: "https://cmake.org/files/v3.28/cmake-3.28.6-windows-x86_64.zip" + sha256: "a8f2e684ead94a64fd3517a38857a5b3f7f8d68d15c49ca1143d18797eaf9cac" + "3.28.5": + Linux: + armv8: + url: "https://cmake.org/files/v3.28/cmake-3.28.5-linux-aarch64.tar.gz" + sha256: "5b4a86b456058266bd4caa9c59187fab4b1ace823acdd9741d2d24fed5a4f50b" + x86_64: + url: "https://cmake.org/files/v3.28/cmake-3.28.5-linux-x86_64.tar.gz" + sha256: "c5460b8a0ecfea7c0ac99d78427e19409ea9133e29a604e1f8c0e6806a8f6934" + Macos: + universal: + url: "https://cmake.org/files/v3.28/cmake-3.28.5-macos10.10-universal.tar.gz" + sha256: "62956bf3c26b396cee20dddf2914d63d882cff4245e13c29c72f7841c03d56e4" + Windows: + armv8: + url: "https://cmake.org/files/v3.28/cmake-3.28.5-windows-arm64.zip" + sha256: "47056df28bc543c528f85f15c46180dbed750e5ebd0180f936a2e3ee22ddea56" + x86_64: + url: "https://cmake.org/files/v3.28/cmake-3.28.5-windows-x86_64.zip" + sha256: "0fbea146a782e4b82a799384a2109e46ce27f3ad70c30d3f8c9ef751e1e28040" "3.28.1": Linux: armv8: diff --git a/recipes/cmake/config.yml b/recipes/cmake/config.yml index 6f9c7e82ab831..1f33473eb51a7 100644 --- a/recipes/cmake/config.yml +++ b/recipes/cmake/config.yml @@ -1,6 +1,26 @@ versions: + "3.30.1": + folder: "binary" + "3.30.0": + folder: "binary" + "3.29.7": + folder: "binary" + "3.29.6": + folder: "binary" + "3.29.5": + folder: "binary" + "3.29.4": + folder: "binary" + "3.29.3": + folder: "binary" + "3.29.2": + folder: "binary" "3.29.0": folder: "binary" + "3.28.6": + folder: "binary" + "3.28.5": + folder: "binary" "3.28.1": folder: "binary" "3.27.9": 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 5f382aa287ad3..adaa64a423425 100644 --- a/recipes/cpp-dump/all/conandata.yml +++ b/recipes/cpp-dump/all/conandata.yml @@ -1,4 +1,10 @@ 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" "0.5.0": url: "https://github.com/philip82148/cpp-dump/archive/refs/tags/v0.5.0.tar.gz" sha256: "31fa8b03c9ee820525137be28f37b36e2abe7fd91df7d67681cb894db2230fe6" 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 ca7b2c3985d5e..d61439bae1bc3 100644 --- a/recipes/cpp-dump/config.yml +++ b/recipes/cpp-dump/config.yml @@ -1,3 +1,7 @@ versions: + "0.7.0": + folder: all + "0.6.0": + folder: all "0.5.0": folder: all diff --git a/recipes/cpp-httplib/all/conandata.yml b/recipes/cpp-httplib/all/conandata.yml index 55f4436e78089..0670cdc087177 100644 --- a/recipes/cpp-httplib/all/conandata.yml +++ b/recipes/cpp-httplib/all/conandata.yml @@ -1,31 +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 89c0fa2d0946b..c86ca5c2b8cb2 100644 --- a/recipes/cpp-httplib/config.yml +++ b/recipes/cpp-httplib/config.yml @@ -1,21 +1,21 @@ versions: - "0.15.3": + "0.18.0": folder: all - "0.15.2": + "0.17.3": folder: all - "0.15.1": + "0.17.1": folder: all - "0.14.3": + "0.16.3": folder: all - "0.14.2": + "0.16.0": folder: all - "0.14.1": + "0.15.3": folder: all - "0.14.0": + "0.14.3": folder: all - "0.13.3": + "0.14.1": folder: all - "0.13.1": + "0.13.3": folder: all "0.12.6": folder: all 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-sort/all/conandata.yml b/recipes/cpp-sort/all/conandata.yml index 48e5289632674..c155d44a961c8 100644 --- a/recipes/cpp-sort/all/conandata.yml +++ b/recipes/cpp-sort/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.16.0": + url: "https://github.com/Morwenn/cpp-sort/archive/1.16.0.tar.gz" + sha256: "54eb65de5655ce58719d45616f29e4b9060135b9cc8b526bcfc9f5434975ea8c" "1.15.0": url: "https://github.com/Morwenn/cpp-sort/archive/1.15.0.tar.gz" sha256: "886e813a4b87c6361e9b50c0a66c73b3b812f0ce0b7039ff3991eddce77e0dc7" diff --git a/recipes/cpp-sort/config.yml b/recipes/cpp-sort/config.yml index acbaa54fefe9c..ce014d3a22c71 100644 --- a/recipes/cpp-sort/config.yml +++ b/recipes/cpp-sort/config.yml @@ -1,4 +1,6 @@ versions: + "1.16.0": + folder: all "1.15.0": folder: all "1.14.0": diff --git a/recipes/cpp-yyjson/all/conandata.yml b/recipes/cpp-yyjson/all/conandata.yml new file mode 100644 index 0000000000000..acb24326f9a42 --- /dev/null +++ b/recipes/cpp-yyjson/all/conandata.yml @@ -0,0 +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 new file mode 100644 index 0000000000000..1e453082ca159 --- /dev/null +++ b/recipes/cpp-yyjson/all/conanfile.py @@ -0,0 +1,79 @@ +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 +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.52.0" + +class CppYyjsonConan(ConanFile): + name = "cpp-yyjson" + description = "Ultra-fast and intuitive C++ JSON reader/writer with yyjson backend" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/yosh-matsuda/cpp-yyjson" + topics = ("json", "reader", "writer", "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": "15", + "apple-clang": "14", + "Visual Studio": "17", + "msvc": "193", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + 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") + + 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 = [] + if is_msvc(self): + self.cpp_info.cxxflags.append("/Zc:preprocessor") + + self.cpp_info.set_property("cmake_file_name", "cpp_yyjson") + self.cpp_info.set_property("cmake_target_name", "cpp_yyjson::cpp_yyjson") diff --git a/recipes/cpp-yyjson/all/test_package/CMakeLists.txt b/recipes/cpp-yyjson/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..f2fd7795754c4 --- /dev/null +++ b/recipes/cpp-yyjson/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(cpp_yyjson REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE cpp_yyjson::cpp_yyjson) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/cpp-yyjson/all/test_package/conanfile.py b/recipes/cpp-yyjson/all/test_package/conanfile.py new file mode 100644 index 0000000000000..3a91c9439218e --- /dev/null +++ b/recipes/cpp-yyjson/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/cpp-yyjson/all/test_package/test_package.cpp b/recipes/cpp-yyjson/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..f4345c086ba90 --- /dev/null +++ b/recipes/cpp-yyjson/all/test_package/test_package.cpp @@ -0,0 +1,52 @@ +#include +#include +#include + +#include "cpp_yyjson.hpp" + +using namespace yyjson; + +auto json_str = R"( +{ + "id": 1, + "pi": 3.141592, + "name": "example", + "array": [0, 1, 2, 3, 4], + "currency": { + "USD": 129.66, + "EUR": 140.35, + "GBP": 158.72 + }, + "success": true +})"; + +int main() { + // Read JSON string and cast as an object class + auto obj = *read(json_str).as_object(); + + // Key access to the JSON object class + auto id = *obj["id"].as_int(); + auto pi = *obj["pi"].as_real(); + auto name = *obj["name"].as_string(); + auto success = *obj["success"].as_bool(); + + // JSON array/object classes adapt the range concept + auto list = *obj["array"].as_array(); + for (const auto& v : list) { + // `write` returns JSON read-only string + std::cout << v.write() << std::endl; + } + + // The range value type of object class is a key-value pair + auto dict = *obj["currency"].as_object(); + for (const auto& [k, v] : dict) { + std::cout << "{" << k << ": " << v.write() << "}" << std::endl; + } + + // JSON array/object to container conversion + auto numbers = cast>(list); + auto currency = cast>(dict); + + // Stringify read-only string + std::cout << obj.write() << std::endl; +} diff --git a/recipes/cpp-yyjson/config.yml b/recipes/cpp-yyjson/config.yml new file mode 100644 index 0000000000000..33d7618432d30 --- /dev/null +++ b/recipes/cpp-yyjson/config.yml @@ -0,0 +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 0e4ce7f0c9324..8d322ee34302a 100644 --- a/recipes/cppcheck/all/conandata.yml +++ b/recipes/cppcheck/all/conandata.yml @@ -1,10 +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.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/all/conanfile.py b/recipes/cppcheck/all/conanfile.py index fa5b72926399e..50b0c8fbb19de 100644 --- a/recipes/cppcheck/all/conanfile.py +++ b/recipes/cppcheck/all/conanfile.py @@ -66,8 +66,8 @@ def package_info(self): self.cpp_info.libdirs = [] bin_folder = os.path.join(self.package_folder, "bin") - self.output.info(f"Append {bin_folder} to environment variable PATH") self.env_info.PATH.append(bin_folder) + cppcheck_htmlreport = os.path.join(bin_folder, "cppcheck-htmlreport") self.env_info.CPPCHECK_HTMLREPORT = cppcheck_htmlreport self.runenv_info.define_path("CPPCHECK_HTMLREPORT", cppcheck_htmlreport) diff --git a/recipes/cppcheck/config.yml b/recipes/cppcheck/config.yml index b1367265202bb..494b8f5cd4792 100644 --- a/recipes/cppcheck/config.yml +++ b/recipes/cppcheck/config.yml @@ -1,7 +1,9 @@ versions: - "2.13.4": + "2.15.0": + folder: all + "2.14.2": folder: all - "2.13.3": + "2.13.4": folder: all "2.12.1": folder: all diff --git a/recipes/cpprestsdk/all/conanfile.py b/recipes/cpprestsdk/all/conanfile.py index c75c41fcad7c4..c8ac42529d53c 100644 --- a/recipes/cpprestsdk/all/conanfile.py +++ b/recipes/cpprestsdk/all/conanfile.py @@ -112,7 +112,13 @@ def package_info(self): # cpprestsdk_boost_internal self.cpp_info.components["cpprestsdk_boost_internal"].set_property("cmake_target_name", "cpprestsdk::cpprestsdk_boost_internal") self.cpp_info.components["cpprestsdk_boost_internal"].includedirs = [] - self.cpp_info.components["cpprestsdk_boost_internal"].requires = ["boost::boost"] + ## List of Boost components cpprestsdk depends on: + ## see https://github.com/microsoft/cpprestsdk/blob/v2.10.19/Release/cmake/cpprest_find_boost.cmake#L77-L106 + self.cpp_info.components["cpprestsdk_boost_internal"].requires = ["boost::headers", "boost::system"] + if self.settings.os != "Windows": + self.cpp_info.components["cpprestsdk_boost_internal"].requires.extend(["boost::random", "boost::thread", "boost::filesystem", "boost::chrono", "boost::atomic"]) + if self.settings.os != "Android": + self.cpp_info.components["cpprestsdk_boost_internal"].requires.extend(["boost::date_time", "boost::regex"]) # cpprestsdk_openssl_internal self.cpp_info.components["cpprestsdk_openssl_internal"].set_property("cmake_target_name", "cpprestsdk::cpprestsdk_openssl_internal") self.cpp_info.components["cpprestsdk_openssl_internal"].includedirs = [] diff --git a/recipes/cpptrace/all/conandata.yml b/recipes/cpptrace/all/conandata.yml index 82140c1347a01..dcee072fe65ad 100644 --- a/recipes/cpptrace/all/conandata.yml +++ b/recipes/cpptrace/all/conandata.yml @@ -1,57 +1,32 @@ sources: - # Newer versions at the top - "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.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" + sha256: "02a0540b5b1be0788565f48b065b456d3eab81ae2323a50e75ed36449a0143ed" + "0.6.1": + 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" + sha256: "7c2996f03d15f61016bc81fe7fa5220b1cc42498333c5c0e699ad2f96b918b96" + # 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 f0aee2a68a632..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 @@ -21,10 +21,12 @@ class CpptraceConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "unwind": ["default", "libunwind"], } default_options = { "shared": False, "fPIC": True, + "unwind": "default", } @property @@ -43,10 +45,12 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) >= Version("0.4.0"): + if Version(self.version) >= "0.4.0": self.requires("libdwarf/0.9.1") else: self.requires("libdwarf/0.8.0") + if self.options.unwind == "libunwind": + self.requires("libunwind/1.8.0", transitive_libs=True) def validate(self): if self.settings.compiler.cppstd: @@ -63,13 +67,16 @@ def generate(self): tc = CMakeToolchain(self) if is_msvc(self): tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) - if Version(self.version) >= Version("0.3.0"): + if Version(self.version) >= "0.3.0": tc.variables["CPPTRACE_USE_EXTERNAL_LIBDWARF"] = True tc.variables["CPPTRACE_CONAN"] = True else: if not self.options.shared: tc.variables["CPPTRACE_STATIC"] = True 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() @@ -88,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<