x11-libs/libgxim: fix build
authorAkinori Hattori <hattya@gentoo.org>
Sun, 23 Jul 2017 13:51:26 +0000 (22:51 +0900)
committerAkinori Hattori <hattya@gentoo.org>
Sun, 23 Jul 2017 13:52:37 +0000 (22:52 +0900)
Gentoo-Bug: 623890

Package-Manager: Portage-2.3.6, Repoman-2.3.1

x11-libs/libgxim/libgxim-0.5.0.ebuild

index a9bd005eae5fd03aa0d1e9788481b4764ba49c1d..fab59de0f630a0efd36b05ed15401665e0b9052c 100644 (file)
@@ -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
 }