Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/btrfs-progs/
Date: Mon, 09 Apr 2018 08:54:09
Message-Id: 1523264035.fb48e64affbd9c43022edd3bbae29f375074e81a.polynomial-c@gentoo
1 commit: fb48e64affbd9c43022edd3bbae29f375074e81a
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 9 08:41:59 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 9 08:53:55 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb48e64a
7
8 sys-fs/btrfs-progs: Added python support.
9
10 Package-Manager: Portage-2.3.28, Repoman-2.3.9
11
12 sys-fs/btrfs-progs/btrfs-progs-9999.ebuild | 19 ++++++++++++++++---
13 1 file changed, 16 insertions(+), 3 deletions(-)
14
15 diff --git a/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild b/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild
16 index 0b955eb22a0..0936ade7591 100644
17 --- a/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild
18 +++ b/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild
19 @@ -3,14 +3,16 @@
20
21 EAPI=6
22
23 -inherit bash-completion-r1
24 +PYTHON_COMPAT=( python3_{4,5,6} )
25 +
26 +inherit bash-completion-r1 python-single-r1
27
28 libbtrfs_soname=0
29
30 if [[ ${PV} != 9999 ]]; then
31 MY_PV="v${PV/_/-}"
32 [[ "${PV}" = *_rc* ]] || \
33 - KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
34 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
35 SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
36 S="${WORKDIR}"/${PN}-${MY_PV}
37 else
38 @@ -25,7 +27,7 @@ HOMEPAGE="https://btrfs.wiki.kernel.org"
39
40 LICENSE="GPL-2"
41 SLOT="0/${libbtrfs_soname}"
42 -IUSE="+convert reiserfs static static-libs +zstd"
43 +IUSE="+convert python reiserfs static static-libs +zstd"
44
45 RESTRICT=test # tries to mount repared filesystems
46
47 @@ -40,6 +42,7 @@ RDEPEND="
48 >=sys-fs/reiserfsprogs-3.6.27
49 )
50 )
51 + python? ( ${PYTHON_DEPS} )
52 zstd? ( app-arch/zstd:0= )
53 "
54 DEPEND="${RDEPEND}
55 @@ -47,6 +50,7 @@ DEPEND="${RDEPEND}
56 >=app-text/asciidoc-8.6.0
57 app-text/docbook-xml-dtd:4.5
58 app-text/xmlto
59 + python? ( dev-python/setuptools[${PYTHON_USEDEP}] )
60 static? (
61 dev-libs/lzo:2[static-libs(+)]
62 sys-apps/util-linux:0[static-libs(+)]
63 @@ -66,6 +70,12 @@ if [[ ${PV} == 9999 ]]; then
64 DEPEND+=" sys-devel/gnuconfig"
65 fi
66
67 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
68 +
69 +pkg_setup() {
70 + use python && python-single-r1_pkg_setup
71 +}
72 +
73 src_prepare() {
74 default
75 if [[ ${PV} == 9999 ]]; then
76 @@ -84,6 +94,7 @@ src_configure() {
77 --bindir="${EPREFIX}"/sbin
78 $(use_enable convert)
79 $(use_enable elibc_glibc backtrace)
80 + $(use_enable python)
81 $(use_enable zstd)
82 --with-convert=ext2$(usex reiserfs ',reiserfs' '')
83 )
84 @@ -96,9 +107,11 @@ src_compile() {
85
86 src_install() {
87 local makeargs=(
88 + $(usex python install_python '')
89 $(usex static-libs '' 'libs_static=')
90 $(usex static install-static '')
91 )
92 emake V=1 DESTDIR="${D}" install "${makeargs[@]}"
93 newbashcomp btrfs-completion btrfs
94 + use python && python_optimize
95 }