JRuby 1.7.0 has been released on 2012/10/22. Reproducible: Always
From the ruby side we need to decide how we want to handle the fact that jruby now defaults to 1.9 compatibility. We already have many ebuilds with the jruby target, but these all depend on jruby's 1.8 profile. Should we introduce a jruby19 target here?
JRuby 1.7.1 is out already.
Don't mean to push, but is there some ETA on this enhancement? Like "in a year", at least? :) Also JRuby 1.7.2 is out.
As far as I know nobody is working on this, so we can't give an estimate. It would need someone familiar with the java side of things to get an initial version going. It would be great if someone could volunteer for this.
Created attachment 350008 [details] jruby-1.7.4.ebuild Attaching work in progress, blocking bug with a missing dependency.
Created attachment 350010 [details, diff] files/jruby-1.7.4-bash-launcher.patch
Created attachment 350274 [details] jruby-1.7.4.ebuild All dependencies are in the Portage tree, though two of them seem to be of a version that are incompatible with jruby. I've tried all three versions (0.1, 0.2, 0.3) for jnr-unixsocket but none helped, perhaps it needs a newer unreleased version? Besides unixsocket, it also throws error in regular expression matching code because some other library is incompatible. According to ./maven/jruby-core/pom.xml it indeed should be 0.3 of jnr-unixsocket, so I don't think the dependency is necessarily wrong; the rest of them should likely be compared to see if there is something noteworthy. Further investigation needs to be done in order to continue...
http://jruby.org/2014/02/25/jruby-1-7-11
Comment on attachment 350274 [details] jruby-1.7.4.ebuild ># Copyright 1999-2012 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > >EAPI="5" > >JAVA_PKG_IUSE="doc source test" > >inherit eutils java-pkg-2 java-ant-2 > >MY_PV="${PV/_rc1/RC1}" > >DESCRIPTION="Java-based Ruby interpreter implementation" >HOMEPAGE="http://jruby.codehaus.org/" >SRC_URI="http://jruby.org.s3.amazonaws.com/downloads/${PV}/${PN}-src-${PV}.tar.gz" >LICENSE="|| ( CPL-1.0 GPL-2 LGPL-2.1 )" >SLOT="0" >KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos" >IUSE="bsf ssl" > ># jffi still needed? Or do we call that jnr-ffi? ># jnr-ffi depends on jffi which depends on libffi >CDEPEND=">=dev-java/bytelist-1.0.8:0 > >=dev-java/joni-1.1.3:0 > >=dev-java/jnr-netdb-1.0:0 > >=dev-java/jvyamlb-0.2.5:0 > >=dev-java/jcodings-1.0.5:0 > dev-java/asm:4 > dev-java/bcpkix:0 > dev-java/bcprov:0 > dev-java/invokebinder:0 > dev-java/jffi:1.2 > dev-java/jline:2 > dev-java/jnr-constants:0 > dev-java/jnr-ffi:0.7 > dev-java/jnr-posix:2.4 > dev-java/jnr-unixsocket:0 > dev-java/joda-time:0 > dev-util/jay:0[java] > dev-java/nailgun:0 > dev-java/jgrapht:0 > dev-java/ant-core:0 > dev-java/bsf:2.3 > dev-java/osgi-core-api:0 > >=dev-java/snakeyaml-1.9:0 > dev-java/jzlib:1.1" > >RDEPEND="${CDEPEND} > >=virtual/jre-1.6" > ># Is jna-posix still needed? Or has that been renamed to jnr-posix? ># jna-posix is the original project name which was abononed years ago. ># jnr-posix < 1.1.8 are from the original fork ># later jnr-posix are from the jnr umbrella project. >DEPEND="${CDEPEND} > >=virtual/jdk-1.6 > test? ( > dev-java/ant-junit4:0 > dev-java/ant-trax:0 > dev-java/junit:4 > java-virtuals/jdk-with-com-sun > dev-java/commons-logging:0 > dev-java/xalan:0 > ) > !!<dev-ruby/jruby-1.3.1-r1" > >PDEPEND="ssl? ( dev-ruby/jruby-openssl )" > ># Tests fail. ># Need to stop injecting jar's into classpath. >RESTRICT="test" > >S="${WORKDIR}/${PN}-${MY_PV}" > >RUBY_HOME=/usr/share/${PN}/lib/ruby >SITE_RUBY=${RUBY_HOME}/site_ruby >GEMS=${RUBY_HOME}/gems > >JAVA_ANT_REWRITE_CLASSPATH="true" >JAVA_ANT_IGNORE_SYSTEM_CLASSES="true" >EANT_GENTOO_CLASSPATH="ant-core asm-4 bcpkix bcprov bsf-2.3 bytelist \ >invokebinder jnr-constants jay jcodings jffi-1.2 jline-2 joda-time joni \ >jnr-ffi-0.7 jnr-posix-2.4 jnr-netdb jnr-unixsocket jvyamlb nailgun >jgrapht osgi-core-api snakeyaml jzlib-1.1" >EANT_NEEDS_TOOLS="true" > >pkg_setup() { > unset RUBYOPT > java-pkg-2_pkg_setup > > local fail > > for directory in "${GEMS}" "${SITE_RUBY}"; do > if [[ -L ${directory} ]]; then > eerror "${directory} is a symlink. Please do the following to resolve the situation:" > echo 'emerge -an app-portage/gentoolkit' > echo 'equery -qC b '"${directory}"' | sort | uniq | sed s/^/=/ > ~/jruby.fix' > echo 'emerge -1C $(< ~/jruby.fix)' > echo "rm ${directory}" > echo 'emerge -1 $(< ~/jruby.fix)' > echo 'rm ~/jruby.fix' > > eerror "For more information, please see http://bugs.gentoo.org/show_bug.cgi?id=302187" > fail="true" > fi > done > > if [[ -n ${fail} ]]; then > die "Please address the above errors, then run emerge --resume" > fi >} > >java_prepare() { > epatch "${FILESDIR}"/${P}-bash-launcher.patch > # epatch "${FILESDIR}/1.5.1/build.xml.patch" > > # We don't need to use Retroweaver. There is a jarjar and a regular jar > # target but even with jarjarclean, both are a pain. The latter target > # is slightly easier so go with this one. > sed -r -i \ > -e 's/maxmemory="128m"/maxmemory="192m"/' \ > -e "/RetroWeaverTask/d" \ > -e "/yecht/! { /<zipfileset .+\/>/d }" \ > build.xml || die > > sed -i -e '/Arndt/d' src/org/jruby/RubyBigDecimal.java > > # Delete the bundled JARs but keep invokedynamic.jar. > # No source is available and it's only a dummy anyway. > find build_lib -name "*.jar" ! -name "jsr292-mock.jar" ! -name "yecht.jar" ! -name 'coro-mock-1.0-SNAPSHOT.jar' -delete || die >} > >src_compile() { > # Avoid generating the ri cache since that currently fails. > local flags="-Dgenerate-ri-cache.hasrun=true" > #local flags="" > use bsf && flags="-Dbsf.present=true" > > export RUBYOPT="" > einfo $RUBYOPT > #eant jar $(use_doc apidocs) -Djdk1.5+=true ${flags} > eant -Djdk1.5+=true ${flags} >} > >src_test() { > if [ ${UID} == 0 ] ; then > ewarn 'The tests will fail if run as root so skipping them.' > ewarn 'Enable FEATURES="userpriv" if you want to run them.' > return > fi > # Our jruby.jar is unbundled so we need to add the classpath to this test. > sed -i "s:java -jar:java -Xbootclasspath/a\:#{ENV['JRUBY_CP']} -jar:g" test/test_load_compiled_ruby_class_from_classpath.rb || die > sed -i "s@:refid => 'build.classpath'@:path =>\"#{ENV['JRUBY_CP']}:lib/jruby.jar\"@g" \ > rakelib/commands.rake || die > #sed -i "s@:refid => 'test.class.path'@:path => \"#{ENV['JRUBY_CP']}@g" \ > # rakelib/commands.rake || die > > #bsf optionally depends on jruby, which means that the previously > #installed jruby will be added to classpath, nasty things will happen. > local cpath=`java-pkg_getjars ${EANT_GENTOO_CLASSPATH// /,},junit-4` > cpath="$(echo ${cpath} | sed -e "s_${EROOT}/usr/share/jruby/lib/jruby.jar:__g")" > cpath="${cpath}:$(java-pkg_getjars --build-only commons-logging,xalan)" > EANT_GENTOO_CLASSPATH="" > > local flags="" > use bsf && flags="-Dbsf.present=true" > > #Clear RUBYOPT > export RUBYOPT="" > export JRUBY_CP="${cpath}" > ANT_TASKS="ant-junit4 ant-trax" \ > JRUBY_OPTS="" eant test -Djdk1.5+=true -Djruby.bindir=bin \ > -Dgentoo.classpath="${cpath}" ${flags} >} > >src_install() { > java-pkg_dojar lib/${PN}.jar > dodoc README docs/{*.txt,README.*} || die > > use doc && java-pkg_dojavadoc docs/api > use source && java-pkg_dosrc src/org > ># Use the bash based launcher to preserve whitespace in arguments. ># Ie allow >jruby -e "puts 'hello'"< to work otherwise ># >jruby -e "\"puts 'hello'\""< is needed. ># ># # We run the sed here in install so that we don't get the wrong ># # data during the test phase! ># sed \ ># -e '/++ebuild-cut-here++/, /--ebuild-cut-here--/ d' \ ># -e '/^JRUBY_HOME=/s:=:=/usr/share/jruby:' \ ># bin/jruby.sh > "${T}"/jruby > > newbin bin/jruby.bash jruby > dobin bin/j{irb{,_swing},rubyc} > > insinto "${RUBY_HOME}" > doins -r "${S}"/lib/ruby/{1.8,1.9,site_ruby} > > # Remove all the references to RubyGems as we're just going to > # install it through dev-ruby/rubygems. > find "${ED}${RUBY_HOME}" -type f \ > '(' '(' -path '*rubygems*' -not -name 'jruby.rb' ')' -or -name 'ubygems.rb' -or -name 'datadir.rb' ')' \ > -delete || die >}
Sorry for the previous comment, caused by an erroneous click; subsequently I didn't notice that I was creating a comment while marking it obsolete. + 03 May 2014; Tom Wijsman <TomWij@gentoo.org> + +files/jruby-1.7.12-bash-launcher.patch, +jruby-1.7.12.ebuild, + jruby-1.6.5.1.ebuild: + 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. Anyhow, after some wrangling a masked JRuby 1.7.12 has been added to the Portage tree; I'd like to request that the Ruby and Java herd review this before unmasking, it's a quite huge version jump and there have been a lot of changes. # Tom Wijsman <TomWij@gentoo.org> (03 May 2014) # Needs to be further tested and revised by both Java and Ruby herds. >=dev-java/jruby-1.7.12 It might be possible that the ebuild does too much or does not do enough; but review and early testers can help with pointing that out, as far as my non-existing Ruby knowledge goes it bulids file and the compiler seems like it will accept files. If it still bails out due to a Java issue, feel free to ping us. Two things I notice; first is that setting RUBYOPT="" seems odd to request from the user so I wonder if we can get rid of that, second is that we might be able to get working tests if we figure out the following: # $ bin/testrb test # /usr/share/jruby/lib/ruby/1.9/yaml/store.rb:1:in `require': # It seems your ruby installation is missing psych (for YAML output). # To eliminate this warning, please install libyaml and reinstall your ruby. # JRuby 1.9 mode only supports the `psych` YAML engine; ignoring `syck` # NoMethodError: undefined method `to_yaml' for {}:Hash # Store at /usr/share/jruby/lib/ruby/1.9/yaml/store.rb:78 # ... dev-libs/libyaml is installed; so, perhaps it's a different libyaml required, I might have not built it with that present or the dev-lang/ruby ebuild needs to be looked into to make sure it has libyaml support. Dunno, your terrain... :)
psych (https://rubygems.org/gems/psych) is a YAML parser using libyaml. It replace syck. It came out with MRI 1.9.2 and is the default since 1.9.3. It looks like Jruby 1.7.x is 1.9.3 compatible.The FAQ jut mentionned --19 option without any others details. Psych is the default since Jruby 1.7.1 at least, probably 1.7.0 (see http://jruby.org/2012/12/03/jruby-1-7-1.html). See also http://blog.headius.com/2012/09/explanation-of-warnings-from-mris-test.html Syck was binary encoding characters sets Psych is UTF-8 compatible (as MRI 1.9.X), so lots of YAML files may becomes unreadable or corrupted, but solutions exists: http://devblog.arnebrasseur.net/2014-02-yaml-syck-vs-psych
"JRuby 1.7.13 is our thirteenth update release since JRuby 1.7.0. The primary goal of 1.7 point releases is to fill out any missing compatibility issues with Ruby 1.9.3. The community participation lately has been great. Keep reporting issues and sending pull requests. Changes of note: 58 issues fixed for 1.7.13 jruby-openssl 0.9.5 bundled Ability to upgrade jruby-openssl as a gem New custom profiler API Several BigDecimal fixes "
Looks like JRuby 1.7.15 is out: "JRuby 1.7.15 is our fifteenth update release since JRuby 1.7.0. The primary goal of 1.7 point releases is to fill out any missing compatibility issues with Ruby 1.9.3. The community participation lately has been great. Keep reporting issues and sending pull requests. This release is a quick followup release to JRuby 1.7.14. JRuby 1.7.14 had a mangled jruby-jars release as well as several non-obvious regressions involving our new load service internals. We apologize if these regressions have affected you and recommend all people upgrade to 1.7.15. Changes of note: 8 issues fixed for 1.7.15 Potential memory leak resolved when reloading JRuby apps in Java App servers jruby-jars gem did not have their embedded jars within it rvm install of jruby would not properly follow gemset symlinks Windows exec works again lstat did not honor native.enabled property and always invoked native "
It's a good thing 1.7.12 was masked. It doesn't work at all. Blows up over missing jcodings and joni classes.
dev-java/jruby has been removed from the tree last year.
For anyone that needs jruby, you can enable the "ag-ops" overlay; install chruby and ruby-install; then execute "ruby-install jruby".