Thu Dec 15 11:31:44 2022 UTC ()
mgba: Update to 0.10.0. Split the Qt interface into a separate package.

Since the Qt interface has noticable performance problems on NetBSD,
this saves some significant bloat in the main package by only building
the CLI interface by default.

Also modify the default settings to provide a best "out of box"
experience on NetBSD and SunOS, and remove the MESSAGE file indicating
to change the settings.

0.10.0: (2022-10-11)
Features:
 - Preliminary Lua scripting support
 - Presets for Game Boy palettes
 - Add Super Game Boy palettes for original Game Boy games
 - Tool for converting scanned pictures of e-Reader cards to raw dotcode data
 - Options for muting when inactive, minimized, or for different players in multiplayer
 - Cheat code support in homebrew ports
 - Acclerometer and gyro support for controllers on PC
 - Support for combo "Super Game Boy Color" SGB + GBC ROM hacks
 - Improved support for HuC-3 mapper, including RTC
 - Support for 64 kiB SRAM saves used in some bootlegs
 - Discord Rich Presence now supports time elapsed
 - Additional scaling shaders
 - Support for GameShark Advance SP (.gsv) save file importing
 - Support for multiple saves per game using .sa2, .sa3, etc.
 - Support for GBX format Game Boy ROMs
 - New unlicensed GB mappers: NT (newer type), Sachen (MMC1, MMC2)
Emulation fixes:
 - ARM7: Fix unsigned multiply timing
 - GB: Copy logo from ROM if not running the BIOS intro (fixes mgba.io/i/2378)
 - GB: Fix HALT breaking M-cycle alignment (fixes mgba.io/i/250)
 - GB Audio: Fix channel 1/2 reseting edge cases (fixes mgba.io/i/1925)
 - GB Audio: Properly apply per-model audio differences
 - GB Audio: Revamp channel rendering
 - GB Audio: Fix APU re-enable timing glitch
 - GB I/O: Fix writing to WAVE RAM behavior (fixes mgba.io/i/1334)
 - GB MBC: Fix edge case with Pocket Cam register accesses (fixes mgba.io/i/2557)
 - GB Memory: Add cursory cartridge open bus emulation (fixes mgba.io/i/2032)
 - GB Serialize: Fix loading MBC1 states that affect bank 0 (fixes mgba.io/i/2402)
 - GB SIO: Fix bidirectional transfer starting (fixes mgba.io/i/2290)
 - GB Video: Draw SGB border pieces that overlap GB graphics (fixes mgba.io/i/1339)
 - GBA: Improve timing when not booting from BIOS
 - GBA: Fix expected entry point for multiboot ELFs (fixes mgba.io/i/2450)
 - GBA: Fix booting multiboot ROMs with no JOY entrypoint
 - GBA: Fix 1 MiB ROM mirroring to only mirror 4 times
 - GBA Audio: Adjust PSG sampling rate with SOUNDBIAS
 - GBA Audio: Sample FIFOs at SOUNDBIAS-set frequency
 - GBA BIOS: Work around IRQ handling hiccup in Mario & Luigi (fixes mgba.io/i/1059)
 - GBA BIOS: Initial HLE timing estimation of UnLz77 functions (fixes mgba.io/i/2141)
 - GBA DMA: Fix DMA source direction bits being cleared (fixes mgba.io/i/2410)
 - GBA I/O: Redo internal key input, enabling edge-based key IRQs
 - GBA I/O: Disable open bus behavior on invalid register 06A
 - GBA Memory: Fix misaligned 32-bit I/O loads (fixes mgba.io/i/2307)
 - GBA Video: Fix OpenGL rendering on M1 Macs
 - GBA Video: Ignore horizontally off-screen sprite timing (fixes mgba.io/i/2391)
 - GBA Video: Fix Hblank timing (fixes mgba.io/i/2131, mgba.io/i/2310)
 - GBA Video: Fix rare crash in modes 3-5
 - GBA Video: Fix sprites with mid-frame palette changes in GL (fixes mgba.io/i/2476)
 - GBA Video: Fix OBJ tile wrapping with 2D char mapping (fixes mgba.io/i/2443)
 - GBA Video: Fix horizontal lines in GL when charbase is changed (fixes mgba.io/i/1631)
 - GBA Video: Fix sprite layer priority updating in GL
Other fixes:
 - ARM: Disassemble Thumb mov pseudo-instruction properly
 - ARM: Disassemble ARM asr/lsr #32 properly
 - ARM: Disassemble ARM movs properly
 - Core: Don't attempt to restore rewind diffs past start of rewind
 - Core: Fix the runloop resuming after a game has crashed (fixes mgba.io/i/2451)
 - Core: Fix crash if library can't be opened
 - Debugger: Fix crash with extremely long CLI strings
 - Debugger: Fix multiple conditional watchpoints at the same address
 - FFmpeg: Fix crash when encoding audio with some containers
 - FFmpeg: Fix GIF recording (fixes mgba.io/i/2393)
 - GB: Fix temporary saves
 - GB: Fix replacing the ROM crashing when accessing ROM base
 - GB: Don't try to map a 0-byte SRAM (fixes mgba.io/i/2668)
 - GB, GBA: Save writeback-pending masked saves on unload (fixes mgba.io/i/2396)
 - mGUI: Fix FPS counter after closing menu
 - Qt: Fix some hangs when using the debugger console
 - Qt: Fix crash when clicking past last tile in viewer
 - Qt: Fix preloading for ROM replacing
 - Qt: Fix screen not displaying on Wayland (fixes mgba.io/i/2190)
 - Qt: Fix crash when selecting 256-color sprite in sprite view
 - Qt: Fix coloration of swatches on styles with distinct frame backgrounds
 - VFS: Failed file mapping should return NULL on POSIX
