From 7032ecd64e209bf267cd3d0bb9397effadc5f4da Mon Sep 17 00:00:00 2001 From: Diego Elio Pettenò Date: Tue, 22 Jun 2010 22:08:33 +0000 Subject: Fix bindir definition, or rather workaround since the properties don't seem to get respected from the file. (Portage version: 2.2_rc67/cvs/Linux x86_64) --- dev-java/jruby/ChangeLog | 16 +- dev-java/jruby/files/jruby-1.5.0-bindir.patch | 12 -- dev-java/jruby/files/jruby-1.5.0-system-jars.patch | 3 +- dev-java/jruby/jruby-1.5.1-r1.ebuild | 190 +++++++++++++++++++++ dev-java/jruby/jruby-1.5.1.ebuild | 186 -------------------- 5 files changed, 207 insertions(+), 200 deletions(-) delete mode 100644 dev-java/jruby/files/jruby-1.5.0-bindir.patch create mode 100644 dev-java/jruby/jruby-1.5.1-r1.ebuild delete mode 100644 dev-java/jruby/jruby-1.5.1.ebuild (limited to 'dev-java') diff --git a/dev-java/jruby/ChangeLog b/dev-java/jruby/ChangeLog index 5378c79b7639..3a6512c44d94 100644 --- a/dev-java/jruby/ChangeLog +++ b/dev-java/jruby/ChangeLog @@ -1,6 +1,20 @@ # 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.59 2010/06/19 11:07:14 ali_bush Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.60 2010/06/22 22:08:33 flameeyes Exp $ + + 22 Jun 2010; Diego E. Pettenò + -files/jruby-1.5.0-bindir.patch, files/jruby-1.5.0-system-jars.patch, + -jruby-1.5.1.ebuild, +jruby-1.5.1-r1.ebuild: + Fix bindir definition, or rather workaround since the properties don't + seem to get respected from the file. + +*jruby-1.5.1-r1 (22 Jun 2010) + + 22 Jun 2010; Diego E. Pettenò + -files/jruby-1.5.0-bindir.patch, files/jruby-1.5.0-system-jars.patch, + -jruby-1.5.1.ebuild, +jruby-1.5.1-r1.ebuild: + Make sure that the reported bindir is correct, otherwise rake will always + fail. *jruby-1.5.1 (17 Jun 2010) diff --git a/dev-java/jruby/files/jruby-1.5.0-bindir.patch b/dev-java/jruby/files/jruby-1.5.0-bindir.patch deleted file mode 100644 index 88390b223adb..000000000000 --- a/dev-java/jruby/files/jruby-1.5.0-bindir.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur jruby-1.5.0.orig/src/org/jruby/libraries/RbConfigLibrary.java jruby-1.5.0/src/org/jruby/libraries/RbConfigLibrary.java ---- jruby-1.5.0.orig/src/org/jruby/libraries/RbConfigLibrary.java 2010-05-16 08:54:49.000000000 +1200 -+++ jruby-1.5.0/src/org/jruby/libraries/RbConfigLibrary.java 2010-05-16 23:24:36.000000000 +1200 -@@ -135,7 +135,7 @@ - // Use property for binDir if available, otherwise fall back to common bin default - String binDir = SafePropertyAccessor.getProperty("jruby.bindir"); - if (binDir == null) { -- binDir = new NormalizedFile(normalizedHome, "bin").getPath(); -+ binDir = new NormalizedFile(normalizedHome, "/usr/bin").getPath(); - } - setConfig(configHash, "bindir", binDir); - diff --git a/dev-java/jruby/files/jruby-1.5.0-system-jars.patch b/dev-java/jruby/files/jruby-1.5.0-system-jars.patch index 294feedbbaf6..8260df1b81b9 100644 --- a/dev-java/jruby/files/jruby-1.5.0-system-jars.patch +++ b/dev-java/jruby/files/jruby-1.5.0-system-jars.patch @@ -176,7 +176,8 @@ diff -Naur jruby-1.5.1.bak/bin/jruby.sh jruby-1.5.1/bin/jruby.sh JAVA_VM=-client ;; @@ -275,51 +202,16 @@ - JAVA_OPTS="$JAVA_OPTS $JAVA_MEM $JAVA_STACK" +-JAVA_OPTS="$JAVA_OPTS $JAVA_MEM $JAVA_STACK" ++JAVA_OPTS="$JAVA_OPTS $JAVA_MEM $JAVA_STACK -Djruby.bindir=/usr/bin" -JFFI_BOOT="" -if [ -d $JRUBY_HOME/lib/native/ ]; then diff --git a/dev-java/jruby/jruby-1.5.1-r1.ebuild b/dev-java/jruby/jruby-1.5.1-r1.ebuild new file mode 100644 index 000000000000..537e9e9d822c --- /dev/null +++ b/dev-java/jruby/jruby-1.5.1-r1.ebuild @@ -0,0 +1,190 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.5.1-r1.ebuild,v 1.1 2010/06/22 22:08:33 flameeyes 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://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" +IUSE="bsf 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/jnr-posix-1.1.3:0 + >=dev-java/jnr-netdb-1.0:0 + >=dev-java/jvyamlb-0.2.5:0 + >=dev-java/asm-3.2:3 + dev-java/jcodings:0 + >=dev-java/jffi-0.7_pre:0.4 + dev-java/joda-time:0 + dev-util/jay:0[java] + dev-java/nailgun:0 + dev-java/jaffl:0 + dev-java/jgrapht:0 + dev-java/ant-core:0 + dev-java/bsf:2.3" + +RDEPEND="${CDEPEND} + >=virtual/jre-1.6" + +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 + ) + !! ~/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}/ftype-test-fixes.patch" + #epatch "${FILESDIR}/user-test-fixes.patch" + epatch "${FILESDIR}"/${PN}-1.5.0-system-jars.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 "//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" -delete || die + rm lib/profile.jar || die + + # change some defaults for Gentoo to work properly + cat - >> src/org/jruby/jruby.properties < "${T}"/jruby + + dobin "${T}"/jruby "${S}"/bin/j{irb{,_swing},rubyc} || die + + insinto "${RUBY_HOME}" + doins -r "${S}"/lib/ruby/{1.8,1.9,site_ruby} || die + + # Remove all the references to RubyGems as we're just going to + # install it through dev-ruby/rubygems. + find "${D}${RUBY_HOME}" -type f \ + '(' '(' -path '*rubygems*' -not -name 'jruby.rb' ')' -or -name 'ubygems.rb' -or -name 'datadir.rb' ')' \ + -delete || die +} + +pkg_postinst() { + ewarn "If you're updating from <=jruby-1.4.0, you're going to get errors related" + ewarn "to gentoo.rb load failure." + ewarn "This is due to a stray definition of JRUBY_OPTS variable from the previous ebuilds." + ewarn "To solve the problem, either login in a new shell, use 'env -i ${SHELL} --login'" + ewarn "or explicitly unset the variable before running jruby." +} diff --git a/dev-java/jruby/jruby-1.5.1.ebuild b/dev-java/jruby/jruby-1.5.1.ebuild deleted file mode 100644 index c10b6b3f6328..000000000000 --- a/dev-java/jruby/jruby-1.5.1.ebuild +++ /dev/null @@ -1,186 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.5.1.ebuild,v 1.1 2010/06/19 11:07:14 ali_bush 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://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" -IUSE="bsf 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/jnr-posix-1.1.3:0 - >=dev-java/jnr-netdb-1.0:0 - >=dev-java/jvyamlb-0.2.5:0 - >=dev-java/asm-3.2:3 - dev-java/jcodings:0 - >=dev-java/jffi-0.7_pre:0.4 - dev-java/joda-time:0 - dev-util/jay:0[java] - dev-java/nailgun:0 - dev-java/jaffl:0 - dev-java/jgrapht:0 - dev-java/ant-core:0 - dev-java/bsf:2.3" - -RDEPEND="${CDEPEND} - >=virtual/jre-1.6" - -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 - ) - !! ~/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}/ftype-test-fixes.patch" - #epatch "${FILESDIR}/user-test-fixes.patch" - epatch "${FILESDIR}"/${PN}-1.5.0-system-jars.patch - epatch "${FILESDIR}"/${PN}-1.5.0-bindir.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 "//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" -delete || die - rm lib/profile.jar || die -} - -src_compile() { - eant jar $(use_doc 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 - - mkdir -p usr - - ln -s "${S}/bin" "${S}/usr/bin" - - # TODO check this. - # 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" - - # 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 - - #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_${ROOT}/usr/share/jruby/lib/jruby.jar:__g")" - EANT_GENTOO_CLASSPATH="" - ANT_TASKS="ant-junit4 ant-trax" \ - JRUBY_CP="${cpath}" \ - JRUBY_OPTS="" eant test -Djdk1.5+=true -Djruby.bindir=bin \ - -Dgentoo.classpath="${cpath}" -} - -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 - - # 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 > "${T}"/jruby - - dobin "${T}"/jruby "${S}"/bin/j{irb{,_swing},rubyc} || die - - insinto "${RUBY_HOME}" - doins -r "${S}"/lib/ruby/{1.8,1.9,site_ruby} || die - - # Remove all the references to RubyGems as we're just going to - # install it through dev-ruby/rubygems. - find "${D}${RUBY_HOME}" -type f \ - '(' '(' -path '*rubygems*' -not -name 'jruby.rb' ')' -or -name 'ubygems.rb' -or -name 'datadir.rb' ')' \ - -delete || die -} - -pkg_postinst() { - ewarn "If you're updating from <=jruby-1.4.0, you're going to get errors related" - ewarn "to gentoo.rb load failure." - ewarn "This is due to a stray definition of JRUBY_OPTS variable from the previous ebuilds." - ewarn "To solve the problem, either login in a new shell, use 'env -i ${SHELL} --login'" - ewarn "or explicitly unset the variable before running jruby." -} -- cgit v1.2.3-65-gdbad