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/hpricot/
Date: Wed, 30 Jun 2021 06:56:50
Message-Id: 1625036188.6af21437ec5607e3ebc61f7a7d9c473973f6b6dd.graaff@gentoo
1 commit: 6af21437ec5607e3ebc61f7a7d9c473973f6b6dd
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 27 08:18:26 2021 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 30 06:56:28 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6af21437
7
8 dev-ruby/hpricot: fix extension install; ruby30
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.2
11 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
12
13 dev-ruby/hpricot/hpricot-0.8.6-r6.ebuild | 57 ++++++++++++++++++++++++++++++++
14 1 file changed, 57 insertions(+)
15
16 diff --git a/dev-ruby/hpricot/hpricot-0.8.6-r6.ebuild b/dev-ruby/hpricot/hpricot-0.8.6-r6.ebuild
17 new file mode 100644
18 index 00000000000..4af8d4a90b3
19 --- /dev/null
20 +++ b/dev-ruby/hpricot/hpricot-0.8.6-r6.ebuild
21 @@ -0,0 +1,57 @@
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_DOCDIR="doc"
30 +RUBY_FAKEGEM_EXTRADOC="CHANGELOG README.md"
31 +
32 +RUBY_FAKEGEM_EXTENSIONS=(ext/hpricot_scan/extconf.rb)
33 +
34 +inherit ruby-fakegem
35 +
36 +DESCRIPTION="A fast and liberal HTML parser for Ruby"
37 +HOMEPAGE="https://wiki.github.com/hpricot/hpricot"
38 +
39 +LICENSE="MIT"
40 +SLOT="0"
41 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris"
42 +IUSE=""
43 +
44 +ruby_add_bdepend "dev-ruby/rake
45 + dev-ruby/rdoc
46 + dev-ruby/rake-compiler"
47 +
48 +ruby_add_rdepend "dev-ruby/fast_xs"
49 +
50 +# Probably needs the same jdk as JRuby but I'm not sure how to express
51 +# that just yet.
52 +DEPEND+=" dev-util/ragel"
53 +
54 +all_ruby_prepare() {
55 + sed -i -e '/[Bb]undler/ s:^:#:' Rakefile || die
56 +
57 + # Fix encoding assumption of environment for Ruby 1.9.
58 + # https://github.com/hpricot/hpricot/issues/52
59 + # sed -i -e '1 iEncoding.default_external=Encoding::UTF_8 if RUBY_VERSION =~ /1.9/' test/load_files.rb || die
60 +
61 + # Avoid unneeded dependency on git.
62 + sed -i -e '/^REV/ s/.*/REV = "6"/' Rakefile || die
63 +
64 + # Fix int size warning
65 + sed -i -e 's/te - ts/(int)(te - ts)/' ext/hpricot_scan/hpricot_css.rl || die
66 +}
67 +
68 +each_ruby_prepare() {
69 + pushd .. &>/dev/null
70 + eapply "${FILESDIR}"/${P}-fast_xs.patch
71 + popd .. &>/dev/null
72 +}
73 +
74 +each_ruby_compile() {
75 + ${RUBY} -S rake ragel || die
76 +
77 + each_fakegem_compile
78 +}