Misc:
 - Core: Suspend runloop when a core crashes
 - Core: Add wallclock offset RTC type
 - Debugger: Save and restore CLI history
 - Debugger: GDB now works while the game is paused
 - Debugger: Add command to load external symbol file (fixes mgba.io/i/2480)
 - FFmpeg: Support dynamic audio sample rate
 - GB: Support CGB0 boot ROM loading
 - GB Audio: Increase sample rate
 - GB MBC: Filter out MBC errors when cartridge is yanked (fixes mgba.io/i/2488)
 - GB MBC: Partially implement TAMA5 RTC
 - GB Video: Add default SGB border
 - GBA: Automatically skip BIOS if ROM has invalid logo
 - GBA: Refine multiboot detection (fixes mgba.io/i/2192)
 - GBA Cheats: Implement "never" type codes (closes mgba.io/i/915)
 - GBA DMA: Enhanced logging (closes mgba.io/i/2454)
 - GBA Memory: Implement adjustable EWRAM waitstates (closes mgba.io/i/1276)
 - GBA Savedata: Store RTC data in savegames (closes mgba.io/i/240)
 - GBA Video: Implement layer placement for OpenGL renderer (fixes mgba.io/i/1962)
 - GBA Video: Fix highlighting for sprites with mid-frame palette changes
 - mGUI: Add margin to right-aligned menu text (fixes mgba.io/i/871)
 - mGUI: Autosave less frequently when fast-forwarding
 - Qt: Rearrange menus some
 - Qt: Clean up cheats dialog
 - Qt: Only set default controller bindings if loading fails (fixes mgba.io/i/799)
 - Qt: Save converter now supports importing GameShark Advance saves
 - Qt: Save positions of multiplayer windows (closes mgba.io/i/2128)
 - Qt: Add optional frame counter to OSD (closes mgba.io/i/1728)
 - Qt: Add optional emulation-related information on reset (closes mgba.io/i/1780)
 - Qt: Add QOpenGLWidget cross-thread codepath for macOS (fixes mgba.io/i/1754)
 - Qt: Enable -b for Boot BIOS menu option (fixes mgba.io/i/2074)
 - Qt: Add tile range selection to tile viewer (closes mgba.io/i/2455)
 - Qt: Show warning if XQ audio is toggled while loaded (fixes mgba.io/i/2295)
 - Qt: Add e-Card passing to the command line (closes mgba.io/i/2474)
 - Qt: Boot both a multiboot image and ROM with CLI args (closes mgba.io/i/1941)
 - Qt: Improve cheat parsing (fixes mgba.io/i/2297)
 - Qt: Change lossless setting to use WavPack audio
 - Qt: Use FFmpeg to convert additional camera formats, if available
 - Qt: Resume crashed game when loading a save state
 - Qt: Include cheats in bug report
 - SDL: Support exposing an axis directly as the gyro value (closes mgba.io/i/2531)
 - VFS: Early return NULL if attempting to map 0 bytes from a file


(nia)
diff -r1.15 -r1.16 pkgsrc/emulators/libretro-mgba/Makefile
diff -r1.15 -r0 pkgsrc/emulators/libretro-mgba/distinfo
diff -r1.1 -r1.2 pkgsrc/emulators/mgba/DESCR
diff -r1.3 -r0 pkgsrc/emulators/mgba/MESSAGE.NetBSD
diff -r1.38 -r1.39 pkgsrc/emulators/mgba/Makefile
diff -r0 -r1.1 pkgsrc/emulators/mgba/Makefile.common
diff -r1.9 -r1.10 pkgsrc/emulators/mgba/PLIST
diff -r1.1 -r0 pkgsrc/emulators/mgba/PLIST.shaders
diff -r1.16 -r1.17 pkgsrc/emulators/mgba/distinfo
diff -r1.5 -r1.6 pkgsrc/emulators/mgba/options.mk
diff -r0 -r1.1 pkgsrc/emulators/mgba-qt/DESCR
diff -r0 -r1.1 pkgsrc/emulators/mgba-qt/Makefile
diff -r0 -r1.1 pkgsrc/emulators/mgba-qt/PLIST
diff -r0 -r1.1 pkgsrc/emulators/mgba-qt/options.mk
diff -r1.5 -r0 pkgsrc/emulators/mgba/patches/patch-CMakeLists.txt
diff -r1.2 -r0 pkgsrc/emulators/mgba/patches/patch-include_mgba-util_math.h
diff -r1.3 -r0 pkgsrc/emulators/mgba/patches/patch-include_mgba-util_platform_posix_threading.h
diff -r0 -r1.3 pkgsrc/emulators/mgba/patches/patch-src_platform_qt_CMakeLists.txt
diff -r0 -r1.1 pkgsrc/emulators/mgba/patches/patch-src_platform_qt_ConfigController.cpp

cvs diff -r1.15 -r1.16 pkgsrc/emulators/libretro-mgba/Makefile (expand / switch to unified diff)

--- pkgsrc/emulators/libretro-mgba/Makefile 2021/12/19 11:37:10 1.15
+++ pkgsrc/emulators/libretro-mgba/Makefile 2022/12/15 11:31:44 1.16
@@ -1,37 +1,27 @@ @@ -1,37 +1,27 @@
1# $NetBSD: Makefile,v 1.15 2021/12/19 11:37:10 nia Exp $ 1# $NetBSD: Makefile,v 1.16 2022/12/15 11:31:44 nia Exp $
 2
 3.include "${.CURDIR}/../../emulators/mgba/Makefile.common"
2 4
3DISTNAME= mgba-0.9.3 
4PKGNAME= libretro-${DISTNAME} 5PKGNAME= libretro-${DISTNAME}
5CATEGORIES= emulators 
6MASTER_SITES= ${MASTER_SITE_GITHUB:=mgba-emu/} 
7GITHUB_PROJECT= mgba 
8 6
9MAINTAINER= nia@NetBSD.org 
10HOMEPAGE= https://docs.libretro.com/library/mgba/ 7HOMEPAGE= https://docs.libretro.com/library/mgba/
11COMMENT= Libretro core based on the mGBA emulator 8COMMENT= Libretro core based on the mGBA emulator
12LICENSE= mpl-2.0 
13 
14USE_CMAKE= yes 
15USE_TOOLS+= pkg-config 
16USE_LANGUAGES= c c++ 
17 9
18OPSYSVARS+= SOEXT 10OPSYSVARS+= SOEXT
19SOEXT.Darwin= dylib 11SOEXT.Darwin= dylib
20SOEXT.*= so 12SOEXT.*= so
21PLIST_SUBST+= SOEXT=${SOEXT} 13PLIST_SUBST+= SOEXT=${SOEXT}
22 14
23WRKSRC= ${WRKDIR}/mgba-${PKGVERSION_NOREV} 
24 
25CMAKE_ARGS+= -DUSE_DEBUGGERS=OFF 15CMAKE_ARGS+= -DUSE_DEBUGGERS=OFF
26CMAKE_ARGS+= -DUSE_GDB_STUB=OFF 16CMAKE_ARGS+= -DUSE_GDB_STUB=OFF
27 17
28CMAKE_ARGS+= -DUSE_EDITLINE=OFF 18CMAKE_ARGS+= -DUSE_EDITLINE=OFF
29CMAKE_ARGS+= -DUSE_FFMPEG=OFF 19CMAKE_ARGS+= -DUSE_FFMPEG=OFF
30CMAKE_ARGS+= -DUSE_ZLIB=OFF 20CMAKE_ARGS+= -DUSE_ZLIB=OFF
31CMAKE_ARGS+= -DUSE_MINIZIP=OFF 21CMAKE_ARGS+= -DUSE_MINIZIP=OFF
32CMAKE_ARGS+= -DUSE_PNG=OFF 22CMAKE_ARGS+= -DUSE_PNG=OFF
33CMAKE_ARGS+= -DUSE_LIBZIP=OFF 23CMAKE_ARGS+= -DUSE_LIBZIP=OFF
34CMAKE_ARGS+= -DUSE_SQLITE3=OFF 24CMAKE_ARGS+= -DUSE_SQLITE3=OFF
35CMAKE_ARGS+= -DUSE_LZMA=OFF 25CMAKE_ARGS+= -DUSE_LZMA=OFF
36CMAKE_ARGS+= -DUSE_EPOXY=OFF 26CMAKE_ARGS+= -DUSE_EPOXY=OFF
37 27

