Wire up VULKAN_HEADERS_ENABLE_TESTS, though it doesn't make an actual
difference here because nothing gets built in src_compile anyway, but
let's have it here to silence a QA check I have locally and also in case
it does something in future.
(vulkan-headers does have a tiny testsuite, just VULKAN_HEADERS_ENABLE_TESTS
isn't needed as-is to make it run.)
Signed-off-by: Sam James <sam@gentoo.org>
Since upstream commit 134337d7fe8813a041fd66dbde11389ebd7dd874, vulkan-loader
should be a test-only dep for our purposes.
Signed-off-by: Sam James <sam@gentoo.org>
USE=minimal was never actually minimal, and nobody noticed or cared.
Even if I fix it to work, the end result produces a difference of:
```
* SIZE: 1.35MiB -> 1.51MiB, 4 -> 14 files
* ------> FILES(+10) SONAME(+1) SIZE(+12.01%)
```
"minimal" is generally an antipattern, and there's no compelling reason
to fix it so we can keep it (or even keep it at all, if it had worked).
It's also conceptually broken today, since any software that links to
the library needs to depend on `dev-util/dialog:=[-minimal]`. And
nothing does -- but at minimum sys-block/whdd would need to.
Historically, the library support was added for bug 266065, and from its
first addition was behind a USE flag. No real argument was given for why
it should be a USE flag, it just kinda "was" that way.
So what was the problem?
`foo && bar || baz` is a mindworm. If bar fails, both bar and baz get
run. The correct grammatical construct is an if/then/else statement, no
(or rare) exceptions.
More on that at https://mywiki.wooledge.org/BashPitfalls#pf22
In this case, we run `default_src_install`, which internally invokes
make install, and then also always run emake install-full, even for
minimal builds.
The reason is because portage is absolutely full of this too. It
constantly runs things like `[[ -n ${VAR} ]] && do_thing_with "${VAR}"`
or else `use foo && bar`. The return value is therefore 1, but no "die"
was called so it "rarely ever matters". Here the issue is that
`default_src_install` finishes by running `einstalldocs`, which
error-returns if there are no docs.
The general rule of thumb is: assume ALL functions defined by PMS or an
eclass *can* and *will* return nonzero at total whimsy unless explicitly
documented to have explicit return values explicitly intended for
explicit testing (such as `use`).
If you write your own ebuild-local functions, then good job, you! You
may assume they are sanely written (because you wrote them), rather than
assuming they are written in `die`-centric ebuildism code golf.
And finally, for bonus points:
Even without install-full, a static library is installed by bad
autoconf-dickey macros. Fixing the install rule only solves 7 out of 8
files.
Bug: https://bugs.gentoo.org/266065
Closes: https://bugs.gentoo.org/958297
Closes: https://github.com/gentoo/gentoo/pull/42641
Acked-by: Sam James <sam@gentoo.org>
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>