Diff netty-transport-4.0.21-r1 with a netty-transport-4.0.36

/usr/portage/dev-java/netty-transport/netty-transport-4.0.36.ebuild 2017-02-28 22:50:00.000000000 +0300
1
# Copyright 1999-2017 Gentoo Foundation
1
# Copyright 1999-2016 Gentoo Foundation
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI="5"
5 5

  
6 6
JAVA_PKG_IUSE="doc source"
7 7

  
8
inherit java-pkg-2 java-ant-2
8
inherit java-pkg-2 java-pkg-simple
9 9

  
10 10
MY_PN="netty"
11 11
MY_P="${MY_PN}-${PV}"
12 12
DESCRIPTION="Async event-driven framework for high performance network applications"
13 13
HOMEPAGE="http://netty.io/"
14 14
SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/${MY_P}.Final.tar.gz"
15

  
16 15
LICENSE="Apache-2.0"
17 16
SLOT="0"
18
KEYWORDS="amd64 x86"
17
KEYWORDS="~amd64 ~x86"
18
IUSE="test"
19 19

  
20
CDEPEND="dev-java/${MY_PN}-buffer:0
21
	dev-java/${MY_PN}-common:0"
20
CDEPEND="~dev-java/${MY_PN}-buffer-${PV}:0
21
	~dev-java/${MY_PN}-common-${PV}:0"
22 22

  
23 23
RDEPEND=">=virtual/jre-1.7
24 24
	${CDEPEND}"
25 25

  
26 26
DEPEND=">=virtual/jdk-1.7
27
	${CDEPEND}"
27
	${CDEPEND}
28
	test? (
29
		dev-java/easymock:3.2
30
		dev-java/hamcrest-core:1.3
31
		dev-java/hamcrest-library:1.3
32
		dev-java/junit:4
33
		dev-java/mockito:0
34
		dev-java/objenesis:0
35
	)"
28 36

  
29 37
S="${WORKDIR}/${MY_PN}-${MY_P}.Final/${PN/${MY_PN}-}"
30

  
31
EANT_BUILD_TARGET="package"
32
EANT_GENTOO_CLASSPATH="${MY_PN}-buffer,${MY_PN}-common"
33
JAVA_ANT_REWRITE_CLASSPATH="true"
34
JAVA_ANT_ENCODING="UTF-8"
35

  
36
# error: package ch.qos.logback.classic does not exist
37
RESTRICT="test"
38
JAVA_SRC_DIR="src/main/java"
39
JAVA_GENTOO_CLASSPATH="${MY_PN}-buffer,${MY_PN}-common"
38 40

  
39 41
java_prepare() {
40
	cp "${FILESDIR}"/${P}-build.xml build.xml || die
42
	# Need to package "classic" component of logback.
43
	rm -v src/test/java/io/netty/channel/SingleThreadEventLoopTest.java || die
41 44
}
42 45

  
43
src_install() {
44
	java-pkg_newjar target/${MY_PN}-*.jar ${PN}.jar
46
src_test() {
47
	ewarn "If the hostname does not resolve to this system then these tests will"
48
	ewarn "fail. It is currently set to: $(uname -n)"
49

  
50
	cd src/test/java || die
51

  
52
	# --with-dependencies breaks while mockito needs hamcrest-core:0.
53
	local CP=".:${S}/${PN}.jar:$(java-pkg_getjars ${JAVA_GENTOO_CLASSPATH},easymock-3.2,hamcrest-core-1.3,hamcrest-library-1.3,junit-4,mockito,objenesis)"
54
	local TESTS=$(find * -name "*Test.java" ! -name "Abstract*" ! -name "Base*")
55
	TESTS="${TESTS//.java}"
56
	TESTS="${TESTS//\//.}"
45 57

  
46
	use doc && java-pkg_dojavadoc target/site/apidocs
47
	use source && java-pkg_dosrc src/main/java/*
58
	ejavac -cp "${CP}" -d . $(find * -name "*.java")
59
	ejunit4 -classpath "${CP}" ${TESTS}
48 60
}
Thank you!