commit:     ece04f569aec1c625db959259e3e4a20b9edf67d
Author:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 23 13:51:26 2017 +0000
Commit:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Sun Jul 23 13:52:37 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ece04f56

x11-libs/libgxim: fix build

Gentoo-Bug: 623890

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 x11-libs/libgxim/libgxim-0.5.0.ebuild | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/x11-libs/libgxim/libgxim-0.5.0.ebuild 
b/x11-libs/libgxim/libgxim-0.5.0.ebuild
index a9bd005eae5..fab59de0f63 100644
--- a/x11-libs/libgxim/libgxim-0.5.0.ebuild
+++ b/x11-libs/libgxim/libgxim-0.5.0.ebuild
@@ -2,8 +2,9 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
+USE_RUBY="ruby21 ruby22 ruby23 ruby24"
 
-inherit autotools ltprune
+inherit autotools ltprune ruby-single
 
 DESCRIPTION="GObject-based XIM protocol library"
 HOMEPAGE="https://tagoh.bitbucket.io/libgxim";
@@ -12,7 +13,7 @@ 
SRC_URI="https://bitbucket.org/tagoh/${PN}/downloads/${P}.tar.bz2";
 LICENSE="LGPL-2.1"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="static-libs test"
+IUSE="${USE_RUBY//ruby/ruby_targets_ruby} static-libs test"
 
 RDEPEND="dev-libs/dbus-glib
        dev-libs/glib:2
@@ -20,7 +21,7 @@ RDEPEND="dev-libs/dbus-glib
        virtual/libintl
        x11-libs/gtk+:2"
 DEPEND="${RDEPEND}
-       dev-lang/ruby
+       ${RUBY_DEPS}
        dev-util/intltool
        sys-devel/autoconf-archive
        sys-devel/gettext
@@ -38,6 +39,14 @@ src_prepare() {
 
        sed -i "/^ACLOCAL_AMFLAGS/,/^$/d" Makefile.am
 
+       local ruby
+       for ruby in ${USE_RUBY}; do
+               if use ruby_targets_${ruby}; then
+                       sed -i "1s/ruby/${ruby}/" ${PN}/mkacc.rb
+                       break
+               fi
+       done
+
        default
        eautoreconf
 }

Reply via email to