From 2cdf6f92c1ba145529efa5cf4ae1a612d1c8e1a7 Mon Sep 17 00:00:00 2001 From: Laurent Laville Date: Sat, 17 Jul 2021 07:52:10 +0200 Subject: [PATCH] add support for yac --- data/supported-extensions | 1 + install-php-extensions | 27 +++++++++++++++++++++++++++ scripts/tests/yac | 25 +++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100755 scripts/tests/yac diff --git a/data/supported-extensions b/data/supported-extensions index 984567f..69f3819 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -102,6 +102,7 @@ xlswriter 7.0 7.1 7.2 7.3 7.4 8.0 xmldiff 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 xmlrpc 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 xsl 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 +yac 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 yaml 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 yar 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 zip 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 diff --git a/install-php-extensions b/install-php-extensions index 0e3aa96..14aa607 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -2282,6 +2282,33 @@ installRemoteModule() { addConfigureOption enable-reader yes fi ;; + yac) + if test -z "$installRemoteModule_version"; then + if test $PHP_MAJMIN_VERSION -le 506; then + installRemoteModule_version=0.9.2 + fi + fi + if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 2.2.0) -ge 0; then + # Enable igbinary serializer support + if php --ri igbinary >/dev/null 2>/dev/null; then + addConfigureOption enable-igbinary yes + else + addConfigureOption enable-igbinary no + fi + # Enable json serializer support + if php --ri json >/dev/null 2>/dev/null; then + addConfigureOption enable-json yes + else + addConfigureOption enable-json no + fi + # Enable msgpack serializer support + if php --ri msgpack >/dev/null 2>/dev/null; then + addConfigureOption enable-msgpack yes + else + addConfigureOption enable-msgpack no + fi + fi + ;; yaml) if test -z "$installRemoteModule_version"; then if test $PHP_MAJMIN_VERSION -le 506; then diff --git a/scripts/tests/yac b/scripts/tests/yac new file mode 100755 index 0000000..5585fe6 --- /dev/null +++ b/scripts/tests/yac @@ -0,0 +1,25 @@ +#!/bin/sh + +set -o errexit +set -o nounset + +rc=0 +if test -z "$(php --ri yac | grep 'Serializer => .*igbinary')"; then + echo 'yac has not been compiled with Igbinary support' >&2 + rc=1 +else + echo 'yac has been compiled with Igbinary support' +fi +if test -z "$(php --ri yac | grep 'Serializer => .*json')"; then + echo 'yac has not been compiled with Json support' >&2 + rc=1 +else + echo 'yac has been compiled with Json support' +fi +if test -z "$(php --ri yac | grep 'Serializer => .*msgpack')"; then + echo 'yac has not been compiled with Msgpack support' >&2 + rc=1 +else + echo 'yac has been compiled with Msgpack support' +fi +exit $rc