add extra runtime objects for shared libraries built directly by php make too

This commit is contained in:
DubbleClick
2025-07-19 15:10:42 +07:00
parent fff23649cf
commit 01887d652c
13 changed files with 36 additions and 8 deletions

View File

@@ -26,6 +26,7 @@ class password_argon2 extends Extension
public function patchBeforeMake(): bool
{
$patched = parent::patchBeforeMake();
if ($this->builder->getLib('libsodium') !== null) {
$extraLibs = getenv('SPC_EXTRA_LIBS');
if ($extraLibs !== false) {
@@ -36,8 +37,9 @@ class password_argon2 extends Extension
);
$extraLibs = trim(preg_replace('/\s+/', ' ', $extraLibs)); // normalize spacing
f_putenv('SPC_EXTRA_LIBS=' . $extraLibs);
return true;
}
}
return false;
return $patched;
}
}