Gentoo Archives: gentoo-commits

From: "Richard Brown (rbrown)" <rbrown@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-ruby/rubygems: rubygems-0.9.5.ebuild
Date: Sat, 15 Dec 2007 17:34:37
Message-Id: E1J3auB-0007OF-9p@stork.gentoo.org
1 rbrown 07/12/15 17:34:27
2
3 Added: rubygems-0.9.5.ebuild
4 Log:
5 Version Bump
6 (Portage version: 2.1.3.19)
7
8 Revision Changes Path
9 1.1 dev-ruby/rubygems/rubygems-0.9.5.ebuild
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/rubygems/rubygems-0.9.5.ebuild?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/rubygems/rubygems-0.9.5.ebuild?rev=1.1&content-type=text/plain
13
14 Index: rubygems-0.9.5.ebuild
15 ===================================================================
16 # Copyright 1999-2007 Gentoo Foundation
17 # Distributed under the terms of the GNU General Public License v2
18 # $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/rubygems-0.9.5.ebuild,v 1.1 2007/12/15 17:34:26 rbrown Exp $
19
20 inherit ruby
21
22 DESCRIPTION="Centralized Ruby extension management system"
23 HOMEPAGE="http://rubyforge.org/projects/rubygems/"
24 LICENSE="Ruby"
25
26 # Needs to be installed first
27 RESTRICT="test"
28
29 # The URL depends implicitly on the version, unfortunately. Even if you
30 # change the filename on the end, it still downloads the same file.
31 SRC_URI="http://rubyforge.org/frs/download.php/28174/${P}.tgz"
32
33 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
34 SLOT="0"
35 IUSE="doc server examples"
36 DEPEND=">=dev-lang/ruby-1.8"
37 PDEPEND="server? ( dev-ruby/builder )" # index_gem_repository.rb
38
39 USE_RUBY="ruby18"
40
41 PATCHES="${FILESDIR}/${P}-setup.patch"
42
43 src_unpack() {
44 ruby_src_unpack
45
46 # Delete mis-packaged . files
47 cd "${S}"
48 find -name '.*' -type f -print0|xargs -0 rm
49
50 }
51
52 src_compile() {
53 # Allowing ruby_src_compile would be bad with the new setup.rb
54 :
55 }
56
57 src_install() {
58 # RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455
59 export RUBYOPT="${GENTOO_RUBYOPT}"
60
61 ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]')
62 export GEM_HOME="/usr/$(get_libdir)/ruby/gems/${ver}"
63 keepdir /usr/$(get_libdir)/ruby/gems/$ver/{doc,gems,cache,specifications}
64
65 myconf="--no-ri"
66 if ! use doc; then
67 myconf="${myconf} --no-rdoc"
68 fi
69
70 ${RUBY} setup.rb $myconf --prefix="${D}" || die "setup.rb install failed"
71
72 dodoc README
73 if use examples; then
74 cp -pPR examples "${D}/usr/share/doc/${PF}"
75 fi
76
77 cp "${FILESDIR}/auto_gem.rb" "${D}"/$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')
78 doenvd "${FILESDIR}/10rubygems"
79
80 if use server; then
81 newinitd "${FILESDIR}/init.d-gem_server" gem_server
82 newconfd "${FILESDIR}/conf.d-gem_server" gem_server
83 fi
84 }
85
86 pkg_postinst()
87 {
88 ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]')
89 SOURCE_CACHE="/usr/$(get_libdir)/ruby/gems/$ver/source_cache"
90 if [[ -e "${SOURCE_CACHE}" ]]; then
91 rm "${SOURCE_CACHE}"
92 fi
93
94 ewarn "If you have previously switched to using ruby18_with_gems using ruby-config, this"
95 ewarn "package has removed that file and makes it unnecessary anymore."
96 ewarn "Please use ruby-config to revert back to ruby18."
97 }
98
99 pkg_postrm()
100 {
101 ewarn "If you have uninstalled dev-ruby/rubygems. Ruby applications are unlikely"
102 ewarn "to run in current shells because of missing auto_gem."
103 ewarn "Please run \"unset RUBYOPT\" in your shells before using ruby"
104 ewarn "or start new shells"
105 ewarn
106 ewarn "If you have not uninstalled dev-ruby/rubygems, please do not unset "
107 ewarn "RUBYOPT"
108 }
109
110
111
112 --
113 gentoo-commits@g.o mailing list