Stem Desktop 1.1.0 — corresponding source for its GNU LGPL components

Every archive in sources/ is the upstream release (or, for GitHub archives, the tagged commit) the shipped
binary was built from, checked against the sha256 below. build/ holds the scripts we built with, laid out
as they are in our repository so they run from here.

== Rebuilding ffmpeg / ffprobe

From the folder this README is in, with Node.js 22.18 or later (it reads build/app/src/main/engine/
setup-constants.ts directly) and no network — the two tarballs are taken from sources/ and checked
against the sha256 pinned in setup-constants.ts:

    node build/app/scripts/build-ffmpeg.mjs --sources sources --platform darwin --arch arm64          # darwin-arm64

macOS pairs are built on a Mac with the Xcode Command Line Tools (xcode-select --install: clang, make);
the x64 pair cross-compiles on an Apple silicon Mac. The Windows pair is cross-compiled on a Mac with
mingw-w64 (brew install mingw-w64, which puts x86_64-w64-mingw32-gcc on PATH). The result lands in
build/engine/dist/ffmpeg/<platform>-<arch>/ (ffmpeg, ffprobe, their licence texts, SOURCE.txt and
manifest.json); replace engine/bin/ffmpeg and engine/bin/ffprobe inside the app with those two files.

== Rebuilding the engine's libraries

lameenc: unpack sources/lameenc-*.tar.gz and build it with CMake as its .github/workflows do
(it builds LAME from the lame-*.tar.gz in sources/ that its CMakeLists names, patching it with its
patch-lame.cmake, and links it statically); install the wheel into the engine.

python-soxr: `pip wheel sources/soxr-*.tar.gz` builds the extension together with the libsoxr the
sdist carries; install the wheel into the engine.

libsndfile: unpack sources/libsndfile-binaries-*.tar.gz and run its mac_build.sh (macOS) or
linux_build.sh (Linux). Those scripts fetch each library with curl -LO; the LGPL ones (libsndfile,
mpg123, LAME) are here in sources/ under the names they fetch — put them beside the script and drop
their curl lines to build from these rather than a fresh download. On
Windows its .github/workflows/build-libs.yml runs vcpkg (sources/vcpkg-*.tar.gz holds the ports and
patches). Replace the file under _soundfile_data/ named below with the result.

libquadmath: each copy below lists its own GCC release and patch. Unpack that GCC release from
sources/ and apply its patch with `patch -p1` from inside the unpacked tree — for Homebrew's gcc@13
the gcc-*.diff itself, for conda-forge the recipe/gcc-*-arm-cross.diff inside the feedstock archive.
Then configure and build: Homebrew's as GCC's own INSTALL/ directory describes (it builds with
--enable-languages=c,c++,objc,obj-c++,fortran), conda-forge's as the feedstock's recipe/build.sh does.
The library is libquadmath/, and its build output replaces the libquadmath file named below.

== darwin-arm64

