blob: 0611c9f3e1ad340ff407d0ca5b989027a44cb3bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emacs/python-mode/python-mode-1.0-r1.ebuild,v 1.4 2008/03/23 18:10:29 armin76 Exp $
inherit elisp distutils
DESCRIPTION="An Emacs major mode for editing Python source"
HOMEPAGE="http://sourceforge.net/projects/python-mode/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="as-is"
SLOT="0"
KEYWORDS="amd64 ~arm ~hppa ia64 ppc ~ppc64 ~s390 ~sh x86 ~x86-fbsd"
IUSE="pymacs"
DEPEND="pymacs? ( app-emacs/pymacs )"
RDEPEND="${DEPEND}"
SITEFILE=60${PN}-gentoo.el
src_unpack() {
unpack ${A}
if use pymacs; then
cp "${FILESDIR}"/setup.py "${S}"
else
rm -f "${S}"/pycomplete.{el,py}
fi
}
src_compile() {
elisp-comp *.el || die "elisp-comp failed"
use pymacs && distutils_src_compile
}
src_install() {
elisp-install ${PN} *.{el,elc} || die
if use pymacs; then
elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
distutils_src_install
else
# remove autoload for pycomplete from site file
sed '/pycomplete/d' "${FILESDIR}/${SITEFILE}" >"${T}/${SITEFILE}" \
|| die "sed failed"
elisp-site-file-install "${T}/${SITEFILE}" || die
fi
}
pkg_postinst() {
elisp_pkg_postinst
use pymacs && distutils_pkg_postinst
}
pkg_postrm() {
elisp_pkg_postrm
use pymacs && distutils_pkg_postrm
}
|