Diff facter-3.14.7 with a facter-9999

/usr/portage/dev-ruby/facter/facter-9999.ebuild 2019-11-24 17:09:00.000000000 +0300
1
# Copyright 1999-2020 Gentoo Authors
1
# Copyright 1999-2019 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=6
5 5
USE_RUBY="ruby23 ruby24 ruby25 ruby26"
6 6

  
7 7
# git-r3 goes after ruby-ng so that it overrides src_unpack properly
8
inherit cmake-utils eutils ruby-ng
8
inherit cmake-utils eutils multilib ruby-ng
9 9

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

  
13 13
LICENSE="Apache-2.0"
14 14
SLOT="0"
15
IUSE="test"
15
IUSE="debug test"
16 16
if [[ ${PV} == 9999 ]] ; then
17 17
	inherit git-r3
18 18
	EGIT_REPO_URI="https://github.com/puppetlabs/facter.git"
19 19
	EGIT_BRANCH="master"
20 20
else
21 21
	[[ "${PV}" = *_rc* ]] || \
22
	KEYWORDS="amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc x86"
22
	KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
23 23
	SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
24 24
fi
25 25

  
26 26
RESTRICT="!test? ( test )"
27 27

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

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

  
41
ruby_add_bdepend "test? ( dev-ruby/rake dev-ruby/rspec:2 dev-ruby/mocha:0.14 )"
42

  
43
RDEPEND="${COMMON_DEPEND}"
44
DEPEND="${BDEPEND}
45
	${COMMON_DEPEND}"
41 46

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

  
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.6-explicit-rspec-2.patch
49
)
50

  
51 50
pkg_setup() {
52 51
	ruby-ng_pkg_setup
53 52
}
......
61 60
}
62 61

  
63 62
src_prepare() {
63
	# be explicit about the version of rspec we test with
64
	sed -i -e '/libfacter.*specs/ s/rspec/rspec-2/' \
65
		CMakeLists.txt || die
66
	# be more lenient for software versions for tests
67
	sed -i -e '/rake/ s/~> 10.1.0/>= 10/' \
68
		-e '/rspec/ s/2.11.0/2.11/' \
69
		-e '/mocha/ s/0.10.5/0.14.0/' lib/Gemfile || die
70
	# patches
71
	default
64 72
	cmake-utils_src_prepare
65 73
}
66 74

  
......
74 82
	ruby-ng_src_configure
75 83

  
76 84
	local mycmakeargs=(
85
		-DCMAKE_VERBOSE_MAKEFILE=ON
77 86
		-DRUBY_LIB_INSTALL=${my_ruby_sitelibdir}
78 87
		-DBLKID_LIBRARYDIR="${EPREFIX}/$(get_libdir)"
79 88
	)
89
	if use debug; then
90
		mycmakeargs+=(
91
		  -DCMAKE_BUILD_TYPE=Debug
92
		)
93
	fi
80 94
	cmake-utils_src_configure
81 95
}
82 96

  
Thank you!