Mercurial > hg > portage
comparison dev-util/mercurial/mercurial-1.3.ebuild @ 139:800c31c752cf
update mercurial to 1.3
author | holger |
---|---|
date | Thu, 02 Jul 2009 11:06:03 +0200 |
parents | dev-util/mercurial/mercurial-1.2.1.ebuild@30d6ee53317e |
children |
comparison
equal
deleted
inserted
replaced
138:b2bf9b2e80c7 | 139:800c31c752cf |
---|---|
1 # Copyright 1999-2008 Gentoo Foundation | |
2 # Distributed under the terms of the GNU General Public License v2 | |
3 # $Header: /var/cvsroot/gentoo-x86/dev-util/mercurial/mercurial-1.0.2.ebuild,v 1.7 2008/10/17 08:04:41 aballier Exp $ | |
4 | |
5 inherit bash-completion elisp-common flag-o-matic eutils distutils | |
6 | |
7 DESCRIPTION="Scalable distributed SCM" | |
8 HOMEPAGE="http://www.selenic.com/mercurial/" | |
9 SRC_URI="http://www.selenic.com/mercurial/release/${P}.tar.gz" | |
10 | |
11 LICENSE="GPL-2" | |
12 SLOT="0" | |
13 KEYWORDS="alpha amd64 ~hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd" | |
14 IUSE="bugzilla emacs gpg test zsh-completion" | |
15 | |
16 CDEPEND=">=dev-lang/python-2.3" | |
17 RDEPEND="${CDEPEND} | |
18 bugzilla? ( dev-python/mysql-python ) | |
19 gpg? ( app-crypt/gnupg ) | |
20 zsh-completion? ( app-shells/zsh )" | |
21 DEPEND="${CDEPEND} | |
22 emacs? ( virtual/emacs ) | |
23 test? ( app-arch/unzip | |
24 dev-python/pygments )" | |
25 | |
26 PYTHON_MODNAME="${PN} hgext" | |
27 SITEFILE="70${PN}-gentoo.el" | |
28 | |
29 src_compile() { | |
30 filter-flags -ftracer -ftree-vectorize | |
31 | |
32 distutils_src_compile | |
33 | |
34 if use emacs; then | |
35 cd "${S}"/contrib | |
36 elisp-compile mercurial.el || die "elisp-compile failed!" | |
37 fi | |
38 | |
39 rm -rf contrib/{win32,macosx} | |
40 } | |
41 | |
42 src_install() { | |
43 distutils_src_install | |
44 | |
45 dobashcompletion contrib/bash_completion ${PN} | |
46 | |
47 if use zsh-completion ; then | |
48 insinto /usr/share/zsh/site-functions | |
49 newins contrib/zsh_completion _hg | |
50 fi | |
51 | |
52 rm -f doc/*.?.txt | |
53 dodoc CONTRIBUTORS PKG-INFO README doc/*.txt | |
54 cp hgweb*.cgi "${D}"/usr/share/doc/${PF}/ | |
55 | |
56 dobin contrib/hgk | |
57 dobin contrib/hg-relink | |
58 dobin contrib/hg-ssh | |
59 | |
60 rm -f contrib/hgk contrib/hg-relink contrib/hg-ssh | |
61 | |
62 rm -f contrib/bash_completion | |
63 cp -r contrib "${D}"/usr/share/doc/${PF}/ | |
64 doman doc/*.? | |
65 | |
66 cat > "${T}/80mercurial" <<-EOF | |
67 HG=/usr/bin/hg | |
68 EOF | |
69 doenvd "${T}/80mercurial" | |
70 | |
71 if use emacs; then | |
72 elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!" | |
73 elisp-site-file-install "${FILESDIR}"/${SITEFILE} | |
74 fi | |
75 } | |
76 | |
77 src_test() { | |
78 local testdir="${T}/tests" | |
79 mkdir -p -m1777 "${testdir}" || die | |
80 cd "${S}/tests/" | |
81 rm -f *svn* # Subversion tests fail with 1.5 | |
82 rm -f test-convert-baz* # GNU Arch baz | |
83 rm -f test-convert-cvs* # CVS | |
84 rm -f test-convert-darcs* # Darcs | |
85 rm -f test-convert-git* # git | |
86 rm -f test-convert-mtn* # monotone | |
87 rm -f test-convert-tla* # GNU Arch tla | |
88 rm -f test-doctest* # doctest always fails with python 2.5.x | |
89 if ! has userpriv ${FEATURES}; then | |
90 einfo "Removing tests which require user privileges to succeed" | |
91 rm -f test-command-template # Test is broken when run as root | |
92 rm -f test-convert # Test is broken when run as root | |
93 rm -f test-lock-badness # Test is broken when run as root | |
94 rm -f test-permissions # Test is broken when run as root | |
95 rm -f test-pull-permission # Test is broken when run as root | |
96 fi | |
97 einfo "Running Mercurial tests ..." | |
98 python run-tests.py --tmpdir="${testdir}" || die "test failed" | |
99 } | |
100 | |
101 pkg_postinst() { | |
102 distutils_pkg_postinst | |
103 use emacs && elisp-site-regen | |
104 bash-completion_pkg_postinst | |
105 | |
106 elog "If you want to convert repositories from other tools using convert" | |
107 elog "extension please install correct tool:" | |
108 elog " dev-util/cvs" | |
109 elog " dev-util/darcs" | |
110 elog " dev-util/git" | |
111 elog " dev-util/monotone" | |
112 elog " dev-util/subversion" | |
113 } | |
114 | |
115 pkg_postrm() { | |
116 distutils_pkg_postrm | |
117 use emacs && elisp-site-regen | |
118 } |