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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Jul 21 19:40:36 2007 UTC (11 years, 9 months ago) by graaff
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Remove older, unstable, versions
(Portage version: 2.1.2.9)

1 # Copyright 1999-2007 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.3.ebuild,v 1.1 2007/05/17 08:54:15 rbrown 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/20585/${P}.tgz"
17
18 KEYWORDS="~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}/no-system-rubygems.patch"
26 USE_RUBY="ruby18"
27
28 src_unpack() {
29 ruby_src_unpack
30 use doc || epatch "${FILESDIR}/${PN}-0.9.1-no_rdoc_install.patch"
31
32 # Delete mis-packaged . files
33 cd ${S}
34 find -name '.*' -type f -print0|xargs -0 rm
35 }
36
37 src_compile() {
38 ${RUBY} setup.rb config --libruby="/usr/$(get_libdir)/ruby" || die "setup.rb config failed"
39 ${RUBY} setup.rb setup || die "setup.rb setup failed"
40 }
41
42 src_test() {
43 # Currently RESTRICTed because rubygems needs to be installed
44 # When I work out how to get around that I'll remove the RETRICT
45
46 #for i in test/{test,functional}*.rb; do
47 # ruby -I pkgs/sources/lib/ -I lib ${i} # || die "$i failed"
48 #done
49 ruby setup.rb test || die "test failed"
50 }
51
52 src_install() {
53 # RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455
54 export RUBYOPT="${GENTOO_RUBYOPT}"
55
56 # Fix GEM_HOME to install sources.gem
57 ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]')
58 export GEM_HOME="${D}usr/$(get_libdir)/ruby/gems/${ver}"
59
60 ${RUBY} setup.rb install --prefix=${D} || die "setup.rb install failed"
61 erubydoc
62 cp "${FILESDIR}/auto_gem.rb" "${D}"/$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')
63 keepdir /usr/$(get_libdir)/ruby/gems/$ver/doc
64 doenvd "${FILESDIR}/10rubygems"
65 }
66
67 pkg_postinst()
68 {
69 ewarn "If you have previously switched to using ruby18_with_gems using ruby-config, this"
70 ewarn "package has removed that file and makes it unnecessary anymore."
71 ewarn "Please use ruby-config to revert back to ruby18."
72 }
73
74 pkg_postrm()
75 {
76 ewarn "If you have uninstalled dev-ruby/rubygems. Ruby applications are unlikely"
77 ewarn "to run in current shells because of missing auto_gem."
78 ewarn "Please run \"unset RUBYOPT\" in your shells before using ruby"
79 ewarn "or start new shells"
80 ewarn
81 ewarn "If you have not unstinalled dev-ruby/rubygems, please do not unset "
82 ewarn "RUBYOPT"
83 }

  ViewVC Help
Powered by ViewVC 1.1.20