Gentoo Archives: gentoo-commits

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