mirror of
https://github.com/scummvm/dockerized-bb.git
synced 2026-11-18 21:35:23 +00:00
COMMON: Replace fluidsynth-lite with FluidLite
This commit is contained in:
1 parent
3b01695e60
commit
83fa6ef4e7
13 files changed
+15
-294
No files matched your search
@@ -181,9 +181,9 @@ VERSIONS = {
|
||||
('./toolchains/caanoo/packages/toolchain/build.sh', 'CT_NG'): crosstool_ng_check,
|
||||
|
||||
('./toolchains/common/packages/discord-rpc/build.sh', 'DISCORD_RPC'): discord_rpc_check,
|
||||
('./toolchains/common/packages/fluidsynth-lite/build.sh', 'FLUIDSYNTH'): {
|
||||
('./toolchains/common/packages/fluidlite/build.sh', 'FLUIDLITE'): {
|
||||
'check': 'git commit',
|
||||
'repository': 'https://github.com/Doom64/fluidsynth-lite.git',
|
||||
'repository': 'https://github.com/divideconcept/FluidLite.git',
|
||||
'branch': 'master',
|
||||
},
|
||||
('./toolchains/common/packages/fluidsynth/build.sh', 'FLUIDSYNTH'): {
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9dca996..6cc709e 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -72,6 +72,7 @@ mark_as_advanced ( LIB_SUFFIX )
|
||||
|
||||
# Default install directory names
|
||||
include ( DefaultDirs )
|
||||
+include ( GNUInstallDirs )
|
||||
|
||||
# Basic C library checks
|
||||
include ( CheckSTDC )
|
||||
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
|
||||
index 76a8f87..7973219 100644
|
||||
--- a/include/CMakeLists.txt
|
||||
+++ b/include/CMakeLists.txt
|
||||
@@ -22,5 +22,5 @@
|
||||
add_subdirectory ( fluidsynth )
|
||||
|
||||
IF (NOT MACOSX_FRAMEWORK )
|
||||
- install ( FILES fluidsynth.h DESTINATION ${INCLUDE_INSTALL_DIR} )
|
||||
+ install ( FILES fluidsynth.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )
|
||||
ENDIF (NOT MACOSX_FRAMEWORK )
|
||||
diff --git a/include/fluidsynth/CMakeLists.txt b/include/fluidsynth/CMakeLists.txt
|
||||
index b146d13..d4c00b4 100644
|
||||
--- a/include/fluidsynth/CMakeLists.txt
|
||||
+++ b/include/fluidsynth/CMakeLists.txt
|
||||
@@ -46,6 +46,6 @@ if ( NOT MACOSX_FRAMEWORK )
|
||||
${include_HEADERS}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/version.h
|
||||
DESTINATION
|
||||
- ${INCLUDE_INSTALL_DIR}/fluidsynth
|
||||
+ ${CMAKE_INSTALL_INCLUDEDIR}/fluidsynth
|
||||
)
|
||||
endif ( NOT MACOSX_FRAMEWORK )
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index c14622d..4e99dab 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -152,5 +152,5 @@ target_link_libraries ( libfluidsynth
|
||||
)
|
||||
|
||||
install(TARGETS libfluidsynth
|
||||
- LIBRARY DESTINATION lib
|
||||
- ARCHIVE DESTINATION lib)
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
@@ -90,4 +90,4 @@ local_package(sdl-net1.2)
|
||||
|
||||
# TODO: openssl and curl
|
||||
|
||||
# fluidsynth-lite is unlikely to be fast enough.
|
||||
# fluidsynth is unlikely to be fast enough.
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
FLUIDSYNTH_VERSION=c539a8d9270ba5a3f7d6e460606483fc2ab1eb61
|
||||
FLUIDLITE_VERSION=57a0e74e708f699b13d7c85b28a4e1ff5b71887c
|
||||
|
||||
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
HELPERS_DIR=$PACKAGE_DIR/../..
|
||||
@@ -8,12 +8,12 @@ HELPERS_DIR=$PACKAGE_DIR/../..
|
||||
|
||||
do_make_bdir
|
||||
|
||||
do_http_fetch fluidsynth-lite \
|
||||
"https://github.com/Doom64/fluidsynth-lite/archive/${FLUIDSYNTH_VERSION}.tar.gz" 'tar xzf'
|
||||
do_http_fetch FluidLite \
|
||||
"https://github.com/divideconcept/FluidLite/archive/${FLUIDLITE_VERSION}.tar.gz" 'tar xzf'
|
||||
|
||||
# -DCMAKE_SYSTEM_NAME=Windows for Windows
|
||||
|
||||
do_cmake "$@"
|
||||
do_cmake -DFLUIDLITE_BUILD_SHARED=OFF "$@"
|
||||
do_make
|
||||
do_make install
|
||||
|
||||
@@ -67,4 +67,4 @@ helpers_package(a52dec)
|
||||
|
||||
helpers_package(fribidi)
|
||||
|
||||
# No fluidsynth
|
||||
helpers_package(fluidlite, -DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/3DS.cmake)
|
||||
@@ -84,6 +84,4 @@ helpers_package(a52dec)
|
||||
|
||||
# sdl2_net is already installed in original toolchain
|
||||
|
||||
# Copy specific Switch support
|
||||
COPY packages/fluidsynth-lite lib-helpers/packages/fluidsynth-lite
|
||||
helpers_package(fluidsynth-lite, -DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/Switch.cmake)
|
||||
helpers_package(fluidlite, -DCMAKE_TOOLCHAIN_FILE=${DEVKITPRO}/cmake/Switch.cmake)
|
||||
@@ -1,227 +0,0 @@
|
||||
diff --git a/src/config_switch.h b/src/config_switch.h
|
||||
new file mode 100644
|
||||
index 0000000..06ba820
|
||||
--- /dev/null
|
||||
+++ b/src/config_switch.h
|
||||
@@ -0,0 +1,157 @@
|
||||
+#ifndef CONFIG_H
|
||||
+#define CONFIG_H
|
||||
+
|
||||
+/* Define to enable ALSA driver */
|
||||
+// #define ALSA_SUPPORT 0
|
||||
+
|
||||
+/* Define to activate sound output to files */
|
||||
+// #define AUFILE_SUPPORT 0
|
||||
+
|
||||
+/* whether or not we are supporting CoreAudio */
|
||||
+// #define COREAUDIO_SUPPORT 0
|
||||
+
|
||||
+/* whether or not we are supporting CoreMIDI */
|
||||
+// #define COREMIDI_SUPPORT 0
|
||||
+
|
||||
+/* whether or not we are supporting DART */
|
||||
+// #define DART_SUPPORT 0
|
||||
+
|
||||
+/* Define if building for Mac OS X Darwin */
|
||||
+// #define DARWIN 0
|
||||
+
|
||||
+/* Define if D-Bus support is enabled */
|
||||
+// #define DBUS_SUPPORT 0
|
||||
+
|
||||
+/* Soundfont to load automatically in some use cases */
|
||||
+#define DEFAULT_SOUNDFONT "/switch/default.sf2"
|
||||
+
|
||||
+/* Define to enable FPE checks */
|
||||
+// #define FPE_CHECK 0
|
||||
+
|
||||
+/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
+#define HAVE_ARPA_INET_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
+// #define HAVE_DLFCN_H 0
|
||||
+
|
||||
+/* Define to 1 if you have the <errno.h> header file. */
|
||||
+#define HAVE_ERRNO_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
+#define HAVE_FCNTL_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
+#define HAVE_INTTYPES_H 1
|
||||
+
|
||||
+/* whether or not we are supporting ladcca */
|
||||
+// #define HAVE_LADCCA 0
|
||||
+
|
||||
+/* whether or not we are supporting lash */
|
||||
+// #define HAVE_LASH 0
|
||||
+
|
||||
+/* Define to 1 if you have the `dl' library (-ldl). */
|
||||
+// #define HAVE_LIBDL 0
|
||||
+
|
||||
+/* Define to 1 if you have the `MidiShare' library (-lMidiShare). */
|
||||
+// #define HAVE_LIBMIDISHARE 0
|
||||
+
|
||||
+/* Define to 1 if you have the `pthread' library (-lpthread). */
|
||||
+#define HAVE_LIBPTHREAD 1
|
||||
+
|
||||
+/* Define to 1 if you have the <limits.h> header file. */
|
||||
+#define HAVE_LIMITS_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <math.h> header file. */
|
||||
+#define HAVE_MATH_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <memory.h> header file. */
|
||||
+#define HAVE_MEMORY_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
+#define HAVE_NETINET_IN_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
||||
+#define HAVE_NETINET_TCP_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <pthread.h> header file. */
|
||||
+#define HAVE_PTHREAD_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <stdarg.h> header file. */
|
||||
+#define HAVE_STDARG_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <stdint.h> header file. */
|
||||
+#define HAVE_STDINT_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <stdbool.h> header file. */
|
||||
+#define HAVE_STDBOOL_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <stdatomic.h> header file. */
|
||||
+#define HAVE_STDATOMIC_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <stdio.h> header file. */
|
||||
+#define HAVE_STDIO_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
+#define HAVE_STDLIB_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <strings.h> header file. */
|
||||
+#define HAVE_STRINGS_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <threads.h> header file. */
|
||||
+#define HAVE_THREADS_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <string.h> header file. */
|
||||
+#define HAVE_STRING_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
+#define HAVE_SYS_IOCTL_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
+#define HAVE_SYS_STAT_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
+#define HAVE_SYS_TIME_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
+#define HAVE_SYS_TYPES_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <unistd.h> header file. */
|
||||
+#define HAVE_UNISTD_H 1
|
||||
+
|
||||
+/* Define to 1 if you have the <getopt.h> header file. */
|
||||
+#define HAVE_GETOPT_H 1
|
||||
+
|
||||
+/* Name of package */
|
||||
+#define PACKAGE "fluidsynth"
|
||||
+
|
||||
+/* Define to the full name of this package. */
|
||||
+#define PACKAGE_NAME "switch-fluidsynth-lite"
|
||||
+
|
||||
+/* Define to the full name and version of this package. */
|
||||
+#define PACKAGE_STRING "switch-fluidsynth-lite-1.1.6-nx"
|
||||
+
|
||||
+/* Define to the one symbol short name of this package. */
|
||||
+#define PACKAGE_TARNAME @PACKAGE_TARNAME@
|
||||
+
|
||||
+/* Define to the version of this package. */
|
||||
+#define PACKAGE_VERSION @PACKAGE_VERSION@
|
||||
+
|
||||
+/* Define to 1 if you have the ANSI C header files. */
|
||||
+#define STDC_HEADERS 1
|
||||
+
|
||||
+/* Version number of package */
|
||||
+#define VERSION "1.1.6"
|
||||
+
|
||||
+/* Define to do all DSP in single floating point precision */
|
||||
+#define WITH_FLOAT 1
|
||||
+
|
||||
+/* Define if the compiler supports VLA */
|
||||
+#define SUPPORTS_VLA 1
|
||||
+
|
||||
+/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
+ calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
+#ifndef inline
|
||||
+#define inline __inline
|
||||
+#endif
|
||||
+
|
||||
+#endif /* CONFIG_H */
|
||||
diff --git a/src/utils/fluid_sys.c b/src/utils/fluid_sys.c
|
||||
index 9976f00..6829afc 100644
|
||||
--- a/src/utils/fluid_sys.c
|
||||
+++ b/src/utils/fluid_sys.c
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <io.h>
|
||||
#elif defined(__APPLE__)
|
||||
#include "apple/timing_mach.h"
|
||||
+#elif defined(__SWITCH__)
|
||||
+#include <switch.h>
|
||||
#endif
|
||||
|
||||
#include "fluid_sys.h"
|
||||
@@ -119,6 +121,10 @@ fluid_default_log_function(int level, char* message, void* data)
|
||||
{
|
||||
FILE* out;
|
||||
|
||||
+#if defined(__SWITCH__) && !defined(NXLINK_DEBUG)
|
||||
+ return;
|
||||
+#endif
|
||||
+
|
||||
#if defined(WIN32)
|
||||
out = stdout;
|
||||
#else
|
||||
@@ -426,6 +432,15 @@ fluid_thread_self_set_prio (int prio_level)
|
||||
DosSetPriority (PRTYS_THREAD, PRTYC_REGULAR, PRTYD_MAXIMUM, 0);
|
||||
}
|
||||
|
||||
+#elif defined(__SWITCH__) /* Nintendo Switch specific stuff */
|
||||
+
|
||||
+void
|
||||
+fluid_thread_self_set_prio (int prio_level)
|
||||
+{
|
||||
+ u32 nx_priority = (prio_level >= FLUID_SYS_TIMER_HIGH_PRIO_LEVEL) ? 0x2D : 0x3B;
|
||||
+ svcSetThreadPriority(CUR_THREAD_HANDLE, nx_priority);
|
||||
+}
|
||||
+
|
||||
#else /* POSIX stuff.. Nice POSIX.. Good POSIX. */
|
||||
|
||||
void
|
||||
@@ -651,6 +666,8 @@ new_fluid_thread (const char *name, fluid_thread_func_t func, void *data, int pr
|
||||
if (detach) {
|
||||
#if _WIN32
|
||||
CloseHandle(*thread);
|
||||
+#elif defined(__SWITCH__)
|
||||
+ // detach unsupported in libnx
|
||||
#else
|
||||
pthread_detach(*thread);
|
||||
#endif
|
||||
diff --git a/src/utils/fluidsynth_priv.h b/src/utils/fluidsynth_priv.h
|
||||
index eeacbbe..e37cf6d 100644
|
||||
--- a/src/utils/fluidsynth_priv.h
|
||||
+++ b/src/utils/fluidsynth_priv.h
|
||||
@@ -34,6 +34,10 @@
|
||||
#include "config_win32.h"
|
||||
#endif
|
||||
|
||||
+#if defined(__SWITCH__)
|
||||
+#include "config_switch.h"
|
||||
+#endif
|
||||
+
|
||||
#if HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
@@ -47,7 +47,4 @@ android_package(libsdl2)
|
||||
COPY --from=android-helpers /lib-helpers/packages/libsdl2-net lib-helpers/packages/libsdl2-net
|
||||
helpers_package(libsdl2-net)
|
||||
|
||||
# Platform patch provided in android-common
|
||||
# Fix destination directories
|
||||
COPY --from=android-helpers /lib-helpers/packages/fluidsynth-lite lib-helpers/packages/fluidsynth-lite
|
||||
helpers_package(fluidsynth-lite, -DBIN_INSTALL_DIR=bin/\$TARGET/\$API -DLIB_INSTALL_DIR=lib/\$TARGET/\$API)
|
||||
helpers_package(fluidlite, -DBIN_INSTALL_DIR=bin/\$TARGET/\$API -DLIB_INSTALL_DIR=lib/\$TARGET/\$API)
|
||||
@@ -62,5 +62,5 @@ helpers_package(fribidi)
|
||||
|
||||
local_package(libsdl)
|
||||
|
||||
# fluidsynth-lite is unlikely to be fast enough.
|
||||
# fluidsynth is unlikely to be fast enough.
|
||||
# The GP2X doesn't have network capabilities, so don't bother with sdl-net1.2 or curl
|
||||
@@ -101,4 +101,4 @@ local_package(sdl-net1.2)
|
||||
|
||||
# TODO: openssl and curl
|
||||
|
||||
# fluidsynth-lite is unlikely to be fast enough.
|
||||
# fluidsynth is unlikely to be fast enough.
|
||||
@@ -107,4 +107,4 @@ local_package(gnutls)
|
||||
# Use same version as official toolchain
|
||||
local_package(curl)
|
||||
|
||||
# fluidsynth-lite is unlikely to be fast enough.
|
||||
# fluidsynth is unlikely to be fast enough.
|
||||
@@ -95,7 +95,7 @@ helpers_package(a52dec)
|
||||
|
||||
# helpers_package(curl)
|
||||
|
||||
helpers_package(fluidsynth-lite, -DCMAKE_TOOLCHAIN_FILE=$GCCSDK_INSTALL_ENV/toolchain-riscos.cmake)
|
||||
helpers_package(fluidlite, -DCMAKE_TOOLCHAIN_FILE=$GCCSDK_INSTALL_ENV/toolchain-riscos.cmake)
|
||||
|
||||
helpers_package(freetype)
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ helpers_package(a52dec)
|
||||
|
||||
# TODO: curl
|
||||
|
||||
# TODO: FluidLite
|
||||
helpers_package(fluidlite, -DCMAKE_SYSTEM_NAME=Windows)
|
||||
|
||||
helpers_package(freetype)
|
||||
|
||||
|
||||
Reference in new issue
Block a user