/[gentoo-x86]/dev-vcs/mercurial/mercurial-9999.ebuild
Gentoo

Contents of /dev-vcs/mercurial/mercurial-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Tue Feb 21 03:31:01 2012 UTC (2 years, 8 months ago) by patrick
Branch: MAIN
Changes since 1.11: +3 -3 lines
Fix pypy restrict

(Portage version: 2.2.0_alpha88/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-vcs/mercurial/mercurial-9999.ebuild,v 1.11 2011/12/16 21:31:43 ago Exp $
4
5 EAPI=3
6 PYTHON_DEPEND="2"
7 PYTHON_USE_WITH="threads"
8 SUPPORT_PYTHON_ABIS="1"
9 RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
10
11 inherit bash-completion-r1 elisp-common eutils distutils mercurial
12
13 DESCRIPTION="Scalable distributed SCM"
14 HOMEPAGE="http://mercurial.selenic.com/"
15 EHG_REPO_URI="http://selenic.com/repo/hg"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS=""
20 IUSE="bugzilla emacs gpg test tk zsh-completion"
21
22 RDEPEND="bugzilla? ( dev-python/mysql-python )
23 gpg? ( app-crypt/gnupg )
24 tk? ( dev-lang/tk )
25 zsh-completion? ( app-shells/zsh )"
26 DEPEND="emacs? ( virtual/emacs )
27 test? ( app-arch/unzip
28 dev-python/pygments )
29 app-text/asciidoc"
30
31 S="${WORKDIR}/hg"
32
33 PYTHON_CFLAGS=(
34 "2.* + -fno-strict-aliasing"
35 "* - -ftracer -ftree-vectorize"
36 )
37
38 PYTHON_MODNAME="${PN} hgext"
39 SITEFILE="70${PN}-gentoo.el"
40
41 src_compile() {
42 distutils_src_compile
43
44 if use emacs; then
45 cd "${S}"/contrib || die
46 elisp-compile mercurial.el || die "elisp-compile failed!"
47 fi
48
49 rm -rf contrib/{win32,macosx}
50 make doc || die
51 }
52
53 src_install() {
54 distutils_src_install
55
56 newbashcomp contrib/bash_completion ${PN} || die
57
58 if use zsh-completion ; then
59 insinto /usr/share/zsh/site-functions
60 newins contrib/zsh_completion _hg || die
61 fi
62
63 rm -f doc/*.?.txt
64 dodoc CONTRIBUTORS README doc/*.txt || die
65 cp hgweb*.cgi "${ED}"/usr/share/doc/${PF}/ || die
66
67 dobin hgeditor || die
68 dobin contrib/hgk || die
69 dobin contrib/hg-ssh || die
70
71 rm -f contrib/hgk contrib/hg-ssh
72
73 rm -f contrib/bash_completion
74 cp -r contrib "${ED}"/usr/share/doc/${PF}/ || die
75 doman doc/*.? || die
76
77 cat > "${T}/80mercurial" <<-EOF
78 HG="${EPREFIX}/usr/bin/hg"
79 EOF
80 doenvd "${T}/80mercurial" || die
81
82 if use emacs; then
83 elisp-install ${PN} contrib/mercurial.el* || die "elisp-install failed!"
84 elisp-site-file-install "${FILESDIR}"/${SITEFILE}
85 fi
86 }
87
88 src_test() {
89 cd "${S}/tests/" || die
90 rm -rf *svn* # Subversion tests fail with 1.5
91 rm -f test-archive # Fails due to verbose tar output changes
92 rm -f test-convert-baz* # GNU Arch baz
93 rm -f test-convert-cvs* # CVS
94 rm -f test-convert-darcs* # Darcs
95 rm -f test-convert-git* # git
96 rm -f test-convert-mtn* # monotone
97 rm -f test-convert-tla* # GNU Arch tla
98 rm -f test-doctest* # doctest always fails with python 2.5.x
99 if [[ ${EUID} -eq 0 ]]; then
100 einfo "Removing tests which require user privileges to succeed"
101 rm -f test-command-template # Test is broken when run as root
102 rm -f test-convert # Test is broken when run as root
103 rm -f test-lock-badness # Test is broken when run as root
104 rm -f test-permissions # Test is broken when run as root
105 rm -f test-pull-permission # Test is broken when run as root
106 rm -f test-clone-failure
107 rm -f test-journal-exists
108 rm -f test-repair-strip
109 fi
110
111 testing() {
112 local testdir="${T}/tests-${PYTHON_ABI}"
113 rm -rf "${testdir}"
114 "$(PYTHON)" run-tests.py --tmpdir="${testdir}"
115 }
116 python_execute_function testing
117 }
118
119 pkg_postinst() {
120 distutils_pkg_postinst
121 use emacs && elisp-site-regen
122
123 elog "If you want to convert repositories from other tools using convert"
124 elog "extension please install correct tool:"
125 elog " dev-vcs/cvs"
126 elog " dev-vcs/darcs"
127 elog " dev-vcs/git"
128 elog " dev-vcs/monotone"
129 elog " dev-vcs/subversion"
130 }
131
132 pkg_postrm() {
133 distutils_pkg_postrm
134 use emacs && elisp-site-regen
135 }

  ViewVC Help
Powered by ViewVC 1.1.20