summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Thode <prometheanfire@gentoo.org>2018-02-06 10:56:38 -0600
committerMatthew Thode <prometheanfire@gentoo.org>2018-02-06 11:05:27 -0600
commit3512c12707719861264f451907850ca71bde04f8 (patch)
tree15c2d7d4c170bd68403e208f965b12e51942cea6 /dev-ruby/facter
parentapp-admin/puppet-agent: 1.10.10 and 5.3.4 bup (diff)
downloadgentoo-3512c12707719861264f451907850ca71bde04f8.tar.gz
gentoo-3512c12707719861264f451907850ca71bde04f8.tar.bz2
gentoo-3512c12707719861264f451907850ca71bde04f8.zip
dev-ruby/facter: 3.9.4 bup
Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'dev-ruby/facter')
-rw-r--r--dev-ruby/facter/Manifest1
-rw-r--r--dev-ruby/facter/facter-3.9.4.ebuild108
-rw-r--r--dev-ruby/facter/facter-9999.ebuild29
3 files changed, 132 insertions, 6 deletions
diff --git a/dev-ruby/facter/Manifest b/dev-ruby/facter/Manifest
index 31f806209664..8fb3db7828c7 100644
--- a/dev-ruby/facter/Manifest
+++ b/dev-ruby/facter/Manifest
@@ -7,3 +7,4 @@ DIST facter-3.9.0.tar.gz 380715 BLAKE2B c4045020edaae06b23e0c75788cc76854f440ec7
DIST facter-3.9.1.tar.gz 380762 BLAKE2B 15d6c4884a4bd4ce1de252f51b1f480c0908ed8b1b3d7b386e651265a21359305f93dfe199b7e100d027d8507ddf99a0ee712e85e63f26f07f3f6f7c2976cc99 SHA512 a3b66bf40c062dbef644d60909a2c2afd0839c8a11fd02a0a15ccbbc1a1f216d9b0420a0f90dd44166487faa4e00843f2c0f3f057bb43bb30c22677dfac325a0
DIST facter-3.9.2.tar.gz 380883 BLAKE2B d2804664e0499715230e5696c5a9ebae933f5b43dfb37154251d47763c2c7f78cfa8d1413dd836e5a0c76ed67300d066fa5bb390f17f85cd4cb7a444eaf0d133 SHA512 bc040826311bbff40f5a151ade315d9d47ef1e0f3faa570805e48ca55405265e66308230118b9cd59f701ecd76a7b0fd4d9200dd4ace838521223a162b105374
DIST facter-3.9.3.tar.gz 387062 BLAKE2B 7fef72ae0ded8be1ac0eae317b748995df58e66837daf410970cca4049304a54af5976f4502a36a3c7d0963d0e65d5bd1c8df5dc1347cc0d6325a9d79512b676 SHA512 c01685e67ed25ae12f51086012e563df9ea80dde43c4cf40ab2f17b90e7bcb0791369a9c8ea67af7a0039e1fb2714b0758d8f0d00e4e857201ad8075d8ba51c4
+DIST facter-3.9.4.tar.gz 388097 BLAKE2B 872ea33c2412ccafd3df1b5e49e79559bac578e91003eda717d03ee1c82e5550f237459066d7fb6692df066fcce183ea4057b4e5e37d1ceaa4b79079ef1c4599 SHA512 e3bb57ad5e538c2561968aab3b47ca7324162dfc5f2a507ed872e41b98f5bbc91f6e836a3452ea2d519a933c76c17a8e1253e74b5d5769e395d7c6895a4400b1
diff --git a/dev-ruby/facter/facter-3.9.4.ebuild b/dev-ruby/facter/facter-3.9.4.ebuild
new file mode 100644
index 000000000000..c15426643a6a
--- /dev/null
+++ b/dev-ruby/facter/facter-3.9.4.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+USE_RUBY="ruby21 ruby22 ruby23 ruby24"
+
+# git-r3 goes after ruby-ng so that it overrides src_unpack properly
+inherit cmake-utils eutils multilib ruby-ng
+
+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="debug test"
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/puppetlabs/facter.git"
+ EGIT_BRANCH="master"
+ S="${S}/${P}"
+else
+ [[ "${PV}" = *_rc* ]] || \
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
+ SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ S="${S}/all/${P}"
+fi
+
+BDEPEND="
+ >=sys-devel/gcc-4.8:*
+ >=dev-libs/leatherman-1.0.0
+ dev-cpp/cpp-hocon"
+CDEPEND="
+ dev-libs/openssl:*
+ sys-apps/util-linux
+ app-emulation/virt-what
+ net-misc/curl
+ >=dev-libs/boost-1.54[nls]
+ >=dev-cpp/yaml-cpp-0.5.1
+ !<app-admin/puppet-4.0.0"
+
+ruby_add_bdepend "test? ( dev-ruby/rake dev-ruby/rspec:2 dev-ruby/mocha:0.14 )"
+
+RDEPEND="${CDEPEND}"
+DEPEND="${BDEPEND}
+ ${CDEPEND}"
+
+src_prepare() {
+ # Remove the code that installs facter.rb to the wrong directory.
+ sed -i '/install(.*facter\.rb/d' lib/CMakeLists.txt || die
+ sed -i '/install(.*facter\.jar/d' lib/CMakeLists.txt || die
+ # make it support multilib
+ sed -i "s/\ lib)/\ $(get_libdir))/g" lib/CMakeLists.txt || die
+ sed -i "s/lib\")/$(get_libdir)\")/g" CMakeLists.txt || die
+ # make the require work
+ sed -i 's/\${LIBFACTER_INSTALL_DESTINATION}\///g' lib/facter.rb.in || die
+ # be explicit about the version of rspec we test with and use the
+ # correct lib directory for tests
+ sed -i -e '/libfacter.*specs/ s/rspec/rspec-2/' \
+ -e '/libfacter.*specs/ s/lib64/lib/' CMakeLists.txt || die
+ # be more lenient for software versions for tests
+ sed -i -e '/rake/ s/~> 10.1.0/>= 10/' \
+ -e '/rspec/ s/2.11.0/2.11/' \
+ -e '/mocha/ s/0.10.5/0.14.0/' lib/Gemfile || die
+ # patches
+ default
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_VERBOSE_MAKEFILE=ON
+ -DCMAKE_BUILD_TYPE=None
+ -DCMAKE_INSTALL_PREFIX=/usr
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc
+ -DCMAKE_INSTALL_LOCALSTATEDIR=/var
+ -DUSE_JRUBY_SUPPORT=FALSE
+ -DBLKID_LIBRARY=/$(get_libdir)/libblkid.so.1
+ )
+ if use debug; then
+ mycmakeargs+=(
+ -DCMAKE_BUILD_TYPE=Debug
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+each_ruby_install() {
+ doruby "${BUILD_DIR}"/lib/facter.rb
+}
+
+src_test() {
+ cmake-utils_src_test
+}
+
+src_install() {
+ cmake-utils_src_install
+ ruby-ng_src_install
+
+ # need a variable file in env.d :(
+ diropts -m0755
+ dodir /etc/env.d
+ echo -n "FACTERDIR=/usr/$(get_libdir)" > "${D}/etc/env.d/00facterdir"
+ fperms 0644 /etc/env.d/00facterdir
+}
diff --git a/dev-ruby/facter/facter-9999.ebuild b/dev-ruby/facter/facter-9999.ebuild
index 95b52c0fbfd3..c15426643a6a 100644
--- a/dev-ruby/facter/facter-9999.ebuild
+++ b/dev-ruby/facter/facter-9999.ebuild
@@ -1,22 +1,29 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
USE_RUBY="ruby21 ruby22 ruby23 ruby24"
# git-r3 goes after ruby-ng so that it overrides src_unpack properly
-inherit cmake-utils eutils multilib ruby-ng git-r3
+inherit cmake-utils eutils multilib ruby-ng
DESCRIPTION="A cross-platform ruby library for retrieving facts from operating systems"
HOMEPAGE="http://www.puppetlabs.com/puppet/related-projects/facter/"
-EGIT_REPO_URI="https://github.com/puppetlabs/facter.git"
-EGIT_BRANCH="master"
-S="${S}/${P}"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="debug test"
-KEYWORDS=""
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/puppetlabs/facter.git"
+ EGIT_BRANCH="master"
+ S="${S}/${P}"
+else
+ [[ "${PV}" = *_rc* ]] || \
+ KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
+ SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ S="${S}/all/${P}"
+fi
BDEPEND="
>=sys-devel/gcc-4.8:*
@@ -31,6 +38,8 @@ CDEPEND="
>=dev-cpp/yaml-cpp-0.5.1
!<app-admin/puppet-4.0.0"
+ruby_add_bdepend "test? ( dev-ruby/rake dev-ruby/rspec:2 dev-ruby/mocha:0.14 )"
+
RDEPEND="${CDEPEND}"
DEPEND="${BDEPEND}
${CDEPEND}"
@@ -44,6 +53,14 @@ src_prepare() {
sed -i "s/lib\")/$(get_libdir)\")/g" CMakeLists.txt || die
# make the require work
sed -i 's/\${LIBFACTER_INSTALL_DESTINATION}\///g' lib/facter.rb.in || die
+ # be explicit about the version of rspec we test with and use the
+ # correct lib directory for tests
+ sed -i -e '/libfacter.*specs/ s/rspec/rspec-2/' \
+ -e '/libfacter.*specs/ s/lib64/lib/' CMakeLists.txt || die
+ # be more lenient for software versions for tests
+ sed -i -e '/rake/ s/~> 10.1.0/>= 10/' \
+ -e '/rspec/ s/2.11.0/2.11/' \
+ -e '/mocha/ s/0.10.5/0.14.0/' lib/Gemfile || die
# patches
default
cmake-utils_src_prepare