From 56a897e40dce5e3a9b8b12aa7d041facf3ddfef0 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sat, 28 Jun 2025 21:59:04 +0200 Subject: [PATCH] Use a recipe.toml file for ncdu This gives a linker error about multiple definitions both before and after. --- recipes/tui/ncdu/recipe.sh | 29 ----------------------------- recipes/tui/ncdu/recipe.toml | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 29 deletions(-) delete mode 100644 recipes/tui/ncdu/recipe.sh create mode 100644 recipes/tui/ncdu/recipe.toml diff --git a/recipes/tui/ncdu/recipe.sh b/recipes/tui/ncdu/recipe.sh deleted file mode 100644 index 4906dc59c..000000000 --- a/recipes/tui/ncdu/recipe.sh +++ /dev/null @@ -1,29 +0,0 @@ -VERSION=1.13 -TAR=https://dev.yorhel.nl/download/ncdu-$VERSION.tar.gz -BUILD_DEPENDS=(ncurses) -DEPENDS=(terminfo) - -function recipe_version { - echo "$VERSION" - skip=1 -} -function recipe_build { - sysroot="$PWD/../sysroot" - export CPPFLAGS="-I$sysroot/include -I$sysroot/include/ncurses" - export LDFLAGS="-L$sysroot/lib -static" - ./configure \ - --build=${BUILD} \ - --host="$HOST" \ - --prefix=/ - "$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 - skip=1 -} diff --git a/recipes/tui/ncdu/recipe.toml b/recipes/tui/ncdu/recipe.toml new file mode 100644 index 000000000..17daab77a --- /dev/null +++ b/recipes/tui/ncdu/recipe.toml @@ -0,0 +1,22 @@ +[source] +tar = "https://dev.yorhel.nl/download/ncdu-1.13.tar.gz" +blake3 = "f6d771e78c87202a051e3357820be3c63ea895ff4f07edf14c6f21fb18afceed" + +[build] +template = "custom" +dependencies = [ + "ncurses", + "terminfo" +] +script = """ +rsync -av --delete --exclude='.git' "${COOKBOOK_SOURCE}/" ./ +export CPPFLAGS="-I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/ncurses" +export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib -static" +./configure \ + --build=${BUILD} \ + --host="${TARGET}" \ + --prefix=/ +"${COOKBOOK_MAKE}" -j"$(${NPROC})" + +"${COOKBOOK_MAKE}" DESTDIR="${COOKBOOK_STAGE}" install +"""