1 |
commit: 3f503f9d1861e0f1068008143b7c824918ddc7a3 |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 23 14:50:07 2019 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 23 14:54:11 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f503f9d |
7 |
|
8 |
www-servers/tomcat-9.0.14: 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 | 3 + |
14 |
.../tomcat/files/tomcat-9.0.14-build.xml.patch | 265 +++++++++++++++++++++ |
15 |
www-servers/tomcat/tomcat-9.0.14.ebuild | 180 ++++++++++++++ |
16 |
3 files changed, 448 insertions(+) |
17 |
|
18 |
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest |
19 |
index f436109e542..efaea0ce320 100644 |
20 |
--- a/www-servers/tomcat/Manifest |
21 |
+++ b/www-servers/tomcat/Manifest |
22 |
@@ -4,4 +4,7 @@ DIST apache-tomcat-8.0.52-src.tar.gz 5039683 BLAKE2B 36318d0ae50fbca3f2a97e0210d |
23 |
DIST apache-tomcat-8.0.53-src.tar.gz 5057041 BLAKE2B 3a50d2f61baecb5244909972384e36478c69e7592dd35119d8b7b974273c57a4855082f309146ed160144dbdcced3236fd586b047970bd8558bbe7b7e002e9fd SHA512 0b56bc723277b2888896ab34ec3e49cb56bac94ddf1a9b96bd023982e2ffabd5317f63b3c0971afdc8cd7a6364197409df461d22151dbaab3a2be7daf6858b9e |
24 |
DIST apache-tomcat-8.5.31-src.tar.gz 5154531 BLAKE2B cce0388e5c8c5fb5fcb3dba3b5961dc21d9f19d9a2f6177660a41410bddf241f73dda1e52c3875e28cfa13041c85a458a92c9a23c509b645f042cfa472081fde SHA512 659137ef4809af329ae4dd6f5825a603c1408ef3e48153abe7480a722e7f4bebef68a64af9cbef4a4ad9a7e8da76494f825035bbadbb983a097525f476f32f33 |
25 |
DIST apache-tomcat-8.5.37-src.tar.gz 5233414 BLAKE2B 1848180c3e0a3f4559e5c232bea8bad6d05f09d9c4f2f9f903178012b7b8837d395a5ac73c8ac0504fbd3d1df3c2dc785022e1c97da4441cfdcf8b790170ff7c SHA512 29ddbf7bfef19441a8a043020b5f1149d12590dac8120012a2167b6892e3db7c644990e49ba14cc4b4c7339faed65f010a7b24d660db0fb8adde34f032099cec |
26 |
+DIST apache-tomcat-9.0.14-src.tar.gz 5472704 BLAKE2B ee533afd733dacbe4a20baadb4c5dc9fa7620d695c1c57b1662894945731f978508b45ef0d8169068c13ba862804868f12d3e494873643589b9f57bc9ec0a342 SHA512 46119f6ae9003b7a178dd5158c1eae3b5116461e73c5d78cd763bff82b80f282ff08cee5175cf850d3f209af900677e93bab31c556035a6eaf6aae86a5d42fc6 |
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.14-build.xml.patch b/www-servers/tomcat/files/tomcat-9.0.14-build.xml.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..c3f3e71c0eb |
34 |
--- /dev/null |
35 |
+++ b/www-servers/tomcat/files/tomcat-9.0.14-build.xml.patch |
36 |
@@ -0,0 +1,265 @@ |
37 |
+diff --git a/build.xml b/build.xml |
38 |
+index 971f912..1e43ae0 100644 |
39 |
+--- a/build.xml |
40 |
++++ b/build.xml |
41 |
+@@ -769,6 +769,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 |
+@@ -776,21 +777,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 |
+@@ -1131,9 +1134,9 @@ |
77 |
+ |
78 |
+ <target name="deploy" depends="package,build-docs,build-tomcat-jdbc,compile-webapp-examples" |
79 |
+ description="Default. Builds a working Tomcat instance"> |
80 |
+- |
81 |
++<!-- |
82 |
+ <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" /> |
83 |
+- |
84 |
++--> |
85 |
+ <!-- Copy scripts --> |
86 |
+ <copy todir="${tomcat.build}/bin"> |
87 |
+ <fileset dir="bin"> |
88 |
+@@ -1193,7 +1196,7 @@ |
89 |
+ <exclude name="${jdt.jar.filename}"/> |
90 |
+ </fileset> |
91 |
+ </delete> |
92 |
+- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> |
93 |
++<!-- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> --> |
94 |
+ |
95 |
+ <!-- Add sources for examples --> |
96 |
+ <antcall target="examples-sources" /> |
97 |
+@@ -1229,7 +1232,7 @@ |
98 |
+ </javac> |
99 |
+ </target> |
100 |
+ |
101 |
+- <target name="build-tomcat-jdbc" depends="package"> |
102 |
++ <target name="build-tomcat-jdbc" depends="package" unless="noget"> |
103 |
+ <!-- build the jdbc-pool jar and source jar--> |
104 |
+ <echo message="Building Tomcat JDBC pool libraries"/> |
105 |
+ <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" |
106 |
+@@ -1244,7 +1247,7 @@ |
107 |
+ <copy file="${tomcat-jdbc.jar}" todir="${tomcat.build}/lib"/> |
108 |
+ </target> |
109 |
+ |
110 |
+- <target name="build-tomcat-jdbc-src"> |
111 |
++ <target name="build-tomcat-jdbc-src" unless="noget"> |
112 |
+ <!-- build the jdbc-pool source jar--> |
113 |
+ <echo message="Building Tomcat JDBC pool src JAR"/> |
114 |
+ <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" |
115 |
+@@ -1348,9 +1351,11 @@ |
116 |
+ |
117 |
+ <copy file="${basedir}/LICENSE" todir="${tomcat.embed}" /> |
118 |
+ <copy file="${basedir}/NOTICE" todir="${tomcat.embed}" /> |
119 |
++<!-- |
120 |
+ <copy file="${tomcat-dbcp.jar}" todir="${tomcat.embed}" |
121 |
+ failonerror="false"/> |
122 |
+ <copy file="${jdt.jar}" todir="${tomcat.embed}" /> |
123 |
++--> |
124 |
+ <copy file="${annotations-api.jar}" todir="${tomcat.embed}" /> |
125 |
+ |
126 |
+ <!-- Note the meta-inf below will work as long as there is only one JAR |
127 |
+@@ -1734,7 +1739,7 @@ |
128 |
+ |
129 |
+ <target name="extras-webservices-prepare" |
130 |
+ depends="extras-prepare" |
131 |
+- description="Prepare to build web services extras package"> |
132 |
++ description="Prepare to build web services extras package" unless="noget"> |
133 |
+ |
134 |
+ <antcall target="downloadfile"> |
135 |
+ <param name="sourcefile" value="${jaxrpc-lib.loc}"/> |
136 |
+@@ -1884,11 +1889,12 @@ |
137 |
+ </copy> |
138 |
+ |
139 |
+ <!-- Source bundles for native components --> |
140 |
++<!-- |
141 |
+ <copy tofile="${tomcat.dist}/bin/tomcat-native.tar.gz" |
142 |
+ file="${tomcat-native.tar.gz}" /> |
143 |
+ <copy tofile="${tomcat.dist}/bin/commons-daemon-native.tar.gz" |
144 |
+ file="${commons-daemon.native.src.tgz}" /> |
145 |
+- |
146 |
++--> |
147 |
+ <!-- platform README files --> |
148 |
+ <echo append="false" file="${tomcat.dist}/bin/x64/README"> |
149 |
+ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. |
150 |
+@@ -1898,6 +1904,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. |
151 |
+ |
152 |
+ <target name="javadoc" depends="dist-source,extras-webservices-prepare" |
153 |
+ description="Create the Tomcat javadoc" > |
154 |
++<!-- |
155 |
+ <javadoc packagenames="javax.servlet.*" |
156 |
+ excludepackagenames="javax.servlet.jsp.*" |
157 |
+ sourcepath="${tomcat.dist}/src/java" |
158 |
+@@ -1962,6 +1969,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. |
159 |
+ <path location="${ant.core.lib}"/> |
160 |
+ </classpath> |
161 |
+ </javadoc> |
162 |
++--> |
163 |
+ <javadoc packagenames="javax.websocket.*" |
164 |
+ sourcepath="${tomcat.dist}/src/java" |
165 |
+ destdir="${tomcat.dist}/webapps/docs/websocketapi" |
166 |
+@@ -2002,9 +2010,11 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. |
167 |
+ <path refid="tomcat.webservices.classpath"/> |
168 |
+ <path location="${ant.core.lib}"/> |
169 |
+ </classpath> |
170 |
++<!-- |
171 |
+ <link href="../servletapi"/> |
172 |
+ <link href="../jspapi"/> |
173 |
+ <link href="../elapi"/> |
174 |
++--> |
175 |
+ <link href="../websocketapi"/> |
176 |
+ <link href="http://docs.oracle.com/javase/8/docs/api/"/> |
177 |
+ <link href="https://commons.apache.org/proper/commons-io/javadocs/api-release/"/> |
178 |
+@@ -2727,7 +2737,7 @@ skip.installer property in build.properties" /> |
179 |
+ </target> |
180 |
+ |
181 |
+ <target name="download-compile" |
182 |
+- description="Download (and build) components necessary to compile" > |
183 |
++ description="Download (and build) components necessary to compile" unless="noget"> |
184 |
+ |
185 |
+ <!-- Download Commons Daemon --> |
186 |
+ <antcall target="downloadgz-2"> |
187 |
+@@ -2763,7 +2773,7 @@ skip.installer property in build.properties" /> |
188 |
+ </target> |
189 |
+ |
190 |
+ <target name="download-test-compile" |
191 |
+- description="Download additional components for the tests" > |
192 |
++ description="Download additional components for the tests" unless="noget"> |
193 |
+ |
194 |
+ <antcall target="downloadfile"> |
195 |
+ <param name="sourcefile" value="${junit.loc}"/> |
196 |
+@@ -2841,7 +2851,7 @@ skip.installer property in build.properties" /> |
197 |
+ </target> |
198 |
+ |
199 |
+ <target name="download-dist" |
200 |
+- description="Download additional components for a distribution" > |
201 |
++ description="Download additional components for a distribution" unless="noget"> |
202 |
+ |
203 |
+ <antcall target="downloadfile-2"> |
204 |
+ <param name="sourcefile.1" value="${tomcat-native.loc.1}"/> |
205 |
+@@ -2896,13 +2906,13 @@ skip.installer property in build.properties" /> |
206 |
+ |
207 |
+ <!-- =============== Utility Targets to support downloads ================ --> |
208 |
+ |
209 |
+- <target name="setproxy" if="${proxy.use}"> |
210 |
++ <target name="setproxy" if="${proxy.use}" unless="noget"> |
211 |
+ <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" |
212 |
+ proxyuser="${proxy.user}" proxypassword="${proxy.password}" /> |
213 |
+ <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/> |
214 |
+ </target> |
215 |
+ |
216 |
+- <target name="testexist"> |
217 |
++ <target name="testexist" unless="noget"> |
218 |
+ <echo message="Testing for ${destfile}"/> |
219 |
+ <available file="${destfile}" property="exist"/> |
220 |
+ </target> |
221 |
+@@ -3024,7 +3034,7 @@ skip.installer property in build.properties" /> |
222 |
+ </sequential> |
223 |
+ </macrodef> |
224 |
+ |
225 |
+- <target name="downloadgz" unless="exist" depends="testexist,setproxy"> |
226 |
++ <target name="downloadgz" unless="noget" depends="testexist,setproxy"> |
227 |
+ <!-- Download and extract the package --> |
228 |
+ <local name="temp.file"/> |
229 |
+ <mkdir dir="${base.path}"/> |
230 |
+@@ -3041,7 +3051,7 @@ skip.installer property in build.properties" /> |
231 |
+ <delete file="${temp.file}.tar.gz"/> |
232 |
+ </target> |
233 |
+ |
234 |
+- <target name="downloadgz-2" unless="exist" depends="testexist"> |
235 |
++ <target name="downloadgz-2" unless="noget" depends="testexist"> |
236 |
+ <!-- Download and extract the package from the two alternative locations --> |
237 |
+ <local name="temp.file"/> |
238 |
+ <mkdir dir="${base.path}"/> |
239 |
+@@ -3066,7 +3076,7 @@ skip.installer property in build.properties" /> |
240 |
+ <delete file="${temp.file}.tar.gz"/> |
241 |
+ </target> |
242 |
+ |
243 |
+- <target name="downloadzip" unless="exist" depends="testexist,setproxy"> |
244 |
++ <target name="downloadzip" unless="noget" depends="testexist,setproxy"> |
245 |
+ <!-- Download and extract the package --> |
246 |
+ <local name="temp.file"/> |
247 |
+ <mkdir dir="${base.path}"/> |
248 |
+@@ -3082,7 +3092,7 @@ skip.installer property in build.properties" /> |
249 |
+ <delete file="${temp.file}"/> |
250 |
+ </target> |
251 |
+ |
252 |
+- <target name="downloadzip-2" unless="exist" depends="testexist"> |
253 |
++ <target name="downloadzip-2" unless="noget" depends="testexist"> |
254 |
+ <!-- Download and extract the package from the two alternative locations --> |
255 |
+ <local name="temp.file"/> |
256 |
+ <mkdir dir="${base.path}"/> |
257 |
+@@ -3106,7 +3116,7 @@ skip.installer property in build.properties" /> |
258 |
+ <delete file="${temp.file}"/> |
259 |
+ </target> |
260 |
+ |
261 |
+- <target name="downloadfile" unless="exist" depends="testexist,setproxy"> |
262 |
++ <target name="downloadfile" unless="noget" depends="testexist,setproxy"> |
263 |
+ <!-- Download the file --> |
264 |
+ <local name="temp.file"/> |
265 |
+ <mkdir dir="${base.path}"/> |
266 |
+@@ -3121,7 +3131,7 @@ skip.installer property in build.properties" /> |
267 |
+ <move file="${temp.file}" tofile="${destfile}"/> |
268 |
+ </target> |
269 |
+ |
270 |
+- <target name="downloadfile-2" unless="exist" depends="testexist"> |
271 |
++ <target name="downloadfile-2" unless="noget" depends="testexist"> |
272 |
+ <!-- Download the file from the two alternative locations --> |
273 |
+ <local name="temp.file"/> |
274 |
+ <mkdir dir="${base.path}"/> |
275 |
+@@ -3149,7 +3159,7 @@ skip.installer property in build.properties" /> |
276 |
+ <move file="${temp.file}" tofile="${destfile}"/> |
277 |
+ </target> |
278 |
+ |
279 |
+- <target name="trydownload.check" depends="setproxy"> |
280 |
++ <target name="trydownload.check" depends="setproxy" unless="noget"> |
281 |
+ <condition property="trydownload.run"> |
282 |
+ <and> |
283 |
+ <not> |
284 |
+@@ -3160,7 +3170,7 @@ skip.installer property in build.properties" /> |
285 |
+ </condition> |
286 |
+ </target> |
287 |
+ |
288 |
+- <target name="trydownload" if="trydownload.run" depends="trydownload.check"> |
289 |
++ <target name="trydownload" if="trydownload.run" depends="trydownload.check" unless="noget"> |
290 |
+ <!-- Downloads a file if not yet downloaded and the source URL is available --> |
291 |
+ <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${destfile}" /> |
292 |
+ </target> |
293 |
+@@ -3171,7 +3181,7 @@ skip.installer property in build.properties" /> |
294 |
+ |
295 |
+ <target name="ide-eclipse" |
296 |
+ depends="download-compile, extras-webservices-prepare, download-test-compile" |
297 |
+- description="Prepares the source tree to be built in Eclipse"> |
298 |
++ description="Prepares the source tree to be built in Eclipse" unless="noget"> |
299 |
+ |
300 |
+ <!-- Copy the sample project files into the root directory --> |
301 |
+ <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/> |
302 |
|
303 |
diff --git a/www-servers/tomcat/tomcat-9.0.14.ebuild b/www-servers/tomcat/tomcat-9.0.14.ebuild |
304 |
new file mode 100644 |
305 |
index 00000000000..94606ee3453 |
306 |
--- /dev/null |
307 |
+++ b/www-servers/tomcat/tomcat-9.0.14.ebuild |
308 |
@@ -0,0 +1,180 @@ |
309 |
+# Copyright 1999-2019 Gentoo Authors |
310 |
+# Distributed under the terms of the GNU General Public License v2 |
311 |
+ |
312 |
+EAPI=6 |
313 |
+ |
314 |
+JAVA_PKG_IUSE="doc source test" |
315 |
+ |
316 |
+inherit eutils java-pkg-2 java-ant-2 prefix user |
317 |
+ |
318 |
+MY_P="apache-${PN}-${PV}-src" |
319 |
+ |
320 |
+# Currently we bundle binary versions of bnd.jar and bndlib.jar |
321 |
+# See bugs #203080 and #676116 |
322 |
+BND_VERSION="4.1.0" |
323 |
+BND="biz.aQute.bnd-${BND_VERSION}.jar" |
324 |
+BNDLIB="biz.aQute.bndlib-${BND_VERSION}.jar" |
325 |
+ |
326 |
+DESCRIPTION="Tomcat Servlet-4.0/JSP-2.4?/EL-3.1?/WebSocket-1.2?/JASPIC-1.1 Container" |
327 |
+HOMEPAGE="https://tomcat.apache.org/" |
328 |
+SRC_URI="mirror://apache/${PN}/tomcat-9/v${PV}/src/${MY_P}.tar.gz |
329 |
+ https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bnd/${BND_VERSION}/${BND} |
330 |
+ https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/${BND_VERSION}/${BNDLIB}" |
331 |
+ |
332 |
+LICENSE="Apache-2.0" |
333 |
+SLOT="9" |
334 |
+KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" |
335 |
+IUSE="extra-webapps" |
336 |
+ |
337 |
+RESTRICT="test" # can we run them on a production system? |
338 |
+ |
339 |
+ECJ_SLOT="4.10" |
340 |
+SAPI_SLOT="4.0" |
341 |
+ |
342 |
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} |
343 |
+ dev-java/tomcat-servlet-api:${SAPI_SLOT}" |
344 |
+RDEPEND="${COMMON_DEP} |
345 |
+ !<dev-java/tomcat-native-1.1.24 |
346 |
+ >=virtual/jre-11" |
347 |
+DEPEND="${COMMON_DEP} |
348 |
+ app-admin/pwgen |
349 |
+ >=dev-java/ant-core-1.9.13 |
350 |
+ >=virtual/jdk-11 |
351 |
+ test? ( |
352 |
+ >=dev-java/ant-junit-1.9:0 |
353 |
+ dev-java/easymock:3.2 |
354 |
+ )" |
355 |
+ |
356 |
+S=${WORKDIR}/${MY_P} |
357 |
+ |
358 |
+BND_HOME="${S}/tomcat-build-libs/bnd" |
359 |
+BNDLIB_HOME="${S}/tomcat-build-libs/bndlib" |
360 |
+BND_JAR="${BND_HOME}/${BND}" |
361 |
+BNDLIB_JAR="${BNDLIB_HOME}/${BND_LIB}" |
362 |
+ |
363 |
+src_unpack() { |
364 |
+ unpack ${MY_P}.tar.gz |
365 |
+ |
366 |
+ mkdir -p "${BND_HOME}" "${BNDLIB_HOME}" || die "Failed to create dir" |
367 |
+ ln -s "${DISTDIR}/${BND}" "${BND_HOME}/" || die "Failed to symlink bnd-*.jar" |
368 |
+ ln -s "${DISTDIR}/${BND}" "${BNDLIB_HOME}/" || die "Failed to symlink bndlib-*.jar" |
369 |
+} |
370 |
+ |
371 |
+pkg_setup() { |
372 |
+ java-pkg-2_pkg_setup |
373 |
+ enewgroup tomcat 265 |
374 |
+ enewuser tomcat 265 -1 /dev/null tomcat |
375 |
+} |
376 |
+ |
377 |
+src_prepare() { |
378 |
+ default |
379 |
+ |
380 |
+ find -name '*.jar' -type f -delete -print || die |
381 |
+ |
382 |
+ # Remove bundled servlet-api |
383 |
+ rm -rv java/javax/{el,servlet} || die |
384 |
+ |
385 |
+ eapply "${FILESDIR}/${P}-build.xml.patch" |
386 |
+ |
387 |
+ # For use of catalina.sh in netbeans |
388 |
+ sed -i -e "/^# ----- Execute The Requested Command/ a\ |
389 |
+ CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \ |
390 |
+ bin/catalina.sh || die |
391 |
+ |
392 |
+ java-pkg-2_src_prepare |
393 |
+} |
394 |
+ |
395 |
+JAVA_ANT_REWRITE_CLASSPATH="true" |
396 |
+ |
397 |
+EANT_BUILD_TARGET="deploy" |
398 |
+EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" |
399 |
+EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" |
400 |
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" |
401 |
+EANT_NEEDS_TOOLS="true" |
402 |
+EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false -Dbnd.jar=${BND_JAR} -Dbndlib.jar=${BNDLIB_JAR}" |
403 |
+ |
404 |
+# revisions of the scripts |
405 |
+IM_REV="-r2" |
406 |
+INIT_REV="-r1" |
407 |
+ |
408 |
+src_compile() { |
409 |
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" |
410 |
+ java-pkg-2_src_compile |
411 |
+} |
412 |
+ |
413 |
+src_test() { |
414 |
+ java-pkg-2_src_test |
415 |
+} |
416 |
+ |
417 |
+src_install() { |
418 |
+ local dest="/usr/share/${PN}-${SLOT}" |
419 |
+ |
420 |
+ java-pkg_jarinto "${dest}"/bin |
421 |
+ java-pkg_dojar output/build/bin/*.jar |
422 |
+ exeinto "${dest}"/bin |
423 |
+ doexe output/build/bin/*.sh |
424 |
+ |
425 |
+ java-pkg_jarinto "${dest}"/lib |
426 |
+ java-pkg_dojar output/build/lib/*.jar |
427 |
+ |
428 |
+ dodoc RELEASE-NOTES RUNNING.txt |
429 |
+ use doc && java-pkg_dojavadoc output/dist/webapps/docs/api |
430 |
+ use source && java-pkg_dosrc java/* |
431 |
+ |
432 |
+ ### Webapps ### |
433 |
+ |
434 |
+ # add missing docBase |
435 |
+ local apps="host-manager manager" |
436 |
+ for app in ${apps}; do |
437 |
+ sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ |
438 |
+ output/build/webapps/${app}/META-INF/context.xml || die |
439 |
+ done |
440 |
+ |
441 |
+ insinto "${dest}"/webapps |
442 |
+ doins -r output/build/webapps/{host-manager,manager,ROOT} |
443 |
+ use extra-webapps && doins -r output/build/webapps/{docs,examples} |
444 |
+ |
445 |
+ ### Config ### |
446 |
+ |
447 |
+ # create "logs" directory in $CATALINA_BASE |
448 |
+ # and set correct perms, see #458890 |
449 |
+ dodir "${dest}"/logs |
450 |
+ fperms 0750 "${dest}"/logs |
451 |
+ |
452 |
+ # replace the default pw with a random one, see #92281 |
453 |
+ local randpw="$(pwgen -s -B 15 1)" |
454 |
+ sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die |
455 |
+ |
456 |
+ # prepend gentoo.classpath to common.loader, see #453212 |
457 |
+ sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die |
458 |
+ |
459 |
+ insinto "${dest}" |
460 |
+ doins -r output/build/conf |
461 |
+ |
462 |
+ ### rc ### |
463 |
+ |
464 |
+ cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die |
465 |
+ eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} |
466 |
+ sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die |
467 |
+ |
468 |
+ insinto "${dest}"/gentoo |
469 |
+ doins "${T}"/tomcat.conf |
470 |
+ exeinto "${dest}"/gentoo |
471 |
+ newexe "${T}"/tomcat${INIT_REV}.init tomcat.init |
472 |
+ newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash |
473 |
+} |
474 |
+ |
475 |
+pkg_postinst() { |
476 |
+ elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" |
477 |
+ elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." |
478 |
+ elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" |
479 |
+ |
480 |
+ elog "To manage Tomcat instances, run:" |
481 |
+ elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" |
482 |
+ |
483 |
+ ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" |
484 |
+ ewarn "from upstream binary if you need it. Gentoo Bug # 144276" |
485 |
+ |
486 |
+ einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and" |
487 |
+ einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information." |
488 |
+} |