1
0
Fork 0
mirror of https://github.com/mlocati/docker-php-extension-installer synced 2025-05-09 00:22:40 +00:00

Add support for igbinary

This commit is contained in:
Michele Locati 2019-05-16 17:21:15 +02:00
parent 10c317ccb4
commit 4ce468ba40
No known key found for this signature in database
GPG key ID: 98B7CE2E7234E28B
2 changed files with 14 additions and 2 deletions

View file

@ -418,12 +418,13 @@ getPackageSource () {
# $1: the handle of the PHP module
# $2: the URL of the module source code
# $3: the options of the configure command
# $4: the value of CFLAGS
installModuleFromSource () {
printf '### INSTALLING MODULE %s FROM SOURCE CODE ###\n' "${1}"
installModuleFromSource_dir="$(getPackageSource "${2}")"
cd "${installModuleFromSource_dir}"
phpize
./configure ${3}
./configure ${3} CFLAGS="${4:-}"
make -j$(nproc) install
cd --
docker-php-ext-enable "${1}"
@ -546,6 +547,7 @@ then
else
MODULE_SOURCE=''
MODULE_SOURCE_CONFIGOPTIONS=''
MODULE_SOURCE_CFLAGS=''
case "${PHP_MODULE_TO_INSTALL}" in
cmark)
MODULE_SOURCE=https://github.com/krakjoe/cmark/archive/v1.0.0.tar.gz
@ -554,10 +556,19 @@ then
cd -
MODULE_SOURCE_CONFIGOPTIONS=--with-cmark
;;
igbinary)
if test ${PHP_MAJMIN_VERSION} -lt 700; then
MODULE_SOURCE="https://github.com/igbinary/igbinary/archive/2.0.8.tar.gz"
else
MODULE_SOURCE="https://github.com/igbinary/igbinary/archive/3.0.1.tar.gz"
fi
MODULE_SOURCE_CONFIGOPTIONS=--enable-igbinary
MODULE_SOURCE_CFLAGS='-O2 -g'
;;
esac
if test -n "${MODULE_SOURCE}"
then
installModuleFromSource "${PHP_MODULE_TO_INSTALL}" "${MODULE_SOURCE}" "${MODULE_SOURCE_CONFIGOPTIONS}"
installModuleFromSource "${PHP_MODULE_TO_INSTALL}" "${MODULE_SOURCE}" "${MODULE_SOURCE_CONFIGOPTIONS}" "${MODULE_SOURCE_CFLAGS}"
else
installPECLModule ${PHP_MAJMIN_VERSION} "${PHP_MODULE_TO_INSTALL}"
fi