mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
always extract dir because of licenses
This commit is contained in:
parent
594345893d
commit
1a3c271963
@ -177,18 +177,19 @@ abstract class LibraryBase
|
||||
if (file_exists($this->source_dir . '/.spc.patched')) {
|
||||
$this->patched = true;
|
||||
}
|
||||
|
||||
// extract first if not exists, needed for licenses of shared libraries
|
||||
if (!is_dir($this->source_dir)) {
|
||||
$this->getBuilder()->emitPatchPoint('before-library[' . static::NAME . ']-extract');
|
||||
SourceManager::initSource(libs: [static::NAME], source_only: true);
|
||||
$this->getBuilder()->emitPatchPoint('after-library[' . static::NAME . ']-extract');
|
||||
}
|
||||
|
||||
// force means just build
|
||||
if ($force_build) {
|
||||
$type = Config::getLib(static::NAME, 'type', 'lib');
|
||||
logger()->info('Building required ' . $type . ' [' . static::NAME . ']');
|
||||
|
||||
// extract first if not exists
|
||||
if (!is_dir($this->source_dir)) {
|
||||
$this->getBuilder()->emitPatchPoint('before-library[' . static::NAME . ']-extract');
|
||||
SourceManager::initSource(libs: [static::NAME], source_only: true);
|
||||
$this->getBuilder()->emitPatchPoint('after-library[' . static::NAME . ']-extract');
|
||||
}
|
||||
|
||||
if (!$this->patched && $this->patchBeforeBuild()) {
|
||||
file_put_contents($this->source_dir . '/.spc.patched', 'PATCHED!!!');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user