summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-03-29 20:50:03 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-03-29 20:50:03 +0000
commit99f456dc1ee22dd273e48d453a1f5ac65c28cb22 (patch)
treef609b792622f17d62b79f8eb7e733597a21873b7 /app-text/pylize/pylize-1.3b.ebuild
parentDelete older ebuild. (diff)
downloadhistorical-99f456dc1ee22dd273e48d453a1f5ac65c28cb22.tar.gz
historical-99f456dc1ee22dd273e48d453a1f5ac65c28cb22.tar.bz2
historical-99f456dc1ee22dd273e48d453a1f5ac65c28cb22.zip
Fix collision with dev-python/docutils (bug #247424).
Set Python 2 as active version of Python. Package-Manager: portage-15841-svn/cvs/Linux x86_64
Diffstat (limited to 'app-text/pylize/pylize-1.3b.ebuild')
-rw-r--r--app-text/pylize/pylize-1.3b.ebuild44
1 files changed, 32 insertions, 12 deletions
diff --git a/app-text/pylize/pylize-1.3b.ebuild b/app-text/pylize/pylize-1.3b.ebuild
index 494d5d0d3f98..e137a41bae5b 100644
--- a/app-text/pylize/pylize-1.3b.ebuild
+++ b/app-text/pylize/pylize-1.3b.ebuild
@@ -1,6 +1,9 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/pylize/pylize-1.3b.ebuild,v 1.3 2010/01/17 13:44:51 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/pylize/pylize-1.3b.ebuild,v 1.4 2010/03/29 20:50:03 arfrever Exp $
+
+EAPI="3"
+PYTHON_DEPEND="2"
inherit python
@@ -11,25 +14,42 @@ SRC_URI="http://www.chrisarndt.de/en/software/pylize/download/${P}.tar.bz2"
IUSE=""
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="ppc x86"
+KEYWORDS="~amd64 ppc x86"
-DEPEND="virtual/python
- dev-python/empy
+DEPEND="dev-python/empy
dev-python/imaging"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ python_set_active_version 2
+}
src_compile() {
- einfo "no need to compile"
+ :
}
src_install() {
- python install.py ${D}/usr || die
+ "$(PYTHON)" install.py "${ED}usr" || die "Installation failed"
+
+ # Fix paths in pylize.
+ sed \
+ -e "s:^sys_libdir.*:sys_libdir = \'/usr/share/pylize\':" \
+ -e "s:sys.path.insert(0, sys_libdir):sys.path.remove('/usr/bin'):" \
+ -e "s:from roman import dec2roman:from pylize_roman import dec2roman:" \
+ -i "${ED}usr/bin/pylize" || die "sed failed"
- # Fix Data dir in code
- sed -e "s:^sys_libdir.*:sys_libdir = \'/usr/share/pylize\':" -i ${D}/usr/bin/pylize
+ # Rename roman.py to pylize_roman.py to avoid collision.
+ rm -f "${ED}usr/share/pylize/roman.py"
+ insinto $(python_get_sitedir)
+ newins lib/roman.py pylize_roman.py
- python_version
- insinto /usr/lib/python${PYVER}/site-packages
- doins lib/roman.py
+ dodoc Changelog README README.empy TODO
+}
+
+pkg_postinst() {
+ python_mod_optimize pylize_roman.py
+}
- dodoc COPYING Changelog README README.empy TODO
+pkg_postrm() {
+ python_mod_cleanup pylize_roman.py
}