You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/bicyclerepair/bicyclerepair-0.9-r3.ebuild

54 lines
1.3 KiB

# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/bicyclerepair/bicyclerepair-0.9-r3.ebuild,v 1.2 2015/01/02 00:06:55 mgorny Exp $
EAPI=5
PYTHON_COMPAT=( python2_7 )
inherit distutils-r1 elisp-common
DESCRIPTION="Bicycle Repair Man is the Python Refactoring Browser"
HOMEPAGE="http://bicyclerepair.sourceforge.net/"
SRC_URI="mirror://sourceforge/bicyclerepair/${P}.tar.gz"
LICENSE="icu GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86"
IUSE="emacs"
DEPEND="emacs? (
app-emacs/pymacs[${PYTHON_USEDEP}]
app-emacs/python-mode )"
RDEPEND="${DEPEND}"
SITEFILE="50${PN}-gentoo.el"
python_prepare_all() {
# bikeemacs.py contains non-ASCII characters in comments.
sed -e '1s/$/\t-*- coding: latin-1 -*-/' -i ide-integration/bikeemacs.py || die "sed failed"
epatch "${FILESDIR}/${P}-idle.patch"
epatch "${FILESDIR}/${P}-invalid-syntax.patch"
distutils-r1_python_prepare_all
}
python_test() {
"${PYTHON}" testall.py || die
}
src_install() {
distutils-r1_src_install
if use emacs; then
elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die "elisp-site-file-install failed"
fi
}
pkg_postinst() {
use emacs && elisp-site-regen
}
pkg_postrm() {
use emacs && elisp-site-regen
}