From: David Seifert Date: Sat, 11 Mar 2017 09:39:59 +0000 (+0100) Subject: dev-vcs/qct: Fix python, EAPI 6 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=0320a5d61c04de62c40029900f95b7bbcc170673;p=gentoo.git dev-vcs/qct: Fix python, EAPI 6 Package-Manager: Portage-2.3.4, Repoman-2.3.2 --- diff --git a/dev-vcs/qct/qct-1.7-r1.ebuild b/dev-vcs/qct/qct-1.7-r2.ebuild similarity index 57% rename from dev-vcs/qct/qct-1.7-r1.ebuild rename to dev-vcs/qct/qct-1.7-r2.ebuild index f87df10dae1d..0093c1bb1ff4 100644 --- a/dev-vcs/qct/qct-1.7-r1.ebuild +++ b/dev-vcs/qct/qct-1.7-r2.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=6 PYTHON_COMPAT=( python2_7 ) DISTUTILS_SINGLE_IMPL=1 @@ -17,7 +17,8 @@ SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="bazaar cvs mercurial monotone subversion" -DEPEND="app-text/asciidoc[${PYTHON_USEDEP}] +DEPEND=" + app-text/asciidoc app-text/xmlto dev-python/PyQt4[${PYTHON_USEDEP}] bazaar? ( dev-vcs/bzr[${PYTHON_USEDEP}] ) @@ -29,43 +30,42 @@ RDEPEND="${DEPEND}" S="${WORKDIR}/${PN}" -pkg_setup() { - python-single-r1_pkg_setup -} - -src_prepare() { - distutils-r1_src_prepare +python_prepare_all() { + # support for git requires cogito which isn't in portage + rm qctlib/vcs/{p4,git,cg}.py || die - rm qctlib/vcs/p4.py + declare -A delfiles=([bazaar]=bzr [cvs]=cvs [mercurial]=hg [monotone]=mtn [subversion]=svn) + local i + for i in "${!delfiles[@]}"; do + if ! use $i; then + rm qctlib/vcs/${delfiles[$i]}.py || die + fi + done - # support for git requires cogito which isn't in portage - rm qctlib/vcs/git.py - rm qctlib/vcs/cg.py - - use bazaar || rm qctlib/vcs/bzr.py - use cvs || rm qctlib/vcs/cvs.py - use mercurial || rm qctlib/vcs/hg.py - use monotone || rm qctlib/vcs/mtn.py - use subversion || rm qctlib/vcs/svn.py + distutils-r1_python_prepare_all } -src_install() { - distutils-r1_src_install - +python_compile_all() { # manpage and html docs are built using asciidoc - make -C doc man html || die - doman doc/qct.1 || die - dohtml doc/qct.1.html || die + emake -C doc man html + HTML_DOCS=( doc/qct.1.html ) +} + +python_install_all() { + doman doc/qct.1 if use bazaar; then - insinto "$(python_get_sitedir)/bzrlib/plugins" - doins plugins/qctBzrPlugin.py + python_moduleinto bzrlib/plugins + python_domodule plugins/qctBzrPlugin.py fi if use mercurial; then - insinto "$(python_get_sitedir)/hgext" - doins hgext/qct.py + python_moduleinto hgext + python_domodule hgext/qct.py + insinto /etc/mercurial/hgrc.d doins "${FILESDIR}/qct.rc" fi + + distutils-r1_python_install_all }