diff options
author | Bertrand Jacquin <bertrand@jacquin.bzh> | 2016-09-18 00:33:51 +0100 |
---|---|---|
committer | Christian Ruppert <idl0r@gentoo.org> | 2016-09-28 21:53:50 +0200 |
commit | f7e0aa7b250c5657511825427c0ae9419b2e0b7a (patch) | |
tree | ea6cbcecc0f5b777b997efbd673dfbba32f34fd6 /net-proxy/haproxy | |
parent | net-proxy/haproxy: Move to EAPI 6 and git-r3 (diff) | |
download | gentoo-f7e0aa7b250c5657511825427c0ae9419b2e0b7a.tar.gz gentoo-f7e0aa7b250c5657511825427c0ae9419b2e0b7a.tar.bz2 gentoo-f7e0aa7b250c5657511825427c0ae9419b2e0b7a.zip |
net-proxy/haproxy: Simplify src_compile() by using REQUIRED_USE
We can avoid nested `if use' by making pcre USE flag mandatory if pcre-jit
USE flag is selected
Package-Manager: portage-2.2.28
Closes: https://github.com/gentoo/gentoo/pull/2293
Signed-off-by: Christian Ruppert <idl0r@gentoo.org>
Diffstat (limited to 'net-proxy/haproxy')
-rw-r--r-- | net-proxy/haproxy/haproxy-1.6.9.ebuild | 14 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-9999.ebuild | 14 |
2 files changed, 16 insertions, 12 deletions
diff --git a/net-proxy/haproxy/haproxy-1.6.9.ebuild b/net-proxy/haproxy/haproxy-1.6.9.ebuild index 9ddbe6f57d9f..85181352dc54 100644 --- a/net-proxy/haproxy/haproxy-1.6.9.ebuild +++ b/net-proxy/haproxy/haproxy-1.6.9.ebuild @@ -16,6 +16,7 @@ LICENSE="GPL-2 LGPL-2.1" SLOT="0" KEYWORDS="~amd64 ~arm ~ppc ~x86" IUSE="+crypt doc examples libressl net_ns +pcre pcre-jit ssl tools vim-syntax +zlib" # lua +REQUIRED_USE="pcre-jit? ( pcre )" DEPEND=" pcre? ( @@ -77,13 +78,14 @@ src_compile() { if use pcre ; then args="${args} USE_PCRE=1" - if use pcre-jit; then - args="${args} USE_PCRE_JIT=1" - else - args="${args} USE_PCRE_JIT=" - fi else - args="${args} USE_PCRE= USE_PCRE_JIT=" + args="${args} USE_PCRE=" + fi + + if use pcre-jit; then + args="${args} USE_PCRE_JIT=1" + else + args="${args} USE_PCRE_JIT=" fi # if use kernel_linux; then diff --git a/net-proxy/haproxy/haproxy-9999.ebuild b/net-proxy/haproxy/haproxy-9999.ebuild index 42be396fd418..f2325eb566e5 100644 --- a/net-proxy/haproxy/haproxy-9999.ebuild +++ b/net-proxy/haproxy/haproxy-9999.ebuild @@ -16,6 +16,7 @@ LICENSE="GPL-2 LGPL-2.1" SLOT="0" KEYWORDS="" IUSE="+crypt doc examples libressl net_ns +pcre pcre-jit ssl tools vim-syntax +zlib" # lua +REQUIRED_USE="pcre-jit? ( pcre )" DEPEND=" pcre? ( @@ -77,13 +78,14 @@ src_compile() { if use pcre ; then args="${args} USE_PCRE=1" - if use pcre-jit; then - args="${args} USE_PCRE_JIT=1" - else - args="${args} USE_PCRE_JIT=" - fi else - args="${args} USE_PCRE= USE_PCRE_JIT=" + args="${args} USE_PCRE=" + fi + + if use pcre-jit; then + args="${args} USE_PCRE_JIT=1" + else + args="${args} USE_PCRE_JIT=" fi # if use kernel_linux; then |