| 1 |
|
# Copyright 1999-2025 Gentoo Authors
|
|
1 |
# Copyright 1999-2026 Gentoo Authors
|
| 2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| ... | ... | |
| 6 |
6 |
CRATES=""
|
| 7 |
7 |
RUST_MIN_VER="1.85.0"
|
| 8 |
8 |
|
| 9 |
|
declare -A GIT_CRATES=(
|
| 10 |
|
[pcre2-sys]='https://github.com/fish-shell/rust-pcre2;85b7afba1a9d9bd445779800e5bcafeb732e4421;rust-pcre2-%commit%/pcre2-sys'
|
| 11 |
|
[pcre2]='https://github.com/fish-shell/rust-pcre2;85b7afba1a9d9bd445779800e5bcafeb732e4421;rust-pcre2-%commit%'
|
| 12 |
|
)
|
|
9 |
if [[ ${PV} != 9999 ]]; then
|
|
10 |
declare -A GIT_CRATES=(
|
|
11 |
[pcre2-sys]='https://github.com/fish-shell/rust-pcre2;85b7afba1a9d9bd445779800e5bcafeb732e4421;rust-pcre2-%commit%/pcre2-sys'
|
|
12 |
[pcre2]='https://github.com/fish-shell/rust-pcre2;85b7afba1a9d9bd445779800e5bcafeb732e4421;rust-pcre2-%commit%'
|
|
13 |
)
|
|
14 |
fi
|
| 13 |
15 |
|
| 14 |
16 |
inherit cargo cmake readme.gentoo-r1 xdg
|
| 15 |
17 |
|
| ... | ... | |
| 41 |
43 |
|
| 42 |
44 |
RESTRICT="!test? ( test )"
|
| 43 |
45 |
|
| 44 |
|
BDEPEND="nls? ( sys-devel/gettext )"
|
| 45 |
|
# Release tarballs contain prebuilt documentation.
|
| 46 |
|
[[ ${PV} == 9999 ]] && BDEPEND+=" doc? ( dev-python/sphinx )"
|
|
46 |
BDEPEND="
|
|
47 |
doc? ( dev-python/sphinx )
|
|
48 |
nls? ( sys-devel/gettext )
|
|
49 |
"
|
| 47 |
50 |
|
| 48 |
51 |
PATCHES=(
|
| 49 |
|
"${FILESDIR}/${PN}-4.2.0-use-cargo-eclass-for-build.patch"
|
|
52 |
"${FILESDIR}/${PN}-4.3.0-use-cargo-eclass-for-build.patch"
|
| 50 |
53 |
)
|
| 51 |
54 |
|
| 52 |
55 |
QA_FLAGS_IGNORED="usr/bin/.*"
|
| ... | ... | |
| 63 |
66 |
src_configure() {
|
| 64 |
67 |
local mycmakeargs=(
|
| 65 |
68 |
-DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
|
| 66 |
|
-DINSTALL_DOCS="$(usex doc)"
|
| 67 |
|
-DWITH_GETTEXT="$(usex nls 1 0)"
|
|
69 |
-DWITH_DOCS="$(usex doc)"
|
|
70 |
-DWITH_MESSAGE_LOCALIZATION="$(usex nls 1 0)"
|
| 68 |
71 |
)
|
| 69 |
72 |
cargo_src_configure --no-default-features \
|
| 70 |
73 |
--bin fish \
|
| ... | ... | |
| 75 |
78 |
|
| 76 |
79 |
src_compile() {
|
| 77 |
80 |
local -x PREFIX="${EPREFIX}/usr"
|
|
81 |
local -x DATADIR="${EPREFIX}/usr/share"
|
| 78 |
82 |
local -x DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
|
| 79 |
83 |
|
| 80 |
84 |
# Bug: https://bugs.gentoo.org/950699
|
| 81 |
85 |
local -x SYSCONFDIR="${EPREFIX}/etc"
|
| 82 |
86 |
|
| 83 |
|
# Release tarballs contain prebuilt documentation.
|
| 84 |
87 |
local -x FISH_BUILD_DOCS
|
| 85 |
|
if [[ ${PV} == 9999 ]]; then
|
| 86 |
|
FISH_BUILD_DOCS="$(usex doc 1 0)"
|
| 87 |
|
else
|
| 88 |
|
FISH_BUILD_DOCS=0
|
| 89 |
|
fi
|
|
88 |
FISH_BUILD_DOCS="$(usex doc 1 0)"
|
| 90 |
89 |
|
| 91 |
90 |
cargo_src_compile
|
| 92 |
91 |
}
|