diff --git a/src/SPC/builder/linux/library/liburing.php b/src/SPC/builder/linux/library/liburing.php index 9ed416a9..668659ec 100644 --- a/src/SPC/builder/linux/library/liburing.php +++ b/src/SPC/builder/linux/library/liburing.php @@ -54,6 +54,6 @@ class liburing extends LinuxLibraryBase ->make('library', with_clean: false) ->exec("rm -rf {$this->getLibDir()}/liburing*.so*"); - $this->patchPkgconfPrefix(['liburing.pc', 'liburing-ffi.pc']); + $this->patchPkgconfPrefix(); } } diff --git a/src/SPC/builder/unix/UnixBuilderBase.php b/src/SPC/builder/unix/UnixBuilderBase.php index 5f4f8223..c09a9e1b 100644 --- a/src/SPC/builder/unix/UnixBuilderBase.php +++ b/src/SPC/builder/unix/UnixBuilderBase.php @@ -284,6 +284,7 @@ abstract class UnixBuilderBase extends BuilderBase $cflags = "{$this->arch_c_flags} {$config['cflags']} " . getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'); $libs = $config['libs']; $libs .= PHP_OS_FAMILY === 'Linux' ? ' -lrt' : ''; + // Go's gcc driver doesn't automatically link against -lgcov or -lrt. Ugly, but necessary fix. if ((str_contains((string) getenv('SPC_DEFAULT_C_FLAGS'), '-fprofile') || str_contains((string) getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS'), '-fprofile')) && ToolchainManager::getToolchainClass() === GccNativeToolchain::class) { diff --git a/src/SPC/command/BuildPHPCommand.php b/src/SPC/command/BuildPHPCommand.php index 18d582e4..fb14e47c 100644 --- a/src/SPC/command/BuildPHPCommand.php +++ b/src/SPC/command/BuildPHPCommand.php @@ -252,7 +252,7 @@ class BuildPHPCommand extends BuildCommand $path = FileSystem::convertPath("{$build_root_path}/modules/{$ext}.so"); if (file_exists(BUILD_MODULES_PATH . "/{$ext}.so")) { logger()->info("Shared extension [{$ext}] path{$fixed}: {$path}"); - } elseif (Config::getExt($ext, 'type', 'ext') !== 'addon') { + } elseif (Config::getExt($ext, 'type') !== 'addon') { logger()->warning("Shared extension [{$ext}] not found, please check!"); } } diff --git a/src/SPC/store/SourcePatcher.php b/src/SPC/store/SourcePatcher.php index 7cb416f7..01e16546 100644 --- a/src/SPC/store/SourcePatcher.php +++ b/src/SPC/store/SourcePatcher.php @@ -269,10 +269,12 @@ class SourcePatcher if ($version === '5.1.3') { self::patchFile('spc_fix_swoole_50513.patch', SOURCE_PATH . '/php-src/ext/swoole'); } - // remove when https://github.com/swoole/swoole-src/pull/5848 is merged - self::patchFile('swoole_fix_date_time.patch', SOURCE_PATH . '/php-src/ext/swoole'); - // remove when https://github.com/swoole/swoole-src/pull/5847 is merged - self::patchFile('swoole_fix_odbclibs.patch', SOURCE_PATH . '/php-src/ext/swoole'); + if (version_compare($version, '6.0.0', '>=') && version_compare($version, '6.1.0', '<')) { + // remove when https://github.com/swoole/swoole-src/pull/5848 is merged + self::patchFile('swoole_fix_date_time.patch', SOURCE_PATH . '/php-src/ext/swoole'); + // remove when https://github.com/swoole/swoole-src/pull/5847 is merged + self::patchFile('swoole_fix_odbclibs.patch', SOURCE_PATH . '/php-src/ext/swoole'); + } return true; }