Skip to content

Commit

Permalink
libpkgconf: add support for proposed Requires.internal extension
Browse files Browse the repository at this point in the history
  • Loading branch information
kaniini committed Mar 18, 2018
1 parent 30f7a96 commit f03ec3f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
8 changes: 8 additions & 0 deletions 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:
----------------------------

Expand Down
1 change: 1 addition & 0 deletions libpkgconf/pkg.c
Expand Up @@ -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)},
};
Expand Down
20 changes: 19 additions & 1 deletion tests/requires.sh
Expand Up @@ -11,7 +11,9 @@ tests_init \
static_cflags \
private_duplication \
libs_static2 \
missing
missing \
requires_internal \
requires_internal_missing

libs_body()
{
Expand Down Expand Up @@ -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
}

0 comments on commit f03ec3f

Please sign in to comment.