fix readline

This commit is contained in:
DubbleClick
2025-05-20 20:00:37 +07:00
parent 1e50dac5a6
commit 93c6928624
4 changed files with 54 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ use SPC\exception\RuntimeException;
use SPC\exception\WrongUsageException;
use SPC\store\Config;
use SPC\store\FileSystem;
use SPC\store\SourcePatcher;
use SPC\util\SPCConfigUtil;
class Extension
@@ -189,7 +190,7 @@ class Extension
}
/**
* Patch code before shared extension ./configure
* Patch code before shared extension phpize
* If you need to patch some code, overwrite this
* return true if you patched something, false if not
*/
@@ -198,6 +199,16 @@ class Extension
return false;
}
/**
* Patch code before shared extension ./configure
* If you need to patch some code, overwrite this
* return true if you patched something, false if not
*/
public function patchBeforeSharedConfigure(): bool
{
return false;
}
/**
* Run shared extension check when cli is enabled
* @throws RuntimeException
@@ -316,7 +327,14 @@ class Extension
// prepare configure args
shell()->cd($this->source_dir)
->setEnv($env)
->execWithEnv(BUILD_BIN_PATH . '/phpize')
->execWithEnv(BUILD_BIN_PATH . '/phpize');
if ($this->patchBeforeSharedConfigure()) {
logger()->info('ext [ . ' . $this->getName() . '] patching before shared configure');
}
shell()->cd($this->source_dir)
->setEnv($env)
->execWithEnv('./configure ' . $this->getUnixConfigureArg(true) . ' --with-php-config=' . BUILD_BIN_PATH . '/php-config --enable-shared --disable-static')
->execWithEnv('make clean')
->execWithEnv('make -j' . $this->builder->concurrency)