# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit cmake xdg-utils DESCRIPTION="RPG Maker 2000/2003 and EasyRPG games interpreter" HOMEPAGE="https://easyrpg.org/" if [[ ${PV} == 9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/EasyRPG/Player.git" else SRC_URI="https://github.com/EasyRPG/Player/archive/refs/tags/${PV}.tar.gz -> easyrpg-player-${PV}.tar.gz" S="${WORKDIR}/Player-${PV}" KEYWORDS="~amd64" fi LICENSE="GPL-3" SLOT="0" IUSE=" fluidsynth +freetype +json libsamplerate +midi +mp3 opus sdl3 +sndfile +speexdsp +vorbis wildmidi xmp " RDEPEND=" >=dev-games/liblcf-$(ver_cut 1-3)[ini] >=dev-libs/libfmt-6:= media-libs/libpng x11-libs/pixman fluidsynth? ( media-sound/fluidsynth:= ) freetype? ( media-libs/freetype:2 media-libs/harfbuzz:= ) json? ( dev-cpp/nlohmann_json ) libsamplerate? ( media-libs/libsamplerate ) midi? ( media-libs/alsa-lib ) mp3? ( media-sound/mpg123-base ) opus? ( media-libs/opusfile ) !sdl3? ( >=media-libs/libsdl2-2.0.14[video] ) sdl3? ( media-libs/libsdl3 ) sndfile? ( media-libs/libsndfile ) speexdsp? ( media-libs/speexdsp ) vorbis? ( media-libs/libvorbis ) wildmidi? ( media-sound/wildmidi ) xmp? ( media-libs/libxmp ) " DEPEND="${RDEPEND}" src_configure() { local mycmakeargs=( -DPLAYER_ENABLE_DRWAV=OFF -DPLAYER_ENABLE_TESTS=ON -DPLAYER_TARGET_PLATFORM="$(usex sdl3 SDL3 SDL2)" -DPLAYER_WITH_FLUIDSYNTH="$(usex fluidsynth)" -DPLAYER_WITH_FREETYPE="$(usex freetype)" -DPLAYER_WITH_HARFBUZZ="$(usex freetype)" -DPLAYER_WITH_LIBSNDFILE="$(usex sndfile)" -DPLAYER_WITH_MPG123="$(usex mp3)" -DPLAYER_WITH_NATIVE_MIDI="$(usex midi)" -DPLAYER_WITH_NLOHMANN_JSON="$(usex json)" -DPLAYER_WITH_OGGVORBIS="$(usex vorbis)" -DPLAYER_WITH_OPUS="$(usex opus)" -DPLAYER_WITH_SAMPLERATE="$(usex libsamplerate)" -DPLAYER_WITH_SPEEXDSP="$(usex speexdsp)" -DPLAYER_WITH_WILDMIDI="$(usex wildmidi)" -DPLAYER_WITH_XMP="$(usex xmp)" ) cmake_src_configure } src_test() { cmake_build check } pkg_postinst() { xdg_desktop_database_update }