summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Sennhauser <sera@gentoo.org>2012-07-20 17:36:54 +0000
committerRalph Sennhauser <sera@gentoo.org>2012-07-20 17:36:54 +0000
commita48969c1213457269708920f64a5b94ee2b04993 (patch)
tree536bf1339b19b704a02e8b90d1a3b19790a65483 /www-servers
parentRequire elfutils[static-libs] #427222 by toogle. (diff)
downloadhistorical-a48969c1213457269708920f64a5b94ee2b04993.tar.gz
historical-a48969c1213457269708920f64a5b94ee2b04993.tar.bz2
historical-a48969c1213457269708920f64a5b94ee2b04993.zip
Full rewrite.
Add tomcat-instance-manager.bash to convienintly create and remove multiple instances. Don't symlink jars but use java-config as appropriate. Migrate init script to baselayout2 including major cleanup. Add use extra-webapps to build and install the docs and examples web apps. Use USE=doc for javadocs. Major cleanup of the ebuild, like dropping elog massages obsolete for ages. Don't copy manager and host-manager to catalina base but use a shared instance in catalina home which gets updated with a package update. Actually install sources if requested. Initial Gentoo Prefix support. #180519 : don kill ROOT application #191611 : init script improvements #254526 : emerge --config, implemented with tomcat-instance-manager.bash #283273, #363931 : build docs and examples #309211 : handling of manager / host-manager #333153 : arbitrary classpath per instance #381693 : init fails with non existent CATALINA_TMPDIR #406285, #411597 : support multiple instances #407979 : fails if /run is tmpfs #420383 : forces invalid java compiler Package-Manager: portage-2.1.11.9/cvs/Linux x86_64
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/tomcat/ChangeLog33
-rw-r--r--www-servers/tomcat/Manifest27
-rw-r--r--www-servers/tomcat/files/tomcat-6.0.35-build.xml.patch31
-rw-r--r--www-servers/tomcat/files/tomcat-7.0.29-build.xml.patch105
-rw-r--r--www-servers/tomcat/files/tomcat-instance-manager.bash240
-rw-r--r--www-servers/tomcat/files/tomcat.conf49
-rw-r--r--www-servers/tomcat/files/tomcat.init104
-rw-r--r--www-servers/tomcat/metadata.xml17
-rw-r--r--www-servers/tomcat/tomcat-6.0.35-r1.ebuild134
-rw-r--r--www-servers/tomcat/tomcat-7.0.29-r1.ebuild133
10 files changed, 862 insertions, 11 deletions
diff --git a/www-servers/tomcat/ChangeLog b/www-servers/tomcat/ChangeLog
index 3be25105e9dc..59eb7e72c318 100644
--- a/www-servers/tomcat/ChangeLog
+++ b/www-servers/tomcat/ChangeLog
@@ -1,6 +1,37 @@
# ChangeLog for www-servers/tomcat
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.294 2012/07/08 21:35:54 fordfrog Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.295 2012/07/20 17:36:54 sera Exp $
+
+*tomcat-7.0.29-r1 (20 Jul 2012)
+*tomcat-6.0.35-r1 (20 Jul 2012)
+
+ 20 Jul 2012; Ralph Sennhauser <sera@gentoo.org> +tomcat-6.0.35-r1.ebuild,
+ +files/tomcat-6.0.35-build.xml.patch, +tomcat-7.0.29-r1.ebuild,
+ +files/tomcat-7.0.29-build.xml.patch, +files/tomcat.conf, +files/tomcat.init,
+ +files/tomcat-instance-manager.bash, metadata.xml:
+ Full rewrite.
+ Add tomcat-instance-manager.bash to convienintly create and remove multiple
+ instances.
+ Don't symlink jars but use java-config as appropriate.
+ Migrate init script to baselayout2 including major cleanup.
+ Add use extra-webapps to build and install the docs and examples web apps.
+ Use USE=doc for javadocs.
+ Major cleanup of the ebuild, like dropping elog massages obsolete for ages.
+ Don't copy manager and host-manager to catalina base but use a shared
+ instance in catalina home which gets updated with a package
+ update.
+ Actually install sources if requested.
+ Initial Gentoo Prefix support.
+ #180519 : don kill ROOT application
+ #191611 : init script improvements
+ #254526 : emerge --config, implemented with tomcat-instance-manager.bash
+ #283273, #363931 : build docs and examples
+ #309211 : handling of manager / host-manager
+ #333153 : arbitrary classpath per instance
+ #381693 : init fails with non existent CATALINA_TMPDIR
+ #406285, #411597 : support multiple instances
+ #407979 : fails if /run is tmpfs
+ #420383 : forces invalid java compiler
*tomcat-7.0.29 (08 Jul 2012)
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest
index b0b951a5d89b..ca9c350dbfdc 100644
--- a/www-servers/tomcat/Manifest
+++ b/www-servers/tomcat/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
AUX 6/catalina.policy 6956 SHA256 9399efda3f6cfc238fb783fb338060e67aff15d0044b31c3d0265e1f9e5769e5 SHA512 fd41389f562890994a181e120af6c3ecd358fdcce6a3891091375e53f088e254bc07fb8ee607c8d0f4533fd59ebee32981ec2fbced21de7a1a08b7b45e8d7169 WHIRLPOOL a903691689662cfec8a4fbe827a34183fbadaa0b3dae275a715762fcb6b04af0f8d7e3912a010fa3729a299aa87b8b3c84cf5cafbf7c9553d39f8b079919f72f
AUX 6/tomcat.conf 2895 SHA256 b04b085618be755ad9e1796fcbcbb8c2e192eefda3b240f1c06b0d9cc88f2ff0 SHA512 2b182acaa636cc36358bffde693af7e78020e0321f4595c44c991a5dafdf1e386d93659a43a76626781ac1d73723c91cd8f86f93d9a41ba61cb8bffc2ece7d6a WHIRLPOOL dafa1ed7299041916a8362625f031c98ac98b630dcda6152529c162fee7af60bb0cfc5e5abe7259d58df5aa6bf1a1a7ca81a84577ac97c8cd3603ec67abb228e
AUX 6/tomcat.init.2 4034 SHA256 55abf160871648ebeca531865b5918846cf298dadc9cdc5cc7ee060a8db487ad SHA512 79259b423df6f3b8c16f81acd4f3ad33711699d9397fdc313ac1de912121e94a38bb9e33f568b84b921d15fb7434244645ec7c552b59bd1a080d1f03f8947fa1 WHIRLPOOL 27ccf2e9259de6aaeb6098ecd8bb74d760a60fe6674f0bf7657a034d6548e8348809d8ddbc063a926f605c301ac95739ac7443fa2f6aa1096099355571e7d326
@@ -10,17 +13,35 @@ AUX 7/7.0.28-build-xml.patch 5049 SHA256 2d01c63357d321ab73c7754a0a8d3d28862009c
AUX 7/7.0.29-build-xml.patch 5049 SHA256 2d01c63357d321ab73c7754a0a8d3d28862009c8d2cc91c550572f9e96d2204d SHA512 acb90d46a97d010349a9dc6d93cea959d325e8f86496c41e06edf5a97749069513a11542e5437208fd24ae85c9cda4bfcb8a67904b5b2b2e46997314de08058b WHIRLPOOL 97526a7ed9b7f190519cf5aff0a820f290629cc0af41df46e6a0ac0bb97bde6f59c3384a1f77b89d2abf3fcf7fb305a110ecd2fa45e721bc0d0a9eed5e620c1b
AUX 7/tomcat.conf 2895 SHA256 834b38c1e17294ee73c6571a45fb35bc398f15da4ed189e4d359b8b39121bb8e SHA512 fe39f43a4da5cdc5ed5a4d2c71002b9a1b56a55e386276e2e48e102ee1a978bd288882565f5dd2d793d0549b6256d30481d97bd440ed394f0caf1240939160d5 WHIRLPOOL dd20c3c0b7ea9a3408304e28339b3e58cad67bc9337608b11cc666e8e4a603ed49a498d3f41c3f5f0d1fa93291a38afbf3d97bde09c9c8983fa72ef4e8fbb0dc
AUX 7/tomcat.init 3505 SHA256 9b2eaaadc9ccf25cf56212d3ca0574bba286fef7895c0a56327d5c3d5f98f5d5 SHA512 47337962fb8c2029ef84980203e40b4841f0a0596d010edd4266d73a1144de22fed17363f94aecf8fb68dae97059fe50f3f52457386a82281f3cf7c3917976d2 WHIRLPOOL f93d5da7bee183a19f06968ed6b913bf3800963aff424bd47d41548ad8ee2f871084bd0b7c1a8d00fa78b3419113cc386ad77a2ce2c6658f88ba9015cbf2c919
-DIST apache-tomcat-6.0.35-src.tar.gz 3403286 SHA256 6e5205834bd595250c8e0b640e2345ef643f23364ae0e099334b5132103be764
+AUX tomcat-6.0.35-build.xml.patch 950 SHA256 33af0fd388c439e3ee74fd2271d94066169b530b61dab3f1f01a094ec22e3f9f SHA512 69775288f3ba31bc5b3f1f6125c1ca6f27c64647eeeb40928227fcbeb3a33f832ccc24be051efec9f8ca575475549c6493b12495d4a98e9e4fd1c27b9af68f8c WHIRLPOOL e31b35c1395c152c65863cddd79617ec92b21269567fc1458914e6f9b10e3a70698987d05724e52b706e6e0cfeab56e818feca5d04d80ee08f24bfefe89ea63f
+AUX tomcat-7.0.29-build.xml.patch 3852 SHA256 6b003e9c58131cfec4b5d312a18dbcd088428774a544d8d29b896542d3c92c5a SHA512 01feaa4428345203e2c5f0e28ee40bb9f7fd9351446e2454b43d5c1f7f7775606b70b47905e452511661e38ab5965865ed0622979e7845661c87e01a64f0e8cd WHIRLPOOL c86197abec4af7417803d85bd05615e24942f944fbda6712cf3c29ccd4989306f017663d378a719c2d71dd069d5c8850d5e2f4ec57b2243f4758c46bfe7ce2ed
+AUX tomcat-instance-manager.bash 6403 SHA256 09ff73a51d6f11b83c78d6306322455091da302c8d6bd711a0fa4983d850dab4 SHA512 7b51b77447854dd4c6fd4a3bc16aa912edcb5e31d64a4c47f24102c3fc29c2a18f51d8b8f0e28723fba694451c8ab780dcac3d12dc553dc3f182c1d1372e7171 WHIRLPOOL ad845aedd608615df243722be6a4e3ad477890ee8e59b5d0061c4490d95058d7857346bf545c16d7756ecfa62a0b31f137d819095461cb6180cc75df1d81511d
+AUX tomcat.conf 1544 SHA256 6f74ff1ea148322d7595bb6bc10bd00a81851d1822046c01e7f42885b357a4cc SHA512 36ba5c4ccf9ac062acfaaecefd9aba1065fd5553df21cd9c2ffd2b320de472c3397d8499d3a2a96b51d8ef513aa86d5879a42287579da4152916802a988c7811 WHIRLPOOL f2ea708f87b21a004680f3f2865b98bfbeb4dbbee77ce19e7577a8d461df21d682136bda88591114c6b9c2e1dec42ed816ea4a981e6863ea1faaf3f0407dbce3
+AUX tomcat.init 2994 SHA256 1f4f70431c778f8dd3a6255f6d435d3ac6d5957cc0c290d94261ece9fd0227b5 SHA512 932b2e49dc66f39551ca3176afee56231ca46fc61639dfccc8202f6cfbe5eb11c9e91c1c5fbdb698ad991c959e825340fb4e0d118c906c71921df1a96dedd807 WHIRLPOOL 6b777b2bf0014742ffe081a10b6b82e2a6f81d451a665b5190f13b193e6ebcd4fb4468ad06afb48002659b6bac684bc65ac878140a6de1958ef4fb4934c8ecc9
+DIST apache-tomcat-6.0.35-src.tar.gz 3403286 SHA256 6e5205834bd595250c8e0b640e2345ef643f23364ae0e099334b5132103be764 SHA512 fbf9d471f67d6dbd22c37f1963e24c1f45f39431049feedc78557efda86a793565ec5b0b5b31735d9d98a639a00a42c034ac6ddcf7b649cfdbcb8b4c6b160a39 WHIRLPOOL fe747f3ebe937b93bfce8cf15e1bf46a8d4fa9df860223f74021157c0333db9ddabee40a62cd04fc3248e817e3259a7c0fdb4fc452e7b5c095213d4e3cdb332c
DIST apache-tomcat-7.0.23-src.tar.gz 4103854 SHA256 b86523095b06d58b9553683f480250dec7216ce1914c92ea8ecca0799e6ad3b0
DIST apache-tomcat-7.0.26-src.tar.gz 4127697 SHA256 864304e76ff6edb284fc56d7297f8e0711ce0968c9f735c89b2617d70694cc0e
DIST apache-tomcat-7.0.27-src.tar.gz 4189578 SHA256 9e692cfe55168e866094d1dba2653d2bb75462c535f0940f756a0253284b2ca9
DIST apache-tomcat-7.0.28-src.tar.gz 4222498 SHA256 a035eab4aa7372534161314ee09bdb086dc00179345fb002a358e157e8fb2c42 SHA512 b6ef998f79029ff2c71a9f04fb3bd7f8859fefe4762c6af25e431c571a8e9b6cebe12c982cae2ea8cd5c282a15ee7026df6ac5c4f01c5fa1c361ff7e869b823a WHIRLPOOL 2d0a5b38ada6f836960ba730f8d1e00b98dd258f07e7e6decba9c7dc8f46dc252b56c7ca72b7ef218777eddc95d4d60e5f34f01b3aaffa0123bd6ff19fa1c4b7
DIST apache-tomcat-7.0.29-src.tar.gz 4212630 SHA256 00d42b13044303d735103373a5faf7680786879b304ca231d73844c893f6e0ea SHA512 f17a6e0c2535fdd7cbcce518c918a940ebeebef68fa1c6afb482a2d0f5001b87f973cf86f1fce9026d39cf75f2a3763b8a155fb67538e7e1f7d71472660d50db WHIRLPOOL 3b52c6118f9595b85a96302e6d1a0fe421c12a1f16c30f90380195717126911eec0f785e36ec713e80b6d9abe4d72d1104e9d1330534bc8e7d590cd017948f35
+EBUILD tomcat-6.0.35-r1.ebuild 3698 SHA256 3ec7c3e48135237cd2193828e5149743d2992b73980e5fa80952623291b75735 SHA512 a95d10fe596cd7e4af742f975268b1b24af3ed31a4e15fa2b3e5f2907d8e0bafa4f207c4b87695a4e59d08ae73bcc32eadcfb6f51392c6132a5788325af6df2e WHIRLPOOL 518428347bd0ea7b055ace50bdaa063883c9c89611739398476da81c4374a77ee5453089f7de8a9dfc798c18b8a9706e07ad791270694bb97a5a285d6ef012e9
EBUILD tomcat-6.0.35.ebuild 6985 SHA256 49ab1c00568f34f75f98a9c865731ed31aa740385d68eb350a56e1ebdddc7346 SHA512 0765d25d570fab44d8e186fcb943629e2f6d77d0ef2bd7fb996f767de731297df96208974dfc3cd67628cdc367c95aa393f47b3f3012a24fd128c18de5c49e92 WHIRLPOOL fc667584dcb3516fb65c49c641e567cec5a357788aad6a5ac40630cf0da137493050848090877fe03c9b6924a901eb51ef3f89c6177e839313b9583b18ee601b
EBUILD tomcat-7.0.23-r3.ebuild 7638 SHA256 a94b38f501e7c4f3db23570510dd274dcacd867dcf5ec9320829a5234bb331bf SHA512 94b3202600cec659af3033fb2079d694b29f3f492a32045cd9ef8733b1ddd07e97e501c8eb2216bf72fe53b18546250d5bbdbf0cc2db1ed642e232ed6b5a4ae7 WHIRLPOOL bd2631d2513956c87a9bd4b7db1f73e84ecf76612554cd8fc296c3021995b30041084a51693837a8f764d0b276bd049c8787fed04ebd0dd7c976b3da9d2c51be
EBUILD tomcat-7.0.26.ebuild 7634 SHA256 bdfdb09fd372f3346062f451ae4130e4299baba0fe452ab0007297e6ce23fe73 SHA512 f66e92d0470af6ac045cad1d5b2a6043f6d651fb5141d7dd5db58172abda35b467422ebbd40f383973481ae4ae40c4cd71354bf9441bae0d87c3a9c43840f11f WHIRLPOOL 2803d0b8db32bed38d1017b1ceb24b3ab81eeb1409fe6095ae4ed929a606187c82b1ef6b691256af18d8b63db8a18e8db438f1e1da147cd18c62c5d011e9ae44
EBUILD tomcat-7.0.27.ebuild 7634 SHA256 a461a8ee10e01bb5fc5d5813462d5cf656a1a600b58c199ef337d3f888380f2b SHA512 c4c37d499d93899328d97c85d1effbdaa4d581d82094f6ae491d1b7434a9f47fc6fc2bd396c146a719dabb4dc70b258a8101be4b38d97edf96ff143251486856 WHIRLPOOL 4099a81db09816f218c691da337d1b57b652e18ec4e65a65f80f2c83c5d658d44c377f772ea0a480e33e8290c3edeffc443e4264961922b7e16cf241173fbd42
EBUILD tomcat-7.0.28.ebuild 7640 SHA256 2cd83c336add922ae80d0e20700d46f3ded17d321ef1a1ffd9972e4d67914b61 SHA512 d96c4bcd6938f9b1dc3dc785629e1bf530a28dadd692400ef7adbf0e6df247dddc1452658ebad15c5e6f9f1d532519d7e133de9da0322982dc2f5ad1ae0e4ec4 WHIRLPOOL ebaaa516eeb527dfc44fa638fb8e8747b0abe27bdc65cfc843bbe697ebc722f82150c0a627efd5b63d1d3f814489416d571cb9f5b7c81d6ae48b1fae261189e4
+EBUILD tomcat-7.0.29-r1.ebuild 3724 SHA256 075d0139db7a07ba8fec714e43e2ff0ee15be6a5e39b7b1815cc0acc8d56451a SHA512 5f2cd929a0a96b7b4ce79d9244f3d716bbdf747dcb8cca870cc1f3af261b994f9fdf88a6e3e70514721d92eb4cb5b9d4e6a7c8b585e3d818d19022ec7c64621e WHIRLPOOL 99669b7d2254c17e0420a813cb291ab4aacc14f50c0e52980ba0136a7bc1836fc42691385ee6fb3914c8ff9407ecf820d827d9b638963178efd74e3e2b736848
EBUILD tomcat-7.0.29.ebuild 7640 SHA256 4c1f9e42a694c6832f23a8fe394fdd5058c2d8a2453d852166b25ec668d69be1 SHA512 70e3649793a2b893dc6d2bac92bf831bd9fe12c560b2bc716837be4aacb8c0918478563b571c71b441f8d9bb77b98ba17c1201858907c0507e6b7844cb8de590 WHIRLPOOL 9b01fe83b636f205a3a8f5138192c33aa706882b26932d3cf1cf38ff9fd5127370014090c0362124ffae2e1550fd5a39d5c219adb0fa5abd11da99c704f300a3
-MISC ChangeLog 71520 SHA256 59e6a55f5a37b1fc82dd7a52603a7df80c1398df7c65afdfb2e3666948b32174 SHA512 a0bccfdce7ec0e0164d69f4998736de6779f59033d249abd5514c63fe6dbed83a70553533f53021d4b63dcf0532abbae8b570601d528783b9e123d8c943556f4 WHIRLPOOL 11f3a8356bfe431297a433a85c3b1e43382fff675ceb16374fc83d9909b808b5e3f8ff0f1c87273a679da1fa307c9f4e21c8398e7fde270d3d0192331c22591d
-MISC metadata.xml 451 SHA256 b508f373350a4e92bc04ebafa528a5c50eac8bfbd67d2fab6a4fa82811d1f109 SHA512 603530848551221a73f8120cb7a5cd9f49590a459a150f6ee6a50215e9362ecc4e7c9de12007d0adca1f000cac859274590e262bb3a1c7264349fb8861265aec WHIRLPOOL b6f9df258a4fa3e2a36d29538876b76c405379b189cdc6cddd244a7ccb06e7add91a8c09b330ccd017762c3fb91f9c17ef77842bb6deeeb3cfd6ebd036b6882a
+MISC ChangeLog 72953 SHA256 76af20260adb2f5298dee2e53ea8e19ecc385a4c8b173acb241347ac1f4e91b2 SHA512 ec5a54ec84151bd57c97a5fe99bb15473fdb66dce327a4293c0aabab6e4e041ca256ed439ae8d252130c3a01d935e14a543a0e9d3cf9132c58f773f08f5423f2 WHIRLPOOL 8bcbe74f7c0e64ebc160fdb0b20b9ca75b5050d7ac58b38cb9a93dd5a0544a0c145ae1419084612a2d423196395bf25c36bc608aff3c7ecca7ee0b23d6070cf9
+MISC metadata.xml 561 SHA256 a53b91aa1c4371952ed465d0b570fde6eebd1a621804990aa3d2c31f3a8cecab SHA512 354849871d8ff7e9d3bba1bd412f78789693518f1f9804aac412b64e9e86622fb86080b8290bbe16424c760b3601e96824cb3f0b956edbc2245dfa5be299c8c5 WHIRLPOOL f740fcc281807c913934662fcff48a023d42065ec0b50564d4a12ff970ce09447cac0a71016a33ff4896a596dcd86cd9372b4a12286fb0bf46bb01bb6bd2c7e1
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iQEcBAEBCAAGBQJQCZdEAAoJEIUJ+svaV163aAkH/3z2wHb/YFP6IGI0nkumYgsc
+W/kbQrD0IWOYM7y4djt9U3A51MU6k5ekz9wcLs5s1DbwfhD9UKd+L07InZKPgpMP
+NQCeAfVR+pYYu/S11Qnbj+r++hWBUSd4aHSD+beap2BFw58N+LoDpGo+5Me3lXJZ
+KvbWG9OBAW2ehTcWlHx+mRJ9EhH845QBac8jsAdAL+EAmSKlen2Jc9+jNKCgDoM7
+rfwdd+dflrTJ95r9XZk/JvxAQi54vIEeya70R99tryIn+HJKDpVrjp1PukRBvHIn
+aDpxvuBfspwj/vrV6M30ioh8155aIXolS7ZLadCHy5SCGGkUV3fzrXxq7D37+Ws=
+=CMfC
+-----END PGP SIGNATURE-----
diff --git a/www-servers/tomcat/files/tomcat-6.0.35-build.xml.patch b/www-servers/tomcat/files/tomcat-6.0.35-build.xml.patch
new file mode 100644
index 000000000000..6517dee4d196
--- /dev/null
+++ b/www-servers/tomcat/files/tomcat-6.0.35-build.xml.patch
@@ -0,0 +1,31 @@
+--- build.xml.orig 2012-07-06 20:26:21.361299240 +0200
++++ build.xml 2012-07-06 20:26:56.085899911 +0200
+@@ -487,12 +487,14 @@
+
+ <target name="deploy" depends="build-only,build-docs,warn.dbcp">
+
++<!--
+ <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz"
+ file="${tomcat-native.tar.gz}" />
+ <copy tofile="${tomcat.build}/bin/commons-daemon-native.tar.gz"
+ file="${commons-daemon.native.src.tgz}" />
+
+ <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" />
++-->
+
+ <!-- Copy scripts -->
+ <copy todir="${tomcat.build}/bin">
+--- build.xml.orig 2012-07-06 20:31:31.387806167 +0200
++++ build.xml 2012-07-06 20:32:33.185315885 +0200
+@@ -646,9 +646,11 @@
+ </fileset>
+ </txt2html>
+
++<!--
+ <copy file="${tomcat-dbcp.jar}" todir="${tomcat.build}/lib"
+ failonerror="false"/>
+ <copy file="${jdt.jar}" todir="${tomcat.build}/lib" />
++-->
+
+ </target>
+
diff --git a/www-servers/tomcat/files/tomcat-7.0.29-build.xml.patch b/www-servers/tomcat/files/tomcat-7.0.29-build.xml.patch
new file mode 100644
index 000000000000..9b07137451aa
--- /dev/null
+++ b/www-servers/tomcat/files/tomcat-7.0.29-build.xml.patch
@@ -0,0 +1,105 @@
+diff --git a/build.xml b/build.xml
+index 3ff8f81..83357a4 100644
+--- a/build.xml
++++ b/build.xml
+@@ -613,7 +614,8 @@
+ filesId="files.annotations-api"
+ manifest="${tomcat.manifests}/annotations-api.jar.manifest" />
+
+- <!-- Servlet 3.0 Implementation JAR File -->
++<!--
++ Servlet 3.0 Implementation JAR File
+ <jarIt jarfile="${servlet-api.jar}"
+ filesDir="${tomcat.classes}"
+ filesId="files.servlet-api"
+@@ -621,7 +623,7 @@
+ notice="${tomcat.manifests}/servlet-api.jar.notice"
+ license="${tomcat.manifests}/servlet-api.jar.license" />
+
+- <!-- JSP 2.2 Implementation JAR File -->
++ JSP 2.2 Implementation JAR File
+ <jarIt jarfile="${jsp-api.jar}"
+ filesDir="${tomcat.classes}"
+ filesId="files.jsp-api"
+@@ -629,11 +631,12 @@
+ notice="${tomcat.manifests}/jsp-api.jar.notice"
+ license="${tomcat.manifests}/jsp-api.jar.license" />
+
+- <!-- JSP 2.2 EL Implementation JAR File -->
++ JSP 2.2 EL Implementation JAR File
+ <jarIt jarfile="${el-api.jar}"
+ filesDir="${tomcat.classes}"
+ filesId="files.el-api"
+ manifest="${tomcat.manifests}/el-api.jar.manifest" />
++-->
+
+ <!-- Bootstrap JAR File -->
+ <jarIt jarfile="${bootstrap.jar}"
+@@ -834,13 +837,14 @@
+ <target name="deploy" depends="package,build-docs"
+ description="Default. Builds a working Tomcat instance">
+
++<!--
+ <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz"
+ file="${tomcat-native.tar.gz}" />
+ <copy tofile="${tomcat.build}/bin/commons-daemon-native.tar.gz"
+ file="${commons-daemon.native.src.tgz}" />
+
+ <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" />
+-
++-->
+ <!-- Copy scripts -->
+ <copy todir="${tomcat.build}/bin">
+ <fileset dir="bin">
+@@ -918,9 +922,11 @@
+ <!-- Add sources for examples -->
+ <antcall target="examples-sources" />
+
++<!--
+ <copy file="${tomcat-dbcp.jar}" todir="${tomcat.build}/lib"
+ failonerror="false"/>
+ <copy file="${jdt.jar}" todir="${tomcat.build}/lib" />
++-->
+
+ <!-- build the jdbc-pool jar and source jar-->
+ <echo message="Building Tomcat JDBC pool libraries"/>
+@@ -1355,7 +1361,8 @@
+
+ <target name="extras-webservices-prepare"
+ depends="extras-prepare"
+- description="Prepare to build web services extras package">
++ description="Prepare to build web services extras package"
++ unless="noget">
+
+ <antcall target="downloadfile">
+ <param name="sourcefile" value="${jaxrpc-lib.loc}"/>
+@@ -2278,7 +2285,8 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
+ </target>
+
+ <target name="download-compile"
+- description="Download (and build) components necessary to compile" >
++ description="Download (and build) components necessary to compile"
++ unless="noget">
+
+ <antcall target="downloadfile-2">
+ <param name="sourcefile.1" value="${tomcat-native.loc.1}"/>
+@@ -2335,7 +2343,8 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
+ </target>
+
+ <target name="download-test-compile"
+- description="Download additional components for the tests" >
++ description="Download additional components for the tests"
++ unless="noget">
+
+ <antcall target="downloadzip">
+ <param name="sourcefile" value="${junit.loc}"/>
+@@ -2346,7 +2355,8 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
+ </target>
+
+ <target name="download-dist"
+- description="Download additional components for a distribution" >
++ description="Download additional components for a distribution"
++ unless="noget">
+
+ <antcall target="downloadzip-2">
+ <param name="sourcefile.1" value="${tomcat-native.win.1}"/>
diff --git a/www-servers/tomcat/files/tomcat-instance-manager.bash b/www-servers/tomcat/files/tomcat-instance-manager.bash
new file mode 100644
index 000000000000..fcdfebf21495
--- /dev/null
+++ b/www-servers/tomcat/files/tomcat-instance-manager.bash
@@ -0,0 +1,240 @@
+#!/bin/bash
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Author: Ralph Sennhauser <sera@gentoo.org>
+
+die() {
+ echo "${@}"
+ exit 1
+}
+
+usage() {
+ cat <<EOL
+Usage: ${BASH_SOURCE} <--create|--remove|--help> [--suffix s][--user u][--group g]
+
+ Options:
+ --help:
+ show this text.
+ --create:
+ create a new instance
+ --remove:
+ remove an existing instance.
+ --suffix SUFFIX:
+ a suffix for this instance. the suffix may not collide with an already
+ existing instance, defaults to empty.
+ --user USER:
+ the user for which to configure this instance for. The user needs to
+ exist already. defaults to tomcat.
+ --group GROUP:
+ the group for which to configure this instance for. The group needs to
+ exist already. defaults to tomcat.
+
+ Examples:
+ ${BASH_SOURCE} --create --suffix testing --user tacmot --group tacmot
+ ${BASH_SOURCE} --remove --suffix testing
+EOL
+}
+
+parse_argv() {
+ action="not specified"
+ instance_name="tomcat-@SLOT@"
+ instance_user="tomcat"
+ instance_group="tomcat"
+
+ while [[ -n $1 ]]; do
+ case $1 in
+ --help)
+ usage
+ exit 0;;
+ --suffix)
+ instance_name+="-$2"
+ shift; shift;;
+ --user)
+ instance_user="$2"
+ shift; shift;;
+ --group)
+ instance_group="$2"
+ shift; shift;;
+ --create)
+ action=create
+ shift;;
+ --remove)
+ action=remove
+ shift;;
+ --backup)
+ action=backup
+ shift;;
+ --restore)
+ action=restore
+ shift;;
+ --update)
+ action=update
+ shift;;
+ *)
+ echo "Invalid option '$1'"
+ usage
+ exit 2;;
+ esac
+ done
+
+ tomcat_home="/@GENTOO_PORTAGE_EPREFIX@usr/share/tomcat-@SLOT@"
+ instance_base="/@GENTOO_PORTAGE_EPREFIX@var/lib/${instance_name}"
+ instance_conf="/@GENTOO_PORTAGE_EPREFIX@etc/${instance_name}"
+ instance_logs="/@GENTOO_PORTAGE_EPREFIX@var/log/${instance_name}"
+ instance_temp="/@GENTOO_PORTAGE_EPREFIX@var/tmp/${instance_name}"
+
+ all_targets=(
+ "${instance_base}"
+ "${instance_logs}"
+ "${instance_temp}"
+ "/@GENTOO_PORTAGE_EPREFIX@etc/${instance_name}"
+ "/@GENTOO_PORTAGE_EPREFIX@etc/init.d/${instance_name}"
+ "/@GENTOO_PORTAGE_EPREFIX@etc/conf.d/${instance_name}"
+ )
+}
+
+test_can_deploy() {
+ local no_deploy target
+ for target in "${all_targets[@]}"; do
+ if [[ -e "${target}" ]]; then
+ echo "Error: '${target}' already exists."
+ no_deploy=yes
+ fi
+ done
+ if [[ -n "${no_deploy}" ]]; then
+ cat <<-EOL
+
+ To protect an existing installation no new instance was deployed. You can use
+ '${BASH_SOURCE} --remove'
+ to remove an existing instance first or run
+ '${BASH_SOURCE} --create --sufix <instance_suffix>'
+ to deploy an instance under a different name
+
+ EOL
+ usage
+ exit 1
+ fi
+
+ if ! id --user "${instance_user}" >/dev/null 2>&1; then
+ echo "Error: user '${instance_user}' doesn't exist."
+ exit 1
+ fi
+
+ if ! id --group "${instance_group}" >/dev/null 2>&1; then
+ echo "Error: group '${instance_group}' doesn't exist."
+ exit 1
+ fi
+}
+
+deploy_instance() {
+ test_can_deploy
+
+ mkdir -p "${instance_base}"/{work,webapps} || die
+ mkdir -p "${instance_logs}" || die
+ mkdir -p "${instance_temp}" || die
+
+ cp -r "${tomcat_home}"/webapps/ROOT "${instance_base}"/webapps || die
+
+ chown -R "${instance_user}":"${instance_group}" \
+ "${instance_base}" "${instance_logs}" "${instance_temp}" || die
+
+ find "${instance_base}"/webapps -type d -exec chmod 750 {} + || die
+ find "${instance_base}"/webapps -type f -exec chmod 640 {} + || die
+
+ # initial config #
+
+ cp -r "${tomcat_home}"/conf "${instance_conf}" || die
+
+ sed -i -e "s|\${catalina.base}/logs|${instance_logs}|" \
+ "${instance_conf}"/logging.properties || die
+ sed -i -e "s|directory=\"logs\"|directory=\"${instance_logs}\"|" \
+ "${instance_conf}"/server.xml || die
+
+ mkdir -p "${instance_conf}"/Catalina/localhost || die
+ cat > "${instance_conf}"/Catalina/localhost/host-manager.xml <<-'EOF'
+ <?xml version="1.0" encoding="UTF-8"?>
+ <Context docBase="${catalina.home}/webapps/host-manager"
+ antiResourceLocking="false" privileged="true" />
+ EOF
+
+ cat > "${instance_conf}"/Catalina/localhost/manager.xml <<-'EOF'
+ <?xml version="1.0" encoding="UTF-8"?>
+ <Context docBase="${catalina.home}/webapps/manager"
+ antiResourceLocking="false" privileged="true" />
+ EOF
+
+ if [[ -d "${tomcat_home}"/webapps/docs ]]; then
+ cat > "${instance_conf}"/Catalina/localhost/docs.xml <<-'EOF'
+ <?xml version="1.0" encoding="UTF-8"?>
+ <Context docBase="${catalina.home}/webapps/docs" />
+ EOF
+ fi
+
+ if [[ -d "${tomcat_home}"/webapps/examples ]]; then
+ cat > "${instance_conf}"/Catalina/localhost/examples.xml <<-'EOF'
+ <?xml version="1.0" encoding="UTF-8"?>
+ <Context docBase="${catalina.home}/webapps/examples" />
+ EOF
+ fi
+
+ chown -R "${instance_user}":"${instance_group}" "${instance_conf}" || die
+ find "${instance_conf}" -type d -exec chmod 750 {} + || die
+ find "${instance_conf}" -type f -exec chmod 640 {} + || die
+
+ # rc script #
+
+ cp "${tomcat_home}"/gentoo/tomcat.init \
+ "/@GENTOO_PORTAGE_EPREFIX@etc/init.d/${instance_name}" || die
+
+ sed -e "s|@INSTANCE_NAME@|${instance_name}|g" \
+ -e "s|@INSTANCE_USER@|${instance_user}|g" \
+ -e "s|@INSTANCE_GROUP@|${instance_group}|g" \
+ "${tomcat_home}"/gentoo/tomcat.conf \
+ > "/@GENTOO_PORTAGE_EPREFIX@etc/conf.d/${instance_name}" || die
+
+ # some symlinks for tomcat and netbeans #
+
+ ln -s "${instance_conf}" "${instance_base}"/conf || die
+ ln -s "${instance_temp}" "${instance_base}"/temp || die
+
+ # a note to update the default configuration #
+
+ cat <<-EOL
+ Successfully created instance '${instance_name}'
+ It's strongly recommended for production systems to go carefully through the
+ configuration files at '${instance_conf}'.
+ The generated initial configuration is close to upstreams default which
+ favours the demo aspect over hardening.
+ EOL
+}
+
+remove_instance() {
+ echo "The following files will be removed permanently:"
+ local target; for target in "${all_targets[@]}"; do
+ find ${target}
+ done
+
+ echo "Type 'yes' to continue"
+ read
+ if [[ ${REPLY} == yes ]]; then
+ rm -rv "${all_targets[@]}"
+ else
+ echo "Aborting as requested ..."
+ fi
+}
+
+parse_argv "$@"
+
+if [[ ${action} == create ]]; then
+ deploy_instance
+elif [[ ${action} == remove ]]; then
+ remove_instance
+elif [[ ${action} == "not specified" ]]; then
+ echo "No action specified!"
+ usage
+ exit 1
+else
+ echo "${action} not yet implemented!"
+ usage
+ exit 1
+fi
diff --git a/www-servers/tomcat/files/tomcat.conf b/www-servers/tomcat/files/tomcat.conf
new file mode 100644
index 000000000000..a27f93342678
--- /dev/null
+++ b/www-servers/tomcat/files/tomcat.conf
@@ -0,0 +1,49 @@
+# Set the handle of the JVM to use. If unset uses the system-vm.
+# run 'eselect java-vm list' to get possible values.
+#
+#TOMCAT_JVM="icedtea-7"
+
+# Additional options to pass to the JVM.
+# Example to set library path for tomcat-native:
+# JAVA_OPTS="-Djava.library.path=/usr/lib"
+#
+#JAVA_OPTS=""
+
+# Additional packages to put on the default classpath.
+# jakarta-jstl is needed for some of the examples.
+# Note: The extra jars listed here will be visible to webapps.
+# Example:
+# TOMCAT_EXTRA_JARS="jakarta-jstl,xerces-2"
+#
+#TOMCAT_EXTRA_JARS=""
+
+# User/Group of this instance.
+CATALINA_USER=@INSTANCE_USER@
+CATALINA_GROUP=@INSTANCE_GROUP@
+
+# Directory path location of temporary directory the JVM should
+# use (java.io.tmpdir).
+# Note: This directory must exist and be read/writable by tomcat.
+# See #246362 as an example where /var/tmp was deleted on shutdown.
+#
+#CATALINA_TMPDIR="/@GENTOO_PORTAGE_EPREFIX@var/tmp/@INSTANCE_NAME@"
+
+# TOMCAT STARTUP
+# debug Start Catalina in a debugger
+# -security debug Debug Catalina with a security manager
+# jpda start Start Catalina under JPDA debugger
+# start Start Catalina in a separate window
+# -security start Start in a separate window with security manager
+#
+#TOMCAT_START="start"
+
+# Java Platform Debugger Architecture (JPDA)
+# http://java.sun.com/products/jpda/
+# Override default JPDA address and transport for the "jpda start" command.
+#
+#JPDA_ADDRESS="8000"
+#JPDA_TRANSPORT="dt_socket"
+
+# Additional options to pass to catalina
+#
+#CATALINA_OPTS=""
diff --git a/www-servers/tomcat/files/tomcat.init b/www-servers/tomcat/files/tomcat.init
new file mode 100644
index 000000000000..b076f99b6bdf
--- /dev/null
+++ b/www-servers/tomcat/files/tomcat.init
@@ -0,0 +1,104 @@
+#!/@GENTOO_PORTAGE_EPREFIX@sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="forcestop"
+
+PIDFILE=/@GENTOO_PORTAGE_EPREFIX@var/run/${RC_SVCNAME}.pid
+
+: ${CATALINA_HOME:=/@GENTOO_PORTAGE_EPREFIX@usr/share/tomcat-@SLOT@}
+: ${CATALINA_BASE:=/@GENTOO_PORTAGE_EPREFIX@var/lib/${RC_SVCNAME}}
+: ${CATALINA_TMPDIR:=/@GENTOO_PORTAGE_EPREFIX@var/tmp/${RC_SVCNAME}}
+: ${CATALINA_USER:=tomcat}
+: ${CATALINA_GROUP:=tomcat}
+
+: ${TOMCAT_START:=start}
+
+: ${JPDA_TRANSPORT:="dt_socket"}
+: ${JPDA_ADDRESS:="8000"}
+: ${JPDA_OPTS="-Xdebug -Xrunjdwp:transport=${JPDA_TRANSPORT},address=${JPDA_ADDRESS},server=y,suspend=n"}
+
+export JAVA_HOME=`java-config ${TOMCAT_JVM:+--select-vm ${TOMCAT_JVM}} --jre-home`
+
+CLASSPATH=`java-config --classpath tomcat-@SLOT@${TOMCAT_EXTRA_JARS:+,${TOMCAT_EXTRA_JARS}}`
+export CLASSPATH="${CLASSPATH}${TOMCAT_EXTRA_CLASSPATH:+:${TOMCAT_EXTRA_CLASSPATH}}"
+
+depend() {
+ use dns logger net
+}
+
+start() {
+ ebegin "Starting ${RC_SVCNAME}"
+
+ if [ ! -e "${CATALINA_TMPDIR}" ]; then
+ eerror "CATALINA_TMPDIR does not exist. Unable to start tomcat."
+ eerror "Please see /@GENTOO_PORTAGE_EPREFIX@etc/conf.d/${RC_SVCNAME} for more information."
+ eend 1
+ fi
+
+ cmd=java args=
+ if [ "${TOMCAT_START}" = "debug" ] || [ "${TOMCAT_START}" = "-security debug" ] ; then
+ cmd=jdb
+ args="${args} -sourcepath ${CATALINA_HOME}/../../jakarta-tomcat-catalina/catalina/src/share"
+ fi
+ if [ "${TOMCAT_START}" = "-security debug" ] || [ "${TOMCAT_START}" = "-security start" ]; then
+ args="${args} -Djava.security.manager"
+ args="${args} -Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy"
+ fi
+ if [ "${TOMCAT_START}" = "jpda start" ] ; then
+ args="${args} ${JPDA_OPTS}"
+ fi
+ if [ -r "${CATALINA_HOME}"/bin/tomcat-juli.jar ]; then
+ JAVA_OPTS="${JAVA_OPTS} -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
+ -Djava.util.logging.config.file=${CATALINA_BASE}/conf/logging.properties"
+ fi
+
+ start-stop-daemon --start \
+ --quiet --background \
+ --chdir "${CATALINA_TMPDIR}" \
+ --user ${CATALINA_USER}:${CATALINA_GROUP} \
+ --make-pidfile --pidfile ${PIDFILE} \
+ --exec ${JAVA_HOME}/bin/${cmd} \
+ -- \
+ ${JAVA_OPTS} \
+ -Dcatalina.base="${CATALINA_BASE}" \
+ -Dcatalina.home="${CATALINA_HOME}" \
+ -Djava.io.tmpdir="${CATALINA_TMPDIR}" \
+ -classpath "${CLASSPATH}" \
+ org.apache.catalina.startup.Bootstrap \
+ ${CATALINA_OPTS} \
+ ${args} ${TOMCAT_START}
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping '${RC_SVCNAME}'"
+
+ start-stop-daemon --stop \
+ --quiet --retry=60 \
+ --pidfile ${PIDFILE} \
+ --exec ${JAVA_HOME}/bin/java \
+ -- \
+ ${JAVA_OPTS} \
+ -classpath "${CLASSPATH}" \
+ ${CATALINA_OPTS} \
+ stop ${STD_OUT}
+
+ eend $?
+}
+
+forcestop() {
+ ebegin "Forcing '${RC_SVCNAME}' to stop"
+
+ start-stop-daemon --stop \
+ --quiet --retry=60 \
+ --pidfile ${PIDFILE} \
+ --signal=9
+
+ if service_started "${RC_SVCNAME}"; then
+ mark_service_stopped "${RC_SVCNAME}"
+ fi
+
+ eend $?
+}
diff --git a/www-servers/tomcat/metadata.xml b/www-servers/tomcat/metadata.xml
index 349379c953f8..f957b79d7d7b 100644
--- a/www-servers/tomcat/metadata.xml
+++ b/www-servers/tomcat/metadata.xml
@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <herd>java</herd>
- <longdescription>
- Tomcat is the servlet container that is used in the official Reference
- Implementation for the Java Servlet and JavaServer Pages technologies.
- The Java Servlet and JavaServer Pages specifications are developed by
- Sun under the Java Community Process.
- </longdescription>
+ <herd>java</herd>
+ <longdescription>
+ Tomcat is the servlet container that is used in the official Reference
+ Implementation for the Java Servlet and JavaServer Pages technologies.
+ The Java Servlet and JavaServer Pages specifications are developed by
+ Sun under the Java Community Process.
+ </longdescription>
+ <use>
+ <flag name='extra-webapps'>Build also the docs and examples webapp</flag>
+ </use>
</pkgmetadata>
diff --git a/www-servers/tomcat/tomcat-6.0.35-r1.ebuild b/www-servers/tomcat/tomcat-6.0.35-r1.ebuild
new file mode 100644
index 000000000000..7243e1b13bd5
--- /dev/null
+++ b/www-servers/tomcat/tomcat-6.0.35-r1.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-6.0.35-r1.ebuild,v 1.1 2012/07/20 17:36:54 sera Exp $
+
+EAPI=4
+
+JAVA_PKG_IUSE="source test"
+
+inherit eutils java-pkg-2 java-ant-2 prefix
+
+MY_P="apache-${P}-src"
+
+DESCRIPTION="Tomcat Servlet-2.5/JSP-2.1 Container"
+HOMEPAGE="http://tomcat.apache.org/"
+SRC_URI="mirror://apache/${PN}/tomcat-6/v${PV}/src/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="6"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="extra-webapps"
+
+RESTRICT="test"
+
+ECJ_SLOT="3.7"
+SAPI_SLOT="2.5"
+
+COMMON_DEP="
+ dev-java/eclipse-ecj:${ECJ_SLOT}
+ ~dev-java/tomcat-servlet-api-${PV}
+ extra-webapps? ( dev-java/jakarta-jstl:0 )"
+RDEPEND="${COMMON_DEP}
+ !<dev-java/tomcat-native-1.1.20
+ >=virtual/jre-1.5"
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.5
+ >=dev-java/ant-core-1.8.1:0
+ test? (
+ dev-java/ant-junit:0
+ dev-java/junit:4
+ )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+ enewgroup tomcat 265
+ enewuser tomcat 265 -1 /dev/null tomcat
+}
+
+java_prepare() {
+ find -name '*.jar' -exec rm -v {} + || die
+ epatch "${FILESDIR}/${P}-build.xml.patch"
+
+ # For use of catalina.sh in netbeans
+ sed -i -e "/^# ----- Execute The Requested Command/ a\
+ CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \
+ bin/catalina.sh || die
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+
+EANT_BUILD_TARGET="deploy"
+EANT_DOC_TARGET=""
+EANT_GENTOO_CLASSPATH="tomcat-servlet-api-${SAPI_SLOT},eclipse-ecj-${ECJ_SLOT}"
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
+EANT_NEEDS_TOOLS="true"
+EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false"
+
+src_compile() {
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
+ java-pkg-2_src_compile
+}
+
+EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH},junit-4"
+
+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
+
+ # so we don't have to call java-config with --with-dependencies, which might
+ # bring in more jars then actually desired.
+ java-pkg_addcp "$(java-pkg_getjars eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT})"
+
+ dodoc RELEASE-NOTES RUNNING.txt
+ #use doc && java-pkg_dojavadoc output/dist/webapps/docs/api
+ use source && java-pkg_dosrc java/*
+
+ ### Webapps ###
+
+ insinto "${dest}"/webapps
+ doins -r output/build/webapps/{host-manager,manager,ROOT}
+ use extra-webapps && doins -r output/build/webapps/{docs,examples}
+
+ ### Config ###
+
+ # replace the default pw with a random one, see #92281
+ local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15)
+ sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
+
+ insinto "${dest}"
+ doins -r output/build/conf
+
+ ### rc ###
+
+ cp "${FILESDIR}"/tomcat{.conf,.init,-instance-manager.bash} "${T}" || die
+ eprefixify "${T}"/tomcat{.conf,.init,-instance-manager.bash}
+ sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,.init,-instance-manager.bash} || die
+
+ insinto "${dest}"/gentoo
+ doins "${T}"/tomcat.conf
+ exeinto "${dest}"/gentoo
+ doexe "${T}"/tomcat{.init,-instance-manager.bash}
+}
+
+pkg_postinst() {
+ elog "For how to deploy a server instance run:"
+ elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help"
+
+ 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 http://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information."
+}
diff --git a/www-servers/tomcat/tomcat-7.0.29-r1.ebuild b/www-servers/tomcat/tomcat-7.0.29-r1.ebuild
new file mode 100644
index 000000000000..f3219f0d7d4d
--- /dev/null
+++ b/www-servers/tomcat/tomcat-7.0.29-r1.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-7.0.29-r1.ebuild,v 1.1 2012/07/20 17:36:54 sera Exp $
+
+EAPI=4
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit eutils java-pkg-2 java-ant-2 prefix
+
+MY_P="apache-${P}-src"
+
+DESCRIPTION="Tomcat Servlet-3.0/JSP-2.2 Container"
+HOMEPAGE="http://tomcat.apache.org/"
+SRC_URI="mirror://apache/${PN}/tomcat-7/v${PV}/src/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="7"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="extra-webapps"
+
+RESTRICT="test" # can we run them on a production system?
+
+ECJ_SLOT="3.7"
+SAPI_SLOT="3.0"
+
+COMMON_DEP="
+ dev-java/eclipse-ecj:${ECJ_SLOT}
+ ~dev-java/tomcat-servlet-api-${PV}
+ extra-webapps? ( dev-java/jakarta-jstl:0 )"
+RDEPEND="${COMMON_DEP}
+ !<dev-java/tomcat-native-1.1.20
+ >=virtual/jre-1.6"
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.6
+ >=dev-java/ant-core-1.8.1:0
+ test? (
+ dev-java/ant-junit:0
+ dev-java/junit:4
+ )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+ enewgroup tomcat 265
+ enewuser tomcat 265 -1 /dev/null tomcat
+}
+
+java_prepare() {
+ find -name '*.jar' -exec rm -v {} + || die
+ epatch "${FILESDIR}/${P}-build.xml.patch"
+
+ # For use of catalina.sh in netbeans
+ sed -i -e "/^# ----- Execute The Requested Command/ a\
+ CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \
+ bin/catalina.sh || die
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+
+EANT_BUILD_TARGET="deploy"
+EANT_GENTOO_CLASSPATH="tomcat-servlet-api-${SAPI_SLOT},eclipse-ecj-${ECJ_SLOT}"
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
+EANT_NEEDS_TOOLS="true"
+EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false"
+
+src_compile() {
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
+ java-pkg-2_src_compile
+}
+
+EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH},junit-4"
+
+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
+
+ # so we don't have to call java-config with --with-dependencies, which might
+ # bring in more jars then actually desired.
+ java-pkg_addcp "$(java-pkg_getjars eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT})"
+
+ dodoc RELEASE-NOTES RUNNING.txt
+ use doc && java-pkg_dojavadoc output/dist/webapps/docs/api
+ use source && java-pkg_dosrc java/*
+
+ ### Webapps ###
+
+ insinto "${dest}"/webapps
+ doins -r output/build/webapps/{host-manager,manager,ROOT}
+ use extra-webapps && doins -r output/build/webapps/{docs,examples}
+
+ ### Config ###
+
+ # replace the default pw with a random one, see #92281
+ local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15)
+ sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
+
+ insinto "${dest}"
+ doins -r output/build/conf
+
+ ### rc ###
+
+ cp "${FILESDIR}"/tomcat{.conf,.init,-instance-manager.bash} "${T}" || die
+ eprefixify "${T}"/tomcat{.conf,.init,-instance-manager.bash}
+ sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,.init,-instance-manager.bash} || die
+
+ insinto "${dest}"/gentoo
+ doins "${T}"/tomcat.conf
+ exeinto "${dest}"/gentoo
+ doexe "${T}"/tomcat{.init,-instance-manager.bash}
+}
+
+pkg_postinst() {
+ elog "For how to deploy a server instance run:"
+ elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help"
+
+ 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 http://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information."
+}