Add quirks for libmgba-dev
Some of these are workarounds for bugs in the package which should be fixed, but for now this MR should serve to unblock the analysis.
-
patches/libmgba-dev.patch
: Fix mismatchedCXX_GUARD_START
in.../renderers/video-software.h
. Will report upstream. -
mgba-util/png-io.h
does#undefine restrict
, so it cannot be processed in the same run as any headers that userestrict
. Worked around using a virtual package to processpng-io.h
separately from the other headers. - Added
libpng-dev
and definedUSE_PNG
forpng-io.h
. - Added
mgba-util/common.h
topreamble
as it should be included before any other headers. - Defined
HAVE_LOCALE
to avoid a conflicting redefinition oflocale_t
. - Skipped foreign platform headers under
platform/*/*.h
. These are included conditionally by platform detection macros in (for example)mgba-util/threading.h
and are not meant to be included directly. Will consider fixing libmgba-dev to exclude those headers that are unusable on Debian, but they should be harmless.