Skip to content

Commit 0287df5

Browse files
committed
[new package] fish 4.0b1
currently can't be compiled for mingw
1 parent bf9ab7b commit 0287df5

12 files changed

+606
-0
lines changed

mingw-w64-fish/PKGBUILD

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Maintainer: Maksim Bondarenkov <[email protected]>
2+
3+
_realname=fish
4+
pkgbase=mingw-w64-${_realname}
5+
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
6+
pkgver=4.0b1
7+
pkgrel=1
8+
pkgdesc='Smart and user friendly shell intended mostly for interactive use (mingw-w64)'
9+
arch=('x86_64')
10+
url="https://fishshell.com/"
11+
msys2_repository_url="https://github.com/fish-shell/fish-shell"
12+
msys2_references=(
13+
"cpe: cpe:/a:fishshell:fish"
14+
)
15+
license=('spdx:GPL-2.0-only')
16+
depends=("${MINGW_PACKAGE_PREFIX}-pcre2"
17+
"${MINGW_PACKAGE_PREFIX}-gettext-runtime"
18+
'man-db')
19+
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
20+
"${MINGW_PACKAGE_PREFIX}-cmake"
21+
"${MINGW_PACKAGE_PREFIX}-ninja"
22+
"${MINGW_PACKAGE_PREFIX}-rust"
23+
"${MINGW_PACKAGE_PREFIX}-gettext-tools")
24+
optdepends=("${MINGW_PACKAGE_PREFIX}-python: for manual page completion parser and web configuration tool")
25+
install=fish-${MSYSTEM}.install
26+
backup=("${MINGW_PREFIX:1}/etc/fish/config.fish"
27+
"${MINGW_PREFIX:1}/etc/fish/msys2.fish"
28+
"${MINGW_PREFIX:1}etc/fish/perlbin.fish")
29+
source=("https://github.com/fish-shell/fish-shell/releases/download/${pkgver}/${_realname}-${pkgver}.tar.xz"{,.asc}
30+
config-CLANG64.fish
31+
config-UCRT64.fish
32+
config-MINGW64.fish
33+
msys2-CLANG64.fish
34+
msys2-UCRT64.fish
35+
msys2-MINGW64.fish
36+
msystem.fish
37+
perlbin.fish)
38+
sha256sums=('534334e10f85722214e9daff82a57cc3501235523f16f8f131c2344e4ec98da7'
39+
'SKIP'
40+
'a6097b634e236d2272744a6d5e0b31685a2198807d88eb091f4829ee4913ce36'
41+
'925f9a45b9887f4bb74a5589cf1ab099dec376dd30b07e830042554befac9bdb'
42+
'63b7634cda9048834cdbbd57bc842b7e6a49cb8541a578cafc2797a4a42ae8f8'
43+
'921c8725fcc53157752d3c100da8b6585a68d5fee5d476d6867310984937fb36'
44+
'1fdab0aba85dede9b29644957923d40314799b5d6541a25f7ba68ae9834ee267'
45+
'30ec15d5fe54078e275d9b7f1e62ea4240f3bc069881fdcfe95eb9442f2121f0'
46+
'b1a7b7b4238170373dd8acdc36bcbd1fc3978b3525403b877576139d6090e30d'
47+
'b136a9fa94abf53e302f7a1cc28def03b58dd2326990c5f02ceb4988341a5ac6')
48+
validpgpkeys=('003837986104878835FA516D7A67D962D88A709A') # David Adam <[email protected]>
49+
50+
build() {
51+
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=;-DCMAKE_INSTALL_SYSCONFDIR="
52+
cmake \
53+
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
54+
-DCMAKE_INSTALL_SYSCONFDIR=${MINGW_PREFIX}/etc \
55+
-DCMAKE_BUILD_TYPE=None \
56+
-S ${_realname}-${pkgver} \
57+
-B build-${MSYSTEM}
58+
59+
cmake --build build-${MSYSTEM}
60+
}
61+
62+
package() {
63+
rm -rf "${_realname}-${pkgver}/build-${MSYSTEM}/user_doc"
64+
cmake --install build-${MSYSTEM}
65+
66+
install -Dm644 config-${MSYSTEM}.fish "${pkgdir}${MINGW_PREFIX}/etc/fish/config.fish"
67+
install -Dm644 msys2-${MSYSTEM}.fish "${pkgdir}${MINGW_PREFIX}/etc/fish/msys2.fish"
68+
install -Dm644 msystem.fish "${pkgdir}${MINGW_PREFIX}/etc/fish/msystem.fish"
69+
install -Dm644 perlbin.fish "${pkgdir}${MINGW_PREFIX}/etc/fish/perlbin.fish"
70+
}

