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