| 1 |
|
# Copyright 1999-2023 Gentoo Authors
|
|
1 |
# Copyright 1999-2026 Gentoo Authors
|
| 2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| 5 |
|
USE_RUBY="ruby30 ruby31 ruby32"
|
|
5 |
USE_RUBY="ruby32 ruby33"
|
| 6 |
6 |
RUBY_FAKEGEM_GEMSPEC="facter.gemspec"
|
| 7 |
7 |
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
|
| 8 |
8 |
RUBY_FAKEGEM_RECIPE_DOC="yard"
|
| ... | ... | |
| 10 |
10 |
inherit ruby-fakegem
|
| 11 |
11 |
|
| 12 |
12 |
DESCRIPTION="A cross-platform ruby library for retrieving facts from operating systems"
|
| 13 |
|
HOMEPAGE="http://www.puppetlabs.com/puppet/related-projects/facter/"
|
|
13 |
HOMEPAGE="https://www.puppetlabs.com/"
|
| 14 |
14 |
|
| 15 |
15 |
LICENSE="Apache-2.0"
|
| 16 |
16 |
SLOT="0"
|
| 17 |
|
#IUSE="test"
|
|
17 |
IUSE="test"
|
| 18 |
18 |
if [[ ${PV} == 9999 ]] ; then
|
| 19 |
19 |
inherit git-r3
|
| 20 |
20 |
EGIT_REPO_URI="https://github.com/puppetlabs/facter.git"
|
| 21 |
21 |
EGIT_BRANCH="master"
|
| 22 |
22 |
else
|
| 23 |
23 |
[[ "${PV}" = *_rc* ]] || \
|
| 24 |
|
KEYWORDS="~amd64 ~x86"
|
| 25 |
|
#KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
|
24 |
KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc x86"
|
| 26 |
25 |
SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
| 27 |
26 |
fi
|
| 28 |
27 |
|
| ... | ... | |
| 32 |
31 |
ruby_add_bdepend "test? ( dev-ruby/simplecov dev-ruby/timecop dev-ruby/webmock )"
|
| 33 |
32 |
|
| 34 |
33 |
PATCHES=(
|
| 35 |
|
"${FILESDIR}"/facter-4.4.3-rspec-gentoo-tweak.patch
|
|
34 |
"${FILESDIR}"/facter-4.7.0-gentoo-thor-gemspec.patch
|
|
35 |
"${FILESDIR}"/facter-4.10.0-gentoo-os-release.patch
|
| 36 |
36 |
)
|
| 37 |
37 |
|
| 38 |
38 |
src_unpack() {
|
| ... | ... | |
| 52 |
52 |
for f in tasks/rubocop.rake tasks/check.rake ; do
|
| 53 |
53 |
test -e ${f} && mv -f ${f}{,.DISABLE}
|
| 54 |
54 |
done
|
|
55 |
|
|
56 |
# Avoid dependency on simplecov
|
|
57 |
sed -e '/simplecov/,/^end/ s:^:#:' \
|
|
58 |
-e '/SimpleCov/ s:^:#:' \
|
|
59 |
-i spec/spec_helper.rb || die
|
|
60 |
|
|
61 |
# Use the correct path on Gentoo
|
|
62 |
sed -e 's:/usr/bin/true:/bin/true:' \
|
|
63 |
-i spec/custom_facts/core/execution/posix_spec.rb || die
|
| 55 |
64 |
}
|