From 960ae303aa5d116d75cc1e5bbd6e8821e7ce5ded Mon Sep 17 00:00:00 2001 From: Ismo Puustinen Date: Wed, 19 Apr 2017 12:32:42 +0300 Subject: [PATCH 1/3] python: make readline, gdbm, and db support conditional. The three libraries' (readline, gdbm, and db) licenses belong to the GPLv3 family. Add them to to PACKAGECONFIG so they can be switched off if the licensing doesn't allow using them. Python build system autodetects the dependencies but doesn't allow them to be explicitly disabled, so just deal with the dependencies. The defaults in PACKAGECONFIG are the same as before, so there should be no change to current users. Signed-off-by: Ismo Puustinen --- .../recipes-devtools/python/python_%.bbappend | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 meta-refkit/recipes-devtools/python/python_%.bbappend diff --git a/meta-refkit/recipes-devtools/python/python_%.bbappend b/meta-refkit/recipes-devtools/python/python_%.bbappend new file mode 100644 index 0000000000..41eb32aada --- /dev/null +++ b/meta-refkit/recipes-devtools/python/python_%.bbappend @@ -0,0 +1,13 @@ +DEPENDS_remove = "readline gdbm db" + +PACKAGECONFIG ??= "readline gdbm db" +PACKAGECONFIG[readline] = ",,readline" +PACKAGECONFIG[gdbm] = ",,gdbm" +PACKAGECONFIG[db] = ",,db" + +RRECOMMENDS_${PN}-core = "${@bb.utils.contains('PACKAGECONFIG', 'readline', '${PN}-readline', '', d)}" + +# if readline is not there, don't create python-readline package +PACKAGES_remove += "${@bb.utils.contains('PACKAGECONFIG', 'readline', '', '${PN}-readline', d)}" +PROVIDES_remove += "${@bb.utils.contains('PACKAGECONFIG', 'readline', '', '${PN}-readline', d)}" +RDEPENDS_${PN}-modules_remove += "${@bb.utils.contains('PACKAGECONFIG', 'readline', '', '${PN}-readline', d)}" From 8866191a38523ad44c42dc6fec42b1973d3b3a82 Mon Sep 17 00:00:00 2001 From: Ismo Puustinen Date: Wed, 19 Apr 2017 12:34:52 +0300 Subject: [PATCH 2/3] config: remove Python configuration options. This configures Python so that it doesn't depend on any GPLv3 components. Signed-off-by: Ismo Puustinen --- meta-refkit/conf/distro/refkit.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-refkit/conf/distro/refkit.conf b/meta-refkit/conf/distro/refkit.conf index b562acf84f..e39e810b6e 100644 --- a/meta-refkit/conf/distro/refkit.conf +++ b/meta-refkit/conf/distro/refkit.conf @@ -76,6 +76,7 @@ PACKAGECONFIG_remove_pn-pulseaudio = "avahi" # leave out readline, gdbm, and db PACKAGECONFIG_pn-python3 = "" +PACKAGECONFIG_pn-python ?= "" # since we have OpenCL support, turn it on PACKAGECONFIG_append_pn-opencv = " opencl" From c093841f0c57a5d50b05c3d07aa51c5ce7d3e5b6 Mon Sep 17 00:00:00 2001 From: Ismo Puustinen Date: Wed, 19 Apr 2017 12:46:13 +0300 Subject: [PATCH 3/3] config: set Python3 PACKAGECONFIG with weaker default value. Signed-off-by: Ismo Puustinen --- meta-refkit/conf/distro/refkit.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-refkit/conf/distro/refkit.conf b/meta-refkit/conf/distro/refkit.conf index e39e810b6e..f1ac816ad2 100644 --- a/meta-refkit/conf/distro/refkit.conf +++ b/meta-refkit/conf/distro/refkit.conf @@ -75,7 +75,7 @@ BAD_RECOMMENDATIONS += "bluez5-client" PACKAGECONFIG_remove_pn-pulseaudio = "avahi" # leave out readline, gdbm, and db -PACKAGECONFIG_pn-python3 = "" +PACKAGECONFIG_pn-python3 ?= "" PACKAGECONFIG_pn-python ?= "" # since we have OpenCL support, turn it on