mingw-w64-fish/config-CLANG64.fish

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Put system-wide fish configuration entries here
2+
# or in .fish files in conf.d/
3+
# Files in conf.d can be overridden by the user
4+
# by files with the same name in $XDG_CONFIG_HOME/fish/conf.d
5+
6+
# This file is run by all fish instances.
7+
# To include configuration only for login shells, use
8+
# if status --is-login
9+
# ...
10+
# end
11+
# To include configuration only for interactive shells, use
12+
# if status --is-interactive
13+
# ...
14+
# end
15+
16+
if status --is-login
17+
source /mingw64/etc/fish/msys2.fish
18+
end

mingw-w64-fish/config-MINGW64.fish

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Put system-wide fish configuration entries here
2+
# or in .fish files in conf.d/
3+
# Files in conf.d can be overridden by the user
4+
# by files with the same name in $XDG_CONFIG_HOME/fish/conf.d
5+
6+
# This file is run by all fish instances.
7+
# To include configuration only for login shells, use
8+
# if status --is-login
9+
# ...
10+
# end
11+
# To include configuration only for interactive shells, use
12+
# if status --is-interactive
13+
# ...
14+
# end
15+
16+
if status --is-login
17+
source /clang64/etc/fish/msys2.fish
18+
end

mingw-w64-fish/config-UCRT64.fish

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Put system-wide fish configuration entries here
2+
# or in .fish files in conf.d/
3+
# Files in conf.d can be overridden by the user
4+
# by files with the same name in $XDG_CONFIG_HOME/fish/conf.d
5+
6+
# This file is run by all fish instances.
7+
# To include configuration only for login shells, use
8+
# if status --is-login
9+
# ...
10+
# end
11+
# To include configuration only for interactive shells, use
12+
# if status --is-interactive
13+
# ...
14+
# end
15+
16+
if status --is-login
17+
source /ucrt64/etc/fish/msys2.fish
18+
end

mingw-w64-fish/fish-CLANG64.install

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
post_install() {
2+
grep -q '/clang64/bin/fish' etc/shells || echo '/clang64/bin/fish' >> etc/shells
3+
}
4+
5+
post_upgrade() {
6+
post_install
7+
}
8+
9+
pre_remove() {
10+
sed -i '/^\/clang64\/bin\/fish/d' etc/shells
11+
}

mingw-w64-fish/fish-MINGW64.install

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
post_install() {
2+
grep -q '/mingw64/bin/fish' etc/shells || echo '/mingw64/bin/fish' >> etc/shells
3+
}
4+
5+
post_upgrade() {
6+
post_install
7+
}
8+
9+
pre_remove() {
10+
sed -i '/^\/mingw64\/bin\/fish/d' etc/shells
11+
}

mingw-w64-fish/fish-UCRT64.install

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
post_install() {
2+
grep -q '/ucrt64/bin/fish' etc/shells || echo '/ucrt64/bin/fish' >> etc/shells
3+
}
4+
5+
post_upgrade() {
6+
post_install
7+
}
8+
9+
pre_remove() {
10+
sed -i '/^\/ucrt64\/bin\/fish/d' etc/shells
11+
}

