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