Gentoo Archives: gentoo-commits

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