Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@

# do not convert line ending of windows batch files
*.cmd -text

/shared/packages.sh -diff -linguist-generated
23 changes: 11 additions & 12 deletions 3ds/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ else
msg "The following tools need to be installed to allow building .cia"
msg "bundles or creating custom banners:"
msg " https://github.com/dnasdw/3dstool"
#msg " https://github.com/Steveice10/bannertool"
msg " https://github.com/carstene1ns/3ds-bannertool"
msg " https://github.com/profi200/Project_CTR"
fi
Expand All @@ -37,31 +36,29 @@ if [ ! -f .patches-applied ]; then

patches_common

# Fix pixman
verbosemsg "pixman"
(cd $PIXMAN_DIR
patch -Np1 < $SCRIPT_DIR/../shared/extra/pixman-no-tls.patch
patch -Np1 < $SCRIPT_DIR/pixman-fix-types.patch
)

# Fix mpg123
verbosemsg "mpg123"
(cd $MPG123_DIR
patch -Np1 < $SCRIPT_DIR/../shared/extra/mpg123.patch
autoreconf -fi
)

# Fix tremor
verbosemsg "tremor"
patch -d $TREMOR_DIR -Np1 < $SCRIPT_DIR/tremor-fix-types.patch

# Fix opusfile
verbosemsg "opusfile"
patch -d $OPUSFILE_DIR -Np1 < $SCRIPT_DIR/../shared/extra/opusfile-devkit.patch

# Fix lhasa
verbosemsg "lhasa"
patch -d $LHASA_DIR -Np1 < $SCRIPT_DIR/../shared/extra/lhasa.patch

# Fix icu build
# Remove mutexes (crashes)
verbosemsg "ICU"
patch -Np0 < $SCRIPT_DIR/../shared/extra/icu-no-mutex.patch
# Fix char16 detection
patch -Np0 < $SCRIPT_DIR/icu-data-char16.patch

touch .patches-applied
Expand Down Expand Up @@ -101,16 +98,18 @@ install_lib_cmake $LIBPNG_DIR $LIBPNG_ARGS
install_lib_cmake $FREETYPE_DIR $FREETYPE_ARGS -DFT_DISABLE_HARFBUZZ=ON
#install_lib_meson $HARFBUZZ_DIR $HARFBUZZ_ARGS
#install_lib_cmake $FREETYPE_DIR $FREETYPE_ARGS -DFT_DISABLE_HARFBUZZ=OFF
install_lib_meson $PIXMAN_DIR $PIXMAN_ARGS
install_lib_meson $PIXMAN_DIR $PIXMAN_ARGS -Dneon=disabled
install_lib_cmake $EXPAT_DIR $EXPAT_ARGS
install_lib $LIBOGG_DIR $LIBOGG_ARGS
install_lib $TREMOR_DIR $TREMOR_ARGS
install_lib $MPG123_DIR $MPG123_ARGS
install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS
install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS
install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS
install_lib $OPUS_DIR $OPUS_ARGS --disable-asm
install_lib $OPUSFILE_DIR $OPUSFILE_ARGS
# asm support is missing in opus cmake, but might be added one day,
# likely -DOPUS_ASM=OFF then, beware if switching to meson
install_lib_cmake $OPUS_DIR $OPUS_ARGS -DOPUS_FIXED_POINT=ON
install_lib $OPUSFILE_DIR $OPUSFILE_ARGS --enable-fixed-point
install_lib_cmake $FLUIDLITE_DIR $FLUIDLITE_ARGS
install_lib_meson $INIH_DIR $INIH_ARGS
install_lib $LHASA_DIR $LHASA_ARGS
Expand Down
10 changes: 10 additions & 0 deletions 3ds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,13 @@
### Local build process:

- Run `0_build_everything.sh` in a terminal

## Developer's notes

The 3DS supports:
- ✘ ARM NEON intrinsiscs
- ✘ TLS (thread local storage)
- ✔ floating point hardware (albeit slow)
- ✔ mediocre CPU performance and memory size