File Deleted: pkgsrc/emulators/libretro-mgba/Attic/distinfo

cvs diff -r1.1 -r1.2 pkgsrc/emulators/mgba/DESCR (expand / switch to unified diff)

--- pkgsrc/emulators/mgba/DESCR 2019/06/08 22:46:03 1.1
+++ pkgsrc/emulators/mgba/DESCR 2022/12/15 11:31:44 1.2
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
1mGBA is an emulator for running Game Boy Advance games. It aims to 1mGBA is an emulator for running Game Boy Advance games. It aims to
2be faster and more accurate than many existing Game Boy Advance 2be faster and more accurate than many existing Game Boy Advance
3emulators, as well as adding features that other emulators lack. 3emulators, as well as adding features that other emulators lack.
4 4
5It also supports Game Boy and Game Boy Color games. 5It also supports Game Boy and Game Boy Color games.
 6
 7This package contains the command line version.

File Deleted: pkgsrc/emulators/mgba/Attic/MESSAGE.NetBSD

cvs diff -r1.38 -r1.39 pkgsrc/emulators/mgba/Makefile (expand / switch to unified diff)

--- pkgsrc/emulators/mgba/Makefile 2022/11/23 16:19:58 1.38
+++ pkgsrc/emulators/mgba/Makefile 2022/12/15 11:31:44 1.39
@@ -1,32 +1,22 @@ @@ -1,32 +1,22 @@
1# $NetBSD: Makefile,v 1.38 2022/11/23 16:19:58 adam Exp $ 1# $NetBSD: Makefile,v 1.39 2022/12/15 11:31:44 nia Exp $
2 2
3DISTNAME= mgba-0.9.3 3.include "Makefile.common"
4PKGREVISION= 7 
5CATEGORIES= emulators 
6MASTER_SITES= ${MASTER_SITE_GITHUB:=mgba-emu/} 
7 
8MAINTAINER= nia@NetBSD.org 
9HOMEPAGE= https://mgba.io/ 
10COMMENT= Emulator for running Game Boy Advance games 
11LICENSE= mpl-2.0 
12 
13USE_TOOLS+= pkg-config 
14USE_CMAKE= yes 
15USE_LANGUAGES= c c++ 
16 4
17# C++14 5COMMENT= Emulator for running Game Boy Advance games (CLI version)
18GCC_REQD+= 5 
19 6
20CMAKE_ARGS+= -DUSE_DISCORD_RPC=OFF 7CONFLICTS+= mgba-qt-[0-9]*
21CMAKE_ARGS+= -DSKIP_GIT=ON 8
 9CMAKE_ARGS+= -DBUILD_QT=OFF
 10
 11# XXX: unsure if any of this is useful with the SDL driver
 12CMAKE_ARGS+= -DUSE_FFMPEG=OFF
22 13
23.include "options.mk" 14.include "options.mk"
24.include "../../archivers/libzip/buildlink3.mk" 15.include "../../archivers/libzip/buildlink3.mk"
25.include "../../databases/sqlite3/buildlink3.mk" 
26.include "../../devel/libelf/buildlink3.mk" 16.include "../../devel/libelf/buildlink3.mk"
27.include "../../devel/zlib/buildlink3.mk" 17.include "../../devel/zlib/buildlink3.mk"
28.include "../../devel/SDL2/buildlink3.mk" 18.include "../../devel/SDL2/buildlink3.mk"
29.include "../../graphics/hicolor-icon-theme/buildlink3.mk" 19.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
30.include "../../graphics/png/buildlink3.mk" 20.include "../../graphics/png/buildlink3.mk"
31.include "../../mk/pthread.buildlink3.mk" 21.include "../../mk/pthread.buildlink3.mk"
32.include "../../mk/bsd.pkg.mk" 22.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/emulators/mgba/Makefile.common
# $NetBSD: Makefile.common,v 1.1 2022/12/15 11:31:44 nia Exp $

# used by emulators/libretro-mgba/Makefile
# used by emulators/mgba/Makefile
# used by emulators/mgba-qt/Makefile

DISTNAME=	mgba-0.10.0
CATEGORIES=	emulators
MASTER_SITES=	${MASTER_SITE_GITHUB:=mgba-emu/}

MAINTAINER=	nia@NetBSD.org
HOMEPAGE?=	https://mgba.io/
LICENSE=	mpl-2.0

USE_TOOLS+=	pkg-config
USE_CMAKE=	yes
USE_LANGUAGES=	c c++

CMAKE_ARGS+=	-DUSE_DISCORD_RPC=OFF
CMAKE_ARGS+=	-DUSE_MINIZIP=OFF
CMAKE_ARGS+=	-DSKIP_GIT=ON

DISTINFO_FILE=	${.CURDIR}/../../emulators/mgba/distinfo
PATCHDIR=	${.CURDIR}/../../emulators/mgba/patches

.include "../../devel/libelf/buildlink3.mk"

cvs diff -r1.9 -r1.10 pkgsrc/emulators/mgba/PLIST (expand / switch to unified diff)

--- pkgsrc/emulators/mgba/PLIST 2021/05/02 08:39:59 1.9
+++ pkgsrc/emulators/mgba/PLIST 2022/12/15 11:31:44 1.10
@@ -1,30 +1,31 @@ @@ -1,30 +1,31 @@
1@comment $NetBSD: PLIST,v 1.9 2021/05/02 08:39:59 nia Exp $ 1@comment $NetBSD: PLIST,v 1.10 2022/12/15 11:31:44 nia Exp $
2bin/mgba 2bin/mgba
3${PLIST.qt}bin/mgba-qt 
4include/mgba-util/circle-buffer.h 3include/mgba-util/circle-buffer.h
5include/mgba-util/common.h 4include/mgba-util/common.h
6include/mgba-util/configuration.h 5include/mgba-util/configuration.h
 6include/mgba-util/convolve.h
