Skip to content
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
wants to merge 55 commits into from

Conversation

gdesmott
Copy link

@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

Guillaume Desmottes added 30 commits April 30, 2020 09:54
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.
Guillaume Desmottes and others added 25 commits June 19, 2020 15:12
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
@gdesmott
Copy link
Author

Was meant for https://github.com/gdesmott/system-deps/ sorry

@gdesmott gdesmott closed this Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error: lint unused_doc_comment has been renamed to unused_doc_comments
2 participants