locustdb: update rustyline dependency instead of patching it and nix

rusyline 4.0.0 seem to work (latest version, 9.1.2, fails due to other
dependencies (rustix and clip and perhaps others).
This commit is contained in:
Henrik Grimler 2022-02-18 19:14:04 +01:00
parent 5b8063664f
commit 19ba339200
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
6 changed files with 11 additions and 96 deletions

View File

@ -0,0 +1,11 @@
--- ../Cargo.toml.orig 2022-02-18 18:05:37.225538565 +0000
+++ ./Cargo.toml 2022-02-18 18:05:47.435482830 +0000
@@ -33,7 +33,7 @@
rand = "0.5.5"
regex = "1"
rust-crypto = "0.2.36"
-rustyline = "1.0.0"
+rustyline = "4.0.0"
scoped_threadpool = "0.1.9"
seahash = "3.0.5"
std-semaphore = "0.1.0"

View File

@ -21,18 +21,6 @@ TERMUX_PKG_BLACKLISTED_ARCHES="arm, i686"
termux_step_make() {
termux_setup_rust
: "${CARGO_HOME:=$HOME/.cargo}"
export CARGO_HOME
cargo fetch --target $CARGO_TARGET_NAME
for p in errno sched termios; do
patch --silent -p1 \
-d $CARGO_HOME/registry/src/github.com-*/nix-0.5.1 \
< $TERMUX_PKG_BUILDER_DIR/nix-0.5.1-${p}.diff
done
patch --silent -p1 \
-d $CARGO_HOME/registry/src/github.com-*/rustyline-1.0.0 \
< $TERMUX_PKG_BUILDER_DIR/rustyline-1.0.0-ioctl.diff
cargo build --jobs $TERMUX_MAKE_PROCESSES --target $CARGO_TARGET_NAME --release
}

View File

@ -1,18 +0,0 @@
--- a/src/errno.rs
+++ b/src/errno.rs
@@ -29,13 +29,13 @@
__dfly_error()
}
-#[cfg(any(target_os = "openbsd", target_os = "netbsd"))]
+#[cfg(any(target_os = "openbsd", target_os = "netbsd", target_os = "android"))]
unsafe fn errno_location() -> *mut c_int {
extern { fn __errno() -> *mut c_int; }
__errno()
}
-#[cfg(any(target_os = "linux", target_os = "android"))]
+#[cfg(target_os = "linux")]
unsafe fn errno_location() -> *mut c_int {
extern { fn __errno_location() -> *mut c_int; }
__errno_location()

View File

@ -1,20 +0,0 @@
--- a/src/sched.rs
+++ b/src/sched.rs
@@ -36,7 +36,7 @@
}
// Support a maximum CPU set of 1024 nodes
-#[cfg(all(target_arch = "x86_64", target_os = "linux"))]
+#[cfg(all(target_arch = "x86_64", any(target_os = "linux", target_os = "android")))]
mod cpuset_attribs {
use super::CpuMask;
pub const CPU_SETSIZE: usize = 1024;
@@ -53,7 +53,7 @@
}
}
-#[cfg(all(target_arch = "x86", target_os = "linux"))]
+#[cfg(all(target_arch = "x86", any(target_os = "linux", target_os = "android")))]
mod cpuset_attribs {
use super::CpuMask;
pub const CPU_SETSIZE: usize = 1024;

View File

@ -1,31 +0,0 @@
--- a/src/sys/termios.rs
+++ b/src/sys/termios.rs
@@ -11,7 +11,7 @@
mod ffi {
pub use self::consts::*;
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd", target_os = "linux"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd", target_os = "linux", target_os = "android"))]
mod non_android {
use super::consts::*;
use libc::c_int;
@@ -35,9 +35,10 @@
}
}
- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd", target_os = "linux"))]
+ #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd", target_os = "linux", target_os = "android"))]
pub use self::non_android::*;
+ /*
// On Android before 5.0, Bionic directly inline these to ioctl() calls.
#[inline]
#[cfg(all(target_os = "android", not(target_arch = "mips")))]
@@ -92,6 +93,7 @@
#[cfg(target_os = "android")]
pub use self::android::*;
+ */
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))]

View File

@ -1,15 +0,0 @@
--- a/src/tty/unix.rs
+++ b/src/tty/unix.rs
@@ -23,10 +23,10 @@
#[cfg(any(target_os = "macos", target_os = "freebsd"))]
const TIOCGWINSZ: libc::c_ulong = 0x40087468;
-#[cfg(any(all(target_os = "linux", target_env = "gnu"), target_os = "android"))]
+#[cfg(all(target_os = "linux", target_env = "gnu"))]
const TIOCGWINSZ: libc::c_ulong = 0x5413;
-#[cfg(all(target_os = "linux", target_env = "musl"))]
+#[cfg(any(all(target_os = "linux", target_env = "musl"), target_os = "android"))]
const TIOCGWINSZ: libc::c_int = 0x5413;
/// Try to get the number of columns in the current terminal,