Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
032016e
升级 zlib 扩展配置 (#1020)
jingjingxyk Nov 7, 2025
7c8d052
移除无效的代码
jingjingxyk Nov 9, 2025
4d2a2b9
imagemagick 使用libheif 支持 avif 图片格式
jingjingxyk Nov 11, 2025
1a91599
升级 curl openssl libidn2 nghttp2 nghttp3 libssh2 库 ,新增libpsl库 (#1021)
jingjingxyk Nov 11, 2025
67de194
add v6.1.1.0 ChangeLog and Tag info (#1022)
jingjingxyk Nov 11, 2025
37d22a4
pull main code
jingjingxyk Nov 12, 2025
a4dcf3c
merge code
jingjingxyk Nov 12, 2025
1738e41
add openjpeg
jingjingxyk Nov 12, 2025
1b5a5b2
update openjpeg
jingjingxyk Nov 12, 2025
4288c42
merge code
jingjingxyk Nov 12, 2025
0a7376b
merge code
jingjingxyk Nov 12, 2025
7436baa
update libx265
jingjingxyk Nov 12, 2025
ff9162f
update libheif lcms2 libraw 库配置
jingjingxyk Nov 12, 2025
bd3d253
update
jingjingxyk Nov 12, 2025
082deab
update
jingjingxyk Nov 12, 2025
9ea62dc
update make.php
jingjingxyk Nov 12, 2025
1f666c2
update make.php
jingjingxyk Nov 12, 2025
2c7aebb
update make.php
jingjingxyk Nov 12, 2025
a28753f
update make.php
jingjingxyk Nov 12, 2025
b8eccd8
update make.php
jingjingxyk Nov 12, 2025
c500e96
update make.php
jingjingxyk Nov 12, 2025
f076f0d
update linux workflow config
jingjingxyk Nov 12, 2025
5059436
update libx265 library
jingjingxyk Nov 12, 2025
1ba9af0
upgrade coscli to v1.0.7 (#1030)
jingjingxyk Nov 13, 2025
840c35a
update openh264 library
jingjingxyk Nov 13, 2025
c32c7d1
linux 环境下 添加可选项 启用 static-pie 链接参数
jingjingxyk Nov 13, 2025
c858ba4
添加下载pie.phar脚本
jingjingxyk Nov 13, 2025
bebbb26
添加下载pie.phar脚本
jingjingxyk Nov 13, 2025
0c1d531
update openh264 build config
jingjingxyk Nov 13, 2025
d08f4ff
merge code
jingjingxyk Nov 13, 2025
daf30e6
add -fPIE
jingjingxyk Nov 13, 2025
e4f7108
Merge branch 'feature-enable-pie' into experiment-feature
jingjingxyk Nov 13, 2025
f5c79ef
merge code
jingjingxyk Nov 13, 2025
0ca86d9
merge code
jingjingxyk Nov 13, 2025
504f55e
merge code
jingjingxyk Nov 13, 2025
95b121c
merge code
jingjingxyk Nov 13, 2025
1703ae3
fix merge code conflict
jingjingxyk Nov 13, 2025
3ed9929
fix merge code conflict
jingjingxyk Nov 13, 2025
f1bdf18
fix merge code conflict
jingjingxyk Nov 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linux-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
./thirdparty/php-src/sapi/cli/php --ri gd
./thirdparty/php-src/sapi/cli/php --ri swoole
./thirdparty/php-src/sapi/cli/php --ri pgsql
ldd ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php
{ ldd ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php } || { echo $? }
file ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php
readelf -h ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php
APP_VERSION=$(./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php -v | head -n 1 | awk '{print $2}')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ jobs:
./thirdparty/php-src/sapi/cli/php --ri swoole
./thirdparty/php-src/sapi/cli/php --ri pgsql
./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php -v
ldd ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php
{ ldd ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php } || { echo $? }
file ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php
readelf -h ./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php
APP_VERSION=$(./bin/php-${{ env.BUILD_PHP_VERSION }}/bin/php -v | head -n 1 | awk '{print $2}')
Expand Down
56 changes: 32 additions & 24 deletions docs/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
# [v6.1.0.0-rc1](https://github.com/swoole/swoole-cli/releases/tag/v6.1.0.0-rc1)
## v6.1.1.0

| item | value |
|----------------|--------------|
| branch | main |
| tag | v6.1.0.0-rc1 |
| swoole version | v6.1.0-rc1 |
| php version | 8.1.29 |
| release date | 2025-08-31 |
| status | ok |
### 新增

## [change info](https://github.com/swoole/swoole-cli/compare/v6.0.2.0...v6.1.0.0-rc1)
1. gcc 动态版的 swoole-cli
2. 新增 `random` 扩展
3. curl 启用 `libind2` 库,支持中文域名解析
4. curl 启用 `libpsl` 库,支持检查域名合法性

1. swoole version v6.0.2.0 upgrade to
v6.1.0.0-rc1 , [swoole v6.1.0-rc1 info](https://github.com/swoole/swoole-src/releases/tag/v6.1.0-rc1)
### 变更

# [v5.1.8.0](https://github.com/swoole/swoole-cli/releases/tag/v5.1.8.0)
1. PHP 版本由 `8.1` (8.1.29) 升级为 `8.4` (8.4.14)
2. github macos amd64 构建环境由 `macos-13` 升级为 `macos-15-intel`
3. github macos arm64 构建环境由 `macos-14` 升级为 `macos-15`
4. 扩展 `swoole` 版本由 `v5.1.x`
升级为 `v6.1.1`,[swoole v6.1.1 info](https://github.com/swoole/swoole-src/releases/tag/v6.1.0)
5. 扩展 `redis` 版本由 `5.3.7` 升级为 `6.2.0`
6. 扩展 `imagick` 版本由 `3.6.0` 升级为 `3.8.0`
7. `openssl` 库版本由 `v3.1.4` 升级为 `v3.6.0` ( openssl 3.5 支持了 quic 协议堆栈)
8. `curl` 库版本由 `v8.4.0` 升级为 `v8.16.0`
9. `nghttp2` 库版本由 `v1.57.0` 升级为 `v1.68.0`
10. `nghttp3` 库版本由 `v1.0.0` 升级为 `v1.12.0`
11. `ngtcp2` 库版本由 `8.4.0` 升级为 `8.16.0`
12. `curl` 库支持的 `http3` 协议,实现由(`quictls + ngtcp2 + nghttp3`) 变更为 (`openssl + nghttp3`)

| item | value |
|----------------|------------|
| branch | v5.1.x |
| tag | v5.1.8.0 |
| swoole version | v5.1.8 |
| php version | 8.1.29 |
| release date | 2025-08-23 |
| status | ok |
### 优化

## [change info](https://github.com/swoole/swoole-cli/compare/v5.1.7.0...v5.1.8.0)
1. 修复 macos 构建环境下 `libssh2` 功能出现废弃的警告

1. swoole version v5.1.7 upgrade to
v5.1.8 , [swoole v5.1.8 info](https://github.com/swoole/swoole-src/releases/tag/v5.1.8)
### Bug 修复

1. 修复 macos 构建环境下 `gmp` 库链接错误 (启用`-fPIC`)

### 废弃

1. `ngtcp2` 库冻结使用

## v5.1.8.0

1. [change info](https://github.com/swoole/swoole-cli/compare/v5.1.7.0...v5.1.8.0)
1. swoole version v5.1.7 upgrade to
v5.1.8 , [swoole v5.1.8 info](https://github.com/swoole/swoole-src/releases/tag/v5.1.8)
1 change: 1 addition & 0 deletions docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,5 +226,6 @@ swoole 启用支持 iouring 特性

with-static-pie
----
linux 环境下启用 static-pie
-static-pie‌:启用静态链接且生成 PIE 可执行文件
-fPIE‌:编译器生成位置无关代码(通常与 -static-pie 配合使用)
45 changes: 45 additions & 0 deletions docs/tags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# [v6.1.1.0](https://github.com/swoole/swoole-cli/releases/tag/v6.1.1.0)

| item | value |
|----------------|------------|
| branch | main |
| tag | v6.1.1.0 |
| swoole version | v6.1.1 |
| php version | 8.4.14 |
| release date | 2025-11-10 |
| status | ok |

1. [change info](https://github.com/swoole/swoole-cli/blob/ChangeLog-v6.1.1/docs/ChangeLog.md#v6110)
1. [Code Change Info](https://github.com/swoole/swoole-cli/compare/v6.0.2.0...v6.1.1.0)
1. [faq](https://github.com/swoole/swoole-cli/blob/ChangeLog-v6.1.1/docs/FAQ.md)

# [v6.1.0.0-rc1](https://github.com/swoole/swoole-cli/releases/tag/v6.1.0.0-rc1)

| item | value |
|----------------|--------------|
| branch | main |
| tag | v6.1.0.0-rc1 |
| swoole version | v6.1.0-rc1 |
| php version | 8.1.29 |
| release date | 2025-08-31 |
| status | ok |

## [change info](https://github.com/swoole/swoole-cli/compare/v6.0.2.0...v6.1.0.0-rc1)

1. swoole version v6.0.2.0 upgrade to
v6.1.0.0-rc1 , [swoole v6.1.0-rc1 info](https://github.com/swoole/swoole-src/releases/tag/v6.1.0-rc1)

# [v5.1.8.0](https://github.com/swoole/swoole-cli/releases/tag/v5.1.8.0)

| item | value |
|----------------|------------|
| branch | v5.1.x |
| tag | v5.1.8.0 |
| swoole version | v5.1.8 |
| php version | 8.1.29 |
| release date | 2025-08-23 |
| status | ok |




22 changes: 20 additions & 2 deletions sapi/scripts/tencent-cloud-object-storage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cd ${__PROJECT__}
## 下载与安装配置
## https://cloud.tencent.com/document/product/436/63144

APP_VERSION="v1.0.3"
APP_VERSION="v1.0.7"
APP_NAME="coscli"
APP_RUNTIME="${APP_NAME}-${APP_VERSION}"

Expand Down Expand Up @@ -116,7 +116,7 @@ test -f ${APP_RUNTIME} || curl -fSLo ${APP_RUNTIME} https://github.com/tencentyu
chmod a+x ${APP_RUNTIME}

BUCKET_NAME=$(grep "\- name: " ${CLOUD_OBJECT_STORAGE_CONFIG} | sed 's/\- name: //g' | sed 's/^ *//;s/ *$//' | tr -d '"')
COSCLI="${__PROJECT__}/var/tencent-cloud-object-storage/${APP_RUNTIME} --config-path ${CLOUD_OBJECT_STORAGE_CONFIG} --log-path ${__PROJECT__}/var/tencent-cloud-object-storage/"
COSCLI="${__PROJECT__}/var/tencent-cloud-object-storage/${APP_RUNTIME} --config-path ${CLOUD_OBJECT_STORAGE_CONFIG}"
COS_BUCKET_FOLDER="cos://${BUCKET_NAME}/dist/"

if [ "${UPLOAD_TYPE}" == 'all' ]; then
Expand All @@ -140,18 +140,36 @@ if [ "${UPLOAD_TYPE}" == 'all' ]; then
${COSCLI} cp swoole-cli-${SWOOLE_VERSION}-linux-x64.tar.xz ${COS_BUCKET_FOLDER}
${COSCLI} cp swoole-cli-${SWOOLE_VERSION}-macos-arm64.tar.xz ${COS_BUCKET_FOLDER}
${COSCLI} cp swoole-cli-${SWOOLE_VERSION}-macos-x64.tar.xz ${COS_BUCKET_FOLDER}
status=$?
if [[ $status -ne 0 ]]; then
echo $status
cat ${__PROJECT__}/var/tencent-cloud-object-storage/coscli.log
exit 1
fi
cd ${__PROJECT__}
exit 0
fi

if [ "${UPLOAD_TYPE}" == 'single' ]; then
${COSCLI} cp ${UPLOAD_FILE} ${COS_BUCKET_FOLDER}
status=$?
if [[ $status -ne 0 ]]; then
echo $status
cat ${__PROJECT__}/var/tencent-cloud-object-storage/coscli.log
exit 1
fi
exit 0
fi

if [ "${UPLOAD_TYPE}" == 'show' ]; then
# cat ${CLOUD_OBJECT_STORAGE_CONFIG}
# ${COSCLI} --help
${COSCLI} ls ${COS_BUCKET_FOLDER}
status=$?
if [[ $status -ne 0 ]]; then
echo $status
cat ${__PROJECT__}/var/tencent-cloud-object-storage/coscli.log
exit 1
fi
exit 0
fi
3 changes: 2 additions & 1 deletion sapi/src/builder/extension/swoole.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@

# 新版macos getdtablesize 函数缺失
# sed -i '' 's/getdtablesize();/sysconf(_SC_OPEN_MAX);/' ext/standard/php_fopen_wrapper.c
$libc = $p->isMacos() ? '-lc++ ' : '-lstdc++';

$libc = $p->isMacos() ? '-lc++' : '-lstdc++';

# cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_pthread
# 或者
Expand Down
2 changes: 1 addition & 1 deletion sapi/src/builder/extension/zlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$p->addExtension(
(new Extension('zlib'))
->withHomePage('https://www.php.net/zlib')
->withOptions('--with-zlib --with-zlib-dir=' . ZLIB_PREFIX)
->withOptions('--with-zlib=' . ZLIB_PREFIX)
->withDependentLibraries('zlib')
);
};
24 changes: 16 additions & 8 deletions sapi/src/builder/library/imagemagick.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,28 @@
->withHomePage('https://imagemagick.org/index.php')
->withManual('https://github.com/ImageMagick/ImageMagick.git')
->withLicense('https://imagemagick.org/script/license.php', Library::LICENSE_APACHE2)
->withUrl('https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.1-20.tar.gz')
->withFile('ImageMagick-v7.1.1-20.tar.gz')
->withFileHash('md5', '90eb1a9263b47b7e844eb817fe08932c')
->withUrl('https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.2-8.tar.gz')
->withFile('ImageMagick-v7.1.2-8.tar.gz')
//->withFileHash('md5', '90eb1a9263b47b7e844eb817fe08932c')
->withPrefix($imagemagick_prefix)
->withBuildCached(false)
->withInstallCached(false)
->withConfigure(
<<<EOF
./configure --help
PACKAGES_NAMES="libjpeg libturbojpeg libwebp libwebpdecoder libwebpdemux libwebpmux libpng freetype2"
PACKAGES_NAMES="\${PACKAGES_NAMES} libbrotlicommon libbrotlidec libbrotlienc libzip zlib libzstd liblzma"
PACKAGES_NAMES="\${PACKAGES_NAMES} libcrypto libssl openssl"
PACKAGES_NAMES="\${PACKAGES_NAMES} libxml-2.0"
PACKAGES_NAMES="\${PACKAGES_NAMES} libheif lcms2 libraw libraw_r libtiff-4 "
CPPFLAGS="\$(pkg-config --cflags-only-I --static \$PACKAGES_NAMES ) -I{$bzip2_prefix}/include" \
LDFLAGS="\$(pkg-config --libs-only-L --static \$PACKAGES_NAMES ) -L{$bzip2_prefix}/lib" \
LIBS="\$(pkg-config --libs-only-l --static \$PACKAGES_NAMES ) -lbz2" \
./configure \
--prefix={$imagemagick_prefix} \
--enable-shared=no \
--enable-static=yes \
--with-pic \
--with-zip \
--with-zlib \
--with-lzma \
Expand All @@ -38,9 +42,10 @@
--with-webp \
--with-xml \
--with-freetype \
--without-raw \
--without-tiff \
--without-lcms \
--with-heic \
--with-raw \
--with-tiff \
--with-lcms \
--enable-zero-configuration \
--enable-bounds-checking \
--enable-hdri \
Expand All @@ -52,7 +57,6 @@
--without-djvu \
--without-rsvg \
--without-fontconfig \
--without-heic \
--without-jbig \
--without-jxl \
--without-openjp2 \
Expand Down Expand Up @@ -96,7 +100,11 @@
'libpng',
'libgif',
'openssl',
'libzstd'
'libzstd',
'libheif',
'lcms2',
'libraw',
'libtiff'
)
);
};
39 changes: 39 additions & 0 deletions sapi/src/builder/library/lcms2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

use SwooleCli\Library;
use SwooleCli\Preprocessor;

return function (Preprocessor $p) {
$lcms2_prefix = LCMS2_PREFIX;
$libjpeg_prefix = JPEG_PREFIX;
$libtiff_prefix = LIBTIFF_PREFIX;
$lib = new Library('lcms2');
$lib->withHomePage('https://littlecms.com/color-engine/')
->withLicense('https://www.opensource.org/licenses/mit-license.php', Library::LICENSE_MIT)
->withUrl('https://sourceforge.net/projects/lcms/files/lcms/2.17/lcms2-2.17.tar.gz')
->withManual('https://lfs.lug.org.cn/blfs/view/10.0/general/lcms2.html')
->withPrefix($lcms2_prefix)
->withConfigure(
<<<EOF
./configure --help

PACKAGES="zlib"
CPPFLAGS="\$(pkg-config --cflags-only-I --static \$PACKAGES )" \
LDFLAGS="\$(pkg-config --libs-only-L --static \$PACKAGES )" \
LIBS="\$(pkg-config --libs-only-l --static \$PACKAGES )" \
./configure \
--prefix={$lcms2_prefix} \
--enable-shared=no \
--enable-static=yes \
--with-jpeg={$libjpeg_prefix} \
--with-tiff={$libtiff_prefix} \
--with-pic

EOF
)
->withBinPath($lcms2_prefix . '/bin/')
->withPkgName('lcms2')
->withDependentLibraries('zlib', 'libjpeg', 'libtiff');

$p->addLibrary($lib);
};
4 changes: 2 additions & 2 deletions sapi/src/builder/library/libavif.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
'dav1d',
'libyuv'
)
# 'libyuv', 'libsharpyuv','rav1e'
# 'libgav1' # 测试例子依赖 absl
# 'libyuv', 'libsharpyuv','rav1e'
# 'libgav1' # 测试例子依赖 absl
);

};
34 changes: 34 additions & 0 deletions sapi/src/builder/library/libde265.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

use SwooleCli\Library;
use SwooleCli\Preprocessor;

return function (Preprocessor $p) {
$libde265_prefix = LIBDE265_PREFIX;
$lib = new Library('libde265');
$lib->withHomePage('https://github.com/strukturag/libde265.git')
->withLicense('https://github.com/strukturag/libde265/blob/master/COPYING', Library::LICENSE_LGPL)
->withManual('https://github.com/strukturag/libde265.git')
->withUrl('https://github.com/strukturag/libde265/releases/download/v1.0.16/libde265-1.0.16.tar.gz')
->withPrefix($libde265_prefix)
->withConfigure(
<<<EOF
sh autogen.sh

./configure --help

./configure \
--prefix={$libde265_prefix} \
--enable-shared=no \
--enable-static=yes \
--enable-pic \
--enable-encoder \
--disable-sherlock265

EOF
)
->withPkgName('libde265')
->withBinPath($libde265_prefix . '/bin/');

$p->addLibrary($lib);
};
Loading
Loading