annotate dev-util/mercurial/mercurial-1.1.2.ebuild @ 108:be32a2c5e1fd

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