mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-04-26 02:00:39 +02:00
recursive_fill_list() is used to order Requires and Requires.private, but it relied on fill_one_level() to make the list adjustments as it descended the package tree. There were two issues with this approach: 1. It added all the dependencies from a package immediately rather than descending through each dependency first. This made it sort of mix between depth- and breadth-first resolving. 2. It did not add the requested package to the list, forcing the caller to add it. This simplifies the code so that it descends all the way to the least dependent package and prepends them as it unwinds. This ensures the ordering will be sorted from most dependent to least dependent package. Ordering of -l flags is corrected by a later sorting, but this fixes ordering on non-l flags. Add a new test specifically for non-l Libs flags. Freedesktop #34504
25 lines
928 B
Bash
Executable file
25 lines
928 B
Bash
Executable file
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
. ${srcdir}/common
|
|
|
|
# expect cflags from requires-test and public-dep
|
|
RESULT="-I/requires-test/include -I/public-dep/include -I/private-dep/include"
|
|
run_test --cflags requires-test
|
|
|
|
# still expect those cflags for static linking case
|
|
RESULT="-I/requires-test/include -I/public-dep/include -I/private-dep/include"
|
|
run_test --static --cflags requires-test
|
|
|
|
# expect libs for just requires-test and public-dep
|
|
if [ "$list_indirect_deps" = "yes" ]; then
|
|
RESULT="-L/requires-test/lib -L/public-dep/lib -L/private-dep/lib -lrequires-test -lpublic-dep -lprivate-dep"
|
|
else
|
|
RESULT="-L/requires-test/lib -L/public-dep/lib -lrequires-test -lpublic-dep"
|
|
fi
|
|
run_test --libs requires-test
|
|
|
|
# expect libs for requires-test, public-dep and private-dep in static case
|
|
RESULT="-L/requires-test/lib -L/public-dep/lib -L/private-dep/lib -lrequires-test -lpublic-dep -lprivate-dep"
|
|
run_test --static --libs requires-test
|