Skip to content

Commit 9ae5294

Browse files
authored
Always enable (fast) support for AVIF on Debian 12 (Bookworm) (#884)
1 parent c4c0e17 commit 9ae5294

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ Here's the list of all the supported environment variables:
412412
| | `IPE_KEEP_SYSPKG_CACHE=1` | By default the script will clear the apt/apk/pear cache in order to save disk space. You can disable it by setting this environment variable |
413413
| lzf | `IPE_LZF_BETTERCOMPRESSION=1` | By default `install-php-extensions` compiles the `lzf` extension to prefer speed over size; you can use this environment variable to compile it preferring size over speed |
414414
| event | `IPE_EVENT_NAMESPACE=`... | By default the `event` classes are defined in the root namespace. You can use this environment variable to specify a custom namespace |
415-
| gd | `IPE_GD_WITHOUTAVIF=1` | Since PHP 8.1, gd supports the AVIF format. Enabling it requires compiling libaom/libdav1d/libyuv/libavif on Debian and Alpine 3.14-, which is time-consuming. You can disable AVIF support by setting this environment variable on Debian and Alpine 3.14- |
415+
| gd | `IPE_GD_WITHOUTAVIF=1` | Since PHP 8.1, gd supports the AVIF format. Enabling it requires compiling libaom/libdav1d/libyuv/libavif on Debian 11- and Alpine 3.14-, which is time-consuming. You can disable AVIF support by setting this environment variable on Debian 11- and Alpine 3.14- |
416416
| oci8 & pdo_oci | `IPE_INSTANTCLIENT_BASIC=1` | The oci8 and pdo_oci PHP extensions require [Oracle Instant Client](https://www.oracle.com/database/technologies/instant-client.html). In order to save disk space, we install the Basic Lite version: if you want to install the Basic (non-lite) version simply set this environment variable |
417417
| http, intl, mongodb | `IPE_ICU_EN_ONLY=1` | Some extensions require the ICU library, use this flag to install a smaller, but English-only, ICU library on Alpine 3.16 and later |
418418
| pspell | `IPE_ASPELL_LANGUAGES='...'` | Configure the languages to be made available (for example: `IPE_ASPELL_LANGUAGES='en fr'`). If omitted, we'll assume `en` |

install-php-extensions

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,10 @@ buildRequiredPackageLists() {
862862
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libwebp[0-9]+$"
863863
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libwebp-dev"
864864
if test $PHP_MAJMIN_VERSION -ge 801; then
865-
if ! isLibaomInstalled || ! isLibdav1dInstalled || ! isLibyuvInstalled || ! isLibavifInstalled; then
865+
if test $DISTRO_VERSION_NUMBER -ge 12; then
866+
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libavif[0-9]+$ ^libaom[0-9]+$ ^libdav1d[0-9]+$"
867+
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libavif-dev libaom-dev libdav1d-dev"
868+
elif ! isLibaomInstalled || ! isLibdav1dInstalled || ! isLibyuvInstalled || ! isLibavifInstalled; then
866869
case "${IPE_GD_WITHOUTAVIF:-}" in
867870
1 | y* | Y*) ;;
868871
*)
@@ -2102,7 +2105,7 @@ installMicrosoftSqlServerODBC() {
21022105
# 0 (true)
21032106
# 1 (false)
21042107
isLibaomInstalled() {
2105-
if ! test -f /usr/local/lib/libaom.so && ! test -f /usr/lib/libaom.so; then
2108+
if ! test -f /usr/local/lib/libaom.so && ! test -f /usr/lib/libaom.so && ! test -f /usr/lib/x86_64*/libaom.so; then
21062109
return 1
21072110
fi
21082111
if ! test -f /usr/local/include/aom/aom_codec.h && ! test -f /usr/include/aom/aom_codec.h; then
@@ -2159,7 +2162,7 @@ installLibdav1d() {
21592162
# 0 (true)
21602163
# 1 (false)
21612164
isLibyuvInstalled() {
2162-
if ! test -f /usr/local/lib/libyuv.so && ! test -f /usr/lib/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so; then
2165+
if ! test -f /usr/local/lib/libyuv.so && ! test -f /usr/lib/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so && ! test -f /usr/lib/x86_64*/libyuv.so.*; then
21632166
return 1
21642167
fi
21652168
if ! test -f /usr/local/include/libyuv.h && ! test -f /usr/include/libyuv.h; then
@@ -2435,6 +2438,11 @@ EOF
24352438
installBundledModule_tmp=1
24362439
fi
24372440
;;
2441+
debian)
2442+
if test $DISTRO_VERSION_NUMBER -ge 12; then
2443+
installBundledModule_tmp=1
2444+
fi
2445+
;;
24382446
esac
24392447
if test $installBundledModule_tmp -eq 0; then
24402448
case "${IPE_GD_WITHOUTAVIF:-}" in

0 commit comments

Comments
 (0)