Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: ruby@g.o, Naohiro Aota <naota@g.o>
Subject: Re: [gentoo-dev] [PATCH v2 08/10] ruby-ng-gnome2.eclass: support non-build packages
Date: Mon, 04 May 2020 05:10:41
Message-Id: 3753282c20fdcb8c3ced8ee7555113cce6aaffe8.camel@gentoo.org
In Reply to: [gentoo-dev] [PATCH v2 08/10] ruby-ng-gnome2.eclass: support non-build packages by Naohiro Aota
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

Attachments

File name MIME type
signature.asc application/pgp-signature