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

Contents of /dev-ruby/rubygems/rubygems-1.8.13.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Jan 9 06:46:38 2012 UTC (7 years, 3 months ago) by graaff
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Remove broken version.

(Portage version: 2.1.10.41/cvs/Linux x86_64)

1 # Copyright 1999-2012 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.8.13.ebuild,v 1.1 2012/01/08 06:20:53 graaff Exp $
4
5 EAPI="4"
6
7 # jruby's own RUBY_ENGINE defaults are no longer compatible.
8 USE_RUBY="ruby18 ree18 ruby19 jruby"
9
10 inherit ruby-ng prefix
11
12 DESCRIPTION="Centralized Ruby extension management system"
13 HOMEPAGE="http://rubyforge.org/projects/rubygems/"
14 LICENSE="|| ( Ruby MIT )"
15
16 SRC_URI="mirror://rubyforge/${PN}/${P}.tgz"
17
18 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
19 SLOT="0"
20 IUSE="server test"
21
22 RDEPEND="
23 ruby_targets_jruby? ( >=dev-java/jruby-1.5.6-r1 )
24 ruby_targets_ruby19? ( >=dev-lang/ruby-1.9.3_rc1 )"
25
26 # index_gem_repository.rb
27 PDEPEND="server? ( dev-ruby/builder[ruby_targets_ruby18] )"
28
29 # Tests fail when YARD is installed.. but just the rdoc-related stuff,
30 # so it's not a mistake.
31 ruby_add_bdepend "
32 test? (
33 dev-ruby/minitest
34 virtual/ruby-rdoc
35 !!dev-ruby/yard
36 )"
37
38 all_ruby_prepare() {
39 mkdir -p lib/rubygems/defaults || die
40 cp "${FILESDIR}/gentoo-defaults.rb" lib/rubygems/defaults/operating_system.rb || die
41
42 eprefixify lib/rubygems/defaults/operating_system.rb
43
44 # Disable broken tests when changing default values:
45 sed -i -e '/^ def test_self_bindir_default_dir/, /^ end/ s:^:#:' \
46 -e '/^ def test_self_default_dir/, /^ end/ s:^:#:' \
47 test/rubygems/test_gem.rb || die
48
49 # Remove tests that want to write to /usr/local/bin
50 rm test/rubygems/test_gem_uninstaller.rb test/rubygems/test_gem_install_update_options.rb || die
51 }
52
53 each_ruby_compile() {
54 # Not really a build but...
55 sed -i -e 's:#!.*:#!'"${RUBY}"':' bin/gem
56 }
57
58 each_ruby_test() {
59 # Unset RUBYOPT to avoid interferences, bug #158455 et. al.
60 unset RUBYOPT
61
62 case ${RUBY} in
63 *jruby)
64 eqawarn "Skipping tests for jruby 1.5."
65 ;;
66 *)
67 RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}" ${RUBY} -I.:lib:test \
68 -e 'Dir["test/**/test_*.rb"].each { |tu| require tu }' || die "tests failed"
69 ;;
70 esac
71 }
72
73 each_ruby_install() {
74 # Unset RUBYOPT to avoid interferences, bug #158455 et. al.
75 unset RUBYOPT
76 export RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}"
77
78 pushd lib &>/dev/null
79 doruby -r *
80 popd &>/dev/null
81
82 case "${RUBY}" in
83 *ruby19)
84 local sld=$(ruby_rbconfig_value 'sitelibdir')
85 insinto "${sld#${EPREFIX}}" # bug #320813
86 newins "${FILESDIR}/auto_gem.rb.ruby19" auto_gem.rb || die
87 ;;
88 *)
89 doruby "${FILESDIR}/auto_gem.rb" || die
90 ;;
91 esac
92
93 newbin bin/gem $(basename ${RUBY} | sed -e 's:ruby:gem:') || die
94 }
95
96 all_ruby_install() {
97 dodoc History.txt README.rdoc
98
99 doenvd "${FILESDIR}/10rubygems"
100
101 if use server; then
102 newinitd "${FILESDIR}/init.d-gem_server2" gem_server || die "newinitd failed"
103 newconfd "${FILESDIR}/conf.d-gem_server" gem_server || die "newconfd failed"
104 fi
105 }
106
107 pkg_postinst() {
108 if [[ ! -n $(readlink "${ROOT}"usr/bin/gem) ]] ; then
109 eselect ruby set $(eselect --brief --no-color ruby show | head -n1)
110 fi
111
112 ewarn
113 ewarn "To switch between available Ruby profiles, execute as root:"
114 ewarn "\teselect ruby set ruby(18|19|...)"
115 ewarn
116 }
117
118 pkg_postrm() {
119 ewarn "If you have uninstalled dev-ruby/rubygems, Ruby applications are unlikely"
120 ewarn "to run in current shells because of missing auto_gem."
121 ewarn "Please run \"unset RUBYOPT\" in your shells before using ruby"
122 ewarn "or start new shells"
123 ewarn
124 ewarn "If you have not uninstalled dev-ruby/rubygems, please do not unset "
125 ewarn "RUBYOPT"
126 }

  ViewVC Help
Powered by ViewVC 1.1.20