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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Fri Oct 31 07:39:39 2008 UTC (10 years, 5 months ago) by graaff
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Remove old versions
(Portage version: 2.1.4.5)

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-1.0.1.ebuild,v 1.5 2008/01/21 11:59:25 caster 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/29548/${P}.tgz"
17
18 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~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 USE_RUBY="ruby18"
25
26 PATCHES="${FILESDIR}/${PN}-0.9.5-setup.patch"
27
28 src_unpack() {
29 ruby_src_unpack
30
31 # Delete mis-packaged . files
32 cd "${S}"
33 find -name '.*' -type f -print0|xargs -0 rm
34
35 }
36
37 src_compile() {
38 # Allowing ruby_src_compile would be bad with the new setup.rb
39 :
40 }
41
42 src_install() {
43 # RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455
44 export RUBYOPT="${GENTOO_RUBYOPT}"
45
46 ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]')
47
48 # rubygems tries to create GEM_HOME if it doesn't exist, upsetting sandbox,
49 # bug #202109
50 export GEM_HOME="${D}/usr/$(get_libdir)/ruby/gems/${ver}"
51 keepdir /usr/$(get_libdir)/ruby/gems/$ver/{doc,gems,cache,specifications}
52
53 myconf="--no-ri"
54 if ! use doc; then
55 myconf="${myconf} --no-rdoc"
56 fi
57
58 ${RUBY} setup.rb $myconf --prefix="${D}" || die "setup.rb install failed"
59
60 dosym /usr/bin/gem18 /usr/bin/gem
61 dosym /usr/bin/update_rubygems18 /usr/bin/update_rubygems
62
63 dodoc README
64 if use examples; then
65 cp -pPR examples "${D}/usr/share/doc/${PF}"
66 fi
67
68 cp "${FILESDIR}/auto_gem.rb" "${D}"/$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')
69 doenvd "${FILESDIR}/10rubygems"
70
71 if use server; then
72 newinitd "${FILESDIR}/init.d-gem_server" gem_server
73 newconfd "${FILESDIR}/conf.d-gem_server" gem_server
74 fi
75 }
76
77 pkg_postinst()
78 {
79 ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]')
80 SOURCE_CACHE="/usr/$(get_libdir)/ruby/gems/$ver/source_cache"
81 if [[ -e "${SOURCE_CACHE}" ]]; then
82 rm "${SOURCE_CACHE}"
83 fi
84
85 ewarn "If you have previously switched to using ruby18_with_gems using ruby-config, this"
86 ewarn "package has removed that file and makes it unnecessary anymore."
87 ewarn "Please use ruby-config to revert back to ruby18."
88 }
89
90 pkg_postrm()
91 {
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