Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/fish/files/, app-shells/fish/
Date: Tue, 06 Jul 2021 17:10:18
Message-Id: 1625591382.2b57511643716436599d1ec2b839035d3cb6d696.gyakovlev@gentoo
1 commit: 2b57511643716436599d1ec2b839035d3cb6d696
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 30 03:18:08 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 6 17:09:42 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b575116
7
8 app-shells/fish: add 3.3.1
9
10 terminal size test fails, depending on
11 size of terminal fish is tested in.
12
13 Bug: https://bugs.gentoo.org/790596
14 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
15
16 app-shells/fish/Manifest | 1 +
17 .../fish/files/3.3.1-don-t-override-linker.patch | 48 +++++++++++
18 .../fish/files/3.3.1-sbin-path-sh-test.patch | 25 ++++++
19 app-shells/fish/fish-3.3.1.ebuild | 94 ++++++++++++++++++++++
20 4 files changed, 168 insertions(+)
21
22 diff --git a/app-shells/fish/Manifest b/app-shells/fish/Manifest
23 index 0ad814f70c2..fc67224f5d1 100644
24 --- a/app-shells/fish/Manifest
25 +++ b/app-shells/fish/Manifest
26 @@ -1,3 +1,4 @@
27 DIST fish-3.1.2.tar.gz 6816214 BLAKE2B d994cb867a1a86850db2ec36d262328cd8dc21d63edb860c26d727aac08fa257392690999e099d754287d9f12a294222815e4cc84abbb2e2a87a982bb6627b6b SHA512 b6ae2c928774a2eaccf35312d3a9446bfa3e1335182c8f2b2d6198161d0916904f4964fb20ed13a5bf850c1c819e003905d13db3bc8b1faa5b401a60b47dc563
28 DIST fish-3.2.1.tar.xz 3409808 BLAKE2B ad136c60cc98ae9fdb2e2abecb722107543184cb162a3c6b058e8ebe40a383a09c0e9b0eca762ab95725227dd6630605ad875bd4da59d38e605bc1f82fa1d517 SHA512 bf565bac93e7d163af5253b4053f9c9e760508b929624440fd8a160504a127c34013882576293c72a47ce7f285f87e0b594d61d7cebcefcc3be4e92c572926bc
29 DIST fish-3.2.2.tar.xz 3411748 BLAKE2B f8b20b6c56c54f84f347b930b71528dbd61a4f53adfd8addec05314c9d15992257cea89ce854adef2eecf3adfb07e6fa576b9d45c2e362ff360b24cf1edf3afc SHA512 e82c5a390bd94f84c60843a94dc4f30bd46539828a54d2e96f208e0d54a0aa361a8c9d4a66cdf2fa636a5fab310a96bf1c165c58440c38d123f788fff3598f4a
30 +DIST fish-3.3.1.tar.xz 3489152 BLAKE2B 61b2bf96526d957d3f9706df5a76d4d9b4ccf55a1ff2b7b66f1a0d5d126a220df9984551f5adb06dcedbfb5674b93c4f3d75ef991585980a29d4dd84f7697559 SHA512 fc50ca44fab3f2d942284d4f714150f7ccf1e49c73da36f8d4ae4a33a9b3280f98bed15848839f5d443b4274fd0ff90174bafa6a8e9a4da226dda63d7766a660
31
32 diff --git a/app-shells/fish/files/3.3.1-don-t-override-linker.patch b/app-shells/fish/files/3.3.1-don-t-override-linker.patch
33 new file mode 100644
34 index 00000000000..cb67498fd2b
35 --- /dev/null
36 +++ b/app-shells/fish/files/3.3.1-don-t-override-linker.patch
37 @@ -0,0 +1,48 @@
38 +From c9ab706be64439d1a03f978d3a47450135c87002 Mon Sep 17 00:00:00 2001
39 +From: Georgy Yakovlev <ya@×××××××.net>
40 +Date: Tue, 29 Jun 2021 09:40:44 -0700
41 +Subject: [PATCH] don't override linker
42 +
43 +---
44 + CMakeLists.txt | 18 +-----------------
45 + 1 file changed, 1 insertion(+), 17 deletions(-)
46 +
47 +diff --git a/CMakeLists.txt b/CMakeLists.txt
48 +index fda837cd3..507dc8817 100644
49 +--- a/CMakeLists.txt
50 ++++ b/CMakeLists.txt
51 +@@ -56,22 +56,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra \
52 + # Disable exception handling.
53 + add_compile_options(-fno-exceptions)
54 +
55 +-# Prefer lld or the gold linker because they don't emit useless warnings about sys_nerr and
56 +-# _sys_errlist. They're also faster (significantly so in the case of lld).
57 +-if (UNIX)
58 +- execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=lld -Wl,--version
59 +- ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
60 +- if ("${LD_VERSION}" MATCHES "LLD ")
61 +- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld")
62 +- elseif (NOT APPLE)
63 +- execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version
64 +- ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
65 +- if ("${LD_VERSION}" MATCHES "GNU gold")
66 +- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
67 +- endif()
68 +- endif()
69 +-endif()
70 +-
71 + # Hide the CMake Rules directories in Xcode projects.
72 + source_group("CMake Rules" REGULAR_EXPRESSION "^$")
73 +
74 +@@ -128,7 +112,7 @@ set(FISH_SRCS
75 + src/proc.cpp src/reader.cpp src/redirection.cpp src/sanity.cpp src/screen.cpp
76 + src/signal.cpp src/termsize.cpp src/timer.cpp src/tinyexpr.cpp
77 + src/tokenizer.cpp src/topic_monitor.cpp src/trace.cpp src/utf8.cpp src/util.cpp
78 +- src/wait_handle.cpp src/wcstringutil.cpp src/wgetopt.cpp src/wildcard.cpp
79 ++ src/wait_handle.cpp src/wcstringutil.cpp src/wgetopt.cpp src/wildcard.cpp
80 + src/wutil.cpp src/fds.cpp
81 + )
82 +
83 +--
84 +2.32.0
85 +
86
87 diff --git a/app-shells/fish/files/3.3.1-sbin-path-sh-test.patch b/app-shells/fish/files/3.3.1-sbin-path-sh-test.patch
88 new file mode 100644
89 index 00000000000..ce66e98eb12
90 --- /dev/null
91 +++ b/app-shells/fish/files/3.3.1-sbin-path-sh-test.patch
92 @@ -0,0 +1,25 @@
93 +From 1f73c8d923e41442cefd5a58498798971282c701 Mon Sep 17 00:00:00 2001
94 +From: Georgy Yakovlev <ya@×××××××.net>
95 +Date: Tue, 29 Jun 2021 09:55:14 -0700
96 +Subject: [PATCH] sbin path sh test
97 +
98 +---
99 + tests/checks/type.fish | 2 +-
100 + 1 file changed, 1 insertion(+), 1 deletion(-)
101 +
102 +diff --git a/tests/checks/type.fish b/tests/checks/type.fish
103 +index 85a2d142a..6ce3a4f68 100644
104 +--- a/tests/checks/type.fish
105 ++++ b/tests/checks/type.fish
106 +@@ -31,7 +31,7 @@ echo $status
107 + # Test that we print a command path
108 + type sh
109 + # (we resolve the path, so if /bin is a symlink to /usr/bin this shows /usr/bin/sh)
110 +-# CHECK: sh is {{.*}}/bin/sh
111 ++# CHECK: sh is {{.*}}/{{s*}}bin/sh
112 +
113 + # Test that we print a function definition.
114 + # The exact definition and description here depends on the system, so we'll ignore the actual code.
115 +--
116 +2.32.0
117 +
118
119 diff --git a/app-shells/fish/fish-3.3.1.ebuild b/app-shells/fish/fish-3.3.1.ebuild
120 new file mode 100644
121 index 00000000000..fc205e24afc
122 --- /dev/null
123 +++ b/app-shells/fish/fish-3.3.1.ebuild
124 @@ -0,0 +1,94 @@
125 +# Copyright 1999-2021 Gentoo Authors
126 +# Distributed under the terms of the GNU General Public License v2
127 +
128 +EAPI=7
129 +
130 +PYTHON_COMPAT=( python3_{7..9} )
131 +
132 +inherit cmake python-any-r1 readme.gentoo-r1
133 +
134 +DESCRIPTION="Friendly Interactive SHell"
135 +HOMEPAGE="http://fishshell.com/"
136 +
137 +MY_PV="${PV/_beta/b}"
138 +MY_P="${PN}-${MY_PV}"
139 +
140 +if [[ ${PV} == "9999" ]]; then
141 + inherit git-r3
142 + EGIT_REPO_URI="https://github.com/${PN}-shell/${PN}-shell.git"
143 +else
144 + SRC_URI="https://github.com/${PN}-shell/${PN}-shell/releases/download/${MY_PV}/${MY_P}.tar.xz"
145 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-solaris"
146 +fi
147 +
148 +LICENSE="GPL-2"
149 +SLOT="0"
150 +IUSE="+doc nls test"
151 +
152 +RESTRICT="!test? ( test )"
153 +
154 +PATCHES=(
155 + "${FILESDIR}/3.3.1-don-t-override-linker.patch"
156 + "${FILESDIR}/3.3.1-sbin-path-sh-test.patch"
157 +)
158 +
159 +RDEPEND="
160 + >=dev-libs/libpcre2-10.32[pcre32]
161 + sys-apps/coreutils
162 + sys-libs/ncurses:0=[unicode]
163 +"
164 +
165 +DEPEND="${RDEPEND}"
166 +BDEPEND="
167 + nls? ( sys-devel/gettext )
168 + test? (
169 + ${PYTHON_DEPS}
170 + dev-tcltk/expect
171 + $(python_gen_any_dep '
172 + dev-python/pexpect[${PYTHON_USEDEP}]
173 + ')
174 + )
175 +"
176 +# we don't need shpinx dep for release tarballs
177 +[[ ${PV} == 9999 ]] && DEPEND+=" doc? ( dev-python/sphinx )"
178 +
179 +S="${WORKDIR}/${MY_P}"
180 +
181 +python_check_deps() {
182 + use test || return 0
183 + has_version -d "dev-python/pexpect[${PYTHON_USEDEP}]"
184 +}
185 +
186 +src_prepare() {
187 + # workaround for https://github.com/fish-shell/fish-shell/issues/4883
188 + sed -i 's#${TEST_INSTALL_DIR}/${CMAKE_INSTALL_PREFIX}#${TEST_INSTALL_DIR}#' \
189 + cmake/Tests.cmake || die
190 + cmake_src_prepare
191 +}
192 +
193 +src_configure() {
194 + local mycmakeargs=(
195 + -DCMAKE_INSTALL_BINDIR="${EPREFIX}/bin"
196 + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
197 + -DCURSES_NEED_NCURSES=ON
198 + -DINSTALL_DOCS="$(usex doc)"
199 + -DWITH_GETTEXT="$(usex nls)"
200 + )
201 + # release tarballs ship pre-built docs // -DHAVE_PREBUILT_DOCS=TRUE
202 + [[ ${PV} == 9999 ]] && mycmakeargs+=( -DBUILD_DOCS="$(usex doc)" )
203 + cmake_src_configure
204 +}
205 +
206 +src_install() {
207 + cmake_src_install
208 + keepdir /usr/share/fish/vendor_{completions,conf,functions}.d
209 + readme.gentoo_create_doc
210 +}
211 +
212 +src_test() {
213 + cmake_build test
214 +}
215 +
216 +pkg_postinst() {
217 + readme.gentoo_print_elog
218 +}