mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
--with github.com/dunglas/caddy-cbrotli requires brotli
This commit is contained in:
parent
d635b10e24
commit
d094824d76
@ -43,7 +43,7 @@ SPC_SKIP_PHP_VERSION_CHECK="no"
|
|||||||
; Ignore some check item for bin/spc doctor command, comma separated (e.g. SPC_SKIP_DOCTOR_CHECK_ITEMS="if homebrew has installed")
|
; Ignore some check item for bin/spc doctor command, comma separated (e.g. SPC_SKIP_DOCTOR_CHECK_ITEMS="if homebrew has installed")
|
||||||
SPC_SKIP_DOCTOR_CHECK_ITEMS=""
|
SPC_SKIP_DOCTOR_CHECK_ITEMS=""
|
||||||
; extra modules that xcaddy will include in the FrankenPHP build
|
; extra modules that xcaddy will include in the FrankenPHP build
|
||||||
SPC_CMD_VAR_FRANKENPHP_XCADDY_MODULES="--with github.com/dunglas/mercure/caddy --with github.com/dunglas/vulcain/caddy --with github.com/dunglas/caddy-cbrotli"
|
SPC_CMD_VAR_FRANKENPHP_XCADDY_MODULES="--with github.com/dunglas/mercure/caddy --with github.com/dunglas/vulcain/caddy"
|
||||||
|
|
||||||
; EXTENSION_DIR where the built php will look for extension when a .ini instructs to load them
|
; EXTENSION_DIR where the built php will look for extension when a .ini instructs to load them
|
||||||
; only useful for builds targeting not pure-static linking
|
; only useful for builds targeting not pure-static linking
|
||||||
|
|||||||
@ -292,6 +292,10 @@ abstract class UnixBuilderBase extends BuilderBase
|
|||||||
$watcherLibs = $this->getLib('watcher') !== null ? '-lwatcher-c' : '';
|
$watcherLibs = $this->getLib('watcher') !== null ? '-lwatcher-c' : '';
|
||||||
$nobrotli = $this->getLib('brotli') === null ? ',nobrotli' : '';
|
$nobrotli = $this->getLib('brotli') === null ? ',nobrotli' : '';
|
||||||
$nowatcher = $this->getLib('watcher') === null ? ',nowatcher' : '';
|
$nowatcher = $this->getLib('watcher') === null ? ',nowatcher' : '';
|
||||||
|
$xcaddyModules = getenv('SPC_CMD_VAR_FRANKENPHP_XCADDY_MODULES');
|
||||||
|
if ($this->getLib('brotli') !== null && !str_contains($xcaddyModules, '--with github.com/dunglas/caddy-cbrotli')) {
|
||||||
|
$xcaddyModules .= ' --with github.com/dunglas/caddy-cbrotli';
|
||||||
|
}
|
||||||
|
|
||||||
$env = [
|
$env = [
|
||||||
'CGO_ENABLED' => '1',
|
'CGO_ENABLED' => '1',
|
||||||
@ -302,11 +306,6 @@ abstract class UnixBuilderBase extends BuilderBase
|
|||||||
];
|
];
|
||||||
shell()->cd(BUILD_BIN_PATH)
|
shell()->cd(BUILD_BIN_PATH)
|
||||||
->setEnv($env)
|
->setEnv($env)
|
||||||
->exec(
|
->exec('xcaddy build --output frankenphp --with github.com/dunglas/frankenphp/caddy ' . $xcaddyModules);
|
||||||
'xcaddy build ' .
|
|
||||||
'--output frankenphp ' .
|
|
||||||
'--with github.com/dunglas/frankenphp/caddy ' .
|
|
||||||
getenv('SPC_CMD_VAR_FRANKENPHP_XCADDY_MODULES')
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user