2018-04-11 17:39:10 +02:00
#!/bin/sh
# This script wraps docker-php-ext-install, properly configuring the system.
#
2021-01-14 14:19:34 +01:00
# Copyright (c) Michele Locati, 2018-2021
2018-04-11 17:39:10 +02:00
#
2018-04-12 12:00:38 +02:00
# Source: https://github.com/mlocati/docker-php-extension-installer
#
# License: MIT - see https://github.com/mlocati/docker-php-extension-installer/blob/master/LICENSE
2018-04-11 17:39:10 +02:00
# Let's set a sane environment
set -o errexit
set -o nounset
2020-09-21 15:38:20 +02:00
if ! which docker-php-ext-configure >/dev/null || ! which docker-php-ext-enable >/dev/null || ! which docker-php-ext-install >/dev/null || ! which docker-php-source >/dev/null; then
printf 'The script %s is meant to be used with official Docker PHP Images - https://hub.docker.com/_/php\n' "$0" >&2
exit 1
fi
2021-01-14 17:05:23 +01:00
IPE_VERSION=master
2022-03-22 19:24:18 +01:00
StandWithUkraine() {
if test -t 1 && ! grep -Eq '^VERSION=.*jessie' /etc/os-release; then
printf '\e[37;44m#StandWith\e[30;43mUkraine\e[0m\n'
else
printf '#StandWithUkraine\n'
fi
}
2021-01-14 17:05:23 +01:00
if test "$IPE_VERSION" = master && test "${CI:-}" != true; then
cat <<EOF
#############################################################################################################
# #
# W A R N I N G ! ! ! #
# #
# You are using an unsupported method to get install-php-extensions! #
# #
2021-02-05 18:40:07 +01:00
# Please update the way you fetch it. Read the instructions at #
2021-01-14 17:05:23 +01:00
# https://github.com/mlocati/docker-php-extension-installer#usage #
# #
# For example, if you get this script by fetching #
# https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions #
# replace it with #
# https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions #
# #
# Sleeping for a while so you get bored of this and act ;) #
# #
#############################################################################################################
EOF
2022-03-22 19:24:18 +01:00
StandWithUkraine
2021-01-14 17:05:23 +01:00
sleep 10 || true
else
printf 'install-php-extensions v.%s\n' "$IPE_VERSION"
2022-03-22 19:24:18 +01:00
StandWithUkraine
2021-01-14 17:05:23 +01:00
fi
2018-04-11 17:39:10 +02:00
# Reset the Internal Field Separator
2019-12-20 16:52:00 +01:00
resetIFS() {
2021-06-30 10:42:01 +02:00
IFS='
2018-04-11 17:39:10 +02:00
'
}
2020-02-28 11:09:15 +01:00
# Set these variables:
2021-08-24 15:34:31 +02:00
# - DISTRO containing the distribution name (eg 'alpine', 'debian')
# - DISTRO_VERSION_NUMBER containing the distribution version (eg '3.14' for Alpine, 11 for Debian)
# - DISTRO_VERSION containing the distribution name and its version(eg 'alpine@3.14', 'debian@11')
# - DISTRO_MAJMIN_VERSION always containing a number representing the distribution version (eg 314 for Alpine, 1100 for Debian)
2020-02-28 11:09:15 +01:00
setDistro() {
if ! test -r /etc/os-release; then
printf 'The file /etc/os-release is not readable\n' >&2
exit 1
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
fi
2020-02-28 11:09:15 +01:00
DISTRO="$(cat /etc/os-release | grep -E ^ID= | cut -d = -f 2)"
2020-09-18 20:02:07 +02:00
DISTRO_VERSION_NUMBER="$(cat /etc/os-release | grep -E ^VERSION_ID= | cut -d = -f 2 | cut -d '"' -f 2 | cut -d . -f 1,2)"
DISTRO_VERSION="$(printf '%s@%s' $DISTRO $DISTRO_VERSION_NUMBER)"
DISTRO_MAJMIN_VERSION="$(echo "$DISTRO_VERSION_NUMBER" | awk -F. '{print $1*100+$2}')"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
}
2021-01-13 09:53:34 +01:00
# Set:
# - PHP_MAJMIN_VERSION: Major-Minor version, format MMmm (example 800 for PHP 8.0.1)
2021-09-28 11:44:47 +02:00
# - PHP_MAJDOTMIN_VERSION: Major-Minor version, format M.m (example 8.0 for PHP 8.0.1)
2021-01-13 09:53:34 +01:00
# - PHP_MAJMINPAT_VERSION: Major-Minor-Patch version, format MMmmpp (example 80001 for PHP 8.0.1) variables containing integers value
2021-09-28 11:44:47 +02:00
# - PHP_MAJDOTMINDOTPAT_VERSION: Major-Minor-Patch version, format M.m.p (example 8.0.1 for PHP 8.0.1)
# - PHP_THREADSAFE: 1 if PHP is thread-safe (TS), 0 if not thread-safe (NTS)
2022-03-25 10:20:09 +01:00
# - PHP_DEBUGBUILD: 1 if PHP is debug build (configured with "--enable-debug"), 0 otherwise
2021-09-28 13:11:38 +02:00
# - PHP_BITS: 32 if PHP is compiled for 32-bit, 64 if 64-bit
2022-03-24 11:58:29 +01:00
# - PHP_EXTDIR: the absolute path where the PHP extensions reside
2021-01-13 09:53:34 +01:00
setPHPVersionVariables() {
2021-09-28 11:44:47 +02:00
PHP_MAJDOTMINDOTPAT_VERSION="$(php-config --version)"
PHP_MAJMIN_VERSION=$(printf '%s' "$PHP_MAJDOTMINDOTPAT_VERSION" | awk -F. '{print $1*100+$2}')
PHP_MAJDOTMIN_VERSION=$(printf '%s' "$PHP_MAJDOTMINDOTPAT_VERSION" | cut -d. -f1-2)
PHP_MAJMINPAT_VERSION=$(printf '%s' "$PHP_MAJDOTMINDOTPAT_VERSION" | awk -F. '{print $1*10000+$2*100+$3}')
2022-03-25 10:20:09 +01:00
PHP_THREADSAFE=$(php -n -r 'echo ZEND_THREAD_SAFE ? 1 : 0;')
PHP_DEBUGBUILD=$(php -n -r 'echo ZEND_DEBUG_BUILD ? 1 : 0;')
PHP_BITS=$(php -n -r 'echo PHP_INT_SIZE * 8;')
2022-03-24 11:58:29 +01:00
PHP_EXTDIR="$(php -d display_errors=stderr -r 'echo realpath(ini_get("extension_dir"));')"
2018-04-11 17:39:10 +02:00
}
2021-01-14 14:47:26 +01:00
# Fix apt-get being very slow on Debian Jessie
# See https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1332440
fixMaxOpenFiles() {
fixMaxOpenFiles_cur=$(ulimit -n 2>/dev/null || echo 0)
if test "$fixMaxOpenFiles_cur" -gt 10000; then
ulimit -n 10000
fi
}
2020-12-10 14:56:31 +01:00
# Get the directory containing the compiled PHP extensions
#
# Output:
# The absolute path of the extensions dir
getPHPExtensionsDir() {
php -i | grep -E '^extension_dir' | head -n1 | tr -s '[:space:]*=>[:space:]*' '|' | cut -d'|' -f2
}
2020-10-18 19:06:39 +02:00
# Normalize the name of a PHP extension
#
# Arguments:
# $1: the name of the module to be normalized
#
# Output:
# The normalized module name
normalizePHPModuleName() {
normalizePHPModuleName_name="$1"
case "$normalizePHPModuleName_name" in
*A* | *B* | *C* | *D* | *E* | *F* | *G* | *H* | *I* | *J* | *K* | *L* | *M* | *N* | *O* | *P* | *Q* | *R* | *S* | *T* | *U* | *V* | *W* | *X* | *Y* | *Z*)
normalizePHPModuleName_name="$(LC_CTYPE=C printf '%s' "$normalizePHPModuleName_name" | tr '[:upper:]' '[:lower:]')"
;;
esac
case "$normalizePHPModuleName_name" in
2022-06-11 18:27:36 +02:00
datadog_trace)
normalizePHPModuleName_name=ddtrace
;;
2020-12-10 14:56:31 +01:00
ioncube | ioncube\ loader)
normalizePHPModuleName_name='ioncube_loader'
;;
2020-10-18 19:06:39 +02:00
pecl_http)
normalizePHPModuleName_name='http'
;;
zend\ opcache)
normalizePHPModuleName_name='opcache'
;;
2022-04-05 14:37:14 +02:00
libsodium)
if test $PHP_MAJMIN_VERSION -ge 700; then
normalizePHPModuleName_name='sodium'
fi
;;
sodium)
if test $PHP_MAJMIN_VERSION -lt 700; then
normalizePHPModuleName_name='libsodium'
fi
;;
2020-10-18 19:06:39 +02:00
*\ *)
printf '### WARNING Unrecognized module name: %s ###\n' "$1" >&2
;;
esac
printf '%s' "$normalizePHPModuleName_name"
}
2021-01-26 15:16:04 +01:00
# Get the PECL name of PHP extension
#
# Arguments:
# $1: the name of the extension
#
# Output:
# The PECL name of the extension
getPeclModuleName() {
normalizePHPModuleName_name="$1"
case "$normalizePHPModuleName_name" in
2022-06-11 17:25:45 +02:00
ddtrace)
normalizePHPModuleName_name=datadog_trace
;;
2021-01-26 15:16:04 +01:00
http)
normalizePHPModuleName_name=pecl_http
;;
2022-04-05 14:37:14 +02:00
sodium)
normalizePHPModuleName_name=libsodium
;;
2021-01-26 15:16:04 +01:00
esac
printf '%s' "$normalizePHPModuleName_name"
}
2022-03-22 19:24:18 +01:00
# Parse a package.xml (or package2.xml) file and extract the module name and version
#
# Arguments:
# $1: the patho to the XML file
#
# Set these variables:
# - EXTRACTPACKAGEVERSIONFROMXML_NAME
# - EXTRACTPACKAGEVERSIONFROMXML_VERSION
#
# Output:
# Nothing
#
# Return:
# 0 (true): if the string is in the list
# 1 (false): if the string is not in the list
extractPackageVersionFromXML() {
if ! test -f "$1"; then
printf 'Unable to find the file\n%s\n' >&2
return 1
fi
2022-03-25 10:55:08 +01:00
extractPackageVersionFromXML_code="$(
cat <<'EOT'
$doc = new DOMDocument();
if (!$doc->load($argv[1])) {
fwrite(STDERR, "Failed to load XML file\n");
exit(1);
}
set_error_handler(
static function($errno, $errstr) {
fwrite(STDERR, trim((string) $errstr) . "\n");
exit(1);
},
-1
);
$xpath = new DOMXpath($doc);
$xpath->registerNamespace('v20', 'http://pear.php.net/dtd/package-2.0');
$xpath->registerNamespace('v21', 'http://pear.php.net/dtd/package-2.1');
if ($xpath->query('/v20:package/v20:dependencies')->count() === 1) {
$ns = 'v20:';
} elseif ($xpath->query('/v21:package/v21:dependencies')->count() === 1) {
$ns = 'v21:';
} elseif ($xpath->query('/package')->count() === 1) {
$ns = '';
} else {
fwrite(STDERR, "Unsupported namespace of the XML of package version details\n");
}
$nodes = $xpath->query("/{$ns}package/{$ns}name");
$name = trim((string) $nodes[0]->nodeValue);
if ($ns === '') {
$nodes = $xpath->query("/{$ns}package/{$ns}version");
} else {
$nodes = $xpath->query("/{$ns}package/{$ns}version/{$ns}release");
}
$version = trim((string) $nodes[0]->nodeValue);
echo "EXTRACTPACKAGEVERSIONFROMXML_NAME='{$name}'\n";
echo "EXTRACTPACKAGEVERSIONFROMXML_VERSION='{$version}'\n";
exit(0);
EOT
)"
extractPackageVersionFromXML_vars="$(php -n -d display_errors=stderr -r "$extractPackageVersionFromXML_code" "$1")"
if test -z "$extractPackageVersionFromXML_vars"; then
return 1
fi
eval "$extractPackageVersionFromXML_vars"
return 0
2022-03-22 19:24:18 +01:00
}
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
# Parse a module name (and optionally version) as received via command arguments, extracting the version and normalizing it
2021-01-26 16:58:14 +01:00
# Examples:
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
# xdebug-2.9.8
2021-01-26 16:58:14 +01:00
# xdebug-^2
# xdebug-^2.9
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
#
# Arguments:
# $1: the name of the module to be normalized
#
# Set these variables:
# - PROCESSED_PHP_MODULE_ARGUMENT
#
# Optionally set these variables:
# - PHP_WANTEDMODULEVERSION_<...> (where <...> is the normalized module name)
2022-03-25 10:55:08 +01:00
# - PHP_MODULESOURCECODEPATH_<...> (where <...> is the normalized module name)
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
#
# Output:
# Nothing
2021-07-05 16:43:02 +02:00
processPHPModuleArgument() {
2022-03-22 19:24:18 +01:00
processPHPModuleArgument_arg="$1"
# Convert GitHub short form to long url,
# for example: from
# php-memcached-dev/php-memcached@8f106564e6bb005ca6100b12ccc89000daafa9d8
# to
# https://codeload.github.com/php-memcached-dev/php-memcached/tar.gz/8f106564e6bb005ca6100b12ccc89000daafa9d8
2022-03-25 10:55:08 +01:00
processPHPModuleArgument_arg="$(printf '%s' "$processPHPModuleArgument_arg" | sed -E 's/^([a-zA-Z0-9_.\-]+\/[a-zA-Z0-9_.\-]+)@(.+$)/https:\/\/codeload.github.com\/\1\/tar.gz\/\2/')"
2022-03-22 19:24:18 +01:00
# Let's check if $processPHPModuleArgument_arg is an URL
if printf '%s' "$processPHPModuleArgument_arg" | grep -Eq '^https?://[^ ]+/[^ ]+$'; then
printf 'Downloading source from %s\n' "$processPHPModuleArgument_arg"
processPHPModuleArgument_arg="$(getPackageSource "$processPHPModuleArgument_arg")"
fi
# Let's check if $processPHPModuleArgument_arg the absolute path of an existing directory
if test "$processPHPModuleArgument_arg" != "${processPHPModuleArgument_arg#/}" && test -d "$processPHPModuleArgument_arg"; then
if test -f "$processPHPModuleArgument_arg/package2.xml"; then
printf 'Checking package2.xml of directory %s... ' "$processPHPModuleArgument_arg"
if ! extractPackageVersionFromXML "$processPHPModuleArgument_arg/package2.xml"; then
return 1
fi
elif test -f "$processPHPModuleArgument_arg/package.xml"; then
printf 'Checking package.xml of directory %s... ' "$processPHPModuleArgument_arg"
if ! extractPackageVersionFromXML "$processPHPModuleArgument_arg/package.xml"; then
return 1
fi
else
printf 'Unable to find the package.xml file in the directory\n%s\n' "$processPHPModuleArgument_arg"
return 1
fi
2022-03-25 10:55:08 +01:00
printf 'good (name: %s, version: %s)\n' "$EXTRACTPACKAGEVERSIONFROMXML_NAME" "$EXTRACTPACKAGEVERSIONFROMXML_VERSION"
PROCESSED_PHP_MODULE_ARGUMENT="$(normalizePHPModuleName "$EXTRACTPACKAGEVERSIONFROMXML_NAME")"
processPHPModuleArgument_version="$EXTRACTPACKAGEVERSIONFROMXML_VERSION"
if printf '%s' "$PROCESSED_PHP_MODULE_ARGUMENT" | grep -Eq '^[a-zA-Z0-9_]+$'; then
eval PHP_MODULESOURCECODEPATH_$PROCESSED_PHP_MODULE_ARGUMENT="$processPHPModuleArgument_arg"
else
printf 'Unable to parse the following module name:\n%s\n' "$PROCESSED_PHP_MODULE_ARGUMENT" >&2
exit 1
fi
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
else
2022-03-25 10:55:08 +01:00
PROCESSED_PHP_MODULE_ARGUMENT="${processPHPModuleArgument_arg%%-*}"
if test -n "$PROCESSED_PHP_MODULE_ARGUMENT" && test "$PROCESSED_PHP_MODULE_ARGUMENT" != "$processPHPModuleArgument_arg"; then
processPHPModuleArgument_version="${processPHPModuleArgument_arg#*-}"
else
processPHPModuleArgument_version=''
fi
PROCESSED_PHP_MODULE_ARGUMENT="$(normalizePHPModuleName "$PROCESSED_PHP_MODULE_ARGUMENT")"
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2021-07-05 16:43:02 +02:00
if test -n "$processPHPModuleArgument_version"; then
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if printf '%s' "$PROCESSED_PHP_MODULE_ARGUMENT" | grep -Eq '^[a-zA-Z0-9_]+$'; then
2021-07-05 16:43:02 +02:00
eval PHP_WANTEDMODULEVERSION_$PROCESSED_PHP_MODULE_ARGUMENT="$processPHPModuleArgument_version"
2020-12-16 11:34:30 +01:00
elif printf '%s' "$PROCESSED_PHP_MODULE_ARGUMENT" | grep -Eq '^@[a-zA-Z0-9_]+$'; then
2021-07-05 16:43:02 +02:00
eval PHP_WANTEDMODULEVERSION__${PROCESSED_PHP_MODULE_ARGUMENT#@}="$processPHPModuleArgument_version"
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
else
printf 'Unable to parse the following module name:\n%s\n' "$PROCESSED_PHP_MODULE_ARGUMENT" >&2
fi
fi
}
# Get the wanted PHP module version, as specified in the command line arguments.
#
# Arguments:
# $1: the name of the module to be normalized
#
# Output:
# The wanted version (if any)
getWantedPHPModuleVersion() {
if printf '%s' "$1" | grep -Eq '^[a-zA-Z0-9_]+$'; then
eval printf '%s' "\${PHP_WANTEDMODULEVERSION_$1:-}"
2020-12-16 11:34:30 +01:00
elif printf '%s' "$1" | grep -Eq '^@[a-zA-Z0-9_]+$'; then
eval printf '%s' "\${PHP_WANTEDMODULEVERSION__${1#@}:-}"
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
}
2022-03-25 10:55:08 +01:00
# Get source code path of a PHP module version, as specified in the command line arguments.
#
# Arguments:
# $1: the name of the module to be normalized
#
# Output:
# The wanted version (if any)
getModuleSourceCodePath() {
if printf '%s' "$1" | grep -Eq '^[a-zA-Z0-9_]+$'; then
eval printf '%s' "\${PHP_MODULESOURCECODEPATH_$1:-}"
fi
}
2021-01-26 16:58:14 +01:00
# Get the wanted PHP module version, resolving it if it starts with '^'
#
# Arguments:
# $1: the name of the module to be normalized
#
# Output:
# The version to be used
resolveWantedPHPModuleVersion() {
resolveWantedPHPModuleVersion_raw="$(getWantedPHPModuleVersion "$1")"
resolveWantedPHPModuleVersion_afterCaret="${resolveWantedPHPModuleVersion_raw#^}"
if test "$resolveWantedPHPModuleVersion_raw" = "$resolveWantedPHPModuleVersion_afterCaret"; then
printf '%s' "$resolveWantedPHPModuleVersion_raw"
return
fi
resolveWantedPHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$1/allreleases.xml")"
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_xml" | tr -s ' \t\r\n' ' ' | sed -r 's# *<#\n<#g' | grep '<v>' | sed 's#<v>##g' | sed 's# ##g')"
resetIFS
for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do
resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_afterCaret}"
if test "$resolveWantedPHPModuleVersion_version" != "${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_afterCaret.}"; then
# Example: looking for 1.0, found 1.0.1
printf '%s' "$resolveWantedPHPModuleVersion_version"
return
fi
done
for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do
resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_afterCaret}"
if test "$resolveWantedPHPModuleVersion_version" = "$resolveWantedPHPModuleVersion_suffix"; then
continue
fi
if test -z "$resolveWantedPHPModuleVersion_suffix"; then
# Example: looking for 1.0, found exactly it
printf '%s' "$resolveWantedPHPModuleVersion_version"
return
fi
case "$resolveWantedPHPModuleVersion_suffix" in
[0-9])
# Example: looking for 1.1, but this is 1.10
;;
*)
# Example: looking for 1.1, this is 1.1rc1
printf '%s' "$resolveWantedPHPModuleVersion_version"
return
;;
esac
done
printf 'Unable to find a version of "%s" compatible with "%s"\nAvailable versions are:\n%s\n' "$1" "$resolveWantedPHPModuleVersion_raw" "$resolveWantedPHPModuleVersion_versions" >&2
exit 1
}
2020-10-18 18:40:43 +02:00
# Set these variables:
# - PHP_PREINSTALLED_MODULES the normalized list of PHP modules installed before running this script
setPHPPreinstalledModules() {
PHP_PREINSTALLED_MODULES=''
2018-04-11 17:39:10 +02:00
IFS='
'
2019-10-07 17:54:18 +02:00
for getPHPInstalledModules_module in $(php -m); do
2018-04-11 17:39:10 +02:00
getPHPInstalledModules_moduleNormalized=''
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
case "$getPHPInstalledModules_module" in
2019-12-20 16:52:00 +01:00
\[PHP\ Modules\]) ;;
2018-04-11 17:39:10 +02:00
\[Zend\ Modules\])
break
;;
*)
2020-10-18 19:06:39 +02:00
getPHPInstalledModules_moduleNormalized="$(normalizePHPModuleName "$getPHPInstalledModules_module")"
if ! stringInList "$getPHPInstalledModules_moduleNormalized" "$PHP_PREINSTALLED_MODULES"; then
PHP_PREINSTALLED_MODULES="$PHP_PREINSTALLED_MODULES $getPHPInstalledModules_moduleNormalized"
fi
2018-04-11 17:39:10 +02:00
;;
esac
done
2020-12-16 11:34:30 +01:00
if command -v composer >/dev/null; then
PHP_PREINSTALLED_MODULES="$PHP_PREINSTALLED_MODULES @composer"
fi
2018-04-11 17:39:10 +02:00
resetIFS
2020-10-18 18:40:43 +02:00
PHP_PREINSTALLED_MODULES="${PHP_PREINSTALLED_MODULES# }"
2018-04-11 17:39:10 +02:00
}
# Get the handles of the modules to be installed
#
# Arguments:
# $@: all module handles
2018-06-28 09:46:14 +02:00
#
# Set:
# PHP_MODULES_TO_INSTALL
#
2018-04-11 17:39:10 +02:00
# Output:
2018-06-28 09:46:14 +02:00
# Nothing
2019-12-20 16:52:00 +01:00
processCommandArguments() {
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
processCommandArguments_endArgs=0
2018-06-28 09:46:14 +02:00
PHP_MODULES_TO_INSTALL=''
2021-10-08 10:24:06 +02:00
# Support deprecated flag IPE_FIX_CACERTS
case "${IPE_FIX_CACERTS:-}" in
1 | y* | Y*)
PHP_MODULES_TO_INSTALL="$PHP_MODULES_TO_INSTALL @fix_letsencrypt"
;;
esac
2019-10-07 17:54:18 +02:00
while :; do
if test $# -lt 1; then
2018-04-11 17:39:10 +02:00
break
fi
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
processCommandArguments_skip=0
if test $processCommandArguments_endArgs -eq 0; then
case "$1" in
2018-06-28 10:01:51 +02:00
--cleanup)
2019-12-20 15:55:26 +01:00
printf '### WARNING the %s option is deprecated (we always cleanup everything) ###\n' "$1" >&2
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
processCommandArguments_skip=1
2018-06-28 09:46:14 +02:00
;;
--)
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
processCommandArguments_skip=1
processCommandArguments_endArgs=1
2018-06-28 09:46:14 +02:00
;;
-*)
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
printf 'Unrecognized option: %s\n' "$1" >&2
2018-06-28 09:46:14 +02:00
exit 1
;;
esac
fi
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
if test $processCommandArguments_skip -eq 0; then
2021-07-05 16:43:02 +02:00
processPHPModuleArgument "$1"
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
processCommandArguments_name="$PROCESSED_PHP_MODULE_ARGUMENT"
2019-12-24 12:53:48 +01:00
if stringInList "$processCommandArguments_name" "$PHP_MODULES_TO_INSTALL"; then
printf '### WARNING Duplicated module name specified: %s ###\n' "$processCommandArguments_name" >&2
2020-10-18 18:40:43 +02:00
elif stringInList "$processCommandArguments_name" "$PHP_PREINSTALLED_MODULES"; then
2019-12-24 12:53:48 +01:00
printf '### WARNING Module already installed: %s ###\n' "$processCommandArguments_name" >&2
2018-06-28 09:46:14 +02:00
else
2019-12-24 12:53:48 +01:00
PHP_MODULES_TO_INSTALL="$PHP_MODULES_TO_INSTALL $processCommandArguments_name"
2018-06-28 09:46:14 +02:00
fi
2018-04-11 17:39:10 +02:00
fi
shift
done
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
PHP_MODULES_TO_INSTALL="${PHP_MODULES_TO_INSTALL# }"
2018-04-11 17:39:10 +02:00
}
2020-10-18 15:20:16 +02:00
# Add a module that's required by another module
#
# Arguments:
# $1: module that requires another module
# $2: the required module
#
# Update:
# PHP_MODULES_TO_INSTALL
#
# Output:
# Nothing
checkRequiredModule() {
if ! stringInList "$1" "$PHP_MODULES_TO_INSTALL"; then
return
fi
2020-10-18 18:40:43 +02:00
if stringInList "$2" "$PHP_PREINSTALLED_MODULES"; then
2020-10-18 15:20:16 +02:00
return
fi
PHP_MODULES_TO_INSTALL="$(removeStringFromList "$1" "$PHP_MODULES_TO_INSTALL")"
if ! stringInList "$2" "$PHP_MODULES_TO_INSTALL"; then
PHP_MODULES_TO_INSTALL="$PHP_MODULES_TO_INSTALL $2"
PHP_MODULES_TO_INSTALL="${PHP_MODULES_TO_INSTALL# }"
fi
PHP_MODULES_TO_INSTALL="$PHP_MODULES_TO_INSTALL $1"
}
2019-10-11 16:01:21 +02:00
# Sort the modules to be installed, in order to fix dependencies
#
# Update:
# PHP_MODULES_TO_INSTALL
#
# Output:
# Nothing
2019-12-20 16:52:00 +01:00
sortModulesToInstall() {
2020-10-18 15:20:16 +02:00
# apcu_bc requires apcu
checkRequiredModule 'apcu_bc' 'apcu'
2021-03-06 19:34:12 +01:00
# http requires propro (for PHP < 8) and raphf
if test $PHP_MAJMIN_VERSION -le 704; then
checkRequiredModule 'http' 'propro'
fi
2020-10-18 15:20:16 +02:00
checkRequiredModule 'http' 'raphf'
2021-08-03 10:38:36 +02:00
# event requires sockets (for PHP <= 5.6)
if test $PHP_MAJMIN_VERSION -le 506; then
checkRequiredModule event sockets
fi
# Some module installation may use sockets if available: move it before other modules
if stringInList 'sockets' "$PHP_MODULES_TO_INSTALL"; then
PHP_MODULES_TO_INSTALL="$(removeStringFromList 'sockets' "$PHP_MODULES_TO_INSTALL")"
PHP_MODULES_TO_INSTALL="sockets $PHP_MODULES_TO_INSTALL"
PHP_MODULES_TO_INSTALL="${PHP_MODULES_TO_INSTALL% }"
fi
2020-10-18 15:20:16 +02:00
# Some module installation may use igbinary if available: move it before other modules
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
if stringInList 'igbinary' "$PHP_MODULES_TO_INSTALL"; then
PHP_MODULES_TO_INSTALL="$(removeStringFromList 'igbinary' "$PHP_MODULES_TO_INSTALL")"
2020-10-18 15:20:16 +02:00
PHP_MODULES_TO_INSTALL="igbinary $PHP_MODULES_TO_INSTALL"
PHP_MODULES_TO_INSTALL="${PHP_MODULES_TO_INSTALL% }"
2019-10-11 16:01:21 +02:00
fi
2020-10-18 15:20:16 +02:00
# Some module installation may use msgpack if available: move it before other modules
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
if stringInList 'msgpack' "$PHP_MODULES_TO_INSTALL"; then
PHP_MODULES_TO_INSTALL="$(removeStringFromList 'msgpack' "$PHP_MODULES_TO_INSTALL")"
2020-10-18 15:20:16 +02:00
PHP_MODULES_TO_INSTALL="msgpack $PHP_MODULES_TO_INSTALL"
PHP_MODULES_TO_INSTALL="${PHP_MODULES_TO_INSTALL% }"
2019-12-24 12:53:48 +01:00
fi
2020-12-11 19:16:46 +01:00
# Some module installation may use socket if available: move it before other modules
if stringInList 'socket' "$PHP_MODULES_TO_INSTALL"; then
PHP_MODULES_TO_INSTALL="$(removeStringFromList 'socket' "$PHP_MODULES_TO_INSTALL")"
PHP_MODULES_TO_INSTALL="socket $PHP_MODULES_TO_INSTALL"
PHP_MODULES_TO_INSTALL="${PHP_MODULES_TO_INSTALL% }"
fi
2022-01-12 12:36:36 +01:00
# Some module installation may use apcu if available: move it before other modules
if stringInList 'apcu' "$PHP_MODULES_TO_INSTALL"; then
PHP_MODULES_TO_INSTALL="$(removeStringFromList 'apcu' "$PHP_MODULES_TO_INSTALL")"
PHP_MODULES_TO_INSTALL="apcu $PHP_MODULES_TO_INSTALL"
PHP_MODULES_TO_INSTALL="${PHP_MODULES_TO_INSTALL% }"
fi
2020-12-16 11:34:30 +01:00
# In any case, first of all, we need to install composer
if stringInList '@composer' "$PHP_MODULES_TO_INSTALL"; then
PHP_MODULES_TO_INSTALL="$(removeStringFromList '@composer' "$PHP_MODULES_TO_INSTALL")"
PHP_MODULES_TO_INSTALL="@composer $PHP_MODULES_TO_INSTALL"
PHP_MODULES_TO_INSTALL="${PHP_MODULES_TO_INSTALL% }"
fi
2019-10-11 16:01:21 +02:00
}
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
# Get the required APT/APK packages for a specific PHP version and for the list of module handles
2018-04-11 17:39:10 +02:00
#
# Arguments:
# $@: the PHP module handles
#
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
# Set:
2021-07-02 14:33:43 +02:00
# PACKAGES_PERSISTENT_NEW the list of packages required at runtume that must be installed
# PACKAGES_PERSISTENT_PRE the list of packages required at runtume that are already installed
# PACKAGES_VOLATILE the list of packages required at compile time that must be installed
# PACKAGES_PREVIOUS the list of packages (with their version) that are installed right now (calculated only on Debian and only if PACKAGES_PERSISTENT_NEW or PACKAGES_VOLATILE are not empty)
2019-12-20 16:52:00 +01:00
buildRequiredPackageLists() {
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_persistent=''
buildRequiredPackageLists_volatile=''
2020-02-28 11:09:15 +01:00
case "$DISTRO" in
2020-02-15 21:40:54 +01:00
alpine)
2022-03-25 09:29:15 +01:00
apk update
;;
debian)
DEBIAN_FRONTEND=noninteractive apt-get update -q
2020-02-15 21:40:54 +01:00
;;
esac
2020-02-28 11:09:15 +01:00
case "$DISTRO_VERSION" in
2019-12-23 10:31:24 +01:00
alpine@*)
2020-12-16 11:34:30 +01:00
if test $# -gt 1 || test "${1:-}" != '@composer'; then
2020-12-16 10:04:45 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $PHPIZE_DEPS"
2020-12-16 11:34:30 +01:00
fi
2019-12-20 15:28:39 +01:00
if test -z "$(apk info 2>/dev/null | grep -E ^libssl)"; then
buildRequiredPackageLists_libssl='libssl1.0'
2021-06-30 15:43:35 +02:00
elif test -z "$(apk info 2>/dev/null | grep -E '^libressl.*-libtls')" && test -z "$(apk info 2>/dev/null | grep -E '^libressl.*-libssl')" && test -z "$(apk info 2>/dev/null | grep -E '^libretls-')"; then
2020-02-14 14:38:07 +01:00
buildRequiredPackageLists_libssl=$(apk search -q libressl*-libtls)
2019-12-20 15:28:39 +01:00
else
buildRequiredPackageLists_libssl=''
fi
2021-06-30 15:43:35 +02:00
if test $DISTRO_MAJMIN_VERSION -le 313; then
buildRequiredPackageLists_libssldev='libressl-dev'
else
buildRequiredPackageLists_libssldev='libretls-dev'
fi
2019-12-19 16:17:29 +01:00
;;
2019-12-23 10:31:24 +01:00
debian@9)
2019-12-23 12:45:53 +01:00
buildRequiredPackageLists_libssldev='libssl1.0-dev'
2019-12-23 10:31:24 +01:00
;;
debian@*)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_libssldev='^libssl([0-9]+(\.[0-9]+)*)?-dev$'
2019-12-19 16:17:29 +01:00
;;
esac
2020-12-16 10:04:45 +01:00
if test $USE_PICKLE -gt 1; then
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile git"
fi
2019-10-07 17:54:18 +02:00
while :; do
2020-07-27 14:30:14 +02:00
if test $# -lt 1; then
2018-04-11 17:39:10 +02:00
break
fi
2020-02-28 11:09:15 +01:00
case "$1@$DISTRO" in
2021-08-06 10:20:10 +02:00
@composer@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent unzip"
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
amqp@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent rabbitmq-c"
2019-12-19 14:02:02 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile rabbitmq-c-dev"
2018-10-16 23:06:22 +02:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
amqp@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^librabbitmq[0-9]*$"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile librabbitmq-dev libssh-dev"
2018-04-11 17:39:10 +02:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
bz2@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libbz2"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile bzip2-dev"
;;
bz2@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libbz2-dev"
2018-04-11 17:39:10 +02:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
cmark@alpine)
2019-12-19 14:02:02 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile cmake"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
;;
cmark@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile cmake"
;;
2022-06-11 17:25:45 +02:00
ddtrace@alpine)
2022-06-11 18:27:36 +02:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile curl-dev"
2022-06-11 17:25:45 +02:00
;;
ddtrace@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent curl"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libcurl4-openssl-dev"
;;
2020-12-16 18:34:27 +01:00
dba@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent db"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile db-dev"
;;
dba@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile ^libdb5\.3-dev$"
2020-12-16 18:34:27 +01:00
if test $PHP_MAJMIN_VERSION -le 505; then
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile patch"
fi
;;
2020-02-04 09:54:02 +01:00
decimal@debian)
2021-08-24 16:34:14 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libmpdec[0-9]*$"
2020-02-04 09:54:02 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libmpdec-dev"
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
enchant@alpine)
2020-09-18 20:02:07 +02:00
if test $DISTRO_MAJMIN_VERSION -ge 312; then
2021-08-24 15:34:31 +02:00
if test $PHP_MAJMIN_VERSION -ge 800; then
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent enchant2"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile enchant2-dev"
else
# The system provides libenchant2, supported since PHP 8.0: we need to build libenchant1 on our own
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent glib aspell-libs libhunspell"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile glib-dev aspell-dev hunspell-dev"
fi
2020-09-18 20:02:07 +02:00
else
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent enchant"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile enchant-dev"
fi
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
;;
enchant@debian)
2021-08-24 15:34:31 +02:00
if test $DISTRO_VERSION_NUMBER -ge 11; then
if test $PHP_MAJMIN_VERSION -ge 800; then
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libenchant-2-2"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libenchant-2-dev"
else
# The system provides libenchant2, supported since PHP 8.0: we need to build libenchant1 on our own
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent aspell-en libhunspell-1.7-0"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libglib2.0-dev libaspell-dev libhunspell-dev"
fi
else
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libenchant1c2a"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libenchant-dev"
fi
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
;;
2021-08-03 10:38:36 +02:00
event@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libevent $buildRequiredPackageLists_libssl"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libevent-dev $buildRequiredPackageLists_libssldev"
;;
event@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libevent[0-9\.\-]*$ ^libevent-openssl[0-9\.\-]*$ ^libevent-extra[0-9\.\-]*$ ^libevent-pthreads[0-9\.\-]*$"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libevent-dev $buildRequiredPackageLists_libssldev"
;;
2020-02-17 13:29:17 +01:00
ffi@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libffi"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libffi-dev"
;;
ffi@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libffi-dev"
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
gd@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetype libjpeg-turbo libpng libxpm"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile freetype-dev libjpeg-turbo-dev libpng-dev libxpm-dev"
2020-07-27 14:30:14 +02:00
if test $PHP_MAJMIN_VERSION -le 506; then
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libvpx"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libvpx-dev"
else
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libwebp"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libwebp-dev"
2021-09-29 09:31:34 +02:00
if test $PHP_MAJMIN_VERSION -ge 801; then
if isLibaomInstalled && isLibdav1dInstalled && isLibyuvInstalled && isLibavifInstalled; then
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++"
else
case "${IPE_GD_WITHOUTAVIF:-}" in
1 | y* | Y*) ;;
*)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile cmake nasm meson"
;;
esac
fi
fi
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
fi
2018-04-11 17:39:10 +02:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
gd@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libfreetype6 libjpeg62-turbo ^libpng[0-9]+-[0-9]+$ libxpm4"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libfreetype6-dev libjpeg62-turbo-dev libpng-dev libxpm-dev"
2020-07-27 14:30:14 +02:00
if test $PHP_MAJMIN_VERSION -le 506; then
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libvpx[0-9]+$"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libvpx-dev"
2018-04-11 17:39:10 +02:00
else
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libwebp[0-9]+$"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libwebp-dev"
2021-09-29 09:31:34 +02:00
if test $PHP_MAJMIN_VERSION -ge 801; then
if ! isLibaomInstalled || ! isLibdav1dInstalled || ! isLibyuvInstalled || ! isLibavifInstalled; then
case "${IPE_GD_WITHOUTAVIF:-}" in
1 | y* | Y*) ;;
*)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile cmake nasm meson"
;;
esac
fi
fi
2018-04-11 17:39:10 +02:00
fi
;;
2021-01-17 14:43:09 +01:00
gearman@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++ libuuid"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile boost-dev gperf libmemcached-dev libevent-dev util-linux-dev"
;;
gearman@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libgearman[0-9]*$"
2021-01-17 14:43:09 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libgearman-dev"
;;
2021-02-15 08:36:15 +01:00
geoip@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent geoip"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile geoip-dev"
;;
geoip@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libgeoip1[0-9]*$"
2021-02-15 08:36:15 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libgeoip-dev"
;;
2022-03-24 10:18:15 +01:00
geos@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent geos-dev"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile geos"
;;
geos@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libgeos-c1(v[0-9]*)?$"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libgeos-dev"
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
gettext@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libintl"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile gettext-dev"
2018-04-11 17:39:10 +02:00
;;
2020-01-07 11:24:42 +01:00
gmagick@alpine)
2021-02-12 09:15:19 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent graphicsmagick libgomp"
2020-01-07 11:24:42 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile graphicsmagick-dev libtool"
;;
gmagick@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libgraphicsmagick(-q16-)?[0-9]*$"
2020-01-07 11:24:42 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libgraphicsmagick1-dev"
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
gmp@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent gmp"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile gmp-dev"
2018-04-11 17:39:10 +02:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
gmp@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libgmp-dev"
2018-04-11 17:39:10 +02:00
;;
2020-12-14 17:44:19 +01:00
gnupg@alpine)
2021-02-11 16:50:10 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent gpgme"
2020-12-14 17:44:19 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile gpgme-dev"
;;
gnupg@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libgpgme[0-9]*$"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile ^libgpgme[0-9]*-dev$"
2020-12-14 17:44:19 +01:00
;;
2019-12-16 14:47:29 +01:00
grpc@alpine)
2019-12-16 17:04:01 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++"
2020-02-15 21:37:12 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib-dev linux-headers"
2019-12-16 14:47:29 +01:00
;;
grpc@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib1g-dev"
;;
2019-12-24 12:53:48 +01:00
http@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libevent"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib-dev curl-dev libevent-dev"
2020-07-27 14:30:14 +02:00
if test $PHP_MAJMIN_VERSION -le 506; then
2019-12-24 12:53:48 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libidn"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libidn-dev"
else
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent icu-libs libidn"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile icu-dev libidn-dev"
fi
;;
http@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libcurl3-gnutls ^libevent[0-9\.\-]*$"
2019-12-24 12:53:48 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib1g-dev libgnutls28-dev libcurl4-gnutls-dev libevent-dev"
2020-07-27 14:30:14 +02:00
if test $PHP_MAJMIN_VERSION -le 506; then
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile ^libidn1[0-9+]-dev$"
2019-12-24 12:53:48 +01:00
else
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libicu[0-9]+$ ^libidn2-[0-9+]$"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libicu-dev ^libidn2-[0-9+]-dev$"
2019-12-24 12:53:48 +01:00
fi
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
imagick@alpine)
2021-06-18 15:25:14 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent imagemagick libgomp"
2019-12-19 14:02:02 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile imagemagick-dev"
2018-04-11 17:39:10 +02:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
imagick@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libmagickwand-6.q16-[0-9]+$ ^libmagickcore-6.q16-[0-9]+-extra$"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libmagickwand-dev"
2018-04-11 17:39:10 +02:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
imap@alpine)
2019-12-20 15:28:39 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent c-client $buildRequiredPackageLists_libssl"
2021-06-30 15:43:35 +02:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile krb5-dev imap-dev $buildRequiredPackageLists_libssldev"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
;;
imap@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libc-client2007e"
2020-01-22 13:40:40 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libkrb5-dev"
2020-02-28 11:09:15 +01:00
case "$DISTRO_VERSION" in
2020-01-22 13:40:40 +01:00
debian@9)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev comerr-dev krb5-multidev libc-client2007e libgssrpc4 libkadm5clnt-mit11 libkadm5srv-mit11 libkdb5-8 libpam0g-dev libssl-doc mlock"
;;
*)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libc-client-dev"
;;
esac
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
;;
2019-12-11 11:40:13 +01:00
interbase@alpine)
2019-12-19 14:02:02 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile icu-dev ncurses-dev"
2019-12-11 11:40:13 +01:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
interbase@debian)
2019-12-11 11:40:13 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libfbclient2"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile firebird-dev libib-util"
;;
2019-12-11 12:29:48 +01:00
intl@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent icu-libs"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile icu-dev"
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
intl@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libicu[0-9]+$"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libicu-dev"
;;
2022-05-13 17:18:20 +02:00
ion@alpine)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile cmake git"
;;
ion@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile cmake git"
;;
2019-12-11 12:29:48 +01:00
ldap@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libldap"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile openldap-dev"
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
ldap@debian)
2021-12-06 17:36:45 +01:00
if test $DISTRO_VERSION_NUMBER -ge 9; then
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libldap-common"
fi
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libldap2-dev"
;;
2022-03-24 08:58:10 +01:00
luasandbox@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent lua5.1-libs"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile lua5.1-dev"
;;
luasandbox@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent liblua5.1-0"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile liblua5.1-0-dev"
;;
2020-12-10 18:06:36 +01:00
maxminddb@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libmaxminddb"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libmaxminddb-dev"
;;
maxminddb@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libmaxminddb[0-9]*$"
2020-12-10 18:06:36 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libmaxminddb-dev"
;;
2022-03-23 10:55:44 +01:00
memprof@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent judy"
2022-06-13 09:41:57 +02:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile judy-dev bsd-compat-headers"
2022-03-23 10:55:44 +01:00
;;
memprof@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libjudydebian1"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libjudy-dev"
;;
2019-12-11 12:29:48 +01:00
mcrypt@alpine)
2019-12-19 14:02:02 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libmcrypt"
2019-12-11 12:29:48 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libmcrypt-dev"
;;
mcrypt@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libmcrypt4"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libmcrypt-dev"
;;
memcache@alpine)
2019-12-19 14:02:02 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib-dev"
2019-12-11 12:29:48 +01:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
memcache@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib1g-dev"
2018-04-11 17:39:10 +02:00
;;
2019-12-11 12:29:48 +01:00
memcached@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libmemcached-libs"
2019-12-19 14:02:02 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libmemcached-dev zlib-dev"
2019-12-11 12:29:48 +01:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
memcached@debian)
2019-12-11 12:29:48 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libmemcachedutil2"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libmemcached-dev zlib1g-dev"
2018-04-11 17:39:10 +02:00
;;
2019-12-12 12:41:49 +01:00
mongo@alpine)
2019-12-20 15:28:39 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libsasl $buildRequiredPackageLists_libssl"
2021-06-30 15:43:35 +02:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev cyrus-sasl-dev"
2019-12-12 12:41:49 +01:00
;;
mongo@debian)
2019-12-19 16:17:29 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev libsasl2-dev"
2019-12-12 12:41:49 +01:00
;;
mongodb@alpine)
2019-12-20 15:28:39 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent icu-libs libsasl $buildRequiredPackageLists_libssl snappy"
2021-06-30 15:43:35 +02:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile icu-dev cyrus-sasl-dev snappy-dev $buildRequiredPackageLists_libssldev zlib-dev"
2019-12-12 12:41:49 +01:00
;;
mongodb@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libsnappy[0-9]+(v[0-9]+)?$ ^libicu[0-9]+$"
2019-12-19 16:17:29 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libicu-dev libsasl2-dev libsnappy-dev $buildRequiredPackageLists_libssldev zlib1g-dev"
2019-12-12 12:41:49 +01:00
;;
2020-11-25 21:52:49 +01:00
mosquitto@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent mosquitto-libs"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile mosquitto-dev"
;;
mosquitto@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libmosquitto1"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libmosquitto-dev"
;;
2019-12-11 12:57:53 +01:00
mssql@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetds"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile freetds-dev"
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
mssql@debian)
2019-12-11 12:57:53 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libsybdb5"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile freetds-dev"
2018-04-11 17:39:10 +02:00
;;
2020-02-16 18:28:30 +01:00
oauth@alpine)
2020-07-27 14:30:14 +02:00
if test $PHP_MAJMIN_VERSION -ge 700; then
2020-02-16 18:28:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile pcre-dev"
fi
;;
oauth@debian)
2020-07-27 14:30:14 +02:00
if test $PHP_MAJMIN_VERSION -ge 700; then
2020-02-16 18:28:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libpcre3-dev"
fi
;;
2020-12-28 10:51:30 +01:00
oci8@alpine | pdo_oci@alpine)
2020-12-14 14:19:14 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libaio libc6-compat libnsl"
if test $DISTRO_MAJMIN_VERSION -le 307; then
# The unzip tool of Alpine 3.7 can't extract symlinks from ZIP archives: let's use bsdtar instead
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libarchive-tools"
fi
2020-12-11 15:04:08 +01:00
;;
2020-12-28 10:51:30 +01:00
oci8@debian | pdo_oci@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libaio[0-9]*$"
2020-12-14 14:19:14 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile unzip"
2020-12-11 15:04:08 +01:00
;;
2021-03-14 18:14:34 +01:00
odbc@alpine | pdo_odbc@alpine)
2021-01-03 14:39:54 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent unixodbc"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile unixodbc-dev"
;;
2021-03-14 18:14:34 +01:00
odbc@debian | pdo_odbc@debian)
2021-01-03 14:39:54 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libodbc1"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile unixodbc-dev"
;;
2021-11-05 23:14:23 +01:00
openswoole@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent postgresql-libs libstdc++ $buildRequiredPackageLists_libssl"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile curl-dev postgresql-dev linux-headers $buildRequiredPackageLists_libssldev"
;;
openswoole@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libcurl3-gnutls libpq5"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev libcurl4-gnutls-dev libpq-dev"
;;
2022-04-21 16:16:52 +02:00
parle@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++"
;;
2019-12-11 14:23:15 +01:00
pdo_dblib@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetds"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile freetds-dev"
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
pdo_dblib@debian)
2019-12-11 14:23:15 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libsybdb5"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile freetds-dev"
2018-04-11 17:39:10 +02:00
;;
2019-12-11 14:23:15 +01:00
pdo_firebird@alpine)
2019-12-19 14:02:02 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile icu-dev ncurses-dev"
2019-12-11 14:23:15 +01:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
pdo_firebird@debian)
2019-12-11 14:23:15 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libfbclient2"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile firebird-dev libib-util"
2018-04-11 17:39:10 +02:00
;;
2021-03-14 18:16:06 +01:00
pgsql@alpine | pdo_pgsql@alpine)
2019-12-11 14:23:15 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent postgresql-libs"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile postgresql-dev"
;;
2021-03-14 18:16:06 +01:00
pgsql@debian | pdo_pgsql@debian)
2019-12-11 15:04:19 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libpq5"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libpq-dev"
2018-04-11 17:39:10 +02:00
;;
2022-05-25 16:47:23 +02:00
php_trie@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++"
;;
2019-12-11 15:04:19 +01:00
pspell@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent aspell-libs"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile aspell-dev"
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
pspell@debian)
2019-12-11 15:04:19 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libaspell15"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libpspell-dev"
2018-04-11 17:39:10 +02:00
;;
2019-12-18 15:13:56 +01:00
rdkafka@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent librdkafka"
2019-12-19 14:02:02 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile librdkafka-dev"
2019-12-18 15:13:56 +01:00
;;
rdkafka@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^librdkafka\+*[0-9]*$"
2019-12-18 15:13:56 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile librdkafka-dev"
;;
2019-12-11 15:04:19 +01:00
recode@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent recode"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile recode-dev"
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
recode@debian)
2019-12-11 15:04:19 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent librecode0"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile librecode-dev"
2018-04-11 17:39:10 +02:00
;;
2019-12-23 18:09:22 +01:00
redis@alpine)
2020-07-27 14:30:14 +02:00
if test $PHP_MAJMIN_VERSION -ge 700; then
2020-02-28 11:09:15 +01:00
case "$DISTRO_VERSION" in
2019-12-23 18:09:22 +01:00
alpine@3.7)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent zstd"
;;
*)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent zstd-libs"
;;
esac
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zstd-dev"
fi
;;
redis@debian)
2020-07-27 14:30:14 +02:00
if test $PHP_MAJMIN_VERSION -ge 700; then
2020-02-28 11:09:15 +01:00
case "$DISTRO_VERSION" in
2019-12-23 18:09:22 +01:00
debian@8)
## There's no APT package for libzstd
;;
debian@9)
## libzstd is too old (available: 1.1.2, required: 1.3.0+)
;;
*)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libzstd[0-9]*$"
2019-12-23 18:09:22 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libzstd-dev"
;;
esac
fi
;;
2021-01-03 15:05:52 +01:00
smbclient@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libsmbclient"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile samba-dev"
;;
smbclient@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libsmbclient"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libsmbclient-dev"
;;
2019-12-11 15:38:27 +01:00
snmp@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent net-snmp-libs"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile net-snmp-dev"
2018-04-11 17:39:10 +02:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
snmp@debian)
2019-12-11 15:38:27 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent snmp"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libsnmp-dev"
;;
2021-01-03 14:39:54 +01:00
snuffleupagus@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent pcre"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile pcre-dev"
;;
snuffleupagus@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libpcre3-dev"
;;
2019-12-11 15:38:27 +01:00
soap@alpine)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libxml2-dev"
2018-04-11 17:39:10 +02:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
soap@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libxml2-dev"
2018-04-11 17:39:10 +02:00
;;
2022-06-11 17:10:23 +02:00
sockets@alpine)
if test $PHP_MAJMIN_VERSION -ge 802; then
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile linux-headers"
fi
;;
2022-04-05 14:37:14 +02:00
sodium@alpine | libsodium@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libsodium"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libsodium-dev"
;;
sodium@debian | libsodium@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libsodium[0-9]*$"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libsodium-dev"
;;
2019-12-11 15:38:27 +01:00
solr@alpine)
2019-12-19 14:02:02 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile curl-dev libxml2-dev"
2019-12-11 15:38:27 +01:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
solr@debian)
2019-12-11 15:38:27 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libcurl3-gnutls"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libcurl4-gnutls-dev libxml2-dev"
2018-04-11 17:39:10 +02:00
;;
2021-08-07 19:15:58 +02:00
spx@alpine)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib-dev"
;;
spx@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib1g-dev"
;;
2021-01-20 10:53:51 +01:00
sqlsrv@alpine | pdo_sqlsrv@alpine)
2019-12-11 15:38:27 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++ unixodbc"
2019-12-19 14:02:02 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile unixodbc-dev"
2019-12-11 15:38:27 +01:00
;;
2021-01-20 10:53:51 +01:00
sqlsrv@debian | pdo_sqlsrv@debian)
2019-12-11 15:38:27 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent unixodbc"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile unixodbc-dev"
2021-01-20 10:53:51 +01:00
if ! isMicrosoftSqlServerODBCInstalled; then
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile gnupg apt-transport-https"
fi
2018-04-11 17:39:10 +02:00
;;
2019-12-11 15:38:27 +01:00
ssh2@alpine)
2019-12-19 14:02:02 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libssh2"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libssh2-dev"
2019-12-11 15:38:27 +01:00
;;
ssh2@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libssh2-1-dev"
;;
2021-07-15 09:47:39 +02:00
stomp@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent $buildRequiredPackageLists_libssl"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev"
;;
stomp@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev"
;;
2020-12-11 19:16:46 +01:00
swoole@alpine)
2021-01-31 10:47:52 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent postgresql-libs libstdc++ $buildRequiredPackageLists_libssl"
2021-06-30 15:43:35 +02:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile curl-dev postgresql-dev linux-headers $buildRequiredPackageLists_libssldev"
2020-12-11 19:16:46 +01:00
;;
swoole@debian)
2021-01-13 09:53:34 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libcurl3-gnutls libpq5"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev libcurl4-gnutls-dev libpq-dev"
2020-12-11 19:16:46 +01:00
;;
2019-12-11 15:58:47 +01:00
sybase_ct@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetds"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile freetds-dev"
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
sybase_ct@debian)
2019-12-11 15:58:47 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libct4"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile freetds-dev"
2018-04-11 17:39:10 +02:00
;;
2020-03-02 10:43:25 +01:00
tdlib@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++ $buildRequiredPackageLists_libssl"
2021-06-30 15:43:35 +02:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile git cmake gperf zlib-dev $buildRequiredPackageLists_libssldev linux-headers readline-dev"
2020-03-02 10:43:25 +01:00
;;
tdlib@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile git cmake gperf zlib1g-dev $buildRequiredPackageLists_libssldev"
;;
2021-02-23 18:25:07 +01:00
tensor@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent lapack libexecinfo openblas"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile lapack-dev libexecinfo-dev openblas-dev"
if test $DISTRO_MAJMIN_VERSION -le 310; then
if ! stringInList --force-overwrite "$IPE_APK_FLAGS"; then
IPE_APK_FLAGS="$IPE_APK_FLAGS --force-overwrite"
fi
fi
;;
tensor@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent liblapacke libopenblas-base"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile liblapack-dev libopenblas-dev liblapacke-dev"
2021-08-25 12:03:53 +02:00
if test $DISTRO_VERSION_NUMBER -ge 11; then
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent gfortran-10"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libgfortran-10-dev"
elif test $DISTRO_VERSION_NUMBER -ge 10; then
2021-02-23 18:25:07 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent gfortran-8"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libgfortran-8-dev"
fi
;;
2019-12-11 15:58:47 +01:00
tidy@alpine)
2021-12-05 16:55:37 +01:00
if test $DISTRO_MAJMIN_VERSION -ge 315; then
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent tidyhtml"
else
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent tidyhtml-libs"
fi
2019-12-11 15:58:47 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile tidyhtml-dev"
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
tidy@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libtidy-?[0-9][0-9.\-]*(deb[0-9])?$"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libtidy-dev"
2018-04-11 17:39:10 +02:00
;;
Continue implementing Alpine support
Test: cmark, tidy, uopz, uuid, wddx, xdebug, xmlrpc, xsl, yaml, zip, -STOP-
2019-12-11 17:11:55 +01:00
uuid@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libuuid"
2019-12-19 14:02:02 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile util-linux-dev"
Continue implementing Alpine support
Test: cmark, tidy, uopz, uuid, wddx, xdebug, xmlrpc, xsl, yaml, zip, -STOP-
2019-12-11 17:11:55 +01:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
uuid@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile uuid-dev"
2018-04-11 17:39:10 +02:00
;;
2021-05-05 16:34:44 +02:00
vips@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent vips"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile vips-dev"
;;
vips@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libvips"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libvips-dev"
;;
Continue implementing Alpine support
Test: cmark, tidy, uopz, uuid, wddx, xdebug, xmlrpc, xsl, yaml, zip, -STOP-
2019-12-11 17:11:55 +01:00
wddx@alpine)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libxml2-dev"
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
wddx@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libxml2-dev"
2018-04-11 17:39:10 +02:00
;;
2021-01-03 14:39:54 +01:00
xlswriter@alpine)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib-dev"
;;
xlswriter@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib1g-dev"
;;
2021-07-10 08:59:08 +02:00
xmldiff@alpine)
2021-07-11 08:31:03 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++"
2021-07-10 08:59:08 +02:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libxml2-dev"
;;
xmldiff@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libxml2-dev"
;;
Continue implementing Alpine support
Test: cmark, tidy, uopz, uuid, wddx, xdebug, xmlrpc, xsl, yaml, zip, -STOP-
2019-12-11 17:11:55 +01:00
xmlrpc@alpine)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libxml2-dev"
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
xmlrpc@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libxml2-dev"
2018-04-11 17:39:10 +02:00
;;
Continue implementing Alpine support
Test: cmark, tidy, uopz, uuid, wddx, xdebug, xmlrpc, xsl, yaml, zip, -STOP-
2019-12-11 17:11:55 +01:00
xsl@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libxslt"
2019-12-11 17:34:32 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libxslt-dev libgcrypt-dev"
Continue implementing Alpine support
Test: cmark, tidy, uopz, uuid, wddx, xdebug, xmlrpc, xsl, yaml, zip, -STOP-
2019-12-11 17:11:55 +01:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
xsl@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libxslt1\.1$"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libxslt-dev"
2018-04-11 17:39:10 +02:00
;;
Continue implementing Alpine support
Test: cmark, tidy, uopz, uuid, wddx, xdebug, xmlrpc, xsl, yaml, zip, -STOP-
2019-12-11 17:11:55 +01:00
yaml@alpine)
2019-12-19 14:02:02 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent yaml"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile yaml-dev"
Continue implementing Alpine support
Test: cmark, tidy, uopz, uuid, wddx, xdebug, xmlrpc, xsl, yaml, zip, -STOP-
2019-12-11 17:11:55 +01:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
yaml@debian)
Continue implementing Alpine support
Test: cmark, tidy, uopz, uuid, wddx, xdebug, xmlrpc, xsl, yaml, zip, -STOP-
2019-12-11 17:11:55 +01:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libyaml-0-2"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libyaml-dev"
2018-04-11 17:39:10 +02:00
;;
2021-01-05 15:16:27 +01:00
yar@alpine)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile curl-dev"
;;
yar@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libcurl3-gnutls"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libcurl4-gnutls-dev"
;;
Continue implementing Alpine support
Test: cmark, tidy, uopz, uuid, wddx, xdebug, xmlrpc, xsl, yaml, zip, -STOP-
2019-12-11 17:11:55 +01:00
zip@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libzip"
2021-06-30 15:43:35 +02:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile cmake gnutls-dev libzip-dev $buildRequiredPackageLists_libssldev zlib-dev"
Continue implementing Alpine support
Test: cmark, tidy, uopz, uuid, wddx, xdebug, xmlrpc, xsl, yaml, zip, -STOP-
2019-12-11 17:11:55 +01:00
;;
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
zip@debian)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libzip[0-9]$"
2019-12-23 10:31:24 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile cmake gnutls-dev $buildRequiredPackageLists_libssldev libzip-dev libbz2-dev zlib1g-dev"
2020-02-28 11:09:15 +01:00
case "$DISTRO_VERSION" in
2019-12-23 10:31:24 +01:00
debian@8)
# Debian Jessie doesn't seem to provide libmbedtls
;;
*)
Fix apt package regexes on Debian
Test: amqp,dba,gd,gearman,geoip,gmagick,gnupg,http,imagick,imap,intl,maxminddb,mongo,mongodb,oci8,pdo_oci,rdkafka,redis,swoole,tidy,xls,zip
2021-07-02 09:41:31 +02:00
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libmbedtls[0-9]*$"
2019-12-23 10:31:24 +01:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libmbedtls-dev"
;;
esac
2018-04-11 17:39:10 +02:00
;;
2020-12-07 16:25:42 +01:00
zookeeper@alpine)
if ! test -f /usr/local/include/zookeeper/zookeeper.h; then
2021-06-30 10:27:13 +02:00
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile maven automake libtool openjdk8"
2020-12-07 16:25:42 +01:00
fi
;;
2020-07-27 16:50:21 +02:00
zookeeper@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libzookeeper-mt2"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libzookeeper-mt-dev"
;;
2018-04-11 17:39:10 +02:00
esac
2020-07-27 14:30:14 +02:00
shift
2018-04-11 17:39:10 +02:00
done
2021-07-02 14:33:43 +02:00
PACKAGES_PERSISTENT_NEW=''
PACKAGES_PERSISTENT_PRE=''
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
PACKAGES_VOLATILE=''
2020-01-23 14:50:55 +01:00
PACKAGES_PREVIOUS=''
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
if test -z "$buildRequiredPackageLists_persistent$buildRequiredPackageLists_volatile"; then
2019-12-23 11:50:42 +01:00
return
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
fi
if test -n "$buildRequiredPackageLists_persistent"; then
2021-07-02 14:33:43 +02:00
PACKAGES_PERSISTENT_NEW="$(expandPackagesToBeInstalled $buildRequiredPackageLists_persistent)"
2019-12-23 12:40:28 +01:00
if test -s "$IPE_ERRFLAG_FILE"; then
2019-12-23 08:55:33 +01:00
exit 1
fi
2021-07-02 14:33:43 +02:00
resetIFS
for buildRequiredPackageLists_package in $buildRequiredPackageLists_persistent; do
buildRequiredPackageLists_package="$(expandInstalledSystemPackageName "$buildRequiredPackageLists_package")"
if test -n "$buildRequiredPackageLists_package"; then
PACKAGES_PERSISTENT_PRE="$PACKAGES_PERSISTENT_PRE $buildRequiredPackageLists_package"
fi
done
PACKAGES_PERSISTENT_PRE="${PACKAGES_PERSISTENT_PRE# }"
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
fi
if test -n "$buildRequiredPackageLists_volatile"; then
2019-12-23 08:55:33 +01:00
buildRequiredPackageLists_packages="$(expandPackagesToBeInstalled $buildRequiredPackageLists_volatile)"
2019-12-23 12:40:28 +01:00
if test -s "$IPE_ERRFLAG_FILE"; then
2019-12-23 08:55:33 +01:00
exit 1
fi
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
resetIFS
2019-12-23 08:55:33 +01:00
for buildRequiredPackageLists_package in $buildRequiredPackageLists_packages; do
2021-07-02 14:33:43 +02:00
if ! stringInList "$buildRequiredPackageLists_package" "$PACKAGES_PERSISTENT_NEW"; then
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
PACKAGES_VOLATILE="$PACKAGES_VOLATILE $buildRequiredPackageLists_package"
fi
done
PACKAGES_VOLATILE="${PACKAGES_VOLATILE# }"
fi
2021-07-02 14:33:43 +02:00
if test -n "$PACKAGES_PERSISTENT_NEW$PACKAGES_VOLATILE"; then
2020-02-28 11:09:15 +01:00
case "$DISTRO" in
2020-01-23 14:50:55 +01:00
debian)
PACKAGES_PREVIOUS="$(dpkg --get-selections | grep -E '\sinstall$' | awk '{ print $1 }')"
;;
esac
fi
2018-04-11 17:39:10 +02:00
}
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
# Get the full list of APT/APK packages that will be installed, given the required packages
2018-06-28 09:46:14 +02:00
#
# Arguments:
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
# $1: the list of required APT/APK packages
2018-06-28 09:46:14 +02:00
#
# Output:
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
# Space-separated list of every APT/APK packages that will be installed
2019-12-20 16:52:00 +01:00
expandPackagesToBeInstalled() {
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
expandPackagesToBeInstalled_result=''
2020-02-28 11:09:15 +01:00
case "$DISTRO" in
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
alpine)
2019-12-19 15:59:08 +01:00
expandPackagesToBeInstalled_log="$(apk add --simulate $@ 2>&1 || printf '\nERROR: apk failed\n')"
2019-12-19 14:04:35 +01:00
if test -n "$(printf '%s' "$expandPackagesToBeInstalled_log" | grep -E '^ERROR:')"; then
2019-12-23 12:40:28 +01:00
printf 'FAILED TO LIST THE WHOLE PACKAGE LIST FOR\n' >&2
printf '%s ' "$@" >&2
printf '\n\nCOMMAND OUTPUT:\n%s\n' "$expandPackagesToBeInstalled_log" >&2
echo 'y' >"$IPE_ERRFLAG_FILE"
2019-12-19 14:04:35 +01:00
exit 1
fi
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
IFS='
2018-06-28 09:46:14 +02:00
'
2019-12-19 14:04:35 +01:00
for expandPackagesToBeInstalled_line in $expandPackagesToBeInstalled_log; do
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
if test -n "$(printf '%s' "$expandPackagesToBeInstalled_line" | grep -E '^\([0-9]*/[0-9]*) Installing ')"; then
expandPackagesToBeInstalled_result="$expandPackagesToBeInstalled_result $(printf '%s' "$expandPackagesToBeInstalled_line" | cut -d ' ' -f 3)"
fi
2018-06-28 09:46:14 +02:00
done
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
resetIFS
;;
debian)
2021-02-11 03:57:16 +01:00
expandPackagesToBeInstalled_log="$(DEBIAN_FRONTEND=noninteractive apt-get install -sy --no-install-recommends $@ 2>&1 || printf '\nE: apt-get failed\n')"
2019-12-19 14:04:35 +01:00
if test -n "$(printf '%s' "$expandPackagesToBeInstalled_log" | grep -E '^E:')"; then
2019-12-23 12:40:28 +01:00
printf 'FAILED TO LIST THE WHOLE PACKAGE LIST FOR\n' >&2
printf '%s ' "$@" >&2
printf '\n\nCOMMAND OUTPUT:\n%s\n' "$expandPackagesToBeInstalled_log" >&2
echo 'y' >"$IPE_ERRFLAG_FILE"
2019-12-19 14:04:35 +01:00
exit 1
fi
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
expandPackagesToBeInstalled_inNewPackages=0
IFS='
'
2019-12-19 14:04:35 +01:00
for expandPackagesToBeInstalled_line in $expandPackagesToBeInstalled_log; do
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
if test $expandPackagesToBeInstalled_inNewPackages -eq 0; then
if test "$expandPackagesToBeInstalled_line" = 'The following NEW packages will be installed:'; then
expandPackagesToBeInstalled_inNewPackages=1
fi
elif test "$expandPackagesToBeInstalled_line" = "${expandPackagesToBeInstalled_line# }"; then
break
else
resetIFS
for expandPackagesToBeInstalled_newPackage in $expandPackagesToBeInstalled_line; do
expandPackagesToBeInstalled_result="$expandPackagesToBeInstalled_result $expandPackagesToBeInstalled_newPackage"
done
IFS='
'
fi
done
resetIFS
;;
esac
printf '%s' "${expandPackagesToBeInstalled_result# }"
}
2021-07-02 14:33:43 +02:00
# Check if a system package is installed; if so we prints its name.
#
# Arguments:
# $1: the name of the package to be checked (regular expressions accepted: they must start with a ^)
expandInstalledSystemPackageName() {
if test "$1" = "${1#^}"; then
expandInstalledSystemPackageName_grepflags='-Fx'
else
expandInstalledSystemPackageName_grepflags='-E'
fi
case "$DISTRO" in
alpine)
apk info | grep $expandInstalledSystemPackageName_grepflags -- "$1" || test $? -eq 1
;;
debian)
dpkg --get-selections | grep -E '\sinstall$' | awk '{ print $1 }' | cut -d: -f1 | grep $expandInstalledSystemPackageName_grepflags -- "$1" || test $? -eq 1
;;
esac
}
2020-11-03 15:37:47 +01:00
# Retrieve the number of available cores (alternative to nproc if not available)
2021-07-02 14:33:43 +02:00
#
2020-11-03 15:37:47 +01:00
# Output:
# The number of processor cores available
getProcessorCount() {
if command -v nproc >/dev/null 2>&1; then
nproc
else
getProcessorCount_tmp=$(cat /proc/cpuinfo | grep -E '^processor\s*:\s*\d+$' | wc -l)
if test $getProcessorCount_tmp -ge 1; then
echo $getProcessorCount_tmp
else
echo 1
fi
fi
}
2020-11-10 16:54:39 +01:00
2020-12-14 16:43:43 +01:00
# Set these variables:
# - TARGET_TRIPLET the build target tripled (eg 'x86_64-linux-gnu', 'x86_64-alpine-linux-musl')
setTargetTriplet() {
TARGET_TRIPLET="$(gcc -print-multiarch 2>/dev/null || true)"
if test -z "$TARGET_TRIPLET"; then
TARGET_TRIPLET="$(gcc -dumpmachine)"
2020-11-10 16:54:39 +01:00
fi
}
Enable parallel compilation for many pecl extensions
Test: amqp, bcmath, bz2, calendar, exif, gd, gettext, grpc, imagick, intl, mysqli, opcache, pcntl, pdo_mysql, protobuf, redis, soap, sockets, tidy, xdebug, xsl, yaml, zip
2020-08-19 16:45:41 +02:00
# Retrieve the number of processors to be used when compiling an extension
#
# Arguments:
# $1: the handle of the PHP extension to be compiled
# Output:
# The number of processors to be used
getCompilationProcessorCount() {
case "$1" in
2021-03-14 21:53:55 +01:00
'')
# The above extensions don't support parallel compilation
echo 1
Enable parallel compilation for many pecl extensions
Test: amqp, bcmath, bz2, calendar, exif, gd, gettext, grpc, imagick, intl, mysqli, opcache, pcntl, pdo_mysql, protobuf, redis, soap, sockets, tidy, xdebug, xsl, yaml, zip
2020-08-19 16:45:41 +02:00
;;
*)
2021-03-14 21:53:55 +01:00
# All the other extensions support parallel compilation
getProcessorCount
Enable parallel compilation for many pecl extensions
Test: amqp, bcmath, bz2, calendar, exif, gd, gettext, grpc, imagick, intl, mysqli, opcache, pcntl, pdo_mysql, protobuf, redis, soap, sockets, tidy, xdebug, xsl, yaml, zip
2020-08-19 16:45:41 +02:00
;;
esac
}
2022-03-24 11:58:29 +01:00
# Get the full path of a PHP extension given its name.
#
# Arguments:
# $1: the name of the PHP extension
#
# Output:
# The absolute path of the PHP extension file (or nothing if the file can't be found)
getModuleFullPath() {
case "$1" in
2022-03-25 10:02:46 +01:00
apcu_bc)
getModuleFullPath_path="$PHP_EXTDIR/apc.so"
;;
2022-03-24 11:58:29 +01:00
*)
getModuleFullPath_path="$PHP_EXTDIR/$1.so"
;;
esac
2022-03-28 18:11:43 +02:00
if ! test -f "$getModuleFullPath_path"; then
printf 'Unable to find the file of the PHP extension "%s"\n' "$1" >&2
exit 1
2022-03-24 11:58:29 +01:00
fi
2022-03-28 18:11:43 +02:00
printf '%s' "$getModuleFullPath_path"
2022-03-24 11:58:29 +01:00
}
# Post-process a PHP module just compiled and installed in the PHP extension directory
#
# Arguments:
# $1: the name of the PHP extension
#
# Return:
# 0 (true): if suceeded
# non-zero (false): in case of errors
postProcessModule() {
postProcessModule_file="$(getModuleFullPath "$1")"
2022-03-25 10:20:09 +01:00
if test $PHP_DEBUGBUILD -ne 1; then
printf 'Removing symbols from %s... ' "$postProcessModule_file"
postProcessModule_preSize="$(stat -c %s "$postProcessModule_file")"
strip --strip-all "$postProcessModule_file"
postProcessModule_postSize="$(stat -c %s "$postProcessModule_file")"
printf 'done (%s bytes saved).\n' "$((postProcessModule_preSize - postProcessModule_postSize))"
fi
2022-03-24 11:58:29 +01:00
return $?
}
2022-03-28 18:11:43 +02:00
# Get the type of the php.ini entry to be used for a PHP extension
#
# Arguments:
# $1: the name of the PHP extension
#
# Output:
# zend_extension or extension
getModuleIniEntryType() {
case "$1" in
ioncube_loader | sourceguardian)
# On PHP 5.5, docker-php-ext-enable fails to detect that ionCube Loader and sourceguardian are Zend extensions
if test $PHP_MAJMIN_VERSION -le 505; then
printf 'zend_extension'
return 0
fi
;;
esac
getModuleIniEntryType_file="$(getModuleFullPath "$1")"
if readelf --wide --syms "$getModuleIniEntryType_file" | grep -Eq ' zend_extension_entry$'; then
printf 'zend_extension'
else
printf 'extension'
fi
}
# Create the contents of a PHP ini file that enables an extension
#
# Arguments:
# $1: the name of the PHP extension
# $3: additional php.ini configuration (optional)
#
# Output:
# The contents of the ini file
buildPhpExtensionIniContent() {
buildPhpExtensionIniContent_type="$(getModuleIniEntryType "$1")"
buildPhpExtensionIniContent_soFile="$(getModuleFullPath "$1")"
buildPhpExtensionIniContent_result="$(printf '%s=%s' "$buildPhpExtensionIniContent_type" "${buildPhpExtensionIniContent_soFile##$PHP_EXTDIR/}")"
if test -n "${2:-}"; then
buildPhpExtensionIniContent_result="$(printf '%s\n%s' "$buildPhpExtensionIniContent_result" "$2")"
fi
printf '%s' "$buildPhpExtensionIniContent_result"
}
2022-03-24 11:58:29 +01:00
# Check that a PHP module actually works (better to run this check before enabling the extension)
#
# Arguments:
# $1: the name of the PHP extension
2022-03-28 18:11:43 +02:00
# $2: base name (without path and extension) of additional php.ini configuration (optional)
# $3: additional php.ini configuration (optional)
2022-03-24 11:58:29 +01:00
#
# Return:
# 0 (true): if the string is in the list
# 1 (false): if the string is not in the list
checkModuleWorking() {
2022-03-28 18:11:43 +02:00
if test -n "${2:-}"; then
checkModuleWorking_iniFile="$PHP_INI_DIR/conf.d/$2--temp.ini"
2022-03-24 11:58:29 +01:00
else
2022-03-28 18:11:43 +02:00
checkModuleWorking_iniFile="$PHP_INI_DIR/conf.d/docker-php-ext-$1--temp.ini"
2022-03-24 11:58:29 +01:00
fi
2022-03-28 18:11:43 +02:00
checkModuleWorking_iniContent="$(buildPhpExtensionIniContent "$1" "${3:-}")"
printf 'Check if the %s module can be loaded... ' "$1"
2022-03-25 08:59:08 +01:00
checkModuleWorking_errBefore="$(php -r 'return;' 2>&1 || true)"
2022-03-28 18:11:43 +02:00
printf '%s' "$checkModuleWorking_iniContent" >"$checkModuleWorking_iniFile"
checkModuleWorking_errAfter="$(php -r 'return;' 2>&1 || true)"
rm "$checkModuleWorking_iniFile"
2022-03-25 08:59:08 +01:00
if test "$checkModuleWorking_errAfter" != "$checkModuleWorking_errBefore"; then
2022-03-28 18:11:43 +02:00
printf 'Error loading the "%s" extension:\n%s\n' "$1" "$checkModuleWorking_errAfter" >&2
2022-03-24 11:58:29 +01:00
return 1
fi
printf 'ok.\n'
return 0
}
2021-10-08 00:10:45 +02:00
# Enable a PHP extension
#
# Arguments:
# $1: the name of the PHP extension to be enabled
2022-03-28 18:11:43 +02:00
# $2: base name (without path and extension) of additional php.ini configuration (optional)
# $3: additional php.ini configuration (optional)
2021-10-08 00:10:45 +02:00
enablePhpExtension() {
if test -n "${2:-}"; then
2022-03-28 18:11:43 +02:00
enablePhpExtension_iniFile="$PHP_INI_DIR/conf.d/$2.ini"
2021-10-08 00:10:45 +02:00
else
2022-03-28 18:11:43 +02:00
enablePhpExtension_iniFile="$PHP_INI_DIR/conf.d/docker-php-ext-$1.ini"
2021-10-08 00:10:45 +02:00
fi
2022-03-28 18:11:43 +02:00
enablePhpExtension_iniContent="$(buildPhpExtensionIniContent "$1" "${3:-}")"
2021-10-08 00:10:45 +02:00
case "${IPE_DONT_ENABLE:-}" in
1 | y* | Y*)
enablePhpExtension_enableCommand="/usr/local/bin/docker-php-ext-enable-$1"
2022-03-28 18:11:43 +02:00
printf '%s' "$enablePhpExtension_iniContent" >"$enablePhpExtension_iniFile-disabled"
printf '\n' >>"$enablePhpExtension_iniFile-disabled"
cat <<EOT >"$enablePhpExtension_enableCommand"
#!/bin/sh
if test -f '$enablePhpExtension_iniFile-disabled'; then
echo 'Enabling extension $1'
mv '$enablePhpExtension_iniFile-disabled' '$enablePhpExtension_iniFile'
else
echo 'The extension $1 has already been enabled'
fi
EOT
2021-10-08 00:10:45 +02:00
chmod +x "$enablePhpExtension_enableCommand"
printf '## Extension %s not enabled.\nYou can enable it by running the following command:\n%s\n\n' "$1" "$(basename "$enablePhpExtension_enableCommand")"
;;
*)
2022-03-28 18:11:43 +02:00
printf '%s' "$enablePhpExtension_iniContent" >"$enablePhpExtension_iniFile"
printf '\n' >>"$enablePhpExtension_iniFile"
2021-10-08 00:10:45 +02:00
;;
esac
}
2021-07-02 14:33:43 +02:00
# Mark the pre-installed APT/APK packages as used
# that way they won't be uninstalled by accident
markPreinstalledPackagesAsUsed() {
printf '### MARKING PRE-INSTALLED PACKAGES AS IN-USE ###\n'
case "$DISTRO" in
alpine)
printf '# Packages: %s\n' "$PACKAGES_PERSISTENT_PRE"
apk add $PACKAGES_PERSISTENT_PRE
;;
debian)
DEBIAN_FRONTEND=noninteractive apt-mark manual $PACKAGES_PERSISTENT_PRE
;;
esac
}
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
# Install the required APT/APK packages
#
# Arguments:
# $@: the list of APT/APK packages to be installed
2019-12-20 16:52:00 +01:00
installRequiredPackages() {
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
printf '### INSTALLING REQUIRED PACKAGES ###\n'
2021-07-02 14:33:43 +02:00
printf '# Packages to be kept after installation: %s\n' "$PACKAGES_PERSISTENT_NEW"
2019-12-19 16:06:42 +01:00
printf '# Packages to be used only for installation: %s\n' "$PACKAGES_VOLATILE"
2020-02-28 11:09:15 +01:00
case "$DISTRO" in
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
alpine)
2021-07-02 14:33:43 +02:00
apk add $IPE_APK_FLAGS $PACKAGES_PERSISTENT_NEW $PACKAGES_VOLATILE
2022-03-25 09:29:15 +01:00
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/12763#note_172090
# https://github.com/mlocati/docker-php-extension-installer/issues/385
# https://github.com/mlocati/docker-php-extension-installer/issues/537#issuecomment-1078748882
for installRequiredPackages_item in wget; do
if test -n "$(expandInstalledSystemPackageName "$installRequiredPackages_item")"; then
apk add --upgrade "$installRequiredPackages_item"
fi
done
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
;;
debian)
2021-07-02 14:33:43 +02:00
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -qq -y $PACKAGES_PERSISTENT_NEW $PACKAGES_VOLATILE
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
;;
esac
2018-06-28 09:46:14 +02:00
}
2019-12-19 10:14:38 +01:00
# Get the version of an installed APT/APK package
#
# Arguments:
# $1: the name of the installed package
#
# Output:
# The numeric part of the package version, with from 1 to 3 numbers
#
# Example:
# 1
# 1.2
# 1.2.3
getInstalledPackageVersion() {
2020-02-28 11:09:15 +01:00
case "$DISTRO" in
2019-12-19 10:14:38 +01:00
alpine)
2019-12-20 16:52:00 +01:00
apk info "$1" | head -n1 | cut -c $((${#1} + 2))- | grep -o -E '^[0-9]+(\.[0-9]+){0,2}'
2019-12-19 10:14:38 +01:00
;;
debian)
dpkg-query --showformat='${Version}' --show "$1" 2>/dev/null | grep -o -E '^[0-9]+(\.[0-9]+){0,2}'
;;
esac
}
# Compare two versions
#
# Arguments:
# $1: the first version
# $2: the second version
#
# Output
# -1 if $1 is less than $2
# 0 if $1 is the same as $2
# 1 if $1 is greater than $2
compareVersions() {
compareVersions_v1="$1.0.0"
compareVersions_v2="$2.0.0"
2019-12-20 16:52:00 +01:00
compareVersions_vMin="$(printf '%s\n%s' "$compareVersions_v1" "$compareVersions_v2" | sort -t '.' -n -k1,1 -k2,2 -k3,3 | head -n 1)"
2019-12-19 10:14:38 +01:00
if test "$compareVersions_vMin" != "$compareVersions_v1"; then
echo '1'
elif test "$compareVersions_vMin" = "$compareVersions_v2"; then
echo '0'
else
echo '-1'
fi
}
2020-12-11 15:04:08 +01:00
# Install Oracle Instant Client & SDK
2020-12-28 10:51:30 +01:00
#
# Set:
# ORACLE_INSTANTCLIENT_LIBPATH
2020-12-11 15:04:08 +01:00
installOracleInstantClient() {
2022-03-24 14:04:40 +01:00
case "${IPE_INSTANTCLIENT_BASIC:-}" in
1 | y* | Y*)
installOracleInstantClient_handle=basic
;;
*)
installOracleInstantClient_handle=basiclite
;;
esac
2021-09-28 13:11:38 +02:00
case $PHP_BITS in
32)
installOracleInstantClient_client=client
installOracleInstantClient_version='19.9'
2022-03-24 14:04:40 +01:00
installOracleInstantClient_ic=https://download.oracle.com/otn_software/linux/instantclient/199000/instantclient-$installOracleInstantClient_handle-linux-$installOracleInstantClient_version.0.0.0dbru.zip
2021-09-28 13:11:38 +02:00
installOracleInstantClient_sdk=https://download.oracle.com/otn_software/linux/instantclient/199000/instantclient-sdk-linux-$installOracleInstantClient_version.0.0.0dbru.zip
;;
*)
2022-01-10 15:04:54 +01:00
case $(uname -m) in
aarch64*)
installOracleInstantClient_client=client64
installOracleInstantClient_version='19.10'
2022-03-24 14:04:40 +01:00
installOracleInstantClient_ic=https://download.oracle.com/otn_software/linux/instantclient/191000/instantclient-$installOracleInstantClient_handle-linux.arm64-$installOracleInstantClient_version.0.0.0dbru.zip
2022-01-10 15:04:54 +01:00
installOracleInstantClient_sdk=https://download.oracle.com/otn_software/linux/instantclient/191000/instantclient-sdk-linux.arm64-$installOracleInstantClient_version.0.0.0dbru.zip
;;
*)
installOracleInstantClient_client=client64
installOracleInstantClient_version='21.1'
2022-03-24 14:04:40 +01:00
installOracleInstantClient_ic=https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-$installOracleInstantClient_handle-linux.x64-$installOracleInstantClient_version.0.0.0.zip
2022-01-10 15:04:54 +01:00
installOracleInstantClient_sdk=https://download.oracle.com/otn_software/linux/instantclient/211000/instantclient-sdk-linux.x64-$installOracleInstantClient_version.0.0.0.zip
;;
esac
2021-09-28 13:11:38 +02:00
;;
esac
2020-12-28 10:51:30 +01:00
ORACLE_INSTANTCLIENT_LIBPATH=/usr/lib/oracle/$installOracleInstantClient_version/$installOracleInstantClient_client/lib
if ! test -e "$ORACLE_INSTANTCLIENT_LIBPATH"; then
2022-03-24 14:04:40 +01:00
printf 'Downloading Oracle Instant Client v%s (%s)... ' "$installOracleInstantClient_version" "$installOracleInstantClient_handle"
2020-12-11 15:04:08 +01:00
installOracleInstantClient_src="$(getPackageSource $installOracleInstantClient_ic)"
2020-12-14 14:19:14 +01:00
mkdir -p "/usr/lib/oracle/$installOracleInstantClient_version/$installOracleInstantClient_client"
2020-12-28 10:51:30 +01:00
mv "$installOracleInstantClient_src" "$ORACLE_INSTANTCLIENT_LIBPATH"
2020-12-11 15:04:08 +01:00
echo 'done.'
fi
2020-12-28 10:51:30 +01:00
if ! test -e "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"; then
2020-12-11 15:04:08 +01:00
printf 'Downloading Oracle Instant SDK v%s... ' "$installOracleInstantClient_version"
installOracleInstantClient_src="$(getPackageSource $installOracleInstantClient_sdk)"
2020-12-28 10:51:30 +01:00
ln -sf "$installOracleInstantClient_src/sdk" "$ORACLE_INSTANTCLIENT_LIBPATH/sdk"
UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS '$ORACLE_INSTANTCLIENT_LIBPATH/sdk'"
2020-12-11 15:04:08 +01:00
echo 'done.'
fi
2020-12-14 14:19:14 +01:00
case "$DISTRO" in
alpine)
if ! test -e /usr/lib/libresolv.so.2 && test -e /lib/libc.so.6; then
ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2
fi
2020-12-14 16:43:43 +01:00
installOracleInstantClient_ldconf=/etc/ld-musl-${TARGET_TRIPLET%-alpine-linux-musl}.path
2020-12-14 14:19:14 +01:00
if test -e "$installOracleInstantClient_ldconf"; then
2020-12-28 10:51:30 +01:00
if ! cat "$installOracleInstantClient_ldconf" | grep -q "$ORACLE_INSTANTCLIENT_LIBPATH"; then
cat "$ORACLE_INSTANTCLIENT_LIBPATH" | awk -v suffix=":$ORACLE_INSTANTCLIENT_LIBPATH" '{print NR==1 ? $0suffix : $0}' >"$ORACLE_INSTANTCLIENT_LIBPATH"
2020-12-14 14:19:14 +01:00
fi
else
2021-09-28 13:11:38 +02:00
case $PHP_BITS in
32)
echo "/lib:/usr/local/lib:/usr/lib:$ORACLE_INSTANTCLIENT_LIBPATH" >"$installOracleInstantClient_ldconf"
;;
*)
echo "/lib64:/lib:/usr/local/lib:/usr/lib:$ORACLE_INSTANTCLIENT_LIBPATH" >"$installOracleInstantClient_ldconf"
;;
esac
2020-12-14 14:19:14 +01:00
fi
;;
debian)
if ! test -e /etc/ld.so.conf.d/oracle-instantclient.conf; then
2020-12-28 10:51:30 +01:00
echo "$ORACLE_INSTANTCLIENT_LIBPATH" >/etc/ld.so.conf.d/oracle-instantclient.conf
2020-12-14 14:19:14 +01:00
ldconfig
fi
;;
esac
2020-12-11 15:04:08 +01:00
}
2021-01-20 10:53:51 +01:00
# Check if the Microsoft SQL Server ODBC Driver is installed
#
# Return:
# 0 (true): if the string is in the list
# 1 (false): if the string is not in the list
isMicrosoftSqlServerODBCInstalled() {
test -d /opt/microsoft/msodbcsql*/
}
# Install the Microsoft SQL Server ODBC Driver
installMicrosoftSqlServerODBC() {
printf 'Installing the Microsoft SQL Server ODBC Driver\n'
case "$DISTRO" in
alpine)
# https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server#alpine17
rm -rf /tmp/src/msodbcsql.apk
2022-02-16 17:31:14 +01:00
if test $PHP_MAJMIN_VERSION -le 703; then
2022-03-23 09:58:46 +01:00
curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.9.1.1-1_amd64.apk
2022-02-16 17:31:14 +01:00
else
curl -sSLf -o /tmp/src/msodbcsql.apk https://download.microsoft.com/download/b/9/f/b9f3cce4-3925-46d4-9f46-da08869c6486/msodbcsql18_18.0.1.1-1_amd64.apk
fi
2021-01-20 10:53:51 +01:00
printf '\n' | apk add --allow-untrusted /tmp/src/msodbcsql.apk
rm -rf /tmp/src/msodbcsql.apk
;;
debian)
# https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server#debian17
printf -- '- installing the Microsoft APT key\n'
2021-08-25 09:05:17 +02:00
if test $DISTRO_VERSION_NUMBER -ge 11; then
# apt-key is deprecated
curl -sSLf -o /etc/apt/trusted.gpg.d/microsoft.asc https://packages.microsoft.com/keys/microsoft.asc
else
curl -sSLf https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
fi
2021-01-20 10:53:51 +01:00
if ! test -f /etc/apt/sources.list.d/mssql-release.list; then
printf -- '- adding the Microsoft APT source list\n'
curl -sSLf https://packages.microsoft.com/config/debian/$DISTRO_VERSION_NUMBER/prod.list >/etc/apt/sources.list.d/mssql-release.list
DEBIAN_FRONTEND=noninteractive apt-get -q update
fi
printf -- '- installing the APT package\n'
2022-02-16 17:31:14 +01:00
if test $PHP_MAJMIN_VERSION -le 703; then
DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get -qy --no-install-recommends install msodbcsql17
2022-03-23 09:58:46 +01:00
elif test $DISTRO_VERSION_NUMBER -ge 9 && $DISTRO_VERSION_NUMBER -le 11; then
# On Debian 9 and 11 we have both msodbcsql17 and msodbcsql18: let's install just one
2022-02-16 17:31:14 +01:00
DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get -qy --no-install-recommends install msodbcsql18
else
DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get -qy --no-install-recommends install '^msodbcsql[0-9]+$'
fi
2021-01-20 10:53:51 +01:00
;;
esac
}
2021-09-29 09:31:34 +02:00
# Check if libaom is installed
#
# Return:
# 0 (true)
# 1 (false)
isLibaomInstalled() {
if ! test -f /usr/local/lib/libaom.so && ! test -f /usr/lib/libaom.so; then
return 1
fi
if ! test -f /usr/local/include/aom/aom_codec.h && ! test -f /usr/include/aom/aom_codec.h; then
return 1
fi
return 0
}
# Install libaom
installLibaom() {
printf 'Installing libaom\n'
2022-03-14 17:21:01 +01:00
installLibaom_dir="$(getPackageSource https://aomedia.googlesource.com/aom/+archive/v3.3.0.tar.gz)"
2021-09-29 09:31:34 +02:00
mkdir -- "$installLibaom_dir/my.build"
cd -- "$installLibaom_dir/my.build"
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DENABLE_DOCS=0 -DENABLE_EXAMPLES=0 -DENABLE_TESTDATA=0 -DENABLE_TESTS=0 -DENABLE_TOOLS=0 -DCMAKE_INSTALL_LIBDIR:PATH=lib ..
ninja -j $(getProcessorCount) install
cd - >/dev/null
ldconfig || true
}
# Check if libdav1d is installed
#
# Return:
# 0 (true)
# 1 (false)
isLibdav1dInstalled() {
2022-03-14 17:21:01 +01:00
if ! test -f /usr/local/lib/libdav1d.so && ! test -f /usr/lib/libdav1d.so && ! test -f /usr/lib/x86_64*/libdav1d.so; then
2021-09-29 09:31:34 +02:00
return 1
fi
if ! test -f /usr/local/include/dav1d/dav1d.h && ! test -f /usr/include/dav1d/dav1d.h; then
return 1
fi
return 0
}
# Install libdav1d
installLibdav1d() {
printf 'Installing libdav1d\n'
installLibdav1d_dir="$(getPackageSource https://code.videolan.org/videolan/dav1d/-/archive/0.9.2/dav1d-0.9.2.tar.gz)"
mkdir -- "$installLibdav1d_dir/build"
cd -- "$installLibdav1d_dir/build"
meson --buildtype release -Dprefix=/usr ..
ninja -j $(getProcessorCount) install
cd - >/dev/null
if test -f /usr/lib/$TARGET_TRIPLET/libdav1d.so && ! test -f /usr/lib/libdav1d.so; then
ln -s /usr/lib/$TARGET_TRIPLET/libdav1d.so /usr/lib/
fi
ldconfig || true
}
# Check if libyuv is installed
#
# Return:
# 0 (true)
# 1 (false)
isLibyuvInstalled() {
2022-03-14 17:21:01 +01:00
if ! test -f /usr/local/lib/libyuv.so && ! test -f /usr/lib/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so; then
2021-09-29 09:31:34 +02:00
return 1
fi
if ! test -f /usr/local/include/libyuv.h && ! test -f /usr/include/libyuv.h; then
return 1
fi
return 0
}
# Install libyuv
installLibyuv() {
printf 'Installing libyuv\n'
2022-03-14 17:21:01 +01:00
installLibyuv_dir="$(getPackageSource https://chromium.googlesource.com/libyuv/libyuv/+archive/25d0a5110be796eef47004412baf43333d9ecf26.tar.gz)"
2021-09-29 09:31:34 +02:00
mkdir -- "$installLibyuv_dir/build"
cd -- "$installLibyuv_dir/build"
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -B. ..
make -j$(getProcessorCount) install
cd - >/dev/null
}
# Check if libavif is installed
#
# Return:
# 0 (true)
# 1 (false)
isLibavifInstalled() {
2022-03-14 17:21:01 +01:00
if ! test -f /usr/local/lib/libavif.so && ! test -f /usr/lib/libavif.so && ! test -f /usr/lib/x86_64*/libavif.so; then
2021-09-29 09:31:34 +02:00
return 1
fi
if ! test -f /usr/local/include/avif/avif.h && ! test -f /usr/include/avif/avif.h; then
return 1
fi
return 0
}
# Install libavif
installLibavif() {
printf 'Installing libavif\n'
2022-03-14 17:21:01 +01:00
installLibavif_dir="$(getPackageSource https://codeload.github.com/AOMediaCodec/libavif/tar.gz/refs/tags/v0.9.3)"
2021-09-29 09:31:34 +02:00
mkdir -- "$installLibavif_dir/build"
cd -- "$installLibavif_dir/build"
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DAVIF_CODEC_AOM=ON -DCMAKE_INSTALL_LIBDIR:PATH=lib
make -j$(getProcessorCount) install
cd - >/dev/null
}
2020-12-16 11:34:30 +01:00
# Install Composer
installComposer() {
installComposer_version="$(getWantedPHPModuleVersion @composer)"
2021-01-26 16:58:14 +01:00
installComposer_version="${installComposer_version#^}"
2020-12-16 11:34:30 +01:00
if test -z "$installComposer_version"; then
installComposer_fullname=composer
installComposer_flags=''
else
installComposer_fullname="$(printf 'composer v%s' "$installComposer_version")"
if printf '%s' "$installComposer_version" | grep -Eq '^[0-9]+$'; then
installComposer_flags="--$installComposer_version"
else
installComposer_flags="--version=$installComposer_version"
fi
fi
printf '### INSTALLING %s ###\n' "$installComposer_fullname"
2021-04-23 09:18:01 +02:00
actuallyInstallComposer /usr/local/bin composer "$installComposer_flags"
}
# Actually install composer
#
# Arguments:
# $1: the directory where composer should be installed (required)
# $2: the composer filename (optional, default: composer)
# $3. additional flags for the composer installed (optional)
actuallyInstallComposer() {
actuallyInstallComposer_installer="$(mktemp -p /tmp/src)"
curl -sSLf -o "$actuallyInstallComposer_installer" https://getcomposer.org/installer
actuallyInstallComposer_expectedSignature="$(curl -sSLf https://composer.github.io/installer.sig)"
actuallyInstallComposer_actualSignature="$(php -n -r "echo hash_file('sha384', '$actuallyInstallComposer_installer');")"
if test "$actuallyInstallComposer_expectedSignature" != "$actuallyInstallComposer_actualSignature"; then
printf 'Verification of composer installer failed!\nExpected signature: %s\nActual signature: %s\n' "$actuallyInstallComposer_expectedSignature" "$actuallyInstallComposer_actualSignature" >&2
exit 1
fi
actuallyInstallComposer_flags="--install-dir=$1"
if test -n "${2:-}"; then
actuallyInstallComposer_flags="$actuallyInstallComposer_flags --filename=$2"
else
actuallyInstallComposer_flags="$actuallyInstallComposer_flags --filename=composer"
fi
if test -n "${3:-}"; then
actuallyInstallComposer_flags="$actuallyInstallComposer_flags $3"
fi
php "$actuallyInstallComposer_installer" $actuallyInstallComposer_flags
rm -- "$actuallyInstallComposer_installer"
2020-12-16 11:34:30 +01:00
}
2021-09-28 13:11:38 +02:00
# Install ionCube Loader
installIonCubeLoader() {
# See https://www.ioncube.com/loaders.php
case $PHP_BITS in
32)
case $(uname -m) in
aarch* | arm*)
installIonCubeLoader_url="https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_armv7l.tar.gz"
;;
*)
installIonCubeLoader_url="https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz"
;;
esac
;;
*)
case $(uname -m) in
aarch64 | arm64 | armv8)
installIonCubeLoader_url="https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_aarch64.tar.gz"
;;
*)
installIonCubeLoader_url="https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz"
;;
esac
;;
esac
printf 'Downloading ionCube Loader... '
installIonCubeLoader_dir="$(getPackageSource $installIonCubeLoader_url)"
echo 'done.'
installIonCubeLoader_so=$(php -r "printf('ioncube_loader_lin_%s.%s%s.so', PHP_MAJOR_VERSION, PHP_MINOR_VERSION, ZEND_THREAD_SAFE ? '_ts' : '');")
cp "$installIonCubeLoader_dir/$installIonCubeLoader_so" "$(getPHPExtensionsDir)/ioncube_loader.so"
}
2021-09-28 11:44:47 +02:00
# Install SourceGuardian Loader
installSourceGuardian() {
2021-09-28 13:11:38 +02:00
# See https://www.sourceguardian.com/loaders.html
case $PHP_BITS in
32)
2021-09-28 11:44:47 +02:00
installSourceGuardian_url=https://www.sourceguardian.com/loaders/download/loaders.linux-i386.tar.gz
;;
*)
2021-09-28 13:11:38 +02:00
case $(uname -m) in
aarch64 | arm64 | armv8)
installSourceGuardian_url=https://www.sourceguardian.com/loaders/download/loaders.linux-aarch64.tar.gz
;;
*)
installSourceGuardian_url=https://www.sourceguardian.com/loaders/download/loaders.linux-x86_64.tar.gz
;;
esac
2021-09-28 11:44:47 +02:00
;;
esac
printf 'Downloading SourceGuardian... '
installSourceGuardian_dir="$(getPackageSource $installSourceGuardian_url)"
printf 'done (version: %s)\n' "$(cat "$installSourceGuardian_dir/version")"
for installSourceGuardian_phpv in $PHP_MAJDOTMINDOTPAT_VERSION $PHP_MAJDOTMIN_VERSION; do
installSourceGuardian_file="$installSourceGuardian_dir/ixed.$PHP_MAJDOTMIN_VERSION"
if test $PHP_THREADSAFE -eq 1; then
installSourceGuardian_file="${installSourceGuardian_file}ts"
fi
installSourceGuardian_file="${installSourceGuardian_file}.lin"
if test -f "$installSourceGuardian_file"; then
mv "$installSourceGuardian_file" "$(getPHPExtensionsDir)/sourceguardian.so"
return
fi
done
printf 'Unable to find a SourceGuardian compatible with PHP %s or PHP %s.\nAvailable SourceGuardian versions:\n' "$PHP_MAJDOTMINDOTPAT_VERSION" "$PHP_MAJDOTMIN_VERSION" >&2
ls -1 "$installSourceGuardian_dir" | grep -E '^ixed\..*\.lin$' | sed -E 's/^[^0-9]+([0-9]+(\.[0-9]+)*).*$/\1/' | sort | uniq >&2
exit 1
}
2018-04-11 17:39:10 +02:00
# Install a bundled PHP module given its handle
#
# Arguments:
2020-07-27 14:30:14 +02:00
# $1: the handle of the PHP module
2018-06-28 09:46:14 +02:00
#
# Set:
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
# UNNEEDED_PACKAGE_LINKS
2018-06-28 09:46:14 +02:00
#
# Output:
# Nothing
2019-12-20 16:52:00 +01:00
installBundledModule() {
2020-07-27 14:30:14 +02:00
printf '### INSTALLING BUNDLED MODULE %s ###\n' "$1"
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if test -n "$(getWantedPHPModuleVersion "$1")"; then
printf '### WARNING the module "%s" is bundled with PHP, you can NOT specify a version for it\n' "$1" >&2
fi
2022-03-25 10:55:08 +01:00
if test -n "$(getModuleSourceCodePath "$1")"; then
printf '### WARNING the module "%s" is bundled with PHP, you can NOT specify a source code path for it\n' "$1" >&2
fi
2020-07-27 14:30:14 +02:00
case "$1" in
2020-12-16 18:34:27 +01:00
dba)
if test -e /usr/lib/$TARGET_TRIPLET/libdb-5.3.so && ! test -e /usr/lib/libdb-5.3.so; then
ln -s /usr/lib/$TARGET_TRIPLET/libdb-5.3.so /usr/lib/
fi
if test $PHP_MAJMIN_VERSION -le 505; then
docker-php-source extract
patch /usr/src/php/ext/dba/config.m4 <<EOF
@@ -362,7 +362,7 @@
break
fi
done
- PHP_DBA_DB_CHECK(4, db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
+ PHP_DBA_DB_CHECK(4, db-5.3 db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
fi
PHP_DBA_STD_RESULT(db4,Berkeley DB4)
2021-06-30 10:42:01 +02:00
2020-12-16 18:34:27 +01:00
EOF
fi
docker-php-ext-configure dba --with-db4
;;
2021-08-24 15:34:31 +02:00
enchant)
installBundledModule_tmp=0
if test $PHP_MAJMIN_VERSION -lt 800; then
case "$DISTRO" in
alpine)
if test $DISTRO_MAJMIN_VERSION -ge 312; then
installBundledModule_tmp=1
fi
;;
debian)
if test $DISTRO_VERSION_NUMBER -ge 11; then
installBundledModule_tmp=1
fi
;;
esac
fi
if test $installBundledModule_tmp -eq 1 && ! test -f /usr/lib/libenchant.so && ! test -f /usr/local/lib/libenchant.so; then
# We need to install libenchant1 from source
installBundledModule_src="$(getPackageSource https://github.com/AbiWord/enchant/releases/download/enchant-1-6-1/enchant-1.6.1.tar.gz)"
cd -- "$installBundledModule_src"
./configure
make -j$(getProcessorCount)
make install
cd - >/dev/null
fi
;;
2018-04-11 17:39:10 +02:00
gd)
2020-07-27 14:30:14 +02:00
if test $PHP_MAJMIN_VERSION -le 506; then
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
docker-php-ext-configure gd --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf --with-vpx-dir
2020-07-27 14:30:14 +02:00
elif test $PHP_MAJMIN_VERSION -le 701; then
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
docker-php-ext-configure gd --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf --with-webp-dir
2020-07-27 14:30:14 +02:00
elif test $PHP_MAJMIN_VERSION -le 703; then
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
docker-php-ext-configure gd --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --with-webp-dir
2021-09-29 09:31:34 +02:00
elif test $PHP_MAJMIN_VERSION -le 800; then
2019-12-06 17:12:05 +01:00
docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype
2021-09-29 09:31:34 +02:00
else
case "${IPE_GD_WITHOUTAVIF:-}" in
1 | y* | Y*) ;;
*)
if ! isLibaomInstalled; then
installLibaom
fi
if ! isLibdav1dInstalled; then
installLibdav1d
fi
if ! isLibyuvInstalled; then
installLibyuv
fi
if ! isLibavifInstalled; then
installLibavif
fi
;;
esac
if isLibaomInstalled && isLibdav1dInstalled && isLibyuvInstalled && isLibavifInstalled; then
docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype --with-avif
else
docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype
fi
2018-04-11 17:39:10 +02:00
fi
;;
gmp)
2020-07-27 14:30:14 +02:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-01-31 16:35:43 +01:00
if ! test -f /usr/include/gmp.h; then
2020-12-14 16:52:00 +01:00
ln -s /usr/include/$TARGET_TRIPLET/gmp.h /usr/include/gmp.h
2020-01-31 16:35:43 +01:00
UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS /usr/include/gmp.h"
fi
fi
2018-04-11 17:39:10 +02:00
;;
imap)
2020-02-28 11:09:15 +01:00
case "$DISTRO_VERSION" in
2020-01-22 13:40:40 +01:00
debian@9)
installBundledModule_tmp="$(pwd)"
cd /tmp
apt-get download libc-client2007e-dev
dpkg -i --ignore-depends=libssl-dev libc-client2007e-dev*
rm libc-client2007e-dev*
cd "$installBundledModule_tmp"
;;
esac
2019-10-10 12:19:40 +02:00
PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl
2018-04-11 17:39:10 +02:00
;;
2019-12-20 16:52:00 +01:00
interbase | pdo_firebird)
2020-02-28 11:09:15 +01:00
case "$DISTRO" in
2019-12-11 11:40:13 +01:00
alpine)
if ! test -d /tmp/src/firebird; then
mv "$(getPackageSource https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/Firebird-2.5.9.27139-0.tar.bz2)" /tmp/src/firebird
cd /tmp/src/firebird
2021-03-14 21:54:32 +01:00
# Patch rwlock.h (this has been fixed in later release of firebird 3.x)
2019-12-19 10:37:03 +01:00
sed -i '194s/.*/#if 0/' src/common/classes/rwlock.h
2019-12-11 11:40:13 +01:00
./configure --with-system-icu
2019-12-11 13:57:45 +01:00
# -j option can't be used: make targets must be compiled sequentially
2019-12-11 12:57:53 +01:00
make -s btyacc_binary gpre_boot libfbstatic libfbclient
2019-12-11 11:40:13 +01:00
cp gen/firebird/lib/libfbclient.so /usr/lib/
ln -s /usr/lib/libfbclient.so /usr/lib/libfbclient.so.2
2019-12-24 09:19:56 +01:00
cd - >/dev/null
2019-12-11 11:40:13 +01:00
fi
2020-07-27 14:30:14 +02:00
CFLAGS='-I/tmp/src/firebird/src/jrd -I/tmp/src/firebird/src/include -I/tmp/src/firebird/src/include/gen' docker-php-ext-configure $1
2019-12-11 11:40:13 +01:00
;;
esac
;;
2018-04-11 17:39:10 +02:00
ldap)
2020-02-28 11:09:15 +01:00
case "$DISTRO" in
2019-12-23 09:45:57 +01:00
debian)
2020-12-14 16:43:43 +01:00
docker-php-ext-configure ldap --with-libdir=lib/$TARGET_TRIPLET
2019-12-23 09:45:57 +01:00
;;
esac
2018-04-11 17:39:10 +02:00
;;
2019-12-20 16:52:00 +01:00
mssql | pdo_dblib)
2020-12-09 09:41:56 +01:00
if ! test -f /usr/lib/libsybdb.so; then
2020-12-14 16:52:00 +01:00
ln -s /usr/lib/$TARGET_TRIPLET/libsybdb.so /usr/lib/libsybdb.so
2020-12-09 09:41:56 +01:00
UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS /usr/lib/libsybdb.so"
2020-02-03 08:26:38 +01:00
fi
2018-04-11 17:39:10 +02:00
;;
odbc)
2020-12-09 10:56:20 +01:00
docker-php-source extract
cd /usr/src/php/ext/odbc
phpize
sed -ri 's@^ *test +"\$PHP_.*" *= *"no" *&& *PHP_.*=yes *$@#&@g' configure
./configure --with-unixODBC=shared,/usr
cd - >/dev/null
2018-04-11 17:39:10 +02:00
;;
2020-12-28 10:51:30 +01:00
oci8 | pdo_oci)
2020-12-11 15:04:08 +01:00
installOracleInstantClient
2020-12-28 10:51:30 +01:00
if test "$1" = oci8; then
docker-php-ext-configure "$1" "--with-oci8=instantclient,$ORACLE_INSTANTCLIENT_LIBPATH"
elif test "$1" = pdo_oci; then
docker-php-ext-configure "$1" "--with-pdo-oci=instantclient,$ORACLE_INSTANTCLIENT_LIBPATH"
fi
2020-12-11 15:04:08 +01:00
;;
2018-04-11 17:39:10 +02:00
pdo_odbc)
docker-php-ext-configure pdo_odbc --with-pdo-odbc=unixODBC,/usr
;;
2019-12-11 15:38:27 +01:00
snmp)
2020-02-28 11:09:15 +01:00
case "$DISTRO" in
2019-12-11 15:38:27 +01:00
alpine)
mkdir -p -m 0755 /var/lib/net-snmp/mib_indexes
;;
esac
;;
2022-01-24 18:20:52 +01:00
sockets)
case "$PHP_MAJDOTMINDOTPAT_VERSION" in
8.0.15 | 8.1.2)
sed -i '70 i #ifndef _GNU_SOURCE' /usr/src/php/ext/sockets/config.m4
sed -i '71 i #define _GNU_SOURCE' /usr/src/php/ext/sockets/config.m4
sed -i '72 i #endif' /usr/src/php/ext/sockets/config.m4
;;
esac
;;
2018-04-11 17:39:10 +02:00
sybase_ct)
docker-php-ext-configure sybase_ct --with-sybase-ct=/usr
;;
2019-12-11 15:58:47 +01:00
tidy)
2020-02-28 11:09:15 +01:00
case "$DISTRO" in
2019-12-11 15:58:47 +01:00
alpine)
if ! test -f /usr/include/buffio.h; then
ln -s /usr/include/tidybuffio.h /usr/include/buffio.h
UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS /usr/include/buffio.h"
fi
;;
esac
;;
2019-07-31 15:13:18 +02:00
zip)
2020-07-27 14:30:14 +02:00
if test $PHP_MAJMIN_VERSION -le 505; then
2020-01-31 16:35:43 +01:00
docker-php-ext-configure zip
2020-07-27 14:30:14 +02:00
elif test $PHP_MAJMIN_VERSION -le 703; then
2019-12-06 17:12:05 +01:00
docker-php-ext-configure zip --with-libzip
else
docker-php-ext-configure zip --with-zip
fi
2019-07-31 15:13:18 +02:00
;;
2018-04-11 17:39:10 +02:00
esac
2022-03-25 08:59:08 +01:00
installBundledModule_errBefore="$(php -r 'return;' 2>&1 || true)"
2020-11-03 15:37:47 +01:00
docker-php-ext-install -j$(getProcessorCount) "$1"
2020-07-27 14:30:14 +02:00
case "$1" in
2020-01-22 13:40:40 +01:00
imap)
2020-02-28 11:09:15 +01:00
case "$DISTRO_VERSION" in
2020-01-22 13:40:40 +01:00
debian@9)
dpkg -r libc-client2007e-dev
;;
esac
;;
esac
2022-03-29 09:02:42 +02:00
php -r 'return;' >/dev/null 2>/dev/null || true
2022-03-25 08:59:08 +01:00
installBundledModule_errAfter="$(php -r 'return;' 2>&1 || true)"
if test "$installBundledModule_errAfter" != "$installBundledModule_errBefore"; then
printf 'PHP has problems after installing the "%s" extension:\n%s\n' "$1" "$installBundledModule_errAfter" >&2
2022-03-24 14:43:54 +01:00
rm "$PHP_INI_DIR/conf.d/docker-php-ext-$1.ini" || true
2022-03-24 12:22:11 +01:00
return 1
fi
2018-04-11 17:39:10 +02:00
}
# Fetch a tar.gz file, extract it and returns the path of the extracted folder.
#
# Arguments:
# $1: the URL of the file to be downloaded
#
# Output:
# The path of the extracted directory
2019-12-20 16:52:00 +01:00
getPackageSource() {
2018-04-11 17:39:10 +02:00
mkdir -p /tmp/src
getPackageSource_tempFile=$(mktemp -p /tmp/src)
2020-12-11 15:08:05 +01:00
curl -sSLf -o "$getPackageSource_tempFile" "$1"
2018-04-11 17:39:10 +02:00
getPackageSource_tempDir=$(mktemp -p /tmp/src -d)
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
cd "$getPackageSource_tempDir"
2020-12-14 14:19:14 +01:00
tar -xzf "$getPackageSource_tempFile" 2>/dev/null || tar -xf "$getPackageSource_tempFile" 2>/dev/null || (
if command -v bsdtar >/dev/null; then
bsdtar -xf "$getPackageSource_tempFile"
else
unzip -q "$getPackageSource_tempFile"
fi
)
2018-04-11 17:39:10 +02:00
cd - >/dev/null
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
unlink "$getPackageSource_tempFile"
2018-04-11 17:39:10 +02:00
getPackageSource_outDir=''
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
for getPackageSource_i in $(ls "$getPackageSource_tempDir"); do
if test -n "$getPackageSource_outDir" || test -f "$getPackageSource_tempDir/$getPackageSource_i"; then
2018-04-11 17:39:10 +02:00
getPackageSource_outDir=''
break
fi
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
getPackageSource_outDir="$getPackageSource_tempDir/$getPackageSource_i"
2018-04-11 17:39:10 +02:00
done
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
if test -n "$getPackageSource_outDir"; then
printf '%s' "$getPackageSource_outDir"
2018-04-11 17:39:10 +02:00
else
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
printf '%s' "$getPackageSource_tempDir"
2018-04-11 17:39:10 +02:00
fi
}
2020-12-17 10:16:03 +01:00
# Install a PECL/remote PHP module given its handle
2018-04-11 17:39:10 +02:00
#
# Arguments:
2020-07-27 12:19:04 +02:00
# $1: the handle of the PHP module
2020-12-17 10:16:03 +01:00
installRemoteModule() {
installRemoteModule_module="$1"
printf '### INSTALLING REMOTE MODULE %s ###\n' "$installRemoteModule_module"
2021-01-26 16:58:14 +01:00
installRemoteModule_version="$(resolveWantedPHPModuleVersion "$installRemoteModule_module")"
2022-03-25 10:55:08 +01:00
installRemoteModule_path="$(getModuleSourceCodePath "$installRemoteModule_module")"
2020-10-18 21:35:09 +02:00
rm -rf "$CONFIGURE_FILE"
2020-12-17 10:16:03 +01:00
installRemoteModule_manuallyInstalled=0
installRemoteModule_cppflags=''
2022-03-28 18:11:43 +02:00
installRemoteModule_ini_basename=''
installRemoteModule_ini_extra=''
2020-12-17 10:16:03 +01:00
case "$installRemoteModule_module" in
2019-12-20 15:01:47 +01:00
amqp)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
2021-12-05 19:36:50 +01:00
if test "$DISTRO_VERSION" = debian@8; then
2021-07-10 07:03:33 +02:00
# in Debian Jessie we have librabbitmq version 0.5.2
2020-12-17 10:16:03 +01:00
installRemoteModule_version=1.9.3
2020-12-17 08:48:56 +01:00
elif test $PHP_MAJMIN_VERSION -le 505; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=1.9.4
2020-12-17 08:48:56 +01:00
fi
fi
2019-12-20 15:01:47 +01:00
;;
2019-10-10 11:51:13 +02:00
apcu)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=4.0.11
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2019-10-10 11:51:13 +02:00
fi
;;
2022-03-28 18:11:43 +02:00
apcu_bc)
# apcu_bc must be loaded after apcu
installRemoteModule_ini_basename="xx-php-ext-$installRemoteModule_module"
;;
2021-08-08 18:52:40 +02:00
blackfire)
case $(uname -m) in
i386 | i686 | x86)
2021-08-12 18:00:13 +02:00
installRemoteModule_tmp1=i386
2021-08-08 18:52:40 +02:00
;;
aarch64 | arm64 | armv8)
2021-08-12 18:00:13 +02:00
installRemoteModule_tmp1=arm64
2021-08-08 18:52:40 +02:00
;;
*)
2021-08-12 18:00:13 +02:00
installRemoteModule_tmp1=amd64
2021-08-08 18:52:40 +02:00
;;
esac
2021-08-18 15:51:58 +02:00
case $DISTRO in
alpine)
installRemoteModule_distro=alpine
;;
*)
installRemoteModule_distro=linux
;;
esac
2021-08-12 18:00:13 +02:00
installRemoteModule_tmp2=$(php -r 'echo PHP_MAJOR_VERSION . PHP_MINOR_VERSION;')
installRemoteModule_tmp="$(mktemp -p /tmp/src -d)"
cd "$installRemoteModule_tmp"
2021-08-18 15:51:58 +02:00
curl -sSLf --user-agent Docker https://blackfire.io/api/v1/releases/probe/php/$installRemoteModule_distro/$installRemoteModule_tmp1/$installRemoteModule_tmp2 | tar xz
2021-08-12 18:00:13 +02:00
mv blackfire-*.so $(getPHPExtensionsDir)/blackfire.so
cd - >/dev/null
2021-08-08 18:52:40 +02:00
installRemoteModule_manuallyInstalled=1
2022-03-28 18:11:43 +02:00
installRemoteModule_ini_extra="$(printf '%sblackfire.agent_socket=tcp://blackfire:8307\n' "$installRemoteModule_ini_extra")"
2021-08-08 18:52:40 +02:00
;;
2020-12-17 09:27:44 +01:00
cmark)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
2020-12-17 09:27:44 +01:00
if test $PHP_MAJMIN_VERSION -le 701; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=1.1.0
2020-12-17 09:27:44 +01:00
fi
fi
2021-07-01 08:46:42 +02:00
if ! test -e /usr/local/lib/libcmark.so && ! test -e /usr/local/lib64/libcmark.so && ! test -e /usr/lib/libcmark.so && ! test -e /usr/lib64/libcmark.so && ! test -e /lib/libcmark.so; then
2021-09-27 10:06:07 +02:00
if test $(compareVersions "$(cmake --version | head -n1 | sed -E 's/^.* //')" '3.7') -lt 0; then
installRemoteModule_tmp=0.29.0
else
installRemoteModule_tmp=0.30.2
fi
2021-07-01 08:46:42 +02:00
cd "$(getPackageSource https://github.com/commonmark/cmark/archive/$installRemoteModule_tmp.tar.gz)"
2020-12-17 09:27:44 +01:00
make -s -j$(getProcessorCount) cmake_build
make -s -j$(getProcessorCount) install
cd - >/dev/null
2021-07-01 08:46:42 +02:00
case "$DISTRO" in
alpine)
if test -e /usr/local/lib64/libcmark.so.$installRemoteModule_tmp && ! test -e /usr/local/lib/libcmark.so.$installRemoteModule_tmp; then
ln -s /usr/local/lib64/libcmark.so.$installRemoteModule_tmp /usr/local/lib/
fi
;;
*)
ldconfig || true
;;
esac
2020-12-17 09:27:44 +01:00
fi
;;
2021-02-23 18:28:37 +01:00
csv)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 704; then
installRemoteModule_version=0.3.1
fi
fi
;;
2020-02-04 09:54:02 +01:00
decimal)
2020-02-28 11:09:15 +01:00
case "$DISTRO" in
2020-02-04 09:54:02 +01:00
alpine)
2021-02-06 20:40:01 +01:00
if ! test -f /usr/local/lib/libmpdec.so; then
installRemoteModule_src="$(getPackageSource https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-2.5.1.tar.gz)"
cd -- "$installRemoteModule_src"
./configure --disable-cxx
make -j$(getProcessorCount)
make install
cd - >/dev/null
fi
2020-02-04 09:54:02 +01:00
;;
esac
;;
2021-12-14 11:52:42 +01:00
ds)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 702; then
installRemoteModule_version=1.3.0
fi
fi
;;
2021-08-03 10:38:36 +02:00
event)
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 2.4.0) -ge 0; then
# Enable internal debugging in Event
addConfigureOption enable-event-debug no
# Enable sockets support in Event
if php --ri sockets >/dev/null 2>/dev/null; then
addConfigureOption enable-event-sockets yes
else
addConfigureOption enable-event-sockets no
fi
# libevent installation prefix
addConfigureOption with-event-libevent-dir /usr
# Include libevent's pthreads library and enable thread safety support in Event
addConfigureOption with-event-pthreads yes
# Include libevent protocol-specific functionality support including HTTP, DNS, and RPC
addConfigureOption with-event-extra yes
# Include libevent OpenSSL support
addConfigureOption with-event-openssl yes
# PHP Namespace for all Event classes
if test -n "${IPE_EVENT_NAMESPACE:-}"; then
addConfigureOption with-event-ns "$IPE_EVENT_NAMESPACE"
else
addConfigureOption with-event-ns no
fi
# openssl installation prefix
2022-06-06 10:28:55 +02:00
addConfigureOption with-openssl-dir yes
2021-08-03 10:38:36 +02:00
elif test $(compareVersions "$installRemoteModule_version" 1.7.6) -ge 0; then
# Enable internal debugging in Event
addConfigureOption enable-event-debug no
# Enable sockets support in Event
if php --ri sockets >/dev/null 2>/dev/null; then
addConfigureOption enable-event-sockets yes
else
addConfigureOption enable-event-sockets no
fi
# libevent installation prefix
addConfigureOption with-event-libevent-dir /usr
# Include libevent's pthreads library and enable thread safety support in Event
addConfigureOption with-event-pthreads yes
# Include libevent protocol-specific functionality support including HTTP, DNS, and RPC
addConfigureOption with-event-extra yes
# Include libevent OpenSSL support
addConfigureOption with-event-openssl yes
# openssl installation prefix
addConfigureOption with-openssl-dir no
elif test $(compareVersions "$installRemoteModule_version" 1.3.0) -ge 0; then
# Enable internal debugging in event
addConfigureOption enable-event-debug no
# libevent installation prefix
addConfigureOption with-event-libevent-dir /usr
# Include libevent's pthreads library and enable thread safety support in event
addConfigureOption with-event-pthreads yes
# Include libevent protocol-specific functionality support including HTTP, DNS, and RPC
addConfigureOption with-event-extra yes
# Include libevent OpenSSL support
addConfigureOption with-event-openssl yes
# openssl installation prefix
addConfigureOption with-openssl-dir no
fi
2022-03-28 18:11:43 +02:00
# event must be loaded after sockets
installRemoteModule_ini_basename="xx-php-ext-$installRemoteModule_module"
2021-08-03 10:38:36 +02:00
;;
2021-01-17 14:43:09 +01:00
gearman)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
installRemoteModule_version=1.1.2
fi
fi
case "$DISTRO" in
alpine)
if ! test -e /usr/local/include/libgearman/gearman.h || ! test -e /usr/local/lib/libgearman.so; then
installRemoteModule_src="$(getPackageSource https://github.com/gearman/gearmand/releases/download/1.1.19.1/gearmand-1.1.19.1.tar.gz)"
cd -- "$installRemoteModule_src"
./configure
make -j$(getProcessorCount) install-binPROGRAMS
make -j$(getProcessorCount) install-nobase_includeHEADERS
cd - >/dev/null
fi
;;
esac
;;
2021-02-15 08:36:15 +01:00
geoip)
if test -z "$installRemoteModule_version"; then
installRemoteModule_version=beta
fi
;;
2022-03-24 10:18:15 +01:00
geos)
2022-03-25 10:55:08 +01:00
if test -z "$installRemoteModule_path"; then
if test -z "$installRemoteModule_version"; then
installRemoteModule_version=71b5f9001512e16d3cf4657b517e8a051d6ef36f
fi
installRemoteModule_src="$(getPackageSource https://git.osgeo.org/gitea/geos/php-geos/archive/$installRemoteModule_version.tar.gz)"
cd "$installRemoteModule_src"
./autogen.sh
./configure
make -j$(getProcessorCount) install
cd - >/dev/null
installRemoteModule_manuallyInstalled=1
2022-03-24 10:18:15 +01:00
fi
;;
2021-01-31 14:37:04 +01:00
geospatial)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
installRemoteModule_version=0.2.1
else
installRemoteModule_version=beta
fi
fi
;;
2020-01-07 11:24:42 +01:00
gmagick)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=1.1.7RC3
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
else
2020-12-17 10:16:03 +01:00
installRemoteModule_version=beta
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2020-01-07 11:24:42 +01:00
fi
;;
2020-12-03 17:04:54 +01:00
grpc)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
2020-12-03 17:04:54 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=1.33.1
2020-12-03 17:04:54 +01:00
fi
fi
2021-01-26 09:53:18 +01:00
if test -z "$installRemoteModule_version" || test "$installRemoteModule_version" = 1.35.0; then
case "$DISTRO_VERSION" in
alpine@3.13)
installRemoteModule_cppflags='-Wno-maybe-uninitialized'
;;
esac
fi
2020-12-03 17:04:54 +01:00
;;
2019-12-24 12:53:48 +01:00
http)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=2.6.0
2021-01-17 15:48:53 +01:00
elif test $PHP_MAJMIN_VERSION -le 704; then
installRemoteModule_version=3.2.4
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
fi
if test $PHP_MAJMIN_VERSION -ge 700; then
2019-12-24 12:53:48 +01:00
if ! test -e /usr/local/lib/libidnkit.so; then
2020-12-17 10:16:03 +01:00
installRemoteModule_src="$(getPackageSource https://jprs.co.jp/idn/idnkit-2.3.tar.bz2)"
cd -- "$installRemoteModule_src"
2019-12-24 12:53:48 +01:00
./configure
2020-11-03 15:37:47 +01:00
make -j$(getProcessorCount) install
2019-12-24 12:53:48 +01:00
cd - >/dev/null
fi
fi
2022-03-28 18:11:43 +02:00
# http must be loaded after raphf and propro
installRemoteModule_ini_basename="xx-php-ext-$installRemoteModule_module"
2019-12-24 12:53:48 +01:00
;;
2020-06-15 17:17:15 +02:00
igbinary)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
[minor] Normalize PHP version checking
Test: igbinary, mailparse, memcache, memcached, pcov, propro, protobuf, pthreads, raphf, uopz, yaml, zookeeper
2021-03-13 21:12:11 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=2.0.8
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2020-06-15 17:17:15 +02:00
fi
;;
2021-05-30 15:44:46 +02:00
inotify)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
installRemoteModule_version=0.1.6
fi
fi
;;
2022-05-13 17:18:20 +02:00
ion)
if ! test -f /usr/local/lib/libionc.so || ! test -f /usr/local/include/ionc/ion.h; then
echo 'Installing ion-c... '
installRemoteModule_src="$(mktemp -p /tmp/src -d)"
git clone -q -c advice.detachedHead=false --depth 1 --branch v1.0.6 https://github.com/amzn/ion-c.git "$installRemoteModule_src/ion"
(
cd "$installRemoteModule_src/ion"
git submodule init -q
git submodule update -q
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release .. -Wno-dev
make clean
make -j$(getProcessorCount) install
)
rm -rf "$installRemoteModule_src"
fi
addConfigureOption with-ion "shared,/usr/local"
;;
2020-12-10 14:56:31 +01:00
ioncube_loader)
2021-09-28 13:11:38 +02:00
installIonCubeLoader
2020-12-17 10:16:03 +01:00
installRemoteModule_manuallyInstalled=1
2020-12-10 14:56:31 +01:00
;;
2021-07-13 11:12:48 +02:00
jsmin)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -lt 700; then
installRemoteModule_version=2.0.1
fi
fi
;;
2022-03-24 08:58:10 +01:00
luasandbox)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -lt 702; then
installRemoteModule_version=3.0.3
fi
fi
;;
2021-06-19 20:58:37 +02:00
lzf)
2022-01-10 15:47:37 +01:00
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -lt 702; then
installRemoteModule_version=1.6.8
fi
fi
2021-06-19 20:58:37 +02:00
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" '1.5.0') -ge 0; then
# Sacrifice speed in favour of compression ratio?
case "${IPE_LZF_BETTERCOMPRESSION:-}" in
1 | y* | Y*)
addConfigureOption 'enable-lzf-better-compression' 'yes'
;;
*)
addConfigureOption 'enable-lzf-better-compression' 'no'
;;
esac
fi
;;
2021-01-03 14:39:54 +01:00
mailparse)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
[minor] Normalize PHP version checking
Test: igbinary, mailparse, memcache, memcached, pcov, propro, protobuf, pthreads, raphf, uopz, yaml, zookeeper
2021-03-13 21:12:11 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2021-01-03 14:39:54 +01:00
installRemoteModule_version=2.1.6
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2019-12-19 17:07:13 +01:00
fi
;;
2021-01-03 14:39:54 +01:00
memcache)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
[minor] Normalize PHP version checking
Test: igbinary, mailparse, memcache, memcached, pcov, propro, protobuf, pthreads, raphf, uopz, yaml, zookeeper
2021-03-13 21:12:11 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2021-01-03 14:39:54 +01:00
installRemoteModule_version=2.2.7
[minor] Normalize PHP version checking
Test: igbinary, mailparse, memcache, memcached, pcov, propro, protobuf, pthreads, raphf, uopz, yaml, zookeeper
2021-03-13 21:12:11 +01:00
elif test $PHP_MAJMIN_VERSION -le 704; then
2021-01-03 14:39:54 +01:00
installRemoteModule_version=4.0.5.2
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2019-12-23 17:38:09 +01:00
fi
;;
2018-04-11 17:39:10 +02:00
memcached)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
[minor] Normalize PHP version checking
Test: igbinary, mailparse, memcache, memcached, pcov, propro, protobuf, pthreads, raphf, uopz, yaml, zookeeper
2021-03-13 21:12:11 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=2.2.0
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
fi
2020-10-18 21:35:09 +02:00
# Set the path to libmemcached install prefix
addConfigureOption 'with-libmemcached-dir' 'no'
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" '3.0.0') -ge 0; then
2020-10-18 21:35:09 +02:00
# Set the path to ZLIB install prefix
addConfigureOption 'with-zlib-dir' 'no'
# Use system FastLZ library
addConfigureOption 'with-system-fastlz' 'no'
# Enable memcached igbinary serializer support
if php --ri igbinary >/dev/null 2>/dev/null; then
addConfigureOption 'enable-memcached-igbinary' 'yes'
else
addConfigureOption 'enable-memcached-igbinary' 'no'
fi
# Enable memcached msgpack serializer support
if php --ri msgpack >/dev/null 2>/dev/null; then
addConfigureOption 'enable-memcached-msgpack' 'yes'
else
addConfigureOption 'enable-memcached-msgpack' 'no'
fi
# Enable memcached json serializer support
addConfigureOption 'enable-memcached-json' 'yes'
# Enable memcached protocol support
addConfigureOption 'enable-memcached-protocol' 'no' # https://github.com/php-memcached-dev/php-memcached/issues/418#issuecomment-449587972
# Enable memcached sasl support
addConfigureOption 'enable-memcached-sasl' 'yes'
# Enable memcached session handler support
addConfigureOption 'enable-memcached-session' 'yes'
2018-04-11 17:39:10 +02:00
fi
2022-03-28 18:11:43 +02:00
# memcached must be loaded after msgpack
installRemoteModule_ini_basename="xx-php-ext-$installRemoteModule_module"
2018-04-11 17:39:10 +02:00
;;
2022-03-23 10:55:44 +01:00
memprof)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
installRemoteModule_version=1.0.0
elif test $PHP_MAJMIN_VERSION -le 700; then
installRemoteModule_version=2.1.0
fi
fi
;;
2019-12-12 12:41:49 +01:00
mongo)
2021-01-13 09:53:34 +01:00
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" '1.5.0') -ge 0; then
# Build with Cyrus SASL (MongoDB Enterprise Authentication) support?
addConfigureOption '-with-mongo-sasl' 'yes'
fi
2019-12-12 12:41:49 +01:00
;;
2020-02-03 08:26:38 +01:00
mongodb)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if test $PHP_MAJMIN_VERSION -le 505; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=1.5.5
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
elif test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=1.7.5
2021-07-14 17:10:55 +02:00
elif test $PHP_MAJMIN_VERSION -le 700; then
installRemoteModule_version=1.9.2
2021-12-15 16:16:24 +01:00
elif test $PHP_MAJMIN_VERSION -le 701; then
installRemoteModule_version=1.11.1
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2020-02-03 08:26:38 +01:00
fi
;;
2020-11-25 21:52:49 +01:00
mosquitto)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
2021-03-13 19:26:02 +01:00
installRemoteModule_version=beta
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2020-11-25 21:52:49 +01:00
;;
2019-10-11 15:22:43 +02:00
msgpack)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=0.5.7
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2019-10-11 15:22:43 +02:00
fi
;;
2020-02-16 18:28:30 +01:00
oauth)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=1.2.3
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2020-02-16 18:28:30 +01:00
fi
;;
2019-12-17 09:34:54 +01:00
opencensus)
2021-06-10 08:16:58 +02:00
if test -z "$installRemoteModule_version"; then
installRemoteModule_version=alpha
2019-12-17 11:14:04 +01:00
fi
2019-12-17 09:34:54 +01:00
;;
2021-11-05 23:14:23 +01:00
openswoole)
2022-03-28 09:17:33 +02:00
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -lt 704; then
installRemoteModule_version=4.10.0
fi
fi
2021-11-05 23:14:23 +01:00
if php --ri sockets >/dev/null 2>/dev/null; then
installRemoteModule_sockets=yes
2022-03-30 17:59:33 +02:00
installRemoteModule_ini_basename="xx-php-ext-$installRemoteModule_module"
2021-11-05 23:14:23 +01:00
else
installRemoteModule_sockets=no
fi
installRemoteModule_openssl=yes
# enable sockets supports?
addConfigureOption enable-sockets $installRemoteModule_sockets
# enable openssl support?
addConfigureOption enable-openssl $installRemoteModule_openssl
# enable http2 support?
addConfigureOption enable-http2 yes
# enable mysqlnd support?
addConfigureOption enable-mysqlnd yes
# enable json support?
addConfigureOption enable-swoole-json yes
# enable curl support?
addConfigureOption enable-swoole-curl yes
2021-12-05 12:41:29 +01:00
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" '4.8.0') -ge 0; then
# enable postgres support?
addConfigureOption with-postgres yes
fi
2021-11-05 23:14:23 +01:00
;;
2019-10-11 08:12:46 +02:00
parallel)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if test $PHP_MAJMIN_VERSION -le 701; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=0.8.3
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2019-10-11 08:12:46 +02:00
fi
;;
2022-04-21 16:16:52 +02:00
parle)
if test -z "$installRemoteModule_version"; then
installRemoteModule_version=beta
fi
;;
2019-08-21 12:44:24 +02:00
pcov)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
[minor] Normalize PHP version checking
Test: igbinary, mailparse, memcache, memcached, pcov, propro, protobuf, pthreads, raphf, uopz, yaml, zookeeper
2021-03-13 21:12:11 +01:00
if test $PHP_MAJMIN_VERSION -le 700; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=0.9.0
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2019-08-21 12:44:24 +02:00
fi
;;
2022-05-25 16:47:23 +02:00
php_trie)
if ! test -f /usr/local/include/hat-trie/include/tsl/htrie_map.h; then
installRemoteModule_src="$(getPackageSource https://codeload.github.com/Tessil/hat-trie/tar.gz/v0.6.0)"
mkdir -p /usr/local/include/hat-trie
mv "$installRemoteModule_src/include" /usr/local/include/hat-trie
fi
;;
2019-12-24 10:33:31 +01:00
propro)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
[minor] Normalize PHP version checking
Test: igbinary, mailparse, memcache, memcached, pcov, propro, protobuf, pthreads, raphf, uopz, yaml, zookeeper
2021-03-13 21:12:11 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=1.0.2
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2019-12-24 10:33:31 +01:00
fi
;;
2020-08-18 10:02:00 +02:00
protobuf)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
[minor] Normalize PHP version checking
Test: igbinary, mailparse, memcache, memcached, pcov, propro, protobuf, pthreads, raphf, uopz, yaml, zookeeper
2021-03-13 21:12:11 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=3.12.4
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2020-08-18 10:02:00 +02:00
fi
;;
2018-04-11 17:39:10 +02:00
pthreads)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
[minor] Normalize PHP version checking
Test: igbinary, mailparse, memcache, memcached, pcov, propro, protobuf, pthreads, raphf, uopz, yaml, zookeeper
2021-03-13 21:12:11 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=2.0.10
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2018-04-11 17:39:10 +02:00
fi
2019-12-18 15:13:56 +01:00
;;
2019-12-24 10:20:45 +01:00
raphf)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
[minor] Normalize PHP version checking
Test: igbinary, mailparse, memcache, memcached, pcov, propro, protobuf, pthreads, raphf, uopz, yaml, zookeeper
2021-03-13 21:12:11 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=1.1.2
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2019-12-24 10:20:45 +01:00
fi
;;
2019-12-18 15:13:56 +01:00
rdkafka)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
2021-01-14 14:19:34 +01:00
installRemoteModule_version1=''
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if test $PHP_MAJMIN_VERSION -le 505; then
2021-01-14 14:19:34 +01:00
installRemoteModule_version1=3.0.5
elif test $PHP_MAJMIN_VERSION -le 506; then
installRemoteModule_version1=4.1.2
fi
installRemoteModule_version2=''
case "$DISTRO" in
alpine)
installRemoteModule_tmp='librdkafka'
;;
debian)
installRemoteModule_tmp='librdkafka*'
;;
2022-01-10 16:31:35 +01:00
*)
installRemoteModule_tmp=''
;;
2021-01-14 14:19:34 +01:00
esac
if test -n "$installRemoteModule_tmp"; then
installRemoteModule_tmp="$(getInstalledPackageVersion "$installRemoteModule_tmp")"
if test -n "$installRemoteModule_tmp" && test $(compareVersions "$installRemoteModule_tmp" '0.11.0') -lt 0; then
installRemoteModule_version2=3.1.3
2019-12-19 10:14:38 +01:00
fi
fi
2021-01-14 14:19:34 +01:00
if test -z "$installRemoteModule_version1" || test -z "$installRemoteModule_version2"; then
installRemoteModule_version="$installRemoteModule_version1$installRemoteModule_version2"
elif test $(compareVersions "$installRemoteModule_version1" "$installRemoteModule_version2") -le 0; then
installRemoteModule_version="$installRemoteModule_version1"
else
installRemoteModule_version="$installRemoteModule_version2"
fi
2019-12-19 10:14:38 +01:00
fi
2018-04-11 17:39:10 +02:00
;;
2019-10-10 17:00:42 +02:00
redis)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=4.3.0
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
fi
2020-12-02 18:21:43 +01:00
# Enable igbinary serializer support?
if php --ri igbinary >/dev/null 2>/dev/null; then
addConfigureOption 'enable-redis-igbinary' 'yes'
2019-12-23 18:09:22 +01:00
else
2020-12-02 18:21:43 +01:00
addConfigureOption 'enable-redis-igbinary' 'no'
fi
# Enable lzf compression support?
addConfigureOption 'enable-redis-lzf' 'yes'
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" '5.0.0') -ge 0; then
2020-12-14 16:43:43 +01:00
if ! test -e /usr/include/zstd.h || ! test -e /usr/lib/libzstd.so -o -e "/usr/lib/$TARGET_TRIPLET/libzstd.so"; then
2020-12-17 10:16:03 +01:00
installRemoteModule_zstdVersion=1.4.4
installRemoteModule_zstdVersionMajor=$(echo $installRemoteModule_zstdVersion | cut -d. -f1)
2020-12-02 18:21:43 +01:00
rm -rf /tmp/src/zstd
2021-01-16 10:50:35 +01:00
mv "$(getPackageSource https://github.com/facebook/zstd/releases/download/v$installRemoteModule_zstdVersion/zstd-$installRemoteModule_zstdVersion.tar.gz)" /tmp/src/zstd
2020-12-02 18:21:43 +01:00
cd /tmp/src/zstd
make V=0 -j$(getProcessorCount) lib
2020-12-17 10:16:03 +01:00
cp -f lib/libzstd.so "/usr/lib/$TARGET_TRIPLET/libzstd.so.$installRemoteModule_zstdVersion"
ln -sf "/usr/lib/$TARGET_TRIPLET/libzstd.so.$installRemoteModule_zstdVersion" "/usr/lib/$TARGET_TRIPLET/libzstd.so.$installRemoteModule_zstdVersionMajor"
ln -sf "/usr/lib/$TARGET_TRIPLET/libzstd.so.$installRemoteModule_zstdVersion" "/usr/lib/$TARGET_TRIPLET/libzstd.so"
2020-12-02 18:21:43 +01:00
ln -sf /tmp/src/zstd/lib/zstd.h /usr/include/zstd.h
UNNEEDED_PACKAGE_LINKS="$UNNEEDED_PACKAGE_LINKS /usr/include/zstd.h"
cd - >/dev/null
2020-09-21 15:06:43 +02:00
fi
2020-12-02 18:21:43 +01:00
# Enable zstd compression support?
addConfigureOption 'enable-redis-zstd' 'yes'
2019-10-10 17:00:42 +02:00
fi
;;
2020-12-17 10:02:43 +01:00
snuffleupagus)
2022-03-25 10:55:08 +01:00
if test -z "$installRemoteModule_path"; then
if test -z "$installRemoteModule_version"; then
2022-05-24 10:13:52 +02:00
installRemoteModule_version=0.8.2
2022-03-25 10:55:08 +01:00
fi
installRemoteModule_src="$(getPackageSource https://codeload.github.com/jvoisin/snuffleupagus/tar.gz/v$installRemoteModule_version)"
cd "$installRemoteModule_src/src"
phpize
./configure --enable-snuffleupagus
make -j$(getProcessorCount) install
cd - >/dev/null
cp -a "$installRemoteModule_src/config/default.rules" "$PHP_INI_DIR/conf.d/snuffleupagus.rules"
2022-05-16 11:32:26 +02:00
if test $(compareVersions "$installRemoteModule_version" 0.8.0) -ge 0; then
printf '\n# Disable "PHP version is not officially maintained anymore" message\nsp.global.show_old_php_warning.disable();\n' >>"$PHP_INI_DIR/conf.d/snuffleupagus.rules"
fi
2022-03-28 18:11:43 +02:00
else
if test -f "$installRemoteModule_path/config/default.rules"; then
cp -a "$installRemoteModule_path/config/default.rules" "$PHP_INI_DIR/conf.d/snuffleupagus.rules"
fi
2020-12-17 10:02:43 +01:00
fi
2022-03-28 18:11:43 +02:00
installRemoteModule_ini_extra="$(printf '%ssp.configuration_file=%s\n' "$installRemoteModule_ini_extra" "$PHP_INI_DIR/conf.d/snuffleupagus.rules")"
2020-12-17 10:16:03 +01:00
installRemoteModule_manuallyInstalled=1
2020-12-17 10:02:43 +01:00
;;
2022-04-05 14:37:14 +02:00
sodium | libsodium)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -lt 700; then
installRemoteModule_version=1.0.7
fi
fi
;;
2019-10-10 17:16:58 +02:00
solr)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=2.4.0
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2019-10-10 17:16:58 +02:00
fi
;;
2021-09-28 11:44:47 +02:00
sourceguardian)
installSourceGuardian
installRemoteModule_manuallyInstalled=1
;;
2021-08-07 19:15:58 +02:00
spx)
2022-03-25 10:55:08 +01:00
if test -z "$installRemoteModule_path"; then
if test -z "$installRemoteModule_version"; then
2022-04-21 15:43:20 +02:00
installRemoteModule_version=v0.4.12
2022-03-25 10:55:08 +01:00
fi
if test "${installRemoteModule_version%.*}" = "$installRemoteModule_version"; then
installRemoteModule_displayVersion="$installRemoteModule_version"
else
installRemoteModule_displayVersion="git--master-$installRemoteModule_version"
fi
installRemoteModule_src="$(getPackageSource https://codeload.github.com/NoiseByNorthwest/php-spx/tar.gz/$installRemoteModule_version)"
cd -- "$installRemoteModule_src"
phpize
./configure
make -j$(getProcessorCount) install
cd - >/dev/null
installRemoteModule_manuallyInstalled=1
2021-08-07 19:15:58 +02:00
fi
;;
2021-03-14 18:10:38 +01:00
sqlsrv | pdo_sqlsrv)
2021-07-01 15:23:07 +02:00
isMicrosoftSqlServerODBCInstalled || installMicrosoftSqlServerODBC
2021-03-14 18:10:38 +01:00
if test -z "$installRemoteModule_version"; then
# https://docs.microsoft.com/it-it/sql/connect/php/system-requirements-for-the-php-sql-driver?view=sql-server-2017
if test $PHP_MAJMIN_VERSION -le 506; then
installRemoteModule_version=3.0.1
elif test $PHP_MAJMIN_VERSION -le 700; then
installRemoteModule_version=5.3.0
elif test $PHP_MAJMIN_VERSION -le 701; then
installRemoteModule_version=5.6.1
elif test $PHP_MAJMIN_VERSION -le 702; then
installRemoteModule_version=5.8.1
2022-02-01 14:11:52 +01:00
elif test $PHP_MAJMIN_VERSION -le 703; then
installRemoteModule_version=5.9.0
2021-03-14 18:10:38 +01:00
fi
fi
;;
2018-04-11 17:39:10 +02:00
ssh2)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=0.13
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
else
2021-03-13 18:51:13 +01:00
installRemoteModule_version=beta
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2018-04-11 17:39:10 +02:00
fi
;;
2021-07-15 09:47:39 +02:00
stomp)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
installRemoteModule_version=1.0.9
fi
fi
if test "$DISTRO" = debian; then
addConfigureOption with-openssl-dir yes
else
addConfigureOption with-openssl-dir /usr
fi
;;
2020-12-11 19:16:46 +01:00
swoole)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
2020-12-11 19:16:46 +01:00
if test $PHP_MAJMIN_VERSION -le 502; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=1.6.10
2020-12-11 19:16:46 +01:00
elif test $PHP_MAJMIN_VERSION -le 504; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=2.0.4
2020-12-11 19:16:46 +01:00
elif test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=2.0.11
2020-12-11 19:16:46 +01:00
elif test $PHP_MAJMIN_VERSION -le 700; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=4.3.6
2021-01-10 13:31:36 +01:00
elif test $PHP_MAJMIN_VERSION -le 701; then
installRemoteModule_version=4.5.10
2020-12-11 19:16:46 +01:00
fi
fi
if php --ri sockets >/dev/null 2>/dev/null; then
2020-12-17 10:16:03 +01:00
installRemoteModule_sockets=yes
2020-12-11 19:16:46 +01:00
else
2020-12-17 10:16:03 +01:00
installRemoteModule_sockets=no
2020-12-11 19:16:46 +01:00
fi
2021-01-31 10:47:52 +01:00
installRemoteModule_openssl=yes
2020-12-11 19:16:46 +01:00
case "$DISTRO_VERSION" in
alpine@3.7 | alpine@3.8)
2021-01-31 10:47:52 +01:00
if test -n "$installRemoteModule_version" && test $(compareVersions "$installRemoteModule_version" 4.6.0) -lt 0; then
# see https://github.com/swoole/swoole-src/issues/3934
installRemoteModule_openssl=no
fi
2020-12-11 19:16:46 +01:00
;;
esac
2021-01-13 09:53:34 +01:00
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 4.6.1) -ge 0; then
# enable sockets supports?
addConfigureOption enable-sockets $installRemoteModule_sockets
# enable openssl support?
addConfigureOption enable-openssl $installRemoteModule_openssl
# enable http2 support?
addConfigureOption enable-http2 yes
# enable mysqlnd support?
addConfigureOption enable-mysqlnd yes
# enable json support?
addConfigureOption enable-swoole-json yes
# enable curl support?
2021-11-05 23:42:30 +01:00
if test $PHP_MAJMINPAT_VERSION -ne 80000 || test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 4.6.1) -ge 0; then
2021-01-13 09:53:34 +01:00
addConfigureOption enable-swoole-curl yes
else
# https://github.com/swoole/swoole-src/issues/3977#issuecomment-754755521
addConfigureOption enable-swoole-curl no
fi
elif test $(compareVersions "$installRemoteModule_version" 4.4.0) -ge 0; then
2020-12-11 19:16:46 +01:00
# enable sockets supports?
2020-12-17 10:16:03 +01:00
addConfigureOption enable-sockets $installRemoteModule_sockets
2020-12-11 19:16:46 +01:00
# enable openssl support?
2020-12-17 10:16:03 +01:00
addConfigureOption enable-openssl $installRemoteModule_openssl
2020-12-11 19:16:46 +01:00
# enable http2 support?
addConfigureOption enable-http2 yes
# enable mysqlnd support?
addConfigureOption enable-mysqlnd yes
2020-12-17 10:16:03 +01:00
elif test $(compareVersions "$installRemoteModule_version" 4.2.11) -ge 0; then
2021-03-14 21:54:32 +01:00
# enable sockets supports?
2020-12-17 10:16:03 +01:00
addConfigureOption enable-sockets $installRemoteModule_sockets
2020-12-11 19:16:46 +01:00
# enable openssl support?
2020-12-17 10:16:03 +01:00
addConfigureOption enable-openssl $installRemoteModule_openssl
2020-12-11 19:16:46 +01:00
# enable http2 support?
addConfigureOption enable-http2 yes
# enable mysqlnd support?
addConfigureOption enable-mysqlnd yes
# enable postgresql coroutine client support?
addConfigureOption enable-coroutine-postgresql yes
2020-12-17 10:16:03 +01:00
elif test $(compareVersions "$installRemoteModule_version" 4.2.7) -ge 0; then
2021-03-14 21:54:32 +01:00
# enable sockets supports?
2020-12-17 10:16:03 +01:00
addConfigureOption enable-sockets $installRemoteModule_sockets
2020-12-11 19:16:46 +01:00
# enable openssl support?
2020-12-17 10:16:03 +01:00
addConfigureOption enable-openssl $installRemoteModule_openssl
2020-12-11 19:16:46 +01:00
# enable http2 support?
addConfigureOption enable-http2 yes
# enable mysqlnd support?
addConfigureOption enable-mysqlnd yes
# enable postgresql coroutine client support?
addConfigureOption enable-coroutine-postgresql yes
# enable kernel debug/trace log? (it will degrade performance)
addConfigureOption enable-debug-log no
2020-12-17 10:16:03 +01:00
elif test $(compareVersions "$installRemoteModule_version" 4.2.6) -ge 0; then
2020-12-11 19:16:46 +01:00
# enable debug/trace log support?
addConfigureOption enable-debug-log no
2021-03-14 21:54:32 +01:00
# enable sockets supports?
2020-12-17 10:16:03 +01:00
addConfigureOption enable-sockets $installRemoteModule_sockets
2020-12-11 19:16:46 +01:00
# enable openssl support?
2020-12-17 10:16:03 +01:00
addConfigureOption enable-openssl $installRemoteModule_openssl
2020-12-11 19:16:46 +01:00
# enable http2 support?
addConfigureOption enable-http2 yes
# enable mysqlnd support?
addConfigureOption enable-mysqlnd yes
# enable postgresql coroutine client support?
addConfigureOption enable-coroutine-postgresql yes
2020-12-17 10:16:03 +01:00
elif test $(compareVersions "$installRemoteModule_version" 4.2.0) -ge 0; then
2020-12-11 19:16:46 +01:00
# enable debug/trace log support?
addConfigureOption enable-debug-log no
2021-03-14 21:54:32 +01:00
# enable sockets supports?
2020-12-17 10:16:03 +01:00
addConfigureOption enable-sockets $installRemoteModule_sockets
2020-12-11 19:16:46 +01:00
# enable openssl support?
2020-12-17 10:16:03 +01:00
addConfigureOption enable-openssl $installRemoteModule_openssl
2020-12-11 19:16:46 +01:00
# enable http2 support?
addConfigureOption enable-http2 yes
# enable async-redis support?
addConfigureOption enable-async-redis yes
# enable mysqlnd support?
addConfigureOption enable-mysqlnd yes
# enable postgresql coroutine client support?
addConfigureOption enable-coroutine-postgresql yes
2020-12-17 10:16:03 +01:00
elif test $(compareVersions "$installRemoteModule_version" 2.1.2) -ge 0; then
2020-12-11 19:16:46 +01:00
# enable debug/trace log support?
addConfigureOption enable-swoole-debug no
2021-03-14 21:54:32 +01:00
# enable sockets supports?
2020-12-17 10:16:03 +01:00
addConfigureOption enable-sockets $installRemoteModule_sockets
2020-12-11 19:16:46 +01:00
# enable openssl support?
2020-12-17 10:16:03 +01:00
addConfigureOption enable-openssl $installRemoteModule_openssl
2020-12-11 19:16:46 +01:00
# enable http2 support?
addConfigureOption enable-http2 yes
# enable async-redis support?
addConfigureOption enable-async-redis yes
# enable mysqlnd support?
addConfigureOption enable-mysqlnd yes
# enable postgresql coroutine client support?
addConfigureOption enable-coroutine-postgresql yes
2020-12-17 10:16:03 +01:00
elif test $(compareVersions "$installRemoteModule_version" 1.10.4) -ge 0 && test $(compareVersions "$installRemoteModule_version" 1.10.5) -le 0; then
2020-12-11 19:16:46 +01:00
# enable debug/trace log support?
addConfigureOption enable-swoole-debug no
2021-03-14 21:54:32 +01:00
# enable sockets supports?
2020-12-17 10:16:03 +01:00
addConfigureOption enable-sockets $installRemoteModule_sockets
2020-12-11 19:16:46 +01:00
# enable openssl support?
2020-12-17 10:16:03 +01:00
addConfigureOption enable-openssl $installRemoteModule_openssl
2020-12-11 19:16:46 +01:00
# enable http2 support?
addConfigureOption enable-http2 yes
# enable async-redis support?
addConfigureOption enable-async-redis yes
# enable mysqlnd support?
addConfigureOption enable-mysqlnd yes
fi
;;
2020-03-02 10:43:25 +01:00
tdlib)
if ! test -f /usr/lib/libphpcpp.so || ! test -f /usr/include/phpcpp.h; then
2020-03-03 12:09:28 +01:00
if test $PHP_MAJMIN_VERSION -le 701; then
cd "$(getPackageSource https://codeload.github.com/CopernicaMarketingSoftware/PHP-CPP/tar.gz/v2.1.4)"
elif test $PHP_MAJMIN_VERSION -le 703; then
cd "$(getPackageSource https://codeload.github.com/CopernicaMarketingSoftware/PHP-CPP/tar.gz/v2.2.0)"
else
cd "$(getPackageSource https://codeload.github.com/CopernicaMarketingSoftware/PHP-CPP/tar.gz/444d1f90cf6b7f3cb5178fa0d0b5ab441b0389d0)"
fi
2020-11-03 15:37:47 +01:00
make -j$(getProcessorCount)
2020-03-02 10:43:25 +01:00
make install
cd - >/dev/null
fi
2022-03-25 10:55:08 +01:00
if test -z "$installRemoteModule_path"; then
installRemoteModule_tmp="$(mktemp -p /tmp/src -d)"
git clone --depth=1 --recurse-submodules https://github.com/yaroslavche/phptdlib.git "$installRemoteModule_tmp"
mkdir "$installRemoteModule_tmp/build"
cd "$installRemoteModule_tmp/build"
cmake -D USE_SHARED_PHPCPP:BOOL=ON ..
make
make install
cd - >/dev/null
rm "$PHP_INI_DIR/conf.d/tdlib.ini"
installRemoteModule_manuallyInstalled=1
fi
2020-03-02 10:43:25 +01:00
;;
2021-05-25 09:12:08 +02:00
tensor)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 703; then
installRemoteModule_version=2.2.3
fi
fi
;;
2021-01-03 14:39:54 +01:00
uopz)
if test -z "$installRemoteModule_version"; then
[minor] Normalize PHP version checking
Test: igbinary, mailparse, memcache, memcached, pcov, propro, protobuf, pthreads, raphf, uopz, yaml, zookeeper
2021-03-13 21:12:11 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2021-01-03 14:39:54 +01:00
installRemoteModule_version=2.0.7
[minor] Normalize PHP version checking
Test: igbinary, mailparse, memcache, memcached, pcov, propro, protobuf, pthreads, raphf, uopz, yaml, zookeeper
2021-03-13 21:12:11 +01:00
elif test $PHP_MAJMIN_VERSION -le 700; then
2021-01-03 14:39:54 +01:00
installRemoteModule_version=5.0.2
2021-07-30 21:11:17 +02:00
elif test $PHP_MAJMIN_VERSION -le 740; then
installRemoteModule_version=6.1.2
2021-01-03 14:39:54 +01:00
fi
fi
;;
2021-09-29 09:18:17 +02:00
uploadprogress)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 701; then
installRemoteModule_version=1.1.4
fi
fi
;;
Continue implementing Alpine support
Test: cmark, tidy, uopz, uuid, wddx, xdebug, xmlrpc, xsl, yaml, zip, -STOP-
2019-12-11 17:11:55 +01:00
uuid)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=1.0.5
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
Continue implementing Alpine support
Test: cmark, tidy, uopz, uuid, wddx, xdebug, xmlrpc, xsl, yaml, zip, -STOP-
2019-12-11 17:11:55 +01:00
fi
;;
2018-04-11 17:39:10 +02:00
xdebug)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if test $PHP_MAJMIN_VERSION -le 500; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=2.0.5
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
elif test $PHP_MAJMIN_VERSION -le 503; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=2.2.7
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
elif test $PHP_MAJMIN_VERSION -le 504; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=2.4.1
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
elif test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=2.5.5
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
elif test $PHP_MAJMIN_VERSION -le 700; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=2.6.1
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
elif test $PHP_MAJMIN_VERSION -le 701; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=2.9.8
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
fi
2018-04-11 17:39:10 +02:00
;;
2022-05-26 09:10:38 +02:00
xdiff)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
installRemoteModule_version=1.5.2
fi
fi
if ! test -f /usr/local/lib/libxdiff.* && ! test -f /usr/lib/libxdiff.* && ! test -f /usr/lib/x86_64*/libxdiff.*; then
installRemoteModule_src="$(getPackageSource http://www.xmailserver.org/libxdiff-0.23.tar.gz)"
cd -- "$installRemoteModule_src"
./configure --disable-shared --disable-dependency-tracking --with-pic
make -j$(getProcessorCount)
make install
cd - >/dev/null
fi
;;
2020-04-30 09:02:29 +02:00
xhprof)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=0.9.4
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2020-04-30 09:02:29 +02:00
fi
;;
2021-01-02 20:53:03 +01:00
xlswriter)
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 1.2.7) -ge 0; then
# enable reader supports?
addConfigureOption enable-reader yes
fi
;;
2021-07-17 07:52:10 +02:00
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
;;
2018-04-11 17:39:10 +02:00
yaml)
2020-12-17 10:16:03 +01:00
if test -z "$installRemoteModule_version"; then
[minor] Normalize PHP version checking
Test: igbinary, mailparse, memcache, memcached, pcov, propro, protobuf, pthreads, raphf, uopz, yaml, zookeeper
2021-03-13 21:12:11 +01:00
if test $PHP_MAJMIN_VERSION -le 506; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=1.3.1
[minor] Normalize PHP version checking
Test: igbinary, mailparse, memcache, memcached, pcov, propro, protobuf, pthreads, raphf, uopz, yaml, zookeeper
2021-03-13 21:12:11 +01:00
elif test $PHP_MAJMIN_VERSION -le 700; then
2020-12-17 10:16:03 +01:00
installRemoteModule_version=2.0.4
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
fi
2018-04-11 17:39:10 +02:00
fi
;;
2021-01-05 15:16:27 +01:00
yar)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
installRemoteModule_version=1.2.5
fi
fi
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 1.2.4) -ge 0; then
# Enable Msgpack Supports
if php --ri msgpack >/dev/null 2>/dev/null; then
addConfigureOption enable-msgpack yes
else
addConfigureOption enable-msgpack no
fi
fi
;;
2020-07-27 16:50:21 +02:00
zookeeper)
2021-06-30 11:31:45 +02:00
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
installRemoteModule_version=0.5.0
else
installRemoteModule_version=1.0.0
fi
fi
2020-07-27 16:50:21 +02:00
case "$DISTRO" in
alpine)
if ! test -f /usr/local/include/zookeeper/zookeeper.h; then
2021-06-30 11:31:45 +02:00
if test $(compareVersions "$installRemoteModule_version" 1.0.0) -lt 0; then
installRemoteModule_src="$(getPackageSource http://archive.apache.org/dist/zookeeper/zookeeper-3.5.9/apache-zookeeper-3.5.9.tar.gz)"
else
installRemoteModule_tmp="$(curl -sSLf https://downloads.apache.org/zookeeper/stable | sed -E 's/["<>]/\n/g' | grep -E '^(apache-)?zookeeper-[0-9]+\.[0-9]+\.[0-9]+\.(tar\.gz|tgz)$' | head -n1)"
if test -z "$installRemoteModule_tmp"; then
echo 'Failed to detect the zookeeper library URL' >&2
exit 1
fi
installRemoteModule_src="$(getPackageSource https://downloads.apache.org/zookeeper/stable/$installRemoteModule_tmp)"
2020-12-07 16:25:42 +01:00
fi
2020-12-17 10:16:03 +01:00
cd -- "$installRemoteModule_src"
2021-06-30 11:31:45 +02:00
if test -d ~/.m2; then
installRemoteModule_delm2=n
else
installRemoteModule_delm2=y
fi
2021-06-30 10:27:13 +02:00
mvn -pl zookeeper-jute compile
2020-12-07 16:25:42 +01:00
cd - >/dev/null
2020-12-17 10:16:03 +01:00
cd -- "$installRemoteModule_src/zookeeper-client/zookeeper-client-c"
2020-12-07 16:25:42 +01:00
autoreconf -if
2020-07-27 16:50:21 +02:00
./configure --without-cppunit
2020-11-03 15:37:47 +01:00
make -j$(getProcessorCount) CFLAGS='-Wno-stringop-truncation -Wno-format-overflow'
2020-07-27 16:50:21 +02:00
make install
cd - >/dev/null
2021-06-30 11:31:45 +02:00
if test $installRemoteModule_delm2 = y; then
rm -rf ~/.m2
fi
2020-07-27 16:50:21 +02:00
fi
;;
esac
;;
2018-04-11 17:39:10 +02:00
esac
2020-12-17 10:16:03 +01:00
if test $installRemoteModule_manuallyInstalled -eq 0; then
2022-03-25 10:55:08 +01:00
if test -n "$installRemoteModule_path"; then
printf ' (installing version %s from %s)\n' "$installRemoteModule_version" "$installRemoteModule_path"
elif test -n "$installRemoteModule_version"; then
2020-12-17 10:16:03 +01:00
printf ' (installing version %s)\n' "$installRemoteModule_version"
2019-12-17 11:14:04 +01:00
fi
2022-03-25 10:55:08 +01:00
installPeclPackage "$installRemoteModule_module" "$installRemoteModule_version" "$installRemoteModule_cppflags" "$installRemoteModule_path"
2018-04-11 17:39:10 +02:00
fi
2022-03-24 11:58:29 +01:00
postProcessModule "$installRemoteModule_module"
2022-03-28 18:11:43 +02:00
checkModuleWorking "$installRemoteModule_module" "$installRemoteModule_ini_basename" "$installRemoteModule_ini_extra"
enablePhpExtension "$installRemoteModule_module" "$installRemoteModule_ini_basename" "$installRemoteModule_ini_extra"
2018-04-11 17:39:10 +02:00
}
2021-10-08 10:24:06 +02:00
# Check if a module/helper may be installed using the pecl archive
#
# Arguments:
# $1: the name of the module
#
# Return:
# 0: true
# 1: false
moduleMayUsePecl() {
case "$1" in
@composer | @fix_letsencrypt)
return 1
;;
2022-03-28 18:48:16 +02:00
blackfire | geos | ioncube_loader | snuffleupagus | sourceguardian | spx | tdlib)
2021-10-08 10:24:06 +02:00
return 1
;;
esac
2022-03-28 18:48:16 +02:00
if test -n "$(getModuleSourceCodePath "$1")"; then
return 1
fi
2021-10-08 10:24:06 +02:00
if stringInList "$1" "$BUNDLED_MODULES"; then
return 1
fi
return 0
}
# Configure the PECL package installer
2020-10-18 21:35:09 +02:00
#
# Updates:
# PHP_MODULES_TO_INSTALL
# Sets:
# USE_PICKLE
configureInstaller() {
USE_PICKLE=0
2020-09-18 13:05:53 +02:00
for PHP_MODULE_TO_INSTALL in $PHP_MODULES_TO_INSTALL; do
2021-10-08 10:24:06 +02:00
if moduleMayUsePecl "$PHP_MODULE_TO_INSTALL"; then
2020-09-18 13:05:53 +02:00
if test $PHP_MAJMIN_VERSION -lt 800; then
pecl channel-update pecl.php.net || true
return
fi
2021-01-25 18:21:19 +01:00
if false && anyStringInList '' "$PHP_MODULES_TO_INSTALL"; then
2020-12-16 10:04:45 +01:00
USE_PICKLE=2
else
curl -sSLf https://github.com/FriendsOfPHP/pickle/releases/latest/download/pickle.phar -o /tmp/pickle
chmod +x /tmp/pickle
USE_PICKLE=1
fi
2020-09-18 13:05:53 +02:00
return
fi
done
}
2020-12-16 10:04:45 +01:00
buildPickle() {
printf '### BUILDING PICKLE ###\n'
buildPickle_tempDir="$(mktemp -p /tmp/src -d)"
cd -- "$buildPickle_tempDir"
printf 'Downloading... '
git clone --quiet --depth 1 https://github.com/FriendsOfPHP/pickle.git .
git tag 0.7.0
printf 'done.\n'
printf 'Installing composer... '
2021-04-23 09:18:01 +02:00
actuallyInstallComposer . composer '--1 --quiet'
2020-12-16 10:04:45 +01:00
printf 'done.\n'
printf 'Installing composer dependencies... '
2021-01-14 15:29:26 +01:00
./composer install --no-dev --no-progress --no-suggest --optimize-autoloader --ignore-platform-reqs --quiet --no-cache
2020-12-16 10:04:45 +01:00
printf 'done.\n'
printf 'Building... '
php -d phar.readonly=0 box.phar build
mv pickle.phar /tmp/pickle
printf 'done.\n'
cd - >/dev/null
}
2020-10-18 21:35:09 +02:00
# Add a configure option for the pecl/pickle install command
#
# Arguments:
# $1: the option name
# $2: the option value
addConfigureOption() {
if test $USE_PICKLE -eq 0; then
printf -- '%s\n' "$2" >>"$CONFIGURE_FILE"
else
printf -- '--%s=%s\n' "$1" "$2" >>"$CONFIGURE_FILE"
fi
}
# Actually installs a PECL package
#
# Arguments:
# $1: the package to be installed
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
# $2: the package version to be installed (optional)
2022-03-25 10:55:08 +01:00
# $3: the value of the CPPFLAGS variable (optional)
# $4: the path of the local package to be installed (optional, downloaded from PECL if omitted/empty)
2020-10-18 21:35:09 +02:00
installPeclPackage() {
if ! test -f "$CONFIGURE_FILE"; then
printf '\n' >"$CONFIGURE_FILE"
fi
2021-01-26 15:16:04 +01:00
installPeclPackage_name="$(getPeclModuleName "$1")"
2021-01-31 14:37:04 +01:00
if test -z "${2:-}"; then
installPeclPackage_fullname="$installPeclPackage_name"
else
installPeclPackage_fullname="$installPeclPackage_name-$2"
fi
2022-03-25 10:55:08 +01:00
installPeclPackage_path="${4:-}"
if test -z "$installPeclPackage_path"; then
installPeclPackage_path="$installPeclPackage_fullname"
fi
2020-10-18 21:35:09 +02:00
if test $USE_PICKLE -eq 0; then
2022-03-25 10:55:08 +01:00
if test -n "${4:-}"; then
if test -f "$installPeclPackage_path/package2.xml"; then
installPeclPackage_path="$installPeclPackage_path/package2.xml"
else
installPeclPackage_path="$installPeclPackage_path/package.xml"
fi
fi
cat "$CONFIGURE_FILE" | MAKE="make -j$(getCompilationProcessorCount $1)" CPPFLAGS="${3:-}" pecl install "$installPeclPackage_path"
2020-10-18 21:35:09 +02:00
else
2022-03-25 10:55:08 +01:00
MAKE="make -j$(getCompilationProcessorCount $1)" CPPFLAGS="${3:-}" /tmp/pickle install --tmp-dir=/tmp/pickle.tmp --no-interaction --version-override='' --with-configure-options "$CONFIGURE_FILE" -- "$installPeclPackage_path"
2020-10-18 21:35:09 +02:00
fi
}
2018-04-11 17:39:10 +02:00
# Check if a string is in a list of space-separated string
#
# Arguments:
# $1: the string to be checked
# $2: the string list
#
# Return:
# 0 (true): if the string is in the list
# 1 (false): if the string is not in the list
2019-12-20 16:52:00 +01:00
stringInList() {
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
for stringInList_listItem in $2; do
if test "$1" = "$stringInList_listItem"; then
2018-04-11 17:39:10 +02:00
return 0
fi
done
return 1
}
2020-12-16 10:04:45 +01:00
# Check if at least one item in a list is in another list
#
# Arguments:
# $1: the space-separated list of items to be searched
# $2: the space-separated list of reference items
#
# Return:
# 0 (true): at least one of the items in $1 is in $2
# 1 (false): otherwise
anyStringInList() {
2020-12-16 13:13:35 +01:00
for anyStringInList_item in $1; do
if stringInList "$anyStringInList_item" "$2"; then
2020-12-16 10:04:45 +01:00
return 0
fi
done
return 1
}
2019-10-11 16:01:21 +02:00
# Remove a word from a space-separated list
#
# Arguments:
# $1: the word to be removed
# $2: the string list
#
# Output:
# The list without the word
2019-12-20 16:52:00 +01:00
removeStringFromList() {
2019-10-11 16:01:21 +02:00
removeStringFromList_result=''
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
for removeStringFromList_listItem in $2; do
if test "$1" != "$removeStringFromList_listItem"; then
2019-10-11 16:01:21 +02:00
if test -z "$removeStringFromList_result"; then
removeStringFromList_result="$removeStringFromList_listItem"
else
removeStringFromList_result="$removeStringFromList_result $removeStringFromList_listItem"
fi
fi
done
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
printf '%s' "$removeStringFromList_result"
}
2021-10-08 10:24:06 +02:00
# Fix the Let's Encrypt CA certificates on old distros
fixLetsEncrypt() {
printf '### FIXING LETS ENCRYPT CA CERTIFICATES ###\n'
2021-10-07 23:40:39 +02:00
case "$DISTRO_VERSION" in
2021-10-08 10:24:06 +02:00
alpine@3.7 | alpine@3.8)
printf -- '- old Alpine Linux detected: we should fix the certificates\n'
;;
2021-10-07 23:40:39 +02:00
debian@8 | debian@9)
2021-10-08 10:24:06 +02:00
printf -- '- old Debian detected: we should fix the certificates\n'
2021-10-07 23:40:39 +02:00
if ! grep -q 'mozilla/ISRG_Root_X1.crt' /etc/ca-certificates.conf && grep -q 'mozilla/DST_Root_CA_X3.crt' /etc/ca-certificates.conf; then
2021-10-08 10:24:06 +02:00
printf -- '- old ca-certificates package detected\n'
2021-10-07 23:40:39 +02:00
fixCACerts_mustUpdate=1
if test -d /var/lib/apt/lists; then
for fixCACerts_item in $(ls -1 /var/lib/apt/lists); do
case "$fixCACerts_item" in
partial | lock) ;;
*)
fixCACerts_mustUpdate=0
break
;;
esac
done
fi
if test $fixCACerts_mustUpdate -eq 1; then
2021-10-08 10:24:06 +02:00
printf -- '- refreshing the APT package list\n'
DEBIAN_FRONTEND=noninteractive apt-get update -qq
2021-10-07 23:40:39 +02:00
fi
2021-10-08 10:24:06 +02:00
printf -- '- installing newer ca-certificates package\n'
DEBIAN_FRONTEND=noninteractive apt-get install -qqy --no-install-recommends ca-certificates
2021-10-07 23:40:39 +02:00
fi
;;
*)
2021-10-08 10:24:06 +02:00
printf -- '- patch not required in this distro version\n'
2021-10-07 23:40:39 +02:00
return
;;
esac
if grep -Eq '^mozilla/ISRG_Root_X1\.crt$' /etc/ca-certificates.conf && grep -Eq '^mozilla/DST_Root_CA_X3\.crt$' /etc/ca-certificates.conf; then
2021-10-08 10:24:06 +02:00
printf -- '- disabling the DST_Root_CA_X3 certificate\n'
2021-10-07 23:40:39 +02:00
sed -i '/^mozilla\/DST_Root_CA_X3/s/^/!/' /etc/ca-certificates.conf
2021-10-08 10:24:06 +02:00
printf -- '- refreshing the certificates\n'
2021-10-07 23:40:39 +02:00
update-ca-certificates -f
2021-10-08 10:24:06 +02:00
else
printf -- '- DST_Root_CA_X3 certificate not found or already disabled\n'
2021-10-07 23:40:39 +02:00
fi
}
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
# Cleanup everything at the end of the execution
2019-12-20 16:52:00 +01:00
cleanup() {
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
if test -n "$UNNEEDED_PACKAGE_LINKS"; then
printf '### REMOVING UNNEEDED PACKAGE LINKS ###\n'
for cleanup_link in $UNNEEDED_PACKAGE_LINKS; do
if test -L "$cleanup_link"; then
rm -f "$cleanup_link"
fi
done
fi
if test -n "$PACKAGES_VOLATILE"; then
printf '### REMOVING UNNEEDED PACKAGES ###\n'
2020-02-28 11:09:15 +01:00
case "$DISTRO" in
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
alpine)
apk del --purge $PACKAGES_VOLATILE
;;
debian)
DEBIAN_FRONTEND=noninteractive apt-get remove --purge -y $PACKAGES_VOLATILE
;;
esac
fi
2020-01-23 14:50:55 +01:00
if test -n "$PACKAGES_PREVIOUS"; then
2020-02-28 11:09:15 +01:00
case "$DISTRO" in
2020-01-23 14:50:55 +01:00
debian)
printf '### RESTORING PREVIOUSLY INSTALLED PACKAGES ###\n'
2021-02-11 04:09:49 +01:00
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-upgrade -qqy $PACKAGES_PREVIOUS
2020-01-23 14:50:55 +01:00
;;
esac
fi
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
docker-php-source delete
rm -rf /tmp/src
2020-09-18 13:05:53 +02:00
rm -rf /tmp/pickle
2020-10-18 21:35:09 +02:00
rm -rf /tmp/pickle.tmp
rm -rf "$CONFIGURE_FILE"
2021-08-13 08:54:09 +02:00
case "${IPE_KEEP_SYSPKG_CACHE:-}" in
1 | y* | Y*) ;;
*)
case "$DISTRO" in
alpine)
rm -rf /var/cache/apk/*
;;
debian)
rm -rf /var/lib/apt/lists/*
;;
esac
rm -rf /tmp/pear
;;
esac
2019-10-11 16:01:21 +02:00
}
2018-04-11 17:39:10 +02:00
resetIFS
2019-12-23 08:55:33 +01:00
mkdir -p /tmp/src
2020-10-18 21:35:09 +02:00
mkdir -p /tmp/pickle.tmp
2019-12-23 12:40:28 +01:00
IPE_ERRFLAG_FILE="$(mktemp -p /tmp/src)"
2020-10-18 21:35:09 +02:00
CONFIGURE_FILE=/tmp/configure-options
2021-02-23 18:25:07 +01:00
IPE_APK_FLAGS=''
2020-02-28 11:09:15 +01:00
setDistro
2021-01-14 14:47:26 +01:00
case "$DISTRO_VERSION" in
debian@8)
fixMaxOpenFiles || true
;;
esac
2021-01-13 09:53:34 +01:00
setPHPVersionVariables
2020-10-18 18:40:43 +02:00
setPHPPreinstalledModules
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
case "$PHP_MAJMIN_VERSION" in
2022-06-11 08:26:39 +02:00
505 | 506 | 700 | 701 | 702 | 703 | 704 | 800 | 801 | 802) ;;
2018-04-11 17:39:10 +02:00
*)
2019-12-20 16:52:00 +01:00
printf "### ERROR: Unsupported PHP version: %s.%s ###\n" $((PHP_MAJMIN_VERSION / 100)) $((PHP_MAJMIN_VERSION % 100))
;;
2018-04-11 17:39:10 +02:00
esac
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
UNNEEDED_PACKAGE_LINKS=''
processCommandArguments "$@"
if test -z "$PHP_MODULES_TO_INSTALL"; then
exit 0
fi
2021-10-08 10:24:06 +02:00
if stringInList @fix_letsencrypt "$PHP_MODULES_TO_INSTALL"; then
# This must be the very first thing we do
fixLetsEncrypt
fi
2021-10-07 23:40:39 +02:00
2019-10-11 16:01:21 +02:00
sortModulesToInstall
2020-09-18 13:05:53 +02:00
docker-php-source extract
BUNDLED_MODULES="$(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | xargs -n1 dirname | xargs -n1 basename | xargs)"
2020-10-18 21:35:09 +02:00
configureInstaller
2020-09-18 13:05:53 +02:00
2020-07-27 14:30:14 +02:00
buildRequiredPackageLists $PHP_MODULES_TO_INSTALL
2021-07-02 14:33:43 +02:00
if test -n "$PACKAGES_PERSISTENT_PRE"; then
markPreinstalledPackagesAsUsed
fi
if test -n "$PACKAGES_PERSISTENT_NEW$PACKAGES_VOLATILE"; then
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
installRequiredPackages
fi
2020-12-16 11:34:30 +01:00
if test "$PHP_MODULES_TO_INSTALL" != '@composer'; then
setTargetTriplet
fi
2020-12-16 10:04:45 +01:00
if test $USE_PICKLE -gt 1; then
buildPickle
fi
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
for PHP_MODULE_TO_INSTALL in $PHP_MODULES_TO_INSTALL; do
2021-10-08 10:24:06 +02:00
case "$PHP_MODULE_TO_INSTALL" in
@fix_letsencrypt)
# Already done: it must be the first thing we do
;;
@composer)
installComposer
;;
*)
if stringInList "$PHP_MODULE_TO_INSTALL" "$BUNDLED_MODULES"; then
installBundledModule "$PHP_MODULE_TO_INSTALL"
else
installRemoteModule "$PHP_MODULE_TO_INSTALL"
fi
;;
esac
Continue implementing Alpine support
Test: amqp, apcu, bcmath, bz2, calendar, cmark, dba, enchant, exif, gd, gettext, gmp, igbinary, imagick, imap
2019-12-10 09:06:30 +01:00
done
2021-06-30 10:42:01 +02:00
cleanup