summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Sennhauser <sera@gentoo.org>2012-06-03 08:07:39 +0000
committerRalph Sennhauser <sera@gentoo.org>2012-06-03 08:07:39 +0000
commitbe4cd0477e792c59bfc43d4e0a7aa0bdbbb1a904 (patch)
tree0d4a7a0e4238aa8fa98eda00e017be2132c64257 /dev-java/saaj
parentMaking wpa_supplicant depend on net-wireless/crda on linux, fixing bug 401277 (diff)
downloadgentoo-2-be4cd0477e792c59bfc43d4e0a7aa0bdbbb1a904.tar.gz
gentoo-2-be4cd0477e792c59bfc43d4e0a7aa0bdbbb1a904.tar.bz2
gentoo-2-be4cd0477e792c59bfc43d4e0a7aa0bdbbb1a904.zip
Fix for use with java 1.5 (add missing jaf and jsr67 and use servlet-api:2.5 instead of 3.0 for tests. Fix 1.6 bcp usage). #419403
(Portage version: 2.1.10.62/cvs/Linux x86_64)
Diffstat (limited to 'dev-java/saaj')
-rw-r--r--dev-java/saaj/ChangeLog9
-rw-r--r--dev-java/saaj/files/saaj-1.3.19-java-5-bootclasspath.patch13
-rw-r--r--dev-java/saaj/saaj-1.3.19-r1.ebuild68
3 files changed, 89 insertions, 1 deletions
diff --git a/dev-java/saaj/ChangeLog b/dev-java/saaj/ChangeLog
index 6dfeaf499374..3808243ed689 100644
--- a/dev-java/saaj/ChangeLog
+++ b/dev-java/saaj/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-java/saaj
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/saaj/ChangeLog,v 1.13 2012/06/02 12:54:32 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/saaj/ChangeLog,v 1.14 2012/06/03 08:07:39 sera Exp $
+
+*saaj-1.3.19-r1 (03 Jun 2012)
+
+ 03 Jun 2012; Ralph Sennhauser <sera@gentoo.org> +saaj-1.3.19-r1.ebuild,
+ +files/saaj-1.3.19-java-5-bootclasspath.patch:
+ Fix for use with java 1.5 (add missing jaf and jsr67 and use servlet-api:2.5
+ instead of 3.0 for tests. Fix 1.6 bcp usage). #419403
02 Jun 2012; Agostino Sarubbo <ago@gentoo.org> saaj-1.3.19.ebuild:
Stable for amd64, wrt bug #417997
diff --git a/dev-java/saaj/files/saaj-1.3.19-java-5-bootclasspath.patch b/dev-java/saaj/files/saaj-1.3.19-java-5-bootclasspath.patch
new file mode 100644
index 000000000000..9b92b18944c9
--- /dev/null
+++ b/dev-java/saaj/files/saaj-1.3.19-java-5-bootclasspath.patch
@@ -0,0 +1,13 @@
+--- a/src/java/com/sun/xml/messaging/saaj/soap/ImageDataContentHandler.java
++++ b/src/java/com/sun/xml/messaging/saaj/soap/ImageDataContentHandler.java
+@@ -83,7 +83,9 @@
+ * @return The DataFlavors.
+ */
+ public DataFlavor[] getTransferDataFlavors() {
+- return (DataFlavor[]) Arrays.copyOf(flavor, flavor.length);
++ DataFlavor[] copyOf = new DataFlavor[flavor.length];
++ System.arraycopy(flavor, 0, copyOf, 0, flavor.length);
++ return copyOf;
+ }
+
+ /**
diff --git a/dev-java/saaj/saaj-1.3.19-r1.ebuild b/dev-java/saaj/saaj-1.3.19-r1.ebuild
new file mode 100644
index 000000000000..e13101458b73
--- /dev/null
+++ b/dev-java/saaj/saaj-1.3.19-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/saaj/saaj-1.3.19-r1.ebuild,v 1.1 2012/06/03 08:07:39 sera Exp $
+
+EAPI=4
+
+JAVA_PKG_IUSE="examples source test"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="SOAP with Attachments API for Java"
+HOMEPAGE="https://saaj.dev.java.net/"
+# svn export https://svn.java.net/svn/saaj~svn/tags/saaj-impl-1.3.19 saaj-1.3.19
+# tar cjf saaj-1.3.19.tar.bz2 saaj-1.3.19
+SRC_URI="https://dev.gentoo.org/~sera/distfiles/${P}.tar.bz2"
+
+LICENSE="CDDL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# jaf and saaj-api only for java 5
+COMMON_DEP="
+ dev-java/mimepull:0
+ dev-java/xerces:2
+ dev-java/xml-commons-external:1.4
+ java-virtuals/jaf:0
+ java-virtuals/saaj-api:0"
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.5"
+# servlet-api 2.5 for java 5. 3.0 is java 6.
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.5
+ test? (
+ dev-java/ant-junit:0
+ dev-java/xalan:0
+ java-virtuals/servlet-api:2.5
+ )"
+
+java_prepare() {
+ find -name '*.jar' -exec rm -v {} + || die
+
+ epatch "${FILESDIR}"/${P}-java-5-bootclasspath.patch
+
+ # YES! There's nothing like using com.sun...internal ! YAY!
+ find src -name '*.java' -exec sed -i \
+ -e 's,com.sun.org.apache.xerces.internal,org.apache.xerces,g' \
+ -e 's,com.sun.org.apache.xalan.internal.xsltc.trax,org.apache.xalan.xsltc.trax,g' \
+ {} + || die
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+
+EANT_GENTOO_CLASSPATH="mimepull,jaf,saaj-api,xerces-2,xml-commons-external-1.4"
+
+EANT_TEST_TARGET="test-all"
+EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH},servlet-api-2.5,xalan"
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_newjar build/lib/saaj-impl.jar ${PN}.jar
+ dohtml -r docs/*
+
+ use examples && java-pkg_doexamples samples
+ use source && java-pkg_dosrc src/java/*
+}