mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
replace root cause of the automatic enable
This commit is contained in:
parent
fa285ecc82
commit
c43423a7d0
@ -30,15 +30,6 @@ class readline extends Extension
|
|||||||
return '--without-libedit --with-readline=' . BUILD_ROOT_PATH;
|
return '--without-libedit --with-readline=' . BUILD_ROOT_PATH;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function patchBeforeSharedConfigure(): bool
|
|
||||||
{
|
|
||||||
FileSystem::replaceFileStr($this->source_dir . '/configure',
|
|
||||||
'test "$PHP_LIBEDIT" = "no" && PHP_LIBEDIT=yes',
|
|
||||||
''
|
|
||||||
);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function buildUnixShared(): void
|
public function buildUnixShared(): void
|
||||||
{
|
{
|
||||||
if (!file_exists(BUILD_BIN_PATH . '/php') || !file_exists(BUILD_INCLUDE_PATH . '/php/sapi/cli/cli.h')) {
|
if (!file_exists(BUILD_BIN_PATH . '/php') || !file_exists(BUILD_INCLUDE_PATH . '/php/sapi/cli/cli.h')) {
|
||||||
|
|||||||
@ -184,6 +184,7 @@ class LinuxBuilder extends UnixBuilderBase
|
|||||||
shell()->cd(SOURCE_PATH . '/php-src')
|
shell()->cd(SOURCE_PATH . '/php-src')
|
||||||
->exec(
|
->exec(
|
||||||
getenv('SPC_CMD_PREFIX_PHP_CONFIGURE') . ' ' .
|
getenv('SPC_CMD_PREFIX_PHP_CONFIGURE') . ' ' .
|
||||||
|
'--prefix=' . BUILD_ROOT_PATH . ' ' .
|
||||||
($enable_cli ? '--enable-cli ' : '--disable-cli ') .
|
($enable_cli ? '--enable-cli ' : '--disable-cli ') .
|
||||||
($enable_fpm ? '--enable-fpm ' . ($this->getLib('libacl') !== null ? '--with-fpm-acl ' : '') : '--disable-fpm ') .
|
($enable_fpm ? '--enable-fpm ' . ($this->getLib('libacl') !== null ? '--with-fpm-acl ' : '') : '--disable-fpm ') .
|
||||||
($enable_embed ? "--enable-embed={$embed_type} " : '--disable-embed ') .
|
($enable_embed ? "--enable-embed={$embed_type} " : '--disable-embed ') .
|
||||||
|
|||||||
@ -250,6 +250,7 @@ abstract class UnixBuilderBase extends BuilderBase
|
|||||||
logger()->debug('Patching phpize prefix');
|
logger()->debug('Patching phpize prefix');
|
||||||
FileSystem::replaceFileStr(BUILD_BIN_PATH . '/phpize', "prefix=''", "prefix='" . BUILD_ROOT_PATH . "'");
|
FileSystem::replaceFileStr(BUILD_BIN_PATH . '/phpize', "prefix=''", "prefix='" . BUILD_ROOT_PATH . "'");
|
||||||
FileSystem::replaceFileStr(BUILD_BIN_PATH . '/phpize', 's##', 's#/usr/local#');
|
FileSystem::replaceFileStr(BUILD_BIN_PATH . '/phpize', 's##', 's#/usr/local#');
|
||||||
|
FileSystem::replaceFileStr(BUILD_LIB_PATH . '/php/build/phpize.m4', 'test "[$]$1" = "no" && $1=yes', '# test "[$]$1" = "no" && $1=yes');
|
||||||
}
|
}
|
||||||
// patch php-config
|
// patch php-config
|
||||||
if (file_exists(BUILD_BIN_PATH . '/php-config')) {
|
if (file_exists(BUILD_BIN_PATH . '/php-config')) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user