Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/fec/
Date: Thu, 24 Feb 2022 09:37:33
Message-Id: 1645695444.6a9f097fd330dbeabd61d6072e159c77b2202e7d.fordfrog@gentoo
1 commit: 6a9f097fd330dbeabd61d6072e159c77b2202e7d
2 Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
3 AuthorDate: Mon Dec 27 15:14:47 2021 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 24 09:37:24 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a9f097f
7
8 dev-java/fec: EAPI 8, switch to log4j-12-api:2
9
10 Closes: https://bugs.gentoo.org/830919
11 Package-Manager: Portage-3.0.28, Repoman-3.0.3
12 Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
13 Closes: https://github.com/gentoo/gentoo/pull/24106/commits/49b7cffc2fa2d91fb9dc424c5c44ba0874600ecc
14 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
15
16 dev-java/fec/fec-1.0.4-r4.ebuild | 68 ++++++++++++++++++++++++++++++++++++++++
17 1 file changed, 68 insertions(+)
18
19 diff --git a/dev-java/fec/fec-1.0.4-r4.ebuild b/dev-java/fec/fec-1.0.4-r4.ebuild
20 new file mode 100644
21 index 000000000000..29f4fada481c
22 --- /dev/null
23 +++ b/dev-java/fec/fec-1.0.4-r4.ebuild
24 @@ -0,0 +1,68 @@
25 +# Copyright 1999-2022 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=8
29 +JAVA_PKG_IUSE="doc source"
30 +
31 +inherit flag-o-matic toolchain-funcs java-pkg-2 java-ant-2
32 +
33 +DESCRIPTION="Forward Error Correction library in Java"
34 +HOMEPAGE="https://bitbucket.org/onionnetworks/"
35 +SRC_URI="https://dev.gentoo.org/~monsieurp/packages/${P}.tar.gz"
36 +
37 +LICENSE="BSD-2"
38 +SLOT="0"
39 +KEYWORDS="~amd64 ~x86"
40 +
41 +CDEPEND="dev-java/log4j-12-api:2"
42 +
43 +RDEPEND="
44 + ${CDEPEND}
45 + >=virtual/jre-1.8:*"
46 +
47 +DEPEND="
48 + ${CDEPEND}
49 + >=virtual/jdk-1.8:*"
50 +
51 +PATCHES=(
52 + "${FILESDIR}"/"${P}-libfec8path.patch"
53 + "${FILESDIR}"/"${P}-build.patch"
54 + "${FILESDIR}"/"${P}-soname.patch"
55 + "${FILESDIR}"/"${P}-remove-concurrent-util-imports.patch"
56 +)
57 +
58 +JAVA_ANT_REWRITE_CLASSPATH="yes"
59 +JAVA_ANT_CLASSPATH_TAGS="javac javadoc"
60 +EANT_GENTOO_CLASSPATH="log4j-12-api-2"
61 +EANT_BUILD_TARGET="jars"
62 +
63 +# There seems to be unit tests, but they are in such a state.
64 +RESTRICT="test"
65 +
66 +src_prepare() {
67 + # Apply patches.
68 + default
69 +
70 + # In fact, we'll wipe tests altogether.
71 + rm -rf tests || die
72 +
73 + # Get rid of bundled jars.
74 + java-pkg_clean
75 +}
76 +
77 +src_compile() {
78 + java-pkg-2_src_compile
79 + einfo "Sucessfully compiled Java classes!"
80 +
81 + cd "${S}"/src/csrc || die
82 + append-flags -fPIC
83 + emake CC=$(tc-getCC) CFLAGS="${CFLAGS} $(java-pkg_get-jni-cflags)"
84 + einfo "Sucessfully compiled C files!"
85 +}
86 +
87 +src_install() {
88 + java-pkg_newjar "lib/onion-${PN}.jar" "${PN}.jar"
89 + use doc && java-pkg_dojavadoc javadoc
90 + use source && java-pkg_dosrc src/com
91 + dolib.so src/csrc/libfec{8,16}.so
92 +}