mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 05:14: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')) {
|
if (file_exists($this->source_dir . '/.spc.patched')) {
|
||||||
$this->patched = true;
|
$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
|
// force means just build
|
||||||
if ($force_build) {
|
if ($force_build) {
|
||||||
$type = Config::getLib(static::NAME, 'type', 'lib');
|
$type = Config::getLib(static::NAME, 'type', 'lib');
|
||||||
logger()->info('Building required ' . $type . ' [' . static::NAME . ']');
|
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()) {
|
if (!$this->patched && $this->patchBeforeBuild()) {
|
||||||
file_put_contents($this->source_dir . '/.spc.patched', 'PATCHED!!!');
|
file_put_contents($this->source_dir . '/.spc.patched', 'PATCHED!!!');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user