These often need to be patched in or out of the libraries.
2 changes: 1 addition & 1 deletion android/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function build() {
install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS
install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS
install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS
install_lib $OPUS_DIR $OPUS_ARGS
install_lib_cmake $OPUS_DIR $OPUS_ARGS
install_lib $OPUSFILE_DIR $OPUSFILE_ARGS
install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS
install_lib_cmake $NLOHMANNJSON_DIR $NLOHMANNJSON_ARGS
Expand Down
2 changes: 1 addition & 1 deletion emscripten/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ install_lib $LIBSNDFILE_DIR $LIBSNDFILE_ARGS
install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS
install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS
#install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS
install_lib $OPUS_DIR $OPUS_ARGS --disable-stack-protector
install_lib_cmake $OPUS_DIR $OPUS_ARGS -DOPUS_STACK_PROTECTOR=OFF
install_lib $OPUSFILE_DIR $OPUSFILE_ARGS
install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS
install_lib_cmake $NLOHMANNJSON_DIR $NLOHMANNJSON_ARGS
Expand Down
2 changes: 1 addition & 1 deletion ios/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function build() {
install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS
install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS
install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS
install_lib $OPUS_DIR $OPUS_ARGS
install_lib_cmake $OPUS_DIR $OPUS_ARGS
install_lib $OPUSFILE_DIR $OPUSFILE_ARGS
install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS -DCMAKE_MACOSX_BUNDLE=OFF
install_lib_cmake $NLOHMANNJSON_DIR $NLOHMANNJSON_ARGS
Expand Down
2 changes: 1 addition & 1 deletion linux-static/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ install_lib $LIBSNDFILE_DIR $LIBSNDFILE_ARGS
install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS
install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS
install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS
install_lib $OPUS_DIR $OPUS_ARGS
install_lib_cmake $OPUS_DIR $OPUS_ARGS
install_lib $OPUSFILE_DIR $OPUSFILE_ARGS
install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS
install_lib_cmake $NLOHMANNJSON_DIR $NLOHMANNJSON_ARGS
Expand Down
2 changes: 1 addition & 1 deletion macos/2_build_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function build() {
install_lib_cmake $LIBXMP_LITE_DIR $LIBXMP_LITE_ARGS
install_lib $SPEEXDSP_DIR $SPEEXDSP_ARGS
install_lib_cmake $WILDMIDI_DIR $WILDMIDI_ARGS
install_lib $OPUS_DIR $OPUS_ARGS
install_lib_cmake $OPUS_DIR $OPUS_ARGS
install_lib $OPUSFILE_DIR $OPUSFILE_ARGS
install_lib_cmake $FLUIDSYNTH_DIR $FLUIDSYNTH_ARGS
install_lib_cmake $NLOHMANNJSON_DIR $NLOHMANNJSON_ARGS
Expand Down
12 changes: 1 addition & 11 deletions shared/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -366,17 +366,7 @@ function patches_common {
verbosemsg "tremor"

(cd $TREMOR_DIR
perl -pi -e 's/XIPH_PATH_OGG.*//' configure.in
autoreconf -fi
)
fi

# libsamplerate: disable examples
if [ -d "$LIBSAMPLERATE_DIR" ]; then
verbosemsg "libsamplerate"

(cd $LIBSAMPLERATE_DIR
patch -Np1 < $_SCRIPT_DIR/libsamplerate-no-examples.patch
perl -pi -e 's/XIPH_PATH_OGG.*//' configure.ac
autoreconf -fi
)
fi
Expand Down
48 changes: 30 additions & 18 deletions shared/extra/mpg123.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff '--color=auto' -Naur mpg123-1.28.1-orig/configure.ac mpg123-1.28.1/configure.ac
--- mpg123-1.28.1-orig/configure.ac 2021-07-12 00:49:40.906632272 +0200
+++ mpg123-1.28.1/configure.ac 2021-07-12 00:52:50.956634812 +0200
@@ -1318,6 +1318,20 @@
diff --color -Naur mpg123-1.33.3.orig/configure.ac mpg123-1.33.3/configure.ac
--- mpg123-1.33.3.orig/configure.ac 2025-10-05 22:59:02.000000000 +0200
+++ mpg123-1.33.3/configure.ac 2025-10-21 14:49:00.629579286 +0200
@@ -1582,6 +1582,20 @@
# Optionally use platform macros for byte swapping.
AC_CHECK_HEADERS([byteswap.h])

Expand All @@ -22,10 +22,22 @@ diff '--color=auto' -Naur mpg123-1.28.1-orig/configure.ac mpg123-1.28.1/configur
dnl ############## Choose compiler flags and CPU

# do not assume gcc here, so no flags by default
diff '--color=auto' -Naur mpg123-1.28.1-orig/src/compat/compat.h mpg123-1.28.1/src/compat/compat.h
--- mpg123-1.28.1-orig/src/compat/compat.h 2021-07-12 00:49:40.876632271 +0200
+++ mpg123-1.28.1/src/compat/compat.h 2021-07-12 00:52:50.956634812 +0200
@@ -86,7 +86,8 @@
diff --color -Naur mpg123-1.33.3.orig/src/compat/compat.c mpg123-1.33.3/src/compat/compat.c
--- mpg123-1.33.3.orig/src/compat/compat.c 2025-10-05 22:59:02.000000000 +0200
+++ mpg123-1.33.3/src/compat/compat.c 2025-10-21 15:10:38.369364458 +0200
@@ -520,7 +520,7 @@

#ifdef DONT_CATCH_SIGNALS
fprintf (stderr, "Not catching any signals.\n");
- return ((void (*)()) -1);
+ return ((void (*)(int)) -1);
#endif

new_sa.sa_handler = handler;
diff --color -Naur mpg123-1.33.3.orig/src/compat/compat.h mpg123-1.33.3/src/compat/compat.h
--- mpg123-1.33.3.orig/src/compat/compat.h 2025-10-05 22:59:02.000000000 +0200
+++ mpg123-1.33.3/src/compat/compat.h 2025-10-21 14:49:00.630023566 +0200
@@ -94,7 +94,8 @@
#include <sys/time.h>
#endif
/* For select(), I need select.h according to POSIX 2001, else: sys/time.h sys/types.h unistd.h */
Expand All @@ -35,12 +47,12 @@ diff '--color=auto' -Naur mpg123-1.28.1-orig/src/compat/compat.h mpg123-1.28.1/s
#include <sys/select.h>
#endif

diff '--color=auto' -Naur mpg123-1.28.1-orig/src/control_generic.c mpg123-1.28.1/src/control_generic.c
--- mpg123-1.28.1-orig/src/control_generic.c 2021-07-12 00:49:40.876632271 +0200
+++ mpg123-1.28.1/src/control_generic.c 2021-07-12 00:54:20.726636012 +0200
@@ -28,8 +28,10 @@
diff --color -Naur mpg123-1.33.3.orig/src/control_generic.c mpg123-1.33.3/src/control_generic.c
--- mpg123-1.33.3.orig/src/control_generic.c 2025-10-05 22:59:02.000000000 +0200
+++ mpg123-1.33.3/src/control_generic.c 2025-10-21 14:49:00.630277569 +0200
@@ -29,8 +29,10 @@
#include <ctype.h>
#if !defined (WIN32) || defined (__CYGWIN__)
#if !defined (_WIN32) || defined (__CYGWIN__)
#include <sys/wait.h>
+#ifdef NETWORK
#include <sys/socket.h>
Expand All @@ -49,7 +61,7 @@ diff '--color=auto' -Naur mpg123-1.28.1-orig/src/control_generic.c mpg123-1.28.1
#include <errno.h>
#include <string.h>

@@ -397,7 +399,10 @@
@@ -408,7 +410,10 @@
outstream = stdout;
out_is_term = stdout_is_term;
}
Expand All @@ -61,10 +73,10 @@ diff '--color=auto' -Naur mpg123-1.28.1-orig/src/control_generic.c mpg123-1.28.1
setlinebuf(outstream);
#else /* perhaps just use setvbuf as it's C89 */
/*
diff '--color=auto' -Naur mpg123-1.28.1-orig/src/mpg123.c mpg123-1.28.1/src/mpg123.c
--- mpg123-1.28.1-orig/src/mpg123.c 2021-07-12 00:49:40.876632271 +0200
+++ mpg123-1.28.1/src/mpg123.c 2021-07-12 00:52:50.956634812 +0200
@@ -1353,6 +1353,8 @@
diff --color -Naur mpg123-1.33.3.orig/src/mpg123.c mpg123-1.33.3/src/mpg123.c
--- mpg123-1.33.3.orig/src/mpg123.c 2025-10-05 22:59:02.000000000 +0200
+++ mpg123-1.33.3/src/mpg123.c 2025-10-21 14:49:00.630634577 +0200
@@ -1341,6 +1341,8 @@
if(param.verbose > 2) fprintf(stderr, "Note: pausing %i seconds before next track.\n", param.delay);
#ifdef WIN32
Sleep(param.delay*1000);
Expand Down
26 changes: 0 additions & 26 deletions shared/libsamplerate-no-examples.patch

This file was deleted.

32 changes: 16 additions & 16 deletions shared/packages.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,33 @@ arguments = "-DZLIB_BUILD_EXAMPLES=OFF"
anitya_id = 5303

[libpng]
version = 1.6.48
version = 1.6.50
url = "https://download.sourceforge.net/libpng/libpng-${version}.tar.xz"
arguments = "-DPNG_SHARED=OFF -DPNG_EXECUTABLES=OFF -DPNG_TESTS=OFF"
arguments = "-DPNG_SHARED=OFF -DPNG_TOOLS=OFF -DPNG_TESTS=OFF"
anitya_id = 1705

[freetype]
version = 2.13.3
version = 2.14.1
url = "https://download.savannah.gnu.org/releases/freetype/freetype-${version}.tar.xz"
arguments = "-DFT_DISABLE_BZIP2=ON -DFT_DISABLE_BROTLI=ON"
anitya_id = 854

[harfbuzz]
version = 11.2.1
version = 12.1.0
url = "https://github.com/harfbuzz/harfbuzz/releases/download/${version}/harfbuzz-${version}.tar.xz"
arguments = "-Dfreetype=enabled -Dicu=disabled -Dtests=disabled -Dutilities=disabled" # TODO disable subset
anitya_id = 1299

[pixman]
version = 0.46.0
version = 0.46.4
url = "https://cairographics.org/releases/pixman-${version}.tar.gz"
arguments = "-Dtests=disabled -Ddemos=disabled -Dlibpng=disabled"
anitya_id = 3648

[expat]
version_major = 2
version_minor = 7
version_patch = 1
version_patch = 3
version = ${version_major}.${version_minor}.${version_patch}
version_url = ${version_major}_${version_minor}_${version_patch}
url = "https://github.com/libexpat/libexpat/releases/download/R_${version_url}/expat-${version}.tar.bz2"
Expand All @@ -43,7 +43,7 @@ arguments = "-DEXPAT_BUILD_TOOLS=OFF -DEXPAT_BUILD_EXAMPLES=OFF
anitya_id = 770

[libogg]
version = 1.3.5
version = 1.3.6
url = "https://downloads.xiph.org/releases/ogg/libogg-${version}.tar.xz"
anitya_id = 1694

Expand All @@ -53,11 +53,11 @@ url = "https://downloads.xiph.org/releases/vorbis/libvorbis-${version}.tar.xz"
anitya_id = 1758

[tremor]
version = 7c30a66346199f3f09017a09567c6c8a3a0eedc8
version = 820fb3237ea81af44c9cc468c8b4e20128e3e5ad
url = "https://gitlab.xiph.org/xiph/tremor/-/archive/${version}/tremor-${version}.tar.bz2"

[mpg123]
version = 1.32.10
version = 1.33.3
url = "https://www.mpg123.de/download/mpg123-${version}.tar.bz2"
arguments = "--with-cpu=generic --disable-fifo --disable-ipv6 --disable-network
--disable-int-quality --with-default-audio=dummy --with-optimization=2
Expand Down Expand Up @@ -85,6 +85,7 @@ anitya_id = 8419
[libsamplerate]
version = 0.2.2
url = "https://github.com/libsndfile/libsamplerate/releases/download/${version}/libsamplerate-${version}.tar.xz"
arguments = "-DLIBSAMPLERATE_EXAMPLES=OFF -DBUILD_TESTING=OFF"
anitya_id = 1716

[wildmidi]
Expand All @@ -97,7 +98,7 @@ anitya_id = 9179
[opus]
version = 1.5.2
url = "https://downloads.xiph.org/releases/opus/opus-${version}.tar.gz"
arguments = "--disable-intrinsics --disable-extra-programs"
arguments = "-DOPUS_DISABLE_INTRINSICS=ON"
anitya_id = 11081

[opusfile]
Expand All @@ -113,7 +114,7 @@ arguments = "-DLIB_SUFFIX=''"
anitya_id = 10437

[FluidLite]
version = 57a0e74e708f699b13d7c85b28a4e1ff5b71887c
version = 4a01cf1c67419e71da971d209f2855bbf4f3bab8
url = "https://github.com/divideconcept/FluidLite/archive/${version}.zip"
arguments = "-DFLUIDLITE_BUILD_STATIC=ON -DFLUIDLITE_BUILD_SHARED=OFF"

Expand All @@ -125,19 +126,19 @@ arguments = "-DJSON_BuildTests=OFF"
anitya_id = 11152

[fmt]
version = 11.2.0
version = 12.0.0
url = "https://github.com/fmtlib/fmt/releases/download/${version}/fmt-${version}.zip"
arguments = "-DFMT_DOC=OFF -DFMT_TEST=OFF"
anitya_id = 11526

[inih]
version = 60
version = 62
url = "https://github.com/benhoyt/inih/archive/refs/tags/r${version}.tar.gz"
directory = "inih-r${version}"
anitya_id = 11600

[lhasa]
version = 0.4.0
version = 0.5.0
url = "https://github.com/fragglet/lhasa/releases/download/v${version}/lhasa-${version}.tar.gz"
anitya_id = 14822

Expand All @@ -152,7 +153,7 @@ arguments = "--enable-strict=no --disable-tests --disable-samples
--disable-dyload --disable-extras --disable-icuio
--with-data-packaging=static --disable-layout --disable-layoutex
--enable-draft=no"
anitya_id = 16134
anitya_id = 379847

[icudata]
version_major = 77
Expand All @@ -162,7 +163,6 @@ _ini_comment = empty on purpose, otherwise polluted by default section
directory =
url = https://ci.easyrpg.org/job/icudata/lastSuccessfulBuild/artifact/icudata${version_major}_all.tar.gz
files = "icudt*.dat"
anitya_id = 16134

[SDL2]
version = 2.32.6
Expand Down
Loading