Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[new package] fish 4.0b1 #22837

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions mingw-w64-fish/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Maintainer: Maksim Bondarenkov <[email protected]>

_realname=fish
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=4.0b1
pkgrel=1
pkgdesc='Smart and user friendly shell intended mostly for interactive use (mingw-w64)'
arch=('x86_64')
url="https://fishshell.com/"
msys2_repository_url="https://github.com/fish-shell/fish-shell"
msys2_references=(
"cpe: cpe:/a:fishshell:fish"
)
license=('spdx:GPL-2.0-only')
depends=("${MINGW_PACKAGE_PREFIX}-pcre2"
"${MINGW_PACKAGE_PREFIX}-gettext-runtime"
'man-db')
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-rust"
"${MINGW_PACKAGE_PREFIX}-gettext-tools")
optdepends=("${MINGW_PACKAGE_PREFIX}-python: for manual page completion parser and web configuration tool")
install=fish-${MSYSTEM}.install
backup=("${MINGW_PREFIX:1}/etc/fish/config.fish"
"${MINGW_PREFIX:1}/etc/fish/msys2.fish"
"${MINGW_PREFIX:1}etc/fish/perlbin.fish")
source=("https://github.com/fish-shell/fish-shell/releases/download/${pkgver}/${_realname}-${pkgver}.tar.xz"{,.asc}
config-CLANG64.fish
config-UCRT64.fish
config-MINGW64.fish
msys2-CLANG64.fish
msys2-UCRT64.fish
msys2-MINGW64.fish
msystem.fish
perlbin.fish)
sha256sums=('534334e10f85722214e9daff82a57cc3501235523f16f8f131c2344e4ec98da7'
'SKIP'
'63b7634cda9048834cdbbd57bc842b7e6a49cb8541a578cafc2797a4a42ae8f8'
'925f9a45b9887f4bb74a5589cf1ab099dec376dd30b07e830042554befac9bdb'
'a6097b634e236d2272744a6d5e0b31685a2198807d88eb091f4829ee4913ce36'
'921c8725fcc53157752d3c100da8b6585a68d5fee5d476d6867310984937fb36'
'1fdab0aba85dede9b29644957923d40314799b5d6541a25f7ba68ae9834ee267'
'30ec15d5fe54078e275d9b7f1e62ea4240f3bc069881fdcfe95eb9442f2121f0'
'b1a7b7b4238170373dd8acdc36bcbd1fc3978b3525403b877576139d6090e30d'
'b136a9fa94abf53e302f7a1cc28def03b58dd2326990c5f02ceb4988341a5ac6')
validpgpkeys=('003837986104878835FA516D7A67D962D88A709A') # David Adam <[email protected]>

build() {
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=;-DCMAKE_INSTALL_SYSCONFDIR="
cmake \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DCMAKE_INSTALL_SYSCONFDIR=${MINGW_PREFIX}/etc \
-DCMAKE_BUILD_TYPE=None \
-S ${_realname}-${pkgver} \
-B build-${MSYSTEM}

cmake --build build-${MSYSTEM}
}

package() {
rm -rf "${_realname}-${pkgver}/build-${MSYSTEM}/user_doc"
cmake --install build-${MSYSTEM}

install -Dm644 config-${MSYSTEM}.fish "${pkgdir}${MINGW_PREFIX}/etc/fish/config.fish"
install -Dm644 msys2-${MSYSTEM}.fish "${pkgdir}${MINGW_PREFIX}/etc/fish/msys2.fish"
install -Dm644 msystem.fish "${pkgdir}${MINGW_PREFIX}/etc/fish/msystem.fish"
install -Dm644 perlbin.fish "${pkgdir}${MINGW_PREFIX}/etc/fish/perlbin.fish"
}
18 changes: 18 additions & 0 deletions mingw-w64-fish/config-CLANG64.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Put system-wide fish configuration entries here
# or in .fish files in conf.d/
# Files in conf.d can be overridden by the user
# by files with the same name in $XDG_CONFIG_HOME/fish/conf.d

# This file is run by all fish instances.
# To include configuration only for login shells, use
# if status --is-login
# ...
# end
# To include configuration only for interactive shells, use
# if status --is-interactive
# ...
# end

if status --is-login
source /clang64/etc/fish/msys2.fish
end
18 changes: 18 additions & 0 deletions mingw-w64-fish/config-MINGW64.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Put system-wide fish configuration entries here
# or in .fish files in conf.d/
# Files in conf.d can be overridden by the user
# by files with the same name in $XDG_CONFIG_HOME/fish/conf.d

