Gentoo Archives: gentoo-commits

From: "Tom Wijsman (tomwij)" <tomwij@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-java/jruby: jruby-1.6.5.1.ebuild jruby-1.7.12.ebuild ChangeLog
Date: Sat, 03 May 2014 21:31:51
Message-Id: 20140503213148.81F3C2004C@flycatcher.gentoo.org
1 tomwij 14/05/03 21:31:48
2
3 Modified: jruby-1.6.5.1.ebuild ChangeLog
4 Added: jruby-1.7.12.ebuild
5 Log:
6 Version bump to 1.7.12, masked as it is pending review by the Java and Ruby herds; for bug #442230, reported by Gian and in cooperation with mrueg and others.
7
8 (Portage version: HEAD/cvs/Linux x86_64, signed Manifest commit with key 6D34E57D)
9
10 Revision Changes Path
11 1.5 dev-java/jruby/jruby-1.6.5.1.ebuild
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/jruby-1.6.5.1.ebuild?rev=1.5&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/jruby-1.6.5.1.ebuild?rev=1.5&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/jruby-1.6.5.1.ebuild?r1=1.4&r2=1.5
16
17 Index: jruby-1.6.5.1.ebuild
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.6.5.1.ebuild,v
20 retrieving revision 1.4
21 retrieving revision 1.5
22 diff -u -r1.4 -r1.5
23 --- jruby-1.6.5.1.ebuild 25 Jun 2012 07:43:03 -0000 1.4
24 +++ jruby-1.6.5.1.ebuild 3 May 2014 21:31:48 -0000 1.5
25 @@ -1,6 +1,6 @@
26 -# Copyright 1999-2012 Gentoo Foundation
27 +# Copyright 1999-2014 Gentoo Foundation
28 # Distributed under the terms of the GNU General Public License v2
29 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.6.5.1.ebuild,v 1.4 2012/06/25 07:43:03 nativemad Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.6.5.1.ebuild,v 1.5 2014/05/03 21:31:48 tomwij Exp $
31
32 EAPI="4"
33 JAVA_PKG_IUSE="doc source test"
34
35
36
37 1.96 dev-java/jruby/ChangeLog
38
39 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/ChangeLog?rev=1.96&view=markup
40 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/ChangeLog?rev=1.96&content-type=text/plain
41 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/ChangeLog?r1=1.95&r2=1.96
42
43 Index: ChangeLog
44 ===================================================================
45 RCS file: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v
46 retrieving revision 1.95
47 retrieving revision 1.96
48 diff -u -r1.95 -r1.96
49 --- ChangeLog 3 Mar 2014 23:39:57 -0000 1.95
50 +++ ChangeLog 3 May 2014 21:31:48 -0000 1.96
51 @@ -1,6 +1,15 @@
52 # ChangeLog for dev-java/jruby
53 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
54 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.95 2014/03/03 23:39:57 pacho Exp $
55 +# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.96 2014/05/03 21:31:48 tomwij Exp $
56 +
57 +*jruby-1.7.12 (03 May 2014)
58 +
59 + 03 May 2014; Tom Wijsman <TomWij@g.o>
60 + +files/jruby-1.7.12-bash-launcher.patch, +jruby-1.7.12.ebuild,
61 + jruby-1.6.5.1.ebuild:
62 + Version bump to 1.7.12, masked as it is pending review by the Java and Ruby
63 + herds; for bug #442230, reported by Gian and in cooperation with mrueg and
64 + others.
65
66 03 Mar 2014; Pacho Ramos <pacho@g.o> jruby-1.6.8-r1.ebuild:
67 amd64 stable, bug #495016
68
69
70
71 1.1 dev-java/jruby/jruby-1.7.12.ebuild
72
73 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/jruby-1.7.12.ebuild?rev=1.1&view=markup
74 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jruby/jruby-1.7.12.ebuild?rev=1.1&content-type=text/plain
75
76 Index: jruby-1.7.12.ebuild
77 ===================================================================
78 # Copyright 1999-2014 Gentoo Foundation
79 # Distributed under the terms of the GNU General Public License v2
80 # $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.7.12.ebuild,v 1.1 2014/05/03 21:31:48 tomwij Exp $
81
82 EAPI="5"
83
84 JAVA_PKG_IUSE="doc source test"
85
86 inherit eutils java-pkg-2 java-ant-2
87
88 DESCRIPTION="Java-based Ruby interpreter implementation"
89 HOMEPAGE="http://jruby.codehaus.org/"
90 SRC_URI="http://jruby.org.s3.amazonaws.com/downloads/${PV}/${PN}-src-${PV}.tar.gz
91 http://dev.gentoo.org/~tomwij/files/dist/${P}-mvn-ant-ant.patch"
92
93 LICENSE="|| ( EPL-1.0 GPL-2 LGPL-2.1 )"
94 SLOT="0"
95 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
96
97 RUBY_VERSION=1.9
98 RUBY_REVISION=0
99
100 CDEPEND="
101 dev-java/ant-core:0
102 dev-java/asm:4
103 dev-java/bsf:2.3
104 >=dev-java/bytelist-1.0.8:0
105 dev-java/headius-options:0
106 dev-java/invokebinder:0
107 dev-java/jcodings:1
108 dev-java/jffi:1.2
109 dev-java/jnr-constants:0
110 dev-java/jnr-enxio:0
111 dev-java/jnr-ffi:0.7
112 >=dev-java/jnr-netdb-1.0:0
113 dev-java/jnr-posix:2.4
114 dev-java/jnr-unixsocket:0
115 dev-java/joda-time:0
116 dev-java/joni:2.1
117 dev-java/nailgun:0
118 dev-java/osgi-core-api:0
119 dev-lang/ruby:${RUBY_VERSION}
120 >=dev-java/snakeyaml-1.9:0
121 dev-java/jzlib:1.1
122 "
123
124 RDEPEND="${CDEPEND}
125 >=virtual/jre-1.8
126 "
127
128 DEPEND="${CDEPEND}
129 >=virtual/jdk-1.8
130 test? (
131 dev-java/ant-junit4:0
132 dev-java/ant-trax:0
133 dev-java/commons-logging:0
134 dev-java/junit:4
135 dev-java/xalan:0
136 java-virtuals/jdk-with-com-sun:0
137 )
138 "
139
140 RUBY_HOME=/usr/share/${PN}/lib/ruby
141 SITE_RUBY=${RUBY_HOME}/site_ruby
142 GEMS=${RUBY_HOME}/gems
143
144 JAVA_ANT_REWRITE_CLASSPATH="true"
145 JAVA_ANT_IGNORE_SYSTEM_CLASSES="true"
146
147 EANT_GENTOO_CLASSPATH="ant-core asm-4 bsf-2.3 bytelist headius-options \
148 invokebinder jcodings-1 jffi-1.2 jnr-constants jnr-enxio jnr-ffi-0.7 jnr-netdb \
149 jnr-posix-2.4 jnr-unixsocket joda-time joni-2.1 nailgun osgi-core-api snakeyaml \
150 jzlib-1.1"
151
152 EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH} ant-junit4 ant-trax \
153 commons-logging junit-4 xalan jdk-with-com-sun"
154
155 EANT_BUILD_TARGET="package"
156
157 pkg_setup() {
158 export RUBYOPT=""
159 java-pkg-2_pkg_setup
160
161 local fail
162 for directory in "${GEMS}" "${SITE_RUBY}"; do
163 if [[ -L ${directory} ]]; then
164 eerror "${directory} is a symlink. Please do the following to resolve the situation:"
165 echo 'emerge -an app-portage/gentoolkit'
166 echo 'equery -qC b '"${directory}"' | sort | uniq | sed s/^/=/ > /tmp/jruby.fix'
167 echo 'emerge -1C $(< /tmp/jruby.fix)'
168 echo "rm ${directory}"
169 echo 'emerge -1 $(< /tmp/jruby.fix)'
170
171 eerror "For more information, please see http://bugs.gentoo.org/show_bug.cgi?id=302187"
172 fail="true"
173 fi
174 done
175
176 if [[ -n ${fail} ]]; then
177 die "Please address the above errors, then run emerge --resume"
178 fi
179 }
180
181 java_prepare() {
182 einfo "Cleaning up bash launcher ..."
183 epatch "${FILESDIR}"/${P}-bash-launcher.patch
184
185 # When you capture a new patch, and it misses org.jruby.runtime.Constants;
186 # add maven.build.resourceDir.1 as a pathelement to the javac task of the
187 # compilation target. Also add jruby-core-GENTOO_JRUY_VER in ext classpaths.
188 # Also reorder the root maven-build.xml such that core compiles before ext.
189 einfo "Patching build.xml ..."
190 epatch "${DISTDIR}"/${P}-mvn-ant-ant.patch
191 find . -name '*build.xml' -exec \
192 sed -i "s/jruby-core-GENTOO_JRUY_VER/jruby-core-${PV}/" {} \;
193
194 einfo "Removing classes and jars ..."
195 find . -name "*.class" -or -name "*.jar" -print -delete
196
197 einfo "Fixing up properties ..."
198 JRUBY_CONSTANTS="core/src/main/resources/org/jruby/runtime/Constants.java"
199 for repvar in $(grep "@.*@\".*;" ${JRUBY_CONSTANTS} | sed 's:.*@\(.*\)@.*:\1:') ; do
200 VAR=$(grep "<${repvar}>" pom.xml | sed 's/.*>\(.*\)<\/.*/\1/')
201 sed -i "s/@${repvar}@/${VAR}/" \
202 ${JRUBY_CONSTANTS} || die
203 done
204 sed -i "s/String VERSION = \".*\"/String VERSION = \"${PV}\"/" \
205 ${JRUBY_CONSTANTS} || die
206
207 einfo "Setting Ruby version to use ..."
208 sed -i -e "s/String jruby_revision = \"\"/String jruby_revision = \"${RUBY_REVISION}\"/" \
209 -e "s/String jruby_default_ruby_version = \"\"/String jruby_default_ruby_version = \"${RUBY_VERSION}\"/" \
210 ${JRUBY_CONSTANTS} || die
211 }
212
213 # Java based tests return propertly, I guess that is because there are none;
214 # I've found an executable that can you can run, but it bails out about libyaml.
215 #
216 # $ bin/testrb test
217 # /usr/share/jruby/lib/ruby/1.9/yaml/store.rb:1:in `require':
218 # It seems your ruby installation is missing psych (for YAML output).
219 # To eliminate this warning, please install libyaml and reinstall your ruby.
220 # JRuby 1.9 mode only supports the `psych` YAML engine; ignoring `syck`
221 # NoMethodError: undefined method `to_yaml' for {}:Hash
222 # Store at /usr/share/jruby/lib/ruby/1.9/yaml/store.rb:78
223 # ...
224 RESTRICT="${RESTRICT} test"
225
226 src_test() {
227 export RUBYOPT=""
228
229 mv maven-build.xml build.xml || die
230
231 java-pkg-2_src_test
232
233 bin/testrb test || die ""
234 }
235
236 src_install() {
237 java-pkg_newjar core/target/${PN}-core-${PV}.jar
238 dodoc README.md docs/{*.txt,README.*} || die
239
240 use doc && java-pkg_dojavadoc core/target/site/apidocs
241 use source && java-pkg_dosrc core/src/main/java/org
242
243 newbin bin/jruby.bash jruby
244 dobin bin/j{irb{,_swing},rubyc}
245
246 insinto "${RUBY_HOME}"
247 doins -r "${S}"/lib/ruby/{1.8,1.9,2.0,shared}
248
249 # Remove all the references to RubyGems as we're just going to
250 # install it through dev-ruby/rubygems.
251 find "${ED}${RUBY_HOME}" -type f \
252 '(' '(' -path '*rubygems*' -not -name 'jruby.rb' ')' -or -name 'ubygems.rb' -or -name 'datadir.rb' ')' \
253 -delete || die
254 }
255
256 pkg_postinst() {
257 ewarn ""
258 ewarn "Make sure RUBYOPT is unset in the environment when using JRuby:"
259 ewarn ""
260 ewarn " export RUBYOPT=\"\""
261 ewarn ""
262 }