-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow to override libname using version features #16
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix std::error::Error::description deprecation warning.
Some libraries, such as glib-2.0, include a version number in their name in order to support parallel installation of multiple major versions. Such name can't be used as a toml key so we need a way to override it manually.
Allow user to specificy different versions depending on enabled features. This is especially useful for -sys crates aiming to not hard depend on the latest version of the C library they are wrapping.
For some reason pkg-config-rs sets PKG_CONFIG_ALLOW_SYSTEM_LIBS by default, breaking uninstalled builds, see rust-lang/pkg-config-rs#35 Users should manually enable this if needed, by defining the env variable, and should not be enforced by the build system.
Will allow us to easily test internal methods.
This is useful for users of -sys crates which may need to access to those headers, see https://kornel.ski/rust-sys-crate#headers We are going to extend this to export flags directly instead of relying on pkg-config to do so.
It's anoying when hacking, we can enforce not having any warning as a policy.
Will be needed as we are about to give more control to what's exported or not. Also allow us to test what's exported to cargo.
Setting env variables isn't convenient in tests are they are shared among all instances when running in parallel.
Have the exact same API for now. This will be needed if/when we'll want to support no pkg-config libs.
Can be used to fully by-pass pkg-config and rely solely on override variables.
Better to return actual errors.
Will be used to define custom build functions. This is an API change so we should bump the major version when releasing.
Allow users to trigger an internal build of a system lib using standarized env variables.
Prevent clash with metadeps meta formats. Also, hopefully we'll no longer be pkg-config specific.
It's actually mandator, see https://doc.rust-lang.org/cargo/reference/manifest.html#the-metadata-table
Can be used to control the internal build of all deps. ix #2
We need it when looking for the generated .pc file.
Make code safer as we stop duplicating env variables strings around. Will also make it easier to exhaustively list all the variables supported.
The flags order isn't guaranteed as it depends of the hash table internal storage.
Replace feature-versions dict by a more generic syntax which will allow us to define more version-specific fields.
Currently we can only override versions but I'm about to add names
Was meant for https://github.com/gdesmott/system-deps/ sorry |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@sdroege : finally had some time to work on this. Still have to test with gst and port the generator but you can already take a look to check if that matches what you had in mind. :)
Fix #11