diff options
author | Alon Bar-Lev <alonbl@gentoo.org> | 2013-01-03 19:19:55 +0000 |
---|---|---|
committer | Alon Bar-Lev <alonbl@gentoo.org> | 2013-01-03 19:19:55 +0000 |
commit | 79a1938861d053abd6f1a882de37bd710aea8059 (patch) | |
tree | daa217a4e7e6be0fbde1efdd0671ba3c3dd6255c /eclass/ssl-cert.eclass | |
parent | [bump] dev-perl/Try-Tiny-0.120.0 (diff) | |
download | historical-79a1938861d053abd6f1a882de37bd710aea8059.tar.gz historical-79a1938861d053abd6f1a882de37bd710aea8059.tar.bz2 historical-79a1938861d053abd6f1a882de37bd710aea8059.zip |
ssl-cert - support mandatory enrollment and custom USE flag
Diffstat (limited to 'eclass/ssl-cert.eclass')
-rw-r--r-- | eclass/ssl-cert.eclass | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass index d71488d3195b..e1acea4cba72 100644 --- a/eclass/ssl-cert.eclass +++ b/eclass/ssl-cert.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ssl-cert.eclass,v 1.19 2011/08/22 04:46:32 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ssl-cert.eclass,v 1.20 2013/01/03 19:19:55 alonbl Exp $ # @ECLASS: ssl-cert.eclass # @MAINTAINER: @@ -13,10 +13,24 @@ # @EXAMPLE: # "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem} -# Conditionally depend on OpenSSL: allows inheretence -# without pulling extra packages if not needed -DEPEND="ssl? ( dev-libs/openssl )" -IUSE="ssl" +# @ECLASS-VARIABLE: SSL_CERT_MANDATORY +# @DESCRIPTION: +# Set to non zero if ssl-cert is mandatory for ebuild. +# +SSL_CERT_MANDATORY="${SSL_CERT_MANDATORY:-0}" + +# @ECLASS-VARIABLE: SSL_CERT_USE +# @DESCRIPTION: +# Use flag to append dependency to. +# +SSL_CERT_USE="${SSL_CERT_USE:-ssl}" + +if [[ "${SSL_CERT_MANDATORY}" = 0 ]]; then + DEPEND="${SSL_CERT_USE}? ( dev-libs/openssl )" + IUSE="${SSL_CERT_USE}" +else + DEPEND="dev-libs/openssl" +fi # @FUNCTION: gen_cnf # @USAGE: |