Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 232594 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/dev-python/bicyclerepair/bicyclerepair-0.9-r1.ebuild (-4 / +15 lines)
Lines 2-8 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/dev-python/bicyclerepair/bicyclerepair-0.9-r1.ebuild,v 1.2 2008/03/21 09:16:16 opfer Exp $
3
# $Header: /var/cvsroot/gentoo-x86/dev-python/bicyclerepair/bicyclerepair-0.9-r1.ebuild,v 1.2 2008/03/21 09:16:16 opfer Exp $
4
4
5
inherit distutils elisp-common
5
inherit distutils elisp-common eutils
6
6
7
DESCRIPTION="Bicycle Repair Man is the Python Refactoring Browser"
7
DESCRIPTION="Bicycle Repair Man is the Python Refactoring Browser"
8
HOMEPAGE="http://bicyclerepair.sourceforge.net/"
8
HOMEPAGE="http://bicyclerepair.sourceforge.net/"
Lines 18-27 Link Here
18
		app-emacs/python-mode )"
18
		app-emacs/python-mode )"
19
19
20
SITEFILE=50${PN}-gentoo.el
20
SITEFILE=50${PN}-gentoo.el
21
PYTHON_MODNAME="bike"
21
22
22
src_unpack() {
23
src_unpack() {
23
	unpack ${A}
24
	unpack ${A}
24
	cd "${S}"
25
	cd "${S}"
26
	epatch "${FILESDIR}/bicyclerepair-fix-invalid-syntax.patch"	"${FILESDIR}/bicyclerepair-fix-idle.patch"
25
	# bikeemacs.py contains non-ascii characters in comments
27
	# bikeemacs.py contains non-ascii characters in comments
26
	sed -i -e '1s/$/\t-*- coding: latin-1 -*-/' ide-integration/bikeemacs.py
28
	sed -i -e '1s/$/\t-*- coding: latin-1 -*-/' ide-integration/bikeemacs.py
27
}
29
}
Lines 34-42 Link Here
34
}
36
}
35
37
36
pkg_postinst() {
38
pkg_postinst() {
39
	python_version
37
	# Enable IDLE integration if Python was compiled with tcltk.
40
	# Enable IDLE integration if Python was compiled with tcltk.
38
	PYTHON_VER=$(python -V 2>&1 | sed -e 's:Python \([0-9].[0-9]\).*:\1:')
41
	config_txt="${ROOT}usr/$(get_libdir)/python${PYVER}/tools/idle/config.txt"
39
	config_txt=/usr/lib/python${PYTHON_VER}/tools/idle/config.txt
40
	if [ -f "${config_txt}" ];
42
	if [ -f "${config_txt}" ];
41
	then
43
	then
42
		if [ -z "`grep BicycleRepairMan_Idle ${config_txt}`" ]; then
44
		if [ -z "`grep BicycleRepairMan_Idle ${config_txt}`" ]; then
Lines 44-54 Link Here
44
			echo "[BicycleRepairMan_Idle]" >> ${config_txt}
46
			echo "[BicycleRepairMan_Idle]" >> ${config_txt}
45
		fi
47
		fi
46
	else
48
	else
47
		elog "BicycleRepairMan won't integrate with IDLE included in Python 2.3*"
49
		elog "BicycleRepairMan won't integrate with IDLE"
48
	fi
50
	fi
49
	use emacs && elisp-site-regen
51
	use emacs && elisp-site-regen
52
53
	# compile python files -- including the ones not installed into site-packages
54
	distutils_pkg_postinst
55
	python_mod_compile /usr/$(get_libdir)/python${PYVER}/site-packages/bikeemacs.py
56
	python_mod_compile /usr/$(get_libdir)/python${PYVER}/site-packages/BicycleRepairMan_Idle.py
50
}
57
}
51
58
52
pkg_postrm() {
59
pkg_postrm() {
53
	use emacs && elisp-site-regen
60
	use emacs && elisp-site-regen
61
62
	# as there are files not installed into site-packages, we need to run
63
	# python_mod_cleanup instead of distutils_pkg_postrm
64
	python_mod_cleanup
54
}
65
}

Return to bug 232594