mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-16 04:17:25 +00:00
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>
This commit is contained in:
@@ -36,13 +36,24 @@ PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxt"
|
|||||||
PACKAGECONFIG[xml] = "--with-xml,--without-xml,libxml2"
|
PACKAGECONFIG[xml] = "--with-xml,--without-xml,libxml2"
|
||||||
|
|
||||||
do_install:append:class-target() {
|
do_install:append:class-target() {
|
||||||
for file in MagickCore-config.im7 MagickWand-config.im7 Magick++-config.im7; do
|
for file in MagickCore-config.im7 MagickWand-config.im7; do
|
||||||
sed -i 's,${STAGING_DIR_TARGET},,g' ${D}${bindir}/"$file"
|
sed -i 's,${STAGING_DIR_TARGET},,g' "${D}${bindir}/$file"
|
||||||
done
|
done
|
||||||
sed -i 's,${S},,g' ${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml
|
|
||||||
sed -i 's,${B},,g' ${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml
|
if ${@bb.utils.contains('PACKAGECONFIG', 'cxx', 'true', 'false', d)}; then
|
||||||
sed -i 's,${RECIPE_SYSROOT},,g' ${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml
|
sed -i 's,${STAGING_DIR_TARGET},,g' "${D}${bindir}/Magick++-config.im7"
|
||||||
sed -i 's,${HOSTTOOLS_DIR},${bindir},g' ${D}${sysconfdir}/ImageMagick-7/delegates.xml
|
fi
|
||||||
|
|
||||||
|
if ${@bb.utils.contains('PACKAGECONFIG', 'xml', 'true', 'false', d)}; then
|
||||||
|
xml_config="${D}${libdir}/ImageMagick-${BASE_PV}/config-Q16HDRI/configure.xml"
|
||||||
|
sed -i 's,${S},,g' "$xml_config"
|
||||||
|
sed -i 's,${B},,g' "$xml_config"
|
||||||
|
sed -i 's,${RECIPE_SYSROOT},,g' "$xml_config"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ${@bb.utils.contains_any('PACKAGECONFIG', 'webp openjpeg', 'true', 'false', d)}; then
|
||||||
|
sed -i 's,${HOSTTOOLS_DIR},${bindir},g' "${D}${sysconfdir}/ImageMagick-7/delegates.xml"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
FILES:${PN} += "${libdir}/ImageMagick-${BASE_PV}/config-Q16* \
|
FILES:${PN} += "${libdir}/ImageMagick-${BASE_PV}/config-Q16* \
|
||||||
|
|||||||
Reference in New Issue
Block a user