# This file is run by all fish instances.
# To include configuration only for login shells, use
# if status --is-login
# ...
# end
# To include configuration only for interactive shells, use
# if status --is-interactive
# ...
# end

if status --is-login
source /mingw64/etc/fish/msys2.fish
end
18 changes: 18 additions & 0 deletions mingw-w64-fish/config-UCRT64.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Put system-wide fish configuration entries here
# or in .fish files in conf.d/
# Files in conf.d can be overridden by the user
# by files with the same name in $XDG_CONFIG_HOME/fish/conf.d

# This file is run by all fish instances.
# To include configuration only for login shells, use
# if status --is-login
# ...
# end
# To include configuration only for interactive shells, use
# if status --is-interactive
# ...
# end

if status --is-login
source /ucrt64/etc/fish/msys2.fish
end
11 changes: 11 additions & 0 deletions mingw-w64-fish/fish-CLANG64.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
post_install() {
grep -q '/clang64/bin/fish' etc/shells || echo '/clang64/bin/fish' >> etc/shells
}

post_upgrade() {
post_install
}

pre_remove() {
sed -i '/^\/clang64\/bin\/fish/d' etc/shells
}
11 changes: 11 additions & 0 deletions mingw-w64-fish/fish-MINGW64.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
post_install() {
grep -q '/mingw64/bin/fish' etc/shells || echo '/mingw64/bin/fish' >> etc/shells
}

post_upgrade() {
post_install
}

pre_remove() {
sed -i '/^\/mingw64\/bin\/fish/d' etc/shells
}
11 changes: 11 additions & 0 deletions mingw-w64-fish/fish-UCRT64.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
post_install() {
grep -q '/ucrt64/bin/fish' etc/shells || echo '/ucrt64/bin/fish' >> etc/shells
}

post_upgrade() {
post_install
}

pre_remove() {
sed -i '/^\/ucrt64\/bin\/fish/d' etc/shells
}
125 changes: 125 additions & 0 deletions mingw-w64-fish/msys2-CLANG64.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <https://creativecommons.org/publicdomain/zero/1.0/>.


# System-wide profile file

# Setup some default paths. Note that this order will allow user installed
# software to override 'system' software.
# Modifying these default path settings can be done in different ways.
# To learn more about startup files, refer to your shell's man page.

set MSYS2_PATH /usr/local/bin /usr/bin /bin
set -x MANPATH /usr/local/man /usr/share/man /usr/man /share/man
set -x INFOPATH /usr/local/info /usr/share/info /usr/info /share/info

if not set -q MSYS2_PATH_TYPE
set MSYS2_PATH_TYPE minimal
end

switch $MSYS2_PATH_TYPE
case strict
# Do not inherit any path configuration, and allow for full customization
# of external path. This is supposed to be used in special cases such as
# debugging without need to change this file, but not daily usage.
set -ex ORIGINAL_PATH
case inherit
# Inherit previous path. Note that this will make all of the Windows path
# available in current shell, with possible interference in project builds.
if not set -q ORIGINAL_PATH
set -x ORIGINAL_PATH $PATH
end
case '*'
# Do not inherit any path configuration but configure a default Windows path
# suitable for normal usage with minimal external interference.
set -l PATH $MSYS2_PATH 2>/dev/null
set WIN_ROOT (cygpath -Wu)
set -x ORIGINAL_PATH $WIN_ROOT/System32 $WIN_ROOT $WIN_ROOT/System32/Wbem $WIN_ROOT/System32/WindowsPowerShell/v1.0/
end

