--- pycairo-1.8.4.ebuild 2009-07-06 19:31:12.712400584 +0100 +++ pycairo-1.8.4.ebuild 2009-07-06 19:33:39.256400346 +0100 @@ -13,14 +13,15 @@ LICENSE="|| ( LGPL-2.1 MPL-1.1 )" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" -IUSE="examples" +IUSE="doc examples" -RDEPEND=">=x11-libs/cairo-1.8.4" +RDEPEND=">=x11-libs/cairo-1.8.6" DEPEND="${RDEPEND} - dev-util/pkgconfig" + dev-util/pkgconfig + doc? ( dev-python/sphinx )" PYTHON_MODNAME="cairo" -DOCS="AUTHORS NEWS doc/*" +DOCS="AUTHORS NEWS" src_unpack() { unpack ${A} @@ -32,9 +33,23 @@ cairo/Makefile.in || die "sed in cairo/Makefile.in failed" } +src_compile() { + distutils_src_compile + + if use doc ; then + econf + cd "${S}"/doc + make html || die "Building html docs failed" + fi +} + src_install() { distutils_src_install - + + if use doc ; then + dohtml -r doc/.build/html/ + fi + if use examples ; then insinto /usr/share/doc/${PF}/examples doins -r examples/*