From ec0eac55ff6109eb509cdc0818cc3961e9e7172d Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Fri, 1 Apr 2022 23:18:35 -0700 Subject: blueman: fix python site-packages installation issue The blueman is relying on host python to determine the target python site-packages directory which is not correct. Add a new option to fix this issue. Signed-off-by: Chen Qi Signed-off-by: Khem Raj --- .../0001-meson-add-pythoninstalldir-option.patch | 49 ++++++++++++++++++++++ .../recipes-connectivity/blueman/blueman_2.2.4.bb | 3 +- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch (limited to 'meta-networking/recipes-connectivity') diff --git a/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch b/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch new file mode 100644 index 0000000000..a52821915e --- /dev/null +++ b/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch @@ -0,0 +1,49 @@ +From 37f24a9bd62f0a8f3e37eaddd33f2f0c9d3aaa0a Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Fri, 1 Apr 2022 23:12:17 -0700 +Subject: [PATCH] meson: add pythoninstalldir option + +In case of cross build, using host python to determine the python +site-packages directory for target is not feasible, add a new option +pythoninstalldir to fix the issue. + +Upstream-Status: Submitted [https://github.com/blueman-project/blueman/pull/1699] + +Signed-off-by: Chen Qi +--- + meson.build | 7 ++++++- + meson_options.txt | 1 + + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index bc990cd..a37aacd 100644 +--- a/meson.build ++++ b/meson.build +@@ -26,7 +26,12 @@ pkgdatadir = join_paths([prefix, get_option('datadir'), package_name]) + bindir = join_paths([prefix, get_option('bindir')]) + libexecdir = join_paths([prefix, get_option('libexecdir')]) + schemadir = join_paths([datadir, 'glib-2.0', 'schemas']) +-pythondir = join_paths([prefix, python.sysconfig_path('purelib')]) ++pythoninstalldir = get_option('pythoninstalldir') ++if pythoninstalldir != '' ++ pythondir = join_paths([prefix, pythoninstalldir]) ++else ++ pythondir = join_paths([prefix, python.sysconfig_path('purelib')]) ++endif + + if get_option('policykit') + have_polkit = 'True' +diff --git a/meson_options.txt b/meson_options.txt +index b3e939f..96acbbc 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -5,5 +5,6 @@ option('pulseaudio', type: 'boolean', value: true, description: 'Enable PulseAud + option('appindicator', type: 'boolean', value: true, description: 'Enable Libappindicator support') + option('systemdsystemunitdir', type: 'string', description: 'Path to systemd system unit dir relative to ${prefix}') + option('systemduserunitdir', type: 'string', description: 'Path to systemd user unit dir relative to ${prefix}') ++option('pythoninstalldir', type: 'string', description: 'Path to python site-packages dir relative to ${prefix}') + option('sendto-plugins', type: 'array', choices: ['Caja', 'Nemo', 'Nautilus'], value: ['Caja', 'Nemo', 'Nautilus'], description: 'Install sendto plugins for various filemanagers') + option('thunar-sendto', type: 'boolean', value: true, description: 'Install Thunar sendto plugin') +-- +2.33.0 + diff --git a/meta-networking/recipes-connectivity/blueman/blueman_2.2.4.bb b/meta-networking/recipes-connectivity/blueman/blueman_2.2.4.bb index ea06ee67f7..d5aeceeb42 100644 --- a/meta-networking/recipes-connectivity/blueman/blueman_2.2.4.bb +++ b/meta-networking/recipes-connectivity/blueman/blueman_2.2.4.bb @@ -10,10 +10,11 @@ SRC_URI = " \ https://github.com/blueman-project/blueman/releases/download/${PV}/blueman-${PV}.tar.xz \ file://0001-Search-for-cython3.patch \ file://0002-fix-fail-to-enable-bluetooth.patch \ + file://0001-meson-add-pythoninstalldir-option.patch \ " SRC_URI[sha256sum] = "55d639feeda0b43b18a659e65985213a54b47dcb1348f3b4effb5238db242602" -EXTRA_OEMESON = "-Druntime_deps_check=false -Dappindicator=false" +EXTRA_OEMESON = "-Druntime_deps_check=false -Dappindicator=false -Dpythoninstalldir=${@noprefix('PYTHON_SITEPACKAGES_DIR', d)}" SYSTEMD_SERVICE:${PN} = "${BPN}-mechanism.service" SYSTEMD_AUTO_ENABLE:${PN} = "disable" -- cgit 1.2.3-korg