]> code.ossystems Code Review - openembedded-core.git/commitdiff
btrfs-tools: Add PACKAGECONFIG knob for controlling python support
authorJacob Kroon <jacob.kroon@gmail.com>
Thu, 29 Aug 2019 14:22:02 +0000 (16:22 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 31 Aug 2019 07:44:19 +0000 (08:44 +0100)
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/btrfs-tools/btrfs-tools_5.2.1.bb

index 647516cf9240dbec8f61c7dd5d48ac074b945581..a364cf53ed1287984d78e20e18aa53584c7d785e 100644 (file)
@@ -10,7 +10,7 @@ HOMEPAGE = "https://btrfs.wiki.kernel.org"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
 SECTION = "base"
-DEPENDS = "util-linux attr e2fsprogs lzo acl python3-setuptools-native"
+DEPENDS = "util-linux attr e2fsprogs lzo acl"
 DEPENDS_append_class-target = " udev"
 RDEPENDS_${PN} = "libgcc"
 
@@ -19,13 +19,16 @@ SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
            file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \
            "
 
-inherit autotools-brokensep pkgconfig manpages distutils3-base
-
-CLEANBROKEN = "1"
-
+PACKAGECONFIG ??= "python"
 PACKAGECONFIG[manpages] = "--enable-documentation, --disable-documentation, asciidoc-native xmlto-native"
+PACKAGECONFIG[python] = "--enable-python,--disable-python,python3-setuptools-native"
 PACKAGECONFIG[zstd] = "--enable-zstd,--disable-zstd,zstd"
 
+inherit autotools-brokensep pkgconfig manpages
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'distutils3-base', '', d)}
+
+CLEANBROKEN = "1"
+
 EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
 EXTRA_PYTHON_CFLAGS = "${DEBUG_PREFIX_MAP}"
 EXTRA_PYTHON_CFLAGS_class-native = ""
@@ -41,7 +44,9 @@ do_configure_prepend() {
 S = "${WORKDIR}/git"
 
 do_install_append() {
-    oe_runmake 'DESTDIR=${D}' 'PYTHON_SITEPACKAGES_DIR=${PYTHON_SITEPACKAGES_DIR}' install_python
+    if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then
+        oe_runmake 'DESTDIR=${D}' 'PYTHON_SITEPACKAGES_DIR=${PYTHON_SITEPACKAGES_DIR}' install_python
+    fi
 }
 
 BBCLASSEXTEND = "native"