mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
Add support for re2c in tool checklists and environment setup
This commit is contained in:
parent
973c8f082f
commit
0696acb9c5
@ -104,6 +104,7 @@ RUN apk update; \
|
|||||||
m4 \
|
m4 \
|
||||||
make \
|
make \
|
||||||
pkgconfig \
|
pkgconfig \
|
||||||
|
re2c \
|
||||||
wget \
|
wget \
|
||||||
xz \
|
xz \
|
||||||
gettext-dev \
|
gettext-dev \
|
||||||
|
|||||||
@ -16,7 +16,7 @@ class LinuxToolCheckList
|
|||||||
use UnixSystemUtilTrait;
|
use UnixSystemUtilTrait;
|
||||||
|
|
||||||
public const TOOLS_ALPINE = [
|
public const TOOLS_ALPINE = [
|
||||||
'make', 'bison', 'flex',
|
'make', 'bison', 're2c', 'flex',
|
||||||
'git', 'autoconf', 'automake', 'gettext-dev',
|
'git', 'autoconf', 'automake', 'gettext-dev',
|
||||||
'tar', 'unzip', 'gzip',
|
'tar', 'unzip', 'gzip',
|
||||||
'bzip2', 'cmake', 'gcc',
|
'bzip2', 'cmake', 'gcc',
|
||||||
@ -26,7 +26,7 @@ class LinuxToolCheckList
|
|||||||
];
|
];
|
||||||
|
|
||||||
public const TOOLS_DEBIAN = [
|
public const TOOLS_DEBIAN = [
|
||||||
'make', 'bison', 'flex',
|
'make', 'bison', 're2c', 'flex',
|
||||||
'git', 'autoconf', 'automake', 'autopoint',
|
'git', 'autoconf', 'automake', 'autopoint',
|
||||||
'tar', 'unzip', 'gzip',
|
'tar', 'unzip', 'gzip',
|
||||||
'bzip2', 'cmake', 'patch',
|
'bzip2', 'cmake', 'patch',
|
||||||
@ -35,7 +35,7 @@ class LinuxToolCheckList
|
|||||||
];
|
];
|
||||||
|
|
||||||
public const TOOLS_RHEL = [
|
public const TOOLS_RHEL = [
|
||||||
'perl', 'make', 'bison', 'flex',
|
'perl', 'make', 'bison', 're2c', 'flex',
|
||||||
'git', 'autoconf', 'automake',
|
'git', 'autoconf', 'automake',
|
||||||
'tar', 'unzip', 'gzip', 'gcc',
|
'tar', 'unzip', 'gzip', 'gcc',
|
||||||
'bzip2', 'cmake', 'patch', 'which',
|
'bzip2', 'cmake', 'patch', 'which',
|
||||||
|
|||||||
@ -19,6 +19,7 @@ class MacOSToolCheckList
|
|||||||
'curl',
|
'curl',
|
||||||
'make',
|
'make',
|
||||||
'bison',
|
'bison',
|
||||||
|
're2c',
|
||||||
'flex',
|
'flex',
|
||||||
'pkg-config',
|
'pkg-config',
|
||||||
'git',
|
'git',
|
||||||
|
|||||||
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace SPC\util;
|
namespace SPC\util;
|
||||||
|
|
||||||
|
use SPC\builder\macos\SystemUtil;
|
||||||
use SPC\exception\RuntimeException;
|
use SPC\exception\RuntimeException;
|
||||||
use SPC\exception\WrongUsageException;
|
use SPC\exception\WrongUsageException;
|
||||||
use SPC\toolchain\ToolchainManager;
|
use SPC\toolchain\ToolchainManager;
|
||||||
@ -111,6 +112,15 @@ class GlobalEnvManager
|
|||||||
if (!filter_var(getenv('SPC_SKIP_TOOLCHAIN_CHECK'), FILTER_VALIDATE_BOOL)) {
|
if (!filter_var(getenv('SPC_SKIP_TOOLCHAIN_CHECK'), FILTER_VALIDATE_BOOL)) {
|
||||||
ToolchainManager::afterInitToolchain();
|
ToolchainManager::afterInitToolchain();
|
||||||
}
|
}
|
||||||
|
// test bison
|
||||||
|
if (PHP_OS_FAMILY === 'Darwin') {
|
||||||
|
if ($bison = SystemUtil::findCommand('bison', ['/opt/homebrew/opt/bison/bin', '/usr/local/homebrew/opt/bison/bin'])) {
|
||||||
|
self::putenv("BISON={$bison}");
|
||||||
|
}
|
||||||
|
if ($yacc = SystemUtil::findCommand('yacc', ['/opt/homebrew/opt/bison/bin', '/usr/local/homebrew/opt/bison/bin'])) {
|
||||||
|
self::putenv("YACC={$yacc}");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user