commit:     c8e78899ede4fc19cef475e9043b55afd844778f
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  9 15:35:18 2019 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Apr  9 15:42:38 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8e78899

media-gfx/xdot: Rework live ebuild

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 media-gfx/xdot/xdot-9999.ebuild | 40 ++++++++++++++++++++++++++++++++--------
 1 file changed, 32 insertions(+), 8 deletions(-)

diff --git a/media-gfx/xdot/xdot-9999.ebuild b/media-gfx/xdot/xdot-9999.ebuild
index 6b682956a73..8842ac3a99a 100644
--- a/media-gfx/xdot/xdot-9999.ebuild
+++ b/media-gfx/xdot/xdot-9999.ebuild
@@ -1,23 +1,47 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
-PYTHON_COMPAT=( python2_7 )
+EAPI=7
+PYTHON_COMPAT=( python3_{5,6,7} )
 
-inherit distutils-r1 git-r3
+MY_PN=xdot.py
+EGIT_REPO_URI="https://github.com/jrfonseca/${MY_PN}";
+
+if [[ ${PV} = 9999* ]]; then
+       GIT_ECLASS="git-r3"
+       SRC_URI=""
+else
+       KEYWORDS="~amd64 ~x86"
+       MY_P="${MY_PN}-${PV}"
+       S="${WORKDIR}/${MY_P}"
+       SRC_URI="https://github.com/jrfonseca/${MY_PN}/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+fi
+
+inherit ${GIT_ECLASS} distutils-r1
 
 DESCRIPTION="Interactive viewer for Graphviz dot files"
 HOMEPAGE="https://github.com/jrfonseca/xdot.py";
-EGIT_REPO_URI="https://github.com/jrfonseca/xdot.py.git";
 
 LICENSE="LGPL-2+"
 SLOT="0"
-KEYWORDS=""
 
 DEPEND="
        dev-python/pycairo[${PYTHON_USEDEP}]
-       >=dev-python/pygtk-2.10:2[${PYTHON_USEDEP}]
+       dev-python/pygobject:3[${PYTHON_USEDEP}]
        dev-python/setuptools[${PYTHON_USEDEP}]
-       media-gfx/graphviz[${PYTHON_USEDEP}]
+       media-gfx/graphviz
 "
 RDEPEND="${DEPEND}"
+
+src_unpack() {
+       default
+       [[ $PV = 9999* ]] && git-r3_src_unpack
+}
+
+src_prepare() {
+       eapply_user
+
+       # Don't require graphviz python(2) supprt, which xdot doesn't use. This 
allows xdot to support python3.
+       # For more info, see https://bugs.gentoo.org/643126
+       sed -i "/install_requires=\['graphviz'\],/d" setup.py || die
+}

Reply via email to