7include/mgba-util/crc32.h 7include/mgba-util/crc32.h
8include/mgba-util/dllexports.h 8include/mgba-util/dllexports.h
9include/mgba-util/elf-read.h 9include/mgba-util/elf-read.h
10include/mgba-util/export.h 10include/mgba-util/export.h
11include/mgba-util/formatting.h 11include/mgba-util/formatting.h
12include/mgba-util/gui.h 12include/mgba-util/gui.h
13include/mgba-util/gui/file-select.h 13include/mgba-util/gui/file-select.h
14include/mgba-util/gui/font-metrics.h 14include/mgba-util/gui/font-metrics.h
15include/mgba-util/gui/font.h 15include/mgba-util/gui/font.h
16include/mgba-util/gui/menu.h 16include/mgba-util/gui/menu.h
17include/mgba-util/hash.h 17include/mgba-util/hash.h
 18include/mgba-util/macros.h
18include/mgba-util/math.h 19include/mgba-util/math.h
19include/mgba-util/memory.h 20include/mgba-util/memory.h
20include/mgba-util/patch.h 21include/mgba-util/patch.h
21include/mgba-util/patch/fast.h 22include/mgba-util/patch/fast.h
22include/mgba-util/patch/ips.h 23include/mgba-util/patch/ips.h
23include/mgba-util/patch/ups.h 24include/mgba-util/patch/ups.h
24include/mgba-util/platform/3ds/3ds-vfs.h 25include/mgba-util/platform/3ds/3ds-vfs.h
25include/mgba-util/platform/3ds/threading.h 26include/mgba-util/platform/3ds/threading.h
26include/mgba-util/platform/posix/threading.h 27include/mgba-util/platform/posix/threading.h
27include/mgba-util/platform/psp2/sce-vfs.h 28include/mgba-util/platform/psp2/sce-vfs.h
28include/mgba-util/platform/psp2/threading.h 29include/mgba-util/platform/psp2/threading.h
29include/mgba-util/platform/switch/threading.h 30include/mgba-util/platform/switch/threading.h
30include/mgba-util/platform/windows/getopt.h 31include/mgba-util/platform/windows/getopt.h
@@ -54,115 +55,121 @@ include/mgba/core/log.h @@ -54,115 +55,121 @@ include/mgba/core/log.h
54include/mgba/core/map-cache.h 55include/mgba/core/map-cache.h
55include/mgba/core/mem-search.h 56include/mgba/core/mem-search.h
56include/mgba/core/rewind.h 57include/mgba/core/rewind.h
57include/mgba/core/scripting.h 58include/mgba/core/scripting.h
58include/mgba/core/serialize.h 59include/mgba/core/serialize.h
59include/mgba/core/sync.h 60include/mgba/core/sync.h
60include/mgba/core/thread.h 61include/mgba/core/thread.h
61include/mgba/core/tile-cache.h 62include/mgba/core/tile-cache.h
62include/mgba/core/timing.h 63include/mgba/core/timing.h
63include/mgba/core/version.h 64include/mgba/core/version.h
64include/mgba/debugger/debugger.h 65include/mgba/debugger/debugger.h
65include/mgba/feature/commandline.h 66include/mgba/feature/commandline.h
66include/mgba/feature/thread-proxy.h 67include/mgba/feature/thread-proxy.h
 68include/mgba/feature/updater.h
67include/mgba/feature/video-logger.h 69include/mgba/feature/video-logger.h
68include/mgba/flags.h 70include/mgba/flags.h
69include/mgba/gb/core.h 71include/mgba/gb/core.h
70include/mgba/gb/interface.h 72include/mgba/gb/interface.h
71include/mgba/gba/core.h 73include/mgba/gba/core.h
72include/mgba/gba/interface.h 74include/mgba/gba/interface.h
73include/mgba/internal/arm/arm.h 75include/mgba/internal/arm/arm.h
74include/mgba/internal/arm/debugger/cli-debugger.h 76include/mgba/internal/arm/debugger/cli-debugger.h
75include/mgba/internal/arm/debugger/debugger.h 77include/mgba/internal/arm/debugger/debugger.h
76include/mgba/internal/arm/debugger/memory-debugger.h 78include/mgba/internal/arm/debugger/memory-debugger.h
77include/mgba/internal/arm/decoder-inlines.h 79include/mgba/internal/arm/decoder-inlines.h
78include/mgba/internal/arm/decoder.h 80include/mgba/internal/arm/decoder.h
79include/mgba/internal/arm/emitter-arm.h 81include/mgba/internal/arm/emitter-arm.h
80include/mgba/internal/arm/emitter-inlines.h 82include/mgba/internal/arm/emitter-inlines.h
81include/mgba/internal/arm/emitter-thumb.h 83include/mgba/internal/arm/emitter-thumb.h
82include/mgba/internal/arm/isa-arm.h 84include/mgba/internal/arm/isa-arm.h
83include/mgba/internal/arm/isa-inlines.h 85include/mgba/internal/arm/isa-inlines.h
84include/mgba/internal/arm/isa-thumb.h 86include/mgba/internal/arm/isa-thumb.h
85include/mgba/internal/arm/macros.h 87include/mgba/internal/arm/macros.h
86include/mgba/internal/debugger/cli-debugger.h 88include/mgba/internal/debugger/cli-debugger.h
87include/mgba/internal/debugger/gdb-stub.h 89include/mgba/internal/debugger/gdb-stub.h
88include/mgba/internal/debugger/parser.h 90include/mgba/internal/debugger/parser.h
89include/mgba/internal/debugger/stack-trace.h 91include/mgba/internal/debugger/stack-trace.h
90include/mgba/internal/debugger/symbols.h 92include/mgba/internal/debugger/symbols.h
 93include/mgba/internal/defines.h
