Revbump to remove java6 flag and make it mandatory.
authorVlastimil Babka <caster@gentoo.org>
Mon, 5 Apr 2010 23:03:49 +0000 (23:03 +0000)
committerVlastimil Babka <caster@gentoo.org>
Mon, 5 Apr 2010 23:03:49 +0000 (23:03 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

dev-java/jdbc-postgresql/ChangeLog
dev-java/jdbc-postgresql/jdbc-postgresql-8.4_p701-r1.ebuild [new file with mode: 0644]
dev-java/jruby/ChangeLog
dev-java/jruby/jruby-1.4.0-r6.ebuild [new file with mode: 0644]

index 776082021003e3e48dea771675fa1ba60097e42a..439062b5f5a0a29374b372cdeb5f92cfdffa729d 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for dev-java/jdbc-postgresql
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jdbc-postgresql/ChangeLog,v 1.35 2010/04/05 20:57:14 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jdbc-postgresql/ChangeLog,v 1.36 2010/04/05 22:59:45 caster Exp $
+
+*jdbc-postgresql-8.4_p701-r1 (05 Apr 2010)
+
+  05 Apr 2010; Vlastimil Babka <caster@gentoo.org>
+  +jdbc-postgresql-8.4_p701-r1.ebuild:
+  Revbump to remove java6 flag and make it mandatory.
 
   05 Apr 2010; Markus Meier <maekke@gentoo.org>
   jdbc-postgresql-8.4_p701.ebuild:
diff --git a/dev-java/jdbc-postgresql/jdbc-postgresql-8.4_p701-r1.ebuild b/dev-java/jdbc-postgresql/jdbc-postgresql-8.4_p701-r1.ebuild
new file mode 100644 (file)
index 0000000..fb467dc
--- /dev/null
@@ -0,0 +1,78 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jdbc-postgresql/jdbc-postgresql-8.4_p701-r1.ebuild,v 1.1 2010/04/05 22:59:45 caster Exp $
+
+EAPI="2"
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-ant-2
+
+MY_PN="postgresql-jdbc"
+MY_PV="${PV/_p/-}"
+MY_P="${MY_PN}-${MY_PV}.src"
+
+DESCRIPTION="JDBC Driver for PostgreSQL"
+SRC_URI="http://jdbc.postgresql.org/download/${MY_P}.tar.gz"
+HOMEPAGE="http://jdbc.postgresql.org/"
+
+LICENSE="POSTGRESQL"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="test"
+
+DEPEND=">=dev-java/java-config-2.0.31
+       =virtual/jdk-1.6*
+       doc? (
+               dev-libs/libxslt
+               app-text/docbook-xsl-stylesheets
+       )
+       test? (
+               dev-java/ant-junit
+               virtual/postgresql-server
+       )"
+RDEPEND=">=virtual/jre-1.6"
+
+S="${WORKDIR}/${MY_P}"
+
+EANT_DOC_TARGET="publicapi"
+
+java_prepare() {
+       # needed for src_test
+       java-ant_rewrite-classpath
+}
+
+src_compile() {
+       java-pkg-2_src_compile
+
+       # There is a task that creates this doc but I didn't find a way how to use system catalog
+       # to lookup the stylesheet so the 'doc' target is rewritten here to use system call instead.
+       if use doc; then
+               mkdir -p "${S}/build/doc"
+               xsltproc -o "${S}/build/doc/pgjdbc.html" http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl \
+                       "${S}/doc/pgjdbc.xml"
+       fi
+}
+
+src_test() {
+       einfo "In order to run the tests successfully, you have to have:"
+       einfo "1) PostgreSQL server running"
+       einfo "2) database 'test' defined with user 'test' with password 'password'"
+       einfo "   as owner of the database"
+       einfo "3) plpgsql support in the 'test' database"
+       einfo
+       einfo "You can find a general info on how to perform these steps at"
+       einfo "http://gentoo-wiki.com/HOWTO_Configure_Postgresql"
+
+       ANT_TASKS="ant-junit" eant test -Dgentoo.classpath=$(java-pkg_getjars --build-only junit)
+}
+
+src_install() {
+       java-pkg_newjar jars/postgresql.jar jdbc-postgresql.jar
+
+       if use doc ; then
+               java-pkg_dojavadoc build/publicapi
+               dohtml build/doc/pgjdbc.html || die
+       fi
+
+       use source && java-pkg_dosrc org
+}
index 6c8c082d7e1bfe3f9e724bfe02c29819c08f1a99..f5df768753e575ccdb60c5a3c462c03319c9428b 100644 (file)
@@ -1,6 +1,11 @@
 # 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.55 2010/02/09 17:10:23 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.56 2010/04/05 23:03:49 caster Exp $
+
+*jruby-1.4.0-r6 (05 Apr 2010)
+
+  05 Apr 2010; Vlastimil Babka <caster@gentoo.org> +jruby-1.4.0-r6.ebuild:
+  Revbump to remove java6 flag and make it mandatory.
 
   09 Feb 2010; Vlastimil Babka <caster@gentoo.org> jruby-1.3.1-r1.ebuild,
   jruby-1.4.0-r4.ebuild, jruby-1.4.0-r5.ebuild:
diff --git a/dev-java/jruby/jruby-1.4.0-r6.ebuild b/dev-java/jruby/jruby-1.4.0-r6.ebuild
new file mode 100644 (file)
index 0000000..953368d
--- /dev/null
@@ -0,0 +1,176 @@
+# 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.4.0-r6.ebuild,v 1.1 2010/04/05 23:03:49 caster 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.kenai.com/downloads/${PV}/${PN}-src-${MY_PV}.tar.gz"
+LICENSE="|| ( CPL-1.0 GPL-2 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+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/jna-posix-1.0.1: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/jna:0
+       dev-java/joda-time:0
+       dev-util/jay:0[java]
+       dev-java/nailgun:0
+       dev-java/jaffl:0
+       dev-java/jgrapht:0"
+
+RDEPEND="${CDEPEND}
+       >=virtual/jre-1.6"
+
+DEPEND="${CDEPEND}
+       >=virtual/jdk-1.6
+       bsf? ( dev-java/bsf:2.3 )
+       test? (
+               dev-java/ant-junit
+               dev-java/ant-trax
+       )
+       !!<dev-ruby/jruby-1.3.1-r1"
+
+PDEPEND="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 jaffl jgrapht"
+EANT_NEEDS_TOOLS="true"
+
+pkg_setup() {
+       java-pkg-2_pkg_setup
+
+       local fail
+
+       for directory in "${GEMS}" "${SITE_RUBY}"; do
+               if [[ -L ${directory} ]]; then
+                       eerror "${directory} is a symlink. Please remove this symlink."
+                       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}"/${P}-system-jars-r2.patch
+       epatch "${FILESDIR}"/${P}-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 "/<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" -delete || die
+       rm lib/profile.jar || 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 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
+
+       # 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."
+}