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/libusb/
Date: Sat, 18 Mar 2023 07:17:47
Message-Id: 1679123187.5ce86915a6b6bf730dbeb4c54fd6d220d8fc43b2.graaff@gentoo
1 commit: 5ce86915a6b6bf730dbeb4c54fd6d220d8fc43b2
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 18 07:06:27 2023 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 18 07:06:27 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ce86915
7
8 dev-ruby/libusb: add extension installed marker manually
9
10 This gem has an extension that is a no-op when using system
11 libusb. Install the "extension installed" marker manually to make
12 rubygems happy.
13
14 Closes: https://bugs.gentoo.org/901973
15 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
16
17 dev-ruby/libusb/libusb-0.6.4-r2.ebuild | 47 ++++++++++++++++++++++++++++++++++
18 1 file changed, 47 insertions(+)
19
20 diff --git a/dev-ruby/libusb/libusb-0.6.4-r2.ebuild b/dev-ruby/libusb/libusb-0.6.4-r2.ebuild
21 new file mode 100644
22 index 000000000000..335703d18ed0
23 --- /dev/null
24 +++ b/dev-ruby/libusb/libusb-0.6.4-r2.ebuild
25 @@ -0,0 +1,47 @@
26 +# Copyright 2022-2023 Gentoo Authors
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +EAPI=8
30 +
31 +USE_RUBY="ruby27 ruby30 ruby31"
32 +
33 +RUBY_FAKEGEM_EXTRADOC="History.md README.md"
34 +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
35 +
36 +inherit ruby-fakegem
37 +
38 +DESCRIPTION="binding that gives Ruby programmers access to arbitrary USB devices"
39 +HOMEPAGE="https://github.com/larskanis/libusb"
40 +
41 +LICENSE="BSD"
42 +SLOT="0"
43 +KEYWORDS="~amd64 ~x86"
44 +IUSE=""
45 +
46 +DEPEND+="virtual/libusb:1"
47 +RDEPEND+="${DEPEND}"
48 +
49 +ruby_add_rdepend "dev-ruby/ffi:0"
50 +ruby_add_bdepend "test? ( dev-ruby/eventmachine )"
51 +
52 +all_ruby_prepare() {
53 + sed -e '/mini_portile2/d' \
54 + -e 's/git ls-files --/find/' \
55 + -i ${RUBY_FAKEGEM_GEMSPEC} || die
56 +
57 + # Avoid tests that try to open devices or depend on specific hardware
58 + rm -f test/test_libusb_{bos,descriptors}.rb || die
59 +}
60 +
61 +each_ruby_test() {
62 + ${RUBY} -I.:lib -e "Dir['test/test_*.rb'].each{|f| require f}" || die
63 +}
64 +
65 +each_ruby_install() {
66 + each_fakegem_install
67 +
68 + # This gem includes an extension that does not actually do anything
69 + # when using the system libusb, but newer rubygems versions still
70 + # require the marker to be present.
71 + ruby_fakegem_extensions_installed
72 +}