Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/racc/
Date: Sun, 07 Feb 2021 08:24:09
Message-Id: 1612686238.76f263110aac756f2ebf362499dc403b288b37c8.graaff@gentoo
1 commit: 76f263110aac756f2ebf362499dc403b288b37c8
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 7 07:53:07 2021 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 7 08:23:58 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76f26311
7
8 dev-ruby/racc: fix extension install
9
10 Package-Manager: Portage-3.0.13, Repoman-3.0.2
11 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
12
13 dev-ruby/racc/racc-1.5.2-r1.ebuild | 60 ++++++++++++++++++++++++++++++++++++++
14 1 file changed, 60 insertions(+)
15
16 diff --git a/dev-ruby/racc/racc-1.5.2-r1.ebuild b/dev-ruby/racc/racc-1.5.2-r1.ebuild
17 new file mode 100644
18 index 00000000000..2609e8b6c2d
19 --- /dev/null
20 +++ b/dev-ruby/racc/racc-1.5.2-r1.ebuild
21 @@ -0,0 +1,60 @@
22 +# Copyright 1999-2021 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=7
26 +
27 +USE_RUBY="ruby25 ruby26 ruby27 ruby30"
28 +
29 +RUBY_FAKEGEM_TASK_DOC="docs"
30 +RUBY_FAKEGEM_EXTRADOC="README.rdoc README.ja.rdoc TODO ChangeLog"
31 +
32 +RUBY_FAKEGEM_GEMSPEC="racc.gemspec"
33 +
34 +RUBY_FAKEGEM_EXTENSIONS=(ext/racc/cparse/extconf.rb)
35 +RUBY_FAKEGEM_EXTENSION_LIBDIR="lib/racc/cparse"
36 +
37 +inherit multilib ruby-fakegem
38 +
39 +DESCRIPTION="A LALR(1) parser generator for Ruby"
40 +HOMEPAGE="https://github.com/tenderlove/racc"
41 +SRC_URI="https://github.com/tenderlove/racc/archive/v${PV}.tar.gz -> ${P}.tar.gz"
42 +
43 +LICENSE="LGPL-2.1"
44 +SLOT="0"
45 +
46 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
47 +IUSE="doc test"
48 +
49 +ruby_add_rdepend "virtual/ruby-ssl"
50 +
51 +ruby_add_bdepend "dev-ruby/rake
52 + test? ( dev-ruby/minitest )"
53 +
54 +all_ruby_prepare() {
55 + sed -i -e 's|/tmp/out|${TMPDIR:-/tmp}/out|' test/helper.rb || die "tests fix failed"
56 +
57 + sed -i -e 's/, :isolate//' Rakefile || die
58 + sed -i -e '/bundler/ s:^:#:' -e '/rdoc/,/^end/ s:^:#:' Rakefile || die
59 +
60 + # Avoid depending on rake-compiler since we don't use it to compile
61 + # the extension.
62 + sed -i -e '/rake-compiler/ s:^:#:' -e '/extensiontask/ s:^:#:' Rakefile
63 + sed -i -e '/ExtensionTask/,/^ end/ s:^:#:' Rakefile
64 + # Which means we need to generate the parser file here
65 + rake lib/racc/parser-text.rb || die
66 +
67 + sed -i -e 's:_relative ": "./:' ${RUBY_FAKEGEM_GEMSPEC} || die
68 +}
69 +
70 +each_ruby_test() {
71 + PATH="bin:${PATH}" ${RUBY} -Ilib:. -e "Dir['test/test_*.rb'].each{|f| require f}" || die
72 +}
73 +
74 +all_ruby_install() {
75 + all_fakegem_install
76 +
77 + dodoc -r rdoc
78 +
79 + docinto examples
80 + dodoc -r sample
81 +}