build: Use Meson’s module for building .pc files
Using the module will prevent trivial bugs caused by incorrect string concatenation.
This is just a literal translation. In the future we might rely on Meson auto-detecting fields from library declaration.
Fixes: #3517 (closed)
Compared the pkg-config files with Meld and there are some minor differences including:
-
Requires
are comma-separated -
cairo
is removed fromRequires.private
by Meson’s deduplication. - the space in
targets
is escaped -
exec_prefix=${prefix}
is missing as it is not really used with Meson -
Libs.private:
is not added whengdk_extra_libs
is empty - whitespace changes
I do not expect any issues from these except maybe the targets
escaping.