Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/tomcat/, www-servers/tomcat/files/
Date: Sat, 20 Apr 2019 23:21:44
Message-Id: 1555688702.cc79fc4dd2b8958d02032bc1bf537d318e013021.fordfrog@gentoo
1 commit: cc79fc4dd2b8958d02032bc1bf537d318e013021
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 19 15:44:32 2019 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 19 15:45:02 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc79fc4d
7
8 www-servers/tomcat-9.0.19: bump
9
10 Package-Manager: Portage-2.3.64, Repoman-2.3.12
11 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
12
13 www-servers/tomcat/Manifest | 1 +
14 .../tomcat/files/tomcat-9.0.19-build.xml.patch | 278 +++++++++++++++++++++
15 www-servers/tomcat/tomcat-9.0.19.ebuild | 182 ++++++++++++++
16 3 files changed, 461 insertions(+)
17
18 diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest
19 index 98c5a5f5467..fece6ff50f4 100644
20 --- a/www-servers/tomcat/Manifest
21 +++ b/www-servers/tomcat/Manifest
22 @@ -4,6 +4,7 @@ DIST apache-tomcat-8.0.53-src.tar.gz 5057041 BLAKE2B 3a50d2f61baecb5244909972384
23 DIST apache-tomcat-8.5.39-src.tar.gz 5264067 BLAKE2B 8cd672529660783d3310beae356c32a9392f550ae72f2cdbd60f23c3b532e3adb19a295737fb39e9a2990b14edeff51cedf1f936f32f844e496e751913f2a859 SHA512 ba591290be49a01cec38300c6321b634e3ca7417074b55103afc887b9af3eda942d302aee5f1648e7fa60b5231cd7d83428846e2b55a4964f5cc98c27a844f8d
24 DIST apache-tomcat-8.5.40-src.tar.gz 5274830 BLAKE2B d96044fecd8f3bd5b971e9bfed79fd7768845f5e760140513c6701f34e0217edfb7718b669e38c3de8554fca5c5af08660c423a266909dab5b0fa089e24c107a SHA512 aef81900ef0af98122d19ef467b06569b46e084c50c14673872b82517b9b61569a2df70f5763bb30100edf73eb73bcf1c81bcb1106018c81ad96f4a019f72ae2
25 DIST apache-tomcat-9.0.17-src.tar.gz 5670728 BLAKE2B 15f8518ec073a935dec6afdd3a8f9885e7867a0aa033024024bd72b7887011ca169c776f2a4d886d93a73a478f9dcad5f87c31b3a30a88ca913309c51e0f0ec7 SHA512 b5763dae05598c0a4d3638ba02c0627219de20406bddaab86ae3262299f2d9bbda1a5db612cad9fb8a54b2888e9ce1c4be67613d855cfd92b4cee5b85e226602
26 +DIST apache-tomcat-9.0.19-src.tar.gz 5692733 BLAKE2B 771d8afd50e9032edda09abb5d03e16663a7475d36ee9a5561cd54fbc948169c145ea95bc16ebc690280e5327a5a9868e56a29bd08acb6c10c34fc4e7bf94cc7 SHA512 0461ab9a4e5f021636957b5bc8fbe45714488837e53ca2df4bf9faab5c620270c3041859e034135ccc6e2914ae70e4e38cf4b4353cb17b543ed3dc3a7628fba1
27 DIST apache-tomcat-9.0.7-src.tar.gz 5106551 BLAKE2B b4552146a40c2e7cbb2e454fb5ec9169425db5c08cf269c391ec3144425ad388a2b6f003a7c05f59a9fd724fb5c848102890a24fcfd43d5fea3d881141aa7798 SHA512 cb7dc5547671d94f7c7fb0b58eeb94d05128349cdabf576fc8ad837a4bf3ea655a8eab3342245dfa84a9db23f1cbee2918846eedd48e3ca372eecebfef13c5b2
28 DIST biz.aQute.bnd-4.1.0.jar 9263260 BLAKE2B e251a9d8b653f3e815e6c2f7774d64f1d594f3ce4b2f77956c806698df4d873310067cece68663324b11fcef8d90796b087abb289dbe2a13164a9038da4a6260 SHA512 f5d230358840f4909e35de40343fb7ee50a2d4d4691691f5ea896cfe212a086ad4859e0ee6ed4c315211223663b2fb2c07af7ea88786cedbcd4f891e5a4589ef
29 DIST biz.aQute.bndlib-4.1.0.jar 2897463 BLAKE2B c29a55e07cc103919dca1e938722bf94b107e2989a4a8ae887998152a93b641a659a5209129b992432bcb2673dd4b56ec9a929627530a631db10666f2177c0e4 SHA512 2acccbb323f3d740506e89a74c5affab85e628f9062ee0d799ccd09efe0b55436d8887a46d7d94ad636a2c793632635974f1bbb045e4789391937222c8d00d30
30
31 diff --git a/www-servers/tomcat/files/tomcat-9.0.19-build.xml.patch b/www-servers/tomcat/files/tomcat-9.0.19-build.xml.patch
32 new file mode 100644
33 index 00000000000..a4bcbeb949b
34 --- /dev/null
35 +++ b/www-servers/tomcat/files/tomcat-9.0.19-build.xml.patch
36 @@ -0,0 +1,278 @@
37 +diff --git a/build.xml b/build.xml
38 +index b3b299f..40bf4f8 100644
39 +--- a/build.xml
40 ++++ b/build.xml
41 +@@ -752,6 +752,7 @@
42 + addOSGi="true" />
43 +
44 + <!-- Servlet 4.0 Implementation JAR File -->
45 ++<!--
46 + <jarIt jarfile="${servlet-api.jar}"
47 + filesDir="${tomcat.classes}"
48 + filesId="files.servlet-api"
49 +@@ -759,21 +760,23 @@
50 + notice="${tomcat.manifests}/servlet-api.jar.notice"
51 + license="${tomcat.manifests}/servlet-api.jar.license"
52 + addOSGi="true" />
53 +-
54 ++-->
55 + <!-- JSP 2.3 Implementation JAR File -->
56 ++<!--
57 + <jarIt jarfile="${jsp-api.jar}"
58 + filesDir="${tomcat.classes}"
59 + filesId="files.jsp-api"
60 + manifest="${tomcat.manifests}/jsp-api.jar.manifest"
61 + addOSGi="true" />
62 +-
63 ++-->
64 + <!-- EL 3.0 Implementation JAR File -->
65 ++<!--
66 + <jarIt jarfile="${el-api.jar}"
67 + filesDir="${tomcat.classes}"
68 + filesId="files.el-api"
69 + manifest="${tomcat.manifests}/el-api.jar.manifest"
70 + addOSGi="true" />
71 +-
72 ++-->
73 + <!-- WebSocket 1.1 API JAR File -->
74 + <jarIt jarfile="${websocket-api.jar}"
75 + filesDir="${tomcat.classes}"
76 +@@ -879,10 +882,10 @@
77 + addOSGi="true" />
78 +
79 + <!-- Re-packaged Apache Commons DBCP 2-->
80 +- <jarIt jarfile="${tomcat-dbcp.jar}"
81 ++<!-- <jarIt jarfile="${tomcat-dbcp.jar}"
82 + filesDir="${tomcat.classes}"
83 + filesId="files.tomcat-dbcp"
84 +- addOSGi="true" />
85 ++ addOSGi="true" /> -->
86 +
87 + <!-- i18n JARs -->
88 + <jar jarfile="${tomcat.build}/lib/tomcat-i18n-cs.jar"
89 +@@ -1124,9 +1127,9 @@
90 +
91 + <target name="deploy" depends="package,build-docs,build-tomcat-jdbc,compile-webapp-examples"
92 + description="Default. Builds a working Tomcat instance">
93 +-
94 ++<!--
95 + <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" />
96 +-
97 ++-->
98 + <!-- Copy scripts -->
99 + <copy todir="${tomcat.build}/bin">
100 + <fileset dir="bin">
101 +@@ -1186,7 +1189,7 @@
102 + <exclude name="${jdt.jar.filename}"/>
103 + </fileset>
104 + </delete>
105 +- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/>
106 ++<!-- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> -->
107 +
108 + <!-- Add sources for examples -->
109 + <antcall target="examples-sources" />
110 +@@ -1222,7 +1225,7 @@
111 + </javac>
112 + </target>
113 +
114 +- <target name="build-tomcat-jdbc" depends="package">
115 ++ <target name="build-tomcat-jdbc" depends="package" unless="noget">
116 + <!-- build the jdbc-pool jar and source jar-->
117 + <echo message="Building Tomcat JDBC pool libraries"/>
118 + <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}"
119 +@@ -1237,7 +1240,7 @@
120 + <copy file="${tomcat-jdbc.jar}" todir="${tomcat.build}/lib"/>
121 + </target>
122 +
123 +- <target name="build-tomcat-jdbc-src">
124 ++ <target name="build-tomcat-jdbc-src" unless="noget">
125 + <!-- build the jdbc-pool source jar-->
126 + <echo message="Building Tomcat JDBC pool src JAR"/>
127 + <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}"
128 +@@ -1340,9 +1343,11 @@
129 +
130 + <copy file="${basedir}/LICENSE" todir="${tomcat.embed}" />
131 + <copy file="${basedir}/NOTICE" todir="${tomcat.embed}" />
132 ++<!--
133 + <copy file="${tomcat-dbcp.jar}" todir="${tomcat.embed}"
134 + failonerror="false"/>
135 + <copy file="${jdt.jar}" todir="${tomcat.embed}" />
136 ++-->
137 + <copy file="${annotations-api.jar}" todir="${tomcat.embed}" />
138 +
139 + <!-- Note the meta-inf below will work as long as there is only one JAR
140 +@@ -1849,11 +1854,12 @@
141 + </copy>
142 +
143 + <!-- Source bundles for native components -->
144 ++<!--
145 + <copy tofile="${tomcat.dist}/bin/tomcat-native.tar.gz"
146 + file="${tomcat-native.tar.gz}" />
147 + <copy tofile="${tomcat.dist}/bin/commons-daemon-native.tar.gz"
148 + file="${commons-daemon.native.src.tgz}" />
149 +-
150 ++-->
151 + <!-- platform README files -->
152 + <echo append="false" file="${tomcat.dist}/bin/x64/README">
153 + Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
154 +@@ -1863,6 +1869,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
155 +
156 + <target name="javadoc" depends="dist-source"
157 + description="Create the Tomcat javadoc" >
158 ++<!--
159 + <javadoc packagenames="javax.servlet.*"
160 + excludepackagenames="javax.servlet.jsp.*"
161 + sourcepath="${tomcat.dist}/src/java"
162 +@@ -1924,6 +1931,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
163 + <path location="${ant.core.lib}"/>
164 + </classpath>
165 + </javadoc>
166 ++-->
167 + <javadoc packagenames="javax.websocket.*"
168 + sourcepath="${tomcat.dist}/src/java"
169 + destdir="${tomcat.dist}/webapps/docs/websocketapi"
170 +@@ -1962,9 +1970,11 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
171 + <path refid="compile.classpath"/>
172 + <path location="${ant.core.lib}"/>
173 + </classpath>
174 ++<!--
175 + <link href="../servletapi"/>
176 + <link href="../jspapi"/>
177 + <link href="../elapi"/>
178 ++-->
179 + <link href="../websocketapi"/>
180 + <link href="http://docs.oracle.com/javase/8/docs/api/"/>
181 + <link href="https://commons.apache.org/proper/commons-io/javadocs/api-release/"/>
182 +@@ -2686,7 +2696,7 @@ skip.installer property in build.properties" />
183 + </target>
184 +
185 + <target name="download-compile"
186 +- description="Download components necessary to compile" >
187 ++ description="Download components necessary to compile" unless="noget" >
188 +
189 + <!-- Download Commons Daemon -->
190 + <antcall target="downloadgz-2">
191 +@@ -2741,7 +2751,7 @@ skip.installer property in build.properties" />
192 + </target>
193 +
194 + <target name="download-test-compile"
195 +- description="Download additional components for the tests" >
196 ++ description="Download additional components for the tests" unless="noget">
197 +
198 + <antcall target="downloadfile">
199 + <param name="sourcefile" value="${junit.loc}"/>
200 +@@ -2819,7 +2829,7 @@ skip.installer property in build.properties" />
201 + </target>
202 +
203 + <target name="download-dist"
204 +- description="Download additional components for a distribution" >
205 ++ description="Download additional components for a distribution" unless="noget">
206 +
207 + <antcall target="downloadfile-2">
208 + <param name="sourcefile.1" value="${tomcat-native.loc.1}"/>
209 +@@ -2874,13 +2884,13 @@ skip.installer property in build.properties" />
210 +
211 + <!-- =============== Utility Targets to support downloads ================ -->
212 +
213 +- <target name="setproxy" if="${proxy.use}">
214 ++ <target name="setproxy" if="${proxy.use}" unless="noget">
215 + <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
216 + proxyuser="${proxy.user}" proxypassword="${proxy.password}" />
217 + <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/>
218 + </target>
219 +
220 +- <target name="testexist">
221 ++ <target name="testexist" unless="noget">
222 + <echo message="Testing for ${destfile}"/>
223 + <available file="${destfile}" property="exist"/>
224 + </target>
225 +@@ -3002,7 +3012,7 @@ skip.installer property in build.properties" />
226 + </sequential>
227 + </macrodef>
228 +
229 +- <target name="downloadgz" unless="exist" depends="testexist,setproxy">
230 ++ <target name="downloadgz" unless="noget" depends="testexist,setproxy">
231 + <!-- Download and extract the package -->
232 + <local name="temp.file"/>
233 + <mkdir dir="${base.path}"/>
234 +@@ -3019,7 +3029,7 @@ skip.installer property in build.properties" />
235 + <delete file="${temp.file}.tar.gz"/>
236 + </target>
237 +
238 +- <target name="downloadgz-2" unless="exist" depends="testexist">
239 ++ <target name="downloadgz-2" unless="noget" depends="testexist">
240 + <!-- Download and extract the package from the two alternative locations -->
241 + <local name="temp.file"/>
242 + <mkdir dir="${base.path}"/>
243 +@@ -3044,7 +3054,7 @@ skip.installer property in build.properties" />
244 + <delete file="${temp.file}.tar.gz"/>
245 + </target>
246 +
247 +- <target name="downloadzip" unless="exist" depends="testexist,setproxy">
248 ++ <target name="downloadzip" unless="noget" depends="testexist,setproxy">
249 + <!-- Download and extract the package -->
250 + <local name="temp.file"/>
251 + <mkdir dir="${base.path}"/>
252 +@@ -3060,7 +3070,7 @@ skip.installer property in build.properties" />
253 + <delete file="${temp.file}"/>
254 + </target>
255 +
256 +- <target name="downloadzip-2" unless="exist" depends="testexist">
257 ++ <target name="downloadzip-2" unless="noget" depends="testexist">
258 + <!-- Download and extract the package from the two alternative locations -->
259 + <local name="temp.file"/>
260 + <mkdir dir="${base.path}"/>
261 +@@ -3084,7 +3094,7 @@ skip.installer property in build.properties" />
262 + <delete file="${temp.file}"/>
263 + </target>
264 +
265 +- <target name="downloadfile" unless="exist" depends="testexist,setproxy">
266 ++ <target name="downloadfile" unless="noget" depends="testexist,setproxy">
267 + <!-- Download the file -->
268 + <local name="temp.file"/>
269 + <mkdir dir="${base.path}"/>
270 +@@ -3099,7 +3109,7 @@ skip.installer property in build.properties" />
271 + <move file="${temp.file}" tofile="${destfile}"/>
272 + </target>
273 +
274 +- <target name="downloadfile-2" unless="exist" depends="testexist">
275 ++ <target name="downloadfile-2" unless="noget" depends="testexist">
276 + <!-- Download the file from the two alternative locations -->
277 + <local name="temp.file"/>
278 + <mkdir dir="${base.path}"/>
279 +@@ -3127,7 +3137,7 @@ skip.installer property in build.properties" />
280 + <move file="${temp.file}" tofile="${destfile}"/>
281 + </target>
282 +
283 +- <target name="trydownload.check" depends="setproxy">
284 ++ <target name="trydownload.check" depends="setproxy" unless="noget">
285 + <condition property="trydownload.run">
286 + <and>
287 + <not>
288 +@@ -3138,7 +3148,7 @@ skip.installer property in build.properties" />
289 + </condition>
290 + </target>
291 +
292 +- <target name="trydownload" if="trydownload.run" depends="trydownload.check">
293 ++ <target name="trydownload" if="trydownload.run" depends="trydownload.check" unless="noget">
294 + <!-- Downloads a file if not yet downloaded and the source URL is available -->
295 + <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${destfile}" />
296 + </target>
297 +@@ -3149,7 +3159,7 @@ skip.installer property in build.properties" />
298 +
299 + <target name="ide-eclipse"
300 + depends="download-compile, download-test-compile"
301 +- description="Prepares the source tree to be built in Eclipse">
302 ++ description="Prepares the source tree to be built in Eclipse" unless="noget">
303 +
304 + <!-- Copy the sample project files into the root directory -->
305 + <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/>
306 +@@ -3167,7 +3177,7 @@ Read the Building page on the Apache Tomcat documentation site for details on ho
307 +
308 + <target name="ide-intellij"
309 + depends="download-compile, download-test-compile"
310 +- description="Creates project directory .idea for IntelliJ IDEA">
311 ++ description="Creates project directory .idea for IntelliJ IDEA" unless="noget">
312 +
313 + <copy todir="${tomcat.home}/.idea">
314 + <fileset dir="${tomcat.home}/res/ide-support/idea"/>
315
316 diff --git a/www-servers/tomcat/tomcat-9.0.19.ebuild b/www-servers/tomcat/tomcat-9.0.19.ebuild
317 new file mode 100644
318 index 00000000000..e6cda13656f
319 --- /dev/null
320 +++ b/www-servers/tomcat/tomcat-9.0.19.ebuild
321 @@ -0,0 +1,182 @@
322 +# Copyright 1999-2019 Gentoo Authors
323 +# Distributed under the terms of the GNU General Public License v2
324 +
325 +EAPI=6
326 +
327 +JAVA_PKG_IUSE="doc source test"
328 +
329 +inherit eutils java-pkg-2 java-ant-2 prefix user
330 +
331 +MY_P="apache-${PN}-${PV}-src"
332 +
333 +# Currently we bundle binary versions of bnd.jar and bndlib.jar
334 +# See bugs #203080 and #676116
335 +BND_VERSION="4.1.0"
336 +BND="biz.aQute.bnd-${BND_VERSION}.jar"
337 +BNDLIB="biz.aQute.bndlib-${BND_VERSION}.jar"
338 +
339 +DESCRIPTION="Tomcat Servlet-4.0/JSP-2.4?/EL-3.1?/WebSocket-1.2?/JASPIC-1.1 Container"
340 +HOMEPAGE="https://tomcat.apache.org/"
341 +SRC_URI="mirror://apache/${PN}/tomcat-9/v${PV}/src/${MY_P}.tar.gz
342 + https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bnd/${BND_VERSION}/${BND}
343 + https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/${BND_VERSION}/${BNDLIB}"
344 +
345 +LICENSE="Apache-2.0"
346 +SLOT="9"
347 +KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
348 +IUSE="extra-webapps"
349 +
350 +RESTRICT="test" # can we run them on a production system?
351 +
352 +ECJ_SLOT="4.10"
353 +SAPI_SLOT="4.0"
354 +
355 +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
356 + dev-java/glassfish-xmlrpc-api:0
357 + dev-java/tomcat-servlet-api:${SAPI_SLOT}
358 + dev-java/wsdl4j:0"
359 +RDEPEND="${COMMON_DEP}
360 + !<dev-java/tomcat-native-1.1.24
361 + >=virtual/jre-11"
362 +DEPEND="${COMMON_DEP}
363 + app-admin/pwgen
364 + >=dev-java/ant-core-1.9.13
365 + >=virtual/jdk-11
366 + test? (
367 + >=dev-java/ant-junit-1.9:0
368 + dev-java/easymock:3.2
369 + )"
370 +
371 +S=${WORKDIR}/${MY_P}
372 +
373 +BND_HOME="${S}/tomcat-build-libs/bnd"
374 +BNDLIB_HOME="${S}/tomcat-build-libs/bndlib"
375 +BND_JAR="${BND_HOME}/${BND}"
376 +BNDLIB_JAR="${BNDLIB_HOME}/${BND_LIB}"
377 +
378 +src_unpack() {
379 + unpack ${MY_P}.tar.gz
380 +
381 + mkdir -p "${BND_HOME}" "${BNDLIB_HOME}" || die "Failed to create dir"
382 + ln -s "${DISTDIR}/${BND}" "${BND_HOME}/" || die "Failed to symlink bnd-*.jar"
383 + ln -s "${DISTDIR}/${BND}" "${BNDLIB_HOME}/" || die "Failed to symlink bndlib-*.jar"
384 +}
385 +
386 +pkg_setup() {
387 + java-pkg-2_pkg_setup
388 + enewgroup tomcat 265
389 + enewuser tomcat 265 -1 /dev/null tomcat
390 +}
391 +
392 +src_prepare() {
393 + default
394 +
395 + find -name '*.jar' -type f -delete -print || die
396 +
397 + # Remove bundled servlet-api
398 + rm -rv java/javax/{el,servlet} || die
399 +
400 + eapply "${FILESDIR}/${P}-build.xml.patch"
401 +
402 + # For use of catalina.sh in netbeans
403 + sed -i -e "/^# ----- Execute The Requested Command/ a\
404 + CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \
405 + bin/catalina.sh || die
406 +
407 + java-pkg-2_src_prepare
408 +}
409 +
410 +JAVA_ANT_REWRITE_CLASSPATH="true"
411 +
412 +EANT_BUILD_TARGET="deploy"
413 +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT},glassfish-xmlrpc-api,wsdl4j"
414 +EANT_TEST_GENTOO_CLASSPATH="easymock-3.2"
415 +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
416 +EANT_NEEDS_TOOLS="true"
417 +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false -Dbnd.jar=${BND_JAR} -Dbndlib.jar=${BNDLIB_JAR}"
418 +
419 +# revisions of the scripts
420 +IM_REV="-r2"
421 +INIT_REV="-r1"
422 +
423 +src_compile() {
424 + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
425 + java-pkg-2_src_compile
426 +}
427 +
428 +src_test() {
429 + java-pkg-2_src_test
430 +}
431 +
432 +src_install() {
433 + local dest="/usr/share/${PN}-${SLOT}"
434 +
435 + java-pkg_jarinto "${dest}"/bin
436 + java-pkg_dojar output/build/bin/*.jar
437 + exeinto "${dest}"/bin
438 + doexe output/build/bin/*.sh
439 +
440 + java-pkg_jarinto "${dest}"/lib
441 + java-pkg_dojar output/build/lib/*.jar
442 +
443 + dodoc RELEASE-NOTES RUNNING.txt
444 + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api
445 + use source && java-pkg_dosrc java/*
446 +
447 + ### Webapps ###
448 +
449 + # add missing docBase
450 + local apps="host-manager manager"
451 + for app in ${apps}; do
452 + sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \
453 + output/build/webapps/${app}/META-INF/context.xml || die
454 + done
455 +
456 + insinto "${dest}"/webapps
457 + doins -r output/build/webapps/{host-manager,manager,ROOT}
458 + use extra-webapps && doins -r output/build/webapps/{docs,examples}
459 +
460 + ### Config ###
461 +
462 + # create "logs" directory in $CATALINA_BASE
463 + # and set correct perms, see #458890
464 + dodir "${dest}"/logs
465 + fperms 0750 "${dest}"/logs
466 +
467 + # replace the default pw with a random one, see #92281
468 + local randpw="$(pwgen -s -B 15 1)"
469 + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
470 +
471 + # prepend gentoo.classpath to common.loader, see #453212
472 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die
473 +
474 + insinto "${dest}"
475 + doins -r output/build/conf
476 +
477 + ### rc ###
478 +
479 + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die
480 + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash}
481 + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die
482 +
483 + insinto "${dest}"/gentoo
484 + doins "${T}"/tomcat.conf
485 + exeinto "${dest}"/gentoo
486 + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init
487 + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash
488 +}
489 +
490 +pkg_postinst() {
491 + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version"
492 + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat."
493 + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat"
494 +
495 + elog "To manage Tomcat instances, run:"
496 + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help"
497 +
498 + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar"
499 + ewarn "from upstream binary if you need it. Gentoo Bug # 144276"
500 +
501 + einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and"
502 + einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information."
503 +}