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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Feb 14 23:37:10 2010 UTC (9 years, 2 months ago) by flameeyes
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Bump to -r3 so that we can get users to fix the problem reported in bug #303141.
(Portage version: 2.2_rc62/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.5-r2.ebuild,v 1.2 2010/01/31 23:11:51 flameeyes Exp $
4
5 EAPI="2"
6
7 USE_RUBY="ruby18 jruby"
8
9 inherit ruby-ng
10
11 DESCRIPTION="Centralized Ruby extension management system"
12 HOMEPAGE="http://rubyforge.org/projects/rubygems/"
13 LICENSE="|| ( Ruby GPL-2 )"
14
15 # Needs to be installed first
16 RESTRICT="test"
17
18 SRC_URI="mirror://rubyforge/${PN}/${P}.tgz"
19
20 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd"
21 SLOT="0"
22 IUSE="doc server"
23
24 # previous versions had rubygems bundled, so it would collide badly
25 RDEPEND="ruby_targets_jruby? ( >=dev-java/jruby-1.4.0-r5 )"
26
27 # index_gem_repository.rb
28 PDEPEND="server? ( dev-ruby/builder[ruby_targets_ruby18] )"
29
30 all_ruby_prepare() {
31 epatch "${FILESDIR}/${PN}-1.3.5-setup.patch"
32 # Fixes a new "feature" that would prevent us from recognizing installed
33 # gems inside the sandbox
34 epatch "${FILESDIR}/${PN}-1.3.3-gentoo.patch"
35 }
36
37 each_ruby_install() {
38 # RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455
39 export RUBYOPT="${GENTOO_RUBYOPT}"
40 ewarn "RUBYOPT=${RUBYOPT}"
41
42 local gemsitedir=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]' | sed -e 's:site_ruby:gems:')
43
44 # rubygems tries to create GEM_HOME if it doesn't exist, upsetting sandbox,
45 # bug #202109. Since 1.2.0 we also need to set GEM_PATH
46 # for this reason, bug #230163.
47 export GEM_HOME="${D}${gemsitedir}"
48 export GEM_PATH="${GEM_HOME}/"
49 keepdir ${gemsitedir}/{doc,gems,cache,specifications}
50
51 myconf=""
52 if ! use doc; then
53 myconf="${myconf} --no-ri"
54 myconf="${myconf} --no-rdoc"
55 fi
56
57 ${RUBY} setup.rb $myconf --destdir="${D}" || die "setup.rb install failed"
58
59 doruby "${FILESDIR}/auto_gem.rb"
60 }
61
62 all_ruby_install() {
63 dodoc README || die "dodoc README failed"
64
65 doenvd "${FILESDIR}/10rubygems" || die "doenvd 10rubygems failed"
66
67 if use server; then
68 newinitd "${FILESDIR}/init.d-gem_server2" gem_server || die "newinitd failed"
69 newconfd "${FILESDIR}/conf.d-gem_server" gem_server || die "newconfd failed"
70 fi
71 }
72
73 pkg_postinst() {
74 local gemsitedir=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]' | sed -e 's:site_ruby:gems:')
75 SOURCE_CACHE="${gemsitedir}/source_cache"
76 if [[ -e "${SOURCE_CACHE}" ]]; then
77 rm "${SOURCE_CACHE}"
78 fi
79
80 if [[ ! -n $(readlink "${ROOT}"usr/bin/gem) ]] ; then
81 eselect ruby set ruby18
82 fi
83
84 ewarn
85 ewarn "This ebuild is compatible to eselect-ruby"
86 ewarn "To switch between available Ruby profiles, execute as root:"
87 ewarn "\teselect ruby set ruby(18|19|...)"
88 ewarn
89 }
90
91 pkg_postrm() {
92 ewarn "If you have uninstalled dev-ruby/rubygems, Ruby applications are unlikely"
93 ewarn "to run in current shells because of missing auto_gem."
94 ewarn "Please run \"unset RUBYOPT\" in your shells before using ruby"
95 ewarn "or start new shells"
96 ewarn
97 ewarn "If you have not uninstalled dev-ruby/rubygems, please do not unset "
98 ewarn "RUBYOPT"
99 }

  ViewVC Help
Powered by ViewVC 1.1.20