blob: d5b0f3368b4fcbadd49c71e7cefe26d18989c68d [file] [log] [blame]
# When we install imagemagick into dev/test images, it goes into
# /usr/local. It uses config files and libltdl at runtime which
# means it normally expects files in /etc and /usr/lib but they
# are now in /usr/local/etc and /usr/local/lib. So set the prefix
# to /usr/local so it works in those images.
cros_pre_src_configure_imagemagick_local() {
if [[ $(cros_target) != "cros_host" ]]; then
# Enable C++ exceptions.
cros_pre_src_prepare_enable_cxx_exceptions() {
# Force install to use -j1 since it can flake.
cros_pre_src_install_imagemagick_single_install() {
MAKEOPTS+=" -j1"
# When installing a binpkg, we externally set INSTALL_MASK/etc...
# to kill all *.la files. This would break imagemagick because it
# uses libltdl which utilizes libtool linker scripts (.la) to locate
# modules at runtime. So save all of the .la files in a tarball and
# unpack them ourselves later on :x.
cros_post_src_install_imagemagick_save_la() {
pushd "${ED}"/usr/local >/dev/null
tar zcf ${LA_TARBALL} $(find -name '*.la')
popd >/dev/null
cros_post_pkg_prerm_imagemagick_cleanup_la() {
pushd "${EROOT}"/usr/local >/dev/null
rm -f $(tar tf ${LA_TARBALL})
popd >/dev/null
cros_post_pkg_postinst_imagemagick_restore_la() {
pushd "${EROOT}"/usr/local >/dev/null
tar xf ${LA_TARBALL}
popd >/dev/null