Skip to contentSkip to conversation

blueman: fix python site-packages installation issue

PATCH New Chen Qi 1 participant 1 message Apr 4, 2022 Arm/Amlogic Meson SoC support

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/1 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.

---
 ...01-meson-add-pythoninstalldir-option.patch | 49 +++++++++++++++++++
 .../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
meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch new file +49 -0
new file mode 100644
index 000000000..a52821915
@@ -0,0 +1,49 @@
+From 37f24a9bd62f0a8f3e37eaddd33f2f0c9d3aaa0a Mon Sep 17 00:00:00 2001
+From: Chen Qi <[email protected]>
+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 <[email protected]>
+---
+ 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
+
meta-networking/recipes-connectivity/blueman/blueman_2.2.4.bb +2 -1
index ea06ee67f..d5aeceeb4 100644
@@ -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"
Signature · 1 line
2.33.0