From be51bcfdfc3c9c829b5f157bb29d397edd52ae0c Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 24 Oct 2025 13:55:33 +0800 Subject: [PATCH] Fix libevent build, use newer cmake options --- src/SPC/doctor/item/LinuxToolCheckList.php | 4 ++-- src/SPC/util/executor/UnixCMakeExecutor.php | 2 +- src/globals/test-extensions.php | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/SPC/doctor/item/LinuxToolCheckList.php b/src/SPC/doctor/item/LinuxToolCheckList.php index 2f6e866d..a23ad6d5 100644 --- a/src/SPC/doctor/item/LinuxToolCheckList.php +++ b/src/SPC/doctor/item/LinuxToolCheckList.php @@ -82,14 +82,14 @@ class LinuxToolCheckList return CheckResult::ok(); } - #[AsCheckItem('if cmake version >= 3.18', limit_os: 'Linux')] + #[AsCheckItem('if cmake version >= 3.22', limit_os: 'Linux')] public function checkCMakeVersion(): ?CheckResult { $ver = get_cmake_version(); if ($ver === null) { return CheckResult::fail('Failed to get cmake version'); } - if (version_compare($ver, '3.18.0') < 0) { + if (version_compare($ver, '3.22.0') < 0) { return CheckResult::fail('cmake version is too low (' . $ver . '), please update it manually!'); } return CheckResult::ok($ver); diff --git a/src/SPC/util/executor/UnixCMakeExecutor.php b/src/SPC/util/executor/UnixCMakeExecutor.php index 3e29addf..eceab901 100644 --- a/src/SPC/util/executor/UnixCMakeExecutor.php +++ b/src/SPC/util/executor/UnixCMakeExecutor.php @@ -205,7 +205,7 @@ SET(CMAKE_INSTALL_PREFIX "{$root}") SET(CMAKE_INSTALL_LIBDIR "lib") set(PKG_CONFIG_EXECUTABLE "{$pkgConfigExecutable}") -list(APPEND PKG_CONFIG_EXECUTABLE "--static") +set(PKG_CONFIG_ARGN "--static" CACHE STRING "Extra arguments for pkg-config" FORCE) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index ad814c0d..ade41c32 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -13,10 +13,10 @@ declare(strict_types=1); // test php version (8.1 ~ 8.4 available, multiple for matrix) $test_php_version = [ - // '8.1', + '8.1', // '8.2', // '8.3', - '8.4', + // '8.4', // '8.5', // 'git', ]; @@ -25,7 +25,7 @@ $test_php_version = [ $test_os = [ 'macos-15-intel', // bin/spc for x86_64 'macos-15', // bin/spc for arm64 - // 'ubuntu-latest', // bin/spc-alpine-docker for x86_64 + 'ubuntu-latest', // bin/spc-alpine-docker for x86_64 'ubuntu-22.04', // bin/spc-gnu-docker for x86_64 'ubuntu-24.04', // bin/spc for x86_64 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64 @@ -49,14 +49,14 @@ $prefer_pre_built = false; // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'spx', + 'Linux', 'Darwin' => 'event', 'Windows' => 'bcmath,bz2,calendar,ctype,curl,dom,exif,fileinfo,filter,ftp,iconv,xml,mbstring,mbregex,mysqlnd,openssl,pdo,pdo_mysql,pdo_sqlite,phar,session,simplexml,soap,sockets,sqlite3,tokenizer,xmlwriter,xmlreader,zlib,zip', }; // If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`). $shared_extensions = match (PHP_OS_FAMILY) { - 'Linux' => 'mysqli', - 'Darwin' => 'zip', + 'Linux' => '', + 'Darwin' => '', 'Windows' => '', };