summaryrefslogtreecommitdiff
blob: c6964fa156475c1f6638598e49e1af4ec5b5be7d (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
62
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/xmlrpc/xmlrpc-3.1.3.ebuild,v 1.6 2015/07/06 14:02:04 monsieurp Exp $

EAPI=5

JAVA_PKG_IUSE="doc source test"

inherit java-pkg-2 java-ant-2

DESCRIPTION="Apache XML-RPC is a Java implementation of XML-RPC"
HOMEPAGE="http://ws.apache.org/xmlrpc/"
SRC_URI="https://archive.apache.org/dist/ws/${PN}/sources/apache-${P}-src.tar.bz2
		http://dev.gentoo.org/~ercpe/distfiles/${CATEGORY}/${PN}/${P}-build.tar.gz"

LICENSE="Apache-2.0"
SLOT="3"
KEYWORDS="amd64 ppc x86"

CDEPEND="dev-java/commons-httpclient:3
	dev-java/commons-codec:0
	dev-java/ws-commons-util:0
	dev-java/commons-logging:0
	java-virtuals/servlet-api:2.4
	"
DEPEND=">=virtual/jdk-1.6
	test? (
		dev-java/ant-junit:0
		dev-java/junit:4
	)
	${CDEPEND}"
RDEPEND=">=virtual/jre-1.6
	${CDEPEND}"

IUSE=""

S="${WORKDIR}/apache-${P}-src"

JAVA_ANT_REWRITE_CLASSPATH="true"
EANT_GENTOO_CLASSPATH="commons-httpclient-3,commons-codec,ws-commons-util"
EANT_GENTOO_CLASSPATH+=",commons-logging" # client
EANT_GENTOO_CLASSPATH+=",servlet-api-2.4" # server
EANT_GENTOO_CLASSPATH_EXTRA="${S}/common/target/${PN}-common.jar"

java_prepare() {
	# Doesn't work.
	rm -v \
		server/src/test/java/org/apache/xmlrpc/test/SerializerTest.java
}

EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH},junit-4,ant-junit"

src_test() {
	java-pkg-2_src_test
}

src_install() {
	java-pkg_dojar common/target/xmlrpc-common.jar server/target/xmlrpc-server.jar client/target/xmlrpc-client.jar

	use doc && java-pkg_dojavadoc {common,server,client}/target/site/apidocs
	use source && java-pkg_dosrc {common,server,client}/src/main/java/*
}