On Mon, 2020-05-04 at 11:22 +0900, Naohiro Aota wrote:
> 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 <na...@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 3ba1a11c21d0..7ffe57d1a9ff 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 || die "make install failed"

Nit: you could remove '|| die' here, and in some other places too.

> +     fi
>  
>       each_fakegem_install
>  }

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to