This is an eclass for packages that install themselves into the DocumentRoot specifed in apache configuration files. One example is phpBB, which is from where I got the code. I put it into an eclass becuase there is other such software, such as bugzilla.
Created attachment 9937 [details] The eclass
Created attachment 9938 [details, diff] Patch for phpBB ebuild to use eclasss This is a patch that makes the php ebuild use the apache eclass.
What if someone wants to run a different httpd as default?
See bug # 20642. The conclusion of bug # 20642 is that attempting to autodetect DocumentRoot is a bad idea -- it should be assumed to be /home/httpd/htdocs.
sorry but im not going to entertain this at this time. in the future i think an eclass for web stuff is going to be needed but the foundation for this and what feature will be needed isnt clear to me quite yet.