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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sat May 9 08:57:19 2009 UTC (9 years, 11 months ago) by a3li
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
Long overdue purging of old versions.
(Portage version: 2.2_rc33/cvs/Linux x86_64)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/rubygems-0.9.4-r2.ebuild,v 1.7 2008/06/29 06:56:40 graaff Exp $
4
5 inherit ruby
6
7 DESCRIPTION="Centralized Ruby extension management system"
8 HOMEPAGE="http://rubyforge.org/projects/rubygems/"
9 LICENSE="Ruby"
10
11 # Needs to be installed first
12 RESTRICT="test"
13
14 # The URL depends implicitly on the version, unfortunately. Even if you
15 # change the filename on the end, it still downloads the same file.
16 SRC_URI="http://rubyforge.org/frs/download.php/20989/${P}.tgz"
17
18 KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
19 SLOT="0"
20 IUSE="doc server examples"
21 DEPEND=">=dev-lang/ruby-1.8"
22 PDEPEND="server? ( dev-ruby/builder )" # index_gem_repository.rb
23
24 PATCHES="${FILESDIR}/${PN}-0.9.1-no_post_install.patch
25 ${FILESDIR}/${P}-shebang-env-fix.patch
26 ${FILESDIR}/no-system-rubygems.patch"
27 USE_RUBY="ruby18"
28
29 src_unpack() {
30 ruby_src_unpack
31 use doc || epatch "${FILESDIR}/${PN}-0.9.1-no_rdoc_install.patch"
32 }
33
34 src_compile() {
35 ${RUBY} setup.rb config --libruby="/usr/$(get_libdir)/ruby" || die "setup.rb config failed"
36 ${RUBY} setup.rb setup || die "setup.rb setup failed"
37 }
38
39 src_test() {
40 # Currently RESTRICTed because rubygems needs to be installed
41 # When I work out how to get around that I'll remove the RETRICT
42
43 #for i in test/{test,functional}*.rb; do
44 # ruby -I pkgs/sources/lib/ -I lib ${i} # || die "$i failed"
45 #done
46 ruby setup.rb test || die "test failed"
47 }
48
49 src_install() {
50 # RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455
51 export RUBYOPT="${GENTOO_RUBYOPT}"
52
53 # Fix GEM_HOME to install sources.gem
54 ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]')
55 export GEM_HOME="${D}usr/$(get_libdir)/ruby/gems/${ver}"
56
57 ${RUBY} setup.rb install --prefix="${D}" || die "setup.rb install failed"
58 erubydoc
59 cp "${FILESDIR}/auto_gem.rb" "${D}"/$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')
60 keepdir /usr/$(get_libdir)/ruby/gems/$ver/doc
61 doenvd "${FILESDIR}/10rubygems"
62
63 if use server; then
64 newinitd "${FILESDIR}/init.d-gem_server" gem_server
65 newconfd "${FILESDIR}/conf.d-gem_server" gem_server
66 fi
67 }
68
69 pkg_postinst()
70 {
71 ewarn "If you have previously switched to using ruby18_with_gems using ruby-config, this"
72 ewarn "package has removed that file and makes it unnecessary anymore."
73 ewarn "Please use ruby-config to revert back to ruby18."
74 }
75
76 pkg_postrm()
77 {
78 ewarn "If you have uninstalled dev-ruby/rubygems. Ruby applications are unlikely"
79 ewarn "to run in current shells because of missing auto_gem."
80 ewarn "Please run \"unset RUBYOPT\" in your shells before using ruby"
81 ewarn "or start new shells"
82 ewarn
83 ewarn "If you have not uninstalled dev-ruby/rubygems, please do not unset "
84 ewarn "RUBYOPT"
85 }

  ViewVC Help
Powered by ViewVC 1.1.20