Skip to contentSkip to conversation

glog: Support building for native

PATCH New Peter Kjellerstedt 1 participant 2 messages Oct 1, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 glog: Support building for native

This is needed to build opencv-native.

---
 meta-oe/recipes-support/glog/glog_0.7.1.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-support/glog/glog_0.7.1.bb +2 -0
index 586afcad53..71e51f86b1 100644
@@ -40,3 +40,5 @@ do_configure:append() {
 }
 
 FILES:${PN}-dev += "${datadir}/${BPN}/cmake"
+
+BBCLASSEXTEND = "native"
#1 lore raw

PATCH 2/2 opencv: Support building for native

---
 meta-oe/recipes-support/opencv/opencv_4.11.0.bb | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
meta-oe/recipes-support/opencv/opencv_4.11.0.bb +10 -5
index 61dc681a39..f063c1c35d 100644
@@ -204,11 +204,6 @@ do_install:append() {
         mv ${D}/usr/lib/* ${D}/${libdir}/
         rm -rf ${D}/usr/lib
     fi
-    # remove build host path to improve reproducibility
-    if [ -f ${D}${libdir}/cmake/opencv4/OpenCVModules.cmake ]; then
-        sed -e 's@${STAGING_DIR_HOST}@@g' \
-            -i ${D}${libdir}/cmake/opencv4/OpenCVModules.cmake
-    fi
     # remove setup_vars_opencv4.sh as its content is confusing and useless
     if [ -f ${D}${bindir}/setup_vars_opencv4.sh ]; then
         rm -rf ${D}${bindir}/setup_vars_opencv4.sh
@@ -220,3 +215,13 @@ do_install:append() {
         fi
     done
 }
+
+do_install:append:class-target() {
+    # remove build host path to improve reproducibility
+    if [ -f ${D}${libdir}/cmake/opencv4/OpenCVModules.cmake ]; then
+        sed -e 's@${STAGING_DIR_HOST}@@g' \
+            -i ${D}${libdir}/cmake/opencv4/OpenCVModules.cmake
+    fi
+}
+
+BBCLASSEXTEND = "native"