From 1a3c27196313622ca8d75e6af46cce1f90f6d60d Mon Sep 17 00:00:00 2001 From: henderkes Date: Wed, 18 Feb 2026 11:59:58 +0700 Subject: [PATCH] always extract dir because of licenses --- src/SPC/builder/LibraryBase.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/SPC/builder/LibraryBase.php b/src/SPC/builder/LibraryBase.php index 383faa41..65528dd7 100644 --- a/src/SPC/builder/LibraryBase.php +++ b/src/SPC/builder/LibraryBase.php @@ -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!!!'); }