1 |
commit: 0ae393727741e9f4bbb1a092fa442158d15b370c |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 19 15:33:19 2019 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 19 15:44:55 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ae39372 |
7 |
|
8 |
www-servers/tomcat-8.5.40: 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-8.5.40-build.xml.patch | 259 +++++++++++++++++++++ |
15 |
www-servers/tomcat/tomcat-8.5.40.ebuild | 159 +++++++++++++ |
16 |
3 files changed, 419 insertions(+) |
17 |
|
18 |
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest |
19 |
index af2df86dea4..98c5a5f5467 100644 |
20 |
--- a/www-servers/tomcat/Manifest |
21 |
+++ b/www-servers/tomcat/Manifest |
22 |
@@ -2,6 +2,7 @@ DIST apache-tomcat-7.0.93-src.tar.gz 4786577 BLAKE2B 8b72418c98369e0e104c5f51e9d |
23 |
DIST apache-tomcat-7.0.94-src.tar.gz 4966331 BLAKE2B e806baa91ebe4672fb238d6fd461b2055ff90db822b7edb2ad4432334d45cf2c2286639bc12f83987972a47129493bef4ba6ec77e544a93e000282a2d24ae9e8 SHA512 5e8d2fab7145af5677170299bec0ae5ea5fd20b7a539738678a420581f9b53a95a6fbb1caffb54c7222d97edfe8ff34ce6dbb7ba62adb1a61f2bfa6b15c43139 |
24 |
DIST apache-tomcat-8.0.53-src.tar.gz 5057041 BLAKE2B 3a50d2f61baecb5244909972384e36478c69e7592dd35119d8b7b974273c57a4855082f309146ed160144dbdcced3236fd586b047970bd8558bbe7b7e002e9fd SHA512 0b56bc723277b2888896ab34ec3e49cb56bac94ddf1a9b96bd023982e2ffabd5317f63b3c0971afdc8cd7a6364197409df461d22151dbaab3a2be7daf6858b9e |
25 |
DIST apache-tomcat-8.5.39-src.tar.gz 5264067 BLAKE2B 8cd672529660783d3310beae356c32a9392f550ae72f2cdbd60f23c3b532e3adb19a295737fb39e9a2990b14edeff51cedf1f936f32f844e496e751913f2a859 SHA512 ba591290be49a01cec38300c6321b634e3ca7417074b55103afc887b9af3eda942d302aee5f1648e7fa60b5231cd7d83428846e2b55a4964f5cc98c27a844f8d |
26 |
+DIST apache-tomcat-8.5.40-src.tar.gz 5274830 BLAKE2B d96044fecd8f3bd5b971e9bfed79fd7768845f5e760140513c6701f34e0217edfb7718b669e38c3de8554fca5c5af08660c423a266909dab5b0fa089e24c107a SHA512 aef81900ef0af98122d19ef467b06569b46e084c50c14673872b82517b9b61569a2df70f5763bb30100edf73eb73bcf1c81bcb1106018c81ad96f4a019f72ae2 |
27 |
DIST apache-tomcat-9.0.17-src.tar.gz 5670728 BLAKE2B 15f8518ec073a935dec6afdd3a8f9885e7867a0aa033024024bd72b7887011ca169c776f2a4d886d93a73a478f9dcad5f87c31b3a30a88ca913309c51e0f0ec7 SHA512 b5763dae05598c0a4d3638ba02c0627219de20406bddaab86ae3262299f2d9bbda1a5db612cad9fb8a54b2888e9ce1c4be67613d855cfd92b4cee5b85e226602 |
28 |
DIST apache-tomcat-9.0.7-src.tar.gz 5106551 BLAKE2B b4552146a40c2e7cbb2e454fb5ec9169425db5c08cf269c391ec3144425ad388a2b6f003a7c05f59a9fd724fb5c848102890a24fcfd43d5fea3d881141aa7798 SHA512 cb7dc5547671d94f7c7fb0b58eeb94d05128349cdabf576fc8ad837a4bf3ea655a8eab3342245dfa84a9db23f1cbee2918846eedd48e3ca372eecebfef13c5b2 |
29 |
DIST biz.aQute.bnd-4.1.0.jar 9263260 BLAKE2B e251a9d8b653f3e815e6c2f7774d64f1d594f3ce4b2f77956c806698df4d873310067cece68663324b11fcef8d90796b087abb289dbe2a13164a9038da4a6260 SHA512 f5d230358840f4909e35de40343fb7ee50a2d4d4691691f5ea896cfe212a086ad4859e0ee6ed4c315211223663b2fb2c07af7ea88786cedbcd4f891e5a4589ef |
30 |
|
31 |
diff --git a/www-servers/tomcat/files/tomcat-8.5.40-build.xml.patch b/www-servers/tomcat/files/tomcat-8.5.40-build.xml.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..e049d77141e |
34 |
--- /dev/null |
35 |
+++ b/www-servers/tomcat/files/tomcat-8.5.40-build.xml.patch |
36 |
@@ -0,0 +1,259 @@ |
37 |
+diff --git a/build.xml b/build.xml |
38 |
+index 179802b..49ac8c0 100644 |
39 |
+--- a/build.xml |
40 |
++++ b/build.xml |
41 |
+@@ -727,24 +727,29 @@ |
42 |
+ manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> |
43 |
+ |
44 |
+ <!-- Servlet 3.1 Implementation JAR File --> |
45 |
++<!-- |
46 |
+ <jarIt jarfile="${servlet-api.jar}" |
47 |
+ filesDir="${tomcat.classes}" |
48 |
+ filesId="files.servlet-api" |
49 |
+ manifest="${tomcat.manifests}/servlet-api.jar.manifest" |
50 |
+ notice="${tomcat.manifests}/servlet-api.jar.notice" |
51 |
+ license="${tomcat.manifests}/servlet-api.jar.license" /> |
52 |
+- |
53 |
++--> |
54 |
+ <!-- JSP 2.3 Implementation JAR File --> |
55 |
++<!-- |
56 |
+ <jarIt jarfile="${jsp-api.jar}" |
57 |
+ filesDir="${tomcat.classes}" |
58 |
+ filesId="files.jsp-api" |
59 |
+ manifest="${tomcat.manifests}/jsp-api.jar.manifest" /> |
60 |
++--> |
61 |
+ |
62 |
+ <!-- EL 3.0 Implementation JAR File --> |
63 |
++<!-- |
64 |
+ <jarIt jarfile="${el-api.jar}" |
65 |
+ filesDir="${tomcat.classes}" |
66 |
+ filesId="files.el-api" |
67 |
+ manifest="${tomcat.manifests}/el-api.jar.manifest" /> |
68 |
++--> |
69 |
+ |
70 |
+ <!-- WebSocket 1.1 API JAR File --> |
71 |
+ <jarIt jarfile="${websocket-api.jar}" |
72 |
+@@ -836,9 +841,9 @@ |
73 |
+ filesId="files.jasper-el" /> |
74 |
+ |
75 |
+ <!-- Re-packaged Apache Commons DBCP 2--> |
76 |
+- <jarIt jarfile="${tomcat-dbcp.jar}" |
77 |
++<!-- <jarIt jarfile="${tomcat-dbcp.jar}" |
78 |
+ filesDir="${tomcat.classes}" |
79 |
+- filesId="files.tomcat-dbcp" /> |
80 |
++ filesId="files.tomcat-dbcp" /> --> |
81 |
+ |
82 |
+ <!-- i18n JARs --> |
83 |
+ <jar jarfile="${tomcat.build}/lib/tomcat-i18n-es.jar" |
84 |
+@@ -1030,9 +1035,9 @@ |
85 |
+ |
86 |
+ <target name="deploy" depends="package,build-docs,build-tomcat-jdbc,compile-webapp-examples" |
87 |
+ description="Default. Builds a working Tomcat instance"> |
88 |
+- |
89 |
++<!-- |
90 |
+ <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" /> |
91 |
+- |
92 |
++--> |
93 |
+ <!-- Copy scripts --> |
94 |
+ <copy todir="${tomcat.build}/bin"> |
95 |
+ <fileset dir="bin"> |
96 |
+@@ -1092,7 +1097,7 @@ |
97 |
+ <exclude name="${jdt.jar.filename}"/> |
98 |
+ </fileset> |
99 |
+ </delete> |
100 |
+- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> |
101 |
++<!-- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> --> |
102 |
+ |
103 |
+ <!-- Add sources for examples --> |
104 |
+ <antcall target="examples-sources" /> |
105 |
+@@ -1128,7 +1133,7 @@ |
106 |
+ </javac> |
107 |
+ </target> |
108 |
+ |
109 |
+- <target name="build-tomcat-jdbc" depends="package"> |
110 |
++ <target name="build-tomcat-jdbc" depends="package" unless="noget"> |
111 |
+ <!-- build the jdbc-pool jar and source jar--> |
112 |
+ <echo message="Building Tomcat JDBC pool libraries"/> |
113 |
+ <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" |
114 |
+@@ -1143,7 +1148,7 @@ |
115 |
+ <copy file="${tomcat-jdbc.jar}" todir="${tomcat.build}/lib"/> |
116 |
+ </target> |
117 |
+ |
118 |
+- <target name="build-tomcat-jdbc-src"> |
119 |
++ <target name="build-tomcat-jdbc-src" unless="noget"> |
120 |
+ <!-- build the jdbc-pool source jar--> |
121 |
+ <echo message="Building Tomcat JDBC pool src JAR"/> |
122 |
+ <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" |
123 |
+@@ -1246,9 +1251,11 @@ |
124 |
+ |
125 |
+ <copy file="${basedir}/LICENSE" todir="${tomcat.embed}" /> |
126 |
+ <copy file="${basedir}/NOTICE" todir="${tomcat.embed}" /> |
127 |
++<!-- |
128 |
+ <copy file="${tomcat-dbcp.jar}" todir="${tomcat.embed}" |
129 |
+ failonerror="false"/> |
130 |
+ <copy file="${jdt.jar}" todir="${tomcat.embed}" /> |
131 |
++--> |
132 |
+ <copy file="${annotations-api.jar}" todir="${tomcat.embed}" /> |
133 |
+ |
134 |
+ <!-- Note the meta-inf below will work as long as there is only one JAR |
135 |
+@@ -1629,7 +1636,7 @@ |
136 |
+ |
137 |
+ <target name="extras-webservices-prepare" |
138 |
+ depends="extras-prepare" |
139 |
+- description="Prepare to build web services extras package"> |
140 |
++ description="Prepare to build web services extras package" unless="noget"> |
141 |
+ |
142 |
+ <antcall target="downloadfile"> |
143 |
+ <param name="sourcefile" value="${jaxrpc-lib.loc}"/> |
144 |
+@@ -1793,6 +1800,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. |
145 |
+ |
146 |
+ <target name="javadoc" depends="dist-source,extras-webservices-prepare" |
147 |
+ description="Create the Tomcat javadoc" > |
148 |
++<!-- |
149 |
+ <javadoc packagenames="javax.servlet.*" |
150 |
+ excludepackagenames="javax.servlet.jsp.*" |
151 |
+ sourcepath="${tomcat.dist}/src/java" |
152 |
+@@ -1857,6 +1865,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. |
153 |
+ <path location="${ant.core.lib}"/> |
154 |
+ </classpath> |
155 |
+ </javadoc> |
156 |
++--> |
157 |
+ <javadoc packagenames="javax.websocket.*" |
158 |
+ sourcepath="${tomcat.dist}/src/java" |
159 |
+ destdir="${tomcat.dist}/webapps/docs/websocketapi" |
160 |
+@@ -1897,9 +1906,11 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. |
161 |
+ <path refid="tomcat.webservices.classpath"/> |
162 |
+ <path location="${ant.core.lib}"/> |
163 |
+ </classpath> |
164 |
++<!-- |
165 |
+ <link href="../servletapi"/> |
166 |
+ <link href="../jspapi"/> |
167 |
+ <link href="../elapi"/> |
168 |
++--> |
169 |
+ <link href="../websocketapi"/> |
170 |
+ <link href="http://docs.oracle.com/javase/7/docs/api/"/> |
171 |
+ <link href="http://commons.apache.org/proper/commons-io/javadocs/api-release/"/> |
172 |
+@@ -2629,7 +2640,7 @@ skip.installer property in build.properties" /> |
173 |
+ </target> |
174 |
+ |
175 |
+ <target name="download-compile" |
176 |
+- description="Download components necessary to compile" > |
177 |
++ description="Download components necessary to compile" unless="noget" > |
178 |
+ |
179 |
+ <!-- Download Commons Daemon --> |
180 |
+ <antcall target="downloadgz-2"> |
181 |
+@@ -2655,7 +2666,7 @@ skip.installer property in build.properties" /> |
182 |
+ </target> |
183 |
+ |
184 |
+ <target name="download-test-compile" |
185 |
+- description="Download additional components for the tests" > |
186 |
++ description="Download additional components for the tests" unless="noget"> |
187 |
+ |
188 |
+ <antcall target="downloadfile"> |
189 |
+ <param name="sourcefile" value="${junit.loc}"/> |
190 |
+@@ -2733,7 +2744,7 @@ skip.installer property in build.properties" /> |
191 |
+ </target> |
192 |
+ |
193 |
+ <target name="download-dist" |
194 |
+- description="Download additional components for a distribution" > |
195 |
++ description="Download additional components for a distribution" unless="noget"> |
196 |
+ |
197 |
+ <antcall target="downloadfile-2"> |
198 |
+ <param name="sourcefile.1" value="${tomcat-native.loc.1}"/> |
199 |
+@@ -2788,13 +2799,13 @@ skip.installer property in build.properties" /> |
200 |
+ |
201 |
+ <!-- =============== Utility Targets to support downloads ================ --> |
202 |
+ |
203 |
+- <target name="setproxy" if="${proxy.use}"> |
204 |
++ <target name="setproxy" if="${proxy.use}" unless="noget"> |
205 |
+ <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" |
206 |
+ proxyuser="${proxy.user}" proxypassword="${proxy.password}" /> |
207 |
+ <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/> |
208 |
+ </target> |
209 |
+ |
210 |
+- <target name="testexist"> |
211 |
++ <target name="testexist" unless="noget"> |
212 |
+ <echo message="Testing for ${destfile}"/> |
213 |
+ <available file="${destfile}" property="exist"/> |
214 |
+ </target> |
215 |
+@@ -2916,7 +2927,7 @@ skip.installer property in build.properties" /> |
216 |
+ </sequential> |
217 |
+ </macrodef> |
218 |
+ |
219 |
+- <target name="downloadgz" unless="exist" depends="testexist,setproxy"> |
220 |
++ <target name="downloadgz" unless="noget" depends="testexist,setproxy"> |
221 |
+ <!-- Download and extract the package --> |
222 |
+ <local name="temp.file"/> |
223 |
+ <mkdir dir="${base.path}"/> |
224 |
+@@ -2933,7 +2944,7 @@ skip.installer property in build.properties" /> |
225 |
+ <delete file="${temp.file}.tar.gz"/> |
226 |
+ </target> |
227 |
+ |
228 |
+- <target name="downloadgz-2" unless="exist" depends="testexist"> |
229 |
++ <target name="downloadgz-2" unless="noget" depends="testexist"> |
230 |
+ <!-- Download and extract the package from the two alternative locations --> |
231 |
+ <local name="temp.file"/> |
232 |
+ <mkdir dir="${base.path}"/> |
233 |
+@@ -2958,7 +2969,7 @@ skip.installer property in build.properties" /> |
234 |
+ <delete file="${temp.file}.tar.gz"/> |
235 |
+ </target> |
236 |
+ |
237 |
+- <target name="downloadzip" unless="exist" depends="testexist,setproxy"> |
238 |
++ <target name="downloadzip" unless="noget" depends="testexist,setproxy"> |
239 |
+ <!-- Download and extract the package --> |
240 |
+ <local name="temp.file"/> |
241 |
+ <mkdir dir="${base.path}"/> |
242 |
+@@ -2974,7 +2985,7 @@ skip.installer property in build.properties" /> |
243 |
+ <delete file="${temp.file}"/> |
244 |
+ </target> |
245 |
+ |
246 |
+- <target name="downloadzip-2" unless="exist" depends="testexist"> |
247 |
++ <target name="downloadzip-2" unless="noget" depends="testexist"> |
248 |
+ <!-- Download and extract the package from the two alternative locations --> |
249 |
+ <local name="temp.file"/> |
250 |
+ <mkdir dir="${base.path}"/> |
251 |
+@@ -2998,7 +3009,7 @@ skip.installer property in build.properties" /> |
252 |
+ <delete file="${temp.file}"/> |
253 |
+ </target> |
254 |
+ |
255 |
+- <target name="downloadfile" unless="exist" depends="testexist,setproxy"> |
256 |
++ <target name="downloadfile" unless="noget" depends="testexist,setproxy"> |
257 |
+ <!-- Download the file --> |
258 |
+ <local name="temp.file"/> |
259 |
+ <mkdir dir="${base.path}"/> |
260 |
+@@ -3013,7 +3024,7 @@ skip.installer property in build.properties" /> |
261 |
+ <move file="${temp.file}" tofile="${destfile}"/> |
262 |
+ </target> |
263 |
+ |
264 |
+- <target name="downloadfile-2" unless="exist" depends="testexist"> |
265 |
++ <target name="downloadfile-2" unless="noget" depends="testexist"> |
266 |
+ <!-- Download the file from the two alternative locations --> |
267 |
+ <local name="temp.file"/> |
268 |
+ <mkdir dir="${base.path}"/> |
269 |
+@@ -3041,7 +3052,7 @@ skip.installer property in build.properties" /> |
270 |
+ <move file="${temp.file}" tofile="${destfile}"/> |
271 |
+ </target> |
272 |
+ |
273 |
+- <target name="trydownload.check" depends="setproxy"> |
274 |
++ <target name="trydownload.check" depends="setproxy" unless="noget"> |
275 |
+ <condition property="trydownload.run"> |
276 |
+ <and> |
277 |
+ <not> |
278 |
+@@ -3052,7 +3063,7 @@ skip.installer property in build.properties" /> |
279 |
+ </condition> |
280 |
+ </target> |
281 |
+ |
282 |
+- <target name="trydownload" if="trydownload.run" depends="trydownload.check"> |
283 |
++ <target name="trydownload" if="trydownload.run" depends="trydownload.check" unless="noget"> |
284 |
+ <!-- Downloads a file if not yet downloaded and the source URL is available --> |
285 |
+ <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${destfile}" /> |
286 |
+ </target> |
287 |
+@@ -3063,7 +3074,7 @@ skip.installer property in build.properties" /> |
288 |
+ |
289 |
+ <target name="ide-eclipse" |
290 |
+ depends="download-compile, extras-webservices-prepare, download-test-compile" |
291 |
+- description="Prepares the source tree to be built in Eclipse"> |
292 |
++ description="Prepares the source tree to be built in Eclipse" unless="noget"> |
293 |
+ |
294 |
+ <!-- Copy the sample project files into the root directory --> |
295 |
+ <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/> |
296 |
|
297 |
diff --git a/www-servers/tomcat/tomcat-8.5.40.ebuild b/www-servers/tomcat/tomcat-8.5.40.ebuild |
298 |
new file mode 100644 |
299 |
index 00000000000..3d8ad6af692 |
300 |
--- /dev/null |
301 |
+++ b/www-servers/tomcat/tomcat-8.5.40.ebuild |
302 |
@@ -0,0 +1,159 @@ |
303 |
+# Copyright 1999-2019 Gentoo Authors |
304 |
+# Distributed under the terms of the GNU General Public License v2 |
305 |
+ |
306 |
+EAPI=6 |
307 |
+ |
308 |
+JAVA_PKG_IUSE="doc source test" |
309 |
+ |
310 |
+inherit eutils java-pkg-2 java-ant-2 prefix user |
311 |
+ |
312 |
+MY_P="apache-${P}-src" |
313 |
+ |
314 |
+DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container" |
315 |
+HOMEPAGE="https://tomcat.apache.org/" |
316 |
+SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz" |
317 |
+ |
318 |
+LICENSE="Apache-2.0" |
319 |
+SLOT="8.5" |
320 |
+KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" |
321 |
+IUSE="extra-webapps" |
322 |
+ |
323 |
+RESTRICT="test" # can we run them on a production system? |
324 |
+ |
325 |
+ECJ_SLOT="4.5" |
326 |
+SAPI_SLOT="3.1" |
327 |
+ |
328 |
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} |
329 |
+ >=dev-java/tomcat-servlet-api-${SLOT}:${SAPI_SLOT}" |
330 |
+RDEPEND="${COMMON_DEP} |
331 |
+ !<dev-java/tomcat-native-1.1.24 |
332 |
+ >=virtual/jre-1.7" |
333 |
+DEPEND="${COMMON_DEP} |
334 |
+ app-admin/pwgen |
335 |
+ >=dev-java/ant-core-1.9.13 |
336 |
+ >=virtual/jdk-1.7 |
337 |
+ test? ( |
338 |
+ >=dev-java/ant-junit-1.9:0 |
339 |
+ dev-java/easymock:3.2 |
340 |
+ )" |
341 |
+ |
342 |
+S=${WORKDIR}/${MY_P} |
343 |
+ |
344 |
+pkg_setup() { |
345 |
+ java-pkg-2_pkg_setup |
346 |
+ enewgroup tomcat 265 |
347 |
+ enewuser tomcat 265 -1 /dev/null tomcat |
348 |
+} |
349 |
+ |
350 |
+src_prepare() { |
351 |
+ default |
352 |
+ |
353 |
+ find -name '*.jar' -type f -delete -print || die |
354 |
+ |
355 |
+ # Remove bundled servlet-api |
356 |
+ rm -rv java/javax/{el,servlet} || die |
357 |
+ |
358 |
+ eapply "${FILESDIR}/${P}-build.xml.patch" |
359 |
+ |
360 |
+ # For use of catalina.sh in netbeans |
361 |
+ sed -i -e "/^# ----- Execute The Requested Command/ a\ |
362 |
+ CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \ |
363 |
+ bin/catalina.sh || die |
364 |
+ |
365 |
+ java-pkg-2_src_prepare |
366 |
+} |
367 |
+ |
368 |
+JAVA_ANT_REWRITE_CLASSPATH="true" |
369 |
+ |
370 |
+EANT_BUILD_TARGET="deploy" |
371 |
+EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" |
372 |
+EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" |
373 |
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" |
374 |
+EANT_NEEDS_TOOLS="true" |
375 |
+EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false -Dexecute.validate=false" |
376 |
+ |
377 |
+# revisions of the scripts |
378 |
+IM_REV="-r2" |
379 |
+INIT_REV="-r1" |
380 |
+ |
381 |
+src_compile() { |
382 |
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" |
383 |
+ java-pkg-2_src_compile |
384 |
+} |
385 |
+ |
386 |
+src_test() { |
387 |
+ java-pkg-2_src_test |
388 |
+} |
389 |
+ |
390 |
+src_install() { |
391 |
+ local dest="/usr/share/${PN}-${SLOT}" |
392 |
+ |
393 |
+ java-pkg_jarinto "${dest}"/bin |
394 |
+ java-pkg_dojar output/build/bin/*.jar |
395 |
+ exeinto "${dest}"/bin |
396 |
+ doexe output/build/bin/*.sh |
397 |
+ |
398 |
+ java-pkg_jarinto "${dest}"/lib |
399 |
+ java-pkg_dojar output/build/lib/*.jar |
400 |
+ |
401 |
+ dodoc RELEASE-NOTES RUNNING.txt |
402 |
+ use doc && java-pkg_dojavadoc output/dist/webapps/docs/api |
403 |
+ use source && java-pkg_dosrc java/* |
404 |
+ |
405 |
+ ### Webapps ### |
406 |
+ |
407 |
+ # add missing docBase |
408 |
+ local apps="host-manager manager" |
409 |
+ for app in ${apps}; do |
410 |
+ sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ |
411 |
+ output/build/webapps/${app}/META-INF/context.xml || die |
412 |
+ done |
413 |
+ |
414 |
+ insinto "${dest}"/webapps |
415 |
+ doins -r output/build/webapps/{host-manager,manager,ROOT} |
416 |
+ use extra-webapps && doins -r output/build/webapps/{docs,examples} |
417 |
+ |
418 |
+ ### Config ### |
419 |
+ |
420 |
+ # create "logs" directory in $CATALINA_BASE |
421 |
+ # and set correct perms, see #458890 |
422 |
+ dodir "${dest}"/logs |
423 |
+ fperms 0750 "${dest}"/logs |
424 |
+ |
425 |
+ # replace the default pw with a random one, see #92281 |
426 |
+ local randpw="$(pwgen -s -B 15 1)" |
427 |
+ sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die |
428 |
+ |
429 |
+ # prepend gentoo.classpath to common.loader, see #453212 |
430 |
+ sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die |
431 |
+ |
432 |
+ insinto "${dest}" |
433 |
+ doins -r output/build/conf |
434 |
+ |
435 |
+ ### rc ### |
436 |
+ |
437 |
+ cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die |
438 |
+ eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} |
439 |
+ sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die |
440 |
+ |
441 |
+ insinto "${dest}"/gentoo |
442 |
+ doins "${T}"/tomcat.conf |
443 |
+ exeinto "${dest}"/gentoo |
444 |
+ newexe "${T}"/tomcat${INIT_REV}.init tomcat.init |
445 |
+ newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash |
446 |
+} |
447 |
+ |
448 |
+pkg_postinst() { |
449 |
+ elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" |
450 |
+ elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." |
451 |
+ elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" |
452 |
+ |
453 |
+ elog "To manage Tomcat instances, run:" |
454 |
+ elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" |
455 |
+ |
456 |
+ ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" |
457 |
+ ewarn "from upstream binary if you need it. Gentoo Bug # 144276" |
458 |
+ |
459 |
+ einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and" |
460 |
+ einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information." |
461 |
+} |