Gentoo Archives: gentoo-commits

From: Christian Ruppert <idl0r@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/haproxy/
Date: Wed, 28 Sep 2016 19:54:06
Message-Id: 1475092430.f7e0aa7b250c5657511825427c0ae9419b2e0b7a.idl0r@gentoo
1 commit: f7e0aa7b250c5657511825427c0ae9419b2e0b7a
2 Author: Bertrand Jacquin <bertrand <AT> jacquin <DOT> bzh>
3 AuthorDate: Sat Sep 17 23:33:51 2016 +0000
4 Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 28 19:53:50 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7e0aa7b
7
8 net-proxy/haproxy: Simplify src_compile() by using REQUIRED_USE
9
10 We can avoid nested `if use' by making pcre USE flag mandatory if pcre-jit
11 USE flag is selected
12
13 Package-Manager: portage-2.2.28
14 Closes: https://github.com/gentoo/gentoo/pull/2293
15
16 Signed-off-by: Christian Ruppert <idl0r <AT> gentoo.org>
17
18 net-proxy/haproxy/haproxy-1.6.9.ebuild | 14 ++++++++------
19 net-proxy/haproxy/haproxy-9999.ebuild | 14 ++++++++------
20 2 files changed, 16 insertions(+), 12 deletions(-)
21
22 diff --git a/net-proxy/haproxy/haproxy-1.6.9.ebuild b/net-proxy/haproxy/haproxy-1.6.9.ebuild
23 index 9ddbe6f..8518135 100644
24 --- a/net-proxy/haproxy/haproxy-1.6.9.ebuild
25 +++ b/net-proxy/haproxy/haproxy-1.6.9.ebuild
26 @@ -16,6 +16,7 @@ LICENSE="GPL-2 LGPL-2.1"
27 SLOT="0"
28 KEYWORDS="~amd64 ~arm ~ppc ~x86"
29 IUSE="+crypt doc examples libressl net_ns +pcre pcre-jit ssl tools vim-syntax +zlib" # lua
30 +REQUIRED_USE="pcre-jit? ( pcre )"
31
32 DEPEND="
33 pcre? (
34 @@ -77,13 +78,14 @@ src_compile() {
35
36 if use pcre ; then
37 args="${args} USE_PCRE=1"
38 - if use pcre-jit; then
39 - args="${args} USE_PCRE_JIT=1"
40 - else
41 - args="${args} USE_PCRE_JIT="
42 - fi
43 else
44 - args="${args} USE_PCRE= USE_PCRE_JIT="
45 + args="${args} USE_PCRE="
46 + fi
47 +
48 + if use pcre-jit; then
49 + args="${args} USE_PCRE_JIT=1"
50 + else
51 + args="${args} USE_PCRE_JIT="
52 fi
53
54 # if use kernel_linux; then
55
56 diff --git a/net-proxy/haproxy/haproxy-9999.ebuild b/net-proxy/haproxy/haproxy-9999.ebuild
57 index 42be396..f2325eb 100644
58 --- a/net-proxy/haproxy/haproxy-9999.ebuild
59 +++ b/net-proxy/haproxy/haproxy-9999.ebuild
60 @@ -16,6 +16,7 @@ LICENSE="GPL-2 LGPL-2.1"
61 SLOT="0"
62 KEYWORDS=""
63 IUSE="+crypt doc examples libressl net_ns +pcre pcre-jit ssl tools vim-syntax +zlib" # lua
64 +REQUIRED_USE="pcre-jit? ( pcre )"
65
66 DEPEND="
67 pcre? (
68 @@ -77,13 +78,14 @@ src_compile() {
69
70 if use pcre ; then
71 args="${args} USE_PCRE=1"
72 - if use pcre-jit; then
73 - args="${args} USE_PCRE_JIT=1"
74 - else
75 - args="${args} USE_PCRE_JIT="
76 - fi
77 else
78 - args="${args} USE_PCRE= USE_PCRE_JIT="
79 + args="${args} USE_PCRE="
80 + fi
81 +
82 + if use pcre-jit; then
83 + args="${args} USE_PCRE_JIT=1"
84 + else
85 + args="${args} USE_PCRE_JIT="
86 fi
87
88 # if use kernel_linux; then