net-p2p/freenet:Add optional support for nss, fixes bug 486826
authorThomas Sachau <tommy@gentoo.org>
Sat, 14 Sep 2019 09:09:52 +0000 (11:09 +0200)
committerThomas Sachau <tommy@gentoo.org>
Sat, 14 Sep 2019 10:51:02 +0000 (12:51 +0200)
Package-Manager: Portage-2.3.62, Repoman-2.3.17
Signed-off-by: Thomas Sachau <tommy@gentoo.org>
net-p2p/freenet/freenet-0.7.5_p1484.ebuild
net-p2p/freenet/metadata.xml

index 104ad58ab195cf1949ae6aed6b983953229da4ba..5c39af96e3c38c774a8d1f416e375934ce2f7429 100644 (file)
@@ -19,7 +19,7 @@ SRC_URI="
 LICENSE="GPL-2+ GPL-2 MIT BSD-2 Apache-2.0"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="test"
+IUSE="+nss test"
 
 CDEPEND="dev-java/bcprov:1.54
        dev-java/commons-compress:0
@@ -29,7 +29,8 @@ CDEPEND="dev-java/bcprov:1.54
        dev-java/jna:0
        dev-java/lzma:0
        dev-java/lzmajio:0
-       dev-java/mersennetwister:0"
+       dev-java/mersennetwister:0
+       nss? ( dev-libs/nss )"
 
 DEPEND="
        app-arch/unzip
@@ -99,7 +100,9 @@ src_prepare() {
                freenet-wrapper.conf || die "sed failed"
 
        echo "wrapper.java.classpath.1=/usr/share/freenet/lib/freenet.jar" >> freenet-wrapper.conf || die
-
+       if use nss; then
+               echo "wrapper.java.additional.5=-Dfreenet.jce.use.NSS=true" >> freenet-wrapper.conf || die
+       fi
        local i=2 pkg jars jar
        local ifs_original=${IFS}
        IFS=","
index fd6ed7a988a6d714b2e6a60ab456147a2a84edef..3840d6c5c4f9f838bf59cfb7b6e96bcccfba1f1b 100644 (file)
@@ -8,4 +8,7 @@
        <upstream>
                <remote-id type="github">freenet/fred</remote-id>
        </upstream>
+       <use>
+               <flag name="nss">Use nss for crypto operations, if it is the fastest way</flag>
+       </use>
 </pkgmetadata>