dev-qt/linguist-tools: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / dev-ruby / rb-gsl / rb-gsl-2.1.0.2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 USE_RUBY="ruby24 ruby25 ruby26 ruby27"
6
7 RUBY_FAKEGEM_NAME="gsl"
8 inherit ruby-fakegem multilib
9
10 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
11 RUBY_FAKEGEM_EXTRADOC="ChangeLog README.md"
12
13 DESCRIPTION="Ruby interface to GNU Scientific Library"
14 HOMEPAGE="https://github.com/SciRuby/rb-gsl"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64"
19 IUSE="doc"
20
21 DEPEND+=" >=sci-libs/gsl-2.3[deprecated]"
22 RDEPEND+=" >=sci-libs/gsl-2.3[deprecated]"
23
24 RUBY_S="${PN}-${P}"
25
26 ruby_add_bdepend "dev-ruby/narray"
27 ruby_add_rdepend "dev-ruby/narray"
28
29 all_ruby_prepare() {
30         sed -i -e '/LOCAL_LIBS/ s: -l: -L#{path.gsub("ext", "lib")} -l:' ext/gsl_native/extconf.rb || die
31         # nmatrix only tests
32         rm -r test/gsl/nmatrix_tests || die
33 }
34
35 each_ruby_configure() {
36         NARRAY=1 ${RUBY} -Cext/gsl_native extconf.rb || die
37         sed -i -e 's:-Wl,--no-undefined::' ext/gsl_native/Makefile || die
38 }
39
40 each_ruby_compile() {
41         NARRAY=1 emake -Cext/gsl_native V=1
42         cp ext/gsl_native/*$(get_modname) lib/ || die
43 }
44
45 each_ruby_test() {
46         NARRAY=1 ${RUBY} -Ilib:test:. -e 'Dir["test/**/*_test.rb"].each{|f| require f}' || die
47 }