[OE-core] [PATCH v2] sdl2: fix sdl2.pc include paths

Samuli Piippo samuli.piippo at qt.io
Thu Jan 17 07:28:12 UTC 2019


SDL2 dumps all cflags to the sdl2.pc, which might then contain paths
to the recipe sysroot include dirs.

Signed-off-by: Samuli Piippo <samuli.piippo at qt.io>
---
 meta/recipes-graphics/libsdl2/libsdl2_2.0.9.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.9.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.9.bb
index a5ec77728a..8941f05958 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.9.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.9.bb
@@ -63,6 +63,10 @@ do_configure_prepend() {
         export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
 }
 
+do_install_append() {
+    sed -i -e "s|${STAGING_INCDIR}|$\{includedir}|g" ${D}${libdir}/pkgconfig/sdl2.pc
+}
+
 FILES_${PN}-dev += "${libdir}/cmake"
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.17.1



More information about the Openembedded-core mailing list