cub: full AUR package manager + Phase 1-5 native build tools

cub redesign (local/recipes/system/cub/):
- AUR RPC v5 client (serde_json) with search/info
- ~/.cub/ user-local recipe/source/repo storage
- Enhanced PKGBUILD parser: optdepends, .SRCINFO, split packages, 19 linuxism patterns
- Recipe generation: host: prefix on dev-deps, shallow_clone, cargopath, installs, optional-packages
- Dependency resolver: scans build errors for missing commands/headers/libs/pkgconfig, maps to packages
- Dependency installation: checks installed packages, fetches AUR deps, interactive prompt
- ~110 Arc→Redox dependency mappings
- ratatui TUI: search, info, install, build, query views
- 14 Arch-style CLI switches (-S/-Si/-Syu/-G/-R/-Q/-Qi/-Ql)
- 65 tests, 0 failures, clean build

Phase 1-5 native build tools (local/recipes/dev/):
- P1 Substrate: tar, m4, diffutils (gnulib bypass), mkfifo kernel patch (1085 lines)
- P2 Build Systems: bison, flex, meson (standalone wrapper), ninja-build, libtool
- P3 Native GCC: gcc-native, binutils-native (cross-compiled for redox host)
- P4 Native LLVM: llvm-native (clang + lld from monorepo)
- P5 Native Rust: rust-native (rustc + cargo)
- Groups: build-essential-native, dev-essential expanded

Config:
- redbear-mini: +7 tools (diffutils, tar, bison, flex, meson, ninja, m4)
- redbear-full: +4 native tools (gcc, binutils, llvm, rust)
- All recipes moved to local/ with symlinks for cookbook discovery (Red Bear policy)

Docs:
- BUILD-TOOLS-PORTING-PLAN.md: phased porting roadmap
- CUB-WORKFLOW-ASSESSMENT.md: gap analysis and integration assessment
This commit is contained in:
2026-05-08 00:13:31 +01:00
parent 0a928348b9
commit 7706617e7f
46 changed files with 2909 additions and 37 deletions
@@ -0,0 +1,53 @@
# Native GNU Binutils 2.43.1 for Red Bear OS
# Produces binutils that RUN on x86_64-unknown-redox and TARGET x86_64-unknown-redox.
# Built via cross-compilation from host using the existing cross-compiler in prefix/.
[source]
same_as = "../../../../recipes/dev/binutils-gdb"
[build]
template = "custom"
dependencies = [
"gcc13",
"gnu-binutils",
"libgmp",
"libmpfr",
]
script = """
DYNAMIC_INIT
# Use the cross-compiler to produce native redox binaries
export CC="${COOKBOOK_TARGET}-gcc"
export CXX="${COOKBOOK_TARGET}-g++"
export AR="${COOKBOOK_TARGET}-ar"
export RANLIB="${COOKBOOK_TARGET}-ranlib"
# Configure for native compilation
COOKBOOK_CONFIGURE_FLAGS+=(
--host="${GNU_TARGET}"
--target="${GNU_TARGET}"
--prefix=/usr
--with-sysroot="${COOKBOOK_SYSROOT}"
--enable-default-hash-style=gnu
--disable-werror
--disable-nls
--disable-multilib
)
"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}"
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}"
"${COOKBOOK_MAKE}" install DESTDIR="${COOKBOOK_STAGE}"
# Native binutils don't need the target prefix - provide unprefixed links
for tool in ar as ld nm objcopy objdump ranlib readelf size strings strip; do
if [ -f "${COOKBOOK_STAGE}/usr/bin/${GNU_TARGET}-${tool}" ]; then
ln -sf "${GNU_TARGET}-${tool}" "${COOKBOOK_STAGE}/usr/bin/${tool}"
fi
done
# Remove libtool archives
rm -f "${COOKBOOK_STAGE}"/usr/lib/*.la
"""
[package]
description = "Native GNU Binutils 2.43.1 for Red Bear OS (runs on redox, targets redox)"