summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2019-12-18 23:43:42 +0100
committerDavid Seifert <soap@gentoo.org>2019-12-18 23:43:42 +0100
commit45a6e82bee41452295212dd7217645c39fff35f3 (patch)
tree1c90ccc9c36af36e866359d2506c6ee37288ced7 /dev-ruby
parentdev-python/precis-i18n: Bump version and enable Python 3.7 and 3.8 (diff)
downloadgentoo-45a6e82bee41452295212dd7217645c39fff35f3.tar.gz
gentoo-45a6e82bee41452295212dd7217645c39fff35f3.tar.bz2
gentoo-45a6e82bee41452295212dd7217645c39fff35f3.zip
dev-ruby/facter: Fix for shared dev-cpp/cpp-hocon
Closes: https://bugs.gentoo.org/703148 Package-Manager: Portage-2.3.81, Repoman-2.3.20 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-ruby')
-rw-r--r--dev-ruby/facter/facter-3.14.6.ebuild44
-rw-r--r--dev-ruby/facter/files/facter-3.14.6-explicit-rspec-2.patch11
-rw-r--r--dev-ruby/facter/files/facter-3.14.6-fix-static-libcpp-hocon.patch9
3 files changed, 35 insertions, 29 deletions
diff --git a/dev-ruby/facter/facter-3.14.6.ebuild b/dev-ruby/facter/facter-3.14.6.ebuild
index a4124fce9bdd..da1945e046fa 100644
--- a/dev-ruby/facter/facter-3.14.6.ebuild
+++ b/dev-ruby/facter/facter-3.14.6.ebuild
@@ -1,18 +1,18 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
USE_RUBY="ruby23 ruby24 ruby25 ruby26"
# git-r3 goes after ruby-ng so that it overrides src_unpack properly
-inherit cmake-utils eutils multilib ruby-ng
+inherit cmake-utils eutils 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"
+IUSE="test"
if [[ ${PV} == 9999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/puppetlabs/facter.git"
@@ -25,28 +25,29 @@ fi
RESTRICT="!test? ( test )"
-BDEPEND="
- >=sys-devel/gcc-4.8:*
- >=dev-cpp/cpp-hocon-0.1.4-r1"
-COMMON_DEPEND="
+ruby_add_bdepend "test? ( dev-ruby/rake dev-ruby/rspec:2 dev-ruby/mocha:0.14 )"
+
+RDEPEND="
+ >=dev-cpp/cpp-hocon-0.2.1:=
>=dev-libs/leatherman-1.0.0:=
dev-libs/openssl:0=
sys-apps/util-linux
app-emulation/virt-what
net-misc/curl
- >=dev-libs/boost-1.54:=[nls]
+ dev-libs/boost:=[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="${COMMON_DEPEND}"
-DEPEND="${BDEPEND}
- ${COMMON_DEPEND}"
+DEPEND="${RDEPEND}"
# restore ${S} and override all phases exported by ruby-ng.eclass
S="${WORKDIR}/${P}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.14.6-fix-static-libcpp-hocon.patch
+ # be explicit about the version of rspec we test with
+ "${FILESDIR}"/${PN}-3.14.6-explicit-rspec-2.patch
+)
+
pkg_setup() {
ruby-ng_pkg_setup
}
@@ -60,15 +61,6 @@ src_unpack() {
}
src_prepare() {
- # be explicit about the version of rspec we test with
- sed -i -e '/libfacter.*specs/ s/rspec/rspec-2/' \
- 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
}
@@ -82,15 +74,9 @@ src_configure() {
ruby-ng_src_configure
local mycmakeargs=(
- -DCMAKE_VERBOSE_MAKEFILE=ON
-DRUBY_LIB_INSTALL=${my_ruby_sitelibdir}
-DBLKID_LIBRARYDIR="${EPREFIX}/$(get_libdir)"
)
- if use debug; then
- mycmakeargs+=(
- -DCMAKE_BUILD_TYPE=Debug
- )
- fi
cmake-utils_src_configure
}
diff --git a/dev-ruby/facter/files/facter-3.14.6-explicit-rspec-2.patch b/dev-ruby/facter/files/facter-3.14.6-explicit-rspec-2.patch
new file mode 100644
index 000000000000..cd8f9f614d11
--- /dev/null
+++ b/dev-ruby/facter/files/facter-3.14.6-explicit-rspec-2.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -205,7 +205,7 @@
+ if (RUBY_FOUND)
+ find_program(BUNDLER_PATH NAMES bundle.bat bundle)
+ if (BUNDLER_PATH)
+- add_test(NAME "libfacter\\ specs" COMMAND ${BUNDLER_PATH} exec rspec WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/lib")
++ add_test(NAME "libfacter\\ specs" COMMAND ${BUNDLER_PATH} exec rspec-2 WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/lib")
+ endif()
+ endif()
+ add_test(NAME "facter\\ smoke" COMMAND facter)
diff --git a/dev-ruby/facter/files/facter-3.14.6-fix-static-libcpp-hocon.patch b/dev-ruby/facter/files/facter-3.14.6-fix-static-libcpp-hocon.patch
new file mode 100644
index 000000000000..26c193c12b57
--- /dev/null
+++ b/dev-ruby/facter/files/facter-3.14.6-fix-static-libcpp-hocon.patch
@@ -0,0 +1,9 @@
+--- a/cmake/FindCPPHOCON.cmake
++++ b/cmake/FindCPPHOCON.cmake
+@@ -1,5 +1,5 @@
+ include(FindDependency)
+-find_dependency(CPPHOCON DISPLAY "cpp-hocon" HEADERS "hocon/config.hpp" LIBRARIES "libcpp-hocon.a")
++find_dependency(CPPHOCON DISPLAY "cpp-hocon" HEADERS "hocon/config.hpp" LIBRARIES "libcpp-hocon.so")
+
+ include(FeatureSummary)
+ set_package_properties(CPPHOCON PROPERTIES DESCRIPTION "A C++ parser for the HOCON configuration language" URL "https://github.com/puppetlabs/cpp-hocon")