91include/mgba/internal/gb/audio.h 94include/mgba/internal/gb/audio.h
92include/mgba/internal/gb/cheats.h 95include/mgba/internal/gb/cheats.h
93include/mgba/internal/gb/debugger/debugger.h 96include/mgba/internal/gb/debugger/debugger.h
94include/mgba/internal/gb/debugger/symbols.h 97include/mgba/internal/gb/debugger/symbols.h
95include/mgba/internal/gb/extra/cli.h 98include/mgba/internal/gb/extra/cli.h
96include/mgba/internal/gb/gb.h 99include/mgba/internal/gb/gb.h
97include/mgba/internal/gb/input.h 100include/mgba/internal/gb/input.h
98include/mgba/internal/gb/io.h 101include/mgba/internal/gb/io.h
99include/mgba/internal/gb/mbc.h 102include/mgba/internal/gb/mbc.h
100include/mgba/internal/gb/memory.h 103include/mgba/internal/gb/memory.h
101include/mgba/internal/gb/overrides.h 104include/mgba/internal/gb/overrides.h
102include/mgba/internal/gb/renderers/cache-set.h 105include/mgba/internal/gb/renderers/cache-set.h
103include/mgba/internal/gb/renderers/proxy.h 106include/mgba/internal/gb/renderers/proxy.h
104include/mgba/internal/gb/renderers/software.h 107include/mgba/internal/gb/renderers/software.h
105include/mgba/internal/gb/serialize.h 108include/mgba/internal/gb/serialize.h
106include/mgba/internal/gb/sio.h 109include/mgba/internal/gb/sio.h
107include/mgba/internal/gb/sio/lockstep.h 110include/mgba/internal/gb/sio/lockstep.h
108include/mgba/internal/gb/sio/printer.h 111include/mgba/internal/gb/sio/printer.h
109include/mgba/internal/gb/timer.h 112include/mgba/internal/gb/timer.h
110include/mgba/internal/gb/video.h 113include/mgba/internal/gb/video.h
111include/mgba/internal/gba/audio.h 114include/mgba/internal/gba/audio.h
112include/mgba/internal/gba/bios.h 115include/mgba/internal/gba/bios.h
 116include/mgba/internal/gba/cart/ereader.h
 117include/mgba/internal/gba/cart/gpio.h
 118include/mgba/internal/gba/cart/matrix.h
 119include/mgba/internal/gba/cart/vfame.h
113include/mgba/internal/gba/cheats.h 120include/mgba/internal/gba/cheats.h
114include/mgba/internal/gba/dma.h 121include/mgba/internal/gba/dma.h
115include/mgba/internal/gba/extra/audio-mixer.h 122include/mgba/internal/gba/extra/audio-mixer.h
116include/mgba/internal/gba/extra/cli.h 123include/mgba/internal/gba/extra/cli.h
117include/mgba/internal/gba/gba.h 124include/mgba/internal/gba/gba.h
118include/mgba/internal/gba/hardware.h 
119include/mgba/internal/gba/input.h 125include/mgba/internal/gba/input.h
120include/mgba/internal/gba/io.h 126include/mgba/internal/gba/io.h
121include/mgba/internal/gba/matrix.h 
122include/mgba/internal/gba/memory.h 127include/mgba/internal/gba/memory.h
123include/mgba/internal/gba/overrides.h 128include/mgba/internal/gba/overrides.h
124include/mgba/internal/gba/renderers/cache-set.h 129include/mgba/internal/gba/renderers/cache-set.h
125include/mgba/internal/gba/renderers/common.h 130include/mgba/internal/gba/renderers/common.h
126include/mgba/internal/gba/renderers/gl.h 131include/mgba/internal/gba/renderers/gl.h
127include/mgba/internal/gba/renderers/proxy.h 132include/mgba/internal/gba/renderers/proxy.h
128include/mgba/internal/gba/renderers/video-software.h 133include/mgba/internal/gba/renderers/video-software.h
129include/mgba/internal/gba/savedata.h 134include/mgba/internal/gba/savedata.h
130include/mgba/internal/gba/serialize.h 135include/mgba/internal/gba/serialize.h
131include/mgba/internal/gba/sharkport.h 136include/mgba/internal/gba/sharkport.h
132include/mgba/internal/gba/sio.h 137include/mgba/internal/gba/sio.h
133include/mgba/internal/gba/sio/dolphin.h 138include/mgba/internal/gba/sio/dolphin.h
 139include/mgba/internal/gba/sio/gbp.h
134include/mgba/internal/gba/sio/lockstep.h 140include/mgba/internal/gba/sio/lockstep.h
135include/mgba/internal/gba/timer.h 141include/mgba/internal/gba/timer.h
136include/mgba/internal/gba/vfame.h 
137include/mgba/internal/gba/video.h 142include/mgba/internal/gba/video.h
 143include/mgba/internal/script/lua.h
 144include/mgba/internal/script/socket.h
138include/mgba/internal/sm83/debugger/cli-debugger.h 145include/mgba/internal/sm83/debugger/cli-debugger.h
139include/mgba/internal/sm83/debugger/debugger.h 146include/mgba/internal/sm83/debugger/debugger.h
140include/mgba/internal/sm83/debugger/memory-debugger.h 147include/mgba/internal/sm83/debugger/memory-debugger.h
141include/mgba/internal/sm83/decoder.h 148include/mgba/internal/sm83/decoder.h
142include/mgba/internal/sm83/emitter-sm83.h 149include/mgba/internal/sm83/emitter-sm83.h
143include/mgba/internal/sm83/isa-sm83.h 150include/mgba/internal/sm83/isa-sm83.h
144include/mgba/internal/sm83/sm83.h 151include/mgba/internal/sm83/sm83.h
 152include/mgba/script/context.h
 153include/mgba/script/macros.h
 154include/mgba/script/types.h
145lib/libmgba.so 155lib/libmgba.so
146lib/libmgba.so.0.9 156lib/libmgba.so.0.10
147lib/libmgba.so.${PKGVERSION} 157lib/libmgba.so.${PKGVERSION}
148${PLIST.qt}man/man6/mgba-qt.6 
149man/man6/mgba.6 158man/man6/mgba.6
150${PLIST.qt}share/applications/mgba-qt.desktop 
151share/doc/mGBA/CHANGES 159share/doc/mGBA/CHANGES
152share/doc/mGBA/LICENSE 160share/doc/mGBA/LICENSE
153share/doc/mGBA/README.md 161share/doc/mGBA/README.md
154share/doc/mGBA/README_DE.md 162share/doc/mGBA/README_DE.md
155share/doc/mGBA/README_ES.md 163share/doc/mGBA/README_ES.md
156share/doc/mGBA/README_ZH_CN.md 164share/doc/mGBA/README_ZH_CN.md
157share/doc/mGBA/licenses/blip_buf.txt 165share/doc/mGBA/licenses/blip_buf.txt
158share/doc/mGBA/licenses/inih.txt 166share/doc/mGBA/licenses/inih.txt
159share/icons/hicolor/128x128/apps/mgba.png 167share/icons/hicolor/128x128/apps/io.mgba.mGBA.png
160share/icons/hicolor/16x16/apps/mgba.png 168share/icons/hicolor/16x16/apps/io.mgba.mGBA.png
161share/icons/hicolor/24x24/apps/mgba.png 169share/icons/hicolor/24x24/apps/io.mgba.mGBA.png
162share/icons/hicolor/256x256/apps/mgba.png 170share/icons/hicolor/256x256/apps/io.mgba.mGBA.png
163share/icons/hicolor/32x32/apps/mgba.png 171share/icons/hicolor/32x32/apps/io.mgba.mGBA.png
164share/icons/hicolor/48x48/apps/mgba.png 172share/icons/hicolor/48x48/apps/io.mgba.mGBA.png
165share/icons/hicolor/512x512/apps/mgba.png 173share/icons/hicolor/512x512/apps/io.mgba.mGBA.png
166share/icons/hicolor/64x64/apps/mgba.png 174share/icons/hicolor/64x64/apps/io.mgba.mGBA.png
167share/icons/hicolor/96x96/apps/mgba.png 175share/icons/hicolor/96x96/apps/io.mgba.mGBA.png
168${PLIST.qt}share/mgba/nointro.dat 

