Gentoo Archives: gentoo-alt

From: Ramon van Alteren <ramon@××××××××××.nl>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] handling of newins mylib.so n ebuilds
Date: Wed, 09 Jun 2010 21:19:30
Message-Id: 20100609211907.GA95927@vanalteren.nl
In Reply to: Re: [gentoo-alt] handling of newins mylib.so n ebuilds by Jeremy Olexa
1 On Tue, Jun 08, 2010 at 05:07:29PM -0500, Jeremy Olexa wrote:
2 > On 06/08/2010 04:46 PM, Ramon van Alteren wrote:
3 > > Hi All,
4 > >
5 > > I was looking at ebuild dev-ruby/json-1.4.3-r1 for my x64-macos prefix from
6 > > gentoo-x86 and it fails on the following snippet:
7 > >
8 > > each_ruby_install() {
9 > > each_fakegem_install
10 > > if [[ $(basename ${RUBY}) != "jruby" ]]; then
11 > > ruby_fakegem_newins ext/json/ext/generator.so lib/json/ext/generator.so
12 > > ruby_fakegem_newins ext/json/ext/parser.so lib/json/ext/parser.so
13 > > fi
14 > > }
15 > >
16 > > This obviously fails because my gcc-apple produced generator.bundle and
17 > > parser.bundle instead of the hardcoded .so 's
18 > >
19 > > I imagine that this problem has been tackled before in other ebuilds but
20 > > couldn't find a good example.
21 > >
22 > > What is the best approach to deal with constructs like this ?
23 >
24 > Can you use get_modname() from multilib.eclass??
25 >
26 > # @FUNCTION: get_modname
27 > # @USAGE:
28 > # @DESCRIPTION:
29 > # Returns modulename with proper suffix {.so,.bundle,etc} for the current
30 > # platform identified by CHOST.
31 > #
32 > # Example:
33 > # libfoo$(get_modname)
34 > # Returns: libfoo.so (ELF) || libfoo.bundle (MACH) || ...
35
36 Thanks, that was exactly what I was looking for.
37
38 Please see: https://bugs.gentoo.org/show_bug.cgi?id=323371
39
40 Ramon