Gentoo Archives: gentoo-commits

From: "Alistair Bush (ali_bush)" <ali_bush@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-java/jruby: ChangeLog jruby-1.4.1.ebuild jruby-1.5.1-r2.ebuild jruby-1.5.1-r1.ebuild
Date: Sat, 26 Jun 2010 11:58:45
Message-Id: 20100626115841.54E232CF77@corvid.gentoo.org
1 ali_bush 10/06/26 11:58:41
2
3 Modified: ChangeLog jruby-1.4.1.ebuild
4 Added: jruby-1.5.1-r2.ebuild
5 Removed: jruby-1.5.1-r1.ebuild
6 Log:
7 Fix #305459 in both 1.4.1 and 1.5.1. Fix bug 325191 for 1.5.1 and progress towards getting tests working for 1.5.1.
8 (Portage version: 2.1.8.3/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.61 dev-java/jruby/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/ChangeLog?rev=1.61&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/ChangeLog?rev=1.61&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/ChangeLog?r1=1.60&r2=1.61
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v
20 retrieving revision 1.60
21 retrieving revision 1.61
22 diff -u -r1.60 -r1.61
23 --- ChangeLog 22 Jun 2010 22:08:33 -0000 1.60
24 +++ ChangeLog 26 Jun 2010 11:58:41 -0000 1.61
25 @@ -1,6 +1,14 @@
26 # ChangeLog for dev-java/jruby
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.60 2010/06/22 22:08:33 flameeyes Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.61 2010/06/26 11:58:41 ali_bush Exp $
30 +
31 +*jruby-1.5.1-r2 (26 Jun 2010)
32 +
33 + 26 Jun 2010; Alistair Bush <ali_bush@g.o>
34 + +files/1.5.1/build.xml.patch, jruby-1.4.1.ebuild, +jruby-1.5.1-r2.ebuild,
35 + +files/1.5.1/testfixes.patch, -jruby-1.5.1-r1.ebuild:
36 + Fix #305459 in both 1.4.1 and 1.5.1. Fix bug 325191 for 1.5.1 and progress
37 + towards getting tests working for 1.5.1.
38
39 22 Jun 2010; Diego E. Pettenò <flameeyes@g.o>
40 -files/jruby-1.5.0-bindir.patch, files/jruby-1.5.0-system-jars.patch,
41
42
43
44 1.3 dev-java/jruby/jruby-1.4.1.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/jruby-1.4.1.ebuild?rev=1.3&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/jruby-1.4.1.ebuild?rev=1.3&content-type=text/plain
48 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/jruby-1.4.1.ebuild?r1=1.2&r2=1.3
49
50 Index: jruby-1.4.1.ebuild
51 ===================================================================
52 RCS file: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.4.1.ebuild,v
53 retrieving revision 1.2
54 retrieving revision 1.3
55 diff -u -r1.2 -r1.3
56 --- jruby-1.4.1.ebuild 19 Jun 2010 11:07:14 -0000 1.2
57 +++ jruby-1.4.1.ebuild 26 Jun 2010 11:58:41 -0000 1.3
58 @@ -1,6 +1,6 @@
59 # Copyright 1999-2010 Gentoo Foundation
60 # Distributed under the terms of the GNU General Public License v2
61 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.4.1.ebuild,v 1.2 2010/06/19 11:07:14 ali_bush Exp $
62 +# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.4.1.ebuild,v 1.3 2010/06/26 11:58:41 ali_bush Exp $
63
64 EAPI="2"
65 JAVA_PKG_IUSE="doc source test"
66 @@ -112,6 +112,9 @@
67 find build_lib -name "*.jar" ! -name "jsr292-mock.jar" -delete || die
68 rm lib/profile.jar || die
69
70 + use bsf && java-pkg_jar-from --into build_lib \
71 + --build-only bsf-2.3
72 +
73 if ! use bsf; then
74 # Remove BSF test cases.
75 cd "${S}/test/org/jruby"
76 @@ -123,7 +126,8 @@
77 }
78
79 src_compile() {
80 - eant jar $(use_doc apidocs) -Djdk1.5+=true
81 + eant jar $(use_doc apidocs) $(use bsf && echo "-Dbsf.present") \
82 + -Djdk1.5+=true
83 }
84
85 src_test() {
86
87
88
89 1.1 dev-java/jruby/jruby-1.5.1-r2.ebuild
90
91 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/jruby-1.5.1-r2.ebuild?rev=1.1&view=markup
92 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/jruby-1.5.1-r2.ebuild?rev=1.1&content-type=text/plain
93
94 Index: jruby-1.5.1-r2.ebuild
95 ===================================================================
96 # Copyright 1999-2010 Gentoo Foundation
97 # Distributed under the terms of the GNU General Public License v2
98 # $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.5.1-r2.ebuild,v 1.1 2010/06/26 11:58:41 ali_bush Exp $
99
100 EAPI="2"
101 JAVA_PKG_IUSE="doc source test"
102 inherit eutils java-pkg-2 java-ant-2
103
104 MY_PV="${PV/_rc1/RC1}"
105
106 DESCRIPTION="Java-based Ruby interpreter implementation"
107 HOMEPAGE="http://jruby.codehaus.org/"
108 SRC_URI="http://jruby.org.s3.amazonaws.com/downloads/${PV}/${PN}-src-${PV}.tar.gz"
109 LICENSE="|| ( CPL-1.0 GPL-2 LGPL-2.1 )"
110 SLOT="0"
111 KEYWORDS="~amd64"
112 IUSE="bsf ssl"
113
114 CDEPEND=">=dev-java/bytelist-1.0.6:0
115 >=dev-java/constantine-0.6:0
116 >=dev-java/jline-0.9.94:0
117 >=dev-java/joni-1.1.3:0
118 >=dev-java/jnr-posix-1.1.3:0
119 >=dev-java/jnr-netdb-1.0:0
120 >=dev-java/jvyamlb-0.2.5:0
121 >=dev-java/asm-3.2:3
122 dev-java/jcodings:0
123 >=dev-java/jffi-0.7_pre:0.4
124 dev-java/joda-time:0
125 dev-util/jay:0[java]
126 dev-java/nailgun:0
127 dev-java/jaffl:0
128 dev-java/jgrapht:0
129 dev-java/ant-core:0
130 dev-java/bsf:2.3"
131
132 RDEPEND="${CDEPEND}
133 >=virtual/jre-1.6"
134
135 DEPEND="${CDEPEND}
136 >=virtual/jdk-1.6
137 test? (
138 dev-java/ant-junit4:0
139 dev-java/ant-trax:0
140 dev-java/junit:4
141 java-virtuals/jdk-with-com-sun
142 dev-java/commons-logging:0
143 dev-java/xalan:0
144 >=dev-java/jna-posix-1.0.1:0
145 )
146 !!<dev-ruby/jruby-1.3.1-r1"
147
148 PDEPEND="ssl? ( dev-ruby/jruby-openssl )"
149
150 # Tests fail.
151 # Need to stop injecting jar's into classpath.
152 RESTRICT="test"
153
154 S="${WORKDIR}/${PN}-${MY_PV}"
155
156 RUBY_HOME=/usr/share/${PN}/lib/ruby
157 SITE_RUBY=${RUBY_HOME}/site_ruby
158 GEMS=${RUBY_HOME}/gems
159
160 JAVA_ANT_REWRITE_CLASSPATH="true"
161 JAVA_ANT_IGNORE_SYSTEM_CLASSES="true"
162 EANT_GENTOO_CLASSPATH="ant-core asm-3 bsf-2.3 bytelist constantine jay \
163 jcodings jffi-0.4 jline constantine \
164 joda-time joni jnr-posix jnr-netdb jvyamlb nailgun jaffl jgrapht"
165 EANT_NEEDS_TOOLS="true"
166
167 pkg_setup() {
168 java-pkg-2_pkg_setup
169
170 local fail
171
172 for directory in "${GEMS}" "${SITE_RUBY}"; do
173 if [[ -L ${directory} ]]; then
174 eerror "${directory} is a symlink. Please do the following to resolve the situation:"
175 echo 'emerge -an app-portage/gentoolkit'
176 echo 'equery -qC b '"${directory}"' | sort | uniq | sed s/^/=/ > ~/jruby.fix'
177 echo 'emerge -1C $(< ~/jruby.fix)'
178 echo "rm ${directory}"
179 echo 'emerge -1 $(< ~/jruby.fix)'
180 echo 'rm ~/jruby.fix'
181
182 eerror "For more information, please see http://bugs.gentoo.org/show_bug.cgi?id=302187"
183 fail="true"
184 fi
185 done
186
187 if [[ -n ${fail} ]]; then
188 die "Please address the above errors, then run emerge --resume"
189 fi
190 }
191
192 java_prepare() {
193 epatch "${FILESDIR}"/${PN}-1.5.0-system-jars.patch
194 epatch "${FILESDIR}/${PV}/build.xml.patch"
195 epatch "${FILESDIR}/${PV}/testfixes.patch"
196
197 # We don't need to use Retroweaver. There is a jarjar and a regular jar
198 # target but even with jarjarclean, both are a pain. The latter target
199 # is slightly easier so go with this one.
200 sed -r -i \
201 -e 's/maxmemory="128m"/maxmemory="192m"/' \
202 -e "/RetroWeaverTask/d" \
203 -e "/<zipfileset .+\/>/d" \
204 build.xml || die
205
206 sed -i -e '/Arndt/d' src/org/jruby/RubyBigDecimal.java
207
208 # Delete the bundled JARs but keep invokedynamic.jar.
209 # No source is available and it's only a dummy anyway.
210 find build_lib -name "*.jar" ! -name "jsr292-mock.jar" -delete || die
211 rm lib/profile.jar || die
212
213 # change some defaults for Gentoo to work properly
214 cat - >> src/org/jruby/jruby.properties <<EOF
215 jruby.bindir = /usr/bin
216 EOF
217 }
218
219 src_compile() {
220 local flags=""
221 use bsf && flags="-Dbsf.present=true"
222
223 eant jar $(use_doc apidocs) -Djdk1.5+=true ${flags}
224 }
225
226 src_test() {
227 if [ ${UID} == 0 ] ; then
228 ewarn 'The tests will fail if run as root so skipping them.'
229 ewarn 'Enable FEATURES="userpriv" if you want to run them.'
230 return
231 fi
232 # Our jruby.jar is unbundled so we need to add the classpath to this test.
233 sed -i "s:java -jar:java -Xbootclasspath/a\:#{ENV['JRUBY_CP']} -jar:g" test/test_load_compiled_ruby_class_from_classpath.rb || die
234 sed -i "s@:refid => 'build.classpath'@:path =>\"#{ENV['JRUBY_CP']}:lib/jruby.jar\"@g" \
235 rakelib/commands.rake || die
236 #sed -i "s@:refid => 'test.class.path'@:path => \"#{ENV['JRUBY_CP']}@g" \
237 # rakelib/commands.rake || die
238
239 #bsf optionally depends on jruby, which means that the previously
240 #installed jruby will be added to classpath, nasty things will happen.
241 local cpath=`java-pkg_getjars ${EANT_GENTOO_CLASSPATH// /,},junit-4`
242 cpath="$(echo ${cpath} | sed -e "s_${ROOT}/usr/share/jruby/lib/jruby.jar:__g")"
243 cpath="${cpath}:$(java-pkg_getjars --build-only commons-logging,xalan)"
244 EANT_GENTOO_CLASSPATH=""
245
246 local flags=""
247 use bsf && flags="-Dbsf.present=true"
248
249 #Clear RUBYOPT
250 export RUBYOPT=""
251 export JRUBY_CP="${cpath}"
252 ANT_TASKS="ant-junit4 ant-trax" \
253 JRUBY_OPTS="" eant test -Djdk1.5+=true -Djruby.bindir=bin \
254 -Dgentoo.classpath="${cpath}" ${flags}
255 }
256
257 src_install() {
258 local bin
259
260 java-pkg_dojar lib/${PN}.jar
261 dodoc README docs/{*.txt,README.*} || die
262
263 use doc && java-pkg_dojavadoc docs/api
264 use source && java-pkg_dosrc src/org
265
266 # We run the sed here in install so that we don't get the wrong
267 # data during the test phase!
268 sed \
269 -e '/++ebuild-cut-here++/, /--ebuild-cut-here--/ d' \
270 -e '/^JRUBY_HOME=/s:=:=/usr/share/jruby:' \
271 bin/jruby > "${T}"/jruby
272
273 dobin "${T}"/jruby "${S}"/bin/j{irb{,_swing},rubyc} || die
274
275 insinto "${RUBY_HOME}"
276 doins -r "${S}"/lib/ruby/{1.8,1.9,site_ruby} || die
277
278 # Remove all the references to RubyGems as we're just going to
279 # install it through dev-ruby/rubygems.
280 find "${D}${RUBY_HOME}" -type f \
281 '(' '(' -path '*rubygems*' -not -name 'jruby.rb' ')' -or -name 'ubygems.rb' -or -name 'datadir.rb' ')' \
282 -delete || die
283 }
284
285 pkg_postinst() {
286 ewarn "If you're updating from <=jruby-1.4.0, you're going to get errors related"
287 ewarn "to gentoo.rb load failure."
288 ewarn "This is due to a stray definition of JRUBY_OPTS variable from the previous ebuilds."
289 ewarn "To solve the problem, either login in a new shell, use 'env -i ${SHELL} --login'"
290 ewarn "or explicitly unset the variable before running jruby."
291 }