From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A3CE2138334 for ; Wed, 25 Jul 2018 18:44:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6A81AE0866; Wed, 25 Jul 2018 18:44:35 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 15D17E0866 for ; Wed, 25 Jul 2018 18:44:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CEFC9335C8C for ; Wed, 25 Jul 2018 18:44:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9C944387 for ; Wed, 25 Jul 2018 18:44:30 +0000 (UTC) From: "Matt Thode" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Thode" Message-ID: <1532544255.63fd0be576f822c65c0800bd7eb485266cf40b38.prometheanfire@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/facter/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-ruby/facter/facter-3.11.3-r1.ebuild dev-ruby/facter/facter-3.11.3.ebuild dev-ruby/facter/facter-9999.ebuild X-VCS-Directories: dev-ruby/facter/ X-VCS-Committer: prometheanfire X-VCS-Committer-Name: Matt Thode X-VCS-Revision: 63fd0be576f822c65c0800bd7eb485266cf40b38 X-VCS-Branch: master Date: Wed, 25 Jul 2018 18:44:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 472a58a5-7366-43a6-af18-590cdb7f8f87 X-Archives-Hash: cb2d54a46dd5b0b0e5bfb44b4c5738a4 commit: 63fd0be576f822c65c0800bd7eb485266cf40b38 Author: Alexander Tsoy tsoy me> AuthorDate: Tue Jul 24 23:05:38 2018 +0000 Commit: Matt Thode gentoo org> CommitDate: Wed Jul 25 18:44:15 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63fd0be5 dev-ruby/facter: ebuild cleanup Cleanup: - do not use ${S} set by ruby-ng.eclass - correctly generate facter.rb, FACTERDIR environment variable is no longer required - remove no longer needed environment file - remove no longer needed multilib magic Closes: https://bugs.gentoo.org/601746 Closes: https://github.com/gentoo/gentoo/pull/9339 Signed-off-by: Matthew Thode gentoo.org> ...acter-3.11.3.ebuild => facter-3.11.3-r1.ebuild} | 62 +++++++++++---------- dev-ruby/facter/facter-9999.ebuild | 64 ++++++++++++---------- 2 files changed, 67 insertions(+), 59 deletions(-) diff --git a/dev-ruby/facter/facter-3.11.3.ebuild b/dev-ruby/facter/facter-3.11.3-r1.ebuild similarity index 65% rename from dev-ruby/facter/facter-3.11.3.ebuild rename to dev-ruby/facter/facter-3.11.3-r1.ebuild index 6210613630d..d99f0e0675c 100644 --- a/dev-ruby/facter/facter-3.11.3.ebuild +++ b/dev-ruby/facter/facter-3.11.3-r1.ebuild @@ -17,18 +17,16 @@ 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-cpp/cpp-hocon" -CDEPEND=" +COMMON_DEPEND=" >=dev-libs/leatherman-1.0.0:= dev-libs/openssl:* sys-apps/util-linux @@ -40,23 +38,29 @@ CDEPEND=" ruby_add_bdepend "test? ( dev-ruby/rake dev-ruby/rspec:2 dev-ruby/mocha:0.14 )" -RDEPEND="${CDEPEND}" +RDEPEND="${COMMON_DEPEND}" DEPEND="${BDEPEND} - ${CDEPEND}" + ${COMMON_DEPEND}" + +# restore ${S} and override all phases exported by ruby-ng.eclass +S="${WORKDIR}/${P}" + +pkg_setup() { + ruby-ng_pkg_setup +} + +src_unpack() { + default + + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + fi +} 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 + # be explicit about the version of rspec we test with sed -i -e '/libfacter.*specs/ s/rspec/rspec-2/' \ - -e '/libfacter.*specs/ s/lib64/lib/' CMakeLists.txt || die + 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/' \ @@ -66,12 +70,18 @@ src_prepare() { cmake-utils_src_prepare } +each_ruby_configure() { + # hack for correct calculation of relative path from facter.rb to + # libfacter.so + my_ruby_sitelibdir=$(ruby_rbconfig_value 'sitelibdir') +} + src_configure() { + ruby-ng_src_configure + local mycmakeargs=( -DCMAKE_VERBOSE_MAKEFILE=ON - -DCMAKE_BUILD_TYPE=None - -DCMAKE_INSTALL_PREFIX=/usr - -DBLKID_LIBRARY=/$(get_libdir)/libblkid.so.1 + -DRUBY_LIB_INSTALL=${my_ruby_sitelibdir} ) if use debug; then mycmakeargs+=( @@ -85,21 +95,15 @@ src_compile() { cmake-utils_src_compile } -each_ruby_install() { - doruby "${BUILD_DIR}"/lib/facter.rb -} - src_test() { cmake-utils_src_test } +each_ruby_install() { + doruby "${BUILD_DIR}"/lib/facter.rb +} + 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 4500cc443e2..d99f0e0675c 100644 --- a/dev-ruby/facter/facter-9999.ebuild +++ b/dev-ruby/facter/facter-9999.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=6 -USE_RUBY="ruby21 ruby22 ruby23 ruby24" +USE_RUBY="ruby23 ruby24 ruby25" # git-r3 goes after ruby-ng so that it overrides src_unpack properly inherit cmake-utils eutils multilib ruby-ng @@ -17,18 +17,16 @@ 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-cpp/cpp-hocon" -CDEPEND=" +COMMON_DEPEND=" >=dev-libs/leatherman-1.0.0:= dev-libs/openssl:* sys-apps/util-linux @@ -40,23 +38,29 @@ CDEPEND=" ruby_add_bdepend "test? ( dev-ruby/rake dev-ruby/rspec:2 dev-ruby/mocha:0.14 )" -RDEPEND="${CDEPEND}" +RDEPEND="${COMMON_DEPEND}" DEPEND="${BDEPEND} - ${CDEPEND}" + ${COMMON_DEPEND}" + +# restore ${S} and override all phases exported by ruby-ng.eclass +S="${WORKDIR}/${P}" + +pkg_setup() { + ruby-ng_pkg_setup +} + +src_unpack() { + default + + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + fi +} 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 + # be explicit about the version of rspec we test with sed -i -e '/libfacter.*specs/ s/rspec/rspec-2/' \ - -e '/libfacter.*specs/ s/lib64/lib/' CMakeLists.txt || die + 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/' \ @@ -66,12 +70,18 @@ src_prepare() { cmake-utils_src_prepare } +each_ruby_configure() { + # hack for correct calculation of relative path from facter.rb to + # libfacter.so + my_ruby_sitelibdir=$(ruby_rbconfig_value 'sitelibdir') +} + src_configure() { + ruby-ng_src_configure + local mycmakeargs=( -DCMAKE_VERBOSE_MAKEFILE=ON - -DCMAKE_BUILD_TYPE=None - -DCMAKE_INSTALL_PREFIX=/usr - -DBLKID_LIBRARY=/$(get_libdir)/libblkid.so.1 + -DRUBY_LIB_INSTALL=${my_ruby_sitelibdir} ) if use debug; then mycmakeargs+=( @@ -85,21 +95,15 @@ src_compile() { cmake-utils_src_compile } -each_ruby_install() { - doruby "${BUILD_DIR}"/lib/facter.rb -} - src_test() { cmake-utils_src_test } +each_ruby_install() { + doruby "${BUILD_DIR}"/lib/facter.rb +} + 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 }