From f03ec3ff90ee619a21826d23609adb5409dbe9a2 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 18 Mar 2018 15:46:53 -0500 Subject: [PATCH] libpkgconf: add support for proposed Requires.internal extension --- NEWS | 8 ++++++++ libpkgconf/pkg.c | 1 + tests/requires.sh | 20 +++++++++++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 43901ec..e06fbae 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,14 @@ Changes from previous version of pkgconf ======================================== +Changes from 1.4.2 to 1.5.0: +--------------------------- + +* Enhancements: + - pkgconf now supports the proposed Requires.internal pkg-config extension, + by merging it with the Requires.private list (there is no functional difference + between the two in our resolver implementation) + Changes from 1.4.1 to 1.4.2: ---------------------------- diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c index 83668b9..f534832 100644 --- a/libpkgconf/pkg.c +++ b/libpkgconf/pkg.c @@ -182,6 +182,7 @@ static const pkgconf_pkg_parser_keyword_pair_t pkgconf_pkg_parser_keyword_funcs[ {"Name", pkgconf_pkg_parser_tuple_func, offsetof(pkgconf_pkg_t, realname)}, {"Provides", pkgconf_pkg_parser_dependency_func, offsetof(pkgconf_pkg_t, provides)}, {"Requires", pkgconf_pkg_parser_dependency_func, offsetof(pkgconf_pkg_t, required)}, + {"Requires.internal", pkgconf_pkg_parser_dependency_func, offsetof(pkgconf_pkg_t, requires_private)}, {"Requires.private", pkgconf_pkg_parser_dependency_func, offsetof(pkgconf_pkg_t, requires_private)}, {"Version", pkgconf_pkg_parser_tuple_func, offsetof(pkgconf_pkg_t, version)}, }; diff --git a/tests/requires.sh b/tests/requires.sh index ea20c3c..ab76eea 100755 --- a/tests/requires.sh +++ b/tests/requires.sh @@ -11,7 +11,9 @@ tests_init \ static_cflags \ private_duplication \ libs_static2 \ - missing + missing \ + requires_internal \ + requires_internal_missing libs_body() { @@ -86,3 +88,19 @@ missing_body() -o inline:"\n" \ pkgconf --cflags missing-require } + +requires_internal_body() +{ + atf_check \ + -o inline:"-lbar -lbar-private -L/test/lib -lfoo \n" \ + pkgconf --with-path="${selfdir}/lib1" --static --libs requires-internal +} + +requires_internal_missing_body() +{ + atf_check \ + -s exit:1 \ + -e ignore \ + -o ignore \ + pkgconf --with-path="${selfdir}/lib1" --static --libs requires-internal-missing +}