diff options
author | Sana Kazi <sanakazi720@gmail.com> | 2025-06-04 10:21:31 +0530 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-06-04 10:15:55 -0700 |
commit | 27469599fa6302a90af252c5148daef26c4b2e81 (patch) | |
tree | a34aed9808a91860544dd348af9ef719833cf2aa | |
parent | aa6c4113ac5b30556cad3b3369293fb9a66146d1 (diff) | |
download | meta-openembedded-27469599fa6302a90af252c5148daef26c4b2e81.tar.gz |
imagemagick: guard sed operations in do_install for optional files
When PACKAGECONFIG options like 'cxx' 'webp' and 'xml' are disabled,
certain files such as Magick++-config.im7, configure.xml, or
delegates.xml are not installed. Unconditionally running sed
on these files results in errors during do_install
Error:
sed: can't read .../image/usr/bin/Magick++-config.im7: No such file or directory
Signed-off-by: Nikhil R <nikhilr5@kpit.com>
Signed-off-by: Sana Kazi <sanakazi720@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-support/imagemagick/imagemagick_7.1.1-43.bb | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/meta-oe/recipes-support/imagemagick/imagemagick_7.1.1-43.bb b/meta-oe/recipes-support/imagemagick/imagemagick_7.1.1-43.bb index 9932cf01db..a892a55844 100644 --- a/meta-oe/recipes-support/imagemagick/imagemagick_7.1.1-43.bb +++ b/meta-oe/recipes-support/imagemagick/imagemagick_7.1.1-43.bb | |||
@@ -37,13 +37,24 @@ PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxt" | |||
37 | PACKAGECONFIG[xml] = "--with-xml,--without-xml,libxml2" | 37 | PACKAGECONFIG[xml] = "--with-xml,--without-xml,libxml2" |
38 | 38 | ||
39 | do_install:append:class-target() { | 39 | do_install:append:class-target() { |
40 | for file in MagickCore-config.im7 MagickWand-config.im7 Magick++-config.im7; do | 40 | for file in MagickCore-config.im7 MagickWand-config.im7; do |
41 | sed -i 's,${STAGING_DIR_TARGET},,g' ${D}${bindir}/"$file" | 41 | sed -i 's,${STAGING_DIR_TARGET},,g' "${D}${bindir}/$file" |
42 | done | 42 | done |
43 | sed -i 's,${S},,g' ${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml | 43 | |
44 | sed -i 's,${B},,g' ${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml | 44 | if ${@bb.utils.contains('PACKAGECONFIG', 'cxx', 'true', 'false', d)}; then |
45 | sed -i 's,${RECIPE_SYSROOT},,g' ${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml | 45 | sed -i 's,${STAGING_DIR_TARGET},,g' "${D}${bindir}/Magick++-config.im7" |
46 | sed -i 's,${HOSTTOOLS_DIR},${bindir},g' ${D}${sysconfdir}/ImageMagick-7/delegates.xml | 46 | fi |
47 | |||
48 | if ${@bb.utils.contains('PACKAGECONFIG', 'xml', 'true', 'false', d)}; then | ||
49 | xml_config="${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml" | ||
50 | sed -i 's,${S},,g' "$xml_config" | ||
51 | sed -i 's,${B},,g' "$xml_config" | ||
52 | sed -i 's,${RECIPE_SYSROOT},,g' "$xml_config" | ||
53 | fi | ||
54 | |||
55 | if ${@bb.utils.contains_any('PACKAGECONFIG', 'webp openjpeg', 'true', 'false', d)}; then | ||
56 | sed -i 's,${HOSTTOOLS_DIR},${bindir},g' "${D}${sysconfdir}/ImageMagick-7/delegates.xml" | ||
57 | fi | ||
47 | } | 58 | } |
48 | 59 | ||
49 | FILES:${PN} += "${libdir}/ImageMagick-${BASE_PV}/config-Q16* \ | 60 | FILES:${PN} += "${libdir}/ImageMagick-${BASE_PV}/config-Q16* \ |