diff options
author | Hans de Graaff <graaff@gentoo.org> | 2020-12-12 07:54:09 +0100 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2020-12-12 08:06:15 +0100 |
commit | d4afd02de893c180494276fde3583d6628d56d87 (patch) | |
tree | 98992457c7fbc1eb55213294261a435a926c0fb7 /dev-ruby/rubygems | |
parent | dev-ruby/rubygems: add 3.0.9 (diff) | |
download | gentoo-d4afd02de893c180494276fde3583d6628d56d87.tar.gz gentoo-d4afd02de893c180494276fde3583d6628d56d87.tar.bz2 gentoo-d4afd02de893c180494276fde3583d6628d56d87.zip |
dev-ruby/rubygems: add 3.1.5
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/rubygems')
-rw-r--r-- | dev-ruby/rubygems/Manifest | 1 | ||||
-rw-r--r-- | dev-ruby/rubygems/rubygems-3.1.5.ebuild | 103 |
2 files changed, 104 insertions, 0 deletions
diff --git a/dev-ruby/rubygems/Manifest b/dev-ruby/rubygems/Manifest index 6c6a77b4c818..bc4367c7bc71 100644 --- a/dev-ruby/rubygems/Manifest +++ b/dev-ruby/rubygems/Manifest @@ -8,3 +8,4 @@ DIST rubygems-3.0.9.tgz 886153 BLAKE2B 942f641c7dec30d3dd2f0756d04b1b6b071f5d3b5 DIST rubygems-3.1.2.tgz 995386 BLAKE2B bddf5dfc3568402257a2218642e6a15fe904b837114b9ce3a1aad155b235e42d96b1b0d4c6be1ee2e71712b8f1876902c343afdcb6d191ae0a6560f582cb282c SHA512 707525a98d14d46e69922e1deecd3b6c4caa090ee8113ba43b3912dc615cd2b1e0a083ecd0876a08b69c209bc05bba67d179f70d65aca45a92ac543170f13d39 DIST rubygems-3.1.3.tgz 996881 BLAKE2B 0dd3bad8420de742f5ce76db977bee800f1abf2beb48b9d8f32332c4d06814d5febb8df0a2e70f6c4f26a1aa6adbf802e041019ff1d15e2c1f8f9d2ab65974d0 SHA512 8ca0c869a53c4b99072f220bca3455edee6126effb2bc5abb9265758083688b523303e8d2ca0e6d612fbc40140c06570f990fff50cce104f443d86458b190c3b DIST rubygems-3.1.4.tgz 997835 BLAKE2B 21b8060f28e2228b7400533fa1d9fa1ae8bcaff3ebf9354e64f7d70ae35366147805a6f169986c956766bf41f34ce458d30c326c2b6f996620b14761fdf224b3 SHA512 86bb42736ccf320929eb12c83b3ce55fe95053ce5b38434902604d8d61d78c3f3cd8f20858d0fed66c473ef9fd70d7cb596c077cd06506caeac3e62ee6812ad2 +DIST rubygems-3.1.5.tgz 995812 BLAKE2B 43471515e4da8a6fe47a419f67f26efc9855334d44338eff9008cc0bc62e1477498f3e04044fa41d5f45ec0f132ca55dccb420f031b9e4945f3299c8618e2b94 SHA512 0eb2c4d18dc9304142d7d06badfd6bc1a72ba67c3b8a70f608dd127d0f7b016bc004af8dae67897685d43ddf87e468668bc89cec00b969da2f2dd67bee61a261 diff --git a/dev-ruby/rubygems/rubygems-3.1.5.ebuild b/dev-ruby/rubygems/rubygems-3.1.5.ebuild new file mode 100644 index 000000000000..83d91f198951 --- /dev/null +++ b/dev-ruby/rubygems/rubygems-3.1.5.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +USE_RUBY="ruby25 ruby26 ruby27" + +inherit ruby-ng prefix + +DESCRIPTION="Centralized Ruby extension management system" +HOMEPAGE="https://rubygems.org/" +LICENSE="GPL-2 || ( Ruby MIT )" + +SRC_URI="https://rubygems.org/rubygems/${P}.tgz" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +SLOT="0" +IUSE="server test" +RESTRICT="!test? ( test )" + +PDEPEND="server? ( =dev-ruby/builder-3* )" + +ruby_add_depend "virtual/ruby-ssl" + +ruby_add_bdepend " + test? ( + dev-ruby/json + dev-ruby/minitest:5 + dev-ruby/rake + dev-ruby/rdoc + )" + +all_ruby_prepare() { + + mkdir -p lib/rubygems/defaults || die + cp "${FILESDIR}/gentoo-defaults-4.rb" lib/rubygems/defaults/operating_system.rb || die + + eprefixify lib/rubygems/defaults/operating_system.rb + + # Disable broken tests when changing default values: + sed -i -e '/test_default_path/,/^ end/ s:^:#:' test/rubygems/test_gem.rb || die + # Avoid test that won't work as json is also installed as plain ruby code + sed -i -e '/test_realworld_default_gem/askip "gentoo"' test/rubygems/test_require.rb || die + + # Update manifest after changing files to avoid a test failure + if use test; then + rake update_manifest || die + fi +} + +each_ruby_compile() { + # Not really a build but... + sed -i -e 's:#!.*:#!'"${RUBY}"':' bin/gem +} + +each_ruby_test() { + # Unset RUBYOPT to avoid interferences, bug #158455 et. al. + #unset RUBYOPT + + if [[ "${EUID}" -ne "0" ]]; then + RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}" ${RUBY} --disable-gems -I.:lib:test:bundler/lib \ + -e 'require "rubygems"; gem "minitest", "~>5.0"; Dir["test/**/test_*.rb"].each { |tu| require tu }' || die "tests failed" + else + ewarn "The userpriv feature must be enabled to run tests, bug 408951." + eerror "Testsuite will not be run." + fi +} + +each_ruby_install() { + # Unset RUBYOPT to avoid interferences, bug #158455 et. al. + unset RUBYOPT + export RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}" + + pushd lib &>/dev/null + doruby -r * + popd &>/dev/null + + local sld=$(ruby_rbconfig_value 'sitelibdir') + insinto "${sld#${EPREFIX}}" # bug #320813 + newins "${FILESDIR}/auto_gem.rb.ruby19" auto_gem.rb + + newbin bin/gem $(basename ${RUBY} | sed -e 's:ruby:gem:') +} + +all_ruby_install() { + dodoc History.txt README.md + + if use server; then + newinitd "${FILESDIR}/init.d-gem_server2" gem_server + newconfd "${FILESDIR}/conf.d-gem_server" gem_server + fi +} + +pkg_postinst() { + if [[ ! -n $(readlink "${ROOT}"/usr/bin/gem) ]] ; then + eselect ruby set $(eselect --brief --colour=no ruby show | head -n1) + fi + + ewarn + ewarn "To switch between available Ruby profiles, execute as root:" + ewarn "\teselect ruby set ruby(25|26|...)" + ewarn +} |