Skip to content
Permalink
Browse files

Minor provision cleaning up

  • Loading branch information...
sergeyklay committed May 13, 2019
1 parent cc8cd54 commit 0082c776f697846d8eeaaf88491ee82a5a6de157
Showing with 11 additions and 20 deletions.
  1. +11 −20 .ci/install-prereqs.sh
@@ -19,7 +19,7 @@ PHP_INI="$(phpenv root)/versions/$(phpenv version-name)/etc/php.ini"

: ${ZEPHIR_PARSER_VERSION:=master}

# {{{ Install latest APC(u)
# Install latest APC(u)
printf "\n" | pecl install --force apcu_bc 1> /dev/null
# See https://pear.php.net/bugs/bug.php?id=21007
awk '/extension.*apcu?\.so"?/{$0=""}1' "${PHP_INI}" > php.ini.patch && mv php.ini.patch "${PHP_INI}"
@@ -31,61 +31,52 @@ extension = "apc.so"
apc.enabled = 1
apc.enable_cli = 1
EOT
# }}}

# {{{ Install latest memcached
# Install latest memcached
printf "\n" | pecl install --force memcached 1> /dev/null
echo 'extension="memcached.so"' > $(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/memcached.ini
# }}}

# {{{ Install latest msgpack
# Install latest msgpack
printf "\n" | pecl install --force msgpack 1> /dev/null
#echo 'extension="msgpack.so"' > $(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/msgpack.ini
# }}}
# echo 'extension="msgpack.so"' > $(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/msgpack.ini

# {{{ Install latest xdebug
# Install latest xdebug
phpenv config-rm xdebug.ini 2>&1 >/dev/null || true
if [[ "$PHP_VERNUM" -lt "70300" ]];
then
if [[ "$PHP_VERNUM" -lt "70300" ]]; then
printf "\n" | pecl install --force xdebug 1> /dev/null
awk '/zend_extension.*xdebug.so"?/{$0=""}1' "${PHP_INI}" > php.ini.patch && mv php.ini.patch "${PHP_INI}"
echo 'zend_extension="xdebug.so"' > $(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
fi
# }}}

# {{{ Install latest igbinary, imagick, psr and yaml
# Install latest igbinary, imagick, psr and yaml
printf "\n" | pecl install --force igbinary 1> /dev/null
printf "\n" | pecl install --force imagick 1> /dev/null
printf "\n" | pecl install --force psr 1> /dev/null
printf "\n" | pecl install --force yaml 1> /dev/null
# }}}

# {{{ install zephir_parser
# Install zephir_parser
git clone -b "${ZEPHIR_PARSER_VERSION}" --depth 1 -q https://github.com/phalcon/php-zephir-parser
cd php-zephir-parser
$(phpenv which phpize)
./configure --silent --with-php-config=$(phpenv which php-config) --enable-zephir_parser
make --silent -j"$(getconf _NPROCESSORS_ONLN)"
make --silent install
echo 'extension="zephir_parser.so"' > "$(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/zephir_parser.ini"
# }}}

# {{{ Install redis
# Install redis
redis_ext=`$(phpenv which php-config) --extension-dir`/redis.so
if [[ ! -f "${redis_ext}" ]];
then
if [[ ! -f "${redis_ext}" ]]; then
printf "\n" | pecl install --force redis 1> /dev/null
fi

if [[ "$(php -m | grep redis | wc -l)" = "0" ]] && [[ -f "${redis_ext}" ]];
then
echo 'extension="redis.so"' > "$(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/redis.ini"
fi
# }}}

# Local variables:
# tab-width: 4
# c-basic-offset: 4
# End:
# vim600: noet sw=4 ts=4 fdm=marker
# vim600: noet sw=4 ts=4
# vim<600: noet sw=4 ts=4

0 comments on commit 0082c77

Please sign in to comment.
You can’t perform that action at this time.