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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Mar 30 03:37:36 2008 UTC (11 years ago) by mr_bones_
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
rename rubygems-1.1.0-r0.ebuild to match ebuild howto guidelines
(Portage version: 2.1.4.4)

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-r0.ebuild,v 1.1 2008/03/29 15:16:20 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 /usr/bin/gem18 /usr/bin/gem || die "dosym gem failed"
64
65 #This is used to update rubygems, do not want.
66 rm "${D}/usr/bin/update_rubygems18"
67
68 dodoc README
69 if use examples; then
70 cp -pPR examples "${D}/usr/share/doc/${PF}"
71 fi
72
73 cp "${FILESDIR}/auto_gem.rb" "${D}"/$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')
74 doenvd "${FILESDIR}/10rubygems"
75
76 if use server; then
77 newinitd "${FILESDIR}/init.d-gem_server" gem_server
78 newconfd "${FILESDIR}/conf.d-gem_server" gem_server
79 fi
80 }
81
82 pkg_postinst()
83 {
84 ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]')
85 SOURCE_CACHE="/usr/$(get_libdir)/ruby/gems/$ver/source_cache"
86 if [[ -e "${SOURCE_CACHE}" ]]; then
87 rm "${SOURCE_CACHE}"
88 fi
89
90 ewarn "If you have previously switched to using ruby18_with_gems using ruby-config, this"
91 ewarn "package has removed that file and makes it unnecessary anymore."
92 ewarn "Please use ruby-config to revert back to ruby18."
93 }
94
95 pkg_postrm()
96 {
97 ewarn "If you have uninstalled dev-ruby/rubygems. Ruby applications are unlikely"
98 ewarn "to run in current shells because of missing auto_gem."
99 ewarn "Please run \"unset RUBYOPT\" in your shells before using ruby"
100 ewarn "or start new shells"
101 ewarn
102 ewarn "If you have not uninstalled dev-ruby/rubygems, please do not unset "
103 ewarn "RUBYOPT"
104 }

  ViewVC Help
Powered by ViewVC 1.1.20