Remove WIP uutils-tar recipe (superseded by recipes/archives/uutils-tar)
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
#TODO not compiled or tested
|
||||
[source]
|
||||
git = "https://github.com/uutils/tar"
|
||||
rev = "8ecd8e0bfde251de26df450efcec2da45135af9c"
|
||||
[build]
|
||||
template = "custom"
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
# nix-0.30.1 has three Redox bugs:
|
||||
# 1. SaFlags_t is c_ulong (u64) but libc-0.2.184 defines SA_* and sa_flags
|
||||
# as c_int (i32). Fix: change SaFlags_t to c_int for Redox.
|
||||
# 2. The pty module is excluded for Redox (cfg(not(any(redox, fuchsia)))),
|
||||
# but relibc now has all POSIX PTY functions. Fix: remove Redox exclusion.
|
||||
# 3. libc-0.2.184 doesn't expose forkpty for Redox, but relibc's pty.h
|
||||
# defines it. Fix: add forkpty declaration to libc Redox module.
|
||||
for nix_src in /home/kellito/.cargo/registry/src/*/nix-0.30.1; do
|
||||
if [ -f "$nix_src/src/sys/signal.rs" ]; then
|
||||
# Fix 1: SaFlags_t type mismatch
|
||||
sed -i 's/type SaFlags_t = libc::c_ulong;/type SaFlags_t = libc::c_int;/' \
|
||||
"$nix_src/src/sys/signal.rs"
|
||||
fi
|
||||
if [ -f "$nix_src/src/lib.rs" ]; then
|
||||
# Fix 2: Enable pty module for Redox
|
||||
sed -i 's/#\\[cfg(not(any(target_os = "redox", target_os = "fuchsia")))\\]/#[cfg(not(target_os = "fuchsia"))]/' \
|
||||
"$nix_src/src/lib.rs"
|
||||
fi
|
||||
done
|
||||
|
||||
# Fix 3: Add forkpty to libc Redox module (relibc's pty.h defines it)
|
||||
for libc_src in /home/kellito/.cargo/registry/src/*/libc-0.2.184; do
|
||||
if [ -f "$libc_src/src/unix/redox/mod.rs" ] && ! grep -q 'pub fn forkpty' "$libc_src/src/unix/redox/mod.rs"; then
|
||||
sed -i '/pub fn login_tty(fd: c_int) -> c_int;/a\\
|
||||
pub fn forkpty(\\
|
||||
amaster: *mut c_int,\\
|
||||
name: *mut c_char,\\
|
||||
termp: *const termios,\\
|
||||
winp: *const crate::winsize,\\
|
||||
) -> c_int;' \
|
||||
"$libc_src/src/unix/redox/mod.rs"
|
||||
fi
|
||||
done
|
||||
|
||||
cookbook_cargo
|
||||
"""
|
||||
Reference in New Issue
Block a user