summaryrefslogtreecommitdiff
path: root/net-vpn/i2p
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-15 13:38:09 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-15 13:38:09 +0100
commitdb70871b2044b9bfde346d6f4027dafb0a013c4c (patch)
tree34548aee54e5458d3754bd8c8f987acdb5ee444c /net-vpn/i2p
parent1c382dc5dbc52576ac2300fee0498af8af44e7b4 (diff)
gentoo auto-resync : 15:06:2023 - 13:38:09
Diffstat (limited to 'net-vpn/i2p')
-rw-r--r--net-vpn/i2p/Manifest5
-rw-r--r--net-vpn/i2p/files/2.2.1-fix-junit-classpath.patch122
-rw-r--r--net-vpn/i2p/i2p-2.1.0-r2.ebuild4
-rw-r--r--net-vpn/i2p/i2p-2.2.1.ebuild266
4 files changed, 394 insertions, 3 deletions
diff --git a/net-vpn/i2p/Manifest b/net-vpn/i2p/Manifest
index ae5e0721d35f..27299c722bab 100644
--- a/net-vpn/i2p/Manifest
+++ b/net-vpn/i2p/Manifest
@@ -1,9 +1,12 @@
AUX 1.7.0-i2p.init 391 BLAKE2B e62a23021db61ba93adaf1ff9c2f0bb9372cee3921544c9ca498f3472dc64c700a0fb78d2fed9dafc0fa98c97670f67266a2e0f8c594c7c1352d15e1b23d7586 SHA512 12c69b2c5918a23219d84f2c1ded286ced6f78564241372bead318ddcb77876e90c800735f7ed6e92c03f69dfeb990ec43e40efd1e9ee32888b404d1e2e9643a
AUX 1.7.0-i2p.service 253 BLAKE2B 2647a1920083fedf88b351b084d3a4d177393065da3dc7aecbeb09e1afc3373116f972c40db4500f76fe1a983ac24503d9a95ee08917ff7625946e4928449512 SHA512 59639b4f78637e5b03ed67b7e08d21bc873c844b474df3ed9101b34934a4c22aef46db1b66cbdc9aad2438ee84f130230c368a78b5bb1017843f016bba6c30e5
+AUX 2.2.1-fix-junit-classpath.patch 7277 BLAKE2B 073189daf745f401b6642194e304b7b10181444e9ec074f2c3195755e29ee8a010d0ee888639b820e8130e42d68826c3d9edc07240de0f6481829c1c46747e32 SHA512 b19822631f4d47879bd309fb0801accac47c5d4da2bb6ddf6e5fae18e2a97dd23f8dc625c983495a281b7369859666bca099b2585e17ab6b0abae1add7a200e1
AUX i2p.init 278 BLAKE2B 2e26e9d25e21494d2f6a221a3c332f1afe475513096eb7c51a0fbc4cacc8e9bd418f98d622cb054f55d7b7c4941054be8b6314f9b19c249e9ad0e77893980ca6 SHA512 1edb33cd0df28de95e02b1015e86cbc44c867a8df1260abb0565bc232c2cccc2625d36fdefa4a050ea3215d938c1ff0521a591a0bc2b27d57ca6be621795cd52
AUX i2p.service 172 BLAKE2B 8523af82e33d7a8f5b37138f8d28c7adb4c08607b84813f35b42f11064c0ec2768bf443eca32bd7b281ed084d6b820b23977c55a1cd5b8ad058ab18117b83f90 SHA512 c87574c968f4142b3dbe556dab86438765dc8b9b23475dca8c7e268d2963e5dffcd9175bb749b2d42c3fc7fe75d9175158f56cb78f0fa4faa7d6029fdf4b8e6c
DIST i2psource_1.7.0.tar.bz2 33300522 BLAKE2B dcb83477f6d066b707632f8db44bc811558b0bc52368ce992aaf14d0d21acc1fb9bce1dfa8171fca8cf3819765f0b7993ae4a2566a6f65786cca84c02ea4336a SHA512 a27c448246538f152355ecfdf781e39bf9e57b5d0f7ea139ce06d800ce3eed7fa4e375210e6545da2a75245b45282bc8d8e7453d96729f940c34daa75bdc588f
DIST i2psource_2.1.0.tar.bz2 32817295 BLAKE2B d37463522143c02e04c96d58578312b536ab5e2842e5647dbe5ba3d5c139329c447f16de7e326ef48ef4c6b3c11631e23300b5327cc31d9da5288240f86c926f SHA512 e8639c2b2869d3c7856b598d4cd3505458ed5cab5dce3570cafdaec3ccd77dbaec35787cccc6782acc75adb423b7baaab724ac3c98e5b91b41cf4c76f3614355
+DIST i2psource_2.2.1.tar.bz2 33349391 BLAKE2B 45c681fd64c638e78033efbc025f8ddd0200dd79da45d7af539f7553d792f03b9978a62dac0f4763c4589939e1b220efb13d1e4dca03c143cf3b2de31af818a9 SHA512 98ea0b86fcf879b5e4e415d106c446be73441aa03c91f3b9ac02589a332cafad1bf899d381b5986fb78efc550deceedd2da5514c46fbb70f5928d85a76be5ced
EBUILD i2p-1.7.0-r1.ebuild 4212 BLAKE2B 7cf5f94c8d1a9814f69cce175ce49b6f63575b9e90e6c404bec07be1f4476713db635561b355aab314a71cfe7e02ae1615902f6ad22984d238037c234146644f SHA512 a3c609a3c37e6430daed918d215536d1ec9ddd4c12f1191a26184503fee3b8dd88b2db700be6870414a4d775dc548d0c8bc0d579a595a9b079e57f1142dd712a
-EBUILD i2p-2.1.0-r2.ebuild 7138 BLAKE2B 90153ea24b8ee7aea9c1c8242fc4fff477f2c9bddd287c0af39a9f1c04a614a545b8d91794180764286274fb0516206ae81f4e76a712151181116799879b373a SHA512 40baca6878e714d28740abc489647e70a6b2912a80169e1c549847c72bf6cc86a4bf4a0ba917eee079eff04bd658483d003939d8c70dd61617c8f01f0bd17cde
+EBUILD i2p-2.1.0-r2.ebuild 7124 BLAKE2B 7c448a471a9a98f45f2eb83bdb5558e99d322aec2e75807b2ab7c6a3f71acd304c89b89690aa88962bb9bfff97bdbf3376a775abce5cce44a0428e91b0691639 SHA512 0d2a8f1c779bec8e96f03bd34412b8c9d7d71972a1840bbb59cc0b458475243e1fd23ea2f83207bf97c940238361ca8badcfb9e7b354b9574e5042d89a817880
+EBUILD i2p-2.2.1.ebuild 8094 BLAKE2B ab618974b21d822b889bb8be8b08758e4c328e4d246e23cace61735de305adb14d6948ad2775bfccfa4b2a3b34ef4d915e1d17da9c85cdc3080cac26dfbe7e7d SHA512 118d22467e2beeaad511060c922170e1ecb6cde2c65cd8a47e45d47839390fc2c0802c72f32fda4f90b9e8d408bb6b50f30526bef68b75b14314950a9913d8db
MISC metadata.xml 832 BLAKE2B ecda42c25627405f84f1df24fecf9b117c2dd15c44166eaea65df6924dce67e562a0ba7af83508fe7512d5ee75b23620e59ab7376701178f0cef6c47d42b751f SHA512 effe4661ecc390b6b76984192fcd4124cb29302e5ff4c545447b08ca5fc07ae63efa57d3082487940c64ade864d9c76a55f1bd1a05217808fb733a3a18cb553d
diff --git a/net-vpn/i2p/files/2.2.1-fix-junit-classpath.patch b/net-vpn/i2p/files/2.2.1-fix-junit-classpath.patch
new file mode 100644
index 000000000000..95211bf9cad0
--- /dev/null
+++ b/net-vpn/i2p/files/2.2.1-fix-junit-classpath.patch
@@ -0,0 +1,122 @@
+diff --git a/apps/i2ptunnel/java/build.xml b/apps/i2ptunnel/java/build.xml
+index b8d8b24a9..cfcf2d5a1 100644
+--- 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>
+diff --git a/apps/ministreaming/java/build.xml b/apps/ministreaming/java/build.xml
+index 72944b25c..cef8a091f 100644
+--- 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">
+diff --git a/apps/streaming/java/build.xml b/apps/streaming/java/build.xml
+index ecfa0ebfd..395bc5aeb 100644
+--- 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">
+diff --git a/core/java/build.xml b/core/java/build.xml
+index 8b36ce5f0..305ddd6ee 100644
+--- 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/">
+diff --git a/router/java/build.xml b/router/java/build.xml
+index 4b0cedf2b..0385926ac 100644
+--- 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.1.0-r2.ebuild b/net-vpn/i2p/i2p-2.1.0-r2.ebuild
index 2883493999e5..b83e479db886 100644
--- a/net-vpn/i2p/i2p-2.1.0-r2.ebuild
+++ b/net-vpn/i2p/i2p-2.1.0-r2.ebuild
@@ -73,8 +73,8 @@ DOCS=( README.md history.txt )
pkg_pretend() {
# see https://bugs.gentoo.org/831290
- if [[ "`java-config --show-active-vm`" = openjdk*-8 ]] &&
- [[ "`java-config --query MERGE_VM --package=ant-core`" != openjdk*-8 ]]
+ if [[ "`java-config --show-active-vm`" = *-8 ]] &&
+ [[ "`java-config --query MERGE_VM --package=ant-core`" != *-8 ]]
then
eerror "dev-java/ant-core was emerged with a newer version of the JDK."
eerror "It will fail to build with virtual/jdk:1.8 due to #831290."
diff --git a/net-vpn/i2p/i2p-2.2.1.ebuild b/net-vpn/i2p/i2p-2.2.1.ebuild
new file mode 100644
index 000000000000..e665690f55bf
--- /dev/null
+++ b/net-vpn/i2p/i2p-2.2.1.ebuild
@@ -0,0 +1,266 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="test"
+
+inherit java-pkg-2 java-ant-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 ~x86"
+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/identicon:1
+ dev-java/java-getopt:1
+ 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
+ dev-java/minidns-core:1
+ dev-java/zxing-core:3
+ dev-java/zxing-javase:3
+ sys-devel/gettext:0[java]
+ >=www-servers/tomcat-9.0.73:9
+"
+DEPEND="
+ dev-libs/gmp:0=
+ ${CP_DEPEND}
+ >=virtual/jdk-1.8:*
+ test? (
+ dev-java/ant-junit4:0
+ dev-java/hamcrest:0
+ dev-java/junit:4
+ dev-java/mockito:4
+ )
+"
+RDEPEND="
+ ${CP_DEPEND}
+ acct-user/i2p
+ acct-group/i2p
+ >=virtual/jre-1.8:*
+"
+
+PATCHES=(
+ "${FILESDIR}/${PV}-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"
+
+DOCS=( README.md history.txt )
+
+pkg_pretend() {
+ # see https://bugs.gentoo.org/831290
+ if [[ "`java-config --show-active-vm`" = *-8 ]] &&
+ [[ "`java-config --query MERGE_VM --package=ant-core`" != *-8 ]]
+ then
+ eerror "dev-java/ant-core was emerged with a newer version of the JDK."
+ eerror "It will fail to build with virtual/jdk:1.8 due to #831290."
+ eerror "Please switch to a newer JDK"
+ eerror " eselect java-vm set system ..."
+ eerror "Or remerge dev-java/ant-core with virtual/jdk:1.8"
+ eerror " emerge dev-java/ant-core"
+ die 'bad JDK for ant-core'
+ fi
+}
+
+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 most bundled
+ # apps/addressbook/java/src/net/metanotion too much code drift
+ # apps/i2psnark/java/src/org/klomp/snark 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
+ ( 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\.impl,org.bouncycastle.jce.provider,' \
+ -e 's,net\.i2p\.crypto\.elgamal\.spec,org.bouncycastle.jce.spec,' \
+ -i core/java/src/net/i2p/crypto/{provider/I2PProvider,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'
+ # identicon, zxing
+ rm -r apps/imagegen/{identicon,zxing} || die 'unbundle identicon & zxing'
+ sed -e '/LICENSE-Identicon.txt/d' -i build.xml &&
+ 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'
+ # 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*'
+ # minidns-core, json-simple
+ rm -r core/java/src/org || die 'unbundle minidns-core & json-simple'
+
+ # 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() {
+ java-ant-2_src_configure
+
+ # 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'
+}
+
+src_compile() {
+ java-pkg-2_src_compile
+
+ local compile_lib
+ compile_lib() {
+ local name="${1}"
+ local file="${2}"
+ shift 2
+
+ "$(tc-getCC)" "${@}" ${CFLAGS} $(java-pkg_get-jni-cflags) \
+ ${LDFLAGS} -shared -fPIC "-Wl,-soname,lib${name}.so" \
+ "${file}" -o "lib${name}.so"
+ }
+
+ cd "${S}/core/c/jbigi/jbigi" || die "unable to cd to jbigi"
+ compile_lib jbigi src/jbigi.c -Iinclude -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 src/jcpuid.c -Iinclude ||
+ 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'
+
+ EANT_GENTOO_CLASSPATH+=",hamcrest,junit-4,mockito-4"
+ java-pkg-2_src_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.app=${EPREFIX}/var/lib/i2p/app \
+ -Di2p.dir.config=${EPREFIX}/var/lib/i2p/config \
+ -Di2p.dir.router=${EPREFIX}/var/lib/i2p/router \
+ -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
+}