From 6997c90bb5df9cd3b3c3a1d463e254675fd7ffc5 Mon Sep 17 00:00:00 2001 From: leo389 <40183643+leo389@users.noreply.github.com> Date: Sun, 30 Apr 2023 21:36:02 +0100 Subject: [PATCH] Build breaks if PACKAGECONFIG excludes examples Signed-off-by: Owen O'Hehir --- recipes-graphics/libegt/libegt_1.5.bb | 11 ++++++++--- recipes-graphics/libegt/libegt_1.6.bb | 11 ++++++++--- recipes-graphics/libegt/libegt_1.7.bb | 10 ++++++++-- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/recipes-graphics/libegt/libegt_1.5.bb b/recipes-graphics/libegt/libegt_1.5.bb index 81fcb295..0c063677 100644 --- a/recipes-graphics/libegt/libegt_1.5.bb +++ b/recipes-graphics/libegt/libegt_1.5.bb @@ -73,9 +73,14 @@ INSANE_SKIP:${PN} = "dev-so" #deleted audio files to avoid check_data_file_clashes error do_install:append() { rm -f ${D}/usr/lib/libegt.a - rm -f ${D}/usr/share/egt/examples/audioplayer/*.mp3 - rm -f ${D}/usr/share/egt/examples/drummachine/*.wav - sed -i -e '2,/<\/entry>/d' ${D}/usr/share/egt/examples/video/video.xml + + # Only attempt file removal if examples are built + if ${@bb.utils.contains('PACKAGECONFIG', 'examples', 'true', 'false', d)}; then + rm -f ${D}/usr/share/egt/examples/audioplayer/*.mp3 + rm -f ${D}/usr/share/egt/examples/drummachine/*.wav + sed -i -e '2,/<\/entry>/d' ${D}/usr/share/egt/examples/video/video.xml + fi + sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ diff --git a/recipes-graphics/libegt/libegt_1.6.bb b/recipes-graphics/libegt/libegt_1.6.bb index 3fd406fd..6cb07f16 100644 --- a/recipes-graphics/libegt/libegt_1.6.bb +++ b/recipes-graphics/libegt/libegt_1.6.bb @@ -73,9 +73,14 @@ INSANE_SKIP:${PN} = "dev-so" #deleted audio files to avoid check_data_file_clashes error do_install:append() { rm -f ${D}/usr/lib/libegt.a - rm -f ${D}/usr/share/egt/examples/audioplayer/*.mp3 - rm -f ${D}/usr/share/egt/examples/drummachine/*.wav - sed -i -e '2,/<\/entry>/d' ${D}/usr/share/egt/examples/video/video.xml + + # Only attempt file removal if examples are built + if ${@bb.utils.contains('PACKAGECONFIG', 'examples', 'true', 'false', d)}; then + rm -f ${D}/usr/share/egt/examples/audioplayer/*.mp3 + rm -f ${D}/usr/share/egt/examples/drummachine/*.wav + sed -i -e '2,/<\/entry>/d' ${D}/usr/share/egt/examples/video/video.xml + fi + sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ diff --git a/recipes-graphics/libegt/libegt_1.7.bb b/recipes-graphics/libegt/libegt_1.7.bb index fbe96de4..3d41d03f 100644 --- a/recipes-graphics/libegt/libegt_1.7.bb +++ b/recipes-graphics/libegt/libegt_1.7.bb @@ -73,8 +73,14 @@ INSANE_SKIP:${PN} = "dev-so" #deleted audio files to avoid check_data_file_clashes error do_install:append() { rm -f ${D}/usr/lib/libegt.a - rm -f ${D}/usr/share/egt/examples/audioplayer/*.mp3 - rm -f ${D}/usr/share/egt/examples/drummachine/*.wav + + # Only attempt file removal if examples are built + if ${@bb.utils.contains('PACKAGECONFIG', 'examples', 'true', 'false', d)}; then + rm -f ${D}/usr/share/egt/examples/audioplayer/*.mp3 + rm -f ${D}/usr/share/egt/examples/drummachine/*.wav + sed -i -e '2,/<\/entry>/d' ${D}/usr/share/egt/examples/video/video.xml + fi + sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \