From 522d8b489001601b8412d1aa8c5933042de0915d Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Sat, 6 Jul 2024 21:56:42 +0800 Subject: [PATCH] Add spx extension support (#501) --- .github/workflows/tests.yml | 2 +- config/ext.json | 1959 +++++++++++++++-------------- config/source.json | 10 + docs/en/guide/extension-notes.md | 5 + docs/zh/guide/extension-notes.md | 5 + src/SPC/builder/extension/spx.php | 32 + src/globals/test-extensions.php | 4 +- 7 files changed, 1041 insertions(+), 976 deletions(-) create mode 100644 src/SPC/builder/extension/spx.php diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b2e3285f..14b24260 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -176,7 +176,7 @@ jobs: - name: "Run Build Tests (download)" run: | - bin/spc download --for-extensions="$(php src/globals/test-extensions.php extensions)" --for-libs="$(php src/globals/test-extensions.php libs)" --with-php=${{ matrix.php }} --ignore-cache-sources=php-src --debug --retry=5 + bin/spc download --for-extensions="$(php src/globals/test-extensions.php extensions)" --for-libs="$(php src/globals/test-extensions.php libs)" --with-php=${{ matrix.php }} --ignore-cache-sources=php-src --debug --retry=5 --shallow-clone - name: "Run Build Tests (build, *nix)" if: matrix.os != 'windows-latest' diff --git a/config/ext.json b/config/ext.json index 5b2e8eb8..79936c57 100644 --- a/config/ext.json +++ b/config/ext.json @@ -1,973 +1,986 @@ -{ - "amqp": { - "support": { - "BSD": "wip" - }, - "type": "external", - "arg-type": "custom", - "source": "amqp", - "lib-depends": [ - "librabbitmq" - ], - "ext-depends-windows": [ - "openssl" - ] - }, - "apcu": { - "type": "external", - "source": "apcu" - }, - "bcmath": { - "type": "builtin" - }, - "bz2": { - "type": "builtin", - "arg-type-unix": "with-prefix", - "arg-type-windows": "with", - "lib-depends": [ - "bzip2" - ] - }, - "calendar": { - "type": "builtin" - }, - "ctype": { - "type": "builtin" - }, - "curl": { - "notes": true, - "type": "builtin", - "arg-type": "with", - "lib-depends": [ - "curl" - ], - "ext-depends-windows": [ - "zlib", - "openssl" - ] - }, - "dba": { - "type": "builtin", - "arg-type": "custom", - "lib-suggests": [ - "qdbm" - ] - }, - "dom": { - "support": { - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "custom", - "arg-type-windows": "with", - "lib-depends": [ - "libxml2", - "zlib" - ], - "ext-depends-windows": [ - "xml" - ] - }, - "ds": { - "type": "external", - "source": "ext-ds" - }, - "enchant": { - "support": { - "Windows": "wip", - "BSD": "wip", - "Darwin": "wip", - "Linux": "wip" - }, - "type": "wip" - }, - "event": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "notes": true, - "type": "external", - "source": "ext-event", - "arg-type": "custom", - "lib-depends": [ - "libevent" - ], - "ext-depends": [ - "openssl" - ], - "ext-suggests": [ - "sockets" - ] - }, - "exif": { - "type": "builtin" - }, - "ffi": { - "support": { - "Linux": "no", - "BSD": "wip" - }, - "notes": true, - "arg-type": "custom", - "type": "builtin", - "lib-depends-unix": [ - "libffi" - ], - "lib-depends-windows": [ - "libffi-win" - ] - }, - "fileinfo": { - "type": "builtin" - }, - "filter": { - "type": "builtin" - }, - "ftp": { - "type": "builtin", - "lib-suggests": [ - "openssl" - ] - }, - "gd": { - "support": { - "BSD": "wip" - }, - "notes": true, - "type": "builtin", - "arg-type": "custom", - "arg-type-windows": "with", - "lib-depends": [ - "zlib", - "libpng" - ], - "ext-depends": [ - "zlib" - ], - "lib-suggests": [ - "libavif", - "libwebp", - "libjpeg", - "freetype" - ] - }, - "gettext": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "with-prefix", - "lib-depends": [ - "gettext" - ] - }, - "glfw": { - "support": { - "Windows": "wip", - "BSD": "no", - "Linux": "no" - }, - "notes": true, - "type": "external", - "arg-type": "custom", - "source": "ext-glfw", - "lib-depends": [ - "glfw" - ], - "lib-depends-windows": [] - }, - "gmp": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "with-prefix", - "lib-depends": [ - "gmp" - ] - }, - "iconv": { - "support": { - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "with-prefix", - "arg-type-windows": "with", - "lib-depends-unix": [ - "libiconv" - ], - "lib-depends-windows": [ - "libiconv-win" - ] - }, - "igbinary": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "external", - "source": "igbinary" - }, - "imagick": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "external", - "source": "ext-imagick", - "arg-type": "custom", - "lib-depends": [ - "imagemagick" - ] - }, - "imap": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "notes": true, - "type": "builtin", - "arg-type": "custom", - "lib-depends": [ - "imap" - ], - "ext-suggests": [ - "openssl" - ] - }, - "inotify": { - "support": { - "Windows": "no", - "BSD": "wip", - "Darwin": "no" - }, - "type": "external", - "source": "inotify" - }, - "intl": { - "support": { - "Windows": "no", - "BSD": "wip" - }, - "type": "builtin", - "lib-depends": [ - "icu" - ] - }, - "ldap": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "with-prefix", - "lib-depends": [ - "ldap" - ], - "lib-suggests": [ - "gmp", - "libsodium" - ], - "ext-suggests": [ - "openssl" - ] - }, - "libxml": { - "support": { - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "none", - "ext-depends": [ - "xml" - ] - }, - "mbregex": { - "type": "builtin", - "arg-type": "custom", - "ext-depends": [ - "mbstring" - ], - "lib-depends": [ - "onig" - ] - }, - "mbstring": { - "type": "builtin", - "arg-type": "custom" - }, - "mcrypt": { - "type": "wip", - "support": { - "Windows": "no", - "BSD": "no", - "Darwin": "no", - "Linux": "no" - }, - "notes": true - }, - "memcache": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "external", - "source": "ext-memcache", - "arg-type": "custom", - "lib-depends": [ - "zlib" - ], - "ext-depends": [ - "session" - ] - }, - "memcached": { - "support": { - "Windows": "wip", - "BSD": "wip", - "Linux": "no" - }, - "type": "external", - "source": "memcached", - "arg-type": "custom", - "cpp-extension": true, - "lib-depends": [ - "libmemcached" - ], - "ext-depends": [ - "session", - "zlib" - ] - }, - "mongodb": { - "support": { - "BSD": "wip", - "Windows": "wip" - }, - "type": "external", - "source": "mongodb", - "arg-type": "custom", - "lib-suggests": [ - "icu", - "openssl", - "zstd", - "zlib" - ] - }, - "mysqli": { - "type": "builtin", - "arg-type": "with", - "ext-depends": [ - "mysqlnd" - ] - }, - "mysqlnd": { - "type": "builtin", - "arg-type-windows": "with", - "lib-depends": [ - "zlib" - ] - }, - "oci8": { - "type": "wip", - "support": { - "Windows": "wip", - "BSD": "no", - "Darwin": "no", - "Linux": "no" - }, - "notes": true - }, - "opcache": { - "type": "builtin", - "arg-type": "custom" - }, - "openssl": { - "notes": true, - "type": "builtin", - "arg-type": "custom", - "arg-type-windows": "with", - "lib-depends": [ - "openssl", - "zlib" - ], - "ext-depends": [ - "zlib" - ] - }, - "parallel": { - "support": { - "BSD": "wip" - }, - "notes": true, - "type": "external", - "source": "parallel", - "arg-type-windows": "with", - "lib-depends-windows": [ - "pthreads4w" - ] - }, - "password-argon2": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "notes": true, - "type": "builtin", - "arg-type": "with-prefix", - "lib-depends": [ - "libargon2" - ] - }, - "pcntl": { - "support": { - "Windows": "no" - }, - "type": "builtin", - "unix-only": true - }, - "pdo": { - "type": "builtin" - }, - "pdo_mysql": { - "type": "builtin", - "arg-type": "with", - "ext-depends": [ - "pdo", - "mysqlnd" - ] - }, - "pdo_pgsql": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "with-prefix", - "ext-depends": [ - "pdo", - "pgsql" - ], - "lib-depends": [ - "postgresql" - ] - }, - "pdo_sqlite": { - "support": { - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "with", - "ext-depends": [ - "pdo", - "sqlite3" - ], - "lib-depends": [ - "sqlite" - ] - }, - "pdo_sqlsrv": { - "support": { - "BSD": "wip" - }, - "type": "external", - "source": "pdo_sqlsrv", - "arg-type": "with", - "ext-depends": [ - "pdo", - "sqlsrv" - ] - }, - "pgsql": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "notes": true, - "type": "builtin", - "arg-type": "with-prefix", - "lib-depends": [ - "postgresql" - ] - }, - "phar": { - "type": "builtin", - "ext-depends": [ - "zlib" - ] - }, - "posix": { - "support": { - "Windows": "no" - }, - "type": "builtin", - "unix-only": true - }, - "protobuf": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "external", - "source": "protobuf" - }, - "rar": { - "support": { - "BSD": "wip", - "Darwin": "partial" - }, - "notes": true, - "type": "external", - "source": "rar", - "cpp-extension": true - }, - "readline": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "with-prefix", - "lib-depends": [ - "readline" - ] - }, - "redis": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "external", - "source": "redis", - "arg-type": "custom", - "ext-suggests": [ - "session", - "igbinary" - ], - "lib-suggests": [ - "zstd", - "liblz4" - ] - }, - "session": { - "type": "builtin" - }, - "shmop": { - "type": "builtin" - }, - "simdjson": { - "type": "external", - "source": "ext-simdjson", - "cpp-extension": true - }, - "simplexml": { - "support": { - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "custom", - "lib-depends": [ - "libxml2" - ], - "ext-depends-windows": [ - "xml" - ] - }, - "snappy": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "external", - "source": "ext-snappy", - "cpp-extension": true, - "arg-type": "custom", - "lib-depends": [ - "snappy" - ], - "ext-suggest": [ - "apcu" - ] - }, - "soap": { - "support": { - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "custom", - "lib-depends": [ - "libxml2" - ], - "ext-depends-windows": [ - "xml" - ] - }, - "sockets": { - "type": "builtin" - }, - "sodium": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "with", - "lib-depends": [ - "libsodium" - ] - }, - "sqlite3": { - "support": { - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "with-prefix", - "arg-type-windows": "with", - "lib-depends": [ - "sqlite" - ] - }, - "sqlsrv": { - "support": { - "BSD": "wip" - }, - "type": "external", - "source": "sqlsrv", - "lib-depends-unix": [ - "unixodbc" - ], - "ext-depends-linux": [ - "pcntl" - ], - "cpp-extension": true - }, - "ssh2": { - "support": { - "BSD": "wip" - }, - "type": "external", - "source": "ext-ssh2", - "arg-type": "with-prefix", - "arg-type-windows": "with", - "lib-depends": [ - "libssh2" - ], - "ext-depends-windows": [ - "openssl", - "zlib" - ] - }, - "swoole": { - "support": { - "Windows": "no", - "BSD": "wip" - }, - "notes": true, - "type": "external", - "source": "swoole", - "arg-type": "custom", - "cpp-extension": true, - "unix-only": true, - "lib-depends": [ - "libcares", - "brotli", - "nghttp2", - "zlib" - ], - "ext-depends": [ - "openssl", - "curl" - ], - "ext-suggests": [ - "swoole-hook-pgsql", - "swoole-hook-mysql", - "swoole-hook-sqlite" - ] - }, - "swoole-hook-mysql": { - "support": { - "Windows": "no", - "BSD": "wip" - }, - "notes": true, - "type": "addon", - "arg-type": "custom", - "ext-depends": [ - "mysqlnd", - "pdo", - "pdo_mysql" - ], - "ext-suggests": [ - "mysqli" - ] - }, - "swoole-hook-pgsql": { - "support": { - "Windows": "no", - "BSD": "wip", - "Darwin": "partial" - }, - "notes": true, - "type": "addon", - "arg-type": "custom", - "ext-depends": [ - "pgsql", - "pdo" - ] - }, - "swoole-hook-sqlite": { - "support": { - "Windows": "no", - "BSD": "wip" - }, - "notes": true, - "type": "addon", - "arg-type": "custom", - "ext-depends": [ - "sqlite3", - "pdo" - ] - }, - "swow": { - "support": { - "BSD": "wip" - }, - "notes": true, - "type": "external", - "source": "swow", - "arg-type": "custom", - "lib-suggests": [ - "openssl", - "curl" - ], - "ext-suggests": [ - "openssl", - "curl" - ] - }, - "sysvmsg": { - "support": { - "Windows": "no", - "BSD": "wip" - }, - "type": "builtin", - "unix-only": true - }, - "sysvsem": { - "support": { - "Windows": "no", - "BSD": "wip" - }, - "type": "builtin", - "unix-only": true - }, - "sysvshm": { - "support": { - "BSD": "wip" - }, - "type": "builtin" - }, - "tidy": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "with-prefix", - "lib-depends": [ - "tidy" - ] - }, - "tokenizer": { - "type": "builtin" - }, - "uuid": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "external", - "source": "ext-uuid", - "arg-type": "with-prefix", - "lib-depends": [ - "libuuid" - ] - }, - "uv": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "external", - "source": "ext-uv", - "arg-type": "with-prefix", - "lib-depends": [ - "libuv" - ], - "ext-depends": [ - "sockets" - ] - }, - "xdebug": { - "type": "builtin", - "support": { - "Windows": "wip", - "BSD": "no", - "Darwin": "no", - "Linux": "no" - }, - "notes": true - }, - "xhprof": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "notes": true, - "type": "external", - "source": "xhprof", - "ext-depends": [ - "ctype" - ] - }, - "xlswriter": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "external", - "source": "xlswriter", - "arg-type": "custom", - "ext-depends": [ - "zlib", - "zip" - ], - "lib-suggests": [ - "openssl" - ] - }, - "xml": { - "support": { - "BSD": "wip" - }, - "notes": true, - "type": "builtin", - "arg-type": "custom", - "arg-type-windows": "with", - "lib-depends": [ - "libxml2" - ], - "ext-depends-windows": [ - "iconv" - ] - }, - "xmlreader": { - "support": { - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "custom", - "lib-depends": [ - "libxml2" - ], - "ext-depends-windows": [ - "xml", - "dom" - ] - }, - "xmlwriter": { - "support": { - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "custom", - "lib-depends": [ - "libxml2" - ], - "ext-depends-windows": [ - "xml" - ] - }, - "xsl": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "with-prefix", - "lib-depends": [ - "libxslt" - ], - "ext-depends": [ - "xml", - "dom" - ] - }, - "yac": { - "support": { - "BSD": "wip" - }, - "type": "external", - "source": "yac", - "arg-type-unix": "custom", - "ext-depends-unix": [ - "igbinary" - ] - }, - "yaml": { - "support": { - "BSD": "wip" - }, - "type": "external", - "source": "yaml", - "arg-type-unix": "with-prefix", - "arg-type-windows": "with", - "lib-depends": [ - "libyaml" - ] - }, - "zip": { - "support": { - "BSD": "wip" - }, - "type": "builtin", - "arg-type": "with-prefix", - "arg-type-windows": "enable", - "lib-depends-unix": [ - "libzip" - ], - "ext-depends-windows": [ - "zlib", - "bz2" - ], - "lib-depends-windows": [ - "libzip", - "zlib", - "bzip2", - "xz" - ] - }, - "zlib": { - "type": "builtin", - "arg-type": "custom", - "arg-type-windows": "enable", - "lib-depends": [ - "zlib" - ] - }, - "zstd": { - "support": { - "Windows": "wip", - "BSD": "wip" - }, - "type": "external", - "source": "ext-zstd", - "arg-type": "custom", - "lib-depends": [ - "zstd" - ] - } -} +{ + "amqp": { + "support": { + "BSD": "wip" + }, + "type": "external", + "arg-type": "custom", + "source": "amqp", + "lib-depends": [ + "librabbitmq" + ], + "ext-depends-windows": [ + "openssl" + ] + }, + "apcu": { + "type": "external", + "source": "apcu" + }, + "bcmath": { + "type": "builtin" + }, + "bz2": { + "type": "builtin", + "arg-type-unix": "with-prefix", + "arg-type-windows": "with", + "lib-depends": [ + "bzip2" + ] + }, + "calendar": { + "type": "builtin" + }, + "ctype": { + "type": "builtin" + }, + "curl": { + "notes": true, + "type": "builtin", + "arg-type": "with", + "lib-depends": [ + "curl" + ], + "ext-depends-windows": [ + "zlib", + "openssl" + ] + }, + "dba": { + "type": "builtin", + "arg-type": "custom", + "lib-suggests": [ + "qdbm" + ] + }, + "dom": { + "support": { + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "custom", + "arg-type-windows": "with", + "lib-depends": [ + "libxml2", + "zlib" + ], + "ext-depends-windows": [ + "xml" + ] + }, + "ds": { + "type": "external", + "source": "ext-ds" + }, + "enchant": { + "support": { + "Windows": "wip", + "BSD": "wip", + "Darwin": "wip", + "Linux": "wip" + }, + "type": "wip" + }, + "event": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "notes": true, + "type": "external", + "source": "ext-event", + "arg-type": "custom", + "lib-depends": [ + "libevent" + ], + "ext-depends": [ + "openssl" + ], + "ext-suggests": [ + "sockets" + ] + }, + "exif": { + "type": "builtin" + }, + "ffi": { + "support": { + "Linux": "no", + "BSD": "wip" + }, + "notes": true, + "arg-type": "custom", + "type": "builtin", + "lib-depends-unix": [ + "libffi" + ], + "lib-depends-windows": [ + "libffi-win" + ] + }, + "fileinfo": { + "type": "builtin" + }, + "filter": { + "type": "builtin" + }, + "ftp": { + "type": "builtin", + "lib-suggests": [ + "openssl" + ] + }, + "gd": { + "support": { + "BSD": "wip" + }, + "notes": true, + "type": "builtin", + "arg-type": "custom", + "arg-type-windows": "with", + "lib-depends": [ + "zlib", + "libpng" + ], + "ext-depends": [ + "zlib" + ], + "lib-suggests": [ + "libavif", + "libwebp", + "libjpeg", + "freetype" + ] + }, + "gettext": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "with-prefix", + "lib-depends": [ + "gettext" + ] + }, + "glfw": { + "support": { + "Windows": "wip", + "BSD": "no", + "Linux": "no" + }, + "notes": true, + "type": "external", + "arg-type": "custom", + "source": "ext-glfw", + "lib-depends": [ + "glfw" + ], + "lib-depends-windows": [] + }, + "gmp": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "with-prefix", + "lib-depends": [ + "gmp" + ] + }, + "iconv": { + "support": { + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "with-prefix", + "arg-type-windows": "with", + "lib-depends-unix": [ + "libiconv" + ], + "lib-depends-windows": [ + "libiconv-win" + ] + }, + "igbinary": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "external", + "source": "igbinary" + }, + "imagick": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "external", + "source": "ext-imagick", + "arg-type": "custom", + "lib-depends": [ + "imagemagick" + ] + }, + "imap": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "notes": true, + "type": "builtin", + "arg-type": "custom", + "lib-depends": [ + "imap" + ], + "ext-suggests": [ + "openssl" + ] + }, + "inotify": { + "support": { + "Windows": "no", + "BSD": "wip", + "Darwin": "no" + }, + "type": "external", + "source": "inotify" + }, + "intl": { + "support": { + "Windows": "no", + "BSD": "wip" + }, + "type": "builtin", + "lib-depends": [ + "icu" + ] + }, + "ldap": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "with-prefix", + "lib-depends": [ + "ldap" + ], + "lib-suggests": [ + "gmp", + "libsodium" + ], + "ext-suggests": [ + "openssl" + ] + }, + "libxml": { + "support": { + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "none", + "ext-depends": [ + "xml" + ] + }, + "mbregex": { + "type": "builtin", + "arg-type": "custom", + "ext-depends": [ + "mbstring" + ], + "lib-depends": [ + "onig" + ] + }, + "mbstring": { + "type": "builtin", + "arg-type": "custom" + }, + "mcrypt": { + "type": "wip", + "support": { + "Windows": "no", + "BSD": "no", + "Darwin": "no", + "Linux": "no" + }, + "notes": true + }, + "memcache": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "external", + "source": "ext-memcache", + "arg-type": "custom", + "lib-depends": [ + "zlib" + ], + "ext-depends": [ + "session" + ] + }, + "memcached": { + "support": { + "Windows": "wip", + "BSD": "wip", + "Linux": "no" + }, + "type": "external", + "source": "memcached", + "arg-type": "custom", + "cpp-extension": true, + "lib-depends": [ + "libmemcached" + ], + "ext-depends": [ + "session", + "zlib" + ] + }, + "mongodb": { + "support": { + "BSD": "wip", + "Windows": "wip" + }, + "type": "external", + "source": "mongodb", + "arg-type": "custom", + "lib-suggests": [ + "icu", + "openssl", + "zstd", + "zlib" + ] + }, + "mysqli": { + "type": "builtin", + "arg-type": "with", + "ext-depends": [ + "mysqlnd" + ] + }, + "mysqlnd": { + "type": "builtin", + "arg-type-windows": "with", + "lib-depends": [ + "zlib" + ] + }, + "oci8": { + "type": "wip", + "support": { + "Windows": "wip", + "BSD": "no", + "Darwin": "no", + "Linux": "no" + }, + "notes": true + }, + "opcache": { + "type": "builtin", + "arg-type": "custom" + }, + "openssl": { + "notes": true, + "type": "builtin", + "arg-type": "custom", + "arg-type-windows": "with", + "lib-depends": [ + "openssl", + "zlib" + ], + "ext-depends": [ + "zlib" + ] + }, + "parallel": { + "support": { + "BSD": "wip" + }, + "notes": true, + "type": "external", + "source": "parallel", + "arg-type-windows": "with", + "lib-depends-windows": [ + "pthreads4w" + ] + }, + "password-argon2": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "notes": true, + "type": "builtin", + "arg-type": "with-prefix", + "lib-depends": [ + "libargon2" + ] + }, + "pcntl": { + "support": { + "Windows": "no" + }, + "type": "builtin", + "unix-only": true + }, + "pdo": { + "type": "builtin" + }, + "pdo_mysql": { + "type": "builtin", + "arg-type": "with", + "ext-depends": [ + "pdo", + "mysqlnd" + ] + }, + "pdo_pgsql": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "with-prefix", + "ext-depends": [ + "pdo", + "pgsql" + ], + "lib-depends": [ + "postgresql" + ] + }, + "pdo_sqlite": { + "support": { + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "with", + "ext-depends": [ + "pdo", + "sqlite3" + ], + "lib-depends": [ + "sqlite" + ] + }, + "pdo_sqlsrv": { + "support": { + "BSD": "wip" + }, + "type": "external", + "source": "pdo_sqlsrv", + "arg-type": "with", + "ext-depends": [ + "pdo", + "sqlsrv" + ] + }, + "pgsql": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "notes": true, + "type": "builtin", + "arg-type": "with-prefix", + "lib-depends": [ + "postgresql" + ] + }, + "phar": { + "type": "builtin", + "ext-depends": [ + "zlib" + ] + }, + "posix": { + "support": { + "Windows": "no" + }, + "type": "builtin", + "unix-only": true + }, + "protobuf": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "external", + "source": "protobuf" + }, + "rar": { + "support": { + "BSD": "wip", + "Darwin": "partial" + }, + "notes": true, + "type": "external", + "source": "rar", + "cpp-extension": true + }, + "readline": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "with-prefix", + "lib-depends": [ + "readline" + ] + }, + "redis": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "external", + "source": "redis", + "arg-type": "custom", + "ext-suggests": [ + "session", + "igbinary" + ], + "lib-suggests": [ + "zstd", + "liblz4" + ] + }, + "session": { + "type": "builtin" + }, + "shmop": { + "type": "builtin" + }, + "simdjson": { + "type": "external", + "source": "ext-simdjson", + "cpp-extension": true + }, + "simplexml": { + "support": { + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "custom", + "lib-depends": [ + "libxml2" + ], + "ext-depends-windows": [ + "xml" + ] + }, + "snappy": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "external", + "source": "ext-snappy", + "cpp-extension": true, + "arg-type": "custom", + "lib-depends": [ + "snappy" + ], + "ext-suggest": [ + "apcu" + ] + }, + "soap": { + "support": { + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "custom", + "lib-depends": [ + "libxml2" + ], + "ext-depends-windows": [ + "xml" + ] + }, + "sockets": { + "type": "builtin" + }, + "sodium": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "with", + "lib-depends": [ + "libsodium" + ] + }, + "spx": { + "support": { + "BSD": "wip", + "Windows": "no" + }, + "notes": true, + "type": "external", + "source": "spx", + "arg-type": "custom", + "lib-depends": [ + "zlib" + ] + }, + "sqlite3": { + "support": { + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "with-prefix", + "arg-type-windows": "with", + "lib-depends": [ + "sqlite" + ] + }, + "sqlsrv": { + "support": { + "BSD": "wip" + }, + "type": "external", + "source": "sqlsrv", + "lib-depends-unix": [ + "unixodbc" + ], + "ext-depends-linux": [ + "pcntl" + ], + "cpp-extension": true + }, + "ssh2": { + "support": { + "BSD": "wip" + }, + "type": "external", + "source": "ext-ssh2", + "arg-type": "with-prefix", + "arg-type-windows": "with", + "lib-depends": [ + "libssh2" + ], + "ext-depends-windows": [ + "openssl", + "zlib" + ] + }, + "swoole": { + "support": { + "Windows": "no", + "BSD": "wip" + }, + "notes": true, + "type": "external", + "source": "swoole", + "arg-type": "custom", + "cpp-extension": true, + "unix-only": true, + "lib-depends": [ + "libcares", + "brotli", + "nghttp2", + "zlib" + ], + "ext-depends": [ + "openssl", + "curl" + ], + "ext-suggests": [ + "swoole-hook-pgsql", + "swoole-hook-mysql", + "swoole-hook-sqlite" + ] + }, + "swoole-hook-mysql": { + "support": { + "Windows": "no", + "BSD": "wip" + }, + "notes": true, + "type": "addon", + "arg-type": "custom", + "ext-depends": [ + "mysqlnd", + "pdo", + "pdo_mysql" + ], + "ext-suggests": [ + "mysqli" + ] + }, + "swoole-hook-pgsql": { + "support": { + "Windows": "no", + "BSD": "wip", + "Darwin": "partial" + }, + "notes": true, + "type": "addon", + "arg-type": "custom", + "ext-depends": [ + "pgsql", + "pdo" + ] + }, + "swoole-hook-sqlite": { + "support": { + "Windows": "no", + "BSD": "wip" + }, + "notes": true, + "type": "addon", + "arg-type": "custom", + "ext-depends": [ + "sqlite3", + "pdo" + ] + }, + "swow": { + "support": { + "BSD": "wip" + }, + "notes": true, + "type": "external", + "source": "swow", + "arg-type": "custom", + "lib-suggests": [ + "openssl", + "curl" + ], + "ext-suggests": [ + "openssl", + "curl" + ] + }, + "sysvmsg": { + "support": { + "Windows": "no", + "BSD": "wip" + }, + "type": "builtin", + "unix-only": true + }, + "sysvsem": { + "support": { + "Windows": "no", + "BSD": "wip" + }, + "type": "builtin", + "unix-only": true + }, + "sysvshm": { + "support": { + "BSD": "wip" + }, + "type": "builtin" + }, + "tidy": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "with-prefix", + "lib-depends": [ + "tidy" + ] + }, + "tokenizer": { + "type": "builtin" + }, + "uuid": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "external", + "source": "ext-uuid", + "arg-type": "with-prefix", + "lib-depends": [ + "libuuid" + ] + }, + "uv": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "external", + "source": "ext-uv", + "arg-type": "with-prefix", + "lib-depends": [ + "libuv" + ], + "ext-depends": [ + "sockets" + ] + }, + "xdebug": { + "type": "builtin", + "support": { + "Windows": "wip", + "BSD": "no", + "Darwin": "no", + "Linux": "no" + }, + "notes": true + }, + "xhprof": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "notes": true, + "type": "external", + "source": "xhprof", + "ext-depends": [ + "ctype" + ] + }, + "xlswriter": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "external", + "source": "xlswriter", + "arg-type": "custom", + "ext-depends": [ + "zlib", + "zip" + ], + "lib-suggests": [ + "openssl" + ] + }, + "xml": { + "support": { + "BSD": "wip" + }, + "notes": true, + "type": "builtin", + "arg-type": "custom", + "arg-type-windows": "with", + "lib-depends": [ + "libxml2" + ], + "ext-depends-windows": [ + "iconv" + ] + }, + "xmlreader": { + "support": { + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "custom", + "lib-depends": [ + "libxml2" + ], + "ext-depends-windows": [ + "xml", + "dom" + ] + }, + "xmlwriter": { + "support": { + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "custom", + "lib-depends": [ + "libxml2" + ], + "ext-depends-windows": [ + "xml" + ] + }, + "xsl": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "with-prefix", + "lib-depends": [ + "libxslt" + ], + "ext-depends": [ + "xml", + "dom" + ] + }, + "yac": { + "support": { + "BSD": "wip" + }, + "type": "external", + "source": "yac", + "arg-type-unix": "custom", + "ext-depends-unix": [ + "igbinary" + ] + }, + "yaml": { + "support": { + "BSD": "wip" + }, + "type": "external", + "source": "yaml", + "arg-type-unix": "with-prefix", + "arg-type-windows": "with", + "lib-depends": [ + "libyaml" + ] + }, + "zip": { + "support": { + "BSD": "wip" + }, + "type": "builtin", + "arg-type": "with-prefix", + "arg-type-windows": "enable", + "lib-depends-unix": [ + "libzip" + ], + "ext-depends-windows": [ + "zlib", + "bz2" + ], + "lib-depends-windows": [ + "libzip", + "zlib", + "bzip2", + "xz" + ] + }, + "zlib": { + "type": "builtin", + "arg-type": "custom", + "arg-type-windows": "enable", + "lib-depends": [ + "zlib" + ] + }, + "zstd": { + "support": { + "Windows": "wip", + "BSD": "wip" + }, + "type": "external", + "source": "ext-zstd", + "arg-type": "custom", + "lib-depends": [ + "zstd" + ] + } +} diff --git a/config/source.json b/config/source.json index 8bdcea57..1593fc83 100644 --- a/config/source.json +++ b/config/source.json @@ -640,6 +640,16 @@ "path": "COPYING" } }, + "spx": { + "type": "git", + "rev": "master", + "url": "https://github.com/static-php/php-spx.git", + "path": "php-src/ext/spx", + "license": { + "type": "file", + "path": "LICENSE" + } + }, "sqlite": { "type": "url", "url": "https://www.sqlite.org/2023/sqlite-autoconf-3430200.tar.gz", diff --git a/docs/en/guide/extension-notes.md b/docs/en/guide/extension-notes.md index 2f31523d..fc6b170f 100644 --- a/docs/en/guide/extension-notes.md +++ b/docs/en/guide/extension-notes.md @@ -144,3 +144,8 @@ If you enable event extension on macOS, the `openpty` will be disabled due to is ## parallel Parallel is only supported on PHP 8.0 ZTS and above. + +## spx + +1. The [SPX extension](https://github.com/NoiseByNorthwest/php-spx) only supports NTS mode. +2. SPX does not support Windows, and the official repository does not support static compilation. static-php-cli uses a [modified version](https://github.com/static-php/php-spx). diff --git a/docs/zh/guide/extension-notes.md b/docs/zh/guide/extension-notes.md index 5c49da20..7a464dbb 100644 --- a/docs/zh/guide/extension-notes.md +++ b/docs/zh/guide/extension-notes.md @@ -131,3 +131,8 @@ event 扩展在 macOS 系统下编译后暂无法使用 `openpty` 特性。相 ## parallel parallel 扩展只支持 PHP 8.0 及以上版本,并只支持 ZTS 构建(`--enable-zts`)。 + +# spx + +1. [SPX 扩展](https://github.com/NoiseByNorthwest/php-spx) 只支持非线程模式。 +2. SPX 目前不支持 Windows,且官方仓库也不支持静态编译,static-php-cli 使用了 [修改版本](https://github.com/static-php/php-spx)。 diff --git a/src/SPC/builder/extension/spx.php b/src/SPC/builder/extension/spx.php new file mode 100644 index 00000000..6c2a6a19 --- /dev/null +++ b/src/SPC/builder/extension/spx.php @@ -0,0 +1,32 @@ +builder->getOption('enable-zts')) { + throw new WrongUsageException('ext-spx is not thread safe, do not build it with ZTS builds'); + } + } + + public function getUnixConfigureArg(): string + { + $arg = '--enable-spx'; + if ($this->builder->getExt('zlib') === null) { + $arg .= ' --with-zlib-dir=' . BUILD_ROOT_PATH; + } + return $arg; + } +} diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index c16f11bf..335074d1 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -19,13 +19,13 @@ $upx = true; // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'sockets,yaml,swoole', + 'Linux', 'Darwin' => 'spx', 'Windows' => 'mbstring,pdo_sqlite,mbregex,bz2,sqlsrv,pdo_sqlsrv,yaml', }; // If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`). $with_libs = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'xz', + 'Linux', 'Darwin' => '', 'Windows' => '', };