Add openssl lib support

This commit is contained in:
crazywhalecc
2026-01-26 00:46:42 +08:00
parent a709221223
commit ccd948e58a
8 changed files with 243 additions and 11 deletions

View File

@@ -7,6 +7,7 @@ namespace StaticPHP\Package;
use StaticPHP\Config\PackageConfig;
use StaticPHP\Exception\PatchException;
use StaticPHP\Util\FileSystem;
use StaticPHP\Util\SPCConfigUtil;
/**
* Represents a library package with platform-specific build functions.
@@ -159,6 +160,16 @@ class LibraryPackage extends Package
}
}
/**
* Get static library files for current package and its dependencies.
*/
public function getStaticLibFiles(): string
{
$config = new SPCConfigUtil(['libs_only_deps' => true, 'absolute_libs' => true]);
$res = $config->config([$this->getName()]);
return $res['libs'];
}
/**
* Get extra LIBS for current package.
* You need to define the environment variable in the format of {LIBRARY_NAME}_LIBS