X-Git-Url: https://git.tld-linux.org/?p=packages%2Fphp.git;a=blobdiff_plain;f=dep-tests.sh;h=f28ab54a592683196151a83137324a6a51e6b811;hp=3ee6a4fcda6e27d2ae79cd5341f3163543f38956;hb=e59f178bd07ce379ba67394098da351eb0f2737a;hpb=dc65169f5126a29ab28123c88061240406355f84 diff --git a/dep-tests.sh b/dep-tests.sh old mode 100644 new mode 100755 index 3ee6a4f..f28ab54 --- a/dep-tests.sh +++ b/dep-tests.sh @@ -34,7 +34,7 @@ conf_dir=${CONFIG_DIR:-$(php-config --sysconfdir)/conf.d $(php-config --sysconfd tmpini=$(mktemp) # poldek --sn ac-ready -u php-* -for ext in $ext_dir/*.so; do +for ext in ${1:-$ext_dir/*.so}; do [ -f $ext ] || continue ext=${ext##*/}; ext=${ext%.so} @@ -44,7 +44,10 @@ for ext in $ext_dir/*.so; do echo -n "$ext (deps: ${deps# })..." - grep -rlE '^extension=('$(echo "${deps# }" | tr ' ' '|')').so$' $conf_dir | LC_CTYPE=C LC_ALL= sort | xargs cat > $tmpini + # special: opcache is listed as "Zend Opcache" + [ "$ext" = "opcache" ] && ext="zend opcache" + + grep -rlE '^(zend_)?extension=('$(echo "${deps# }" | tr ' ' '|')').so$' $conf_dir | LC_CTYPE=C LC_ALL= sort | xargs cat > $tmpini $php -n -d extension_dir=$ext_dir -c $tmpini -r "exit(extension_loaded('${ext}') ? 0 : 1);" rc=$? if [ $rc = 0 ]; then