--- /usr/portage/media-gfx/graphviz/graphviz-2.36.0.ebuild 2014-02-06 16:31:21.000000000 +0400 +++ /var/db/paludis/repositories/zaufi-overlay/media-gfx/graphviz/graphviz-2.36.0-r2.ebuild 2014-02-17 04:55:34.028541787 +0400 @@ -3,9 +3,9 @@ # $Header: /var/cvsroot/gentoo-x86/media-gfx/graphviz/graphviz-2.36.0.ebuild,v 1.2 2014/02/06 12:19:14 kensington Exp $ EAPI=5 -PYTHON_COMPAT=( python{2_6,2_7} ) +PYTHON_COMPAT=( python{2_6,2_7,3_3} ) -inherit autotools eutils flag-o-matic java-pkg-opt-2 multilib python-single-r1 +inherit autotools eutils flag-o-matic java-pkg-opt-2 multilib python-r1 DESCRIPTION="Open Source Graph Visualization Software" HOMEPAGE="http://www.graphviz.org/" @@ -129,15 +129,14 @@ # with flags enabled at configure time pkg_setup() { - use python && python-single-r1_pkg_setup - java-pkg-opt-2_pkg_setup } src_prepare() { epatch \ "${FILESDIR}"/${PN}-2.34.0-Xaw-configure.patch \ - "${FILESDIR}"/${PN}-2.34.0-dot-pangocairo-link.patch + "${FILESDIR}"/${PN}-2.34.0-dot-pangocairo-link.patch \ + "${FILESDIR}"/${P}-python3-compat.patch # ToDo: Do the same thing for examples and/or # write a patch for a configuration-option @@ -168,6 +167,13 @@ use java && append-cppflags $(java-pkg_get-jni-cflags) + # 2.36.0 has assertion failure w/ some graphite flags: + # dot: mincross.c:1077: install_in_rank: Assertion ` + # (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->rank)[r].n <= + # (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->rank)[r].an' failed. + # So, turn graphite options OFF + filter-flags -floop* -fgraphite* -ftree-loop* -fivopts + eautoreconf } @@ -212,11 +218,17 @@ --disable-ocaml $(use_enable perl) --disable-php - $(use_enable python) --disable-r $(use_enable ruby) --disable-sharp $(use_enable tcl)" + if use python; then + _prepare_python_configure_params() { + local -r _current_python=$(sed 's,\.,,' <<<${EPYTHON}) + eval "myconf=\"${myconf} $(use_enable python ${_current_python})\"" + } + python_foreach_impl _prepare_python_configure_params + fi econf \ --enable-ltdl \ @@ -242,9 +254,12 @@ dodoc AUTHORS ChangeLog NEWS README - use python && python_optimize \ - "${D}$(python_get_sitedir)" \ - "${D}/usr/$(get_libdir)/graphviz/python" + if use python; then + _compile_python_bytecode() { + python_optimize "${D}$(python_get_sitedir)" + } + python_foreach_impl _compile_python_bytecode + fi } pkg_postinst() {