From 694f63120f3c1f48cf1bbbff287a12746a017165 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 13 Dec 2023 15:53:34 -0700 Subject: [PATCH] dosbox: convert to toml --- recipes/emulators/dosbox/recipe.sh | 44 ---------------------------- recipes/emulators/dosbox/recipe.toml | 32 ++++++++++++++++++++ 2 files changed, 32 insertions(+), 44 deletions(-) delete mode 100644 recipes/emulators/dosbox/recipe.sh create mode 100644 recipes/emulators/dosbox/recipe.toml diff --git a/recipes/emulators/dosbox/recipe.sh b/recipes/emulators/dosbox/recipe.sh deleted file mode 100644 index 91376e0e3..000000000 --- a/recipes/emulators/dosbox/recipe.sh +++ /dev/null @@ -1,44 +0,0 @@ -VERSION=0.74-3 -TAR=https://sourceforge.net/projects/dosbox/files/dosbox/$VERSION/dosbox-$VERSION.tar.gz/download -BUILD_DEPENDS=(sdl1 liborbital) - -function recipe_version { - echo "$VERSION" - skip=1 -} - -function recipe_build { - sysroot="$(realpath ../sysroot)" - export CFLAGS="-I$sysroot/include/SDL" - export CPPFLAGS="-I$sysroot/include/SDL" - export LDFLAGS="-L$sysroot/lib -static" - ./autogen.sh - wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false" - ./configure \ - --build=${BUILD} \ - --host=${HOST} \ - --prefix='' \ - --disable-opengl \ - --disable-sdltest \ - --with-sdl-prefix="$sysroot" - "$REDOX_MAKE" -j"$($NPROC)" - skip=1 -} - -function recipe_clean { - "$REDOX_MAKE" clean - skip=1 -} - -function recipe_stage { - dest="$(realpath $1)" - "$REDOX_MAKE" DESTDIR="$dest" install - - mkdir -pv "$1/ui/apps" - cp -v "${COOKBOOK_RECIPE}/manifest" "$1/ui/apps/dosbox" - - mkdir -pv "$1/ui/icons/apps" - cp -v "${COOKBOOK_RECIPE}/icon.png" "$1/ui/icons/apps/dosbox.png" - - skip=1 -} diff --git a/recipes/emulators/dosbox/recipe.toml b/recipes/emulators/dosbox/recipe.toml new file mode 100644 index 000000000..e3cf69f1d --- /dev/null +++ b/recipes/emulators/dosbox/recipe.toml @@ -0,0 +1,32 @@ +[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 +wget -O config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false" +""" + +[build] +dependencies = [ + "liborbital", + "sdl1", +] +template = "custom" +script = """ +export CFLAGS="-I${COOKBOOK_SYSROOT}/include/SDL" +export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include/SDL" +export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -static" +COOKBOOK_CONFIGURE_FLAGS+=( + --disable-opengl + --disable-sdltest + --with-sdl-prefix="${COOKBOOK_SYSROOT}" +) +cookbook_configure + +mkdir -pv "${COOKBOOK_STAGE}/ui/apps" +cp -v "${COOKBOOK_RECIPE}/manifest" "${COOKBOOK_STAGE}/ui/apps/dosbox" + +mkdir -pv "${COOKBOOK_STAGE}/ui/icons/apps" +cp -v "${COOKBOOK_RECIPE}/icon.png" "${COOKBOOK_STAGE}/ui/icons/apps/dosbox.png" +"""