From 5eda6e52f8a3a43924ea8e2bd75731ca37b57f1b Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Sun, 31 Jan 2021 11:20:02 +0100 Subject: [PATCH 1/2] Support installing SSH2 on PHP 8 --- data/supported-extensions | 2 +- install-php-extensions | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/data/supported-extensions b/data/supported-extensions index ee73f47..04b82b1 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -72,7 +72,7 @@ soap 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 sockets 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 solr 5.5 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 -ssh2 5.5 5.6 7.0 7.1 7.2 7.3 7.4 +ssh2 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 swoole 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 sybase_ct 5.5 5.6 sysvmsg 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 diff --git a/install-php-extensions b/install-php-extensions index 8967bd8..e8c201f 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -1093,7 +1093,7 @@ setTargetTriplet() { # The number of processors to be used getCompilationProcessorCount() { case "$1" in - amqp | bcmath | bz2 | calendar | exif | gd | gettext | grpc | http | imagick | intl | mysqli | opcache | pcntl | pdo_mysql | protobuf | redis | soap | sockets | tidy | xdebug | xsl | yaml | zip) + amqp | bcmath | bz2 | calendar | exif | gd | gettext | grpc | http | imagick | intl | mysqli | opcache | pcntl | pdo_mysql | protobuf | redis | ssh2 | soap | sockets | tidy | xdebug | xsl | yaml | zip) # These extensions support parallel compilation getProcessorCount ;; @@ -1879,6 +1879,18 @@ installRemoteModule() { addConfigureOption 'enable-redis-zstd' 'yes' fi ;; + ssh2) + if test -z "$installRemoteModule_version" && test $PHP_MAJMIN_VERSION -ge 800; then + installRemoteModule_src="$(getPackageSource https://codeload.github.com/php/pecl-networking-ssh2/tar.gz/93265d71bdeb23350e8320126c7949ed791310df)" + cd -- "$installRemoteModule_src" + phpize + ./configure + make -j$(getCompilationProcessorCount) + make install + cd - >/dev/null + installRemoteModule_manuallyInstalled=1 + fi + ;; snuffleupagus) if test -z "$installRemoteModule_version"; then installRemoteModule_version=0.7.0 From 08270a2dd57c633a5cee5f4e198f5de440d5442c Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Sun, 31 Jan 2021 11:26:32 +0100 Subject: [PATCH 2/2] Fix installing ssh2 on PHP 7.4 --- install-php-extensions | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install-php-extensions b/install-php-extensions index e8c201f..9830b2a 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -1880,6 +1880,13 @@ installRemoteModule() { fi ;; ssh2) + if test -z "$installRemoteModule_version"; then + if test $PHP_MAJMIN_VERSION -le 506; then + installRemoteModule_version=0.13 + elif test $PHP_MAJMIN_VERSION -le 704; then + installRemoteModule_version=1.2 + fi + fi if test -z "$installRemoteModule_version" && test $PHP_MAJMIN_VERSION -ge 800; then installRemoteModule_src="$(getPackageSource https://codeload.github.com/php/pecl-networking-ssh2/tar.gz/93265d71bdeb23350e8320126c7949ed791310df)" cd -- "$installRemoteModule_src"