Gentoo Archives: gentoo-commits

From: "Alex Legler (a3li)" <a3li@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-ruby/rubygems: rubygems-1.3.1-r30.ebuild ChangeLog
Date: Sat, 21 Mar 2009 09:50:59
Message-Id: E1Lkxqy-0003XG-P4@stork.gentoo.org
1 a3li 09/03/21 09:50:56
2
3 Modified: ChangeLog
4 Added: rubygems-1.3.1-r30.ebuild
5 Log:
6 Adding special version for Ruby 1.9.1 testing
7 (Portage version: 2.2_rc25/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.119 dev-ruby/rubygems/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/rubygems/ChangeLog?rev=1.119&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/rubygems/ChangeLog?rev=1.119&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/rubygems/ChangeLog?r1=1.118&r2=1.119
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v
19 retrieving revision 1.118
20 retrieving revision 1.119
21 diff -u -r1.118 -r1.119
22 --- ChangeLog 10 Jan 2009 15:52:59 -0000 1.118
23 +++ ChangeLog 21 Mar 2009 09:50:56 -0000 1.119
24 @@ -1,6 +1,11 @@
25 # ChangeLog for dev-ruby/rubygems
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.118 2009/01/10 15:52:59 armin76 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.119 2009/03/21 09:50:56 a3li Exp $
29 +
30 +*rubygems-1.3.1-r30 (20 Mar 2009)
31 +
32 + 20 Mar 2009; Alex Legler <a3li@g.o> +rubygems-1.3.1-r30.ebuild:
33 + Adding special version for Ruby 1.9.1 testing
34
35 10 Jan 2009; Raúl Porcel <armin76@g.o> rubygems-1.3.1.ebuild:
36 alpha/ia64 stable wrt #253424
37
38
39
40 1.1 dev-ruby/rubygems/rubygems-1.3.1-r30.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/rubygems/rubygems-1.3.1-r30.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/rubygems/rubygems-1.3.1-r30.ebuild?rev=1.1&content-type=text/plain
44
45 Index: rubygems-1.3.1-r30.ebuild
46 ===================================================================
47 # Copyright 1999-2009 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/rubygems-1.3.1-r30.ebuild,v 1.1 2009/03/21 09:50:56 a3li Exp $
50
51 inherit ruby
52
53 DESCRIPTION="Centralized Ruby extension management system"
54 HOMEPAGE="http://rubyforge.org/projects/rubygems/"
55 LICENSE="|| ( Ruby GPL-2 )"
56
57 # Needs to be installed first
58 RESTRICT="test"
59
60 # The URL depends implicitly on the version, unfortunately. Even if you
61 # change the filename on the end, it still downloads the same file.
62 SRC_URI="mirror://rubyforge/${PN}/${P}.tgz"
63
64 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
65 SLOT="0"
66 IUSE="doc server"
67 DEPEND="=dev-lang/ruby-1.8*"
68 PDEPEND="server? ( dev-ruby/builder )" # index_gem_repository.rb
69
70 USE_RUBY="ruby18"
71
72 src_unpack() {
73 unpack ${A}
74 cd "${S}"
75
76 epatch "${FILESDIR}/${P}-setup.patch"
77 epatch "${FILESDIR}/${P}-proxy.patch"
78 # Fixes a new "feature" that would prevent us from recognizing installed
79 # gems inside the sandbox
80 epatch "${FILESDIR}/${P}-gentoo.patch"
81 }
82
83 src_compile() {
84 # Allowing ruby_src_compile would be bad with the new setup.rb
85 :
86 }
87
88 src_install() {
89 # RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455
90 export RUBYOPT="${GENTOO_RUBYOPT}"
91 ewarn "RUBYOPT=${RUBYOPT}"
92
93 # Force ebuild to use Ruby 1.8
94 export RUBY="/usr/bin/ruby18"
95
96 ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]')
97
98 # rubygems tries to create GEM_HOME if it doesn't exist, upsetting sandbox,
99 # bug #202109. Since 1.2.0 we also need to set GEM_PATH
100 # for this reason, bug #230163.
101 export GEM_HOME="${D}/usr/$(get_libdir)/ruby/gems/${ver}"
102 export GEM_PATH="${GEM_HOME}/"
103 keepdir /usr/$(get_libdir)/ruby/gems/$ver/{doc,gems,cache,specifications}
104
105 myconf=""
106 if ! use doc; then
107 myconf="${myconf} --no-ri"
108 myconf="${myconf} --no-rdoc"
109 fi
110
111 ${RUBY} setup.rb $myconf --prefix="${D}" || die "setup.rb install failed"
112
113 dodoc README || die "dodoc README failed"
114
115 cp "${FILESDIR}/auto_gem.rb" "${D}"/$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]') || die "cp auto_gem.rb failed"
116 doenvd "${FILESDIR}/10rubygems" || die "doenvd 10rubygems failed"
117
118 if use server; then
119 newinitd "${FILESDIR}/init.d-gem_server2" gem_server || die "newinitd failed"
120 newconfd "${FILESDIR}/conf.d-gem_server" gem_server || die "newconfd failed"
121 fi
122 }
123
124 pkg_postinst()
125 {
126 SOURCE_CACHE="/usr/$(get_libdir)/ruby/gems/$ver/source_cache"
127 if [[ -e "${SOURCE_CACHE}" ]]; then
128 rm "${SOURCE_CACHE}"
129 fi
130
131 if [[ ! -n $(readlink "${ROOT}"usr/bin/gem) ]] ; then
132 eselect ruby set ruby18
133 fi
134
135 ewarn
136 ewarn "This ebuild is compatible to eselect-ruby"
137 ewarn "To switch between available Ruby profiles, execute as root:"
138 ewarn "\teselect ruby set ruby(18|19|...)"
139 ewarn
140 }
141
142 pkg_postrm()
143 {
144 ewarn "If you have uninstalled dev-ruby/rubygems, Ruby applications are unlikely"
145 ewarn "to run in current shells because of missing auto_gem."
146 ewarn "Please run \"unset RUBYOPT\" in your shells before using ruby"
147 ewarn "or start new shells"
148 ewarn
149 ewarn "If you have not uninstalled dev-ruby/rubygems, please do not unset "
150 ewarn "RUBYOPT"
151 }