1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 JAVA_PKG_IUSE="doc source"
7 inherit flag-o-matic toolchain-funcs java-pkg-2 java-ant-2
9 DESCRIPTION="Forward Error Correction library in Java"
10 HOMEPAGE="https://bitbucket.org/onionnetworks/"
11 SRC_URI="https://dev.gentoo.org/~monsieurp/packages/${P}.tar.gz"
18 CDEPEND="dev-java/log4j:0"
30 "${FILESDIR}"/"${P}-libfec8path.patch"
31 "${FILESDIR}"/"${P}-build.patch"
32 "${FILESDIR}"/"${P}-soname.patch"
33 "${FILESDIR}"/"${P}-remove-concurrent-util-imports.patch"
36 JAVA_ANT_REWRITE_CLASSPATH="yes"
37 EANT_GENTOO_CLASSPATH="log4j"
38 EANT_BUILD_TARGET="jars"
40 # There seems to be unit tests, but they are in such a state.
44 # In fact, we'll wipe tests altogether.
48 epatch "${PATCHES[@]}"
50 # Get rid of bundled jars.
55 java-pkg-2_src_compile
56 einfo "Sucessfully compiled Java classes!"
58 cd "${S}"/src/csrc || die
60 emake CC=$(tc-getCC) CFLAGS="${CFLAGS} $(java-pkg_get-jni-cflags)"
61 einfo "Sucessfully compiled C files!"
65 java-pkg_newjar "lib/onion-${PN}.jar" "${PN}.jar"
66 use doc && java-pkg_dojavadoc javadoc
67 use source && java-pkg_dosrc src/com
68 dolib.so src/csrc/libfec{8,16}.so