add support for pkgconf_cross_personality_t.want_default_pure

pull/216/head
Ariadne Conill 2021-03-18 05:59:54 -06:00
parent 52d19e1b9e
commit f9531ce9fe
4 changed files with 6 additions and 1 deletions

View File

@ -1040,7 +1040,7 @@ main(int argc, char *argv[])
* this allows for a --static which searches private modules, but has the same fragment behaviour as if
* --static were disabled. see <https://github.com/pkgconf/pkgconf/issues/83> for rationale.
*/
if ((want_flags & PKG_PURE) == PKG_PURE || getenv("PKG_CONFIG_PURE_DEPGRAPH") != NULL)
if ((want_flags & PKG_PURE) == PKG_PURE || getenv("PKG_CONFIG_PURE_DEPGRAPH") != NULL || personality->want_default_pure)
want_client_flags &= ~PKGCONF_PKG_PKGF_MERGE_PRIVATE_FRAGMENTS;
if ((want_flags & PKG_ENV_ONLY) == PKG_ENV_ONLY)

View File

@ -204,6 +204,7 @@ struct pkgconf_cross_personality_ {
char *sysroot_dir;
bool want_default_static;
bool want_default_pure;
};
/* client.c */

View File

@ -156,6 +156,7 @@ static const personality_keyword_pair_t personality_keyword_pairs[] = {
{"SystemIncludePaths", personality_fragment_func, offsetof(pkgconf_cross_personality_t, filter_includedirs)},
{"SystemLibraryPaths", personality_fragment_func, offsetof(pkgconf_cross_personality_t, filter_libdirs)},
{"Triplet", personality_copy_func, offsetof(pkgconf_cross_personality_t, name)},
{"WantDefaultPure", personality_bool_func, offsetof(pkgconf_cross_personality_t, want_default_pure)},
{"WantDefaultStatic", personality_bool_func, offsetof(pkgconf_cross_personality_t, want_default_static)},
};

View File

@ -76,6 +76,9 @@ include files.
A list of directories that are included by default in the search path for
libraries.
(mandatory; fragment list)
.It WantDefaultPure
If true, pkgconf will default to preferring a pure dependency graph.
(optional; boolean; default is false)
.It WantDefaultStatic
If true, pkgconf will default to operating in static linking mode.
(optional; boolean; default is false)