/[gentoo-x86]/dev-ruby/rubygems/rubygems-1.3.7-r2.ebuild
Gentoo

Contents of /dev-ruby/rubygems/rubygems-1.3.7-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Aug 4 13:47:42 2010 UTC (8 years, 8 months ago) by flameeyes
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Bump to fix on MRI 1.8.6 where it failed before. Also drop hoe and rake dependencies for tests by running them manually instead.
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/rubygems-1.3.7-r2.ebuild,v 1.1 2010/08/03 16:07:36 flameeyes Exp $
4
5 EAPI="3"
6
7 USE_RUBY="ruby18 ruby19 ree18 jruby"
8
9 inherit ruby-ng prefix
10
11 DESCRIPTION="Centralized Ruby extension management system"
12 HOMEPAGE="http://rubyforge.org/projects/rubygems/"
13 LICENSE="|| ( Ruby GPL-2 )"
14
15 SRC_URI="mirror://rubyforge/${PN}/${P}.tgz"
16
17 KEYWORDS="~amd64 ~hppa ~ia64 ~mips ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd"
18 SLOT="0"
19 IUSE="server test"
20
21 RDEPEND="
22 ruby_targets_jruby? ( >=dev-java/jruby-1.4.0-r5 )
23 ruby_targets_ruby19? ( >=dev-lang/ruby-1.9.2_rc2 )"
24
25 # index_gem_repository.rb
26 PDEPEND="server? ( dev-ruby/builder[ruby_targets_ruby18] )"
27
28 # Tests fail _badly_ when YARD is installed.. but just the
29 # rdoc-related stuff, so it's not a mistake.
30 ruby_add_bdepend "
31 test? (
32 dev-ruby/rake
33 dev-ruby/hoe
34 virtual/ruby-minitest
35 dev-ruby/builder
36 !dev-ruby/yard
37 !dev-ruby/test-unit:2
38 )"
39
40 # Until all the JRuby tests' failures are sorted out
41 RESTRICT="ruby_targets_jruby? ( test )"
42
43 RUBY_PATCHES=(
44 "${FILESDIR}/${P}-gentoo.patch"
45 )
46
47 all_ruby_prepare() {
48 mkdir -p lib/rubygems/defaults || die
49 cp "${FILESDIR}/gentoo-defaults.rb" lib/rubygems/defaults/operating_system.rb || die
50
51 eprefixify lib/rubygems/defaults/operating_system.rb
52
53 # Disable broken tests when changing defaults:
54 sed -i -e '/^ def test_self_bindir_default_dir/, /^ end/ s:^:#:' \
55 test/test_gem.rb || die
56 }
57
58 each_ruby_compile() {
59 # Not really a build but...
60 sed -i -e 's:#!.*:#!'"${RUBY}"':' bin/gem
61 }
62
63 each_ruby_test() {
64 # Unset RUBYOPT to avoid interferences, bug #158455 et. al.
65 unset RUBYOPT
66
67 RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}" ${RUBY} -S rake test || die "tests failed"
68 }
69
70 each_ruby_install() {
71 # Unset RUBYOPT to avoid interferences, bug #158455 et. al.
72 unset RUBYOPT
73
74 pushd lib &>/dev/null
75 doruby -r *
76 popd &>/dev/null
77
78 case "${RUBY}" in
79 *ruby19)
80 insinto $(ruby_rbconfig_value 'sitelibdir')
81 newins "${FILESDIR}/auto_gem.rb.ruby19" auto_gem.rb || die
82 ;;
83 *)
84 doruby "${FILESDIR}/auto_gem.rb" || die
85 ;;
86 esac
87
88 newbin bin/gem $(basename ${RUBY} | sed -e 's:ruby:gem:') || die
89 }
90
91 all_ruby_install() {
92 dodoc README || die "dodoc README failed"
93
94 doenvd "${FILESDIR}/10rubygems" || die "doenvd 10rubygems failed"
95
96 if use server; then
97 newinitd "${FILESDIR}/init.d-gem_server2" gem_server || die "newinitd failed"
98 newconfd "${FILESDIR}/conf.d-gem_server" gem_server || die "newconfd failed"
99 fi
100 }
101
102 pkg_postinst() {
103 if [[ ! -n $(readlink "${ROOT}"usr/bin/gem) ]] ; then
104 eselect ruby set $(eselect --brief --no-color ruby show | head -n1)
105 fi
106
107 ewarn
108 ewarn "To switch between available Ruby profiles, execute as root:"
109 ewarn "\teselect ruby set ruby(18|19|...)"
110 ewarn
111 }
112
113 pkg_postrm() {
114 ewarn "If you have uninstalled dev-ruby/rubygems, Ruby applications are unlikely"
115 ewarn "to run in current shells because of missing auto_gem."
116 ewarn "Please run \"unset RUBYOPT\" in your shells before using ruby"
117 ewarn "or start new shells"
118 ewarn
119 ewarn "If you have not uninstalled dev-ruby/rubygems, please do not unset "
120 ewarn "RUBYOPT"
121 }

  ViewVC Help
Powered by ViewVC 1.1.20