File Deleted: pkgsrc/emulators/mgba/Attic/PLIST.shaders

cvs diff -r1.16 -r1.17 pkgsrc/emulators/mgba/distinfo (expand / switch to unified diff)

--- pkgsrc/emulators/mgba/distinfo 2021/12/19 11:37:10 1.16
+++ pkgsrc/emulators/mgba/distinfo 2022/12/15 11:31:44 1.17
@@ -1,8 +1,7 @@ @@ -1,8 +1,7 @@
1$NetBSD: distinfo,v 1.16 2021/12/19 11:37:10 nia Exp $ 1$NetBSD: distinfo,v 1.17 2022/12/15 11:31:44 nia Exp $
2 2
3BLAKE2s (mgba-0.9.3.tar.gz) = 30350fe928c3f3608895639b55739b92b7ffc879fb82f4bd29b95736871e6c50 3BLAKE2s (mgba-0.10.0.tar.gz) = f04dd3389ee4e9df3fa577b3c071d3a47262fb6727fbc7340e9bf100b58a424f
4SHA512 (mgba-0.9.3.tar.gz) = da65b3c7ec32d732163f129c4fd38949ae2da2980beb3257bf6def5e35534a27b6d30309bb3c9a8d651642f99e1a45db7a8577c8dbf5472153d4551167471b3a 4SHA512 (mgba-0.10.0.tar.gz) = 05939f94bc00906d999b955091e8e8059cc13a5b822048f6e002062c2e74069337d947d2cde2f8c1be96e3353a361743d752811c214fa9da31ed6a4893b4d7e8
5Size (mgba-0.9.3.tar.gz) = 12763090 bytes 5Size (mgba-0.10.0.tar.gz) = 14302653 bytes
6SHA1 (patch-CMakeLists.txt) = 61bb343f28a5031732b1a34157e1dca73bbddcd9 6SHA1 (patch-src_platform_qt_CMakeLists.txt) = 052c533d8df271eb623efec1ec6639da4bea1983
7SHA1 (patch-include_mgba-util_math.h) = 83ef3284dd5674f30dc4dec8aefe721ce5939f56 7SHA1 (patch-src_platform_qt_ConfigController.cpp) = 45b5a0aac879905a1471c172c5f23bef9ab33723
8SHA1 (patch-include_mgba-util_platform_posix_threading.h) = 87d25708f24f4f42b3da22d1f2da667d314ac9f5 

cvs diff -r1.5 -r1.6 pkgsrc/emulators/mgba/options.mk (expand / switch to unified diff)

--- pkgsrc/emulators/mgba/options.mk 2020/06/19 13:06:35 1.5
+++ pkgsrc/emulators/mgba/options.mk 2022/12/15 11:31:44 1.6
@@ -1,47 +1,24 @@ @@ -1,47 +1,24 @@
1# $NetBSD: options.mk,v 1.5 2020/06/19 13:06:35 nia Exp $ 1# $NetBSD: options.mk,v 1.6 2022/12/15 11:31:44 nia Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.mgba 3PKG_OPTIONS_VAR= PKG_OPTIONS.mgba
4 4
5PKG_SUPPORTED_OPTIONS+= ffmpeg qt5 opengl 5PKG_SUPPORTED_OPTIONS+= opengl
6PKG_SUGGESTED_OPTIONS+= ffmpeg qt5 opengl 
7 6
8PLIST_SRC+= PLIST 7.include "../../mk/bsd.prefs.mk"
9PLIST_VARS+= qt 
10 8
11.include "../../mk/bsd.options.mk" 9.if ${OPSYS} != "Darwin"
12 10PKG_SUGGESTED_OPTIONS+= opengl
13.if !empty(PKG_OPTIONS:Mffmpeg) 
14CMAKE_ARGS+= -DUSE_FFMPEG=ON 
15.include "../../multimedia/ffmpeg4/buildlink3.mk" 
16.else 
17CMAKE_ARGS+= -DUSE_FFMPEG=OFF 
18.endif 11.endif
19 12
20.if !empty(PKG_OPTIONS:Mqt5) 13.include "../../mk/bsd.options.mk"
21PLIST.qt= yes 
22CMAKE_ARGS+= -DBUILD_QT=ON 
23# We probably don't actually want Qt5Multimedia. 
24# It's an option as an audio output, but SDL supports many more pkgsrc 
25# platforms natively, without going via PulseAudio. 
26CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Multimedia=TRUE 
27TOOL_DEPENDS+= qt5-qttools-[0-9]*:../../x11/qt5-qttools 
28.include "../../x11/qt5-qtbase/buildlink3.mk" 
29#.include "../../x11/qt5-qtmultimedia/buildlink3.mk" 
30.else 
31CMAKE_ARGS+= -DBUILD_QT=OFF 
32.endif 
33 14
34.if !empty(PKG_OPTIONS:Mopengl) 15.if !empty(PKG_OPTIONS:Mopengl)
35CMAKE_ARGS+= -DBUILD_GL=ON 16CMAKE_ARGS+= -DBUILD_GL=ON
36CMAKE_ARGS+= -DUSE_EPOXY=ON 17CMAKE_ARGS+= -DUSE_EPOXY=ON
37.include "../../graphics/MesaLib/buildlink3.mk" 18.include "../../graphics/MesaLib/buildlink3.mk"
38.include "../../graphics/glu/buildlink3.mk" 19.include "../../graphics/glu/buildlink3.mk"
39.include "../../graphics/libepoxy/buildlink3.mk" 20.include "../../graphics/libepoxy/buildlink3.mk"
40.else 21.else
41CMAKE_ARGS+= -DBUILD_GL=OFF 22CMAKE_ARGS+= -DBUILD_GL=OFF
42CMAKE_ARGS+= -DUSE_EPOXY=OFF 23CMAKE_ARGS+= -DUSE_EPOXY=OFF
43.endif 24.endif
44 
45.if !empty(PKG_OPTIONS:Mopengl) && !empty(PKG_OPTIONS:Mqt5) 
46PLIST_SRC+= PLIST.shaders 
47.endif 

