mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
suggestion
This commit is contained in:
parent
2abbb75f98
commit
58d979712e
@ -193,7 +193,7 @@ class Extension
|
||||
* If you need to patch some code, overwrite this
|
||||
* return true if you patched something, false if not
|
||||
*/
|
||||
public function patchBeforeSharedBuild(): bool
|
||||
public function patchBeforeSharedPhpize(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -394,13 +394,17 @@ class Extension
|
||||
'LD_LIBRARY_PATH' => BUILD_LIB_PATH,
|
||||
];
|
||||
|
||||
if ($this->patchBeforeSharedPhpize()) {
|
||||
logger()->info("Extension [{$this->getName()}] patched before shared phpize");
|
||||
}
|
||||
|
||||
// prepare configure args
|
||||
shell()->cd($this->source_dir)
|
||||
->setEnv($env)
|
||||
->exec(BUILD_BIN_PATH . '/phpize');
|
||||
|
||||
if ($this->patchBeforeSharedConfigure()) {
|
||||
logger()->info('ext [' . $this->getName() . '] patching before shared configure');
|
||||
logger()->info("Extension [{$this->getName()}] patched before shared configure");
|
||||
}
|
||||
|
||||
shell()->cd($this->source_dir)
|
||||
@ -419,7 +423,7 @@ class Extension
|
||||
);
|
||||
|
||||
if ($this->patchBeforeSharedMake()) {
|
||||
logger()->info('ext [' . $this->getName() . '] patching before shared make');
|
||||
logger()->info("Extension [{$this->getName()}] patched before shared make");
|
||||
}
|
||||
|
||||
shell()->cd($this->source_dir)
|
||||
|
||||
@ -22,7 +22,7 @@ class intl extends Extension
|
||||
return true;
|
||||
}
|
||||
|
||||
public function patchBeforeSharedBuild(): bool
|
||||
public function patchBeforeSharedPhpize(): bool
|
||||
{
|
||||
return $this->patchBeforeBuildconf();
|
||||
}
|
||||
|
||||
@ -207,8 +207,6 @@ class BuildPHPCommand extends BuildCommand
|
||||
// start to build
|
||||
$builder->buildPHP($rule);
|
||||
|
||||
SourcePatcher::patchBeforeSharedBuild($builder);
|
||||
|
||||
// build dynamic extensions if needed
|
||||
if (!empty($shared_extensions)) {
|
||||
logger()->info('Building shared extensions ...');
|
||||
|
||||
@ -46,12 +46,12 @@ class SourcePatcher
|
||||
{
|
||||
foreach ($builder->getExts() as $ext) {
|
||||
if ($ext->patchBeforeBuildconf() === true) {
|
||||
logger()->info('Extension [' . $ext->getName() . '] patched before buildconf');
|
||||
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');
|
||||
logger()->info("Library [{$lib->getName()}]patched before buildconf");
|
||||
}
|
||||
}
|
||||
// patch windows php 8.1 bug
|
||||
@ -79,15 +79,6 @@ class SourcePatcher
|
||||
}
|
||||
}
|
||||
|
||||
public static function patchBeforeSharedBuild(BuilderBase $builder): void
|
||||
{
|
||||
foreach ($builder->getExts() as $ext) {
|
||||
if ($ext->patchBeforeSharedBuild() === true) {
|
||||
logger()->info('Extension [' . $ext->getName() . '] patched before shared build');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Source patcher runner before configure
|
||||
*
|
||||
@ -98,12 +89,12 @@ class SourcePatcher
|
||||
{
|
||||
foreach ($builder->getExts() as $ext) {
|
||||
if ($ext->patchBeforeConfigure() === true) {
|
||||
logger()->info('Extension [' . $ext->getName() . '] patched before configure');
|
||||
logger()->info("Extension [{$ext->getName()}] patched before configure");
|
||||
}
|
||||
}
|
||||
foreach ($builder->getLibs() as $lib) {
|
||||
if ($lib->patchBeforeConfigure() === true) {
|
||||
logger()->info('Library [' . $lib->getName() . '] patched before configure');
|
||||
logger()->info("Library [{$lib->getName()}] patched before configure");
|
||||
}
|
||||
}
|
||||
// patch capstone
|
||||
@ -279,12 +270,12 @@ class SourcePatcher
|
||||
// call extension patch before make
|
||||
foreach ($builder->getExts(false) as $ext) {
|
||||
if ($ext->patchBeforeMake() === true) {
|
||||
logger()->info('Extension [' . $ext->getName() . '] patched before make');
|
||||
logger()->info("Extension [{$ext->getName()}] patched before make");
|
||||
}
|
||||
}
|
||||
foreach ($builder->getLibs() as $lib) {
|
||||
if ($lib->patchBeforeMake() === true) {
|
||||
logger()->info('Library [' . $lib->getName() . '] patched before make');
|
||||
logger()->info("Library [{$lib->getName()}] patched before make");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user