#TODO runtime crash
[source]
git = "https://github.com/danoon2/Boxedwine"
rev = "7328e70"
shallow_clone = true
patches = [
    "redox.patch"
]
[build]
template = "custom"
dependencies = [
    "curl",
    "mesa",
    "minizip-ng",
    "openssl3",
    "sdl2",
]
dev-dependencies = [
    "mesa-glu",
]
script = """
DYNAMIC_INIT
export CPPFLAGS+=" -DUSE_FILE32API=1 -DBOXEDWINE_64=1 -D_GNU_SOURCE=1 -DGLEW_OSMESA=1 -DBOXEDWINE_ES=1"
rsync -a "${COOKBOOK_SOURCE}/" ./
cd "./project/linux"
make release

mkdir -p "${COOKBOOK_STAGE}/usr/bin"
cp -v "./Build/Release/boxedwine" "${COOKBOOK_STAGE}/usr/bin/boxedwine"
"""
