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