summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2021-10-23 13:07:12 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2021-10-23 14:24:23 +0200
commit3bb9f5af93481804840b7730398b4cd0ff8c17be (patch)
tree6fc447477a533d5565406dcb4aaa1e21db01de95
parentdev-java/lzmajio: eapi7, min java 1.8 (diff)
downloadgentoo-3bb9f5af93481804840b7730398b4cd0ff8c17be.tar.gz
gentoo-3bb9f5af93481804840b7730398b4cd0ff8c17be.tar.bz2
gentoo-3bb9f5af93481804840b7730398b4cd0ff8c17be.zip
dev-java/fec: eapi7, min java 1.8
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
-rw-r--r--dev-java/fec/fec-1.0.4-r3.ebuild69
-rw-r--r--dev-java/fec/files/fec-1.0.4-build.patch4
-rw-r--r--dev-java/fec/files/fec-1.0.4-libfec8path.patch4
-rw-r--r--dev-java/fec/files/fec-1.0.4-remove-concurrent-util-imports.patch4
-rw-r--r--dev-java/fec/files/fec-1.0.4-soname.patch4
5 files changed, 77 insertions, 8 deletions
diff --git a/dev-java/fec/fec-1.0.4-r3.ebuild b/dev-java/fec/fec-1.0.4-r3.ebuild
new file mode 100644
index 000000000000..11b1f1df74fb
--- /dev/null
+++ b/dev-java/fec/fec-1.0.4-r3.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+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"
+IUSE=""
+
+CDEPEND="dev-java/log4j:0"
+
+RDEPEND="
+ ${CDEPEND}
+ >=virtual/jre-1.8:*"
+
+DEPEND="
+ ${CDEPEND}
+ >=virtual/jdk-1.8:*
+ app-arch/unzip"
+
+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"
+EANT_GENTOO_CLASSPATH="log4j"
+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
+}
diff --git a/dev-java/fec/files/fec-1.0.4-build.patch b/dev-java/fec/files/fec-1.0.4-build.patch
index c47eb5459045..bc776a23c825 100644
--- a/dev-java/fec/files/fec-1.0.4-build.patch
+++ b/dev-java/fec/files/fec-1.0.4-build.patch
@@ -1,5 +1,5 @@
---- src/csrc/Makefile.orig 2015-10-18 14:31:56.752486000 +0000
-+++ src/csrc/Makefile 2015-10-18 14:33:11.502486000 +0000
+--- a/src/csrc/Makefile.orig 2015-10-18 14:31:56.752486000 +0000
++++ b/src/csrc/Makefile 2015-10-18 14:33:11.502486000 +0000
@@ -28,11 +28,8 @@
-I$(JAVA_HOME)/include/linux fec-jinterf.c \
-o fec8-jinterf.o
diff --git a/dev-java/fec/files/fec-1.0.4-libfec8path.patch b/dev-java/fec/files/fec-1.0.4-libfec8path.patch
index 58eb89efb730..88333afd08fe 100644
--- a/dev-java/fec/files/fec-1.0.4-libfec8path.patch
+++ b/dev-java/fec/files/fec-1.0.4-libfec8path.patch
@@ -1,5 +1,5 @@
---- src/com/onionnetworks/fec/Native8Code.java.orig 2015-10-18 14:27:06.160486000 +0000
-+++ src/com/onionnetworks/fec/Native8Code.java 2015-10-18 14:30:32.557486000 +0000
+--- a/src/com/onionnetworks/fec/Native8Code.java.orig 2015-10-18 14:27:06.160486000 +0000
++++ b/src/com/onionnetworks/fec/Native8Code.java 2015-10-18 14:30:32.557486000 +0000
@@ -3,6 +3,7 @@
//import java.security.AccessController;
//import sun.security.action.*;
diff --git a/dev-java/fec/files/fec-1.0.4-remove-concurrent-util-imports.patch b/dev-java/fec/files/fec-1.0.4-remove-concurrent-util-imports.patch
index 87a9473ed937..ff4a583dfc7b 100644
--- a/dev-java/fec/files/fec-1.0.4-remove-concurrent-util-imports.patch
+++ b/dev-java/fec/files/fec-1.0.4-remove-concurrent-util-imports.patch
@@ -1,5 +1,5 @@
---- src/com/onionnetworks/fec/io/FECFile.java.orig 2015-10-18 15:38:26.000000000 +0000
-+++ src/com/onionnetworks/fec/io/FECFile.java 2015-10-18 16:06:51.159486000 +0000
+--- a/src/com/onionnetworks/fec/io/FECFile.java.orig 2015-10-18 15:38:26.000000000 +0000
++++ b/src/com/onionnetworks/fec/io/FECFile.java 2015-10-18 16:06:51.159486000 +0000
@@ -10,7 +10,9 @@
import com.onionnetworks.fec.FECCodeFactory;
import com.onionnetworks.io.RAF;
diff --git a/dev-java/fec/files/fec-1.0.4-soname.patch b/dev-java/fec/files/fec-1.0.4-soname.patch
index ae00449ced40..7309aa03b086 100644
--- a/dev-java/fec/files/fec-1.0.4-soname.patch
+++ b/dev-java/fec/files/fec-1.0.4-soname.patch
@@ -1,5 +1,5 @@
---- src/csrc/Makefile.bak 2010-02-27 00:51:38.000000000 +1300
-+++ src/csrc/Makefile 2010-02-27 00:56:06.000000000 +1300
+--- a/src/csrc/Makefile.bak 2010-02-27 00:51:38.000000000 +1300
++++ b/src/csrc/Makefile 2010-02-27 00:56:06.000000000 +1300
@@ -21,7 +21,8 @@
$(CC) $(CFLAGS) -DGF_BITS=8 -o fec fec8.o test.c