From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DA56615800A for ; Tue, 18 Jul 2023 16:32:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 062EFE07A9; Tue, 18 Jul 2023 16:32:30 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DF352E07A9 for ; Tue, 18 Jul 2023 16:32:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C89F0340D22 for ; Tue, 18 Jul 2023 16:32:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 204C3B9F for ; Tue, 18 Jul 2023 16:32:27 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1689697868.ca657be02a35619424f47de5fdfbc831cdf0f397.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-vpn/i2p/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-vpn/i2p/Manifest net-vpn/i2p/i2p-2.3.0.ebuild X-VCS-Directories: net-vpn/i2p/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: ca657be02a35619424f47de5fdfbc831cdf0f397 X-VCS-Branch: master Date: Tue, 18 Jul 2023 16:32:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1ebe7be8-3cd9-4c25-bf51-f25cb80444d9 X-Archives-Hash: f7e37e71a656d7cf40ee214e8c289161 commit: ca657be02a35619424f47de5fdfbc831cdf0f397 Author: Valérian Rousset users noreply github com> AuthorDate: Thu Jul 13 20:49:48 2023 +0000 Commit: Sam James gentoo org> CommitDate: Tue Jul 18 16:31:08 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca657be0 net-vpn/i2p: add 2.3.0 Signed-off-by: Valérian Rousset users.noreply.github.com> Signed-off-by: Sam James gentoo.org> net-vpn/i2p/Manifest | 1 + net-vpn/i2p/i2p-2.3.0.ebuild | 266 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 267 insertions(+) diff --git a/net-vpn/i2p/Manifest b/net-vpn/i2p/Manifest index d566fee0b1f8..7c568e634e98 100644 --- a/net-vpn/i2p/Manifest +++ b/net-vpn/i2p/Manifest @@ -1,3 +1,4 @@ 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 +DIST i2psource_2.3.0.tar.bz2 33379569 BLAKE2B 56002ad57725216730c6a92eed4c4eb569bfe03e4fcbd811577610f8adf212e9db56e6761f5873933d101e513093b61e296871a122a2e2042945c1fe906bc372 SHA512 dc38174683e2388c0e766db71526e98252fc38c52255bd4529684862edfa05ba25204df97cf09a6084f9833507a0d4ea96e112d1138d9c97d2dd582ef98f9301 diff --git a/net-vpn/i2p/i2p-2.3.0.ebuild b/net-vpn/i2p/i2p-2.3.0.ebuild new file mode 100644 index 000000000000..44f36a5638a3 --- /dev/null +++ b/net-vpn/i2p/i2p-2.3.0.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 +" +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}/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 '//d' -i core/java/build.xml || + die 'avoid building twice' + + # halt on error + find -name build.xml \ + -execdir sed -e 's/