From 68f568615994af468e0f4938de9c31040916515e Mon Sep 17 00:00:00 2001 From: Wildan M Date: Fri, 15 May 2026 22:36:18 +0700 Subject: [PATCH] Wholesale /usr tidyup --- recipes/core/dash/recipe.toml | 13 ++++---- recipes/demos/cairo-demo/recipe.toml | 4 +-- recipes/demos/glutin/recipe.toml | 16 ++------- recipes/demos/winit/recipe.toml | 2 ++ recipes/dev/lua54/recipe.toml | 2 +- recipes/dev/luajit/recipe.toml | 2 +- recipes/dev/patch/recipe.toml | 15 +-------- recipes/games/devilutionx/recipe.toml | 33 +++++-------------- recipes/games/freedoom/recipe.toml | 6 ++-- recipes/games/sopwith/recipe.toml | 23 ++++++------- recipes/icons/cosmic-icons/recipe.toml | 2 +- recipes/sound/freepats/recipe.toml | 8 ++--- recipes/sound/timidity/recipe.toml | 10 ++---- recipes/tests/vttest/recipe.toml | 13 +------- recipes/tools/bzip2/recipe.toml | 14 ++++---- recipes/tools/gnu-grep/recipe.toml | 10 +----- recipes/web/netsurf/manifest | 2 +- recipes/web/netsurf/recipe.toml | 4 +-- recipes/wip/bench/jasonisnthappy/recipe.toml | 9 +++-- recipes/wip/dev/other/piccolo/recipe.toml | 8 ++--- .../games/strategy/chess-engine/recipe.toml | 2 ++ recipes/wip/monitors/sysinfo/recipe.toml | 8 ++--- recipes/wip/net/other/pavao/recipe.toml | 15 +++++---- 23 files changed, 77 insertions(+), 144 deletions(-) diff --git a/recipes/core/dash/recipe.toml b/recipes/core/dash/recipe.toml index 01e135d9..c56f1ffc 100644 --- a/recipes/core/dash/recipe.toml +++ b/recipes/core/dash/recipe.toml @@ -1,20 +1,19 @@ [source] git = "https://gitlab.redox-os.org/redox-os/dash.git" branch = "redox" +script = """ +./autogen.sh +""" [build] template = "custom" script = """ DYNAMIC_INIT -rsync -av --delete "${COOKBOOK_SOURCE}/" ./ -./autogen.sh -./configure \ +${COOKBOOK_CONFIGURE} \ --host="${TARGET}" \ - --prefix="" \ - --enable-static \ + --prefix="/usr" \ cross_compiling=yes -# See https://stackoverflow.com/questions/4247068/sed-command-with-i-option-failing-on-mac-but-works-on-linux. -sed -i'' -e 's|#define HAVE_GETRLIMIT 1|/* #undef HAVE_GETRLIMIT */|g' config.h +sed -i -e 's|#define HAVE_GETRLIMIT 1|/* #undef HAVE_GETRLIMIT */|g' config.h # Skip configure COOKBOOK_CONFIGURE="true" COOKBOOK_CONFIGURE_FLAGS=() diff --git a/recipes/demos/cairo-demo/recipe.toml b/recipes/demos/cairo-demo/recipe.toml index 9dfe7eb4..6c3677c7 100644 --- a/recipes/demos/cairo-demo/recipe.toml +++ b/recipes/demos/cairo-demo/recipe.toml @@ -19,6 +19,6 @@ ${CXX} ${CPPFLAGS} ${LDFLAGS} \ -o cairo-demo \ -lorbital $("${PKG_CONFIG}" --libs cairo) -mkdir -pv "${COOKBOOK_STAGE}/bin" -cp -v "cairo-demo" "${COOKBOOK_STAGE}/bin/cairo-demo" +mkdir -pv "${COOKBOOK_STAGE}/usr/bin" +cp -v "cairo-demo" "${COOKBOOK_STAGE}/usr/bin/cairo-demo" """ diff --git a/recipes/demos/glutin/recipe.toml b/recipes/demos/glutin/recipe.toml index 2ba5786f..d3f2f4dd 100644 --- a/recipes/demos/glutin/recipe.toml +++ b/recipes/demos/glutin/recipe.toml @@ -5,24 +5,12 @@ upstream = "https://github.com/rust-windowing/glutin.git" [build] template = "custom" +cargopath = "glutin_examples" dependencies = [ "mesa", "zlib" ] script = """ DYNAMIC_INIT -EXAMPLES=( - window -) -for example in "${EXAMPLES[@]}" -do - cargo rustc \ - --target "$TARGET" \ - --release \ - --manifest-path "${COOKBOOK_SOURCE}/glutin_examples/Cargo.toml" \ - --example "${example}" \ - -- -C link-args="$LDFLAGS $("${TARGET}-pkg-config" --libs osmesa) -lz -lstdc++ -lc -lgcc" - mkdir -pv "${COOKBOOK_STAGE}/bin" - cp -v "target/${TARGET}/release/examples/${example}" "${COOKBOOK_STAGE}/bin/glutin_${example}" -done +CARGOPATH="glutin_examples" cookbook_cargo_examples window """ diff --git a/recipes/demos/winit/recipe.toml b/recipes/demos/winit/recipe.toml index 731075d3..a42b4fb1 100644 --- a/recipes/demos/winit/recipe.toml +++ b/recipes/demos/winit/recipe.toml @@ -5,5 +5,7 @@ branch = "winit-0.29" [build] template = "custom" script = """ +DYNAMIC_INIT +COOKBOOK_CARGO_FLAGS=() # remove --locked cookbook_cargo_examples cursor_grab drag_window window window_debug """ diff --git a/recipes/dev/lua54/recipe.toml b/recipes/dev/lua54/recipe.toml index 6ff71a4b..9b4f228d 100644 --- a/recipes/dev/lua54/recipe.toml +++ b/recipes/dev/lua54/recipe.toml @@ -13,5 +13,5 @@ rsync -av --delete "${COOKBOOK_SOURCE}/" ./ RANLIB="${RANLIB}" \ SYSLDFLAGS="$LDFLAGS" -"${COOKBOOK_MAKE}" install INSTALL_TOP="${COOKBOOK_STAGE}" +"${COOKBOOK_MAKE}" install INSTALL_TOP="${COOKBOOK_STAGE}/usr" """ diff --git a/recipes/dev/luajit/recipe.toml b/recipes/dev/luajit/recipe.toml index b6d86974..d9bddce2 100644 --- a/recipes/dev/luajit/recipe.toml +++ b/recipes/dev/luajit/recipe.toml @@ -16,7 +16,7 @@ case "${OS}" in esac ${COOKBOOK_MAKE} -j ${COOKBOOK_MAKE_JOBS} install \ - PREFIX="${COOKBOOK_STAGE}" \ + PREFIX="${COOKBOOK_STAGE}/usr" \ TARGET_SYS="${SYS}" \ CROSS="${GNU_TARGET}-" """ diff --git a/recipes/dev/patch/recipe.toml b/recipes/dev/patch/recipe.toml index 3e4cadbc..348734e5 100644 --- a/recipes/dev/patch/recipe.toml +++ b/recipes/dev/patch/recipe.toml @@ -12,17 +12,4 @@ autoreconf """ [build] -template = "custom" -script = """ -COOKBOOK_CONFIGURE="${COOKBOOK_SOURCE}/configure" -COOKBOOK_CONFIGURE_FLAGS=( - --host="${TARGET}" - --prefix="/" - --build="$(gcc -dumpmachine)" -) - -cookbook_configure - -${TARGET}-strip "${COOKBOOK_STAGE}/bin/"* -rm -rf "${COOKBOOK_STAGE}/share" "${COOKBOOK_STAGE}/lib" -""" +template = "configure" diff --git a/recipes/games/devilutionx/recipe.toml b/recipes/games/devilutionx/recipe.toml index d6ac4ff7..9c48e2ed 100644 --- a/recipes/games/devilutionx/recipe.toml +++ b/recipes/games/devilutionx/recipe.toml @@ -3,7 +3,7 @@ tar = "https://github.com/diasurgical/devilutionX/archive/refs/tags/1.5.4.tar.gz blake3 = "d4a61ff3a7c69d86a29158918aad48ab9c4866c6a22a3e8da5feadbb7d23b3ca" [build] -template = "custom" +template = "cmake" dependencies = [ "bzip2", "libiconv", @@ -11,27 +11,10 @@ dependencies = [ "sdl1", "zlib", ] -script = """ -DYNAMIC_INIT - -COOKBOOK_CONFIGURE="cmake" -COOKBOOK_CONFIGURE_FLAGS=( - -DBUILD_TESTING=OFF - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_CROSSCOMPILING=ON - -DCMAKE_CXX_COMPILER="${TARGET}-g++" - -DCMAKE_C_COMPILER="${TARGET}-gcc" - -DCMAKE_INSTALL_PREFIX="/" - -DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" - -DCMAKE_VERBOSE_MAKEFILE=ON - -DDEVILUTIONX_SYSTEM_BZIP2=ON - -DDEVILUTIONX_SYSTEM_ZLIB=ON - -DNONET=ON - -DSDL_LIBRARY="-lSDL -lorbital" - -DUSE_SDL1=ON - "${COOKBOOK_SOURCE}" -) -cookbook_configure -mkdir -v "${COOKBOOK_STAGE}/bin" -cp -v devilutionx "${COOKBOOK_STAGE}/bin" -""" +cmakeflags = [ + "-DDEVILUTIONX_SYSTEM_BZIP2=ON", + "-DDEVILUTIONX_SYSTEM_ZLIB=ON", + "-DNONET=ON", + "-DSDL_LIBRARY=-lSDL -lorbital", + "-DUSE_SDL1=ON", +] diff --git a/recipes/games/freedoom/recipe.toml b/recipes/games/freedoom/recipe.toml index af59f6f6..45d2ceeb 100644 --- a/recipes/games/freedoom/recipe.toml +++ b/recipes/games/freedoom/recipe.toml @@ -4,12 +4,12 @@ git = "https://gitlab.redox-os.org/redox-os/freedoom.git" [build] template = "custom" script = """ -mkdir -pv "${COOKBOOK_STAGE}/usr/games" "${COOKBOOK_STAGE}/share/games/doom" "${COOKBOOK_STAGE}/usr/share/ui/apps" "${COOKBOOK_STAGE}/usr/share/icons/apps" +mkdir -pv "${COOKBOOK_STAGE}/usr/games" "${COOKBOOK_STAGE}/usr/share/games/doom" "${COOKBOOK_STAGE}/usr/share/ui/apps" "${COOKBOOK_STAGE}/usr/share/icons/apps" for file in "${COOKBOOK_SOURCE}/"*.wad do game="$(basename "$file" .wad)" - wad="/share/games/doom/$game.wad" + wad="/usr/share/games/doom/$game.wad" cp -v "$file" "${COOKBOOK_STAGE}$wad" bin="/usr/games/$game" @@ -20,7 +20,7 @@ do echo "name=$game" | sed 's/freedoom/FreeDOOM: Phase /' | sed 's/doom1/DOOM (Shareware)/' > "${COOKBOOK_STAGE}/usr/share/ui/apps/$game" echo "category=Games" >> "${COOKBOOK_STAGE}/usr/share/ui/apps/$game" echo "binary=/usr/games/$game" >> "${COOKBOOK_STAGE}/usr/share/ui/apps/$game" - echo "icon=/ui/icons/apps/$game.png" >> "${COOKBOOK_STAGE}/usr/share/ui/apps/$game" + echo "icon=/usr/share/ui/icons/apps/$game.png" >> "${COOKBOOK_STAGE}/usr/share/ui/apps/$game" cp -v "${COOKBOOK_SOURCE}/$game.png" "${COOKBOOK_STAGE}/usr/share/icons/apps/$game.png" done diff --git a/recipes/games/sopwith/recipe.toml b/recipes/games/sopwith/recipe.toml index 219c5c33..b680fa4e 100644 --- a/recipes/games/sopwith/recipe.toml +++ b/recipes/games/sopwith/recipe.toml @@ -1,6 +1,9 @@ [source] -tar = "https://github.com/fragglet/sdl-sopwith/releases/download/sdl-sopwith-1.8.4/sopwith-1.8.4.tar.gz" +tar = "https://github.com/fragglet/sdl-sopwith/releases/download/sdl-sopwith-2.9.0/sdl-sopwith-2.9.0.tar.gz" blake3 = "44e1404a9c4bea257d7778d2a4b1512231603a74b0a7b18eac5d18f36730ed3e" +script = """ +./autogen.sh +""" [build] template = "custom" @@ -10,22 +13,16 @@ dependencies = [ "libiconv", ] script = """ +DYNAMIC_INIT export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include/SDL" export LIBS="-lSDL -lorbital" # TODO: Uses sdl-config instead of pkg-config # For some reason, cook_configure breaks spectacularly on this # We will just copy instead rsync -av --delete "${COOKBOOK_SOURCE}/" ./ - -wget -O autotools/config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false" - -./configure \\ - --build="$(gcc -dumpmachine)" \\ - --host="${TARGET}" \\ - --prefix="" \\ +COOKBOOK_CONFIGURE="./configure" +COOKBOOK_CONFIGURE_FLAGS+=( --with-sdl-prefix="${COOKBOOK_SYSROOT}" - -make -j"$(nproc)" - -make DESTDIR="${COOKBOOK_STAGE}" install -""" \ No newline at end of file +) +cookbook_configure +""" diff --git a/recipes/icons/cosmic-icons/recipe.toml b/recipes/icons/cosmic-icons/recipe.toml index ed0a464b..e76f858e 100644 --- a/recipes/icons/cosmic-icons/recipe.toml +++ b/recipes/icons/cosmic-icons/recipe.toml @@ -6,5 +6,5 @@ shallow_clone = true template = "custom" script = """ cd "${COOKBOOK_SOURCE}" -just rootdir="${COOKBOOK_STAGE}" prefix="" install +just rootdir="${COOKBOOK_STAGE}" prefix="/usr" install """ diff --git a/recipes/sound/freepats/recipe.toml b/recipes/sound/freepats/recipe.toml index 67bc257f..b7c4ce23 100644 --- a/recipes/sound/freepats/recipe.toml +++ b/recipes/sound/freepats/recipe.toml @@ -4,9 +4,9 @@ git = "https://gitlab.redox-os.org/redox-os/freepats.git" [build] template = "custom" script = """ -mkdir -pv "${COOKBOOK_STAGE}/share/freepats" -cp -Rv "${COOKBOOK_SOURCE}/"* "${COOKBOOK_STAGE}/share/freepats" +mkdir -pv "${COOKBOOK_STAGE}/usr/share/freepats" +cp -Rv "${COOKBOOK_SOURCE}/"* "${COOKBOOK_STAGE}/usr/share/freepats" mkdir -pv "${COOKBOOK_STAGE}/etc/timidity" -echo "dir /share/freepats" > "${COOKBOOK_STAGE}/etc/timidity/freepats.cfg" -echo "source /share/freepats/freepats.cfg" >> "${COOKBOOK_STAGE}/etc/timidity/freepats.cfg" +echo "dir /usr/share/freepats" > "${COOKBOOK_STAGE}/etc/timidity/freepats.cfg" +echo "source /usr/share/freepats/freepats.cfg" >> "${COOKBOOK_STAGE}/etc/timidity/freepats.cfg" """ diff --git a/recipes/sound/timidity/recipe.toml b/recipes/sound/timidity/recipe.toml index 98c25496..f8e34f22 100644 --- a/recipes/sound/timidity/recipe.toml +++ b/recipes/sound/timidity/recipe.toml @@ -3,22 +3,16 @@ git = "https://gitlab.redox-os.org/redox-os/timidity.git" branch = "redox" script = """ autoreconf -f -i - wget -O autoconf/config.sub "https://gitlab.redox-os.org/redox-os/gnu-config/-/raw/master/config.sub?inline=false" """ [build] template = "custom" script = """ -export LDFLAGS="-static" - -COOKBOOK_CONFIGURE_FLAGS=( - --build="$(gcc -dumpmachine)" - --host="${TARGET}" - --prefix="" +DYNAMIC_INIT +COOKBOOK_CONFIGURE_FLAGS+=( --enable-vt100 ) - cookbook_configure # Create configuration files diff --git a/recipes/tests/vttest/recipe.toml b/recipes/tests/vttest/recipe.toml index 020c4192..fbad6da3 100644 --- a/recipes/tests/vttest/recipe.toml +++ b/recipes/tests/vttest/recipe.toml @@ -7,15 +7,4 @@ GNU_CONFIG_GET config.sub """ [build] -template = "custom" -script = """ -export LDFLAGS="-static" - -COOKBOOK_CONFIGURE_FLAGS=( - --build="$(gcc -dumpmachine)" - --host="${TARGET}" - --prefix="" -) - -cookbook_configure -""" \ No newline at end of file +template = "configure" diff --git a/recipes/tools/bzip2/recipe.toml b/recipes/tools/bzip2/recipe.toml index a2f19107..f5e17f32 100644 --- a/recipes/tools/bzip2/recipe.toml +++ b/recipes/tools/bzip2/recipe.toml @@ -14,7 +14,7 @@ rsync -av --delete "${COOKBOOK_SOURCE}/" ./ AR="${AR}" \ CC="${CC}" \ RANLIB="${RANLIB}" \ - PREFIX="${COOKBOOK_STAGE}" \ + PREFIX="${COOKBOOK_STAGE}/usr" \ install # However, distros distribute libbz2 as well so we'll support it too @@ -27,12 +27,12 @@ rsync -av --delete "${COOKBOOK_SOURCE}/" ./ AR="${AR}" \ CC="${CC}" \ RANLIB="${RANLIB}" \ - PREFIX="${COOKBOOK_STAGE}" + PREFIX="${COOKBOOK_STAGE}/usr" -cp -av libbz2.so* "${COOKBOOK_STAGE}/lib" -ln -sr "${COOKBOOK_STAGE}/lib/libbz2.so.1.0" "${COOKBOOK_STAGE}/lib/libbz2.so.1" -ln -sr "${COOKBOOK_STAGE}/lib/libbz2.so.1.0" "${COOKBOOK_STAGE}/lib/libbz2.so" +cp -av libbz2.so* "${COOKBOOK_STAGE}/usr/lib" +ln -s "libbz2.so.1.0" "${COOKBOOK_STAGE}/usr/lib/libbz2.so.1" +ln -s "libbz2.so.1.0" "${COOKBOOK_STAGE}/usr/lib/libbz2.so" -mkdir -p "${COOKBOOK_STAGE}/lib/pkgconfig" -cp "${COOKBOOK_RECIPE}/pkgconfig" "${COOKBOOK_STAGE}/lib/pkgconfig/bzip2.pc" +mkdir -p "${COOKBOOK_STAGE}/usr/lib/pkgconfig" +cp "${COOKBOOK_RECIPE}/pkgconfig" "${COOKBOOK_STAGE}/usr/lib/pkgconfig/bzip2.pc" """ diff --git a/recipes/tools/gnu-grep/recipe.toml b/recipes/tools/gnu-grep/recipe.toml index b3ad6e40..1a8dd92d 100644 --- a/recipes/tools/gnu-grep/recipe.toml +++ b/recipes/tools/gnu-grep/recipe.toml @@ -4,12 +4,4 @@ blake3 = "46b6e24dfa1b0f309f4eae3c450d612396c8faa6510b53a55f629e4f4c70b4a3" patches = ["grep.patch"] [build] -template = "custom" -script = """ -DYNAMIC_INIT -COOKBOOK_CONFIGURE_FLAGS+=( - --prefix=/ -) -cookbook_configure -rm -rf "${COOKBOOK_STAGE}"/{lib,share} -""" +template = "configure" diff --git a/recipes/web/netsurf/manifest b/recipes/web/netsurf/manifest index b1edac6a..a9ae2570 100644 --- a/recipes/web/netsurf/manifest +++ b/recipes/web/netsurf/manifest @@ -1,6 +1,6 @@ name=Netsurf binary=/usr/bin/netsurf-fb -icon=/ui/icons/apps/internet-web-browser.png +icon=/usr/share/ui/icons/apps/internet-web-browser.png accept=*.html author=The Netsurf Developers description=Browser for Redox diff --git a/recipes/web/netsurf/recipe.toml b/recipes/web/netsurf/recipe.toml index 595f6132..e87b9403 100644 --- a/recipes/web/netsurf/recipe.toml +++ b/recipes/web/netsurf/recipe.toml @@ -42,8 +42,8 @@ export CC="${CC} ${CPPFLAGS}" "$COOKBOOK_MAKE" PREFIX=/usr V=1 -j"$COOKBOOK_MAKE_JOBS" "$COOKBOOK_MAKE" DESTDIR="$COOKBOOK_STAGE" PREFIX=/usr install -j"$COOKBOOK_MAKE_JOBS" -mkdir -pv "$COOKBOOK_STAGE/ui/apps" -cp -v "${COOKBOOK_RECIPE}/manifest" "$COOKBOOK_STAGE/ui/apps/00_netsurf" +mkdir -pv "$COOKBOOK_STAGE/usr/share/ui/apps" +cp -v "${COOKBOOK_RECIPE}/manifest" "$COOKBOOK_STAGE/usr/share/ui/apps/00_netsurf" """ [package] diff --git a/recipes/wip/bench/jasonisnthappy/recipe.toml b/recipes/wip/bench/jasonisnthappy/recipe.toml index 0015dc9c..1c1d91b1 100644 --- a/recipes/wip/bench/jasonisnthappy/recipe.toml +++ b/recipes/wip/bench/jasonisnthappy/recipe.toml @@ -3,8 +3,7 @@ git = "https://github.com/sohzm/jasonisnthappy" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples bench_all -""" +template = "cargo" +cargoexamples = [ + "bench_all" +] diff --git a/recipes/wip/dev/other/piccolo/recipe.toml b/recipes/wip/dev/other/piccolo/recipe.toml index af85d93c..fe2f4a28 100644 --- a/recipes/wip/dev/other/piccolo/recipe.toml +++ b/recipes/wip/dev/other/piccolo/recipe.toml @@ -2,7 +2,7 @@ [source] git = "https://github.com/kyren/piccolo" [build] -template = "custom" -script = """ -cookbook_cargo_examples interpreter -""" +template = "cargo" +cargoexamples = [ + "interpreter" +] diff --git a/recipes/wip/games/strategy/chess-engine/recipe.toml b/recipes/wip/games/strategy/chess-engine/recipe.toml index 1724e767..bc9169bf 100644 --- a/recipes/wip/games/strategy/chess-engine/recipe.toml +++ b/recipes/wip/games/strategy/chess-engine/recipe.toml @@ -4,6 +4,8 @@ git = "https://github.com/adam-mcdaniel/chess-engine" [build] template = "custom" script = """ +DYNAMIC_INIT +COOKBOOK_CARGO_FLAGS=() # remove --locked cookbook_cargo_packages chess-gui cookbook_cargo_examples terminal """ diff --git a/recipes/wip/monitors/sysinfo/recipe.toml b/recipes/wip/monitors/sysinfo/recipe.toml index 6a5e9bd8..360880f4 100644 --- a/recipes/wip/monitors/sysinfo/recipe.toml +++ b/recipes/wip/monitors/sysinfo/recipe.toml @@ -2,7 +2,7 @@ git = "https://github.com/jackpot51/sysinfo" [build] -template = "custom" -script = """ -cookbook_cargo_examples simple -""" +template = "cargo" +cargoexamples = [ + "simple" +] diff --git a/recipes/wip/net/other/pavao/recipe.toml b/recipes/wip/net/other/pavao/recipe.toml index cff0579f..ffdc056f 100644 --- a/recipes/wip/net/other/pavao/recipe.toml +++ b/recipes/wip/net/other/pavao/recipe.toml @@ -1,14 +1,15 @@ #TODO: fails to link libcrypto.so [source] -git = "https://github.com/jackpot51/pavao.git" +git = "https://github.com/veeso/pavao.git" [build] -template = "custom" +template = "cargo" dependencies = [ "openssl3" ] -script = """ -DYNAMIC_INIT -build_flags="${build_flags} --features vendored" -cookbook_cargo_examples tree -""" +cargoflags = [ + "--features vendored" +] +cargoexamples = [ + "tree" +]