mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Merge branch 'main' into feat/cgi
This commit is contained in:
commit
166f3de52f
@ -379,6 +379,11 @@ const craftCommandString = computed(() => {
|
|||||||
str += 'debug: true\n';
|
str += 'debug: true\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (preBuilt.value) {
|
||||||
|
str += 'download-options:\n';
|
||||||
|
str += ' prefer-pre-built: true\n';
|
||||||
|
}
|
||||||
|
|
||||||
str += '{{position_hold}}';
|
str += '{{position_hold}}';
|
||||||
|
|
||||||
if (enableUPX.value) {
|
if (enableUPX.value) {
|
||||||
@ -387,9 +392,6 @@ const craftCommandString = computed(() => {
|
|||||||
if (zts.value) {
|
if (zts.value) {
|
||||||
str += ' enable-zts: true\n';
|
str += ' enable-zts: true\n';
|
||||||
}
|
}
|
||||||
if (preBuilt.value) {
|
|
||||||
str += ' prefer-pre-built: true\n';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!str.endsWith('{{position_hold}}')) {
|
if (!str.endsWith('{{position_hold}}')) {
|
||||||
str = str.replace('{{position_hold}}', 'build-options:\n');
|
str = str.replace('{{position_hold}}', 'build-options:\n');
|
||||||
|
|||||||
@ -9,6 +9,7 @@ parameters:
|
|||||||
- '#Attribute class JetBrains\\PhpStorm\\ArrayShape does not exist#'
|
- '#Attribute class JetBrains\\PhpStorm\\ArrayShape does not exist#'
|
||||||
- '#Function Swoole\\Coroutine\\run not found.#'
|
- '#Function Swoole\\Coroutine\\run not found.#'
|
||||||
- '#Static call to instance method ZM\\Logger\\ConsoleColor#'
|
- '#Static call to instance method ZM\\Logger\\ConsoleColor#'
|
||||||
|
- '#Constant GNU_ARCH not found#'
|
||||||
dynamicConstantNames:
|
dynamicConstantNames:
|
||||||
- PHP_OS_FAMILY
|
- PHP_OS_FAMILY
|
||||||
excludePaths:
|
excludePaths:
|
||||||
|
|||||||
@ -34,7 +34,7 @@ use Symfony\Component\Console\Application;
|
|||||||
*/
|
*/
|
||||||
final class ConsoleApplication extends Application
|
final class ConsoleApplication extends Application
|
||||||
{
|
{
|
||||||
public const string VERSION = '2.7.2';
|
public const string VERSION = '2.7.3';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -268,11 +268,8 @@ abstract class UnixBuilderBase extends BuilderBase
|
|||||||
logger()->warning('caddy-cbrotli module is enabled, but brotli library is not built. Disabling caddy-cbrotli.');
|
logger()->warning('caddy-cbrotli module is enabled, but brotli library is not built. Disabling caddy-cbrotli.');
|
||||||
$xcaddyModules = str_replace('--with github.com/dunglas/caddy-cbrotli', '', $xcaddyModules);
|
$xcaddyModules = str_replace('--with github.com/dunglas/caddy-cbrotli', '', $xcaddyModules);
|
||||||
}
|
}
|
||||||
$releaseInfo = json_decode(Downloader::curlExec(
|
[, $out] = shell()->execWithResult('go list -m github.com/dunglas/frankenphp@latest');
|
||||||
'https://api.github.com/repos/php/frankenphp/releases/latest',
|
$frankenPhpVersion = str_replace('github.com/dunglas/frankenphp v', '', $out[0]);
|
||||||
hooks: [[CurlHook::class, 'setupGithubToken']],
|
|
||||||
), true);
|
|
||||||
$frankenPhpVersion = $releaseInfo['tag_name'];
|
|
||||||
$libphpVersion = $this->getPHPVersion();
|
$libphpVersion = $this->getPHPVersion();
|
||||||
$dynamic_exports = '';
|
$dynamic_exports = '';
|
||||||
if (getenv('SPC_CMD_VAR_PHP_EMBED_TYPE') === 'shared') {
|
if (getenv('SPC_CMD_VAR_PHP_EMBED_TYPE') === 'shared') {
|
||||||
|
|||||||
@ -4,18 +4,29 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace SPC\builder\unix\library;
|
namespace SPC\builder\unix\library;
|
||||||
|
|
||||||
|
use SPC\exception\WrongUsageException;
|
||||||
use SPC\util\executor\UnixAutoconfExecutor;
|
use SPC\util\executor\UnixAutoconfExecutor;
|
||||||
|
|
||||||
trait unixodbc
|
trait unixodbc
|
||||||
{
|
{
|
||||||
protected function build(): void
|
protected function build(): void
|
||||||
{
|
{
|
||||||
|
$sysconf_selector = match (PHP_OS_FAMILY) {
|
||||||
|
'Darwin' => match (GNU_ARCH) {
|
||||||
|
'x86_64' => '/usr/local/etc',
|
||||||
|
'aarch64' => '/opt/homebrew/etc',
|
||||||
|
default => throw new WrongUsageException('Unsupported architecture: ' . GNU_ARCH),
|
||||||
|
},
|
||||||
|
'Linux' => '/etc',
|
||||||
|
default => throw new WrongUsageException('Unsupported OS: ' . PHP_OS_FAMILY),
|
||||||
|
};
|
||||||
UnixAutoconfExecutor::create($this)
|
UnixAutoconfExecutor::create($this)
|
||||||
->configure(
|
->configure(
|
||||||
'--disable-debug',
|
'--disable-debug',
|
||||||
'--disable-dependency-tracking',
|
'--disable-dependency-tracking',
|
||||||
"--with-libiconv-prefix={$this->getBuildRootPath()}",
|
"--with-libiconv-prefix={$this->getBuildRootPath()}",
|
||||||
'--with-included-ltdl',
|
'--with-included-ltdl',
|
||||||
|
"--sysconfdir={$sysconf_selector}",
|
||||||
'--enable-gui=no',
|
'--enable-gui=no',
|
||||||
)
|
)
|
||||||
->make();
|
->make();
|
||||||
|
|||||||
@ -43,7 +43,7 @@ $no_strip = false;
|
|||||||
$upx = false;
|
$upx = false;
|
||||||
|
|
||||||
// whether to test frankenphp build, only available for macos and linux
|
// whether to test frankenphp build, only available for macos and linux
|
||||||
$frankenphp = false;
|
$frankenphp = true;
|
||||||
|
|
||||||
// prefer downloading pre-built packages to speed up the build process
|
// prefer downloading pre-built packages to speed up the build process
|
||||||
$prefer_pre_built = false;
|
$prefer_pre_built = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user