From e954345b0087e228e4e5257b00f86060fcb79101 Mon Sep 17 00:00:00 2001 From: William Thomson Date: Sat, 27 Jan 2007 05:16:11 +0000 Subject: [PATCH] Finally stopped building jsp/servlet-api.jars despite not using them after being built. Updated compilation of examples to use system jsp/servlet-api.jars. Switched from soon to be deprecated servletapi to tomcat-servlet-api. Dropped dep on ant in 6.0.x in order to use new split ant. Package-Manager: portage-2.1.2-r1 --- www-servers/tomcat/ChangeLog | 15 +- www-servers/tomcat/Manifest | 43 +- .../5.5.20/jsr152_examples_build-xml.patch | 10 + .../5.5.20/jsr154_examples_build-xml.patch | 10 + .../files/5.5.20/tomcat_build-xml.patch | 367 ++++++++++++++++++ .../tomcat/files/digest-tomcat-5.5.20-r9 | 3 + www-servers/tomcat/tomcat-5.5.20-r9.ebuild | 337 ++++++++++++++++ .../tomcat/tomcat-6.0.7_beta-r4.ebuild | 9 +- .../tomcat/tomcat-6.0.8_alpha-r1.ebuild | 9 +- 9 files changed, 778 insertions(+), 25 deletions(-) create mode 100644 www-servers/tomcat/files/5.5.20/jsr152_examples_build-xml.patch create mode 100644 www-servers/tomcat/files/5.5.20/jsr154_examples_build-xml.patch create mode 100644 www-servers/tomcat/files/5.5.20/tomcat_build-xml.patch create mode 100644 www-servers/tomcat/files/digest-tomcat-5.5.20-r9 create mode 100644 www-servers/tomcat/tomcat-5.5.20-r9.ebuild diff --git a/www-servers/tomcat/ChangeLog b/www-servers/tomcat/ChangeLog index 4f8e5150cc20..9a0c02a39589 100644 --- a/www-servers/tomcat/ChangeLog +++ b/www-servers/tomcat/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for www-servers/tomcat # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.108 2007/01/26 21:07:52 wltjr Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.109 2007/01/27 05:16:11 wltjr Exp $ + +*tomcat-5.5.20-r9 (27 Jan 2007) + + 27 Jan 2007; William L. Thomson Jr. + +files/5.5.20/jsr154_examples_build-xml.patch, + +files/5.5.20/tomcat_build-xml.patch, + +files/5.5.20/jsr152_examples_build-xml.patch, +tomcat-5.5.20-r9.ebuild, + tomcat-6.0.7_beta-r4.ebuild, tomcat-6.0.8_alpha-r1.ebuild: + Finally stopped building jsp/servlet-api.jars despite not using them after + being built. Updated compilation of examples to use system + jsp/servlet-api.jars. Switched from soon to be deprecated servletapi to + tomcat-servlet-api. Dropped dep on ant in 6.0.x in order to use new split + ant. *tomcat-6.0.8_alpha-r1 (26 Jan 2007) *tomcat-6.0.7_beta-r4 (26 Jan 2007) diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest index ff83ab208a4f..cfb2a29b7b23 100644 --- a/www-servers/tomcat/Manifest +++ b/www-servers/tomcat/Manifest @@ -70,10 +70,18 @@ AUX 5.5.20/jasperbuild-xml.patch 463 RMD160 d042043acbaafa7b2be42f071846d5fbe970 MD5 0139160e01d9f8c37007e700adc14edd files/5.5.20/jasperbuild-xml.patch 463 RMD160 d042043acbaafa7b2be42f071846d5fbe970fa62 files/5.5.20/jasperbuild-xml.patch 463 SHA256 8c0758f6f2e556d317087389b7649bc709d738679be7965a50329b724c6e8714 files/5.5.20/jasperbuild-xml.patch 463 +AUX 5.5.20/jsr152_examples_build-xml.patch 403 RMD160 bb9bbb7fe9656ed9b3f4f18bc8e59db0360fe56e SHA1 d8d596ce643a30429194f0003d1847c9565059c5 SHA256 481da3d09b32a3ed1da938df1e9b2a3273ff84b10dfb9a4467de614ed8dd847d +MD5 345c4483f94ba70ccd6170ee50bdabbd files/5.5.20/jsr152_examples_build-xml.patch 403 +RMD160 bb9bbb7fe9656ed9b3f4f18bc8e59db0360fe56e files/5.5.20/jsr152_examples_build-xml.patch 403 +SHA256 481da3d09b32a3ed1da938df1e9b2a3273ff84b10dfb9a4467de614ed8dd847d files/5.5.20/jsr152_examples_build-xml.patch 403 AUX 5.5.20/jsr152build-xml-examples.patch 812 RMD160 e9449414ef88de3e2b54c094c898d75f13e4c74e SHA1 5455201aba4cca42b000477375516a45c380c766 SHA256 36b91bb7ccb67ca31db41a8217c6762b1aff88b0611319aded08421401d7f9b0 MD5 4c33bf7e8bd654980a11408211768a2e files/5.5.20/jsr152build-xml-examples.patch 812 RMD160 e9449414ef88de3e2b54c094c898d75f13e4c74e files/5.5.20/jsr152build-xml-examples.patch 812 SHA256 36b91bb7ccb67ca31db41a8217c6762b1aff88b0611319aded08421401d7f9b0 files/5.5.20/jsr152build-xml-examples.patch 812 +AUX 5.5.20/jsr154_examples_build-xml.patch 406 RMD160 7e2c286db8b0bd4df722507c889f7e2deff65302 SHA1 1bfb15ad4eaec80f16a51f2e1bf0bed31792da38 SHA256 4e98264fb26027fbae39e8c44e44bb1151a84dc3defe6373ded0fd50e6bfd98b +MD5 4834c2eada7c9c01cf69d9d5637eae62 files/5.5.20/jsr154_examples_build-xml.patch 406 +RMD160 7e2c286db8b0bd4df722507c889f7e2deff65302 files/5.5.20/jsr154_examples_build-xml.patch 406 +SHA256 4e98264fb26027fbae39e8c44e44bb1151a84dc3defe6373ded0fd50e6bfd98b files/5.5.20/jsr154_examples_build-xml.patch 406 AUX 5.5.20/jsr154build-xml-examples.patch 836 RMD160 5a0cf4831345c904b5f9b3f89bcbbc0243e676e6 SHA1 29a59f40743784327d8be9307c40c291141fa5bf SHA256 84a82ef51e8cd0470ea3f388c16f3323024e87b74212ffab65977b5d9792a191 MD5 e715be19acef459dbe33804fc0d8b35c files/5.5.20/jsr154build-xml-examples.patch 836 RMD160 5a0cf4831345c904b5f9b3f89bcbbc0243e676e6 files/5.5.20/jsr154build-xml-examples.patch 836 @@ -90,6 +98,10 @@ AUX 5.5.20/tomcat.init 3402 RMD160 e5a519f5ceaf1ce2bda3a5b3c498371839dbd7a8 SHA1 MD5 0721156789c9c4e8a8dba6a0bbbac990 files/5.5.20/tomcat.init 3402 RMD160 e5a519f5ceaf1ce2bda3a5b3c498371839dbd7a8 files/5.5.20/tomcat.init 3402 SHA256 c0de2947fa3a6f3d5c30a9e283de5aa99914f287b036faa7c509af0533144e52 files/5.5.20/tomcat.init 3402 +AUX 5.5.20/tomcat_build-xml.patch 13828 RMD160 3add8fb7d26bef7df205d3ec43e1a55cd6b739d4 SHA1 3a8ae3d686046f1938c71bd790d6f9ecf4339556 SHA256 9b1b9feb18d6f1dc5c2226c195f88a2f6cb9d68a2144e47e883fb57790c281f9 +MD5 47210f9a3e6b7c1809b34cfdab7fdb9b files/5.5.20/tomcat_build-xml.patch 13828 +RMD160 3add8fb7d26bef7df205d3ec43e1a55cd6b739d4 files/5.5.20/tomcat_build-xml.patch 13828 +SHA256 9b1b9feb18d6f1dc5c2226c195f88a2f6cb9d68a2144e47e883fb57790c281f9 files/5.5.20/tomcat_build-xml.patch 13828 AUX 5.5.20/tomcatbuild-xml.patch 12470 RMD160 e936baf49d5f1a34b5b3c5787d62fb5a06ea52a2 SHA1 4857962223dc50dbb43e9e362e53f114723ff4d6 SHA256 d76b0dcc3a6d8d60c0305d74ef980e5461bbcaef1059a306e38e5d358c2a01a4 MD5 83d2b72b5c1c52e80492ee5199eb3625 files/5.5.20/tomcatbuild-xml.patch 12470 RMD160 e936baf49d5f1a34b5b3c5787d62fb5a06ea52a2 files/5.5.20/tomcatbuild-xml.patch 12470 @@ -127,18 +139,22 @@ EBUILD tomcat-5.5.20-r8.ebuild 10299 RMD160 dd99a6649a603e8262aeb33ae75a13466a3e MD5 8af16e1d4381d7656ed93be48867ad03 tomcat-5.5.20-r8.ebuild 10299 RMD160 dd99a6649a603e8262aeb33ae75a13466a3e36aa tomcat-5.5.20-r8.ebuild 10299 SHA256 9873ddf7870807f4bf6701a9f00ccc0202ae273c859a7c0c05a0e7c4c59a5601 tomcat-5.5.20-r8.ebuild 10299 -EBUILD tomcat-6.0.7_beta-r4.ebuild 4810 RMD160 3f86d7cc1c645fc4ed2648fb7ea4466caacdd790 SHA1 7c5cc93de40df8dea21efd1f1e4d22c197d6aa0d SHA256 deb61fe72a327f4438208599814c8c64fcd9efd394f3f08cbdb87d3bdb803c18 -MD5 ceb9db771cc0484f85cc49d6b7e171f9 tomcat-6.0.7_beta-r4.ebuild 4810 -RMD160 3f86d7cc1c645fc4ed2648fb7ea4466caacdd790 tomcat-6.0.7_beta-r4.ebuild 4810 -SHA256 deb61fe72a327f4438208599814c8c64fcd9efd394f3f08cbdb87d3bdb803c18 tomcat-6.0.7_beta-r4.ebuild 4810 -EBUILD tomcat-6.0.8_alpha-r1.ebuild 4812 RMD160 1343157691bb0a5a9f2fbec4f381dc17bcc37160 SHA1 9c830a7709f256624e6389f153228706c2f96cac SHA256 8faac466d80750a5f44e9718c7bd4494b09c429d5ad4d6181f9c3b7e15016193 -MD5 4159afb58fe80a7ff5931f7b47cfd6a1 tomcat-6.0.8_alpha-r1.ebuild 4812 -RMD160 1343157691bb0a5a9f2fbec4f381dc17bcc37160 tomcat-6.0.8_alpha-r1.ebuild 4812 -SHA256 8faac466d80750a5f44e9718c7bd4494b09c429d5ad4d6181f9c3b7e15016193 tomcat-6.0.8_alpha-r1.ebuild 4812 -MISC ChangeLog 34972 RMD160 226e3cba19c16a42b34f01648ebe523a8d4b049f SHA1 fca9916bfebc220314632bd23e046065c61cf1cb SHA256 07d6e7e787d81d569394b2adfa89f06e26f56daf51445aacbee1bcebcb3dcfa2 -MD5 537cf1c114fc0694d0086848b90ef04d ChangeLog 34972 -RMD160 226e3cba19c16a42b34f01648ebe523a8d4b049f ChangeLog 34972 -SHA256 07d6e7e787d81d569394b2adfa89f06e26f56daf51445aacbee1bcebcb3dcfa2 ChangeLog 34972 +EBUILD tomcat-5.5.20-r9.ebuild 10684 RMD160 bad5ac8824257cd764ff80b6e04855293c1b3d56 SHA1 232cea50261278bad777be81735997c4db49474e SHA256 91468c5b06ded16921bbedf9e4b3cd4772d180b78f0c361a63bd8adc67778b1b +MD5 ffd2beb748b95a45f34b63657059f6db tomcat-5.5.20-r9.ebuild 10684 +RMD160 bad5ac8824257cd764ff80b6e04855293c1b3d56 tomcat-5.5.20-r9.ebuild 10684 +SHA256 91468c5b06ded16921bbedf9e4b3cd4772d180b78f0c361a63bd8adc67778b1b tomcat-5.5.20-r9.ebuild 10684 +EBUILD tomcat-6.0.7_beta-r4.ebuild 4808 RMD160 7bf6a14a724fe51a2926a27b517d268a09f9bc68 SHA1 738bb7511d1101af370c925b97e49de8bfdd4f5c SHA256 4f6b583033ffbe5be1f4a21d8dbbb31c76704a71f41481df1955f063f2df1139 +MD5 f05d9679890ac85f616689b20071ff0d tomcat-6.0.7_beta-r4.ebuild 4808 +RMD160 7bf6a14a724fe51a2926a27b517d268a09f9bc68 tomcat-6.0.7_beta-r4.ebuild 4808 +SHA256 4f6b583033ffbe5be1f4a21d8dbbb31c76704a71f41481df1955f063f2df1139 tomcat-6.0.7_beta-r4.ebuild 4808 +EBUILD tomcat-6.0.8_alpha-r1.ebuild 4810 RMD160 b4ffe5308cd1db6d532f11ccab18e3493558e052 SHA1 672ed1f41ce0a029a6830a5ae5dcaaa36195c087 SHA256 888252d67cea0f9a3b0851a46b5cb27d384b3bb36c92c508865e668ae3ab3d9a +MD5 2ee8317bb2ac19ebdb7091bf9f627539 tomcat-6.0.8_alpha-r1.ebuild 4810 +RMD160 b4ffe5308cd1db6d532f11ccab18e3493558e052 tomcat-6.0.8_alpha-r1.ebuild 4810 +SHA256 888252d67cea0f9a3b0851a46b5cb27d384b3bb36c92c508865e668ae3ab3d9a tomcat-6.0.8_alpha-r1.ebuild 4810 +MISC ChangeLog 35583 RMD160 6865fd930e79fc8495ec730c9d395b0780a5ba5a SHA1 e933518825ed7974c253450f5071790bbc21f1c2 SHA256 c5f36ba216aaaf03edab613a9386e3feb6761f80f19afedee67fde6695fddfec +MD5 32ac7af50dde4584bebf4e8b800d6133 ChangeLog 35583 +RMD160 6865fd930e79fc8495ec730c9d395b0780a5ba5a ChangeLog 35583 +SHA256 c5f36ba216aaaf03edab613a9386e3feb6761f80f19afedee67fde6695fddfec ChangeLog 35583 MISC metadata.xml 556 RMD160 88a7809fe3f73c2d351b9fdda025fe88dfb11f31 SHA1 e8dcd8204d0ea02558dd07e1aded5dc58ed1460c SHA256 ac94c1d58b05b47598f311e6efb971fdb30ad9a25f3c32cb9c064fb6330dad79 MD5 0609d3339e0b8d5a3b4707f6b02aad3a metadata.xml 556 RMD160 88a7809fe3f73c2d351b9fdda025fe88dfb11f31 metadata.xml 556 @@ -155,6 +171,9 @@ SHA256 fda2efc7c4fe103d3fec9599fe3797d8784381008f71d9006c7224db91862b30 files/di MD5 8adc14a8534e1c6f8d5f96b371e1895f files/digest-tomcat-5.5.20-r8 277 RMD160 b9c5deac84bf5acd7a65ad80bdfaca9f7e343f3f files/digest-tomcat-5.5.20-r8 277 SHA256 fda2efc7c4fe103d3fec9599fe3797d8784381008f71d9006c7224db91862b30 files/digest-tomcat-5.5.20-r8 277 +MD5 8adc14a8534e1c6f8d5f96b371e1895f files/digest-tomcat-5.5.20-r9 277 +RMD160 b9c5deac84bf5acd7a65ad80bdfaca9f7e343f3f files/digest-tomcat-5.5.20-r9 277 +SHA256 fda2efc7c4fe103d3fec9599fe3797d8784381008f71d9006c7224db91862b30 files/digest-tomcat-5.5.20-r9 277 MD5 ae090639fc2a4b844084020e9fd68796 files/digest-tomcat-6.0.7_beta-r4 274 RMD160 887290424c340b8a024770ae6ee2adeb0252b5ea files/digest-tomcat-6.0.7_beta-r4 274 SHA256 8c88ae20979c83fd4529d2493cf5bfc63d86ff37cb46af296db58166d2e0ad3d files/digest-tomcat-6.0.7_beta-r4 274 diff --git a/www-servers/tomcat/files/5.5.20/jsr152_examples_build-xml.patch b/www-servers/tomcat/files/5.5.20/jsr152_examples_build-xml.patch new file mode 100644 index 000000000000..1e4e013b741d --- /dev/null +++ b/www-servers/tomcat/files/5.5.20/jsr152_examples_build-xml.patch @@ -0,0 +1,10 @@ +--- apache-tomcat-5.5.20-src/servletapi/jsr152/build.xml 2007-01-27 00:02:27.000000000 -0500 ++++ build.xml 2007-01-27 00:02:44.000000000 -0500 +@@ -20,6 +20,7 @@ + + + ++ + + + diff --git a/www-servers/tomcat/files/5.5.20/jsr154_examples_build-xml.patch b/www-servers/tomcat/files/5.5.20/jsr154_examples_build-xml.patch new file mode 100644 index 000000000000..9c7b417a3b1f --- /dev/null +++ b/www-servers/tomcat/files/5.5.20/jsr154_examples_build-xml.patch @@ -0,0 +1,10 @@ +--- apache-tomcat-5.5.20-src/servletapi/jsr154/build.xml 2007-01-26 23:50:15.000000000 -0500 ++++ build.xml 2007-01-26 23:56:03.000000000 -0500 +@@ -17,6 +17,7 @@ + + + ++ + + + diff --git a/www-servers/tomcat/files/5.5.20/tomcat_build-xml.patch b/www-servers/tomcat/files/5.5.20/tomcat_build-xml.patch new file mode 100644 index 000000000000..109caf67af37 --- /dev/null +++ b/www-servers/tomcat/files/5.5.20/tomcat_build-xml.patch @@ -0,0 +1,367 @@ +--- apache-tomcat-5.5.20-src/build/build.xml 2007-01-26 19:10:26.000000000 -0500 ++++ build.xml 2007-01-26 19:31:49.000000000 -0500 +@@ -143,6 +143,7 @@ + + + ++ ++ + ++ --> + + + +@@ -395,15 +396,14 @@ + + ++ ++ ++ + +- + +- + +- + + +- + + + +@@ -437,23 +437,6 @@ + addWebXmlMappings="true" + outputDir="${ROOT.base}/WEB-INF/src" /> + +- +- +- +- + + + +- +- +- +- +- +- ++ + +- ++ ++ ++ ++ ++ ++ ++ + + + + + +- ++ + + + + + + +- + +- +- ++ + +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + + + +- ++ + + + + + + ++ + +- ++ ++ + + + +@@ -653,28 +665,8 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ + + + +@@ -754,19 +746,11 @@ + + + +- +- +- ========== Building: webapps +- +- +- ++ + + +- +- +- +- ++ ++ + + + +@@ -779,6 +763,18 @@ + + + ++ ++ ++ ++ ++ ++ ========== Building: webapps ++ ++ ++ ++ ++ + + + +@@ -850,14 +846,7 @@ + filtering="true" /> + + +- +- +- +- +- +- +- ++ + + +@@ -896,9 +885,20 @@ + todir="${tomcat.build}/conf/Catalina/localhost" /> + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + +- + + + +@@ -1041,11 +1041,11 @@ + + + +- ++ + + + +@@ -1092,8 +1092,9 @@ + + ++ + Target: Webapps precompilation ... + + +@@ -1188,10 +1189,11 @@ + description="Catalina Tests" depends="dist-tester"> + + ++ + + + +@@ -1871,10 +1873,10 @@ + + + ++ + + + +@@ -1916,7 +1918,6 @@ + + + +- + + + +@@ -1937,7 +1938,6 @@ + + + +- + + + +@@ -1976,7 +1975,7 @@ + + + +- ++ --> + + + diff --git a/www-servers/tomcat/files/digest-tomcat-5.5.20-r9 b/www-servers/tomcat/files/digest-tomcat-5.5.20-r9 new file mode 100644 index 000000000000..25cb711a112c --- /dev/null +++ b/www-servers/tomcat/files/digest-tomcat-5.5.20-r9 @@ -0,0 +1,3 @@ +MD5 5775bae8fac16a0e3a2c913c4768bb37 apache-tomcat-5.5.20-src.tar.gz 4796377 +RMD160 587590d2e272d1ede73501b62933f544cd969822 apache-tomcat-5.5.20-src.tar.gz 4796377 +SHA256 19f24717fb3e2db902c33e21650dfa88bbf98428c15b1ed68ecaf7a9150e4a77 apache-tomcat-5.5.20-src.tar.gz 4796377 diff --git a/www-servers/tomcat/tomcat-5.5.20-r9.ebuild b/www-servers/tomcat/tomcat-5.5.20-r9.ebuild new file mode 100644 index 000000000000..61c333826e6d --- /dev/null +++ b/www-servers/tomcat/tomcat-5.5.20-r9.ebuild @@ -0,0 +1,337 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-5.5.20-r9.ebuild,v 1.1 2007/01/27 05:16:11 wltjr Exp $ + +inherit eutils java-pkg-2 java-ant-2 + +DESCRIPTION="Apache Servlet-2.4/JSP-2.0 Container" + +MY_P="apache-${P}-src" +SLOT="5.5" +SRC_URI="mirror://apache/${PN}/${PN}-5/v${PV}/src/${MY_P}.tar.gz" +HOMEPAGE="http://tomcat.apache.org/" +KEYWORDS="~amd64 -ppc -ppc64 ~x86 ~x86-fbsd" +LICENSE="Apache-2.0" + +IUSE="admin java5 doc examples source test" + +RDEPEND="=dev-java/eclipse-ecj-3.1* + =dev-java/commons-beanutils-1.7* + >=dev-java/commons-collections-3.1 + >=dev-java/commons-daemon-1.0.1 + >=dev-java/commons-dbcp-1.2.1 + >=dev-java/commons-digester-1.7 + >=dev-java/commons-fileupload-1.1 + >=dev-java/commons-io-1.1 + >=dev-java/commons-el-1.0 + >=dev-java/commons-launcher-0.9 + >=dev-java/commons-logging-1.0.4 + >=dev-java/commons-modeler-1.1 + >=dev-java/commons-pool-1.2 + >=dev-java/log4j-1.2.9 + =dev-java/tomcat-servlet-api-${PV} + admin? ( =dev-java/struts-1.2* ) + dev-java/sun-javamail + java5? ( || ( >=virtual/jre-1.5 =virtual/jre-1.6 ) ) + !java5? ( + =virtual/jre-1.4* + =dev-java/commons-httpclient-2.0* + dev-java/sun-jaf + >=dev-java/junit-3.8.1 + =dev-java/mx4j-core-3* + >=dev-java/saxpath-1.0 + >=dev-java/xerces-2.7.1 + =dev-java/xml-commons-external-1.3* + )" +DEPEND="java5? ( || ( >=virtual/jdk-1.5 >=virtual/jdk-1.6 ) ) + !java5? ( =virtual/jdk-1.4* ) + ${RDEPEND} + >=dev-java/java-config-2.0.31 + dev-java/ant" + +S=${WORKDIR}/${MY_P} + +TOMCAT_NAME="${PN}-${SLOT}" +WEBAPPS_DIR="/var/lib/${TOMCAT_NAME}/webapps" + +pkg_setup() { + # new user for tomcat + enewgroup tomcat + enewuser tomcat -1 -1 /dev/null tomcat + + java-pkg_filter-compiler ecj-3.1 ecj-3.2 + + if use java5; then + JAVA_PKG_WANT_SOURCE="1.5" + JAVA_PKG_WANT_TARGET="1.5" + fi +} + +src_unpack() { + unpack ${A} + cd ${S} + + local PATCHES=" + mainbuild-xml.patch + tomcat_build-xml.patch + catalinabuild-xml.patch + jasperbuild-xml.patch + " + for patch in ${PATCHES}; do + epatch "${FILESDIR}/${PV}/${patch}" + done + if use examples; then + epatch "${FILESDIR}/${PV}/jsr152_examples_build-xml.patch" + epatch "${FILESDIR}/${PV}/jsr154_examples_build-xml.patch" + fi + + # avoid packed jars :-) + mkdir -p ${S}/build/build/common + cd ${S}/build/build + + mkdir ./bin && cd ./bin + java-pkg_jar-from commons-logging commons-logging-api.jar + java-pkg_jar-from commons-daemon + if ! use java5; then + java-pkg_jar-from mx4j-core-3.0 mx4j.jar jmx.jar + java-pkg_jar-from mx4j-core-3.0 mx4j-rjmx.jar jmx-remote.jar + fi + + if ! use java5; then + mkdir ${S}/build/build/common/endorsed && cd ${S}/build/build/common/endorsed + java-pkg_jar-from xml-commons-external-1.3 xml-apis.jar + java-pkg_jar-from xerces-2 xercesImpl.jar + fi + + mkdir ${S}/build/build/common/lib && cd ${S}/build/build/common/lib + java-pkg_jar-from ant-core + java-pkg_jar-from commons-collections + java-pkg_jar-from commons-dbcp + java-pkg_jar-from commons-el + java-pkg_jar-from commons-pool + java-pkg_jar-from tomcat-servlet-api-2.4 + + mkdir -p ${S}/build/build/server/lib && cd ${S}/build/build/server/lib + java-pkg_jar-from commons-beanutils-1.7 commons-beanutils.jar + java-pkg_jar-from commons-digester + java-pkg_jar-from commons-modeler + +} + +src_compile(){ + local antflags="-Dbase.path=${T}" + + antflags="${antflags} -Dservletapi.build.notrequired=true" + antflags="${antflags} -Djspapi.build.notrequired=true" + antflags="${antflags} -Dcommons-beanutils.jar=$(java-pkg_getjar commons-beanutils-1.7 commons-beanutils.jar)" + antflags="${antflags} -Dcommons-collections.jar=$(java-config -p commons-collections)" + antflags="${antflags} -Dcommons-daemon.jar=$(java-config -p commons-daemon)" + antflags="${antflags} -Dcommons-digester.jar=$(java-config -p commons-digester)" + antflags="${antflags} -Dcommons-dbcp.jar=$(java-config -p commons-dbcp)" + antflags="${antflags} -Dcommons-el.jar=$(java-config -p commons-el)" + antflags="${antflags} -Dcommons-fileupload.jar=$(java-config -p commons-fileupload)" + antflags="${antflags} -Dcommons-launcher.jar=$(java-config -p commons-launcher)" + antflags="${antflags} -Dcommons-logging.jar=$(java-pkg_getjar commons-logging commons-logging.jar)" + antflags="${antflags} -Dcommons-logging-api.jar=$(java-pkg_getjar commons-logging commons-logging-api.jar)" + antflags="${antflags} -Dcommons-pool.jar=$(java-config -p commons-pool)" + antflags="${antflags} -Dcommons-modeler.jar=$(java-config -p commons-modeler)" + antflags="${antflags} -Djdt.jar=$(java-pkg_getjar eclipse-ecj-3.1 ecj.jar)" + antflags="${antflags} -Djsp-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.4 jsp-api.jar)" + antflags="${antflags} -Djunit.jar=$(java-config -p junit)" + antflags="${antflags} -Dlog4j.jar=$(java-config -p log4j)" + antflags="${antflags} -Dmail.jar=$(java-pkg_getjar sun-javamail mail.jar)" + antflags="${antflags} -Dservlet-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.4 servlet-api.jar)" + if use admin; then + antflags="${antflags} -Dstruts.jar=$(java-pkg_getjar struts-1.2 struts.jar)" + antflags="${antflags} -Dstruts.home=/usr/share/struts" + else + antflags="${antflags} -Dadmin.build.notrequired=true" + antflags="${antflags} -Dadmin.precompile.notrequired=true" + fi + if ! use examples; then + antflags="${antflags} -Dexamples.build.notrequired=true" + antflags="${antflags} -Dexamples.precompile.notrequired=true" + fi + antflags="${antflags} -Djasper.home=${S}/jasper" + if ! use java5; then + antflags="${antflags} -Dactivation.jar=$(java-config -p sun-jaf)" + antflags="${antflags} -Dcommons-httpclient.jar=$(java-config -p commons-httpclient)" + antflags="${antflags} -Djmx.jar=$(java-pkg_getjar mx4j-core-3.0 mx4j.jar)" + antflags="${antflags} -Djmx-remote.jar=$(java-pkg_getjar mx4j-core-3.0 mx4j-rjmx.jar)" + antflags="${antflags} -Dsaxpath.jar=$(java-pkg_getjar saxpath saxpath.jar)" + antflags="${antflags} -DxercesImpl.jar=$(java-pkg_getjar xerces-2 xercesImpl.jar)" + antflags="${antflags} -Dxml-apis.jar=$(java-pkg_getjar xml-commons-external-1.3 xml-apis.jar)" + fi + + # prevent classpath bloat with ant-1.7.0 which makes admin app fail + ANT_TASKS="ant-trax" eant ${antflags} +} + +src_install() { + cd ${S}/build/build + + # init.d, conf.d + newinitd ${FILESDIR}/${PV}/tomcat.init ${TOMCAT_NAME} + newconfd ${FILESDIR}/${PV}/tomcat.conf ${TOMCAT_NAME} + + # create dir structure + diropts -m755 -o tomcat -g tomcat + dodir /usr/share/${TOMCAT_NAME} + keepdir /var/log/${TOMCAT_NAME}/ + keepdir /var/tmp/${TOMCAT_NAME}/ + keepdir /var/run/${TOMCAT_NAME}/ + + local CATALINA_BASE=/var/lib/${TOMCAT_NAME}/ + dodir ${CATALINA_BASE} + keepdir ${CATALINA_BASE}/shared/lib + keepdir ${CATALINA_BASE}/shared/classes + + keepdir /usr/share/${TOMCAT_NAME}/common/lib + + dodir /etc/${TOMCAT_NAME} + fperms 750 /etc/${TOMCAT_NAME} + + diropts -m0755 + + # we don't need dos scripts + rm -f bin/*.bat + + # copy the manager and admin context's to the right position + mkdir -p conf/Catalina/localhost + if use admin; then + cp ${S}/container/webapps/admin/admin.xml \ + conf/Catalina/localhost + fi + cp ${S}/container/webapps/manager/manager.xml \ + conf/Catalina/localhost + + # make the jars available via java-config -p and jar-from, etc + base=$(pwd) + libdirs="common/lib server/lib" + for dir in ${libdirs} + do + cd ${dir} + + for jar in *.jar; + do + # replace the file with a symlink + if [ ! -L ${jar} ]; then + java-pkg_dojar ${jar} + rm -f ${jar} + ln -s ${DESTTREE}/share/${TOMCAT_NAME}/lib/${jar} ${jar} + fi + done + + cd ${base} + done + + # replace a packed struts.jar + if use admin; then + cd server/webapps/admin/WEB-INF/lib + rm -f struts.jar + java-pkg_jar-from struts-1.2 struts.jar + cd ${base} + else + rm -fR server/webapps/admin + fi + + cd server/webapps/manager/WEB-INF/lib + java-pkg_jar-from commons-fileupload + java-pkg_jar-from commons-io-1 + cd ${base} + + # replace the default pw with a random one, see #92281 + local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15) + sed -e s:SHUTDOWN:${randpw}: -i conf/{server,server-minimal}.xml + + # copy over the directories + chown -R tomcat:tomcat webapps/* conf/* + cp -pR conf/* ${D}/etc/${TOMCAT_NAME} || die "failed to copy conf" + cp -HR bin common server ${D}/usr/share/${TOMCAT_NAME} || die "failed to copy" + + keepdir ${WEBAPPS_DIR} + set_webapps_perms ${D}/${WEBAPPS_DIR} + + # Copy over webapps, some controlled by use flags + cp -p ../RELEASE-NOTES webapps/ROOT/RELEASE-NOTES.txt + cp -pr webapps/ROOT ${D}${CATALINA_BASE}/webapps + if use doc; then + cp -pr webapps/tomcat-docs ${D}${CATALINA_BASE}/webapps + fi + if use examples; then + cp -pr webapps/{jsp-examples,servlets-examples,webdav} \ + ${D}${CATALINA_BASE}/webapps + fi + + # symlink the directories to make CATALINA_BASE possible + dosym /etc/${TOMCAT_NAME} ${CATALINA_BASE}/conf + dosym /var/log/${TOMCAT_NAME} ${CATALINA_BASE}/logs + dosym /var/tmp/${TOMCAT_NAME} ${CATALINA_BASE}/temp + dosym /var/run/${TOMCAT_NAME} ${CATALINA_BASE}/work + + dodoc ${S}/build/{RELEASE-NOTES,RUNNING.txt} + fperms 640 /etc/${TOMCAT_NAME}/tomcat-users.xml +} + +pkg_postinst() { + #due to previous ebuild bloopers, make sure everything is correct + chown root:root /etc/init.d/${TOMCAT_NAME} + chown root:root /etc/conf.d/${TOMCAT_NAME} + + ewarn + ewarn " This ebuild implements a new filesystem layout for tomcat" + ewarn " please read http://www.gentoo.org/proj/en/java/tomcat-guide.xml" + ewarn " for more information!." + elog + elog " Please file any bugs at http://bugs.gentoo.org/ or else it" + elog " may not get seen. Thank you." + elog + +# elog "Run emerge --config =${PF}" +# elog "to configure Tomcat if you need to for example" +# elog "change the home directory of the Tomcat user." +} + +#helpers +set_webapps_perms() { + chown tomcat:tomcat ${1} || die "Failed to change owner off ${1}." + chmod 750 ${1} || die "Failed to change permissions off ${1}." +} + +pkg_config() { + # Better suggestions are welcome + local currentdir="$(getent passwd tomcat | gawk -F':' '{ print $6 }')" + + elog "The default home directory for Tomcat is /dev/null." + elog "You need to change it if your applications needs it to" + elog "be an actual directory. Current home directory:" + elog "${currentdir}" + elog "" + elog "Do you want to change it [yes/no]?" + + local answer + read answer + + if [[ "${answer}" == "yes" ]]; then + elog "" + elog "Suggestions:" + elog "${WEBAPPS_DIR}" + elog "" + elog "If you want to suggest a directory, file a bug to" + elog "http://bugs.gentoo.org" + elog "" + elog "Enter home directory:" + + local homedir + read homedir + + elog "" + elog "Setting home directory to: ${homedir}" + + /usr/sbin/usermod -d"${homedir}" tomcat + + elog "You can run emerge --config =${PF}" + elog "again to change to homedir" + elog "at any time." + fi +} diff --git a/www-servers/tomcat/tomcat-6.0.7_beta-r4.ebuild b/www-servers/tomcat/tomcat-6.0.7_beta-r4.ebuild index 8e41eb27ac27..774e32534814 100644 --- a/www-servers/tomcat/tomcat-6.0.7_beta-r4.ebuild +++ b/www-servers/tomcat/tomcat-6.0.7_beta-r4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-6.0.7_beta-r4.ebuild,v 1.1 2007/01/26 21:07:52 wltjr Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-6.0.7_beta-r4.ebuild,v 1.2 2007/01/27 05:16:11 wltjr Exp $ inherit eutils java-pkg-2 java-ant-2 @@ -25,11 +25,7 @@ RDEPEND="|| ( >=virtual/jre-1.5 >=virtual/jre-1.6 ) DEPEND="|| ( >=virtual/jdk-1.5 >=virtual/jdk-1.6 ) ${RDEPEND} - test? ( - dev-java/junit - dev-java/ant - ) - !test? ( dev-java/ant-core )" + test? ( dev-java/junit )" S=${WORKDIR}/${MY_P} @@ -66,6 +62,7 @@ src_compile(){ # ANT_OPTS=-XX:MaxPermSize=128m local antflags="build-jasper-jdt build-only -Dbase.path=${T}" + antflags="${antflags} -Dcompile.debug=false" antflags="${antflags} -Dant.jar=$(java-pkg_getjar ant-core ant.jar)" antflags="${antflags} -Dcommons-daemon.jar=$(java-pkg_getjar commons-daemon commons-daemon.jar)" antflags="${antflags} -Djdt.jar=$(java-pkg_getjar eclipse-ecj-3.2 ecj.jar)" diff --git a/www-servers/tomcat/tomcat-6.0.8_alpha-r1.ebuild b/www-servers/tomcat/tomcat-6.0.8_alpha-r1.ebuild index e43d6dec272e..7f201203846c 100644 --- a/www-servers/tomcat/tomcat-6.0.8_alpha-r1.ebuild +++ b/www-servers/tomcat/tomcat-6.0.8_alpha-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-6.0.8_alpha-r1.ebuild,v 1.1 2007/01/26 21:07:52 wltjr Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-6.0.8_alpha-r1.ebuild,v 1.2 2007/01/27 05:16:11 wltjr Exp $ inherit eutils java-pkg-2 java-ant-2 @@ -25,11 +25,7 @@ RDEPEND="|| ( >=virtual/jre-1.5 >=virtual/jre-1.6 ) DEPEND="|| ( >=virtual/jdk-1.5 >=virtual/jdk-1.6 ) ${RDEPEND} - test? ( - dev-java/junit - dev-java/ant - ) - !test? ( dev-java/ant-core )" + test? ( dev-java/junit )" S=${WORKDIR}/${MY_P} @@ -66,6 +62,7 @@ src_compile(){ # ANT_OPTS=-XX:MaxPermSize=128m local antflags="build-jasper-jdt build-only -Dbase.path=${T}" + antflags="${antflags} -Dcompile.debug=false" antflags="${antflags} -Dant.jar=$(java-pkg_getjar ant-core ant.jar)" antflags="${antflags} -Dcommons-daemon.jar=$(java-pkg_getjar commons-daemon commons-daemon.jar)" antflags="${antflags} -Djdt.jar=$(java-pkg_getjar eclipse-ecj-3.2 ecj.jar)" -- 2.26.2