1 |
commit: 42b409b3b4d043fd4ae8541c9aa5472181b096c2 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 24 12:24:50 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 24 12:25:04 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42b409b3 |
7 |
|
8 |
dev-vcs/mercurial: Revbump to unbundle zstandard. |
9 |
|
10 |
Package-Manager: Portage-2.3.49, Repoman-2.3.11 |
11 |
|
12 |
dev-vcs/mercurial/mercurial-4.7.1-r1.ebuild | 139 ++++++++++++++++++++++++++++ |
13 |
1 file changed, 139 insertions(+) |
14 |
|
15 |
diff --git a/dev-vcs/mercurial/mercurial-4.7.1-r1.ebuild b/dev-vcs/mercurial/mercurial-4.7.1-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..8fed97891b3 |
18 |
--- /dev/null |
19 |
+++ b/dev-vcs/mercurial/mercurial-4.7.1-r1.ebuild |
20 |
@@ -0,0 +1,139 @@ |
21 |
+# Copyright 1999-2018 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=6 |
25 |
+ |
26 |
+PYTHON_COMPAT=( python2_7 ) |
27 |
+PYTHON_REQ_USE="threads" |
28 |
+ |
29 |
+inherit bash-completion-r1 elisp-common eutils distutils-r1 flag-o-matic |
30 |
+ |
31 |
+DESCRIPTION="Scalable distributed SCM" |
32 |
+HOMEPAGE="https://www.mercurial-scm.org/" |
33 |
+SRC_URI="https://www.mercurial-scm.org/release/${P}.tar.gz" |
34 |
+ |
35 |
+LICENSE="GPL-2+" |
36 |
+SLOT="0" |
37 |
+KEYWORDS="~amd64 ~arm64 ~hppa ~mips ~sparc ~ppc-aix ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
38 |
+IUSE="bugzilla emacs gpg test tk" |
39 |
+ |
40 |
+RDEPEND="app-misc/ca-certificates |
41 |
+ dev-python/zstandard |
42 |
+ bugzilla? ( dev-python/mysql-python[${PYTHON_USEDEP}] ) |
43 |
+ gpg? ( app-crypt/gnupg ) |
44 |
+ tk? ( dev-lang/tk )" |
45 |
+ |
46 |
+DEPEND="emacs? ( virtual/emacs ) |
47 |
+ test? ( app-arch/unzip |
48 |
+ dev-python/pygments[${PYTHON_USEDEP}] )" |
49 |
+ |
50 |
+SITEFILE="70${PN}-gentoo.el" |
51 |
+ |
52 |
+PATCHES=( "${FILESDIR}/${PN}-3.0.1-po_fixes.patch" ) |
53 |
+ |
54 |
+python_prepare_all() { |
55 |
+ # fix up logic that won't work in Gentoo Prefix (also won't outside in |
56 |
+ # certain cases), bug #362891 |
57 |
+ sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die |
58 |
+ |
59 |
+ # Don't use bundled zstandard (#666972) |
60 |
+ rm -r contrib/python-zstandard || die |
61 |
+ sed '/contrib\/python-zstandard/d;/setup_zstd/d' -i setup.py || die |
62 |
+ |
63 |
+ distutils-r1_python_prepare_all |
64 |
+} |
65 |
+ |
66 |
+python_configure_all() { |
67 |
+ strip-flags -ftracer -ftree-vectorize |
68 |
+ # Note: make it impl-conditional if py3 is supported |
69 |
+ append-flags -fno-strict-aliasing |
70 |
+ |
71 |
+ "${PYTHON}" setup.py build_mo || die |
72 |
+} |
73 |
+ |
74 |
+python_compile_all() { |
75 |
+ rm -r contrib/win32 || die |
76 |
+ if use emacs; then |
77 |
+ cd contrib || die |
78 |
+ elisp-compile mercurial.el || die "elisp-compile failed!" |
79 |
+ fi |
80 |
+} |
81 |
+ |
82 |
+python_install_all() { |
83 |
+ distutils-r1_python_install_all |
84 |
+ |
85 |
+ newbashcomp contrib/bash_completion hg |
86 |
+ |
87 |
+ insinto /usr/share/zsh/site-functions |
88 |
+ newins contrib/zsh_completion _hg |
89 |
+ |
90 |
+ rm -f doc/*.?.txt |
91 |
+ dodoc CONTRIBUTORS |
92 |
+ cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die |
93 |
+ |
94 |
+ dobin hgeditor |
95 |
+ dobin contrib/hgk |
96 |
+ python_foreach_impl python_doscript contrib/hg-ssh |
97 |
+ |
98 |
+ if use emacs; then |
99 |
+ elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!" |
100 |
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE} |
101 |
+ fi |
102 |
+ |
103 |
+ local RM_CONTRIB=(hgk hg-ssh bash_completion zsh_completion wix plan9 *.el) |
104 |
+ for f in ${RM_CONTRIB[@]}; do |
105 |
+ rm -r contrib/$f || die |
106 |
+ done |
107 |
+ |
108 |
+ dodoc -r contrib |
109 |
+ docompress -x /usr/share/doc/${PF}/contrib |
110 |
+ doman doc/*.? |
111 |
+ |
112 |
+ insinto /etc/mercurial/hgrc.d |
113 |
+ doins "${FILESDIR}/cacerts.rc" |
114 |
+} |
115 |
+ |
116 |
+src_test() { |
117 |
+ pushd tests &>/dev/null || die |
118 |
+ rm -rf *svn* # Subversion tests fail with 1.5 |
119 |
+ rm -f test-archive* # Fails due to verbose tar output changes |
120 |
+ rm -f test-convert-baz* # GNU Arch baz |
121 |
+ rm -f test-convert-cvs* # CVS |
122 |
+ rm -f test-convert-darcs* # Darcs |
123 |
+ rm -f test-convert-git* # git |
124 |
+ rm -f test-convert-mtn* # monotone |
125 |
+ rm -f test-convert-tla* # GNU Arch tla |
126 |
+ #rm -f test-doctest* # doctest always fails with python 2.5.x |
127 |
+ rm -f test-largefiles* # tends to time out |
128 |
+ |
129 |
+ popd &>/dev/null || die |
130 |
+ distutils-r1_src_test |
131 |
+} |
132 |
+ |
133 |
+python_test() { |
134 |
+ local TEST_DIR |
135 |
+ |
136 |
+ rm -rf "${TMPDIR}"/test |
137 |
+ distutils_install_for_testing |
138 |
+ cd tests || die |
139 |
+ "${PYTHON}" run-tests.py --verbose \ |
140 |
+ --tmpdir="${TMPDIR}"/test \ |
141 |
+ --with-hg="${TEST_DIR}"/scripts/hg \ |
142 |
+ || die "Tests fail with ${EPYTHON}" |
143 |
+} |
144 |
+ |
145 |
+pkg_postinst() { |
146 |
+ use emacs && elisp-site-regen |
147 |
+ |
148 |
+ elog "If you want to convert repositories from other tools using convert" |
149 |
+ elog "extension please install correct tool:" |
150 |
+ elog " dev-vcs/cvs" |
151 |
+ elog " dev-vcs/darcs" |
152 |
+ elog " dev-vcs/git" |
153 |
+ elog " dev-vcs/monotone" |
154 |
+ elog " dev-vcs/subversion" |
155 |
+} |
156 |
+ |
157 |
+pkg_postrm() { |
158 |
+ use emacs && elisp-site-regen |
159 |
+} |