summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2016-11-13 15:37:02 -0500
committerMike Gilbert <floppym@gentoo.org>2016-11-13 15:41:08 -0500
commit7bd7223753c766f79f80e46c828ddbc02b16fa20 (patch)
tree8aab5d1919ef9f6412cc4f14da770a28d1ed8331 /eclass
parentapp-admin/apache-tools: fix pcre-config wrapper script (diff)
downloadgentoo-7bd7223753c766f79f80e46c828ddbc02b16fa20.tar.gz
gentoo-7bd7223753c766f79f80e46c828ddbc02b16fa20.tar.bz2
gentoo-7bd7223753c766f79f80e46c828ddbc02b16fa20.zip
apache-2.eclass: fix pcre-config wrapper script
Thanks Robert Förster for noticing the error. Bug: https://bugs.gentoo.org/598808
Diffstat (limited to 'eclass')
-rw-r--r--eclass/apache-2.eclass13
1 files changed, 10 insertions, 3 deletions
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
}