mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 00:35:41 +08:00
Merge branch 'main' into php-85
# Conflicts: # src/SPC/builder/linux/LinuxBuilder.php # src/SPC/store/source/PhpSource.php # src/globals/test-extensions.php
This commit is contained in:
@@ -8,10 +8,10 @@ int main(int argc,char **argv){
|
||||
|
||||
zend_stream_init_filename(&file_handle,"embed.php");
|
||||
|
||||
if(php_execute_script(&file_handle) == FAILURE){
|
||||
if(!php_execute_script(&file_handle)){
|
||||
php_printf("Failed to execute PHP script.\n");
|
||||
}
|
||||
|
||||
PHP_EMBED_END_BLOCK()
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,3 +242,14 @@ function get_pack_replace(): array
|
||||
BUILD_ROOT_PATH => '@build_root_path@',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove duplicate spaces from a string.
|
||||
*
|
||||
* @param string $string Input string that may contain unnecessary spaces (e.g., " -la -lb").
|
||||
* @return string The trimmed string with only single spaces (e.g., "-la -lb").
|
||||
*/
|
||||
function clean_spaces(string $string): string
|
||||
{
|
||||
return trim(preg_replace('/\s+/', ' ', $string));
|
||||
}
|
||||
|
||||
19
src/globals/patch/swoole_fix_date_time.patch
Normal file
19
src/globals/patch/swoole_fix_date_time.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
--- a/config.m4
|
||||
+++ b/config.m4
|
||||
@@ -426,6 +426,7 @@
|
||||
AX_CHECK_COMPILE_FLAG(-Wlogical-op-parentheses, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wlogical-op-parentheses")
|
||||
AX_CHECK_COMPILE_FLAG(-Wloop-analysis, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wloop-analysis")
|
||||
AX_CHECK_COMPILE_FLAG(-Wuninitialized, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wuninitialized")
|
||||
+ AX_CHECK_COMPILE_FLAG(-Wno-date-time, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-date-time")
|
||||
AX_CHECK_COMPILE_FLAG(-Wno-missing-field-initializers, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-missing-field-initializers")
|
||||
AX_CHECK_COMPILE_FLAG(-Wno-sign-compare, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-sign-compare")
|
||||
AX_CHECK_COMPILE_FLAG(-Wno-unused-const-variable, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-unused-const-variable")
|
||||
@@ -1307,7 +1308,7 @@
|
||||
|
||||
PHP_REQUIRE_CXX()
|
||||
|
||||
- CXXFLAGS="$CXXFLAGS -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations"
|
||||
+ CXXFLAGS="$CXXFLAGS -Wall -Wno-date-time -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations"
|
||||
|
||||
if test "$SW_OS" = "CYGWIN" || test "$SW_OS" = "MINGW"; then
|
||||
CXXFLAGS="$CXXFLAGS -std=gnu++14"
|
||||
@@ -73,7 +73,7 @@ $with_libs = match (PHP_OS_FAMILY) {
|
||||
// You can use `common`, `bulk`, `minimal` or `none`.
|
||||
// note: combination is only available for *nix platform. Windows must use `none` combination
|
||||
$base_combination = match (PHP_OS_FAMILY) {
|
||||
'Linux', 'Darwin' => 'minimal',
|
||||
'Linux', 'Darwin' => 'none',
|
||||
'Windows' => 'none',
|
||||
};
|
||||
|
||||
@@ -157,6 +157,9 @@ if ($shared_extensions) {
|
||||
case 'ubuntu-22.04-arm':
|
||||
$shared_cmd = ' --build-shared=' . quote2($shared_extensions) . ' ';
|
||||
break;
|
||||
case 'ubuntu-24.04':
|
||||
case 'ubuntu-24.04-arm':
|
||||
break;
|
||||
case 'macos-13':
|
||||
case 'macos-14':
|
||||
case 'macos-15':
|
||||
|
||||
Reference in New Issue
Block a user