RELINK instructions - OpenDana, Linux TAR
=======================================================

No component of this TAR is LGPL. There is therefore no LGPL relink
obligation: the TAR links only the SDL2 shared library (Zlib), which is
shared and substitutable, plus the C library and libm of the host system.

Components
----------
- application        GPL-3.0-or-later      bin/opendana
- SDL2 2.32.10       Zlib                  lib/libSDL2-2.0.so.0 (shared)
- SDL2-embedded      SunPro/BSD/MIT/Zlib/Apache-2.0 (compiled into SDL2)
- cJSON 1.7.18       MIT                   (compiled into bin/opendana)
- stb_image 2.30     MIT (alternative A)   (compiled into bin/opendana)
- stb_image_write 1.16 MIT (alternative A) (compiled into bin/opendana)

The exact versions, source archives and their SHA-256 are in SOURCES.json.

Rebuilding the application
--------------------------
sources/application.tar.xz is the complete corresponding source of bin/opendana:
the `git archive` of the commit printed by `bin/opendana --version`. Build it with

    tar -xJf sources/application.tar.xz
    cd opendana-*/
    SDL2_DIR=<an SDL2 2.32.x prefix> bash build.sh

Replacing SDL2
--------------
The application resolves SDL2 through its RUNPATH, which is exactly
$ORIGIN/../lib (relative, no absolute paths). To substitute an ABI-compatible
SDL2 build, overwrite the shipped file in place:

    cp <your-libSDL2-2.0.so.0> <package>/lib/libSDL2-2.0.so.0

Keep DT_NEEDED / SONAME = libSDL2-2.0.so.0. Nothing else in the package needs
to change; no relink of bin/opendana is required because SDL2 is a shared library.

Rebuilding the shipped SDL2
---------------------------
The corresponding source is sources/SDL2.tar.xz (SDL2-2.32.10, git revision
5d249570393f7a37e037abf22cd6012a4cc56a71, REVISION.txt
release-2.32.10-0-g5d24957). The recipe, the generated SDL_config.h and the
per-file compile flags are in sources/relink-materials.tar.xz:

    build-sdl.sh      configure/build/install recipe
    SDL_config.h      configuration header produced by the build
    flags.txt         per-file FLAGS/DEFINES/INCLUDES and compiler
    README.txt        step-by-step reproduction

Expected result:

    lib/libSDL2-2.0.so.0
    SHA-256 3d5c61bad2a0484484ac2219ae109e4e96ae225505c59c42a33958657d4f838f

Modification and reverse engineering of the shipped components for debugging
is permitted by the applicable licenses; no additional restriction is added
by this bundle.