set -e MINGW_MOUNT_POINT
source '/clang64/etc/fish/msystem.fish'
switch $MSYSTEM
case MINGW32
set MINGW_MOUNT_POINT $MINGW_PREFIX
set -x PATH $MINGW_MOUNT_POINT/bin $MSYS2_PATH $ORIGINAL_PATH 2>/dev/null
set -x PKG_CONFIG_PATH "$MINGW_MOUNT_POINT/lib/pkgconfig:$MINGW_MOUNT_POINT/share/pkgconfig"
set ACLOCAL_PATH "$MINGW_MOUNT_POINT/share/aclocal:/usr/share/aclocal"
set -x MANPATH $MINGW_MOUNT_POINT/local/man $MINGW_MOUNT_POINT/share/man $MANPATH
case MINGW64
set MINGW_MOUNT_POINT $MINGW_PREFIX
set -x PATH $MINGW_MOUNT_POINT/bin $MSYS2_PATH $ORIGINAL_PATH 2>/dev/null
set -x PKG_CONFIG_PATH "$MINGW_MOUNT_POINT/lib/pkgconfig:$MINGW_MOUNT_POINT/share/pkgconfig"
set ACLOCAL_PATH "$MINGW_MOUNT_POINT/share/aclocal:/usr/share/aclocal"
set -x MANPATH $MINGW_MOUNT_POINT/local/man $MINGW_MOUNT_POINT/share/man $MANPATH
case CLANG64
set MINGW_MOUNT_POINT $MINGW_PREFIX
set -x PATH $MINGW_MOUNT_POINT/bin $MSYS2_PATH $ORIGINAL_PATH 2>/dev/null
set -x PKG_CONFIG_PATH "$MINGW_MOUNT_POINT/lib/pkgconfig:$MINGW_MOUNT_POINT/share/pkgconfig"
set ACLOCAL_PATH "$MINGW_MOUNT_POINT/share/aclocal:/usr/share/aclocal"
set -x MANPATH $MINGW_MOUNT_POINT/local/man $MINGW_MOUNT_POINT/share/man $MANPATH
case CLANGARM64
set MINGW_MOUNT_POINT $MINGW_PREFIX
set -x PATH $MINGW_MOUNT_POINT/bin $MSYS2_PATH $ORIGINAL_PATH 2>/dev/null
set -x PKG_CONFIG_PATH "$MINGW_MOUNT_POINT/lib/pkgconfig:$MINGW_MOUNT_POINT/share/pkgconfig"
set ACLOCAL_PATH "$MINGW_MOUNT_POINT/share/aclocal:/usr/share/aclocal"
set -x MANPATH $MINGW_MOUNT_POINT/local/man $MINGW_MOUNT_POINT/share/man $MANPATH
case UCRT64
set MINGW_MOUNT_POINT $MINGW_PREFIX
set -x PATH $MINGW_MOUNT_POINT/bin $MSYS2_PATH $ORIGINAL_PATH 2>/dev/null
set -x PKG_CONFIG_PATH "$MINGW_MOUNT_POINT/lib/pkgconfig:$MINGW_MOUNT_POINT/share/pkgconfig"
set ACLOCAL_PATH "$MINGW_MOUNT_POINT/share/aclocal:/usr/share/aclocal"
set -x MANPATH $MINGW_MOUNT_POINT/local/man $MINGW_MOUNT_POINT/share/man $MANPATH
case '*'
set -x PATH $MSYS2_PATH /opt/bin $ORIGINAL_PATH 2>/dev/null
set -x PKG_CONFIG_PATH "/usr/lib/pkgconfig:/usr/share/pkgconfig:/lib/pkgconfig"
end

# TMP and TEMP as defined in the Windows environment must be kept
# for windows apps, even if started from msys2. However, leaving
# them set to the default Windows temporary directory or unset
# can have unexpected consequences for msys2 apps, so we define
# our own to match GNU/Linux behaviour.
#
# Note: this uppercase/lowercase workaround does not seem to work.
# In fact, it has been removed from Cygwin some years ago. See:
#
# * https://cygwin.com/git/gitweb.cgi?p=cygwin-apps/base-files.git;a=commitdiff;h=3e54b07
# * https://cygwin.com/git/gitweb.cgi?p=cygwin-apps/base-files.git;a=commitdiff;h=7f09aef
#
if not set -q ORIGINAL_TMP
set ORIGINAL_TMP $TMP
end
if not set -q ORIGINAL_TEMP
set ORIGINAL_TEMP $TEMP
end
set -e TMP
set -e TEMP
set -x tmp (cygpath -w "$ORIGINAL_TMP" 2> /dev/null)
set -x temp (cygpath -w "$ORIGINAL_TEMP" 2> /dev/null)
set -x TMP "/tmp"
set -x TEMP "/tmp"

# Define default printer
set p '/proc/registry/HKEY_CURRENT_USER/Software/Microsoft/Windows NT/CurrentVersion/Windows/Device'
if test -e $p
#Can't use read -d, fish too old
set PRINTER (cat $p)
set -x PRINTER (string split ',' $PRINTER)[1]
end
set -e p

/usr/bin/hostname | read HOSTNAME
set -x HOSTNAME $HOSTNAME
source /clang64/etc/fish/perlbin.fish

if set -q ACLOCAL_PATH
set -x ACLOCAL_PATH $ACLOCAL_PATH
end

export USER PRINTER PS1 SHELL
set -e PATH_SEPARATOR
Loading
Loading