diff mbox series

[meta-oe] opencv: Only rename ${bindir}/shape if it exists

Message ID 20250909124314.396820-1-zboszor@gmail.com
State Under Review
Headers show
Series [meta-oe] opencv: Only rename ${bindir}/shape if it exists | expand

Commit Message

Zoltán Böszörményi Sept. 9, 2025, 12:43 p.m. UTC
Its creation depends on PACKAGECONFIG = "samples", which may be
removed in a bbappend.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
 meta-oe/recipes-support/opencv/opencv_4.12.0.bb | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/opencv/opencv_4.12.0.bb b/meta-oe/recipes-support/opencv/opencv_4.12.0.bb
index 539190553d..86af1ebc43 100644
--- a/meta-oe/recipes-support/opencv/opencv_4.12.0.bb
+++ b/meta-oe/recipes-support/opencv/opencv_4.12.0.bb
@@ -214,7 +214,9 @@  do_install:append() {
         fi
     done
 
-    # rename shape dir to avoid rootfs conflict with
-    # mesa-demos /usr/bin/shape file.
-    mv ${D}/${bindir}/shape ${D}/${bindir}/opencv_shape
+    if [ -d ${D}/${bindir}/shape ]; then
+        # rename shape dir to avoid rootfs conflict with
+        # mesa-demos /usr/bin/shape file.
+        mv ${D}/${bindir}/shape ${D}/${bindir}/opencv_shape
+    fi
 }