From 713fe5407ab5e1e436d8a5850f622e036c7e50cc Mon Sep 17 00:00:00 2001 From: David Michael Date: Thu, 31 Dec 2020 23:41:47 -0500 Subject: [PATCH] app-i18n/ibus: use BDEPEND with EAPI 7, fix cross-compiling It needs to build tools to execute when using unicode or emoji. Closes: https://bugs.gentoo.org/762895 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: David Michael --- app-i18n/ibus/ibus-1.5.23.ebuild | 39 ++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/app-i18n/ibus/ibus-1.5.23.ebuild b/app-i18n/ibus/ibus-1.5.23.ebuild index f3ee3b6f8a7..f0cdc5a8404 100644 --- a/app-i18n/ibus/ibus-1.5.23.ebuild +++ b/app-i18n/ibus/ibus-1.5.23.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -7,7 +7,7 @@ VALA_MIN_API_VERSION="0.34" VALA_MAX_API_VERSION="0.50" VALA_USE_DEPEND="vapigen" -inherit autotools bash-completion-r1 gnome2-utils python-r1 vala virtualx xdg-utils +inherit autotools bash-completion-r1 gnome2-utils python-r1 toolchain-funcs vala virtualx xdg-utils GENTOO_VER=1 DESCRIPTION="Intelligent Input Bus for Linux / Unix OS" @@ -33,7 +33,7 @@ REQUIRED_USE="emoji? ( gtk ) test? ( gtk ) vala? ( introspection )" -CDEPEND="app-text/iso-codes +DEPEND="app-text/iso-codes dev-libs/glib:2 gnome-base/dconf gnome-base/librsvg:2 @@ -59,14 +59,15 @@ CDEPEND="app-text/iso-codes dev-libs/wayland x11-libs/libxkbcommon )" -RDEPEND="${CDEPEND} +RDEPEND="${DEPEND} python? ( gtk? ( x11-libs/gtk+:3[introspection] ) )" -DEPEND="${CDEPEND} +BDEPEND=" $(vala_depend) + dev-libs/glib:2 dev-util/glib-utils virtual/pkgconfig emoji? ( @@ -122,6 +123,18 @@ src_configure() { python_conf+=( --disable-setup ) fi + if tc-is-cross-compiler && { use emoji || use unicode; }; then + mkdir -p "${S}-build" + pushd "${S}-build" >/dev/null 2>&1 || die + ECONF_SOURCE=${S} econf_build --enable-static \ + --disable-{dconf,gtk{2,3},python-library,shared,xim} \ + ISOCODES_{CFLAG,LIB}S=-DSKIP \ + $(use_enable emoji emoji-dict) \ + $(use_enable unicode unicode-dict) \ + $(use_with unicode ucd-dir "${EPREFIX}/usr/share/unicode-data") + popd >/dev/null 2>&1 || die + fi + econf \ $(use_enable X xim) \ $(use_enable emoji emoji-dict) \ @@ -141,6 +154,22 @@ src_configure() { "${python_conf[@]}" } +src_compile() { + if tc-is-cross-compiler && { use emoji || use unicode; }; then + emake -C "${S}-build/src" \ + $(usex emoji emoji-parser '') \ + $(usex unicode unicode-parser '') + emake -C src \ + $(usex emoji emoji-parser '') \ + $(usex unicode unicode-parser '') + cp \ + $(usex emoji "${S}-build/src/emoji-parser" '') \ + $(usex unicode "${S}-build/src/unicode-parser" '') \ + src || die + fi + emake +} + src_test() { unset DBUS_SESSION_BUS_ADDRESS virtx emake -j1 check -- 2.26.2