summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorNaohiro Aota <naota@gentoo.org>2020-02-15 13:52:22 +0900
committerNaohiro Aota <naota@gentoo.org>2020-07-30 16:21:27 +0900
commit1385ea83ead85f7ff350cc841b99d6f21563749f (patch)
tree8bff0d7b7c8c3034a93bcb73300a725705d92fae /eclass
parentruby-ng-gnome2.eclass: implement common test code (diff)
downloadgentoo-1385ea83ead85f7ff350cc841b99d6f21563749f.tar.gz
gentoo-1385ea83ead85f7ff350cc841b99d6f21563749f.tar.bz2
gentoo-1385ea83ead85f7ff350cc841b99d6f21563749f.zip
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@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ruby-ng-gnome2.eclass14
1 files changed, 10 insertions, 4 deletions
diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index fd9f23492a95..1ba4cf0d9aab 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
}