[source]
tar = "https://sourceforge.net/projects/dosbox/files/dosbox/0.74-3/dosbox-0.74-3.tar.gz/download"
blake3 = "8bc50ffdba20579fb3080a0dca32cb939c8a3c19259aed026482c6ac069b0007"
patches = ["01_redox.patch"]
script = """
./autogen.sh
GNU_CONFIG_GET config.sub
"""

[build]
dependencies = [
    "liborbital",
    "sdl1",
]
template = "custom"
script = """
DYNAMIC_INIT
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include/SDL"
export CPPFLAGS="${CPPFLAGS} -I${COOKBOOK_SYSROOT}/include/SDL"
export LDFLAGS+=" -lorbital"
COOKBOOK_CONFIGURE_FLAGS+=(
    --disable-opengl
    --disable-sdltest
    --with-sdl-prefix="${COOKBOOK_SYSROOT}"
)
cookbook_configure

mkdir -pv "${COOKBOOK_STAGE}/usr/share/ui/apps"
cp -v "${COOKBOOK_RECIPE}/manifest" "${COOKBOOK_STAGE}/usr/share/ui/apps/dosbox"

mkdir -pv "${COOKBOOK_STAGE}/usr/share/icons/apps"
cp -v "${COOKBOOK_RECIPE}/icon.png" "${COOKBOOK_STAGE}/usr/share/icons/apps/dosbox.png"
"""
