Fix media-sound/furnace-0.6_pre50

This commit is contained in:
~keith 2023-06-19 02:35:21 +00:00
parent 55d01e0bbc
commit d06693479d
Signed by: keith
GPG key ID: 5BEBEEAB2C73D520
3 changed files with 33 additions and 68 deletions

View file

@ -0,0 +1,24 @@
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 4f5e54ff..0f0a943f 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -6021,7 +6021,18 @@ bool FurnaceGUI::init() {
#endif
// initialize SDL
- SDL_Init(SDL_INIT_VIDEO|SDL_INIT_HAPTIC);
+ logD("Initializing video...");
+ if (SDL_Init(SDL_INIT_VIDEO)!=0) {
+ logE("Could not initialize video! %s",SDL_GetError());
+ return false;
+ }
+
+#ifdef IS_MOBILE
+ logD("Initializing haptic...");
+ if (SDL_Init(SDL_INIT_HAPTIC)!=0) {
+ logW("Could not initialize haptic! %s",SDL_GetError());
+ }
+#endif
const char* videoBackend=SDL_GetCurrentVideoDriver();
if (videoBackend!=NULL) {

View file

@ -1,67 +0,0 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake git-r3
DESCRIPTION="A multi-system chiptune tracker compatible with DefleMask modules"
HOMEPAGE="https://github.com/tildearrow/furnace"
EGIT_REPO_URI="https://github.com/tildearrow/furnace.git"
EGIT_COMMIT="v0.6pre1.5"
EGIT_SUBMODULES=( '*' '-extern/SDL' '-extern/fmt' '-extern/libsndfile' )
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
DEPEND="
midi? ( media-libs/rtmidi )
>=media-libs/libsdl2-2.0.18
>=sci-libs/fftw-3.3
>=dev-libs/libfmt-7.1.0
media-libs/libsndfile
sys-libs/zlib
media-libs/alsa-lib
pulseaudio? ( media-libs/libpulse )
x11-libs/libX11
virtual/opengl
jack? ( virtual/jack )
"
RDEPEND="${DEPEND}"
BDEPEND=""
IUSE="jack midi pulseaudio +demos +instruments"
src_configure() {
local mycmakeargs=(
-DSYSTEM_FFTW=ON
-DSYSTEM_FMT=ON
-DSYSTEM_LIBSNDFILE=ON
-DSYSTEM_RTMIDI=ON
-DSYSTEM_ZLIB=ON
-DSYSTEM_SDL2=ON
)
BUILD_DIR="${WORKDIR}/build"
if use midi; then
mycmakeargs+=( -DUSE_RTMIDI=ON )
else
mycmakeargs+=( -DUSE_RTMIDI=OFF )
fi
if use jack; then
mycmakeargs+=( -DWITH_JACK=ON )
else
mycmakeargs+=( -DWITH_JACK=OFF )
fi
if use demos; then
mycmakeargs+=( -DWITH_DEMOS=ON )
else
mycmakeargs+=( -DWITH_DEMOS=OFF )
fi
if use instruments; then
mycmakeargs+=( -DWITH_INSTRUMENTS=ON )
else
mycmakeargs+=( -DWITH_INSTRUMENTS=OFF )
fi
cmake_src_configure
}

View file

@ -10,6 +10,9 @@ HOMEPAGE="https://github.com/tildearrow/furnace"
EGIT_REPO_URI="https://github.com/tildearrow/furnace.git" EGIT_REPO_URI="https://github.com/tildearrow/furnace.git"
EGIT_COMMIT="v0.6pre5" EGIT_COMMIT="v0.6pre5"
EGIT_SUBMODULES=( '*' '-extern/SDL' '-extern/fmt' '-extern/libsndfile' ) EGIT_SUBMODULES=( '*' '-extern/SDL' '-extern/fmt' '-extern/libsndfile' )
PATCHES=(
"${FILESDIR}"/${P}-gui-fix.patch
)
LICENSE="GPL-2" LICENSE="GPL-2"
SLOT="0" SLOT="0"
@ -31,7 +34,7 @@ jack? ( virtual/jack )
RDEPEND="${DEPEND}" RDEPEND="${DEPEND}"
BDEPEND="" BDEPEND=""
IUSE="jack midi pulseaudio +demos +instruments" IUSE="jack midi pulseaudio +demos +instruments +wavetables"
src_configure() { src_configure() {
local mycmakeargs=( local mycmakeargs=(
@ -63,5 +66,10 @@ src_configure() {
else else
mycmakeargs+=( -DWITH_INSTRUMENTS=OFF ) mycmakeargs+=( -DWITH_INSTRUMENTS=OFF )
fi fi
if use wavetables; then
mycmakeargs+=( -DWITH_WAVETABLES=ON )
else
mycmakeargs+=( -DWITH_WAVETABLES=OFF )
fi
cmake_src_configure cmake_src_configure
} }