blob: d5c09eb4f5243ce2c402495bf11ad15e105a8ca1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9,10} )
inherit bash-completion-r1 python-single-r1
DESCRIPTION="cowsay reimplemention for ponies"
HOMEPAGE="https://github.com/erkin/ponysay"
SRC_URI="https://github.com/erkin/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~x86"
IUSE="doc +non-free bash-completion fish-completion zsh-completion"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
BDEPEND="${PYTHON_DEPS}
doc? ( sys-apps/texinfo )"
RDEPEND="${PYTHON_DEPS}
fish-completion? ( app-shells/fish )
zsh-completion? ( app-shells/zsh )"
PATCHES=(
"${FILESDIR}/${PN}-3.0.3-python-syntax.patch"
)
setup_py() {
"${PYTHON}" setup.py \
--prefix="${EPREFIX}"/usr \
--everything \
--without-info-compression \
--without-man-compression \
--without-pdf-compression \
--without-shared-cache \
--freedom=$(usex non-free no yes) \
$(use_with fish-completion) \
$(use_with zsh-completion) \
$(use_with doc info) \
$(use_with doc pdf "${EPREFIX}"/usr/share/doc/${PF}) \
"${@}" || die
}
src_compile() {
setup_py \
$(use_with bash-completion) \
build
}
src_install() {
setup_py \
--without-bash-completion \
--destdir="${D}" \
prebuilt
python_fix_shebang "${ED}"/usr/bin/${PN}
rm -rv "${ED}"/usr/share/licenses || die
dodoc CHANGELOG CONTRIBUTING CREDITS README.md
use bash-completion &&
newbashcomp completion/bash-completion.${PN}.install ${PN}
}
|