Сравнение facter-3.14.24 с facter-4.4.1

/usr/portage/dev-ruby/facter/facter-4.4.1.ebuild 2023-10-09 14:52:30.432368374 +0300
1 1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
5
USE_RUBY="ruby31"
4
EAPI=8
5
USE_RUBY="ruby27 ruby30 ruby31"
6
RUBY_FAKEGEM_GEMSPEC="facter.gemspec"
7
#RUBY_FAKEGEM_RECIPE_TEST="rspec3"
8
RUBY_FAKEGEM_RECIPE_DOC="yard"
6 9

  
7
# git-r3 goes after ruby-ng so that it overrides src_unpack properly
8
inherit cmake ruby-ng
10
inherit ruby-ng ruby-fakegem
9 11

  
10 12
DESCRIPTION="A cross-platform ruby library for retrieving facts from operating systems"
11 13
HOMEPAGE="http://www.puppetlabs.com/puppet/related-projects/facter/"
12 14

  
13 15
LICENSE="Apache-2.0"
14 16
SLOT="0"
15
IUSE="test"
17
#IUSE="test"
16 18
if [[ ${PV} == 9999 ]] ; then
17 19
	inherit git-r3
18 20
	EGIT_REPO_URI="https://github.com/puppetlabs/facter.git"
......
23 25
	SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
24 26
fi
25 27

  
26
RESTRICT="!test? ( test )"
28
#RESTRICT="!test? ( test )"
27 29

  
28
ruby_add_bdepend "test? ( dev-ruby/rake dev-ruby/rspec:3 dev-ruby/mocha:0.14 )"
29

  
30
RDEPEND="
31
	>=dev-cpp/cpp-hocon-0.2.1:=
32
	>=dev-libs/leatherman-1.0.0:=
33
	dev-libs/openssl:0=
34
	sys-apps/util-linux
35
	app-emulation/virt-what
36
	net-misc/curl
37
	dev-libs/boost:=[nls]
38
	>=dev-cpp/yaml-cpp-0.5.1
39
	!<app-admin/puppet-4.0.0"
40
DEPEND="${RDEPEND}"
41

  
42
# restore ${S} and override all phases exported by ruby-ng.eclass
43
S="${WORKDIR}/${P}"
44

  
45
PATCHES=(
46
	"${FILESDIR}"/${PN}-3.14.6-fix-static-libcpp-hocon.patch
47
	# be explicit about the version of rspec we test with
48
	"${FILESDIR}"/${PN}-3.14.8-explicit-rspec-2.patch
49
	"${FILESDIR}"/${PN}-3.14.23-gcc12.patch
50
)
51

  
52
pkg_setup() {
53
	ruby-ng_pkg_setup
54
}
30
ruby_add_rdepend "dev-ruby/hocon <dev-ruby/thor-2.0 dev-ruby/ffi"
31
#ruby_add_bdepend "test? ( dev-ruby/simplecov dev-ruby/timecop dev-ruby/webmock )"
55 32

  
56 33
src_unpack() {
57
	default
58

  
59 34
	if [[ ${PV} == 9999 ]] ; then
60 35
		git-r3_src_unpack
61 36
	fi
37
	ruby-ng_src_unpack
62 38
}
63 39

  
64
src_prepare() {
65
	cmake_src_prepare
66
}
67

  
68
each_ruby_configure() {
69
	# hack for correct calculation of relative path from facter.rb to
70
	# libfacter.so
71
	my_ruby_sitelibdir=$(ruby_rbconfig_value 'sitelibdir')
72
}
73

  
74
src_configure() {
75
	ruby-ng_src_configure
76

  
77
	local mycmakeargs=(
78
		-DRUBY_LIB_INSTALL=${my_ruby_sitelibdir}
79
		-DWITHOUT_JRUBY=ON
80
		-DBLKID_LIBRARYDIR="${EPREFIX}/$(get_libdir)"
81
	)
82
	cmake_src_configure
83
}
84

  
85
src_compile() {
86
	addpredict /proc/self/oom_score_adj
87
	cmake_src_compile
88
}
89

  
90
src_test() {
91
	cmake_src_test
92
}
93

  
94
each_ruby_install() {
95
	doruby "${BUILD_DIR}"/lib/facter.rb
96
}
97

  
98
src_install() {
99
	cmake_src_install
100
	ruby-ng_src_install
40
all_ruby_prepare() {
41
	sed -e 's/__dir__/"."/' \
42
		-e 's/__FILE__/"'${RUBY_FAKEGEM_GEMSPEC}'"/' \
43
		-i ${RUBY_FAKEGEM_GEMSPEC} || die
44
	# Breaks tests; handle deps ourselves
45
	sed -e "/require 'bundler/d" -i spec/spec_helper.rb || die
101 46
}
Спасибо!