mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 21:34:53 +08:00
remove dom extra cake
This commit is contained in:
parent
f708907d99
commit
6b50700d8c
@ -35,38 +35,4 @@ class dom extends Extension
|
||||
{
|
||||
return '--with-dom --with-libxml';
|
||||
}
|
||||
|
||||
public function buildUnixShared(): void
|
||||
{
|
||||
$config = (new SPCConfigUtil($this->builder))->config([$this->getName()]);
|
||||
$env = [
|
||||
'CFLAGS' => $config['cflags'] . ' -I' . SOURCE_PATH . '/php-src',
|
||||
'LDFLAGS' => $config['ldflags'],
|
||||
'LIBS' => $config['libs'],
|
||||
'LD_LIBRARY_PATH' => BUILD_LIB_PATH,
|
||||
];
|
||||
// prepare configure args
|
||||
shell()->cd($this->source_dir)
|
||||
->setEnv($env)
|
||||
->execWithEnv(BUILD_BIN_PATH . '/phpize')
|
||||
->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);
|
||||
|
||||
// copy shared library
|
||||
FileSystem::createDir(BUILD_MODULES_PATH);
|
||||
$extensionDirFile = (getenv('EXTENSION_DIR') ?: $this->source_dir . '/modules') . '/' . $this->getName() . '.so';
|
||||
$sourceDirFile = $this->source_dir . '/modules/' . $this->getName() . '.so';
|
||||
if (file_exists($extensionDirFile)) {
|
||||
copy($extensionDirFile, BUILD_MODULES_PATH . '/' . $this->getName() . '.so');
|
||||
} elseif (file_exists($sourceDirFile)) {
|
||||
copy($sourceDirFile, BUILD_MODULES_PATH . '/' . $this->getName() . '.so');
|
||||
} else {
|
||||
throw new RuntimeException('extension ' . $this->getName() . ' built successfully, but into an unexpected location.');
|
||||
}
|
||||
// check shared extension with php-cli
|
||||
if (file_exists(BUILD_BIN_PATH . '/php')) {
|
||||
$this->runSharedExtensionCheckUnix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user