summaryrefslogtreecommitdiff
path: root/www-servers/tomcat
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-20 14:27:17 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-20 14:27:17 +0000
commit5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (patch)
tree66e860a5099bcad013f1cf667255dc372a7c11b3 /www-servers/tomcat
parent7218e1b46bceac05841e90472501742d905fb3fc (diff)
gentoo resync : 20.03.2021
Diffstat (limited to 'www-servers/tomcat')
-rw-r--r--www-servers/tomcat/Manifest3
-rw-r--r--www-servers/tomcat/files/tomcat-10.0.4-build.xml.patch284
-rw-r--r--www-servers/tomcat/tomcat-10.0.4.ebuild192
3 files changed, 479 insertions, 0 deletions
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest
index fa83bf6f79ee..d27b231321be 100644
--- a/www-servers/tomcat/Manifest
+++ b/www-servers/tomcat/Manifest
@@ -1,4 +1,5 @@
AUX tomcat-10.0.2-build.xml.patch 11108 BLAKE2B 9c8db2ed4008def42bcfdcfd99fbaf01df0725738b92245e9138b08dfbead625959afc5f3dbef0cb28e322076efc34a22b751ffe1cf3b8a99db4a507651c6362 SHA512 ed2fbacd4cda8e582dc316e9ff3f14686eb68b5851c2c2a0c3ce779c5394af5161fa40b821bd4fd10e1295ff13ae3adcc03d2f0d42604efe19b57790af648ba8
+AUX tomcat-10.0.4-build.xml.patch 11459 BLAKE2B 841a96b09280a8790cf5bff7718219027abf793d3bf2f93c72086ca709102775995d06a4eeadcfab297742f6c0e74ac74736407606074cf6106b5948a8359ace SHA512 54e0c3ad71afa28b14c1644438daa0df0d2e6b95b55fd83d8776b30bb6ed3f8735bc18d5a8d9da6c56323c297245a34c441e126e7d1e1d2deeb331c8c382ba30
AUX tomcat-7.0.99-build.xml.patch 5913 BLAKE2B 21316c4ce76bd3e87c2749354cbd455c1322431649b276b59a93f10b97f59d03690f3531c2fd3a8ce67b81969544d498bf04e829407005dbed867067f8970347 SHA512 f8d0cb4ba0effdeea3db4049381efc84513551a1e28551b59a254340a8add306824d1dba344f6eaddc93e8b61fc0b71e1a8d0bcfc860500134cc19072deef30e
AUX tomcat-8.5.57-build.xml.patch 10554 BLAKE2B 40df509d8f5e3022a9d384d8d939800062ec383ea000f1224dfd5816a76af12dbde7d36826659707ae7e2a2bf0c19c1e8bc96bec5854bcd2422910530a0530fd SHA512 c1e3b73e2aece5e849219c663a01a31bd2f6355d37b51e18b68d42a05be2a49d173520450ac1aeef7b394fe860135afda225d450b4e98d912fe90231c9d70601
AUX tomcat-9.0.37-fix-build-rewrite.patch 513 BLAKE2B e806ca32771bcad0fbc2f1b3f223af2b17d2caffe6ed034783294650d4ec22c8d9d9d215ade85569f6627508c61b7d469412d582093708b6bb728d6123d65155 SHA512 7aab16d1b52fa88352df849ca051dcaf27f645b1b3edd3df3a7d87385b5068d300105f89c18ba3a0f65818739b85ec847ddd5b28b8b655efbb7b39036099cae2
@@ -10,6 +11,7 @@ AUX tomcat-instance-manager-r2.bash 6999 BLAKE2B f1c771678bd8b894ecf242d5a8fb22f
AUX tomcat-r1.init 3200 BLAKE2B eb913d32bb8c1883e58551a25ff9516337d947c6fd2c7b449601a89a4518286d61dbca76417265289782a7a08540d8e78a3ea1cd1427d43d87e24813261c0fee SHA512 3d32e2ad998adfbaea5fe0ffcbbe6659dcb530a110faed5f2712ae2fd767353b1fc3f1ac83a24d43138c1bfc55949e645833a428ab982be14415887fc46d9fab
AUX tomcat.conf 1811 BLAKE2B a92606e113172c6f0f73e18ab8ad8796f38bd8c741bb2fd1f6c43d7682728729d0198d4150e42282c7e732750231b7cdbfb51de9b24f2ba780a22700965113c5 SHA512 0747dd2fdad6c68123425adce39f625d34924ae3e7c9d5a00361565a593047d7a4d01dee64c1ef831e5ad79b51750babaf642b0588d4b5948bbed441d53d654d
DIST apache-tomcat-10.0.2-src.tar.gz 5954905 BLAKE2B fa7ca630b287c96538955848ab0ef109beb22a381e884eae96fa5246c134164b543003669c65d716f453ffa7a0e72f119354d1f023b529a948befb11c5e375a1 SHA512 402e942b9a1006535fd0e1416a4606d880ca1af473d7c394d54aa3dff60ecfe80823a0bb14f354049e008fdf29ea67a1490d0828fbc50eaf39ea159ef36cbc53
+DIST apache-tomcat-10.0.4-src.tar.gz 5964416 BLAKE2B 23332b90316cedd1916b59b1b31b1c16e34c193ba61660c7c8e41e3b983a35873660eaf8e3f0777704d5663f0ede2dc39b81997a73ee726ff73d6c6392582163 SHA512 677b978afd51fe1756b486c9d5576b9fa03b5b775c462263237aef6d17f36d7e718cfb5e46a49da942b1bf6681b166a4af781138f55d89a019bf12b48eb22882
DIST apache-tomcat-7.0.107-src.tar.gz 5312698 BLAKE2B 1f2712ddce6aa604692aaf6a6c706469d3dbcb2266a99e62346c15b8347fff573608440473be8e20b8632a431f8838dd29f24f6bf630a13d262c444be68e0d2c SHA512 820923697c487367786c595d3aeaa58981d25b56529c6739b9388ad771f3264e6995f7659805cc5b2ef9456dbd42bad92ad2cfa3c7f741920a5b7bff2cc1bb1b
DIST apache-tomcat-7.0.108-src.tar.gz 5313375 BLAKE2B 200a1ccbc39a572ca7e4f7805bf3d27e0bd645156d8886b0fcbee5e64279a4d2f4e2ad847d67a70e1c65a8d88fa5bd4757a0066ceff367fe92914e22cc809aa5 SHA512 bdd957ca5b3b7dd152efa6406dbb6397ed62661ec44c83b6a8f6e9e3c33362c51ff5e0451a57d6aa3874cd745811f2afe78d08825ddaba8e29cb38ef922c48e2
DIST apache-tomcat-8.5.61-src.tar.gz 5840559 BLAKE2B 18e1505b6b7d8e1a024d9f834d33ef105a16e6fc1f9e80abd3e6e88b2326597b9973e13c2ebc030a1db4a2d4dc5572d195b9f61db6cb7bf51e97cbfaa121678a SHA512 fd6bb5926b5e7cf44f359c93dadc4edd87fa5f2e26fb0fb3a9bc0a5c89ae4d844d66872055e1b441392cf03d7690aca3429b66afd8334319784f089f821d8c22
@@ -21,6 +23,7 @@ DIST apache-tomcat-9.0.44-src.tar.gz 6047722 BLAKE2B fda3081d66c9018a49e5a07bfb5
DIST biz.aQute.bnd-5.1.1.jar 16088761 BLAKE2B 59906cc39ea27ef20cbf82de1ba78096f34dc417da6dc5c28e21f6e92c0625efecf14cec6c5faf0ab17551c31a6c87a24614c2ac75ac902cfea30199ecc0d39f SHA512 8092b083e7b86e75bf27233964763b88bee74d8ae141c85e387c1cc8bd0cbf3a54be27afea29931fb3ae950700a515fd4a28cfe8e7f26cbaaec506aa06357a37
DIST biz.aQute.bndlib-5.1.1.jar 3652944 BLAKE2B dad9f9835fb407a36e0eae4b65fa2fda147e06ab3f3211a2ed2f1631aeccd6d14d198c325793cb1ce9a57b719a836db230d0452715744ba5a4a6c2983c17916b SHA512 d7da056ba541ae0862159bf5e38e1a5351b2ab5388c88733b46601c2d7dab8970f16af00df186a6cb67fbe81ef53f2c8402db9d28a8c6819dadf60a1df40879b
EBUILD tomcat-10.0.2.ebuild 5902 BLAKE2B 45d8f8191815f6e668bf9c2d927d2490c3ab486455144364e188eb97196990f85b176394a95020dd7eb6dfc4828278ac9f282e9615080dbd49bff946d7c11845 SHA512 a756ac610ca78012ae828b5843b447753196eaba9e8f7a54726e2a78758d16989d6a1c5e84df71d2e35ad9d722b67ebc1da0abf256de31483facb98ed13a8465
+EBUILD tomcat-10.0.4.ebuild 5910 BLAKE2B 87e7a8d438deaaf68bd4d9bca40c5a44759de65f0cde4bd654a5a4b0e38377f488a52f2e49de687b5eecb1bf5a0cca1b95b941acbaeee17e67eb9f8667aadbcf SHA512 e2cccc425569fdc3218b1c96c89dad7f17f8e466482454e5666fef587750d463a972a70e4783edc59dd805f26983f4a8523b1d5fb8cb11cba7c120ca14fe76fb
EBUILD tomcat-7.0.107.ebuild 4154 BLAKE2B 2020b3a15d3e33f4638f74511f6beb8d82db9f68fe920c95ec0efa24ebcfd5d5ec8dcc174ef4fc927063738c710931decf749ec442c948ef9c547b5bcabf22b2 SHA512 7f1e205ae31ec9b0bf98bb0ae86ab8f761314be5bc3fe25f07480c4e97f80c1eb148df3b6b484be2cf23c08df6207d034ca433404a90b0d0e422b9a0d9f9c249
EBUILD tomcat-7.0.108.ebuild 4155 BLAKE2B e55024bdd35be24b2807229d4a659e3ced6a4211d3e6c586d045955b84aa38e066e208f5c3bfbeb2d9d87944a782adb1f36e65c237edffc32373897a48c9ef42 SHA512 5f9db59d6fb0e575a566c45aa84be258bd6838db909ab263180f288a57a047c75a74bba2103e05e6fc9090d6aef64215d7c011814f73cb408501b7541d9df4db
EBUILD tomcat-8.5.61.ebuild 4734 BLAKE2B b790306d322cf975ada21309e946c6b95225e2f20d768f851f3954bee11a71a817b6a54ac43bfd4830fc4d5cdbdef54c07241ed90d52ea54c5b46d0d16d65295 SHA512 1e1fae7207883a473d6f37d0f80ee3bc108a295c95d93d136e3179cedf893c9709c488a43c649fef74c757b1c064589c677c5bbbc56b201c8ca71a12feeb869c
diff --git a/www-servers/tomcat/files/tomcat-10.0.4-build.xml.patch b/www-servers/tomcat/files/tomcat-10.0.4-build.xml.patch
new file mode 100644
index 000000000000..a2c148719e29
--- /dev/null
+++ b/www-servers/tomcat/files/tomcat-10.0.4-build.xml.patch
@@ -0,0 +1,284 @@
+diff --git a/build.xml b/build.xml
+index 8338af0..db9eec8 100644
+--- a/build.xml
++++ b/build.xml
+@@ -1034,6 +1034,7 @@
+ addOSGi="true" />
+
+ <!-- Servlet Implementation JAR File -->
++<!--
+ <jarIt jarfile="${servlet-api.jar}"
+ filesDir="${tomcat.classes}"
+ filesId="files.servlet-api"
+@@ -1041,21 +1042,23 @@
+ notice="${tomcat.manifests}/servlet-api.jar.notice"
+ license="${tomcat.manifests}/servlet-api.jar.license"
+ addOSGi="true" />
+-
++-->
+ <!-- EL Implementation JAR File -->
++<!--
+ <jarIt jarfile="${el-api.jar}"
+ filesDir="${tomcat.classes}"
+ filesId="files.el-api"
+ manifest="${tomcat.manifests}/el-api.jar.manifest"
+ addOSGi="true" />
+-
++-->
+ <!-- JSP Implementation JAR File -->
++<!--
+ <jarIt jarfile="${jsp-api.jar}"
+ filesDir="${tomcat.classes}"
+ filesId="files.jsp-api"
+ manifest="${tomcat.manifests}/jsp-api.jar.manifest"
+ addOSGi="true" />
+-
++-->
+ <!-- WebSocket API JAR File -->
+ <jarIt jarfile="${websocket-api.jar}"
+ filesDir="${tomcat.classes}"
+@@ -1168,10 +1171,10 @@
+ addOSGi="true" />
+
+ <!-- Re-packaged Apache Commons DBCP 2-->
+- <jarIt jarfile="${tomcat-dbcp.jar}"
++<!-- <jarIt jarfile="${tomcat-dbcp.jar}"
+ filesDir="${tomcat.classes}"
+ filesId="files.tomcat-dbcp"
+- addOSGi="true" />
++ addOSGi="true" /> -->
+
+ <!-- i18n JARs -->
+ <jar jarfile="${tomcat.build}/lib/tomcat-i18n-cs.jar"
+@@ -1399,9 +1402,9 @@
+
+ <target name="deploy" depends="package,build-docs,build-tomcat-jdbc,compile-webapp-examples"
+ description="Default. Builds a working Tomcat instance">
+-
++<!--
+ <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" />
+-
++-->
+ <!-- Copy scripts -->
+ <copy todir="${tomcat.build}/bin">
+ <fileset dir="bin">
+@@ -1461,7 +1464,7 @@
+ <exclude name="${jdt.jar.filename}"/>
+ </fileset>
+ </delete>
+- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/>
++<!-- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> -->
+
+ <!-- Delete all other versions of Tomcat Migration Tool for Jakarta EE and copy the current one -->
+ <local name="migration.jar.filename" />
+@@ -1472,7 +1475,7 @@
+ <exclude name="${migration-lib.jar.filename}"/>
+ </fileset>
+ </delete>
+- <copy file="${migration-lib.jar}" todir="${tomcat.build}/lib"/>
++<!-- <copy file="${migration-lib.jar}" todir="${tomcat.build}/lib"/> -->
+
+ <!-- Add sources for examples -->
+ <antcall target="examples-sources" />
+@@ -1515,7 +1518,7 @@
+
+ </target>
+
+- <target name="build-tomcat-jdbc" depends="package">
++ <target name="build-tomcat-jdbc" depends="package" unless="noget">
+ <!-- build the jdbc-pool jar and source jar-->
+ <echo message="Building Tomcat JDBC pool libraries"/>
+ <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}"
+@@ -1530,7 +1533,7 @@
+ <copy file="${tomcat-jdbc.jar}" todir="${tomcat.build}/lib"/>
+ </target>
+
+- <target name="build-tomcat-jdbc-src">
++ <target name="build-tomcat-jdbc-src" unless="noget">
+ <!-- build the jdbc-pool source jar-->
+ <echo message="Building Tomcat JDBC pool src JAR"/>
+ <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}"
+@@ -1633,9 +1636,11 @@
+
+ <copy file="${basedir}/LICENSE" todir="${tomcat.embed}" />
+ <copy file="${basedir}/NOTICE" todir="${tomcat.embed}" />
++<!--
+ <copy file="${tomcat-dbcp.jar}" todir="${tomcat.embed}"
+ failonerror="false"/>
+ <copy file="${jdt.jar}" todir="${tomcat.embed}" />
++-->
+ <copy file="${annotations-api.jar}" todir="${tomcat.embed}" />
+
+ <!-- Note the meta-inf below will work as long as there is only one JAR
+@@ -2209,11 +2214,12 @@
+ </copy>
+
+ <!-- Source bundles for native components -->
++<!--
+ <copy tofile="${tomcat.dist}/bin/tomcat-native.tar.gz"
+ file="${tomcat-native.tar.gz}" />
+ <copy tofile="${tomcat.dist}/bin/commons-daemon-native.tar.gz"
+ file="${commons-daemon.native.src.tgz}" />
+-
++-->
+ <!-- platform README files -->
+ <echo append="false" file="${tomcat.dist}/bin/x64/README">
+ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
+@@ -2244,6 +2250,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
+ <path location="${ant.core.lib}"/>
+ </classpath>
+ </javadoc>
++<!--
+ <javadoc packagenames="jakarta.servlet.*"
+ excludepackagenames="jakarta.servlet.jsp.*"
+ sourcepath="${tomcat.dist}/src/java"
+@@ -2308,6 +2315,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
+ <path location="${ant.core.lib}"/>
+ </classpath>
+ </javadoc>
++-->
+ <javadoc packagenames="jakarta.websocket.*"
+ sourcepath="${tomcat.dist}/src/java"
+ destdir="${tomcat.dist}/webapps/docs/websocketapi"
+@@ -2370,13 +2378,17 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
+ <path location="${osgi-annotations.jar}"/>
+ </classpath>
+ <link href="../annotationapi"/>
++<!--
+ <link href="../servletapi"/>
+ <link href="../jspapi"/>
+ <link href="../elapi"/>
++-->
+ <link href="../websocketapi"/>
+ <link href="../jaspicapi"/>
++<!--
+ <link href="https://docs.oracle.com/javase/8/docs/api/"/>
+ <link href="https://javaee.github.io/javaee-spec/javadocs/"/>
++-->
+ <packageset dir="${tomcat.dist}/src/java/">
+ <include name="org/**"/>
+ <exclude name="org/apache/el/parser/**"/>
+@@ -3150,7 +3162,7 @@ skip.installer property in build.properties" />
+ </target>
+
+ <target name="download-test-compile"
+- description="Download additional components for the tests" >
++ description="Download additional components for the tests">
+
+ <antcall target="downloadfile">
+ <param name="sourcefile" value="${junit.loc}"/>
+@@ -3228,7 +3240,7 @@ skip.installer property in build.properties" />
+ </target>
+
+ <target name="download-dist"
+- description="Download additional components for a distribution" >
++ description="Download additional components for a distribution">
+
+ <antcall target="downloadfile-2">
+ <param name="sourcefile.1" value="${tomcat-native.loc.1}"/>
+@@ -3283,13 +3295,13 @@ skip.installer property in build.properties" />
+
+ <!-- =============== Utility Targets to support downloads ================ -->
+
+- <target name="setproxy" if="${proxy.use}">
++ <target name="setproxy" if="${proxy.use}" unless="noget">
+ <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
+ proxyuser="${proxy.user}" proxypassword="${proxy.password}" />
+ <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/>
+ </target>
+
+- <target name="testexist">
++ <target name="testexist" unless="noget">
+ <echo message="Testing for ${destfile}"/>
+ <available file="${destfile}" property="exist"/>
+ </target>
+@@ -3411,7 +3423,7 @@ skip.installer property in build.properties" />
+ </sequential>
+ </macrodef>
+
+- <target name="downloadgz" unless="exist" if="${execute.download}" depends="testexist,setproxy">
++ <target name="downloadgz" unless="noget" if="${execute.download}" depends="testexist,setproxy">
+ <!-- Download and extract the package -->
+ <local name="temp.file"/>
+ <mkdir dir="${base.path}"/>
+@@ -3428,7 +3440,7 @@ skip.installer property in build.properties" />
+ <delete file="${temp.file}.tar.gz"/>
+ </target>
+
+- <target name="downloadgz-2" unless="exist" if="${execute.download}" depends="testexist">
++ <target name="downloadgz-2" unless="noget" if="${execute.download}" depends="testexist">
+ <!-- Download and extract the package from the two alternative locations -->
+ <local name="temp.file"/>
+ <mkdir dir="${base.path}"/>
+@@ -3453,7 +3465,7 @@ skip.installer property in build.properties" />
+ <delete file="${temp.file}.tar.gz"/>
+ </target>
+
+- <target name="downloadzip" unless="exist" if="${execute.download}" depends="testexist,setproxy">
++ <target name="downloadzip" unless="noget" if="${execute.download}" depends="testexist,setproxy">
+ <!-- Download and extract the package -->
+ <local name="temp.file"/>
+ <mkdir dir="${base.path}"/>
+@@ -3469,7 +3481,7 @@ skip.installer property in build.properties" />
+ <delete file="${temp.file}"/>
+ </target>
+
+- <target name="downloadzip-2" unless="exist" if="${execute.download}" depends="testexist">
++ <target name="downloadzip-2" unless="noget" if="${execute.download}" depends="testexist">
+ <!-- Download and extract the package from the two alternative locations -->
+ <local name="temp.file"/>
+ <mkdir dir="${base.path}"/>
+@@ -3493,7 +3505,7 @@ skip.installer property in build.properties" />
+ <delete file="${temp.file}"/>
+ </target>
+
+- <target name="downloadfile" unless="exist" if="${execute.download}" depends="testexist,setproxy">
++ <target name="downloadfile" unless="noget" if="${execute.download}" depends="testexist,setproxy">
+ <!-- Download the file -->
+ <local name="temp.file"/>
+ <mkdir dir="${base.path}"/>
+@@ -3508,7 +3520,7 @@ skip.installer property in build.properties" />
+ <move file="${temp.file}" tofile="${destfile}"/>
+ </target>
+
+- <target name="downloadfile-2" unless="exist" if="${execute.download}" depends="testexist">
++ <target name="downloadfile-2" unless="noget" if="${execute.download}" depends="testexist">
+ <!-- Download the file from the two alternative locations -->
+ <local name="temp.file"/>
+ <mkdir dir="${base.path}"/>
+@@ -3536,7 +3548,7 @@ skip.installer property in build.properties" />
+ <move file="${temp.file}" tofile="${destfile}"/>
+ </target>
+
+- <target name="trydownload.check" depends="setproxy">
++ <target name="trydownload.check" depends="setproxy" unless="noget">
+ <condition property="trydownload.run">
+ <and>
+ <not>
+@@ -3547,7 +3559,7 @@ skip.installer property in build.properties" />
+ </condition>
+ </target>
+
+- <target name="trydownload" if="trydownload.run" depends="trydownload.check">
++ <target name="trydownload" if="trydownload.run" depends="trydownload.check" unless="noget">
+ <!-- Downloads a file if not yet downloaded and the source URL is available -->
+ <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${destfile}" />
+ </target>
+@@ -3558,7 +3570,7 @@ skip.installer property in build.properties" />
+
+ <target name="ide-eclipse"
+ depends="download-compile, download-test-compile"
+- description="Prepares the source tree to be built in Eclipse">
++ description="Prepares the source tree to be built in Eclipse" unless="noget">
+
+ <!-- Copy the sample project files into the root directory -->
+ <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/>
+@@ -3576,7 +3588,7 @@ Read the Building page on the Apache Tomcat documentation site for details on ho
+
+ <target name="ide-intellij"
+ depends="download-compile, download-test-compile"
+- description="Creates project directory .idea for IntelliJ IDEA">
++ description="Creates project directory .idea for IntelliJ IDEA" unless="noget">
+
+ <copy todir="${tomcat.home}/.idea">
+ <fileset dir="${tomcat.home}/res/ide-support/idea"/>
diff --git a/www-servers/tomcat/tomcat-10.0.4.ebuild b/www-servers/tomcat/tomcat-10.0.4.ebuild
new file mode 100644
index 000000000000..a397d6e6306c
--- /dev/null
+++ b/www-servers/tomcat/tomcat-10.0.4.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit eutils java-pkg-2 java-ant-2 prefix
+
+MY_P="apache-${PN}-${PV}-src"
+
+# Currently we bundle binary versions of bnd.jar and bndlib.jar
+# See bugs #203080 and #676116
+BND_VERSION="5.1.1"
+BND="biz.aQute.bnd-${BND_VERSION}.jar"
+BNDLIB="biz.aQute.bndlib-${BND_VERSION}.jar"
+
+DESCRIPTION="Tomcat Servlet-5.0/JSP-3.0/EL-4.0/WebSocket-2.0/JASIC-2.0 Container"
+HOMEPAGE="https://tomcat.apache.org/"
+SRC_URI="mirror://apache/${PN}/tomcat-9/v${PV}/src/${MY_P}.tar.gz
+ https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bnd/${BND_VERSION}/${BND}
+ https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/${BND_VERSION}/${BNDLIB}"
+
+LICENSE="Apache-2.0"
+SLOT="10"
+KEYWORDS="~amd64 ~amd64-linux"
+IUSE="extra-webapps"
+
+RESTRICT="test" # can we run them on a production system?
+
+ECJ_SLOT="4.15"
+SAPI_SLOT="5.0"
+
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
+ dev-java/glassfish-xmlrpc-api:0
+ dev-java/jakartaee-migration:0
+ ~dev-java/tomcat-servlet-api-${PV}:${SAPI_SLOT}
+ dev-java/wsdl4j:0"
+RDEPEND="${COMMON_DEP}
+ acct-group/tomcat
+ acct-user/tomcat
+ virtual/jre"
+DEPEND="${COMMON_DEP}
+ app-admin/pwgen
+ dev-java/ant-core
+ virtual/jdk:1.8
+ test? (
+ dev-java/ant-junit:0
+ dev-java/easymock:3.2
+ )"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}/${PN}-9.0.43-insufficient-ecj.patch"
+)
+
+BND_HOME="${S}/tomcat-build-libs/bnd"
+BNDLIB_HOME="${S}/tomcat-build-libs/bndlib"
+BND_JAR="${BND_HOME}/${BND}"
+BNDLIB_JAR="${BNDLIB_HOME}/${BND_LIB}"
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+
+ mkdir -p "${BND_HOME}" "${BNDLIB_HOME}" || die "Failed to create dir"
+ ln -s "${DISTDIR}/${BND}" "${BND_HOME}/" || die "Failed to symlink bnd-*.jar"
+ ln -s "${DISTDIR}/${BND}" "${BNDLIB_HOME}/" || die "Failed to symlink bndlib-*.jar"
+}
+
+src_prepare() {
+ default
+
+ find -name '*.jar' -type f -delete -print || die
+
+ # Remove bundled servlet-api
+ rm -rv java/jakarta/{el,servlet} || die
+
+ eapply "${FILESDIR}/${P}-build.xml.patch"
+
+ # For use of catalina.sh in netbeans
+ sed -i -e "/^# ----- Execute The Requested Command/ a\
+ CLASSPATH=\`java-config --with-dependencies --classpath ${PN}-${SLOT}\`" \
+ bin/catalina.sh || die
+
+ java-pkg-2_src_prepare
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+
+EANT_BUILD_TARGET="deploy"
+EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},jakartaee-migration,tomcat-servlet-api-${SAPI_SLOT},wsdl4j"
+EANT_TEST_GENTOO_CLASSPATH="easymock-3.2"
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
+EANT_NEEDS_TOOLS="true"
+EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false -Dbnd.jar=${BND_JAR} -Dbndlib.jar=${BNDLIB_JAR}"
+
+# revisions of the scripts
+IM_REV="-r2"
+INIT_REV="-r1"
+
+src_configure() {
+ java-ant-2_src_configure
+
+ eapply "${FILESDIR}/${PN}-9.0.37-fix-build-rewrite.patch"
+}
+
+src_compile() {
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar):$(java-pkg_getjars --build-only glassfish-xmlrpc-api)"
+ java-pkg-2_src_compile
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ local dest="/usr/share/${PN}-${SLOT}"
+
+ java-pkg_jarinto "${dest}"/bin
+ java-pkg_dojar output/build/bin/*.jar
+ exeinto "${dest}"/bin
+ doexe output/build/bin/*.sh
+
+ java-pkg_jarinto "${dest}"/lib
+ java-pkg_dojar output/build/lib/*.jar
+
+ dodoc RELEASE-NOTES RUNNING.txt
+ use doc && java-pkg_dojavadoc output/dist/webapps/docs/api
+ use source && java-pkg_dosrc java/*
+
+ ### Webapps ###
+
+ # add missing docBase
+ local apps="host-manager manager"
+ for app in ${apps}; do
+ sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \
+ output/build/webapps/${app}/META-INF/context.xml || die
+ done
+
+ insinto "${dest}"/webapps
+ doins -r output/build/webapps/{host-manager,manager,ROOT}
+ use extra-webapps && doins -r output/build/webapps/{docs,examples}
+
+ ### Config ###
+
+ # create "logs" directory in $CATALINA_BASE
+ # and set correct perms, see #458890
+ dodir "${dest}"/logs
+ fperms 0750 "${dest}"/logs
+
+ # replace the default pw with a random one, see #92281
+ local randpw="$(pwgen -s -B 15 1)"
+ sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
+
+ # prepend gentoo.classpath to common.loader, see #453212
+ sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die
+
+ insinto "${dest}"
+ doins -r output/build/conf
+
+ ### rc ###
+
+ cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die
+ eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash}
+ sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die
+
+ insinto "${dest}"/gentoo
+ doins "${T}"/tomcat.conf
+ exeinto "${dest}"/gentoo
+ newexe "${T}"/tomcat${INIT_REV}.init tomcat.init
+ newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash
+}
+
+pkg_postinst() {
+ elog "New ebuilds of Tomcat support running multiple instances. If you used prior version"
+ elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat."
+ elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat"
+
+ elog "To manage Tomcat instances, run:"
+ elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help"
+
+ ewarn "Please note that since version 10 the primary package for all implemented APIs"
+ ewarn "has changed from javax.* to jakarta.*. This will almost certainly require code"
+ ewarn "changes to enable applications to migrate from Tomcat 9 and earlier to Tomcat 10 and later."
+
+ ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar"
+ ewarn "from upstream binary if you need it. Gentoo Bug # 144276"
+
+ einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and"
+ einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information."
+}