File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 66
77use SPC \builder \BuilderBase ;
88use SPC \builder \linux \LinuxBuilder ;
9+ use SPC \builder \linux \SystemUtil ;
910use SPC \builder \unix \UnixBuilderBase ;
1011use SPC \exception \FileSystemException ;
1112use SPC \exception \RuntimeException ;
@@ -27,6 +28,7 @@ public static function init(): void
2728 FileSystem::addSourceExtractHook ('libyaml ' , [SourcePatcher::class, 'patchLibYaml ' ]);
2829 FileSystem::addSourceExtractHook ('php-src ' , [SourcePatcher::class, 'patchImapLicense ' ]);
2930 FileSystem::addSourceExtractHook ('ext-imagick ' , [SourcePatcher::class, 'patchImagickWith84 ' ]);
31+ FileSystem::addSourceExtractHook ('libaom ' , [SourcePatcher::class, 'patchLibaomForAlpine ' ]);
3032 }
3133
3234 /**
@@ -393,6 +395,15 @@ public static function patchImagickWith84(): bool
393395 return true ;
394396 }
395397
398+ public static function patchLibaomForAlpine (): bool
399+ {
400+ if (PHP_OS_FAMILY === 'Linux ' && SystemUtil::isMuslDist ()) {
401+ SourcePatcher::patchFile ('libaom_posix_implict.patch ' , SOURCE_PATH . '/libaom ' );
402+ return true ;
403+ }
404+ return false ;
405+ }
406+
396407 /**
397408 * Patch cli SAPI Makefile for Windows.
398409 *
Original file line number Diff line number Diff line change 1+ https://bugs.gentoo.org/869419
2+
3+ POSIX_C_SOURCE is needed for ftello.
4+ --- a/CMakeLists.txt
5+ +++ b/CMakeLists.txt
6+ @@ -269,6 +269,7 @@ add_library(aom_rtcd OBJECT ${AOM_RTCD_SOURCES})
7+ add_dependencies(aom_rtcd aom_version)
8+
9+ if(ENABLE_EXAMPLES)
10+ + add_definitions(-D_POSIX_C_SOURCE=200112L)
11+ add_library(aom_encoder_stats OBJECT ${AOM_ENCODER_STATS_SOURCES})
12+ set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_encoder_stats)
13+ endif()
You can’t perform that action at this time.
0 commit comments