From: Mike Gilbert Date: Sun, 13 Nov 2016 20:37:02 +0000 (-0500) Subject: apache-2.eclass: fix pcre-config wrapper script X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=7bd7223753c766f79f80e46c828ddbc02b16fa20;p=gentoo.git apache-2.eclass: fix pcre-config wrapper script Thanks Robert Förster for noticing the error. Bug: https://bugs.gentoo.org/598808 --- diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass index a8d5804af61c..919f82faeb46 100644 --- a/eclass/apache-2.eclass +++ b/eclass/apache-2.eclass @@ -485,9 +485,16 @@ apache-2_src_prepare() { # This package really should upgrade to using pcre's .pc file. cat <<-\EOF >"${T}"/pcre-config - #!/bin/sh - [ "${flag}" = "--version" ] && set -- --modversion - exec ${PKG_CONFIG} libpcre "$@" + #!/bin/bash + flags=() + for flag; do + if [[ ${flag} == "--version" ]]; then + flags+=( --modversion ) + else + flags+=( "${flag}" ) + fi + done + exec ${PKG_CONFIG} libpcre "${flags[@]}" EOF chmod a+x "${T}"/pcre-config }