swayimg: declare CXX -- it is a C++ project and my scoping missed that
meson.build:3 is project('swayimg', 'c', 'cpp', ...) with cpp_std=c++20 and about thirty .cpp sources. The scoping pass enumerated every dependency() call carefully and never read the project() line, so the estimate said 'one new package, LuaJIT' when the truth is one new package AND a C++ toolchain requirement. The libraries were right; the language was never looked at.
Fixed the same way core/gperf does it -- CXX is not builder-owned, because the refusal list is derived from the assignments the builder emits and it emits no C++ one, so a package may declare its own. swayimg is the second package in the channel to need it.
Builds and installs. The binary self-reports version 5.5 with png among its supported formats, so the one decoder that was configured in is present.
Worth recording that a prediction of mine came out NEGATIVE: I expected C++ might drag in the DWARF unwinder that LuaJIT needed, since exceptions use the same machinery. It did not -- swayimg links clean without -lunwind.
src/core/packages/viewer.sgl | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)src/core/packages/viewer.sglmodified
dependencies: (list libxkbcommon fontconfig freetype wayland wayland-protocols libpng luajit expat zlib libffi) ;; SWAYIMG IS A C++ PROJECT, AND I MISSED THAT WHEN SCOPING IT. ;; ;; `meson.build:3` is `project('swayimg', 'c', 'cpp', ...)` with ;; `cpp_std=c++20` and roughly thirty `.cpp` sources. My scoping pass ;; enumerated every `dependency()` call carefully and never read the ;; `project()` line, so the estimate said "one new package, LuaJIT" when ;; the truth is one new package AND a C++ toolchain requirement. The ;; libraries were right; the LANGUAGE was not looked at. ;; ;; The failure is loud and names itself, at least: ;; ;; meson.build:3:0: ERROR: Unknown compiler(s): ;; [['c++'], ['g++'], ['clang++'], ['nvc++'], ['pgc++'], ...] ;; ;; meson probes for a C++ compiler BY NAME and the toolchain ships ;; none, so it falls through every candidate. `CXX` is not ;; builder-owned -- the refusal list is derived from what the builder ;; emits and it emits no C++ assignment -- so a package may declare ;; one, and meson honours `CXX` for the cpp language. This is the same ;; mechanism `core/gperf` uses and the second package in the channel to ;; need it. The explicit `-target` is required by the zig guard. env: (list (cons "CXX" "zig c++ -target x86_64-linux-musl")) build-inputs: (list meson samurai python) phases: (list (external-phase