diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-08-12 01:17:09 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-08-12 01:17:09 +0000 |
commit | 8a00ccf9ebb8869ce864985ba43d00b10133e1f2 (patch) | |
tree | 5bb0a62894fb5285f206a8139415e67328e000f5 /dev-python/docutils | |
parent | cleanup. (diff) | |
download | gentoo-2-8a00ccf9ebb8869ce864985ba43d00b10133e1f2.tar.gz gentoo-2-8a00ccf9ebb8869ce864985ba43d00b10133e1f2.tar.bz2 gentoo-2-8a00ccf9ebb8869ce864985ba43d00b10133e1f2.zip |
Set SUPPORT_PYTHON_ABIS.
(Portage version: 14006-svn/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/docutils')
-rw-r--r-- | dev-python/docutils/ChangeLog | 8 | ||||
-rw-r--r-- | dev-python/docutils/docutils-0.5-r1.ebuild | 125 |
2 files changed, 132 insertions, 1 deletions
diff --git a/dev-python/docutils/ChangeLog b/dev-python/docutils/ChangeLog index b55be5e3c192..f242d57a35e3 100644 --- a/dev-python/docutils/ChangeLog +++ b/dev-python/docutils/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-python/docutils # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/docutils/ChangeLog,v 1.90 2009/08/09 13:16:13 nixnut Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/docutils/ChangeLog,v 1.91 2009/08/12 01:17:09 arfrever Exp $ + +*docutils-0.5-r1 (12 Aug 2009) + + 12 Aug 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> + +docutils-0.5-r1.ebuild: + Set SUPPORT_PYTHON_ABIS. 09 Aug 2009; nixnut <nixnut@gentoo.org> docutils-0.5.ebuild: ppc stable #278285 diff --git a/dev-python/docutils/docutils-0.5-r1.ebuild b/dev-python/docutils/docutils-0.5-r1.ebuild new file mode 100644 index 000000000000..ee8c6f05058f --- /dev/null +++ b/dev-python/docutils/docutils-0.5-r1.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/docutils/docutils-0.5-r1.ebuild,v 1.1 2009/08/12 01:17:09 arfrever Exp $ + +EAPI="2" + +NEED_PYTHON="2.4" +SUPPORT_PYTHON_ABIS="1" + +inherit distutils eutils multilib + +DESCRIPTION="Set of python tools for processing plaintext docs into HTML, XML, etc..." +HOMEPAGE="http://docutils.sourceforge.net/" +SRC_URI="mirror://sourceforge/docutils/${P}.tar.gz + glep? ( mirror://gentoo/glep-0.4-r1.tbz2 )" + +LICENSE="public-domain PYTHON BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +IUSE="glep emacs" + +DEPEND="dev-python/setuptools" +RDEPEND="" +# Emacs support is in PDEPEND to avoid a dependency cycle (bug #183242) +PDEPEND="emacs? ( >=app-emacs/rst-0.4 )" + +RESTRICT_PYTHON_ABIS="3*" + +EMP="${PN}-0.3.7" + +GLEP_SRC="${WORKDIR}/glep-0.4-r1" + +src_prepare() { + epatch "${FILESDIR}/${P}-test_node_class_names-python-2.6.patch" + + # simplified algorithm to select installing optparse and textwrap + epatch "${FILESDIR}/${EMP}-extramodules.patch" + + sed -i \ + -e 's/from distutils.core/from setuptools/' \ + setup.py || die "sed failed" +} + +src_compile() { + distutils_src_compile + + # Generate html docs from reStructured text sources. + + # make roman.py available for the doc building process + ln -s extras/roman.py + + pushd tools + + # Place html4css1.css in base directory. This makes sure the + # generated reference to it is correct. + cp ../docutils/writers/html4css1/html4css1.css .. + + PYTHONPATH=.. ${python} ./buildhtml.py --stylesheet-path=../html4css1.css --traceback .. \ + || die "buildhtml" + + popd + + # clean up after the doc building + rm roman.py html4css1.css +} + +install_txt_doc() { + local doc=${1} + local dir="txt/$(dirname ${doc})" + docinto ${dir} + dodoc ${doc} +} + +src_test() { + cd "${S}/test" + + testing() { + PYTHONPATH="../build-${PYTHON_ABI}/lib" ./alltests.py + } + python_execute_function testing +} + +src_install() { + DOCS="*.txt" + distutils_src_install + + # Tools + cd "${S}"/tools + for tool in *.py; do + dobin ${tool} + done + + # Docs + cd "${S}" + dohtml -r docs tools + # Manually install the stylesheet file + insinto /usr/share/doc/${PF}/html + doins docutils/writers/html4css1/html4css1.css + for doc in $(find docs tools -name '*.txt'); do + install_txt_doc $doc + done + + # installing Gentoo GLEP tools. Uses versioned GLEP distribution + if use glep; then + dobin ${GLEP_SRC}/glep.py || die "newbin failed" + + installation_of_glep_tools() { + insinto $(python_get_sitedir)/docutils/readers + newins ${GLEP_SRC}/glepread.py glep.py || die "newins reader failed" + insinto $(python_get_sitedir)/docutils/transforms + newins ${GLEP_SRC}/glepstrans.py gleps.py || die "newins transform failed" + insinto $(python_get_sitedir)/docutils/writers + doins -r ${GLEP_SRC}/glep_html || die "doins writer failed" + } + python_execute_function --action-message 'Installation of GLEP tools with Python ${PYTHON_ABI}...' installation_of_glep_tools + fi +} + +pkg_postinst() { + python_mod_optimize docutils roman.py +} + +pkg_postrm() { + python_mod_cleanup +} |