commit: 1385ea83ead85f7ff350cc841b99d6f21563749f
Author: Naohiro Aota <naota <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 15 04:52:22 2020 +0000
Commit: Naohiro Aota <naota <AT> gentoo <DOT> org>
CommitDate: Thu Jul 30 07:21:27 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1385ea83
ruby-ng-gnome2.eclass: support non-build packages
Some ruby-gnome2 ebuild does not build C bindings, so there is no need to
call each_ruby_{configure,compile} and emake install of this eclass. Check
if "extconf.rb" and "Makefile" to decide what to do.
Signed-off-by: Naohiro Aota <naota <AT> gentoo.org>
eclass/ruby-ng-gnome2.eclass | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index fd9f23492a9..1ba4cf0d9aa 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -53,6 +53,8 @@ SLOT="0"
# @DESCRIPTION:
# Run the configure script in the subbinding for each specific ruby target.
each_ruby_configure() {
+ [[ -e extconf.rb ]] || return
+
${RUBY} extconf.rb || die "extconf.rb failed"
}
@@ -60,6 +62,8 @@ each_ruby_configure() {
# @DESCRIPTION:
# Compile the C bindings in the subbinding for each specific ruby target.
each_ruby_compile() {
+ [[ -e Makefile ]] || return
+
# We have injected --no-undefined in Ruby as a safety precaution
# against broken ebuilds, but the Ruby-Gnome bindings
# unfortunately rely on the lazy load of other extensions; see bug
@@ -76,11 +80,13 @@ each_ruby_compile() {
# @DESCRIPTION:
# Install the files in the subbinding for each specific ruby target.
each_ruby_install() {
- # Create the directories, or the package will create them as files.
- local archdir=$(ruby_rbconfig_value "sitearchdir")
- dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig
+ if [[ -e Makefile ]]; then
+ # Create the directories, or the package will create them as
files.
+ local archdir=$(ruby_rbconfig_value "sitearchdir")
+ dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig
- emake DESTDIR="${D}" install || die "make install failed"
+ emake DESTDIR="${D}" install
+ fi
each_fakegem_install
}