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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (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.4: +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.1.0.ebuild,v 1.4 2008/04/11 07:00:30 rbrown 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 # 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/34638/${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}/${P}-setup.patch
27 ${FILESDIR}/${P}-dependency-installer-install-dir-fix.patch
28 "
29
30 src_unpack() {
31 ruby_src_unpack
32
33 # Delete mis-packaged . files
34 cd "${S}"
35 find -name '.*' -type f -print0|xargs -0 rm
36
37 }
38
39 src_compile() {
40 # Allowing ruby_src_compile would be bad with the new setup.rb
41 :
42 }
43
44 src_install() {
45 # RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455
46 export RUBYOPT="${GENTOO_RUBYOPT}"
47
48 ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]')
49
50 # rubygems tries to create GEM_HOME if it doesn't exist, upsetting sandbox,
51 # bug #202109
52 export GEM_HOME="${D}/usr/$(get_libdir)/ruby/gems/${ver}"
53 keepdir /usr/$(get_libdir)/ruby/gems/$ver/{doc,gems,cache,specifications}
54
55 myconf=""
56 if ! use doc; then
57 myconf="${myconf} --no-ri"
58 myconf="${myconf} --no-rdoc"
59 fi
60
61 ${RUBY} setup.rb $myconf --prefix="${D}" || die "setup.rb install failed"
62
63 dosym gem18 /usr/bin/gem || die "dosym gem failed"
64
65 dodoc README || die "dodoc README failed"
66 if use examples; then
67 cp -pPR examples "${D}/usr/share/doc/${PF}" || die "cp examples failed"
68 fi
69
70 cp "${FILESDIR}/auto_gem.rb" "${D}"/$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]') || die "cp auto_gem.rb failed"
71 doenvd "${FILESDIR}/10rubygems" || die "doenvd 10rubygems failed"
72
73 if use server; then
74 newinitd "${FILESDIR}/init.d-gem_server" gem_server || die "newinitd failed"
75 newconfd "${FILESDIR}/conf.d-gem_server" gem_server || die "newconfd failed"
76 fi
77 }
78
79 pkg_postinst()
80 {
81 SOURCE_CACHE="/usr/$(get_libdir)/ruby/gems/$ver/source_cache"
82 if [[ -e "${SOURCE_CACHE}" ]]; then
83 rm "${SOURCE_CACHE}"
84 fi
85
86 ewarn "If you have previously switched to using ruby18_with_gems using ruby-config, this"
87 ewarn "package has removed that file and makes it unnecessary anymore."
88 ewarn "Please use ruby-config to revert back to ruby18."
89 }
90
91 pkg_postrm()
92 {
93 ewarn "If you have uninstalled dev-ruby/rubygems. Ruby applications are unlikely"
94 ewarn "to run in current shells because of missing auto_gem."
95 ewarn "Please run \"unset RUBYOPT\" in your shells before using ruby"
96 ewarn "or start new shells"
97 ewarn
98 ewarn "If you have not uninstalled dev-ruby/rubygems, please do not unset "
99 ewarn "RUBYOPT"
100 }

  ViewVC Help
Powered by ViewVC 1.1.20