File Added: pkgsrc/emulators/mgba-qt/DESCR
mGBA is an emulator for running Game Boy Advance games. It aims to
be faster and more accurate than many existing Game Boy Advance
emulators, as well as adding features that other emulators lack.

It also supports Game Boy and Game Boy Color games.

This package contains the Qt graphical user interface and the
command line version.

File Added: pkgsrc/emulators/mgba-qt/Makefile
# $NetBSD: Makefile,v 1.1 2022/12/15 11:31:44 nia Exp $

.include "${.CURDIR}/../../emulators/mgba/Makefile.common"

PKGNAME=	${DISTNAME:S/mgba-/mgba-qt-/g}
COMMENT=	Emulator for running Game Boy Advance games (GUI version)

CONFLICTS+=	mgba-[0-9]*

CMAKE_ARGS+=	-DBUILD_QT=ON

# performance problems...
CMAKE_ARGS+=	-DBUILD_GL=OFF
CMAKE_ARGS+=	-DUSE_EPOXY=OFF

# C++14
GCC_REQD+=	5

# We probably don't actually want Qt5Multimedia.
# It's an option as an audio output, but SDL supports many more pkgsrc
# platforms natively, without going via PulseAudio.
CMAKE_ARGS+=	-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Multimedia=TRUE

TOOL_DEPENDS+=	qt5-qttools-[0-9]*:../../x11/qt5-qttools

.include "options.mk"
.include "../../archivers/libzip/buildlink3.mk"
.include "../../databases/sqlite3/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../devel/SDL2/buildlink3.mk"
.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../lang/lua/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/buildlink3.mk"
.include "../../x11/qt5-qtbase/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/emulators/mgba-qt/PLIST
@comment $NetBSD: PLIST,v 1.1 2022/12/15 11:31:44 nia Exp $
bin/mgba
bin/mgba-qt
include/mgba-util/circle-buffer.h
include/mgba-util/common.h
include/mgba-util/configuration.h
include/mgba-util/convolve.h
include/mgba-util/crc32.h
include/mgba-util/dllexports.h
include/mgba-util/elf-read.h
include/mgba-util/export.h
include/mgba-util/formatting.h
include/mgba-util/gui.h
include/mgba-util/gui/file-select.h
include/mgba-util/gui/font-metrics.h
include/mgba-util/gui/font.h
include/mgba-util/gui/menu.h
include/mgba-util/hash.h
include/mgba-util/macros.h
include/mgba-util/math.h
include/mgba-util/memory.h
include/mgba-util/patch.h
include/mgba-util/patch/fast.h
include/mgba-util/patch/ips.h
include/mgba-util/patch/ups.h
include/mgba-util/platform/3ds/3ds-vfs.h
include/mgba-util/platform/3ds/threading.h
include/mgba-util/platform/posix/threading.h
include/mgba-util/platform/psp2/sce-vfs.h
include/mgba-util/platform/psp2/threading.h
include/mgba-util/platform/switch/threading.h
include/mgba-util/platform/windows/getopt.h
include/mgba-util/platform/windows/threading.h
include/mgba-util/png-io.h
include/mgba-util/ring-fifo.h
include/mgba-util/socket.h
include/mgba-util/string.h
include/mgba-util/table.h
include/mgba-util/text-codec.h
include/mgba-util/threading.h
include/mgba-util/vector.h
include/mgba-util/vfs.h
include/mgba/core/bitmap-cache.h
include/mgba/core/blip_buf.h
include/mgba/core/cache-set.h
include/mgba/core/cheats.h
include/mgba/core/config.h
include/mgba/core/core.h
include/mgba/core/cpu.h
include/mgba/core/directories.h
include/mgba/core/input.h
include/mgba/core/interface.h
include/mgba/core/library.h
include/mgba/core/lockstep.h
include/mgba/core/log.h
include/mgba/core/map-cache.h
include/mgba/core/mem-search.h
include/mgba/core/rewind.h
include/mgba/core/scripting.h
include/mgba/core/serialize.h
include/mgba/core/sync.h
include/mgba/core/thread.h
include/mgba/core/tile-cache.h
include/mgba/core/timing.h
include/mgba/core/version.h
include/mgba/debugger/debugger.h
include/mgba/feature/commandline.h
include/mgba/feature/thread-proxy.h
include/mgba/feature/updater.h
include/mgba/feature/video-logger.h
include/mgba/flags.h
include/mgba/gb/core.h
include/mgba/gb/interface.h
include/mgba/gba/core.h
include/mgba/gba/interface.h
include/mgba/internal/arm/arm.h
include/mgba/internal/arm/debugger/cli-debugger.h
include/mgba/internal/arm/debugger/debugger.h
include/mgba/internal/arm/debugger/memory-debugger.h
include/mgba/internal/arm/decoder-inlines.h
include/mgba/internal/arm/decoder.h
include/mgba/internal/arm/emitter-arm.h
include/mgba/internal/arm/emitter-inlines.h
include/mgba/internal/arm/emitter-thumb.h
include/mgba/internal/arm/isa-arm.h
include/mgba/internal/arm/isa-inlines.h
include/mgba/internal/arm/isa-thumb.h
include/mgba/internal/arm/macros.h
include/mgba/internal/debugger/cli-debugger.h
include/mgba/internal/debugger/gdb-stub.h
include/mgba/internal/debugger/parser.h
include/mgba/internal/debugger/stack-trace.h
include/mgba/internal/debugger/symbols.h
include/mgba/internal/defines.h
include/mgba/internal/gb/audio.h
include/mgba/internal/gb/cheats.h
include/mgba/internal/gb/debugger/debugger.h
include/mgba/internal/gb/debugger/symbols.h
include/mgba/internal/gb/extra/cli.h
include/mgba/internal/gb/gb.h
include/mgba/internal/gb/input.h
include/mgba/internal/gb/io.h
include/mgba/internal/gb/mbc.h
include/mgba/internal/gb/memory.h
include/mgba/internal/gb/overrides.h
include/mgba/internal/gb/renderers/cache-set.h
include/mgba/internal/gb/renderers/proxy.h
include/mgba/internal/gb/renderers/software.h
include/mgba/internal/gb/serialize.h
include/mgba/internal/gb/sio.h
include/mgba/internal/gb/sio/lockstep.h
include/mgba/internal/gb/sio/printer.h
include/mgba/internal/gb/timer.h
include/mgba/internal/gb/video.h
include/mgba/internal/gba/audio.h
include/mgba/internal/gba/bios.h
include/mgba/internal/gba/cart/ereader.h
include/mgba/internal/gba/cart/gpio.h
include/mgba/internal/gba/cart/matrix.h
include/mgba/internal/gba/cart/vfame.h
include/mgba/internal/gba/cheats.h
include/mgba/internal/gba/dma.h
include/mgba/internal/gba/extra/audio-mixer.h
include/mgba/internal/gba/extra/cli.h
include/mgba/internal/gba/gba.h
include/mgba/internal/gba/input.h
include/mgba/internal/gba/io.h
include/mgba/internal/gba/memory.h
include/mgba/internal/gba/overrides.h
include/mgba/internal/gba/renderers/cache-set.h
include/mgba/internal/gba/renderers/common.h
include/mgba/internal/gba/renderers/gl.h
include/mgba/internal/gba/renderers/proxy.h
include/mgba/internal/gba/renderers/video-software.h
include/mgba/internal/gba/savedata.h
include/mgba/internal/gba/serialize.h
include/mgba/internal/gba/sharkport.h
include/mgba/internal/gba/sio.h
include/mgba/internal/gba/sio/dolphin.h
include/mgba/internal/gba/sio/gbp.h
include/mgba/internal/gba/sio/lockstep.h
include/mgba/internal/gba/timer.h
include/mgba/internal/gba/video.h
include/mgba/internal/script/lua.h
include/mgba/internal/script/socket.h
include/mgba/internal/sm83/debugger/cli-debugger.h
include/mgba/internal/sm83/debugger/debugger.h
include/mgba/internal/sm83/debugger/memory-debugger.h
include/mgba/internal/sm83/decoder.h
include/mgba/internal/sm83/emitter-sm83.h
include/mgba/internal/sm83/isa-sm83.h
include/mgba/internal/sm83/sm83.h
include/mgba/script/context.h
include/mgba/script/macros.h
include/mgba/script/types.h
lib/libmgba.so
lib/libmgba.so.0.10
lib/libmgba.so.${PKGVERSION}
man/man6/mgba-qt.6
man/man6/mgba.6
share/applications/io.mgba.mGBA.desktop
share/doc/mGBA/CHANGES
share/doc/mGBA/LICENSE
share/doc/mGBA/README.md
share/doc/mGBA/README_DE.md
share/doc/mGBA/README_ES.md
share/doc/mGBA/README_ZH_CN.md
share/doc/mGBA/licenses/blip_buf.txt
share/doc/mGBA/licenses/inih.txt
share/icons/hicolor/128x128/apps/io.mgba.mGBA.png
share/icons/hicolor/16x16/apps/io.mgba.mGBA.png
share/icons/hicolor/24x24/apps/io.mgba.mGBA.png
share/icons/hicolor/256x256/apps/io.mgba.mGBA.png
share/icons/hicolor/32x32/apps/io.mgba.mGBA.png
share/icons/hicolor/48x48/apps/io.mgba.mGBA.png
share/icons/hicolor/512x512/apps/io.mgba.mGBA.png
share/icons/hicolor/64x64/apps/io.mgba.mGBA.png
share/icons/hicolor/96x96/apps/io.mgba.mGBA.png
share/mgba/nointro.dat
share/mgba/scripts/pokemon.lua
share/mgba/scripts/socketserver.lua
share/mgba/scripts/sockettest.lua

