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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Oct 9 14:09:44 2010 UTC (8 years, 6 months ago) by graaff
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Remove old versions.
(Portage version: 2.1.8.3/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-r1.ebuild,v 1.1 2010/01/28 00:49:41 flameeyes Exp $
4
5 EAPI="2"
6
7 USE_RUBY="ruby18"
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 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd"
21 SLOT="0"
22 IUSE="doc server"
23 PDEPEND="server? ( dev-ruby/builder[ruby_targets_ruby18] )" # index_gem_repository.rb
24
25 all_ruby_prepare() {
26 epatch "${FILESDIR}/${PN}-1.3.5-setup.patch"
27 # Fixes a new "feature" that would prevent us from recognizing installed
28 # gems inside the sandbox
29 epatch "${FILESDIR}/${PN}-1.3.3-gentoo.patch"
30 }
31
32 each_ruby_install() {
33 # RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455
34 export RUBYOPT="${GENTOO_RUBYOPT}"
35 ewarn "RUBYOPT=${RUBYOPT}"
36
37 ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]')
38
39 # rubygems tries to create GEM_HOME if it doesn't exist, upsetting sandbox,
40 # bug #202109. Since 1.2.0 we also need to set GEM_PATH
41 # for this reason, bug #230163.
42 export GEM_HOME="${D}/usr/$(get_libdir)/ruby/gems/${ver}"
43 export GEM_PATH="${GEM_HOME}/"
44 keepdir /usr/$(get_libdir)/ruby/gems/$ver/{doc,gems,cache,specifications}
45
46 myconf=""
47 if ! use doc; then
48 myconf="${myconf} --no-ri"
49 myconf="${myconf} --no-rdoc"
50 fi
51
52 ${RUBY} setup.rb $myconf --destdir="${D}" || die "setup.rb install failed"
53
54 doruby "${FILESDIR}/auto_gem.rb"
55 }
56
57 all_ruby_install() {
58 dodoc README || die "dodoc README failed"
59
60 doenvd "${FILESDIR}/10rubygems" || die "doenvd 10rubygems failed"
61
62 if use server; then
63 newinitd "${FILESDIR}/init.d-gem_server2" gem_server || die "newinitd failed"
64 newconfd "${FILESDIR}/conf.d-gem_server" gem_server || die "newconfd failed"
65 fi
66 }
67
68 pkg_postinst() {
69 SOURCE_CACHE="/usr/$(get_libdir)/ruby/gems/$ver/source_cache"
70 if [[ -e "${SOURCE_CACHE}" ]]; then
71 rm "${SOURCE_CACHE}"
72 fi
73
74 if [[ ! -n $(readlink "${ROOT}"usr/bin/gem) ]] ; then
75 eselect ruby set ruby18
76 fi
77
78 ewarn
79 ewarn "This ebuild is compatible to eselect-ruby"
80 ewarn "To switch between available Ruby profiles, execute as root:"
81 ewarn "\teselect ruby set ruby(18|19|...)"
82 ewarn
83 }
84
85 pkg_postrm() {
86 ewarn "If you have uninstalled dev-ruby/rubygems, Ruby applications are unlikely"
87 ewarn "to run in current shells because of missing auto_gem."
88 ewarn "Please run \"unset RUBYOPT\" in your shells before using ruby"
89 ewarn "or start new shells"
90 ewarn
91 ewarn "If you have not uninstalled dev-ruby/rubygems, please do not unset "
92 ewarn "RUBYOPT"
93 }

  ViewVC Help
Powered by ViewVC 1.1.20