diff --git a/src/SPC/builder/extension/swoole.php b/src/SPC/builder/extension/swoole.php index 4e292a36..86098ec5 100644 --- a/src/SPC/builder/extension/swoole.php +++ b/src/SPC/builder/extension/swoole.php @@ -50,19 +50,16 @@ class swoole extends Extension // commonly used feature: coroutine-time $arg .= ' --enable-swoole-coro-time --with-pic'; + $arg .= ' --enable-swoole-ssh --enable-swoole-curl'; $arg .= $this->builder->getOption('enable-zts') ? ' --enable-swoole-thread --disable-thread-context' : ' --disable-swoole-thread --enable-thread-context'; - // required features: curl, openssl (but curl hook is buggy for php 8.0) - $arg .= $this->builder->getPHPVersionID() >= 80100 ? ' --enable-swoole-curl' : ' --disable-swoole-curl'; - $arg .= ' --enable-openssl'; - // additional features that only require libraries $arg .= $this->builder->getLib('libcares') ? ' --enable-cares' : ''; $arg .= $this->builder->getLib('brotli') ? (' --enable-brotli --with-brotli-dir=' . BUILD_ROOT_PATH) : ''; $arg .= $this->builder->getLib('nghttp2') ? (' --with-nghttp2-dir=' . BUILD_ROOT_PATH) : ''; $arg .= $this->builder->getLib('zstd') ? ' --enable-zstd' : ''; - $arg .= $this->builder->getLib('liburing') ? ' --enable-iouring' : ''; + $arg .= $this->builder->getLib('liburing') ? ' --enable-iouring --enable-uring-socket' : ''; $arg .= $this->builder->getExt('sockets') ? ' --enable-sockets' : ''; // enable additional features that require the pdo extension, but conflict with pdo_* extensions @@ -74,6 +71,7 @@ class swoole extends Extension $config = (new SPCConfigUtil($this->builder))->getLibraryConfig($this->builder->getLib('unixodbc')); $arg .= ' --with-swoole-odbc=unixODBC,' . BUILD_ROOT_PATH . ' SWOOLE_ODBC_LIBS="' . $config['libs'] . '"'; } + $arg .= $this->builder->getExt('ftp')?->isBuildStatic() ? ' --disable-swoole-ftp' : ' --enable-swoole-ftp'; if ($this->getExtVersion() >= '6.1.0') { $arg .= ' --enable-swoole-stdext'; diff --git a/src/SPC/builder/unix/library/unixodbc.php b/src/SPC/builder/unix/library/unixodbc.php index 9a3cb63d..cf923f24 100644 --- a/src/SPC/builder/unix/library/unixodbc.php +++ b/src/SPC/builder/unix/library/unixodbc.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace SPC\builder\unix\library; use SPC\exception\WrongUsageException; +use SPC\store\FileSystem; use SPC\util\executor\UnixAutoconfExecutor; trait unixodbc @@ -30,7 +31,15 @@ trait unixodbc '--enable-gui=no', ) ->make(); - $this->patchPkgconfPrefix(['odbc.pc', 'odbccr.pc', 'odbcinst.pc']); + $pkgConfigs = ['odbc.pc', 'odbccr.pc', 'odbcinst.pc']; + $this->patchPkgconfPrefix($pkgConfigs); + foreach ($pkgConfigs as $file) { + FileSystem::replaceFileStr( + BUILD_LIB_PATH . "/pkgconfig/{$file}", + '$(top_build_prefix)libltdl/libltdlc.la', + '' + ); + } $this->patchLaDependencyPrefix(); } } diff --git a/src/SPC/command/DownloadCommand.php b/src/SPC/command/DownloadCommand.php index 00bcc194..b7f2b078 100644 --- a/src/SPC/command/DownloadCommand.php +++ b/src/SPC/command/DownloadCommand.php @@ -30,7 +30,7 @@ class DownloadCommand extends BaseCommand $this->addArgument('sources', InputArgument::REQUIRED, 'The sources will be compiled, comma separated'); $this->addOption('shallow-clone', null, null, 'Clone shallow'); $this->addOption('with-openssl11', null, null, 'Use openssl 1.1'); - $this->addOption('with-php', null, InputOption::VALUE_REQUIRED, 'version in major.minor format (default 8.4)', '8.4'); + $this->addOption('with-php', null, InputOption::VALUE_REQUIRED, 'version in major.minor format (default 8.5)', '8.5'); $this->addOption('clean', null, null, 'Clean old download cache and source before fetch'); $this->addOption('all', 'A', null, 'Fetch all sources that static-php-cli needed'); $this->addOption('custom-url', 'U', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Specify custom source download url, e.g "php-src:https://downloads.php.net/~eric/php-8.3.0beta1.tar.gz"'); diff --git a/src/SPC/store/source/PhpSource.php b/src/SPC/store/source/PhpSource.php index 02ba8755..bf33d6b7 100644 --- a/src/SPC/store/source/PhpSource.php +++ b/src/SPC/store/source/PhpSource.php @@ -20,7 +20,7 @@ class PhpSource extends CustomSourceBase public function fetch(bool $force = false, ?array $config = null, int $lock_as = SPC_DOWNLOAD_SOURCE): void { - $major = defined('SPC_BUILD_PHP_VERSION') ? SPC_BUILD_PHP_VERSION : '8.4'; + $major = defined('SPC_BUILD_PHP_VERSION') ? SPC_BUILD_PHP_VERSION : '8.5'; if ($major === 'git') { Downloader::downloadSource('php-src', ['type' => 'git', 'url' => 'https://github.com/php/php-src.git', 'rev' => 'master'], $force); } else { diff --git a/src/SPC/util/ConfigValidator.php b/src/SPC/util/ConfigValidator.php index 445c6242..d9f751ef 100644 --- a/src/SPC/util/ConfigValidator.php +++ b/src/SPC/util/ConfigValidator.php @@ -393,7 +393,7 @@ class ConfigValidator } // check php-version if (isset($craft['php-version'])) { - // validdate version, accept 8.x, 7.x, 8.x.x, 7.x.x, 8, 7 + // validate version, accept 8.x, 7.x, 8.x.x, 7.x.x, 8, 7 $version = strval($craft['php-version']); if (!preg_match('/^(\d+)(\.\d+)?(\.\d+)?$/', $version, $matches)) { throw new ValidationException('Craft file php-version is invalid'); diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index bfae094a..3af2b55d 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -50,7 +50,7 @@ $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' => 'grpc', + 'Linux', 'Darwin' => 'pdo_odbc', 'Windows' => 'com_dotnet', }; @@ -74,7 +74,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' => 'bulk', 'Windows' => 'none', }; @@ -89,7 +89,7 @@ function _getCombination(string $type = 'common'): string 'common' => 'bcmath,bz2,calendar,ctype,curl,dom,exif,fileinfo,filter,ftp,gd,gmp,iconv,xml,mbstring,mbregex,' . 'mysqlnd,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,redis,session,simplexml,soap,sockets,' . 'sqlite3,tokenizer,xmlwriter,xmlreader,zlib,zip', - 'bulk' => 'apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,event,exif,fileinfo,filter,ftp,gd,gmp,iconv,imagick,imap,' . + 'bulk' => 'apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,event,exif,fileinfo,filter,ftp,gd,gmp,iconv,imagick,' . 'intl,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pcntl,pdo,pdo_mysql,pdo_pgsql,pdo_sqlite,pgsql,phar,' . 'posix,protobuf,readline,redis,session,shmop,simplexml,soap,sockets,sodium,sqlite3,swoole,sysvmsg,sysvsem,' . 'sysvshm,tokenizer,xml,xmlreader,xmlwriter,xsl,zip,zlib',