mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-02-04 16:30:26 +01:00
Prior to commit6ecf318, the resolved list of required packages was built in an appending way where each package on the command line or in Requires would appear in the list in the order they appeared. With6ecf318, that list building was changed to prepending, which had a subtle change on the resolved order. For example, suppose package a has "Requires: b c d". Previously, the list would be built as a->b->c->d by appending each as they were encountered. Now, the list is built by walking all the way down the dependency chain for each package in a depth first manner and prepending packages while unwinding. This would result in the package ilst being a->d->c->b. This same effect happens with the command line packages where previously requesting packages x and y would create a package list of x->y and now produces a list of y->x. While technically these should be the same since there are no interdependencies, it's causes flags to be output in different order than previously in pkg-config. This can be seen most readily in the check-gtk test. Instead, operate on the package lists backwards when building the resolved package list.
24 lines
754 B
Bash
Executable file
24 lines
754 B
Bash
Executable file
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
. ${srcdir}/common
|
|
|
|
# expect cflags from requires-test and public-dep
|
|
RESULT="-I/requires-test/include -I/private-dep/include -I/public-dep/include"
|
|
run_test --cflags requires-test
|
|
run_test --static --cflags requires-test
|
|
|
|
# expect libs for just requires-test and public-dep
|
|
RESULT="-L/requires-test/lib -L/public-dep/lib -lrequires-test -lpublic-dep"
|
|
if [ "$list_indirect_deps" = no ]; then
|
|
run_test --libs requires-test
|
|
fi
|
|
|
|
# expect libs for requires-test, public-dep and private-dep in static case
|
|
RESULT="-L/requires-test/lib -L/private-dep/lib -L/public-dep/lib \
|
|
-lrequires-test -lprivate-dep -lpublic-dep"
|
|
if [ "$list_indirect_deps" = yes ]; then
|
|
run_test --libs requires-test
|
|
fi
|
|
run_test --static --libs requires-test
|