always extract dir because of licenses

This commit is contained in:
henderkes 2026-02-18 11:59:58 +07:00
parent 594345893d
commit 1a3c271963

View File

@ -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!!!');
}