fish: update to 4.0.6 (#5636)

This commit is contained in:
Yuyi Wang 2025-09-14 22:57:29 +08:00 committed by GitHub
parent e69aa444c4
commit 904695d0e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 30 additions and 25 deletions

View File

@ -1,18 +0,0 @@
--- fish-3.7.1/cmake/Tests.cmake.orig 2025-03-30 10:38:59.107492700 +0200
+++ fish-3.7.1/cmake/Tests.cmake 2025-03-30 10:39:21.414080300 +0200
@@ -41,15 +41,6 @@
USES_TERMINAL
)
-# If CMP0037 is available, also make an alias "test" target.
-# Note that this policy may not be available, in which case definining such a target silently fails.
-cmake_policy(PUSH)
-if(POLICY CMP0037)
- cmake_policy(SET CMP0037 OLD)
- add_custom_target(test DEPENDS fish_run_tests)
-endif()
-cmake_policy(POP)
-
# Build the low-level tests code
add_executable(fish_tests EXCLUDE_FROM_ALL
src/fish_tests.cpp)

View File

@ -25,7 +25,7 @@ index c633905e28b5..8f87702322ec 100644
+ #[cfg(windows)]
+ use unix_path::{Path, PathBuf};
+
fn get_path(name: &str, default: &str, onvar: PathBuf) -> PathBuf {
fn get_path(name: &str, default: &str, onvar: &Path) -> PathBuf {
let mut var = PathBuf::from(env::var(name).unwrap_or(default.to_string()));
if var.is_relative() {
diff --git a/src/common.rs b/src/common.rs

View File

@ -0,0 +1,22 @@
diff --git a/src/path.rs b/src/path.rs
index 58954a5012b1..7d7339d377b9 100644
--- a/src/path.rs
+++ b/src/path.rs
@@ -667,7 +667,7 @@ fn create_dir_all_with_mode<P: AsRef<std::path::Path>>(path: P, mode: u32) -> st
/// Return whether the given path is on a remote filesystem.
pub fn path_remoteness(path: &wstr) -> DirRemoteness {
let narrow = wcs2zstring(path);
- #[cfg(target_os = "linux")]
+ #[cfg(any(target_os = "linux", target_os = "cygwin"))]
{
let mut buf = MaybeUninit::uninit();
if unsafe { libc::statfs(narrow.as_ptr(), buf.as_mut_ptr()) } < 0 {
@@ -701,7 +701,7 @@ pub fn path_remoteness(path: &wstr) -> DirRemoteness {
}
}
}
- #[cfg(not(target_os = "linux"))]
+ #[cfg(not(any(target_os = "linux", target_os = "cygwin")))]
{
fn remoteness_via_statfs<StatFS, Flags>(
statfn: unsafe extern "C" fn(*const i8, *mut StatFS) -> libc::c_int,

View File

@ -1,7 +1,7 @@
# Contributor: 王宇逸 <Strawberry_Str@hotmail.com>
pkgname=fish
pkgver=4.0.2
pkgver=4.0.6
pkgrel=1
pkgdesc='Smart and user friendly shell intended mostly for interactive use'
arch=('x86_64')
@ -16,27 +16,28 @@ makedepends=('gcc' 'gettext-devel' 'intltool' 'pcre2-devel' 'cmake' 'pkgconf' 'r
optdepends=('python: for manual page completion parser and web configuration tool')
install=fish.install
backup=('etc/fish/config.fish' 'etc/fish/msys2.fish' 'etc/fish/perlbin.fish')
source=("https://github.com/fish-shell/fish-shell/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz"{,.asc}
source=("https://github.com/fish-shell/fish-shell/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz"
0001-support-cygwin.patch
0002-patch-dep.patch
0003-fix-path-remoteness.patch
config.fish
msys2.fish
msystem.fish
perlbin.fish)
sha256sums=('6e1ecdb164285fc057b2f35acbdc20815c1623099e7bb47bbfc011120adf7e83'
'SKIP'
'8b94656c9f6118c19efa2bcb960b447863ff8b9b1f6ee957e00d6d87d8ef79f0'
sha256sums=('125d9ce0dd8a3704dc0782925df34f0208bffc42af5f34914449d14c34b5dae1'
'dfe19571d48b982f59f3a775161d92c3a5b17492a7de73adb874afc3c059da8f'
'b2739eee8f030f468eaf435982ac50056738f5a7bfefe5288cd13430f57498bc'
'8eb5ef48a26c279244c0dba5ac2a790f1b3df86dcc476dba47938918c3b87790'
'983c3273e0249957ed6c40785e005739da30f31d4f029383f257f9990d38811a'
'8bb0d28df47b66e6785f7db00a2c4316bc15960e67bdec0daca7f811f5bf3895'
'71c6990b39caf5d50c10f10074283adfc6a36aafff30fd54f7eb451d4e007496'
'b136a9fa94abf53e302f7a1cc28def03b58dd2326990c5f02ceb4988341a5ac6')
validpgpkeys=('003837986104878835FA516D7A67D962D88A709A') # David Adam <zanchey@gmail.com>
prepare() {
cd "${pkgname}-${pkgver}"
patch -Np1 -i ../0001-support-cygwin.patch
patch -Np1 -i ../0002-patch-dep.patch
patch -Np1 -i ../0003-fix-path-remoteness.patch
cargo add unix-path@1.0.1
cargo update -p errno@0.3.9 --precise 0.3.11