* FFmpeg 8.1.3 (ffmpeg, ffprobe), with LAME 3.100 built in — LGPL-2.1-or-later
    in the app at: engine/bin/ffmpeg, engine/bin/ffprobe
    built: configure --disable-gpl --disable-nonfree --disable-version3 --disable-autodetect --enable-zlib --disable-network --disable-doc --disable-debug --disable-devices --enable-indev=lavfi --disable-hwaccels --disable-programs --enable-ffmpeg --enable-ffprobe --enable-libmp3lame --extra-cflags=-I<lame prefix>/include --extra-ldflags=-L<lame prefix>/lib --disable-encoders --enable-encoder=aac,libmp3lame,pcm_*,adpcm_*,flac,alac,png,mjpeg,bmp,rawvideo --extra-cflags=-arch arm64 -mmacosx-version-min=11.0 --extra-ldflags=-arch arm64 -mmacosx-version-min=11.0
    script: build/app/scripts/build-ffmpeg.mjs
    sources/ffmpeg-8.1.3.tar.xz  sha256 7138d28c96d9d3e3af4ee3d8cad72741f8ffb40da90c1112235dea3ecd3178a3  (https://ffmpeg.org/releases/ffmpeg-8.1.3.tar.xz)
    sources/lame-3.100.tar.gz  sha256 ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e  (https://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz)

* lameenc 1.9.0, with LAME 4.0 built in — LGPL-3.0-or-later
    in the app at: engine/python/lib/python3.12/site-packages/lameenc.cpython-312-darwin.so
    built: CMake build of the tag (its .github/workflows), LAME 4.0 patched by its patch-lame.cmake and statically linked
    sources/lameenc-1.9.0.tar.gz  sha256 1d96b6d818d00d5d479ecfc01c8939f3fde1ee002a133577d6f42354181044f7  (https://github.com/chrisstaite/lameenc/archive/refs/tags/v1.9.0.tar.gz)
    sources/lame-4.0.tar.gz  sha256 3df5124d5ad3a98312ffd7ba6a9b36230e4f8a3e66d3ce0f425e336c32d216eb  (https://downloads.sourceforge.net/project/lame/lame/4.0/lame-4.0.tar.gz)

* python-soxr 1.1.0, with libsoxr built in — LGPL-2.1-or-later
    in the app at: engine/python/lib/python3.12/site-packages/soxr/soxr_ext.abi3.so
    built: the sdist builds its own libsoxr (pip wheel)
    sources/soxr-1.1.0.tar.gz  sha256 9f228ae21c78fa9359ca98d8a5e8e91f30639e438e574133dace62c5b5309e44  (https://files.pythonhosted.org/packages/ed/11/27cebce4a108f77afea7c80545115536b45e3f11ebfb914f638fdd9ba847/soxr-1.1.0.tar.gz)

* libsndfile 1.2.2 (soundfile 0.14.0), with mpg123 1.32.3 and LAME 3.100 built in — LGPL-2.1-or-later
    in the app at: engine/python/lib/python3.12/site-packages/_soundfile_data/libsndfile_arm64.dylib
    built: libsndfile-binaries df220a2e69f9beab93e89dc2344bd6f434d326f5 mac_build.sh / linux_build.sh
    sources/libsndfile-binaries-df220a2.tar.gz  sha256 eab75e3d1b6743b22c78a924868bc1a7da07b57e460eef85a6e55e7d1ca0d09d  (https://github.com/bastibe/libsndfile-binaries/archive/df220a2e69f9beab93e89dc2344bd6f434d326f5.tar.gz)
    sources/libsndfile-1.2.2.tar.xz  sha256 3799ca9924d3125038880367bf1468e53a1b7e3686a934f098b7e1d286cdb80e  (https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2.tar.xz)
    sources/mpg123-1.32.3.tar.bz2  sha256 2d9913a57d4ee8f497a182c6e82582602409782a4fb481e989feebf4435867b4  (https://downloads.sourceforge.net/project/mpg123/mpg123/1.32.3/mpg123-1.32.3.tar.bz2)
    sources/lame-3.100.tar.gz  sha256 ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e  (https://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz)

* libquadmath (GCC 13.4.0 (Homebrew gcc@13)), shipped by SciPy/NumPy — LGPL-2.1-or-later
    in the app at: engine/python/lib/python3.12/site-packages/scipy/.dylibs/libquadmath.0.dylib
    built: Homebrew gcc@13 13.4.0 (arm64_sonoma bottle): the GCC release tarball with Homebrew's gcc-13.4.0.diff (Iain Sandoe's Apple silicon branch) applied; libquadmath/ is the library
    sources/gcc-13.4.0.tar.xz  sha256 9c4ce6dbb040568fdc545588ac03c5cbc95a8dbf0c7aa490170843afb59ca8f5  (https://gcc.gnu.org/pub/gcc/releases/gcc-13.4.0/gcc-13.4.0.tar.xz)
    sources/gcc-13.4.0.diff  sha256 60b22ae7f5f78b41e12c51d8c6e99ba933a7e124454fe8cdbff7200505167949  (https://raw.githubusercontent.com/Homebrew/homebrew-core/cd5d1cfa7c8f16545c3c14e3d7607c960c890be1/Patches/gcc/gcc-13.4.0.diff)
