Skip to content

Commit

Permalink
dev-vcs/qct: Fix python, EAPI 6
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.4, Repoman-2.3.2
  • Loading branch information
SoapGentoo committed Mar 11, 2017
1 parent dc4336d commit 0320a5d
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions dev-vcs/qct/qct-1.7-r1.ebuild → dev-vcs/qct/qct-1.7-r2.ebuild
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}] )
Expand All @@ -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
}

0 comments on commit 0320a5d

Please sign in to comment.