Merge pull request #19 from mlocati/igbinary

Add support for igbinary
pull/20/head
Michele Locati 2019-05-16 17:29:58 +02:00 committed by GitHub
commit d572d8867b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 2 deletions

View File

@ -1,5 +1,9 @@
sudo: false
branches:
only:
- master
services:
- docker

View File

@ -10,6 +10,7 @@ exif 5.6 7.0 7.1 7.2 7.3
gd 5.6 7.0 7.1 7.2 7.3
gettext 5.6 7.0 7.1 7.2 7.3
gmp 5.6 7.0 7.1 7.2 7.3
igbinary 5.6 7.0 7.1 7.2 7.3
imagick 5.6 7.0 7.1 7.2 7.3
imap 5.6 7.0 7.1 7.2 7.3
interbase 5.6 7.0 7.1 7.2 7.3

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