-
-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplified dependency installation [skip appveyor]
- Loading branch information
1 parent
63aa5f6
commit ae413b0
Showing
5 changed files
with
81 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,6 @@ | |
|
||
shopt -s nullglob | ||
|
||
$(phpenv which php) -m | ||
|
||
export LC_ALL=C | ||
|
||
for i in core core*; do | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# This file is part of the Zephir. | ||
# | ||
# (c) Zephir Team <[email protected]> | ||
# | ||
# For the full copyright and license information, please view the LICENSE | ||
# file that was distributed with this source code. | ||
|
||
if [ "${CI}" != "true" ]; then | ||
echo "This script is designed to run inside a CI container only. Stop." | ||
exit 1 | ||
fi | ||
|
||
printf "\n" | pecl install --force psr &> /dev/null | ||
|
||
install_ext_from_src () { | ||
pkgname=$1 | ||
source=$2 | ||
cfgflags=$3 | ||
downloaddir="${HOME}/.cache/${pkgname}/${pkgname}-${PHP_VERNUM}" | ||
prefix="${HOME}/.local/opt/${pkgname}/${pkgname}-${PHP_VERNUM}" | ||
libdir="${prefix}/lib" | ||
|
||
if [ ! -f "${libdir}/pkgname.so" ]; then | ||
if [ ! -d `dirname ${downloaddir}` ]; then | ||
mkdir -p `dirname ${downloaddir}` | ||
fi | ||
|
||
cd `dirname ${downloaddir}` | ||
|
||
if [ ! -d "${pkgname}-${PHP_VERNUM}" ]; then | ||
git clone --depth=1 -v "${source}" "${pkgname}-${PHP_VERNUM}" | ||
fi | ||
|
||
if [ ! -f "${pkgname}-${PHP_VERNUM}/LICENSE" ]; then | ||
echo "Unable to locate ${pkgname}-${PHP_VERNUM}/LICENSE file. Stop." | ||
exit 1 | ||
fi | ||
|
||
if [ ! -d "${downloaddir}" ]; then | ||
echo "Unable to locate ${pkgname} source. Stop." | ||
exit 1 | ||
fi | ||
|
||
if [ ! -d "${libdir}" ]; then | ||
mkdir -p "${libdir}" | ||
fi | ||
|
||
cd "${downloaddir}" | ||
phpize | ||
printf "\n" | ./configure "${cfgflags}" | ||
|
||
make --silent -j"$(getconf _NPROCESSORS_ONLN)" | ||
make --silent install | ||
|
||
if [ -f `$(phpenv which php-config) --extension-dir`/${pkgname}.so ]; then | ||
cp `$(phpenv which php-config) --extension-dir`/${pkgname}.so "${libdir}/${pkgname}.so" | ||
elif [ -f "${downloaddir}/modules/${pkgname}.so" ]; then | ||
cp "${downloaddir}/modules/${pkgname}.so" "${libdir}/${pkgname}.so" | ||
fi | ||
fi | ||
|
||
if [ ! -x "${libdir}/${pkgname}.so" ]; then | ||
echo "Unable to locate ${libdir}/${pkgname}.so. Stop." | ||
exit 1 | ||
fi | ||
|
||
echo "extension=${libdir}/${pkgname}.so" > "$(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/${pkgname}.ini" | ||
} | ||
|
||
install_ext_from_src "zephir_parser" "https://github.com/phalcon/php-zephir-parser" "" | ||
|
||
if [ "${PHP_VERNUM}" -ge 70300 ]; then | ||
install_ext_from_src "memcached" "https://github.com/php-memcached-dev/php-memcached" "--disable-memcached-sasl" | ||
else | ||
echo 'extension="memcached.so"' > "$(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/memcached.ini" | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters