From 45a6e82bee41452295212dd7217645c39fff35f3 Mon Sep 17 00:00:00 2001 From: David Seifert Date: Wed, 18 Dec 2019 23:43:42 +0100 Subject: [PATCH] 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 --- dev-ruby/facter/facter-3.14.6.ebuild | 44 +++++++------------ .../facter-3.14.6-explicit-rspec-2.patch | 11 +++++ ...acter-3.14.6-fix-static-libcpp-hocon.patch | 9 ++++ 3 files changed, 35 insertions(+), 29 deletions(-) create mode 100644 dev-ruby/facter/files/facter-3.14.6-explicit-rspec-2.patch create mode 100644 dev-ruby/facter/files/facter-3.14.6-fix-static-libcpp-hocon.patch 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 ! 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") -- 2.26.2