mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 00:05:42 +08:00
requested changes
This commit is contained in:
@@ -139,7 +139,8 @@ class Extension
|
||||
|
||||
/**
|
||||
* Patch code before ./buildconf
|
||||
* If you need to patch some code, overwrite this and return true
|
||||
* If you need to patch some code, overwrite this
|
||||
* return true if you patched something, false if not
|
||||
*/
|
||||
public function patchBeforeBuildconf(): bool
|
||||
{
|
||||
@@ -148,7 +149,8 @@ class Extension
|
||||
|
||||
/**
|
||||
* Patch code before ./configure
|
||||
* If you need to patch some code, overwrite this and return true
|
||||
* If you need to patch some code, overwrite this
|
||||
* return true if you patched something, false if not
|
||||
*/
|
||||
public function patchBeforeConfigure(): bool
|
||||
{
|
||||
@@ -157,7 +159,8 @@ class Extension
|
||||
|
||||
/**
|
||||
* Patch code before make
|
||||
* If you need to patch some code, overwrite this and return true
|
||||
* If you need to patch some code, overwrite this
|
||||
* return true if you patched something, false if not
|
||||
*/
|
||||
public function patchBeforeMake(): bool
|
||||
{
|
||||
|
||||
@@ -294,11 +294,31 @@ abstract class LibraryBase
|
||||
// do something before pack, default do nothing. overwrite this method to do something (e.g. modify pkg-config file)
|
||||
}
|
||||
|
||||
/**
|
||||
* Patch code before ./buildconf
|
||||
* If you need to patch some code, overwrite this
|
||||
* return true if you patched something, false if notand return true
|
||||
*/
|
||||
public function patchBeforeBuildconf(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Patch code before ./configure
|
||||
* If you need to patch some code, overwrite this
|
||||
* return true if you patched something, false if not
|
||||
*/
|
||||
public function patchBeforeConfigure(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Patch code before make
|
||||
* If you need to patch some code, overwrite this
|
||||
* return true if you patched something, false if not
|
||||
*/
|
||||
public function patchBeforeMake(): bool
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -47,6 +47,11 @@ class SourcePatcher
|
||||
logger()->info('Extension [' . $ext->getName() . '] patched before buildconf');
|
||||
}
|
||||
}
|
||||
foreach ($builder->getLibs() as $lib) {
|
||||
if ($lib->patchBeforeBuildconf() === true) {
|
||||
logger()->info('Library [' . $lib->getName() . '] patched before buildconf');
|
||||
}
|
||||
}
|
||||
// patch windows php 8.1 bug
|
||||
if (PHP_OS_FAMILY === 'Windows' && $builder->getPHPVersionID() >= 80100 && $builder->getPHPVersionID() < 80200) {
|
||||
logger()->info('Patching PHP 8.1 windows Fiber bug');
|
||||
|
||||
Reference in New Issue
Block a user