From 88050989a9830d07f183c1033d50017c11d384a2 Mon Sep 17 00:00:00 2001 From: David Campbell Date: Wed, 25 Jun 2025 10:50:24 -0400 Subject: [PATCH] Add hnefatafl-client --- .../strategy/hnefatafl-copenhagen/recipe.toml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 recipes/wip/games/strategy/hnefatafl-copenhagen/recipe.toml diff --git a/recipes/wip/games/strategy/hnefatafl-copenhagen/recipe.toml b/recipes/wip/games/strategy/hnefatafl-copenhagen/recipe.toml new file mode 100644 index 000000000..9901c75f1 --- /dev/null +++ b/recipes/wip/games/strategy/hnefatafl-copenhagen/recipe.toml @@ -0,0 +1,31 @@ +# TODO: +# 1. The CJK and runes fonts don't load. +# 2. On a button press two characters are read in instead of one. +# 3. Backspace does not work. +# 4. The command line prompt prints 'deprecated: legacy path "time:4" used by /usr/games/hnefatafl-client'. +# 5. TcpStream.shutdown(): shutdown call failed: Os { code: 38, kind: Unsupported, message: "Function not implemented" } + +[source] +git = "https://github.com/dcampbell24/hnefatafl" + +[build] +template = "custom" +script = """ +"${COOKBOOK_CARGO}" build \ + --manifest-path "${COOKBOOK_SOURCE}/${PACKAGE_PATH}/Cargo.toml" \ + --example hnefatafl-client \ + --release \ + --no-default-features + +mkdir -pv "${COOKBOOK_STAGE}/usr/bin" +cp -v \ + "target/${TARGET}/release/examples/hnefatafl-client" \ + "${COOKBOOK_STAGE}/usr/bin/hnefatafl-client" + +mkdir -pv "${COOKBOOK_STAGE}"/usr/games +mkdir -pv "${COOKBOOK_STAGE}"/ui/apps +mkdir -pv "${COOKBOOK_STAGE}"/ui/icons/apps +cp -rv "${COOKBOOK_SOURCE}"/icons/king_256x256.png "${COOKBOOK_STAGE}"/ui/icons/apps/hnefatafl-king_256x256.png +cp -rv "${COOKBOOK_SOURCE}"/packages/redox/manifest "${COOKBOOK_STAGE}"/ui/apps/hnefatafl-client +mv "${COOKBOOK_STAGE}"/usr/bin/hnefatafl-client "${COOKBOOK_STAGE}"/usr/games/hnefatafl-client +"""