From da44aa7d3a9b322b930d69afc450cda76374cf66 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sat, 28 Jun 2025 21:06:51 +0200 Subject: [PATCH] Use a recipe.toml file for sdl-player Sdl-player currently doesn't build. Neither before nor after this change. --- recipes/video/sdl-player/recipe.sh | 27 --------------------------- recipes/video/sdl-player/recipe.toml | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 27 deletions(-) delete mode 100644 recipes/video/sdl-player/recipe.sh create mode 100644 recipes/video/sdl-player/recipe.toml diff --git a/recipes/video/sdl-player/recipe.sh b/recipes/video/sdl-player/recipe.sh deleted file mode 100644 index 2d419ad6..00000000 --- a/recipes/video/sdl-player/recipe.sh +++ /dev/null @@ -1,27 +0,0 @@ -GIT=https://gitlab.redox-os.org/redox-os/sdl-player.git -BUILD_DEPENDS=(ffmpeg6 liborbital sdl1 zlib) - -function recipe_version { - echo "1.0.0" - skip=1 -} - -function recipe_build { - sysroot="$(realpath ../sysroot)" - export CPPFLAGS="-I$sysroot/include" - export LDFLAGS="-L$sysroot/lib -static" - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - mkdir -pv "$dest/bin" - cp -v "player" "$dest/bin/sdl-player" - skip=1 -} diff --git a/recipes/video/sdl-player/recipe.toml b/recipes/video/sdl-player/recipe.toml new file mode 100644 index 00000000..5f8ee857 --- /dev/null +++ b/recipes/video/sdl-player/recipe.toml @@ -0,0 +1,20 @@ +[source] +git = "https://gitlab.redox-os.org/redox-os/sdl-player.git" + +[build] +template = "custom" +dependencies = [ + "ffmpeg6", + "liborbital", + "sdl1", + "zlib" +] +script = """ +rsync -av --delete --exclude='.git' "${COOKBOOK_SOURCE}/" ./ +export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include" +export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -static" +"${COOKBOOK_MAKE}" -j"$(${NPROC})" + +mkdir -pv "${COOKBOOK_STAGE}/bin" +cp -v "player" "${COOKBOOK_STAGE}/bin/sdl-player" +"""