Gentoo Archives: gentoo-commits

From: "Caleb Tennis (caleb)" <caleb@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/ruby: ChangeLog ruby-1.8.7_p22.ebuild ruby-1.8.7.ebuild
Date: Sun, 29 Jun 2008 19:39:21
Message-Id: E1KD2jy-0005W2-QB@stork.gentoo.org
1 caleb 08/06/29 19:39:14
2
3 Modified: ChangeLog
4 Added: ruby-1.8.7_p22.ebuild
5 Removed: ruby-1.8.7.ebuild
6 Log:
7 bump 1.8.7 to 1.8.7_p22 for security fix
8 (Portage version: 2.1.5.2)
9
10 Revision Changes Path
11 1.338 dev-lang/ruby/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.338&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ChangeLog?rev=1.338&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ChangeLog?r1=1.337&r2=1.338
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v
20 retrieving revision 1.337
21 retrieving revision 1.338
22 diff -u -r1.337 -r1.338
23 --- ChangeLog 20 Jun 2008 15:08:24 -0000 1.337
24 +++ ChangeLog 29 Jun 2008 19:39:14 -0000 1.338
25 @@ -1,6 +1,12 @@
26 # ChangeLog for dev-lang/ruby
27 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.337 2008/06/20 15:08:24 caleb Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.338 2008/06/29 19:39:14 caleb Exp $
30 +
31 +*ruby-1.8.7_p22 (29 Jun 2008)
32 +
33 + 29 Jun 2008; Caleb Tennis <caleb@g.o> -ruby-1.8.7.ebuild,
34 + +ruby-1.8.7_p22.ebuild:
35 + bump 1.8.7 for security fix
36
37 20 Jun 2008; Caleb Tennis <caleb@g.o> -ruby-1.8.6_p230.ebuild:
38 nevermind, don't bump this yet
39
40
41
42 1.1 dev-lang/ruby/ruby-1.8.7_p22.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ruby-1.8.7_p22.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/ruby-1.8.7_p22.ebuild?rev=1.1&content-type=text/plain
46
47 Index: ruby-1.8.7_p22.ebuild
48 ===================================================================
49 # Copyright 1999-2008 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-1.8.7_p22.ebuild,v 1.1 2008/06/29 19:39:14 caleb Exp $
52
53 WANT_AUTOCONF="latest"
54 WANT_AUTOMAKE="latest"
55
56 #PATCHES APPLY, DOESN'T COMPILE THOUGH
57 #ONIGURUMA="onigd2_5_9"
58
59 inherit autotools eutils flag-o-matic multilib versionator
60
61 SLOT=$(get_version_component_range 1-2)
62 MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
63
64 MY_P="${PN}-$(replace_version_separator 3 '-')"
65 S=${WORKDIR}/${MY_P}
66
67 DESCRIPTION="An object-oriented scripting language"
68 HOMEPAGE="http://www.ruby-lang.org/"
69 SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.bz2"
70 # cjk? ( http://www.geocities.jp/kosako3/oniguruma/archive/${ONIGURUMA}.tar.gz )"
71
72 LICENSE="Ruby"
73 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
74 IUSE="berkdb debug doc emacs examples gdbm ipv6 rubytests socks5 ssl threads tk xemacs" #cjk
75
76 RDEPEND="
77 berkdb? ( sys-libs/db )
78 gdbm? ( sys-libs/gdbm )
79 ssl? ( dev-libs/openssl )
80 socks5? ( >=net-proxy/dante-1.1.13 )
81 tk? ( dev-lang/tk )
82 >=dev-ruby/ruby-config-0.3.1
83 !=dev-lang/ruby-cvs-${SLOT}*
84 !dev-ruby/rdoc
85 !dev-ruby/rexml"
86 DEPEND="${RDEPEND}"
87 PDEPEND="emacs? ( app-emacs/ruby-mode )
88 xemacs? ( app-xemacs/ruby-modes )"
89
90 PROVIDE="virtual/ruby"
91
92 src_unpack() {
93 unpack ${A}
94
95 # if use cjk ; then
96 # einfo "Applying ${ONIGURUMA}"
97 # pushd "${WORKDIR}/oniguruma"
98 # econf --with-rubydir="${S}" || die "oniguruma econf failed"
99 # emake $MY_SUFFIX || die "oniguruma emake failed"
100 # popd
101 # fi
102
103 cd "${S}/ext/dl"
104 epatch "${FILESDIR}/${PN}-1.8.6-memory-leak.diff"
105 cd "${S}"
106
107 # Fix a hardcoded lib path in configure script
108 sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
109 configure.in || die "sed failed"
110
111 eautoreconf
112 }
113
114 src_compile() {
115 # -fomit-frame-pointer makes ruby segfault, see bug #150413.
116 filter-flags -fomit-frame-pointer
117 # In many places aliasing rules are broken; play it safe
118 # as it's risky with newer compilers to leave it as it is.
119 append-flags -fno-strict-aliasing
120
121 # Socks support via dante
122 if use socks5 ; then
123 # Socks support can't be disabled as long as SOCKS_SERVER is
124 # set and socks library is present, so need to unset
125 # SOCKS_SERVER in that case.
126 unset SOCKS_SERVER
127 fi
128
129 # Increase GC_MALLOC_LIMIT if set (default is 8000000)
130 if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
131 append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
132 fi
133
134 econf --program-suffix=$MY_SUFFIX --enable-shared \
135 $(use_enable socks5 socks) \
136 $(use_enable doc install-doc) \
137 $(use_enable threads pthread) \
138 $(use_enable ipv6) \
139 $(use_enable debug) \
140 $(use_with berkdb dbm) \
141 $(use_with gdbm) \
142 $(use_with ssl openssl) \
143 $(use_with tk) \
144 ${myconf} \
145 --with-sitedir=/usr/$(get_libdir)/ruby/site_ruby \
146 || die "econf failed"
147
148 emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
149 }
150
151 src_test() {
152 emake -j1 test || die "make test failed"
153
154 elog "Ruby's make test has been run. Ruby also ships with a make check"
155 elog "that cannot be run until after ruby has been installed."
156 elog
157 if use rubytests; then
158 elog "You have enabled rubytests, so they will be installed to"
159 elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
160 elog "than root, and you must place them into a writeable directory."
161 elog "Then call: "
162 elog
163 elog "ruby -C /location/of/tests runner.rb"
164 else
165 elog "Enable the rubytests USE flag to install the make check tests"
166 fi
167 }
168
169 src_install() {
170 LD_LIBRARY_PATH="${D}/usr/$(get_libdir)"
171 RUBYLIB="${S}:${LD_LIBRARY_PATH}/ruby/${SLOT}"
172 for d in $(find "${S}/ext" -type d) ; do
173 RUBYLIB="${RUBYLIB}:$d"
174 done
175 export LD_LIBRARY_PATH RUBYLIB
176
177 emake DESTDIR="${D}" install || die "make install failed"
178
179 MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
180 keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitelibdir']")
181 keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitearchdir']")
182
183 if use doc; then
184 make DESTDIR="${D}" install-doc || die "make install-doc failed"
185 fi
186
187 if use examples; then
188 dodir /usr/share/doc/${PF}
189 cp -pPR sample "${D}/usr/share/doc/${PF}"
190 fi
191
192 dosym libruby$MY_SUFFIX$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%.*})
193 dosym libruby$MY_SUFFIX$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%_*})
194
195 dodoc ChangeLog NEWS README* ToDo
196
197 if use rubytests; then
198 dodir /usr/share/${PN}-${SLOT}
199 cp -pPR test "${D}/usr/share/${PN}-${SLOT}"
200 fi
201 }
202
203 pkg_postinst() {
204
205 if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
206 "${ROOT}usr/sbin/ruby-config" ruby$MY_SUFFIX
207 fi
208 elog
209 elog "You can change the default ruby interpreter by ${ROOT}usr/sbin/ruby-config"
210 elog
211 }
212
213 pkg_postrm() {
214 if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
215 "${ROOT}usr/sbin/ruby-config" ruby$MY_SUFFIX
216 fi
217 }
218
219
220
221 --
222 gentoo-commits@l.g.o mailing list