File Added: pkgsrc/emulators/mgba-qt/options.mk
# $NetBSD: options.mk,v 1.1 2022/12/15 11:31:44 nia Exp $

PKG_OPTIONS_VAR=	PKG_OPTIONS.mgba-qt

PKG_SUPPORTED_OPTIONS+=	ffmpeg
PKG_SUGGESTED_OPTIONS+=	ffmpeg

.include "../../mk/bsd.options.mk"

.if !empty(PKG_OPTIONS:Mffmpeg)
CMAKE_ARGS+=	-DUSE_FFMPEG=ON
.include "../../multimedia/ffmpeg5/buildlink3.mk"
.else
CMAKE_ARGS+=	-DUSE_FFMPEG=OFF
.endif

File Deleted: pkgsrc/emulators/mgba/patches/patch-CMakeLists.txt

File Deleted: pkgsrc/emulators/mgba/patches/Attic/patch-include_mgba-util_math.h

File Deleted: pkgsrc/emulators/mgba/patches/Attic/patch-include_mgba-util_platform_posix_threading.h

File Added: pkgsrc/emulators/mgba/patches/patch-src_platform_qt_CMakeLists.txt
$NetBSD: patch-src_platform_qt_CMakeLists.txt,v 1.3 2022/12/15 11:31:44 nia Exp $

Mark Multimedia an optional component so we can build without the
Qt5 audio driver (using only SDL).

--- src/platform/qt/CMakeLists.txt.orig	2022-10-12 03:30:00.000000000 +0000
+++ src/platform/qt/CMakeLists.txt
@@ -25,7 +25,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
 set(QT_LIBRARIES)
 
-find_package(Qt5 COMPONENTS Core Widgets Network Multimedia)
+find_package(Qt5 COMPONENTS Core Widgets Network OPTIONAL_COMPONENTS Multimedia)
 set(QT Qt5)
 
 if(NOT BUILD_GL AND NOT BUILD_GLES2 AND NOT BUILD_GLES3)

File Added: pkgsrc/emulators/mgba/patches/patch-src_platform_qt_ConfigController.cpp
$NetBSD: patch-src_platform_qt_ConfigController.cpp,v 1.1 2022/12/15 11:31:44 nia Exp $

Use a likely "device native" sample rate on SunOS and NetBSD to avoid
expensive in-kernel resampling.

The default audioBuffers seems to cause performance problems in Qt.
Using a reasonable power of two causes "less".

--- src/platform/qt/ConfigController.cpp.orig	2022-10-12 03:30:00.000000000 +0000
+++ src/platform/qt/ConfigController.cpp
@@ -119,8 +119,13 @@ ConfigController::ConfigController(QObje
 	m_opts.audioSync = CoreController::AUDIO_SYNC;
 	m_opts.videoSync = CoreController::VIDEO_SYNC;
 	m_opts.fpsTarget = 60;
+#if defined(__NetBSD__) || defined(__sun)
+	m_opts.audioBuffers = 2048;
+	m_opts.sampleRate = 48000;
+#else
 	m_opts.audioBuffers = 1536;
 	m_opts.sampleRate = 44100;
+#endif
 	m_opts.volume = 0x100;
 	m_opts.logLevel = mLOG_WARN | mLOG_ERROR | mLOG_FATAL;
 	m_opts.rewindEnable = false;