--- gentoo/media-libs/fontconfig/fontconfig-2.11.1.ebuild 2014-04-30 19:01:24.000000000 +0100 +++ local/media-libs/fontconfig/fontconfig-2.11.1.ebuild 2014-05-09 21:33:06.000000000 +0100 @@ -31,6 +31,10 @@ PDEPEND="!x86-winnt? ( app-admin/eselect-fontconfig ) virtual/ttf-fonts" +MULTILIB_CHOST_TOOLS=( + /usr/bin/fc-cache +) + PATCHES=( "${FILESDIR}"/${PN}-2.7.1-latin-reorder.patch # 130466 "${FILESDIR}"/${PN}-2.10.2-docbook.patch # 310157 @@ -144,8 +148,17 @@ readme.gentoo_print_elog if [[ ${ROOT} = / ]]; then - ebegin "Creating global font cache" - "${EPREFIX}"/usr/bin/fc-cache -srf - eend $? + multilib_pkg_postinst() { + if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then + fc_cache="${CHOST}-fc-cache" + else + fc_cache="fc-cache" + fi + + ebegin "Creating global font cache" + "${EPREFIX}"/usr/bin/${fc_cache} -srf + eend $? + } + multilib_foreach_abi multilib_pkg_postinst fi }