meson/test cases/linuxlike
Eli Schwartz 398c4b2287
dependencies: allow get_variable to define multiple pkgconfig defines
It was previously impossible to do this:

```
dep.get_pkgconfig_variable(
    'foo',
    define_variable: ['prefix', '/usr', 'datadir', '/usr/share'],
)
```

since get_pkgconfig_variable mandated exactly two (if any) arguments.

However, you could do this:
```
dep.get_variable(
    'foo',
    pkgconfig_define: ['prefix', '/usr', 'datadir', '/usr/share'],
)
```

It would silently do the wrong thing, by defining "prefix" as
`/usr=datadir=/usr/share`, which might not "matter" if only datadir was
used in the "foo" variable as the unmodified value might be adequate.

The actual intention of anyone writing such a meson.build is that they
aren't sure whether the .pc file uses ${prefix} or ${datadir} (or which
one gets used, might have changed between versions of that .pc file,
even).

A recent refactor made this into a hard error, which broke some projects
that were doing this and inadvertently depending on some .pc file that
only used the second variable. (This was "fine" since the result was
essentially meaningful, and even resulted in behavior identical to the
intended behavior if both projects were installed into the same prefix
-- in which case there's nothing to remap.)

Re-allow this. There are two ways we could re-allow this:
- ignore it with a warning
- add a new feature to allow actually doing this

Since the use case which triggered this bug actually has a pretty good
reason to want to do this, it makes sense to add the new feature.

Fixes https://bugs.gentoo.org/916576
Fixes https://github.com/containers/bubblewrap/issues/609
2023-11-14 14:59:12 -05:00
..
1 pkg-config dependencies: allow get_variable to define multiple pkgconfig defines 2023-11-14 14:59:12 -05:00
2 external library compiler: allow non-built internal dependencies as arguments 2020-11-24 00:03:35 +02:00
3 linker script tests: fix broken promises with linker scripts 2023-09-25 23:50:40 -04:00
4 extdep static lib Use strict function prototypes 2019-11-18 22:21:36 +02:00
5 dependency versions fix various spelling issues 2023-04-11 19:21:05 -04:00
6 subdir include order Use strict function prototypes 2019-11-18 22:21:36 +02:00
7 library versions test: merge installed_files.txt into test.json 2020-02-25 21:47:42 +01:00
8 subproject library install test: merge installed_files.txt into test.json 2020-02-25 21:47:42 +01:00
9 compiler checks with dependencies Use strict function prototypes 2019-11-18 22:21:36 +02:00
10 large file support Skip some linuxlike tests which don't work on Cygwin 2017-04-06 22:48:02 +01:00
11 runpath rpath ldlibrarypath Re-enable "11 runpath rpath ldlibrarypath" 2023-08-30 20:41:54 -04:00
12 subprojects in subprojects Use strict function prototypes 2019-11-18 22:21:36 +02:00
13 cmake dependency Disable failing test on cygwin due to broken cmake 2023-08-30 19:30:00 -04:00
14 static dynamic linkage Fix 'linuxlike/14 static dynamic linkage' test on Cygwin 2020-02-27 16:33:21 -08:00
15 ld binary Added warning if run_command is called without the check kwarg 2021-10-30 22:26:28 -04:00