From 8d409034c3ded459d4dc221a0352bf865a0c3d80 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Wed, 20 Sep 2023 11:56:51 +0200 Subject: [PATCH] Add support for Tensor on PHP up to 8.2 (#805) --- data/special-requirements | 1 - data/supported-extensions | 2 +- install-php-extensions | 46 +++++++++++++++++++++++++++++---------- 3 files changed, 36 insertions(+), 13 deletions(-) diff --git a/data/special-requirements b/data/special-requirements index 947ebf1..9eb4e0e 100644 --- a/data/special-requirements +++ b/data/special-requirements @@ -12,5 +12,4 @@ pthreads zts simdjson !jessie !stretch sodium !jessie sqlsrv !7.1-alpine3.9 !7.1-alpine3.10 !arm -tensor !alpine3.15 !alpine3.16 vips !alpine3.9 !jessie diff --git a/data/supported-extensions b/data/supported-extensions index bc45a5c..12a9a46 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -114,7 +114,7 @@ sync 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 sysvmsg 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 sysvsem 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 sysvshm 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 -tensor 7.2 7.3 7.4 8.0 +tensor 7.2 7.3 7.4 8.0 8.1 8.2 tideways 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 tidy 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 timezonedb 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 diff --git a/install-php-extensions b/install-php-extensions index b294d33..4346168 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -1332,23 +1332,38 @@ buildRequiredPackageLists() { buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile git cmake gperf zlib1g-dev $buildRequiredPackageLists_libssldev" ;; 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" + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent openblas" + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile lapack-dev openblas-dev" + if test $DISTRO_MAJMIN_VERSION -le 317; then + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent lapack" + if test $DISTRO_MAJMIN_VERSION -le 316; then + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libexecinfo" + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libexecinfo-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 fi + else + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent liblapack" fi ;; tensor@debian) - buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent liblapacke libopenblas-base" + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent liblapacke" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile liblapack-dev libopenblas-dev liblapacke-dev" - 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 - buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent gfortran-8" + if test $DISTRO_VERSION_NUMBER -le 9; then + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent gfortran-6 libopenblas-base" + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libgfortran-6-dev" + elif test $DISTRO_VERSION_NUMBER -le 10; then + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent gfortran-8 libopenblas-base" buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libgfortran-8-dev" + elif test $DISTRO_VERSION_NUMBER -le 11; then + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent gfortran-10 libopenblas-base" + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libgfortran-10-dev" + else + buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent gfortran-12 libopenblas0" + buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libgfortran-12-dev" fi ;; tidy@alpine) @@ -3659,6 +3674,15 @@ installRemoteModule() { installRemoteModule_version=2.2.3 fi fi + case "$DISTRO" in + alpine) + if test $DISTRO_MAJMIN_VERSION -ge 315 && test $DISTRO_MAJMIN_VERSION -le 317; then + if test -e /usr/lib/liblapacke.so.3 && ! test -e /usr/lib/liblapacke.so; then + ln -s /usr/lib/liblapacke.so.3 /usr/lib/liblapacke.so + fi + fi + ;; + esac ;; tideways) case "$DISTRO" in