From e8e8dea09741d2fcc768a02f0774fc422ee13dd1 Mon Sep 17 00:00:00 2001 From: Josh Megnauth Date: Tue, 25 Feb 2025 23:25:02 -0500 Subject: [PATCH] Dynamically linked Duke Nukem --- recipes/games/eduke32/recipe.toml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/recipes/games/eduke32/recipe.toml b/recipes/games/eduke32/recipe.toml index b0532d44b..29616fba0 100644 --- a/recipes/games/eduke32/recipe.toml +++ b/recipes/games/eduke32/recipe.toml @@ -5,22 +5,28 @@ patches = ["redox.patch"] [build] dependencies = [ - "sdl1", - "sdl1-mixer", - "liborbital", - "libiconv", - "libogg", - "libvorbis", + "sdl1", + "sdl1-mixer", + "liborbital", + "libiconv", + "libogg", + "libvorbis", ] template = "custom" script = """ +DYNAMIC_INIT + # Copy source to build directory rsync -av --delete "${COOKBOOK_SOURCE}/" ./ export CFLAGS="-I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL" -export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -static" export SDLCONFIG="${COOKBOOK_SYSROOT}/bin/sdl-config --prefix=${COOKBOOK_SYSROOT}" +export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib" +if [[ -n "${COOKBOOK_PREFER_STATIC}" ]]; then + LDFLAGS+=" -static" +fi + PLATFORM=REDOX "${COOKBOOK_MAKE}" -j"$($NPROC)" mkdir -pv "${COOKBOOK_STAGE}/usr/games"