diff options
author | Matthew Thode <prometheanfire@gentoo.org> | 2023-10-24 23:15:29 -0500 |
---|---|---|
committer | Matthew Thode <prometheanfire@gentoo.org> | 2023-10-24 23:15:29 -0500 |
commit | 5e99197ab33659c52e5a86efeef3c929be9d74f2 (patch) | |
tree | 4d92acbe8c1403f303f10bd9a249222ac42bf3c1 /dev-ruby/facter/facter-4.5.1.ebuild | |
parent | dev-libs/leatherman: add 1.12.11 (diff) | |
download | gentoo-5e99197ab33659c52e5a86efeef3c929be9d74f2.tar.gz gentoo-5e99197ab33659c52e5a86efeef3c929be9d74f2.tar.bz2 gentoo-5e99197ab33659c52e5a86efeef3c929be9d74f2.zip |
dev-ruby/facter: add 4.5.1
Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
Diffstat (limited to 'dev-ruby/facter/facter-4.5.1.ebuild')
-rw-r--r-- | dev-ruby/facter/facter-4.5.1.ebuild | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/dev-ruby/facter/facter-4.5.1.ebuild b/dev-ruby/facter/facter-4.5.1.ebuild new file mode 100644 index 000000000000..18070dbf7ff7 --- /dev/null +++ b/dev-ruby/facter/facter-4.5.1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +USE_RUBY="ruby30 ruby31 ruby32" +RUBY_FAKEGEM_GEMSPEC="facter.gemspec" +RUBY_FAKEGEM_RECIPE_TEST="rspec3" +RUBY_FAKEGEM_RECIPE_DOC="yard" + +inherit ruby-fakegem + +DESCRIPTION="A cross-platform ruby library for retrieving facts from operating systems" +HOMEPAGE="http://www.puppetlabs.com/puppet/related-projects/facter/" + +LICENSE="Apache-2.0" +SLOT="0" +#IUSE="test" +if [[ ${PV} == 9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/puppetlabs/facter.git" + EGIT_BRANCH="master" +else + [[ "${PV}" = *_rc* ]] || \ + KEYWORDS="~amd64 ~x86" + #KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" + SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +fi + +#RESTRICT="!test? ( test )" + +ruby_add_rdepend "dev-ruby/hocon <dev-ruby/thor-2.0 dev-ruby/ffi dev-ruby/sys-filesystem" +ruby_add_bdepend "test? ( dev-ruby/simplecov dev-ruby/timecop dev-ruby/webmock )" + +PATCHES=( + "${FILESDIR}"/facter-4.4.3-rspec-gentoo-tweak.patch +) + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + fi + ruby-ng_src_unpack +} + +all_ruby_prepare() { + sed -e 's/__dir__/"."/' \ + -e 's/__FILE__/"'${RUBY_FAKEGEM_GEMSPEC}'"/' \ + -i ${RUBY_FAKEGEM_GEMSPEC} || die + # Breaks tests; handle deps ourselves + sed -e "/require 'bundler/d" -i spec/spec_helper.rb || die + # dev tasks not needed, but block tests + for f in tasks/rubocop.rake tasks/check.rake ; do + test -e ${f} && mv -f ${f}{,.DISABLE} + done +} |