mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-15 01:53:25 -04:00
Merge updates from master
This commit is contained in:
@@ -9,10 +9,10 @@ CRATES="
|
||||
android_system_properties@0.1.5
|
||||
ansi_term@0.12.1
|
||||
anstream@0.6.18
|
||||
anstyle@1.0.10
|
||||
anstyle-parse@0.2.6
|
||||
anstyle-query@1.1.2
|
||||
anstyle-wincon@3.0.6
|
||||
anstyle@1.0.10
|
||||
arrayref@0.3.9
|
||||
arrayvec@0.7.6
|
||||
autocfg@1.4.0
|
||||
@@ -45,8 +45,8 @@ CRATES="
|
||||
derive-where@1.2.7
|
||||
diff@0.1.13
|
||||
digest@0.10.7
|
||||
dirs-sys@0.4.1
|
||||
dirs@5.0.1
|
||||
dirs-sys@0.4.1
|
||||
dotenvy@0.15.7
|
||||
edit-distance@2.1.3
|
||||
either@1.13.0
|
||||
@@ -59,8 +59,8 @@ CRATES="
|
||||
heck@0.5.0
|
||||
hermit-abi@0.3.9
|
||||
home@0.5.9
|
||||
iana-time-zone-haiku@0.1.2
|
||||
iana-time-zone@0.1.61
|
||||
iana-time-zone-haiku@0.1.2
|
||||
is_terminal_polyfill@1.70.1
|
||||
itoa@1.0.13
|
||||
js-sys@0.3.72
|
||||
@@ -80,17 +80,17 @@ CRATES="
|
||||
ppv-lite86@0.2.20
|
||||
pretty_assertions@1.4.1
|
||||
proc-macro2@1.0.89
|
||||
pulldown-cmark-to-cmark@10.0.4
|
||||
pulldown-cmark@0.9.6
|
||||
pulldown-cmark-to-cmark@10.0.4
|
||||
quote@1.0.37
|
||||
rand@0.8.5
|
||||
rand_chacha@0.3.1
|
||||
rand_core@0.6.4
|
||||
rayon-core@1.12.1
|
||||
redox_users@0.4.6
|
||||
regex@1.11.1
|
||||
regex-automata@0.4.9
|
||||
regex-syntax@0.8.5
|
||||
regex@1.11.1
|
||||
roff@0.2.2
|
||||
rustix@0.38.41
|
||||
rustversion@1.0.18
|
||||
@@ -103,8 +103,8 @@ CRATES="
|
||||
shellexpand@3.1.0
|
||||
shlex@1.3.0
|
||||
similar@2.6.0
|
||||
snafu-derive@0.8.5
|
||||
snafu@0.8.5
|
||||
snafu-derive@0.8.5
|
||||
strsim@0.11.1
|
||||
strum@0.26.3
|
||||
strum_macros@0.26.4
|
||||
@@ -113,8 +113,8 @@ CRATES="
|
||||
tempfile@3.14.0
|
||||
temptree@0.2.0
|
||||
terminal_size@0.4.0
|
||||
thiserror-impl@1.0.69
|
||||
thiserror@1.0.69
|
||||
thiserror-impl@1.0.69
|
||||
typed-arena@2.0.2
|
||||
typenum@1.17.0
|
||||
unicase@2.8.0
|
||||
@@ -126,15 +126,15 @@ CRATES="
|
||||
uuid@1.11.0
|
||||
version_check@0.9.5
|
||||
wasi@0.11.0+wasi-snapshot-preview1
|
||||
wasm-bindgen-backend@0.2.95
|
||||
wasm-bindgen-macro-support@0.2.95
|
||||
wasm-bindgen-macro@0.2.95
|
||||
wasm-bindgen-shared@0.2.95
|
||||
wasm-bindgen@0.2.95
|
||||
wasm-bindgen-backend@0.2.95
|
||||
wasm-bindgen-macro@0.2.95
|
||||
wasm-bindgen-macro-support@0.2.95
|
||||
wasm-bindgen-shared@0.2.95
|
||||
which@7.0.0
|
||||
winapi@0.3.9
|
||||
winapi-i686-pc-windows-gnu@0.4.0
|
||||
winapi-x86_64-pc-windows-gnu@0.4.0
|
||||
winapi@0.3.9
|
||||
windows-core@0.52.0
|
||||
windows-sys@0.48.0
|
||||
windows-sys@0.52.0
|
||||
@@ -158,7 +158,9 @@ CRATES="
|
||||
windows_x86_64_msvc@0.52.6
|
||||
winsafe@0.0.19
|
||||
yansi@1.0.1
|
||||
zerocopy@0.7.35
|
||||
zerocopy-derive@0.7.35
|
||||
zerocopy@0.7.35
|
||||
${PN}@${PV}
|
||||
"
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
DIST liblcf-0.7.0.tar.gz 292623 BLAKE2B 7cf2f21244796b85745ac30bcc3ec7118dd10d5a7054fdd423bbb71ab9b0a4c85ccc644bd57c251374378fe525e1302367456ee348828efb8d97d825727f2caa SHA512 0abf77a7e4615f21b643b0e35d41450dc0dbd37d337fbbf619a19f73da3ee18e9d216f151f52a121be2d91bfee47c1a153f4c64df630d5c587cf4b6071e5b77a
|
||||
DIST liblcf-0.8.tar.xz 473996 BLAKE2B f48cbef89bdde673d215e12336ea06785de9c0d4c06fc625581bedf7b922d8638d4ebad4c17eb34a203815502d86eb38413f9e1fd5884d533c0a6dbedec35d78 SHA512 d92d1a97e7518a7880826126623108d3b2b60aeebf039d7c1c533ea36c270ff643777b67522a171c857457d10ce295562d4838a681f70f524e4619913d816d4d
|
||||
@@ -1,35 +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="Library to handle RPG Maker 2000/2003 and EasyRPG projects"
|
||||
HOMEPAGE="https://github.com/EasyRPG/liblcf"
|
||||
SRC_URI="https://github.com/EasyRPG/liblcf/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
IUSE="doc"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/expat
|
||||
dev-libs/icu:=
|
||||
doc? ( app-text/doxygen )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DBUILD_SHARED_LIBS=True
|
||||
-DLIBLCF_UPDATE_MIMEDB=False
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cmake_build check
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
# Copyright 2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake xdg
|
||||
|
||||
DESCRIPTION="Library to handle RPG Maker 2000/2003 and EasyRPG projects"
|
||||
HOMEPAGE="https://easyrpg.org/
|
||||
https://github.com/EasyRPG/liblcf"
|
||||
SRC_URI="https://easyrpg.org/downloads/player/${PV}/${P}.tar.xz"
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc64"
|
||||
|
||||
IUSE="doc tools"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/expat
|
||||
dev-libs/icu:=
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="doc? (
|
||||
app-text/doxygen
|
||||
media-gfx/graphviz[svg]
|
||||
)
|
||||
"
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DBUILD_SHARED_LIBS=True
|
||||
-DLIBLCF_UPDATE_MIMEDB=False
|
||||
-DLIBLCF_ENABLE_TOOLS=$(usex tools)
|
||||
)
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
# Why do we have to build this explicitly :/
|
||||
use doc && cmake_build liblcf_doc
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cmake_build check
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
if use doc; then
|
||||
docinto /usr/share/doc/${PF}/html
|
||||
dodoc -r doc/*
|
||||
fi
|
||||
}
|
||||
@@ -1,17 +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>
|
||||
<upstream>
|
||||
<remote-id type="github">EasyRPG/liblcf</remote-id>
|
||||
</upstream>
|
||||
<use>
|
||||
<flag name="tools">
|
||||
Build and install additional command line tools, including lcf2xml
|
||||
and lcfstrings.
|
||||
</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
@@ -14,6 +14,11 @@ SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
src_compile() {
|
||||
ewarn "According to an upstream maintainer, cc65 has a tendency to"
|
||||
ewarn "\"fail randomly\" when using \`make -j' to build in parallel."
|
||||
ewarn "If compiling this package fails, and you have parallel jobs"
|
||||
ewarn "enabled, try again with \`MAKEOPTS+=-j1' to disable them."
|
||||
|
||||
emake CC="$(tc-getCC)" AR="$(tc-getAR)" PREFIX="${EPREFIX}/usr"
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,11 @@ LICENSE="ZLIB"
|
||||
SLOT="0"
|
||||
|
||||
src_compile() {
|
||||
ewarn "According to an upstream maintainer, cc65 has a tendency to"
|
||||
ewarn "\"fail randomly\" when using \`make -j' to build in parallel."
|
||||
ewarn "If compiling this package fails, and you have parallel jobs"
|
||||
ewarn "enabled, try again with \`MAKEOPTS+=-j1' to disable them."
|
||||
|
||||
emake CC="$(tc-getCC)" AR="$(tc-getAR)" PREFIX="${EPREFIX}/usr"
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
@@ -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"
|
||||
@@ -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
|
||||
@@ -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;
|
||||
@@ -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")
|
||||
@@ -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>
|
||||
@@ -12,8 +12,11 @@ SRC_URI="http://www.whence.com/minimodem/minimodem-${PV}.tar.gz"
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="+alsa pulseaudio sndfile sndio"
|
||||
REQUIRED_USE+="|| ( alsa pulseaudio sndfile )"
|
||||
IUSE="alsa pulseaudio +sndfile sndio test"
|
||||
REQUIRED_USE+="|| ( alsa pulseaudio sndfile )
|
||||
test? ( sndfile )"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="sndfile? ( media-libs/libsndfile )
|
||||
sci-libs/fftw:3.0
|
||||
@@ -11,8 +11,11 @@ EGIT_REPO_URI="https://github.com/kamalmostafa/minimodem"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
IUSE="alsa +pulseaudio sndfile sndio"
|
||||
REQUIRED_USE+="|| ( alsa pulseaudio sndfile sndio )"
|
||||
IUSE="alsa pulseaudio +sndfile sndio test"
|
||||
REQUIRED_USE+="|| ( alsa pulseaudio sndfile sndio )
|
||||
test ( sndfile )"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="sndfile? ( media-libs/libsndfile )
|
||||
sci-libs/fftw:3.0
|
||||
@@ -98,18 +98,6 @@ app-editors/kitscenarist
|
||||
# Removal on 2025-01-18.
|
||||
dev-python/tree-sitter-languages
|
||||
|
||||
# Lucio Sauer <watermanpaint@posteo.net> (2024-10-17)
|
||||
# Doesn't build since 2024-08 and its sole consumer is up for removal.
|
||||
# Open bugs 937251, 937252
|
||||
# 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.
|
||||
|
||||
@@ -40,7 +40,9 @@ src_prepare() {
|
||||
eapply "${FILESDIR}"/gfs2_withdraw_helper.patch
|
||||
eapply "${FILESDIR}"/python3.patch
|
||||
|
||||
sed -i '/^CFLAGS=/s!\$\(GDB_FLAGS\|OPT_CFLAGS\)\s*!!g' configure.ac || die
|
||||
sed -e '/^CFLAGS=/s!\s*\$\(GDB_FLAGS\|OPT_CFLAGS\)!!g' \
|
||||
-e '/^CPPFLAGS=/s!\s*\$OPT_CPPFLAGS!!' \
|
||||
-i configure.ac || die
|
||||
|
||||
default
|
||||
|
||||
Reference in New Issue
Block a user