dev-qt/qtopengl: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / app-shells / fish / fish-3.1.2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit cmake readme.gentoo-r1
7
8 DESCRIPTION="Friendly Interactive SHell"
9 HOMEPAGE="http://fishshell.com/"
10
11 MY_PV="${PV/_beta/b}"
12 MY_P="${PN}-${MY_PV}"
13
14 if [[ ${PV} == "9999" ]]; then
15         inherit git-r3
16         EGIT_REPO_URI="https://github.com/${PN}-shell/${PN}-shell.git"
17 else
18         SRC_URI="https://github.com/${PN}-shell/${PN}-shell/releases/download/${MY_PV}/${MY_P}.tar.gz"
19         KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
20 fi
21
22 LICENSE="GPL-2"
23 SLOT="0"
24
25 IUSE="doc nls test"
26 RESTRICT="!test? ( test )"
27
28 RDEPEND="
29         >=dev-libs/libpcre2-10.32[pcre32]
30         sys-libs/ncurses:0=[unicode]
31 "
32
33 DEPEND="${RDEPEND}
34         doc? ( app-doc/doxygen )
35         nls? ( sys-devel/gettext )
36         test? ( dev-tcltk/expect )
37 "
38
39 S="${WORKDIR}/${MY_P}"
40
41 src_prepare() {
42         # workaround for https://github.com/fish-shell/fish-shell/issues/4883
43         sed -i 's#${TEST_INSTALL_DIR}/${CMAKE_INSTALL_PREFIX}#${TEST_INSTALL_DIR}#' \
44                 cmake/Tests.cmake || die
45         cmake_src_prepare
46 }
47
48 src_configure() {
49         local mycmakeargs=(
50                 -DCMAKE_INSTALL_BINDIR="${EPREFIX}/bin"
51                 -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
52                 -DCURSES_NEED_NCURSES=ON
53                 -DBUILD_DOCS="$(usex doc)"
54                 -DWITH_GETTEXT="$(usex nls)"
55         )
56         cmake_src_configure
57 }
58
59 src_install() {
60         cmake_src_install
61         keepdir /usr/share/fish/vendor_{completions,conf,functions}.d
62         readme.gentoo_create_doc
63 }
64
65 src_test() {
66         cmake_build -j1 test
67 }
68
69 pkg_postinst() {
70         readme.gentoo_print_elog
71 }