mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 08:45:40 +08:00
add patch for attr on alpine
This commit is contained in:
@@ -29,6 +29,7 @@ class SourcePatcher
|
||||
FileSystem::addSourceExtractHook('php-src', [SourcePatcher::class, 'patchImapLicense']);
|
||||
FileSystem::addSourceExtractHook('ext-imagick', [SourcePatcher::class, 'patchImagickWith84']);
|
||||
FileSystem::addSourceExtractHook('libaom', [SourcePatcher::class, 'patchLibaomForAlpine']);
|
||||
FileSystem::addSourceExtractHook('attr', [SourcePatcher::class, 'patchAttrForAlpine']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -407,6 +408,15 @@ class SourcePatcher
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function patchAttrForAlpine(): bool
|
||||
{
|
||||
if (PHP_OS_FAMILY === 'Linux' && SystemUtil::isMuslDist()) {
|
||||
SourcePatcher::patchFile('attr_alpine_gethostname.patch', SOURCE_PATH . '/attr');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Patch cli SAPI Makefile for Windows.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user