Gentoo Archives: gentoo-commits

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