summaryrefslogtreecommitdiff
path: root/www-servers
diff options
context:
space:
mode:
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/Manifest.gzbin4713 -> 4711 bytes
-rw-r--r--www-servers/tomcat/Manifest6
-rw-r--r--www-servers/tomcat/tomcat-10.1.10.ebuild181
-rw-r--r--www-servers/tomcat/tomcat-8.5.90.ebuild154
4 files changed, 341 insertions, 0 deletions
diff --git a/www-servers/Manifest.gz b/www-servers/Manifest.gz
index d377da6cd9b3..e098bc5eba1e 100644
--- a/www-servers/Manifest.gz
+++ b/www-servers/Manifest.gz
Binary files differ
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest
index dad4bdf41e00..e20411582d03 100644
--- a/www-servers/tomcat/Manifest
+++ b/www-servers/tomcat/Manifest
@@ -6,6 +6,8 @@ AUX tomcat-9.0.72-build.xml.patch 3794 BLAKE2B 886bf69f4c78f385249e02e1f91ed9106
AUX tomcat-instance-manager-r2.bash 6999 BLAKE2B f1c771678bd8b894ecf242d5a8fb22f5b2f0f33445a1ff158c242b5154edc4483a5707ce33a5dcee53a3106e631ad8218243d8b72a32a10cd99e9646fa54085d SHA512 c30c156cbf2b53cf8498288bacaedd48872dce52f461ff32071310b438bdb5015c1cd1d512a2905c4db01e2b22342590e1b8aeadbd44f29062606fabbb2f2fed
AUX tomcat-r1.init 3200 BLAKE2B eb913d32bb8c1883e58551a25ff9516337d947c6fd2c7b449601a89a4518286d61dbca76417265289782a7a08540d8e78a3ea1cd1427d43d87e24813261c0fee SHA512 3d32e2ad998adfbaea5fe0ffcbbe6659dcb530a110faed5f2712ae2fd767353b1fc3f1ac83a24d43138c1bfc55949e645833a428ab982be14415887fc46d9fab
AUX tomcat.conf 1811 BLAKE2B a92606e113172c6f0f73e18ab8ad8796f38bd8c741bb2fd1f6c43d7682728729d0198d4150e42282c7e732750231b7cdbfb51de9b24f2ba780a22700965113c5 SHA512 0747dd2fdad6c68123425adce39f625d34924ae3e7c9d5a00361565a593047d7a4d01dee64c1ef831e5ad79b51750babaf642b0588d4b5948bbed441d53d654d
+DIST apache-tomcat-10.1.10-src.tar.gz 6110165 BLAKE2B 2932cfbfb9981f40dac2902b1f79c4d6dc36bc1b787219c68418ceaecb6d2d9baab112d51fba7284952f06f5e477f800581d18b11a275ca05650f2b8b7408e6a SHA512 ce36493c4d3d0edf6c264ac76dc875e2ff8e9bf57c8b0dbf83e1cf2951d19959c2291ae1b837ef2050633237d8bc5764de22de2c483d402e6e58e58a626e6311
+DIST apache-tomcat-10.1.10-src.tar.gz.asc 849 BLAKE2B 4a00365338246354ab65f8b3dfeafc1fe9bc0a2c91c9a0597c7d0d2a47084ef9171e5c072b0a28c036e62ed44829672dd7af07b227f3bd00d6c79a92fa20e20d SHA512 ae8f43b80ecd6347336d57a585f1e22883ca8b308e8b6b4242fc687509b12dc410774c9ee7de4318b1a38cee7867e65ac33c6cb2f494a4d4b890f62df829da49
DIST apache-tomcat-10.1.8-src.tar.gz 6086270 BLAKE2B 080ffacfb3b010605fa901319f3f059524f532306af5a5d05a0e4eaf108be06ed139977ef39e8b9fa0423fef0ad073305b57793bcbb4e897bbb0239cee183017 SHA512 14ac35a22d24284b770182996388bdc004defc5e56e65d2420e096a1e1c5c45887e4a55c0174884294acb7c99e6412f98159bb9be92de337e1a1cacc48d39ea4
DIST apache-tomcat-10.1.8-src.tar.gz.asc 849 BLAKE2B 2a62d64e349739397fc786b92e75a14b74d3e8f9243a4f90ca17a070d85bb31707417da01d9d34217a23ab10157dbff46857efd65629a66aa41be861fe036ca5 SHA512 e818e040be1e1c29c989228cf72586ac8a602a93373ac33760db22578fbf79a5202f038b4cf36a0ec3549112bcdd5f5629a6859119aa0b129fef923c073c3055
DIST apache-tomcat-10.1.9-src.tar.gz 6098538 BLAKE2B b2699765e48168cfb75dfbb3168cfd96caf53a76b492d6dfe94be9311d0cdc470c549329bb8a647e7a5d8ce0784d3491dd03d8dd8d9463b0492b581b97d48373 SHA512 25e0e268697ff83ebd6c06f8e03eca0463cb41bb99827b60334fe9772670c3ac8bd18853817ee481db68a2ac7b0389e86274c6fe5c6c9efa97a2866754f07e5b
@@ -14,6 +16,8 @@ DIST apache-tomcat-8.5.88-src.tar.gz 6051684 BLAKE2B bae4785765d2c373a5507bf1f42
DIST apache-tomcat-8.5.88-src.tar.gz.asc 849 BLAKE2B e82e714721272c7ca6e6837a4be369c9ef3ad6c654f56ba15028f7f8d8f54ab62d7c1da32a2f4914c417889b3b65ef9f5ba6dea7d8ed4125de871ee4f91339df SHA512 f5ad2bd77287e763d7a09b5be17601b318ed6492d5c476903eadd54304b19afbbedd90ee5232b5dbc30ee597ed3c4fe5fc371c3d9809b94ca1614fcde1bec4d1
DIST apache-tomcat-8.5.89-src.tar.gz 6064408 BLAKE2B b8f1a4ae044c1609c37bad9b51e2afbb84b111e9d68bbaa6f0a5499c85f5f36394bb5871a2b3ab4ee7895d13ccf4538bde89d64ee0c5e01d8932d18dc3b0e103 SHA512 610855dfcca593d20e813dbd1a2410c9b6767f2efe79b24b2ba69304047b835b212f86758c020867e46bd3971ce98e88a56b99a4ab651e228ae5b4eac08c4ff1
DIST apache-tomcat-8.5.89-src.tar.gz.asc 849 BLAKE2B b0908462676e73d55307c8ea677d250cf0e5b9f614fcbae58e9dc047344015ed3476bf51fdb35ce949e8e6eb2afb93c0862be3c4195a5a77df52a418b39c8de9 SHA512 f52b9f2e341cdae64f1d7a69ccb5b2dc15de53939f0f6e9463bfa4b71152bda28fdb9ffb89f437ea5f1c1ecfb7b5b267a39a3612fa55780a48d09cf104de1cbe
+DIST apache-tomcat-8.5.90-src.tar.gz 6090385 BLAKE2B 54ff1c039553ab60ef394f0217dfbbca4f045cf9b74a378e9a4af1a6f80d7bbd244a8de36f29d02d4230cb31729d18dbfbf448bd16a0ff106cfbf6f17ee4fa65 SHA512 c7d35aca667d4f5119a5d18c9c6f6001d1bab5890b43c8965fb4866c92360351579aecddb922f3d63a1940af731d5691ad8b3e917678adffe619f5b3da320292
+DIST apache-tomcat-8.5.90-src.tar.gz.asc 849 BLAKE2B 13356f868bea4539a734368b924502127ec68f8cc430a0ccb27dc67058302791ada61e9ba66dd9cc566f783e12728795956c0c356d8176b0f32af3147a9960db SHA512 2ca19b885b464d941753cf506170d1fe7c9ce5f670c02d6059c07ae8e5259f302637d36b362c8c29953b05d22b35ae8f2bee4bbe1617e229a01cea8d081aa58a
DIST apache-tomcat-9.0.74-src.tar.gz 6237459 BLAKE2B d4942b85f184e8ecdc8bbb85256fe70677be772fdbdce906bd097eac6a56653ee08d3b76bbe42f4ef34664229c62ad236557ef8742c9e9bfa8c728927027d3b8 SHA512 a57afcc669d4058b4a46e9c7e196443dd5a09aab2b194d2a1f258fd218e09cec73b5f864ec073d9090a0e633b67f7deae7d643207511dab349d6a578449706ff
DIST apache-tomcat-9.0.74-src.tar.gz.asc 833 BLAKE2B c5f2cc71272b5917cd522f4b3bb480fd39b62b47abfc4ab688c878a8561d3a19b6eeb0390d16512739f0b4b8ae0b275c3c72a3b853ffc82bcf737a61bea644f4 SHA512 ea0795309f240fb771d27f0914b7b7d22fdefd8d4502207d3ed422f91eb51853dc6712eb480505554a13dc04a40657523a4536e9f2a8d60d4ae9a4d8440ea502
DIST apache-tomcat-9.0.75-src.tar.gz 6241477 BLAKE2B f48f47f99fa3eecc4d450674ebb4a133c625e586bde38494a8d56796013256e386e5ed688de198eaa002d9428d412c5ee83923cb96cc618ef06580b793bb4e50 SHA512 19f78fbe3391bbad65494e0071a6df9a26ceb1a4bd387b3425c5f34a02391fcaaae40442cdca3a98c4b7b45963d3a9e51dd6a1b72f11c29904c755cff03def64
@@ -22,10 +26,12 @@ DIST apache-tomcat-9.0.76-src.tar.gz 6259830 BLAKE2B a38641cb194ea479ebd9c03e288
DIST apache-tomcat-9.0.76-src.tar.gz.asc 833 BLAKE2B 84b32dd76c68fe774a4b626c0ceae00d93f83bb5ae2ba4c7be6283f1777c14e9985ab5759ce321574845c6765a0d65859b6fc55c1b99a11b097c304c39b4a60a SHA512 5780f514b4248ee95000e7a31c10d64e489cbc917189817098d9b157ad968a787384b25ae9caa7b74662d4a86976423d13e62b94188089265bc31b44cbbfef69
DIST biz.aQute.bnd-6.4.0.jar 16303123 BLAKE2B 73cdeb9e63c04b41db26f91efc3b01fdfd7c8796d6b1f556c77f90bcdbe048f374b5164b885689f3e62ca45b8ca8b97fce70e1fa13d807d2f76869155c8ba7f5 SHA512 b113177f97894b0ed5cfbc38f96c995d6425e981ec8c7b27d99044793ff77dd2450367ad9ee977f443fba349fe1d68fc26f3aaa737eba0a402abcf29716b2e85
DIST biz.aQute.bndlib-6.4.0.jar 3200265 BLAKE2B c8b8c1d0ff398e2a701edc4431cd8d65671a5e5daa0ef04be6b02eabb570768e0202640c15ce1290a5ae21bb31700a89f2822826851d7dc026267cb31da9f1ef SHA512 15a20751d879291c31b6530cb0d51652bf5bb33bf944ed703369eada439df6464190c01e2872ea6e7535209abd0b4692ea8980499d4b43edfffcc5729633c85d
+EBUILD tomcat-10.1.10.ebuild 5421 BLAKE2B 2d1074057601778824ecfe8649fdfa07baaad33b411cc4b1185bf6ee00bcc8ab6c0b0def501b6ee451becd2c08e11363f8af205d68977d2a84b2ccd8ce1e1613 SHA512 37a01ca859b4f09ea4473d6b125bbca2351d5761e7b4bd61d458012ae3dcb9f7da52414363e7a34207c8aa6ddb46de0ff67af13d84e31daef88814b184538b91
EBUILD tomcat-10.1.8.ebuild 5786 BLAKE2B 0dde89723c9e9ea059f846e184bfe502014a828e921a8b2d2df2204939aa53b9be4602c2b757cfc93fb36dc8e9ba18612a38a49bb527758bfb92737661ea182d SHA512 a5327a33f611f68e5582a22026452f8a89eff27abcf267e75c928aea078737ac5b44f179bf5dc6ef0436243f16b5226431d0ef03c6b8a157f835d5afc8f08503
EBUILD tomcat-10.1.9.ebuild 5421 BLAKE2B 2d1074057601778824ecfe8649fdfa07baaad33b411cc4b1185bf6ee00bcc8ab6c0b0def501b6ee451becd2c08e11363f8af205d68977d2a84b2ccd8ce1e1613 SHA512 37a01ca859b4f09ea4473d6b125bbca2351d5761e7b4bd61d458012ae3dcb9f7da52414363e7a34207c8aa6ddb46de0ff67af13d84e31daef88814b184538b91
EBUILD tomcat-8.5.88.ebuild 4636 BLAKE2B 16d14d1b7ad61614010e6d3eb5cbf25f9545b8737d30422ad3ba140e40a686ae31ae091fc481f4d8835fd1cd71f44b9930c6cf41a561ba5121156088d6693f69 SHA512 9729f7813e53c57908b37d71d113df349880f1993ba6814f7470599960cfda8188d662d532c000338ed091ec3bf6bee7f5a4ae267cc7cd1cd232e800a0ff4bdb
EBUILD tomcat-8.5.89.ebuild 4637 BLAKE2B 91241d2fb01b2f5b91d859870f86732b1793568278551f52311179ee553ac46eb5adf67ab3ac04badc3b8315129da77e1e64145cf888a8f98e7223ae11334e29 SHA512 dc0c128616263c1d2066053cac073c92db1573a093e6585b0b42c580a7768c670df07b03a9da1b01bf6fd76e1b1d24af981e586aece6a7e966f019d0fa9cf570
+EBUILD tomcat-8.5.90.ebuild 4637 BLAKE2B 91241d2fb01b2f5b91d859870f86732b1793568278551f52311179ee553ac46eb5adf67ab3ac04badc3b8315129da77e1e64145cf888a8f98e7223ae11334e29 SHA512 dc0c128616263c1d2066053cac073c92db1573a093e6585b0b42c580a7768c670df07b03a9da1b01bf6fd76e1b1d24af981e586aece6a7e966f019d0fa9cf570
EBUILD tomcat-9.0.74.ebuild 5635 BLAKE2B 48270bb0eee02a0a35f76a75f51121b5afee080aefbfbc474624b1f23fca180edb5fb9555e0f837c32b7c24e83799b6ada260f082172c0b64f916c6a29a90a4a SHA512 fa1b5fab9d9153c75d9656ff68153ec2fda4569f696a49924ea7391be91674ec08d632e239178cd99d48892da21d1a4bc9029c4e460a6d1bc6a5ad5ce42a2806
EBUILD tomcat-9.0.75.ebuild 5270 BLAKE2B 46e88da503114416263b82b02ffa3e44983b203f17ccc4acd119f210d321d08572b913469e9054059e105556a4bdcd9076cc44ec957118ecc11be555082ccd9e SHA512 f9b90798b20a37874b2d515e6a1ced42297552d2470def49b9c49adf4acdb7d73a6c2708bcec1f6dda999fe7c66eca64144197644897055281d12123d686808a
EBUILD tomcat-9.0.76.ebuild 5270 BLAKE2B 46e88da503114416263b82b02ffa3e44983b203f17ccc4acd119f210d321d08572b913469e9054059e105556a4bdcd9076cc44ec957118ecc11be555082ccd9e SHA512 f9b90798b20a37874b2d515e6a1ced42297552d2470def49b9c49adf4acdb7d73a6c2708bcec1f6dda999fe7c66eca64144197644897055281d12123d686808a
diff --git a/www-servers/tomcat/tomcat-10.1.10.ebuild b/www-servers/tomcat/tomcat-10.1.10.ebuild
new file mode 100644
index 000000000000..c8f14587bf71
--- /dev/null
+++ b/www-servers/tomcat/tomcat-10.1.10.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit java-pkg-2 java-ant-2 prefix verify-sig
+
+MY_P="apache-${PN}-${PV}-src"
+
+# Currently we bundle binary versions of bnd.jar
+# See bugs #203080 and #676116
+BND_VERSION="6.4.0"
+BND="biz.aQute.bnd-${BND_VERSION}.jar"
+
+DESCRIPTION="Tomcat Servlet-6.0/JSP-3.1/EL-5.0/WebSocket-2.1/JASPIC-3.0 Container"
+HOMEPAGE="https://tomcat.apache.org/"
+SRC_URI="mirror://apache/${PN}/tomcat-10/v${PV}/src/${MY_P}.tar.gz
+ https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bnd/${BND_VERSION}/${BND}
+ verify-sig? ( https://downloads.apache.org/tomcat/tomcat-$(ver_cut 1)/v${PV}/src/apache-tomcat-${PV}-src.tar.gz.asc )"
+
+LICENSE="Apache-2.0"
+SLOT="10.1"
+KEYWORDS="~amd64 ~amd64-linux"
+IUSE="extra-webapps"
+
+RESTRICT="test" # can we run them on a production system?
+
+ECJ_SLOT="4.26"
+
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
+ dev-java/jax-rpc-api:0
+ >=dev-java/jakartaee-migration-1.0.5:0
+ dev-java/wsdl4j:0"
+RDEPEND="${COMMON_DEP}
+ acct-group/tomcat
+ acct-user/tomcat
+ >=virtual/jre-11:*"
+DEPEND="${COMMON_DEP}
+ app-admin/pwgen
+ dev-java/ant-core
+ >=virtual/jdk-11:*
+ test? (
+ dev-java/ant-junit:0
+ dev-java/easymock:3.2
+ )"
+
+BDEPEND="verify-sig? ( ~sec-keys/openpgp-keys-apache-tomcat-${PV}:${PV} )"
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/tomcat-${PV}.apache.org.asc"
+
+PATCHES=( "${FILESDIR}/${PN}-10.1.6-build.xml.patch" )
+
+S=${WORKDIR}/${MY_P}
+
+BND_HOME="${S}/tomcat-build-libs/bnd"
+BND_JAR="${BND_HOME}/${BND}"
+
+src_unpack() {
+ if use verify-sig; then
+ verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.asc}
+ fi
+
+ unpack ${MY_P}.tar.gz
+
+ mkdir -p "${BND_HOME}" || die "Failed to create dir"
+ ln -s "${DISTDIR}/${BND}" "${BND_HOME}/" || die "Failed to symlink bnd-*.jar"
+}
+
+src_prepare() {
+ default
+
+ find -name '*.jar' -type f -delete -print || die
+
+ local vm_version="$(java-config -g PROVIDES_VERSION)"
+
+ # 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,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}"
+
+# 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 jax-rpc-api)"
+ LC_ALL=C 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() {
+ einfo "Ebuilds of Tomcat support running multiple instances. To manage Tomcat instances, run:"
+ einfo " ${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."
+
+ 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."
+}
diff --git a/www-servers/tomcat/tomcat-8.5.90.ebuild b/www-servers/tomcat/tomcat-8.5.90.ebuild
new file mode 100644
index 000000000000..ec49ff58bef9
--- /dev/null
+++ b/www-servers/tomcat/tomcat-8.5.90.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit java-pkg-2 java-ant-2 prefix verify-sig
+
+MY_P="apache-${P}-src"
+
+DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container"
+HOMEPAGE="https://tomcat.apache.org/"
+SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz
+ verify-sig? ( https://downloads.apache.org/tomcat/tomcat-$(ver_cut 1)/v${PV}/src/apache-tomcat-${PV}-src.tar.gz.asc )"
+
+LICENSE="Apache-2.0"
+SLOT="8.5"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="extra-webapps"
+
+RESTRICT="test" # can we run them on a production system?
+
+ECJ_SLOT="4.15"
+
+# we don't use ~ for el and jsp because the same implementation
+# is also present in tomcat 9 and it would be impossible to install
+# both tomcat 8.5 and 9 at the same time
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}"
+RDEPEND="${COMMON_DEP}
+ acct-group/tomcat
+ acct-user/tomcat
+ >=virtual/jre-1.8:*"
+DEPEND="${COMMON_DEP}
+ app-admin/pwgen
+ dev-java/ant-core
+ >=virtual/jdk-1.8:*
+ doc? (
+ dev-java/jax-rpc-api:0
+ dev-java/wsdl4j:0
+ )
+ test? (
+ >=dev-java/ant-junit-1.9:0
+ dev-java/easymock:3.2
+ )"
+
+BDEPEND="verify-sig? ( ~sec-keys/openpgp-keys-apache-tomcat-${PV}:${PV} )"
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/tomcat-${PV}.apache.org.asc"
+
+PATCHES=( "${FILESDIR}/${PN}-8.5.86-build.xml.patch" )
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ default
+
+ find -name '*.jar' -type f -delete -print || die
+
+ # 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}"
+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 -Dexecute.validate=false"
+
+# revisions of the scripts
+IM_REV="-r2"
+INIT_REV="-r1"
+
+src_compile() {
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
+ use doc && EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only jax-rpc-api):$(java-pkg_getjars --build-only wsdl4j)"
+ LC_ALL=C 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() {
+ einfo "Ebuilds of Tomcat support running multiple instances. To manage Tomcat instances, run:"
+ einfo " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help"
+
+ 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."
+}