summaryrefslogtreecommitdiff
blob: f936bf93ce2348a4e62d6a135040c5f1f59712be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/saaj/saaj-1.3.ebuild,v 1.8 2008/03/09 18:35:33 betelgeuse Exp $

JAVA_PKG_IUSE="source"

inherit java-pkg-2 java-ant-2

DESCRIPTION="SOAP with Attachments API for Java"
HOMEPAGE="https://saaj.dev.java.net/"
SRC_URI="https://saaj.dev.java.net/files/documents/52/32731/saaj${PV}.src.zip"

LICENSE="CDDL"
SLOT="0"
KEYWORDS="amd64 ~ppc x86 ~x86-fbsd"
IUSE=""

COMMON_DEP="dev-java/jsr67
	dev-java/sun-jaf
	>=dev-java/xerces-2.8
	dev-java/xalan"
# needs com.sun.image.codec which 1.7 doesn't have
# should fix it to not use them at all
DEPEND="|| ( =virtual/jdk-1.6* =virtual/jdk-1.5* )
	app-arch/unzip
	${COMMON_DEP}"
RDEPEND=">=virtual/jre-1.5
	${COMMON_DEP}"

S="${WORKDIR}"

src_unpack() {

	unpack ${A}

	mkdir src lib || die
	mv com src || die

	cd "${S}/lib"
	java-pkg_jar-from jsr67
	java-pkg_jar-from sun-jaf
	java-pkg_jar-from xerces-2
	java-pkg_jar-from xalan

	cp -i "${FILESDIR}/build.xml-${PV}" "${S}/build.xml" || die

	cd "${S}/src"
	# YES! There's nothing like using com.sun...internal ! YAY!
	find . -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' \
		{} \;

}

src_install() {
	java-pkg_dojar saaj.jar

	use source && java-pkg_dosrc src/*

}