summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs/btrfs-progs/btrfs-progs-9999.ebuild')
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-9999.ebuild19
1 files changed, 16 insertions, 3 deletions
diff --git a/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild b/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild
index 0b955eb22a02..0936ade75910 100644
--- a/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild
+++ b/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild
@@ -3,14 +3,16 @@
EAPI=6
-inherit bash-completion-r1
+PYTHON_COMPAT=( python3_{4,5,6} )
+
+inherit bash-completion-r1 python-single-r1
libbtrfs_soname=0
if [[ ${PV} != 9999 ]]; then
MY_PV="v${PV/_/-}"
[[ "${PV}" = *_rc* ]] || \
- KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
S="${WORKDIR}"/${PN}-${MY_PV}
else
@@ -25,7 +27,7 @@ HOMEPAGE="https://btrfs.wiki.kernel.org"
LICENSE="GPL-2"
SLOT="0/${libbtrfs_soname}"
-IUSE="+convert reiserfs static static-libs +zstd"
+IUSE="+convert python reiserfs static static-libs +zstd"
RESTRICT=test # tries to mount repared filesystems
@@ -40,6 +42,7 @@ RDEPEND="
>=sys-fs/reiserfsprogs-3.6.27
)
)
+ python? ( ${PYTHON_DEPS} )
zstd? ( app-arch/zstd:0= )
"
DEPEND="${RDEPEND}
@@ -47,6 +50,7 @@ DEPEND="${RDEPEND}
>=app-text/asciidoc-8.6.0
app-text/docbook-xml-dtd:4.5
app-text/xmlto
+ python? ( dev-python/setuptools[${PYTHON_USEDEP}] )
static? (
dev-libs/lzo:2[static-libs(+)]
sys-apps/util-linux:0[static-libs(+)]
@@ -66,6 +70,12 @@ if [[ ${PV} == 9999 ]]; then
DEPEND+=" sys-devel/gnuconfig"
fi
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
src_prepare() {
default
if [[ ${PV} == 9999 ]]; then
@@ -84,6 +94,7 @@ src_configure() {
--bindir="${EPREFIX}"/sbin
$(use_enable convert)
$(use_enable elibc_glibc backtrace)
+ $(use_enable python)
$(use_enable zstd)
--with-convert=ext2$(usex reiserfs ',reiserfs' '')
)
@@ -96,9 +107,11 @@ src_compile() {
src_install() {
local makeargs=(
+ $(usex python install_python '')
$(usex static-libs '' 'libs_static=')
$(usex static install-static '')
)
emake V=1 DESTDIR="${D}" install "${makeargs[@]}"
newbashcomp btrfs-completion btrfs
+ use python && python_optimize
}