Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-java/jruby: jruby-1.6.7.ebuild ChangeLog
Date: Sun, 29 Apr 2012 04:50:13
Message-Id: 20120429045000.7C87B2004B@flycatcher.gentoo.org
1 flameeyes 12/04/29 04:50:00
2
3 Modified: ChangeLog
4 Added: jruby-1.6.7.ebuild
5 Log:
6 Version bump, now that jzlib is in tree.
7
8 (Portage version: 2.2.0_alpha101/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.81 dev-java/jruby/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/ChangeLog?rev=1.81&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/ChangeLog?rev=1.81&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/ChangeLog?r1=1.80&r2=1.81
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v
20 retrieving revision 1.80
21 retrieving revision 1.81
22 diff -u -r1.80 -r1.81
23 --- ChangeLog 14 Apr 2012 07:12:32 -0000 1.80
24 +++ ChangeLog 29 Apr 2012 04:50:00 -0000 1.81
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-java/jruby
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.80 2012/04/14 07:12:32 graaff Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.81 2012/04/29 04:50:00 flameeyes Exp $
30 +
31 +*jruby-1.6.7 (29 Apr 2012)
32 +
33 + 29 Apr 2012; Diego E. Pettenò <flameeyes@g.o> +jruby-1.6.7.ebuild:
34 + Version bump, now that jzlib is in tree.
35
36 14 Apr 2012; Hans de Graaff <graaff@g.o> -jruby-1.5.2.ebuild,
37 -jruby-1.5.2-r1.ebuild, -jruby-1.5.3.ebuild:
38
39
40
41 1.1 dev-java/jruby/jruby-1.6.7.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/jruby-1.6.7.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/jruby-1.6.7.ebuild?rev=1.1&content-type=text/plain
45
46 Index: jruby-1.6.7.ebuild
47 ===================================================================
48 # Copyright 1999-2012 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.6.7.ebuild,v 1.1 2012/04/29 04:50:00 flameeyes Exp $
51
52 EAPI="4"
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 # jffi still needed? Or do we call that jnr-ffi?
67 # jnr-ffi depends on jffi which depends on libffi
68 CDEPEND=">=dev-java/bytelist-1.0.8:0
69 >=dev-java/jline-0.9.94:0
70 >=dev-java/joni-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-1.0.5:0
75 dev-java/jffi:1.0
76 dev-java/jnr-constants:0
77 dev-java/jnr-ffi:0.5
78 dev-java/jnr-posix:1.1
79 dev-java/joda-time:0
80 dev-util/jay:0[java]
81 dev-java/nailgun:0
82 dev-java/jgrapht:0
83 dev-java/ant-core:0
84 dev-java/bsf:2.3
85 dev-java/osgi-core-api:0
86 >=dev-java/snakeyaml-1.9:0
87 dev-java/jzlib:1.1"
88
89 RDEPEND="${CDEPEND}
90 >=virtual/jre-1.6"
91
92 # Is jna-posix still needed? Or has that been renamed to jnr-posix?
93 # jna-posix is the original project name which was abononed years ago.
94 # jnr-posix < 1.1.8 are from the original fork
95 # later jnr-posix are from the jnr umbrella project.
96 DEPEND="${CDEPEND}
97 >=virtual/jdk-1.6
98 test? (
99 dev-java/ant-junit4:0
100 dev-java/ant-trax:0
101 dev-java/junit:4
102 java-virtuals/jdk-with-com-sun
103 dev-java/commons-logging:0
104 dev-java/xalan:0
105 )
106 !!<dev-ruby/jruby-1.3.1-r1"
107
108 PDEPEND="ssl? ( dev-ruby/jruby-openssl )"
109
110 # Tests fail.
111 # Need to stop injecting jar's into classpath.
112 RESTRICT="test"
113
114 S="${WORKDIR}/${PN}-${MY_PV}"
115
116 RUBY_HOME=/usr/share/${PN}/lib/ruby
117 SITE_RUBY=${RUBY_HOME}/site_ruby
118 GEMS=${RUBY_HOME}/gems
119
120 JAVA_ANT_REWRITE_CLASSPATH="true"
121 JAVA_ANT_IGNORE_SYSTEM_CLASSES="true"
122 EANT_GENTOO_CLASSPATH="ant-core asm-3 bsf-2.3 bytelist jnr-constants jay \
123 jcodings jffi-1.0 jline \
124 joda-time joni jnr-ffi-0.5 jnr-posix-1.1 jnr-netdb jvyamlb nailgun jgrapht osgi-core-api \
125 snakeyaml jzlib-1.1"
126 EANT_NEEDS_TOOLS="true"
127
128 pkg_setup() {
129 unset RUBYOPT
130 java-pkg-2_pkg_setup
131
132 local fail
133
134 for directory in "${GEMS}" "${SITE_RUBY}"; do
135 if [[ -L ${directory} ]]; then
136 eerror "${directory} is a symlink. Please do the following to resolve the situation:"
137 echo 'emerge -an app-portage/gentoolkit'
138 echo 'equery -qC b '"${directory}"' | sort | uniq | sed s/^/=/ > ~/jruby.fix'
139 echo 'emerge -1C $(< ~/jruby.fix)'
140 echo "rm ${directory}"
141 echo 'emerge -1 $(< ~/jruby.fix)'
142 echo 'rm ~/jruby.fix'
143
144 eerror "For more information, please see http://bugs.gentoo.org/show_bug.cgi?id=302187"
145 fail="true"
146 fi
147 done
148
149 if [[ -n ${fail} ]]; then
150 die "Please address the above errors, then run emerge --resume"
151 fi
152 }
153
154 java_prepare() {
155 epatch "${FILESDIR}"/${PN}-bash-launcher.patch
156 epatch "${FILESDIR}/1.5.1/build.xml.patch"
157
158 # We don't need to use Retroweaver. There is a jarjar and a regular jar
159 # target but even with jarjarclean, both are a pain. The latter target
160 # is slightly easier so go with this one.
161 sed -r -i \
162 -e 's/maxmemory="128m"/maxmemory="192m"/' \
163 -e "/RetroWeaverTask/d" \
164 -e "/yecht/! { /<zipfileset .+\/>/d }" \
165 build.xml || die
166
167 sed -i -e '/Arndt/d' src/org/jruby/RubyBigDecimal.java
168
169 # Delete the bundled JARs but keep invokedynamic.jar.
170 # No source is available and it's only a dummy anyway.
171 find build_lib -name "*.jar" ! -name "jsr292-mock.jar" ! -name "yecht.jar" ! -name 'coro-mock-1.0-SNAPSHOT.jar' -delete || die
172 }
173
174 src_compile() {
175 # Avoid generating the ri cache since that currently fails.
176 local flags="-Dgenerate-ri-cache.hasrun=true"
177 #local flags=""
178 use bsf && flags="-Dbsf.present=true"
179
180 export RUBYOPT=""
181 einfo $RUBYOPT
182 #eant jar $(use_doc apidocs) -Djdk1.5+=true ${flags}
183 eant -Djdk1.5+=true ${flags}
184 }
185
186 src_test() {
187 if [ ${UID} == 0 ] ; then
188 ewarn 'The tests will fail if run as root so skipping them.'
189 ewarn 'Enable FEATURES="userpriv" if you want to run them.'
190 return
191 fi
192 # Our jruby.jar is unbundled so we need to add the classpath to this test.
193 sed -i "s:java -jar:java -Xbootclasspath/a\:#{ENV['JRUBY_CP']} -jar:g" test/test_load_compiled_ruby_class_from_classpath.rb || die
194 sed -i "s@:refid => 'build.classpath'@:path =>\"#{ENV['JRUBY_CP']}:lib/jruby.jar\"@g" \
195 rakelib/commands.rake || die
196 #sed -i "s@:refid => 'test.class.path'@:path => \"#{ENV['JRUBY_CP']}@g" \
197 # rakelib/commands.rake || die
198
199 #bsf optionally depends on jruby, which means that the previously
200 #installed jruby will be added to classpath, nasty things will happen.
201 local cpath=`java-pkg_getjars ${EANT_GENTOO_CLASSPATH// /,},junit-4`
202 cpath="$(echo ${cpath} | sed -e "s_${ROOT}/usr/share/jruby/lib/jruby.jar:__g")"
203 cpath="${cpath}:$(java-pkg_getjars --build-only commons-logging,xalan)"
204 EANT_GENTOO_CLASSPATH=""
205
206 local flags=""
207 use bsf && flags="-Dbsf.present=true"
208
209 #Clear RUBYOPT
210 export RUBYOPT=""
211 export JRUBY_CP="${cpath}"
212 ANT_TASKS="ant-junit4 ant-trax" \
213 JRUBY_OPTS="" eant test -Djdk1.5+=true -Djruby.bindir=bin \
214 -Dgentoo.classpath="${cpath}" ${flags}
215 }
216
217 src_install() {
218 java-pkg_dojar lib/${PN}.jar
219 dodoc README docs/{*.txt,README.*} || die
220
221 use doc && java-pkg_dojavadoc docs/api
222 use source && java-pkg_dosrc src/org
223
224 # Use the bash based launcher to preserve whitespace in arguments.
225 # Ie allow >jruby -e "puts 'hello'"< to work otherwise
226 # >jruby -e "\"puts 'hello'\""< is needed.
227 #
228 # # We run the sed here in install so that we don't get the wrong
229 # # data during the test phase!
230 # sed \
231 # -e '/++ebuild-cut-here++/, /--ebuild-cut-here--/ d' \
232 # -e '/^JRUBY_HOME=/s:=:=/usr/share/jruby:' \
233 # bin/jruby.sh > "${T}"/jruby
234
235 newbin bin/jruby.bash jruby
236 dobin bin/j{irb{,_swing},rubyc}
237
238 insinto "${RUBY_HOME}"
239 doins -r "${S}"/lib/ruby/{1.8,1.9,site_ruby}
240
241 # Remove all the references to RubyGems as we're just going to
242 # install it through dev-ruby/rubygems.
243 find "${D}${RUBY_HOME}" -type f \
244 '(' '(' -path '*rubygems*' -not -name 'jruby.rb' ')' -or -name 'ubygems.rb' -or -name 'datadir.rb' ')' \
245 -delete || die
246 }