diff options
author | Bertrand Jacquin <bertrand@jacquin.bzh> | 2016-09-18 00:38:51 +0100 |
---|---|---|
committer | Christian Ruppert <idl0r@gentoo.org> | 2016-09-28 21:53:50 +0200 |
commit | a37afa92e2fcdc3c768f162480edb70143a937a7 (patch) | |
tree | cee957e140db0ce12417fe3c29201b882fc15854 /net-proxy | |
parent | net-proxy/haproxy: Simplify src_compile() by using REQUIRED_USE (diff) | |
download | gentoo-a37afa92e2fcdc3c768f162480edb70143a937a7.tar.gz gentoo-a37afa92e2fcdc3c768f162480edb70143a937a7.tar.bz2 gentoo-a37afa92e2fcdc3c768f162480edb70143a937a7.zip |
net-proxy/haproxy: Use an array to define emake arguments
It makes the code more clear and avoid duplication
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')
-rw-r--r-- | net-proxy/haproxy/haproxy-1.6.9.ebuild | 41 | ||||
-rw-r--r-- | net-proxy/haproxy/haproxy-9999.ebuild | 41 |
2 files changed, 44 insertions, 38 deletions
diff --git a/net-proxy/haproxy/haproxy-1.6.9.ebuild b/net-proxy/haproxy/haproxy-1.6.9.ebuild index 85181352dc54..3052698c1e31 100644 --- a/net-proxy/haproxy/haproxy-1.6.9.ebuild +++ b/net-proxy/haproxy/haproxy-1.6.9.ebuild @@ -55,66 +55,69 @@ src_prepare() { } src_compile() { - local args="TARGET=linux2628 USE_GETADDRINFO=1" + local -a args=( + TARGET=linux2628 + USE_GETADDRINFO=1 + ) if use crypt ; then - args="${args} USE_LIBCRYPT=1" + args+=( USE_LIBCRYPT=1 ) else - args="${args} USE_LIBCRYPT=" + args+=( USE_LIBCRYPT= ) fi # bug 541042 # if use lua; then -# args="${args} USE_LUA=1" +# args+=( USE_LUA=1 ) # else - args="${args} USE_LUA=" + args+=( USE_LUA= ) # fi if use net_ns; then - args="${args} USE_NS=1" + args+=( USE_NS=1 ) else - args="${args} USE_NS=" + args+=( USE_NS= ) fi if use pcre ; then - args="${args} USE_PCRE=1" + args+=( USE_PCRE=1 ) else - args="${args} USE_PCRE=" + args+=( USE_PCRE= ) fi if use pcre-jit; then - args="${args} USE_PCRE_JIT=1" + args+=( USE_PCRE_JIT=1 ) else - args="${args} USE_PCRE_JIT=" + args+=( USE_PCRE_JIT= ) fi # if use kernel_linux; then -# args="${args} USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1" +# args+=( USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1 ) # else -# args="${args} USE_LINUX_SPLICE= USE_LINUX_TPROXY=" +# args+=( USE_LINUX_SPLICE= USE_LINUX_TPROXY= ) # fi if use ssl ; then - args="${args} USE_OPENSSL=1" + args+=( USE_OPENSSL=1 ) else - args="${args} USE_OPENSSL=" + args+=( USE_OPENSSL= ) fi if use zlib ; then - args="${args} USE_ZLIB=1" + args+=( USE_ZLIB=1 ) else - args="${args} USE_ZLIB=" + args+=( USE_ZLIB= ) fi # For now, until the strict-aliasing breakage will be fixed append-cflags -fno-strict-aliasing - emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args} + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} if use tools ; then for contrib in halog iprange ; do emake -C contrib/${contrib} \ - CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args} + CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} done fi } diff --git a/net-proxy/haproxy/haproxy-9999.ebuild b/net-proxy/haproxy/haproxy-9999.ebuild index f2325eb566e5..a140ddb0af61 100644 --- a/net-proxy/haproxy/haproxy-9999.ebuild +++ b/net-proxy/haproxy/haproxy-9999.ebuild @@ -55,66 +55,69 @@ src_prepare() { } src_compile() { - local args="TARGET=linux2628 USE_GETADDRINFO=1" + local -a args=( + TARGET=linux2628 + USE_GETADDRINFO=1 + ) if use crypt ; then - args="${args} USE_LIBCRYPT=1" + args+=( USE_LIBCRYPT=1 ) else - args="${args} USE_LIBCRYPT=" + args+=( USE_LIBCRYPT= ) fi # bug 541042 # if use lua; then -# args="${args} USE_LUA=1" +# args+=( USE_LUA=1 ) # else - args="${args} USE_LUA=" + args+=( USE_LUA= ) # fi if use net_ns; then - args="${args} USE_NS=1" + args+=( USE_NS=1 ) else - args="${args} USE_NS=" + args+=( USE_NS= ) fi if use pcre ; then - args="${args} USE_PCRE=1" + args+=( USE_PCRE=1 ) else - args="${args} USE_PCRE=" + args+=( USE_PCRE= ) fi if use pcre-jit; then - args="${args} USE_PCRE_JIT=1" + args+=( USE_PCRE_JIT=1 ) else - args="${args} USE_PCRE_JIT=" + args+=( USE_PCRE_JIT= ) fi # if use kernel_linux; then -# args="${args} USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1" +# args+=( USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1 ) # else -# args="${args} USE_LINUX_SPLICE= USE_LINUX_TPROXY=" +# args+=( USE_LINUX_SPLICE= USE_LINUX_TPROXY= ) # fi if use ssl ; then - args="${args} USE_OPENSSL=1" + args+=( USE_OPENSSL=1 ) else - args="${args} USE_OPENSSL=" + args+=( USE_OPENSSL= ) fi if use zlib ; then - args="${args} USE_ZLIB=1" + args+=( USE_ZLIB=1 ) else - args="${args} USE_ZLIB=" + args+=( USE_ZLIB= ) fi # For now, until the strict-aliasing breakage will be fixed append-cflags -fno-strict-aliasing - emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args} + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} if use tools ; then for contrib in halog iprange ; do emake -C contrib/${contrib} \ - CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args} + CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} done fi } |