1 |
commit: 5e3a1c8c3320a4de0973fcd063b3abbd60032fec |
2 |
Author: Valérian Rousset <tharvik <AT> users <DOT> noreply <DOT> github <DOT> com> |
3 |
AuthorDate: Wed Jan 30 16:49:22 2019 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 5 22:32:11 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e3a1c8c |
7 |
|
8 |
net-vpn/i2p: bump to 0.9.38. |
9 |
|
10 |
Package-Manager: Portage-2.3.51, Repoman-2.3.12 |
11 |
Signed-off-by: Valérian Rousset <tharvik <AT> users.noreply.github.com> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/10948 |
13 |
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org> |
14 |
|
15 |
net-vpn/i2p/Manifest | 1 + |
16 |
net-vpn/i2p/files/0.9.38-add-cp-to-tests | 45 +++++++++ |
17 |
net-vpn/i2p/i2p-0.9.38.ebuild | 161 +++++++++++++++++++++++++++++++ |
18 |
3 files changed, 207 insertions(+) |
19 |
|
20 |
diff --git a/net-vpn/i2p/Manifest b/net-vpn/i2p/Manifest |
21 |
index f447a136f4c..df84846b426 100644 |
22 |
--- a/net-vpn/i2p/Manifest |
23 |
+++ b/net-vpn/i2p/Manifest |
24 |
@@ -1,2 +1,3 @@ |
25 |
DIST i2psource_0.9.36.tar.bz2 29856168 BLAKE2B 0f10101b874bf6fc8415f10b08282947962a6fb8c3eaefde67d3f250d65a159551c24038625aa6712e88b368ccae38d136314025ac19fcb9dd9145251283b357 SHA512 e9023cae1c7dbdd92c9c4823497dfa8497cee3683de1232deddbdc548ba08edefe218bd81e00e952d8a95037c32de8359daaf43c2d5f25c75aba65554d2d47b4 |
26 |
DIST i2psource_0.9.37.tar.bz2 30277506 BLAKE2B 2c0fe601b3a8967c23f00bd29aef197389039efbf1a3fc0847f819dea44f98e38b9b53b749763dccca740a50d467d5d079b0e4aad707347cc7c7a576fcc44407 SHA512 ce0d320810faaebe2926d988a40f4df968583edbc488b995a32cfd806550a8cf75d2c2397bfd9f3fd443cb462567cc2cdbf08d1de59b6806888724254faebf09 |
27 |
+DIST i2psource_0.9.38.tar.bz2 30702106 BLAKE2B c0fd4ea21643edff06853825b9b09dbd648176b6a2318c6bb3846b7c198cac88f89525df0868affbc337e31ec3459f08235cd8a52d38b8551d235c9ef2ca4a4c SHA512 148cd1504dbf0a86367b6dc120a27b2d0d936857eb8cf524e86982d6499c5a831a40aacb3ed67570ad2c323be6545e9a66c12dfc4be2377b80f4d7152e04452d |
28 |
|
29 |
diff --git a/net-vpn/i2p/files/0.9.38-add-cp-to-tests b/net-vpn/i2p/files/0.9.38-add-cp-to-tests |
30 |
new file mode 100644 |
31 |
index 00000000000..ddf2f7d5fca |
32 |
--- /dev/null |
33 |
+++ b/net-vpn/i2p/files/0.9.38-add-cp-to-tests |
34 |
@@ -0,0 +1,45 @@ |
35 |
+diff -Naur a/apps/ministreaming/java/build.xml b/apps/ministreaming/java/build.xml |
36 |
+--- a/apps/ministreaming/java/build.xml 2019-01-30 13:31:14.958832623 +0100 |
37 |
++++ b/apps/ministreaming/java/build.xml 2019-01-30 13:39:00.050869739 +0100 |
38 |
+@@ -173,7 +173,7 @@ |
39 |
+ |
40 |
+ <javac debug="true" deprecation="on" destdir="./build/obj" encoding="UTF-8" includeAntRuntime="false" source="1.8" srcdir="./test/junit" target="1.8"> |
41 |
+ <classpath> |
42 |
+- <pathelement location="${javac.classpath}" /> |
43 |
++ <pathelement path="${javac.classpath}" /> |
44 |
+ <pathelement location="../../../core/java/build/i2p.jar" /> |
45 |
+ <pathelement location="${junit.home}/junit4.jar" /> |
46 |
+ <pathelement location="${hamcrest.home}/hamcrest.jar" /> |
47 |
+diff -Naur a/apps/streaming/java/build.xml b/apps/streaming/java/build.xml |
48 |
+--- a/apps/streaming/java/build.xml 2019-01-30 13:31:14.953832622 +0100 |
49 |
++++ b/apps/streaming/java/build.xml 2019-01-30 13:38:56.683869470 +0100 |
50 |
+@@ -49,7 +49,7 @@ |
51 |
+ |
52 |
+ <javac debug="true" deprecation="on" destdir="./build/obj" encoding="UTF-8" includeAntRuntime="false" source="1.8" srcdir="./test/junit" target="1.8"> |
53 |
+ <classpath> |
54 |
+- <pathelement location="${javac.classpath}" /> |
55 |
++ <pathelement path="${javac.classpath}" /> |
56 |
+ <pathelement location="../../../core/java/build/i2p.jar" /> |
57 |
+ <pathelement location="../../ministreaming/java/build/mstreaming.jar" /> |
58 |
+ <pathelement location="${junit.home}/junit4.jar" /> |
59 |
+diff -Naur a/router/java/build.xml b/router/java/build.xml |
60 |
+--- a/router/java/build.xml 2019-01-30 13:31:22.905833257 +0100 |
61 |
++++ b/router/java/build.xml 2019-01-30 13:39:04.133870065 +0100 |
62 |
+@@ -130,7 +130,7 @@ |
63 |
+ <mkdir dir="./build/obj_scala" /> |
64 |
+ <scalac deprecation="on" destdir="./build/obj_scala" srcdir="./test/scalatest"> |
65 |
+ <classpath> |
66 |
+- <pathelement location="${javac.classpath}" /> |
67 |
++ <pathelement path="${javac.classpath}" /> |
68 |
+ <pathelement location="${scala-library.jar}" /> |
69 |
+ <pathelement location="${scalactic.jar}" /> |
70 |
+ <pathelement location="${scalatest.jar}" /> |
71 |
+@@ -148,7 +148,7 @@ |
72 |
+ <property name="junit.home" value="${ant.home}/lib/" /> |
73 |
+ <javac debug="true" debuglevel="lines,vars,source" deprecation="on" destdir="./build/obj" encoding="UTF-8" includeAntRuntime="true" source="1.8" srcdir="./test/junit" target="1.8"> |
74 |
+ <classpath> |
75 |
+- <pathelement location="${javac.classpath}" /> |
76 |
++ <pathelement path="${javac.classpath}" /> |
77 |
+ <pathelement location="${hamcrest.home}/hamcrest-core.jar" /> |
78 |
+ <pathelement location="${hamcrest.home}/hamcrest-library.jar" /> |
79 |
+ <pathelement location="${hamcrest.home}/hamcrest-integration.jar" /> |
80 |
|
81 |
diff --git a/net-vpn/i2p/i2p-0.9.38.ebuild b/net-vpn/i2p/i2p-0.9.38.ebuild |
82 |
new file mode 100644 |
83 |
index 00000000000..396878e979b |
84 |
--- /dev/null |
85 |
+++ b/net-vpn/i2p/i2p-0.9.38.ebuild |
86 |
@@ -0,0 +1,161 @@ |
87 |
+# Copyright 1999-2019 Gentoo Authors |
88 |
+# Distributed under the terms of the GNU General Public License v2 |
89 |
+ |
90 |
+EAPI="6" |
91 |
+ |
92 |
+inherit java-pkg-2 java-ant-2 systemd user |
93 |
+ |
94 |
+DESCRIPTION="A privacy-centric, anonymous network" |
95 |
+HOMEPAGE="https://geti2p.net" |
96 |
+SRC_URI="https://download.i2p2.de/releases/${PV}/i2psource_${PV}.tar.bz2" |
97 |
+ |
98 |
+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" |
99 |
+SLOT="0" |
100 |
+ |
101 |
+# Until the deps reach other arches |
102 |
+KEYWORDS="~amd64 ~x86" |
103 |
+IUSE='nls test' |
104 |
+ |
105 |
+# dev-java/ant-core is automatically added due to java-ant-2.eclass |
106 |
+CP_DEPEND='dev-java/bcprov:1.50 |
107 |
+ dev-java/jrobin:0 |
108 |
+ dev-java/slf4j-api:0 |
109 |
+ dev-java/tomcat-jstl-impl:0 |
110 |
+ dev-java/tomcat-jstl-spec:0 |
111 |
+ dev-java/java-service-wrapper:0 |
112 |
+ dev-java/commons-logging:0 |
113 |
+ dev-java/slf4j-simple:0 |
114 |
+ java-virtuals/servlet-api:3.1 |
115 |
+' |
116 |
+ |
117 |
+DEPEND="${CP_DEPEND} |
118 |
+ dev-java/eclipse-ecj:* |
119 |
+ nls? ( >=sys-devel/gettext-0.19 ) |
120 |
+ virtual/jdk:1.8 |
121 |
+ test? ( |
122 |
+ dev-java/ant-junit4:0 |
123 |
+ dev-java/hamcrest-core:1.3 |
124 |
+ dev-java/hamcrest-library:1.3 |
125 |
+ dev-java/junit:4 |
126 |
+ ) |
127 |
+" |
128 |
+ |
129 |
+RDEPEND="${CP_DEPEND} |
130 |
+ virtual/jre:1.8 |
131 |
+ net-libs/nativebiginteger:0 |
132 |
+" |
133 |
+ |
134 |
+EANT_BUILD_TARGET="pkg" |
135 |
+# no scala as depending on antlib.xml not installed by dev-lang/scala |
136 |
+EANT_TEST_TARGET='junit.test' |
137 |
+JAVA_ANT_ENCODING="UTF-8" |
138 |
+ |
139 |
+PATCHES=( |
140 |
+ "${FILESDIR}/${PV}-add-cp-to-tests" |
141 |
+) |
142 |
+ |
143 |
+pkg_setup() { |
144 |
+ java-pkg-2_pkg_setup |
145 |
+ |
146 |
+ enewgroup i2p |
147 |
+ enewuser i2p -1 -1 "${EPREFIX}/var/lib/i2p" i2p |
148 |
+} |
149 |
+ |
150 |
+src_prepare() { |
151 |
+ # as early as possible to allow generic patches to be applied |
152 |
+ default |
153 |
+ |
154 |
+ java-ant_rewrite-classpath |
155 |
+ |
156 |
+ java-pkg-2_src_prepare |
157 |
+ |
158 |
+ # We're on GNU/Linux, we don't need .exe files |
159 |
+ echo "noExe=true" > override.properties || die |
160 |
+ if ! use nls; then |
161 |
+ echo "require.gettext=false" >> override.properties || die |
162 |
+ fi |
163 |
+ |
164 |
+ # avoid auto starting browser |
165 |
+ sed -i 's|clientApp.4.startOnLoad=true|clientApp.4.startOnLoad=false|' \ |
166 |
+ 'installer/resources/clients.config' || die |
167 |
+ |
168 |
+ # generate wrapper classpath, keeping the default to be replaced later |
169 |
+ i2p_cp='' # global forced by java-pkg_gen-cp |
170 |
+ java-pkg_gen-cp i2p_cp |
171 |
+ local lib cp i=2 |
172 |
+ for lib in ${i2p_cp//,/ } |
173 |
+ do |
174 |
+ cp+="wrapper.java.classpath.$((i++))=$(java-pkg_getjars ${lib})\n" |
175 |
+ done |
176 |
+ |
177 |
+ # add generated cp and hardcode system VM |
178 |
+ sed -e "s|\(wrapper\.java\.classpath\.1=.*\)|\1\n${cp}|" \ |
179 |
+ -e "s|\(wrapper\.java\.command\)=.*|\1=/etc/java-config-2/current-system-vm/bin/java|" \ |
180 |
+ -e "s|\(wrapper\.java\.library\.path\.1\)=.*|\1=/usr/lib/java-service-wrapper|" \ |
181 |
+ -e "s|\(wrapper\.java\.library\.path\.2\)=.*|\0\nwrapper.java.library.path.3=/usr/$(get_libdir)|" \ |
182 |
+ -i 'installer/resources/wrapper.config' || die |
183 |
+ |
184 |
+ # replace paths as the installer would |
185 |
+ sed -e "s|[\$%]INSTALL_PATH|${EPREFIX}/usr/share/i2p|" \ |
186 |
+ -e "s|%SYSTEM_java_io_tmpdir|${EPREFIX}/var/lib/i2p/.i2p|" \ |
187 |
+ -e "s|%USER_HOME|${EPREFIX}/var/lib/i2p|" \ |
188 |
+ -i 'installer/resources/'{eepget,runplain.sh,wrapper.config} || die |
189 |
+ |
190 |
+ if use test; then |
191 |
+ # no *streaming as requiring >dev-java/mockito-1.9.5 |
192 |
+ sed -e '/junit\.test.*streaming/d' \ |
193 |
+ -i build.xml || |
194 |
+ die 'unable to remove ministreaming tests' |
195 |
+ fi |
196 |
+} |
197 |
+ |
198 |
+src_test() { |
199 |
+ # store built version of jars, overwritten by testing |
200 |
+ mv "${S}/pkg-temp/lib/"{i2p,router}.jar "${T}" || |
201 |
+ die 'unable to save jars before tests' |
202 |
+ |
203 |
+ # generate test classpath |
204 |
+ local cp |
205 |
+ cp="$(java-pkg_getjars --build-only junit-4,hamcrest-core-1.3,hamcrest-library-1.3)" |
206 |
+ EANT_TEST_EXTRA_ARGS="-Djavac.classpath=${cp}" java-pkg-2_src_test |
207 |
+ |
208 |
+ # redo work undone by testing |
209 |
+ mv "${T}/"{i2p,router}.jar "${S}/pkg-temp/lib/" || |
210 |
+ die 'unable to restore jars after tests' |
211 |
+} |
212 |
+ |
213 |
+src_install() { |
214 |
+ # cd into pkg-temp. |
215 |
+ cd "${S}/pkg-temp" || die |
216 |
+ |
217 |
+ # we remove system installed jar and install the others |
218 |
+ rm lib/{jrobin,wrapper,jbigi,commons-logging,javax.servlet}.jar || \ |
219 |
+ die 'unable to remove locally built jar already found in system' |
220 |
+ java-pkg_dojar lib/*.jar |
221 |
+ |
222 |
+ # create own launcher |
223 |
+ java-pkg_dolauncher eepget --main net.i2p.util.EepGet --jar i2p.jar |
224 |
+ |
225 |
+ # Install main files and basic documentation |
226 |
+ insinto '/usr/share/i2p' |
227 |
+ doins blocklist.txt hosts.txt *.config |
228 |
+ dodoc history.txt INSTALL-headless.txt LICENSE.txt |
229 |
+ doman man/* |
230 |
+ |
231 |
+ # Install other directories |
232 |
+ doins -r certificates docs eepsite geoip scripts |
233 |
+ java-pkg_dowar webapps/*.war |
234 |
+ |
235 |
+ # Install daemon files |
236 |
+ newinitd "${FILESDIR}/i2p.init" i2p |
237 |
+ systemd_dounit "${FILESDIR}/i2p.service" |
238 |
+ |
239 |
+ # setup user |
240 |
+ keepdir '/var/lib/i2p/.i2p' |
241 |
+ fowners i2p:i2p '/var/lib/i2p/.i2p' |
242 |
+} |
243 |
+ |
244 |
+pkg_postinst() { |
245 |
+ elog "Custom configuration belongs in ${EPREFIX}/var/lib/i2p/.i2p to avoid being overwritten." |
246 |
+ elog 'I2P can be configured through the web interface at http://localhost:7657/console' |
247 |
+} |