mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
fix shared bz2 build
This commit is contained in:
parent
872673655e
commit
76a9be2167
@ -275,6 +275,10 @@ class Extension
|
||||
*/
|
||||
public function buildShared(): void
|
||||
{
|
||||
if (file_exists(BUILD_MODULES_PATH . '/' . $this->getName() . '.so')) {
|
||||
logger()->info('extension ' . $this->getName() . ' already built, skipping');
|
||||
return;
|
||||
}
|
||||
match (PHP_OS_FAMILY) {
|
||||
'Darwin', 'Linux' => $this->buildUnixShared(),
|
||||
default => throw new WrongUsageException(PHP_OS_FAMILY . ' build shared extensions is not supported yet'),
|
||||
|
||||
@ -24,4 +24,9 @@ class bz2 extends Extension
|
||||
FileSystem::replaceFileRegex(SOURCE_PATH . '/php-src/configure', '/-lbz2/', $this->getLibFilesString() . $frameworks);
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getUnixConfigureArg(bool $shared = false): string
|
||||
{
|
||||
return $shared ? '--with-bz2=' . BUILD_ROOT_PATH : '';
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user