summaryrefslogtreecommitdiff
path: root/dev-python/bicyclerepair/bicyclerepair-0.9.ebuild
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dev-python/bicyclerepair/bicyclerepair-0.9.ebuild54
1 files changed, 54 insertions, 0 deletions
diff --git a/dev-python/bicyclerepair/bicyclerepair-0.9.ebuild b/dev-python/bicyclerepair/bicyclerepair-0.9.ebuild
new file mode 100644
index 0000000..9a43d07
--- /dev/null
+++ b/dev-python/bicyclerepair/bicyclerepair-0.9.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/bicyclerepair/bicyclerepair-0.9.ebuild,v 1.8 2008/01/23 21:45:35 opfer Exp $
+
+inherit distutils 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="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="emacs"
+
+DEPEND="virtual/python
+ emacs? ( app-emacs/pymacs
+ app-emacs/python-mode )"
+
+SITEFILE=50${PN}-gentoo.el
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # bikeemacs.py contains non-ascii characters in comments
+ sed -i -e '1s/$/\t-*- coding: latin-1 -*-/' ide-integration/bikeemacs.py
+}
+
+src_install() {
+ distutils_src_install
+ if use emacs; then
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
+ fi
+}
+
+pkg_postinst() {
+ # Enable IDLE integration if Python was compiled with tcltk.
+ PYTHON_VER=$(python -V 2>&1 | sed -e 's:Python \([0-9].[0-9]\).*:\1:')
+ config_txt=/usr/lib/python${PYTHON_VER}/tools/idle/config.txt
+ if [ -f "${config_txt}" ];
+ then
+ if [ -z "`grep BicycleRepairMan_Idle ${config_txt}`" ]; then
+ elog "Appending BicycleRepairman to IDLE.."
+ echo "[BicycleRepairMan_Idle]" >> ${config_txt}
+ fi
+ else
+ elog "BicycleRepairMan won't integrate with IDLE included in Python 2.3*"
+ fi
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}