public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:master commit in: games-engines/easyrpg-player/files/, profiles/, games-engines/easyrpg-player/
@ 2023-09-26 13:52 David Roman
  0 siblings, 0 replies; 3+ messages in thread
From: David Roman @ 2023-09-26 13:52 UTC (permalink / raw
  To: gentoo-commits

commit:     0b20fe31ea2dfd92f1164aed4be4308a65d8fd9f
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Tue Sep 26 12:48:32 2023 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Tue Sep 26 12:51:14 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0b20fe31

games-engines/easyrpg-player: backport use-after-free fix

Subsequently, unmask fluidsynth USE flag.

Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>

 .../easyrpg-player/easyrpg-player-0.8-r1.ebuild    | 193 +++++++++++++++++++++
 ...er-0.8-backport-use-after-free-fluidsynth.patch | 180 +++++++++++++++++++
 profiles/package.use.mask                          |   4 -
 3 files changed, 373 insertions(+), 4 deletions(-)

diff --git a/games-engines/easyrpg-player/easyrpg-player-0.8-r1.ebuild b/games-engines/easyrpg-player/easyrpg-player-0.8-r1.ebuild
new file mode 100644
index 0000000000..00866eabac
--- /dev/null
+++ b/games-engines/easyrpg-player/easyrpg-player-0.8-r1.ebuild
@@ -0,0 +1,193 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake readme.gentoo-r1 xdg
+
+DESCRIPTION="RPG Maker 2000/2003 and EasyRPG games interpreter"
+HOMEPAGE="https://easyrpg.org/player/
+	https://github.com/EasyRPG/Player"
+SRC_URI="https://easyrpg.org/downloads/player/${PV}/${P}.tar.xz"
+
+# EasyRPG Player itself is GPLv3+.
+# The program's logos are CC-BY-SA 4.0.
+# --
+# The program bundles several 3rd-party libraries.
+#
+# FMMidi files - licensed under the 3-clause BSD license.
+# Since the files do not end up in the executable due to the configuration,
+# we ignore it.
+# - src/midisequencer.cpp
+# - src/midisequencer.h
+# - src/midisynth.cpp
+# - src/midisynth.h
+#
+# dr_wav files - licensed under (public-domain or MIT-0):
+# - src/external/dr_wav.h
+# rang files - licensed under the Unlicense:
+# - src/external/rang.hpp
+# Note that both dr_wav and rang are un-bundled and replaced with versions
+# provided by Gentoo packages. However, since these are header-only libraries,
+# their licenses are still included in the LICENSE variable.
+#
+# PicoJSON is used only for Emscripten builds (and unbundled before build).
+# --
+# The program also uses a couple of 3rd-party fonts. Since these are not
+# loaded at runtime, but rather baked into the executable at compile time,
+# their licenses are also added to the License tag.
+#
+# Baekmuk files - licensed under the Baekmuk license:
+# - resources/shinonome/korean/
+#
+# Shinonome files - released into the public domain:
+# - resources/shinonome/
+#
+# ttyp0 files - licensed under the ttyp0 license,
+# a variant of the MIT license:
+# - resources/ttyp0/
+#
+# WenQuanYi files - licensed under
+# GPLv2-or-later with Font Embedding Exception:
+# - resources/wenquanyi/
+#
+#
+# The upstream tarball contains also "Teenyicons", under the MIT license,
+# but those are used only for Emscripten builds.
+
+LICENSE="BAEKMUK CC-BY-4.0 GPL-2+-with-font-exception GPL-3+ public-domain
+	TTYP0 Unlicense || ( MIT-0 public-domain )"
+SLOT="0"
+
+KEYWORDS="~amd64"
+
+IUSE="doc fluidsynth harfbuzz +sound truetype +wildmidi"
+REQUIRED_USE="
+	fluidsynth? ( sound )
+	harfbuzz? ( truetype )
+	wildmidi? ( sound )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-backport-unbundle-dr_wav.patch
+	"${FILESDIR}"/${P}-backport-unbundle-rang.patch
+	"${FILESDIR}"/${P}-backport-update-for-fmt10.patch
+	"${FILESDIR}"/${P}-backport-use-after-free-fluidsynth.patch
+	"${FILESDIR}"/${P}-unbundle-picojson.patch
+)
+
+DEPEND="
+	dev-cpp/rang
+	>=dev-games/liblcf-${PV}
+	dev-libs/libfmt:=
+	media-libs/libpng:=
+	>=media-libs/libsdl2-2.0.5[joystick,sound?,video]
+	sys-libs/zlib
+	x11-libs/pixman
+	harfbuzz? ( media-libs/harfbuzz:=[truetype] )
+	truetype? ( media-libs/freetype:= )
+	sound? (
+			 media-libs/dr_wav
+			 media-libs/libsndfile
+			 media-libs/libvorbis
+			 media-libs/opusfile
+			 media-libs/speexdsp
+			 media-sound/mpg123
+			 media-libs/libxmp
+			 fluidsynth? ( media-sound/fluidsynth )
+			 wildmidi? ( media-sound/wildmidi )
+			 !fluidsynth? ( !wildmidi? ( media-libs/alsa-lib ) )
+		   )
+"
+RDEPEND="${DEPEND}
+	fluidsynth? ( media-sound/fluid-soundfont )
+"
+BDEPEND="virtual/pkgconfig
+	doc? (
+		   app-doc/doxygen
+		   media-gfx/graphviz[svg]
+		 )
+"
+
+DOC_CONTENTS="
+EasyRPG Player chooses its library for MIDI output in increasing order:
+1. FluidSynth
+2. WildMIDI
+3. ALSA
+
+With all three enabled, it first tries to send MIDI messages to FluidSynth. If
+that fails it falls back to WildMIDI then to ALSA. Currently, the capability to
+find and configure a suitable MIDI client through ALSA is limited. It is
+recommended to enable one of the other backends, otherwise you are likely to
+have no sound.
+This package enables support for the ALSA backend only if the other two are
+disabled.
+
+For the requirements for suitable ALSA MIDI clients please reference the source
+code at src/platform/linux/midiout_device_alsa.cpp
+"
+
+src_prepare() {
+	# Install prebuilt manpage instead of rebuilding it conditionally.
+	sed -i -e "s/if(ASCIIDOCTOR_EXECUTABLE)/if(FALSE)/" \
+		-e "s/SUPPORT_AUDIO=1/SUPPORT_AUDIO=$(usex sound 1 0)/" CMakeLists.txt || die
+	cmake_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DPLAYER_BUILD_LIBLCF=OFF
+
+		# Use the first default choice
+		-DPLAYER_WITH_SPEEXDSP=$(usex sound)
+		-DPLAYER_WITH_SAMPLERATE=no
+
+		-DPLAYER_WITH_MPG123=$(usex sound)
+		-DPLAYER_WITH_OGGVORBIS=$(usex sound)
+		-DPLAYER_WITH_OPUS=$(usex sound)
+		-DPLAYER_WITH_XMP=$(usex sound)
+
+		# Avoid vendoring, use FluidSynth or WildMIDI (or ALSA) instead
+		-DPLAYER_ENABLE_FMMIDI=no
+		-DPLAYER_WITH_FLUIDSYNTH=$(usex fluidsynth)
+		-DPLAYER_WITH_WILDMIDI=$(usex wildmidi)
+		-DPLAYER_WITH_NATIVE_MIDI=$(usex sound $(usex fluidsynth no $(usex wildmidi no yes)) no)
+		# Serves as fallback when FluidSynth isn't found
+		-DPLAYER_WITH_FLUIDLITE=no
+		# Enable dr_wav for faster WAV decoding, fall back to libsndfile
+		-DPLAYER_ENABLE_DRWAV=$(usex sound)
+		-DPLAYER_WITH_LIBSNDFILE=$(usex sound)
+
+		# The text shaping engine is strictly dependent on the availability
+		# of TrueType fonts
+		-DPLAYER_WITH_HARFBUZZ=$(usex harfbuzz)
+		-DPLAYER_WITH_FREETYPE=$(usex harfbuzz yes $(usex truetype))
+	)
+	cmake_src_configure
+}
+
+src_compile() {
+	cmake_src_compile
+	if use doc; then
+		einfo "Building the documentation might take a while..."
+		cmake_build doc
+	fi
+}
+
+src_test() {
+	cmake_build check
+}
+
+src_install() {
+	cmake_src_install
+	if use doc; then
+		docinto /usr/share/doc/${PF}/html
+		dodoc -r "${BUILD_DIR}"/doc/*
+	fi
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+	readme.gentoo_print_elog
+}

diff --git a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-use-after-free-fluidsynth.patch b/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-use-after-free-fluidsynth.patch
new file mode 100644
index 0000000000..693ee2bd75
--- /dev/null
+++ b/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-use-after-free-fluidsynth.patch
@@ -0,0 +1,180 @@
+The following commit was fixed and backported from upstream. The fix adds
+a header to audio_generic_midiout.h to provide the missing definition
+of AudioDecoderMidi at compile time.
+Author: Lucio Sauer <watermanpaint@posteo.net>
+
+https://github.com/EasyRPG/Player/issues/3079
+commit 7269d325035f547907ec352bff5d39bc611abc88
+Author: Ghabry <gabriel+github@mastergk.de>
+Date:   Fri Sep 22 20:45:19 2023 +0200
+
+    GenericAudio: Make static variables instance variables
+
+    This way they are destroyed when the DisplayUi is destroyed instead of when the process terminates.
+
+    Fixes a use-after-free in the Fluidsynth Decoder.
+--- a/src/audio_generic.cpp
++++ b/src/audio_generic.cpp
+@@ -20,33 +20,21 @@
+ #include <cstring>
+ #include <cassert>
+ #include <memory>
+-#include "audio_decoder_midi.h"
+ #include "audio_generic.h"
+-#include "audio_generic_midiout.h"
+-#include "filefinder.h"
+ #include "output.h"
+ 
+-GenericAudio::BgmChannel GenericAudio::BGM_Channels[nr_of_bgm_channels];
+-GenericAudio::SeChannel GenericAudio::SE_Channels[nr_of_se_channels];
+-bool GenericAudio::BGM_PlayedOnceIndicator;
+-
+-std::vector<int16_t> GenericAudio::sample_buffer = {};
+-std::vector<uint8_t> GenericAudio::scrap_buffer = {};
+-unsigned GenericAudio::scrap_buffer_size = 0;
+-std::vector<float> GenericAudio::mixer_buffer = {};
+-
+-std::unique_ptr<GenericAudioMidiOut> GenericAudio::midi_thread;
+-
+ GenericAudio::GenericAudio(const Game_ConfigAudio& cfg) : AudioInterface(cfg) {
+ 	int i = 0;
+ 	for (auto& BGM_Channel : BGM_Channels) {
+ 		BGM_Channel.id = i++;
+ 		BGM_Channel.decoder.reset();
++		BGM_Channel.instance = this;
+ 	}
+ 	i = 0;
+ 	for (auto& SE_Channel : SE_Channels) {
+ 		SE_Channel.id = i++;
+ 		SE_Channel.decoder.reset();
++		SE_Channel.instance = this;
+ 	}
+ 	BGM_PlayedOnceIndicator = false;
+ 	midi_thread.reset();
+@@ -492,8 +480,8 @@ void GenericAudio::BgmChannel::Stop() {
+ 	stopped = true;
+ 	if (midi_out_used) {
+ 		midi_out_used = false;
+-		midi_thread->GetMidiOut().Reset();
+-		midi_thread->GetMidiOut().Pause();
++		instance->midi_thread->GetMidiOut().Reset();
++		instance->midi_thread->GetMidiOut().Pause();
+ 	} else if (decoder) {
+ 		decoder.reset();
+ 	}
+@@ -503,16 +491,16 @@ void GenericAudio::BgmChannel::SetPaused(bool newPaused) {
+ 	paused = newPaused;
+ 	if (midi_out_used) {
+ 		if (newPaused) {
+-			midi_thread->GetMidiOut().Pause();
++			instance->midi_thread->GetMidiOut().Pause();
+ 		} else {
+-			midi_thread->GetMidiOut().Resume();
++			instance->midi_thread->GetMidiOut().Resume();
+ 		}
+ 	}
+ }
+ 
+ int GenericAudio::BgmChannel::GetTicks() const {
+ 	if (midi_out_used) {
+-		return midi_thread->GetMidiOut().GetTicks();
++		return instance->midi_thread->GetMidiOut().GetTicks();
+ 	} else if (decoder) {
+ 		return decoder->GetTicks();
+ 	}
+@@ -521,7 +509,7 @@ int GenericAudio::BgmChannel::GetTicks() const {
+ 
+ void GenericAudio::BgmChannel::SetFade(int fade) {
+ 	if (midi_out_used) {
+-		midi_thread->GetMidiOut().SetFade(0, std::chrono::milliseconds(fade));
++		instance->midi_thread->GetMidiOut().SetFade(0, std::chrono::milliseconds(fade));
+ 	} else if (decoder) {
+ 		decoder->SetFade(0, std::chrono::milliseconds(fade));
+ 	}
+@@ -529,7 +517,7 @@ void GenericAudio::BgmChannel::SetFade(int fade) {
+ 
+ void GenericAudio::BgmChannel::SetVolume(int volume) {
+ 	if (midi_out_used) {
+-		midi_thread->GetMidiOut().SetVolume(volume);
++		instance->midi_thread->GetMidiOut().SetVolume(volume);
+ 	} else if (decoder) {
+ 		decoder->SetVolume(volume);
+ 	}
+@@ -537,7 +525,7 @@ void GenericAudio::BgmChannel::SetVolume(int volume) {
+ 
+ void GenericAudio::BgmChannel::SetPitch(int pitch) {
+ 	if (midi_out_used) {
+-		midi_thread->GetMidiOut().SetPitch(pitch);
++		instance->midi_thread->GetMidiOut().SetPitch(pitch);
+ 	} else if (decoder) {
+ 		decoder->SetPitch(pitch);
+ 	}
+old mode 100644
+new mode 100755
+--- a/src/audio_generic.h
++++ b/src/audio_generic.h
+@@ -21,10 +21,9 @@
+ #include "audio.h"
+ #include "audio_secache.h"
+ #include "audio_decoder_base.h"
++#include "audio_generic_midiout.h"
+ #include <memory>
+ 
+-class GenericAudioMidiOut;
+-
+ /**
+  * A software implementation for handling EasyRPG Audio utilizing the
+  * AudioDecoder for BGM and AudioSeCache for fast SE playback.
+@@ -73,6 +72,7 @@ private:
+ 	struct BgmChannel {
+ 		int id;
+ 		std::unique_ptr<AudioDecoderBase> decoder;
++		GenericAudio* instance = nullptr;
+ 		bool paused;
+ 		bool stopped;
+ 		bool midi_out_used = false;
+@@ -87,6 +87,7 @@ private:
+ 	struct SeChannel {
+ 		int id;
+ 		std::unique_ptr<AudioDecoderBase> decoder;
++		GenericAudio* instance = nullptr;
+ 		bool paused;
+ 		bool stopped;
+ 	};
+@@ -103,17 +104,17 @@ private:
+ 	static constexpr unsigned nr_of_se_channels = 31;
+ 	static constexpr unsigned nr_of_bgm_channels = 2;
+ 
+-	static BgmChannel BGM_Channels[nr_of_bgm_channels];
+-	static SeChannel SE_Channels[nr_of_se_channels];
+-	static bool BGM_PlayedOnceIndicator;
+-	static bool Muted;
++	BgmChannel BGM_Channels[nr_of_bgm_channels];
++	SeChannel SE_Channels[nr_of_se_channels];
++	mutable bool BGM_PlayedOnceIndicator;
++	bool Muted;
+ 
+-	static std::vector<int16_t> sample_buffer;
+-	static std::vector<uint8_t> scrap_buffer;
+-	static unsigned scrap_buffer_size;
+-	static std::vector<float> mixer_buffer;
++	std::vector<int16_t> sample_buffer = {};
++	std::vector<uint8_t> scrap_buffer = {};
++	unsigned scrap_buffer_size = 0;
++	std::vector<float> mixer_buffer = {};
+ 
+-	static std::unique_ptr<GenericAudioMidiOut> midi_thread;
++	std::unique_ptr<GenericAudioMidiOut> midi_thread;
+ };
+ 
+ #endif
+--- a/src/audio_generic_midiout.h
++++ b/src/audio_generic_midiout.h
+@@ -19,6 +19,7 @@
+ #define EP_AUDIO_GENERIC_MIDITHREAD_H
+ 
+ #include <memory>
++#include "audio_decoder_midi.h"
+ #include "system.h"
+ 
+ class AudioDecoderMidi;

diff --git a/profiles/package.use.mask b/profiles/package.use.mask
index 32610624a9..fc5de3454a 100644
--- a/profiles/package.use.mask
+++ b/profiles/package.use.mask
@@ -3,10 +3,6 @@
 
 # New entries go on top.
 
-# Lucio Sauer<watermanpaint@posteo.net> (2023-09-01)
-# Segfaults upon termination when run from inside a game folder.
-~games-engines/easyrpg-player-0.8 fluidsynth
-
 # Anna Vyalkova <cyber+gentoo@sysrq.in> (2023-06-17)
 # Broken docs build.
 dev-crystal/crikey doc


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: games-engines/easyrpg-player/files/, games-engines/easyrpg-player/, profiles/
@ 2024-11-22  8:31 Lucio Sauer
  2024-11-22  8:49 ` [gentoo-commits] repo/proj/guru:master commit in: games-engines/easyrpg-player/files/, profiles/, games-engines/easyrpg-player/ Lucio Sauer
  0 siblings, 1 reply; 3+ messages in thread
From: Lucio Sauer @ 2024-11-22  8:31 UTC (permalink / raw
  To: gentoo-commits

commit:     74719d2da1ca89e1e7036e27a1cbfbd54eeb1788
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Fri Nov 22 08:26:39 2024 +0000
Commit:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
CommitDate: Fri Nov 22 08:26:39 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=74719d2d

games-engines/easyrpg-player: treeclean

Closes: https://bugs.gentoo.org/932475 (pkgremoved)
Closes: https://bugs.gentoo.org/927882 (pkgremoved)
Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>

 games-engines/easyrpg-player/Manifest              |   2 -
 .../easyrpg-player/easyrpg-player-0.7.0.ebuild     |  73 --------
 .../easyrpg-player/easyrpg-player-0.8-r1.ebuild    | 193 -------------------
 .../easyrpg-player/easyrpg-player-0.8.ebuild       | 192 -------------------
 ...syrpg-player-0.8-backport-unbundle-dr_wav.patch |  43 -----
 ...easyrpg-player-0.8-backport-unbundle-rang.patch |  23 ---
 ...yrpg-player-0.8-backport-update-for-fmt10.patch | 208 ---------------------
 ...er-0.8-backport-use-after-free-fluidsynth.patch | 180 ------------------
 .../easyrpg-player-0.8-unbundle-picojson.patch     |  18 --
 games-engines/easyrpg-player/metadata.xml          |  28 ---
 profiles/package.mask                              |   6 -
 11 files changed, 966 deletions(-)

diff --git a/games-engines/easyrpg-player/Manifest b/games-engines/easyrpg-player/Manifest
deleted file mode 100644
index f01076a65..000000000
--- a/games-engines/easyrpg-player/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST easyrpg-player-0.7.0.tar.gz 6426198 BLAKE2B fc08962cab0842a53535472fbf348d3c46fb71108b14655cb98d7f04a3a0f441fae644ab109e34733f55ce834d524fbd424ea30e80585e5e4e7f69b15041fe63 SHA512 6c2a5cedbd2022517f2cfb2e3bebc9773addb93cbf3e897fb57f31baf94c644bf4437ceff5be578b3a564e8a5f72c448dd0391bc418658d517ca755cab5ec97f
-DIST easyrpg-player-0.8.tar.xz 4966028 BLAKE2B ff445f831a879fe7562e98a4e5a0c973ef8d750236cd2c17bf65b21135f896ee7edd0f0137b88cf0ed417fcfd5729358a63d61b34d9ece017ba4fdc85efaa445 SHA512 b1caf45284e29706bdd885d132fe7605d1f2972a3b3e238ba2fbd40058ae1c31aac5277fced23bd216153feb9a440a2652ef696b6b310b907fbc3c1376aa03ad

diff --git a/games-engines/easyrpg-player/easyrpg-player-0.7.0.ebuild b/games-engines/easyrpg-player/easyrpg-player-0.7.0.ebuild
deleted file mode 100644
index 21d7d73ee..000000000
--- a/games-engines/easyrpg-player/easyrpg-player-0.7.0.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake xdg
-
-DESCRIPTION="RPG Maker 2000/2003 and EasyRPG games interpreter"
-HOMEPAGE="https://easyrpg.org/player/"
-SRC_URI="https://github.com/EasyRPG/Player/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
-S="${WORKDIR}/Player-${PV}/"
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="doc fluidsynth wildmidi"
-
-DEPEND="
-	>=dev-games/liblcf-${PV}
-	>=media-libs/libsdl2-2.0.5
-	media-libs/libpng:=
-	x11-libs/pixman
-	dev-libs/libfmt:=
-	media-libs/freetype:=
-	media-libs/harfbuzz:=
-	media-libs/alsa-lib
-
-	media-libs/speexdsp
-
-	media-sound/mpg123
-	media-libs/libsndfile
-	media-libs/libvorbis
-	media-libs/opus
-	wildmidi? ( media-sound/wildmidi )
-	fluidsynth? ( media-sound/fluidsynth )
-	media-libs/libxmp
-
-	dev-ruby/asciidoctor
-
-	doc? ( app-text/doxygen )
-"
-RDEPEND="${DEPEND}"
-
-src_configure() {
-	local mycmakeargs=(
-		-DPLAYER_WITH_FLUIDLITE=OFF
-		# Avoid vendoring, uses libsndfile instead
-		-DPLAYER_ENABLE_DRWAV=OFF
-
-		# Use the first default choice
-		-DPLAYER_WITH_SPEEXDSP=ON
-		-DPLAYER_WITH_SAMPLERATE=OFF
-
-		-DPLAYER_WITH_MPG123=ON
-		-DPLAYER_WITH_LIBSNDFILE=ON
-		-DPLAYER_WITH_OGGVORBIS=ON
-		-DPLAYER_WITH_OPUS=ON
-		-DPLAYER_WITH_WILDMIDI=$(usex wildmidi)
-		-DPLAYER_WITH_FLUIDSYNTH=$(usex fluidsynth)
-		# Serves as fallback when FluidSynth isn't found
-		-DPLAYER_WITH_FLUIDLITE=OFF
-
-		# Avoid vendoring, uses wildmidi or fluidsynth instead
-		-DPLAYER_ENABLE_FMMIDI=OFF
-
-		-DPLAYER_WITH_XMP=ON
-	)
-
-	cmake_src_configure
-}
-
-src_test() {
-	cmake_build check
-}

diff --git a/games-engines/easyrpg-player/easyrpg-player-0.8-r1.ebuild b/games-engines/easyrpg-player/easyrpg-player-0.8-r1.ebuild
deleted file mode 100644
index c47c12f85..000000000
--- a/games-engines/easyrpg-player/easyrpg-player-0.8-r1.ebuild
+++ /dev/null
@@ -1,193 +0,0 @@
-# Copyright 2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake readme.gentoo-r1 xdg
-
-DESCRIPTION="RPG Maker 2000/2003 and EasyRPG games interpreter"
-HOMEPAGE="https://easyrpg.org/player/
-	https://github.com/EasyRPG/Player"
-SRC_URI="https://easyrpg.org/downloads/player/${PV}/${P}.tar.xz"
-
-# EasyRPG Player itself is GPLv3+.
-# The program's logos are CC-BY-SA 4.0.
-# --
-# The program bundles several 3rd-party libraries.
-#
-# FMMidi files - licensed under the 3-clause BSD license.
-# Since the files do not end up in the executable due to the configuration,
-# we ignore it.
-# - src/midisequencer.cpp
-# - src/midisequencer.h
-# - src/midisynth.cpp
-# - src/midisynth.h
-#
-# dr_wav files - licensed under (public-domain or MIT-0):
-# - src/external/dr_wav.h
-# rang files - licensed under the Unlicense:
-# - src/external/rang.hpp
-# Note that both dr_wav and rang are un-bundled and replaced with versions
-# provided by Gentoo packages. However, since these are header-only libraries,
-# their licenses are still included in the LICENSE variable.
-#
-# PicoJSON is used only for Emscripten builds (and unbundled before build).
-# --
-# The program also uses a couple of 3rd-party fonts. Since these are not
-# loaded at runtime, but rather baked into the executable at compile time,
-# their licenses are also added to the License tag.
-#
-# Baekmuk files - licensed under the Baekmuk license:
-# - resources/shinonome/korean/
-#
-# Shinonome files - released into the public domain:
-# - resources/shinonome/
-#
-# ttyp0 files - licensed under the ttyp0 license,
-# a variant of the MIT license:
-# - resources/ttyp0/
-#
-# WenQuanYi files - licensed under
-# GPLv2-or-later with Font Embedding Exception:
-# - resources/wenquanyi/
-#
-#
-# The upstream tarball contains also "Teenyicons", under the MIT license,
-# but those are used only for Emscripten builds.
-
-LICENSE="BAEKMUK CC-BY-4.0 GPL-2+-with-font-exception GPL-3+ public-domain
-	TTYP0 Unlicense || ( MIT-0 public-domain )"
-SLOT="0"
-
-KEYWORDS="~amd64"
-
-IUSE="doc fluidsynth harfbuzz +sound truetype +wildmidi"
-REQUIRED_USE="
-	fluidsynth? ( sound )
-	harfbuzz? ( truetype )
-	wildmidi? ( sound )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-backport-unbundle-dr_wav.patch
-	"${FILESDIR}"/${P}-backport-unbundle-rang.patch
-	"${FILESDIR}"/${P}-backport-update-for-fmt10.patch
-	"${FILESDIR}"/${P}-backport-use-after-free-fluidsynth.patch
-	"${FILESDIR}"/${P}-unbundle-picojson.patch
-)
-
-DEPEND="
-	dev-cpp/rang
-	>=dev-games/liblcf-${PV}
-	dev-libs/libfmt:=
-	media-libs/libpng:=
-	>=media-libs/libsdl2-2.0.5[joystick,sound?,video]
-	sys-libs/zlib
-	x11-libs/pixman
-	harfbuzz? ( media-libs/harfbuzz:=[truetype] )
-	truetype? ( media-libs/freetype:= )
-	sound? (
-			 media-libs/dr_wav
-			 media-libs/libsndfile
-			 media-libs/libvorbis
-			 media-libs/opusfile
-			 media-libs/speexdsp
-			 media-sound/mpg123
-			 media-libs/libxmp
-			 fluidsynth? ( media-sound/fluidsynth )
-			 wildmidi? ( media-sound/wildmidi )
-			 !fluidsynth? ( !wildmidi? ( media-libs/alsa-lib ) )
-		   )
-"
-RDEPEND="${DEPEND}
-	fluidsynth? ( media-sound/fluid-soundfont )
-"
-BDEPEND="virtual/pkgconfig
-	doc? (
-		   app-text/doxygen
-		   media-gfx/graphviz[svg]
-		 )
-"
-
-DOC_CONTENTS="
-EasyRPG Player chooses its library for MIDI output in increasing order:
-1. FluidSynth
-2. WildMIDI
-3. ALSA
-
-With all three enabled, it first tries to send MIDI messages to FluidSynth. If
-that fails it falls back to WildMIDI then to ALSA. Currently, the capability to
-find and configure a suitable MIDI client through ALSA is limited. It is
-recommended to enable one of the other backends, otherwise you are likely to
-have no sound.
-This package enables support for the ALSA backend only if the other two are
-disabled.
-
-For the requirements for suitable ALSA MIDI clients please reference the source
-code at src/platform/linux/midiout_device_alsa.cpp
-"
-
-src_prepare() {
-	# Install prebuilt manpage instead of rebuilding it conditionally.
-	sed -i -e "s/if(ASCIIDOCTOR_EXECUTABLE)/if(FALSE)/" \
-		-e "s/SUPPORT_AUDIO=1/SUPPORT_AUDIO=$(usex sound 1 0)/" CMakeLists.txt || die
-	cmake_src_prepare
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DPLAYER_BUILD_LIBLCF=OFF
-
-		# Use the first default choice
-		-DPLAYER_WITH_SPEEXDSP=$(usex sound)
-		-DPLAYER_WITH_SAMPLERATE=no
-
-		-DPLAYER_WITH_MPG123=$(usex sound)
-		-DPLAYER_WITH_OGGVORBIS=$(usex sound)
-		-DPLAYER_WITH_OPUS=$(usex sound)
-		-DPLAYER_WITH_XMP=$(usex sound)
-
-		# Avoid vendoring, use FluidSynth or WildMIDI (or ALSA) instead
-		-DPLAYER_ENABLE_FMMIDI=no
-		-DPLAYER_WITH_FLUIDSYNTH=$(usex fluidsynth)
-		-DPLAYER_WITH_WILDMIDI=$(usex wildmidi)
-		-DPLAYER_WITH_NATIVE_MIDI=$(usex sound $(usex fluidsynth no $(usex wildmidi no yes)) no)
-		# Serves as fallback when FluidSynth isn't found
-		-DPLAYER_WITH_FLUIDLITE=no
-		# Enable dr_wav for faster WAV decoding, fall back to libsndfile
-		-DPLAYER_ENABLE_DRWAV=$(usex sound)
-		-DPLAYER_WITH_LIBSNDFILE=$(usex sound)
-
-		# The text shaping engine is strictly dependent on the availability
-		# of TrueType fonts
-		-DPLAYER_WITH_HARFBUZZ=$(usex harfbuzz)
-		-DPLAYER_WITH_FREETYPE=$(usex harfbuzz yes $(usex truetype))
-	)
-	cmake_src_configure
-}
-
-src_compile() {
-	cmake_src_compile
-	if use doc; then
-		einfo "Building the documentation might take a while..."
-		cmake_build doc
-	fi
-}
-
-src_test() {
-	cmake_build check
-}
-
-src_install() {
-	cmake_src_install
-	if use doc; then
-		docinto /usr/share/doc/${PF}/html
-		dodoc -r "${BUILD_DIR}"/doc/*
-	fi
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	readme.gentoo_print_elog
-}

diff --git a/games-engines/easyrpg-player/easyrpg-player-0.8.ebuild b/games-engines/easyrpg-player/easyrpg-player-0.8.ebuild
deleted file mode 100644
index b8a90d388..000000000
--- a/games-engines/easyrpg-player/easyrpg-player-0.8.ebuild
+++ /dev/null
@@ -1,192 +0,0 @@
-# Copyright 2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake readme.gentoo-r1 xdg
-
-DESCRIPTION="RPG Maker 2000/2003 and EasyRPG games interpreter"
-HOMEPAGE="https://easyrpg.org/player/
-	https://github.com/EasyRPG/Player"
-SRC_URI="https://easyrpg.org/downloads/player/${PV}/${P}.tar.xz"
-
-# EasyRPG Player itself is GPLv3+.
-# The program's logos are CC-BY-SA 4.0.
-# --
-# The program bundles several 3rd-party libraries.
-#
-# FMMidi files - licensed under the 3-clause BSD license.
-# Since the files do not end up in the executable due to the configuration,
-# we ignore it.
-# - src/midisequencer.cpp
-# - src/midisequencer.h
-# - src/midisynth.cpp
-# - src/midisynth.h
-#
-# dr_wav files - licensed under (public-domain or MIT-0):
-# - src/external/dr_wav.h
-# rang files - licensed under the Unlicense:
-# - src/external/rang.hpp
-# Note that both dr_wav and rang are un-bundled and replaced with versions
-# provided by Gentoo packages. However, since these are header-only libraries,
-# their licenses are still included in the LICENSE variable.
-#
-# PicoJSON is used only for Emscripten builds (and unbundled before build).
-# --
-# The program also uses a couple of 3rd-party fonts. Since these are not
-# loaded at runtime, but rather baked into the executable at compile time,
-# their licenses are also added to the License tag.
-#
-# Baekmuk files - licensed under the Baekmuk license:
-# - resources/shinonome/korean/
-#
-# Shinonome files - released into the public domain:
-# - resources/shinonome/
-#
-# ttyp0 files - licensed under the ttyp0 license,
-# a variant of the MIT license:
-# - resources/ttyp0/
-#
-# WenQuanYi files - licensed under
-# GPLv2-or-later with Font Embedding Exception:
-# - resources/wenquanyi/
-#
-#
-# The upstream tarball contains also "Teenyicons", under the MIT license,
-# but those are used only for Emscripten builds.
-
-LICENSE="BAEKMUK CC-BY-4.0 GPL-2+-with-font-exception GPL-3+ public-domain
-	TTYP0 Unlicense || ( MIT-0 public-domain )"
-SLOT="0"
-
-KEYWORDS="~amd64"
-
-IUSE="doc fluidsynth harfbuzz +sound truetype +wildmidi"
-REQUIRED_USE="
-	fluidsynth? ( sound )
-	harfbuzz? ( truetype )
-	wildmidi? ( sound )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-backport-unbundle-dr_wav.patch
-	"${FILESDIR}"/${P}-backport-unbundle-rang.patch
-	"${FILESDIR}"/${P}-backport-update-for-fmt10.patch
-	"${FILESDIR}"/${P}-unbundle-picojson.patch
-)
-
-DEPEND="
-	dev-cpp/rang
-	>=dev-games/liblcf-${PV}
-	dev-libs/libfmt:=
-	media-libs/libpng:=
-	>=media-libs/libsdl2-2.0.5[joystick,sound?,video]
-	sys-libs/zlib
-	x11-libs/pixman
-	harfbuzz? ( media-libs/harfbuzz:=[truetype] )
-	truetype? ( media-libs/freetype:= )
-	sound? (
-			 media-libs/dr_wav
-			 media-libs/libsndfile
-			 media-libs/libvorbis
-			 media-libs/opusfile
-			 media-libs/speexdsp
-			 media-sound/mpg123
-			 media-libs/libxmp
-			 fluidsynth? ( media-sound/fluidsynth )
-			 wildmidi? ( media-sound/wildmidi )
-			 !fluidsynth? ( !wildmidi? ( media-libs/alsa-lib ) )
-		   )
-"
-RDEPEND="${DEPEND}
-	fluidsynth? ( media-sound/fluid-soundfont )
-"
-BDEPEND="virtual/pkgconfig
-	doc? (
-		   app-text/doxygen
-		   media-gfx/graphviz[svg]
-		 )
-"
-
-DOC_CONTENTS="
-EasyRPG Player chooses its library for MIDI output in increasing order:
-1. FluidSynth
-2. WildMIDI
-3. ALSA
-
-With all three enabled, it first tries to send MIDI messages to FluidSynth. If
-that fails it falls back to WildMIDI then to ALSA. Currently, the capability to
-find and configure a suitable MIDI client through ALSA is limited. It is
-recommended to enable one of the other backends, otherwise you are likely to
-have no sound.
-This package enables support for the ALSA backend only if the other two are
-disabled.
-
-For the requirements for suitable ALSA MIDI clients please reference the source
-code at src/platform/linux/midiout_device_alsa.cpp
-"
-
-src_prepare() {
-	# Install prebuilt manpage instead of rebuilding it conditionally.
-	sed -i -e "s/if(ASCIIDOCTOR_EXECUTABLE)/if(FALSE)/" \
-		-e "s/SUPPORT_AUDIO=1/SUPPORT_AUDIO=$(usex sound 1 0)/" CMakeLists.txt || die
-	cmake_src_prepare
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DPLAYER_BUILD_LIBLCF=OFF
-
-		# Use the first default choice
-		-DPLAYER_WITH_SPEEXDSP=$(usex sound)
-		-DPLAYER_WITH_SAMPLERATE=no
-
-		-DPLAYER_WITH_MPG123=$(usex sound)
-		-DPLAYER_WITH_OGGVORBIS=$(usex sound)
-		-DPLAYER_WITH_OPUS=$(usex sound)
-		-DPLAYER_WITH_XMP=$(usex sound)
-
-		# Avoid vendoring, use FluidSynth or WildMIDI (or ALSA) instead
-		-DPLAYER_ENABLE_FMMIDI=no
-		-DPLAYER_WITH_FLUIDSYNTH=$(usex fluidsynth)
-		-DPLAYER_WITH_WILDMIDI=$(usex wildmidi)
-		-DPLAYER_WITH_NATIVE_MIDI=$(usex sound $(usex fluidsynth no $(usex wildmidi no yes)) no)
-		# Serves as fallback when FluidSynth isn't found
-		-DPLAYER_WITH_FLUIDLITE=no
-		# Enable dr_wav for faster WAV decoding, fall back to libsndfile
-		-DPLAYER_ENABLE_DRWAV=$(usex sound)
-		-DPLAYER_WITH_LIBSNDFILE=$(usex sound)
-
-		# The text shaping engine is strictly dependent on the availability
-		# of TrueType fonts
-		-DPLAYER_WITH_HARFBUZZ=$(usex harfbuzz)
-		-DPLAYER_WITH_FREETYPE=$(usex harfbuzz yes $(usex truetype))
-	)
-	cmake_src_configure
-}
-
-src_compile() {
-	cmake_src_compile
-	if use doc; then
-		einfo "Building the documentation might take a while..."
-		cmake_build doc
-	fi
-}
-
-src_test() {
-	cmake_build check
-}
-
-src_install() {
-	cmake_src_install
-	if use doc; then
-		docinto /usr/share/doc/${PF}/html
-		dodoc -r "${BUILD_DIR}"/doc/*
-	fi
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	readme.gentoo_print_elog
-}

diff --git a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-unbundle-dr_wav.patch b/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-unbundle-dr_wav.patch
deleted file mode 100644
index 869c63b7d..000000000
--- a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-unbundle-dr_wav.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-commit d2e92225ad0af2d52e8884b64ba2bac1b6006377
-Author: Ghabry <gabriel+github@mastergk.de>
-Date:   Thu May 4 16:32:42 2023 +0200
-
-    Do not vendor dr_wav header if there is a system header available
-    
-    Fedora unbundles our dr_wav because they have a system header
-
---- a/src/decoder_drwav.cpp
-+++ b/src/decoder_drwav.cpp
-@@ -21,7 +21,13 @@
- #ifdef WANT_DRWAV
- 
- #define DR_WAV_IMPLEMENTATION
--#include "external/dr_wav.h"
-+// Use system dr_wav header if available
-+#if __has_include(<dr_wav.h>)
-+#  include <dr_wav.h>
-+#else
-+#  include "external/dr_wav.h"
-+#endif
-+
- 
- DrWavDecoder::DrWavDecoder() {
- 	music_type = "wav";
---- a/src/decoder_drwav.h
-+++ b/src/decoder_drwav.h
-@@ -24,9 +24,12 @@
- // Headers
- #include "audio_decoder.h"
- #define DR_WAV_NO_STDIO
--#include "external/dr_wav.h"
--#include <string>
--#include <memory>
-+// Use system dr_wav header if available
-+#if __has_include(<dr_wav.h>)
-+#  include <dr_wav.h>
-+#else
-+#  include "external/dr_wav.h"
-+#endif
- 
- /**
-  * Standalone audio decoder powered by dr_wav

diff --git a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-unbundle-rang.patch b/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-unbundle-rang.patch
deleted file mode 100644
index 4ca9b286c..000000000
--- a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-unbundle-rang.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-commit 63029163d86224aa4f9da798c760b1836d73f62b
-Author: Ghabry <gabriel+github@mastergk.de>
-Date:   Thu Jun 8 12:54:33 2023 +0200
-
-    rang: Use system header if available
-
---- a/src/output.cpp
-+++ b/src/output.cpp
-@@ -31,7 +31,13 @@
- #elif defined(__vita__)
- #  include <psp2/kernel/processmgr.h>
- #endif
--#include "external/rang.hpp"
-+
-+// Use system rang header if available
-+#if __has_include(<rang.hpp>)
-+#  include <rang.hpp>
-+#else
-+#  include "external/rang.hpp"
-+#endif
- 
- #include "output.h"
- #include "graphics.h"

diff --git a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-update-for-fmt10.patch b/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-update-for-fmt10.patch
deleted file mode 100644
index a644c1410..000000000
--- a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-update-for-fmt10.patch
+++ /dev/null
@@ -1,208 +0,0 @@
-commit a4672d2e30db4e4918c8f3580236faed3c9d04c1
-Author: Ghabry <gabriel+github@mastergk.de>
-Date:   Sun May 14 14:41:13 2023 +0200
-
-    Fix building with fmtlib 10
-    
-    to_string_view is a private API since fmt10.
-    
-    The new API only works properly since fmt8.
-    
-    Added casts to enum formating as they are not converted automatically anymore.
-    
-    Fix #3002
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8507e5d1..28d595a2 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -345,6 +345,7 @@ add_library(${PROJECT_NAME} OBJECT
- 	src/state.cpp
- 	src/state.h
- 	src/std_clock.h
-+	src/string_view.cpp
- 	src/string_view.h
- 	src/system.h
- 	src/teleport_target.h
-diff --git a/Makefile.am b/Makefile.am
-index bed1b219..4c477489 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -327,6 +327,7 @@ libeasyrpg_player_a_SOURCES = \
- 	src/state.cpp \
- 	src/state.h \
- 	src/std_clock.h \
-+	src/string_view.cpp \
- 	src/string_view.h \
- 	src/system.h \
- 	src/teleport_target.h \
-diff --git a/src/game_interpreter.cpp b/src/game_interpreter.cpp
-index 7877d77f..7ae056cc 100644
---- a/src/game_interpreter.cpp
-+++ b/src/game_interpreter.cpp
-@@ -2187,7 +2187,7 @@ bool Game_Interpreter::CommandChangeVehicleGraphic(lcf::rpg::EventCommand const&
- 	Game_Vehicle* vehicle = Game_Map::GetVehicle(vehicle_id);
- 
- 	if (!vehicle) {
--		Output::Warning("ChangeVehicleGraphic: Invalid vehicle ID {}", vehicle_id);
-+		Output::Warning("ChangeVehicleGraphic: Invalid vehicle ID {}", static_cast<int>(vehicle_id));
- 		return true;
- 	}
- 
-@@ -2261,7 +2261,7 @@ bool Game_Interpreter::CommandSetVehicleLocation(lcf::rpg::EventCommand const& c
- 			// 0 because we adjust all vehicle IDs by +1 to match the lcf values
- 			Output::Debug("SetVehicleLocation: Party referenced");
- 		} else {
--			Output::Warning("SetVehicleLocation: Invalid vehicle ID {}", vehicle_id);
-+			Output::Warning("SetVehicleLocation: Invalid vehicle ID {}", static_cast<int>(vehicle_id));
- 			return true;
- 		}
- 	}
-@@ -3494,7 +3494,7 @@ bool Game_Interpreter::CommandConditionalBranch(lcf::rpg::EventCommand const& co
- 		Game_Vehicle* vehicle = Game_Map::GetVehicle(vehicle_id);
- 
- 		if (!vehicle) {
--			Output::Warning("ConditionalBranch: Invalid vehicle ID {}", vehicle_id);
-+			Output::Warning("ConditionalBranch: Invalid vehicle ID {}", static_cast<int>(vehicle_id));
- 			return true;
- 		}
- 
-diff --git a/src/game_interpreter_map.cpp b/src/game_interpreter_map.cpp
-index 6c193c2f..0b47a3db 100644
---- a/src/game_interpreter_map.cpp
-+++ b/src/game_interpreter_map.cpp
-@@ -345,7 +345,7 @@ bool Game_Interpreter_Map::CommandEndShop(lcf::rpg::EventCommand const& /* com *
- 
- bool Game_Interpreter_Map::CommandShowInn(lcf::rpg::EventCommand const& com) { // code 10730
- 	int inn_type = com.parameters[0];
--	auto inn_price = com.parameters[1];
-+	int inn_price = com.parameters[1];
- 	// Not used, but left here for documentation purposes
- 	// bool has_inn_handlers = com.parameters[2] != 0;
- 
-diff --git a/src/output.h b/src/output.h
-index 90e11189..78ff3c0c 100644
---- a/src/output.h
-+++ b/src/output.h
-@@ -22,17 +22,8 @@
- #include <string>
- #include <iosfwd>
- #include <fmt/core.h>
--#include <lcf/dbstring.h>
--
- #include "filesystem_stream.h"
- 
--namespace lcf {
--// FIXME: liblcf doesn't depend on fmt, so we need to add this here to enable fmtlib support for lcf::DBString
--inline fmt::basic_string_view<char> to_string_view(const lcf::DBString& s) {
--	return to_string_view(StringView(s));
--}
--}
--
- enum class LogLevel {
- 	Error,
- 	Warning,
-diff --git a/src/player.cpp b/src/player.cpp
-index 0ed6bbb6..654d31e0 100644
---- a/src/player.cpp
-+++ b/src/player.cpp
-@@ -1240,7 +1240,7 @@ void Player::SetupBattleTest() {
- 		}
- 
- 		Output::Debug("BattleTest Mode 2k3 troop=({}) background=({}) formation=({}) condition=({}) terrain=({})",
--				args.troop_id, args.background.c_str(), args.formation, args.condition, args.terrain_id);
-+				args.troop_id, args.background, static_cast<int>(args.formation), static_cast<int>(args.condition), args.terrain_id);
- 	} else {
- 		Output::Debug("BattleTest Mode 2k troop=({}) background=({})", args.troop_id, args.background);
- 	}
-diff --git a/src/string_view.cpp b/src/string_view.cpp
-new file mode 100644
-index 00000000..13a52650
---- /dev/null
-+++ b/src/string_view.cpp
-@@ -0,0 +1,34 @@
-+/*
-+ * This file is part of EasyRPG Player.
-+ *
-+ * EasyRPG Player is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation, either version 3 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * EasyRPG Player is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with EasyRPG Player. If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+#include "string_view.h"
-+
-+#if FMT_VERSION >= EP_FMT_MODERN_VERSION
-+
-+#include <fmt/format.h>
-+
-+auto fmt::formatter<lcf::DBString>::format(const lcf::DBString& s, format_context& ctx) const -> decltype(ctx.out()) {
-+	string_view sv(s.data(), s.size());
-+	return formatter<string_view>::format(sv, ctx);
-+}
-+
-+auto fmt::formatter<lcf::StringView>::format(const lcf::StringView& s, format_context& ctx) const -> decltype(ctx.out()) {
-+	string_view sv(s.data(), s.size());
-+	return formatter<string_view>::format(sv, ctx);
-+}
-+
-+#endif
-diff --git a/src/string_view.h b/src/string_view.h
-index 11e3550d..030bb09a 100644
---- a/src/string_view.h
-+++ b/src/string_view.h
-@@ -22,9 +22,9 @@
- #include <lcf/dbstring.h>
- #include <fmt/core.h>
- 
--// FIXME: needed to allow building with fmt 5, older versions are untested.
-+// Needed to allow building with fmt 5, older versions are untested.
- #if FMT_VERSION < 60000
--#include <fmt/ostream.h>
-+#  include <fmt/ostream.h>
- #endif
- 
- using StringView = lcf::StringView;
-@@ -33,12 +33,33 @@ using U32StringView = lcf::U32StringView;
- using lcf::ToString;
- using lcf::ToStringView;
- 
-+// Version required to use the new formatting API
-+#define EP_FMT_MODERN_VERSION 80000
-+
- // FIXME: liblcf doesn't depend on fmt, so we need to add this here to enable fmtlib support for our StringView.
-+#if FMT_VERSION >= EP_FMT_MODERN_VERSION
-+template<>
-+struct fmt::formatter<lcf::StringView> : fmt::formatter<fmt::string_view> {
-+	auto format(const lcf::StringView& s, format_context& ctx) const -> decltype(ctx.out());
-+};
-+
-+template<>
-+struct fmt::formatter<lcf::DBString> : formatter<string_view> {
-+	auto format(const lcf::DBString& s, format_context& ctx) const -> decltype(ctx.out());
-+};
-+#else
- namespace nonstd { namespace sv_lite {
- template <typename C, typename T>
- inline fmt::basic_string_view<C> to_string_view(basic_string_view<C,T> s) {
--    return fmt::basic_string_view<C>(s.data(), s.size());
-+	return fmt::basic_string_view<C>(s.data(), s.size());
- }
- } }
- 
-+namespace lcf {
-+inline fmt::basic_string_view<char> to_string_view(const lcf::DBString& s) {
-+	return to_string_view(StringView(s));
-+}
-+}
-+#endif
-+
- #endif

diff --git a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-use-after-free-fluidsynth.patch b/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-use-after-free-fluidsynth.patch
deleted file mode 100644
index 693ee2bd7..000000000
--- a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-use-after-free-fluidsynth.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-The following commit was fixed and backported from upstream. The fix adds
-a header to audio_generic_midiout.h to provide the missing definition
-of AudioDecoderMidi at compile time.
-Author: Lucio Sauer <watermanpaint@posteo.net>
-
-https://github.com/EasyRPG/Player/issues/3079
-commit 7269d325035f547907ec352bff5d39bc611abc88
-Author: Ghabry <gabriel+github@mastergk.de>
-Date:   Fri Sep 22 20:45:19 2023 +0200
-
-    GenericAudio: Make static variables instance variables
-
-    This way they are destroyed when the DisplayUi is destroyed instead of when the process terminates.
-
-    Fixes a use-after-free in the Fluidsynth Decoder.
---- a/src/audio_generic.cpp
-+++ b/src/audio_generic.cpp
-@@ -20,33 +20,21 @@
- #include <cstring>
- #include <cassert>
- #include <memory>
--#include "audio_decoder_midi.h"
- #include "audio_generic.h"
--#include "audio_generic_midiout.h"
--#include "filefinder.h"
- #include "output.h"
- 
--GenericAudio::BgmChannel GenericAudio::BGM_Channels[nr_of_bgm_channels];
--GenericAudio::SeChannel GenericAudio::SE_Channels[nr_of_se_channels];
--bool GenericAudio::BGM_PlayedOnceIndicator;
--
--std::vector<int16_t> GenericAudio::sample_buffer = {};
--std::vector<uint8_t> GenericAudio::scrap_buffer = {};
--unsigned GenericAudio::scrap_buffer_size = 0;
--std::vector<float> GenericAudio::mixer_buffer = {};
--
--std::unique_ptr<GenericAudioMidiOut> GenericAudio::midi_thread;
--
- GenericAudio::GenericAudio(const Game_ConfigAudio& cfg) : AudioInterface(cfg) {
- 	int i = 0;
- 	for (auto& BGM_Channel : BGM_Channels) {
- 		BGM_Channel.id = i++;
- 		BGM_Channel.decoder.reset();
-+		BGM_Channel.instance = this;
- 	}
- 	i = 0;
- 	for (auto& SE_Channel : SE_Channels) {
- 		SE_Channel.id = i++;
- 		SE_Channel.decoder.reset();
-+		SE_Channel.instance = this;
- 	}
- 	BGM_PlayedOnceIndicator = false;
- 	midi_thread.reset();
-@@ -492,8 +480,8 @@ void GenericAudio::BgmChannel::Stop() {
- 	stopped = true;
- 	if (midi_out_used) {
- 		midi_out_used = false;
--		midi_thread->GetMidiOut().Reset();
--		midi_thread->GetMidiOut().Pause();
-+		instance->midi_thread->GetMidiOut().Reset();
-+		instance->midi_thread->GetMidiOut().Pause();
- 	} else if (decoder) {
- 		decoder.reset();
- 	}
-@@ -503,16 +491,16 @@ void GenericAudio::BgmChannel::SetPaused(bool newPaused) {
- 	paused = newPaused;
- 	if (midi_out_used) {
- 		if (newPaused) {
--			midi_thread->GetMidiOut().Pause();
-+			instance->midi_thread->GetMidiOut().Pause();
- 		} else {
--			midi_thread->GetMidiOut().Resume();
-+			instance->midi_thread->GetMidiOut().Resume();
- 		}
- 	}
- }
- 
- int GenericAudio::BgmChannel::GetTicks() const {
- 	if (midi_out_used) {
--		return midi_thread->GetMidiOut().GetTicks();
-+		return instance->midi_thread->GetMidiOut().GetTicks();
- 	} else if (decoder) {
- 		return decoder->GetTicks();
- 	}
-@@ -521,7 +509,7 @@ int GenericAudio::BgmChannel::GetTicks() const {
- 
- void GenericAudio::BgmChannel::SetFade(int fade) {
- 	if (midi_out_used) {
--		midi_thread->GetMidiOut().SetFade(0, std::chrono::milliseconds(fade));
-+		instance->midi_thread->GetMidiOut().SetFade(0, std::chrono::milliseconds(fade));
- 	} else if (decoder) {
- 		decoder->SetFade(0, std::chrono::milliseconds(fade));
- 	}
-@@ -529,7 +517,7 @@ void GenericAudio::BgmChannel::SetFade(int fade) {
- 
- void GenericAudio::BgmChannel::SetVolume(int volume) {
- 	if (midi_out_used) {
--		midi_thread->GetMidiOut().SetVolume(volume);
-+		instance->midi_thread->GetMidiOut().SetVolume(volume);
- 	} else if (decoder) {
- 		decoder->SetVolume(volume);
- 	}
-@@ -537,7 +525,7 @@ void GenericAudio::BgmChannel::SetVolume(int volume) {
- 
- void GenericAudio::BgmChannel::SetPitch(int pitch) {
- 	if (midi_out_used) {
--		midi_thread->GetMidiOut().SetPitch(pitch);
-+		instance->midi_thread->GetMidiOut().SetPitch(pitch);
- 	} else if (decoder) {
- 		decoder->SetPitch(pitch);
- 	}
-old mode 100644
-new mode 100755
---- a/src/audio_generic.h
-+++ b/src/audio_generic.h
-@@ -21,10 +21,9 @@
- #include "audio.h"
- #include "audio_secache.h"
- #include "audio_decoder_base.h"
-+#include "audio_generic_midiout.h"
- #include <memory>
- 
--class GenericAudioMidiOut;
--
- /**
-  * A software implementation for handling EasyRPG Audio utilizing the
-  * AudioDecoder for BGM and AudioSeCache for fast SE playback.
-@@ -73,6 +72,7 @@ private:
- 	struct BgmChannel {
- 		int id;
- 		std::unique_ptr<AudioDecoderBase> decoder;
-+		GenericAudio* instance = nullptr;
- 		bool paused;
- 		bool stopped;
- 		bool midi_out_used = false;
-@@ -87,6 +87,7 @@ private:
- 	struct SeChannel {
- 		int id;
- 		std::unique_ptr<AudioDecoderBase> decoder;
-+		GenericAudio* instance = nullptr;
- 		bool paused;
- 		bool stopped;
- 	};
-@@ -103,17 +104,17 @@ private:
- 	static constexpr unsigned nr_of_se_channels = 31;
- 	static constexpr unsigned nr_of_bgm_channels = 2;
- 
--	static BgmChannel BGM_Channels[nr_of_bgm_channels];
--	static SeChannel SE_Channels[nr_of_se_channels];
--	static bool BGM_PlayedOnceIndicator;
--	static bool Muted;
-+	BgmChannel BGM_Channels[nr_of_bgm_channels];
-+	SeChannel SE_Channels[nr_of_se_channels];
-+	mutable bool BGM_PlayedOnceIndicator;
-+	bool Muted;
- 
--	static std::vector<int16_t> sample_buffer;
--	static std::vector<uint8_t> scrap_buffer;
--	static unsigned scrap_buffer_size;
--	static std::vector<float> mixer_buffer;
-+	std::vector<int16_t> sample_buffer = {};
-+	std::vector<uint8_t> scrap_buffer = {};
-+	unsigned scrap_buffer_size = 0;
-+	std::vector<float> mixer_buffer = {};
- 
--	static std::unique_ptr<GenericAudioMidiOut> midi_thread;
-+	std::unique_ptr<GenericAudioMidiOut> midi_thread;
- };
- 
- #endif
---- a/src/audio_generic_midiout.h
-+++ b/src/audio_generic_midiout.h
-@@ -19,6 +19,7 @@
- #define EP_AUDIO_GENERIC_MIDITHREAD_H
- 
- #include <memory>
-+#include "audio_decoder_midi.h"
- #include "system.h"
- 
- class AudioDecoderMidi;

diff --git a/games-engines/easyrpg-player/files/easyrpg-player-0.8-unbundle-picojson.patch b/games-engines/easyrpg-player/files/easyrpg-player-0.8-unbundle-picojson.patch
deleted file mode 100644
index d2ce28ad8..000000000
--- a/games-engines/easyrpg-player/files/easyrpg-player-0.8-unbundle-picojson.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Gentoo doesn't support Emscripten in any way shape or form yet.
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -758,14 +758,6 @@ if(APPLE)
- 	target_link_libraries(${PROJECT_NAME} ${MACOSFOUNDATION} ${MACOSAUDIOUNIT} ${MACOSAUDIOTOOLBOX})
- endif()
- 
--if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
--	option(PLAYER_JS_BUILD_SHELL "Build the Player executable as a shell file (.html) instead of a standalone javascript file (.js)" OFF)
--	set(PLAYER_JS_GAME_URL "games/" CACHE STRING "Game URL/directory where the web player searches for games")
--	set(PLAYER_JS_OUTPUT_NAME "easyrpg-player" CACHE STRING "Output name of the js, html and wasm files")
--	set_property(SOURCE src/async_handler.cpp APPEND PROPERTY COMPILE_DEFINITIONS "EM_GAME_URL=\"${PLAYER_JS_GAME_URL}\"")
--	target_sources(${PROJECT_NAME} PRIVATE src/external/picojson.h)
--endif()
--
- # Endianess check
- if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.20)
- 	if (CMAKE_CXX_BYTE_ORDER STREQUAL "BIG_ENDIAN")

diff --git a/games-engines/easyrpg-player/metadata.xml b/games-engines/easyrpg-player/metadata.xml
deleted file mode 100644
index 0cc40877e..000000000
--- a/games-engines/easyrpg-player/metadata.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-  <maintainer type="person">
-    <email>watermanpaint@posteo.net</email>
-    <name>Lucio Sauer</name>
-  </maintainer>
-  <longdescription>
-    FluidSynth takes precedence over WildMIDI at runtime. If no external
-    MIDI synthesizer backend is enabled, EasyRPG Player falls back to ALSA
-    for native MIDI support.
-    At version 0.8, this will most likely result in no sound.
-  </longdescription>
-  <use>
-    <flag name="fluidsynth">
-      Support FluidSynth as a MIDI synthesizer backend.
-      Support the `--soundfont` command line option for custom soundfonts
-    </flag>
-    <flag name="harfbuzz">
-      Use <pkg>media-libs/harfbuzz</pkg> for Unicode text shaping.
-      Depends on external font support by means of the truetype USE flag
-    </flag>
-    <flag name="wildmidi">Support WildMIDI as a MIDI synthesizer backend</flag>
-  </use>
-  <upstream>
-    <remote-id type="github">EasyRPG/Player</remote-id>
-  </upstream>
-</pkgmetadata>

diff --git a/profiles/package.mask b/profiles/package.mask
index e30b523b1..dcef5b109 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -104,12 +104,6 @@ dev-python/tree-sitter-languages
 # Removal on 2024-11-17
 dev-games/liblcf
 
-# Lucio Sauer <watermanpaint@posteo.net> (2024-10-17)
-# Doesn't build since 2024-03 and package maintainer lost interest in it.
-# Open bugs 932475, 927882
-# Removal on 2024-11-17
-games-engines/easyrpg-player
-
 # Takuya Wakazono <pastalian46@gmail.com> (2024-10-02)
 # Depends on <media-libs/kimageannotator-0.7, which has been dropped.
 # Upstream is working on Qt6 port.


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: games-engines/easyrpg-player/files/, profiles/, games-engines/easyrpg-player/
  2024-11-22  8:31 [gentoo-commits] repo/proj/guru:dev commit in: games-engines/easyrpg-player/files/, games-engines/easyrpg-player/, profiles/ Lucio Sauer
@ 2024-11-22  8:49 ` Lucio Sauer
  0 siblings, 0 replies; 3+ messages in thread
From: Lucio Sauer @ 2024-11-22  8:49 UTC (permalink / raw
  To: gentoo-commits

commit:     74719d2da1ca89e1e7036e27a1cbfbd54eeb1788
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Fri Nov 22 08:26:39 2024 +0000
Commit:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
CommitDate: Fri Nov 22 08:26:39 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=74719d2d

games-engines/easyrpg-player: treeclean

Closes: https://bugs.gentoo.org/932475 (pkgremoved)
Closes: https://bugs.gentoo.org/927882 (pkgremoved)
Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>

 games-engines/easyrpg-player/Manifest              |   2 -
 .../easyrpg-player/easyrpg-player-0.7.0.ebuild     |  73 --------
 .../easyrpg-player/easyrpg-player-0.8-r1.ebuild    | 193 -------------------
 .../easyrpg-player/easyrpg-player-0.8.ebuild       | 192 -------------------
 ...syrpg-player-0.8-backport-unbundle-dr_wav.patch |  43 -----
 ...easyrpg-player-0.8-backport-unbundle-rang.patch |  23 ---
 ...yrpg-player-0.8-backport-update-for-fmt10.patch | 208 ---------------------
 ...er-0.8-backport-use-after-free-fluidsynth.patch | 180 ------------------
 .../easyrpg-player-0.8-unbundle-picojson.patch     |  18 --
 games-engines/easyrpg-player/metadata.xml          |  28 ---
 profiles/package.mask                              |   6 -
 11 files changed, 966 deletions(-)

diff --git a/games-engines/easyrpg-player/Manifest b/games-engines/easyrpg-player/Manifest
deleted file mode 100644
index f01076a65..000000000
--- a/games-engines/easyrpg-player/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST easyrpg-player-0.7.0.tar.gz 6426198 BLAKE2B fc08962cab0842a53535472fbf348d3c46fb71108b14655cb98d7f04a3a0f441fae644ab109e34733f55ce834d524fbd424ea30e80585e5e4e7f69b15041fe63 SHA512 6c2a5cedbd2022517f2cfb2e3bebc9773addb93cbf3e897fb57f31baf94c644bf4437ceff5be578b3a564e8a5f72c448dd0391bc418658d517ca755cab5ec97f
-DIST easyrpg-player-0.8.tar.xz 4966028 BLAKE2B ff445f831a879fe7562e98a4e5a0c973ef8d750236cd2c17bf65b21135f896ee7edd0f0137b88cf0ed417fcfd5729358a63d61b34d9ece017ba4fdc85efaa445 SHA512 b1caf45284e29706bdd885d132fe7605d1f2972a3b3e238ba2fbd40058ae1c31aac5277fced23bd216153feb9a440a2652ef696b6b310b907fbc3c1376aa03ad

diff --git a/games-engines/easyrpg-player/easyrpg-player-0.7.0.ebuild b/games-engines/easyrpg-player/easyrpg-player-0.7.0.ebuild
deleted file mode 100644
index 21d7d73ee..000000000
--- a/games-engines/easyrpg-player/easyrpg-player-0.7.0.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake xdg
-
-DESCRIPTION="RPG Maker 2000/2003 and EasyRPG games interpreter"
-HOMEPAGE="https://easyrpg.org/player/"
-SRC_URI="https://github.com/EasyRPG/Player/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
-S="${WORKDIR}/Player-${PV}/"
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="doc fluidsynth wildmidi"
-
-DEPEND="
-	>=dev-games/liblcf-${PV}
-	>=media-libs/libsdl2-2.0.5
-	media-libs/libpng:=
-	x11-libs/pixman
-	dev-libs/libfmt:=
-	media-libs/freetype:=
-	media-libs/harfbuzz:=
-	media-libs/alsa-lib
-
-	media-libs/speexdsp
-
-	media-sound/mpg123
-	media-libs/libsndfile
-	media-libs/libvorbis
-	media-libs/opus
-	wildmidi? ( media-sound/wildmidi )
-	fluidsynth? ( media-sound/fluidsynth )
-	media-libs/libxmp
-
-	dev-ruby/asciidoctor
-
-	doc? ( app-text/doxygen )
-"
-RDEPEND="${DEPEND}"
-
-src_configure() {
-	local mycmakeargs=(
-		-DPLAYER_WITH_FLUIDLITE=OFF
-		# Avoid vendoring, uses libsndfile instead
-		-DPLAYER_ENABLE_DRWAV=OFF
-
-		# Use the first default choice
-		-DPLAYER_WITH_SPEEXDSP=ON
-		-DPLAYER_WITH_SAMPLERATE=OFF
-
-		-DPLAYER_WITH_MPG123=ON
-		-DPLAYER_WITH_LIBSNDFILE=ON
-		-DPLAYER_WITH_OGGVORBIS=ON
-		-DPLAYER_WITH_OPUS=ON
-		-DPLAYER_WITH_WILDMIDI=$(usex wildmidi)
-		-DPLAYER_WITH_FLUIDSYNTH=$(usex fluidsynth)
-		# Serves as fallback when FluidSynth isn't found
-		-DPLAYER_WITH_FLUIDLITE=OFF
-
-		# Avoid vendoring, uses wildmidi or fluidsynth instead
-		-DPLAYER_ENABLE_FMMIDI=OFF
-
-		-DPLAYER_WITH_XMP=ON
-	)
-
-	cmake_src_configure
-}
-
-src_test() {
-	cmake_build check
-}

diff --git a/games-engines/easyrpg-player/easyrpg-player-0.8-r1.ebuild b/games-engines/easyrpg-player/easyrpg-player-0.8-r1.ebuild
deleted file mode 100644
index c47c12f85..000000000
--- a/games-engines/easyrpg-player/easyrpg-player-0.8-r1.ebuild
+++ /dev/null
@@ -1,193 +0,0 @@
-# Copyright 2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake readme.gentoo-r1 xdg
-
-DESCRIPTION="RPG Maker 2000/2003 and EasyRPG games interpreter"
-HOMEPAGE="https://easyrpg.org/player/
-	https://github.com/EasyRPG/Player"
-SRC_URI="https://easyrpg.org/downloads/player/${PV}/${P}.tar.xz"
-
-# EasyRPG Player itself is GPLv3+.
-# The program's logos are CC-BY-SA 4.0.
-# --
-# The program bundles several 3rd-party libraries.
-#
-# FMMidi files - licensed under the 3-clause BSD license.
-# Since the files do not end up in the executable due to the configuration,
-# we ignore it.
-# - src/midisequencer.cpp
-# - src/midisequencer.h
-# - src/midisynth.cpp
-# - src/midisynth.h
-#
-# dr_wav files - licensed under (public-domain or MIT-0):
-# - src/external/dr_wav.h
-# rang files - licensed under the Unlicense:
-# - src/external/rang.hpp
-# Note that both dr_wav and rang are un-bundled and replaced with versions
-# provided by Gentoo packages. However, since these are header-only libraries,
-# their licenses are still included in the LICENSE variable.
-#
-# PicoJSON is used only for Emscripten builds (and unbundled before build).
-# --
-# The program also uses a couple of 3rd-party fonts. Since these are not
-# loaded at runtime, but rather baked into the executable at compile time,
-# their licenses are also added to the License tag.
-#
-# Baekmuk files - licensed under the Baekmuk license:
-# - resources/shinonome/korean/
-#
-# Shinonome files - released into the public domain:
-# - resources/shinonome/
-#
-# ttyp0 files - licensed under the ttyp0 license,
-# a variant of the MIT license:
-# - resources/ttyp0/
-#
-# WenQuanYi files - licensed under
-# GPLv2-or-later with Font Embedding Exception:
-# - resources/wenquanyi/
-#
-#
-# The upstream tarball contains also "Teenyicons", under the MIT license,
-# but those are used only for Emscripten builds.
-
-LICENSE="BAEKMUK CC-BY-4.0 GPL-2+-with-font-exception GPL-3+ public-domain
-	TTYP0 Unlicense || ( MIT-0 public-domain )"
-SLOT="0"
-
-KEYWORDS="~amd64"
-
-IUSE="doc fluidsynth harfbuzz +sound truetype +wildmidi"
-REQUIRED_USE="
-	fluidsynth? ( sound )
-	harfbuzz? ( truetype )
-	wildmidi? ( sound )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-backport-unbundle-dr_wav.patch
-	"${FILESDIR}"/${P}-backport-unbundle-rang.patch
-	"${FILESDIR}"/${P}-backport-update-for-fmt10.patch
-	"${FILESDIR}"/${P}-backport-use-after-free-fluidsynth.patch
-	"${FILESDIR}"/${P}-unbundle-picojson.patch
-)
-
-DEPEND="
-	dev-cpp/rang
-	>=dev-games/liblcf-${PV}
-	dev-libs/libfmt:=
-	media-libs/libpng:=
-	>=media-libs/libsdl2-2.0.5[joystick,sound?,video]
-	sys-libs/zlib
-	x11-libs/pixman
-	harfbuzz? ( media-libs/harfbuzz:=[truetype] )
-	truetype? ( media-libs/freetype:= )
-	sound? (
-			 media-libs/dr_wav
-			 media-libs/libsndfile
-			 media-libs/libvorbis
-			 media-libs/opusfile
-			 media-libs/speexdsp
-			 media-sound/mpg123
-			 media-libs/libxmp
-			 fluidsynth? ( media-sound/fluidsynth )
-			 wildmidi? ( media-sound/wildmidi )
-			 !fluidsynth? ( !wildmidi? ( media-libs/alsa-lib ) )
-		   )
-"
-RDEPEND="${DEPEND}
-	fluidsynth? ( media-sound/fluid-soundfont )
-"
-BDEPEND="virtual/pkgconfig
-	doc? (
-		   app-text/doxygen
-		   media-gfx/graphviz[svg]
-		 )
-"
-
-DOC_CONTENTS="
-EasyRPG Player chooses its library for MIDI output in increasing order:
-1. FluidSynth
-2. WildMIDI
-3. ALSA
-
-With all three enabled, it first tries to send MIDI messages to FluidSynth. If
-that fails it falls back to WildMIDI then to ALSA. Currently, the capability to
-find and configure a suitable MIDI client through ALSA is limited. It is
-recommended to enable one of the other backends, otherwise you are likely to
-have no sound.
-This package enables support for the ALSA backend only if the other two are
-disabled.
-
-For the requirements for suitable ALSA MIDI clients please reference the source
-code at src/platform/linux/midiout_device_alsa.cpp
-"
-
-src_prepare() {
-	# Install prebuilt manpage instead of rebuilding it conditionally.
-	sed -i -e "s/if(ASCIIDOCTOR_EXECUTABLE)/if(FALSE)/" \
-		-e "s/SUPPORT_AUDIO=1/SUPPORT_AUDIO=$(usex sound 1 0)/" CMakeLists.txt || die
-	cmake_src_prepare
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DPLAYER_BUILD_LIBLCF=OFF
-
-		# Use the first default choice
-		-DPLAYER_WITH_SPEEXDSP=$(usex sound)
-		-DPLAYER_WITH_SAMPLERATE=no
-
-		-DPLAYER_WITH_MPG123=$(usex sound)
-		-DPLAYER_WITH_OGGVORBIS=$(usex sound)
-		-DPLAYER_WITH_OPUS=$(usex sound)
-		-DPLAYER_WITH_XMP=$(usex sound)
-
-		# Avoid vendoring, use FluidSynth or WildMIDI (or ALSA) instead
-		-DPLAYER_ENABLE_FMMIDI=no
-		-DPLAYER_WITH_FLUIDSYNTH=$(usex fluidsynth)
-		-DPLAYER_WITH_WILDMIDI=$(usex wildmidi)
-		-DPLAYER_WITH_NATIVE_MIDI=$(usex sound $(usex fluidsynth no $(usex wildmidi no yes)) no)
-		# Serves as fallback when FluidSynth isn't found
-		-DPLAYER_WITH_FLUIDLITE=no
-		# Enable dr_wav for faster WAV decoding, fall back to libsndfile
-		-DPLAYER_ENABLE_DRWAV=$(usex sound)
-		-DPLAYER_WITH_LIBSNDFILE=$(usex sound)
-
-		# The text shaping engine is strictly dependent on the availability
-		# of TrueType fonts
-		-DPLAYER_WITH_HARFBUZZ=$(usex harfbuzz)
-		-DPLAYER_WITH_FREETYPE=$(usex harfbuzz yes $(usex truetype))
-	)
-	cmake_src_configure
-}
-
-src_compile() {
-	cmake_src_compile
-	if use doc; then
-		einfo "Building the documentation might take a while..."
-		cmake_build doc
-	fi
-}
-
-src_test() {
-	cmake_build check
-}
-
-src_install() {
-	cmake_src_install
-	if use doc; then
-		docinto /usr/share/doc/${PF}/html
-		dodoc -r "${BUILD_DIR}"/doc/*
-	fi
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	readme.gentoo_print_elog
-}

diff --git a/games-engines/easyrpg-player/easyrpg-player-0.8.ebuild b/games-engines/easyrpg-player/easyrpg-player-0.8.ebuild
deleted file mode 100644
index b8a90d388..000000000
--- a/games-engines/easyrpg-player/easyrpg-player-0.8.ebuild
+++ /dev/null
@@ -1,192 +0,0 @@
-# Copyright 2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake readme.gentoo-r1 xdg
-
-DESCRIPTION="RPG Maker 2000/2003 and EasyRPG games interpreter"
-HOMEPAGE="https://easyrpg.org/player/
-	https://github.com/EasyRPG/Player"
-SRC_URI="https://easyrpg.org/downloads/player/${PV}/${P}.tar.xz"
-
-# EasyRPG Player itself is GPLv3+.
-# The program's logos are CC-BY-SA 4.0.
-# --
-# The program bundles several 3rd-party libraries.
-#
-# FMMidi files - licensed under the 3-clause BSD license.
-# Since the files do not end up in the executable due to the configuration,
-# we ignore it.
-# - src/midisequencer.cpp
-# - src/midisequencer.h
-# - src/midisynth.cpp
-# - src/midisynth.h
-#
-# dr_wav files - licensed under (public-domain or MIT-0):
-# - src/external/dr_wav.h
-# rang files - licensed under the Unlicense:
-# - src/external/rang.hpp
-# Note that both dr_wav and rang are un-bundled and replaced with versions
-# provided by Gentoo packages. However, since these are header-only libraries,
-# their licenses are still included in the LICENSE variable.
-#
-# PicoJSON is used only for Emscripten builds (and unbundled before build).
-# --
-# The program also uses a couple of 3rd-party fonts. Since these are not
-# loaded at runtime, but rather baked into the executable at compile time,
-# their licenses are also added to the License tag.
-#
-# Baekmuk files - licensed under the Baekmuk license:
-# - resources/shinonome/korean/
-#
-# Shinonome files - released into the public domain:
-# - resources/shinonome/
-#
-# ttyp0 files - licensed under the ttyp0 license,
-# a variant of the MIT license:
-# - resources/ttyp0/
-#
-# WenQuanYi files - licensed under
-# GPLv2-or-later with Font Embedding Exception:
-# - resources/wenquanyi/
-#
-#
-# The upstream tarball contains also "Teenyicons", under the MIT license,
-# but those are used only for Emscripten builds.
-
-LICENSE="BAEKMUK CC-BY-4.0 GPL-2+-with-font-exception GPL-3+ public-domain
-	TTYP0 Unlicense || ( MIT-0 public-domain )"
-SLOT="0"
-
-KEYWORDS="~amd64"
-
-IUSE="doc fluidsynth harfbuzz +sound truetype +wildmidi"
-REQUIRED_USE="
-	fluidsynth? ( sound )
-	harfbuzz? ( truetype )
-	wildmidi? ( sound )
-"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-backport-unbundle-dr_wav.patch
-	"${FILESDIR}"/${P}-backport-unbundle-rang.patch
-	"${FILESDIR}"/${P}-backport-update-for-fmt10.patch
-	"${FILESDIR}"/${P}-unbundle-picojson.patch
-)
-
-DEPEND="
-	dev-cpp/rang
-	>=dev-games/liblcf-${PV}
-	dev-libs/libfmt:=
-	media-libs/libpng:=
-	>=media-libs/libsdl2-2.0.5[joystick,sound?,video]
-	sys-libs/zlib
-	x11-libs/pixman
-	harfbuzz? ( media-libs/harfbuzz:=[truetype] )
-	truetype? ( media-libs/freetype:= )
-	sound? (
-			 media-libs/dr_wav
-			 media-libs/libsndfile
-			 media-libs/libvorbis
-			 media-libs/opusfile
-			 media-libs/speexdsp
-			 media-sound/mpg123
-			 media-libs/libxmp
-			 fluidsynth? ( media-sound/fluidsynth )
-			 wildmidi? ( media-sound/wildmidi )
-			 !fluidsynth? ( !wildmidi? ( media-libs/alsa-lib ) )
-		   )
-"
-RDEPEND="${DEPEND}
-	fluidsynth? ( media-sound/fluid-soundfont )
-"
-BDEPEND="virtual/pkgconfig
-	doc? (
-		   app-text/doxygen
-		   media-gfx/graphviz[svg]
-		 )
-"
-
-DOC_CONTENTS="
-EasyRPG Player chooses its library for MIDI output in increasing order:
-1. FluidSynth
-2. WildMIDI
-3. ALSA
-
-With all three enabled, it first tries to send MIDI messages to FluidSynth. If
-that fails it falls back to WildMIDI then to ALSA. Currently, the capability to
-find and configure a suitable MIDI client through ALSA is limited. It is
-recommended to enable one of the other backends, otherwise you are likely to
-have no sound.
-This package enables support for the ALSA backend only if the other two are
-disabled.
-
-For the requirements for suitable ALSA MIDI clients please reference the source
-code at src/platform/linux/midiout_device_alsa.cpp
-"
-
-src_prepare() {
-	# Install prebuilt manpage instead of rebuilding it conditionally.
-	sed -i -e "s/if(ASCIIDOCTOR_EXECUTABLE)/if(FALSE)/" \
-		-e "s/SUPPORT_AUDIO=1/SUPPORT_AUDIO=$(usex sound 1 0)/" CMakeLists.txt || die
-	cmake_src_prepare
-}
-
-src_configure() {
-	local mycmakeargs=(
-		-DPLAYER_BUILD_LIBLCF=OFF
-
-		# Use the first default choice
-		-DPLAYER_WITH_SPEEXDSP=$(usex sound)
-		-DPLAYER_WITH_SAMPLERATE=no
-
-		-DPLAYER_WITH_MPG123=$(usex sound)
-		-DPLAYER_WITH_OGGVORBIS=$(usex sound)
-		-DPLAYER_WITH_OPUS=$(usex sound)
-		-DPLAYER_WITH_XMP=$(usex sound)
-
-		# Avoid vendoring, use FluidSynth or WildMIDI (or ALSA) instead
-		-DPLAYER_ENABLE_FMMIDI=no
-		-DPLAYER_WITH_FLUIDSYNTH=$(usex fluidsynth)
-		-DPLAYER_WITH_WILDMIDI=$(usex wildmidi)
-		-DPLAYER_WITH_NATIVE_MIDI=$(usex sound $(usex fluidsynth no $(usex wildmidi no yes)) no)
-		# Serves as fallback when FluidSynth isn't found
-		-DPLAYER_WITH_FLUIDLITE=no
-		# Enable dr_wav for faster WAV decoding, fall back to libsndfile
-		-DPLAYER_ENABLE_DRWAV=$(usex sound)
-		-DPLAYER_WITH_LIBSNDFILE=$(usex sound)
-
-		# The text shaping engine is strictly dependent on the availability
-		# of TrueType fonts
-		-DPLAYER_WITH_HARFBUZZ=$(usex harfbuzz)
-		-DPLAYER_WITH_FREETYPE=$(usex harfbuzz yes $(usex truetype))
-	)
-	cmake_src_configure
-}
-
-src_compile() {
-	cmake_src_compile
-	if use doc; then
-		einfo "Building the documentation might take a while..."
-		cmake_build doc
-	fi
-}
-
-src_test() {
-	cmake_build check
-}
-
-src_install() {
-	cmake_src_install
-	if use doc; then
-		docinto /usr/share/doc/${PF}/html
-		dodoc -r "${BUILD_DIR}"/doc/*
-	fi
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	readme.gentoo_print_elog
-}

diff --git a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-unbundle-dr_wav.patch b/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-unbundle-dr_wav.patch
deleted file mode 100644
index 869c63b7d..000000000
--- a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-unbundle-dr_wav.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-commit d2e92225ad0af2d52e8884b64ba2bac1b6006377
-Author: Ghabry <gabriel+github@mastergk.de>
-Date:   Thu May 4 16:32:42 2023 +0200
-
-    Do not vendor dr_wav header if there is a system header available
-    
-    Fedora unbundles our dr_wav because they have a system header
-
---- a/src/decoder_drwav.cpp
-+++ b/src/decoder_drwav.cpp
-@@ -21,7 +21,13 @@
- #ifdef WANT_DRWAV
- 
- #define DR_WAV_IMPLEMENTATION
--#include "external/dr_wav.h"
-+// Use system dr_wav header if available
-+#if __has_include(<dr_wav.h>)
-+#  include <dr_wav.h>
-+#else
-+#  include "external/dr_wav.h"
-+#endif
-+
- 
- DrWavDecoder::DrWavDecoder() {
- 	music_type = "wav";
---- a/src/decoder_drwav.h
-+++ b/src/decoder_drwav.h
-@@ -24,9 +24,12 @@
- // Headers
- #include "audio_decoder.h"
- #define DR_WAV_NO_STDIO
--#include "external/dr_wav.h"
--#include <string>
--#include <memory>
-+// Use system dr_wav header if available
-+#if __has_include(<dr_wav.h>)
-+#  include <dr_wav.h>
-+#else
-+#  include "external/dr_wav.h"
-+#endif
- 
- /**
-  * Standalone audio decoder powered by dr_wav

diff --git a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-unbundle-rang.patch b/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-unbundle-rang.patch
deleted file mode 100644
index 4ca9b286c..000000000
--- a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-unbundle-rang.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-commit 63029163d86224aa4f9da798c760b1836d73f62b
-Author: Ghabry <gabriel+github@mastergk.de>
-Date:   Thu Jun 8 12:54:33 2023 +0200
-
-    rang: Use system header if available
-
---- a/src/output.cpp
-+++ b/src/output.cpp
-@@ -31,7 +31,13 @@
- #elif defined(__vita__)
- #  include <psp2/kernel/processmgr.h>
- #endif
--#include "external/rang.hpp"
-+
-+// Use system rang header if available
-+#if __has_include(<rang.hpp>)
-+#  include <rang.hpp>
-+#else
-+#  include "external/rang.hpp"
-+#endif
- 
- #include "output.h"
- #include "graphics.h"

diff --git a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-update-for-fmt10.patch b/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-update-for-fmt10.patch
deleted file mode 100644
index a644c1410..000000000
--- a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-update-for-fmt10.patch
+++ /dev/null
@@ -1,208 +0,0 @@
-commit a4672d2e30db4e4918c8f3580236faed3c9d04c1
-Author: Ghabry <gabriel+github@mastergk.de>
-Date:   Sun May 14 14:41:13 2023 +0200
-
-    Fix building with fmtlib 10
-    
-    to_string_view is a private API since fmt10.
-    
-    The new API only works properly since fmt8.
-    
-    Added casts to enum formating as they are not converted automatically anymore.
-    
-    Fix #3002
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8507e5d1..28d595a2 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -345,6 +345,7 @@ add_library(${PROJECT_NAME} OBJECT
- 	src/state.cpp
- 	src/state.h
- 	src/std_clock.h
-+	src/string_view.cpp
- 	src/string_view.h
- 	src/system.h
- 	src/teleport_target.h
-diff --git a/Makefile.am b/Makefile.am
-index bed1b219..4c477489 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -327,6 +327,7 @@ libeasyrpg_player_a_SOURCES = \
- 	src/state.cpp \
- 	src/state.h \
- 	src/std_clock.h \
-+	src/string_view.cpp \
- 	src/string_view.h \
- 	src/system.h \
- 	src/teleport_target.h \
-diff --git a/src/game_interpreter.cpp b/src/game_interpreter.cpp
-index 7877d77f..7ae056cc 100644
---- a/src/game_interpreter.cpp
-+++ b/src/game_interpreter.cpp
-@@ -2187,7 +2187,7 @@ bool Game_Interpreter::CommandChangeVehicleGraphic(lcf::rpg::EventCommand const&
- 	Game_Vehicle* vehicle = Game_Map::GetVehicle(vehicle_id);
- 
- 	if (!vehicle) {
--		Output::Warning("ChangeVehicleGraphic: Invalid vehicle ID {}", vehicle_id);
-+		Output::Warning("ChangeVehicleGraphic: Invalid vehicle ID {}", static_cast<int>(vehicle_id));
- 		return true;
- 	}
- 
-@@ -2261,7 +2261,7 @@ bool Game_Interpreter::CommandSetVehicleLocation(lcf::rpg::EventCommand const& c
- 			// 0 because we adjust all vehicle IDs by +1 to match the lcf values
- 			Output::Debug("SetVehicleLocation: Party referenced");
- 		} else {
--			Output::Warning("SetVehicleLocation: Invalid vehicle ID {}", vehicle_id);
-+			Output::Warning("SetVehicleLocation: Invalid vehicle ID {}", static_cast<int>(vehicle_id));
- 			return true;
- 		}
- 	}
-@@ -3494,7 +3494,7 @@ bool Game_Interpreter::CommandConditionalBranch(lcf::rpg::EventCommand const& co
- 		Game_Vehicle* vehicle = Game_Map::GetVehicle(vehicle_id);
- 
- 		if (!vehicle) {
--			Output::Warning("ConditionalBranch: Invalid vehicle ID {}", vehicle_id);
-+			Output::Warning("ConditionalBranch: Invalid vehicle ID {}", static_cast<int>(vehicle_id));
- 			return true;
- 		}
- 
-diff --git a/src/game_interpreter_map.cpp b/src/game_interpreter_map.cpp
-index 6c193c2f..0b47a3db 100644
---- a/src/game_interpreter_map.cpp
-+++ b/src/game_interpreter_map.cpp
-@@ -345,7 +345,7 @@ bool Game_Interpreter_Map::CommandEndShop(lcf::rpg::EventCommand const& /* com *
- 
- bool Game_Interpreter_Map::CommandShowInn(lcf::rpg::EventCommand const& com) { // code 10730
- 	int inn_type = com.parameters[0];
--	auto inn_price = com.parameters[1];
-+	int inn_price = com.parameters[1];
- 	// Not used, but left here for documentation purposes
- 	// bool has_inn_handlers = com.parameters[2] != 0;
- 
-diff --git a/src/output.h b/src/output.h
-index 90e11189..78ff3c0c 100644
---- a/src/output.h
-+++ b/src/output.h
-@@ -22,17 +22,8 @@
- #include <string>
- #include <iosfwd>
- #include <fmt/core.h>
--#include <lcf/dbstring.h>
--
- #include "filesystem_stream.h"
- 
--namespace lcf {
--// FIXME: liblcf doesn't depend on fmt, so we need to add this here to enable fmtlib support for lcf::DBString
--inline fmt::basic_string_view<char> to_string_view(const lcf::DBString& s) {
--	return to_string_view(StringView(s));
--}
--}
--
- enum class LogLevel {
- 	Error,
- 	Warning,
-diff --git a/src/player.cpp b/src/player.cpp
-index 0ed6bbb6..654d31e0 100644
---- a/src/player.cpp
-+++ b/src/player.cpp
-@@ -1240,7 +1240,7 @@ void Player::SetupBattleTest() {
- 		}
- 
- 		Output::Debug("BattleTest Mode 2k3 troop=({}) background=({}) formation=({}) condition=({}) terrain=({})",
--				args.troop_id, args.background.c_str(), args.formation, args.condition, args.terrain_id);
-+				args.troop_id, args.background, static_cast<int>(args.formation), static_cast<int>(args.condition), args.terrain_id);
- 	} else {
- 		Output::Debug("BattleTest Mode 2k troop=({}) background=({})", args.troop_id, args.background);
- 	}
-diff --git a/src/string_view.cpp b/src/string_view.cpp
-new file mode 100644
-index 00000000..13a52650
---- /dev/null
-+++ b/src/string_view.cpp
-@@ -0,0 +1,34 @@
-+/*
-+ * This file is part of EasyRPG Player.
-+ *
-+ * EasyRPG Player is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation, either version 3 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * EasyRPG Player is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with EasyRPG Player. If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+#include "string_view.h"
-+
-+#if FMT_VERSION >= EP_FMT_MODERN_VERSION
-+
-+#include <fmt/format.h>
-+
-+auto fmt::formatter<lcf::DBString>::format(const lcf::DBString& s, format_context& ctx) const -> decltype(ctx.out()) {
-+	string_view sv(s.data(), s.size());
-+	return formatter<string_view>::format(sv, ctx);
-+}
-+
-+auto fmt::formatter<lcf::StringView>::format(const lcf::StringView& s, format_context& ctx) const -> decltype(ctx.out()) {
-+	string_view sv(s.data(), s.size());
-+	return formatter<string_view>::format(sv, ctx);
-+}
-+
-+#endif
-diff --git a/src/string_view.h b/src/string_view.h
-index 11e3550d..030bb09a 100644
---- a/src/string_view.h
-+++ b/src/string_view.h
-@@ -22,9 +22,9 @@
- #include <lcf/dbstring.h>
- #include <fmt/core.h>
- 
--// FIXME: needed to allow building with fmt 5, older versions are untested.
-+// Needed to allow building with fmt 5, older versions are untested.
- #if FMT_VERSION < 60000
--#include <fmt/ostream.h>
-+#  include <fmt/ostream.h>
- #endif
- 
- using StringView = lcf::StringView;
-@@ -33,12 +33,33 @@ using U32StringView = lcf::U32StringView;
- using lcf::ToString;
- using lcf::ToStringView;
- 
-+// Version required to use the new formatting API
-+#define EP_FMT_MODERN_VERSION 80000
-+
- // FIXME: liblcf doesn't depend on fmt, so we need to add this here to enable fmtlib support for our StringView.
-+#if FMT_VERSION >= EP_FMT_MODERN_VERSION
-+template<>
-+struct fmt::formatter<lcf::StringView> : fmt::formatter<fmt::string_view> {
-+	auto format(const lcf::StringView& s, format_context& ctx) const -> decltype(ctx.out());
-+};
-+
-+template<>
-+struct fmt::formatter<lcf::DBString> : formatter<string_view> {
-+	auto format(const lcf::DBString& s, format_context& ctx) const -> decltype(ctx.out());
-+};
-+#else
- namespace nonstd { namespace sv_lite {
- template <typename C, typename T>
- inline fmt::basic_string_view<C> to_string_view(basic_string_view<C,T> s) {
--    return fmt::basic_string_view<C>(s.data(), s.size());
-+	return fmt::basic_string_view<C>(s.data(), s.size());
- }
- } }
- 
-+namespace lcf {
-+inline fmt::basic_string_view<char> to_string_view(const lcf::DBString& s) {
-+	return to_string_view(StringView(s));
-+}
-+}
-+#endif
-+
- #endif

diff --git a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-use-after-free-fluidsynth.patch b/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-use-after-free-fluidsynth.patch
deleted file mode 100644
index 693ee2bd7..000000000
--- a/games-engines/easyrpg-player/files/easyrpg-player-0.8-backport-use-after-free-fluidsynth.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-The following commit was fixed and backported from upstream. The fix adds
-a header to audio_generic_midiout.h to provide the missing definition
-of AudioDecoderMidi at compile time.
-Author: Lucio Sauer <watermanpaint@posteo.net>
-
-https://github.com/EasyRPG/Player/issues/3079
-commit 7269d325035f547907ec352bff5d39bc611abc88
-Author: Ghabry <gabriel+github@mastergk.de>
-Date:   Fri Sep 22 20:45:19 2023 +0200
-
-    GenericAudio: Make static variables instance variables
-
-    This way they are destroyed when the DisplayUi is destroyed instead of when the process terminates.
-
-    Fixes a use-after-free in the Fluidsynth Decoder.
---- a/src/audio_generic.cpp
-+++ b/src/audio_generic.cpp
-@@ -20,33 +20,21 @@
- #include <cstring>
- #include <cassert>
- #include <memory>
--#include "audio_decoder_midi.h"
- #include "audio_generic.h"
--#include "audio_generic_midiout.h"
--#include "filefinder.h"
- #include "output.h"
- 
--GenericAudio::BgmChannel GenericAudio::BGM_Channels[nr_of_bgm_channels];
--GenericAudio::SeChannel GenericAudio::SE_Channels[nr_of_se_channels];
--bool GenericAudio::BGM_PlayedOnceIndicator;
--
--std::vector<int16_t> GenericAudio::sample_buffer = {};
--std::vector<uint8_t> GenericAudio::scrap_buffer = {};
--unsigned GenericAudio::scrap_buffer_size = 0;
--std::vector<float> GenericAudio::mixer_buffer = {};
--
--std::unique_ptr<GenericAudioMidiOut> GenericAudio::midi_thread;
--
- GenericAudio::GenericAudio(const Game_ConfigAudio& cfg) : AudioInterface(cfg) {
- 	int i = 0;
- 	for (auto& BGM_Channel : BGM_Channels) {
- 		BGM_Channel.id = i++;
- 		BGM_Channel.decoder.reset();
-+		BGM_Channel.instance = this;
- 	}
- 	i = 0;
- 	for (auto& SE_Channel : SE_Channels) {
- 		SE_Channel.id = i++;
- 		SE_Channel.decoder.reset();
-+		SE_Channel.instance = this;
- 	}
- 	BGM_PlayedOnceIndicator = false;
- 	midi_thread.reset();
-@@ -492,8 +480,8 @@ void GenericAudio::BgmChannel::Stop() {
- 	stopped = true;
- 	if (midi_out_used) {
- 		midi_out_used = false;
--		midi_thread->GetMidiOut().Reset();
--		midi_thread->GetMidiOut().Pause();
-+		instance->midi_thread->GetMidiOut().Reset();
-+		instance->midi_thread->GetMidiOut().Pause();
- 	} else if (decoder) {
- 		decoder.reset();
- 	}
-@@ -503,16 +491,16 @@ void GenericAudio::BgmChannel::SetPaused(bool newPaused) {
- 	paused = newPaused;
- 	if (midi_out_used) {
- 		if (newPaused) {
--			midi_thread->GetMidiOut().Pause();
-+			instance->midi_thread->GetMidiOut().Pause();
- 		} else {
--			midi_thread->GetMidiOut().Resume();
-+			instance->midi_thread->GetMidiOut().Resume();
- 		}
- 	}
- }
- 
- int GenericAudio::BgmChannel::GetTicks() const {
- 	if (midi_out_used) {
--		return midi_thread->GetMidiOut().GetTicks();
-+		return instance->midi_thread->GetMidiOut().GetTicks();
- 	} else if (decoder) {
- 		return decoder->GetTicks();
- 	}
-@@ -521,7 +509,7 @@ int GenericAudio::BgmChannel::GetTicks() const {
- 
- void GenericAudio::BgmChannel::SetFade(int fade) {
- 	if (midi_out_used) {
--		midi_thread->GetMidiOut().SetFade(0, std::chrono::milliseconds(fade));
-+		instance->midi_thread->GetMidiOut().SetFade(0, std::chrono::milliseconds(fade));
- 	} else if (decoder) {
- 		decoder->SetFade(0, std::chrono::milliseconds(fade));
- 	}
-@@ -529,7 +517,7 @@ void GenericAudio::BgmChannel::SetFade(int fade) {
- 
- void GenericAudio::BgmChannel::SetVolume(int volume) {
- 	if (midi_out_used) {
--		midi_thread->GetMidiOut().SetVolume(volume);
-+		instance->midi_thread->GetMidiOut().SetVolume(volume);
- 	} else if (decoder) {
- 		decoder->SetVolume(volume);
- 	}
-@@ -537,7 +525,7 @@ void GenericAudio::BgmChannel::SetVolume(int volume) {
- 
- void GenericAudio::BgmChannel::SetPitch(int pitch) {
- 	if (midi_out_used) {
--		midi_thread->GetMidiOut().SetPitch(pitch);
-+		instance->midi_thread->GetMidiOut().SetPitch(pitch);
- 	} else if (decoder) {
- 		decoder->SetPitch(pitch);
- 	}
-old mode 100644
-new mode 100755
---- a/src/audio_generic.h
-+++ b/src/audio_generic.h
-@@ -21,10 +21,9 @@
- #include "audio.h"
- #include "audio_secache.h"
- #include "audio_decoder_base.h"
-+#include "audio_generic_midiout.h"
- #include <memory>
- 
--class GenericAudioMidiOut;
--
- /**
-  * A software implementation for handling EasyRPG Audio utilizing the
-  * AudioDecoder for BGM and AudioSeCache for fast SE playback.
-@@ -73,6 +72,7 @@ private:
- 	struct BgmChannel {
- 		int id;
- 		std::unique_ptr<AudioDecoderBase> decoder;
-+		GenericAudio* instance = nullptr;
- 		bool paused;
- 		bool stopped;
- 		bool midi_out_used = false;
-@@ -87,6 +87,7 @@ private:
- 	struct SeChannel {
- 		int id;
- 		std::unique_ptr<AudioDecoderBase> decoder;
-+		GenericAudio* instance = nullptr;
- 		bool paused;
- 		bool stopped;
- 	};
-@@ -103,17 +104,17 @@ private:
- 	static constexpr unsigned nr_of_se_channels = 31;
- 	static constexpr unsigned nr_of_bgm_channels = 2;
- 
--	static BgmChannel BGM_Channels[nr_of_bgm_channels];
--	static SeChannel SE_Channels[nr_of_se_channels];
--	static bool BGM_PlayedOnceIndicator;
--	static bool Muted;
-+	BgmChannel BGM_Channels[nr_of_bgm_channels];
-+	SeChannel SE_Channels[nr_of_se_channels];
-+	mutable bool BGM_PlayedOnceIndicator;
-+	bool Muted;
- 
--	static std::vector<int16_t> sample_buffer;
--	static std::vector<uint8_t> scrap_buffer;
--	static unsigned scrap_buffer_size;
--	static std::vector<float> mixer_buffer;
-+	std::vector<int16_t> sample_buffer = {};
-+	std::vector<uint8_t> scrap_buffer = {};
-+	unsigned scrap_buffer_size = 0;
-+	std::vector<float> mixer_buffer = {};
- 
--	static std::unique_ptr<GenericAudioMidiOut> midi_thread;
-+	std::unique_ptr<GenericAudioMidiOut> midi_thread;
- };
- 
- #endif
---- a/src/audio_generic_midiout.h
-+++ b/src/audio_generic_midiout.h
-@@ -19,6 +19,7 @@
- #define EP_AUDIO_GENERIC_MIDITHREAD_H
- 
- #include <memory>
-+#include "audio_decoder_midi.h"
- #include "system.h"
- 
- class AudioDecoderMidi;

diff --git a/games-engines/easyrpg-player/files/easyrpg-player-0.8-unbundle-picojson.patch b/games-engines/easyrpg-player/files/easyrpg-player-0.8-unbundle-picojson.patch
deleted file mode 100644
index d2ce28ad8..000000000
--- a/games-engines/easyrpg-player/files/easyrpg-player-0.8-unbundle-picojson.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Gentoo doesn't support Emscripten in any way shape or form yet.
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -758,14 +758,6 @@ if(APPLE)
- 	target_link_libraries(${PROJECT_NAME} ${MACOSFOUNDATION} ${MACOSAUDIOUNIT} ${MACOSAUDIOTOOLBOX})
- endif()
- 
--if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
--	option(PLAYER_JS_BUILD_SHELL "Build the Player executable as a shell file (.html) instead of a standalone javascript file (.js)" OFF)
--	set(PLAYER_JS_GAME_URL "games/" CACHE STRING "Game URL/directory where the web player searches for games")
--	set(PLAYER_JS_OUTPUT_NAME "easyrpg-player" CACHE STRING "Output name of the js, html and wasm files")
--	set_property(SOURCE src/async_handler.cpp APPEND PROPERTY COMPILE_DEFINITIONS "EM_GAME_URL=\"${PLAYER_JS_GAME_URL}\"")
--	target_sources(${PROJECT_NAME} PRIVATE src/external/picojson.h)
--endif()
--
- # Endianess check
- if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.20)
- 	if (CMAKE_CXX_BYTE_ORDER STREQUAL "BIG_ENDIAN")

diff --git a/games-engines/easyrpg-player/metadata.xml b/games-engines/easyrpg-player/metadata.xml
deleted file mode 100644
index 0cc40877e..000000000
--- a/games-engines/easyrpg-player/metadata.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-  <maintainer type="person">
-    <email>watermanpaint@posteo.net</email>
-    <name>Lucio Sauer</name>
-  </maintainer>
-  <longdescription>
-    FluidSynth takes precedence over WildMIDI at runtime. If no external
-    MIDI synthesizer backend is enabled, EasyRPG Player falls back to ALSA
-    for native MIDI support.
-    At version 0.8, this will most likely result in no sound.
-  </longdescription>
-  <use>
-    <flag name="fluidsynth">
-      Support FluidSynth as a MIDI synthesizer backend.
-      Support the `--soundfont` command line option for custom soundfonts
-    </flag>
-    <flag name="harfbuzz">
-      Use <pkg>media-libs/harfbuzz</pkg> for Unicode text shaping.
-      Depends on external font support by means of the truetype USE flag
-    </flag>
-    <flag name="wildmidi">Support WildMIDI as a MIDI synthesizer backend</flag>
-  </use>
-  <upstream>
-    <remote-id type="github">EasyRPG/Player</remote-id>
-  </upstream>
-</pkgmetadata>

diff --git a/profiles/package.mask b/profiles/package.mask
index e30b523b1..dcef5b109 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -104,12 +104,6 @@ dev-python/tree-sitter-languages
 # Removal on 2024-11-17
 dev-games/liblcf
 
-# Lucio Sauer <watermanpaint@posteo.net> (2024-10-17)
-# Doesn't build since 2024-03 and package maintainer lost interest in it.
-# Open bugs 932475, 927882
-# Removal on 2024-11-17
-games-engines/easyrpg-player
-
 # Takuya Wakazono <pastalian46@gmail.com> (2024-10-02)
 # Depends on <media-libs/kimageannotator-0.7, which has been dropped.
 # Upstream is working on Qt6 port.


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-11-22  8:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-22  8:31 [gentoo-commits] repo/proj/guru:dev commit in: games-engines/easyrpg-player/files/, games-engines/easyrpg-player/, profiles/ Lucio Sauer
2024-11-22  8:49 ` [gentoo-commits] repo/proj/guru:master commit in: games-engines/easyrpg-player/files/, profiles/, games-engines/easyrpg-player/ Lucio Sauer
  -- strict thread matches above, loose matches on Subject: below --
2023-09-26 13:52 David Roman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox