summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-vpn/i2p')
-rw-r--r--net-vpn/i2p/Manifest3
-rw-r--r--net-vpn/i2p/files/2.6.0-force-gentoo-classpath.patch291
-rw-r--r--net-vpn/i2p/files/2.7.0-force-gentoo-classpath.patch291
-rw-r--r--net-vpn/i2p/files/fix-junit-classpath.patch112
-rw-r--r--net-vpn/i2p/i2p-2.6.0.ebuild (renamed from net-vpn/i2p/i2p-2.5.2-r1.ebuild)79
-rw-r--r--net-vpn/i2p/i2p-2.7.0.ebuild262
6 files changed, 893 insertions, 145 deletions
diff --git a/net-vpn/i2p/Manifest b/net-vpn/i2p/Manifest
index 64b2a9814809..7b2ef9174382 100644
--- a/net-vpn/i2p/Manifest
+++ b/net-vpn/i2p/Manifest
@@ -1 +1,2 @@
-DIST i2psource_2.5.2.tar.bz2 33791390 BLAKE2B ceb74d4dd1c694aa174d9861615f5765f5620a803a5bd8b30eb8f986b2855a70e38c90899ed655f5cb65af5dde1a9572d4bb4ad5d244e5a62805a81325bf8419 SHA512 92ee39fb75b8b3bc4a06ea04831d2267d0fcd52a250eaa5b162f3c1e2c29207a51dcbafe4eab4fcfa87b21317201911d5bdafc118f5493c98bb86d0513fc9c88
+DIST i2psource_2.6.0.tar.bz2 33486530 BLAKE2B c9a39f4700c590a4e9e6ba621f24d1b6b181e6e69433493259bd59113231c2023c506419298ae6ed158808c0a45bed91038ab92c96147973ec947a787f91f56c SHA512 fdabd15084d0f66474d70e4786951be31e7a0fb4bf8094cd1a442beebd3c81d5f00d88ddc4b79b79d1494e2ad469c2b8028279e1259cd80a6ba68b6265d1be2e
+DIST i2psource_2.7.0.tar.bz2 33683394 BLAKE2B aa3505b2bcd402e8d2d8bae4955e1cbd52939e5a3bb567ef4e918f895021489fd7dc0663f86f1cf6a998105cc3e0296971bac22ec04348fa4aa392f23dd28560 SHA512 a216ca91351bbdef7844376f8d77686a48f3b0ab72a3b446866f788035f652badb19e7e123586f47adf5befc4cc295b4395def94971065068c7f487ed1111643
diff --git a/net-vpn/i2p/files/2.6.0-force-gentoo-classpath.patch b/net-vpn/i2p/files/2.6.0-force-gentoo-classpath.patch
new file mode 100644
index 000000000000..e0be1a1926f6
--- /dev/null
+++ b/net-vpn/i2p/files/2.6.0-force-gentoo-classpath.patch
@@ -0,0 +1,291 @@
+commit 0d7543a63f99fb1713274fd8619d0d7285f68727
+Author: tharvik <tharvik@users.noreply.github.com>
+Date: Sat Aug 17 13:56:51 2024 +0200
+
+ add gentoo.classpath
+
+diff --git a/apps/i2pcontrol/build.xml b/apps/i2pcontrol/build.xml
+index c350b0b73..db73702f4 100644
+--- a/apps/i2pcontrol/build.xml
++++ b/apps/i2pcontrol/build.xml
+@@ -24,6 +24,7 @@
+ <pathelement location="${wrapperlib}/wrapper.jar" />
+ <!-- following jar only present for debian builds -->
+ <pathelement location="../../core/java/build/json-simple.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </path>
+
+ <path id="cpSocket">
+@@ -33,6 +34,7 @@
+ <pathelement location="${wrapperlib}/wrapper.jar" />
+ <!-- following jar only present for debian builds -->
+ <pathelement location="../../core/java/build/json-simple.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </path>
+
+ <target name="all" depends="clean, build" />
+diff --git a/apps/i2psnark/java/build.xml b/apps/i2psnark/java/build.xml
+index 7033fccff..6701a4f47 100644
+--- a/apps/i2psnark/java/build.xml
++++ b/apps/i2psnark/java/build.xml
+@@ -63,6 +63,7 @@
+ <pathelement location="../../jetty/jettylib/org.mortbay.jetty.jar" />
+ <pathelement location="../../jetty/jettylib/jetty-util.jar" />
+ <pathelement location="../../desktopgui/dist/desktopgui.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ </javac>
+ </target>
+diff --git a/apps/i2ptunnel/java/build.xml b/apps/i2ptunnel/java/build.xml
+index fc40aa32b..91725ab16 100644
+--- a/apps/i2ptunnel/java/build.xml
++++ b/apps/i2ptunnel/java/build.xml
+@@ -45,7 +45,7 @@
+ destdir="./build/obj"
+ includeAntRuntime="false"
+ encoding="UTF-8"
+- classpath="../../../core/java/build/i2p.jar:../../../core/java/build/gnu-getopt.jar:../../ministreaming/java/build/mstreaming.jar" >
++ classpath="../../../core/java/build/i2p.jar:../../../core/java/build/gnu-getopt.jar:../../ministreaming/java/build/mstreaming.jar:${gentoo.classpath}" >
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+ </target>
+@@ -373,6 +373,7 @@
+ <!-- required for multipart form handling in register.jsp -->
+ <pathelement location="../../jetty/jettylib/jetty-i2p.jar" />
+ <pathelement location="../../jetty/jettylib/jspc.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <arg value="-d" />
+ <arg value="../jsp/WEB-INF/classes" />
+@@ -410,6 +411,7 @@
+ <pathelement location="../../../core/java/build/i2p.jar" />
+ <!-- required for multipart form handling in register.jsp -->
+ <pathelement location="../../jetty/jettylib/jetty-i2p.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ </javac>
+ <copy file="../jsp/web.xml" tofile="../jsp/web-out.xml" />
+@@ -477,6 +479,7 @@
+ <pathelement location="../../ministreaming/java/build/mstreaming.jar" />
+ <pathelement location="../../streaming/java/build/streaming.jar" />
+ <pathelement location="${junit.home}/junit4.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <batchtest>
+ <fileset dir="./test/junit/">
+diff --git a/apps/imagegen/imagegen/build.xml b/apps/imagegen/imagegen/build.xml
+index ea55c2c7e..83d17e36c 100644
+--- a/apps/imagegen/imagegen/build.xml
++++ b/apps/imagegen/imagegen/build.xml
+@@ -8,6 +8,7 @@
+ <pathelement location="../identicon/build/identicon.jar" />
+ <pathelement location="../zxing/build/zxing.jar" />
+ <pathelement location="../../../build/i2p.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </path>
+
+ <target name="all" depends="war" />
+diff --git a/apps/jetty/build.xml b/apps/jetty/build.xml
+index 3eed66acf..79d664ca9 100644
+--- a/apps/jetty/build.xml
++++ b/apps/jetty/build.xml
+@@ -418,6 +418,7 @@
+ <pathelement location="./jettylib/org.mortbay.jetty.jar" />
+ <!-- following jar only present for debian builds -->
+ <pathelement location="./jettylib/tomcat-api.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+diff --git a/apps/ministreaming/java/build.xml b/apps/ministreaming/java/build.xml
+index 7e589cb81..387c09eae 100644
+--- a/apps/ministreaming/java/build.xml
++++ b/apps/ministreaming/java/build.xml
+@@ -262,6 +262,7 @@
+ <pathelement location="${mockito.home}/byte-buddy.jar" />
+ <pathelement location="${mockito.home}/objenesis.jar" />
+ <pathelement location="${mockito.home}/mockito-core.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+@@ -326,6 +327,7 @@
+ <pathelement location="../../build/jbigi.jar" />
+ <pathelement location="${with.clover}" />
+ <pathelement location="${with.cobertura}" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <batchtest todir="../../../reports/ministreaming/junit/">
+ <fileset dir="./test/junit">
+diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml
+index 3f9c7ba4b..abcac8aec 100644
+--- a/apps/routerconsole/java/build.xml
++++ b/apps/routerconsole/java/build.xml
+@@ -88,6 +88,7 @@
+ <!-- following jars only present for debian builds -->
+ <pathelement location="../../jetty/jettylib/tomcat-api.jar" />
+ <pathelement location="../../../core/java/build/json-simple.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ </javac>
+ </target>
+@@ -499,6 +500,7 @@
+ <pathelement location="build/obj/" />
+ <pathelement location="../../../router/java/build/router.jar" />
+ <pathelement location="../../../core/java/build/i2p.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <arg value="-d" />
+ <arg value="../jsp/WEB-INF/classes" />
+@@ -539,6 +541,7 @@
+ <pathelement location="build/obj/" />
+ <pathelement location="../../../router/java/build/router.jar" />
+ <pathelement location="../../../core/java/build/i2p.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ </javac>
+
+diff --git a/apps/sam/java/build.xml b/apps/sam/java/build.xml
+index bd5782b73..d0c12b334 100644
+--- a/apps/sam/java/build.xml
++++ b/apps/sam/java/build.xml
+@@ -18,6 +18,7 @@
+ <pathelement location="../../../core/java/build/obj" />
+ <pathelement location="../../../core/java/build/gnu-getopt.jar" />
+ <pathelement location="../../ministreaming/java/build/obj" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ </depend>
+ </target>
+@@ -39,7 +40,7 @@
+ includeAntRuntime="false"
+ encoding="UTF-8"
+ destdir="./build/obj"
+- classpath="../../../core/java/build/i2p.jar:../../../core/java/build/gnu-getopt.jar:../../ministreaming/java/build/mstreaming.jar" >
++ classpath="../../../core/java/build/i2p.jar:../../../core/java/build/gnu-getopt.jar:../../ministreaming/java/build/mstreaming.jar:${gentoo.classpath}" >
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+ </target>
+diff --git a/apps/streaming/java/build.xml b/apps/streaming/java/build.xml
+index ecfa0ebfd..690b456de 100644
+--- a/apps/streaming/java/build.xml
++++ b/apps/streaming/java/build.xml
+@@ -76,6 +76,7 @@
+ <pathelement location="${mockito.home}/byte-buddy.jar" />
+ <pathelement location="${mockito.home}/objenesis.jar" />
+ <pathelement location="${mockito.home}/mockito-core.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+@@ -143,6 +144,7 @@
+ <pathelement location="../../build/jbigi.jar" />
+ <pathelement location="${with.clover}" />
+ <pathelement location="${with.cobertura}" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <batchtest todir="../../../reports/streaming/junit/">
+ <fileset dir="./test/junit">
+diff --git a/apps/susidns/src/build.xml b/apps/susidns/src/build.xml
+index 801881118..2d34278e9 100644
+--- a/apps/susidns/src/build.xml
++++ b/apps/susidns/src/build.xml
+@@ -35,6 +35,7 @@
+ <pathelement location="${ant.home}/lib/ant.jar" />
+ <pathelement location="../../../core/java/build/i2p.jar" />
+ <pathelement location="../../addressbook/dist/addressbook.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </path>
+
+ <property name="javac.compilerargs" value="" />
+diff --git a/apps/susimail/build.xml b/apps/susimail/build.xml
+index a8c8cfffa..098b911db 100644
+--- a/apps/susimail/build.xml
++++ b/apps/susimail/build.xml
+@@ -53,6 +53,7 @@
+ <!-- tomcat-api.jar only present for debian builds -->
+ <pathelement location="../jetty/jettylib/tomcat-api.jar" />
+ <pathelement location="../jetty/jettylib/jetty-i2p.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ </javac>
+ </target>
+diff --git a/core/java/build.xml b/core/java/build.xml
+index be590b093..4dc18c711 100644
+--- a/core/java/build.xml
++++ b/core/java/build.xml
+@@ -72,7 +72,7 @@
+ debuglevel="lines,vars,source"
+ includeAntRuntime="false"
+ encoding="UTF-8"
+- destdir="./build/obj" classpath="${javac.classpath.mod}" >
++ destdir="./build/obj" classpath="${javac.classpath.mod}:${gentoo.classpath}" >
+ <compilerarg line="${javac.compilerargs}" />
+ <include name="**/*.java" />
+ <exclude name="${source.exclude1}" />
+@@ -284,6 +284,7 @@
+ <pathelement location="${scalactic.jar}" />
+ <pathelement location="${scalatest.jar}" />
+ <pathelement location="./build/obj" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ </scalac>
+ </target>
+@@ -319,6 +320,7 @@
+ <pathelement location="${mockito.home}/objenesis.jar" />
+ <pathelement location="${mockito.home}/mockito-core.jar" />
+ <pathelement location="${junit.home}/junit4.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+@@ -485,6 +487,7 @@
+ <pathelement location="../../build/jbigi.jar" />
+ <pathelement location="${with.clover}" />
+ <pathelement location="${with.cobertura}" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <batchtest todir="../../reports/core/junit/">
+ <fileset dir="./test/junit/">
+diff --git a/installer/tools/java/build.xml b/installer/tools/java/build.xml
+index 51c45cebf..81b0f6f26 100644
+--- a/installer/tools/java/build.xml
++++ b/installer/tools/java/build.xml
+@@ -29,7 +29,7 @@
+ release="${javac.release}"
+ includeAntRuntime="false"
+ encoding="UTF-8"
+- destdir="./build/obj" classpath="${javac.classpath}:../../../build/i2p.jar:../../../core/java/build/gnu-getopt.jar:../../../build/router.jar" >
++ destdir="./build/obj" classpath="${javac.classpath}:../../../build/i2p.jar:../../../core/java/build/gnu-getopt.jar:../../../build/router.jar:${gentoo.classpath}" >
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+ </target>
+diff --git a/router/java/build.xml b/router/java/build.xml
+index 34cf4c1f7..0b0833e38 100644
+--- a/router/java/build.xml
++++ b/router/java/build.xml
+@@ -48,7 +48,7 @@
+ debuglevel="lines,vars,source"
+ includeAntRuntime="false"
+ encoding="UTF-8"
+- destdir="./build/obj" classpath="../../core/java/build/obj:../../core/java/build/i2p.jar:../../core/java/build/gnu-getopt.jar:../../core/java/build/httpclient.jar:../../core/java/build/httpcore.jar" >
++ destdir="./build/obj" classpath="../../core/java/build/obj:../../core/java/build/i2p.jar:../../core/java/build/gnu-getopt.jar:../../core/java/build/httpclient.jar:../../core/java/build/httpcore.jar:${gentoo.classpath}" >
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+ </target>
+@@ -285,6 +285,7 @@
+ <pathelement location="${hamcrest.home}/hamcrest-all.jar" />
+ <pathelement location="${junit.home}/junit4.jar" />
+ <pathelement location="../../core/java/build/i2ptest.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+@@ -431,6 +432,7 @@
+ <pathelement location="../../build/jbigi.jar" />
+ <pathelement location="${with.clover}" />
+ <pathelement location="${with.cobertura}" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <batchtest todir="../../reports/router/junit/">
+ <fileset dir="./test/junit">
diff --git a/net-vpn/i2p/files/2.7.0-force-gentoo-classpath.patch b/net-vpn/i2p/files/2.7.0-force-gentoo-classpath.patch
new file mode 100644
index 000000000000..e56f6e5fe7e9
--- /dev/null
+++ b/net-vpn/i2p/files/2.7.0-force-gentoo-classpath.patch
@@ -0,0 +1,291 @@
+commit 3b6350edbace1e84b5f196523f2f7ba1b00544fa
+Author: tharvik <tharvik@users.noreply.github.com>
+Date: Sat Aug 17 13:56:51 2024 +0200
+
+ add gentoo.classpath
+
+diff --git a/apps/i2pcontrol/build.xml b/apps/i2pcontrol/build.xml
+index d3e4883da..e1e59c498 100644
+--- a/apps/i2pcontrol/build.xml
++++ b/apps/i2pcontrol/build.xml
+@@ -24,6 +24,7 @@
+ <pathelement location="${wrapperlib}/wrapper.jar" />
+ <!-- following jar only present for debian builds -->
+ <pathelement location="../../core/java/build/json-simple.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </path>
+
+ <path id="cpSocket">
+@@ -33,6 +34,7 @@
+ <pathelement location="${wrapperlib}/wrapper.jar" />
+ <!-- following jar only present for debian builds -->
+ <pathelement location="../../core/java/build/json-simple.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </path>
+
+ <target name="all" depends="clean, build" />
+diff --git a/apps/i2psnark/java/build.xml b/apps/i2psnark/java/build.xml
+index 3346039ad..b49381b6b 100644
+--- a/apps/i2psnark/java/build.xml
++++ b/apps/i2psnark/java/build.xml
+@@ -63,6 +63,7 @@
+ <pathelement location="../../jetty/jettylib/org.mortbay.jetty.jar" />
+ <pathelement location="../../jetty/jettylib/jetty-util.jar" />
+ <pathelement location="../../desktopgui/dist/desktopgui.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ </javac>
+ </target>
+diff --git a/apps/i2ptunnel/java/build.xml b/apps/i2ptunnel/java/build.xml
+index 9d35edadf..45ef995d9 100644
+--- a/apps/i2ptunnel/java/build.xml
++++ b/apps/i2ptunnel/java/build.xml
+@@ -45,7 +45,7 @@
+ destdir="./build/obj"
+ includeAntRuntime="false"
+ encoding="UTF-8"
+- classpath="../../../core/java/build/i2p.jar:../../../core/java/build/gnu-getopt.jar:../../ministreaming/java/build/mstreaming.jar" >
++ classpath="../../../core/java/build/i2p.jar:../../../core/java/build/gnu-getopt.jar:../../ministreaming/java/build/mstreaming.jar:${gentoo.classpath}" >
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+ </target>
+@@ -373,6 +373,7 @@
+ <!-- required for multipart form handling in register.jsp -->
+ <pathelement location="../../jetty/jettylib/jetty-i2p.jar" />
+ <pathelement location="../../jetty/jettylib/jspc.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <arg value="-d" />
+ <arg value="../jsp/WEB-INF/classes" />
+@@ -410,6 +411,7 @@
+ <pathelement location="../../../core/java/build/i2p.jar" />
+ <!-- required for multipart form handling in register.jsp -->
+ <pathelement location="../../jetty/jettylib/jetty-i2p.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ </javac>
+ <copy file="../jsp/web.xml" tofile="../jsp/web-out.xml" />
+@@ -477,6 +479,7 @@
+ <pathelement location="../../ministreaming/java/build/mstreaming.jar" />
+ <pathelement location="../../streaming/java/build/streaming.jar" />
+ <pathelement location="${junit.home}/junit4.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <batchtest>
+ <fileset dir="./test/junit/">
+diff --git a/apps/imagegen/imagegen/build.xml b/apps/imagegen/imagegen/build.xml
+index 39252ef8b..6193ff129 100644
+--- a/apps/imagegen/imagegen/build.xml
++++ b/apps/imagegen/imagegen/build.xml
+@@ -9,6 +9,7 @@
+ <pathelement location="../zxing/build/zxing.jar" />
+ <pathelement location="../../../build/i2p.jar" />
+ <pathelement location="../../../build/jrobin.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </path>
+
+ <target name="all" depends="war" />
+diff --git a/apps/jetty/build.xml b/apps/jetty/build.xml
+index 866bc1dd9..7c76ab341 100644
+--- a/apps/jetty/build.xml
++++ b/apps/jetty/build.xml
+@@ -418,6 +418,7 @@
+ <pathelement location="./jettylib/org.mortbay.jetty.jar" />
+ <!-- following jar only present for debian builds -->
+ <pathelement location="./jettylib/tomcat-api.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+diff --git a/apps/ministreaming/java/build.xml b/apps/ministreaming/java/build.xml
+index 72944b25c..74cfa9b96 100644
+--- a/apps/ministreaming/java/build.xml
++++ b/apps/ministreaming/java/build.xml
+@@ -262,6 +262,7 @@
+ <pathelement location="${mockito.home}/byte-buddy.jar" />
+ <pathelement location="${mockito.home}/objenesis.jar" />
+ <pathelement location="${mockito.home}/mockito-core.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+@@ -326,6 +327,7 @@
+ <pathelement location="../../build/jbigi.jar" />
+ <pathelement location="${with.clover}" />
+ <pathelement location="${with.cobertura}" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <batchtest todir="../../../reports/ministreaming/junit/">
+ <fileset dir="./test/junit">
+diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml
+index 37ab0403a..c22f0e986 100644
+--- a/apps/routerconsole/java/build.xml
++++ b/apps/routerconsole/java/build.xml
+@@ -88,6 +88,7 @@
+ <!-- following jars only present for debian builds -->
+ <pathelement location="../../jetty/jettylib/tomcat-api.jar" />
+ <pathelement location="../../../core/java/build/json-simple.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ </javac>
+ </target>
+@@ -499,6 +500,7 @@
+ <pathelement location="build/obj/" />
+ <pathelement location="../../../router/java/build/router.jar" />
+ <pathelement location="../../../core/java/build/i2p.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <arg value="-d" />
+ <arg value="../jsp/WEB-INF/classes" />
+@@ -539,6 +541,7 @@
+ <pathelement location="build/obj/" />
+ <pathelement location="../../../router/java/build/router.jar" />
+ <pathelement location="../../../core/java/build/i2p.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ </javac>
+
+diff --git a/apps/sam/java/build.xml b/apps/sam/java/build.xml
+index 89233a415..24c84ab08 100644
+--- a/apps/sam/java/build.xml
++++ b/apps/sam/java/build.xml
+@@ -18,6 +18,7 @@
+ <pathelement location="../../../core/java/build/obj" />
+ <pathelement location="../../../core/java/build/gnu-getopt.jar" />
+ <pathelement location="../../ministreaming/java/build/obj" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ </depend>
+ </target>
+@@ -38,7 +38,7 @@
+ includeAntRuntime="false"
+ encoding="UTF-8"
+ destdir="./build/obj"
+- classpath="../../../core/java/build/i2p.jar:../../../core/java/build/gnu-getopt.jar:../../ministreaming/java/build/mstreaming.jar" >
++ classpath="../../../core/java/build/i2p.jar:../../../core/java/build/gnu-getopt.jar:../../ministreaming/java/build/mstreaming.jar:${gentoo.classpath}" >
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+ </target>
+diff --git a/apps/streaming/java/build.xml b/apps/streaming/java/build.xml
+index ecfa0ebfd..690b456de 100644
+--- a/apps/streaming/java/build.xml
++++ b/apps/streaming/java/build.xml
+@@ -76,6 +76,7 @@
+ <pathelement location="${mockito.home}/byte-buddy.jar" />
+ <pathelement location="${mockito.home}/objenesis.jar" />
+ <pathelement location="${mockito.home}/mockito-core.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+@@ -143,6 +144,7 @@
+ <pathelement location="../../build/jbigi.jar" />
+ <pathelement location="${with.clover}" />
+ <pathelement location="${with.cobertura}" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <batchtest todir="../../../reports/streaming/junit/">
+ <fileset dir="./test/junit">
+diff --git a/apps/susidns/src/build.xml b/apps/susidns/src/build.xml
+index b89a51b20..af68f5cda 100644
+--- a/apps/susidns/src/build.xml
++++ b/apps/susidns/src/build.xml
+@@ -35,6 +35,7 @@
+ <pathelement location="${ant.home}/lib/ant.jar" />
+ <pathelement location="../../../core/java/build/i2p.jar" />
+ <pathelement location="../../addressbook/dist/addressbook.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </path>
+
+ <property name="javac.compilerargs" value="" />
+diff --git a/apps/susimail/build.xml b/apps/susimail/build.xml
+index e88fb3f27..4ab1a8736 100644
+--- a/apps/susimail/build.xml
++++ b/apps/susimail/build.xml
+@@ -53,6 +53,7 @@
+ <!-- tomcat-api.jar only present for debian builds -->
+ <pathelement location="../jetty/jettylib/tomcat-api.jar" />
+ <pathelement location="../jetty/jettylib/jetty-i2p.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ </javac>
+ </target>
+diff --git a/core/java/build.xml b/core/java/build.xml
+index 8b36ce5f0..53e4b9453 100644
+--- a/core/java/build.xml
++++ b/core/java/build.xml
+@@ -72,7 +72,7 @@
+ debuglevel="lines,vars,source"
+ includeAntRuntime="false"
+ encoding="UTF-8"
+- destdir="./build/obj" classpath="${javac.classpath.mod}" >
++ destdir="./build/obj" classpath="${javac.classpath.mod}:${gentoo.classpath}" >
+ <compilerarg line="${javac.compilerargs}" />
+ <include name="**/*.java" />
+ <exclude name="${source.exclude1}" />
+@@ -284,6 +284,7 @@
+ <pathelement location="${scalactic.jar}" />
+ <pathelement location="${scalatest.jar}" />
+ <pathelement location="./build/obj" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ </scalac>
+ </target>
+@@ -319,6 +320,7 @@
+ <pathelement location="${mockito.home}/objenesis.jar" />
+ <pathelement location="${mockito.home}/mockito-core.jar" />
+ <pathelement location="${junit.home}/junit4.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+@@ -485,6 +487,7 @@
+ <pathelement location="../../build/jbigi.jar" />
+ <pathelement location="${with.clover}" />
+ <pathelement location="${with.cobertura}" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <batchtest todir="../../reports/core/junit/">
+ <fileset dir="./test/junit/">
+diff --git a/installer/tools/java/build.xml b/installer/tools/java/build.xml
+index 51c45cebf..81b0f6f26 100644
+--- a/installer/tools/java/build.xml
++++ b/installer/tools/java/build.xml
+@@ -29,7 +29,7 @@
+ release="${javac.release}"
+ includeAntRuntime="false"
+ encoding="UTF-8"
+- destdir="./build/obj" classpath="${javac.classpath}:../../../build/i2p.jar:../../../core/java/build/gnu-getopt.jar:../../../build/router.jar" >
++ destdir="./build/obj" classpath="${javac.classpath}:../../../build/i2p.jar:../../../core/java/build/gnu-getopt.jar:../../../build/router.jar:${gentoo.classpath}" >
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+ </target>
+diff --git a/router/java/build.xml b/router/java/build.xml
+index 4b0cedf2b..68f857214 100644
+--- a/router/java/build.xml
++++ b/router/java/build.xml
+@@ -48,7 +48,7 @@
+ debuglevel="lines,vars,source"
+ includeAntRuntime="false"
+ encoding="UTF-8"
+- destdir="./build/obj" classpath="../../core/java/build/obj:../../core/java/build/i2p.jar:../../core/java/build/gnu-getopt.jar:../../core/java/build/httpclient.jar:../../core/java/build/httpcore.jar" >
++ destdir="./build/obj" classpath="../../core/java/build/obj:../../core/java/build/i2p.jar:../../core/java/build/gnu-getopt.jar:../../core/java/build/httpclient.jar:../../core/java/build/httpcore.jar:${gentoo.classpath}" >
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+ </target>
+@@ -285,6 +285,7 @@
+ <pathelement location="${hamcrest.home}/hamcrest-all.jar" />
+ <pathelement location="${junit.home}/junit4.jar" />
+ <pathelement location="../../core/java/build/i2ptest.jar" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <compilerarg line="${javac.compilerargs}" />
+ </javac>
+@@ -431,6 +432,7 @@
+ <pathelement location="../../build/jbigi.jar" />
+ <pathelement location="${with.clover}" />
+ <pathelement location="${with.cobertura}" />
++ <pathelement path="${gentoo.classpath}" />
+ </classpath>
+ <batchtest todir="../../reports/router/junit/">
+ <fileset dir="./test/junit">
diff --git a/net-vpn/i2p/files/fix-junit-classpath.patch b/net-vpn/i2p/files/fix-junit-classpath.patch
deleted file mode 100644
index 15a87e2681f6..000000000000
--- a/net-vpn/i2p/files/fix-junit-classpath.patch
+++ /dev/null
@@ -1,112 +0,0 @@
---- a/apps/i2ptunnel/java/build.xml
-+++ b/apps/i2ptunnel/java/build.xml
-@@ -465,7 +465,7 @@
- <target name="test" depends="clean, compileTest">
- <junit printsummary="on" fork="yes">
- <classpath>
-- <pathelement path="${classpath}" />
-+ <pathelement path="${gentoo.classpath}" />
- <pathelement location="./build/obj" />
- <pathelement location="../../../core/java/build/i2p.jar" />
- </classpath>
---- a/apps/ministreaming/java/build.xml
-+++ b/apps/ministreaming/java/build.xml
-@@ -310,22 +310,12 @@
- <junit printsummary="withOutAndErr" fork="yes" showoutput="yes" >
- <sysproperty key="net.sourceforge.cobertura.datafile" file="./cobertura.ser" />
- <classpath>
-- <pathelement path="${javac.classpath}" />
-- <pathelement location="${hamcrest.home}/hamcrest-core.jar" />
-- <pathelement location="${hamcrest.home}/hamcrest-library.jar" />
-- <pathelement location="${hamcrest.home}/hamcrest-integration.jar" />
-- <pathelement location="${hamcrest.home}/hamcrest-all.jar" />
-- <pathelement location="${mockito.home}/byte-buddy.jar" />
-- <pathelement location="${mockito.home}/objenesis.jar" />
-- <pathelement location="${mockito.home}/mockito-core.jar" />
-- <pathelement location="${junit.home}/junit4.jar" />
-+ <pathelement path="${gentoo.classpath}" />
- <pathelement location="./build/obj_cobertura" />
- <pathelement location="./build/obj" />
- <pathelement location="../../../core/java/build/i2ptest.jar" />
- <pathelement location="../../../core/java/build/i2p.jar" />
- <pathelement location="../../build/jbigi.jar" />
-- <pathelement location="${with.clover}" />
-- <pathelement location="${with.cobertura}" />
- </classpath>
- <batchtest todir="../../../reports/ministreaming/junit/">
- <fileset dir="./test/junit">
---- a/apps/streaming/java/build.xml
-+++ b/apps/streaming/java/build.xml
-@@ -126,23 +126,13 @@
- <junit printsummary="withOutAndErr" fork="yes" showoutput="yes" >
- <sysproperty key="net.sourceforge.cobertura.datafile" file="./cobertura.ser" />
- <classpath>
-- <pathelement path="${javac.classpath}" />
-- <pathelement location="${hamcrest.home}/hamcrest-core.jar" />
-- <pathelement location="${hamcrest.home}/hamcrest-library.jar" />
-- <pathelement location="${hamcrest.home}/hamcrest-integration.jar" />
-- <pathelement location="${hamcrest.home}/hamcrest-all.jar" />
-- <pathelement location="${mockito.home}/byte-buddy.jar" />
-- <pathelement location="${mockito.home}/objenesis.jar" />
-- <pathelement location="${mockito.home}/mockito-core.jar" />
-- <pathelement location="${junit.home}/junit4.jar" />
-+ <pathelement path="${gentoo.classpath}" />
- <pathelement location="./build/obj_cobertura" />
- <pathelement location="./build/obj" />
- <pathelement location="../../../core/java/build/i2ptest.jar" />
- <pathelement location="../../../core/java/build/i2p.jar" />
- <pathelement location="../../ministreaming/java/build/mstreaming.jar" />
- <pathelement location="../../build/jbigi.jar" />
-- <pathelement location="${with.clover}" />
-- <pathelement location="${with.cobertura}" />
- </classpath>
- <batchtest todir="../../../reports/streaming/junit/">
- <fileset dir="./test/junit">
---- a/core/java/build.xml
-+++ b/core/java/build.xml
-@@ -469,22 +469,12 @@
- <junit printsummary="withOutAndErr" fork="yes" maxmemory="384m" showoutput="yes" >
- <sysproperty key="net.sourceforge.cobertura.datafile" file="./cobertura.ser" />
- <classpath>
-+ <pathelement path="${gentoo.classpath}" />
- <pathelement location="../../installer/resources/" />
-- <pathelement path="${javac.classpath.mod}" />
-- <pathelement location="${hamcrest.home}/hamcrest-core.jar" />
-- <pathelement location="${hamcrest.home}/hamcrest-library.jar" />
-- <pathelement location="${hamcrest.home}/hamcrest-integration.jar" />
-- <pathelement location="${hamcrest.home}/hamcrest-all.jar" />
-- <pathelement location="${mockito.home}/byte-buddy.jar" />
-- <pathelement location="${mockito.home}/objenesis.jar" />
-- <pathelement location="${mockito.home}/mockito-core.jar" />
-- <pathelement location="${junit.home}/junit4.jar" />
- <pathelement location="./build/obj_cobertura" />
- <pathelement location="./build/obj" />
- <pathelement location="./test/resources" />
- <pathelement location="../../build/jbigi.jar" />
-- <pathelement location="${with.clover}" />
-- <pathelement location="${with.cobertura}" />
- </classpath>
- <batchtest todir="../../reports/core/junit/">
- <fileset dir="./test/junit/">
---- a/router/java/build.xml
-+++ b/router/java/build.xml
-@@ -419,18 +419,11 @@
- <junit printsummary="withOutAndErr" fork="yes" showoutput="yes" >
- <sysproperty key="net.sourceforge.cobertura.datafile" file="./cobertura.ser" />
- <classpath>
-- <pathelement path="${javac.classpath}" />
-- <pathelement location="${hamcrest.home}/hamcrest-core.jar" />
-- <pathelement location="${hamcrest.home}/hamcrest-library.jar" />
-- <pathelement location="${hamcrest.home}/hamcrest-integration.jar" />
-- <pathelement location="${hamcrest.home}/hamcrest-all.jar" />
-- <pathelement location="${junit.home}/junit4.jar" />
-+ <pathelement path="${gentoo.classpath}" />
- <pathelement location="./build/obj_cobertura" />
- <pathelement location="./build/obj" />
- <pathelement location="../../core/java/build/i2ptest.jar" />
- <pathelement location="../../build/jbigi.jar" />
-- <pathelement location="${with.clover}" />
-- <pathelement location="${with.cobertura}" />
- </classpath>
- <batchtest todir="../../reports/router/junit/">
- <fileset dir="./test/junit">
diff --git a/net-vpn/i2p/i2p-2.5.2-r1.ebuild b/net-vpn/i2p/i2p-2.6.0.ebuild
index 75455d2c88fa..e1d9a994d82e 100644
--- a/net-vpn/i2p/i2p-2.5.2-r1.ebuild
+++ b/net-vpn/i2p/i2p-2.6.0.ebuild
@@ -5,7 +5,7 @@ EAPI=8
JAVA_PKG_IUSE="test"
-inherit java-pkg-2 java-ant-2 systemd toolchain-funcs
+inherit java-pkg-2 systemd toolchain-funcs
DESCRIPTION="A privacy-centric, anonymous network"
HOMEPAGE="https://geti2p.net"
@@ -14,7 +14,7 @@ SRC_URI="https://files.i2p-projekt.de/${PV}/i2psource_${PV}.tar.bz2"
LICENSE="Apache-2.0 Artistic BSD CC-BY-2.5 CC-BY-3.0 CC-BY-SA-3.0 EPL-1.0 GPL-2 GPL-3 LGPL-2.1 LGPL-3 MIT public-domain WTFPL-2"
SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~x86"
+KEYWORDS="amd64 ~arm64"
LANGS=(
ar az bg ca cs da de el en es es-AR et fa fi fr gl he hi hr hu id it ja ko ku mg nb nl nn pl pt pt-BR ro ru sk sl sq
sr sv tk tr uk vi zh zh-TW
@@ -30,8 +30,6 @@ CP_DEPEND="
dev-java/java-service-wrapper:0
dev-java/jbcrypt:0
dev-java/json-simple:2.3
- dev-java/json-smart:1
- dev-java/jsonrpc2-base:1
dev-java/jsonrpc2-server:1
dev-java/jstl:0
dev-java/jstl-api:0
@@ -47,12 +45,17 @@ DEPEND="
${CP_DEPEND}
>=virtual/jdk-11:*
test? (
- >=dev-java/ant-1.10.14-r3:0[junit4]
dev-java/hamcrest:0
dev-java/junit:4
dev-java/mockito:4
)
"
+BDEPEND="
+ >=dev-java/ant-1.10.14-r3:0
+ test? (
+ >=dev-java/ant-1.10.14-r3:0[junit4]
+ )
+"
RDEPEND="
${CP_DEPEND}
acct-user/i2p
@@ -60,31 +63,19 @@ RDEPEND="
>=virtual/jre-11:*
"
-PATCHES=(
- "${FILESDIR}/fix-junit-classpath.patch"
-)
-
-EANT_BUILD_TARGET="preppkg-base"
-# no scala as depending on antlib.xml not installed by dev-lang/scala
-EANT_TEST_TARGET="junit.test"
-JAVA_ANT_ENCODING="UTF-8"
-JAVA_ANT_CLASSPATH_TAGS="javac java"
-# built locally
-EANT_GENTOO_CLASSPATH_EXTRA="${S}/core/java/build/i2p.jar"
-EANT_GENTOO_CLASSPATH_EXTRA+=":${S}/router/java/build/router.jar"
-EANT_GENTOO_CLASSPATH_EXTRA+=":${S}/apps/ministreaming/java/build/mstreaming.jar"
+PATCHES=( "${FILESDIR}/${PV}-force-gentoo-classpath.patch" )
DOCS=( README.md history.txt )
src_prepare() {
default # apply PATCHES
- java-pkg-2_src_prepare
- # add our classpath
- for f in `find -name build.xml`
- do
- java-ant_rewrite-classpath "$f"
- done
+ # remove hardcoded javac's source & target
+ find -name build.xml \
+ -exec sed -Ei 's,(source|target)="\$\{javac\.version\}",,g' {} + ||
+ die "remove javac's source & target in build files"
+
+ java-pkg-2_src_prepare
# remove most bundled, excepted the next ones.
# apps/addressbook/java/src/net/metanotion too much code drift
@@ -113,9 +104,8 @@ src_prepare() {
# bcprov
rm -r core/java/src/net/i2p/crypto/elgamal || die 'unbundle bcprov'
- sed \
- -e 's,net\.i2p\.crypto\.elgamal\.spec,org.bouncycastle.jce.spec,' \
- -i core/java/src/net/i2p/crypto/{provider/I2PProvider,CryptoConstants}.java ||
+ sed -e 's,net\.i2p\.crypto\.elgamal\.spec,org.bouncycastle.jce.spec,' \
+ -i core/java/src/net/i2p/crypto/CryptoConstants.java ||
die 'redirect imports of bcprov'
# getopt, gettext
rm -r core/java/src/gnu/{getopt,gettext} || die 'unbundle GNU code'
@@ -131,6 +121,8 @@ src_prepare() {
sed -E '/dir="[^"]*(identicon|zxing)/d' -i apps/imagegen{/imagegen,}/build.xml &&
sed -E '/(todir="build\/WEB-INF\/classes"|<\/copy>)/d' -i apps/imagegen/imagegen/build.xml ||
die 'do not depend on unbundled'
+ mkdir -p apps/imagegen/identicon/build || die 'create built identicon dependencies'
+ java-pkg_jar-from --into apps/imagegen/identicon/build identicon-1
# hashcash
rm core/java/src/com/nettgryppa/security/HashCash.java ||
die 'unbundle hashcash'
@@ -139,8 +131,12 @@ src_prepare() {
# jstl*
sed -E '/"apps\/susidns\/src\/lib\/(jstl|standard).jar"/d' -i build.xml ||
die 'unbundle jstl*'
+ java-pkg_jar-from --into apps/susidns/src/lib jstl jstl-impl.jar standard.jar
+ java-pkg_jar-from --into apps/susidns/src/lib jstl-api jstl-api.jar jstl.jar
# minidns-core, json-simple
rm -r core/java/src/org || die 'unbundle minidns-core & json-simple'
+ mkdir core/java/build || die 'create built core dependencies'
+ java-pkg_jar-from --into core/java/build json-simple-2.3
# keep only enabled locales
local lang
@@ -161,7 +157,11 @@ src_prepare() {
}
src_configure() {
- java-ant-2_src_configure
+ # build for our JDK
+ cat >> override.properties <<-EOF || die 'set JDK infos'
+ ant.build.javac.source=$(java-pkg_get-source)
+ ant.build.javac.target=$(java-pkg_get-target)
+ EOF
# deamon shouldn't start GUI
sed -i 's|\(clientApp.4.startOnLoad\)=true|\1=false|' \
@@ -169,12 +169,21 @@ src_configure() {
die 'avoid auto starting browser'
# yep, that's us
- echo "build.built-by=Gentoo" >> override.properties ||
+ echo 'build.built-by=Gentoo' >> override.properties ||
die 'bragging failed'
+
+ # support no-UTF-8 build systems
+ echo 'file.encoding=UTF-8' >> override.properties ||
+ die 'set files encoding'
}
src_compile() {
- java-pkg-2_src_compile
+ local libs='bcprov,gettext,hashcash-1,httpcomponents-client-4'
+ libs+=',java-getopt-1,java-service-wrapper,jbcrypt,jsonrpc2-server-1'
+ libs+=',tomcat-9,minidns-core-1,zxing-javase-3'
+ eant \
+ -Dgentoo.classpath=`java-pkg_getjars --with-dependencies "${libs}"` \
+ preppkg-base
local compile_lib
compile_lib() {
@@ -205,8 +214,14 @@ src_test() {
-execdir sed -e 's/<junit /\0haltonerror="yes" /' -i {} + ||
die 'ensure test failures propagate'
- EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH},hamcrest,junit-4,mockito-4"
- java-pkg-2_src_test
+ local libs='bcprov,gettext,hashcash-1,httpcomponents-client-4'
+ libs+=',java-getopt-1,java-service-wrapper,jbcrypt,jsonrpc2-server-1'
+ libs+=',tomcat-9,minidns-core-1,zxing-javase-3'
+ libs+=',hamcrest,junit-4,mockito-4'
+ # no scala as depending on antlib.xml not installed by dev-lang/scala
+ eant \
+ -Dgentoo.classpath=`java-pkg_getjars --build-only --with-dependencies "${libs}"` \
+ junit.test
}
src_install() {
diff --git a/net-vpn/i2p/i2p-2.7.0.ebuild b/net-vpn/i2p/i2p-2.7.0.ebuild
new file mode 100644
index 000000000000..18b88c68748c
--- /dev/null
+++ b/net-vpn/i2p/i2p-2.7.0.ebuild
@@ -0,0 +1,262 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="test"
+
+inherit java-pkg-2 systemd toolchain-funcs
+
+DESCRIPTION="A privacy-centric, anonymous network"
+HOMEPAGE="https://geti2p.net"
+SRC_URI="https://files.i2p-projekt.de/${PV}/i2psource_${PV}.tar.bz2"
+
+LICENSE="Apache-2.0 Artistic BSD CC-BY-2.5 CC-BY-3.0 CC-BY-SA-3.0 EPL-1.0 GPL-2 GPL-3 LGPL-2.1 LGPL-3 MIT public-domain WTFPL-2"
+SLOT="0"
+
+KEYWORDS="~amd64 ~arm64"
+LANGS=(
+ ar az bg ca cs da de el en es es-AR et fa fi fr gl he hi hr hu id it ja ko ku mg nb nl nn pl pt pt-BR ro ru sk sl sq
+ sr sv tk tr uk vi zh zh-TW
+)
+IUSE="${LANGS[@]/#/l10n_}"
+
+CP_DEPEND="
+ dev-java/bcprov:0
+ dev-java/hashcash:1
+ dev-java/httpcomponents-client:4
+ dev-java/java-getopt:1
+ dev-java/java-service-wrapper:0
+ dev-java/jbcrypt:0
+ dev-java/json-simple:2.3
+ dev-java/jsonrpc2-server:1
+ dev-java/jstl:0
+ dev-java/jstl-api:0
+ dev-java/minidns-core:1
+ dev-java/zxing-core:3
+ dev-java/zxing-javase:3
+ sys-devel/gettext:0[java]
+ www-servers/tomcat:9
+"
+# jdk-11 for bug #932030
+DEPEND="
+ dev-libs/gmp:0=
+ ${CP_DEPEND}
+ >=virtual/jdk-11:*
+ test? (
+ dev-java/hamcrest:0
+ dev-java/junit:4
+ dev-java/mockito:4
+ )
+"
+BDEPEND="
+ >=dev-java/ant-1.10.14-r3:0
+ test? (
+ >=dev-java/ant-1.10.14-r3:0[junit4]
+ )
+"
+RDEPEND="
+ ${CP_DEPEND}
+ acct-user/i2p
+ acct-group/i2p
+ >=virtual/jre-11:*
+"
+
+PATCHES=( "${FILESDIR}/${PV}-force-gentoo-classpath.patch" )
+
+DOCS=( README.md history.txt )
+
+src_prepare() {
+ default # apply PATCHES
+
+ # remove hardcoded javac's source & target
+ find -name build.xml \
+ -exec sed -Ei 's,(source|target)="\$\{javac\.version\}",,g' {} + ||
+ die "remove javac's source & target in build files"
+
+ java-pkg-2_src_prepare
+
+ # remove most bundled, excepted the next ones.
+ # apps/addressbook/java/src/net/metanotion too much code drift
+ # apps/i2psnark/java/src/org/klomp/snark too much code drift
+ # apps/imagegen/identicon too much code drift
+ # apps/jrobin need rrd4j ebuild
+ # apps/routerconsole/java/src/{com,edu} too much code drift
+ # {core,router}/java/src/com/southernstorm/noise use internal symbols
+ # core/java/src/freenet too much code drift
+ # core/java/src/gnu/crypto too much code drift
+ # router/java/src/com/maxmind changed interface
+ # router/java/src/org/cybergarage unable to find version 3
+ # router/java/src/org/freenetproject too big to pull
+ # router/java/src/org/xlattice changed interface
+ java-pkg_clean ! \
+ -path "./apps/jetty/jetty-distribution-*" # need to package jetty
+ rm -r installer/lib || die 'unbundle installer libs'
+ ( cat >> override.properties || die 'set unbundled properties' ) <<- EOF
+ require.gettext=true
+ with-libgetopt-java=true
+ with-libjakarta-taglibs-standard-java=true
+ with-libjson-simple-java=true
+ with-libtomcat9-java=true
+ with-gettext-base=true
+ # with-geoip-database=true need std geoip use
+ # with-libjetty9-java=true needs a jetty ebuild
+ EOF
+
+ # bcprov
+ rm -r core/java/src/net/i2p/crypto/elgamal || die 'unbundle bcprov'
+ sed -e 's,net\.i2p\.crypto\.elgamal\.spec,org.bouncycastle.jce.spec,' \
+ -i core/java/src/net/i2p/crypto/CryptoConstants.java ||
+ die 'redirect imports of bcprov'
+ # getopt, gettext
+ rm -r core/java/src/gnu/{getopt,gettext} || die 'unbundle GNU code'
+ # httpcomponents-client
+ rm -r core/java/src/net/i2p/apache || die 'unbundle httpcomponents-client'
+ sed -e 's,net\.i2p\.apache,org.apache,' \
+ -i core/java/src/net/i2p/util/{Addresses,I2PSSLSocketFactory}.java \
+ apps/i2pcontrol/java/net/i2p/i2pcontrol/HostCheckHandler.java ||
+ die 'redirect imports of httpcomponents-client'
+ # zxing
+ rm -r apps/imagegen/zxing || die 'unbundle zxing'
+ sed -E '/dir="[^"]*zxing/d' -i apps/imagegen{/imagegen,}/build.xml &&
+ # hashcash
+ rm core/java/src/com/nettgryppa/security/HashCash.java ||
+ die 'unbundle hashcash'
+ # jbcrypt, jsonrpc2-*
+ rm -r apps/i2pcontrol/java/{com,org} || die 'unbundle jbcrypt & jsonrpc2-*'
+ # jstl*
+ sed -E '/"apps\/susidns\/src\/lib\/(jstl|standard).jar"/d' -i build.xml ||
+ die 'unbundle jstl*'
+ java-pkg_jar-from --into apps/susidns/src/lib jstl jstl-impl.jar standard.jar
+ java-pkg_jar-from --into apps/susidns/src/lib jstl-api jstl-api.jar jstl.jar
+ # minidns-core, json-simple
+ rm -r core/java/src/org || die 'unbundle minidns-core & json-simple'
+ mkdir core/java/build || die 'create built core dependencies'
+ java-pkg_jar-from --into core/java/build json-simple-2.3
+
+ # keep only enabled locales
+ local lang
+ for lang in ${LANGS[@]}
+ do
+ if ! use "l10n_${lang}"
+ then
+ find -regextype egrep \
+ -regex ".*[_\\./]${lang/-/_}.(html|po|1)" \
+ -delete || die "unbundling ${lang} translations"
+ fi
+ done
+
+ # fix some locale names
+ find -name '*_in.*' -exec rename --no-overwrite _in. _id. {} \; &&
+ find -name '*_iw.*' -exec rename --no-overwrite _iw. _he. {} \; ||
+ die 'fix some locale names'
+}
+
+src_configure() {
+ # build for our JDK
+ cat >> override.properties <<-EOF || die 'set JDK infos'
+ ant.build.javac.source=$(java-pkg_get-source)
+ ant.build.javac.target=$(java-pkg_get-target)
+ EOF
+
+ # deamon shouldn't start GUI
+ sed -i 's|\(clientApp.4.startOnLoad\)=true|\1=false|' \
+ installer/resources/clients.config ||
+ die 'avoid auto starting browser'
+
+ # yep, that's us
+ echo 'build.built-by=Gentoo' >> override.properties ||
+ die 'bragging failed'
+
+ # support no-UTF-8 build systems
+ echo 'file.encoding=UTF-8' >> override.properties ||
+ die 'set files encoding'
+}
+
+src_compile() {
+ local libs='bcprov,gettext,hashcash-1,httpcomponents-client-4'
+ libs+=',java-getopt-1,java-service-wrapper,jbcrypt,jsonrpc2-server-1'
+ libs+=',tomcat-9,minidns-core-1,zxing-javase-3'
+ eant \
+ -Dgentoo.classpath=`java-pkg_getjars --with-dependencies "${libs}"` \
+ preppkg-base
+
+ local compile_lib
+ compile_lib() {
+ local name="${1}"
+ shift 1
+
+ "$(tc-getCC)" "${@}" -Iinclude ${CFLAGS} $(java-pkg_get-jni-cflags) \
+ ${LDFLAGS} -shared -fPIC "-Wl,-soname,lib${name}.so" \
+ "src/${name}.c" -o "lib${name}.so"
+ }
+
+ cd "${S}/core/c/jbigi/jbigi" || die "unable to cd to jbigi"
+ compile_lib jbigi -lgmp || die "unable to build jbigi"
+
+ if use amd64 || use x86; then
+ cd "${S}/core/c/jcpuid" || die "unable to cd to jcpuid"
+ compile_lib jcpuid || die "unable to build jcpuid"
+ fi
+}
+
+src_test() {
+ # avoid rebuilding
+ sed -e '/<delete dir=".\/build" \/>/d' -i core/java/build.xml ||
+ die 'avoid building twice'
+
+ # halt on error
+ find -name build.xml \
+ -execdir sed -e 's/<junit /\0haltonerror="yes" /' -i {} + ||
+ die 'ensure test failures propagate'
+
+ # redirect to built jbigi
+ sed -e 's,installer/lib/jbigi,core/c/jbigi/jbigi,' -i build.xml ||
+ die 'redirect to built library'
+
+ local libs='bcprov,gettext,hashcash-1,httpcomponents-client-4'
+ libs+=',java-getopt-1,java-service-wrapper,jbcrypt,jsonrpc2-server-1'
+ libs+=',tomcat-9,minidns-core-1,zxing-javase-3'
+ libs+=',hamcrest,junit-4,mockito-4'
+ # no scala as depending on antlib.xml not installed by dev-lang/scala
+ eant \
+ -Dgentoo.classpath=`java-pkg_getjars --build-only --with-dependencies "${libs}"` \
+ junit.test
+}
+
+src_install() {
+ # install basic documentation
+ einstalldocs
+ doman installer/resources/man/eepget.*
+
+ # install main files
+ java-pkg_doso core/c/jbigi/jbigi/libjbigi.so
+ if use amd64 || use x86; then
+ java-pkg_doso core/c/jcpuid/libjcpuid.so
+ fi
+ cd "${S}/pkg-temp" || die 'unable to change dir to built artifacts'
+ java-pkg_dojar lib/*.jar
+ java-pkg_dowar webapps/*.war
+
+ # install shared
+ insinto /usr/share/i2p
+ doins blocklist.txt hosts.txt {clients,i2p*}.config
+ doins -r certificates docs eepsite geoip scripts
+
+ # install daemons
+ newinitd "${FILESDIR}/i2p.init" i2p
+ systemd_dounit "${FILESDIR}/i2p.service"
+
+ # setup dirs
+ keepdir /var/log/i2p /var/lib/i2p
+ fowners i2p:i2p /var/lib/i2p /var/log/i2p
+
+ # create own launchers
+ java-pkg_dolauncher i2prouter --main net.i2p.router.Router --jar i2p.jar \
+ --pwd "${EPREFIX}/usr/share/i2p" \
+ --java_args "\
+ -Di2p.dir.config=${EPREFIX}/var/lib/i2p \
+ -Di2p.dir.log=${EPREFIX}/var/log/i2p \
+ -DloggerFilenameOverride=${EPREFIX}/var/log/i2p/router-@"
+ java-pkg_dolauncher eepget --main net.i2p.util.EepGet --jar i2p.jar
+}