mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 05:14:52 +08:00
don't add configure command to phpinfo when -release is set
This commit is contained in:
parent
0a24a6af1f
commit
d249391816
@ -214,6 +214,19 @@ abstract class LibraryBase
|
|||||||
*/
|
*/
|
||||||
public function tryBuild(bool $force_build = false): int
|
public function tryBuild(bool $force_build = false): int
|
||||||
{
|
{
|
||||||
|
if (str_contains((string) getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS'), '-release')) {
|
||||||
|
FileSystem::replaceFileLineContainsString(
|
||||||
|
SOURCE_PATH . '/php-src/ext/standard/info.c',
|
||||||
|
'#ifdef CONFIGURE_COMMAND',
|
||||||
|
'#ifdef NO_CONFIGURE_COMMAND',
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
FileSystem::replaceFileLineContainsString(
|
||||||
|
SOURCE_PATH . '/php-src/ext/standard/info.c',
|
||||||
|
'#ifdef NO_CONFIGURE_COMMAND',
|
||||||
|
'#ifdef CONFIGURE_COMMAND',
|
||||||
|
);
|
||||||
|
}
|
||||||
if (file_exists($this->source_dir . '/.spc.patched')) {
|
if (file_exists($this->source_dir . '/.spc.patched')) {
|
||||||
$this->patched = true;
|
$this->patched = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user