summaryrefslogtreecommitdiff
path: root/dev-java/fec
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/fec')
-rw-r--r--dev-java/fec/Manifest1
-rw-r--r--dev-java/fec/fec-1.0.4-r4.ebuild68
2 files changed, 69 insertions, 0 deletions
diff --git a/dev-java/fec/Manifest b/dev-java/fec/Manifest
index 4f3b56a15341..18129d0a22db 100644
--- a/dev-java/fec/Manifest
+++ b/dev-java/fec/Manifest
@@ -4,4 +4,5 @@ AUX fec-1.0.4-remove-concurrent-util-imports.patch 3146 BLAKE2B 8716fcc73a5e1030
AUX fec-1.0.4-soname.patch 790 BLAKE2B 852ef6ec83d42a15bfb1d67b05364d15c3027a8579d5e90dab4dec4cc99273383d89f5d5174ec8a6e2ab3cb09986d3fd60f39aedec6ae2da3f893325f88756c4 SHA512 1586fc0408274fff7eb3ba2cd95cfac8a94dad9981e2e01e8e11642692d2a27068936b673364c9c2cc70ca848d364648a66c728dc41d85c605a25b7fe79e2ec3
DIST fec-1.0.4.tar.gz 449406 BLAKE2B 132bb87ff0da35b9a1830d014c46fb82209b344d159b88c6dbf36c706de668cdb2dfc10894690009e9a47f461100beaf9cf25ad1c75a3b18194e5499457bcb6b SHA512 0244de5e44ab108e921c6ca4cf341ce7b3ba807a76d24b768cfe3de71ffd525c9ebf389f9981e7eaa83fec301a65ba60ef4f51c5b3befa6c7af42b793d430343
EBUILD fec-1.0.4-r3.ebuild 1483 BLAKE2B 59340c027d79d5a9eaf0d1a4d6b6234396a8b113f8a8365b16148fdfdc90c34b4874a2b69eb00bebc6b52a58ad6d82a615557030dfb86714654b5a3f86056b42 SHA512 69c55282ec66e0bd2907408ec431e8650c2bdb116c4d2e906ac9caccd00f362e7001a450c4b675421cd0667f1aa627a37beacac5d6bd9dded92be3c071285eab
+EBUILD fec-1.0.4-r4.ebuild 1517 BLAKE2B 1b580e3a6f0b3a0032d6ba304d3314e7920d9a2dec5d7943aedb6a7f8913ab5910bda4d0e359a5890ab8b622633af270dc3c5477a23b34af27ec4da1541fa890 SHA512 41e0094963ffda6ce3bb31f4a02f27315fc333a2a4968c4155edb33bb316586d53d3fb6b0ee18d5a90b68fc18d98af18a949261e57dea71c070117e9c1c1fc98
MISC metadata.xml 435 BLAKE2B f15bf1cf8797a940aef17b1a72884aad2859be1790129554172bbeec7ea0e2f68da81c0e5362cc7d94302bb9090bc1d0960d608335bc1a88168a3607ccb0d191 SHA512 13f1c5f833c69547926d60f4f9325624db5e82ea9b01900b00d48b38079e0cd8b1d038f6a69d784d78fa3cafa6f23e7ce57b78812b91154e0850466c2daf2ab9
diff --git a/dev-java/fec/fec-1.0.4-r4.ebuild b/dev-java/fec/fec-1.0.4-r4.ebuild
new file mode 100644
index 000000000000..29f4fada481c
--- /dev/null
+++ b/dev-java/fec/fec-1.0.4-r4.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+JAVA_PKG_IUSE="doc source"
+
+inherit flag-o-matic toolchain-funcs java-pkg-2 java-ant-2
+
+DESCRIPTION="Forward Error Correction library in Java"
+HOMEPAGE="https://bitbucket.org/onionnetworks/"
+SRC_URI="https://dev.gentoo.org/~monsieurp/packages/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+CDEPEND="dev-java/log4j-12-api:2"
+
+RDEPEND="
+ ${CDEPEND}
+ >=virtual/jre-1.8:*"
+
+DEPEND="
+ ${CDEPEND}
+ >=virtual/jdk-1.8:*"
+
+PATCHES=(
+ "${FILESDIR}"/"${P}-libfec8path.patch"
+ "${FILESDIR}"/"${P}-build.patch"
+ "${FILESDIR}"/"${P}-soname.patch"
+ "${FILESDIR}"/"${P}-remove-concurrent-util-imports.patch"
+)
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+JAVA_ANT_CLASSPATH_TAGS="javac javadoc"
+EANT_GENTOO_CLASSPATH="log4j-12-api-2"
+EANT_BUILD_TARGET="jars"
+
+# There seems to be unit tests, but they are in such a state.
+RESTRICT="test"
+
+src_prepare() {
+ # Apply patches.
+ default
+
+ # In fact, we'll wipe tests altogether.
+ rm -rf tests || die
+
+ # Get rid of bundled jars.
+ java-pkg_clean
+}
+
+src_compile() {
+ java-pkg-2_src_compile
+ einfo "Sucessfully compiled Java classes!"
+
+ cd "${S}"/src/csrc || die
+ append-flags -fPIC
+ emake CC=$(tc-getCC) CFLAGS="${CFLAGS} $(java-pkg_get-jni-cflags)"
+ einfo "Sucessfully compiled C files!"
+}
+
+src_install() {
+ java-pkg_newjar "lib/onion-${PN}.jar" "${PN}.jar"
+ use doc && java-pkg_dojavadoc javadoc
+ use source && java-pkg_dosrc src/com
+ dolib.so src/csrc/libfec{8,16}.so
+}