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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Mon Dec 21 12:13:35 2009 UTC (9 years, 4 months ago) by a3li
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
FILE REMOVED
Purge old
(Portage version: 2.2_rc59/cvs/Linux x86_64)

1 # Copyright 1999-2009 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.1.ebuild,v 1.8 2009/05/09 08:57:19 a3li Exp $
4
5 inherit ruby
6
7 DESCRIPTION="Centralized Ruby extension management system"
8 HOMEPAGE="http://rubyforge.org/projects/rubygems/"
9 LICENSE="|| ( Ruby GPL-2 )"
10
11 # Needs to be installed first
12 RESTRICT="test"
13
14 SRC_URI="mirror://rubyforge/${PN}/${P}.tgz"
15
16 KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
17 SLOT="0"
18 IUSE="doc server"
19 DEPEND=">=dev-lang/ruby-1.8"
20 RDEPEND="${DEPEND}"
21 PDEPEND="server? ( dev-ruby/builder )" # index_gem_repository.rb
22
23 USE_RUBY="ruby18"
24
25 src_unpack() {
26 unpack ${A}
27 cd "${S}"
28
29 epatch "${FILESDIR}/${P}-setup.patch"
30 epatch "${FILESDIR}/${P}-proxy.patch"
31 epatch "${FILESDIR}/${P}-gentoo.patch"
32 }
33
34 src_compile() {
35 # Allowing ruby_src_compile would be bad with the new setup.rb
36 :
37 }
38
39 src_install() {
40 # RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455
41 export RUBYOPT="${GENTOO_RUBYOPT}"
42 ewarn "RUBYOPT=${RUBYOPT}"
43
44 ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]')
45
46 # rubygems tries to create GEM_HOME if it doesn't exist, upsetting
47 # sandbox, bug #202109. Since 1.2.0 we also need to set GEM_PATH
48 # for this reason, bug #230163.
49 export GEM_HOME="${D}/usr/$(get_libdir)/ruby/gems/${ver}"
50 export GEM_PATH="${GEM_HOME}/"
51 keepdir /usr/$(get_libdir)/ruby/gems/$ver/{doc,gems,cache,specifications}
52
53 myconf=""
54 if ! use doc; then
55 myconf="${myconf} --no-ri"
56 myconf="${myconf} --no-rdoc"
57 fi
58
59 ${RUBY} setup.rb $myconf --prefix="${D}" || die "setup.rb install failed"
60
61 dosym gem18 /usr/bin/gem || die "dosym gem failed"
62
63 dodoc README ChangeLog TODO || die "dodoc README failed"
64
65 cp "${FILESDIR}/auto_gem.rb" "${D}"/$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]') || die "cp auto_gem.rb failed"
66 doenvd "${FILESDIR}/10rubygems" || die "doenvd 10rubygems failed"
67
68 if use server; then
69 newinitd "${FILESDIR}/init.d-gem_server2" gem_server || die "newinitd failed"
70 newconfd "${FILESDIR}/conf.d-gem_server" gem_server || die "newconfd failed"
71 fi
72 }
73
74 pkg_postinst()
75 {
76 SOURCE_CACHE="/usr/$(get_libdir)/ruby/gems/$ver/source_cache"
77 if [[ -e "${SOURCE_CACHE}" ]]; then
78 rm "${SOURCE_CACHE}"
79 fi
80 }
81
82 pkg_postrm()
83 {
84 ewarn "If you have uninstalled dev-ruby/rubygems. Ruby applications are unlikely"
85 ewarn "to run in current shells because of missing auto_gem."
86 ewarn "Please run \"unset RUBYOPT\" in your shells before using ruby"
87 ewarn "or start new shells"
88 ewarn
89 ewarn "If you have not uninstalled dev-ruby/rubygems, please do not unset "
90 ewarn "RUBYOPT"
91 }

  ViewVC Help
Powered by ViewVC 1.1.20