Gentoo Archives: gentoo-dev

From: Naohiro Aota <naota@g.o>
To: gentoo-dev@l.g.o
Cc: ruby@g.o, Naohiro Aota <naota@g.o>
Subject: [gentoo-dev] [PATCH 7/9] ruby-ng-gnome2.eclass: support non-build packages
Date: Sat, 15 Feb 2020 12:20:58
Message-Id: 20200215121833.3631177-7-naota@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/9] ruby-ng-gnome2.eclass: drop support for 0.19.x by Naohiro Aota
1 Some ruby-gnome2 ebuild does not build C bindings, so there is no need to
2 call each_ruby_{configure,compile} and emake install of this eclass. Check
3 if "extconf.rb" and "Makefile" to decide what to do.
4
5 Signed-off-by: Naohiro Aota <naota@g.o>
6 ---
7 eclass/ruby-ng-gnome2.eclass | 14 ++++++++++----
8 1 file changed, 10 insertions(+), 4 deletions(-)
9
10 diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
11 index 1cc3cdce4ce6..619a02d0d1d7 100644
12 --- a/eclass/ruby-ng-gnome2.eclass
13 +++ b/eclass/ruby-ng-gnome2.eclass
14 @@ -51,6 +51,8 @@ SLOT="0"
15 # @DESCRIPTION:
16 # Run the configure script in the subbinding for each specific ruby target.
17 each_ruby_configure() {
18 + test -e extconf.rb || return
19 +
20 ${RUBY} extconf.rb || die "extconf.rb failed"
21 }
22
23 @@ -58,6 +60,8 @@ each_ruby_configure() {
24 # @DESCRIPTION:
25 # Compile the C bindings in the subbinding for each specific ruby target.
26 each_ruby_compile() {
27 + test -e Makefile || return
28 +
29 # We have injected --no-undefined in Ruby as a safety precaution
30 # against broken ebuilds, but the Ruby-Gnome bindings
31 # unfortunately rely on the lazy load of other extensions; see bug
32 @@ -74,11 +78,13 @@ each_ruby_compile() {
33 # @DESCRIPTION:
34 # Install the files in the subbinding for each specific ruby target.
35 each_ruby_install() {
36 - # Create the directories, or the package will create them as files.
37 - local archdir=$(ruby_rbconfig_value "sitearchdir")
38 - dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig
39 + if [ -e Makefile ]; then
40 + # Create the directories, or the package will create them as files.
41 + local archdir=$(ruby_rbconfig_value "sitearchdir")
42 + dodir ${archdir#${EPREFIX}} /usr/$(get_libdir)/pkgconfig
43
44 - emake DESTDIR="${D}" install || die "make install failed"
45 + emake DESTDIR="${D}" install || die "make install failed"
46 + fi
47
48 each_fakegem_install
49 }
50 --
51 2.25.0

Replies