diff options
Diffstat (limited to '')
-rw-r--r-- | dev-python/bicyclerepair/bicyclerepair-0.9-r1.ebuild | 65 | ||||
-rw-r--r-- | dev-python/bicyclerepair/bicyclerepair-0.9-r1.ebuild.diff | 58 |
2 files changed, 123 insertions, 0 deletions
diff --git a/dev-python/bicyclerepair/bicyclerepair-0.9-r1.ebuild b/dev-python/bicyclerepair/bicyclerepair-0.9-r1.ebuild new file mode 100644 index 0000000..9f0954e --- /dev/null +++ b/dev-python/bicyclerepair/bicyclerepair-0.9-r1.ebuild @@ -0,0 +1,65 @@ +# 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-r1.ebuild,v 1.2 2008/03/21 09:16:16 opfer Exp $ + +inherit distutils elisp-common eutils + +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 +PYTHON_MODNAME="bike" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/bicyclerepair-fix-invalid-syntax.patch" "${FILESDIR}/bicyclerepair-fix-idle.patch" + # 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() { + python_version + # Enable IDLE integration if Python was compiled with tcltk. + config_txt="${ROOT}usr/$(get_libdir)/python${PYVER}/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" + fi + use emacs && elisp-site-regen + + # compile python files -- including the ones not installed into site-packages + distutils_pkg_postinst + python_mod_compile /usr/$(get_libdir)/python${PYVER}/site-packages/bikeemacs.py + python_mod_compile /usr/$(get_libdir)/python${PYVER}/site-packages/BicycleRepairMan_Idle.py +} + +pkg_postrm() { + use emacs && elisp-site-regen + + # as there are files not installed into site-packages, we need to run + # python_mod_cleanup instead of distutils_pkg_postrm + python_mod_cleanup +} diff --git a/dev-python/bicyclerepair/bicyclerepair-0.9-r1.ebuild.diff b/dev-python/bicyclerepair/bicyclerepair-0.9-r1.ebuild.diff new file mode 100644 index 0000000..db56479 --- /dev/null +++ b/dev-python/bicyclerepair/bicyclerepair-0.9-r1.ebuild.diff @@ -0,0 +1,58 @@ +--- /usr/portage/dev-python/bicyclerepair/bicyclerepair-0.9-r1.ebuild 2008-03-21 10:36:17.000000000 +0100 ++++ bicyclerepair-0.9-r1.ebuild 2008-07-21 22:16:38.000000000 +0200 +@@ -2,7 +2,7 @@ + # Distributed under the terms of the GNU General Public License v2 + # $Header: /var/cvsroot/gentoo-x86/dev-python/bicyclerepair/bicyclerepair-0.9-r1.ebuild,v 1.2 2008/03/21 09:16:16 opfer Exp $ + +-inherit distutils elisp-common ++inherit distutils elisp-common eutils + + DESCRIPTION="Bicycle Repair Man is the Python Refactoring Browser" + HOMEPAGE="http://bicyclerepair.sourceforge.net/" +@@ -18,10 +18,12 @@ + app-emacs/python-mode )" + + SITEFILE=50${PN}-gentoo.el ++PYTHON_MODNAME="bike" + + src_unpack() { + unpack ${A} + cd "${S}" ++ epatch "${FILESDIR}/bicyclerepair-fix-invalid-syntax.patch" "${FILESDIR}/bicyclerepair-fix-idle.patch" + # bikeemacs.py contains non-ascii characters in comments + sed -i -e '1s/$/\t-*- coding: latin-1 -*-/' ide-integration/bikeemacs.py + } +@@ -34,9 +36,9 @@ + } + + pkg_postinst() { ++ python_version + # 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 ++ config_txt="${ROOT}usr/$(get_libdir)/python${PYVER}/tools/idle/config.txt" + if [ -f "${config_txt}" ]; + then + if [ -z "`grep BicycleRepairMan_Idle ${config_txt}`" ]; then +@@ -44,11 +46,20 @@ + echo "[BicycleRepairMan_Idle]" >> ${config_txt} + fi + else +- elog "BicycleRepairMan won't integrate with IDLE included in Python 2.3*" ++ elog "BicycleRepairMan won't integrate with IDLE" + fi + use emacs && elisp-site-regen ++ ++ # compile python files -- including the ones not installed into site-packages ++ distutils_pkg_postinst ++ python_mod_compile /usr/$(get_libdir)/python${PYVER}/site-packages/bikeemacs.py ++ python_mod_compile /usr/$(get_libdir)/python${PYVER}/site-packages/BicycleRepairMan_Idle.py + } + + pkg_postrm() { + use emacs && elisp-site-regen ++ ++ # as there are files not installed into site-packages, we need to run ++ # python_mod_cleanup instead of distutils_pkg_postrm ++ python_mod_cleanup + } |