X-Git-Url: https://git.tld-linux.org/?p=packages%2Fphp.git;a=blobdiff_plain;f=dep-tests.sh;h=18ea66c08896491196fea4c4516eb55fe8dc7a2e;hp=3ee6a4fcda6e27d2ae79cd5341f3163543f38956;hb=712278527b67351baf8b4b873b489c19d491b6ab;hpb=47130bb86ff82df6ba9ec83597ffeacabc1d888a diff --git a/dep-tests.sh b/dep-tests.sh old mode 100644 new mode 100755 index 3ee6a4f..18ea66c --- a/dep-tests.sh +++ b/dep-tests.sh @@ -19,7 +19,7 @@ dep_pdo_dblib="$dep_pdo pdo" dep_pdo_mysql="$dep_pdo pdo $with_mysqlnd" dep_simplexml="$dep_spl spl" dep_imap="pcre" -dep_phar="$dep_spl spl" +dep_phar="$dep_spl spl hash" dep_sqlite="$dep_pdo pdo" dep_fileinfo="pcre" dep_wddx='xml' @@ -27,6 +27,7 @@ dep_xmlreader='dom' dep_xmlrpc='xml' dep_xsl='dom' dep_snmp="$dep_spl spl snmp" +dep_opcache='pcre' php=${PHP:-$(php-config --php-binary)} ext_dir=${EXTENSION_DIR:-$(php-config --extension-dir)} @@ -34,7 +35,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 ${*:-$ext_dir/*.so}; do [ -f $ext ] || continue ext=${ext##*/}; ext=${ext%.so} @@ -44,7 +45,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_ALL=C 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