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 2019-12-11 02:41:00.000000000 +0300
1
# Copyright 1999-2017 Gentoo Foundation
1
# Copyright 1999-2019 Gentoo Authors
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
RESTRICT="!test? ( test )"
19 20

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

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

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

  
29 38
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"
39
JAVA_SRC_DIR="src/main/java"
40
JAVA_GENTOO_CLASSPATH="${MY_PN}-buffer,${MY_PN}-common"
38 41

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

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

  
51
	cd src/test/java || die
52

  
53
	# --with-dependencies breaks while mockito needs hamcrest-core:0.
54
	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)"
55
	local TESTS=$(find * -name "*Test.java" ! -name "Abstract*" ! -name "Base*")
56
	TESTS="${TESTS//.java}"
57
	TESTS="${TESTS//\//.}"
45 58

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