1 |
commit: dfdf571a02a8a4393bf38d2958cb2b568735d879 |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 23 12:30:29 2019 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 23 12:49:07 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfdf571a |
7 |
|
8 |
www-servers/tomcat-8.0.53: bump |
9 |
|
10 |
Package-Manager: Portage-2.3.58, 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.0.53-build.xml.patch | 270 +++++++++++++++++++++ |
15 |
www-servers/tomcat/tomcat-8.0.53.ebuild | 159 ++++++++++++ |
16 |
3 files changed, 430 insertions(+) |
17 |
|
18 |
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest |
19 |
index cd173bd0a25..f8fabd0b378 100644 |
20 |
--- a/www-servers/tomcat/Manifest |
21 |
+++ b/www-servers/tomcat/Manifest |
22 |
@@ -1,5 +1,6 @@ |
23 |
DIST apache-tomcat-7.0.90-src.tar.gz 4752747 BLAKE2B 5062ead2756aa8461de5e8387f14838661c082b6e397934fc92c91403f1950d84d79f05b9d4420a973d1b4921515b66c2c847550e1a06d75e722b62d9aa3f8bd SHA512 b32cb6902866ef72337c721d99d77f1a645311bb7694f51b82f7acec500c6197df15fb41be444fc6089652e8c825fb193f1a9de8c1b9b6fabd9d95f784565f6a |
24 |
DIST apache-tomcat-7.0.92-src.tar.gz 4778943 BLAKE2B d11b01219a25c303ce791d965908c79cd48b5c97e1f0bed81ae60e0fcae3c4b23906f652eaf1d2922db7a57e68ee9f5a09ef017b7f1b89ed6c2ab81a477a810e SHA512 8cbcaf6d8dcda5ad8bd667582a39e91c1feaa4cc7216cafc23b9f5cf005cce9af24473c1c9d573f4da26c88ea68520a113dc0a7e2a50823f3ba3bb1510ec9e0a |
25 |
DIST apache-tomcat-8.0.52-src.tar.gz 5039683 BLAKE2B 36318d0ae50fbca3f2a97e0210d0a8da8314f1ef79d0b047971bca30a5b0cc937faf013b5090f6e6b8aec4127b6185dc54ae589f5b57143b62c71c09f8bd5e9d SHA512 6d846213db0b15f9add8d80f30f304afdaf879ab6d7f85d212183a93f4f360ebfeeb079813bdea83cbd13f507504473028bbf8279e89b800b6f150b83086fa56 |
26 |
+DIST apache-tomcat-8.0.53-src.tar.gz 5057041 BLAKE2B 3a50d2f61baecb5244909972384e36478c69e7592dd35119d8b7b974273c57a4855082f309146ed160144dbdcced3236fd586b047970bd8558bbe7b7e002e9fd SHA512 0b56bc723277b2888896ab34ec3e49cb56bac94ddf1a9b96bd023982e2ffabd5317f63b3c0971afdc8cd7a6364197409df461d22151dbaab3a2be7daf6858b9e |
27 |
DIST apache-tomcat-8.5.31-src.tar.gz 5154531 BLAKE2B cce0388e5c8c5fb5fcb3dba3b5961dc21d9f19d9a2f6177660a41410bddf241f73dda1e52c3875e28cfa13041c85a458a92c9a23c509b645f042cfa472081fde SHA512 659137ef4809af329ae4dd6f5825a603c1408ef3e48153abe7480a722e7f4bebef68a64af9cbef4a4ad9a7e8da76494f825035bbadbb983a097525f476f32f33 |
28 |
DIST apache-tomcat-9.0.7-src.tar.gz 5106551 BLAKE2B b4552146a40c2e7cbb2e454fb5ec9169425db5c08cf269c391ec3144425ad388a2b6f003a7c05f59a9fd724fb5c848102890a24fcfd43d5fea3d881141aa7798 SHA512 cb7dc5547671d94f7c7fb0b58eeb94d05128349cdabf576fc8ad837a4bf3ea655a8eab3342245dfa84a9db23f1cbee2918846eedd48e3ca372eecebfef13c5b2 |
29 |
|
30 |
diff --git a/www-servers/tomcat/files/tomcat-8.0.53-build.xml.patch b/www-servers/tomcat/files/tomcat-8.0.53-build.xml.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..eb12467b66f |
33 |
--- /dev/null |
34 |
+++ b/www-servers/tomcat/files/tomcat-8.0.53-build.xml.patch |
35 |
@@ -0,0 +1,270 @@ |
36 |
+diff --git a/build.xml b/build.xml |
37 |
+index 5ee1d86..ade4446 100644 |
38 |
+--- a/build.xml |
39 |
++++ b/build.xml |
40 |
+@@ -723,24 +723,29 @@ |
41 |
+ manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> |
42 |
+ |
43 |
+ <!-- Servlet 3.1 Implementation JAR File --> |
44 |
++<!-- |
45 |
+ <jarIt jarfile="${servlet-api.jar}" |
46 |
+ filesDir="${tomcat.classes}" |
47 |
+ filesId="files.servlet-api" |
48 |
+ manifest="${tomcat.manifests}/servlet-api.jar.manifest" |
49 |
+ notice="${tomcat.manifests}/servlet-api.jar.notice" |
50 |
+ license="${tomcat.manifests}/servlet-api.jar.license" /> |
51 |
+- |
52 |
++--> |
53 |
+ <!-- JSP 2.3 Implementation JAR File --> |
54 |
++<!-- |
55 |
+ <jarIt jarfile="${jsp-api.jar}" |
56 |
+ filesDir="${tomcat.classes}" |
57 |
+ filesId="files.jsp-api" |
58 |
+ manifest="${tomcat.manifests}/jsp-api.jar.manifest" /> |
59 |
++--> |
60 |
+ |
61 |
+ <!-- EL 3.0 Implementation JAR File --> |
62 |
++<!-- |
63 |
+ <jarIt jarfile="${el-api.jar}" |
64 |
+ filesDir="${tomcat.classes}" |
65 |
+ filesId="files.el-api" |
66 |
+ manifest="${tomcat.manifests}/el-api.jar.manifest" /> |
67 |
++--> |
68 |
+ |
69 |
+ <!-- WebSocket 1.1 API JAR File --> |
70 |
+ <jarIt jarfile="${websocket-api.jar}" |
71 |
+@@ -1010,9 +1015,9 @@ |
72 |
+ |
73 |
+ <target name="deploy" depends="package,build-docs,build-tomcat-jdbc,compile-webapp-examples" |
74 |
+ description="Default. Builds a working Tomcat instance"> |
75 |
+- |
76 |
++<!-- |
77 |
+ <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" /> |
78 |
+- |
79 |
++--> |
80 |
+ <!-- Copy scripts --> |
81 |
+ <copy todir="${tomcat.build}/bin"> |
82 |
+ <fileset dir="bin"> |
83 |
+@@ -1072,7 +1077,7 @@ |
84 |
+ <exclude name="${jdt.jar.filename}"/> |
85 |
+ </fileset> |
86 |
+ </delete> |
87 |
+- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> |
88 |
++<!-- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> --> |
89 |
+ |
90 |
+ <!-- Add sources for examples --> |
91 |
+ <antcall target="examples-sources" /> |
92 |
+@@ -1108,7 +1113,7 @@ |
93 |
+ </javac> |
94 |
+ </target> |
95 |
+ |
96 |
+- <target name="build-tomcat-jdbc" depends="package"> |
97 |
++ <target name="build-tomcat-jdbc" depends="package" unless="noget"> |
98 |
+ <!-- build the jdbc-pool jar and source jar--> |
99 |
+ <echo message="Building Tomcat JDBC pool libraries"/> |
100 |
+ <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" |
101 |
+@@ -1123,7 +1128,7 @@ |
102 |
+ <copy file="${tomcat-jdbc.jar}" todir="${tomcat.build}/lib"/> |
103 |
+ </target> |
104 |
+ |
105 |
+- <target name="build-tomcat-jdbc-src"> |
106 |
++ <target name="build-tomcat-jdbc-src" unless="noget"> |
107 |
+ <!-- build the jdbc-pool source jar--> |
108 |
+ <echo message="Building Tomcat JDBC pool src JAR"/> |
109 |
+ <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" |
110 |
+@@ -1227,9 +1232,11 @@ |
111 |
+ |
112 |
+ <copy file="${basedir}/LICENSE" todir="${tomcat.embed}" /> |
113 |
+ <copy file="${basedir}/NOTICE" todir="${tomcat.embed}" /> |
114 |
++<!-- |
115 |
+ <copy file="${tomcat-dbcp.jar}" todir="${tomcat.embed}" |
116 |
+ failonerror="false"/> |
117 |
+ <copy file="${jdt.jar}" todir="${tomcat.embed}" /> |
118 |
++--> |
119 |
+ <copy file="${annotations-api.jar}" todir="${tomcat.embed}" /> |
120 |
+ |
121 |
+ <!-- Note the meta-inf below will work as long as there is only one JAR |
122 |
+@@ -1621,7 +1628,7 @@ |
123 |
+ |
124 |
+ <target name="extras-commons-logging-prepare" |
125 |
+ depends="extras-prepare" |
126 |
+- description="Prepare to build web services extras package"> |
127 |
++ description="Prepare to build web services extras package" unless="noget"> |
128 |
+ |
129 |
+ <antcall target="downloadfile-2"> |
130 |
+ <param name="sourcefile.1" value="${commons-logging-src.loc.1}"/> |
131 |
+@@ -1775,7 +1782,7 @@ |
132 |
+ |
133 |
+ <target name="extras-webservices-prepare" |
134 |
+ depends="extras-prepare" |
135 |
+- description="Prepare to build web services extras package"> |
136 |
++ description="Prepare to build web services extras package" unless="noget"> |
137 |
+ |
138 |
+ <antcall target="downloadfile"> |
139 |
+ <param name="sourcefile" value="${jaxrpc-lib.loc}"/> |
140 |
+@@ -1970,11 +1977,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 |
+@@ -1984,6 +1992,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. |
155 |
+ |
156 |
+ <target name="javadoc" depends="dist-source,extras-webservices-prepare" |
157 |
+ description="Create the Tomcat javadoc" > |
158 |
++<!-- |
159 |
+ <javadoc packagenames="javax.servlet.*" |
160 |
+ excludepackagenames="javax.servlet.jsp.*" |
161 |
+ sourcepath="${tomcat.dist}/src/java" |
162 |
+@@ -2045,6 +2054,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 |
+@@ -2083,9 +2093,11 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. |
171 |
+ <path refid="tomcat.webservices.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/7/docs/api/"/> |
181 |
+ <link href="https://commons.apache.org/proper/commons-io/javadocs/api-release/"/> |
182 |
+@@ -2821,7 +2833,7 @@ skip.installer property in build.properties" /> |
183 |
+ </target> |
184 |
+ |
185 |
+ <target name="download-compile" |
186 |
+- description="Download (and build) components necessary to compile" > |
187 |
++ description="Download (and build) components necessary to compile" unless="noget"> |
188 |
+ |
189 |
+ <!-- Download Commons Daemon --> |
190 |
+ <antcall target="downloadgz-2"> |
191 |
+@@ -2847,7 +2859,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 |
+@@ -2925,7 +2937,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 |
+@@ -2980,13 +2992,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="noger"> |
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 |
+@@ -3108,7 +3120,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 |
+@@ -3125,7 +3137,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 |
+@@ -3150,7 +3162,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 |
+@@ -3166,7 +3178,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 |
+@@ -3190,7 +3202,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 |
+@@ -3205,7 +3217,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 |
+@@ -3233,7 +3245,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 |
+@@ -3244,7 +3256,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 |
+@@ -3255,7 +3267,7 @@ skip.installer property in build.properties" /> |
298 |
+ |
299 |
+ <target name="ide-eclipse" |
300 |
+ depends="download-compile, extras-webservices-prepare, 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 |
|
307 |
diff --git a/www-servers/tomcat/tomcat-8.0.53.ebuild b/www-servers/tomcat/tomcat-8.0.53.ebuild |
308 |
new file mode 100644 |
309 |
index 00000000000..232ee0051c6 |
310 |
--- /dev/null |
311 |
+++ b/www-servers/tomcat/tomcat-8.0.53.ebuild |
312 |
@@ -0,0 +1,159 @@ |
313 |
+# Copyright 1999-2019 Gentoo Authors |
314 |
+# Distributed under the terms of the GNU General Public License v2 |
315 |
+ |
316 |
+EAPI=6 |
317 |
+ |
318 |
+JAVA_PKG_IUSE="doc source test" |
319 |
+ |
320 |
+inherit eutils java-pkg-2 java-ant-2 prefix user |
321 |
+ |
322 |
+MY_P="apache-${P}-src" |
323 |
+ |
324 |
+DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1 Container" |
325 |
+HOMEPAGE="https://tomcat.apache.org/" |
326 |
+SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz" |
327 |
+ |
328 |
+LICENSE="Apache-2.0" |
329 |
+SLOT="8" |
330 |
+KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" |
331 |
+IUSE="extra-webapps" |
332 |
+ |
333 |
+RESTRICT="test" # can we run them on a production system? |
334 |
+ |
335 |
+ECJ_SLOT="4.5" |
336 |
+SAPI_SLOT="3.1" |
337 |
+ |
338 |
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} |
339 |
+ dev-java/tomcat-servlet-api:${SAPI_SLOT}" |
340 |
+RDEPEND="${COMMON_DEP} |
341 |
+ !<dev-java/tomcat-native-1.1.24 |
342 |
+ >=virtual/jre-1.7" |
343 |
+DEPEND="${COMMON_DEP} |
344 |
+ app-admin/pwgen |
345 |
+ >=dev-java/ant-core-1.9.13 |
346 |
+ >=virtual/jdk-1.7 |
347 |
+ test? ( |
348 |
+ >=dev-java/ant-junit-1.9:0 |
349 |
+ dev-java/easymock:3.2 |
350 |
+ )" |
351 |
+ |
352 |
+S=${WORKDIR}/${MY_P} |
353 |
+ |
354 |
+pkg_setup() { |
355 |
+ java-pkg-2_pkg_setup |
356 |
+ enewgroup tomcat 265 |
357 |
+ enewuser tomcat 265 -1 /dev/null tomcat |
358 |
+} |
359 |
+ |
360 |
+src_prepare() { |
361 |
+ default |
362 |
+ |
363 |
+ find -name '*.jar' -type f -delete -print || die |
364 |
+ |
365 |
+ # Remove bundled servlet-api |
366 |
+ rm -rv java/javax/{el,servlet} || die |
367 |
+ |
368 |
+ eapply "${FILESDIR}/${P}-build.xml.patch" |
369 |
+ |
370 |
+ # For use of catalina.sh in netbeans |
371 |
+ sed -i -e "/^# ----- Execute The Requested Command/ a\ |
372 |
+ CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \ |
373 |
+ bin/catalina.sh || die |
374 |
+ |
375 |
+ java-pkg-2_src_prepare |
376 |
+} |
377 |
+ |
378 |
+JAVA_ANT_REWRITE_CLASSPATH="true" |
379 |
+ |
380 |
+EANT_BUILD_TARGET="deploy" |
381 |
+EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" |
382 |
+EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" |
383 |
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" |
384 |
+EANT_NEEDS_TOOLS="true" |
385 |
+EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false" |
386 |
+ |
387 |
+# revisions of the scripts |
388 |
+IM_REV="-r2" |
389 |
+INIT_REV="-r1" |
390 |
+ |
391 |
+src_compile() { |
392 |
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" |
393 |
+ java-pkg-2_src_compile |
394 |
+} |
395 |
+ |
396 |
+src_test() { |
397 |
+ java-pkg-2_src_test |
398 |
+} |
399 |
+ |
400 |
+src_install() { |
401 |
+ local dest="/usr/share/${PN}-${SLOT}" |
402 |
+ |
403 |
+ java-pkg_jarinto "${dest}"/bin |
404 |
+ java-pkg_dojar output/build/bin/*.jar |
405 |
+ exeinto "${dest}"/bin |
406 |
+ doexe output/build/bin/*.sh |
407 |
+ |
408 |
+ java-pkg_jarinto "${dest}"/lib |
409 |
+ java-pkg_dojar output/build/lib/*.jar |
410 |
+ |
411 |
+ dodoc RELEASE-NOTES RUNNING.txt |
412 |
+ use doc && java-pkg_dojavadoc output/dist/webapps/docs/api |
413 |
+ use source && java-pkg_dosrc java/* |
414 |
+ |
415 |
+ ### Webapps ### |
416 |
+ |
417 |
+ # add missing docBase |
418 |
+ local apps="host-manager manager" |
419 |
+ for app in ${apps}; do |
420 |
+ sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ |
421 |
+ output/build/webapps/${app}/META-INF/context.xml || die |
422 |
+ done |
423 |
+ |
424 |
+ insinto "${dest}"/webapps |
425 |
+ doins -r output/build/webapps/{host-manager,manager,ROOT} |
426 |
+ use extra-webapps && doins -r output/build/webapps/{docs,examples} |
427 |
+ |
428 |
+ ### Config ### |
429 |
+ |
430 |
+ # create "logs" directory in $CATALINA_BASE |
431 |
+ # and set correct perms, see #458890 |
432 |
+ dodir "${dest}"/logs |
433 |
+ fperms 0750 "${dest}"/logs |
434 |
+ |
435 |
+ # replace the default pw with a random one, see #92281 |
436 |
+ local randpw="$(pwgen -s -B 15 1)" |
437 |
+ sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die |
438 |
+ |
439 |
+ # prepend gentoo.classpath to common.loader, see #453212 |
440 |
+ sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die |
441 |
+ |
442 |
+ insinto "${dest}" |
443 |
+ doins -r output/build/conf |
444 |
+ |
445 |
+ ### rc ### |
446 |
+ |
447 |
+ cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die |
448 |
+ eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} |
449 |
+ sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die |
450 |
+ |
451 |
+ insinto "${dest}"/gentoo |
452 |
+ doins "${T}"/tomcat.conf |
453 |
+ exeinto "${dest}"/gentoo |
454 |
+ newexe "${T}"/tomcat${INIT_REV}.init tomcat.init |
455 |
+ newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash |
456 |
+} |
457 |
+ |
458 |
+pkg_postinst() { |
459 |
+ elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" |
460 |
+ elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." |
461 |
+ elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" |
462 |
+ |
463 |
+ elog "To manage Tomcat instances, run:" |
464 |
+ elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" |
465 |
+ |
466 |
+ ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" |
467 |
+ ewarn "from upstream binary if you need it. Gentoo Bug # 144276" |
468 |
+ |
469 |
+ einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and" |
470 |
+ einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information." |
471 |
+} |