7706617e7f
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
40 lines
1.2 KiB
TOML
40 lines
1.2 KiB
TOML
[source]
|
|
same_as = "../../../../recipes/dev/rust"
|
|
|
|
[build]
|
|
template = "custom"
|
|
dependencies = [
|
|
"zlib",
|
|
"curl",
|
|
"openssl3",
|
|
"llvm-native",
|
|
"llvm-native.runtime",
|
|
]
|
|
script = """
|
|
DYNAMIC_INIT
|
|
ARCH="${TARGET%%-*}"
|
|
export CARGO_TARGET_${ARCH^^}_UNKNOWN_REDOX_RUSTFLAGS="${RUSTFLAGS}"
|
|
cat "${COOKBOOK_ROOT}/bin/${TARGET}-llvm-config" > "${COOKBOOK_SYSROOT}/bin/llvm-config"
|
|
export LD_LIBRARY_PATH="${COOKBOOK_HOST_SYSROOT}/lib:${LD_LIBRARY_PATH}"
|
|
|
|
cat ${COOKBOOK_RECIPE}/config.toml > config.toml
|
|
sed -i "s|COOKBOOK_SYSROOT|${COOKBOOK_SYSROOT}|g" config.toml
|
|
sed -i "s|COOKBOOK_TOOLCHAIN|${COOKBOOK_HOST_SYSROOT}|g" config.toml
|
|
sed -i "s|COOKBOOK_TARGET|${TARGET}|g" config.toml
|
|
sed -i "s|COOKBOOK_GNU_TARGET|${GNU_TARGET}|g" config.toml
|
|
|
|
unset AR AS CC CXX LD LDFLAGS NM OBJCOPY OBJDUMP RANLIB READELF RUSTFLAGS CARGO_ENCODED_RUSTFLAGS STRIP
|
|
|
|
python3 "${COOKBOOK_SOURCE}/x.py" install \
|
|
--config config.toml \
|
|
--jobs ${COOKBOOK_MAKE_JOBS}
|
|
|
|
mkdir -p "${COOKBOOK_STAGE}"/usr
|
|
rsync -av --delete "${COOKBOOK_BUILD}"/install/* "${COOKBOOK_STAGE}"/usr/
|
|
rm -rf "${COOKBOOK_STAGE}"/usr/lib/rustlib/*.log
|
|
"""
|
|
|
|
[package]
|
|
description = "Native Rust toolchain for Red Bear OS (rustc + cargo running on redox)"
|
|
dependencies = ["llvm-native.runtime"]
|