diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-01-23 13:51:00 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-01-23 13:51:00 +0000 |
commit | b1ae4b06190ddadd44fd7fdc46d7d388b1e8d389 (patch) | |
tree | 6cd6cd5b9fb42e728807da3031095bf2d57d00bb /dev-java/jruby | |
parent | quote a bit (diff) | |
download | gentoo-2-b1ae4b06190ddadd44fd7fdc46d7d388b1e8d389.tar.gz gentoo-2-b1ae4b06190ddadd44fd7fdc46d7d388b1e8d389.tar.bz2 gentoo-2-b1ae4b06190ddadd44fd7fdc46d7d388b1e8d389.zip |
Remove older versions, only leave around those supporting ruby-ng-installed packages.
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Diffstat (limited to 'dev-java/jruby')
-rw-r--r-- | dev-java/jruby/ChangeLog | 8 | ||||
-rw-r--r-- | dev-java/jruby/files/jruby-0.9.8-sandbox.patch | 11 | ||||
-rw-r--r-- | dev-java/jruby/jruby-1.0.0.ebuild | 154 | ||||
-rw-r--r-- | dev-java/jruby/jruby-1.0.3.ebuild | 145 | ||||
-rw-r--r-- | dev-java/jruby/jruby-1.2.0-r1.ebuild | 164 | ||||
-rw-r--r-- | dev-java/jruby/jruby-1.3.1.ebuild | 181 |
6 files changed, 7 insertions, 656 deletions
diff --git a/dev-java/jruby/ChangeLog b/dev-java/jruby/ChangeLog index f44c8bb485fa..ea7074f3a143 100644 --- a/dev-java/jruby/ChangeLog +++ b/dev-java/jruby/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-java/jruby # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.50 2010/01/16 23:34:28 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.51 2010/01/23 13:51:00 flameeyes Exp $ + + 23 Jan 2010; Diego E. Pettenò <flameeyes@gentoo.org> + -files/jruby-0.9.8-sandbox.patch, -jruby-1.0.0.ebuild, + -jruby-1.0.3.ebuild, -jruby-1.2.0-r1.ebuild, -jruby-1.3.1.ebuild: + Remove older versions, only leave around those supporting + ruby-ng-installed packages. *jruby-1.4.0-r3 (16 Jan 2010) diff --git a/dev-java/jruby/files/jruby-0.9.8-sandbox.patch b/dev-java/jruby/files/jruby-0.9.8-sandbox.patch deleted file mode 100644 index d7a436f363fa..000000000000 --- a/dev-java/jruby/files/jruby-0.9.8-sandbox.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ru jruby-0.9.8/build.xml jruby-0.9.8-patched/build.xml ---- jruby-0.9.8/build.xml 2007-03-05 18:44:49.000000000 -0500 -+++ jruby-0.9.8-patched/build.xml 2007-03-11 15:54:01.000000000 -0400 -@@ -137,6 +137,7 @@ - <classpath refid="build.classpath"/> - <classpath path="${jruby.classes.dir}"/> - <sysproperty key="jruby.dump_invocations" value="${jruby.classes.dir}"/> -+ <jvmarg value="-Djruby.home=${basedir}"/> - <arg value="-rjava"/> - <arg value="${build.dir}/__empty.rb"/> - </java> diff --git a/dev-java/jruby/jruby-1.0.0.ebuild b/dev-java/jruby/jruby-1.0.0.ebuild deleted file mode 100644 index faf7d4ec7e57..000000000000 --- a/dev-java/jruby/jruby-1.0.0.ebuild +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.0.0.ebuild,v 1.4 2007/12/17 13:58:17 caleb Exp $ - -JAVA_PKG_IUSE="doc source test" -inherit eutils java-pkg-2 java-ant-2 - -# 1.0 < 1.0.0_rcX -# so, we'll pretend 1.0 is actually 1.0.0 -# remove this for next release -# TODO complain to upstream -MY_PV="1.0" -MY_P="${PN}-${MY_PV}" - -DESCRIPTION="Java based ruby interpreter implementation" -HOMEPAGE="http://jruby.codehaus.org/" -SRC_URI="http://dist.codehaus.org/${PN}/${PN}-src-${MY_PV}.tar.gz" - -LICENSE="|| ( CPL-1.0 GPL-2 LGPL-2.1 )" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="bsf" - -COMMON_DEPEND=">=dev-java/jline-0.9.91 - =dev-java/asm-2.2* - dev-java/backport-util-concurrent" -RDEPEND=">=virtual/jre-1.4 - ${COMMON_DEPEND}" - -DEPEND=">=virtual/jdk-1.4 - bsf? ( >=dev-java/bsf-2.3 ) - test? ( - =dev-java/junit-3* - dev-java/ant-junit - dev-java/ant-trax - ) - ${COMMON_DEPEND}" -PDEPEND="dev-ruby/rubygems - >=dev-ruby/rake-0.7.3 - >=dev-ruby/rspec-1.0.4" - -S="${WORKDIR}/${MY_P}" - -RUBY_HOME=/usr/share/${PN}/lib/ruby -SITE_RUBY=${RUBY_HOME}/site_ruby -GEMS=${RUBY_HOME}/gems - -pkg_setup() { - java-pkg-2_pkg_setup - - if [[ -d ${SITE_RUBY} && ! -L ${SITE_RUBY} ]]; then - ewarn "dev-java/jruby now uses dev-lang/ruby's site_ruby directory by creating symlinks." - ewarn "${SITE_RUBY} is a directory right now, which will cause problems when being merged onto the filesystem." - fi - if [[ -d ${GEMS} && ! -L ${GEMS} ]]; then - ewarn "dev-java/jruby now uses dev-lang/ruby's gems directory by creating symlinks." - ewarn "${GEMS} is a directory right now, which will cause problems when being merged onto the filesystem." - fi - - # only use javac, see http://jira.codehaus.org/browse/JRUBY-675 - java-pkg_force-compiler javac -} - -src_unpack() { - unpack ${A} - cd "${S}" - # prevents /root/.jruby being created at build time with - # FEATURES="-userpriv" - # see http://bugs.gentoo.org/show_bug.cgi?id=170058 - epatch "${FILESDIR}"/${PN}-0.9.8-sandbox.patch - # search only lib, kills jdk1.4+ property which we set manually - java-ant_ignore-system-classes - - cd "${S}"/lib - rm -v *.jar || die - - java-pkg_jar-from --build-only ant-core ant.jar - java-pkg_jar-from asm-2.2 asm.jar - java-pkg_jar-from asm-2.2 asm-commons.jar - java-pkg_jar-from jline - java-pkg_jar-from backport-util-concurrent - use test && java-pkg_jar-from --build-only junit - - # build-only because it's just BSF adapter classes and won't be used - # unless invoked from bsf itself, so no need to pollute classpath - if use bsf; then - java-pkg_jar-from --build-only bsf-2.3 - else - cd "${S}" - # testcases depending on bsf - rm test/org/jruby/test/TestAdoptedThreading.java || die - rm test/org/jruby/javasupport/test/TestBSF.java || die - sed -i -e '/TestBSF.class/d' \ - test/org/jruby/javasupport/test/JavaSupportTestSuite.java || die - sed -i -e '/TestAdoptedThreading.class/d' \ - test/org/jruby/test/MainTestSuite.java || die - fi -} - -src_compile() { - eant jar $(use_doc create-apidocs) -Djruby.home="${T}"/.jruby -Djdk1.4+=true -} - -src_test() { - # needs bsf's runtime deps to work - use bsf && java-pkg_jar-from --into lib --with-dependencies bsf-2.3 - ANT_TASKS="ant-junit ant-trax" eant test -Djdk1.4+=true -} - -src_install() { - java-pkg_dojar lib/${PN}.jar - - dodoc README docs/{*.txt,README.*,BeanScriptingFramework} || die - dohtml docs/getting_involved.html || die - - if use doc; then - java-pkg_dojavadoc docs/api - fi - use source && java-pkg_dosrc src/org - java-pkg_dolauncher ${PN} \ - --main 'org.jruby.Main' \ - --java_args '-Djruby.base=/usr/share/jruby -Djruby.home=/usr/share/jruby -Djruby.lib=/usr/share/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh' - dobin "${S}"/bin/jirb - - dodir "/usr/share/${PN}/lib" - insinto "/usr/share/${PN}/lib" - doins -r "${S}/lib/ruby" - - # Share gems with regular ruby - rm -r "${D}"/usr/share/${PN}/lib/ruby/gems || die - dosym /usr/lib/ruby/gems /usr/share/${PN}/lib/ruby/gems || die - - # Share site_ruby with regular ruby - rm -r "${D}"/usr/share/${PN}/lib/ruby/site_ruby || die - dosym /usr/lib/ruby/site_ruby /usr/share/${PN}/lib/ruby/site_ruby || die -} - -pkg_preinst() { - local bad_directory=0 - - if [[ -d ${SITE_RUBY} && ! -L ${SITE_RUBY} ]]; then - eerror "${SITE_RUBY} is a directory. Please move this directory out of the way, and then emerge --resume." - bad_directory=1 - fi - - if [[ -d ${GEMS} && ! -L ${GEMS} ]]; then - eerror "${GEMS} is a directory. Please move this directory out of the way, and then emerge --resume." - bad_directory=1 - fi - - if [[ ! ${bad_directory} ]]; then - die "Please address the above errors, then emerge --resume." - fi -} diff --git a/dev-java/jruby/jruby-1.0.3.ebuild b/dev-java/jruby/jruby-1.0.3.ebuild deleted file mode 100644 index ce20a2aa7676..000000000000 --- a/dev-java/jruby/jruby-1.0.3.ebuild +++ /dev/null @@ -1,145 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.0.3.ebuild,v 1.1 2007/12/17 13:58:17 caleb Exp $ - -JAVA_PKG_IUSE="doc source test" -inherit eutils java-pkg-2 java-ant-2 - -DESCRIPTION="Java based ruby interpreter implementation" -HOMEPAGE="http://jruby.codehaus.org/" -SRC_URI="http://dist.codehaus.org/${PN}/${PN}-src-${PV}.tar.gz" - -LICENSE="|| ( CPL-1.0 GPL-2 LGPL-2.1 )" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="bsf" - -COMMON_DEPEND=">=dev-java/jline-0.9.91 - =dev-java/asm-2.2* - dev-java/backport-util-concurrent" -RDEPEND=">=virtual/jre-1.4 - ${COMMON_DEPEND}" - -DEPEND=">=virtual/jdk-1.4 - bsf? ( >=dev-java/bsf-2.3 ) - test? ( - =dev-java/junit-3* - dev-java/ant-junit - dev-java/ant-trax - ) - ${COMMON_DEPEND}" -PDEPEND="dev-ruby/rubygems - >=dev-ruby/rake-0.7.3 - >=dev-ruby/rspec-1.0.4" - -RUBY_HOME=/usr/share/${PN}/lib/ruby -SITE_RUBY=${RUBY_HOME}/site_ruby -GEMS=${RUBY_HOME}/gems - -pkg_setup() { - java-pkg-2_pkg_setup - - if [[ -d ${SITE_RUBY} && ! -L ${SITE_RUBY} ]]; then - ewarn "dev-java/jruby now uses dev-lang/ruby's site_ruby directory by creating symlinks." - ewarn "${SITE_RUBY} is a directory right now, which will cause problems when being merged onto the filesystem." - fi - if [[ -d ${GEMS} && ! -L ${GEMS} ]]; then - ewarn "dev-java/jruby now uses dev-lang/ruby's gems directory by creating symlinks." - ewarn "${GEMS} is a directory right now, which will cause problems when being merged onto the filesystem." - fi - - # only use javac, see http://jira.codehaus.org/browse/JRUBY-675 - java-pkg_force-compiler javac -} - -src_unpack() { - unpack ${A} - cd "${S}" - # prevents /root/.jruby being created at build time with - # FEATURES="-userpriv" - # see http://bugs.gentoo.org/show_bug.cgi?id=170058 - epatch "${FILESDIR}"/${PN}-0.9.8-sandbox.patch - # search only lib, kills jdk1.4+ property which we set manually - java-ant_ignore-system-classes - - cd "${S}"/lib - rm -v *.jar || die - - java-pkg_jar-from --build-only ant-core ant.jar - java-pkg_jar-from asm-2.2 asm.jar - java-pkg_jar-from asm-2.2 asm-commons.jar - java-pkg_jar-from jline - java-pkg_jar-from backport-util-concurrent - use test && java-pkg_jar-from --build-only junit - - # build-only because it's just BSF adapter classes and won't be used - # unless invoked from bsf itself, so no need to pollute classpath - if use bsf; then - java-pkg_jar-from --build-only bsf-2.3 - else - cd "${S}" - # testcases depending on bsf - rm test/org/jruby/test/TestAdoptedThreading.java || die - rm test/org/jruby/javasupport/test/TestBSF.java || die - sed -i -e '/TestBSF.class/d' \ - test/org/jruby/javasupport/test/JavaSupportTestSuite.java || die - sed -i -e '/TestAdoptedThreading.class/d' \ - test/org/jruby/test/MainTestSuite.java || die - fi -} - -src_compile() { - eant jar $(use_doc create-apidocs) -Djruby.home="${T}"/.jruby -Djdk1.4+=true -} - -src_test() { - # needs bsf's runtime deps to work - use bsf && java-pkg_jar-from --into lib --with-dependencies bsf-2.3 - ANT_TASKS="ant-junit ant-trax" eant test -Djdk1.4+=true -} - -src_install() { - java-pkg_dojar lib/${PN}.jar - - dodoc README docs/{*.txt,README.*,BeanScriptingFramework} || die - dohtml docs/getting_involved.html || die - - if use doc; then - java-pkg_dojavadoc docs/api - fi - use source && java-pkg_dosrc src/org - java-pkg_dolauncher ${PN} \ - --main 'org.jruby.Main' \ - --java_args '-Djruby.base=/usr/share/jruby -Djruby.home=/usr/share/jruby -Djruby.lib=/usr/share/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh' - dobin "${S}"/bin/jirb - - dodir "/usr/share/${PN}/lib" - insinto "/usr/share/${PN}/lib" - doins -r "${S}/lib/ruby" - - # Share gems with regular ruby - rm -r "${D}"/usr/share/${PN}/lib/ruby/gems || die - dosym /usr/lib/ruby/gems /usr/share/${PN}/lib/ruby/gems || die - - # Share site_ruby with regular ruby - rm -r "${D}"/usr/share/${PN}/lib/ruby/site_ruby || die - dosym /usr/lib/ruby/site_ruby /usr/share/${PN}/lib/ruby/site_ruby || die -} - -pkg_preinst() { - local bad_directory=0 - - if [[ -d ${SITE_RUBY} && ! -L ${SITE_RUBY} ]]; then - eerror "${SITE_RUBY} is a directory. Please move this directory out of the way, and then emerge --resume." - bad_directory=1 - fi - - if [[ -d ${GEMS} && ! -L ${GEMS} ]]; then - eerror "${GEMS} is a directory. Please move this directory out of the way, and then emerge --resume." - bad_directory=1 - fi - - if [[ ! ${bad_directory} ]]; then - die "Please address the above errors, then emerge --resume." - fi -} diff --git a/dev-java/jruby/jruby-1.2.0-r1.ebuild b/dev-java/jruby/jruby-1.2.0-r1.ebuild deleted file mode 100644 index e432e028ac77..000000000000 --- a/dev-java/jruby/jruby-1.2.0-r1.ebuild +++ /dev/null @@ -1,164 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.2.0-r1.ebuild,v 1.4 2009/10/25 21:51:27 volkmar Exp $ - -EAPI="2" -JAVA_PKG_IUSE="doc source test" -inherit eutils java-pkg-2 java-ant-2 - -DESCRIPTION="Java-based Ruby interpreter implementation" -HOMEPAGE="http://jruby.codehaus.org/" -SRC_URI="http://dist.codehaus.org/${PN}/${PV}/${PN}-src-${PV}.tar.gz" -LICENSE="|| ( CPL-1.0 GPL-2 LGPL-2.1 )" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="bsf java6 ssl" - -CDEPEND=">=dev-java/bytelist-1.0.2:0 - >=dev-java/constantine-0.5:0 - >=dev-java/jline-0.9.94:0 - >=dev-java/joni-1.1.3:0 - >=dev-java/jna-posix-1.0:0 - >=dev-java/jvyamlb-0.2.5:0 - dev-java/asm:3 - dev-java/jcodings:0 - dev-java/jffi:0 - dev-java/jna:0 - dev-java/joda-time:0 - dev-util/jay:0[java] - !java6? ( dev-java/backport-util-concurrent )" - -RDEPEND="${CDEPEND} - !java6? ( =virtual/jre-1.5* ) - java6? ( >=virtual/jre-1.6 )" - -# using 1.6 produces 1.6 bytecode, not sure why -DEPEND="${CDEPEND} - !java6? ( =virtual/jdk-1.5* ) - java6? ( >=virtual/jdk-1.6 ) - bsf? ( dev-java/bsf:2.3 ) - test? ( - dev-java/ant-junit - dev-java/ant-trax - )" - -PDEPEND="dev-ruby/rubygems - >=dev-ruby/rake-0.7.3 - >=dev-ruby/rspec-1.0.4 - ssl? ( dev-ruby/jruby-openssl )" - -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="asm-3 bytelist constantine jay jcodings jffi jline joda-time joni jna jna-posix jvyamlb" -EANT_NEEDS_TOOLS="true" - -pkg_setup() { - java-pkg-2_pkg_setup - use java6 || EANT_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH} backport-util-concurrent" - - local fail - - if [[ -d "${GEMS}" && ! -L "${GEMS}" ]]; then - eerror "${GEMS} is a directory. Please remove this directory." - fail="true" - fi - - # the symlink creates a collision with rubygems, bug #270953 - # cannot be currently solved by removing in pkg_preinst, bug #233278 - if [[ -L "${SITE_RUBY}" ]]; then - eerror "${SITE_RUBY} is a symlink. Please remove this symlink." - fail="true" - fi - - if [[ -n ${fail} ]]; then - eerror "Unmerging the old jruby version should also fix the problem(s)." - die "Please address the above errors, then run emerge --resume" - fi -} - -java_prepare() { - epatch "${FILESDIR}/ftype-test-fixes.patch" - epatch "${FILESDIR}/user-test-fixes.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 "/<zipfileset .+\/>/d" \ - build.xml || die - - # Delete the bundled JARs but keep invokedynamic.jar. - # No source is available and it's only a dummy anyway. - find build_lib lib -name "*.jar" ! -name "invokedynamic.jar" -delete || die - - if ! use bsf; then - # Remove BSF test cases. - cd "${S}/test/org/jruby" - rm -f test/TestAdoptedThreading.java || die - rm -f javasupport/test/TestBSF.java || die - sed -i '/TestBSF.class/d' javasupport/test/JavaSupportTestSuite.java || die - sed -i '/TestAdoptedThreading.class/d' test/MainTestSuite.java || die - fi -} - -src_compile() { - eant jar $(use_doc create-apidocs) -Djdk1.5+=true -} - -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 - - # BSF is a compile-time only dependency because it's just the adapter - # classes and they won't be used unless invoked from BSF itself. - use bsf && java-pkg_jar-from --into build_lib --with-dependencies bsf-2.3 - - # 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 - - ANT_TASKS="ant-junit ant-trax" JRUBY_CP=`java-pkg_getjars ${EANT_GENTOO_CLASSPATH// /,}` JRUBY_OPTS="" eant test -Djdk1.5+=true -} - -src_install() { - local bin - - 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 - - dobin "${FILESDIR}/jruby" || die - exeinto "/usr/share/${PN}/bin" - doexe "${S}/bin/jruby" || die - - # Install some jruby tools. - dobin "${S}"/bin/j{gem,irb{,_swing},rubyc} || die - - # Symlink some common tools so that jruby can launch them internally. - for bin in {j,}gem jirb jrubyc rake rdoc ri spec{,_translator} ; do - dosym "/usr/bin/${bin}" "/usr/share/${PN}/bin/${bin}" || die - done - - insinto "${RUBY_HOME}" - doins -r "${S}/lib/ruby/1.8" || die - doins -r "${S}/lib/ruby/site_ruby" || die - - # Share gems with regular Ruby. - dosym /usr/$(get_libdir)/ruby/gems "${GEMS}" || die - - # Autoload rubygems and append regular site_ruby to $LOAD_PATH. - # Unfortunately the -I option prepends instead. - insinto "${SITE_RUBY}" - doins "${FILESDIR}/gentoo.rb" || die - doenvd "${FILESDIR}/10jruby" || die -} diff --git a/dev-java/jruby/jruby-1.3.1.ebuild b/dev-java/jruby/jruby-1.3.1.ebuild deleted file mode 100644 index b27875462a66..000000000000 --- a/dev-java/jruby/jruby-1.3.1.ebuild +++ /dev/null @@ -1,181 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.3.1.ebuild,v 1.4 2009/10/25 21:51:27 volkmar Exp $ - -EAPI="2" -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://dist.codehaus.org/${PN}/${MY_PV}/${PN}-src-${MY_PV}.tar.gz" -LICENSE="|| ( CPL-1.0 GPL-2 LGPL-2.1 )" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" -IUSE="bsf java6 ssl" - -CDEPEND=">=dev-java/bytelist-1.0.2:0 - >=dev-java/constantine-0.6:0 - >=dev-java/jline-0.9.94:0 - >=dev-java/joni-1.1.3:0 - >=dev-java/jna-posix-1.0.1:0 - >=dev-java/jvyamlb-0.2.5:0 - dev-java/asm:3 - dev-java/jcodings:0 - dev-java/jffi:0.4 - dev-java/jna:0 - dev-java/joda-time:0 - dev-util/jay:0[java] - !java6? ( dev-java/backport-util-concurrent:0 ) - dev-java/nailgun:0" - -RDEPEND="${CDEPEND} - !java6? ( =virtual/jre-1.5* ) - java6? ( >=virtual/jre-1.6 )" - -# using 1.6 produces 1.6 bytecode, not sure why -DEPEND="${CDEPEND} - !java6? ( =virtual/jdk-1.5* ) - java6? ( >=virtual/jdk-1.6 ) - bsf? ( dev-java/bsf:2.3 ) - test? ( - dev-java/ant-junit - dev-java/ant-trax - )" - -PDEPEND="dev-ruby/rubygems - >=dev-ruby/rake-0.7.3 - >=dev-ruby/rspec-1.0.4 - ssl? ( dev-ruby/jruby-openssl )" - -# Tests work for ali_bush. But fail for flameeyes see #282439. -# Tests work for ali_bush inside the ebuild env -# but fail when using vanilla src tarball. -# Restrict tests so we can stablise this package. -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="asm-3 bytelist constantine jay jcodings jffi-0.4 jline \ -joda-time joni jna jna-posix jvyamlb,nailgun" -EANT_NEEDS_TOOLS="true" - -pkg_setup() { - java-pkg-2_pkg_setup - use java6 || EANT_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH} backport-util-concurrent" - - local fail - - if [[ -d "${GEMS}" && ! -L "${GEMS}" ]]; then - eerror "${GEMS} is a directory. Please remove this directory." - fail="true" - fi - - # the symlink creates a collision with rubygems, bug #270953 - # cannot be currently solved by removing in pkg_preinst, bug #233278 - if [[ -L "${SITE_RUBY}" ]]; then - eerror "${SITE_RUBY} is a symlink. Please remove this symlink." - fail="true" - fi - - if [[ -n ${fail} ]]; then - eerror "Unmerging the old jruby version should also fix the problem(s)." - die "Please address the above errors, then run emerge --resume" - fi -} - -java_prepare() { - epatch "${FILESDIR}/ftype-test-fixes.patch" - epatch "${FILESDIR}/user-test-fixes.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 "/<zipfileset .+\/>/d" \ - build.xml || die - - # Delete the bundled JARs but keep invokedynamic.jar. - # No source is available and it's only a dummy anyway. - find build_lib lib -name "*.jar" ! -name "invokedynamic.jar" -delete || die - - if ! use bsf; then - # Remove BSF test cases. - cd "${S}/test/org/jruby" - rm -f test/TestAdoptedThreading.java || die - rm -f javasupport/test/TestBSF.java || die - sed -i '/TestBSF.class/d' javasupport/test/JavaSupportTestSuite.java || die - sed -i '/TestAdoptedThreading.class/d' test/MainTestSuite.java || die - fi -} - -src_compile() { - eant jar $(use_doc create-apidocs) -Djdk1.5+=true -} - -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 - - # ali_bush was getting crashes while attempting to run a test. - # No info about why it crashed seemed to be produced. - # remove it as temp fix. - sed -i -e '/MRI/d' build.xml || die "Failed to sed build.xml" - - # BSF is a compile-time only dependency because it's just the adapter - # classes and they won't be used unless invoked from BSF itself. - use bsf && java-pkg_jar-from --into build_lib --with-dependencies bsf-2.3 - - # 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 - - ANT_TASKS="ant-junit ant-trax" JRUBY_CP=`java-pkg_getjars ${EANT_GENTOO_CLASSPATH// /,}` JRUBY_OPTS="" eant test -Djdk1.5+=true -} - -src_install() { - local bin - - 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 - - dobin "${FILESDIR}/jruby" || die - exeinto "/usr/share/${PN}/bin" - doexe "${S}/bin/jruby" || die - - # Install some jruby tools. - dobin "${S}"/bin/j{gem,irb{,_swing},rubyc} || die - - # Symlink some common tools so that jruby can launch them internally. - for bin in {j,}gem jirb jrubyc rake rdoc ri spec{,_translator} ; do - dosym "/usr/bin/${bin}" "/usr/share/${PN}/bin/${bin}" || die - done - - insinto "${RUBY_HOME}" - doins -r "${S}/lib/ruby/1.8" || die - doins -r "${S}/lib/ruby/site_ruby" || die - - # Share gems with regular Ruby. - dosym /usr/$(get_libdir)/ruby/gems "${GEMS}" || die - - # Autoload rubygems and append regular site_ruby to $LOAD_PATH. - # Unfortunately the -I option prepends instead. - insinto "${SITE_RUBY}" - doins "${FILESDIR}/gentoo.rb" || die - doenvd "${FILESDIR}/10jruby" || die -} |