diff options
| author | Sana Kazi <sanakazi720@gmail.com> | 2025-06-02 17:21:23 +0530 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2025-06-23 17:03:24 -0400 |
| commit | 727811eaf256b88fd135be99559f2cbf14c82fce (patch) | |
| tree | 838c31280afb460f5170084bf3849c765ecabe94 | |
| parent | 5dfaf0e236f980d7d76cc57f79a8d3675a8ac0bc (diff) | |
| download | meta-openembedded-727811eaf256b88fd135be99559f2cbf14c82fce.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: Armin Kuster <akuster808@gmail.com>
| -rw-r--r-- | meta-oe/recipes-support/imagemagick/imagemagick_7.1.1.bb | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/meta-oe/recipes-support/imagemagick/imagemagick_7.1.1.bb b/meta-oe/recipes-support/imagemagick/imagemagick_7.1.1.bb index 5407c4e400..752fef303b 100644 --- a/meta-oe/recipes-support/imagemagick/imagemagick_7.1.1.bb +++ b/meta-oe/recipes-support/imagemagick/imagemagick_7.1.1.bb | |||
| @@ -36,13 +36,24 @@ PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxt" | |||
| 36 | PACKAGECONFIG[xml] = "--with-xml,--without-xml,libxml2" | 36 | PACKAGECONFIG[xml] = "--with-xml,--without-xml,libxml2" |
| 37 | 37 | ||
| 38 | do_install:append:class-target() { | 38 | do_install:append:class-target() { |
| 39 | for file in MagickCore-config.im7 MagickWand-config.im7 Magick++-config.im7; do | 39 | for file in MagickCore-config.im7 MagickWand-config.im7; do |
| 40 | sed -i 's,${STAGING_DIR_TARGET},,g' ${D}${bindir}/"$file" | 40 | sed -i 's,${STAGING_DIR_TARGET},,g' "${D}${bindir}/$file" |
| 41 | done | 41 | done |
| 42 | sed -i 's,${S},,g' ${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml | 42 | |
| 43 | sed -i 's,${B},,g' ${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml | 43 | if ${@bb.utils.contains('PACKAGECONFIG', 'cxx', 'true', 'false', d)}; then |
| 44 | sed -i 's,${RECIPE_SYSROOT},,g' ${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml | 44 | sed -i 's,${STAGING_DIR_TARGET},,g' "${D}${bindir}/Magick++-config.im7" |
| 45 | sed -i 's,${HOSTTOOLS_DIR},${bindir},g' ${D}${sysconfdir}/ImageMagick-7/delegates.xml | 45 | fi |
| 46 | |||
| 47 | if ${@bb.utils.contains('PACKAGECONFIG', 'xml', 'true', 'false', d)}; then | ||
| 48 | xml_config="${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml" | ||
| 49 | sed -i 's,${S},,g' "$xml_config" | ||
| 50 | sed -i 's,${B},,g' "$xml_config" | ||
| 51 | sed -i 's,${RECIPE_SYSROOT},,g' "$xml_config" | ||
| 52 | fi | ||
| 53 | |||
| 54 | if ${@bb.utils.contains_any('PACKAGECONFIG', 'webp openjpeg', 'true', 'false', d)}; then | ||
| 55 | sed -i 's,${HOSTTOOLS_DIR},${bindir},g' "${D}${sysconfdir}/ImageMagick-7/delegates.xml" | ||
| 56 | fi | ||
| 46 | } | 57 | } |
| 47 | 58 | ||
| 48 | FILES:${PN} += "${libdir}/ImageMagick-${BASE_PV}/config-Q16* \ | 59 | FILES:${PN} += "${libdir}/ImageMagick-${BASE_PV}/config-Q16* \ |
