commit:     52753ef674d4ff3f90dd796375e80cc505550303
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 23 12:23:03 2021 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Sat Oct 23 12:24:24 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52753ef6

net-libs/NativeThread: added missing dep, switched to javac -h

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 .../NativeThread/NativeThread-0_pre20190914-r1.ebuild   | 17 ++++++++++++++---
 .../files/NativeThread-0_pre20190914-javah.patch        | 14 ++++++++++++++
 2 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/net-libs/NativeThread/NativeThread-0_pre20190914-r1.ebuild 
b/net-libs/NativeThread/NativeThread-0_pre20190914-r1.ebuild
index f0565f04c47..1156f64a3ad 100644
--- a/net-libs/NativeThread/NativeThread-0_pre20190914-r1.ebuild
+++ b/net-libs/NativeThread/NativeThread-0_pre20190914-r1.ebuild
@@ -13,12 +13,23 @@ LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
 
-DEPEND=">=net-p2p/freenet-0.7
-       virtual/jdk:1.8"
-RDEPEND="virtual/jre:1.8"
+CDEPEND="
+       dev-java/jna:4
+"
+DEPEND="net-p2p/freenet
+       >=virtual/jdk-1.8:*"
+RDEPEND=">=virtual/jre-1.8:*"
 
 S="${WORKDIR}"
 
+PATCHES=(
+       "${FILESDIR}/${P}-javah.patch"
+)
+
+src_prepare() {
+       default
+}
+
 src_compile() {
        append-flags -fPIC
        tc-export CC

diff --git a/net-libs/NativeThread/files/NativeThread-0_pre20190914-javah.patch 
b/net-libs/NativeThread/files/NativeThread-0_pre20190914-javah.patch
new file mode 100644
index 00000000000..ceefc8f36d7
--- /dev/null
+++ b/net-libs/NativeThread/files/NativeThread-0_pre20190914-javah.patch
@@ -0,0 +1,14 @@
+diff --git a/Makefile b/Makefile
+index 0a879d2..b0b45d1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -9,7 +9,8 @@ libNativeThread.so: NativeThread.c NativeThread.h
+       $(CC) $(CFLAGS) -o libNativeThread.so $(LDFLAGS) NativeThread.c $(LIBS)
+ 
+ NativeThread.h:
+-      javah -o NativeThread.h -classpath /usr/share/freenet/lib/freenet.jar 
freenet.support.io.NativeThread
++      javac -h . -classpath 
/usr/share/freenet/lib/freenet.jar:/usr/share/jna-4/lib/jna.jar:/usr/share/jna-4/lib/jna-platform.jar
 NativeThread.java
++      mv freenet_support_io_NativeThread_LinuxNativeThread.h NativeThread.h
+ 
+ clean:
+       rm -f NativeThread.h libNativeThread*.so

Reply via email to