mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 00:35:41 +08:00
Add libtiff support (#361)
* add libtiff support * fix command option not working on *nix * fix test with libs ext test
This commit is contained in:
@@ -13,13 +13,13 @@ declare(strict_types=1);
|
||||
|
||||
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
||||
$extensions = match (PHP_OS_FAMILY) {
|
||||
'Linux', 'Darwin' => 'pgsql,pdo_pgsql',
|
||||
'Linux', 'Darwin' => 'imagick,zstd,bz2,zip,xml,dom',
|
||||
'Windows' => 'mbstring,pdo_sqlite,mbregex,ffi',
|
||||
};
|
||||
|
||||
// If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).
|
||||
$with_libs = match (PHP_OS_FAMILY) {
|
||||
'Linux', 'Darwin' => '',
|
||||
'Linux', 'Darwin' => 'xz',
|
||||
'Windows' => '',
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ $with_libs = match (PHP_OS_FAMILY) {
|
||||
// You can use `common`, `bulk`, `minimal` or `none`.
|
||||
// note: combination is only available for *nix platform. Windows must use `none` combination
|
||||
$base_combination = match (PHP_OS_FAMILY) {
|
||||
'Linux', 'Darwin' => 'common',
|
||||
'Linux', 'Darwin' => 'minimal',
|
||||
'Windows' => 'none',
|
||||
};
|
||||
|
||||
@@ -62,6 +62,7 @@ $final_libs = trim($with_libs, $trim_value);
|
||||
|
||||
if (PHP_OS_FAMILY === 'Windows') {
|
||||
$final_extensions_cmd = '"' . $final_extensions . '"';
|
||||
$final_libs = $final_libs === '' ? '' : ('"' . $final_libs . '"');
|
||||
} else {
|
||||
$final_extensions_cmd = $final_extensions;
|
||||
}
|
||||
@@ -69,7 +70,7 @@ if (PHP_OS_FAMILY === 'Windows') {
|
||||
echo match ($argv[1]) {
|
||||
'extensions' => $final_extensions,
|
||||
'libs' => $final_libs,
|
||||
'libs_cmd' => ($final_libs === '' ? '' : (' --with-libs="' . $final_libs . '"')),
|
||||
'cmd' => $final_extensions_cmd . ($final_libs === '' ? '' : (' --with-libs="' . $final_libs . '"')),
|
||||
'libs_cmd' => ($final_libs === '' ? '' : (' --with-libs=' . $final_libs)),
|
||||
'cmd' => $final_extensions_cmd . ($final_libs === '' ? '' : (' --with-libs=' . $final_libs)),
|
||||
default => '',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user