mingw-w64-fish/msys2-CLANG64.fish

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# To the extent possible under law, the author(s) have dedicated all
2+
# copyright and related and neighboring rights to this software to the
3+
# public domain worldwide. This software is distributed without any warranty.
4+
# You should have received a copy of the CC0 Public Domain Dedication along
5+
# with this software.
6+
# If not, see <https://creativecommons.org/publicdomain/zero/1.0/>.
7+
8+
9+
# System-wide profile file
10+
11+
# Setup some default paths. Note that this order will allow user installed
12+
# software to override 'system' software.
13+
# Modifying these default path settings can be done in different ways.
14+
# To learn more about startup files, refer to your shell's man page.
15+
16+
set MSYS2_PATH /usr/local/bin /usr/bin /bin
17+
set -x MANPATH /usr/local/man /usr/share/man /usr/man /share/man
18+
set -x INFOPATH /usr/local/info /usr/share/info /usr/info /share/info
19+
20+
if not set -q MSYS2_PATH_TYPE
21+
set MSYS2_PATH_TYPE minimal
22+
end
23+
24+
switch $MSYS2_PATH_TYPE
25+
case strict
26+
# Do not inherit any path configuration, and allow for full customization
27+
# of external path. This is supposed to be used in special cases such as
28+
# debugging without need to change this file, but not daily usage.
29+
set -ex ORIGINAL_PATH
30+
case inherit
31+
# Inherit previous path. Note that this will make all of the Windows path
32+
# available in current shell, with possible interference in project builds.
33+
if not set -q ORIGINAL_PATH
34+
set -x ORIGINAL_PATH $PATH
35+
end
36+
case '*'
37+
# Do not inherit any path configuration but configure a default Windows path
38+
# suitable for normal usage with minimal external interference.
39+
set -l PATH $MSYS2_PATH 2>/dev/null
40+
set WIN_ROOT (cygpath -Wu)
41+
set -x ORIGINAL_PATH $WIN_ROOT/System32 $WIN_ROOT $WIN_ROOT/System32/Wbem $WIN_ROOT/System32/WindowsPowerShell/v1.0/
42+
end
43+
44+
set -e MINGW_MOUNT_POINT
45+
source '/clang64/etc/fish/msystem.fish'
46+
switch $MSYSTEM
47+
case MINGW32
48+
set MINGW_MOUNT_POINT $MINGW_PREFIX
49+
set -x PATH $MINGW_MOUNT_POINT/bin $MSYS2_PATH $ORIGINAL_PATH 2>/dev/null
50+
set -x PKG_CONFIG_PATH "$MINGW_MOUNT_POINT/lib/pkgconfig:$MINGW_MOUNT_POINT/share/pkgconfig"
51+
set ACLOCAL_PATH "$MINGW_MOUNT_POINT/share/aclocal:/usr/share/aclocal"
52+
set -x MANPATH $MINGW_MOUNT_POINT/local/man $MINGW_MOUNT_POINT/share/man $MANPATH
53+
case MINGW64
54+
set MINGW_MOUNT_POINT $MINGW_PREFIX
55+
set -x PATH $MINGW_MOUNT_POINT/bin $MSYS2_PATH $ORIGINAL_PATH 2>/dev/null
56+
set -x PKG_CONFIG_PATH "$MINGW_MOUNT_POINT/lib/pkgconfig:$MINGW_MOUNT_POINT/share/pkgconfig"
57+
set ACLOCAL_PATH "$MINGW_MOUNT_POINT/share/aclocal:/usr/share/aclocal"
58+
set -x MANPATH $MINGW_MOUNT_POINT/local/man $MINGW_MOUNT_POINT/share/man $MANPATH
59+
case CLANG64
60+
set MINGW_MOUNT_POINT $MINGW_PREFIX
61+
set -x PATH $MINGW_MOUNT_POINT/bin $MSYS2_PATH $ORIGINAL_PATH 2>/dev/null
62+
set -x PKG_CONFIG_PATH "$MINGW_MOUNT_POINT/lib/pkgconfig:$MINGW_MOUNT_POINT/share/pkgconfig"
63+
set ACLOCAL_PATH "$MINGW_MOUNT_POINT/share/aclocal:/usr/share/aclocal"
64+
set -x MANPATH $MINGW_MOUNT_POINT/local/man $MINGW_MOUNT_POINT/share/man $MANPATH
65+
case CLANGARM64
66+
set MINGW_MOUNT_POINT $MINGW_PREFIX
67+
set -x PATH $MINGW_MOUNT_POINT/bin $MSYS2_PATH $ORIGINAL_PATH 2>/dev/null
68+
set -x PKG_CONFIG_PATH "$MINGW_MOUNT_POINT/lib/pkgconfig:$MINGW_MOUNT_POINT/share/pkgconfig"
69+
set ACLOCAL_PATH "$MINGW_MOUNT_POINT/share/aclocal:/usr/share/aclocal"
70+
set -x MANPATH $MINGW_MOUNT_POINT/local/man $MINGW_MOUNT_POINT/share/man $MANPATH
71+
case UCRT64
72+
set MINGW_MOUNT_POINT $MINGW_PREFIX
73+
set -x PATH $MINGW_MOUNT_POINT/bin $MSYS2_PATH $ORIGINAL_PATH 2>/dev/null
74+
set -x PKG_CONFIG_PATH "$MINGW_MOUNT_POINT/lib/pkgconfig:$MINGW_MOUNT_POINT/share/pkgconfig"
75+
set ACLOCAL_PATH "$MINGW_MOUNT_POINT/share/aclocal:/usr/share/aclocal"
76+
set -x MANPATH $MINGW_MOUNT_POINT/local/man $MINGW_MOUNT_POINT/share/man $MANPATH
77+
case '*'
78+
set -x PATH $MSYS2_PATH /opt/bin $ORIGINAL_PATH 2>/dev/null
79+
set -x PKG_CONFIG_PATH "/usr/lib/pkgconfig:/usr/share/pkgconfig:/lib/pkgconfig"
80+
end
81+
82+
# TMP and TEMP as defined in the Windows environment must be kept
83+
# for windows apps, even if started from msys2. However, leaving
84+
# them set to the default Windows temporary directory or unset
85+
# can have unexpected consequences for msys2 apps, so we define
86+
# our own to match GNU/Linux behaviour.
87+
#
88+
# Note: this uppercase/lowercase workaround does not seem to work.
89+
# In fact, it has been removed from Cygwin some years ago. See:
90+
#
91+
# * https://cygwin.com/git/gitweb.cgi?p=cygwin-apps/base-files.git;a=commitdiff;h=3e54b07
92+
# * https://cygwin.com/git/gitweb.cgi?p=cygwin-apps/base-files.git;a=commitdiff;h=7f09aef
93+
#
94+
if not set -q ORIGINAL_TMP
95+
set ORIGINAL_TMP $TMP
96+
end
97+
if not set -q ORIGINAL_TEMP
98+
set ORIGINAL_TEMP $TEMP
99+
end
100+
set -e TMP
101+
set -e TEMP
102+
set -x tmp (cygpath -w "$ORIGINAL_TMP" 2> /dev/null)
103+
set -x temp (cygpath -w "$ORIGINAL_TEMP" 2> /dev/null)
104+
set -x TMP "/tmp"
105+
set -x TEMP "/tmp"
106+
107+
# Define default printer
108+
set p '/proc/registry/HKEY_CURRENT_USER/Software/Microsoft/Windows NT/CurrentVersion/Windows/Device'
109+
if test -e $p
110+
#Can't use read -d, fish too old
111+
set PRINTER (cat $p)
112+
set -x PRINTER (string split ',' $PRINTER)[1]
113+
end
114+
set -e p
115+
116+
/usr/bin/hostname | read HOSTNAME
117+
set -x HOSTNAME $HOSTNAME
118+
source /clang64/etc/fish/perlbin.fish
119+
120+
if set -q ACLOCAL_PATH
121+
set -x ACLOCAL_PATH $ACLOCAL_PATH
122+
end
123+
124+
export USER PRINTER PS1 SHELL
125+
set -e PATH_SEPARATOR

0 commit comments

Comments
 (0)