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