Adds python3_5 to PYTHON_COMPAT in revbump
[gentoo.git] / app-portage / layman / layman-9999.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6
7 PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} pypy )
8 PYTHON_REQ_USE="xml(+),sqlite?"
9
10 inherit eutils distutils-r1 git-2 linux-info prefix
11
12 DESCRIPTION="Tool to manage Gentoo overlays"
13 HOMEPAGE="http://layman.sourceforge.net"
14 SRC_URI=""
15 EGIT_REPO_URI="git://anongit.gentoo.org/proj/layman.git"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS=""
20 IUSE="bazaar cvs darcs +git gpg g-sorcery mercurial sqlite squashfs subversion sync-plugin-portage test"
21
22 DEPEND="test? ( dev-vcs/subversion )
23         app-text/asciidoc
24         "
25
26 RDEPEND="
27         bazaar? ( dev-vcs/bzr )
28         cvs? ( dev-vcs/cvs )
29         darcs? ( dev-vcs/darcs )
30         git? ( dev-vcs/git )
31         mercurial? ( dev-vcs/mercurial )
32         g-sorcery? ( app-portage/g-sorcery )
33         subversion? (
34                 || (
35                         >=dev-vcs/subversion-1.5.4[http]
36                         >=dev-vcs/subversion-1.5.4[webdav-neon]
37                         >=dev-vcs/subversion-1.5.4[webdav-serf]
38                 )
39         )
40         gpg? ( =dev-python/pyGPG-9999 )
41         sync-plugin-portage?  ( >=sys-apps/portage-2.2.16[${PYTHON_USEDEP}] )
42         !sync-plugin-portage? ( sys-apps/portage[${PYTHON_USEDEP}] )
43         >=dev-python/ssl-fetch-0.2[${PYTHON_USEDEP}]
44         "
45
46 layman_check_kernel_config() {
47         local CONFIG_CHECK
48         use squashfs && CONFIG_CHECK+=" ~BLK_DEV_LOOP ~SQUASHFS"
49         [[ -n ${CONFIG_CHECK} ]] && check_extra_config
50 }
51
52 pkg_pretend() {
53         layman_check_kernel_config
54 }
55
56 pkg_setup() {
57         layman_check_kernel_config
58 }
59
60 python_prepare_all()  {
61         python_setup
62         esetup.py setup_plugins
63         distutils-r1_python_prepare_all
64         eprefixify etc/layman.cfg layman/config.py
65 }
66
67 python_test() {
68         suite=layman/tests/external.py
69         PYTHONPATH="." "${PYTHON}" ${suite} || die "test suite '${suite}' failed"
70         unset suite
71 }
72
73 python_compile_all() {
74         # override MAKEOPTS to prevent build failure
75         emake -j1 -C doc
76 }
77
78 python_install_all() {
79         distutils-r1_python_install_all
80
81         insinto /etc/layman
82         doins etc/layman.cfg
83
84         doman doc/layman.8
85         dohtml doc/layman.8.html
86
87         keepdir /var/lib/layman
88         keepdir /etc/layman/overlays
89 }
90
91 pkg_postinst() {
92         # now run layman's update utility
93         einfo "Running layman-updater..."
94         "${EROOT}"/usr/bin/layman-updater
95         einfo
96 }