libxcb won't find xcb-proto when Python free-threading is enabled.

This is caused by two problems:
* xcb-proto installs its python module into the ABI-less
  site-packages directory
* the pythondir= setting in xcb-proto.pc also points to the
  ABI-less site-packages directory

Move the installed site-packages directory to the correct
location if needed, and fix xcb-proto.pc.

Signed-off-by: Zoltán Böszörményi <[email protected]>
---
 meta/recipes-graphics/xorg-proto/xcb-proto_1.17.0.bb | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/meta/recipes-graphics/xorg-proto/xcb-proto_1.17.0.bb 
b/meta/recipes-graphics/xorg-proto/xcb-proto_1.17.0.bb
index 2a78a87e77..e6707fdbf8 100644
--- a/meta/recipes-graphics/xorg-proto/xcb-proto_1.17.0.bb
+++ b/meta/recipes-graphics/xorg-proto/xcb-proto_1.17.0.bb
@@ -19,6 +19,15 @@ SRC_URI[sha256sum] = 
"2c1bacd2110f4799f74de6ebb714b94cf6f80fb112316b1219480fd225
 
 inherit autotools pkgconfig python3native
 
+do_install:append () {
+    # Patch pythondir site-packages
+    sed -i 's:}/.*/site-packages:}/${PYTHON_DIR}/site-packages:' 
${D}${libdir}/pkgconfig/xcb-proto.pc
+
+    if [ ! -d ${D}${libdir}/${PYTHON_DIR} ]; then
+        mv ${D}${libdir}/python${PYTHON_BASEVERSION} 
${D}${libdir}/${PYTHON_DIR}
+    fi
+}
+
 PACKAGES += "python-xcbgen"
 
 FILES:${PN} = ""
-- 
2.53.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#234017): 
https://lists.openembedded.org/g/openembedded-core/message/234017
Mute This Topic: https://lists.openembedded.org/mt/118519865/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to