All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] bluez5: make readline support conditional.
@ 2017-01-25 13:03 Ismo Puustinen
  2017-01-25 13:03 ` [PATCH 2/2] python3: make readline, gdbm, and db " Ismo Puustinen
  0 siblings, 1 reply; 3+ messages in thread
From: Ismo Puustinen @ 2017-01-25 13:03 UTC (permalink / raw)
  To: openembedded-core

Add readline support to PACKAGECONFIG. If readline needs if left out
of compilation, the bluez utilities which depend on readline are not
included in build or packages.

The defaults in PACKAGECONFIG are the same as before, so there should be
no change to current users.

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
---
 meta/recipes-connectivity/bluez5/bluez5.inc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc
index 55a5055..ed75db2 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -6,15 +6,16 @@ LICENSE = "GPLv2+ & LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
                     file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
                     file://src/main.c;beginline=1;endline=24;md5=9bc54b93cd7e17bf03f52513f39f926e"
-DEPENDS = "udev libusb dbus-glib glib-2.0 libcheck readline"
+DEPENDS = "udev libusb dbus-glib glib-2.0 libcheck"
 PROVIDES += "bluez-hcidump"
 RPROVIDES_${PN} += "bluez-hcidump"
 
 RCONFLICTS_${PN} = "bluez4"
 
-PACKAGECONFIG ??= "obex-profiles"
+PACKAGECONFIG ??= "obex-profiles readline"
 PACKAGECONFIG[obex-profiles] = "--enable-obex,--disable-obex,libical"
 PACKAGECONFIG[experimental] = "--enable-experimental,--disable-experimental,"
+PACKAGECONFIG[readline] = "--enable-client,--disable-client,readline,"
 
 SRC_URI = "\
     ${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
@@ -42,7 +43,7 @@ EXTRA_OECONF = "\
 NOINST_TOOLS_READLINE ??= ""
 NOINST_TOOLS_EXPERIMENTAL ??= ""
 NOINST_TOOLS = " \
-    ${NOINST_TOOLS_READLINE} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'readline', '${NOINST_TOOLS_READLINE}', '', d)} \
     ${@bb.utils.contains('PACKAGECONFIG', 'experimental', '${NOINST_TOOLS_EXPERIMENTAL}', '', d)} \
 "
 
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] python3: make readline, gdbm, and db support conditional.
  2017-01-25 13:03 [PATCH 1/2] bluez5: make readline support conditional Ismo Puustinen
@ 2017-01-25 13:03 ` Ismo Puustinen
  2017-01-25 15:05   ` Burton, Ross
  0 siblings, 1 reply; 3+ messages in thread
From: Ismo Puustinen @ 2017-01-25 13:03 UTC (permalink / raw)
  To: openembedded-core

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 <ismo.puustinen@intel.com>
---
 meta/recipes-devtools/python/python3_3.5.2.bb | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python3_3.5.2.bb b/meta/recipes-devtools/python/python3_3.5.2.bb
index 2ff7c9e..1a78a36 100644
--- a/meta/recipes-devtools/python/python3_3.5.2.bb
+++ b/meta/recipes-devtools/python/python3_3.5.2.bb
@@ -1,6 +1,6 @@
 require recipes-devtools/python/python.inc
 
-DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz"
+DEPENDS = "python3-native libffi bzip2 openssl sqlite3 zlib virtual/libintl xz"
 PR = "${INC_PR}.0"
 PYTHON_MAJMIN = "3.5"
 PYTHON_BINABI= "${PYTHON_MAJMIN}m"
@@ -76,6 +76,11 @@ export CROSSPYTHONPATH = "${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dy
 # No ctypes option for python 3
 PYTHONLSBOPTS = ""
 
+PACKAGECONFIG ??= "readline gdbm db"
+PACKAGECONFIG[readline] = ",,readline"
+PACKAGECONFIG[gdbm] = ",,gdbm"
+PACKAGECONFIG[db] = ",,db"
+
 do_configure_append() {
 	rm -f ${S}/Makefile.orig
 	autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
@@ -194,7 +199,7 @@ require python-${PYTHON_MAJMIN}-manifest.inc
 
 # manual dependency additions
 RPROVIDES_${PN}-core = "${PN}"
-RRECOMMENDS_${PN}-core = "${PN}-readline"
+RRECOMMENDS_${PN}-core = "${@bb.utils.contains('PACKAGECONFIG', 'readline', '${PN}-readline', '', d)}"
 RRECOMMENDS_${PN}-crypt = "openssl"
 RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
 
@@ -222,3 +227,8 @@ PACKAGES += "${PN}-man"
 FILES_${PN}-man = "${datadir}/man"
 
 BBCLASSEXTEND = "nativesdk"
+
+# if readline is not there, don't create python3-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)}"
-- 
2.9.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] python3: make readline, gdbm, and db support conditional.
  2017-01-25 13:03 ` [PATCH 2/2] python3: make readline, gdbm, and db " Ismo Puustinen
@ 2017-01-25 15:05   ` Burton, Ross
  0 siblings, 0 replies; 3+ messages in thread
From: Burton, Ross @ 2017-01-25 15:05 UTC (permalink / raw)
  To: Ismo Puustinen; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

On 25 January 2017 at 13:03, Ismo Puustinen <ismo.puustinen@intel.com>
wrote:

> +PACKAGECONFIG ??= "readline gdbm db"
> +PACKAGECONFIG[readline] = ",,readline"
> +PACKAGECONFIG[gdbm] = ",,gdbm"
> +PACKAGECONFIG[db] = ",,db"
>

Whilst recipe-specific-sysroots makes this mostly moot, if the configure
script uses AC_CHECK_LIB or similar then you can seed the result of that
with the right cache variable (such as something like ac_cv_readline=no).

Ross

[-- Attachment #2: Type: text/html, Size: 917 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-25 15:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-25 13:03 [PATCH 1/2] bluez5: make readline support conditional Ismo Puustinen
2017-01-25 13:03 ` [PATCH 2/2] python3: make readline, gdbm, and db " Ismo Puustinen
2017-01-25 15:05   ` Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.