1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 JAVA_PKG_IUSE="doc source"
8 inherit java-pkg-2 java-pkg-simple
12 DESCRIPTION="Async event-driven framework for high performance network applications"
13 HOMEPAGE="http://netty.io/"
14 SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/${MY_P}.Final.tar.gz"
17 KEYWORDS="~amd64 ~x86"
19 RESTRICT="!test? ( test )"
21 CDEPEND="~dev-java/${MY_PN}-buffer-${PV}:0
22 ~dev-java/${MY_PN}-common-${PV}:0"
24 RDEPEND=">=virtual/jre-1.7
27 DEPEND=">=virtual/jdk-1.7
31 dev-java/hamcrest-core:1.3
32 dev-java/hamcrest-library:1.3
38 S="${WORKDIR}/${MY_PN}-${MY_P}.Final/${PN/${MY_PN}-}"
39 JAVA_SRC_DIR="src/main/java"
40 JAVA_GENTOO_CLASSPATH="${MY_PN}-buffer,${MY_PN}-common"
43 # Need to package "classic" component of logback.
44 rm -v src/test/java/io/netty/channel/SingleThreadEventLoopTest.java || die
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)"
51 cd src/test/java || die
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//\//.}"
59 ejavac -cp "${CP}" -d . $(find * -name "*.java")
60 ejunit4 -classpath "${CP}" ${TESTS}