commit:     7bd7223753c766f79f80e46c828ddbc02b16fa20
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 13 20:37:02 2016 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Nov 13 20:41:08 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bd72237

apache-2.eclass: fix pcre-config wrapper script

Thanks Robert Förster for noticing the error.

Bug: https://bugs.gentoo.org/598808

 eclass/apache-2.eclass | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass
index a8d5804..919f82f 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
 }

Reply via email to