1 |
On Mon, 2020-05-04 at 11:22 +0900, Naohiro Aota wrote: |
2 |
> Some ruby-gnome2 ebuild does not build C bindings, so there is no need to |
3 |
> call each_ruby_{configure,compile} and emake install of this eclass. Check |
4 |
> if "extconf.rb" and "Makefile" to decide what to do. |
5 |
> |
6 |
> Signed-off-by: Naohiro Aota <naota@g.o> |
7 |
> --- |
8 |
> eclass/ruby-ng-gnome2.eclass | 14 ++++++++++---- |
9 |
> 1 file changed, 10 insertions(+), 4 deletions(-) |
10 |
> |
11 |
> diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass |
12 |
> index 3ba1a11c21d0..7ffe57d1a9ff 100644 |
13 |
> --- a/eclass/ruby-ng-gnome2.eclass |
14 |
> +++ b/eclass/ruby-ng-gnome2.eclass |
15 |
> @@ -53,6 +53,8 @@ SLOT="0" |
16 |
> # @DESCRIPTION: |
17 |
> # Run the configure script in the subbinding for each specific ruby target. |
18 |
> each_ruby_configure() { |
19 |
> + [[ -e extconf.rb ]] || return |
20 |
> + |
21 |
> ${RUBY} extconf.rb || die "extconf.rb failed" |
22 |
> } |
23 |
> |
24 |
> @@ -60,6 +62,8 @@ each_ruby_configure() { |
25 |
> # @DESCRIPTION: |
26 |
> # Compile the C bindings in the subbinding for each specific ruby target. |
27 |
> each_ruby_compile() { |
28 |
> + [[ -e Makefile ]] || return |
29 |
> + |
30 |
> # We have injected --no-undefined in Ruby as a safety precaution |
31 |
> # against broken ebuilds, but the Ruby-Gnome bindings |
32 |
> # unfortunately rely on the lazy load of other extensions; see bug |
33 |
> @@ -76,11 +80,13 @@ each_ruby_compile() { |
34 |
> # @DESCRIPTION: |
35 |
> # Install the files in the subbinding for each specific ruby target. |
36 |
> each_ruby_install() { |
37 |
> - # Create the directories, or the package will create them as files. |
38 |
> - local archdir=$(ruby_rbconfig_value "sitearchdir") |
39 |
> - dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig |
40 |
> + if [[ -e Makefile ]]; then |
41 |
> + # Create the directories, or the package will create them as files. |
42 |
> + local archdir=$(ruby_rbconfig_value "sitearchdir") |
43 |
> + dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig |
44 |
> |
45 |
> - emake DESTDIR="${D}" install || die "make install failed" |
46 |
> + emake DESTDIR="${D}" install || die "make install failed" |
47 |
|
48 |
Nit: you could remove '|| die' here, and in some other places too. |
49 |
|
50 |
> + fi |
51 |
> |
52 |
> each_fakegem_install |
53 |
> } |
54 |
|
55 |
-- |
56 |
Best regards, |
57 |
Michał Górny |