--- pango-1.34.1.ebuild.orig 2013-06-06 23:31:34 +0900 +++ pango-1.34.1.ebuild 2013-10-21 19:52:56 +0900 @@ -6,7 +6,7 @@ GCONF_DEBUG="yes" GNOME2_LA_PUNT="yes" -inherit autotools eutils gnome2 multilib toolchain-funcs +inherit autotools eutils gnome2 toolchain-funcs multilib-minimal DESCRIPTION="Internationalized text layout and rendering library" HOMEPAGE="http://www.pango.org/" @@ -20,16 +20,16 @@ # Bump cairo dep to be safer: # https://bugzilla.gnome.org/show_bug.cgi?id=700247#c4 RDEPEND=" - >=media-libs/harfbuzz-0.9.9:=[glib(+),truetype(+)] - >=dev-libs/glib-2.33.12:2 - >=media-libs/fontconfig-2.10.91:1.0= - media-libs/freetype:2= - >=x11-libs/cairo-1.12.10:=[X?] + >=media-libs/harfbuzz-0.9.9:=[glib(+),truetype(+),${MULTILIB_USEDEP}] + >=dev-libs/glib-2.33.12:2[${MULTILIB_USEDEP}] + >=media-libs/fontconfig-2.10.91:1.0=[${MULTILIB_USEDEP}] + media-libs/freetype:2=[${MULTILIB_USEDEP}] + >=x11-libs/cairo-1.12.10:=[X?,${MULTILIB_USEDEP}] introspection? ( >=dev-libs/gobject-introspection-0.9.5 ) X? ( - x11-libs/libXrender - x11-libs/libX11 - >=x11-libs/libXft-2.0.0 ) + x11-libs/libXrender[${MULTILIB_USEDEP}] + x11-libs/libX11[${MULTILIB_USEDEP}] + >=x11-libs/libXft-2.0.0[${MULTILIB_USEDEP}] ) " DEPEND="${RDEPEND} >=dev-util/gtk-doc-am-1.13 @@ -47,20 +47,30 @@ gnome2_src_prepare } -src_configure() { +multilib_src_configure() { + ECONF_SOURCE="${S}" \ gnome2_src_configure \ - $(use_enable introspection) \ + $(multilib_is_native_abi \ + && use_enable introspection \ + || echo --disable-introspection) \ $(use_with X xft) \ "$(usex X --x-includes="${EPREFIX}/usr/include" "")" \ "$(usex X --x-libraries="${EPREFIX}/usr/$(get_libdir)" "")" } -src_install() { +multilib_src_install() { gnome2_src_install - local PANGO_CONFDIR="/etc/pango/${CHOST}" - dodir "${PANGO_CONFDIR}" - keepdir "${PANGO_CONFDIR}" + if multilib_is_native_abi; then + local PANGO_CONFDIR="/etc/pango/${CHOST}" + dodir "${PANGO_CONFDIR}" + keepdir "${PANGO_CONFDIR}" + elif [[ ${ABI} == x86 ]]; then + local PANGO_CONFDIR="/etc/pango/i686-pc-linux-gnu" + dodir "${PANGO_CONFDIR}" + keepdir "${PANGO_CONFDIR}" + mv "${D}"/usr/bin/pango-querymodules{,-32} || die + fi } pkg_postinst() { @@ -82,6 +92,26 @@ fi rm "${tmp_file}" + if has x86 $(multilib_get_enabled_abis) && has amd64 $(multilib_get_enabled_abis); then + PANGO_CONFDIR="/etc/pango/i686-pc-linux-gnu" + einfo "Generating modules listing for x86..." + + mkdir -p "${PANGO_CONFDIR}" + local pango_conf="${PANGO_CONFDIR}/pango.modules" + local tmp_file=$(mktemp -t tmp.XXXXXXXXXXpango_querymodules) + if [ -z "${tmp_file}" ]; then + ewarn "Cannot create temporary file" + return 1 + fi + + if pango-querymodules-32 > "${tmp_file}"; then + cat "${tmp_file}" > "${pango_conf}" + else + ewarn "Cannot update pango.modules, file generation failed" + fi + rm "${tmp_file}" + fi + if [[ ${REPLACING_VERSIONS} < 1.30.1 ]]; then elog "In >=${PN}-1.30.1, default configuration file locations moved from" elog "~/.pangorc and ~/.pangox_aliases to ~/.config/pango/pangorc and"