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 6
6
7
7
use SPC \builder \BuilderBase ;
8
8
use SPC \builder \linux \LinuxBuilder ;
9
+ use SPC \builder \linux \SystemUtil ;
9
10
use SPC \builder \unix \UnixBuilderBase ;
10
11
use SPC \exception \FileSystemException ;
11
12
use SPC \exception \RuntimeException ;
@@ -27,6 +28,7 @@ public static function init(): void
27
28
FileSystem::addSourceExtractHook ('libyaml ' , [SourcePatcher::class, 'patchLibYaml ' ]);
28
29
FileSystem::addSourceExtractHook ('php-src ' , [SourcePatcher::class, 'patchImapLicense ' ]);
29
30
FileSystem::addSourceExtractHook ('ext-imagick ' , [SourcePatcher::class, 'patchImagickWith84 ' ]);
31
+ FileSystem::addSourceExtractHook ('libaom ' , [SourcePatcher::class, 'patchLibaomForAlpine ' ]);
30
32
}
31
33
32
34
/**
@@ -393,6 +395,15 @@ public static function patchImagickWith84(): bool
393
395
return true ;
394
396
}
395
397
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
+
396
407
/**
397
408
* Patch cli SAPI Makefile for Windows.
398
409
*
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