mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-02-05 05:20:29 +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.
13 lines
308 B
Bash
Executable file
13 lines
308 B
Bash
Executable file
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
. ${srcdir}/common
|
|
|
|
RESULT="-I/non-l/include -I/non-l-required/include"
|
|
run_test --cflags non-l-required non-l
|
|
run_test --cflags --static non-l-required non-l
|
|
|
|
RESULT="/non-l.a /non-l-required.a -pthread"
|
|
run_test --libs non-l-required non-l
|
|
run_test --libs --static non-l-required non-l
|