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.1.ebuild jruby-1.4.0-r4.ebuild jruby-1.4.0-r5.ebuild
Date: Tue, 27 Apr 2010 09:24:01
Message-Id: 20100427092359.16B072C04C@corvid.gentoo.org
1 caster 10/04/27 09:23:58
2
3 Modified: ChangeLog
4 Added: jruby-1.4.1.ebuild
5 Removed: jruby-1.4.0-r4.ebuild jruby-1.4.0-r5.ebuild
6 Log:
7 Version bump, depend on new jcondings for security bug #312547.
8 (Portage version: 2.2_rc67/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.58 dev-java/jruby/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/jruby/ChangeLog?rev=1.58&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/jruby/ChangeLog?rev=1.58&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/jruby/ChangeLog?r1=1.57&r2=1.58
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v
20 retrieving revision 1.57
21 retrieving revision 1.58
22 diff -u -r1.57 -r1.58
23 --- ChangeLog 6 Apr 2010 08:22:21 -0000 1.57
24 +++ ChangeLog 27 Apr 2010 09:23:58 -0000 1.58
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.57 2010/04/06 08:22:21 caster Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.58 2010/04/27 09:23:58 caster Exp $
30 +
31 +*jruby-1.4.1 (27 Apr 2010)
32 +
33 + 27 Apr 2010; Vlastimil Babka <caster@g.o> -jruby-1.4.0-r4.ebuild,
34 + -jruby-1.4.0-r5.ebuild, -files/jruby-1.4.0-system-jars.patch,
35 + +jruby-1.4.1.ebuild, -files/auto_gem.rb:
36 + Version bump, depend on new jcondings for security bug #312547.
37
38 06 Apr 2010; Vlastimil Babka <caster@g.o> jruby-1.4.0-r6.ebuild:
39 Fix symlink upgrade instructions. Thanks to Martin von Gagern
40
41
42
43 1.1 dev-java/jruby/jruby-1.4.1.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/jruby/jruby-1.4.1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/jruby/jruby-1.4.1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: jruby-1.4.1.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.ebuild,v 1.1 2010/04/27 09:23:58 caster 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 if ! use bsf; then
165 # Remove BSF test cases.
166 cd "${S}/test/org/jruby"
167 rm -f test/TestAdoptedThreading.java || die
168 rm -f javasupport/test/TestBSF.java || die
169 sed -i '/TestBSF.class/d' javasupport/test/JavaSupportTestSuite.java || die
170 sed -i '/TestAdoptedThreading.class/d' test/MainTestSuite.java || die
171 fi
172 }
173
174 src_compile() {
175 eant jar $(use_doc apidocs) -Djdk1.5+=true
176 }
177
178 src_test() {
179 if [ ${UID} == 0 ] ; then
180 ewarn 'The tests will fail if run as root so skipping them.'
181 ewarn 'Enable FEATURES="userpriv" if you want to run them.'
182 return
183 fi
184
185 # ali_bush was getting crashes while attempting to run a test.
186 # No info about why it crashed seemed to be produced.
187 # remove it as temp fix.
188 #sed -i -e '/MRI/d' build.xml || die "Failed to sed build.xml"
189
190 # BSF is a compile-time only dependency because it's just the adapter
191 # classes and they won't be used unless invoked from BSF itself.
192 use bsf && java-pkg_jar-from --into build_lib --with-dependencies bsf-2.3
193
194 # Our jruby.jar is unbundled so we need to add the classpath to this test.
195 sed -i "s:java -jar:java -Xbootclasspath/a\:#{ENV['JRUBY_CP']} -jar:g" test/test_load_compiled_ruby_class_from_classpath.rb || die
196
197 ANT_TASKS="ant-junit ant-trax" JRUBY_CP=`java-pkg_getjars ${EANT_GENTOO_CLASSPATH// /,}` JRUBY_OPTS="" eant test -Djdk1.5+=true
198 }
199
200 src_install() {
201 local bin
202
203 java-pkg_dojar lib/${PN}.jar
204 dodoc README docs/{*.txt,README.*} || die
205
206 use doc && java-pkg_dojavadoc docs/api
207 use source && java-pkg_dosrc src/org
208
209 # We run the sed here in install so that we don't get the wrong
210 # data during the test phase!
211 sed \
212 -e '/++ebuild-cut-here++/, /--ebuild-cut-here--/ d' \
213 -e '/^JRUBY_HOME=/s:=:=/usr/share/jruby:' \
214 bin/jruby > "${T}"/jruby
215
216 dobin "${T}"/jruby "${S}"/bin/j{irb{,_swing},rubyc} || die
217
218 insinto "${RUBY_HOME}"
219 doins -r "${S}"/lib/ruby/{1.8,1.9,site_ruby} || die
220
221 # Remove all the references to RubyGems as we're just going to
222 # install it through dev-ruby/rubygems.
223 find "${D}${RUBY_HOME}" -type f \
224 '(' '(' -path '*rubygems*' -not -name 'jruby.rb' ')' -or -name 'ubygems.rb' -or -name 'datadir.rb' ')' \
225 -delete || die
226 }
227
228 pkg_postinst() {
229 ewarn "If you're updating from <=jruby-1.4.0, you're going to get errors related"
230 ewarn "to gentoo.rb load failure."
231 ewarn "This is due to a stray definition of JRUBY_OPTS variable from the previous ebuilds."
232 ewarn "To solve the problem, either login in a new shell, use 'env -i ${SHELL} --login'"
233 ewarn "or explicitly unset the variable before running jruby."
234 }