Allow all types of package can be built

This commit is contained in:
crazywhalecc
2025-12-08 16:59:38 +08:00
parent 11e7a590c8
commit 321f2e13e8
2 changed files with 17 additions and 17 deletions

View File

@@ -13,23 +13,6 @@ use StaticPHP\Util\FileSystem;
*/
class LibraryPackage extends Package
{
/** @var array<string, callable> $build_functions Build functions for different OS binding */
protected array $build_functions = [];
/**
* Add a build function for a specific platform.
*
* @param string $platform PHP_OS_FAMILY
* @param callable $func Function to build for the platform
*/
public function addBuildFunction(string $platform, callable $func): void
{
$this->build_functions[$platform] = $func;
if ($platform === PHP_OS_FAMILY) {
$this->addStage('build', $func);
}
}
public function isInstalled(): bool
{
foreach (PackageConfig::get($this->getName(), 'static-libs', []) as $lib) {