From 3c714191cc96b099d6fb9e600a396476e84b3dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Egyed?= Date: Sat, 7 Aug 2021 19:15:58 +0200 Subject: [PATCH] Add SPX support --- MAINTAINERS.md | 5 +++++ data/supported-extensions | 1 + install-php-extensions | 27 +++++++++++++++++++++++++++ 3 files changed, 33 insertions(+) diff --git a/MAINTAINERS.md b/MAINTAINERS.md index dca20f1..93c4aa5 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -84,6 +84,11 @@ We should switch to the stable release once it will be available. The `snuffleupagus` PHP extension is not available in the PECL archive, so we install it manually. We need to monitor new releases at https://github.com/jvoisin/snuffleupagus/releases +## spx + +Currenly the `spx` PHP extension installs with a commit version. +We should switch to a tagged realease when it will be available (see https://github.com/NoiseByNorthwest/php-spx/issues/174). + ### sqlsrv / pdo_sqlsrv The `pdo_sqlsrv` and `sqlsrv` PHP extensions require the Microsoft ODBC Driver for SQL Server. diff --git a/data/supported-extensions b/data/supported-extensions index 3e6a3ed..a2ee5c4 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -81,6 +81,7 @@ snuffleupagus 7.0 7.1 7.2 7.3 7.4 8.0 8.1 soap 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 sockets 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 solr 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 +spx 5.6 7.0 7.1 7.2 7.3 7.4 8.0 sqlsrv 7.0 7.1 7.2 7.3 7.4 8.0 8.1 ssh2 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 stomp 5.5 5.6 7.0 7.1 7.2 7.3 7.4 diff --git a/install-php-extensions b/install-php-extensions index 637cca7..cdf02e6 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -859,6 +859,12 @@ buildRequiredPackageLists() { buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libcurl3-gnutls" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libcurl4-gnutls-dev libxml2-dev" ;; + spx@alpine) + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib-dev" + ;; + spx@debian) + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zlib1g-dev" + ;; sqlsrv@alpine | pdo_sqlsrv@alpine) buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++ unixodbc" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile unixodbc-dev" @@ -2102,6 +2108,24 @@ installRemoteModule() { fi fi ;; + spx) + if test -z "$installRemoteModule_version"; then + installRemoteModule_version=1367cbc70194d18888ec9cfe9b06c0a5b4426dff + 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" + sed -Ei "s/^([ \t]*#define[ \t]+PHP_SPX_VERSION[ \t]+\")0.4.10(\")/\1git--master-$installRemoteModule_displayVersion\2/" src/php_spx.h + phpize + ./configure + make -j$(getProcessorCount) install + cd - >/dev/null + installRemoteModule_manuallyInstalled=1 + ;; sqlsrv | pdo_sqlsrv) isMicrosoftSqlServerODBCInstalled || installMicrosoftSqlServerODBC if test -z "$installRemoteModule_version"; then @@ -2511,6 +2535,9 @@ configureInstaller() { if test "${PHP_MODULE_TO_INSTALL#@}" != "$PHP_MODULE_TO_INSTALL"; then continue fi + if test "$PHP_MODULE_TO_INSTALL" = 'spx'; then + continue + fi if test "$PHP_MODULE_TO_INSTALL" = 'amqp' && test $PHP_MAJMIN_VERSION -ge 800; then continue fi