~mocksoul/bzr-gentoo-overlay/bzr-gentoo-overlay

« back to all changes in this revision

Viewing changes to dev-util/bzr/bzr-1.14_rc1.ebuild

  • Committer: Vadim Fint
  • Date: 2010-03-14 20:30:34 UTC
  • Revision ID: mocksoul@gmail.com-20100314203034-bu3kkdlodumh34mo
Drop bzr-1.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 1999-2009 Gentoo Foundation
2
 
# Distributed under the terms of the GNU General Public License v2
3
 
# $Header: $
4
 
 
5
 
EAPI=2
6
 
NEED_PYTHON=2.4
7
 
 
8
 
inherit distutils bash-completion elisp-common eutils versionator
9
 
 
10
 
MY_RV=${PV/_/}
11
 
MY_PV=${MY_RV/beta/b}
12
 
MY_P="${PN}-${MY_PV}"
13
 
SERIES=$(get_version_component_range 1-2)
14
 
S=${WORKDIR}/${MY_P}
15
 
 
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"
19
 
 
20
 
LICENSE="GPL-2"
21
 
SLOT="0"
22
 
KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86 ~x86-fbsd"
23
 
IUSE="curl doc emacs kerberos +sftp test"
24
 
 
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 )
32
 
        test? (
33
 
                ${python_rdep}
34
 
                dev-python/medusa
35
 
        )"
36
 
RDEPEND="${python_rdep}"
37
 
 
38
 
PYTHON_MODNAME="bzrlib"
39
 
SITEFILE=71${PN}-gentoo.el
40
 
 
41
 
DOCS="README NEWS doc/*.txt"
42
 
 
43
 
src_prepare() {
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
48
 
}
49
 
 
50
 
src_compile() {
51
 
        distutils_src_compile
52
 
        if use emacs; then
53
 
                elisp-compile contrib/emacs/bzr-mode.el || die
54
 
        fi
55
 
}
56
 
 
57
 
src_install() {
58
 
        distutils_src_install --install-data /usr/share
59
 
        if use doc; then
60
 
                docinto developers
61
 
                dodoc doc/developers/*
62
 
                # TODO (when they offer docs in more languages): support LINGUAS
63
 
                local dir
64
 
                for     dir in `ls doc/en/`; do
65
 
                        if test -n "`ls doc/en/${dir}`"; then
66
 
                                docinto en/"${dir}"
67
 
                                local f
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}"/*
72
 
                                                docinto en/"${dir}"
73
 
                                        elif test "$f" != "Makefile"; then
74
 
                                                dodoc doc/en/"${dir}/${f}"
75
 
                                        fi
76
 
                                done
77
 
                        fi
78
 
                done
79
 
        fi
80
 
        if use emacs; then
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"
86
 
        fi
87
 
        insinto /usr/share/zsh/site-functions
88
 
        doins contrib/zsh/_bzr
89
 
        dobashcompletion contrib/bash/bzr.simple bzr
90
 
}
91
 
 
92
 
pkg_postinst() {
93
 
        distutils_pkg_postinst
94
 
        bash-completion_pkg_postinst
95
 
        if use emacs; then
96
 
                elisp-site-regen
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\")"
102
 
        fi
103
 
}
104
 
 
105
 
pkg_postrm() {
106
 
        distutils_pkg_postrm
107
 
        use emacs && elisp-site-regen
108
 
}
109
 
 
110
 
src_test() {
111
 
        PYTHONPATH="build/lib*" "${python}" "${S}"/bzr --no-plugins selftest \
112
 
                || die
113
 
}