Gentoo Archives: gentoo-dev

From: Hans de Graaff <graaff@g.o>
To: gentoo-dev@l.g.o
Cc: Hans de Graaff <graaff@g.o>
Subject: [gentoo-dev] [PATCH 2/2] dev-ruby/mimemagic: mark extension as installed
Date: Sun, 21 Nov 2021 09:07:47
Message-Id: 20211121090655.5361-2-graaff@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/2] eclass/ruby-fakegem.eclass: add method to indicate extensions are installed by Hans de Graaff
1 Package-Manager: Portage-3.0.28, Repoman-3.0.3
2 Signed-off-by: Hans de Graaff <graaff@g.o>
3 ---
4 dev-ruby/mimemagic/mimemagic-0.3.10-r1.ebuild | 41 +++++++++++++++++
5 dev-ruby/mimemagic/mimemagic-0.4.3-r1.ebuild | 45 +++++++++++++++++++
6 2 files changed, 86 insertions(+)
7 create mode 100644 dev-ruby/mimemagic/mimemagic-0.3.10-r1.ebuild
8 create mode 100644 dev-ruby/mimemagic/mimemagic-0.4.3-r1.ebuild
9
10 diff --git a/dev-ruby/mimemagic/mimemagic-0.3.10-r1.ebuild b/dev-ruby/mimemagic/mimemagic-0.3.10-r1.ebuild
11 new file mode 100644
12 index 000000000000..14cda3064dd1
13 --- /dev/null
14 +++ b/dev-ruby/mimemagic/mimemagic-0.3.10-r1.ebuild
15 @@ -0,0 +1,41 @@
16 +# Copyright 1999-2021 Gentoo Authors
17 +# Distributed under the terms of the GNU General Public License v2
18 +
19 +EAPI=8
20 +USE_RUBY="ruby26 ruby27 ruby30"
21 +
22 +RUBY_FAKEGEM_EXTRADOC="README.md"
23 +
24 +RUBY_FAKEGEM_GEMSPEC=mimemagic.gemspec
25 +
26 +inherit prefix ruby-fakegem
27 +
28 +DESCRIPTION="Fast mime detection by extension or content"
29 +HOMEPAGE="https://github.com/mimemagicrb/mimemagic"
30 +SRC_URI="https://github.com/mimemagicrb/mimemagic/archive/v${PV}.tar.gz -> ${P}.tar.gz"
31 +
32 +LICENSE="MIT"
33 +SLOT="0"
34 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
35 +IUSE=""
36 +
37 +RDEPEND+=" x11-misc/shared-mime-info"
38 +
39 +ruby_add_rdepend "
40 + dev-ruby/nokogiri
41 + dev-ruby/rake
42 +"
43 +
44 +ruby_add_bdepend "test? ( dev-ruby/minitest )"
45 +
46 +all_ruby_prepare() {
47 + cp "${FILESDIR}/${PN}-0.3.9-path.rb" lib/mimemagic/path.rb || die
48 + eprefixify lib/mimemagic/path.rb
49 +
50 + sed -i -e 's/git ls-files/find * -print/' ${RUBY_FAKEGEM_GEMSPEC} || die
51 +}
52 +
53 +each_ruby_install() {
54 + each_fakegem_install
55 + ruby_fakegem_extensions_installed
56 +}
57 diff --git a/dev-ruby/mimemagic/mimemagic-0.4.3-r1.ebuild b/dev-ruby/mimemagic/mimemagic-0.4.3-r1.ebuild
58 new file mode 100644
59 index 000000000000..8b8fb492af14
60 --- /dev/null
61 +++ b/dev-ruby/mimemagic/mimemagic-0.4.3-r1.ebuild
62 @@ -0,0 +1,45 @@
63 +# Copyright 1999-2021 Gentoo Authors
64 +# Distributed under the terms of the GNU General Public License v2
65 +
66 +EAPI=7
67 +USE_RUBY="ruby25 ruby26 ruby27 ruby30"
68 +
69 +RUBY_FAKEGEM_EXTRADOC="README.md"
70 +
71 +RUBY_FAKEGEM_GEMSPEC=mimemagic.gemspec
72 +
73 +inherit prefix ruby-fakegem
74 +
75 +DESCRIPTION="Fast mime detection by extension or content"
76 +HOMEPAGE="https://github.com/mimemagicrb/mimemagic"
77 +SRC_URI="https://github.com/mimemagicrb/mimemagic/archive/v${PV}.tar.gz -> ${P}.tar.gz"
78 +
79 +LICENSE="MIT"
80 +SLOT="$(ver_cut 1-2)"
81 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
82 +IUSE=""
83 +
84 +RDEPEND+=" x11-misc/shared-mime-info"
85 +
86 +ruby_add_rdepend "
87 + dev-ruby/nokogiri
88 + dev-ruby/rake
89 +"
90 +
91 +ruby_add_bdepend "test? ( dev-ruby/minitest )"
92 +
93 +all_ruby_prepare() {
94 + cp "${FILESDIR}/${PN}-0.3.9-path.rb" lib/mimemagic/path.rb || die
95 + eprefixify lib/mimemagic/path.rb
96 +
97 + sed -i -e 's/git ls-files/find * -print/' ${RUBY_FAKEGEM_GEMSPEC} || die
98 +}
99 +
100 +each_ruby_test() {
101 + ${RUBY} -Ilib:.:test -e 'Dir["test/**/*_test.rb"].each {|f| require f}' || die
102 +}
103 +
104 +each_ruby_install() {
105 + each_fakegem_install
106 + ruby_fakegem_extensions_installed
107 +}
108 --
109 2.32.0