add need_httpd_* functions wrt #208584
authorBenedikt Boehm <hollow@gentoo.org>
Fri, 22 Feb 2008 15:33:32 +0000 (15:33 +0000)
committerBenedikt Boehm <hollow@gentoo.org>
Fri, 22 Feb 2008 15:33:32 +0000 (15:33 +0000)
eclass/webapp.eclass

index c31d01832a26423bb78cadaf8eaeb6337f7e1ad9..05d42ebcf5f8e8a18032624c8a7a9b2816c6a8f8 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.57 2008/02/22 14:59:07 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.58 2008/02/22 15:33:32 hollow Exp $
 #
 # @ECLASS: webapp.eclass
 # @MAINTAINER:
@@ -115,6 +115,33 @@ webapp_getinstalltype() {
 # PUBLIC FUNCTIONS
 # ==============================================================================
 
+# @FUNCTION: need_httpd
+# @DESCRIPTION:
+# Call this function AFTER your ebuild's DEPEND line if any of the available
+# webservers are able to run this application.
+need_httpd() {
+       DEPEND="${DEPEND}
+               || ( virtual/httpd-basic virtual/httpd-cgi virtual/httpd-fastcgi )"
+}
+
+# @FUNCTION: need_httpd_cgi
+# @DESCRIPTION:
+# Call this function AFTER your ebuild's DEPEND line if any of the available
+# CGI-capable webservers are able to run this application.
+need_httpd_cgi() {
+       DEPEND="${DEPEND}
+               || ( virtual/httpd-cgi virtual/httpd-fastcgi )"
+}
+
+# @FUNCTION: need_httpd_fastcgi
+# @DESCRIPTION:
+# Call this function AFTER your ebuild's DEPEND line if any of the available
+# FastCGI-capabale webservers are able to run this application.
+need_httpd_fastcgi() {
+       DEPEND="${DEPEND}
+               virtual/httpd-fastcgi"
+}
+
 # @FUNCTION: webapp_configfile
 # @USAGE: <file> [more files ...]
 # @DESCRIPTION: