summaryrefslogtreecommitdiff
path: root/docs/markdown/Wrap-dependency-system-manual.md
AgeCommit message (Collapse)Author
2025-12-22docs: add release notes for rust.workspace()Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-12-08cargo: autodetect patch directoryPaolo Bonzini
Many crates that have a build.rs will usually require an overlay with the translated meson/meson.build file. To avoid having to create a .wrap file, when parsing Cargo.lock autodetect a directory in subproject/packagefiles/ and add it as the patch_directory. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-10-23cargo: use both_libraries when appropriatePaolo Bonzini
Fixes: #15028
2025-10-17cargo: define 'features' variable to be used in meson/meson.buildXavier Claessens
2025-10-17cargo: document that it is recommended to use workspacesXavier Claessens
2025-08-01cargo: Use -rs suffix only for rust ABIXavier Claessens
A cargo package can build multiple crate types for the same library. Using the same name in meson.override_dependency() fails. [pbonzini: adjust documentation]
2024-11-06Check for uppercase 'head' when updating subprojectsandy5995
2024-10-24cargo: Fix feature resolutionXavier Claessens
Introduce a global Cargo interpreter state that keeps track of enabled features on each crate. Before generating AST of a Cargo subproject, it downloads every sub-subproject and resolves the set of features enabled on each of them recursively. When it later generates AST for one its dependencies, its set of features and dependencies is already determined.
2024-10-11cargo: Document that cargo subprojects is an experimental featureXavier Claessens
2024-09-19Fix typosspaette
2024-09-11Fix typosspaette
2024-06-14cargo: Load Cargo.lockXavier Claessens
Cargo.lock is essentially identical to subprojects/*.wrap files. When a (sub)project has a Cargo.lock file this allows automatic fallback for its cargo dependencies.
2024-03-15cargo: Add API version into dependency nameXavier Claessens
2024-02-26cargo: Call into meson subdir if it existsXavier Claessens
This allows projects to manually add extra rust args and deps. This is intended to replace build.rs logic.
2024-02-26cargo: Abort if features are missingXavier Claessens
2024-02-26cargo: Expose features as Meson boolean optionsXavier Claessens
2023-10-09interpreter: Add support for cargo subprojectXavier Claessens
2023-09-22Allow to fallback to cmake subprojectXavier Claessens
The method can be overridden by setting the `method` key in the wrap file and always defaults to 'meson'. cmake.subproject() is still needed in case specific cmake options need to be passed. This also makes it easier to extend to other methods in the future e.g. cargo.
2023-09-05wrap: Use MESON_PACKAGE_CACHE_DIR as default packagecache pathXavier Claessens
Allow packagecache to contain already extracted directory to match what some distro does with Cargo source packages in /usr/share/cargo/registry. Note that there is no need to lock the cache directory because we download into a temporary name and atomically rename afterward. It means we could be downloading the same file twice, but at least integrity is guaranteed. Fixes: #12211
2022-07-13docs: Suggest using depth=1 by default for wrap-gitPhilip Withnall
It saves bandwidth and disk usage on downloaded subprojects, and people very rarely need more than the single commit they’re using. Add `depth=1` to the `[wrap-git]` examples in the rest of the documentation, to make it more likely that people will copy-and-paste it into their `.wrap` files. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-06-07wrap: Add support for applying a list of patch filesPaweł Marczewski
Co-authored-by: Xavier Claessens <xavier.claessens@collabora.com>
2021-04-26Interpreter: Fallback when required is false but forcefallback is trueXavier Claessens
2021-01-31Capitalize "Meson" consistently as it is a proper name. [skip ci]Jussi Pakkanen
2021-01-30Rewrap long text lines in docs. [skip ci]Jussi Pakkanen
2021-01-13Fix misspellsAntonin Décimo
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2020-10-08dependency: support boolean argument "allow_fallback"Paolo Bonzini
Sometimes, distros want to configure a project so that it does not use any bundled library. In this case, meson.build might want to do something like this, where slirp is a combo option with values auto/system/internal: slirp = dependency('', required: false) if get_option('slirp') != 'internal' slirp = dependency('slirp', required: get_option('slirp') == 'system') endif if not slirp.found() slirp = subproject('libslirp', ...) .variable('...') endif and we cannot use "fallback" because the "system" value should never look for a subproject. This worked until 0.54.x, but in 0.55.x this breaks because of the automatic subproject search. Note that the desired effect here is backwards compared to the policy of doing an automatic search on "required: true"; we only want to do the search if "required" is false! It would be possible to look for the dependency with `required: false` and issue the error manually, but it's ugly and it may produce an error message that looks "different" from Meson's. Instead, with this change it is possible to achieve this effect in an even simpler way: slirp = dependency('slirp', required: get_option('slirp') != 'auto', allow_fallback: get_option('slirp') == 'system' ? false : ['slirp', 'libslirp_dep']) The patch also adds support for "allow_fallback: true", which is simple and enables automatic fallback to a wrap even for non-required dependencies.
2020-07-09doc: Small tweaks to fallback documentation [skip ci]Xavier Claessens
2020-07-05doc: Improve documentation of [provide] section in wrap filesXavier Claessens
Explicitly document the behaviour of dependency('foo-1.0', required: false).
2020-07-01wrap: Update doc to give dependency_names example firstXavier Claessens
2020-07-01Fix typo: coma->commaXavier Claessens
2020-07-01find_program: Fallback if a wrap file provide the program nameXavier Claessens
We don't need the legacy variable name system as for dependency() fallbacks because meson.override_find_program() is largely used already, so we can just rely on it.
2020-07-01wrap: Add special 'dependency_names' key in [provide] sectionXavier Claessens
The value for that key must be a coma separated list of dependecy names provided by that subproject, when no variable name is needed because the subproject uses override_dependency().
2020-07-01wrap: Add 'provide' sectionXavier Claessens
2020-06-30wrap: Apply patch even in VCS casesXavier Claessens
2020-06-21wrap: Add patch_directory supportXavier Claessens
Copy a tree instead of extracting an archive. Closes: #7216
2020-04-25wrap: Updated docsDaniel Mensinger
2020-04-13wrap: Add fallback urlsXavier Claessens
It can happen that a server is temporaly down, tarballs often have many mirrors available so we should be able to add at least one fallback mirror in wrap files.
2020-01-08mention lack of up-to-date dependencies explicitly [skip ci]Vadim Zhukov
Requested by scivision@
2020-01-08[skip ci] Use more up-to-date wording for package managersVadim Zhukov
Most of the OSes Meson supports actually do have package managers, and at least some of them are not harder to use than Linux ones.
2019-11-08docs: major revamp of the Wrap format description [skip ci]Eli Schwartz
The current state of this manual can best be described as... confusing. The flow of the page jumps from one topic to the next without ever actually telling you what you can do, so it's almost impossible to keep track of what is supported, while instead going into involved derails about why you'd want to use a wrap, and scattering some (but not all) information throughout the promo material. The most important changes this rewrite does (aside from turning supported keys into a list of bullet points) is adding documentation for the lead_directory_missing property, and mentioning that wrap-hg and wrap-svn exist. I had to find out all of this by reading the source code implementation, so let's try to save other people the effort. Other miscellania: as per @jpakkane's comment, take the opportunity to point out that wrap dependencies are also useful on Linux, in cases where your distro doesn't have a new enough version of "$dependency". It's a fairly common problem outside of select rolling-release distros, so well worth mentioning.
2019-09-29Add support for `depth` option in wrap-gitChristoph Weiss
This allows cloning subprojects shallowly. It works recursively for a subproject's submodules in case `clone-recursive` is set to `true`.
2018-10-21doc: Improve wrap and subproject documentation [skip ci]Kostiantyn Ponomarenko
Make docs more user friendly, and add missing information. Signed-off-by: Kostiantyn Ponomarenko <konstantin.ponomarenko@gmail.com>
2018-10-17wrap: Allow source and patch to be local filesXavier Claessens
It is sometimes important to be able to build projects offline, in that case subproject tarballs and patches could be shipped directly within the project's repository.
2018-09-30Docs: fix 'Wrap-dependency-system-manual' to be more consistent [skip ci]Kostiantyn Ponomarenko
2018-09-16Add 'clone-recursive' option for git wrapsAndrei Alexeyev
This causes Meson to clone the repo with the --recursive flag, pulling all of the submodules automatically.
2018-04-25Wrap-git files can have tags as well as commit ids. [skip ci]Jussi Pakkanen
2017-11-06Small changes for syntax hightlightDavid Pérez-Suárez
2017-08-21Rewrapped lines of a few more files.Jussi Pakkanen
2017-05-05Fix missing backticksSven Steinbauer
2017-05-03doc: Use https links wherever possible.Elliott Sales de Andrade