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-r1.ebuild jruby-1.3.1-r1.ebuild
Date: Sat, 26 Jun 2010 12:06:12
Message-Id: 20100626120608.A02D82CF77@corvid.gentoo.org
1 ali_bush 10/06/26 12:06:07
2
3 Modified: ChangeLog
4 Added: jruby-1.4.1-r1.ebuild
5 Removed: jruby-1.3.1-r1.ebuild
6 Log:
7 Bump 1.4.1 to 1.4.1-r1 as last commit will change installed files. Clean 1.3.1.
8 (Portage version: 2.1.8.3/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.62 dev-java/jruby/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/ChangeLog?rev=1.62&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/ChangeLog?rev=1.62&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/ChangeLog?r1=1.61&r2=1.62
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v
20 retrieving revision 1.61
21 retrieving revision 1.62
22 diff -u -r1.61 -r1.62
23 --- ChangeLog 26 Jun 2010 11:58:41 -0000 1.61
24 +++ ChangeLog 26 Jun 2010 12:06:07 -0000 1.62
25 @@ -1,6 +1,13 @@
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.61 2010/06/26 11:58:41 ali_bush Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.62 2010/06/26 12:06:07 ali_bush Exp $
30 +
31 +*jruby-1.4.1-r1 (26 Jun 2010)
32 +
33 + 26 Jun 2010; Alistair Bush <ali_bush@g.o> -jruby-1.3.1-r1.ebuild,
34 + +jruby-1.4.1-r1.ebuild:
35 + Bump 1.4.1 to 1.4.1-r1 as last commit will change installed files. Clean
36 + 1.3.1.
37
38 *jruby-1.5.1-r2 (26 Jun 2010)
39
40
41
42
43 1.1 dev-java/jruby/jruby-1.4.1-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/jruby-1.4.1-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/jruby-1.4.1-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: jruby-1.4.1-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2010 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.4.1-r1.ebuild,v 1.1 2010/06/26 12:06:07 ali_bush Exp $
53
54 EAPI="2"
55 JAVA_PKG_IUSE="doc source test"
56 inherit eutils java-pkg-2 java-ant-2
57
58 MY_PV="${PV/_rc1/RC1}"
59
60 DESCRIPTION="Java-based Ruby interpreter implementation"
61 HOMEPAGE="http://jruby.codehaus.org/"
62 #SRC_URI="http://jruby.kenai.com/downloads/${PV}/${PN}-src-${MY_PV}.tar.gz"
63 SRC_URI="http://jruby.org.s3.amazonaws.com/downloads/${PV}/${PN}-src-${MY_PV}.tar.gz"
64 LICENSE="|| ( CPL-1.0 GPL-2 LGPL-2.1 )"
65 SLOT="0"
66 KEYWORDS="~amd64 ~x86"
67 IUSE="bsf ssl"
68
69 CDEPEND=">=dev-java/bytelist-1.0.2:0
70 >=dev-java/constantine-0.6:0
71 >=dev-java/jline-0.9.94:0
72 >=dev-java/joni-1.1.3:0
73 >=dev-java/jna-posix-1.0.1:0
74 >=dev-java/jvyamlb-0.2.5:0
75 >=dev-java/asm-3.2:3
76 >=dev-java/jcodings-1.0.4:0
77 >=dev-java/jffi-0.7_pre:0.4
78 dev-java/jna:0
79 dev-java/joda-time:0
80 dev-util/jay:0[java]
81 dev-java/nailgun:0
82 dev-java/jaffl:0
83 dev-java/jgrapht:0"
84
85 RDEPEND="${CDEPEND}
86 >=virtual/jre-1.6"
87
88 DEPEND="${CDEPEND}
89 >=virtual/jdk-1.6
90 bsf? ( dev-java/bsf:2.3 )
91 test? (
92 dev-java/ant-junit
93 dev-java/ant-trax
94 )
95 !!<dev-ruby/jruby-1.3.1-r1"
96
97 PDEPEND="ssl? ( dev-ruby/jruby-openssl )"
98
99 # Tests work for ali_bush. But fail for flameeyes see #282439.
100 # Tests work for ali_bush inside the ebuild env
101 # but fail when using vanilla src tarball.
102 # Restrict tests so we can stablise this package.
103 RESTRICT="test"
104
105 S="${WORKDIR}/${PN}-${MY_PV}"
106
107 RUBY_HOME=/usr/share/${PN}/lib/ruby
108 SITE_RUBY=${RUBY_HOME}/site_ruby
109 GEMS=${RUBY_HOME}/gems
110
111 JAVA_ANT_REWRITE_CLASSPATH="true"
112 JAVA_ANT_IGNORE_SYSTEM_CLASSES="true"
113 EANT_GENTOO_CLASSPATH="asm-3 bytelist constantine jay jcodings jffi-0.4 jline \
114 joda-time joni jna jna-posix jvyamlb nailgun jaffl jgrapht"
115 EANT_NEEDS_TOOLS="true"
116
117 pkg_setup() {
118 java-pkg-2_pkg_setup
119
120 local fail
121
122 for directory in "${GEMS}" "${SITE_RUBY}"; do
123 if [[ -L ${directory} ]]; then
124 eerror "${directory} is a symlink. Please do the following to resolve the situation:"
125 echo 'emerge -an app-portage/gentoolkit'
126 echo 'equery -qC b '"${directory}"' | sort | uniq | sed s/^/=/ > ~/jruby.fix'
127 echo 'emerge -1C $(< ~/jruby.fix)'
128 echo "rm ${directory}"
129 echo 'emerge -1 $(< ~/jruby.fix)'
130 echo 'rm ~/jruby.fix'
131
132 eerror "For more information, please see http://bugs.gentoo.org/show_bug.cgi?id=302187"
133 fail="true"
134 fi
135 done
136
137 if [[ -n ${fail} ]]; then
138 die "Please address the above errors, then run emerge --resume"
139 fi
140 }
141
142 java_prepare() {
143 epatch "${FILESDIR}/ftype-test-fixes.patch"
144 epatch "${FILESDIR}/user-test-fixes.patch"
145 epatch "${FILESDIR}"/${PN}-1.4.0-system-jars-r2.patch
146 epatch "${FILESDIR}"/${PN}-1.4.0-bindir.patch
147
148 # We don't need to use Retroweaver. There is a jarjar and a regular jar
149 # target but even with jarjarclean, both are a pain. The latter target
150 # is slightly easier so go with this one.
151 sed -r -i \
152 -e 's/maxmemory="128m"/maxmemory="192m"/' \
153 -e "/RetroWeaverTask/d" \
154 -e "/<zipfileset .+\/>/d" \
155 build.xml || die
156
157 sed -i -e '/Arndt/d' src/org/jruby/RubyBigDecimal.java
158
159 # Delete the bundled JARs but keep invokedynamic.jar.
160 # No source is available and it's only a dummy anyway.
161 find build_lib -name "*.jar" ! -name "jsr292-mock.jar" -delete || die
162 rm lib/profile.jar || die
163
164 use bsf && java-pkg_jar-from --into build_lib \
165 --build-only bsf-2.3
166
167 if ! use bsf; then
168 # Remove BSF test cases.
169 cd "${S}/test/org/jruby"
170 rm -f test/TestAdoptedThreading.java || die
171 rm -f javasupport/test/TestBSF.java || die
172 sed -i '/TestBSF.class/d' javasupport/test/JavaSupportTestSuite.java || die
173 sed -i '/TestAdoptedThreading.class/d' test/MainTestSuite.java || die
174 fi
175 }
176
177 src_compile() {
178 eant jar $(use_doc apidocs) $(use bsf && echo "-Dbsf.present") \
179 -Djdk1.5+=true
180 }
181
182 src_test() {
183 if [ ${UID} == 0 ] ; then
184 ewarn 'The tests will fail if run as root so skipping them.'
185 ewarn 'Enable FEATURES="userpriv" if you want to run them.'
186 return
187 fi
188
189 # ali_bush was getting crashes while attempting to run a test.
190 # No info about why it crashed seemed to be produced.
191 # remove it as temp fix.
192 #sed -i -e '/MRI/d' build.xml || die "Failed to sed build.xml"
193
194 # BSF is a compile-time only dependency because it's just the adapter
195 # classes and they won't be used unless invoked from BSF itself.
196 use bsf && java-pkg_jar-from --into build_lib --with-dependencies bsf-2.3
197
198 # Our jruby.jar is unbundled so we need to add the classpath to this test.
199 sed -i "s:java -jar:java -Xbootclasspath/a\:#{ENV['JRUBY_CP']} -jar:g" test/test_load_compiled_ruby_class_from_classpath.rb || die
200
201 ANT_TASKS="ant-junit ant-trax" JRUBY_CP=`java-pkg_getjars ${EANT_GENTOO_CLASSPATH// /,}` JRUBY_OPTS="" eant test -Djdk1.5+=true
202 }
203
204 src_install() {
205 local bin
206
207 java-pkg_dojar lib/${PN}.jar
208 dodoc README docs/{*.txt,README.*} || die
209
210 use doc && java-pkg_dojavadoc docs/api
211 use source && java-pkg_dosrc src/org
212
213 # We run the sed here in install so that we don't get the wrong
214 # data during the test phase!
215 sed \
216 -e '/++ebuild-cut-here++/, /--ebuild-cut-here--/ d' \
217 -e '/^JRUBY_HOME=/s:=:=/usr/share/jruby:' \
218 bin/jruby > "${T}"/jruby
219
220 dobin "${T}"/jruby "${S}"/bin/j{irb{,_swing},rubyc} || die
221
222 insinto "${RUBY_HOME}"
223 doins -r "${S}"/lib/ruby/{1.8,1.9,site_ruby} || die
224
225 # Remove all the references to RubyGems as we're just going to
226 # install it through dev-ruby/rubygems.
227 find "${D}${RUBY_HOME}" -type f \
228 '(' '(' -path '*rubygems*' -not -name 'jruby.rb' ')' -or -name 'ubygems.rb' -or -name 'datadir.rb' ')' \
229 -delete || die
230 }
231
232 pkg_postinst() {
233 ewarn "If you're updating from <=jruby-1.4.0, you're going to get errors related"
234 ewarn "to gentoo.rb load failure."
235 ewarn "This is due to a stray definition of JRUBY_OPTS variable from the previous ebuilds."
236 ewarn "To solve the problem, either login in a new shell, use 'env -i ${SHELL} --login'"
237 ewarn "or explicitly unset the variable before running jruby."
238 }