Add support for package environment variables and path injection

This commit is contained in:
crazywhalecc
2026-03-20 09:30:34 +08:00
parent beeb0b8721
commit b0522205da
3 changed files with 45 additions and 0 deletions

View File

@@ -40,6 +40,9 @@ class ConfigValidator
'static-libs' => ConfigType::LIST_ARRAY, // @
'pkg-configs' => ConfigType::LIST_ARRAY,
'static-bins' => ConfigType::LIST_ARRAY, // @
'path' => ConfigType::LIST_ARRAY, // @
'env' => ConfigType::ASSOC_ARRAY, // @
'append-env' => ConfigType::ASSOC_ARRAY, // @
];
public const array PACKAGE_FIELDS = [
@@ -60,6 +63,9 @@ class ConfigValidator
'static-libs' => false, // @
'pkg-configs' => false,
'static-bins' => false, // @
'path' => false, // @
'env' => false, // @
'append-env' => false, // @
];
public const array SUFFIX_ALLOWED_FIELDS = [
@@ -68,6 +74,9 @@ class ConfigValidator
'headers',
'static-libs',
'static-bins',
'path',
'env',
'append-env',
];
public const array PHP_EXTENSION_FIELDS = [