1 |
commit: 2dcfb7b4ca6d10c30db96d0a7d5a75fc23ed1b8a |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 1 02:42:17 2021 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 2 01:14:23 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2dcfb7b4 |
7 |
|
8 |
app-shells/autojump: Enable tests |
9 |
|
10 |
Closes: https://bugs.gentoo.org/530742 |
11 |
Closes: https://github.com/gentoo/gentoo/pull/21070 |
12 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
13 |
|
14 |
app-shells/autojump/autojump-22.5.3-r1.ebuild | 84 +++++++++++++++++++++++++++ |
15 |
1 file changed, 84 insertions(+) |
16 |
|
17 |
diff --git a/app-shells/autojump/autojump-22.5.3-r1.ebuild b/app-shells/autojump/autojump-22.5.3-r1.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..8ff6378c09e |
20 |
--- /dev/null |
21 |
+++ b/app-shells/autojump/autojump-22.5.3-r1.ebuild |
22 |
@@ -0,0 +1,84 @@ |
23 |
+# Copyright 1999-2021 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=7 |
27 |
+ |
28 |
+PYTHON_COMPAT=( python3_{8..9} ) |
29 |
+DISTUTILS_SINGLE_IMPL=1 |
30 |
+DISTUTILS_USE_SETUPTOOLS=no |
31 |
+ |
32 |
+inherit distutils-r1 bash-completion-r1 vcs-snapshot prefix |
33 |
+ |
34 |
+DESCRIPTION="change directory command that learns" |
35 |
+HOMEPAGE="https://github.com/wting/autojump" |
36 |
+SRC_URI="https://github.com/wting/${PN}/archive/release-v${PV}.tar.gz -> ${P}.tar.gz" |
37 |
+ |
38 |
+LICENSE="GPL-3" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~amd64 ~x64-macos" |
41 |
+IUSE="ipython test" |
42 |
+REQUIRED_USE="ipython? ( ${PYTHON_REQUIRED_USE} )" |
43 |
+ |
44 |
+RESTRICT="!test? ( test )" |
45 |
+RDEPEND="ipython? ( ${PYTHON_DEPS} )" |
46 |
+DEPEND="${PYTHON_DEPS} |
47 |
+ test? ( |
48 |
+ >=dev-vcs/pre-commit-0.7.0[${PYTHON_SINGLE_USEDEP}] |
49 |
+ ) |
50 |
+" |
51 |
+ |
52 |
+distutils_enable_tests pytest |
53 |
+ |
54 |
+src_prepare() { |
55 |
+ eapply_user |
56 |
+ sed -e "s:/usr/local/share:/usr/share:" \ |
57 |
+ -i bin/autojump.sh || die |
58 |
+ |
59 |
+ # autojump_argparse is only there for Python 2.6 compatibility |
60 |
+ sed -e "s:autojump_argparse:argparse:" \ |
61 |
+ -i bin/autojump || die |
62 |
+ |
63 |
+ hprefixify -q '"' -w '/usr\/share/' bin/autojump.sh |
64 |
+} |
65 |
+ |
66 |
+src_compile() { |
67 |
+ : |
68 |
+} |
69 |
+ |
70 |
+src_install() { |
71 |
+ dobin bin/"${PN}" |
72 |
+ python_doscript "${ED}"/usr/bin/"${PN}" |
73 |
+ |
74 |
+ insinto /etc/profile.d |
75 |
+ doins bin/"${PN}".sh |
76 |
+ |
77 |
+ insinto /usr/share/"${PN}"/ |
78 |
+ doins bin/"${PN}.bash" |
79 |
+ doins bin/"${PN}.zsh" |
80 |
+ doins bin/"${PN}.fish" |
81 |
+ insinto /usr/share/zsh/site-functions |
82 |
+ doins bin/_j |
83 |
+ |
84 |
+ python_domodule bin/autojump_argparse.py bin/autojump_data.py \ |
85 |
+ bin/autojump_match.py bin/autojump_utils.py |
86 |
+ if use ipython; then |
87 |
+ python_domodule tools/autojump_ipython.py |
88 |
+ fi |
89 |
+ |
90 |
+ doman docs/"${PN}.1" |
91 |
+ einstalldocs |
92 |
+} |
93 |
+ |
94 |
+pkg_postinst() { |
95 |
+ if use ipython; then |
96 |
+ elog 'This tool provides "j" for ipython, please add' |
97 |
+ elog '"import autojump_ipython" to your ipy_user_conf.py.' |
98 |
+ elog |
99 |
+ fi |
100 |
+ |
101 |
+ elog 'If you use app-shells/fish, add the following code to your' |
102 |
+ elog 'config.fish to get autojump support:' |
103 |
+ elog 'if test -f /usr/share/autojump/autojump.fish' |
104 |
+ elog ' source /usr/share/autojump/autojump.fish' |
105 |
+ elog 'end' |
106 |
+} |