1
# Copyright 1999-2009 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
8
inherit distutils bash-completion elisp-common eutils versionator
13
SERIES=$(get_version_component_range 1-2)
16
DESCRIPTION="Bazaar is a next generation distributed version control system."
17
HOMEPAGE="http://bazaar-vcs.org/"
18
SRC_URI="http://launchpad.net/bzr/${SERIES}/${MY_RV}/+download/${MY_P}.tar.gz"
22
KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86 ~x86-fbsd"
23
IUSE="curl doc emacs kerberos +sftp test"
25
python_rdep="|| ( >=dev-lang/python-2.5 dev-python/celementtree )
26
sftp? ( >=dev-python/paramiko-1.5 )
27
curl? ( dev-python/pycurl )
28
kerberos? ( dev-python/pykerberos )"
29
DEPEND="dev-python/pyrex
30
!=dev-python/pyrex-0.9.6.3
31
emacs? ( virtual/emacs )
36
RDEPEND="${python_rdep}"
38
PYTHON_MODNAME="bzrlib"
39
SITEFILE=71${PN}-gentoo.el
41
DOCS="README NEWS doc/*.txt"
44
# Don't run lock permission tests when running as root
45
epatch "${FILESDIR}"/${PN}-0.90-tests-fix_root.patch
46
# Fix permission errors when run under directories with setgid set.
47
epatch "${FILESDIR}"/${PN}-0.90-tests-sgid.patch
53
elisp-compile contrib/emacs/bzr-mode.el || die
58
distutils_src_install --install-data /usr/share
61
dodoc doc/developers/*
62
# TODO (when they offer docs in more languages): support LINGUAS
64
for dir in `ls doc/en/`; do
65
if test -n "`ls doc/en/${dir}`"; then
68
for f in `ls doc/en/"${dir}"`; do
69
if test -d doc/en/"${dir}/${f}"; then
70
docinto en/"${dir}/${f}"
71
dodoc doc/en/"${dir}/${f}"/*
73
elif test "$f" != "Makefile"; then
74
dodoc doc/en/"${dir}/${f}"
81
elisp-install ${PN} contrib/emacs/*.el* || die
82
elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
83
# don't add automatically to the load-path, so the sitefile
84
# can do a conditional loading
85
touch "${D}${SITELISP}/${PN}/.nosearch"
87
insinto /usr/share/zsh/site-functions
88
doins contrib/zsh/_bzr
89
dobashcompletion contrib/bash/bzr.simple bzr
93
distutils_pkg_postinst
94
bash-completion_pkg_postinst
97
elog "If you are using a GNU Emacs version greater than 22.1, bzr support"
98
elog "is already included. This ebuild does not automatically activate bzr support"
99
elog "in versions below, but prepares it in a way you can load it from your ~/.emacs"
100
elog "file by adding"
101
elog " (load \"bzr-mode\")"
107
use emacs && elisp-site-regen
111
PYTHONPATH="build/lib*" "${python}" "${S}"/bzr --no-plugins selftest \