The mGBA package provides a GBA emulator. It can also be used with other emulators.
CMake, libepoxy, libpng, and libzip-1.11.4
desktop-file-utils, FFmpeg, Lua, Qt-6 and/or sdl2-compat (for the frontends), and SQLite
Install mGBA by running the following commands:
mkdir build &&
cd build &&
cmake -D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_SKIP_INSTALL_RPATH=ON \
-D SKIP_GIT=ON \
-G Ninja .. &&
ninja
Now, as the root user:
ninja install &&
mv -v /usr/share/doc/mGBA{,-97c4de}
This version of mGBA has a problem with OpenGL and the Qt GUI. On Wayland, mGBA will complain that it can't create an appropriate display device. This is because it fails to create an OpenGL display. When running the Qt GUI, you must run it with QT_QPA_PLATFORM=xcb mgba-qt, forcing XCB windowing for Qt. This will make OpenGL work as expected. This quirk is shared with other emulators like Dolphin, and each application solves the issue in their own way. Dolphin forces XCB in the application itself.
-D
CMAKE_SKIP_INSTALL_RPATH=ON: This switch makes
cmake remove
hardcoded library search paths (rpath) when installing a binary
executable file or a shared library. This package does not need
rpath once it's installed into the standard location, and rpath may
sometimes cause unwanted effects or even security issues.
-D SKIP_GIT=ON: This both
skips the dependency on Git and prevents a configuration failure as
the extracted directory is not a Git repository.
mv -v /usr/share/doc/mGBA{,-97c4de}: This command ensures the doc folder for this package is consistent with the other packages.